From 8b61760ebd474b2d20978b6a6ae6514e0af1ba8b Mon Sep 17 00:00:00 2001 From: null2264 <46041660+null2264@users.noreply.github.com> Date: Sat, 21 Oct 2023 05:04:58 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20null2264?= =?UTF-8?q?/Ghostbox@57f7ffe0c8ea82b9b7315bcf4818044606f967e7=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- .../{index-7380452a.js => index-be605fd2.js} | 28 +++++++++---------- ...dion-9597afee.js => accordion-0fbf6d28.js} | 2 +- ...s => account-moderation-modal-e488ae8f.js} | 2 +- ...86e2.js => account-note-modal-61325a84.js} | 2 +- ...61b68090.js => account-search-46dd7dbb.js} | 2 +- ...ounts-1cafdbcf.js => accounts-2089f869.js} | 2 +- ...-70064cbb.js => actions-modal-50b0f682.js} | 2 +- ...-d5697a45.js => announcements-7255f0c7.js} | 2 +- ...7e5.js => announcements-panel-4de5dd74.js} | 2 +- ...s => authorize-reject-buttons-1aaf0a6a.js} | 2 +- ...63d3155f.js => birthday-panel-af5c7f67.js} | 2 +- ...9b60060.js => birthdays-modal-6fbebf50.js} | 2 +- ...al-f29bf243.js => boost-modal-acdb3394.js} | 2 +- ...e0ef4.js => chat-search-input-ec7e67b1.js} | 2 +- ...et-c0fe4d5a.js => chat-widget-a6429f4e.js} | 2 +- ...c.js => compare-history-modal-03ca0264.js} | 2 +- ...fb69ccb.js => component-modal-db8b465c.js} | 2 +- ...ff5.js => compose-event-modal-d79d7a70.js} | 2 +- ...-2eac5d18.js => compose-modal-4c08c001.js} | 2 +- ...dfc8.js => confirmation-modal-fb803cce.js} | 2 +- ...{create-aa354598.js => create-990cc91d.js} | 2 +- ...8c40.js => create-group-modal-efc3bce4.js} | 2 +- ...ner-c29bb4cb.js => cta-banner-fbac72b3.js} | 2 +- ...er-d2d1ed31.js => date-picker-63c681ce.js} | 2 +- ...cover-9143ae25.js => discover-2d5870bd.js} | 2 +- ...35340864.js => dislikes-modal-1a832d05.js} | 2 +- ...js => edit-announcement-modal-7321cc37.js} | 2 +- ...b.js => edit-federation-modal-75e12d59.js} | 2 +- ...er-a7163632.js => edit-filter-eb79beb3.js} | 2 +- ...oup-72b712f0.js => edit-group-81dff6cb.js} | 2 +- ...al-2c187d85.js => embed-modal-5ddfa846.js} | 2 +- ...r-2ef1c775.js => emoji-picker-7d9d02c1.js} | 2 +- ...0818.js => emoji-picker-modal-a3e23f07.js} | 2 +- ....js => es.array.last-index-of-d76ad0ed.js} | 2 +- ...733542e.js => es.array.splice-adb98933.js} | 2 +- ...a4db.js => es.promise.finally-0ef07e66.js} | 2 +- ...2e912d.js => event-discussion-d1b152dc.js} | 2 +- ...r-163e2ab5.js => event-header-55d43bbc.js} | 2 +- ...23e20.js => event-information-8646cc5b.js} | 2 +- ...e05b221.js => event-map-modal-4a83ec56.js} | 2 +- ...s => event-participants-modal-c140b263.js} | 2 +- .../js/{exif-ab0e667c.js => exif-05f4a801.js} | 2 +- ...s => familiar-followers-modal-6deccc90.js} | 2 +- ...9dd035.js => favourites-modal-4f88d92b.js} | 2 +- ...put-e3eba176.js => file-input-c35dcc9b.js} | 2 +- ...511cf.js => fork-awesome-icon-42a9fa19.js} | 2 +- ...-905e05e2.js => funding-panel-d69ca9fb.js} | 2 +- ...7.js => group-blocked-members-92a06c91.js} | 2 +- ...ard-c9aa3023.js => group-card-e8bab249.js} | 2 +- ...-643efd4a.js => group-gallery-df350fcd.js} | 2 +- ...498c.js => group-header-image-068adc6d.js} | 2 +- ...21d0638.js => group-list-item-d71c8a2e.js} | 2 +- ...79183.js => group-media-panel-8bea6b23.js} | 2 +- ...-8d014300.js => group-members-c0d4ea9d.js} | 2 +- ... => group-membership-requests-400e3915.js} | 2 +- ...9f6d.js => group-tag-timeline-f9340654.js} | 2 +- ...ags-537025c4.js => group-tags-42eed4b5.js} | 2 +- ...f3aeb2.js => group-tags-field-13c248c9.js} | 2 +- ...e28dc6fd.js => group-timeline-754a6fbe.js} | 2 +- ...ashtag-1d2f7520.js => hashtag-394c7092.js} | 2 +- ...-eba39776.js => header-picker-cd9089b7.js} | 2 +- ...-4d4ec08e.js => hotkeys-modal-e6f1a2b7.js} | 2 +- .../{index-fbc91b1f.js => index-00fe90fc.js} | 2 +- .../{index-ff8b63a3.js => index-0b097d9d.js} | 2 +- .../{index-2dd95a59.js => index-1086304d.js} | 2 +- .../{index-66aa4115.js => index-194f1846.js} | 2 +- .../{index-5bcfa526.js => index-1a285129.js} | 2 +- .../{index-acec8e9a.js => index-245fef5c.js} | 2 +- .../{index-e88098cf.js => index-305a8551.js} | 2 +- .../{index-571dd45e.js => index-3399e540.js} | 2 +- .../{index-f98470b1.js => index-357ae570.js} | 2 +- .../{index-6907f734.js => index-431739eb.js} | 2 +- packs/js/index-45f57580.js | 1 - .../{index-7e14f476.js => index-4c479bc1.js} | 2 +- .../{index-fb44cfe6.js => index-4d67014f.js} | 2 +- .../{index-ba3389ca.js => index-4dc438b1.js} | 2 +- packs/js/index-501024f5.js | 1 + .../{index-2846fb7c.js => index-566a3dfd.js} | 2 +- .../{index-f30036af.js => index-57b05c05.js} | 2 +- .../{index-23ba0bda.js => index-5b71c76b.js} | 2 +- .../{index-625bf5da.js => index-5eda592e.js} | 2 +- packs/js/index-605b2951.js | 1 - .../{index-486dc940.js => index-63ea9ebf.js} | 2 +- .../{index-83b6cf03.js => index-654bbfc5.js} | 2 +- .../{index-9bd9b506.js => index-65e95827.js} | 2 +- .../{index-bbc2ca16.js => index-67126278.js} | 2 +- .../{index-899a85e6.js => index-6797616c.js} | 2 +- .../{index-a0951cf4.js => index-6adba802.js} | 2 +- .../{index-b84c723b.js => index-6f58feb4.js} | 2 +- .../{index-5c8fa37d.js => index-733cc03a.js} | 2 +- .../{index-88311901.js => index-74f11771.js} | 2 +- .../{index-dd438a69.js => index-75561210.js} | 2 +- .../{index-704aaec3.js => index-78ab572e.js} | 2 +- .../{index-4bb15783.js => index-78fe1150.js} | 2 +- .../{index-75eb026b.js => index-85a17314.js} | 2 +- .../{index-5fa99826.js => index-89c90e00.js} | 2 +- .../{index-3011f076.js => index-9628cdd2.js} | 2 +- .../{index-dae99015.js => index-96c112b4.js} | 2 +- .../{index-de5510c5.js => index-9c870042.js} | 2 +- .../{index-fa21c2a3.js => index-a35ea6ff.js} | 2 +- .../{index-4be17463.js => index-a4ed1d8d.js} | 2 +- .../{index-c8e0cd43.js => index-aa78d199.js} | 2 +- .../{index-f32c46c0.js => index-aac4aed4.js} | 2 +- .../{index-71d7c29c.js => index-b320f3f0.js} | 2 +- .../{index-4f4d03b8.js => index-b4b4f3e9.js} | 2 +- .../{index-0de3a47b.js => index-ba6fc339.js} | 2 +- .../{index-df990da1.js => index-c3905184.js} | 2 +- .../{index-faefcaa0.js => index-d390d93a.js} | 2 +- .../{index-7b6c023e.js => index-d7234eb4.js} | 2 +- .../{index-e384b39c.js => index-d7afcbc5.js} | 2 +- .../{index-8f3060b3.js => index-d962c00d.js} | 2 +- .../{index-d2abd689.js => index-da62f213.js} | 2 +- .../{index-8318dff9.js => index-df9dbbbc.js} | 2 +- .../{index-d07463ea.js => index-e00cba31.js} | 2 +- .../{index-1b47413a.js => index-e1f19958.js} | 2 +- .../{index-5df8a359.js => index-e23414ba.js} | 2 +- .../{index-c7b8e620.js => index-e3103347.js} | 2 +- .../{index-49cb607b.js => index-ea8f597d.js} | 2 +- .../{index-8c1d8805.js => index-ed3ec024.js} | 2 +- .../{index-3e0b735e.js => index-ef87d61e.js} | 2 +- .../{index-3321aada.js => index-f4071e0c.js} | 2 +- packs/js/index-f47cddad.js | 1 + .../{index-d5bf05ba.js => index-f8a350bd.js} | 2 +- .../{index-bc2f66c5.js => index-fb691b05.js} | 2 +- .../{index-8bd82675.js => index-fb7821f2.js} | 2 +- ...a4c.js => instance-info-panel-1387c676.js} | 2 +- ... => instance-moderation-panel-a8c2611c.js} | 2 +- ...1.js => instance-restrictions-d5ec77d9.js} | 2 +- ...8ec15c.js => join-event-modal-75060207.js} | 2 +- ...e319.js => landing-page-modal-a616178b.js} | 2 +- ...e.js => latest-accounts-panel-54623f66.js} | 2 +- ...5e2bb51b.js => layout-buttons-127c2f5f.js} | 2 +- ...st-fe4f62ad.js => layout-list-e34f9942.js} | 2 +- ...more-b53b8d88.js => load-more-55559f32.js} | 2 +- ...{lodash-787b41ad.js => lodash-e014fe55.js} | 2 +- ...{logout-5666ded9.js => logout-c14b6e6f.js} | 2 +- ...p-46c1b3b3.js => manage-group-7434b0f0.js} | 2 +- ...-3853c23c.js => media-gallery-b081354c.js} | 2 +- ...tem-9b67131c.js => media-item-f8ffc0fb.js} | 2 +- ...al-4e3635a1.js => media-modal-735f29ce.js} | 2 +- ...023f3271.js => mentions-modal-12dc1b96.js} | 2 +- ...-form-055b9d1a.js => mfa-form-f8ae9bea.js} | 2 +- ... => missing-description-modal-b7099f96.js} | 2 +- ...d39a3de.js => modal-container-d4d02030.js} | 2 +- ...oot-dfddfde1.js => modal-root-3073c8e6.js} | 2 +- ...06409133.js => moderation-log-bade4226.js} | 2 +- ...dal-ee4db2be.js => mute-modal-adf71913.js} | 2 +- ...c88785b.js => my-groups-panel-d41ae74e.js} | 2 +- ...9372c07.js => new-event-panel-1fbbcf6a.js} | 2 +- ...8f75bf3.js => new-group-panel-00a252ec.js} | 2 +- ...-085135e5.js => new-list-form-396f644a.js} | 2 +- packs/js/noop-19c18e1e.js | 1 - packs/js/noop-3f99ae3e.js | 1 + ...-7ac9a0a3.js => object-assign-35b0699c.js} | 2 +- ...4f09672.js => object-to-array-ff10cf63.js} | 2 +- ...75a48.js => onboarding-wizard-d2099c82.js} | 2 +- ...68fd1.js => pending-items-row-1f87d8f3.js} | 2 +- ...8ce6bc.js => pending-requests-aa9d3531.js} | 2 +- ...7f660229.js => pending-status-959f7aeb.js} | 2 +- ...7.js => pinned-accounts-panel-22ccbc02.js} | 2 +- ...55c.js => pinned-hosts-picker-55861ba6.js} | 2 +- ...042.js => placeholder-account-dcc395bb.js} | 2 +- ....js => placeholder-group-card-a81c5966.js} | 2 +- ...s => placeholder-group-search-1a309751.js} | 2 +- ...585.js => placeholder-hashtag-fb054a2b.js} | 2 +- ...w-66340c9e.js => poll-preview-ddaf662b.js} | 2 +- ...opular-663f5bb0.js => popular-208feabb.js} | 2 +- ...-200e6fc1.js => profile-field-946d1d6f.js} | 2 +- ...6d.js => profile-fields-panel-9418d645.js} | 2 +- ...bfe5.js => profile-hover-card-4eadd46d.js} | 2 +- ...d91a.js => profile-info-panel-cec85d6e.js} | 2 +- ...0c9.js => profile-media-panel-4acaf1d7.js} | 2 +- ...-adc53a08.js => profile-stats-6fec8ab1.js} | 2 +- ...el-c3b530d1.js => promo-panel-60d3b884.js} | 2 +- ...8beecbe.js => pull-to-refresh-a7e092ab.js} | 2 +- ...74f7f81.js => reactions-modal-c5e40e75.js} | 2 +- ...-e81d7374.js => reblogs-modal-3d6a5daf.js} | 2 +- ...4b.js => reply-mentions-modal-88976cd4.js} | 2 +- ...l-97969a9e.js => report-modal-0b861280.js} | 2 +- ...-ae47b3a7.js => schedule-form-89b40965.js} | 2 +- ...20d24.js => scroll-top-button-73ec9889.js} | 2 +- packs/js/scrollable-list-1e43c72d.js | 1 + packs/js/scrollable-list-df58e451.js | 1 - ...663.js => service-worker-info-8051c8bb.js} | 2 +- ...ebcfb308.js => settings-store-be34f359.js} | 2 +- ...u-598bffb6.js => sidebar-menu-9774afae.js} | 2 +- ...-7566c684.js => sign-up-panel-96b7bc81.js} | 2 +- ...e8b7bfd1.js => soapbox-config-03c81c59.js} | 2 +- ...e57baf.js => status-container-e53698d2.js} | 2 +- ...ae817.js => status-hover-card-f61749bb.js} | 2 +- ...st-13fdd81b.js => status-list-c10445e1.js} | 2 +- ...ld-757f31b8.js => streamfield-6197ce03.js} | 2 +- ...sted-196479cb.js => suggested-be3633e0.js} | 2 +- ....js => suggested-groups-panel-20f9b5ed.js} | 2 +- ...ns-c5444903.js => suggestions-28e579c4.js} | 2 +- ...ab-bar-b3f08956.js => tab-bar-777df18a.js} | 2 +- packs/js/{tag-708fa6df.js => tag-ca20a566.js} | 2 +- ...-16aa64ec.js => tag-list-item-bf8ca941.js} | 2 +- .../js/{tags-8516eaa3.js => tags-f0b4cdee.js} | 2 +- ...{thread-b9635854.js => thread-f9f548a4.js} | 2 +- ...eline-585cfcf0.js => timeline-456dace7.js} | 2 +- ...l-7e8ff0ce.js => trends-panel-ab54a034.js} | 2 +- .../{truth-6b332fbc.js => truth-ba20639e.js} | 2 +- ...7280.js => unauthorized-modal-7c536f36.js} | 2 +- ...6ddad2aa.js => useAccountList-32cce5e6.js} | 2 +- ...ce-0d4ed135.js => useDebounce-93e74587.js} | 2 +- ...353ac79.js => useGroupMembers-4d4508c4.js} | 2 +- ...ag-49646e08.js => useGroupTag-9c7d1cac.js} | 2 +- ...s-604f28f5.js => useGroupTags-a5aa31b5.js} | 2 +- ...-871ba8c6.js => useImageField-712debc5.js} | 2 +- ...-de20e9c0.js => usePatronUser-c97ecc3d.js} | 2 +- ...pper-24b8ee92.js => usePopper-4a92d7ef.js} | 2 +- ...3a6f15.js => usePopularGroups-d12a3589.js} | 2 +- ...5c64.js => useSuggestedGroups-a15d5e07.js} | 2 +- ...dex-b6d304df.js => user-index-7d345da1.js} | 2 +- ...nel-76f12776.js => user-panel-e3830968.js} | 2 +- ...5c58f2.js => verify-sms-modal-34fd41dc.js} | 2 +- ...al-4719b4f5.js => video-modal-1e593c2c.js} | 2 +- ...-2cc03b24.js => waitlist-page-7f7001df.js} | 2 +- ...f9c.js => web.url.constructor-0fbaa340.js} | 2 +- ...0e1.js => who-to-follow-panel-105a50e7.js} | 2 +- ...{widget-2ac720e4.js => widget-84f84d09.js} | 2 +- 223 files changed, 232 insertions(+), 232 deletions(-) rename packs/{index-7380452a.js => index-be605fd2.js} (77%) rename packs/js/{accordion-9597afee.js => accordion-0fbf6d28.js} (95%) rename packs/js/{account-moderation-modal-bc2704fb.js => account-moderation-modal-e488ae8f.js} (99%) rename packs/js/{account-note-modal-9be786e2.js => account-note-modal-61325a84.js} (94%) rename packs/js/{account-search-61b68090.js => account-search-46dd7dbb.js} (95%) rename packs/js/{accounts-1cafdbcf.js => accounts-2089f869.js} (69%) rename packs/js/{actions-modal-70064cbb.js => actions-modal-50b0f682.js} (95%) rename packs/js/{announcements-d5697a45.js => announcements-7255f0c7.js} (93%) rename packs/js/{announcements-panel-452327e5.js => announcements-panel-4de5dd74.js} (98%) rename packs/js/{authorize-reject-buttons-f28a0539.js => authorize-reject-buttons-1aaf0a6a.js} (98%) rename packs/js/{birthday-panel-63d3155f.js => birthday-panel-af5c7f67.js} (86%) rename packs/js/{birthdays-modal-39b60060.js => birthdays-modal-6fbebf50.js} (86%) rename packs/js/{boost-modal-f29bf243.js => boost-modal-acdb3394.js} (91%) rename packs/js/{chat-search-input-88ce0ef4.js => chat-search-input-ec7e67b1.js} (99%) rename packs/js/{chat-widget-c0fe4d5a.js => chat-widget-a6429f4e.js} (96%) rename packs/js/{compare-history-modal-c59be2bc.js => compare-history-modal-03ca0264.js} (96%) rename packs/js/{component-modal-cfb69ccb.js => component-modal-db8b465c.js} (74%) rename packs/js/{compose-event-modal-35589ff5.js => compose-event-modal-d79d7a70.js} (98%) rename packs/js/{compose-modal-2eac5d18.js => compose-modal-4c08c001.js} (97%) rename packs/js/{confirmation-modal-548edfc8.js => confirmation-modal-fb803cce.js} (92%) rename packs/js/{create-aa354598.js => create-990cc91d.js} (96%) rename packs/js/{create-group-modal-4a948c40.js => create-group-modal-efc3bce4.js} (96%) rename packs/js/{cta-banner-c29bb4cb.js => cta-banner-fbac72b3.js} (93%) rename packs/js/{date-picker-d2d1ed31.js => date-picker-63c681ce.js} (99%) rename packs/js/{discover-9143ae25.js => discover-2d5870bd.js} (94%) rename packs/js/{dislikes-modal-35340864.js => dislikes-modal-1a832d05.js} (77%) rename packs/js/{edit-announcement-modal-5d4f1578.js => edit-announcement-modal-7321cc37.js} (95%) rename packs/js/{edit-federation-modal-e453cf1b.js => edit-federation-modal-75e12d59.js} (97%) rename packs/js/{edit-filter-a7163632.js => edit-filter-eb79beb3.js} (98%) rename packs/js/{edit-group-72b712f0.js => edit-group-81dff6cb.js} (90%) rename packs/js/{embed-modal-2c187d85.js => embed-modal-5ddfa846.js} (97%) rename packs/js/{emoji-picker-2ef1c775.js => emoji-picker-7d9d02c1.js} (99%) rename packs/js/{emoji-picker-modal-3d0b0818.js => emoji-picker-modal-a3e23f07.js} (81%) rename packs/js/{es.array.last-index-of-ca8fdd84.js => es.array.last-index-of-d76ad0ed.js} (86%) rename packs/js/{es.array.splice-d733542e.js => es.array.splice-adb98933.js} (90%) rename packs/js/{es.promise.finally-9155a4db.js => es.promise.finally-0ef07e66.js} (88%) rename packs/js/{event-discussion-882e912d.js => event-discussion-d1b152dc.js} (86%) rename packs/js/{event-header-163e2ab5.js => event-header-55d43bbc.js} (99%) rename packs/js/{event-information-31e23e20.js => event-information-8646cc5b.js} (98%) rename packs/js/{event-map-modal-ae05b221.js => event-map-modal-4a83ec56.js} (99%) rename packs/js/{event-participants-modal-6e79025e.js => event-participants-modal-c140b263.js} (78%) rename packs/js/{exif-ab0e667c.js => exif-05f4a801.js} (99%) rename packs/js/{familiar-followers-modal-0c091b6c.js => familiar-followers-modal-6deccc90.js} (81%) rename packs/js/{favourites-modal-7d9dd035.js => favourites-modal-4f88d92b.js} (81%) rename packs/js/{file-input-e3eba176.js => file-input-c35dcc9b.js} (88%) rename packs/js/{fork-awesome-icon-170511cf.js => fork-awesome-icon-42a9fa19.js} (76%) rename packs/js/{funding-panel-905e05e2.js => funding-panel-d69ca9fb.js} (86%) rename packs/js/{group-blocked-members-35abae37.js => group-blocked-members-92a06c91.js} (88%) rename packs/js/{group-card-c9aa3023.js => group-card-e8bab249.js} (88%) rename packs/js/{group-gallery-643efd4a.js => group-gallery-df350fcd.js} (81%) rename packs/js/{group-header-image-e076498c.js => group-header-image-068adc6d.js} (88%) rename packs/js/{group-list-item-c21d0638.js => group-list-item-d71c8a2e.js} (94%) rename packs/js/{group-media-panel-e0279183.js => group-media-panel-8bea6b23.js} (82%) rename packs/js/{group-members-8d014300.js => group-members-c0d4ea9d.js} (94%) rename packs/js/{group-membership-requests-608c55f0.js => group-membership-requests-400e3915.js} (91%) rename packs/js/{group-tag-timeline-60da9f6d.js => group-tag-timeline-f9340654.js} (67%) rename packs/js/{group-tags-537025c4.js => group-tags-42eed4b5.js} (93%) rename packs/js/{group-tags-field-90f3aeb2.js => group-tags-field-13c248c9.js} (93%) rename packs/js/{group-timeline-e28dc6fd.js => group-timeline-754a6fbe.js} (84%) rename packs/js/{hashtag-1d2f7520.js => hashtag-394c7092.js} (99%) rename packs/js/{header-picker-eba39776.js => header-picker-cd9089b7.js} (97%) rename packs/js/{hotkeys-modal-4d4ec08e.js => hotkeys-modal-e6f1a2b7.js} (98%) rename packs/js/{index-fbc91b1f.js => index-00fe90fc.js} (69%) rename packs/js/{index-ff8b63a3.js => index-0b097d9d.js} (89%) rename packs/js/{index-2dd95a59.js => index-1086304d.js} (79%) rename packs/js/{index-66aa4115.js => index-194f1846.js} (94%) rename packs/js/{index-5bcfa526.js => index-1a285129.js} (96%) rename packs/js/{index-acec8e9a.js => index-245fef5c.js} (95%) rename packs/js/{index-e88098cf.js => index-305a8551.js} (97%) rename packs/js/{index-571dd45e.js => index-3399e540.js} (99%) rename packs/js/{index-f98470b1.js => index-357ae570.js} (92%) rename packs/js/{index-6907f734.js => index-431739eb.js} (98%) delete mode 100644 packs/js/index-45f57580.js rename packs/js/{index-7e14f476.js => index-4c479bc1.js} (98%) rename packs/js/{index-fb44cfe6.js => index-4d67014f.js} (75%) rename packs/js/{index-ba3389ca.js => index-4dc438b1.js} (75%) create mode 100644 packs/js/index-501024f5.js rename packs/js/{index-2846fb7c.js => index-566a3dfd.js} (65%) rename packs/js/{index-f30036af.js => index-57b05c05.js} (81%) rename packs/js/{index-23ba0bda.js => index-5b71c76b.js} (94%) rename packs/js/{index-625bf5da.js => index-5eda592e.js} (98%) delete mode 100644 packs/js/index-605b2951.js rename packs/js/{index-486dc940.js => index-63ea9ebf.js} (98%) rename packs/js/{index-83b6cf03.js => index-654bbfc5.js} (73%) rename packs/js/{index-9bd9b506.js => index-65e95827.js} (95%) rename packs/js/{index-bbc2ca16.js => index-67126278.js} (88%) rename packs/js/{index-899a85e6.js => index-6797616c.js} (97%) rename packs/js/{index-a0951cf4.js => index-6adba802.js} (92%) rename packs/js/{index-b84c723b.js => index-6f58feb4.js} (91%) rename packs/js/{index-5c8fa37d.js => index-733cc03a.js} (98%) rename packs/js/{index-88311901.js => index-74f11771.js} (97%) rename packs/js/{index-dd438a69.js => index-75561210.js} (90%) rename packs/js/{index-704aaec3.js => index-78ab572e.js} (87%) rename packs/js/{index-4bb15783.js => index-78fe1150.js} (88%) rename packs/js/{index-75eb026b.js => index-85a17314.js} (99%) rename packs/js/{index-5fa99826.js => index-89c90e00.js} (57%) rename packs/js/{index-3011f076.js => index-9628cdd2.js} (96%) rename packs/js/{index-dae99015.js => index-96c112b4.js} (88%) rename packs/js/{index-de5510c5.js => index-9c870042.js} (70%) rename packs/js/{index-fa21c2a3.js => index-a35ea6ff.js} (96%) rename packs/js/{index-4be17463.js => index-a4ed1d8d.js} (99%) rename packs/js/{index-c8e0cd43.js => index-aa78d199.js} (81%) rename packs/js/{index-f32c46c0.js => index-aac4aed4.js} (97%) rename packs/js/{index-71d7c29c.js => index-b320f3f0.js} (69%) rename packs/js/{index-4f4d03b8.js => index-b4b4f3e9.js} (74%) rename packs/js/{index-0de3a47b.js => index-ba6fc339.js} (98%) rename packs/js/{index-df990da1.js => index-c3905184.js} (93%) rename packs/js/{index-faefcaa0.js => index-d390d93a.js} (84%) rename packs/js/{index-7b6c023e.js => index-d7234eb4.js} (85%) rename packs/js/{index-e384b39c.js => index-d7afcbc5.js} (81%) rename packs/js/{index-8f3060b3.js => index-d962c00d.js} (99%) rename packs/js/{index-d2abd689.js => index-da62f213.js} (83%) rename packs/js/{index-8318dff9.js => index-df9dbbbc.js} (80%) rename packs/js/{index-d07463ea.js => index-e00cba31.js} (97%) rename packs/js/{index-1b47413a.js => index-e1f19958.js} (65%) rename packs/js/{index-5df8a359.js => index-e23414ba.js} (97%) rename packs/js/{index-c7b8e620.js => index-e3103347.js} (93%) rename packs/js/{index-49cb607b.js => index-ea8f597d.js} (74%) rename packs/js/{index-8c1d8805.js => index-ed3ec024.js} (97%) rename packs/js/{index-3e0b735e.js => index-ef87d61e.js} (87%) rename packs/js/{index-3321aada.js => index-f4071e0c.js} (85%) create mode 100644 packs/js/index-f47cddad.js rename packs/js/{index-d5bf05ba.js => index-f8a350bd.js} (67%) rename packs/js/{index-bc2f66c5.js => index-fb691b05.js} (80%) rename packs/js/{index-8bd82675.js => index-fb7821f2.js} (96%) rename packs/js/{instance-info-panel-52087a4c.js => instance-info-panel-1387c676.js} (85%) rename packs/js/{instance-moderation-panel-94f25c40.js => instance-moderation-panel-a8c2611c.js} (84%) rename packs/js/{instance-restrictions-85d3f8a1.js => instance-restrictions-d5ec77d9.js} (97%) rename packs/js/{join-event-modal-088ec15c.js => join-event-modal-75060207.js} (93%) rename packs/js/{landing-page-modal-0f71e319.js => landing-page-modal-a616178b.js} (95%) rename packs/js/{latest-accounts-panel-fe48dc2e.js => latest-accounts-panel-54623f66.js} (88%) rename packs/js/{layout-buttons-5e2bb51b.js => layout-buttons-127c2f5f.js} (80%) rename packs/js/{layout-list-fe4f62ad.js => layout-list-e34f9942.js} (89%) rename packs/js/{load-more-b53b8d88.js => load-more-55559f32.js} (79%) rename packs/js/{lodash-787b41ad.js => lodash-e014fe55.js} (99%) rename packs/js/{logout-5666ded9.js => logout-c14b6e6f.js} (77%) rename packs/js/{manage-group-46c1b3b3.js => manage-group-7434b0f0.js} (97%) rename packs/js/{media-gallery-3853c23c.js => media-gallery-b081354c.js} (98%) rename packs/js/{media-item-9b67131c.js => media-item-f8ffc0fb.js} (93%) rename packs/js/{media-modal-4e3635a1.js => media-modal-735f29ce.js} (94%) rename packs/js/{mentions-modal-023f3271.js => mentions-modal-12dc1b96.js} (73%) rename packs/js/{mfa-form-055b9d1a.js => mfa-form-f8ae9bea.js} (99%) rename packs/js/{missing-description-modal-250e0a46.js => missing-description-modal-b7099f96.js} (83%) rename packs/js/{modal-container-bd39a3de.js => modal-container-d4d02030.js} (96%) rename packs/js/{modal-root-dfddfde1.js => modal-root-3073c8e6.js} (99%) rename packs/js/{moderation-log-06409133.js => moderation-log-bade4226.js} (87%) rename packs/js/{mute-modal-ee4db2be.js => mute-modal-adf71913.js} (96%) rename packs/js/{my-groups-panel-cc88785b.js => my-groups-panel-d41ae74e.js} (53%) rename packs/js/{new-event-panel-29372c07.js => new-event-panel-1fbbcf6a.js} (89%) rename packs/js/{new-group-panel-d8f75bf3.js => new-group-panel-00a252ec.js} (90%) rename packs/js/{new-list-form-085135e5.js => new-list-form-396f644a.js} (92%) delete mode 100644 packs/js/noop-19c18e1e.js create mode 100644 packs/js/noop-3f99ae3e.js rename packs/js/{object-assign-7ac9a0a3.js => object-assign-35b0699c.js} (90%) rename packs/js/{object-to-array-a4f09672.js => object-to-array-ff10cf63.js} (84%) rename packs/js/{onboarding-wizard-f9b75a48.js => onboarding-wizard-d2099c82.js} (97%) rename packs/js/{pending-items-row-3c568fd1.js => pending-items-row-1f87d8f3.js} (93%) rename packs/js/{pending-requests-b08ce6bc.js => pending-requests-aa9d3531.js} (75%) rename packs/js/{pending-status-7f660229.js => pending-status-959f7aeb.js} (95%) rename packs/js/{pinned-accounts-panel-67ec6a97.js => pinned-accounts-panel-22ccbc02.js} (82%) rename packs/js/{pinned-hosts-picker-5815755c.js => pinned-hosts-picker-55861ba6.js} (80%) rename packs/js/{placeholder-account-a1add042.js => placeholder-account-dcc395bb.js} (78%) rename packs/js/{placeholder-group-card-d679cbe1.js => placeholder-group-card-a81c5966.js} (85%) rename packs/js/{placeholder-group-search-5e3066d6.js => placeholder-group-search-1a309751.js} (92%) rename packs/js/{placeholder-hashtag-f832d585.js => placeholder-hashtag-fb054a2b.js} (69%) rename packs/js/{poll-preview-66340c9e.js => poll-preview-ddaf662b.js} (61%) rename packs/js/{popular-663f5bb0.js => popular-208feabb.js} (72%) rename packs/js/{profile-field-200e6fc1.js => profile-field-946d1d6f.js} (92%) rename packs/js/{profile-fields-panel-f2d1726d.js => profile-fields-panel-9418d645.js} (53%) rename packs/js/{profile-hover-card-6034bfe5.js => profile-hover-card-4eadd46d.js} (92%) rename packs/js/{profile-info-panel-9fddd91a.js => profile-info-panel-cec85d6e.js} (94%) rename packs/js/{profile-media-panel-2b1eb0c9.js => profile-media-panel-4acaf1d7.js} (81%) rename packs/js/{profile-stats-adc53a08.js => profile-stats-6fec8ab1.js} (93%) rename packs/js/{promo-panel-c3b530d1.js => promo-panel-60d3b884.js} (68%) rename packs/js/{pull-to-refresh-b8beecbe.js => pull-to-refresh-a7e092ab.js} (99%) rename packs/js/{reactions-modal-c74f7f81.js => reactions-modal-c5e40e75.js} (90%) rename packs/js/{reblogs-modal-e81d7374.js => reblogs-modal-3d6a5daf.js} (82%) rename packs/js/{reply-mentions-modal-48dcf84b.js => reply-mentions-modal-88976cd4.js} (91%) rename packs/js/{report-modal-97969a9e.js => report-modal-0b861280.js} (98%) rename packs/js/{schedule-form-ae47b3a7.js => schedule-form-89b40965.js} (94%) rename packs/js/{scroll-top-button-95820d24.js => scroll-top-button-73ec9889.js} (95%) create mode 100644 packs/js/scrollable-list-1e43c72d.js delete mode 100644 packs/js/scrollable-list-df58e451.js rename packs/js/{service-worker-info-8e511663.js => service-worker-info-8051c8bb.js} (97%) rename packs/js/{settings-store-ebcfb308.js => settings-store-be34f359.js} (98%) rename packs/js/{sidebar-menu-598bffb6.js => sidebar-menu-9774afae.js} (98%) rename packs/js/{sign-up-panel-7566c684.js => sign-up-panel-96b7bc81.js} (89%) rename packs/js/{soapbox-config-e8b7bfd1.js => soapbox-config-03c81c59.js} (50%) rename packs/js/{status-container-59e57baf.js => status-container-e53698d2.js} (78%) rename packs/js/{status-hover-card-612ae817.js => status-hover-card-f61749bb.js} (90%) rename packs/js/{status-list-13fdd81b.js => status-list-c10445e1.js} (96%) rename packs/js/{streamfield-757f31b8.js => streamfield-6197ce03.js} (93%) rename packs/js/{suggested-196479cb.js => suggested-be3633e0.js} (72%) rename packs/js/{suggested-groups-panel-465564b3.js => suggested-groups-panel-20f9b5ed.js} (57%) rename packs/js/{suggestions-c5444903.js => suggestions-28e579c4.js} (96%) rename packs/js/{tab-bar-b3f08956.js => tab-bar-777df18a.js} (85%) rename packs/js/{tag-708fa6df.js => tag-ca20a566.js} (83%) rename packs/js/{tag-list-item-16aa64ec.js => tag-list-item-bf8ca941.js} (91%) rename packs/js/{tags-8516eaa3.js => tags-f0b4cdee.js} (83%) rename packs/js/{thread-b9635854.js => thread-f9f548a4.js} (98%) rename packs/js/{timeline-585cfcf0.js => timeline-456dace7.js} (87%) rename packs/js/{trends-panel-7e8ff0ce.js => trends-panel-ab54a034.js} (89%) rename packs/js/{truth-6b332fbc.js => truth-ba20639e.js} (69%) rename packs/js/{unauthorized-modal-96327280.js => unauthorized-modal-7c536f36.js} (98%) rename packs/js/{useAccountList-6ddad2aa.js => useAccountList-32cce5e6.js} (93%) rename packs/js/{useDebounce-0d4ed135.js => useDebounce-93e74587.js} (66%) rename packs/js/{useGroupMembers-d353ac79.js => useGroupMembers-4d4508c4.js} (74%) rename packs/js/{useGroupTag-49646e08.js => useGroupTag-9c7d1cac.js} (68%) rename packs/js/{useGroupTags-604f28f5.js => useGroupTags-a5aa31b5.js} (71%) rename packs/js/{useImageField-871ba8c6.js => useImageField-712debc5.js} (64%) rename packs/js/{usePatronUser-de20e9c0.js => usePatronUser-c97ecc3d.js} (75%) rename packs/js/{usePopper-24b8ee92.js => usePopper-4a92d7ef.js} (99%) rename packs/js/{usePopularGroups-953a6f15.js => usePopularGroups-d12a3589.js} (82%) rename packs/js/{useSuggestedGroups-ad7e5c64.js => useSuggestedGroups-a15d5e07.js} (82%) rename packs/js/{user-index-b6d304df.js => user-index-7d345da1.js} (83%) rename packs/js/{user-panel-76f12776.js => user-panel-e3830968.js} (96%) rename packs/js/{verify-sms-modal-de5c58f2.js => verify-sms-modal-34fd41dc.js} (96%) rename packs/js/{video-modal-4719b4f5.js => video-modal-1e593c2c.js} (73%) rename packs/js/{waitlist-page-2cc03b24.js => waitlist-page-7f7001df.js} (92%) rename packs/js/{web.url.constructor-8f9eaf9c.js => web.url.constructor-0fbaa340.js} (99%) rename packs/js/{who-to-follow-panel-ba5370e1.js => who-to-follow-panel-105a50e7.js} (86%) rename packs/js/{widget-2ac720e4.js => widget-84f84d09.js} (89%) diff --git a/index.html b/index.html index 6b50dfe19..81c8d0c0d 100644 --- a/index.html +++ b/index.html @@ -17,4 +17,4 @@ l.pathname.slice(0, -1) + decoded + l.hash ); } - }(window.location))
\ No newline at end of file + }(window.location))
\ No newline at end of file diff --git a/packs/index-7380452a.js b/packs/index-be605fd2.js similarity index 77% rename from packs/index-7380452a.js rename to packs/index-be605fd2.js index 42c8d4e01..e9dba0b0d 100644 --- a/packs/index-7380452a.js +++ b/packs/index-be605fd2.js @@ -122,7 +122,7 @@ ${Yt.current.stack} (c) 2013-2017 Mozilla, Apache License 2.0 */(function(_e,et){(function(tt){_e.exports=tt()})(function(){return function tt(nt,rt,at){function it(ct,ut){if(!rt[ct]){if(!nt[ct]){var dt=typeof commonjsRequire=="function"&&commonjsRequire;if(!ut&&dt)return dt(ct,!0);if(ot)return ot(ct,!0);var ft=new Error("Cannot find module '"+ct+"'");throw ft.code="MODULE_NOT_FOUND",ft}var pt=rt[ct]={exports:{}};nt[ct][0].call(pt.exports,function(mt){var ht=nt[ct][1][mt];return it(ht||mt)},pt,pt.exports,tt,nt,rt,at)}return rt[ct].exports}for(var ot=typeof commonjsRequire=="function"&&commonjsRequire,st=0;st"u"&&tt(3);var dt=Promise;function ft(Mt,Gt){Gt&&Mt.then(function(Ht){Gt(null,Ht)},function(Ht){Gt(Ht)})}function pt(Mt,Gt,Ht){typeof Gt=="function"&&Mt.then(Gt),typeof Ht=="function"&&Mt.catch(Ht)}function mt(Mt){return typeof Mt!="string"&&(console.warn(Mt+" used as a key, but it is not a string."),Mt=String(Mt)),Mt}function ht(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var Et="local-forage-detect-blob-support",yt=void 0,vt={},gt=Object.prototype.toString,St="readonly",Rt="readwrite";function $t(Mt){for(var Gt=Mt.length,Ht=new ArrayBuffer(Gt),Vt=new Uint8Array(Ht),Zt=0;Zt=43)}}).catch(function(){return!1})}function wt(Mt){return typeof yt=="boolean"?dt.resolve(yt):bt(Mt).then(function(Gt){return yt=Gt,yt})}function xt(Mt){var Gt=vt[Mt.name],Ht={};Ht.promise=new dt(function(Vt,Zt){Ht.resolve=Vt,Ht.reject=Zt}),Gt.deferredOperations.push(Ht),Gt.dbReady?Gt.dbReady=Gt.dbReady.then(function(){return Ht.promise}):Gt.dbReady=Ht.promise}function Tt(Mt){var Gt=vt[Mt.name],Ht=Gt.deferredOperations.pop();if(Ht)return Ht.resolve(),Ht.promise}function Ct(Mt,Gt){var Ht=vt[Mt.name],Vt=Ht.deferredOperations.pop();if(Vt)return Vt.reject(Gt),Vt.promise}function Nt(Mt,Gt){return new dt(function(Ht,Vt){if(vt[Mt.name]=vt[Mt.name]||jt(),Mt.db)if(Gt)xt(Mt),Mt.db.close();else return Ht(Mt.db);var Zt=[Mt.name];Gt&&Zt.push(Mt.version);var qt=st.open.apply(st,Zt);Gt&&(qt.onupgradeneeded=function(Jt){var cn=qt.result;try{cn.createObjectStore(Mt.storeName),Jt.oldVersion<=1&&cn.createObjectStore(Et)}catch(ln){if(ln.name==="ConstraintError")console.warn('The database "'+Mt.name+'" has been upgraded from version '+Jt.oldVersion+" to version "+Jt.newVersion+', but the storage "'+Mt.storeName+'" already exists.');else throw ln}}),qt.onerror=function(Jt){Jt.preventDefault(),Vt(qt.error)},qt.onsuccess=function(){var Jt=qt.result;Jt.onversionchange=function(cn){cn.target.close()},Ht(Jt),Tt(Mt)}})}function At(Mt){return Nt(Mt,!1)}function kt(Mt){return Nt(Mt,!0)}function Pt(Mt,Gt){if(!Mt.db)return!0;var Ht=!Mt.db.objectStoreNames.contains(Mt.storeName),Vt=Mt.versionMt.db.version;if(Vt&&(Mt.version!==Gt&&console.warn('The database "'+Mt.name+`" can't be downgraded from version `+Mt.db.version+" to version "+Mt.version+"."),Mt.version=Mt.db.version),Zt||Ht){if(Ht){var qt=Mt.db.version+1;qt>Mt.version&&(Mt.version=qt)}return!0}return!1}function Ft(Mt){return new dt(function(Gt,Ht){var Vt=new FileReader;Vt.onerror=Ht,Vt.onloadend=function(Zt){var qt=btoa(Zt.target.result||"");Gt({__local_forage_encoded_blob:!0,data:qt,type:Mt.type})},Vt.readAsBinaryString(Mt)})}function Dt(Mt){var Gt=$t(atob(Mt.data));return ut([Gt],{type:Mt.type})}function Lt(Mt){return Mt&&Mt.__local_forage_encoded_blob}function It(Mt){var Gt=this,Ht=Gt._initReady().then(function(){var Vt=vt[Gt._dbInfo.name];if(Vt&&Vt.dbReady)return Vt.dbReady});return pt(Ht,Mt,Mt),Ht}function Ot(Mt){xt(Mt);for(var Gt=vt[Mt.name],Ht=Gt.forages,Vt=0;Vt0&&(!Mt.db||qt.name==="InvalidStateError"||qt.name==="NotFoundError"))return dt.resolve().then(function(){if(!Mt.db||qt.name==="NotFoundError"&&!Mt.db.objectStoreNames.contains(Mt.storeName)&&Mt.version<=Mt.db.version)return Mt.db&&(Mt.version=Mt.db.version+1),kt(Mt)}).then(function(){return Ot(Mt).then(function(){Ut(Mt,Gt,Ht,Vt-1)})}).catch(Ht);Ht(qt)}}function jt(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function zt(Mt){var Gt=this,Ht={db:null};if(Mt)for(var Vt in Mt)Ht[Vt]=Mt[Vt];var Zt=vt[Ht.name];Zt||(Zt=jt(),vt[Ht.name]=Zt),Zt.forages.push(Gt),Gt._initReady||(Gt._initReady=Gt.ready,Gt.ready=It);var qt=[];function Jt(){return dt.resolve()}for(var cn=0;cn>4,fn[Zt++]=(Jt&15)<<4|cn>>2,fn[Zt++]=(cn&3)<<6|ln&63;return dn}function jn(Mt){var Gt=new Uint8Array(Mt),Ht="",Vt;for(Vt=0;Vt>2],Ht+=En[(Gt[Vt]&3)<<4|Gt[Vt+1]>>4],Ht+=En[(Gt[Vt+1]&15)<<2|Gt[Vt+2]>>6],Ht+=En[Gt[Vt+2]&63];return Gt.length%3===2?Ht=Ht.substring(0,Ht.length-1)+"=":Gt.length%3===1&&(Ht=Ht.substring(0,Ht.length-2)+"=="),Ht}function rr(Mt,Gt){var Ht="";if(Mt&&(Ht=ir.call(Mt)),Mt&&(Ht==="[object ArrayBuffer]"||Mt.buffer&&ir.call(Mt.buffer)==="[object ArrayBuffer]")){var Vt,Zt=Tn;Mt instanceof ArrayBuffer?(Vt=Mt,Zt+=Fn):(Vt=Mt.buffer,Ht==="[object Int8Array]"?Zt+=Dn:Ht==="[object Uint8Array]"?Zt+=Bn:Ht==="[object Uint8ClampedArray]"?Zt+=Vn:Ht==="[object Int16Array]"?Zt+=Zn:Ht==="[object Uint16Array]"?Zt+=Pn:Ht==="[object Int32Array]"?Zt+=er:Ht==="[object Uint32Array]"?Zt+=$n:Ht==="[object Float32Array]"?Zt+=Ln:Ht==="[object Float64Array]"?Zt+=Gn:Gt(new Error("Failed to get type for BinaryArray"))),Gt(Zt+jn(Vt))}else if(Ht==="[object Blob]"){var qt=new FileReader;qt.onload=function(){var Jt=On+Mt.type+"~"+jn(this.result);Gt(Tn+zn+Jt)},qt.readAsArrayBuffer(Mt)}else try{Gt(JSON.stringify(Mt))}catch(Jt){console.error("Couldn't convert value into a JSON string: ",Mt),Gt(null,Jt)}}function tr(Mt){if(Mt.substring(0,Mn)!==Tn)return JSON.parse(Mt);var Gt=Mt.substring(Jn),Ht=Mt.substring(Mn,Jn),Vt;if(Ht===zn&&Cn.test(Gt)){var Zt=Gt.match(Cn);Vt=Zt[1],Gt=Gt.substring(Zt[0].length)}var qt=or(Gt);switch(Ht){case Fn:return qt;case zn:return ut([qt],{type:Vt});case Dn:return new Int8Array(qt);case Bn:return new Uint8Array(qt);case Vn:return new Uint8ClampedArray(qt);case Zn:return new Int16Array(qt);case Pn:return new Uint16Array(qt);case er:return new Int32Array(qt);case $n:return new Uint32Array(qt);case Ln:return new Float32Array(qt);case Gn:return new Float64Array(qt);default:throw new Error("Unkown type: "+Ht)}}var bn={serialize:rr,deserialize:tr,stringToBuffer:or,bufferToString:jn};function yn(Mt,Gt,Ht,Vt){Mt.executeSql("CREATE TABLE IF NOT EXISTS "+Gt.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],Ht,Vt)}function xn(Mt){var Gt=this,Ht={db:null};if(Mt)for(var Vt in Mt)Ht[Vt]=typeof Mt[Vt]!="string"?Mt[Vt].toString():Mt[Vt];var Zt=new dt(function(qt,Jt){try{Ht.db=openDatabase(Ht.name,String(Ht.version),Ht.description,Ht.size)}catch(cn){return Jt(cn)}Ht.db.transaction(function(cn){yn(cn,Ht,function(){Gt._dbInfo=Ht,qt()},function(ln,dn){Jt(dn)})},Jt)});return Ht.serializer=bn,Zt}function kn(Mt,Gt,Ht,Vt,Zt,qt){Mt.executeSql(Ht,Vt,Zt,function(Jt,cn){cn.code===cn.SYNTAX_ERR?Jt.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[Gt.storeName],function(ln,dn){dn.rows.length?qt(ln,cn):yn(ln,Gt,function(){ln.executeSql(Ht,Vt,Zt,qt)},qt)},qt):qt(Jt,cn)},qt)}function Kn(Mt,Gt){var Ht=this;Mt=mt(Mt);var Vt=new dt(function(Zt,qt){Ht.ready().then(function(){var Jt=Ht._dbInfo;Jt.db.transaction(function(cn){kn(cn,Jt,"SELECT * FROM "+Jt.storeName+" WHERE key = ? LIMIT 1",[Mt],function(ln,dn){var fn=dn.rows.length?dn.rows.item(0).value:null;fn&&(fn=Jt.serializer.deserialize(fn)),Zt(fn)},function(ln,dn){qt(dn)})})}).catch(qt)});return ft(Vt,Gt),Vt}function Xn(Mt,Gt){var Ht=this,Vt=new dt(function(Zt,qt){Ht.ready().then(function(){var Jt=Ht._dbInfo;Jt.db.transaction(function(cn){kn(cn,Jt,"SELECT * FROM "+Jt.storeName,[],function(ln,dn){for(var fn=dn.rows,vn=fn.length,Rn=0;Rn0){Jt(nr.apply(Zt,[Mt,ln,Ht,Vt-1]));return}cn(Rn)}})})}).catch(cn)});return ft(qt,Ht),qt}function ar(Mt,Gt,Ht){return nr.apply(this,[Mt,Gt,Ht,1])}function sr(Mt,Gt){var Ht=this;Mt=mt(Mt);var Vt=new dt(function(Zt,qt){Ht.ready().then(function(){var Jt=Ht._dbInfo;Jt.db.transaction(function(cn){kn(cn,Jt,"DELETE FROM "+Jt.storeName+" WHERE key = ?",[Mt],function(){Zt()},function(ln,dn){qt(dn)})})}).catch(qt)});return ft(Vt,Gt),Vt}function dr(Mt){var Gt=this,Ht=new dt(function(Vt,Zt){Gt.ready().then(function(){var qt=Gt._dbInfo;qt.db.transaction(function(Jt){kn(Jt,qt,"DELETE FROM "+qt.storeName,[],function(){Vt()},function(cn,ln){Zt(ln)})})}).catch(Zt)});return ft(Ht,Mt),Ht}function br(Mt){var Gt=this,Ht=new dt(function(Vt,Zt){Gt.ready().then(function(){var qt=Gt._dbInfo;qt.db.transaction(function(Jt){kn(Jt,qt,"SELECT COUNT(key) as c FROM "+qt.storeName,[],function(cn,ln){var dn=ln.rows.item(0).c;Vt(dn)},function(cn,ln){Zt(ln)})})}).catch(Zt)});return ft(Ht,Mt),Ht}function hr(Mt,Gt){var Ht=this,Vt=new dt(function(Zt,qt){Ht.ready().then(function(){var Jt=Ht._dbInfo;Jt.db.transaction(function(cn){kn(cn,Jt,"SELECT key FROM "+Jt.storeName+" WHERE id = ? LIMIT 1",[Mt+1],function(ln,dn){var fn=dn.rows.length?dn.rows.item(0).key:null;Zt(fn)},function(ln,dn){qt(dn)})})}).catch(qt)});return ft(Vt,Gt),Vt}function $r(Mt){var Gt=this,Ht=new dt(function(Vt,Zt){Gt.ready().then(function(){var qt=Gt._dbInfo;qt.db.transaction(function(Jt){kn(Jt,qt,"SELECT key FROM "+qt.storeName,[],function(cn,ln){for(var dn=[],fn=0;fn '__WebKitDatabaseInfoTable__'",[],function(Zt,qt){for(var Jt=[],cn=0;cn0}function Tr(Mt){var Gt=this,Ht={};if(Mt)for(var Vt in Mt)Ht[Vt]=Mt[Vt];return Ht.keyPrefix=qn(Mt,Gt._defaultConfig),cr()?(Gt._dbInfo=Ht,Ht.serializer=bn,dt.resolve()):dt.reject()}function wn(Mt){var Gt=this,Ht=Gt.ready().then(function(){for(var Vt=Gt._dbInfo.keyPrefix,Zt=localStorage.length-1;Zt>=0;Zt--){var qt=localStorage.key(Zt);qt.indexOf(Vt)===0&&localStorage.removeItem(qt)}});return ft(Ht,Mt),Ht}function vr(Mt,Gt){var Ht=this;Mt=mt(Mt);var Vt=Ht.ready().then(function(){var Zt=Ht._dbInfo,qt=localStorage.getItem(Zt.keyPrefix+Mt);return qt&&(qt=Zt.serializer.deserialize(qt)),qt});return ft(Vt,Gt),Vt}function xr(Mt,Gt){var Ht=this,Vt=Ht.ready().then(function(){for(var Zt=Ht._dbInfo,qt=Zt.keyPrefix,Jt=qt.length,cn=localStorage.length,ln=1,dn=0;dn=0;Jt--){var cn=localStorage.key(Jt);cn.indexOf(qt)===0&&localStorage.removeItem(cn)}}):Zt=dt.reject("Invalid arguments"),ft(Zt,Gt),Zt}var Er={_driver:"localStorageWrapper",_initStorage:Tr,_support:Nn(),iterate:xr,getItem:vr,setItem:_r,removeItem:gr,clear:wn,length:Ar,key:fr,keys:Cr,dropInstance:yr},Sr=function(Gt,Ht){return Gt===Ht||typeof Gt=="number"&&typeof Ht=="number"&&isNaN(Gt)&&isNaN(Ht)},Ur=function(Gt,Ht){for(var Vt=Gt.length,Zt=0;Zt"u"?"undefined":at(Ht))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var Vt in Ht){if(Vt==="storeName"&&(Ht[Vt]=Ht[Vt].replace(/\W/g,"_")),Vt==="version"&&typeof Ht[Vt]!="number")return new Error("Database version must be a number.");this._config[Vt]=Ht[Vt]}return"driver"in Ht&&Ht.driver?this.setDriver(this._config.driver):!0}else return typeof Ht=="string"?this._config[Ht]:this._config},Mt.prototype.defineDriver=function(Ht,Vt,Zt){var qt=new dt(function(Jt,cn){try{var ln=Ht._driver,dn=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!Ht._driver){cn(dn);return}for(var fn=kr.concat("_initStorage"),vn=0,Rn=fn.length;vnKVStore.getItem(_e).then(et=>{if(et===null)throw new Error(`KVStore: null value for key ${_e}`);return et});var DELETE="delete",SHIFT=5,SIZE=1<>>0;if(""+tt!==et||tt===4294967295)return NaN;et=tt}return et<0?ensureSize(_e)+et:et}function returnTrue(){return!0}function wholeSlice(_e,et,tt){return(_e===0&&!isNeg(_e)||tt!==void 0&&_e<=-tt)&&(et===void 0||tt!==void 0&&et>=tt)}function resolveBegin(_e,et){return resolveIndex(_e,et,0)}function resolveEnd(_e,et){return resolveIndex(_e,et,et)}function resolveIndex(_e,et,tt){return _e===void 0?tt:isNeg(_e)?et===1/0?et:Math.max(0,et+_e)|0:et===void 0||et===_e?_e:Math.min(et,_e)|0}function isNeg(_e){return _e<0||_e===0&&1/_e===-1/0}var IS_COLLECTION_SYMBOL="@@__IMMUTABLE_ITERABLE__@@";function isCollection(_e){return!!(_e&&_e[IS_COLLECTION_SYMBOL])}var IS_KEYED_SYMBOL="@@__IMMUTABLE_KEYED__@@";function isKeyed(_e){return!!(_e&&_e[IS_KEYED_SYMBOL])}var IS_INDEXED_SYMBOL="@@__IMMUTABLE_INDEXED__@@";function isIndexed(_e){return!!(_e&&_e[IS_INDEXED_SYMBOL])}function isAssociative(_e){return isKeyed(_e)||isIndexed(_e)}var Collection=function(et){return isCollection(et)?et:Seq(et)},KeyedCollection=function(_e){function et(tt){return isKeyed(tt)?tt:KeyedSeq(tt)}return _e&&(et.__proto__=_e),et.prototype=Object.create(_e&&_e.prototype),et.prototype.constructor=et,et}(Collection),IndexedCollection=function(_e){function et(tt){return isIndexed(tt)?tt:IndexedSeq(tt)}return _e&&(et.__proto__=_e),et.prototype=Object.create(_e&&_e.prototype),et.prototype.constructor=et,et}(Collection),SetCollection=function(_e){function et(tt){return isCollection(tt)&&!isAssociative(tt)?tt:SetSeq(tt)}return _e&&(et.__proto__=_e),et.prototype=Object.create(_e&&_e.prototype),et.prototype.constructor=et,et}(Collection);Collection.Keyed=KeyedCollection;Collection.Indexed=IndexedCollection;Collection.Set=SetCollection;var IS_SEQ_SYMBOL="@@__IMMUTABLE_SEQ__@@";function isSeq(_e){return!!(_e&&_e[IS_SEQ_SYMBOL])}var IS_RECORD_SYMBOL="@@__IMMUTABLE_RECORD__@@";function isRecord(_e){return!!(_e&&_e[IS_RECORD_SYMBOL])}function isImmutable(_e){return isCollection(_e)||isRecord(_e)}var IS_ORDERED_SYMBOL="@@__IMMUTABLE_ORDERED__@@";function isOrdered(_e){return!!(_e&&_e[IS_ORDERED_SYMBOL])}var ITERATE_KEYS=0,ITERATE_VALUES=1,ITERATE_ENTRIES=2,REAL_ITERATOR_SYMBOL=typeof Symbol=="function"&&Symbol.iterator,FAUX_ITERATOR_SYMBOL="@@iterator",ITERATOR_SYMBOL=REAL_ITERATOR_SYMBOL||FAUX_ITERATOR_SYMBOL,Iterator=function(et){this.next=et};Iterator.prototype.toString=function(){return"[Iterator]"};Iterator.KEYS=ITERATE_KEYS;Iterator.VALUES=ITERATE_VALUES;Iterator.ENTRIES=ITERATE_ENTRIES;Iterator.prototype.inspect=Iterator.prototype.toSource=function(){return this.toString()};Iterator.prototype[ITERATOR_SYMBOL]=function(){return this};function iteratorValue(_e,et,tt,nt){var rt=_e===0?et:_e===1?tt:[et,tt];return nt?nt.value=rt:nt={value:rt,done:!1},nt}function iteratorDone(){return{value:void 0,done:!0}}function hasIterator(_e){return Array.isArray(_e)?!0:!!getIteratorFn(_e)}function isIterator(_e){return _e&&typeof _e.next=="function"}function getIterator$4(_e){var et=getIteratorFn(_e);return et&&et.call(_e)}function getIteratorFn(_e){var et=_e&&(REAL_ITERATOR_SYMBOL&&_e[REAL_ITERATOR_SYMBOL]||_e[FAUX_ITERATOR_SYMBOL]);if(typeof et=="function")return et}function isEntriesIterable(_e){var et=getIteratorFn(_e);return et&&et===_e.entries}function isKeysIterable(_e){var et=getIteratorFn(_e);return et&&et===_e.keys}var hasOwnProperty$8=Object.prototype.hasOwnProperty;function isArrayLike$2(_e){return Array.isArray(_e)||typeof _e=="string"?!0:_e&&typeof _e=="object"&&Number.isInteger(_e.length)&&_e.length>=0&&(_e.length===0?Object.keys(_e).length===1:_e.hasOwnProperty(_e.length-1))}var Seq=function(_e){function et(tt){return tt==null?emptySequence():isImmutable(tt)?tt.toSeq():seqFromValue(tt)}return _e&&(et.__proto__=_e),et.prototype=Object.create(_e&&_e.prototype),et.prototype.constructor=et,et.prototype.toSeq=function(){return this},et.prototype.toString=function(){return this.__toString("Seq {","}")},et.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},et.prototype.__iterate=function(nt,rt){var at=this._cache;if(at){for(var it=at.length,ot=0;ot!==it;){var st=at[rt?it-++ot:ot++];if(nt(st[1],st[0],this)===!1)break}return ot}return this.__iterateUncached(nt,rt)},et.prototype.__iterator=function(nt,rt){var at=this._cache;if(at){var it=at.length,ot=0;return new Iterator(function(){if(ot===it)return iteratorDone();var st=at[rt?it-++ot:ot++];return iteratorValue(nt,st[0],st[1])})}return this.__iteratorUncached(nt,rt)},et}(Collection),KeyedSeq=function(_e){function et(tt){return tt==null?emptySequence().toKeyedSeq():isCollection(tt)?isKeyed(tt)?tt.toSeq():tt.fromEntrySeq():isRecord(tt)?tt.toSeq():keyedSeqFromValue(tt)}return _e&&(et.__proto__=_e),et.prototype=Object.create(_e&&_e.prototype),et.prototype.constructor=et,et.prototype.toKeyedSeq=function(){return this},et}(Seq),IndexedSeq=function(_e){function et(tt){return tt==null?emptySequence():isCollection(tt)?isKeyed(tt)?tt.entrySeq():tt.toIndexedSeq():isRecord(tt)?tt.toSeq().entrySeq():indexedSeqFromValue(tt)}return _e&&(et.__proto__=_e),et.prototype=Object.create(_e&&_e.prototype),et.prototype.constructor=et,et.of=function(){return et(arguments)},et.prototype.toIndexedSeq=function(){return this},et.prototype.toString=function(){return this.__toString("Seq [","]")},et}(Seq),SetSeq=function(_e){function et(tt){return(isCollection(tt)&&!isAssociative(tt)?tt:IndexedSeq(tt)).toSetSeq()}return _e&&(et.__proto__=_e),et.prototype=Object.create(_e&&_e.prototype),et.prototype.constructor=et,et.of=function(){return et(arguments)},et.prototype.toSetSeq=function(){return this},et}(Seq);Seq.isSeq=isSeq;Seq.Keyed=KeyedSeq;Seq.Set=SetSeq;Seq.Indexed=IndexedSeq;Seq.prototype[IS_SEQ_SYMBOL]=!0;var ArraySeq=function(_e){function et(tt){this._array=tt,this.size=tt.length}return _e&&(et.__proto__=_e),et.prototype=Object.create(_e&&_e.prototype),et.prototype.constructor=et,et.prototype.get=function(nt,rt){return this.has(nt)?this._array[wrapIndex(this,nt)]:rt},et.prototype.__iterate=function(nt,rt){for(var at=this._array,it=at.length,ot=0;ot!==it;){var st=rt?it-++ot:ot++;if(nt(at[st],st,this)===!1)break}return ot},et.prototype.__iterator=function(nt,rt){var at=this._array,it=at.length,ot=0;return new Iterator(function(){if(ot===it)return iteratorDone();var st=rt?it-++ot:ot++;return iteratorValue(nt,st,at[st])})},et}(IndexedSeq),ObjectSeq=function(_e){function et(tt){var nt=Object.keys(tt).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(tt):[]);this._object=tt,this._keys=nt,this.size=nt.length}return _e&&(et.__proto__=_e),et.prototype=Object.create(_e&&_e.prototype),et.prototype.constructor=et,et.prototype.get=function(nt,rt){return rt!==void 0&&!this.has(nt)?rt:this._object[nt]},et.prototype.has=function(nt){return hasOwnProperty$8.call(this._object,nt)},et.prototype.__iterate=function(nt,rt){for(var at=this._object,it=this._keys,ot=it.length,st=0;st!==ot;){var ct=it[rt?ot-++st:st++];if(nt(at[ct],ct,this)===!1)break}return st},et.prototype.__iterator=function(nt,rt){var at=this._object,it=this._keys,ot=it.length,st=0;return new Iterator(function(){if(st===ot)return iteratorDone();var ct=it[rt?ot-++st:st++];return iteratorValue(nt,ct,at[ct])})},et}(KeyedSeq);ObjectSeq.prototype[IS_ORDERED_SYMBOL]=!0;var CollectionSeq=function(_e){function et(tt){this._collection=tt,this.size=tt.length||tt.size}return _e&&(et.__proto__=_e),et.prototype=Object.create(_e&&_e.prototype),et.prototype.constructor=et,et.prototype.__iterateUncached=function(nt,rt){if(rt)return this.cacheResult().__iterate(nt,rt);var at=this._collection,it=getIterator$4(at),ot=0;if(isIterator(it))for(var st;!(st=it.next()).done&&nt(st.value,ot++,this)!==!1;);return ot},et.prototype.__iteratorUncached=function(nt,rt){if(rt)return this.cacheResult().__iterator(nt,rt);var at=this._collection,it=getIterator$4(at);if(!isIterator(it))return new Iterator(iteratorDone);var ot=0;return new Iterator(function(){var st=it.next();return st.done?st:iteratorValue(nt,ot++,st.value)})},et}(IndexedSeq),EMPTY_SEQ;function emptySequence(){return EMPTY_SEQ||(EMPTY_SEQ=new ArraySeq([]))}function keyedSeqFromValue(_e){var et=maybeIndexedSeqFromValue(_e);if(et)return et.fromEntrySeq();if(typeof _e=="object")return new ObjectSeq(_e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+_e)}function indexedSeqFromValue(_e){var et=maybeIndexedSeqFromValue(_e);if(et)return et;throw new TypeError("Expected Array or collection object of values: "+_e)}function seqFromValue(_e){var et=maybeIndexedSeqFromValue(_e);if(et)return isEntriesIterable(_e)?et.fromEntrySeq():isKeysIterable(_e)?et.toSetSeq():et;if(typeof _e=="object")return new ObjectSeq(_e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+_e)}function maybeIndexedSeqFromValue(_e){return isArrayLike$2(_e)?new ArraySeq(_e):hasIterator(_e)?new CollectionSeq(_e):void 0}var IS_MAP_SYMBOL="@@__IMMUTABLE_MAP__@@";function isMap$1(_e){return!!(_e&&_e[IS_MAP_SYMBOL])}function isOrderedMap(_e){return isMap$1(_e)&&isOrdered(_e)}function isValueObject(_e){return!!(_e&&typeof _e.equals=="function"&&typeof _e.hashCode=="function")}function is$2(_e,et){if(_e===et||_e!==_e&&et!==et)return!0;if(!_e||!et)return!1;if(typeof _e.valueOf=="function"&&typeof et.valueOf=="function"){if(_e=_e.valueOf(),et=et.valueOf(),_e===et||_e!==_e&&et!==et)return!0;if(!_e||!et)return!1}return!!(isValueObject(_e)&&isValueObject(et)&&_e.equals(et))}var imul=typeof Math.imul=="function"&&Math.imul(4294967295,2)===-2?Math.imul:function(et,tt){et|=0,tt|=0;var nt=et&65535,rt=tt&65535;return nt*rt+((et>>>16)*rt+nt*(tt>>>16)<<16>>>0)|0};function smi(_e){return _e>>>1&1073741824|_e&3221225471}var defaultValueOf=Object.prototype.valueOf;function hash(_e){if(_e==null)return hashNullish(_e);if(typeof _e.hashCode=="function")return smi(_e.hashCode(_e));var et=valueOf(_e);if(et==null)return hashNullish(et);switch(typeof et){case"boolean":return et?1108378657:1108378656;case"number":return hashNumber(et);case"string":return et.length>STRING_HASH_CACHE_MIN_STRLEN?cachedHashString(et):hashString(et);case"object":case"function":return hashJSObj(et);case"symbol":return hashSymbol(et);default:if(typeof et.toString=="function")return hashString(et.toString());throw new Error("Value type "+typeof et+" cannot be hashed.")}}function hashNullish(_e){return _e===null?1108378658:1108378659}function hashNumber(_e){if(_e!==_e||_e===1/0)return 0;var et=_e|0;for(et!==_e&&(et^=_e*4294967295);_e>4294967295;)_e/=4294967295,et^=_e;return smi(et)}function cachedHashString(_e){var et=stringHashCache[_e];return et===void 0&&(et=hashString(_e),STRING_HASH_CACHE_SIZE===STRING_HASH_CACHE_MAX_SIZE&&(STRING_HASH_CACHE_SIZE=0,stringHashCache={}),STRING_HASH_CACHE_SIZE++,stringHashCache[_e]=et),et}function hashString(_e){for(var et=0,tt=0;tt<_e.length;tt++)et=31*et+_e.charCodeAt(tt)|0;return smi(et)}function hashSymbol(_e){var et=symbolMap[_e];return et!==void 0||(et=nextHash(),symbolMap[_e]=et),et}function hashJSObj(_e){var et;if(usingWeakMap&&(et=weakMap.get(_e),et!==void 0)||(et=_e[UID_HASH_KEY],et!==void 0)||!canDefineProperty&&(et=_e.propertyIsEnumerable&&_e.propertyIsEnumerable[UID_HASH_KEY],et!==void 0||(et=getIENodeHash(_e),et!==void 0)))return et;if(et=nextHash(),usingWeakMap)weakMap.set(_e,et);else{if(isExtensible$1!==void 0&&isExtensible$1(_e)===!1)throw new Error("Non-extensible objects are not allowed as keys.");if(canDefineProperty)Object.defineProperty(_e,UID_HASH_KEY,{enumerable:!1,configurable:!1,writable:!1,value:et});else if(_e.propertyIsEnumerable!==void 0&&_e.propertyIsEnumerable===_e.constructor.prototype.propertyIsEnumerable)_e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},_e.propertyIsEnumerable[UID_HASH_KEY]=et;else if(_e.nodeType!==void 0)_e[UID_HASH_KEY]=et;else throw new Error("Unable to set a non-enumerable property on object.")}return et}var isExtensible$1=Object.isExtensible,canDefineProperty=function(){try{return Object.defineProperty({},"@",{}),!0}catch{return!1}}();function getIENodeHash(_e){if(_e&&_e.nodeType>0)switch(_e.nodeType){case 1:return _e.uniqueID;case 9:return _e.documentElement&&_e.documentElement.uniqueID}}function valueOf(_e){return _e.valueOf!==defaultValueOf&&typeof _e.valueOf=="function"?_e.valueOf(_e):_e}function nextHash(){var _e=++_objHashUID;return _objHashUID&1073741824&&(_objHashUID=0),_e}var usingWeakMap=typeof WeakMap=="function",weakMap;usingWeakMap&&(weakMap=new WeakMap);var symbolMap=Object.create(null),_objHashUID=0,UID_HASH_KEY="__immutablehash__";typeof Symbol=="function"&&(UID_HASH_KEY=Symbol(UID_HASH_KEY));var STRING_HASH_CACHE_MIN_STRLEN=16,STRING_HASH_CACHE_MAX_SIZE=255,STRING_HASH_CACHE_SIZE=0,stringHashCache={},ToKeyedSequence=function(_e){function et(tt,nt){this._iter=tt,this._useKeys=nt,this.size=tt.size}return _e&&(et.__proto__=_e),et.prototype=Object.create(_e&&_e.prototype),et.prototype.constructor=et,et.prototype.get=function(nt,rt){return this._iter.get(nt,rt)},et.prototype.has=function(nt){return this._iter.has(nt)},et.prototype.valueSeq=function(){return this._iter.valueSeq()},et.prototype.reverse=function(){var nt=this,rt=reverseFactory(this,!0);return this._useKeys||(rt.valueSeq=function(){return nt._iter.toSeq().reverse()}),rt},et.prototype.map=function(nt,rt){var at=this,it=mapFactory(this,nt,rt);return this._useKeys||(it.valueSeq=function(){return at._iter.toSeq().map(nt,rt)}),it},et.prototype.__iterate=function(nt,rt){var at=this;return this._iter.__iterate(function(it,ot){return nt(it,ot,at)},rt)},et.prototype.__iterator=function(nt,rt){return this._iter.__iterator(nt,rt)},et}(KeyedSeq);ToKeyedSequence.prototype[IS_ORDERED_SYMBOL]=!0;var ToIndexedSequence=function(_e){function et(tt){this._iter=tt,this.size=tt.size}return _e&&(et.__proto__=_e),et.prototype=Object.create(_e&&_e.prototype),et.prototype.constructor=et,et.prototype.includes=function(nt){return this._iter.includes(nt)},et.prototype.__iterate=function(nt,rt){var at=this,it=0;return rt&&ensureSize(this),this._iter.__iterate(function(ot){return nt(ot,rt?at.size-++it:it++,at)},rt)},et.prototype.__iterator=function(nt,rt){var at=this,it=this._iter.__iterator(ITERATE_VALUES,rt),ot=0;return rt&&ensureSize(this),new Iterator(function(){var st=it.next();return st.done?st:iteratorValue(nt,rt?at.size-++ot:ot++,st.value,st)})},et}(IndexedSeq),ToSetSequence=function(_e){function et(tt){this._iter=tt,this.size=tt.size}return _e&&(et.__proto__=_e),et.prototype=Object.create(_e&&_e.prototype),et.prototype.constructor=et,et.prototype.has=function(nt){return this._iter.includes(nt)},et.prototype.__iterate=function(nt,rt){var at=this;return this._iter.__iterate(function(it){return nt(it,it,at)},rt)},et.prototype.__iterator=function(nt,rt){var at=this._iter.__iterator(ITERATE_VALUES,rt);return new Iterator(function(){var it=at.next();return it.done?it:iteratorValue(nt,it.value,it.value,it)})},et}(SetSeq),FromEntriesSequence=function(_e){function et(tt){this._iter=tt,this.size=tt.size}return _e&&(et.__proto__=_e),et.prototype=Object.create(_e&&_e.prototype),et.prototype.constructor=et,et.prototype.entrySeq=function(){return this._iter.toSeq()},et.prototype.__iterate=function(nt,rt){var at=this;return this._iter.__iterate(function(it){if(it){validateEntry(it);var ot=isCollection(it);return nt(ot?it.get(1):it[1],ot?it.get(0):it[0],at)}},rt)},et.prototype.__iterator=function(nt,rt){var at=this._iter.__iterator(ITERATE_VALUES,rt);return new Iterator(function(){for(;;){var it=at.next();if(it.done)return it;var ot=it.value;if(ot){validateEntry(ot);var st=isCollection(ot);return iteratorValue(nt,st?ot.get(0):ot[0],st?ot.get(1):ot[1],it)}}})},et}(KeyedSeq);ToIndexedSequence.prototype.cacheResult=ToKeyedSequence.prototype.cacheResult=ToSetSequence.prototype.cacheResult=FromEntriesSequence.prototype.cacheResult=cacheResultThrough;function flipFactory(_e){var et=makeSequence(_e);return et._iter=_e,et.size=_e.size,et.flip=function(){return _e},et.reverse=function(){var tt=_e.reverse.apply(this);return tt.flip=function(){return _e.reverse()},tt},et.has=function(tt){return _e.includes(tt)},et.includes=function(tt){return _e.has(tt)},et.cacheResult=cacheResultThrough,et.__iterateUncached=function(tt,nt){var rt=this;return _e.__iterate(function(at,it){return tt(it,at,rt)!==!1},nt)},et.__iteratorUncached=function(tt,nt){if(tt===ITERATE_ENTRIES){var rt=_e.__iterator(tt,nt);return new Iterator(function(){var at=rt.next();if(!at.done){var it=at.value[0];at.value[0]=at.value[1],at.value[1]=it}return at})}return _e.__iterator(tt===ITERATE_VALUES?ITERATE_KEYS:ITERATE_VALUES,nt)},et}function mapFactory(_e,et,tt){var nt=makeSequence(_e);return nt.size=_e.size,nt.has=function(rt){return _e.has(rt)},nt.get=function(rt,at){var it=_e.get(rt,NOT_SET$1);return it===NOT_SET$1?at:et.call(tt,it,rt,_e)},nt.__iterateUncached=function(rt,at){var it=this;return _e.__iterate(function(ot,st,ct){return rt(et.call(tt,ot,st,ct),st,it)!==!1},at)},nt.__iteratorUncached=function(rt,at){var it=_e.__iterator(ITERATE_ENTRIES,at);return new Iterator(function(){var ot=it.next();if(ot.done)return ot;var st=ot.value,ct=st[0];return iteratorValue(rt,ct,et.call(tt,st[1],ct,_e),ot)})},nt}function reverseFactory(_e,et){var tt=this,nt=makeSequence(_e);return nt._iter=_e,nt.size=_e.size,nt.reverse=function(){return _e},_e.flip&&(nt.flip=function(){var rt=flipFactory(_e);return rt.reverse=function(){return _e.flip()},rt}),nt.get=function(rt,at){return _e.get(et?rt:-1-rt,at)},nt.has=function(rt){return _e.has(et?rt:-1-rt)},nt.includes=function(rt){return _e.includes(rt)},nt.cacheResult=cacheResultThrough,nt.__iterate=function(rt,at){var it=this,ot=0;return at&&ensureSize(_e),_e.__iterate(function(st,ct){return rt(st,et?ct:at?it.size-++ot:ot++,it)},!at)},nt.__iterator=function(rt,at){var it=0;at&&ensureSize(_e);var ot=_e.__iterator(ITERATE_ENTRIES,!at);return new Iterator(function(){var st=ot.next();if(st.done)return st;var ct=st.value;return iteratorValue(rt,et?ct[0]:at?tt.size-++it:it++,ct[1],st)})},nt}function filterFactory(_e,et,tt,nt){var rt=makeSequence(_e);return nt&&(rt.has=function(at){var it=_e.get(at,NOT_SET$1);return it!==NOT_SET$1&&!!et.call(tt,it,at,_e)},rt.get=function(at,it){var ot=_e.get(at,NOT_SET$1);return ot!==NOT_SET$1&&et.call(tt,ot,at,_e)?ot:it}),rt.__iterateUncached=function(at,it){var ot=this,st=0;return _e.__iterate(function(ct,ut,dt){if(et.call(tt,ct,ut,dt))return st++,at(ct,nt?ut:st-1,ot)},it),st},rt.__iteratorUncached=function(at,it){var ot=_e.__iterator(ITERATE_ENTRIES,it),st=0;return new Iterator(function(){for(;;){var ct=ot.next();if(ct.done)return ct;var ut=ct.value,dt=ut[0],ft=ut[1];if(et.call(tt,ft,dt,_e))return iteratorValue(at,nt?dt:st++,ft,ct)}})},rt}function countByFactory(_e,et,tt){var nt=Map$3().asMutable();return _e.__iterate(function(rt,at){nt.update(et.call(tt,rt,at,_e),0,function(it){return it+1})}),nt.asImmutable()}function groupByFactory(_e,et,tt){var nt=isKeyed(_e),rt=(isOrdered(_e)?OrderedMap():Map$3()).asMutable();_e.__iterate(function(it,ot){rt.update(et.call(tt,it,ot,_e),function(st){return st=st||[],st.push(nt?[ot,it]:it),st})});var at=collectionClass(_e);return rt.map(function(it){return reify(_e,at(it))}).asImmutable()}function partitionFactory(_e,et,tt){var nt=isKeyed(_e),rt=[[],[]];_e.__iterate(function(it,ot){rt[et.call(tt,it,ot,_e)?1:0].push(nt?[ot,it]:it)});var at=collectionClass(_e);return rt.map(function(it){return reify(_e,at(it))})}function sliceFactory(_e,et,tt,nt){var rt=_e.size;if(wholeSlice(et,tt,rt))return _e;var at=resolveBegin(et,rt),it=resolveEnd(tt,rt);if(at!==at||it!==it)return sliceFactory(_e.toSeq().cacheResult(),et,tt,nt);var ot=it-at,st;ot===ot&&(st=ot<0?0:ot);var ct=makeSequence(_e);return ct.size=st===0?st:_e.size&&st||void 0,!nt&&isSeq(_e)&&st>=0&&(ct.get=function(ut,dt){return ut=wrapIndex(this,ut),ut>=0&&utst)return iteratorDone();var ht=ft.next();return nt||ut===ITERATE_VALUES||ht.done?ht:ut===ITERATE_KEYS?iteratorValue(ut,mt-1,void 0,ht):iteratorValue(ut,mt-1,ht.value[1],ht)})},ct}function takeWhileFactory(_e,et,tt){var nt=makeSequence(_e);return nt.__iterateUncached=function(rt,at){var it=this;if(at)return this.cacheResult().__iterate(rt,at);var ot=0;return _e.__iterate(function(st,ct,ut){return et.call(tt,st,ct,ut)&&++ot&&rt(st,ct,it)}),ot},nt.__iteratorUncached=function(rt,at){var it=this;if(at)return this.cacheResult().__iterator(rt,at);var ot=_e.__iterator(ITERATE_ENTRIES,at),st=!0;return new Iterator(function(){if(!st)return iteratorDone();var ct=ot.next();if(ct.done)return ct;var ut=ct.value,dt=ut[0],ft=ut[1];return et.call(tt,ft,dt,it)?rt===ITERATE_ENTRIES?ct:iteratorValue(rt,dt,ft,ct):(st=!1,iteratorDone())})},nt}function skipWhileFactory(_e,et,tt,nt){var rt=makeSequence(_e);return rt.__iterateUncached=function(at,it){var ot=this;if(it)return this.cacheResult().__iterate(at,it);var st=!0,ct=0;return _e.__iterate(function(ut,dt,ft){if(!(st&&(st=et.call(tt,ut,dt,ft))))return ct++,at(ut,nt?dt:ct-1,ot)}),ct},rt.__iteratorUncached=function(at,it){var ot=this;if(it)return this.cacheResult().__iterator(at,it);var st=_e.__iterator(ITERATE_ENTRIES,it),ct=!0,ut=0;return new Iterator(function(){var dt,ft,pt;do{if(dt=st.next(),dt.done)return nt||at===ITERATE_VALUES?dt:at===ITERATE_KEYS?iteratorValue(at,ut++,void 0,dt):iteratorValue(at,ut++,dt.value[1],dt);var mt=dt.value;ft=mt[0],pt=mt[1],ct&&(ct=et.call(tt,pt,ft,ot))}while(ct);return at===ITERATE_ENTRIES?dt:iteratorValue(at,ft,pt,dt)})},rt}function concatFactory(_e,et){var tt=isKeyed(_e),nt=[_e].concat(et).map(function(it){return isCollection(it)?tt&&(it=KeyedCollection(it)):it=tt?keyedSeqFromValue(it):indexedSeqFromValue(Array.isArray(it)?it:[it]),it}).filter(function(it){return it.size!==0});if(nt.length===0)return _e;if(nt.length===1){var rt=nt[0];if(rt===_e||tt&&isKeyed(rt)||isIndexed(_e)&&isIndexed(rt))return rt}var at=new ArraySeq(nt);return tt?at=at.toKeyedSeq():isIndexed(_e)||(at=at.toSetSeq()),at=at.flatten(!0),at.size=nt.reduce(function(it,ot){if(it!==void 0){var st=ot.size;if(st!==void 0)return it+st}},0),at}function flattenFactory(_e,et,tt){var nt=makeSequence(_e);return nt.__iterateUncached=function(rt,at){if(at)return this.cacheResult().__iterate(rt,at);var it=0,ot=!1;function st(ct,ut){ct.__iterate(function(dt,ft){return(!et||ut0}function zipWithFactory(_e,et,tt,nt){var rt=makeSequence(_e),at=new ArraySeq(tt).map(function(it){return it.size});return rt.size=nt?at.max():at.min(),rt.__iterate=function(it,ot){for(var st=this.__iterator(ITERATE_VALUES,ot),ct,ut=0;!(ct=st.next()).done&&it(ct.value,ut++,this)!==!1;);return ut},rt.__iteratorUncached=function(it,ot){var st=tt.map(function(dt){return dt=Collection(dt),getIterator$4(ot?dt.reverse():dt)}),ct=0,ut=!1;return new Iterator(function(){var dt;return ut||(dt=st.map(function(ft){return ft.next()}),ut=nt?dt.every(function(ft){return ft.done}):dt.some(function(ft){return ft.done})),ut?iteratorDone():iteratorValue(it,ct++,et.apply(null,dt.map(function(ft){return ft.value})))})},rt}function reify(_e,et){return _e===et?_e:isSeq(_e)?et:_e.constructor(et)}function validateEntry(_e){if(_e!==Object(_e))throw new TypeError("Expected [K, V] tuple: "+_e)}function collectionClass(_e){return isKeyed(_e)?KeyedCollection:isIndexed(_e)?IndexedCollection:SetCollection}function makeSequence(_e){return Object.create((isKeyed(_e)?KeyedSeq:isIndexed(_e)?IndexedSeq:SetSeq).prototype)}function cacheResultThrough(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Seq.prototype.cacheResult.call(this)}function defaultComparator(_e,et){return _e===void 0&&et===void 0?0:_e===void 0?1:et===void 0?-1:_e>et?1:_e0;)et[tt]=arguments[tt+1];if(typeof _e!="function")throw new TypeError("Invalid merger function: "+_e);return mergeIntoKeyedWith(this,et,_e)}function mergeIntoKeyedWith(_e,et,tt){for(var nt=[],rt=0;rt0;)et[tt]=arguments[tt+1];return mergeWithSources(_e,et)}function mergeWith(_e,et){for(var tt=[],nt=arguments.length-2;nt-- >0;)tt[nt]=arguments[nt+2];return mergeWithSources(et,tt,_e)}function mergeDeep$1(_e){for(var et=[],tt=arguments.length-1;tt-- >0;)et[tt]=arguments[tt+1];return mergeDeepWithSources(_e,et)}function mergeDeepWith$1(_e,et){for(var tt=[],nt=arguments.length-2;nt-- >0;)tt[nt]=arguments[nt+2];return mergeDeepWithSources(et,tt,_e)}function mergeDeepWithSources(_e,et,tt){return mergeWithSources(_e,et,deepMergerWith(tt))}function mergeWithSources(_e,et,tt){if(!isDataStructure(_e))throw new TypeError("Cannot merge into non-data-structure value: "+_e);if(isImmutable(_e))return typeof tt=="function"&&_e.mergeWith?_e.mergeWith.apply(_e,[tt].concat(et)):_e.merge?_e.merge.apply(_e,et):_e.concat.apply(_e,et);for(var nt=Array.isArray(_e),rt=_e,at=nt?IndexedCollection:KeyedCollection,it=nt?function(st){rt===_e&&(rt=shallowCopy$1(rt)),rt.push(st)}:function(st,ct){var ut=hasOwnProperty$8.call(rt,ct),dt=ut&&tt?tt(rt[ct],st,ct):st;(!ut||dt!==rt[ct])&&(rt===_e&&(rt=shallowCopy$1(rt)),rt[ct]=dt)},ot=0;ot0;)et[tt]=arguments[tt+1];return mergeDeepWithSources(this,et,_e)}function mergeIn(_e){for(var et=[],tt=arguments.length-1;tt-- >0;)et[tt]=arguments[tt+1];return updateIn$1(this,_e,emptyMap(),function(nt){return mergeWithSources(nt,et)})}function mergeDeepIn(_e){for(var et=[],tt=arguments.length-1;tt-- >0;)et[tt]=arguments[tt+1];return updateIn$1(this,_e,emptyMap(),function(nt){return mergeDeepWithSources(nt,et)})}function withMutations(_e){var et=this.asMutable();return _e(et),et.wasAltered()?et.__ensureOwner(this.__ownerID):this}function asMutable(){return this.__ownerID?this:this.__ensureOwner(new OwnerID)}function asImmutable(){return this.__ensureOwner()}function wasAltered(){return this.__altered}var Map$3=function(_e){function et(tt){return tt==null?emptyMap():isMap$1(tt)&&!isOrdered(tt)?tt:emptyMap().withMutations(function(nt){var rt=_e(tt);assertNotInfinite(rt.size),rt.forEach(function(at,it){return nt.set(it,at)})})}return _e&&(et.__proto__=_e),et.prototype=Object.create(_e&&_e.prototype),et.prototype.constructor=et,et.of=function(){for(var nt=[],rt=arguments.length;rt--;)nt[rt]=arguments[rt];return emptyMap().withMutations(function(at){for(var it=0;it=nt.length)throw new Error("Missing value for key: "+nt[it]);at.set(nt[it],nt[it+1])}})},et.prototype.toString=function(){return this.__toString("Map {","}")},et.prototype.get=function(nt,rt){return this._root?this._root.get(0,void 0,nt,rt):rt},et.prototype.set=function(nt,rt){return updateMap(this,nt,rt)},et.prototype.remove=function(nt){return updateMap(this,nt,NOT_SET$1)},et.prototype.deleteAll=function(nt){var rt=Collection(nt);return rt.size===0?this:this.withMutations(function(at){rt.forEach(function(it){return at.remove(it)})})},et.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):emptyMap()},et.prototype.sort=function(nt){return OrderedMap(sortFactory(this,nt))},et.prototype.sortBy=function(nt,rt){return OrderedMap(sortFactory(this,rt,nt))},et.prototype.map=function(nt,rt){var at=this;return this.withMutations(function(it){it.forEach(function(ot,st){it.set(st,nt.call(rt,ot,st,at))})})},et.prototype.__iterator=function(nt,rt){return new MapIterator(this,nt,rt)},et.prototype.__iterate=function(nt,rt){var at=this,it=0;return this._root&&this._root.iterate(function(ot){return it++,nt(ot[1],ot[0],at)},rt),it},et.prototype.__ensureOwner=function(nt){return nt===this.__ownerID?this:nt?makeMap(this.size,this._root,nt,this.__hash):this.size===0?emptyMap():(this.__ownerID=nt,this.__altered=!1,this)},et}(KeyedCollection);Map$3.isMap=isMap$1;var MapPrototype=Map$3.prototype;MapPrototype[IS_MAP_SYMBOL]=!0;MapPrototype[DELETE]=MapPrototype.remove;MapPrototype.removeAll=MapPrototype.deleteAll;MapPrototype.setIn=setIn;MapPrototype.removeIn=MapPrototype.deleteIn=deleteIn;MapPrototype.update=update;MapPrototype.updateIn=updateIn;MapPrototype.merge=MapPrototype.concat=merge$1$1;MapPrototype.mergeWith=mergeWith$1;MapPrototype.mergeDeep=mergeDeep;MapPrototype.mergeDeepWith=mergeDeepWith;MapPrototype.mergeIn=mergeIn;MapPrototype.mergeDeepIn=mergeDeepIn;MapPrototype.withMutations=withMutations;MapPrototype.wasAltered=wasAltered;MapPrototype.asImmutable=asImmutable;MapPrototype["@@transducer/init"]=MapPrototype.asMutable=asMutable;MapPrototype["@@transducer/step"]=function(_e,et){return _e.set(et[0],et[1])};MapPrototype["@@transducer/result"]=function(_e){return _e.asImmutable()};var ArrayMapNode=function(et,tt){this.ownerID=et,this.entries=tt};ArrayMapNode.prototype.get=function(et,tt,nt,rt){for(var at=this.entries,it=0,ot=at.length;it=MAX_ARRAY_MAP_SIZE)return createNodes(et,ct,rt,at);var pt=et&&et===this.ownerID,mt=pt?ct:arrCopy(ct);return ft?st?ut===dt-1?mt.pop():mt[ut]=mt.pop():mt[ut]=[rt,at]:mt.push([rt,at]),pt?(this.entries=mt,this):new ArrayMapNode(et,mt)}};var BitmapIndexedNode=function(et,tt,nt){this.ownerID=et,this.bitmap=tt,this.nodes=nt};BitmapIndexedNode.prototype.get=function(et,tt,nt,rt){tt===void 0&&(tt=hash(nt));var at=1<<((et===0?tt:tt>>>et)&MASK),it=this.bitmap;return it&at?this.nodes[popCount(it&at-1)].get(et+SHIFT,tt,nt,rt):rt};BitmapIndexedNode.prototype.update=function(et,tt,nt,rt,at,it,ot){nt===void 0&&(nt=hash(rt));var st=(tt===0?nt:nt>>>tt)&MASK,ct=1<=MAX_BITMAP_INDEXED_SIZE)return expandNodes(et,pt,ut,st,ht);if(dt&&!ht&&pt.length===2&&isLeafNode(pt[ft^1]))return pt[ft^1];if(dt&&ht&&pt.length===1&&isLeafNode(ht))return ht;var Et=et&&et===this.ownerID,yt=dt?ht?ut:ut^ct:ut|ct,vt=dt?ht?setAt(pt,ft,ht,Et):spliceOut(pt,ft,Et):spliceIn(pt,ft,ht,Et);return Et?(this.bitmap=yt,this.nodes=vt,this):new BitmapIndexedNode(et,yt,vt)};var HashArrayMapNode=function(et,tt,nt){this.ownerID=et,this.count=tt,this.nodes=nt};HashArrayMapNode.prototype.get=function(et,tt,nt,rt){tt===void 0&&(tt=hash(nt));var at=(et===0?tt:tt>>>et)&MASK,it=this.nodes[at];return it?it.get(et+SHIFT,tt,nt,rt):rt};HashArrayMapNode.prototype.update=function(et,tt,nt,rt,at,it,ot){nt===void 0&&(nt=hash(rt));var st=(tt===0?nt:nt>>>tt)&MASK,ct=at===NOT_SET$1,ut=this.nodes,dt=ut[st];if(ct&&!dt)return this;var ft=updateNode(dt,et,tt+SHIFT,nt,rt,at,it,ot);if(ft===dt)return this;var pt=this.count;if(!dt)pt++;else if(!ft&&(pt--,pt>>tt)&MASK,it=(tt===0?nt:nt>>>tt)&MASK,ot,st=at===it?[mergeIntoNode(_e,et,tt+SHIFT,nt,rt)]:(ot=new ValueNode(et,nt,rt),at>>=1)it[ot]=tt&1?et[at++]:void 0;return it[nt]=rt,new HashArrayMapNode(_e,at+1,it)}function popCount(_e){return _e-=_e>>1&1431655765,_e=(_e&858993459)+(_e>>2&858993459),_e=_e+(_e>>4)&252645135,_e+=_e>>8,_e+=_e>>16,_e&127}function setAt(_e,et,tt,nt){var rt=nt?_e:arrCopy(_e);return rt[et]=tt,rt}function spliceIn(_e,et,tt,nt){var rt=_e.length+1;if(nt&&et+1===rt)return _e[et]=tt,_e;for(var at=new Array(rt),it=0,ot=0;ot0&&at=0&&nt>>tt&MASK;if(rt>=this.array.length)return new VNode([],et);var at=rt===0,it;if(tt>0){var ot=this.array[rt];if(it=ot&&ot.removeBefore(et,tt-SHIFT,nt),it===ot&&at)return this}if(at&&!it)return this;var st=editableVNode(this,et);if(!at)for(var ct=0;ct>>tt&MASK;if(rt>=this.array.length)return this;var at;if(tt>0){var it=this.array[rt];if(at=it&&it.removeAfter(et,tt-SHIFT,nt),at===it&&rt===this.array.length-1)return this}var ot=editableVNode(this,et);return ot.array.splice(rt+1),at&&(ot.array[rt]=at),ot};var DONE={};function iterateList(_e,et){var tt=_e._origin,nt=_e._capacity,rt=getTailOffset(nt),at=_e._tail;return it(_e._root,_e._level,0);function it(ct,ut,dt){return ut===0?ot(ct,dt):st(ct,ut,dt)}function ot(ct,ut){var dt=ut===rt?at&&at.array:ct&&ct.array,ft=ut>tt?0:tt-ut,pt=nt-ut;return pt>SIZE&&(pt=SIZE),function(){if(ft===pt)return DONE;var mt=et?--pt:ft++;return dt&&dt[mt]}}function st(ct,ut,dt){var ft,pt=ct&&ct.array,mt=dt>tt?0:tt-dt>>ut,ht=(nt-dt>>ut)+1;return ht>SIZE&&(ht=SIZE),function(){for(;;){if(ft){var Et=ft();if(Et!==DONE)return Et;ft=null}if(mt===ht)return DONE;var yt=et?--ht:mt++;ft=it(pt&&pt[yt],ut-SHIFT,dt+(yt<=_e.size||et<0)return _e.withMutations(function(it){et<0?setListBounds(it,et).set(0,tt):setListBounds(it,0,et+1).set(et,tt)});et+=_e._origin;var nt=_e._tail,rt=_e._root,at=MakeRef();return et>=getTailOffset(_e._capacity)?nt=updateVNode(nt,_e.__ownerID,0,et,tt,at):rt=updateVNode(rt,_e.__ownerID,_e._level,et,tt,at),at.value?_e.__ownerID?(_e._root=rt,_e._tail=nt,_e.__hash=void 0,_e.__altered=!0,_e):makeList(_e._origin,_e._capacity,_e._level,rt,nt):_e}function updateVNode(_e,et,tt,nt,rt,at){var it=nt>>>tt&MASK,ot=_e&&it<_e.array.length;if(!ot&&rt===void 0)return _e;var st;if(tt>0){var ct=_e&&_e.array[it],ut=updateVNode(ct,et,tt-SHIFT,nt,rt,at);return ut===ct?_e:(st=editableVNode(_e,et),st.array[it]=ut,st)}return ot&&_e.array[it]===rt?_e:(at&&SetRef(at),st=editableVNode(_e,et),rt===void 0&&it===st.array.length-1?st.array.pop():st.array[it]=rt,st)}function editableVNode(_e,et){return et&&_e&&et===_e.ownerID?_e:new VNode(_e?_e.array.slice():[],et)}function listNodeFor(_e,et){if(et>=getTailOffset(_e._capacity))return _e._tail;if(et<1<<_e._level+SHIFT){for(var tt=_e._root,nt=_e._level;tt&&nt>0;)tt=tt.array[et>>>nt&MASK],nt-=SHIFT;return tt}}function setListBounds(_e,et,tt){et!==void 0&&(et|=0),tt!==void 0&&(tt|=0);var nt=_e.__ownerID||new OwnerID,rt=_e._origin,at=_e._capacity,it=rt+et,ot=tt===void 0?at:tt<0?at+tt:rt+tt;if(it===rt&&ot===at)return _e;if(it>=ot)return _e.clear();for(var st=_e._level,ct=_e._root,ut=0;it+ut<0;)ct=new VNode(ct&&ct.array.length?[void 0,ct]:[],nt),st+=SHIFT,ut+=1<=1<dt?new VNode([],nt):pt;if(pt&&ft>dt&&itSHIFT;Et-=SHIFT){var yt=dt>>>Et&MASK;ht=ht.array[yt]=editableVNode(ht.array[yt],nt)}ht.array[dt>>>SHIFT&MASK]=pt}if(ot=ft)it-=ft,ot-=ft,st=SHIFT,ct=null,mt=mt&&mt.removeBefore(nt,0,it);else if(it>rt||ft>>st&MASK;if(vt!==ft>>>st&MASK)break;vt&&(ut+=(1<rt&&(ct=ct.removeBefore(nt,st,it-ut)),ct&&ft>>SHIFT<=SIZE&&rt.size>=nt.size*2?(st=rt.filter(function(ct,ut){return ct!==void 0&&at!==ut}),ot=st.toKeyedSeq().map(function(ct){return ct[0]}).flip().toMap(),_e.__ownerID&&(ot.__ownerID=st.__ownerID=_e.__ownerID)):(ot=nt.remove(et),st=at===rt.size-1?rt.pop():rt.set(at,void 0))}else if(it){if(tt===rt.get(at)[1])return _e;ot=nt,st=rt.set(at,[et,tt])}else ot=nt.set(et,rt.size),st=rt.set(rt.size,[et,tt]);return _e.__ownerID?(_e.size=ot.size,_e._map=ot,_e._list=st,_e.__hash=void 0,_e.__altered=!0,_e):makeOrderedMap(ot,st)}var IS_STACK_SYMBOL="@@__IMMUTABLE_STACK__@@";function isStack(_e){return!!(_e&&_e[IS_STACK_SYMBOL])}var Stack$4=function(_e){function et(tt){return tt==null?emptyStack():isStack(tt)?tt:emptyStack().pushAll(tt)}return _e&&(et.__proto__=_e),et.prototype=Object.create(_e&&_e.prototype),et.prototype.constructor=et,et.of=function(){return this(arguments)},et.prototype.toString=function(){return this.__toString("Stack [","]")},et.prototype.get=function(nt,rt){var at=this._head;for(nt=wrapIndex(this,nt);at&&nt--;)at=at.next;return at?at.value:rt},et.prototype.peek=function(){return this._head&&this._head.value},et.prototype.push=function(){var nt=arguments;if(arguments.length===0)return this;for(var rt=this.size+arguments.length,at=this._head,it=arguments.length-1;it>=0;it--)at={value:nt[it],next:at};return this.__ownerID?(this.size=rt,this._head=at,this.__hash=void 0,this.__altered=!0,this):makeStack(rt,at)},et.prototype.pushAll=function(nt){if(nt=_e(nt),nt.size===0)return this;if(this.size===0&&isStack(nt))return nt;assertNotInfinite(nt.size);var rt=this.size,at=this._head;return nt.__iterate(function(it){rt++,at={value:it,next:at}},!0),this.__ownerID?(this.size=rt,this._head=at,this.__hash=void 0,this.__altered=!0,this):makeStack(rt,at)},et.prototype.pop=function(){return this.slice(1)},et.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):emptyStack()},et.prototype.slice=function(nt,rt){if(wholeSlice(nt,rt,this.size))return this;var at=resolveBegin(nt,this.size),it=resolveEnd(rt,this.size);if(it!==this.size)return _e.prototype.slice.call(this,nt,rt);for(var ot=this.size-at,st=this._head;at--;)st=st.next;return this.__ownerID?(this.size=ot,this._head=st,this.__hash=void 0,this.__altered=!0,this):makeStack(ot,st)},et.prototype.__ensureOwner=function(nt){return nt===this.__ownerID?this:nt?makeStack(this.size,this._head,nt,this.__hash):this.size===0?emptyStack():(this.__ownerID=nt,this.__altered=!1,this)},et.prototype.__iterate=function(nt,rt){var at=this;if(rt)return new ArraySeq(this.toArray()).__iterate(function(st,ct){return nt(st,ct,at)},rt);for(var it=0,ot=this._head;ot&&nt(ot.value,it++,this)!==!1;)ot=ot.next;return it},et.prototype.__iterator=function(nt,rt){if(rt)return new ArraySeq(this.toArray()).__iterator(nt,rt);var at=0,it=this._head;return new Iterator(function(){if(it){var ot=it.value;return it=it.next,iteratorValue(nt,at++,ot)}return iteratorDone()})},et}(IndexedCollection);Stack$4.isStack=isStack;var StackPrototype=Stack$4.prototype;StackPrototype[IS_STACK_SYMBOL]=!0;StackPrototype.shift=StackPrototype.pop;StackPrototype.unshift=StackPrototype.push;StackPrototype.unshiftAll=StackPrototype.pushAll;StackPrototype.withMutations=withMutations;StackPrototype.wasAltered=wasAltered;StackPrototype.asImmutable=asImmutable;StackPrototype["@@transducer/init"]=StackPrototype.asMutable=asMutable;StackPrototype["@@transducer/step"]=function(_e,et){return _e.unshift(et)};StackPrototype["@@transducer/result"]=function(_e){return _e.asImmutable()};function makeStack(_e,et,tt,nt){var rt=Object.create(StackPrototype);return rt.size=_e,rt._head=et,rt.__ownerID=tt,rt.__hash=nt,rt.__altered=!1,rt}var EMPTY_STACK;function emptyStack(){return EMPTY_STACK||(EMPTY_STACK=makeStack(0))}var IS_SET_SYMBOL="@@__IMMUTABLE_SET__@@";function isSet$1(_e){return!!(_e&&_e[IS_SET_SYMBOL])}function isOrderedSet(_e){return isSet$1(_e)&&isOrdered(_e)}function deepEqual$1(_e,et){if(_e===et)return!0;if(!isCollection(et)||_e.size!==void 0&&et.size!==void 0&&_e.size!==et.size||_e.__hash!==void 0&&et.__hash!==void 0&&_e.__hash!==et.__hash||isKeyed(_e)!==isKeyed(et)||isIndexed(_e)!==isIndexed(et)||isOrdered(_e)!==isOrdered(et))return!1;if(_e.size===0&&et.size===0)return!0;var tt=!isAssociative(_e);if(isOrdered(_e)){var nt=_e.entries();return et.every(function(st,ct){var ut=nt.next().value;return ut&&is$2(ut[1],st)&&(tt||is$2(ut[0],ct))})&&nt.next().done}var rt=!1;if(_e.size===void 0)if(et.size===void 0)typeof _e.cacheResult=="function"&&_e.cacheResult();else{rt=!0;var at=_e;_e=et,et=at}var it=!0,ot=et.__iterate(function(st,ct){if(tt?!_e.has(st):rt?!is$2(st,_e.get(ct,NOT_SET$1)):!is$2(_e.get(ct,NOT_SET$1),st))return it=!1,!1});return it&&_e.size===ot}function mixin(_e,et){var tt=function(nt){_e.prototype[nt]=et[nt]};return Object.keys(et).forEach(tt),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(et).forEach(tt),_e}function toJS(_e){if(!_e||typeof _e!="object")return _e;if(!isCollection(_e)){if(!isDataStructure(_e))return _e;_e=Seq(_e)}if(isKeyed(_e)){var et={};return _e.__iterate(function(nt,rt){et[rt]=toJS(nt)}),et}var tt=[];return _e.__iterate(function(nt){tt.push(toJS(nt))}),tt}var Set$3=function(_e){function et(tt){return tt==null?emptySet():isSet$1(tt)&&!isOrdered(tt)?tt:emptySet().withMutations(function(nt){var rt=_e(tt);assertNotInfinite(rt.size),rt.forEach(function(at){return nt.add(at)})})}return _e&&(et.__proto__=_e),et.prototype=Object.create(_e&&_e.prototype),et.prototype.constructor=et,et.of=function(){return this(arguments)},et.fromKeys=function(nt){return this(KeyedCollection(nt).keySeq())},et.intersect=function(nt){return nt=Collection(nt).toArray(),nt.length?SetPrototype.intersect.apply(et(nt.pop()),nt):emptySet()},et.union=function(nt){return nt=Collection(nt).toArray(),nt.length?SetPrototype.union.apply(et(nt.pop()),nt):emptySet()},et.prototype.toString=function(){return this.__toString("Set {","}")},et.prototype.has=function(nt){return this._map.has(nt)},et.prototype.add=function(nt){return updateSet(this,this._map.set(nt,nt))},et.prototype.remove=function(nt){return updateSet(this,this._map.remove(nt))},et.prototype.clear=function(){return updateSet(this,this._map.clear())},et.prototype.map=function(nt,rt){var at=this,it=!1,ot=updateSet(this,this._map.mapEntries(function(st){var ct=st[1],ut=nt.call(rt,ct,ct,at);return ut!==ct&&(it=!0),[ut,ut]},rt));return it?ot:this},et.prototype.union=function(){for(var nt=[],rt=arguments.length;rt--;)nt[rt]=arguments[rt];return nt=nt.filter(function(at){return at.size!==0}),nt.length===0?this:this.size===0&&!this.__ownerID&&nt.length===1?this.constructor(nt[0]):this.withMutations(function(at){for(var it=0;it=0&&rt=0&&atthis.size?tt:this.find(function(nt,rt){return rt===et},void 0,tt)},has:function(et){return et=wrapIndex(this,et),et>=0&&(this.size!==void 0?this.size===1/0||etet?-1:0}function hashCollection(_e){if(_e.size===1/0)return 0;var et=isOrdered(_e),tt=isKeyed(_e),nt=et?1:0,rt=_e.__iterate(tt?et?function(at,it){nt=31*nt+hashMerge(hash(at),hash(it))|0}:function(at,it){nt=nt+hashMerge(hash(at),hash(it))|0}:et?function(at){nt=31*nt+hash(at)|0}:function(at){nt=nt+hash(at)|0});return murmurHashOfSize(rt,nt)}function murmurHashOfSize(_e,et){return et=imul(et,3432918353),et=imul(et<<15|et>>>-15,461845907),et=imul(et<<13|et>>>-13,5),et=(et+3864292196|0)^_e,et=imul(et^et>>>16,2246822507),et=imul(et^et>>>13,3266489909),et=smi(et^et>>>16),et}function hashMerge(_e,et){return _e^et+2654435769+(_e<<6)+(_e>>2)|0}var OrderedSet=function(_e){function et(tt){return tt==null?emptyOrderedSet():isOrderedSet(tt)?tt:emptyOrderedSet().withMutations(function(nt){var rt=SetCollection(tt);assertNotInfinite(rt.size),rt.forEach(function(at){return nt.add(at)})})}return _e&&(et.__proto__=_e),et.prototype=Object.create(_e&&_e.prototype),et.prototype.constructor=et,et.of=function(){return this(arguments)},et.fromKeys=function(nt){return this(KeyedCollection(nt).keySeq())},et.prototype.toString=function(){return this.__toString("OrderedSet {","}")},et}(Set$3);OrderedSet.isOrderedSet=isOrderedSet;var OrderedSetPrototype=OrderedSet.prototype;OrderedSetPrototype[IS_ORDERED_SYMBOL]=!0;OrderedSetPrototype.zip=IndexedCollectionPrototype.zip;OrderedSetPrototype.zipWith=IndexedCollectionPrototype.zipWith;OrderedSetPrototype.zipAll=IndexedCollectionPrototype.zipAll;OrderedSetPrototype.__empty=emptyOrderedSet;OrderedSetPrototype.__make=makeOrderedSet;function makeOrderedSet(_e,et){var tt=Object.create(OrderedSetPrototype);return tt.size=_e?_e.size:0,tt._map=_e,tt.__ownerID=et,tt}var EMPTY_ORDERED_SET;function emptyOrderedSet(){return EMPTY_ORDERED_SET||(EMPTY_ORDERED_SET=makeOrderedSet(emptyOrderedMap()))}var PairSorting={LeftThenRight:-1,RightThenLeft:1};function throwOnInvalidDefaultValues(_e){if(isRecord(_e))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(isImmutable(_e))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(_e===null||typeof _e!="object")throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}var Record=function(et,tt){var nt;throwOnInvalidDefaultValues(et);var rt=function(ot){var st=this;if(ot instanceof rt)return ot;if(!(this instanceof rt))return new rt(ot);if(!nt){nt=!0;var ct=Object.keys(et),ut=at._indices={};at._name=tt,at._keys=ct,at._defaultValues=et;for(var dt=0;dt2?[]:void 0,{"":_e})}function fromJSWith(_e,et,tt,nt,rt,at){if(typeof tt!="string"&&!isImmutable(tt)&&(isArrayLike$2(tt)||hasIterator(tt)||isPlainObject$2(tt))){if(~_e.indexOf(tt))throw new TypeError("Cannot convert circular structure to Immutable");_e.push(tt),rt&&nt!==""&&rt.push(nt);var it=et.call(at,nt,Seq(tt).map(function(ot,st){return fromJSWith(_e,et,ot,st,rt,tt)}),rt&&rt.slice());return _e.pop(),rt&&rt.pop(),it}return tt}function defaultConverter(_e,et){return isIndexed(et)?et.toList():isKeyed(et)?et.toMap():et.toSet()}var version="4.3.4",Immutable={version,Collection,Iterable:Collection,Seq,Map:Map$3,OrderedMap,List:List$1,Stack:Stack$4,Set:Set$3,OrderedSet,PairSorting,Record,Range,Repeat,is:is$2,fromJS,hash,isImmutable,isCollection,isKeyed,isIndexed,isAssociative,isOrdered,isValueObject,isPlainObject:isPlainObject$2,isSeq,isList,isMap:isMap$1,isOrderedMap,isStack,isSet:isSet$1,isOrderedSet,isRecord,get:get$2,getIn:getIn$1,has:has$1,hasIn:hasIn$1$1,merge:merge$2,mergeDeep:mergeDeep$1,mergeWith,mergeDeepWith:mergeDeepWith$1,remove,removeIn,set:set$2,setIn:setIn$1,update:update$1,updateIn:updateIn$1},Iterable=Collection;const immutable_es=Object.freeze(Object.defineProperty({__proto__:null,Collection,Iterable,List:List$1,Map:Map$3,OrderedMap,OrderedSet,PairSorting,Range,Record,Repeat,Seq,Set:Set$3,Stack:Stack$4,default:Immutable,fromJS,get:get$2,getIn:getIn$1,has:has$1,hasIn:hasIn$1$1,hash,is:is$2,isAssociative,isCollection,isImmutable,isIndexed,isKeyed,isList,isMap:isMap$1,isOrdered,isOrderedMap,isOrderedSet,isPlainObject:isPlainObject$2,isRecord,isSeq,isSet:isSet$1,isStack,isValueObject,merge:merge$2,mergeDeep:mergeDeep$1,mergeDeepWith:mergeDeepWith$1,mergeWith,remove,removeIn,set:set$2,setIn:setIn$1,update:update$1,updateIn:updateIn$1,version},Symbol.toStringTag,{value:"Module"}));let getRandomValues;const rnds8=new Uint8Array(16);function rng(){if(!getRandomValues&&(getRandomValues=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!getRandomValues))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}const byteToHex=[];for(let _e=0;_e<256;++_e)byteToHex.push((_e+256).toString(16).slice(1));function unsafeStringify(_e,et=0){return byteToHex[_e[et+0]]+byteToHex[_e[et+1]]+byteToHex[_e[et+2]]+byteToHex[_e[et+3]]+"-"+byteToHex[_e[et+4]]+byteToHex[_e[et+5]]+"-"+byteToHex[_e[et+6]]+byteToHex[_e[et+7]]+"-"+byteToHex[_e[et+8]]+byteToHex[_e[et+9]]+"-"+byteToHex[_e[et+10]]+byteToHex[_e[et+11]]+byteToHex[_e[et+12]]+byteToHex[_e[et+13]]+byteToHex[_e[et+14]]+byteToHex[_e[et+15]]}const randomUUID=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),native={randomUUID};function v4(_e,et,tt){if(native.randomUUID&&!et&&!_e)return native.randomUUID();_e=_e||{};const nt=_e.random||(_e.rng||rng)();if(nt[6]=nt[6]&15|64,nt[8]=nt[8]&63|128,et){tt=tt||0;for(let rt=0;rt<16;++rt)et[tt+rt]=nt[rt];return et}return unsafeStringify(nt)}function bind$a(_e,et){return function(){return _e.apply(et,arguments)}}const{toString:toString$l}=Object.prototype,{getPrototypeOf:getPrototypeOf$3}=Object,kindOf=(_e=>et=>{const tt=toString$l.call(et);return _e[tt]||(_e[tt]=tt.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=_e=>(_e=_e.toLowerCase(),et=>kindOf(et)===_e),typeOfTest=_e=>et=>typeof et===_e,{isArray:isArray$c}=Array,isUndefined=typeOfTest("undefined");function isBuffer$3(_e){return _e!==null&&!isUndefined(_e)&&_e.constructor!==null&&!isUndefined(_e.constructor)&&isFunction$2(_e.constructor.isBuffer)&&_e.constructor.isBuffer(_e)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(_e){let et;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?et=ArrayBuffer.isView(_e):et=_e&&_e.buffer&&isArrayBuffer(_e.buffer),et}const isString$1=typeOfTest("string"),isFunction$2=typeOfTest("function"),isNumber$1=typeOfTest("number"),isObject$l=_e=>_e!==null&&typeof _e=="object",isBoolean$1=_e=>_e===!0||_e===!1,isPlainObject$1=_e=>{if(kindOf(_e)!=="object")return!1;const et=getPrototypeOf$3(_e);return(et===null||et===Object.prototype||Object.getPrototypeOf(et)===null)&&!(Symbol.toStringTag in _e)&&!(Symbol.iterator in _e)},isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=_e=>isObject$l(_e)&&isFunction$2(_e.pipe),isFormData=_e=>{let et;return _e&&(typeof FormData=="function"&&_e instanceof FormData||isFunction$2(_e.append)&&((et=kindOf(_e))==="formdata"||et==="object"&&isFunction$2(_e.toString)&&_e.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),trim$6=_e=>_e.trim?_e.trim():_e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach$1(_e,et,{allOwnKeys:tt=!1}={}){if(_e===null||typeof _e>"u")return;let nt,rt;if(typeof _e!="object"&&(_e=[_e]),isArray$c(_e))for(nt=0,rt=_e.length;nt0;)if(rt=tt[nt],et===rt.toLowerCase())return rt;return null}const _global=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),isContextDefined=_e=>!isUndefined(_e)&&_e!==_global;function merge$1(){const{caseless:_e}=isContextDefined(this)&&this||{},et={},tt=(nt,rt)=>{const at=_e&&findKey(et,rt)||rt;isPlainObject$1(et[at])&&isPlainObject$1(nt)?et[at]=merge$1(et[at],nt):isPlainObject$1(nt)?et[at]=merge$1({},nt):isArray$c(nt)?et[at]=nt.slice():et[at]=nt};for(let nt=0,rt=arguments.length;nt(forEach$1(et,(rt,at)=>{tt&&isFunction$2(rt)?_e[at]=bind$a(rt,tt):_e[at]=rt},{allOwnKeys:nt}),_e),stripBOM=_e=>(_e.charCodeAt(0)===65279&&(_e=_e.slice(1)),_e),inherits$1=(_e,et,tt,nt)=>{_e.prototype=Object.create(et.prototype,nt),_e.prototype.constructor=_e,Object.defineProperty(_e,"super",{value:et.prototype}),tt&&Object.assign(_e.prototype,tt)},toFlatObject=(_e,et,tt,nt)=>{let rt,at,it;const ot={};if(et=et||{},_e==null)return et;do{for(rt=Object.getOwnPropertyNames(_e),at=rt.length;at-- >0;)it=rt[at],(!nt||nt(it,_e,et))&&!ot[it]&&(et[it]=_e[it],ot[it]=!0);_e=tt!==!1&&getPrototypeOf$3(_e)}while(_e&&(!tt||tt(_e,et))&&_e!==Object.prototype);return et},endsWith=(_e,et,tt)=>{_e=String(_e),(tt===void 0||tt>_e.length)&&(tt=_e.length),tt-=et.length;const nt=_e.indexOf(et,tt);return nt!==-1&&nt===tt},toArray$1=_e=>{if(!_e)return null;if(isArray$c(_e))return _e;let et=_e.length;if(!isNumber$1(et))return null;const tt=new Array(et);for(;et-- >0;)tt[et]=_e[et];return tt},isTypedArray$3=(_e=>et=>_e&&et instanceof _e)(typeof Uint8Array<"u"&&getPrototypeOf$3(Uint8Array)),forEachEntry=(_e,et)=>{const nt=(_e&&_e[Symbol.iterator]).call(_e);let rt;for(;(rt=nt.next())&&!rt.done;){const at=rt.value;et.call(_e,at[0],at[1])}},matchAll=(_e,et)=>{let tt;const nt=[];for(;(tt=_e.exec(et))!==null;)nt.push(tt);return nt},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=_e=>_e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(tt,nt,rt){return nt.toUpperCase()+rt}),hasOwnProperty$7=(({hasOwnProperty:_e})=>(et,tt)=>_e.call(et,tt))(Object.prototype),isRegExp$3=kindOfTest("RegExp"),reduceDescriptors=(_e,et)=>{const tt=Object.getOwnPropertyDescriptors(_e),nt={};forEach$1(tt,(rt,at)=>{let it;(it=et(rt,at,_e))!==!1&&(nt[at]=it||rt)}),Object.defineProperties(_e,nt)},freezeMethods=_e=>{reduceDescriptors(_e,(et,tt)=>{if(isFunction$2(_e)&&["arguments","caller","callee"].indexOf(tt)!==-1)return!1;const nt=_e[tt];if(isFunction$2(nt)){if(et.enumerable=!1,"writable"in et){et.writable=!1;return}et.set||(et.set=()=>{throw Error("Can not rewrite read-only method '"+tt+"'")})}})},toObjectSet=(_e,et)=>{const tt={},nt=rt=>{rt.forEach(at=>{tt[at]=!0})};return isArray$c(_e)?nt(_e):nt(String(_e).split(et)),tt},noop$5=()=>{},toFiniteNumber=(_e,et)=>(_e=+_e,Number.isFinite(_e)?_e:et),ALPHA="abcdefghijklmnopqrstuvwxyz",DIGIT="0123456789",ALPHABET={DIGIT,ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT},generateString=(_e=16,et=ALPHABET.ALPHA_DIGIT)=>{let tt="";const{length:nt}=et;for(;_e--;)tt+=et[Math.random()*nt|0];return tt};function isSpecCompliantForm(_e){return!!(_e&&isFunction$2(_e.append)&&_e[Symbol.toStringTag]==="FormData"&&_e[Symbol.iterator])}const toJSONObject=_e=>{const et=new Array(10),tt=(nt,rt)=>{if(isObject$l(nt)){if(et.indexOf(nt)>=0)return;if(!("toJSON"in nt)){et[rt]=nt;const at=isArray$c(nt)?[]:{};return forEach$1(nt,(it,ot)=>{const st=tt(it,rt+1);!isUndefined(st)&&(at[ot]=st)}),et[rt]=void 0,at}}return nt};return tt(_e,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable$1=_e=>_e&&(isObject$l(_e)||isFunction$2(_e))&&isFunction$2(_e.then)&&isFunction$2(_e.catch),utils={isArray:isArray$c,isArrayBuffer,isBuffer:isBuffer$3,isFormData,isArrayBufferView,isString:isString$1,isNumber:isNumber$1,isBoolean:isBoolean$1,isObject:isObject$l,isPlainObject:isPlainObject$1,isUndefined,isDate,isFile,isBlob,isRegExp:isRegExp$3,isFunction:isFunction$2,isStream,isURLSearchParams,isTypedArray:isTypedArray$3,isFileList,forEach:forEach$1,merge:merge$1,extend,trim:trim$6,stripBOM,inherits:inherits$1,toFlatObject,kindOf,kindOfTest,endsWith,toArray:toArray$1,forEachEntry,matchAll,isHTMLForm,hasOwnProperty:hasOwnProperty$7,hasOwnProp:hasOwnProperty$7,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop:noop$5,toFiniteNumber,findKey,global:_global,isContextDefined,ALPHABET,generateString,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable:isThenable$1};function AxiosError$1(_e,et,tt,nt,rt){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=_e,this.name="AxiosError",et&&(this.code=et),tt&&(this.config=tt),nt&&(this.request=nt),rt&&(this.response=rt)}utils.inherits(AxiosError$1,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const prototype$1=AxiosError$1.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(_e=>{descriptors[_e]={value:_e}});Object.defineProperties(AxiosError$1,descriptors);Object.defineProperty(prototype$1,"isAxiosError",{value:!0});AxiosError$1.from=(_e,et,tt,nt,rt,at)=>{const it=Object.create(prototype$1);return utils.toFlatObject(_e,it,function(st){return st!==Error.prototype},ot=>ot!=="isAxiosError"),AxiosError$1.call(it,_e.message,et,tt,nt,rt),it.cause=_e,it.name=_e.name,at&&Object.assign(it,at),it};const httpAdapter=null;function isVisitable(_e){return utils.isPlainObject(_e)||utils.isArray(_e)}function removeBrackets(_e){return utils.endsWith(_e,"[]")?_e.slice(0,-2):_e}function renderKey(_e,et,tt){return _e?_e.concat(et).map(function(rt,at){return rt=removeBrackets(rt),!tt&&at?"["+rt+"]":rt}).join(tt?".":""):et}function isFlatArray(_e){return utils.isArray(_e)&&!_e.some(isVisitable)}const predicates=utils.toFlatObject(utils,{},null,function(et){return/^is[A-Z]/.test(et)});function toFormData$1(_e,et,tt){if(!utils.isObject(_e))throw new TypeError("target must be an object");et=et||new FormData,tt=utils.toFlatObject(tt,{metaTokens:!0,dots:!1,indexes:!1},!1,function(ht,Et){return!utils.isUndefined(Et[ht])});const nt=tt.metaTokens,rt=tt.visitor||ut,at=tt.dots,it=tt.indexes,st=(tt.Blob||typeof Blob<"u"&&Blob)&&utils.isSpecCompliantForm(et);if(!utils.isFunction(rt))throw new TypeError("visitor must be a function");function ct(mt){if(mt===null)return"";if(utils.isDate(mt))return mt.toISOString();if(!st&&utils.isBlob(mt))throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");return utils.isArrayBuffer(mt)||utils.isTypedArray(mt)?st&&typeof Blob=="function"?new Blob([mt]):Buffer.from(mt):mt}function ut(mt,ht,Et){let yt=mt;if(mt&&!Et&&typeof mt=="object"){if(utils.endsWith(ht,"{}"))ht=nt?ht:ht.slice(0,-2),mt=JSON.stringify(mt);else if(utils.isArray(mt)&&isFlatArray(mt)||(utils.isFileList(mt)||utils.endsWith(ht,"[]"))&&(yt=utils.toArray(mt)))return ht=removeBrackets(ht),yt.forEach(function(gt,St){!(utils.isUndefined(gt)||gt===null)&&et.append(it===!0?renderKey([ht],St,at):it===null?ht:ht+"[]",ct(gt))}),!1}return isVisitable(mt)?!0:(et.append(renderKey(Et,ht,at),ct(mt)),!1)}const dt=[],ft=Object.assign(predicates,{defaultVisitor:ut,convertValue:ct,isVisitable});function pt(mt,ht){if(!utils.isUndefined(mt)){if(dt.indexOf(mt)!==-1)throw Error("Circular reference detected in "+ht.join("."));dt.push(mt),utils.forEach(mt,function(yt,vt){(!(utils.isUndefined(yt)||yt===null)&&rt.call(et,yt,utils.isString(vt)?vt.trim():vt,ht,ft))===!0&&pt(yt,ht?ht.concat(vt):[vt])}),dt.pop()}}if(!utils.isObject(_e))throw new TypeError("data must be an object");return pt(_e),et}function encode$3(_e){const et={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(_e).replace(/[!'()~]|%20|%00/g,function(nt){return et[nt]})}function AxiosURLSearchParams(_e,et){this._pairs=[],_e&&toFormData$1(_e,this,et)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function(et,tt){this._pairs.push([et,tt])};prototype.toString=function(et){const tt=et?function(nt){return et.call(this,nt,encode$3)}:encode$3;return this._pairs.map(function(rt){return tt(rt[0])+"="+tt(rt[1])},"").join("&")};function encode$2(_e){return encodeURIComponent(_e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(_e,et,tt){if(!et)return _e;const nt=tt&&tt.encode||encode$2,rt=tt&&tt.serialize;let at;if(rt?at=rt(et,tt):at=utils.isURLSearchParams(et)?et.toString():new AxiosURLSearchParams(et,tt).toString(nt),at){const it=_e.indexOf("#");it!==-1&&(_e=_e.slice(0,it)),_e+=(_e.indexOf("?")===-1?"?":"&")+at}return _e}class InterceptorManager{constructor(){this.handlers=[]}use(et,tt,nt){return this.handlers.push({fulfilled:et,rejected:tt,synchronous:nt?nt.synchronous:!1,runWhen:nt?nt.runWhen:null}),this.handlers.length-1}eject(et){this.handlers[et]&&(this.handlers[et]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(et){utils.forEach(this.handlers,function(nt){nt!==null&&et(nt)})}}const InterceptorManager$1=InterceptorManager,transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,isStandardBrowserEnv=(()=>{let _e;return typeof navigator<"u"&&((_e=navigator.product)==="ReactNative"||_e==="NativeScript"||_e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),isStandardBrowserWebWorkerEnv=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},isStandardBrowserEnv,isStandardBrowserWebWorkerEnv,protocols:["http","https","file","blob","url","data"]};function toURLEncodedForm(_e,et){return toFormData$1(_e,new platform$1.classes.URLSearchParams,Object.assign({visitor:function(tt,nt,rt,at){return platform$1.isNode&&utils.isBuffer(tt)?(this.append(nt,tt.toString("base64")),!1):at.defaultVisitor.apply(this,arguments)}},et))}function parsePropPath(_e){return utils.matchAll(/\w+|\[(\w*)]/g,_e).map(et=>et[0]==="[]"?"":et[1]||et[0])}function arrayToObject(_e){const et={},tt=Object.keys(_e);let nt;const rt=tt.length;let at;for(nt=0;nt=tt.length;return it=!it&&utils.isArray(rt)?rt.length:it,st?(utils.hasOwnProp(rt,it)?rt[it]=[rt[it],nt]:rt[it]=nt,!ot):((!rt[it]||!utils.isObject(rt[it]))&&(rt[it]=[]),et(tt,nt,rt[it],at)&&utils.isArray(rt[it])&&(rt[it]=arrayToObject(rt[it])),!ot)}if(utils.isFormData(_e)&&utils.isFunction(_e.entries)){const tt={};return utils.forEachEntry(_e,(nt,rt)=>{et(parsePropPath(nt),rt,tt,0)}),tt}return null}function stringifySafely(_e,et,tt){if(utils.isString(_e))try{return(et||JSON.parse)(_e),utils.trim(_e)}catch(nt){if(nt.name!=="SyntaxError")throw nt}return(tt||JSON.stringify)(_e)}const defaults={transitional:transitionalDefaults,adapter:platform$1.isNode?"http":"xhr",transformRequest:[function(et,tt){const nt=tt.getContentType()||"",rt=nt.indexOf("application/json")>-1,at=utils.isObject(et);if(at&&utils.isHTMLForm(et)&&(et=new FormData(et)),utils.isFormData(et))return rt&&rt?JSON.stringify(formDataToJSON(et)):et;if(utils.isArrayBuffer(et)||utils.isBuffer(et)||utils.isStream(et)||utils.isFile(et)||utils.isBlob(et))return et;if(utils.isArrayBufferView(et))return et.buffer;if(utils.isURLSearchParams(et))return tt.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),et.toString();let ot;if(at){if(nt.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(et,this.formSerializer).toString();if((ot=utils.isFileList(et))||nt.indexOf("multipart/form-data")>-1){const st=this.env&&this.env.FormData;return toFormData$1(ot?{"files[]":et}:et,st&&new st,this.formSerializer)}}return at||rt?(tt.setContentType("application/json",!1),stringifySafely(et)):et}],transformResponse:[function(et){const tt=this.transitional||defaults.transitional,nt=tt&&tt.forcedJSONParsing,rt=this.responseType==="json";if(et&&utils.isString(et)&&(nt&&!this.responseType||rt)){const it=!(tt&&tt.silentJSONParsing)&&rt;try{return JSON.parse(et)}catch(ot){if(it)throw ot.name==="SyntaxError"?AxiosError$1.from(ot,AxiosError$1.ERR_BAD_RESPONSE,this,null,this.response):ot}}return et}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform$1.classes.FormData,Blob:platform$1.classes.Blob},validateStatus:function(et){return et>=200&&et<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils.forEach(["delete","get","head","post","put","patch"],_e=>{defaults.headers[_e]={}});const defaults$1=defaults,ignoreDuplicateOf=utils.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=_e=>{const et={};let tt,nt,rt;return _e&&_e.split(` `).forEach(function(it){rt=it.indexOf(":"),tt=it.substring(0,rt).trim().toLowerCase(),nt=it.substring(rt+1).trim(),!(!tt||et[tt]&&ignoreDuplicateOf[tt])&&(tt==="set-cookie"?et[tt]?et[tt].push(nt):et[tt]=[nt]:et[tt]=et[tt]?et[tt]+", "+nt:nt)}),et},$internals=Symbol("internals");function normalizeHeader$2(_e){return _e&&String(_e).trim().toLowerCase()}function normalizeValue(_e){return _e===!1||_e==null?_e:utils.isArray(_e)?_e.map(normalizeValue):String(_e)}function parseTokens(_e){const et=Object.create(null),tt=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let nt;for(;nt=tt.exec(_e);)et[nt[1]]=nt[2];return et}const isValidHeaderName=_e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(_e.trim());function matchHeaderValue(_e,et,tt,nt,rt){if(utils.isFunction(nt))return nt.call(this,et,tt);if(rt&&(et=tt),!!utils.isString(et)){if(utils.isString(nt))return et.indexOf(nt)!==-1;if(utils.isRegExp(nt))return nt.test(et)}}function formatHeader(_e){return _e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(et,tt,nt)=>tt.toUpperCase()+nt)}function buildAccessors(_e,et){const tt=utils.toCamelCase(" "+et);["get","set","has"].forEach(nt=>{Object.defineProperty(_e,nt+tt,{value:function(rt,at,it){return this[nt].call(this,et,rt,at,it)},configurable:!0})})}let AxiosHeaders$1=class{constructor(et){et&&this.set(et)}set(et,tt,nt){const rt=this;function at(ot,st,ct){const ut=normalizeHeader$2(st);if(!ut)throw new Error("header name must be a non-empty string");const dt=utils.findKey(rt,ut);(!dt||rt[dt]===void 0||ct===!0||ct===void 0&&rt[dt]!==!1)&&(rt[dt||st]=normalizeValue(ot))}const it=(ot,st)=>utils.forEach(ot,(ct,ut)=>at(ct,ut,st));return utils.isPlainObject(et)||et instanceof this.constructor?it(et,tt):utils.isString(et)&&(et=et.trim())&&!isValidHeaderName(et)?it(parseHeaders(et),tt):et!=null&&at(tt,et,nt),this}get(et,tt){if(et=normalizeHeader$2(et),et){const nt=utils.findKey(this,et);if(nt){const rt=this[nt];if(!tt)return rt;if(tt===!0)return parseTokens(rt);if(utils.isFunction(tt))return tt.call(this,rt,nt);if(utils.isRegExp(tt))return tt.exec(rt);throw new TypeError("parser must be boolean|regexp|function")}}}has(et,tt){if(et=normalizeHeader$2(et),et){const nt=utils.findKey(this,et);return!!(nt&&this[nt]!==void 0&&(!tt||matchHeaderValue(this,this[nt],nt,tt)))}return!1}delete(et,tt){const nt=this;let rt=!1;function at(it){if(it=normalizeHeader$2(it),it){const ot=utils.findKey(nt,it);ot&&(!tt||matchHeaderValue(nt,nt[ot],ot,tt))&&(delete nt[ot],rt=!0)}}return utils.isArray(et)?et.forEach(at):at(et),rt}clear(et){const tt=Object.keys(this);let nt=tt.length,rt=!1;for(;nt--;){const at=tt[nt];(!et||matchHeaderValue(this,this[at],at,et,!0))&&(delete this[at],rt=!0)}return rt}normalize(et){const tt=this,nt={};return utils.forEach(this,(rt,at)=>{const it=utils.findKey(nt,at);if(it){tt[it]=normalizeValue(rt),delete tt[at];return}const ot=et?formatHeader(at):String(at).trim();ot!==at&&delete tt[at],tt[ot]=normalizeValue(rt),nt[ot]=!0}),this}concat(...et){return this.constructor.concat(this,...et)}toJSON(et){const tt=Object.create(null);return utils.forEach(this,(nt,rt)=>{nt!=null&&nt!==!1&&(tt[rt]=et&&utils.isArray(nt)?nt.join(", "):nt)}),tt}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([et,tt])=>et+": "+tt).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(et){return et instanceof this?et:new this(et)}static concat(et,...tt){const nt=new this(et);return tt.forEach(rt=>nt.set(rt)),nt}static accessor(et){const nt=(this[$internals]=this[$internals]={accessors:{}}).accessors,rt=this.prototype;function at(it){const ot=normalizeHeader$2(it);nt[ot]||(buildAccessors(rt,it),nt[ot]=!0)}return utils.isArray(et)?et.forEach(at):at(et),this}};AxiosHeaders$1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils.reduceDescriptors(AxiosHeaders$1.prototype,({value:_e},et)=>{let tt=et[0].toUpperCase()+et.slice(1);return{get:()=>_e,set(nt){this[tt]=nt}}});utils.freezeMethods(AxiosHeaders$1);const AxiosHeaders$2=AxiosHeaders$1;function transformData(_e,et){const tt=this||defaults$1,nt=et||tt,rt=AxiosHeaders$2.from(nt.headers);let at=nt.data;return utils.forEach(_e,function(ot){at=ot.call(tt,at,rt.normalize(),et?et.status:void 0)}),rt.normalize(),at}function isCancel$2(_e){return!!(_e&&_e.__CANCEL__)}function CanceledError$1(_e,et,tt){AxiosError$1.call(this,_e??"canceled",AxiosError$1.ERR_CANCELED,et,tt),this.name="CanceledError"}utils.inherits(CanceledError$1,AxiosError$1,{__CANCEL__:!0});function settle(_e,et,tt){const nt=tt.config.validateStatus;!tt.status||!nt||nt(tt.status)?_e(tt):et(new AxiosError$1("Request failed with status code "+tt.status,[AxiosError$1.ERR_BAD_REQUEST,AxiosError$1.ERR_BAD_RESPONSE][Math.floor(tt.status/100)-4],tt.config,tt.request,tt))}const cookies=platform$1.isStandardBrowserEnv?function(){return{write:function(tt,nt,rt,at,it,ot){const st=[];st.push(tt+"="+encodeURIComponent(nt)),utils.isNumber(rt)&&st.push("expires="+new Date(rt).toGMTString()),utils.isString(at)&&st.push("path="+at),utils.isString(it)&&st.push("domain="+it),ot===!0&&st.push("secure"),document.cookie=st.join("; ")},read:function(tt){const nt=document.cookie.match(new RegExp("(^|;\\s*)("+tt+")=([^;]*)"));return nt?decodeURIComponent(nt[3]):null},remove:function(tt){this.write(tt,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function isAbsoluteURL(_e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(_e)}function combineURLs(_e,et){return et?_e.replace(/\/+$/,"")+"/"+et.replace(/^\/+/,""):_e}function buildFullPath(_e,et){return _e&&!isAbsoluteURL(et)?combineURLs(_e,et):et}const isURLSameOrigin=platform$1.isStandardBrowserEnv?function(){const et=/(msie|trident)/i.test(navigator.userAgent),tt=document.createElement("a");let nt;function rt(at){let it=at;return et&&(tt.setAttribute("href",it),it=tt.href),tt.setAttribute("href",it),{href:tt.href,protocol:tt.protocol?tt.protocol.replace(/:$/,""):"",host:tt.host,search:tt.search?tt.search.replace(/^\?/,""):"",hash:tt.hash?tt.hash.replace(/^#/,""):"",hostname:tt.hostname,port:tt.port,pathname:tt.pathname.charAt(0)==="/"?tt.pathname:"/"+tt.pathname}}return nt=rt(window.location.href),function(it){const ot=utils.isString(it)?rt(it):it;return ot.protocol===nt.protocol&&ot.host===nt.host}}():function(){return function(){return!0}}();function parseProtocol(_e){const et=/^([-+\w]{1,25})(:?\/\/|:)/.exec(_e);return et&&et[1]||""}function speedometer(_e,et){_e=_e||10;const tt=new Array(_e),nt=new Array(_e);let rt=0,at=0,it;return et=et!==void 0?et:1e3,function(st){const ct=Date.now(),ut=nt[at];it||(it=ct),tt[rt]=st,nt[rt]=ct;let dt=at,ft=0;for(;dt!==rt;)ft+=tt[dt++],dt=dt%_e;if(rt=(rt+1)%_e,rt===at&&(at=(at+1)%_e),ct-it{const at=rt.loaded,it=rt.lengthComputable?rt.total:void 0,ot=at-tt,st=nt(ot),ct=at<=it;tt=at;const ut={loaded:at,total:it,progress:it?at/it:void 0,bytes:ot,rate:st||void 0,estimated:st&&it&&ct?(it-at)/st:void 0,event:rt};ut[et?"download":"upload"]=!0,_e(ut)}}const isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(_e){return new Promise(function(tt,nt){let rt=_e.data;const at=AxiosHeaders$2.from(_e.headers).normalize(),it=_e.responseType;let ot;function st(){_e.cancelToken&&_e.cancelToken.unsubscribe(ot),_e.signal&&_e.signal.removeEventListener("abort",ot)}utils.isFormData(rt)&&(platform$1.isStandardBrowserEnv||platform$1.isStandardBrowserWebWorkerEnv?at.setContentType(!1):at.setContentType("multipart/form-data;",!1));let ct=new XMLHttpRequest;if(_e.auth){const pt=_e.auth.username||"",mt=_e.auth.password?unescape(encodeURIComponent(_e.auth.password)):"";at.set("Authorization","Basic "+btoa(pt+":"+mt))}const ut=buildFullPath(_e.baseURL,_e.url);ct.open(_e.method.toUpperCase(),buildURL(ut,_e.params,_e.paramsSerializer),!0),ct.timeout=_e.timeout;function dt(){if(!ct)return;const pt=AxiosHeaders$2.from("getAllResponseHeaders"in ct&&ct.getAllResponseHeaders()),ht={data:!it||it==="text"||it==="json"?ct.responseText:ct.response,status:ct.status,statusText:ct.statusText,headers:pt,config:_e,request:ct};settle(function(yt){tt(yt),st()},function(yt){nt(yt),st()},ht),ct=null}if("onloadend"in ct?ct.onloadend=dt:ct.onreadystatechange=function(){!ct||ct.readyState!==4||ct.status===0&&!(ct.responseURL&&ct.responseURL.indexOf("file:")===0)||setTimeout(dt)},ct.onabort=function(){ct&&(nt(new AxiosError$1("Request aborted",AxiosError$1.ECONNABORTED,_e,ct)),ct=null)},ct.onerror=function(){nt(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,_e,ct)),ct=null},ct.ontimeout=function(){let mt=_e.timeout?"timeout of "+_e.timeout+"ms exceeded":"timeout exceeded";const ht=_e.transitional||transitionalDefaults;_e.timeoutErrorMessage&&(mt=_e.timeoutErrorMessage),nt(new AxiosError$1(mt,ht.clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,_e,ct)),ct=null},platform$1.isStandardBrowserEnv){const pt=(_e.withCredentials||isURLSameOrigin(ut))&&_e.xsrfCookieName&&cookies.read(_e.xsrfCookieName);pt&&at.set(_e.xsrfHeaderName,pt)}rt===void 0&&at.setContentType(null),"setRequestHeader"in ct&&utils.forEach(at.toJSON(),function(mt,ht){ct.setRequestHeader(ht,mt)}),utils.isUndefined(_e.withCredentials)||(ct.withCredentials=!!_e.withCredentials),it&&it!=="json"&&(ct.responseType=_e.responseType),typeof _e.onDownloadProgress=="function"&&ct.addEventListener("progress",progressEventReducer(_e.onDownloadProgress,!0)),typeof _e.onUploadProgress=="function"&&ct.upload&&ct.upload.addEventListener("progress",progressEventReducer(_e.onUploadProgress)),(_e.cancelToken||_e.signal)&&(ot=pt=>{ct&&(nt(!pt||pt.type?new CanceledError$1(null,_e,ct):pt),ct.abort(),ct=null)},_e.cancelToken&&_e.cancelToken.subscribe(ot),_e.signal&&(_e.signal.aborted?ot():_e.signal.addEventListener("abort",ot)));const ft=parseProtocol(ut);if(ft&&platform$1.protocols.indexOf(ft)===-1){nt(new AxiosError$1("Unsupported protocol "+ft+":",AxiosError$1.ERR_BAD_REQUEST,_e));return}ct.send(rt||null)})},knownAdapters={http:httpAdapter,xhr:xhrAdapter};utils.forEach(knownAdapters,(_e,et)=>{if(_e){try{Object.defineProperty(_e,"name",{value:et})}catch{}Object.defineProperty(_e,"adapterName",{value:et})}});const adapters={getAdapter:_e=>{_e=utils.isArray(_e)?_e:[_e];const{length:et}=_e;let tt,nt;for(let rt=0;rt_e instanceof AxiosHeaders$2?_e.toJSON():_e;function mergeConfig$1(_e,et){et=et||{};const tt={};function nt(ct,ut,dt){return utils.isPlainObject(ct)&&utils.isPlainObject(ut)?utils.merge.call({caseless:dt},ct,ut):utils.isPlainObject(ut)?utils.merge({},ut):utils.isArray(ut)?ut.slice():ut}function rt(ct,ut,dt){if(utils.isUndefined(ut)){if(!utils.isUndefined(ct))return nt(void 0,ct,dt)}else return nt(ct,ut,dt)}function at(ct,ut){if(!utils.isUndefined(ut))return nt(void 0,ut)}function it(ct,ut){if(utils.isUndefined(ut)){if(!utils.isUndefined(ct))return nt(void 0,ct)}else return nt(void 0,ut)}function ot(ct,ut,dt){if(dt in et)return nt(ct,ut);if(dt in _e)return nt(void 0,ct)}const st={url:at,method:at,data:at,baseURL:it,transformRequest:it,transformResponse:it,paramsSerializer:it,timeout:it,timeoutMessage:it,withCredentials:it,adapter:it,responseType:it,xsrfCookieName:it,xsrfHeaderName:it,onUploadProgress:it,onDownloadProgress:it,decompress:it,maxContentLength:it,maxBodyLength:it,beforeRedirect:it,transport:it,httpAgent:it,httpsAgent:it,cancelToken:it,socketPath:it,responseEncoding:it,validateStatus:ot,headers:(ct,ut)=>rt(headersToObject(ct),headersToObject(ut),!0)};return utils.forEach(Object.keys(Object.assign({},_e,et)),function(ut){const dt=st[ut]||rt,ft=dt(_e[ut],et[ut],ut);utils.isUndefined(ft)&&dt!==ot||(tt[ut]=ft)}),tt}const VERSION$1="1.5.0",validators$1={};["object","boolean","number","function","string","symbol"].forEach((_e,et)=>{validators$1[_e]=function(nt){return typeof nt===_e||"a"+(et<1?"n ":" ")+_e}});const deprecatedWarnings={};validators$1.transitional=function(et,tt,nt){function rt(at,it){return"[Axios v"+VERSION$1+"] Transitional option '"+at+"'"+it+(nt?". "+nt:"")}return(at,it,ot)=>{if(et===!1)throw new AxiosError$1(rt(it," has been removed"+(tt?" in "+tt:"")),AxiosError$1.ERR_DEPRECATED);return tt&&!deprecatedWarnings[it]&&(deprecatedWarnings[it]=!0,console.warn(rt(it," has been deprecated since v"+tt+" and will be removed in the near future"))),et?et(at,it,ot):!0}};function assertOptions(_e,et,tt){if(typeof _e!="object")throw new AxiosError$1("options must be an object",AxiosError$1.ERR_BAD_OPTION_VALUE);const nt=Object.keys(_e);let rt=nt.length;for(;rt-- >0;){const at=nt[rt],it=et[at];if(it){const ot=_e[at],st=ot===void 0||it(ot,at,_e);if(st!==!0)throw new AxiosError$1("option "+at+" must be "+st,AxiosError$1.ERR_BAD_OPTION_VALUE);continue}if(tt!==!0)throw new AxiosError$1("Unknown option "+at,AxiosError$1.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;let Axios$1=class{constructor(et){this.defaults=et,this.interceptors={request:new InterceptorManager$1,response:new InterceptorManager$1}}request(et,tt){typeof et=="string"?(tt=tt||{},tt.url=et):tt=et||{},tt=mergeConfig$1(this.defaults,tt);const{transitional:nt,paramsSerializer:rt,headers:at}=tt;nt!==void 0&&validator.assertOptions(nt,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),rt!=null&&(utils.isFunction(rt)?tt.paramsSerializer={serialize:rt}:validator.assertOptions(rt,{encode:validators.function,serialize:validators.function},!0)),tt.method=(tt.method||this.defaults.method||"get").toLowerCase();let it=at&&utils.merge(at.common,at[tt.method]);at&&utils.forEach(["delete","get","head","post","put","patch","common"],mt=>{delete at[mt]}),tt.headers=AxiosHeaders$2.concat(it,at);const ot=[];let st=!0;this.interceptors.request.forEach(function(ht){typeof ht.runWhen=="function"&&ht.runWhen(tt)===!1||(st=st&&ht.synchronous,ot.unshift(ht.fulfilled,ht.rejected))});const ct=[];this.interceptors.response.forEach(function(ht){ct.push(ht.fulfilled,ht.rejected)});let ut,dt=0,ft;if(!st){const mt=[dispatchRequest.bind(this),void 0];for(mt.unshift.apply(mt,ot),mt.push.apply(mt,ct),ft=mt.length,ut=Promise.resolve(tt);dt{if(!nt._listeners)return;let at=nt._listeners.length;for(;at-- >0;)nt._listeners[at](rt);nt._listeners=null}),this.promise.then=rt=>{let at;const it=new Promise(ot=>{nt.subscribe(ot),at=ot}).then(rt);return it.cancel=function(){nt.unsubscribe(at)},it},et(function(at,it,ot){nt.reason||(nt.reason=new CanceledError$1(at,it,ot),tt(nt.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(et){if(this.reason){et(this.reason);return}this._listeners?this._listeners.push(et):this._listeners=[et]}unsubscribe(et){if(!this._listeners)return;const tt=this._listeners.indexOf(et);tt!==-1&&this._listeners.splice(tt,1)}static source(){let et;return{token:new Dr(function(rt){et=rt}),cancel:et}}};const CancelToken$3=CancelToken$2;function spread$1(_e){return function(tt){return _e.apply(null,tt)}}function isAxiosError$1(_e){return utils.isObject(_e)&&_e.isAxiosError===!0}const HttpStatusCode$1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode$1).forEach(([_e,et])=>{HttpStatusCode$1[et]=_e});const HttpStatusCode$2=HttpStatusCode$1;function createInstance(_e){const et=new Axios$2(_e),tt=bind$a(Axios$2.prototype.request,et);return utils.extend(tt,Axios$2.prototype,et,{allOwnKeys:!0}),utils.extend(tt,et,null,{allOwnKeys:!0}),tt.create=function(rt){return createInstance(mergeConfig$1(_e,rt))},tt}const axios=createInstance(defaults$1);axios.Axios=Axios$2;axios.CanceledError=CanceledError$1;axios.CancelToken=CancelToken$3;axios.isCancel=isCancel$2;axios.VERSION=VERSION$1;axios.toFormData=toFormData$1;axios.AxiosError=AxiosError$1;axios.Cancel=axios.CanceledError;axios.all=function(et){return Promise.all(et)};axios.spread=spread$1;axios.isAxiosError=isAxiosError$1;axios.mergeConfig=mergeConfig$1;axios.AxiosHeaders=AxiosHeaders$2;axios.formToJSON=_e=>formDataToJSON(utils.isHTMLForm(_e)?new FormData(_e):_e);axios.getAdapter=adapters.getAdapter;axios.HttpStatusCode=HttpStatusCode$2;axios.default=axios;const axios$1=axios,{Axios,AxiosError,CanceledError,isCancel:isCancel$1,CancelToken:CancelToken$1,VERSION,all,Cancel,isAxiosError,spread,toFormData,AxiosHeaders,HttpStatusCode,formToJSON,getAdapter,mergeConfig}=axios$1;var COMPATIBLE_ENCODING_PATTERN=/^utf-?8|ascii|utf-?16-?le|ucs-?2|base-?64|latin-?1$/i,WS_TRIM_PATTERN=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,WS_CHAR_PATTERN=/\s|\uFEFF|\xA0/,WS_FOLD_PATTERN=/\r?\n[\x20\x09]+/g,DELIMITER_PATTERN=/[;,"]/,WS_DELIMITER_PATTERN=/[;,"]|\s/,TOKEN_PATTERN=/^[!#$%&'*+\-\.^_`|~\da-zA-Z]+$/,STATE={IDLE:1,URI:2,ATTR:4};function trim$5(_e){return _e.replace(WS_TRIM_PATTERN,"")}function hasWhitespace(_e){return WS_CHAR_PATTERN.test(_e)}function skipWhitespace(_e,et){for(;hasWhitespace(_e[et]);)et++;return et}function needsQuotes(_e){return WS_DELIMITER_PATTERN.test(_e)||!TOKEN_PATTERN.test(_e)}function shallowCompareObjects(_e,et){return Object.keys(_e).length===Object.keys(et).length&&Object.keys(_e).every(tt=>tt in et&&_e[tt]===et[tt])}let Link$1=class lr{constructor(et){this.refs=[],et&&this.parse(et)}rel(et){for(var tt=[],nt=et.toLowerCase(),rt=0;rtshallowCompareObjects(tt,et))||this.refs.push(et),this}has(et,tt){et=et.toLowerCase();for(var nt=0;nt",at);if(ot===-1)throw new Error("Expected end of URI delimiter at offset "+at);it={uri:et.slice(at+1,ot)},at=ot,nt=STATE.URI}else throw new Error('Unexpected character "'+et[at]+'" at offset '+at);at++}else if(nt===STATE.URI)if(hasWhitespace(et[at])){at++;continue}else if(et[at]===";")nt=STATE.ATTR,at++;else if(et[at]===",")nt=STATE.IDLE,at++;else throw new Error('Unexpected character "'+et[at]+'" at offset '+at);else if(nt===STATE.ATTR){if(et[at]===";"||hasWhitespace(et[at])){at++;continue}var ot=et.indexOf("=",at);ot===-1&&(ot=et.indexOf(";",at)),ot===-1&&(ot=et.length);var st=trim$5(et.slice(at,ot)).toLowerCase(),ct="";if(at=ot+1,at=skipWhitespace(et,at),et[at]==='"')for(at++;at"),et.push(tt);return et.join(", ")}};Link$1.isCompatibleEncoding=function(_e){return COMPATIBLE_ENCODING_PATTERN.test(_e)};Link$1.parse=function(_e,et){return new Link$1().parse(_e,et)};Link$1.isSingleOccurenceAttr=function(_e){return _e==="rel"||_e==="type"||_e==="media"||_e==="title"||_e==="title*"};Link$1.isTokenAttr=function(_e){return _e==="rel"||_e==="type"||_e==="anchor"};Link$1.escapeQuotes=function(_e){return _e.replace(/"/g,'\\"')};Link$1.expandRelations=function(_e){var et=_e.rel.split(" ");return et.map(function(tt){var nt=Object.assign({},_e);return nt.rel=tt,nt})};Link$1.parseExtendedValue=function(_e){var et=/([^']+)?(?:'([^']*)')?(.+)/.exec(_e);return{language:et[2].toLowerCase(),encoding:Link$1.isCompatibleEncoding(et[1])?null:et[1].toLowerCase(),value:Link$1.isCompatibleEncoding(et[1])?decodeURIComponent(et[3]):et[3]}};Link$1.formatExtendedAttribute=function(_e,et){var tt=(et.encoding||"utf-8").toUpperCase(),nt=et.language||"en",rt="";return Buffer.isBuffer(et.value)&&Link$1.isCompatibleEncoding(tt)?rt=et.value.toString(tt):Buffer.isBuffer(et.value)?rt=et.value.toString("hex").replace(/[0-9a-f]{2}/gi,"%$1"):rt=encodeURIComponent(et.value),_e+"="+tt+"'"+nt+"'"+rt};Link$1.formatAttribute=function(_e,et){return Array.isArray(et)?et.map(tt=>Link$1.formatAttribute(_e,tt)).join("; "):_e[_e.length-1]==="*"||typeof et!="string"?Link$1.formatExtendedAttribute(_e,et):(Link$1.isTokenAttr(_e)?et=needsQuotes(et)?'"'+Link$1.escapeQuotes(et)+'"':Link$1.escapeQuotes(et):needsQuotes(et)&&(et=encodeURIComponent(et),et=et.replace(/%20/g," ").replace(/%2C/g,",").replace(/%3B/g,";"),et='"'+et+'"'),_e+"="+et)};var link=Link$1;const LinkHeader=getDefaultExportFromCjs$1(link),getLinks=_e=>{var et;return new LinkHeader((et=_e.headers)==null?void 0:et.link)},getNextLink=_e=>{var et;return(et=getLinks(_e).refs.find(tt=>tt.rel==="next"))==null?void 0:et.uri},getPrevLink=_e=>{var et;return(et=getLinks(_e).refs.find(tt=>tt.rel==="prev"))==null?void 0:et.uri},getToken=(_e,et)=>et==="app"?getAppToken(_e):getAccessToken(_e),maybeParseJSON=_e=>{try{return JSON.parse(_e)}catch{return _e}},getAuthBaseURL=createSelector([(_e,et)=>{var tt;return et?(tt=selectAccount(_e,et))==null?void 0:tt.url:void 0},(_e,et)=>_e.auth.me],(_e,et)=>{const tt=parseBaseURL(_e)||parseBaseURL(et);return tt!==window.location.origin?tt:""}),baseClient=(_e,et="")=>{const tt={};return _e&&(tt.Authorization=`Bearer ${_e}`),axios$1.create({baseURL:isURL(BACKEND_URL)?BACKEND_URL:et,headers:tt,transformResponse:[maybeParseJSON]})},staticClient=axios$1.create({baseURL:FE_SUBDIRECTORY,transformResponse:[maybeParseJSON]}),api=(_e,et="user")=>{const tt=_e(),nt=getToken(tt,et),rt=tt.me,at=rt?getAuthBaseURL(tt,rt):"";return baseClient(nt,at)},ENTITIES_IMPORT="ENTITIES_IMPORT",ENTITIES_DELETE="ENTITIES_DELETE",ENTITIES_DISMISS="ENTITIES_DISMISS",ENTITIES_INCREMENT="ENTITIES_INCREMENT",ENTITIES_FETCH_REQUEST="ENTITIES_FETCH_REQUEST",ENTITIES_FETCH_SUCCESS="ENTITIES_FETCH_SUCCESS",ENTITIES_FETCH_FAIL="ENTITIES_FETCH_FAIL",ENTITIES_INVALIDATE_LIST="ENTITIES_INVALIDATE_LIST",ENTITIES_TRANSACTION="ENTITIES_TRANSACTION";function importEntities$1(_e,et,tt,nt){return{type:ENTITIES_IMPORT,entityType:et,entities:_e,listKey:tt,pos:nt}}function deleteEntities$1(_e,et,tt={}){return{type:ENTITIES_DELETE,ids:_e,entityType:et,opts:tt}}function dismissEntities$1(_e,et,tt){return{type:ENTITIES_DISMISS,ids:_e,entityType:et,listKey:tt}}function entitiesFetchRequest(_e,et){return{type:ENTITIES_FETCH_REQUEST,entityType:_e,listKey:et}}function entitiesFetchSuccess(_e,et,tt,nt,rt,at=!1){return{type:ENTITIES_FETCH_SUCCESS,entityType:et,entities:_e,listKey:tt,pos:nt,newState:rt,overwrite:at}}function entitiesFetchFail(_e,et,tt){return{type:ENTITIES_FETCH_FAIL,entityType:_e,listKey:et,error:tt}}function invalidateEntityList$1(_e,et){return{type:ENTITIES_INVALIDATE_LIST,entityType:_e,listKey:et}}function entitiesTransaction(_e){return{type:ENTITIES_TRANSACTION,transaction:_e}}var Entities=(_e=>(_e.ACCOUNTS="Accounts",_e.GROUPS="Groups",_e.GROUP_MEMBERSHIPS="GroupMemberships",_e.GROUP_MUTES="GroupMutes",_e.GROUP_RELATIONSHIPS="GroupRelationships",_e.GROUP_TAGS="GroupTags",_e.PATRON_USERS="PatronUsers",_e.RELATIONSHIPS="Relationships",_e.STATUSES="Statuses",_e))(Entities||{});const debug$1=typeof process=="object"&&process.env&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(..._e)=>console.error("SEMVER",..._e):()=>{};var debug_1=debug$1;const SEMVER_SPEC_VERSION="2.0.0",MAX_LENGTH$1=256,MAX_SAFE_INTEGER$4=Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH=16,MAX_SAFE_BUILD_LENGTH=MAX_LENGTH$1-6,RELEASE_TYPES=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var constants$2={MAX_LENGTH:MAX_LENGTH$1,MAX_SAFE_COMPONENT_LENGTH,MAX_SAFE_BUILD_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER$4,RELEASE_TYPES,SEMVER_SPEC_VERSION,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},re$3={exports:{}};(function(_e,et){const{MAX_SAFE_COMPONENT_LENGTH:tt,MAX_SAFE_BUILD_LENGTH:nt,MAX_LENGTH:rt}=constants$2,at=debug_1;et=_e.exports={};const it=et.re=[],ot=et.safeRe=[],st=et.src=[],ct=et.t={};let ut=0;const dt="[a-zA-Z0-9-]",ft=[["\\s",1],["\\d",rt],[dt,nt]],pt=ht=>{for(const[Et,yt]of ft)ht=ht.split(`${Et}*`).join(`${Et}{0,${yt}}`).split(`${Et}+`).join(`${Et}{1,${yt}}`);return ht},mt=(ht,Et,yt)=>{const vt=pt(Et),gt=ut++;at(ht,gt,Et),ct[ht]=gt,st[gt]=Et,it[gt]=new RegExp(Et,yt?"g":void 0),ot[gt]=new RegExp(vt,yt?"g":void 0)};mt("NUMERICIDENTIFIER","0|[1-9]\\d*"),mt("NUMERICIDENTIFIERLOOSE","\\d+"),mt("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${dt}*`),mt("MAINVERSION",`(${st[ct.NUMERICIDENTIFIER]})\\.(${st[ct.NUMERICIDENTIFIER]})\\.(${st[ct.NUMERICIDENTIFIER]})`),mt("MAINVERSIONLOOSE",`(${st[ct.NUMERICIDENTIFIERLOOSE]})\\.(${st[ct.NUMERICIDENTIFIERLOOSE]})\\.(${st[ct.NUMERICIDENTIFIERLOOSE]})`),mt("PRERELEASEIDENTIFIER",`(?:${st[ct.NUMERICIDENTIFIER]}|${st[ct.NONNUMERICIDENTIFIER]})`),mt("PRERELEASEIDENTIFIERLOOSE",`(?:${st[ct.NUMERICIDENTIFIERLOOSE]}|${st[ct.NONNUMERICIDENTIFIER]})`),mt("PRERELEASE",`(?:-(${st[ct.PRERELEASEIDENTIFIER]}(?:\\.${st[ct.PRERELEASEIDENTIFIER]})*))`),mt("PRERELEASELOOSE",`(?:-?(${st[ct.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${st[ct.PRERELEASEIDENTIFIERLOOSE]})*))`),mt("BUILDIDENTIFIER",`${dt}+`),mt("BUILD",`(?:\\+(${st[ct.BUILDIDENTIFIER]}(?:\\.${st[ct.BUILDIDENTIFIER]})*))`),mt("FULLPLAIN",`v?${st[ct.MAINVERSION]}${st[ct.PRERELEASE]}?${st[ct.BUILD]}?`),mt("FULL",`^${st[ct.FULLPLAIN]}$`),mt("LOOSEPLAIN",`[v=\\s]*${st[ct.MAINVERSIONLOOSE]}${st[ct.PRERELEASELOOSE]}?${st[ct.BUILD]}?`),mt("LOOSE",`^${st[ct.LOOSEPLAIN]}$`),mt("GTLT","((?:<|>)?=?)"),mt("XRANGEIDENTIFIERLOOSE",`${st[ct.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),mt("XRANGEIDENTIFIER",`${st[ct.NUMERICIDENTIFIER]}|x|X|\\*`),mt("XRANGEPLAIN",`[v=\\s]*(${st[ct.XRANGEIDENTIFIER]})(?:\\.(${st[ct.XRANGEIDENTIFIER]})(?:\\.(${st[ct.XRANGEIDENTIFIER]})(?:${st[ct.PRERELEASE]})?${st[ct.BUILD]}?)?)?`),mt("XRANGEPLAINLOOSE",`[v=\\s]*(${st[ct.XRANGEIDENTIFIERLOOSE]})(?:\\.(${st[ct.XRANGEIDENTIFIERLOOSE]})(?:\\.(${st[ct.XRANGEIDENTIFIERLOOSE]})(?:${st[ct.PRERELEASELOOSE]})?${st[ct.BUILD]}?)?)?`),mt("XRANGE",`^${st[ct.GTLT]}\\s*${st[ct.XRANGEPLAIN]}$`),mt("XRANGELOOSE",`^${st[ct.GTLT]}\\s*${st[ct.XRANGEPLAINLOOSE]}$`),mt("COERCE",`(^|[^\\d])(\\d{1,${tt}})(?:\\.(\\d{1,${tt}}))?(?:\\.(\\d{1,${tt}}))?(?:$|[^\\d])`),mt("COERCERTL",st[ct.COERCE],!0),mt("LONETILDE","(?:~>?)"),mt("TILDETRIM",`(\\s*)${st[ct.LONETILDE]}\\s+`,!0),et.tildeTrimReplace="$1~",mt("TILDE",`^${st[ct.LONETILDE]}${st[ct.XRANGEPLAIN]}$`),mt("TILDELOOSE",`^${st[ct.LONETILDE]}${st[ct.XRANGEPLAINLOOSE]}$`),mt("LONECARET","(?:\\^)"),mt("CARETTRIM",`(\\s*)${st[ct.LONECARET]}\\s+`,!0),et.caretTrimReplace="$1^",mt("CARET",`^${st[ct.LONECARET]}${st[ct.XRANGEPLAIN]}$`),mt("CARETLOOSE",`^${st[ct.LONECARET]}${st[ct.XRANGEPLAINLOOSE]}$`),mt("COMPARATORLOOSE",`^${st[ct.GTLT]}\\s*(${st[ct.LOOSEPLAIN]})$|^$`),mt("COMPARATOR",`^${st[ct.GTLT]}\\s*(${st[ct.FULLPLAIN]})$|^$`),mt("COMPARATORTRIM",`(\\s*)${st[ct.GTLT]}\\s*(${st[ct.LOOSEPLAIN]}|${st[ct.XRANGEPLAIN]})`,!0),et.comparatorTrimReplace="$1$2$3",mt("HYPHENRANGE",`^\\s*(${st[ct.XRANGEPLAIN]})\\s+-\\s+(${st[ct.XRANGEPLAIN]})\\s*$`),mt("HYPHENRANGELOOSE",`^\\s*(${st[ct.XRANGEPLAINLOOSE]})\\s+-\\s+(${st[ct.XRANGEPLAINLOOSE]})\\s*$`),mt("STAR","(<|>)?=?\\s*\\*"),mt("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),mt("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(re$3,re$3.exports);var reExports=re$3.exports;const looseOption=Object.freeze({loose:!0}),emptyOpts=Object.freeze({}),parseOptions$1=_e=>_e?typeof _e!="object"?looseOption:_e:emptyOpts;var parseOptions_1=parseOptions$1;const numeric=/^[0-9]+$/,compareIdentifiers$1=(_e,et)=>{const tt=numeric.test(_e),nt=numeric.test(et);return tt&&nt&&(_e=+_e,et=+et),_e===et?0:tt&&!nt?-1:nt&&!tt?1:_ecompareIdentifiers$1(et,_e);var identifiers={compareIdentifiers:compareIdentifiers$1,rcompareIdentifiers};const debug=debug_1,{MAX_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER$3}=constants$2,{safeRe:re$2,t:t$2}=reExports,parseOptions=parseOptions_1,{compareIdentifiers}=identifiers;let SemVer$3=class Yn{constructor(et,tt){if(tt=parseOptions(tt),et instanceof Yn){if(et.loose===!!tt.loose&&et.includePrerelease===!!tt.includePrerelease)return et;et=et.version}else if(typeof et!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof et}".`);if(et.length>MAX_LENGTH)throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);debug("SemVer",et,tt),this.options=tt,this.loose=!!tt.loose,this.includePrerelease=!!tt.includePrerelease;const nt=et.trim().match(tt.loose?re$2[t$2.LOOSE]:re$2[t$2.FULL]);if(!nt)throw new TypeError(`Invalid Version: ${et}`);if(this.raw=et,this.major=+nt[1],this.minor=+nt[2],this.patch=+nt[3],this.major>MAX_SAFE_INTEGER$3||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER$3||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER$3||this.patch<0)throw new TypeError("Invalid patch version");nt[4]?this.prerelease=nt[4].split(".").map(rt=>{if(/^[0-9]+$/.test(rt)){const at=+rt;if(at>=0&&at=0;)typeof this.prerelease[at]=="number"&&(this.prerelease[at]++,at=-2);if(at===-1){if(tt===this.prerelease.join(".")&&nt===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(rt)}}if(tt){let at=[tt,rt];nt===!1&&(at=[tt]),compareIdentifiers(this.prerelease[0],tt)===0?isNaN(this.prerelease[1])&&(this.prerelease=at):this.prerelease=at}break}default:throw new Error(`invalid increment argument: ${et}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var semver=SemVer$3;const SemVer$2=semver,parse$3=(_e,et,tt=!1)=>{if(_e instanceof SemVer$2)return _e;try{return new SemVer$2(_e,et)}catch(nt){if(!tt)return null;throw nt}};var parse_1=parse$3;const semverParse=getDefaultExportFromCjs$1(parse_1),SemVer$1=semver,parse$2=parse_1,{safeRe:re$1,t:t$1}=reExports,coerce$1=(_e,et)=>{if(_e instanceof SemVer$1)return _e;if(typeof _e=="number"&&(_e=String(_e)),typeof _e!="string")return null;et=et||{};let tt=null;if(!et.rtl)tt=_e.match(re$1[t$1.COERCE]);else{let nt;for(;(nt=re$1[t$1.COERCERTL].exec(_e))&&(!tt||tt.index+tt[0].length!==_e.length);)(!tt||nt.index+nt[0].length!==tt.index+tt[0].length)&&(tt=nt),re$1[t$1.COERCERTL].lastIndex=nt.index+nt[1].length+nt[2].length;re$1[t$1.COERCERTL].lastIndex=-1}return tt===null?null:parse$2(`${tt[2]}.${tt[3]||"0"}.${tt[4]||"0"}`,et)};var coerce_1=coerce$1;const semverCoerce=getDefaultExportFromCjs$1(coerce_1),SemVer=semver,compare$3=(_e,et,tt)=>new SemVer(_e,tt).compare(new SemVer(et,tt));var compare_1=compare$3;const compare$2=compare_1,gte=(_e,et,tt)=>compare$2(_e,et,tt)>=0;var gte_1=gte;const gte$1=getDefaultExportFromCjs$1(gte_1),compare$1=compare_1,lt=(_e,et,tt)=>compare$1(_e,et,tt)<0;var lt_1=lt;const lt$1=getDefaultExportFromCjs$1(lt_1),custom$1=(_e,et={})=>{if(NODE_ENV==="test")return et;const tt=Object.assign({}),nt=`../../custom/${_e}.json`;return tt[nt]?tt[nt]:et},overrides=custom$1("features"),any=_e=>_e.some(Boolean),FIREFISH="Firefish",DITTO="Ditto",FRIENDICA="Friendica",MASTODON="Mastodon",MITRA="Mitra",PIXELFED="Pixelfed",PLEROMA="Pleroma",TAKAHE="Takahe",TRUTHSOCIAL="TruthSocial",WILDEBEEST="Wildebeest",AKKOMA="Akkoma",GLITCH="glitch",REBASED="soapbox",SPIRIT="spirit",UNRELEASED="unreleased",getInstanceFeatures=_e=>{const et=parseVersion(_e.version),tt=_e.pleroma.metadata.features,nt=_e.pleroma.metadata.federation;return{accountAliases:any([et.software===PLEROMA,et.software===AKKOMA]),accountByUsername:any([et.software===PLEROMA,et.software===AKKOMA]),accountCreation:et.software!==TRUTHSOCIAL,accountEndorsements:any([et.software===PLEROMA&>e$1(et.version,"2.4.50"),et.software===AKKOMA]),accountLocation:any([et.software===PLEROMA&&et.build===REBASED&>e$1(et.version,"2.4.50"),et.software===AKKOMA,et.software===TRUTHSOCIAL]),accountLookup:any([et.software===FIREFISH,et.software===MASTODON&>e$1(et.compatVersion,"3.4.0"),et.software===PLEROMA&>e$1(et.version,"2.4.50"),et.software===TAKAHE&>e$1(et.version,"0.6.1"),et.software===AKKOMA,et.software===TRUTHSOCIAL,et.software===DITTO]),accountMoving:any([et.software===PLEROMA&>e$1(et.version,"2.4.50"),et.software===AKKOMA]),accountNotifies:any([et.software===MASTODON&>e$1(et.compatVersion,"3.3.0"),et.software===PLEROMA&>e$1(et.version,"2.4.50"),et.software===AKKOMA,et.software===TRUTHSOCIAL]),accountSubscriptions:[et.software===PLEROMA&>e$1(et.version,"1.0.0"),et.software===AKKOMA],accountWebsite:et.software===TRUTHSOCIAL,adminFE:[et.software===PLEROMA,et.software===AKKOMA],announcements:any([et.software===MASTODON&>e$1(et.compatVersion,"3.1.0"),et.software===PLEROMA&>e$1(et.version,"2.2.49"),et.software===AKKOMA]),announcementsReactions:et.software===MASTODON&>e$1(et.compatVersion,"3.1.0"),backups:any([et.software===PLEROMA,et.software===AKKOMA]),birthdays:et.software===PLEROMA&&et.build===REBASED&>e$1(et.version,"2.4.50"),blockersVisible:tt.includes("blockers_visible"),bookmarks:any([et.software===FIREFISH,et.software===FRIENDICA,et.software===MASTODON&>e$1(et.compatVersion,"3.1.0"),et.software===PLEROMA&>e$1(et.version,"0.9.9"),et.software===AKKOMA,et.software===PIXELFED]),bots:any([et.software===MASTODON,et.software===PLEROMA,et.software===AKKOMA]),carousel:et.software===TRUTHSOCIAL,carouselSeen:et.software===TRUTHSOCIAL,chatAcceptance:et.software===TRUTHSOCIAL,chatEmojiReactions:et.software===TRUTHSOCIAL,chats:any([et.software===TRUTHSOCIAL,tt.includes("pleroma_chat_messages")]),chatsDelete:any([et.software===TRUTHSOCIAL,et.build===REBASED]),chatsExpiration:et.software===TRUTHSOCIAL,chatsMedia:et.software!==TRUTHSOCIAL||et.build===UNRELEASED,chatsReadReceipts:et.software===TRUTHSOCIAL,chatsSearch:et.software===TRUTHSOCIAL,chatsV2:any([et.software===TRUTHSOCIAL,et.software===PLEROMA&>e$1(et.version,"2.3.0")]),chatsWithFollowers:et.software===TRUTHSOCIAL,conversations:any([et.software===FIREFISH,et.software===FRIENDICA,et.software===MASTODON&>e$1(et.compatVersion,"2.6.0"),et.software===PLEROMA&>e$1(et.version,"0.9.9"),et.software===AKKOMA,et.software===PIXELFED,et.software===TAKAHE]),customEmojiReacts:any([tt.includes("pleroma_custom_emoji_reactions"),tt.includes("custom_emoji_reactions"),et.software===PLEROMA&>e$1(et.version,"2.5.50"),et.software===AKKOMA]),directTimeline:any([et.software===FRIENDICA,et.software===MASTODON&<$1(et.compatVersion,"3.0.0"),et.software===PLEROMA&>e$1(et.version,"0.9.9"),et.software===AKKOMA]),dislikes:et.software===FRIENDICA&>e$1(et.version,"2023.3.0"),editProfile:any([et.software===FIREFISH,et.software===FRIENDICA,et.software===MASTODON,et.software===MITRA,et.software===PIXELFED,et.software===PLEROMA,et.software===TAKAHE&>e$1(et.version,"0.7.0"),et.software===AKKOMA,et.software===TRUTHSOCIAL,et.software===WILDEBEEST]),editStatuses:any([et.software===FRIENDICA&>e$1(et.version,"2022.12.0"),et.software===MASTODON&>e$1(et.version,"3.5.0"),tt.includes("editing")]),emailList:tt.includes("email_list"),embeds:any([et.software===MASTODON,et.software===TRUTHSOCIAL]),emojiReacts:any([et.software===PLEROMA&>e$1(et.version,"2.0.0"),et.software===AKKOMA]),emojiReactsNonRGI:any([et.software===PLEROMA&<$1(et.version,"2.2.49"),et.software===AKKOMA]),ethereumLogin:et.software===MITRA,events:tt.includes("events"),explicitAddressing:any([et.software===PLEROMA&>e$1(et.version,"1.0.0"),et.software===AKKOMA&&et.build!==SPIRIT,et.software===TRUTHSOCIAL]),exportData:!0,exposableReactions:any([et.software===FIREFISH,et.software===FRIENDICA,et.software===MASTODON,et.software===TAKAHE&>e$1(et.version,"0.6.1"),et.software===TRUTHSOCIAL,tt.includes("exposable_reactions")]),familiarFollowers:any([et.software===MASTODON&>e$1(et.version,"3.5.0"),et.software===PLEROMA&>e$1(et.version,"2.5.51")&&et.build===REBASED,et.software===TAKAHE]),federating:nt.enabled,filters:any([et.software===MASTODON&<$1(et.compatVersion,"3.6.0"),et.software===PLEROMA,et.software===AKKOMA]),filtersExpiration:any([et.software===MASTODON,et.software===PLEROMA&>e$1(et.version,"2.3.0"),et.software===AKKOMA]),filtersV2:et.software===MASTODON&>e$1(et.compatVersion,"3.6.0"),focalPoint:et.software===MASTODON&>e$1(et.compatVersion,"2.3.0"),followHashtags:any([et.software===MASTODON&>e$1(et.compatVersion,"4.0.0"),et.software===AKKOMA]),followRequests:any([et.software===MASTODON,et.software===PLEROMA,et.software===AKKOMA]),followedHashtagsList:et.software===MASTODON&>e$1(et.compatVersion,"4.1.0"),frontendConfigurations:any([et.software===PLEROMA,et.software===AKKOMA]),groups:et.software===TRUTHSOCIAL,groupsAdminMax:et.software===TRUTHSOCIAL,groupsDiscovery:et.software===TRUTHSOCIAL,groupsKick:et.software!==TRUTHSOCIAL,groupsMuting:et.software===TRUTHSOCIAL,groupsPending:et.software===TRUTHSOCIAL,groupsPromoteToAdmin:et.software!==TRUTHSOCIAL,groupsSearch:et.software===TRUTHSOCIAL,groupsTags:et.software===TRUTHSOCIAL,groupsValidation:et.software===TRUTHSOCIAL,hideNetwork:any([et.software===PLEROMA,et.software===AKKOMA]),import:any([et.software===PLEROMA,et.software===AKKOMA]),importData:any([et.software===PLEROMA&>e$1(et.version,"2.2.0"),et.software===AKKOMA]),indefinitePollDuration:any([et.software===AKKOMA&&et.build===SPIRIT]),lists:any([et.software===FIREFISH,et.software===FRIENDICA,et.software===MASTODON&>e$1(et.compatVersion,"2.1.0"),et.software===PLEROMA&>e$1(et.version,"0.9.9"),et.software===AKKOMA]),localOnlyPrivacy:et.software===AKKOMA,logInWithUsername:any([et.software===PLEROMA,et.software===AKKOMA,et.software===TRUTHSOCIAL]),mastodonAdmin:any([et.software===MASTODON&>e$1(et.compatVersion,"2.9.1"),et.software===PLEROMA&&et.build===REBASED&>e$1(et.version,"2.4.50")]),media:!0,mediaV2:any([et.software===MASTODON&>e$1(et.compatVersion,"3.1.3"),et.software===WILDEBEEST]),muteStrangers:any([et.software===PLEROMA,et.software===AKKOMA]),mutesDuration:any([et.software===PLEROMA&>e$1(et.version,"2.3.0"),et.software===AKKOMA,et.software===MASTODON&>e$1(et.compatVersion,"3.3.0")]),nostrSign:et.software===DITTO,notes:any([et.software===MASTODON&>e$1(et.compatVersion,"3.2.0"),et.software===PLEROMA&>e$1(et.version,"2.4.50"),et.software===AKKOMA]),notificationsIncludeTypes:any([et.software===MASTODON&>e$1(et.compatVersion,"3.5.0"),et.software===PLEROMA&>e$1(et.version,"2.4.50"),et.software===TAKAHE&>e$1(et.version,"0.6.2"),et.software===AKKOMA]),paginatedContext:et.software===TRUTHSOCIAL,passwordRequirements:et.software===TRUTHSOCIAL,pleromaRemoteFollow:any([et.software===PLEROMA,et.software===AKKOMA]),polls:any([et.software===FIREFISH,et.software===MASTODON&>e$1(et.version,"2.8.0"),et.software===PLEROMA,et.software===AKKOMA,et.software===TRUTHSOCIAL]),privacyScopes:![TRUTHSOCIAL,DITTO].includes(et.software),profileDirectory:any([et.software===FRIENDICA,et.software===MASTODON&>e$1(et.compatVersion,"3.0.0"),tt.includes("profile_directory")]),profileFields:any([et.software===MASTODON,et.software===PLEROMA,et.software===AKKOMA]),publicTimeline:any([et.software===FIREFISH,et.software===FRIENDICA,et.software===MASTODON,et.software===PLEROMA,et.software===TAKAHE,et.software===AKKOMA,et.software===WILDEBEEST,et.software===DITTO]),quotePosts:any([et.software===FRIENDICA&>e$1(et.version,"2023.3.0"),et.software===PLEROMA&&[REBASED].includes(et.build)&>e$1(et.version,"2.4.50"),et.software===AKKOMA,tt.includes("quote_posting"),_e.feature_quote===!0]),remoteInteractions:any([et.software===PLEROMA&>e$1(et.version,"2.4.50"),et.software===AKKOMA]),removeFromFollowers:any([et.software===MASTODON&>e$1(et.compatVersion,"3.5.0"),et.software===PLEROMA&&et.build===REBASED&>e$1(et.version,"2.4.50"),et.software===AKKOMA]),reportChats:et.software===TRUTHSOCIAL,reportMultipleStatuses:et.software!==TRUTHSOCIAL,resetPassword:any([et.software===PLEROMA,et.software===AKKOMA]),richText:any([et.software===MASTODON&&et.build===GLITCH,et.software===PLEROMA,et.software===AKKOMA]),rssFeeds:any([et.software===MASTODON,et.software===PLEROMA,et.software===AKKOMA]),scheduledStatuses:any([et.software===FRIENDICA,et.software===MASTODON&>e$1(et.version,"2.7.0"),et.software===PLEROMA,et.software===AKKOMA]),searchFromAccount:any([et.software===MASTODON&>e$1(et.version,"2.8.0"),et.software===PLEROMA&>e$1(et.version,"1.0.0"),et.software===AKKOMA]),security:any([et.software===PLEROMA,et.software===AKKOMA,et.software===TRUTHSOCIAL]),sessions:any([et.software===PLEROMA,et.software===AKKOMA]),settingsStore:any([et.software===PLEROMA,et.software===AKKOMA,et.software===TRUTHSOCIAL]),spoilers:et.software!==TRUTHSOCIAL,suggestions:any([et.software===MASTODON&>e$1(et.compatVersion,"2.4.3"),et.software===TRUTHSOCIAL,tt.includes("v2_suggestions")]),suggestionsV2:any([et.software===FRIENDICA,et.software===MASTODON&>e$1(et.compatVersion,"3.4.0"),et.software===TRUTHSOCIAL,tt.includes("v2_suggestions")]),translations:any([tt.includes("translation"),tt.includes("akkoma:machine_translation")]),trendingStatuses:any([et.software===FRIENDICA&>e$1(et.version,"2022.12.0"),et.software===MASTODON&>e$1(et.compatVersion,"3.5.0")]),trendingTruths:et.software===TRUTHSOCIAL,trends:any([et.software===FRIENDICA&>e$1(et.version,"2022.12.0"),et.software===MASTODON&>e$1(et.compatVersion,"3.0.0"),et.software===TRUTHSOCIAL,et.software===DITTO]),truthPolicies:et.software===TRUTHSOCIAL,truthSuggestions:et.software===TRUTHSOCIAL,unrestrictedLists:any([et.software===PLEROMA,et.software===AKKOMA])}},getFeatures=createSelector([_e=>_e],_e=>{const et=getInstanceFeatures(_e);return Object.assign(et,overrides)}),parseVersion=_e=>{const tt=/^([\w+.-]*)(?: \(compatible; ([\w]*) (.*)\))?$/.exec(_e),nt=tt&&(tt[3]||tt[1]),rt=tt?semverParse(nt)||semverCoerce(nt,{loose:!0}):null,at=tt?semverParse(tt[1])||semverCoerce(tt[1]):null;return tt&&rt&&at?{build:rt.build[0],compatVersion:at.version,software:tt[2]||MASTODON,version:rt.version}:{build:null,compatVersion:"0.0.0",software:null,version:"0.0.0"}},vitePluginRequire_1697861817641_37912257="/packs/assets/header-missing-b2417070.png",vitePluginRequire_1697861817641_69752310="/packs/assets/avatar-missing-8cc248dd.png";/*! +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(et){return et instanceof this?et:new this(et)}static concat(et,...tt){const nt=new this(et);return tt.forEach(rt=>nt.set(rt)),nt}static accessor(et){const nt=(this[$internals]=this[$internals]={accessors:{}}).accessors,rt=this.prototype;function at(it){const ot=normalizeHeader$2(it);nt[ot]||(buildAccessors(rt,it),nt[ot]=!0)}return utils.isArray(et)?et.forEach(at):at(et),this}};AxiosHeaders$1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils.reduceDescriptors(AxiosHeaders$1.prototype,({value:_e},et)=>{let tt=et[0].toUpperCase()+et.slice(1);return{get:()=>_e,set(nt){this[tt]=nt}}});utils.freezeMethods(AxiosHeaders$1);const AxiosHeaders$2=AxiosHeaders$1;function transformData(_e,et){const tt=this||defaults$1,nt=et||tt,rt=AxiosHeaders$2.from(nt.headers);let at=nt.data;return utils.forEach(_e,function(ot){at=ot.call(tt,at,rt.normalize(),et?et.status:void 0)}),rt.normalize(),at}function isCancel$2(_e){return!!(_e&&_e.__CANCEL__)}function CanceledError$1(_e,et,tt){AxiosError$1.call(this,_e??"canceled",AxiosError$1.ERR_CANCELED,et,tt),this.name="CanceledError"}utils.inherits(CanceledError$1,AxiosError$1,{__CANCEL__:!0});function settle(_e,et,tt){const nt=tt.config.validateStatus;!tt.status||!nt||nt(tt.status)?_e(tt):et(new AxiosError$1("Request failed with status code "+tt.status,[AxiosError$1.ERR_BAD_REQUEST,AxiosError$1.ERR_BAD_RESPONSE][Math.floor(tt.status/100)-4],tt.config,tt.request,tt))}const cookies=platform$1.isStandardBrowserEnv?function(){return{write:function(tt,nt,rt,at,it,ot){const st=[];st.push(tt+"="+encodeURIComponent(nt)),utils.isNumber(rt)&&st.push("expires="+new Date(rt).toGMTString()),utils.isString(at)&&st.push("path="+at),utils.isString(it)&&st.push("domain="+it),ot===!0&&st.push("secure"),document.cookie=st.join("; ")},read:function(tt){const nt=document.cookie.match(new RegExp("(^|;\\s*)("+tt+")=([^;]*)"));return nt?decodeURIComponent(nt[3]):null},remove:function(tt){this.write(tt,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function isAbsoluteURL(_e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(_e)}function combineURLs(_e,et){return et?_e.replace(/\/+$/,"")+"/"+et.replace(/^\/+/,""):_e}function buildFullPath(_e,et){return _e&&!isAbsoluteURL(et)?combineURLs(_e,et):et}const isURLSameOrigin=platform$1.isStandardBrowserEnv?function(){const et=/(msie|trident)/i.test(navigator.userAgent),tt=document.createElement("a");let nt;function rt(at){let it=at;return et&&(tt.setAttribute("href",it),it=tt.href),tt.setAttribute("href",it),{href:tt.href,protocol:tt.protocol?tt.protocol.replace(/:$/,""):"",host:tt.host,search:tt.search?tt.search.replace(/^\?/,""):"",hash:tt.hash?tt.hash.replace(/^#/,""):"",hostname:tt.hostname,port:tt.port,pathname:tt.pathname.charAt(0)==="/"?tt.pathname:"/"+tt.pathname}}return nt=rt(window.location.href),function(it){const ot=utils.isString(it)?rt(it):it;return ot.protocol===nt.protocol&&ot.host===nt.host}}():function(){return function(){return!0}}();function parseProtocol(_e){const et=/^([-+\w]{1,25})(:?\/\/|:)/.exec(_e);return et&&et[1]||""}function speedometer(_e,et){_e=_e||10;const tt=new Array(_e),nt=new Array(_e);let rt=0,at=0,it;return et=et!==void 0?et:1e3,function(st){const ct=Date.now(),ut=nt[at];it||(it=ct),tt[rt]=st,nt[rt]=ct;let dt=at,ft=0;for(;dt!==rt;)ft+=tt[dt++],dt=dt%_e;if(rt=(rt+1)%_e,rt===at&&(at=(at+1)%_e),ct-it{const at=rt.loaded,it=rt.lengthComputable?rt.total:void 0,ot=at-tt,st=nt(ot),ct=at<=it;tt=at;const ut={loaded:at,total:it,progress:it?at/it:void 0,bytes:ot,rate:st||void 0,estimated:st&&it&&ct?(it-at)/st:void 0,event:rt};ut[et?"download":"upload"]=!0,_e(ut)}}const isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(_e){return new Promise(function(tt,nt){let rt=_e.data;const at=AxiosHeaders$2.from(_e.headers).normalize(),it=_e.responseType;let ot;function st(){_e.cancelToken&&_e.cancelToken.unsubscribe(ot),_e.signal&&_e.signal.removeEventListener("abort",ot)}utils.isFormData(rt)&&(platform$1.isStandardBrowserEnv||platform$1.isStandardBrowserWebWorkerEnv?at.setContentType(!1):at.setContentType("multipart/form-data;",!1));let ct=new XMLHttpRequest;if(_e.auth){const pt=_e.auth.username||"",mt=_e.auth.password?unescape(encodeURIComponent(_e.auth.password)):"";at.set("Authorization","Basic "+btoa(pt+":"+mt))}const ut=buildFullPath(_e.baseURL,_e.url);ct.open(_e.method.toUpperCase(),buildURL(ut,_e.params,_e.paramsSerializer),!0),ct.timeout=_e.timeout;function dt(){if(!ct)return;const pt=AxiosHeaders$2.from("getAllResponseHeaders"in ct&&ct.getAllResponseHeaders()),ht={data:!it||it==="text"||it==="json"?ct.responseText:ct.response,status:ct.status,statusText:ct.statusText,headers:pt,config:_e,request:ct};settle(function(yt){tt(yt),st()},function(yt){nt(yt),st()},ht),ct=null}if("onloadend"in ct?ct.onloadend=dt:ct.onreadystatechange=function(){!ct||ct.readyState!==4||ct.status===0&&!(ct.responseURL&&ct.responseURL.indexOf("file:")===0)||setTimeout(dt)},ct.onabort=function(){ct&&(nt(new AxiosError$1("Request aborted",AxiosError$1.ECONNABORTED,_e,ct)),ct=null)},ct.onerror=function(){nt(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,_e,ct)),ct=null},ct.ontimeout=function(){let mt=_e.timeout?"timeout of "+_e.timeout+"ms exceeded":"timeout exceeded";const ht=_e.transitional||transitionalDefaults;_e.timeoutErrorMessage&&(mt=_e.timeoutErrorMessage),nt(new AxiosError$1(mt,ht.clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,_e,ct)),ct=null},platform$1.isStandardBrowserEnv){const pt=(_e.withCredentials||isURLSameOrigin(ut))&&_e.xsrfCookieName&&cookies.read(_e.xsrfCookieName);pt&&at.set(_e.xsrfHeaderName,pt)}rt===void 0&&at.setContentType(null),"setRequestHeader"in ct&&utils.forEach(at.toJSON(),function(mt,ht){ct.setRequestHeader(ht,mt)}),utils.isUndefined(_e.withCredentials)||(ct.withCredentials=!!_e.withCredentials),it&&it!=="json"&&(ct.responseType=_e.responseType),typeof _e.onDownloadProgress=="function"&&ct.addEventListener("progress",progressEventReducer(_e.onDownloadProgress,!0)),typeof _e.onUploadProgress=="function"&&ct.upload&&ct.upload.addEventListener("progress",progressEventReducer(_e.onUploadProgress)),(_e.cancelToken||_e.signal)&&(ot=pt=>{ct&&(nt(!pt||pt.type?new CanceledError$1(null,_e,ct):pt),ct.abort(),ct=null)},_e.cancelToken&&_e.cancelToken.subscribe(ot),_e.signal&&(_e.signal.aborted?ot():_e.signal.addEventListener("abort",ot)));const ft=parseProtocol(ut);if(ft&&platform$1.protocols.indexOf(ft)===-1){nt(new AxiosError$1("Unsupported protocol "+ft+":",AxiosError$1.ERR_BAD_REQUEST,_e));return}ct.send(rt||null)})},knownAdapters={http:httpAdapter,xhr:xhrAdapter};utils.forEach(knownAdapters,(_e,et)=>{if(_e){try{Object.defineProperty(_e,"name",{value:et})}catch{}Object.defineProperty(_e,"adapterName",{value:et})}});const adapters={getAdapter:_e=>{_e=utils.isArray(_e)?_e:[_e];const{length:et}=_e;let tt,nt;for(let rt=0;rt_e instanceof AxiosHeaders$2?_e.toJSON():_e;function mergeConfig$1(_e,et){et=et||{};const tt={};function nt(ct,ut,dt){return utils.isPlainObject(ct)&&utils.isPlainObject(ut)?utils.merge.call({caseless:dt},ct,ut):utils.isPlainObject(ut)?utils.merge({},ut):utils.isArray(ut)?ut.slice():ut}function rt(ct,ut,dt){if(utils.isUndefined(ut)){if(!utils.isUndefined(ct))return nt(void 0,ct,dt)}else return nt(ct,ut,dt)}function at(ct,ut){if(!utils.isUndefined(ut))return nt(void 0,ut)}function it(ct,ut){if(utils.isUndefined(ut)){if(!utils.isUndefined(ct))return nt(void 0,ct)}else return nt(void 0,ut)}function ot(ct,ut,dt){if(dt in et)return nt(ct,ut);if(dt in _e)return nt(void 0,ct)}const st={url:at,method:at,data:at,baseURL:it,transformRequest:it,transformResponse:it,paramsSerializer:it,timeout:it,timeoutMessage:it,withCredentials:it,adapter:it,responseType:it,xsrfCookieName:it,xsrfHeaderName:it,onUploadProgress:it,onDownloadProgress:it,decompress:it,maxContentLength:it,maxBodyLength:it,beforeRedirect:it,transport:it,httpAgent:it,httpsAgent:it,cancelToken:it,socketPath:it,responseEncoding:it,validateStatus:ot,headers:(ct,ut)=>rt(headersToObject(ct),headersToObject(ut),!0)};return utils.forEach(Object.keys(Object.assign({},_e,et)),function(ut){const dt=st[ut]||rt,ft=dt(_e[ut],et[ut],ut);utils.isUndefined(ft)&&dt!==ot||(tt[ut]=ft)}),tt}const VERSION$1="1.5.0",validators$1={};["object","boolean","number","function","string","symbol"].forEach((_e,et)=>{validators$1[_e]=function(nt){return typeof nt===_e||"a"+(et<1?"n ":" ")+_e}});const deprecatedWarnings={};validators$1.transitional=function(et,tt,nt){function rt(at,it){return"[Axios v"+VERSION$1+"] Transitional option '"+at+"'"+it+(nt?". "+nt:"")}return(at,it,ot)=>{if(et===!1)throw new AxiosError$1(rt(it," has been removed"+(tt?" in "+tt:"")),AxiosError$1.ERR_DEPRECATED);return tt&&!deprecatedWarnings[it]&&(deprecatedWarnings[it]=!0,console.warn(rt(it," has been deprecated since v"+tt+" and will be removed in the near future"))),et?et(at,it,ot):!0}};function assertOptions(_e,et,tt){if(typeof _e!="object")throw new AxiosError$1("options must be an object",AxiosError$1.ERR_BAD_OPTION_VALUE);const nt=Object.keys(_e);let rt=nt.length;for(;rt-- >0;){const at=nt[rt],it=et[at];if(it){const ot=_e[at],st=ot===void 0||it(ot,at,_e);if(st!==!0)throw new AxiosError$1("option "+at+" must be "+st,AxiosError$1.ERR_BAD_OPTION_VALUE);continue}if(tt!==!0)throw new AxiosError$1("Unknown option "+at,AxiosError$1.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;let Axios$1=class{constructor(et){this.defaults=et,this.interceptors={request:new InterceptorManager$1,response:new InterceptorManager$1}}request(et,tt){typeof et=="string"?(tt=tt||{},tt.url=et):tt=et||{},tt=mergeConfig$1(this.defaults,tt);const{transitional:nt,paramsSerializer:rt,headers:at}=tt;nt!==void 0&&validator.assertOptions(nt,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),rt!=null&&(utils.isFunction(rt)?tt.paramsSerializer={serialize:rt}:validator.assertOptions(rt,{encode:validators.function,serialize:validators.function},!0)),tt.method=(tt.method||this.defaults.method||"get").toLowerCase();let it=at&&utils.merge(at.common,at[tt.method]);at&&utils.forEach(["delete","get","head","post","put","patch","common"],mt=>{delete at[mt]}),tt.headers=AxiosHeaders$2.concat(it,at);const ot=[];let st=!0;this.interceptors.request.forEach(function(ht){typeof ht.runWhen=="function"&&ht.runWhen(tt)===!1||(st=st&&ht.synchronous,ot.unshift(ht.fulfilled,ht.rejected))});const ct=[];this.interceptors.response.forEach(function(ht){ct.push(ht.fulfilled,ht.rejected)});let ut,dt=0,ft;if(!st){const mt=[dispatchRequest.bind(this),void 0];for(mt.unshift.apply(mt,ot),mt.push.apply(mt,ct),ft=mt.length,ut=Promise.resolve(tt);dt{if(!nt._listeners)return;let at=nt._listeners.length;for(;at-- >0;)nt._listeners[at](rt);nt._listeners=null}),this.promise.then=rt=>{let at;const it=new Promise(ot=>{nt.subscribe(ot),at=ot}).then(rt);return it.cancel=function(){nt.unsubscribe(at)},it},et(function(at,it,ot){nt.reason||(nt.reason=new CanceledError$1(at,it,ot),tt(nt.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(et){if(this.reason){et(this.reason);return}this._listeners?this._listeners.push(et):this._listeners=[et]}unsubscribe(et){if(!this._listeners)return;const tt=this._listeners.indexOf(et);tt!==-1&&this._listeners.splice(tt,1)}static source(){let et;return{token:new Dr(function(rt){et=rt}),cancel:et}}};const CancelToken$3=CancelToken$2;function spread$1(_e){return function(tt){return _e.apply(null,tt)}}function isAxiosError$1(_e){return utils.isObject(_e)&&_e.isAxiosError===!0}const HttpStatusCode$1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode$1).forEach(([_e,et])=>{HttpStatusCode$1[et]=_e});const HttpStatusCode$2=HttpStatusCode$1;function createInstance(_e){const et=new Axios$2(_e),tt=bind$a(Axios$2.prototype.request,et);return utils.extend(tt,Axios$2.prototype,et,{allOwnKeys:!0}),utils.extend(tt,et,null,{allOwnKeys:!0}),tt.create=function(rt){return createInstance(mergeConfig$1(_e,rt))},tt}const axios=createInstance(defaults$1);axios.Axios=Axios$2;axios.CanceledError=CanceledError$1;axios.CancelToken=CancelToken$3;axios.isCancel=isCancel$2;axios.VERSION=VERSION$1;axios.toFormData=toFormData$1;axios.AxiosError=AxiosError$1;axios.Cancel=axios.CanceledError;axios.all=function(et){return Promise.all(et)};axios.spread=spread$1;axios.isAxiosError=isAxiosError$1;axios.mergeConfig=mergeConfig$1;axios.AxiosHeaders=AxiosHeaders$2;axios.formToJSON=_e=>formDataToJSON(utils.isHTMLForm(_e)?new FormData(_e):_e);axios.getAdapter=adapters.getAdapter;axios.HttpStatusCode=HttpStatusCode$2;axios.default=axios;const axios$1=axios,{Axios,AxiosError,CanceledError,isCancel:isCancel$1,CancelToken:CancelToken$1,VERSION,all,Cancel,isAxiosError,spread,toFormData,AxiosHeaders,HttpStatusCode,formToJSON,getAdapter,mergeConfig}=axios$1;var COMPATIBLE_ENCODING_PATTERN=/^utf-?8|ascii|utf-?16-?le|ucs-?2|base-?64|latin-?1$/i,WS_TRIM_PATTERN=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,WS_CHAR_PATTERN=/\s|\uFEFF|\xA0/,WS_FOLD_PATTERN=/\r?\n[\x20\x09]+/g,DELIMITER_PATTERN=/[;,"]/,WS_DELIMITER_PATTERN=/[;,"]|\s/,TOKEN_PATTERN=/^[!#$%&'*+\-\.^_`|~\da-zA-Z]+$/,STATE={IDLE:1,URI:2,ATTR:4};function trim$5(_e){return _e.replace(WS_TRIM_PATTERN,"")}function hasWhitespace(_e){return WS_CHAR_PATTERN.test(_e)}function skipWhitespace(_e,et){for(;hasWhitespace(_e[et]);)et++;return et}function needsQuotes(_e){return WS_DELIMITER_PATTERN.test(_e)||!TOKEN_PATTERN.test(_e)}function shallowCompareObjects(_e,et){return Object.keys(_e).length===Object.keys(et).length&&Object.keys(_e).every(tt=>tt in et&&_e[tt]===et[tt])}let Link$1=class lr{constructor(et){this.refs=[],et&&this.parse(et)}rel(et){for(var tt=[],nt=et.toLowerCase(),rt=0;rtshallowCompareObjects(tt,et))||this.refs.push(et),this}has(et,tt){et=et.toLowerCase();for(var nt=0;nt",at);if(ot===-1)throw new Error("Expected end of URI delimiter at offset "+at);it={uri:et.slice(at+1,ot)},at=ot,nt=STATE.URI}else throw new Error('Unexpected character "'+et[at]+'" at offset '+at);at++}else if(nt===STATE.URI)if(hasWhitespace(et[at])){at++;continue}else if(et[at]===";")nt=STATE.ATTR,at++;else if(et[at]===",")nt=STATE.IDLE,at++;else throw new Error('Unexpected character "'+et[at]+'" at offset '+at);else if(nt===STATE.ATTR){if(et[at]===";"||hasWhitespace(et[at])){at++;continue}var ot=et.indexOf("=",at);ot===-1&&(ot=et.indexOf(";",at)),ot===-1&&(ot=et.length);var st=trim$5(et.slice(at,ot)).toLowerCase(),ct="";if(at=ot+1,at=skipWhitespace(et,at),et[at]==='"')for(at++;at"),et.push(tt);return et.join(", ")}};Link$1.isCompatibleEncoding=function(_e){return COMPATIBLE_ENCODING_PATTERN.test(_e)};Link$1.parse=function(_e,et){return new Link$1().parse(_e,et)};Link$1.isSingleOccurenceAttr=function(_e){return _e==="rel"||_e==="type"||_e==="media"||_e==="title"||_e==="title*"};Link$1.isTokenAttr=function(_e){return _e==="rel"||_e==="type"||_e==="anchor"};Link$1.escapeQuotes=function(_e){return _e.replace(/"/g,'\\"')};Link$1.expandRelations=function(_e){var et=_e.rel.split(" ");return et.map(function(tt){var nt=Object.assign({},_e);return nt.rel=tt,nt})};Link$1.parseExtendedValue=function(_e){var et=/([^']+)?(?:'([^']*)')?(.+)/.exec(_e);return{language:et[2].toLowerCase(),encoding:Link$1.isCompatibleEncoding(et[1])?null:et[1].toLowerCase(),value:Link$1.isCompatibleEncoding(et[1])?decodeURIComponent(et[3]):et[3]}};Link$1.formatExtendedAttribute=function(_e,et){var tt=(et.encoding||"utf-8").toUpperCase(),nt=et.language||"en",rt="";return Buffer.isBuffer(et.value)&&Link$1.isCompatibleEncoding(tt)?rt=et.value.toString(tt):Buffer.isBuffer(et.value)?rt=et.value.toString("hex").replace(/[0-9a-f]{2}/gi,"%$1"):rt=encodeURIComponent(et.value),_e+"="+tt+"'"+nt+"'"+rt};Link$1.formatAttribute=function(_e,et){return Array.isArray(et)?et.map(tt=>Link$1.formatAttribute(_e,tt)).join("; "):_e[_e.length-1]==="*"||typeof et!="string"?Link$1.formatExtendedAttribute(_e,et):(Link$1.isTokenAttr(_e)?et=needsQuotes(et)?'"'+Link$1.escapeQuotes(et)+'"':Link$1.escapeQuotes(et):needsQuotes(et)&&(et=encodeURIComponent(et),et=et.replace(/%20/g," ").replace(/%2C/g,",").replace(/%3B/g,";"),et='"'+et+'"'),_e+"="+et)};var link=Link$1;const LinkHeader=getDefaultExportFromCjs$1(link),getLinks=_e=>{var et;return new LinkHeader((et=_e.headers)==null?void 0:et.link)},getNextLink=_e=>{var et;return(et=getLinks(_e).refs.find(tt=>tt.rel==="next"))==null?void 0:et.uri},getPrevLink=_e=>{var et;return(et=getLinks(_e).refs.find(tt=>tt.rel==="prev"))==null?void 0:et.uri},getToken=(_e,et)=>et==="app"?getAppToken(_e):getAccessToken(_e),maybeParseJSON=_e=>{try{return JSON.parse(_e)}catch{return _e}},getAuthBaseURL=createSelector([(_e,et)=>{var tt;return et?(tt=selectAccount(_e,et))==null?void 0:tt.url:void 0},(_e,et)=>_e.auth.me],(_e,et)=>{const tt=parseBaseURL(_e)||parseBaseURL(et);return tt!==window.location.origin?tt:""}),baseClient=(_e,et="")=>{const tt={};return _e&&(tt.Authorization=`Bearer ${_e}`),axios$1.create({baseURL:isURL(BACKEND_URL)?BACKEND_URL:et,headers:tt,transformResponse:[maybeParseJSON]})},staticClient=axios$1.create({baseURL:FE_SUBDIRECTORY,transformResponse:[maybeParseJSON]}),api=(_e,et="user")=>{const tt=_e(),nt=getToken(tt,et),rt=tt.me,at=rt?getAuthBaseURL(tt,rt):"";return baseClient(nt,at)},ENTITIES_IMPORT="ENTITIES_IMPORT",ENTITIES_DELETE="ENTITIES_DELETE",ENTITIES_DISMISS="ENTITIES_DISMISS",ENTITIES_INCREMENT="ENTITIES_INCREMENT",ENTITIES_FETCH_REQUEST="ENTITIES_FETCH_REQUEST",ENTITIES_FETCH_SUCCESS="ENTITIES_FETCH_SUCCESS",ENTITIES_FETCH_FAIL="ENTITIES_FETCH_FAIL",ENTITIES_INVALIDATE_LIST="ENTITIES_INVALIDATE_LIST",ENTITIES_TRANSACTION="ENTITIES_TRANSACTION";function importEntities$1(_e,et,tt,nt){return{type:ENTITIES_IMPORT,entityType:et,entities:_e,listKey:tt,pos:nt}}function deleteEntities$1(_e,et,tt={}){return{type:ENTITIES_DELETE,ids:_e,entityType:et,opts:tt}}function dismissEntities$1(_e,et,tt){return{type:ENTITIES_DISMISS,ids:_e,entityType:et,listKey:tt}}function entitiesFetchRequest(_e,et){return{type:ENTITIES_FETCH_REQUEST,entityType:_e,listKey:et}}function entitiesFetchSuccess(_e,et,tt,nt,rt,at=!1){return{type:ENTITIES_FETCH_SUCCESS,entityType:et,entities:_e,listKey:tt,pos:nt,newState:rt,overwrite:at}}function entitiesFetchFail(_e,et,tt){return{type:ENTITIES_FETCH_FAIL,entityType:_e,listKey:et,error:tt}}function invalidateEntityList$1(_e,et){return{type:ENTITIES_INVALIDATE_LIST,entityType:_e,listKey:et}}function entitiesTransaction(_e){return{type:ENTITIES_TRANSACTION,transaction:_e}}var Entities=(_e=>(_e.ACCOUNTS="Accounts",_e.GROUPS="Groups",_e.GROUP_MEMBERSHIPS="GroupMemberships",_e.GROUP_MUTES="GroupMutes",_e.GROUP_RELATIONSHIPS="GroupRelationships",_e.GROUP_TAGS="GroupTags",_e.PATRON_USERS="PatronUsers",_e.RELATIONSHIPS="Relationships",_e.STATUSES="Statuses",_e))(Entities||{});const debug$1=typeof process=="object"&&process.env&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(..._e)=>console.error("SEMVER",..._e):()=>{};var debug_1=debug$1;const SEMVER_SPEC_VERSION="2.0.0",MAX_LENGTH$1=256,MAX_SAFE_INTEGER$4=Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH=16,MAX_SAFE_BUILD_LENGTH=MAX_LENGTH$1-6,RELEASE_TYPES=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var constants$2={MAX_LENGTH:MAX_LENGTH$1,MAX_SAFE_COMPONENT_LENGTH,MAX_SAFE_BUILD_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER$4,RELEASE_TYPES,SEMVER_SPEC_VERSION,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},re$3={exports:{}};(function(_e,et){const{MAX_SAFE_COMPONENT_LENGTH:tt,MAX_SAFE_BUILD_LENGTH:nt,MAX_LENGTH:rt}=constants$2,at=debug_1;et=_e.exports={};const it=et.re=[],ot=et.safeRe=[],st=et.src=[],ct=et.t={};let ut=0;const dt="[a-zA-Z0-9-]",ft=[["\\s",1],["\\d",rt],[dt,nt]],pt=ht=>{for(const[Et,yt]of ft)ht=ht.split(`${Et}*`).join(`${Et}{0,${yt}}`).split(`${Et}+`).join(`${Et}{1,${yt}}`);return ht},mt=(ht,Et,yt)=>{const vt=pt(Et),gt=ut++;at(ht,gt,Et),ct[ht]=gt,st[gt]=Et,it[gt]=new RegExp(Et,yt?"g":void 0),ot[gt]=new RegExp(vt,yt?"g":void 0)};mt("NUMERICIDENTIFIER","0|[1-9]\\d*"),mt("NUMERICIDENTIFIERLOOSE","\\d+"),mt("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${dt}*`),mt("MAINVERSION",`(${st[ct.NUMERICIDENTIFIER]})\\.(${st[ct.NUMERICIDENTIFIER]})\\.(${st[ct.NUMERICIDENTIFIER]})`),mt("MAINVERSIONLOOSE",`(${st[ct.NUMERICIDENTIFIERLOOSE]})\\.(${st[ct.NUMERICIDENTIFIERLOOSE]})\\.(${st[ct.NUMERICIDENTIFIERLOOSE]})`),mt("PRERELEASEIDENTIFIER",`(?:${st[ct.NUMERICIDENTIFIER]}|${st[ct.NONNUMERICIDENTIFIER]})`),mt("PRERELEASEIDENTIFIERLOOSE",`(?:${st[ct.NUMERICIDENTIFIERLOOSE]}|${st[ct.NONNUMERICIDENTIFIER]})`),mt("PRERELEASE",`(?:-(${st[ct.PRERELEASEIDENTIFIER]}(?:\\.${st[ct.PRERELEASEIDENTIFIER]})*))`),mt("PRERELEASELOOSE",`(?:-?(${st[ct.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${st[ct.PRERELEASEIDENTIFIERLOOSE]})*))`),mt("BUILDIDENTIFIER",`${dt}+`),mt("BUILD",`(?:\\+(${st[ct.BUILDIDENTIFIER]}(?:\\.${st[ct.BUILDIDENTIFIER]})*))`),mt("FULLPLAIN",`v?${st[ct.MAINVERSION]}${st[ct.PRERELEASE]}?${st[ct.BUILD]}?`),mt("FULL",`^${st[ct.FULLPLAIN]}$`),mt("LOOSEPLAIN",`[v=\\s]*${st[ct.MAINVERSIONLOOSE]}${st[ct.PRERELEASELOOSE]}?${st[ct.BUILD]}?`),mt("LOOSE",`^${st[ct.LOOSEPLAIN]}$`),mt("GTLT","((?:<|>)?=?)"),mt("XRANGEIDENTIFIERLOOSE",`${st[ct.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),mt("XRANGEIDENTIFIER",`${st[ct.NUMERICIDENTIFIER]}|x|X|\\*`),mt("XRANGEPLAIN",`[v=\\s]*(${st[ct.XRANGEIDENTIFIER]})(?:\\.(${st[ct.XRANGEIDENTIFIER]})(?:\\.(${st[ct.XRANGEIDENTIFIER]})(?:${st[ct.PRERELEASE]})?${st[ct.BUILD]}?)?)?`),mt("XRANGEPLAINLOOSE",`[v=\\s]*(${st[ct.XRANGEIDENTIFIERLOOSE]})(?:\\.(${st[ct.XRANGEIDENTIFIERLOOSE]})(?:\\.(${st[ct.XRANGEIDENTIFIERLOOSE]})(?:${st[ct.PRERELEASELOOSE]})?${st[ct.BUILD]}?)?)?`),mt("XRANGE",`^${st[ct.GTLT]}\\s*${st[ct.XRANGEPLAIN]}$`),mt("XRANGELOOSE",`^${st[ct.GTLT]}\\s*${st[ct.XRANGEPLAINLOOSE]}$`),mt("COERCE",`(^|[^\\d])(\\d{1,${tt}})(?:\\.(\\d{1,${tt}}))?(?:\\.(\\d{1,${tt}}))?(?:$|[^\\d])`),mt("COERCERTL",st[ct.COERCE],!0),mt("LONETILDE","(?:~>?)"),mt("TILDETRIM",`(\\s*)${st[ct.LONETILDE]}\\s+`,!0),et.tildeTrimReplace="$1~",mt("TILDE",`^${st[ct.LONETILDE]}${st[ct.XRANGEPLAIN]}$`),mt("TILDELOOSE",`^${st[ct.LONETILDE]}${st[ct.XRANGEPLAINLOOSE]}$`),mt("LONECARET","(?:\\^)"),mt("CARETTRIM",`(\\s*)${st[ct.LONECARET]}\\s+`,!0),et.caretTrimReplace="$1^",mt("CARET",`^${st[ct.LONECARET]}${st[ct.XRANGEPLAIN]}$`),mt("CARETLOOSE",`^${st[ct.LONECARET]}${st[ct.XRANGEPLAINLOOSE]}$`),mt("COMPARATORLOOSE",`^${st[ct.GTLT]}\\s*(${st[ct.LOOSEPLAIN]})$|^$`),mt("COMPARATOR",`^${st[ct.GTLT]}\\s*(${st[ct.FULLPLAIN]})$|^$`),mt("COMPARATORTRIM",`(\\s*)${st[ct.GTLT]}\\s*(${st[ct.LOOSEPLAIN]}|${st[ct.XRANGEPLAIN]})`,!0),et.comparatorTrimReplace="$1$2$3",mt("HYPHENRANGE",`^\\s*(${st[ct.XRANGEPLAIN]})\\s+-\\s+(${st[ct.XRANGEPLAIN]})\\s*$`),mt("HYPHENRANGELOOSE",`^\\s*(${st[ct.XRANGEPLAINLOOSE]})\\s+-\\s+(${st[ct.XRANGEPLAINLOOSE]})\\s*$`),mt("STAR","(<|>)?=?\\s*\\*"),mt("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),mt("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(re$3,re$3.exports);var reExports=re$3.exports;const looseOption=Object.freeze({loose:!0}),emptyOpts=Object.freeze({}),parseOptions$1=_e=>_e?typeof _e!="object"?looseOption:_e:emptyOpts;var parseOptions_1=parseOptions$1;const numeric=/^[0-9]+$/,compareIdentifiers$1=(_e,et)=>{const tt=numeric.test(_e),nt=numeric.test(et);return tt&&nt&&(_e=+_e,et=+et),_e===et?0:tt&&!nt?-1:nt&&!tt?1:_ecompareIdentifiers$1(et,_e);var identifiers={compareIdentifiers:compareIdentifiers$1,rcompareIdentifiers};const debug=debug_1,{MAX_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER$3}=constants$2,{safeRe:re$2,t:t$2}=reExports,parseOptions=parseOptions_1,{compareIdentifiers}=identifiers;let SemVer$3=class Yn{constructor(et,tt){if(tt=parseOptions(tt),et instanceof Yn){if(et.loose===!!tt.loose&&et.includePrerelease===!!tt.includePrerelease)return et;et=et.version}else if(typeof et!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof et}".`);if(et.length>MAX_LENGTH)throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);debug("SemVer",et,tt),this.options=tt,this.loose=!!tt.loose,this.includePrerelease=!!tt.includePrerelease;const nt=et.trim().match(tt.loose?re$2[t$2.LOOSE]:re$2[t$2.FULL]);if(!nt)throw new TypeError(`Invalid Version: ${et}`);if(this.raw=et,this.major=+nt[1],this.minor=+nt[2],this.patch=+nt[3],this.major>MAX_SAFE_INTEGER$3||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER$3||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER$3||this.patch<0)throw new TypeError("Invalid patch version");nt[4]?this.prerelease=nt[4].split(".").map(rt=>{if(/^[0-9]+$/.test(rt)){const at=+rt;if(at>=0&&at=0;)typeof this.prerelease[at]=="number"&&(this.prerelease[at]++,at=-2);if(at===-1){if(tt===this.prerelease.join(".")&&nt===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(rt)}}if(tt){let at=[tt,rt];nt===!1&&(at=[tt]),compareIdentifiers(this.prerelease[0],tt)===0?isNaN(this.prerelease[1])&&(this.prerelease=at):this.prerelease=at}break}default:throw new Error(`invalid increment argument: ${et}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var semver=SemVer$3;const SemVer$2=semver,parse$3=(_e,et,tt=!1)=>{if(_e instanceof SemVer$2)return _e;try{return new SemVer$2(_e,et)}catch(nt){if(!tt)return null;throw nt}};var parse_1=parse$3;const semverParse=getDefaultExportFromCjs$1(parse_1),SemVer$1=semver,parse$2=parse_1,{safeRe:re$1,t:t$1}=reExports,coerce$1=(_e,et)=>{if(_e instanceof SemVer$1)return _e;if(typeof _e=="number"&&(_e=String(_e)),typeof _e!="string")return null;et=et||{};let tt=null;if(!et.rtl)tt=_e.match(re$1[t$1.COERCE]);else{let nt;for(;(nt=re$1[t$1.COERCERTL].exec(_e))&&(!tt||tt.index+tt[0].length!==_e.length);)(!tt||nt.index+nt[0].length!==tt.index+tt[0].length)&&(tt=nt),re$1[t$1.COERCERTL].lastIndex=nt.index+nt[1].length+nt[2].length;re$1[t$1.COERCERTL].lastIndex=-1}return tt===null?null:parse$2(`${tt[2]}.${tt[3]||"0"}.${tt[4]||"0"}`,et)};var coerce_1=coerce$1;const semverCoerce=getDefaultExportFromCjs$1(coerce_1),SemVer=semver,compare$3=(_e,et,tt)=>new SemVer(_e,tt).compare(new SemVer(et,tt));var compare_1=compare$3;const compare$2=compare_1,gte=(_e,et,tt)=>compare$2(_e,et,tt)>=0;var gte_1=gte;const gte$1=getDefaultExportFromCjs$1(gte_1),compare$1=compare_1,lt=(_e,et,tt)=>compare$1(_e,et,tt)<0;var lt_1=lt;const lt$1=getDefaultExportFromCjs$1(lt_1),custom$1=(_e,et={})=>{if(NODE_ENV==="test")return et;const tt=Object.assign({}),nt=`../../custom/${_e}.json`;return tt[nt]?tt[nt]:et},overrides=custom$1("features"),any=_e=>_e.some(Boolean),FIREFISH="Firefish",DITTO="Ditto",FRIENDICA="Friendica",MASTODON="Mastodon",MITRA="Mitra",PIXELFED="Pixelfed",PLEROMA="Pleroma",TAKAHE="Takahe",TRUTHSOCIAL="TruthSocial",WILDEBEEST="Wildebeest",AKKOMA="Akkoma",GLITCH="glitch",REBASED="soapbox",SPIRIT="spirit",UNRELEASED="unreleased",getInstanceFeatures=_e=>{const et=parseVersion(_e.version),tt=_e.pleroma.metadata.features,nt=_e.pleroma.metadata.federation;return{accountAliases:any([et.software===PLEROMA,et.software===AKKOMA]),accountByUsername:any([et.software===PLEROMA,et.software===AKKOMA]),accountCreation:et.software!==TRUTHSOCIAL,accountEndorsements:any([et.software===PLEROMA&>e$1(et.version,"2.4.50"),et.software===AKKOMA]),accountLocation:any([et.software===PLEROMA&&et.build===REBASED&>e$1(et.version,"2.4.50"),et.software===AKKOMA,et.software===TRUTHSOCIAL]),accountLookup:any([et.software===FIREFISH,et.software===MASTODON&>e$1(et.compatVersion,"3.4.0"),et.software===PLEROMA&>e$1(et.version,"2.4.50"),et.software===TAKAHE&>e$1(et.version,"0.6.1"),et.software===AKKOMA,et.software===TRUTHSOCIAL,et.software===DITTO]),accountMoving:any([et.software===PLEROMA&>e$1(et.version,"2.4.50"),et.software===AKKOMA]),accountNotifies:any([et.software===MASTODON&>e$1(et.compatVersion,"3.3.0"),et.software===PLEROMA&>e$1(et.version,"2.4.50"),et.software===AKKOMA,et.software===TRUTHSOCIAL]),accountSubscriptions:[et.software===PLEROMA&>e$1(et.version,"1.0.0"),et.software===AKKOMA],accountWebsite:et.software===TRUTHSOCIAL,adminFE:[et.software===PLEROMA,et.software===AKKOMA],announcements:any([et.software===MASTODON&>e$1(et.compatVersion,"3.1.0"),et.software===PLEROMA&>e$1(et.version,"2.2.49"),et.software===AKKOMA]),announcementsReactions:et.software===MASTODON&>e$1(et.compatVersion,"3.1.0"),backups:any([et.software===PLEROMA,et.software===AKKOMA]),birthdays:et.software===PLEROMA&&et.build===REBASED&>e$1(et.version,"2.4.50"),blockersVisible:tt.includes("blockers_visible"),bookmarks:any([et.software===FIREFISH,et.software===FRIENDICA,et.software===MASTODON&>e$1(et.compatVersion,"3.1.0"),et.software===PLEROMA&>e$1(et.version,"0.9.9"),et.software===AKKOMA,et.software===PIXELFED]),bots:any([et.software===MASTODON,et.software===PLEROMA,et.software===AKKOMA]),carousel:et.software===TRUTHSOCIAL,carouselSeen:et.software===TRUTHSOCIAL,chatAcceptance:et.software===TRUTHSOCIAL,chatEmojiReactions:et.software===TRUTHSOCIAL,chats:any([et.software===TRUTHSOCIAL,tt.includes("pleroma_chat_messages")]),chatsDelete:any([et.software===TRUTHSOCIAL,et.build===REBASED]),chatsExpiration:et.software===TRUTHSOCIAL,chatsMedia:et.software!==TRUTHSOCIAL||et.build===UNRELEASED,chatsReadReceipts:et.software===TRUTHSOCIAL,chatsSearch:et.software===TRUTHSOCIAL,chatsV2:any([et.software===TRUTHSOCIAL,et.software===PLEROMA&>e$1(et.version,"2.3.0")]),chatsWithFollowers:et.software===TRUTHSOCIAL,conversations:any([et.software===FIREFISH,et.software===FRIENDICA,et.software===MASTODON&>e$1(et.compatVersion,"2.6.0"),et.software===PLEROMA&>e$1(et.version,"0.9.9"),et.software===AKKOMA,et.software===PIXELFED,et.software===TAKAHE]),customEmojiReacts:any([tt.includes("pleroma_custom_emoji_reactions"),tt.includes("custom_emoji_reactions"),et.software===PLEROMA&>e$1(et.version,"2.5.50"),et.software===AKKOMA]),directTimeline:any([et.software===FRIENDICA,et.software===MASTODON&<$1(et.compatVersion,"3.0.0"),et.software===PLEROMA&>e$1(et.version,"0.9.9"),et.software===AKKOMA]),dislikes:et.software===FRIENDICA&>e$1(et.version,"2023.3.0"),editProfile:any([et.software===FIREFISH,et.software===FRIENDICA,et.software===MASTODON,et.software===MITRA,et.software===PIXELFED,et.software===PLEROMA,et.software===TAKAHE&>e$1(et.version,"0.7.0"),et.software===AKKOMA,et.software===TRUTHSOCIAL,et.software===WILDEBEEST]),editStatuses:any([et.software===FRIENDICA&>e$1(et.version,"2022.12.0"),et.software===MASTODON&>e$1(et.version,"3.5.0"),tt.includes("editing")]),emailList:tt.includes("email_list"),embeds:any([et.software===MASTODON,et.software===TRUTHSOCIAL]),emojiReacts:any([et.software===PLEROMA&>e$1(et.version,"2.0.0"),et.software===AKKOMA]),emojiReactsNonRGI:any([et.software===PLEROMA&<$1(et.version,"2.2.49"),et.software===AKKOMA]),ethereumLogin:et.software===MITRA,events:tt.includes("events"),explicitAddressing:any([et.software===PLEROMA&>e$1(et.version,"1.0.0"),et.software===AKKOMA&&et.build!==SPIRIT,et.software===TRUTHSOCIAL]),exportData:!0,exposableReactions:any([et.software===FIREFISH,et.software===FRIENDICA,et.software===MASTODON,et.software===TAKAHE&>e$1(et.version,"0.6.1"),et.software===TRUTHSOCIAL,tt.includes("exposable_reactions")]),familiarFollowers:any([et.software===MASTODON&>e$1(et.version,"3.5.0"),et.software===PLEROMA&>e$1(et.version,"2.5.51")&&et.build===REBASED,et.software===TAKAHE]),federating:nt.enabled,filters:any([et.software===MASTODON&<$1(et.compatVersion,"3.6.0"),et.software===PLEROMA,et.software===AKKOMA]),filtersExpiration:any([et.software===MASTODON,et.software===PLEROMA&>e$1(et.version,"2.3.0"),et.software===AKKOMA]),filtersV2:et.software===MASTODON&>e$1(et.compatVersion,"3.6.0"),focalPoint:et.software===MASTODON&>e$1(et.compatVersion,"2.3.0"),followHashtags:any([et.software===MASTODON&>e$1(et.compatVersion,"4.0.0"),et.software===AKKOMA]),followRequests:any([et.software===MASTODON,et.software===PLEROMA,et.software===AKKOMA]),followedHashtagsList:et.software===MASTODON&>e$1(et.compatVersion,"4.1.0"),frontendConfigurations:any([et.software===PLEROMA,et.software===AKKOMA]),groups:et.software===TRUTHSOCIAL,groupsAdminMax:et.software===TRUTHSOCIAL,groupsDiscovery:et.software===TRUTHSOCIAL,groupsKick:et.software!==TRUTHSOCIAL,groupsMuting:et.software===TRUTHSOCIAL,groupsPending:et.software===TRUTHSOCIAL,groupsPromoteToAdmin:et.software!==TRUTHSOCIAL,groupsSearch:et.software===TRUTHSOCIAL,groupsTags:et.software===TRUTHSOCIAL,groupsValidation:et.software===TRUTHSOCIAL,hideNetwork:any([et.software===PLEROMA,et.software===AKKOMA]),import:any([et.software===PLEROMA,et.software===AKKOMA]),importData:any([et.software===PLEROMA&>e$1(et.version,"2.2.0"),et.software===AKKOMA]),indefinitePollDuration:any([et.software===AKKOMA&&et.build===SPIRIT]),lists:any([et.software===FIREFISH,et.software===FRIENDICA,et.software===MASTODON&>e$1(et.compatVersion,"2.1.0"),et.software===PLEROMA&>e$1(et.version,"0.9.9"),et.software===AKKOMA]),localOnlyPrivacy:et.software===AKKOMA,logInWithUsername:any([et.software===PLEROMA,et.software===AKKOMA,et.software===TRUTHSOCIAL]),mastodonAdmin:any([et.software===MASTODON&>e$1(et.compatVersion,"2.9.1"),et.software===PLEROMA&&et.build===REBASED&>e$1(et.version,"2.4.50")]),media:!0,mediaV2:any([et.software===MASTODON&>e$1(et.compatVersion,"3.1.3"),et.software===WILDEBEEST]),muteStrangers:any([et.software===PLEROMA,et.software===AKKOMA]),mutesDuration:any([et.software===PLEROMA&>e$1(et.version,"2.3.0"),et.software===AKKOMA,et.software===MASTODON&>e$1(et.compatVersion,"3.3.0")]),nostrSign:et.software===DITTO,notes:any([et.software===MASTODON&>e$1(et.compatVersion,"3.2.0"),et.software===PLEROMA&>e$1(et.version,"2.4.50"),et.software===AKKOMA]),notificationsIncludeTypes:any([et.software===MASTODON&>e$1(et.compatVersion,"3.5.0"),et.software===PLEROMA&>e$1(et.version,"2.4.50"),et.software===TAKAHE&>e$1(et.version,"0.6.2"),et.software===AKKOMA]),paginatedContext:et.software===TRUTHSOCIAL,passwordRequirements:et.software===TRUTHSOCIAL,pleromaRemoteFollow:any([et.software===PLEROMA,et.software===AKKOMA]),polls:any([et.software===FIREFISH,et.software===MASTODON&>e$1(et.version,"2.8.0"),et.software===PLEROMA,et.software===AKKOMA,et.software===TRUTHSOCIAL]),privacyScopes:![TRUTHSOCIAL,DITTO].includes(et.software),profileDirectory:any([et.software===FRIENDICA,et.software===MASTODON&>e$1(et.compatVersion,"3.0.0"),tt.includes("profile_directory")]),profileFields:any([et.software===MASTODON,et.software===PLEROMA,et.software===AKKOMA]),publicTimeline:any([et.software===FIREFISH,et.software===FRIENDICA,et.software===MASTODON,et.software===PLEROMA,et.software===TAKAHE,et.software===AKKOMA,et.software===WILDEBEEST,et.software===DITTO]),quotePosts:any([et.software===FRIENDICA&>e$1(et.version,"2023.3.0"),et.software===PLEROMA&&[REBASED].includes(et.build)&>e$1(et.version,"2.4.50"),et.software===AKKOMA,tt.includes("quote_posting"),_e.feature_quote===!0]),remoteInteractions:any([et.software===PLEROMA&>e$1(et.version,"2.4.50"),et.software===AKKOMA]),removeFromFollowers:any([et.software===MASTODON&>e$1(et.compatVersion,"3.5.0"),et.software===PLEROMA&&et.build===REBASED&>e$1(et.version,"2.4.50"),et.software===AKKOMA]),reportChats:et.software===TRUTHSOCIAL,reportMultipleStatuses:et.software!==TRUTHSOCIAL,resetPassword:any([et.software===PLEROMA,et.software===AKKOMA]),richText:any([et.software===MASTODON&&et.build===GLITCH,et.software===PLEROMA,et.software===AKKOMA]),rssFeeds:any([et.software===MASTODON,et.software===PLEROMA,et.software===AKKOMA]),scheduledStatuses:any([et.software===FRIENDICA,et.software===MASTODON&>e$1(et.version,"2.7.0"),et.software===PLEROMA,et.software===AKKOMA]),searchFromAccount:any([et.software===MASTODON&>e$1(et.version,"2.8.0"),et.software===PLEROMA&>e$1(et.version,"1.0.0"),et.software===AKKOMA]),security:any([et.software===PLEROMA,et.software===AKKOMA,et.software===TRUTHSOCIAL]),sessions:any([et.software===PLEROMA,et.software===AKKOMA]),settingsStore:any([et.software===PLEROMA,et.software===AKKOMA,et.software===TRUTHSOCIAL]),spoilers:et.software!==TRUTHSOCIAL,suggestions:any([et.software===MASTODON&>e$1(et.compatVersion,"2.4.3"),et.software===TRUTHSOCIAL,tt.includes("v2_suggestions")]),suggestionsV2:any([et.software===FRIENDICA,et.software===MASTODON&>e$1(et.compatVersion,"3.4.0"),et.software===TRUTHSOCIAL,tt.includes("v2_suggestions")]),translations:any([tt.includes("translation"),tt.includes("akkoma:machine_translation")]),trendingStatuses:any([et.software===FRIENDICA&>e$1(et.version,"2022.12.0"),et.software===MASTODON&>e$1(et.compatVersion,"3.5.0")]),trendingTruths:et.software===TRUTHSOCIAL,trends:any([et.software===FRIENDICA&>e$1(et.version,"2022.12.0"),et.software===MASTODON&>e$1(et.compatVersion,"3.0.0"),et.software===TRUTHSOCIAL,et.software===DITTO]),truthPolicies:et.software===TRUTHSOCIAL,truthSuggestions:et.software===TRUTHSOCIAL,unrestrictedLists:any([et.software===PLEROMA,et.software===AKKOMA])}},getFeatures=createSelector([_e=>_e],_e=>{const et=getInstanceFeatures(_e);return Object.assign(et,overrides)}),parseVersion=_e=>{const tt=/^([\w+.-]*)(?: \(compatible; ([\w]*) (.*)\))?$/.exec(_e),nt=tt&&(tt[3]||tt[1]),rt=tt?semverParse(nt)||semverCoerce(nt,{loose:!0}):null,at=tt?semverParse(tt[1])||semverCoerce(tt[1]):null;return tt&&rt&&at?{build:rt.build[0],compatVersion:at.version,software:tt[2]||MASTODON,version:rt.version}:{build:null,compatVersion:"0.0.0",software:null,version:"0.0.0"}},vitePluginRequire_1697864661787_6416804="/packs/assets/header-missing-b2417070.png",vitePluginRequire_1697864661787_95587196="/packs/assets/avatar-missing-8cc248dd.png";/*! * escape-html * Copyright(c) 2012-2013 TJ Holowaychuk * Copyright(c) 2015 Andreas Lubbe @@ -131,9 +131,9 @@ ${Yt.current.stack} */var matchHtmlRegExp=/["'&<>]/,escapeHtml_1=escapeHtml;function escapeHtml(_e){var et=""+_e,tt=matchHtmlRegExp.exec(et);if(!tt)return et;var nt,rt="",at=0,it=0;for(at=tt.index;atrt;function et(rt){}_e.assertIs=et;function tt(rt){throw new Error}_e.assertNever=tt,_e.arrayToEnum=rt=>{const at={};for(const it of rt)at[it]=it;return at},_e.getValidEnumValues=rt=>{const at=_e.objectKeys(rt).filter(ot=>typeof rt[rt[ot]]!="number"),it={};for(const ot of at)it[ot]=rt[ot];return _e.objectValues(it)},_e.objectValues=rt=>_e.objectKeys(rt).map(function(at){return rt[at]}),_e.objectKeys=typeof Object.keys=="function"?rt=>Object.keys(rt):rt=>{const at=[];for(const it in rt)Object.prototype.hasOwnProperty.call(rt,it)&&at.push(it);return at},_e.find=(rt,at)=>{for(const it of rt)if(at(it))return it},_e.isInteger=typeof Number.isInteger=="function"?rt=>Number.isInteger(rt):rt=>typeof rt=="number"&&isFinite(rt)&&Math.floor(rt)===rt;function nt(rt,at=" | "){return rt.map(it=>typeof it=="string"?`'${it}'`:it).join(at)}_e.joinValues=nt,_e.jsonStringifyReplacer=(rt,at)=>typeof at=="bigint"?at.toString():at})(util||(util={}));var objectUtil;(function(_e){_e.mergeShapes=(et,tt)=>({...et,...tt})})(objectUtil||(objectUtil={}));const ZodParsedType=util.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),getParsedType=_e=>{switch(typeof _e){case"undefined":return ZodParsedType.undefined;case"string":return ZodParsedType.string;case"number":return isNaN(_e)?ZodParsedType.nan:ZodParsedType.number;case"boolean":return ZodParsedType.boolean;case"function":return ZodParsedType.function;case"bigint":return ZodParsedType.bigint;case"symbol":return ZodParsedType.symbol;case"object":return Array.isArray(_e)?ZodParsedType.array:_e===null?ZodParsedType.null:_e.then&&typeof _e.then=="function"&&_e.catch&&typeof _e.catch=="function"?ZodParsedType.promise:typeof Map<"u"&&_e instanceof Map?ZodParsedType.map:typeof Set<"u"&&_e instanceof Set?ZodParsedType.set:typeof Date<"u"&&_e instanceof Date?ZodParsedType.date:ZodParsedType.object;default:return ZodParsedType.unknown}},ZodIssueCode=util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),quotelessJson=_e=>JSON.stringify(_e,null,2).replace(/"([^"]+)":/g,"$1:");class ZodError extends Error{constructor(et){super(),this.issues=[],this.addIssue=nt=>{this.issues=[...this.issues,nt]},this.addIssues=(nt=[])=>{this.issues=[...this.issues,...nt]};const tt=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,tt):this.__proto__=tt,this.name="ZodError",this.issues=et}get errors(){return this.issues}format(et){const tt=et||function(at){return at.message},nt={_errors:[]},rt=at=>{for(const it of at.issues)if(it.code==="invalid_union")it.unionErrors.map(rt);else if(it.code==="invalid_return_type")rt(it.returnTypeError);else if(it.code==="invalid_arguments")rt(it.argumentsError);else if(it.path.length===0)nt._errors.push(tt(it));else{let ot=nt,st=0;for(;sttt.message){const tt={},nt=[];for(const rt of this.issues)rt.path.length>0?(tt[rt.path[0]]=tt[rt.path[0]]||[],tt[rt.path[0]].push(et(rt))):nt.push(et(rt));return{formErrors:nt,fieldErrors:tt}}get formErrors(){return this.flatten()}}ZodError.create=_e=>new ZodError(_e);const errorMap=(_e,et)=>{let tt;switch(_e.code){case ZodIssueCode.invalid_type:_e.received===ZodParsedType.undefined?tt="Required":tt=`Expected ${_e.expected}, received ${_e.received}`;break;case ZodIssueCode.invalid_literal:tt=`Invalid literal value, expected ${JSON.stringify(_e.expected,util.jsonStringifyReplacer)}`;break;case ZodIssueCode.unrecognized_keys:tt=`Unrecognized key(s) in object: ${util.joinValues(_e.keys,", ")}`;break;case ZodIssueCode.invalid_union:tt="Invalid input";break;case ZodIssueCode.invalid_union_discriminator:tt=`Invalid discriminator value. Expected ${util.joinValues(_e.options)}`;break;case ZodIssueCode.invalid_enum_value:tt=`Invalid enum value. Expected ${util.joinValues(_e.options)}, received '${_e.received}'`;break;case ZodIssueCode.invalid_arguments:tt="Invalid function arguments";break;case ZodIssueCode.invalid_return_type:tt="Invalid function return type";break;case ZodIssueCode.invalid_date:tt="Invalid date";break;case ZodIssueCode.invalid_string:typeof _e.validation=="object"?"includes"in _e.validation?(tt=`Invalid input: must include "${_e.validation.includes}"`,typeof _e.validation.position=="number"&&(tt=`${tt} at one or more positions greater than or equal to ${_e.validation.position}`)):"startsWith"in _e.validation?tt=`Invalid input: must start with "${_e.validation.startsWith}"`:"endsWith"in _e.validation?tt=`Invalid input: must end with "${_e.validation.endsWith}"`:util.assertNever(_e.validation):_e.validation!=="regex"?tt=`Invalid ${_e.validation}`:tt="Invalid";break;case ZodIssueCode.too_small:_e.type==="array"?tt=`Array must contain ${_e.exact?"exactly":_e.inclusive?"at least":"more than"} ${_e.minimum} element(s)`:_e.type==="string"?tt=`String must contain ${_e.exact?"exactly":_e.inclusive?"at least":"over"} ${_e.minimum} character(s)`:_e.type==="number"?tt=`Number must be ${_e.exact?"exactly equal to ":_e.inclusive?"greater than or equal to ":"greater than "}${_e.minimum}`:_e.type==="date"?tt=`Date must be ${_e.exact?"exactly equal to ":_e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(_e.minimum))}`:tt="Invalid input";break;case ZodIssueCode.too_big:_e.type==="array"?tt=`Array must contain ${_e.exact?"exactly":_e.inclusive?"at most":"less than"} ${_e.maximum} element(s)`:_e.type==="string"?tt=`String must contain ${_e.exact?"exactly":_e.inclusive?"at most":"under"} ${_e.maximum} character(s)`:_e.type==="number"?tt=`Number must be ${_e.exact?"exactly":_e.inclusive?"less than or equal to":"less than"} ${_e.maximum}`:_e.type==="bigint"?tt=`BigInt must be ${_e.exact?"exactly":_e.inclusive?"less than or equal to":"less than"} ${_e.maximum}`:_e.type==="date"?tt=`Date must be ${_e.exact?"exactly":_e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(_e.maximum))}`:tt="Invalid input";break;case ZodIssueCode.custom:tt="Invalid input";break;case ZodIssueCode.invalid_intersection_types:tt="Intersection results could not be merged";break;case ZodIssueCode.not_multiple_of:tt=`Number must be a multiple of ${_e.multipleOf}`;break;case ZodIssueCode.not_finite:tt="Number must be finite";break;default:tt=et.defaultError,util.assertNever(_e)}return{message:tt}};let overrideErrorMap=errorMap;function setErrorMap(_e){overrideErrorMap=_e}function getErrorMap(){return overrideErrorMap}const makeIssue=_e=>{const{data:et,path:tt,errorMaps:nt,issueData:rt}=_e,at=[...tt,...rt.path||[]],it={...rt,path:at};let ot="";const st=nt.filter(ct=>!!ct).slice().reverse();for(const ct of st)ot=ct(it,{data:et,defaultError:ot}).message;return{...rt,path:at,message:rt.message||ot}},EMPTY_PATH=[];function addIssueToContext(_e,et){const tt=makeIssue({issueData:et,data:_e.data,path:_e.path,errorMaps:[_e.common.contextualErrorMap,_e.schemaErrorMap,getErrorMap(),errorMap].filter(nt=>!!nt)});_e.common.issues.push(tt)}class ParseStatus{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(et,tt){const nt=[];for(const rt of tt){if(rt.status==="aborted")return INVALID;rt.status==="dirty"&&et.dirty(),nt.push(rt.value)}return{status:et.value,value:nt}}static async mergeObjectAsync(et,tt){const nt=[];for(const rt of tt)nt.push({key:await rt.key,value:await rt.value});return ParseStatus.mergeObjectSync(et,nt)}static mergeObjectSync(et,tt){const nt={};for(const rt of tt){const{key:at,value:it}=rt;if(at.status==="aborted"||it.status==="aborted")return INVALID;at.status==="dirty"&&et.dirty(),it.status==="dirty"&&et.dirty(),at.value!=="__proto__"&&(typeof it.value<"u"||rt.alwaysSet)&&(nt[at.value]=it.value)}return{status:et.value,value:nt}}}const INVALID=Object.freeze({status:"aborted"}),DIRTY=_e=>({status:"dirty",value:_e}),OK=_e=>({status:"valid",value:_e}),isAborted=_e=>_e.status==="aborted",isDirty=_e=>_e.status==="dirty",isValid$1=_e=>_e.status==="valid",isAsync=_e=>typeof Promise<"u"&&_e instanceof Promise;var errorUtil;(function(_e){_e.errToObj=et=>typeof et=="string"?{message:et}:et||{},_e.toString=et=>typeof et=="string"?et:et==null?void 0:et.message})(errorUtil||(errorUtil={}));class ParseInputLazyPath{constructor(et,tt,nt,rt){this._cachedPath=[],this.parent=et,this.data=tt,this._path=nt,this._key=rt}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const handleResult=(_e,et)=>{if(isValid$1(et))return{success:!0,data:et.value};if(!_e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const tt=new ZodError(_e.common.issues);return this._error=tt,this._error}}};function processCreateParams(_e){if(!_e)return{};const{errorMap:et,invalid_type_error:tt,required_error:nt,description:rt}=_e;if(et&&(tt||nt))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return et?{errorMap:et,description:rt}:{errorMap:(it,ot)=>it.code!=="invalid_type"?{message:ot.defaultError}:typeof ot.data>"u"?{message:nt??ot.defaultError}:{message:tt??ot.defaultError},description:rt}}class ZodType{constructor(et){this.spa=this.safeParseAsync,this._def=et,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(et){return getParsedType(et.data)}_getOrReturnCtx(et,tt){return tt||{common:et.parent.common,data:et.data,parsedType:getParsedType(et.data),schemaErrorMap:this._def.errorMap,path:et.path,parent:et.parent}}_processInputParams(et){return{status:new ParseStatus,ctx:{common:et.parent.common,data:et.data,parsedType:getParsedType(et.data),schemaErrorMap:this._def.errorMap,path:et.path,parent:et.parent}}}_parseSync(et){const tt=this._parse(et);if(isAsync(tt))throw new Error("Synchronous parse encountered promise.");return tt}_parseAsync(et){const tt=this._parse(et);return Promise.resolve(tt)}parse(et,tt){const nt=this.safeParse(et,tt);if(nt.success)return nt.data;throw nt.error}safeParse(et,tt){var nt;const rt={common:{issues:[],async:(nt=tt==null?void 0:tt.async)!==null&&nt!==void 0?nt:!1,contextualErrorMap:tt==null?void 0:tt.errorMap},path:(tt==null?void 0:tt.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:et,parsedType:getParsedType(et)},at=this._parseSync({data:et,path:rt.path,parent:rt});return handleResult(rt,at)}async parseAsync(et,tt){const nt=await this.safeParseAsync(et,tt);if(nt.success)return nt.data;throw nt.error}async safeParseAsync(et,tt){const nt={common:{issues:[],contextualErrorMap:tt==null?void 0:tt.errorMap,async:!0},path:(tt==null?void 0:tt.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:et,parsedType:getParsedType(et)},rt=this._parse({data:et,path:nt.path,parent:nt}),at=await(isAsync(rt)?rt:Promise.resolve(rt));return handleResult(nt,at)}refine(et,tt){const nt=rt=>typeof tt=="string"||typeof tt>"u"?{message:tt}:typeof tt=="function"?tt(rt):tt;return this._refinement((rt,at)=>{const it=et(rt),ot=()=>at.addIssue({code:ZodIssueCode.custom,...nt(rt)});return typeof Promise<"u"&&it instanceof Promise?it.then(st=>st?!0:(ot(),!1)):it?!0:(ot(),!1)})}refinement(et,tt){return this._refinement((nt,rt)=>et(nt)?!0:(rt.addIssue(typeof tt=="function"?tt(nt,rt):tt),!1))}_refinement(et){return new ZodEffects({schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"refinement",refinement:et}})}superRefine(et){return this._refinement(et)}optional(){return ZodOptional.create(this,this._def)}nullable(){return ZodNullable.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ZodArray.create(this,this._def)}promise(){return ZodPromise.create(this,this._def)}or(et){return ZodUnion.create([this,et],this._def)}and(et){return ZodIntersection.create(this,et,this._def)}transform(et){return new ZodEffects({...processCreateParams(this._def),schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"transform",transform:et}})}default(et){const tt=typeof et=="function"?et:()=>et;return new ZodDefault({...processCreateParams(this._def),innerType:this,defaultValue:tt,typeName:ZodFirstPartyTypeKind.ZodDefault})}brand(){return new ZodBranded({typeName:ZodFirstPartyTypeKind.ZodBranded,type:this,...processCreateParams(this._def)})}catch(et){const tt=typeof et=="function"?et:()=>et;return new ZodCatch({...processCreateParams(this._def),innerType:this,catchValue:tt,typeName:ZodFirstPartyTypeKind.ZodCatch})}describe(et){const tt=this.constructor;return new tt({...this._def,description:et})}pipe(et){return ZodPipeline.create(this,et)}readonly(){return ZodReadonly.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const cuidRegex=/^c[^\s-]{8,}$/i,cuid2Regex=/^[a-z][a-z0-9]*$/,ulidRegex=/[0-9A-HJKMNP-TV-Z]{26}/,uuidRegex=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,emailRegex=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,emojiRegex=/^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u,ipv4Regex=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,ipv6Regex=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,datetimeRegex=_e=>_e.precision?_e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${_e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${_e.precision}}Z$`):_e.precision===0?_e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):_e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function isValidIP(_e,et){return!!((et==="v4"||!et)&&ipv4Regex.test(_e)||(et==="v6"||!et)&&ipv6Regex.test(_e))}class ZodString extends ZodType{constructor(){super(...arguments),this._regex=(et,tt,nt)=>this.refinement(rt=>et.test(rt),{validation:tt,code:ZodIssueCode.invalid_string,...errorUtil.errToObj(nt)}),this.nonempty=et=>this.min(1,errorUtil.errToObj(et)),this.trim=()=>new ZodString({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new ZodString({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new ZodString({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(et){if(this._def.coerce&&(et.data=String(et.data)),this._getType(et)!==ZodParsedType.string){const at=this._getOrReturnCtx(et);return addIssueToContext(at,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.string,received:at.parsedType}),INVALID}const nt=new ParseStatus;let rt;for(const at of this._def.checks)if(at.kind==="min")et.data.lengthat.value&&(rt=this._getOrReturnCtx(et,rt),addIssueToContext(rt,{code:ZodIssueCode.too_big,maximum:at.value,type:"string",inclusive:!0,exact:!1,message:at.message}),nt.dirty());else if(at.kind==="length"){const it=et.data.length>at.value,ot=et.data.length"u"?null:et==null?void 0:et.precision,offset:(tt=et==null?void 0:et.offset)!==null&&tt!==void 0?tt:!1,...errorUtil.errToObj(et==null?void 0:et.message)})}regex(et,tt){return this._addCheck({kind:"regex",regex:et,...errorUtil.errToObj(tt)})}includes(et,tt){return this._addCheck({kind:"includes",value:et,position:tt==null?void 0:tt.position,...errorUtil.errToObj(tt==null?void 0:tt.message)})}startsWith(et,tt){return this._addCheck({kind:"startsWith",value:et,...errorUtil.errToObj(tt)})}endsWith(et,tt){return this._addCheck({kind:"endsWith",value:et,...errorUtil.errToObj(tt)})}min(et,tt){return this._addCheck({kind:"min",value:et,...errorUtil.errToObj(tt)})}max(et,tt){return this._addCheck({kind:"max",value:et,...errorUtil.errToObj(tt)})}length(et,tt){return this._addCheck({kind:"length",value:et,...errorUtil.errToObj(tt)})}get isDatetime(){return!!this._def.checks.find(et=>et.kind==="datetime")}get isEmail(){return!!this._def.checks.find(et=>et.kind==="email")}get isURL(){return!!this._def.checks.find(et=>et.kind==="url")}get isEmoji(){return!!this._def.checks.find(et=>et.kind==="emoji")}get isUUID(){return!!this._def.checks.find(et=>et.kind==="uuid")}get isCUID(){return!!this._def.checks.find(et=>et.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(et=>et.kind==="cuid2")}get isULID(){return!!this._def.checks.find(et=>et.kind==="ulid")}get isIP(){return!!this._def.checks.find(et=>et.kind==="ip")}get minLength(){let et=null;for(const tt of this._def.checks)tt.kind==="min"&&(et===null||tt.value>et)&&(et=tt.value);return et}get maxLength(){let et=null;for(const tt of this._def.checks)tt.kind==="max"&&(et===null||tt.value{var et;return new ZodString({checks:[],typeName:ZodFirstPartyTypeKind.ZodString,coerce:(et=_e==null?void 0:_e.coerce)!==null&&et!==void 0?et:!1,...processCreateParams(_e)})};function floatSafeRemainder(_e,et){const tt=(_e.toString().split(".")[1]||"").length,nt=(et.toString().split(".")[1]||"").length,rt=tt>nt?tt:nt,at=parseInt(_e.toFixed(rt).replace(".","")),it=parseInt(et.toFixed(rt).replace(".",""));return at%it/Math.pow(10,rt)}class ZodNumber extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(et){if(this._def.coerce&&(et.data=Number(et.data)),this._getType(et)!==ZodParsedType.number){const at=this._getOrReturnCtx(et);return addIssueToContext(at,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.number,received:at.parsedType}),INVALID}let nt;const rt=new ParseStatus;for(const at of this._def.checks)at.kind==="int"?util.isInteger(et.data)||(nt=this._getOrReturnCtx(et,nt),addIssueToContext(nt,{code:ZodIssueCode.invalid_type,expected:"integer",received:"float",message:at.message}),rt.dirty()):at.kind==="min"?(at.inclusive?et.dataat.value:et.data>=at.value)&&(nt=this._getOrReturnCtx(et,nt),addIssueToContext(nt,{code:ZodIssueCode.too_big,maximum:at.value,type:"number",inclusive:at.inclusive,exact:!1,message:at.message}),rt.dirty()):at.kind==="multipleOf"?floatSafeRemainder(et.data,at.value)!==0&&(nt=this._getOrReturnCtx(et,nt),addIssueToContext(nt,{code:ZodIssueCode.not_multiple_of,multipleOf:at.value,message:at.message}),rt.dirty()):at.kind==="finite"?Number.isFinite(et.data)||(nt=this._getOrReturnCtx(et,nt),addIssueToContext(nt,{code:ZodIssueCode.not_finite,message:at.message}),rt.dirty()):util.assertNever(at);return{status:rt.value,value:et.data}}gte(et,tt){return this.setLimit("min",et,!0,errorUtil.toString(tt))}gt(et,tt){return this.setLimit("min",et,!1,errorUtil.toString(tt))}lte(et,tt){return this.setLimit("max",et,!0,errorUtil.toString(tt))}lt(et,tt){return this.setLimit("max",et,!1,errorUtil.toString(tt))}setLimit(et,tt,nt,rt){return new ZodNumber({...this._def,checks:[...this._def.checks,{kind:et,value:tt,inclusive:nt,message:errorUtil.toString(rt)}]})}_addCheck(et){return new ZodNumber({...this._def,checks:[...this._def.checks,et]})}int(et){return this._addCheck({kind:"int",message:errorUtil.toString(et)})}positive(et){return this._addCheck({kind:"min",value:0,inclusive:!1,message:errorUtil.toString(et)})}negative(et){return this._addCheck({kind:"max",value:0,inclusive:!1,message:errorUtil.toString(et)})}nonpositive(et){return this._addCheck({kind:"max",value:0,inclusive:!0,message:errorUtil.toString(et)})}nonnegative(et){return this._addCheck({kind:"min",value:0,inclusive:!0,message:errorUtil.toString(et)})}multipleOf(et,tt){return this._addCheck({kind:"multipleOf",value:et,message:errorUtil.toString(tt)})}finite(et){return this._addCheck({kind:"finite",message:errorUtil.toString(et)})}safe(et){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:errorUtil.toString(et)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:errorUtil.toString(et)})}get minValue(){let et=null;for(const tt of this._def.checks)tt.kind==="min"&&(et===null||tt.value>et)&&(et=tt.value);return et}get maxValue(){let et=null;for(const tt of this._def.checks)tt.kind==="max"&&(et===null||tt.valueet.kind==="int"||et.kind==="multipleOf"&&util.isInteger(et.value))}get isFinite(){let et=null,tt=null;for(const nt of this._def.checks){if(nt.kind==="finite"||nt.kind==="int"||nt.kind==="multipleOf")return!0;nt.kind==="min"?(tt===null||nt.value>tt)&&(tt=nt.value):nt.kind==="max"&&(et===null||nt.valuenew ZodNumber({checks:[],typeName:ZodFirstPartyTypeKind.ZodNumber,coerce:(_e==null?void 0:_e.coerce)||!1,...processCreateParams(_e)});class ZodBigInt extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(et){if(this._def.coerce&&(et.data=BigInt(et.data)),this._getType(et)!==ZodParsedType.bigint){const at=this._getOrReturnCtx(et);return addIssueToContext(at,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.bigint,received:at.parsedType}),INVALID}let nt;const rt=new ParseStatus;for(const at of this._def.checks)at.kind==="min"?(at.inclusive?et.dataat.value:et.data>=at.value)&&(nt=this._getOrReturnCtx(et,nt),addIssueToContext(nt,{code:ZodIssueCode.too_big,type:"bigint",maximum:at.value,inclusive:at.inclusive,message:at.message}),rt.dirty()):at.kind==="multipleOf"?et.data%at.value!==BigInt(0)&&(nt=this._getOrReturnCtx(et,nt),addIssueToContext(nt,{code:ZodIssueCode.not_multiple_of,multipleOf:at.value,message:at.message}),rt.dirty()):util.assertNever(at);return{status:rt.value,value:et.data}}gte(et,tt){return this.setLimit("min",et,!0,errorUtil.toString(tt))}gt(et,tt){return this.setLimit("min",et,!1,errorUtil.toString(tt))}lte(et,tt){return this.setLimit("max",et,!0,errorUtil.toString(tt))}lt(et,tt){return this.setLimit("max",et,!1,errorUtil.toString(tt))}setLimit(et,tt,nt,rt){return new ZodBigInt({...this._def,checks:[...this._def.checks,{kind:et,value:tt,inclusive:nt,message:errorUtil.toString(rt)}]})}_addCheck(et){return new ZodBigInt({...this._def,checks:[...this._def.checks,et]})}positive(et){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:errorUtil.toString(et)})}negative(et){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:errorUtil.toString(et)})}nonpositive(et){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:errorUtil.toString(et)})}nonnegative(et){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:errorUtil.toString(et)})}multipleOf(et,tt){return this._addCheck({kind:"multipleOf",value:et,message:errorUtil.toString(tt)})}get minValue(){let et=null;for(const tt of this._def.checks)tt.kind==="min"&&(et===null||tt.value>et)&&(et=tt.value);return et}get maxValue(){let et=null;for(const tt of this._def.checks)tt.kind==="max"&&(et===null||tt.value{var et;return new ZodBigInt({checks:[],typeName:ZodFirstPartyTypeKind.ZodBigInt,coerce:(et=_e==null?void 0:_e.coerce)!==null&&et!==void 0?et:!1,...processCreateParams(_e)})};class ZodBoolean extends ZodType{_parse(et){if(this._def.coerce&&(et.data=!!et.data),this._getType(et)!==ZodParsedType.boolean){const nt=this._getOrReturnCtx(et);return addIssueToContext(nt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.boolean,received:nt.parsedType}),INVALID}return OK(et.data)}}ZodBoolean.create=_e=>new ZodBoolean({typeName:ZodFirstPartyTypeKind.ZodBoolean,coerce:(_e==null?void 0:_e.coerce)||!1,...processCreateParams(_e)});class ZodDate extends ZodType{_parse(et){if(this._def.coerce&&(et.data=new Date(et.data)),this._getType(et)!==ZodParsedType.date){const at=this._getOrReturnCtx(et);return addIssueToContext(at,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.date,received:at.parsedType}),INVALID}if(isNaN(et.data.getTime())){const at=this._getOrReturnCtx(et);return addIssueToContext(at,{code:ZodIssueCode.invalid_date}),INVALID}const nt=new ParseStatus;let rt;for(const at of this._def.checks)at.kind==="min"?et.data.getTime()at.value&&(rt=this._getOrReturnCtx(et,rt),addIssueToContext(rt,{code:ZodIssueCode.too_big,message:at.message,inclusive:!0,exact:!1,maximum:at.value,type:"date"}),nt.dirty()):util.assertNever(at);return{status:nt.value,value:new Date(et.data.getTime())}}_addCheck(et){return new ZodDate({...this._def,checks:[...this._def.checks,et]})}min(et,tt){return this._addCheck({kind:"min",value:et.getTime(),message:errorUtil.toString(tt)})}max(et,tt){return this._addCheck({kind:"max",value:et.getTime(),message:errorUtil.toString(tt)})}get minDate(){let et=null;for(const tt of this._def.checks)tt.kind==="min"&&(et===null||tt.value>et)&&(et=tt.value);return et!=null?new Date(et):null}get maxDate(){let et=null;for(const tt of this._def.checks)tt.kind==="max"&&(et===null||tt.valuenew ZodDate({checks:[],coerce:(_e==null?void 0:_e.coerce)||!1,typeName:ZodFirstPartyTypeKind.ZodDate,...processCreateParams(_e)});class ZodSymbol extends ZodType{_parse(et){if(this._getType(et)!==ZodParsedType.symbol){const nt=this._getOrReturnCtx(et);return addIssueToContext(nt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.symbol,received:nt.parsedType}),INVALID}return OK(et.data)}}ZodSymbol.create=_e=>new ZodSymbol({typeName:ZodFirstPartyTypeKind.ZodSymbol,...processCreateParams(_e)});class ZodUndefined extends ZodType{_parse(et){if(this._getType(et)!==ZodParsedType.undefined){const nt=this._getOrReturnCtx(et);return addIssueToContext(nt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.undefined,received:nt.parsedType}),INVALID}return OK(et.data)}}ZodUndefined.create=_e=>new ZodUndefined({typeName:ZodFirstPartyTypeKind.ZodUndefined,...processCreateParams(_e)});class ZodNull extends ZodType{_parse(et){if(this._getType(et)!==ZodParsedType.null){const nt=this._getOrReturnCtx(et);return addIssueToContext(nt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.null,received:nt.parsedType}),INVALID}return OK(et.data)}}ZodNull.create=_e=>new ZodNull({typeName:ZodFirstPartyTypeKind.ZodNull,...processCreateParams(_e)});class ZodAny extends ZodType{constructor(){super(...arguments),this._any=!0}_parse(et){return OK(et.data)}}ZodAny.create=_e=>new ZodAny({typeName:ZodFirstPartyTypeKind.ZodAny,...processCreateParams(_e)});class ZodUnknown extends ZodType{constructor(){super(...arguments),this._unknown=!0}_parse(et){return OK(et.data)}}ZodUnknown.create=_e=>new ZodUnknown({typeName:ZodFirstPartyTypeKind.ZodUnknown,...processCreateParams(_e)});class ZodNever extends ZodType{_parse(et){const tt=this._getOrReturnCtx(et);return addIssueToContext(tt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.never,received:tt.parsedType}),INVALID}}ZodNever.create=_e=>new ZodNever({typeName:ZodFirstPartyTypeKind.ZodNever,...processCreateParams(_e)});class ZodVoid extends ZodType{_parse(et){if(this._getType(et)!==ZodParsedType.undefined){const nt=this._getOrReturnCtx(et);return addIssueToContext(nt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.void,received:nt.parsedType}),INVALID}return OK(et.data)}}ZodVoid.create=_e=>new ZodVoid({typeName:ZodFirstPartyTypeKind.ZodVoid,...processCreateParams(_e)});class ZodArray extends ZodType{_parse(et){const{ctx:tt,status:nt}=this._processInputParams(et),rt=this._def;if(tt.parsedType!==ZodParsedType.array)return addIssueToContext(tt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:tt.parsedType}),INVALID;if(rt.exactLength!==null){const it=tt.data.length>rt.exactLength.value,ot=tt.data.lengthrt.maxLength.value&&(addIssueToContext(tt,{code:ZodIssueCode.too_big,maximum:rt.maxLength.value,type:"array",inclusive:!0,exact:!1,message:rt.maxLength.message}),nt.dirty()),tt.common.async)return Promise.all([...tt.data].map((it,ot)=>rt.type._parseAsync(new ParseInputLazyPath(tt,it,tt.path,ot)))).then(it=>ParseStatus.mergeArray(nt,it));const at=[...tt.data].map((it,ot)=>rt.type._parseSync(new ParseInputLazyPath(tt,it,tt.path,ot)));return ParseStatus.mergeArray(nt,at)}get element(){return this._def.type}min(et,tt){return new ZodArray({...this._def,minLength:{value:et,message:errorUtil.toString(tt)}})}max(et,tt){return new ZodArray({...this._def,maxLength:{value:et,message:errorUtil.toString(tt)}})}length(et,tt){return new ZodArray({...this._def,exactLength:{value:et,message:errorUtil.toString(tt)}})}nonempty(et){return this.min(1,et)}}ZodArray.create=(_e,et)=>new ZodArray({type:_e,minLength:null,maxLength:null,exactLength:null,typeName:ZodFirstPartyTypeKind.ZodArray,...processCreateParams(et)});function deepPartialify(_e){if(_e instanceof ZodObject){const et={};for(const tt in _e.shape){const nt=_e.shape[tt];et[tt]=ZodOptional.create(deepPartialify(nt))}return new ZodObject({..._e._def,shape:()=>et})}else return _e instanceof ZodArray?new ZodArray({..._e._def,type:deepPartialify(_e.element)}):_e instanceof ZodOptional?ZodOptional.create(deepPartialify(_e.unwrap())):_e instanceof ZodNullable?ZodNullable.create(deepPartialify(_e.unwrap())):_e instanceof ZodTuple?ZodTuple.create(_e.items.map(et=>deepPartialify(et))):_e}class ZodObject extends ZodType{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const et=this._def.shape(),tt=util.objectKeys(et);return this._cached={shape:et,keys:tt}}_parse(et){if(this._getType(et)!==ZodParsedType.object){const ct=this._getOrReturnCtx(et);return addIssueToContext(ct,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:ct.parsedType}),INVALID}const{status:nt,ctx:rt}=this._processInputParams(et),{shape:at,keys:it}=this._getCached(),ot=[];if(!(this._def.catchall instanceof ZodNever&&this._def.unknownKeys==="strip"))for(const ct in rt.data)it.includes(ct)||ot.push(ct);const st=[];for(const ct of it){const ut=at[ct],dt=rt.data[ct];st.push({key:{status:"valid",value:ct},value:ut._parse(new ParseInputLazyPath(rt,dt,rt.path,ct)),alwaysSet:ct in rt.data})}if(this._def.catchall instanceof ZodNever){const ct=this._def.unknownKeys;if(ct==="passthrough")for(const ut of ot)st.push({key:{status:"valid",value:ut},value:{status:"valid",value:rt.data[ut]}});else if(ct==="strict")ot.length>0&&(addIssueToContext(rt,{code:ZodIssueCode.unrecognized_keys,keys:ot}),nt.dirty());else if(ct!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const ct=this._def.catchall;for(const ut of ot){const dt=rt.data[ut];st.push({key:{status:"valid",value:ut},value:ct._parse(new ParseInputLazyPath(rt,dt,rt.path,ut)),alwaysSet:ut in rt.data})}}return rt.common.async?Promise.resolve().then(async()=>{const ct=[];for(const ut of st){const dt=await ut.key;ct.push({key:dt,value:await ut.value,alwaysSet:ut.alwaysSet})}return ct}).then(ct=>ParseStatus.mergeObjectSync(nt,ct)):ParseStatus.mergeObjectSync(nt,st)}get shape(){return this._def.shape()}strict(et){return errorUtil.errToObj,new ZodObject({...this._def,unknownKeys:"strict",...et!==void 0?{errorMap:(tt,nt)=>{var rt,at,it,ot;const st=(it=(at=(rt=this._def).errorMap)===null||at===void 0?void 0:at.call(rt,tt,nt).message)!==null&&it!==void 0?it:nt.defaultError;return tt.code==="unrecognized_keys"?{message:(ot=errorUtil.errToObj(et).message)!==null&&ot!==void 0?ot:st}:{message:st}}}:{}})}strip(){return new ZodObject({...this._def,unknownKeys:"strip"})}passthrough(){return new ZodObject({...this._def,unknownKeys:"passthrough"})}extend(et){return new ZodObject({...this._def,shape:()=>({...this._def.shape(),...et})})}merge(et){return new ZodObject({unknownKeys:et._def.unknownKeys,catchall:et._def.catchall,shape:()=>({...this._def.shape(),...et._def.shape()}),typeName:ZodFirstPartyTypeKind.ZodObject})}setKey(et,tt){return this.augment({[et]:tt})}catchall(et){return new ZodObject({...this._def,catchall:et})}pick(et){const tt={};return util.objectKeys(et).forEach(nt=>{et[nt]&&this.shape[nt]&&(tt[nt]=this.shape[nt])}),new ZodObject({...this._def,shape:()=>tt})}omit(et){const tt={};return util.objectKeys(this.shape).forEach(nt=>{et[nt]||(tt[nt]=this.shape[nt])}),new ZodObject({...this._def,shape:()=>tt})}deepPartial(){return deepPartialify(this)}partial(et){const tt={};return util.objectKeys(this.shape).forEach(nt=>{const rt=this.shape[nt];et&&!et[nt]?tt[nt]=rt:tt[nt]=rt.optional()}),new ZodObject({...this._def,shape:()=>tt})}required(et){const tt={};return util.objectKeys(this.shape).forEach(nt=>{if(et&&!et[nt])tt[nt]=this.shape[nt];else{let at=this.shape[nt];for(;at instanceof ZodOptional;)at=at._def.innerType;tt[nt]=at}}),new ZodObject({...this._def,shape:()=>tt})}keyof(){return createZodEnum(util.objectKeys(this.shape))}}ZodObject.create=(_e,et)=>new ZodObject({shape:()=>_e,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(et)});ZodObject.strictCreate=(_e,et)=>new ZodObject({shape:()=>_e,unknownKeys:"strict",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(et)});ZodObject.lazycreate=(_e,et)=>new ZodObject({shape:_e,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(et)});class ZodUnion extends ZodType{_parse(et){const{ctx:tt}=this._processInputParams(et),nt=this._def.options;function rt(at){for(const ot of at)if(ot.result.status==="valid")return ot.result;for(const ot of at)if(ot.result.status==="dirty")return tt.common.issues.push(...ot.ctx.common.issues),ot.result;const it=at.map(ot=>new ZodError(ot.ctx.common.issues));return addIssueToContext(tt,{code:ZodIssueCode.invalid_union,unionErrors:it}),INVALID}if(tt.common.async)return Promise.all(nt.map(async at=>{const it={...tt,common:{...tt.common,issues:[]},parent:null};return{result:await at._parseAsync({data:tt.data,path:tt.path,parent:it}),ctx:it}})).then(rt);{let at;const it=[];for(const st of nt){const ct={...tt,common:{...tt.common,issues:[]},parent:null},ut=st._parseSync({data:tt.data,path:tt.path,parent:ct});if(ut.status==="valid")return ut;ut.status==="dirty"&&!at&&(at={result:ut,ctx:ct}),ct.common.issues.length&&it.push(ct.common.issues)}if(at)return tt.common.issues.push(...at.ctx.common.issues),at.result;const ot=it.map(st=>new ZodError(st));return addIssueToContext(tt,{code:ZodIssueCode.invalid_union,unionErrors:ot}),INVALID}}get options(){return this._def.options}}ZodUnion.create=(_e,et)=>new ZodUnion({options:_e,typeName:ZodFirstPartyTypeKind.ZodUnion,...processCreateParams(et)});const getDiscriminator=_e=>_e instanceof ZodLazy?getDiscriminator(_e.schema):_e instanceof ZodEffects?getDiscriminator(_e.innerType()):_e instanceof ZodLiteral?[_e.value]:_e instanceof ZodEnum?_e.options:_e instanceof ZodNativeEnum?Object.keys(_e.enum):_e instanceof ZodDefault?getDiscriminator(_e._def.innerType):_e instanceof ZodUndefined?[void 0]:_e instanceof ZodNull?[null]:null;class ZodDiscriminatedUnion extends ZodType{_parse(et){const{ctx:tt}=this._processInputParams(et);if(tt.parsedType!==ZodParsedType.object)return addIssueToContext(tt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:tt.parsedType}),INVALID;const nt=this.discriminator,rt=tt.data[nt],at=this.optionsMap.get(rt);return at?tt.common.async?at._parseAsync({data:tt.data,path:tt.path,parent:tt}):at._parseSync({data:tt.data,path:tt.path,parent:tt}):(addIssueToContext(tt,{code:ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[nt]}),INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(et,tt,nt){const rt=new Map;for(const at of tt){const it=getDiscriminator(at.shape[et]);if(!it)throw new Error(`A discriminator value for key \`${et}\` could not be extracted from all schema options`);for(const ot of it){if(rt.has(ot))throw new Error(`Discriminator property ${String(et)} has duplicate value ${String(ot)}`);rt.set(ot,at)}}return new ZodDiscriminatedUnion({typeName:ZodFirstPartyTypeKind.ZodDiscriminatedUnion,discriminator:et,options:tt,optionsMap:rt,...processCreateParams(nt)})}}function mergeValues(_e,et){const tt=getParsedType(_e),nt=getParsedType(et);if(_e===et)return{valid:!0,data:_e};if(tt===ZodParsedType.object&&nt===ZodParsedType.object){const rt=util.objectKeys(et),at=util.objectKeys(_e).filter(ot=>rt.indexOf(ot)!==-1),it={..._e,...et};for(const ot of at){const st=mergeValues(_e[ot],et[ot]);if(!st.valid)return{valid:!1};it[ot]=st.data}return{valid:!0,data:it}}else if(tt===ZodParsedType.array&&nt===ZodParsedType.array){if(_e.length!==et.length)return{valid:!1};const rt=[];for(let at=0;at<_e.length;at++){const it=_e[at],ot=et[at],st=mergeValues(it,ot);if(!st.valid)return{valid:!1};rt.push(st.data)}return{valid:!0,data:rt}}else return tt===ZodParsedType.date&&nt===ZodParsedType.date&&+_e==+et?{valid:!0,data:_e}:{valid:!1}}class ZodIntersection extends ZodType{_parse(et){const{status:tt,ctx:nt}=this._processInputParams(et),rt=(at,it)=>{if(isAborted(at)||isAborted(it))return INVALID;const ot=mergeValues(at.value,it.value);return ot.valid?((isDirty(at)||isDirty(it))&&tt.dirty(),{status:tt.value,value:ot.data}):(addIssueToContext(nt,{code:ZodIssueCode.invalid_intersection_types}),INVALID)};return nt.common.async?Promise.all([this._def.left._parseAsync({data:nt.data,path:nt.path,parent:nt}),this._def.right._parseAsync({data:nt.data,path:nt.path,parent:nt})]).then(([at,it])=>rt(at,it)):rt(this._def.left._parseSync({data:nt.data,path:nt.path,parent:nt}),this._def.right._parseSync({data:nt.data,path:nt.path,parent:nt}))}}ZodIntersection.create=(_e,et,tt)=>new ZodIntersection({left:_e,right:et,typeName:ZodFirstPartyTypeKind.ZodIntersection,...processCreateParams(tt)});class ZodTuple extends ZodType{_parse(et){const{status:tt,ctx:nt}=this._processInputParams(et);if(nt.parsedType!==ZodParsedType.array)return addIssueToContext(nt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:nt.parsedType}),INVALID;if(nt.data.lengththis._def.items.length&&(addIssueToContext(nt,{code:ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),tt.dirty());const at=[...nt.data].map((it,ot)=>{const st=this._def.items[ot]||this._def.rest;return st?st._parse(new ParseInputLazyPath(nt,it,nt.path,ot)):null}).filter(it=>!!it);return nt.common.async?Promise.all(at).then(it=>ParseStatus.mergeArray(tt,it)):ParseStatus.mergeArray(tt,at)}get items(){return this._def.items}rest(et){return new ZodTuple({...this._def,rest:et})}}ZodTuple.create=(_e,et)=>{if(!Array.isArray(_e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ZodTuple({items:_e,typeName:ZodFirstPartyTypeKind.ZodTuple,rest:null,...processCreateParams(et)})};class ZodRecord extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(et){const{status:tt,ctx:nt}=this._processInputParams(et);if(nt.parsedType!==ZodParsedType.object)return addIssueToContext(nt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:nt.parsedType}),INVALID;const rt=[],at=this._def.keyType,it=this._def.valueType;for(const ot in nt.data)rt.push({key:at._parse(new ParseInputLazyPath(nt,ot,nt.path,ot)),value:it._parse(new ParseInputLazyPath(nt,nt.data[ot],nt.path,ot))});return nt.common.async?ParseStatus.mergeObjectAsync(tt,rt):ParseStatus.mergeObjectSync(tt,rt)}get element(){return this._def.valueType}static create(et,tt,nt){return tt instanceof ZodType?new ZodRecord({keyType:et,valueType:tt,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(nt)}):new ZodRecord({keyType:ZodString.create(),valueType:et,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(tt)})}}class ZodMap extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(et){const{status:tt,ctx:nt}=this._processInputParams(et);if(nt.parsedType!==ZodParsedType.map)return addIssueToContext(nt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.map,received:nt.parsedType}),INVALID;const rt=this._def.keyType,at=this._def.valueType,it=[...nt.data.entries()].map(([ot,st],ct)=>({key:rt._parse(new ParseInputLazyPath(nt,ot,nt.path,[ct,"key"])),value:at._parse(new ParseInputLazyPath(nt,st,nt.path,[ct,"value"]))}));if(nt.common.async){const ot=new Map;return Promise.resolve().then(async()=>{for(const st of it){const ct=await st.key,ut=await st.value;if(ct.status==="aborted"||ut.status==="aborted")return INVALID;(ct.status==="dirty"||ut.status==="dirty")&&tt.dirty(),ot.set(ct.value,ut.value)}return{status:tt.value,value:ot}})}else{const ot=new Map;for(const st of it){const ct=st.key,ut=st.value;if(ct.status==="aborted"||ut.status==="aborted")return INVALID;(ct.status==="dirty"||ut.status==="dirty")&&tt.dirty(),ot.set(ct.value,ut.value)}return{status:tt.value,value:ot}}}}ZodMap.create=(_e,et,tt)=>new ZodMap({valueType:et,keyType:_e,typeName:ZodFirstPartyTypeKind.ZodMap,...processCreateParams(tt)});class ZodSet extends ZodType{_parse(et){const{status:tt,ctx:nt}=this._processInputParams(et);if(nt.parsedType!==ZodParsedType.set)return addIssueToContext(nt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.set,received:nt.parsedType}),INVALID;const rt=this._def;rt.minSize!==null&&nt.data.sizert.maxSize.value&&(addIssueToContext(nt,{code:ZodIssueCode.too_big,maximum:rt.maxSize.value,type:"set",inclusive:!0,exact:!1,message:rt.maxSize.message}),tt.dirty());const at=this._def.valueType;function it(st){const ct=new Set;for(const ut of st){if(ut.status==="aborted")return INVALID;ut.status==="dirty"&&tt.dirty(),ct.add(ut.value)}return{status:tt.value,value:ct}}const ot=[...nt.data.values()].map((st,ct)=>at._parse(new ParseInputLazyPath(nt,st,nt.path,ct)));return nt.common.async?Promise.all(ot).then(st=>it(st)):it(ot)}min(et,tt){return new ZodSet({...this._def,minSize:{value:et,message:errorUtil.toString(tt)}})}max(et,tt){return new ZodSet({...this._def,maxSize:{value:et,message:errorUtil.toString(tt)}})}size(et,tt){return this.min(et,tt).max(et,tt)}nonempty(et){return this.min(1,et)}}ZodSet.create=(_e,et)=>new ZodSet({valueType:_e,minSize:null,maxSize:null,typeName:ZodFirstPartyTypeKind.ZodSet,...processCreateParams(et)});class ZodFunction extends ZodType{constructor(){super(...arguments),this.validate=this.implement}_parse(et){const{ctx:tt}=this._processInputParams(et);if(tt.parsedType!==ZodParsedType.function)return addIssueToContext(tt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.function,received:tt.parsedType}),INVALID;function nt(ot,st){return makeIssue({data:ot,path:tt.path,errorMaps:[tt.common.contextualErrorMap,tt.schemaErrorMap,getErrorMap(),errorMap].filter(ct=>!!ct),issueData:{code:ZodIssueCode.invalid_arguments,argumentsError:st}})}function rt(ot,st){return makeIssue({data:ot,path:tt.path,errorMaps:[tt.common.contextualErrorMap,tt.schemaErrorMap,getErrorMap(),errorMap].filter(ct=>!!ct),issueData:{code:ZodIssueCode.invalid_return_type,returnTypeError:st}})}const at={errorMap:tt.common.contextualErrorMap},it=tt.data;if(this._def.returns instanceof ZodPromise){const ot=this;return OK(async function(...st){const ct=new ZodError([]),ut=await ot._def.args.parseAsync(st,at).catch(pt=>{throw ct.addIssue(nt(st,pt)),ct}),dt=await Reflect.apply(it,this,ut);return await ot._def.returns._def.type.parseAsync(dt,at).catch(pt=>{throw ct.addIssue(rt(dt,pt)),ct})})}else{const ot=this;return OK(function(...st){const ct=ot._def.args.safeParse(st,at);if(!ct.success)throw new ZodError([nt(st,ct.error)]);const ut=Reflect.apply(it,this,ct.data),dt=ot._def.returns.safeParse(ut,at);if(!dt.success)throw new ZodError([rt(ut,dt.error)]);return dt.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...et){return new ZodFunction({...this._def,args:ZodTuple.create(et).rest(ZodUnknown.create())})}returns(et){return new ZodFunction({...this._def,returns:et})}implement(et){return this.parse(et)}strictImplement(et){return this.parse(et)}static create(et,tt,nt){return new ZodFunction({args:et||ZodTuple.create([]).rest(ZodUnknown.create()),returns:tt||ZodUnknown.create(),typeName:ZodFirstPartyTypeKind.ZodFunction,...processCreateParams(nt)})}}class ZodLazy extends ZodType{get schema(){return this._def.getter()}_parse(et){const{ctx:tt}=this._processInputParams(et);return this._def.getter()._parse({data:tt.data,path:tt.path,parent:tt})}}ZodLazy.create=(_e,et)=>new ZodLazy({getter:_e,typeName:ZodFirstPartyTypeKind.ZodLazy,...processCreateParams(et)});class ZodLiteral extends ZodType{_parse(et){if(et.data!==this._def.value){const tt=this._getOrReturnCtx(et);return addIssueToContext(tt,{received:tt.data,code:ZodIssueCode.invalid_literal,expected:this._def.value}),INVALID}return{status:"valid",value:et.data}}get value(){return this._def.value}}ZodLiteral.create=(_e,et)=>new ZodLiteral({value:_e,typeName:ZodFirstPartyTypeKind.ZodLiteral,...processCreateParams(et)});function createZodEnum(_e,et){return new ZodEnum({values:_e,typeName:ZodFirstPartyTypeKind.ZodEnum,...processCreateParams(et)})}class ZodEnum extends ZodType{_parse(et){if(typeof et.data!="string"){const tt=this._getOrReturnCtx(et),nt=this._def.values;return addIssueToContext(tt,{expected:util.joinValues(nt),received:tt.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(this._def.values.indexOf(et.data)===-1){const tt=this._getOrReturnCtx(et),nt=this._def.values;return addIssueToContext(tt,{received:tt.data,code:ZodIssueCode.invalid_enum_value,options:nt}),INVALID}return OK(et.data)}get options(){return this._def.values}get enum(){const et={};for(const tt of this._def.values)et[tt]=tt;return et}get Values(){const et={};for(const tt of this._def.values)et[tt]=tt;return et}get Enum(){const et={};for(const tt of this._def.values)et[tt]=tt;return et}extract(et){return ZodEnum.create(et)}exclude(et){return ZodEnum.create(this.options.filter(tt=>!et.includes(tt)))}}ZodEnum.create=createZodEnum;class ZodNativeEnum extends ZodType{_parse(et){const tt=util.getValidEnumValues(this._def.values),nt=this._getOrReturnCtx(et);if(nt.parsedType!==ZodParsedType.string&&nt.parsedType!==ZodParsedType.number){const rt=util.objectValues(tt);return addIssueToContext(nt,{expected:util.joinValues(rt),received:nt.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(tt.indexOf(et.data)===-1){const rt=util.objectValues(tt);return addIssueToContext(nt,{received:nt.data,code:ZodIssueCode.invalid_enum_value,options:rt}),INVALID}return OK(et.data)}get enum(){return this._def.values}}ZodNativeEnum.create=(_e,et)=>new ZodNativeEnum({values:_e,typeName:ZodFirstPartyTypeKind.ZodNativeEnum,...processCreateParams(et)});class ZodPromise extends ZodType{unwrap(){return this._def.type}_parse(et){const{ctx:tt}=this._processInputParams(et);if(tt.parsedType!==ZodParsedType.promise&&tt.common.async===!1)return addIssueToContext(tt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.promise,received:tt.parsedType}),INVALID;const nt=tt.parsedType===ZodParsedType.promise?tt.data:Promise.resolve(tt.data);return OK(nt.then(rt=>this._def.type.parseAsync(rt,{path:tt.path,errorMap:tt.common.contextualErrorMap})))}}ZodPromise.create=(_e,et)=>new ZodPromise({type:_e,typeName:ZodFirstPartyTypeKind.ZodPromise,...processCreateParams(et)});class ZodEffects extends ZodType{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ZodFirstPartyTypeKind.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(et){const{status:tt,ctx:nt}=this._processInputParams(et),rt=this._def.effect||null,at={addIssue:it=>{addIssueToContext(nt,it),it.fatal?tt.abort():tt.dirty()},get path(){return nt.path}};if(at.addIssue=at.addIssue.bind(at),rt.type==="preprocess"){const it=rt.transform(nt.data,at);return nt.common.issues.length?{status:"dirty",value:nt.data}:nt.common.async?Promise.resolve(it).then(ot=>this._def.schema._parseAsync({data:ot,path:nt.path,parent:nt})):this._def.schema._parseSync({data:it,path:nt.path,parent:nt})}if(rt.type==="refinement"){const it=ot=>{const st=rt.refinement(ot,at);if(nt.common.async)return Promise.resolve(st);if(st instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return ot};if(nt.common.async===!1){const ot=this._def.schema._parseSync({data:nt.data,path:nt.path,parent:nt});return ot.status==="aborted"?INVALID:(ot.status==="dirty"&&tt.dirty(),it(ot.value),{status:tt.value,value:ot.value})}else return this._def.schema._parseAsync({data:nt.data,path:nt.path,parent:nt}).then(ot=>ot.status==="aborted"?INVALID:(ot.status==="dirty"&&tt.dirty(),it(ot.value).then(()=>({status:tt.value,value:ot.value}))))}if(rt.type==="transform")if(nt.common.async===!1){const it=this._def.schema._parseSync({data:nt.data,path:nt.path,parent:nt});if(!isValid$1(it))return it;const ot=rt.transform(it.value,at);if(ot instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:tt.value,value:ot}}else return this._def.schema._parseAsync({data:nt.data,path:nt.path,parent:nt}).then(it=>isValid$1(it)?Promise.resolve(rt.transform(it.value,at)).then(ot=>({status:tt.value,value:ot})):it);util.assertNever(rt)}}ZodEffects.create=(_e,et,tt)=>new ZodEffects({schema:_e,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:et,...processCreateParams(tt)});ZodEffects.createWithPreprocess=(_e,et,tt)=>new ZodEffects({schema:et,effect:{type:"preprocess",transform:_e},typeName:ZodFirstPartyTypeKind.ZodEffects,...processCreateParams(tt)});class ZodOptional extends ZodType{_parse(et){return this._getType(et)===ZodParsedType.undefined?OK(void 0):this._def.innerType._parse(et)}unwrap(){return this._def.innerType}}ZodOptional.create=(_e,et)=>new ZodOptional({innerType:_e,typeName:ZodFirstPartyTypeKind.ZodOptional,...processCreateParams(et)});class ZodNullable extends ZodType{_parse(et){return this._getType(et)===ZodParsedType.null?OK(null):this._def.innerType._parse(et)}unwrap(){return this._def.innerType}}ZodNullable.create=(_e,et)=>new ZodNullable({innerType:_e,typeName:ZodFirstPartyTypeKind.ZodNullable,...processCreateParams(et)});class ZodDefault extends ZodType{_parse(et){const{ctx:tt}=this._processInputParams(et);let nt=tt.data;return tt.parsedType===ZodParsedType.undefined&&(nt=this._def.defaultValue()),this._def.innerType._parse({data:nt,path:tt.path,parent:tt})}removeDefault(){return this._def.innerType}}ZodDefault.create=(_e,et)=>new ZodDefault({innerType:_e,typeName:ZodFirstPartyTypeKind.ZodDefault,defaultValue:typeof et.default=="function"?et.default:()=>et.default,...processCreateParams(et)});class ZodCatch extends ZodType{_parse(et){const{ctx:tt}=this._processInputParams(et),nt={...tt,common:{...tt.common,issues:[]}},rt=this._def.innerType._parse({data:nt.data,path:nt.path,parent:{...nt}});return isAsync(rt)?rt.then(at=>({status:"valid",value:at.status==="valid"?at.value:this._def.catchValue({get error(){return new ZodError(nt.common.issues)},input:nt.data})})):{status:"valid",value:rt.status==="valid"?rt.value:this._def.catchValue({get error(){return new ZodError(nt.common.issues)},input:nt.data})}}removeCatch(){return this._def.innerType}}ZodCatch.create=(_e,et)=>new ZodCatch({innerType:_e,typeName:ZodFirstPartyTypeKind.ZodCatch,catchValue:typeof et.catch=="function"?et.catch:()=>et.catch,...processCreateParams(et)});class ZodNaN extends ZodType{_parse(et){if(this._getType(et)!==ZodParsedType.nan){const nt=this._getOrReturnCtx(et);return addIssueToContext(nt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.nan,received:nt.parsedType}),INVALID}return{status:"valid",value:et.data}}}ZodNaN.create=_e=>new ZodNaN({typeName:ZodFirstPartyTypeKind.ZodNaN,...processCreateParams(_e)});const BRAND=Symbol("zod_brand");class ZodBranded extends ZodType{_parse(et){const{ctx:tt}=this._processInputParams(et),nt=tt.data;return this._def.type._parse({data:nt,path:tt.path,parent:tt})}unwrap(){return this._def.type}}class ZodPipeline extends ZodType{_parse(et){const{status:tt,ctx:nt}=this._processInputParams(et);if(nt.common.async)return(async()=>{const at=await this._def.in._parseAsync({data:nt.data,path:nt.path,parent:nt});return at.status==="aborted"?INVALID:at.status==="dirty"?(tt.dirty(),DIRTY(at.value)):this._def.out._parseAsync({data:at.value,path:nt.path,parent:nt})})();{const rt=this._def.in._parseSync({data:nt.data,path:nt.path,parent:nt});return rt.status==="aborted"?INVALID:rt.status==="dirty"?(tt.dirty(),{status:"dirty",value:rt.value}):this._def.out._parseSync({data:rt.value,path:nt.path,parent:nt})}}static create(et,tt){return new ZodPipeline({in:et,out:tt,typeName:ZodFirstPartyTypeKind.ZodPipeline})}}class ZodReadonly extends ZodType{_parse(et){const tt=this._def.innerType._parse(et);return isValid$1(tt)&&(tt.value=Object.freeze(tt.value)),tt}}ZodReadonly.create=(_e,et)=>new ZodReadonly({innerType:_e,typeName:ZodFirstPartyTypeKind.ZodReadonly,...processCreateParams(et)});const custom=(_e,et={},tt)=>_e?ZodAny.create().superRefine((nt,rt)=>{var at,it;if(!_e(nt)){const ot=typeof et=="function"?et(nt):typeof et=="string"?{message:et}:et,st=(it=(at=ot.fatal)!==null&&at!==void 0?at:tt)!==null&&it!==void 0?it:!0,ct=typeof ot=="string"?{message:ot}:ot;rt.addIssue({code:"custom",...ct,fatal:st})}}):ZodAny.create(),late={object:ZodObject.lazycreate};var ZodFirstPartyTypeKind;(function(_e){_e.ZodString="ZodString",_e.ZodNumber="ZodNumber",_e.ZodNaN="ZodNaN",_e.ZodBigInt="ZodBigInt",_e.ZodBoolean="ZodBoolean",_e.ZodDate="ZodDate",_e.ZodSymbol="ZodSymbol",_e.ZodUndefined="ZodUndefined",_e.ZodNull="ZodNull",_e.ZodAny="ZodAny",_e.ZodUnknown="ZodUnknown",_e.ZodNever="ZodNever",_e.ZodVoid="ZodVoid",_e.ZodArray="ZodArray",_e.ZodObject="ZodObject",_e.ZodUnion="ZodUnion",_e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",_e.ZodIntersection="ZodIntersection",_e.ZodTuple="ZodTuple",_e.ZodRecord="ZodRecord",_e.ZodMap="ZodMap",_e.ZodSet="ZodSet",_e.ZodFunction="ZodFunction",_e.ZodLazy="ZodLazy",_e.ZodLiteral="ZodLiteral",_e.ZodEnum="ZodEnum",_e.ZodEffects="ZodEffects",_e.ZodNativeEnum="ZodNativeEnum",_e.ZodOptional="ZodOptional",_e.ZodNullable="ZodNullable",_e.ZodDefault="ZodDefault",_e.ZodCatch="ZodCatch",_e.ZodPromise="ZodPromise",_e.ZodBranded="ZodBranded",_e.ZodPipeline="ZodPipeline",_e.ZodReadonly="ZodReadonly"})(ZodFirstPartyTypeKind||(ZodFirstPartyTypeKind={}));const instanceOfType=(_e,et={message:`Input not instance of ${_e.name}`})=>custom(tt=>tt instanceof _e,et),stringType=ZodString.create,numberType=ZodNumber.create,nanType=ZodNaN.create,bigIntType=ZodBigInt.create,booleanType=ZodBoolean.create,dateType=ZodDate.create,symbolType=ZodSymbol.create,undefinedType=ZodUndefined.create,nullType=ZodNull.create,anyType=ZodAny.create,unknownType=ZodUnknown.create,neverType=ZodNever.create,voidType=ZodVoid.create,arrayType=ZodArray.create,objectType=ZodObject.create,strictObjectType=ZodObject.strictCreate,unionType=ZodUnion.create,discriminatedUnionType=ZodDiscriminatedUnion.create,intersectionType=ZodIntersection.create,tupleType=ZodTuple.create,recordType=ZodRecord.create,mapType=ZodMap.create,setType=ZodSet.create,functionType=ZodFunction.create,lazyType=ZodLazy.create,literalType=ZodLiteral.create,enumType=ZodEnum.create,nativeEnumType=ZodNativeEnum.create,promiseType=ZodPromise.create,effectsType=ZodEffects.create,optionalType=ZodOptional.create,nullableType=ZodNullable.create,preprocessType=ZodEffects.createWithPreprocess,pipelineType=ZodPipeline.create,ostring=()=>stringType().optional(),onumber=()=>numberType().optional(),oboolean=()=>booleanType().optional(),coerce={string:_e=>ZodString.create({..._e,coerce:!0}),number:_e=>ZodNumber.create({..._e,coerce:!0}),boolean:_e=>ZodBoolean.create({..._e,coerce:!0}),bigint:_e=>ZodBigInt.create({..._e,coerce:!0}),date:_e=>ZodDate.create({..._e,coerce:!0})},NEVER=INVALID;var z$1=Object.freeze({__proto__:null,defaultErrorMap:errorMap,setErrorMap,getErrorMap,makeIssue,EMPTY_PATH,addIssueToContext,ParseStatus,INVALID,DIRTY,OK,isAborted,isDirty,isValid:isValid$1,isAsync,get util(){return util},get objectUtil(){return objectUtil},ZodParsedType,getParsedType,ZodType,ZodString,ZodNumber,ZodBigInt,ZodBoolean,ZodDate,ZodSymbol,ZodUndefined,ZodNull,ZodAny,ZodUnknown,ZodNever,ZodVoid,ZodArray,ZodObject,ZodUnion,ZodDiscriminatedUnion,ZodIntersection,ZodTuple,ZodRecord,ZodMap,ZodSet,ZodFunction,ZodLazy,ZodLiteral,ZodEnum,ZodNativeEnum,ZodPromise,ZodEffects,ZodTransformer:ZodEffects,ZodOptional,ZodNullable,ZodDefault,ZodCatch,ZodNaN,BRAND,ZodBranded,ZodPipeline,ZodReadonly,custom,Schema:ZodType,ZodSchema:ZodType,late,get ZodFirstPartyTypeKind(){return ZodFirstPartyTypeKind},coerce,any:anyType,array:arrayType,bigint:bigIntType,boolean:booleanType,date:dateType,discriminatedUnion:discriminatedUnionType,effect:effectsType,enum:enumType,function:functionType,instanceof:instanceOfType,intersection:intersectionType,lazy:lazyType,literal:literalType,map:mapType,nan:nanType,nativeEnum:nativeEnumType,never:neverType,null:nullType,nullable:nullableType,number:numberType,object:objectType,oboolean,onumber,optional:optionalType,ostring,pipeline:pipelineType,preprocess:preprocessType,promise:promiseType,record:recordType,set:setType,strictObject:strictObjectType,string:stringType,symbol:symbolType,transformer:effectsType,tuple:tupleType,undefined:undefinedType,union:unionType,unknown:unknownType,void:voidType,NEVER,ZodIssueCode,quotelessJson,ZodError}),types$1={Other:0,CR:1,LF:2,Control:4,Extend:8,ZWJ:16,Regional_Indicator:32,Prepend:64,SpacingMark:128,L:256,V:512,T:1024,LV:2048,LVT:4096,Extended_Pictographic:8192};const data$2="ABAOAAAAAACwiAAAAYkHdvjtnH+IFkUYxx/v3vPe7uw8UkjsD43ChKICDQsT3iIJy4gSiZAjkn5JUFlaiFmjccT9ESkpGBGVIlQgWSkY/QDBoMgrQv0jRJDAfkCXhUmgRX23d4ebnndmd3Z3ZnfVeeDDzM7MPs8zv57Zd2+5hd1Ed4ClYAisBuuUsqLpMHgJjIBNFu1fBW8l1O8AO8Ee8Cn4HIyCg+CI0u4Y+AmMgVPgDOhuEHWBPjAZXAy2gjfA9kb73hlx+i7SK8AHYDf4BOwHB8AoOAyOguPgB/ArOKlcnwHdPe32/Uin9LTvvwTph0gv62nbubKnXT+nZ1z/DcjfFF8vQno7uEaxH923BGVXN9v5Zcgvj/VFPIT8Y/H1k0jXxPn1SEfARjBdab8V+TfB22CXUh5xd3OcZTH3g6di1LZJbLNs55q96M9n4J9Gm6hsfzQvcT8fbfy//TyUf8vG4Lses/5jcd2PSE/IcQan4/o/UXYadE0kaoJBMG1ivNbidNbETr1XoWyuplwyHFN0fFai/8/EY7BIKY/68EpCvwP+mc/m/2vNGnBhp1eZ51bCmgsEAoFAIBAIBAKBQKAO3Irfrg3lfc4qi/cXd+Kee5TfvAd6ieY0ie5D2cNx+eNInwZLmu33gWuRn4/8C3H9CNJNYEt8/TrS35HuSPktvRP1z0LPOvAceB4IsB5saIa6UBfqQl2oc123AjwBVjWrP7MCgcC5y/ue/56yqXv87+qcIU2Z+ny8tuHHpyxsvrDNITDXgqkDRJcPdJY/wMo24/oQmDqZaPHkdplAuhv8ApqDRDeCVj/OAvD9BUSX9qF8Qpt7lTxnZ7+5TmVtrGMM7XchP3sS0SNgGzg4yU5HIBAIBM5NfsO5QDgfjuM54STOw7/Az/F3QtfhfF4Qn9F/gxMouxm/WU7F9afBQuUM7+rtPF+jb0b6ese/I7sI+emadhEzUT5bqbsW+esNbSMWoG6hWo/8gOLPUqUu+v5rKEHX8oS6iEXQexd7XlmBe1aCNWAp6kSsYyjHc82Liv2Xkd/C/HkN1w/Geren+KryToa2PtlQg2c9zijGZnGJ9kaibzZh84jmmfx4TeYpK9H3usMKqxnDCWxsdLY/3ygy9h+l/LYbYHtuXw2/rfsSPo0a/Jrn6PvPrzL2+7CmfV88lkc9j+F7cRzYU4N48DF8uA3n/T7Fly9q4Jdvoth0uLf9LORC11hvO/0D6RnQfRa99+2Hr1NS/M26VvfEe2jaWTAOvG8zzgKf8zCrYL++qUEfbumeQAjTVnQp+QmW99gQpDoJ4+9uHZe5/l3OW/M8x6WUZaduUvUc5p13NTXlz3VpGbCVrGNe5zOnjvGlrDWY1IdWShuuQ9fWh6h+VSV1Wit1lvNhHFz1zeUYtCg5ntvOSStDW5cITRnF5RJ+rcasJHExztwu910tl6LzLYsvuvvzilB0mvSaxt/V+SY0EMurfkjbrTjfInf+FJGkNdzSlOukZaDo3snqs7RZpqj2Gx7sS52D5O79k+93W2W/T3NhQxe3VeF16pwn4eI8qev7Sl1s0PnPy5PalSV57Pp6XuDxrypR9wBR8nOCzm/eXuYp5d4s/lV1XvL+lG2b+2AaQ1nPr23Hrc7z0WT5qvZL0v7QtdX5zdu6HMei+gV1ri8et4XSVpCfdeB7fRWNRy79UP0RCT4Jyre/88bbKsQUawUrV69dxjd+nlXxbCKos79pz1BpOqucz0gEdZ5hMk+aa7Wdy/7xZ5Yqhc+nyHivrkyQ/reM7tziuFojfM7zxtq0505XYutvHrtVnzNl2ONrTGdPkLv9ZjNHOoShnCh5nLLYKOKfK4qK7bjx/gqyj9lFJc2Wz/HIqyMSYaGnqM8+xp6vB1/6feg22UmLFUno1rurvelz7yT1UVfORW3L7+d6fMcAXdzxIVK3TNNioZpSyj2242izpky6y5S0fpr6q5ZXJT7O1qrmQRVB+rkQ1Dk3vvYttyGoc+51/mUVkYLtXvTx7MCvbUnzW2czyR8pql4XUlbcN9l1pSfPfOl0JV2bylyKoM4959sHQfr9Vpbk2V8u4ry0ndcvH5I1xggP9qVem/PHZL+qeGLrc945tLnHtG/LEtdjr4urxMpM92X1RZDd+pLtsorUydeCaiuvbtdSpQ9l2M4SU01nvI1e35L3uS5Jlw8pe1ykCKo2JtrGK9O9ujOlimcD6Y9LEWQ+7019d2VDLVPrTCLrsvjsQ1TfJVJM12pZmm5b4Xptx6HM9SpFkP2c6drJa5/iSr+pD7r+CNLvATVfpST1RYog/fwKTdsyxLVNQfnWrkyziGltJK2hLLptzjHXIsh+/HytmyQfpPA5VNtzXWWLzbiVsc9sbWSJ7UWE69KNh6v9kya2c6TzMa0fwpD37TtvQ6wuiw9CA9cny33Mj2pLte9Kp6996HO/83HPQ5r+ov5mvU9Qte/fIrGJP7axPO/9eXX6kjLPKZNd17iyZdOHLP31JSbfXY6hC59c+ZZ136TZ9SFlj6cvmVkSrkSQn3NG5KBqEVSeH6Ji/vvnhFWjSlfFNDwzyMgqLvvKxXffbeASBWo+Zj4p2x6TfwE=",require$$1={data:data$2},data$1="AAACAAAAAACAOAAAAbYBSf7t2S1IBEEYBuDVDZ7FYrQMNsFiu3hgEYOI0SCXRIUrB8JhEZtgs5gEg1GMFk02m82oGI02m+9xezCOczv/uwv3fvAwc/PzfXOzcdqzWdaBDdiGPdiHdjE+DS3RNDuCfsn8idQ/g3OH3BdwKf0e96/gumTfYcncLdzBPTzAo+RZ+f0Cr/AG7/AJX4738x1wtz9FO5PX/50n6UXMNdfg/0lERERERERERERERETpdedHBvDRql4nq0cXtW9af98qdRby0Vvp8K4W0V+C5Xw0t4J2bfjeBp3cnEu1brnnCTYNa7eKdz91XP7WO9Lb4GqRb7cY6xbtAdqeVOsY/QGcevw/tb6OT85YhvfKYEx9CMuxKsKnrs+eJtVInVvHJ0eVYVvTZk2siFVLOCjb61PTZX3MdVWEyP7fjzpmMxdzTyq2Ebue6x61nXRGnzndWpf1an7dXmGYE4Y1ptqqKsK1nu26Ju0ty+maV2Rpvk+qnDZjKUIobUiesdAQE/jmCTmHmsskpFZsVYbtmXRcaoSGUPomunW2derQhDPFjtT1Q/eb8vnm990fq35oHVt11bU9m89c7DNI8Qs=",require$$2={data:data$1};var TINF_OK=0,TINF_DATA_ERROR=-3;function Tree(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function Data(_e,et){this.source=_e,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=et,this.destLen=0,this.ltree=new Tree,this.dtree=new Tree}var sltree=new Tree,sdtree=new Tree,length_bits=new Uint8Array(30),length_base=new Uint16Array(30),dist_bits=new Uint8Array(30),dist_base=new Uint16Array(30),clcidx=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),code_tree=new Tree,lengths=new Uint8Array(288+32);function tinf_build_bits_base(_e,et,tt,nt){var rt,at;for(rt=0;rt>>=1,et}function tinf_read_bits(_e,et,tt){if(!et)return tt;for(;_e.bitcount<24;)_e.tag|=_e.source[_e.sourceIndex++]<<_e.bitcount,_e.bitcount+=8;var nt=_e.tag&65535>>>16-et;return _e.tag>>>=et,_e.bitcount-=et,nt+tt}function tinf_decode_symbol(_e,et){for(;_e.bitcount<24;)_e.tag|=_e.source[_e.sourceIndex++]<<_e.bitcount,_e.bitcount+=8;var tt=0,nt=0,rt=0,at=_e.tag;do nt=2*nt+(at&1),at>>>=1,++rt,tt+=et.table[rt],nt-=et.table[rt];while(nt>=0);return _e.tag=at,_e.bitcount-=rt,et.trans[tt+nt]}function tinf_decode_trees(_e,et,tt){var nt,rt,at,it,ot,st;for(nt=tinf_read_bits(_e,5,257),rt=tinf_read_bits(_e,5,1),at=tinf_read_bits(_e,4,4),it=0;it<19;++it)lengths[it]=0;for(it=0;it8;)_e.sourceIndex--,_e.bitcount-=8;if(et=_e.source[_e.sourceIndex+1],et=256*et+_e.source[_e.sourceIndex],tt=_e.source[_e.sourceIndex+3],tt=256*tt+_e.source[_e.sourceIndex+2],et!==(~tt&65535))return TINF_DATA_ERROR;for(_e.sourceIndex+=4,nt=et;nt;--nt)_e.dest[_e.destLen++]=_e.source[_e.sourceIndex++];return _e.bitcount=0,TINF_OK}function tinf_uncompress(_e,et){var tt=new Data(_e,et),nt,rt,at;do{switch(nt=tinf_getbit(tt),rt=tinf_read_bits(tt,2,0),rt){case 0:at=tinf_inflate_uncompressed_block(tt);break;case 1:at=tinf_inflate_block_data(tt,sltree,sdtree);break;case 2:tinf_decode_trees(tt,tt.ltree,tt.dtree),at=tinf_inflate_block_data(tt,tt.ltree,tt.dtree);break;default:at=TINF_DATA_ERROR}if(at!==TINF_OK)throw new Error("Data error")}while(!nt);return tt.destLen{let nt=_e[et];_e[et]=_e[tt],_e[tt]=nt},swap32=_e=>{const et=_e.length;for(let tt=0;tt{isBigEndian&&swap32(_e)};var swap_1={swap32LE:swap32LE$1};const inflate=tinyInflate,{swap32LE}=swap_1,SHIFT_1=6+5,SHIFT_2=5,SHIFT_1_2=SHIFT_1-SHIFT_2,OMITTED_BMP_INDEX_1_LENGTH=65536>>SHIFT_1,INDEX_2_BLOCK_LENGTH=1<>SHIFT_2,LSCP_INDEX_2_LENGTH=1024>>SHIFT_2,INDEX_2_BMP_LENGTH=LSCP_INDEX_2_OFFSET+LSCP_INDEX_2_LENGTH,UTF8_2B_INDEX_2_OFFSET=INDEX_2_BMP_LENGTH,UTF8_2B_INDEX_2_LENGTH=32,INDEX_1_OFFSET=UTF8_2B_INDEX_2_OFFSET+UTF8_2B_INDEX_2_LENGTH,DATA_GRANULARITY=1<1114111?this.errorValue:et<55296||et>56319&&et<=65535?(tt=(this.data[et>>SHIFT_2]<>SHIFT_2)]<>SHIFT_1)],tt=this.data[tt+(et>>SHIFT_2&INDEX_2_MASK)],tt=(tt<255||(sn=Bt.charCodeAt(_n++))>255||(pn=Bt.charCodeAt(_n++))>255)throw new TypeError("invalid character found");Kt=Wt<<16|sn<<8|pn,mn+=ut[Kt>>18&63]+ut[Kt>>12&63]+ut[Kt>>6&63]+ut[Kt&63]}return hn?mn.slice(0,hn-3)+"===".substring(hn):mn},vt=at?function(Bt){return btoa(Bt)}:it?function(Bt){return Buffer.from(Bt,"binary").toString("base64")}:yt,gt=it?function(Bt){return Buffer.from(Bt).toString("base64")}:function(Bt){for(var Kt=4096,Wt=[],sn=0,pn=Bt.length;sn>>6)+pt(128|Kt&63):pt(224|Kt>>>12&15)+pt(128|Kt>>>6&63)+pt(128|Kt&63)}else{var Kt=65536+(Bt.charCodeAt(0)-55296)*1024+(Bt.charCodeAt(1)-56320);return pt(240|Kt>>>18&7)+pt(128|Kt>>>12&63)+pt(128|Kt>>>6&63)+pt(128|Kt&63)}},$t=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,bt=function(Bt){return Bt.replace($t,Rt)},wt=it?function(Bt){return Buffer.from(Bt,"utf8").toString("base64")}:st?function(Bt){return gt(st.encode(Bt))}:function(Bt){return vt(bt(Bt))},xt=function(Bt,Kt){return Kt===void 0&&(Kt=!1),Kt?ht(wt(Bt)):wt(Bt)},Tt=function(Bt){return xt(Bt,!0)},Ct=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Nt=function(Bt){switch(Bt.length){case 4:var Kt=(7&Bt.charCodeAt(0))<<18|(63&Bt.charCodeAt(1))<<12|(63&Bt.charCodeAt(2))<<6|63&Bt.charCodeAt(3),Wt=Kt-65536;return pt((Wt>>>10)+55296)+pt((Wt&1023)+56320);case 3:return pt((15&Bt.charCodeAt(0))<<12|(63&Bt.charCodeAt(1))<<6|63&Bt.charCodeAt(2));default:return pt((31&Bt.charCodeAt(0))<<6|63&Bt.charCodeAt(1))}},At=function(Bt){return Bt.replace(Ct,Nt)},kt=function(Bt){if(Bt=Bt.replace(/\s+/g,""),!ft.test(Bt))throw new TypeError("malformed base64.");Bt+="==".slice(2-(Bt.length&3));for(var Kt,Wt="",sn,pn,mn=0;mn>16&255):pn===64?pt(Kt>>16&255,Kt>>8&255):pt(Kt>>16&255,Kt>>8&255,Kt&255);return Wt},Pt=rt?function(Bt){return atob(Et(Bt))}:it?function(Bt){return Buffer.from(Bt,"base64").toString("binary")}:kt,Ft=it?function(Bt){return mt(Buffer.from(Bt,"base64"))}:function(Bt){return mt(Pt(Bt).split("").map(function(Kt){return Kt.charCodeAt(0)}))},Dt=function(Bt){return Ft(It(Bt))},Lt=it?function(Bt){return Buffer.from(Bt,"base64").toString("utf8")}:ot?function(Bt){return ot.decode(Ft(Bt))}:function(Bt){return At(Pt(Bt))},It=function(Bt){return Et(Bt.replace(/[-_]/g,function(Kt){return Kt=="-"?"+":"/"}))},Ot=function(Bt){return Lt(It(Bt))},Ut=function(Bt){if(typeof Bt!="string")return!1;var Kt=Bt.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(Kt)||!/[^\s0-9a-zA-Z\-_]/.test(Kt)},jt=function(Bt){return{value:Bt,enumerable:!1,writable:!0,configurable:!0}},zt=function(){var Bt=function(Kt,Wt){return Object.defineProperty(String.prototype,Kt,jt(Wt))};Bt("fromBase64",function(){return Ot(this)}),Bt("toBase64",function(Kt){return xt(this,Kt)}),Bt("toBase64URI",function(){return xt(this,!0)}),Bt("toBase64URL",function(){return xt(this,!0)}),Bt("toUint8Array",function(){return Dt(this)})},Qt=function(){var Bt=function(Kt,Wt){return Object.defineProperty(Uint8Array.prototype,Kt,jt(Wt))};Bt("toBase64",function(Kt){return St(this,Kt)}),Bt("toBase64URI",function(){return St(this,!0)}),Bt("toBase64URL",function(){return St(this,!0)})},Xt=function(){zt(),Qt()},Yt={version:tt,VERSION:nt,atob:Pt,atobPolyfill:kt,btoa:vt,btoaPolyfill:yt,fromBase64:Ot,toBase64:xt,encode:xt,encodeURI:Tt,encodeURL:Tt,utob:bt,btou:At,decode:Ot,isValid:Ut,fromUint8Array:St,toUint8Array:Dt,extendString:zt,extendUint8Array:Qt,extendBuiltins:Xt};return Yt.Base64={},Object.keys(Yt).forEach(function(Bt){return Yt.Base64[Bt]=Yt[Bt]}),Yt})})(base64);var base64Exports=base64.exports;const types=types$1,typeTrieData=require$$1.data,extPictData=require$$2.data,UnicodeTrie=unicodeTrie,Base64=base64Exports.Base64,typeTrie=new UnicodeTrie(Base64.toUint8Array(typeTrieData)),extPict=new UnicodeTrie(Base64.toUint8Array(extPictData));function is$1(_e,et){return(_e&et)!==0}const GB11State={Initial:0,ExtendOrZWJ:1,NotBoundary:2};function nextGraphemeClusterSize(_e,et){const tt=_e.length;let nt=0,rt=GB11State.Initial;for(let at=et;at+165535?2:1,nt.push(at)}for(let at=0;at",":->"],keywords:["laughing","satisfied","happy","joy","lol","haha","glad","XD","laugh"],skins:[{unified:"1f606",native:"😆",x:32,y:26}],version:1},sweat_smile:{id:"sweat_smile",name:"Grinning Face with Sweat",keywords:["smile","hot","happy","laugh","relief"],skins:[{unified:"1f605",native:"😅",x:32,y:25}],version:1},rolling_on_the_floor_laughing:{id:"rolling_on_the_floor_laughing",name:"Rolling on the Floor Laughing",keywords:["face","lol","haha","rofl"],skins:[{unified:"1f923",native:"🤣",x:40,y:15}],version:3},joy:{id:"joy",name:"Face with Tears of Joy",keywords:["cry","weep","happy","happytears","haha"],skins:[{unified:"1f602",native:"😂",x:32,y:22}],version:1},slightly_smiling_face:{id:"slightly_smiling_face",name:"Slightly Smiling Face",emoticons:[":)","(:",":-)"],keywords:["smile"],skins:[{unified:"1f642",native:"🙂",x:33,y:28}],version:1},upside_down_face:{id:"upside_down_face",name:"Upside-Down Face",keywords:["upside","down","flipped","silly","smile"],skins:[{unified:"1f643",native:"🙃",x:33,y:29}],version:1},melting_face:{id:"melting_face",name:"Melting Face",keywords:["hot","heat"],skins:[{unified:"1fae0",native:"🫠",x:55,y:12}],version:14},wink:{id:"wink",name:"Winking Face",emoticons:[";)",";-)"],keywords:["wink","happy","mischievous","secret",";)","smile","eye"],skins:[{unified:"1f609",native:"😉",x:32,y:29}],version:1},blush:{id:"blush",name:"Smiling Face with Smiling Eyes",emoticons:[":)"],keywords:["blush","smile","happy","flushed","crush","embarrassed","shy","joy"],skins:[{unified:"1f60a",native:"😊",x:32,y:30}],version:1},innocent:{id:"innocent",name:"Smiling Face with Halo",keywords:["innocent","angel","heaven"],skins:[{unified:"1f607",native:"😇",x:32,y:27}],version:1},smiling_face_with_3_hearts:{id:"smiling_face_with_3_hearts",name:"Smiling Face with Hearts",keywords:["3","love","like","affection","valentines","infatuation","crush","adore"],skins:[{unified:"1f970",native:"🥰",x:43,y:58}],version:11},heart_eyes:{id:"heart_eyes",name:"Smiling Face with Heart-Eyes",keywords:["heart","eyes","love","like","affection","valentines","infatuation","crush"],skins:[{unified:"1f60d",native:"😍",x:32,y:33}],version:1},"star-struck":{id:"star-struck",name:"Star-Struck",keywords:["star","struck","grinning","face","with","eyes","smile","starry"],skins:[{unified:"1f929",native:"🤩",x:40,y:38}],version:5},kissing_heart:{id:"kissing_heart",name:"Face Blowing a Kiss",emoticons:[":*",":-*"],keywords:["kissing","heart","love","like","affection","valentines","infatuation"],skins:[{unified:"1f618",native:"😘",x:32,y:44}],version:1},kissing:{id:"kissing",name:"Kissing Face",keywords:["love","like","3","valentines","infatuation","kiss"],skins:[{unified:"1f617",native:"😗",x:32,y:43}],version:1},relaxed:{id:"relaxed",name:"Smiling Face",keywords:["relaxed","blush","massage","happiness"],skins:[{unified:"263a-fe0f",native:"☺️",x:57,y:4}],version:1},kissing_closed_eyes:{id:"kissing_closed_eyes",name:"Kissing Face with Closed Eyes",keywords:["love","like","affection","valentines","infatuation","kiss"],skins:[{unified:"1f61a",native:"😚",x:32,y:46}],version:1},kissing_smiling_eyes:{id:"kissing_smiling_eyes",name:"Kissing Face with Smiling Eyes",keywords:["affection","valentines","infatuation","kiss"],skins:[{unified:"1f619",native:"😙",x:32,y:45}],version:1},smiling_face_with_tear:{id:"smiling_face_with_tear",name:"Smiling Face with Tear",keywords:["sad","cry","pretend"],skins:[{unified:"1f972",native:"🥲",x:43,y:60}],version:13},yum:{id:"yum",name:"Face Savoring Food",keywords:["yum","happy","joy","tongue","smile","silly","yummy","nom","delicious","savouring"],skins:[{unified:"1f60b",native:"😋",x:32,y:31}],version:1},stuck_out_tongue:{id:"stuck_out_tongue",name:"Face with Tongue",emoticons:[":p",":-p",":P",":-P",":b",":-b"],keywords:["stuck","out","prank","childish","playful","mischievous","smile"],skins:[{unified:"1f61b",native:"😛",x:32,y:47}],version:1},stuck_out_tongue_winking_eye:{id:"stuck_out_tongue_winking_eye",name:"Winking Face with Tongue",emoticons:[";p",";-p",";b",";-b",";P",";-P"],keywords:["stuck","out","eye","prank","childish","playful","mischievous","smile","wink"],skins:[{unified:"1f61c",native:"😜",x:32,y:48}],version:1},zany_face:{id:"zany_face",name:"Zany Face",keywords:["grinning","with","one","large","and","small","eye","goofy","crazy"],skins:[{unified:"1f92a",native:"🤪",x:40,y:39}],version:5},stuck_out_tongue_closed_eyes:{id:"stuck_out_tongue_closed_eyes",name:"Squinting Face with Tongue",keywords:["stuck","out","closed","eyes","prank","playful","mischievous","smile"],skins:[{unified:"1f61d",native:"😝",x:32,y:49}],version:1},money_mouth_face:{id:"money_mouth_face",name:"Money-Mouth Face",keywords:["money","mouth","rich","dollar"],skins:[{unified:"1f911",native:"🤑",x:38,y:59}],version:1},hugging_face:{id:"hugging_face",name:"Hugging Face",keywords:["smile","hug"],skins:[{unified:"1f917",native:"🤗",x:39,y:4}],version:1},face_with_hand_over_mouth:{id:"face_with_hand_over_mouth",name:"Face with Hand over Mouth",keywords:["smiling","eyes","and","covering","whoops","shock","surprise"],skins:[{unified:"1f92d",native:"🤭",x:40,y:42}],version:5},face_with_open_eyes_and_hand_over_mouth:{id:"face_with_open_eyes_and_hand_over_mouth",name:"Face with Open Eyes and Hand over Mouth",keywords:["silence","secret","shock","surprise"],skins:[{unified:"1fae2",native:"🫢",x:55,y:14}],version:14},face_with_peeking_eye:{id:"face_with_peeking_eye",name:"Face with Peeking Eye",keywords:["scared","frightening","embarrassing"],skins:[{unified:"1fae3",native:"🫣",x:55,y:15}],version:14},shushing_face:{id:"shushing_face",name:"Shushing Face",keywords:["with","finger","covering","closed","lips","quiet","shhh"],skins:[{unified:"1f92b",native:"🤫",x:40,y:40}],version:5},thinking_face:{id:"thinking_face",name:"Thinking Face",keywords:["hmmm","think","consider"],skins:[{unified:"1f914",native:"🤔",x:39,y:1}],version:1},saluting_face:{id:"saluting_face",name:"Saluting Face",keywords:["respect","salute"],skins:[{unified:"1fae1",native:"🫡",x:55,y:13}],version:14},zipper_mouth_face:{id:"zipper_mouth_face",name:"Zipper-Mouth Face",keywords:["zipper","mouth","sealed","secret"],skins:[{unified:"1f910",native:"🤐",x:38,y:58}],version:1},face_with_raised_eyebrow:{id:"face_with_raised_eyebrow",name:"Face with Raised Eyebrow",keywords:["one","distrust","scepticism","disapproval","disbelief","surprise"],skins:[{unified:"1f928",native:"🤨",x:40,y:37}],version:5},neutral_face:{id:"neutral_face",name:"Neutral Face",emoticons:[":|",":-|"],keywords:["indifference","meh",":",""],skins:[{unified:"1f610",native:"😐",x:32,y:36}],version:1},expressionless:{id:"expressionless",name:"Expressionless Face",emoticons:["-_-"],keywords:["indifferent","-","","meh","deadpan"],skins:[{unified:"1f611",native:"😑",x:32,y:37}],version:1},no_mouth:{id:"no_mouth",name:"Face Without Mouth",keywords:["no","hellokitty"],skins:[{unified:"1f636",native:"😶",x:33,y:16}],version:1},dotted_line_face:{id:"dotted_line_face",name:"Dotted Line Face",keywords:["invisible","lonely","isolation","depression"],skins:[{unified:"1fae5",native:"🫥",x:55,y:17}],version:14},face_in_clouds:{id:"face_in_clouds",name:"Face in Clouds",keywords:["shower","steam","dream"],skins:[{unified:"1f636-200d-1f32b-fe0f",native:"😶‍🌫️",x:33,y:15}],version:13.1},smirk:{id:"smirk",name:"Smirking Face",keywords:["smirk","smile","mean","prank","smug","sarcasm"],skins:[{unified:"1f60f",native:"😏",x:32,y:35}],version:1},unamused:{id:"unamused",name:"Unamused Face",emoticons:[":("],keywords:["indifference","bored","straight","serious","sarcasm","unimpressed","skeptical","dubious","side","eye"],skins:[{unified:"1f612",native:"😒",x:32,y:38}],version:1},face_with_rolling_eyes:{id:"face_with_rolling_eyes",name:"Face with Rolling Eyes",keywords:["eyeroll","frustrated"],skins:[{unified:"1f644",native:"🙄",x:33,y:30}],version:1},grimacing:{id:"grimacing",name:"Grimacing Face",keywords:["grimace","teeth"],skins:[{unified:"1f62c",native:"😬",x:33,y:3}],version:1},face_exhaling:{id:"face_exhaling",name:"Face Exhaling",keywords:["relieve","relief","tired","sigh"],skins:[{unified:"1f62e-200d-1f4a8",native:"😮‍💨",x:33,y:5}],version:13.1},lying_face:{id:"lying_face",name:"Lying Face",keywords:["lie","pinocchio"],skins:[{unified:"1f925",native:"🤥",x:40,y:17}],version:3},relieved:{id:"relieved",name:"Relieved Face",keywords:["relaxed","phew","massage","happiness"],skins:[{unified:"1f60c",native:"😌",x:32,y:32}],version:1},pensive:{id:"pensive",name:"Pensive Face",keywords:["sad","depressed","upset"],skins:[{unified:"1f614",native:"😔",x:32,y:40}],version:1},sleepy:{id:"sleepy",name:"Sleepy Face",keywords:["tired","rest","nap"],skins:[{unified:"1f62a",native:"😪",x:33,y:1}],version:1},drooling_face:{id:"drooling_face",name:"Drooling Face",keywords:[],skins:[{unified:"1f924",native:"🤤",x:40,y:16}],version:3},sleeping:{id:"sleeping",name:"Sleeping Face",keywords:["tired","sleepy","night","zzz"],skins:[{unified:"1f634",native:"😴",x:33,y:12}],version:1},mask:{id:"mask",name:"Face with Medical Mask",keywords:["sick","ill","disease"],skins:[{unified:"1f637",native:"😷",x:33,y:17}],version:1},face_with_thermometer:{id:"face_with_thermometer",name:"Face with Thermometer",keywords:["sick","temperature","cold","fever"],skins:[{unified:"1f912",native:"🤒",x:38,y:60}],version:1},face_with_head_bandage:{id:"face_with_head_bandage",name:"Face with Head-Bandage",keywords:["head","bandage","injured","clumsy","hurt"],skins:[{unified:"1f915",native:"🤕",x:39,y:2}],version:1},nauseated_face:{id:"nauseated_face",name:"Nauseated Face",keywords:["vomit","gross","green","sick","throw","up","ill"],skins:[{unified:"1f922",native:"🤢",x:40,y:14}],version:3},face_vomiting:{id:"face_vomiting",name:"Face Vomiting",keywords:["with","open","mouth","sick"],skins:[{unified:"1f92e",native:"🤮",x:40,y:43}],version:5},sneezing_face:{id:"sneezing_face",name:"Sneezing Face",keywords:["gesundheit","sneeze","sick","allergy"],skins:[{unified:"1f927",native:"🤧",x:40,y:36}],version:3},hot_face:{id:"hot_face",name:"Hot Face",keywords:["feverish","heat","red","sweating"],skins:[{unified:"1f975",native:"🥵",x:44,y:2}],version:11},cold_face:{id:"cold_face",name:"Cold Face",keywords:["blue","freezing","frozen","frostbite","icicles"],skins:[{unified:"1f976",native:"🥶",x:44,y:3}],version:11},woozy_face:{id:"woozy_face",name:"Woozy Face",keywords:["dizzy","intoxicated","tipsy","wavy"],skins:[{unified:"1f974",native:"🥴",x:44,y:1}],version:11},dizzy_face:{id:"dizzy_face",name:"Dizzy Face",keywords:["spent","unconscious","xox"],skins:[{unified:"1f635",native:"😵",x:33,y:14}],version:1},face_with_spiral_eyes:{id:"face_with_spiral_eyes",name:"Face with Spiral Eyes",keywords:["sick","ill","confused","nauseous","nausea"],skins:[{unified:"1f635-200d-1f4ab",native:"😵‍💫",x:33,y:13}],version:13.1},exploding_head:{id:"exploding_head",name:"Exploding Head",keywords:["shocked","face","with","mind","blown"],skins:[{unified:"1f92f",native:"🤯",x:40,y:44}],version:5},face_with_cowboy_hat:{id:"face_with_cowboy_hat",name:"Cowboy Hat Face",keywords:["with","cowgirl"],skins:[{unified:"1f920",native:"🤠",x:40,y:12}],version:3},partying_face:{id:"partying_face",name:"Partying Face",keywords:["celebration","woohoo"],skins:[{unified:"1f973",native:"🥳",x:44,y:0}],version:11},disguised_face:{id:"disguised_face",name:"Disguised Face",keywords:["pretent","brows","glasses","moustache"],skins:[{unified:"1f978",native:"🥸",x:44,y:10}],version:13},sunglasses:{id:"sunglasses",name:"Smiling Face with Sunglasses",emoticons:["8)"],keywords:["cool","smile","summer","beach","sunglass"],skins:[{unified:"1f60e",native:"😎",x:32,y:34}],version:1},nerd_face:{id:"nerd_face",name:"Nerd Face",keywords:["nerdy","geek","dork"],skins:[{unified:"1f913",native:"🤓",x:39,y:0}],version:1},face_with_monocle:{id:"face_with_monocle",name:"Face with Monocle",keywords:["stuffy","wealthy"],skins:[{unified:"1f9d0",native:"🧐",x:47,y:11}],version:5},confused:{id:"confused",name:"Confused Face",emoticons:[":\\",":-\\",":/",":-/"],keywords:["indifference","huh","weird","hmmm",":/"],skins:[{unified:"1f615",native:"😕",x:32,y:41}],version:1},face_with_diagonal_mouth:{id:"face_with_diagonal_mouth",name:"Face with Diagonal Mouth",keywords:["skeptic","confuse","frustrated","indifferent"],skins:[{unified:"1fae4",native:"🫤",x:55,y:16}],version:14},worried:{id:"worried",name:"Worried Face",keywords:["concern","nervous",":("],skins:[{unified:"1f61f",native:"😟",x:32,y:51}],version:1},slightly_frowning_face:{id:"slightly_frowning_face",name:"Slightly Frowning Face",keywords:["disappointed","sad","upset"],skins:[{unified:"1f641",native:"🙁",x:33,y:27}],version:1},white_frowning_face:{id:"white_frowning_face",name:"Frowning Face",keywords:["white","sad","upset","frown"],skins:[{unified:"2639-fe0f",native:"☹️",x:57,y:3}],version:1},open_mouth:{id:"open_mouth",name:"Face with Open Mouth",emoticons:[":o",":-o",":O",":-O"],keywords:["surprise","impressed","wow","whoa",":O"],skins:[{unified:"1f62e",native:"😮",x:33,y:6}],version:1},hushed:{id:"hushed",name:"Hushed Face",keywords:["woo","shh"],skins:[{unified:"1f62f",native:"😯",x:33,y:7}],version:1},astonished:{id:"astonished",name:"Astonished Face",keywords:["xox","surprised","poisoned"],skins:[{unified:"1f632",native:"😲",x:33,y:10}],version:1},flushed:{id:"flushed",name:"Flushed Face",keywords:["blush","shy","flattered"],skins:[{unified:"1f633",native:"😳",x:33,y:11}],version:1},pleading_face:{id:"pleading_face",name:"Pleading Face",keywords:["begging","mercy"],skins:[{unified:"1f97a",native:"🥺",x:44,y:12}],version:11},face_holding_back_tears:{id:"face_holding_back_tears",name:"Face Holding Back Tears",keywords:["touched","gratitude"],skins:[{unified:"1f979",native:"🥹",x:44,y:11}],version:14},frowning:{id:"frowning",name:"Frowning Face with Open Mouth",keywords:["aw","what"],skins:[{unified:"1f626",native:"😦",x:32,y:58}],version:1},anguished:{id:"anguished",name:"Anguished Face",emoticons:["D:"],keywords:["stunned","nervous"],skins:[{unified:"1f627",native:"😧",x:32,y:59}],version:1},fearful:{id:"fearful",name:"Fearful Face",keywords:["scared","terrified","nervous","oops","huh"],skins:[{unified:"1f628",native:"😨",x:32,y:60}],version:1},cold_sweat:{id:"cold_sweat",name:"Anxious Face with Sweat",keywords:["cold","nervous"],skins:[{unified:"1f630",native:"😰",x:33,y:8}],version:1},disappointed_relieved:{id:"disappointed_relieved",name:"Sad but Relieved Face",keywords:["disappointed","phew","sweat","nervous"],skins:[{unified:"1f625",native:"😥",x:32,y:57}],version:1},cry:{id:"cry",name:"Crying Face",emoticons:[":'("],keywords:["cry","tears","sad","depressed","upset",":'("],skins:[{unified:"1f622",native:"😢",x:32,y:54}],version:1},sob:{id:"sob",name:"Loudly Crying Face",emoticons:[":'("],keywords:["sob","cry","tears","sad","upset","depressed"],skins:[{unified:"1f62d",native:"😭",x:33,y:4}],version:1},scream:{id:"scream",name:"Face Screaming in Fear",keywords:["scream","munch","scared","omg"],skins:[{unified:"1f631",native:"😱",x:33,y:9}],version:1},confounded:{id:"confounded",name:"Confounded Face",keywords:["confused","sick","unwell","oops",":S"],skins:[{unified:"1f616",native:"😖",x:32,y:42}],version:1},persevere:{id:"persevere",name:"Persevering Face",keywords:["persevere","sick","no","upset","oops"],skins:[{unified:"1f623",native:"😣",x:32,y:55}],version:1},disappointed:{id:"disappointed",name:"Disappointed Face",emoticons:["):",":(",":-("],keywords:["sad","upset","depressed",":("],skins:[{unified:"1f61e",native:"😞",x:32,y:50}],version:1},sweat:{id:"sweat",name:"Face with Cold Sweat",keywords:["downcast","hot","sad","tired","exercise"],skins:[{unified:"1f613",native:"😓",x:32,y:39}],version:1},weary:{id:"weary",name:"Weary Face",keywords:["tired","sleepy","sad","frustrated","upset"],skins:[{unified:"1f629",native:"😩",x:33,y:0}],version:1},tired_face:{id:"tired_face",name:"Tired Face",keywords:["sick","whine","upset","frustrated"],skins:[{unified:"1f62b",native:"😫",x:33,y:2}],version:1},yawning_face:{id:"yawning_face",name:"Yawning Face",keywords:["tired","sleepy"],skins:[{unified:"1f971",native:"🥱",x:43,y:59}],version:12},triumph:{id:"triumph",name:"Face with Look of Triumph",keywords:["steam","from","nose","gas","phew","proud","pride"],skins:[{unified:"1f624",native:"😤",x:32,y:56}],version:1},rage:{id:"rage",name:"Pouting Face",keywords:["rage","angry","mad","hate","despise"],skins:[{unified:"1f621",native:"😡",x:32,y:53}],version:1},angry:{id:"angry",name:"Angry Face",emoticons:[">:(",">:-("],keywords:["mad","annoyed","frustrated"],skins:[{unified:"1f620",native:"😠",x:32,y:52}],version:1},face_with_symbols_on_mouth:{id:"face_with_symbols_on_mouth",name:"Face with Symbols on Mouth",keywords:["serious","covering","swearing","cursing","cussing","profanity","expletive"],skins:[{unified:"1f92c",native:"🤬",x:40,y:41}],version:5},smiling_imp:{id:"smiling_imp",name:"Smiling Face with Horns",keywords:["imp","devil"],skins:[{unified:"1f608",native:"😈",x:32,y:28}],version:1},imp:{id:"imp",name:"Imp",keywords:["angry","face","with","horns","devil"],skins:[{unified:"1f47f",native:"👿",x:25,y:8}],version:1},skull:{id:"skull",name:"Skull",keywords:["dead","skeleton","creepy","death"],skins:[{unified:"1f480",native:"💀",x:25,y:9}],version:1},skull_and_crossbones:{id:"skull_and_crossbones",name:"Skull and Crossbones",keywords:["poison","danger","deadly","scary","death","pirate","evil"],skins:[{unified:"2620-fe0f",native:"☠️",x:56,y:56}],version:1},hankey:{id:"hankey",name:"Pile of Poo",keywords:["hankey","poop","shit","shitface","fail","turd"],skins:[{unified:"1f4a9",native:"💩",x:27,y:56}],version:1},clown_face:{id:"clown_face",name:"Clown Face",keywords:[],skins:[{unified:"1f921",native:"🤡",x:40,y:13}],version:3},japanese_ogre:{id:"japanese_ogre",name:"Ogre",keywords:["japanese","monster","red","mask","halloween","scary","creepy","devil","demon"],skins:[{unified:"1f479",native:"👹",x:24,y:58}],version:1},japanese_goblin:{id:"japanese_goblin",name:"Goblin",keywords:["japanese","red","evil","mask","monster","scary","creepy"],skins:[{unified:"1f47a",native:"👺",x:24,y:59}],version:1},ghost:{id:"ghost",name:"Ghost",keywords:["halloween","spooky","scary"],skins:[{unified:"1f47b",native:"👻",x:24,y:60}],version:1},alien:{id:"alien",name:"Alien",keywords:["UFO","paul","weird","outer","space"],skins:[{unified:"1f47d",native:"👽",x:25,y:6}],version:1},space_invader:{id:"space_invader",name:"Alien Monster",keywords:["space","invader","game","arcade","play"],skins:[{unified:"1f47e",native:"👾",x:25,y:7}],version:1},robot_face:{id:"robot_face",name:"Robot",keywords:["face","computer","machine","bot"],skins:[{unified:"1f916",native:"🤖",x:39,y:3}],version:1},smiley_cat:{id:"smiley_cat",name:"Grinning Cat",keywords:["smiley","animal","cats","happy","smile"],skins:[{unified:"1f63a",native:"😺",x:33,y:20}],version:1},smile_cat:{id:"smile_cat",name:"Grinning Cat with Smiling Eyes",keywords:["smile","animal","cats"],skins:[{unified:"1f638",native:"😸",x:33,y:18}],version:1},joy_cat:{id:"joy_cat",name:"Cat with Tears of Joy",keywords:["animal","cats","haha","happy"],skins:[{unified:"1f639",native:"😹",x:33,y:19}],version:1},heart_eyes_cat:{id:"heart_eyes_cat",name:"Smiling Cat with Heart-Eyes",keywords:["heart","eyes","animal","love","like","affection","cats","valentines"],skins:[{unified:"1f63b",native:"😻",x:33,y:21}],version:1},smirk_cat:{id:"smirk_cat",name:"Cat with Wry Smile",keywords:["smirk","animal","cats"],skins:[{unified:"1f63c",native:"😼",x:33,y:22}],version:1},kissing_cat:{id:"kissing_cat",name:"Kissing Cat",keywords:["animal","cats","kiss"],skins:[{unified:"1f63d",native:"😽",x:33,y:23}],version:1},scream_cat:{id:"scream_cat",name:"Weary Cat",keywords:["scream","animal","cats","munch","scared"],skins:[{unified:"1f640",native:"🙀",x:33,y:26}],version:1},crying_cat_face:{id:"crying_cat_face",name:"Crying Cat",keywords:["face","animal","tears","weep","sad","cats","upset","cry"],skins:[{unified:"1f63f",native:"😿",x:33,y:25}],version:1},pouting_cat:{id:"pouting_cat",name:"Pouting Cat",keywords:["animal","cats"],skins:[{unified:"1f63e",native:"😾",x:33,y:24}],version:1},see_no_evil:{id:"see_no_evil",name:"See-No-Evil Monkey",keywords:["see","no","evil","animal","nature","haha"],skins:[{unified:"1f648",native:"🙈",x:34,y:24}],version:1},hear_no_evil:{id:"hear_no_evil",name:"Hear-No-Evil Monkey",keywords:["hear","no","evil","animal","nature"],skins:[{unified:"1f649",native:"🙉",x:34,y:25}],version:1},speak_no_evil:{id:"speak_no_evil",name:"Speak-No-Evil Monkey",keywords:["speak","no","evil","animal","nature","omg"],skins:[{unified:"1f64a",native:"🙊",x:34,y:26}],version:1},kiss:{id:"kiss",name:"Kiss Mark",keywords:["face","lips","love","like","affection","valentines"],skins:[{unified:"1f48b",native:"💋",x:26,y:37}],version:1},love_letter:{id:"love_letter",name:"Love Letter",keywords:["email","like","affection","envelope","valentines"],skins:[{unified:"1f48c",native:"💌",x:26,y:38}],version:1},cupid:{id:"cupid",name:"Heart with Arrow",keywords:["cupid","love","like","affection","valentines"],skins:[{unified:"1f498",native:"💘",x:27,y:39}],version:1},gift_heart:{id:"gift_heart",name:"Heart with Ribbon",keywords:["gift","love","valentines"],skins:[{unified:"1f49d",native:"💝",x:27,y:44}],version:1},sparkling_heart:{id:"sparkling_heart",name:"Sparkling Heart",keywords:["love","like","affection","valentines"],skins:[{unified:"1f496",native:"💖",x:27,y:37}],version:1},heartpulse:{id:"heartpulse",name:"Growing Heart",keywords:["heartpulse","like","love","affection","valentines","pink"],skins:[{unified:"1f497",native:"💗",x:27,y:38}],version:1},heartbeat:{id:"heartbeat",name:"Beating Heart",keywords:["heartbeat","love","like","affection","valentines","pink"],skins:[{unified:"1f493",native:"💓",x:27,y:34}],version:1},revolving_hearts:{id:"revolving_hearts",name:"Revolving Hearts",keywords:["love","like","affection","valentines"],skins:[{unified:"1f49e",native:"💞",x:27,y:45}],version:1},two_hearts:{id:"two_hearts",name:"Two Hearts",keywords:["love","like","affection","valentines","heart"],skins:[{unified:"1f495",native:"💕",x:27,y:36}],version:1},heart_decoration:{id:"heart_decoration",name:"Heart Decoration",keywords:["purple","square","love","like"],skins:[{unified:"1f49f",native:"💟",x:27,y:46}],version:1},heavy_heart_exclamation_mark_ornament:{id:"heavy_heart_exclamation_mark_ornament",name:"Heart Exclamation",keywords:["heavy","mark","ornament","decoration","love"],skins:[{unified:"2763-fe0f",native:"❣️",x:59,y:7}],version:1},broken_heart:{id:"broken_heart",name:"Broken Heart",emoticons:["{const tt=_e.replace(stripLeadingZeros,"");return _e.includes("200d")&&!(_e in blacklist)?tt:replaceAll(tt,"-fe0f","")},generateMappings=_e=>{const et={},tt=Object.values(_e.emojis??{});for(const nt of tt)for(const rt of nt.skins){const{unified:at,native:it}=rt,ot=stripcodes(at);et[it]={unified:ot,shortcode:nt.id}}for(const[nt,[rt,at]]of Object.entries(tweaks)){const it=stripcodes(rt);et[nt]={unified:it,shortcode:at}}return et},unicodeMapping=generateMappings(emojiData);function isCustomEmoji(_e){return _e.imageUrl!==void 0}function isNativeEmoji(_e){return _e.native!==void 0}const isAlphaNumeric=_e=>{const et=_e.charCodeAt(0);return!(!(et>47&&et<58)&&!(et>64&&et<91)&&!(et>96&&et<123))},validEmojiChar=_e=>isAlphaNumeric(_e)||_e==="_"||_e==="-"||_e===".",convertCustom=(_e,et)=>`${_e}`,convertUnicode=_e=>{const{unified:et,shortcode:tt}=unicodeMapping[_e];return`${_e}`},convertEmoji=(_e,et)=>{if(_e.length<3)return _e;if(_e in et){const nt=et[_e].static_url;if((nt==null?void 0:nt.length)>0)return convertCustom(_e,nt)}return _e},emojifyText=(_e,et={})=>{let tt="",nt="",rt=!1;const at=()=>{tt+=nt,rt=!1,nt=""};for(let it of split$1(_e)){it.codePointAt(it.length-1)===65038&&(it=it.slice(0,-1)+String.fromCodePoint(65039));const ot=it+String.fromCodePoint(65039);it in unicodeMapping?(rt&&at(),tt+=convertUnicode(it)):ot in unicodeMapping?(rt&&at(),tt+=convertUnicode(ot)):it===":"?(nt+=":",rt&&(tt+=convertEmoji(nt,et),nt=""),rt=!rt):rt?(nt+=it,validEmojiChar(it)||at()):tt+=it}return rt&&(tt+=nt),tt},parseHTML=_e=>{const et=[];let tt="",nt="",rt=!1;for(const at of _e)at==="<"?rt?(et.push({text:!0,data:nt}),nt="<"):(et.push({text:!0,data:tt}),nt="<",rt=!0):at===">"?rt?(rt=!1,et.push({text:!1,data:nt+">"}),nt="",tt=""):tt+=">":rt?nt+=at:tt+=at;return rt?et.push({text:!0,data:tt+nt}):tt!==""&&et.push({text:!0,data:tt}),et},emojify=(_e,et={})=>parseHTML(_e).map(({text:tt,data:nt})=>!tt||nt.length===0||nt===" "?nt:emojifyText(nt,et)).join(""),buildCustomEmojis=_e=>{const et=[];return _e.forEach(tt=>{const nt=tt.get("shortcode"),rt=tt.get("static_url"),at=nt.replace(":","");et.push({id:at,name:at,keywords:[at],skins:[{src:rt}]})}),et},buildCustomEmojiPack=_e=>{const et={};return _e.forEach(tt=>{const nt=tt.get("category").replace("pack:","")||"custom",rt=tt.get("shortcode"),at=tt.get("static_url"),it=rt.replace(":","");let ot=et[nt];ot||(et[nt]={id:nt,name:nt,emojis:[]}),ot=et[nt],ot.emojis.push({id:it,name:it,keywords:[it],skins:[{src:at}]})}),et},unescapeHTML=(_e="")=>{const et=document.createElement("div");return et.innerHTML=_e.replace(//g,` `).replace(/<\/p><[^>]*>/g,` -`).replace(/<[^>]*>/g,""),et.textContent||""},stripCompatibilityFeatures=_e=>{const et=document.createElement("div");return et.innerHTML=_e,[".quote-inline",".recipients-inline"].forEach(nt=>{et.querySelectorAll(nt).forEach(rt=>{rt.remove()})}),et.innerHTML},stripHTML=_e=>{const et=document.createElement("div");return et.innerHTML=_e,et.textContent||et.innerText||""},customEmojiSchema=z$1.object({category:z$1.string().catch(""),shortcode:z$1.string(),static_url:z$1.string().catch(""),url:z$1.string(),visible_in_picker:z$1.boolean().catch(!0)}),relationshipSchema=z$1.object({blocked_by:z$1.boolean().catch(!1),blocking:z$1.boolean().catch(!1),domain_blocking:z$1.boolean().catch(!1),endorsed:z$1.boolean().catch(!1),followed_by:z$1.boolean().catch(!1),following:z$1.boolean().catch(!1),id:z$1.string(),muting:z$1.boolean().catch(!1),muting_notifications:z$1.boolean().catch(!1),note:z$1.string().catch(""),notifying:z$1.boolean().catch(!1),requested:z$1.boolean().catch(!1),showing_reblogs:z$1.boolean().catch(!1),subscribing:z$1.boolean().catch(!1)}),contentSchema=z$1.string().catch("").transform(_e=>_e==="

"?"":_e),dateSchema=z$1.string().datetime().catch(new Date().toUTCString());function filteredArray(_e){return z$1.any().array().catch([]).transform(et=>et.map(tt=>{const nt=_e.safeParse(tt);return nt.success?nt.data:void 0}).filter(tt=>!!tt))}const emojiSchema=z$1.string().refine(_e=>/\p{Extended_Pictographic}/u.test(_e));function makeCustomEmojiMap(_e){return _e.reduce((et,tt)=>(et[`:${tt.shortcode}:`]=tt,et),{})}z$1.string().transform((_e,et)=>{try{return JSON.parse(_e)}catch{return et.addIssue({code:z$1.ZodIssueCode.custom,message:"Invalid JSON"}),z$1.NEVER}});const mimeSchema=z$1.string().regex(/^\w+\/[-+.\w]+$/);function coerceObject(_e){return z$1.object({}).passthrough().catch({}).pipe(z$1.object(_e))}const avatarMissing$1=vitePluginRequire_1697861817641_69752310,headerMissing$1=vitePluginRequire_1697861817641_37912257,birthdaySchema=z$1.string().regex(/^\d{4}-\d{2}-\d{2}$/),fieldSchema=z$1.object({name:z$1.string(),value:z$1.string(),verified_at:z$1.string().datetime().nullable().catch(null)}),baseAccountSchema=z$1.object({acct:z$1.string().catch(""),avatar:z$1.string().catch(avatarMissing$1),avatar_static:z$1.string().url().optional().catch(void 0),bot:z$1.boolean().catch(!1),created_at:z$1.string().datetime().catch(new Date().toUTCString()),discoverable:z$1.boolean().catch(!1),display_name:z$1.string().catch(""),emojis:filteredArray(customEmojiSchema),fields:filteredArray(fieldSchema),followers_count:z$1.number().catch(0),following_count:z$1.number().catch(0),fqn:z$1.string().optional().catch(void 0),header:z$1.string().url().catch(headerMissing$1),header_static:z$1.string().url().optional().catch(void 0),id:z$1.string(),last_status_at:z$1.string().datetime().optional().catch(void 0),location:z$1.string().optional().catch(void 0),locked:z$1.boolean().catch(!1),moved:z$1.literal(null).catch(null),mute_expires_at:z$1.union([z$1.string(),z$1.null()]).catch(null),note:contentSchema,other_settings:z$1.object({birthday:birthdaySchema.nullish().catch(void 0),location:z$1.string().optional().catch(void 0)}).optional().catch(void 0),pleroma:z$1.object({accepts_chat_messages:z$1.boolean().catch(!1),accepts_email_list:z$1.boolean().catch(!1),also_known_as:z$1.array(z$1.string().url()).catch([]),ap_id:z$1.string().url().optional().catch(void 0),birthday:birthdaySchema.nullish().catch(void 0),deactivated:z$1.boolean().catch(!1),favicon:z$1.string().url().optional().catch(void 0),hide_favorites:z$1.boolean().catch(!1),hide_followers:z$1.boolean().catch(!1),hide_followers_count:z$1.boolean().catch(!1),hide_follows:z$1.boolean().catch(!1),hide_follows_count:z$1.boolean().catch(!1),is_admin:z$1.boolean().catch(!1),is_moderator:z$1.boolean().catch(!1),is_suggested:z$1.boolean().catch(!1),location:z$1.string().optional().catch(void 0),notification_settings:z$1.object({block_from_strangers:z$1.boolean().catch(!1)}).optional().catch(void 0),relationship:relationshipSchema.optional().catch(void 0),tags:z$1.array(z$1.string()).catch([])}).optional().catch(void 0),source:z$1.object({approved:z$1.boolean().catch(!0),chats_onboarded:z$1.boolean().catch(!0),fields:filteredArray(fieldSchema),note:z$1.string().catch(""),pleroma:z$1.object({discoverable:z$1.boolean().catch(!0)}).optional().catch(void 0),sms_verified:z$1.boolean().catch(!1)}).optional().catch(void 0),statuses_count:z$1.number().catch(0),suspended:z$1.boolean().catch(!1),uri:z$1.string().url().catch(""),url:z$1.string().url(),username:z$1.string().catch(""),verified:z$1.boolean().catch(!1),website:z$1.string().catch("")}),getDomain$1=_e=>{try{return new URL(_e).host}catch{return""}},transformAccount=({pleroma:_e,other_settings:et,fields:tt,...nt})=>{var st,ct;const rt=makeCustomEmojiMap(nt.emojis),at=tt.map(ut=>({...ut,name_emojified:emojify(escapeTextContentForBrowser(ut.name),rt),value_emojified:emojify(ut.value,rt),value_plain:unescapeHTML(ut.value)})),it=nt.display_name.trim().length===0?nt.username:nt.display_name,ot=getDomain$1(nt.url||nt.uri);return _e&&(_e.birthday=_e.birthday||(et==null?void 0:et.birthday)),{...nt,admin:(_e==null?void 0:_e.is_admin)||!1,avatar_static:nt.avatar_static||nt.avatar,discoverable:nt.discoverable||((ct=(st=nt.source)==null?void 0:st.pleroma)==null?void 0:ct.discoverable)||!1,display_name:it,display_name_html:emojify(escapeTextContentForBrowser(it),rt),domain:ot,fields:at,fqn:nt.fqn||(nt.acct.includes("@")?nt.acct:`${nt.acct}@${ot}`),header_static:nt.header_static||nt.header,moderator:(_e==null?void 0:_e.is_moderator)||!1,location:nt.location||(_e==null?void 0:_e.location)||(et==null?void 0:et.location)||"",note_emojified:emojify(nt.note,rt),pleroma:(()=>{if(!_e)return;const{relationship:ut,...dt}=_e;return dt})(),relationship:_e==null?void 0:_e.relationship,staff:(_e==null?void 0:_e.is_admin)||(_e==null?void 0:_e.is_moderator)||!1,suspended:nt.suspended||(_e==null?void 0:_e.deactivated)||!1,verified:nt.verified||(_e==null?void 0:_e.tags.includes("verified"))||!1}},accountSchema=baseAccountSchema.extend({moved:baseAccountSchema.transform(transformAccount).nullable().catch(null)}).transform(transformAccount);var q$1=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],x=_e=>{let et=0;for(let tt=0;tt<_e.length;tt++){let nt=_e[tt],rt=q$1.indexOf(nt);et=et*83+rt}return et},f$2=_e=>{let et=_e/255;return et<=.04045?et/12.92:Math.pow((et+.055)/1.055,2.4)},h$2=_e=>{let et=Math.max(0,Math.min(1,_e));return et<=.0031308?Math.trunc(et*12.92*255+.5):Math.trunc((1.055*Math.pow(et,.4166666666666667)-.055)*255+.5)},F=_e=>_e<0?-1:1,M$1=(_e,et)=>F(_e)*Math.pow(Math.abs(_e),et),d$1=class extends Error{constructor(et){super(et),this.name="ValidationError",this.message=et}},C$1=_e=>{if(!_e||_e.length<6)throw new d$1("The blurhash string must be at least 6 characters");let et=x(_e[0]),tt=Math.floor(et/9)+1,nt=et%9+1;if(_e.length!==4+2*nt*tt)throw new d$1(`blurhash length mismatch: length is ${_e.length} but it should be ${4+2*nt*tt}`)},N=_e=>{try{C$1(_e)}catch(et){return{result:!1,errorReason:et.message}}return{result:!0}},z=_e=>{let et=_e>>16,tt=_e>>8&255,nt=_e&255;return[f$2(et),f$2(tt),f$2(nt)]},L=(_e,et)=>{let tt=Math.floor(_e/361),nt=Math.floor(_e/19)%19,rt=_e%19;return[M$1((tt-9)/9,2)*et,M$1((nt-9)/9,2)*et,M$1((rt-9)/9,2)*et]},U$1=(_e,et,tt,nt)=>{C$1(_e),nt=nt|1;let rt=x(_e[0]),at=Math.floor(rt/9)+1,it=rt%9+1,ot=(x(_e[1])+1)/166,st=new Array(it*at);for(let dt=0;dt{const tt=N(_e);tt.result||et.addIssue({code:z$1.ZodIssueCode.custom,message:tt.errorReason})}),baseAttachmentSchema=z$1.object({blurhash:blurhashSchema.nullable().catch(null),description:z$1.string().catch(""),external_video_id:z$1.string().optional().catch(void 0),id:z$1.string(),pleroma:z$1.object({mime_type:z$1.string().regex(/^\w+\/[-+.\w]+$/)}).optional().catch(void 0),preview_url:z$1.string().url().catch(""),remote_url:z$1.string().url().nullable().catch(null),type:z$1.string(),url:z$1.string().url()}),imageMetaSchema=z$1.object({width:z$1.number(),height:z$1.number(),aspect:z$1.number().optional().catch(void 0)}).transform(_e=>({..._e,aspect:typeof _e.aspect=="number"?_e.aspect:_e.width/_e.height})),imageAttachmentSchema=baseAttachmentSchema.extend({type:z$1.literal("image"),meta:z$1.object({original:imageMetaSchema.optional().catch(void 0)}).catch({})}),videoAttachmentSchema=baseAttachmentSchema.extend({type:z$1.literal("video"),meta:z$1.object({duration:z$1.number().optional().catch(void 0),original:imageMetaSchema.optional().catch(void 0)}).catch({})}),gifvAttachmentSchema=baseAttachmentSchema.extend({type:z$1.literal("gifv"),meta:z$1.object({duration:z$1.number().optional().catch(void 0),original:imageMetaSchema.optional().catch(void 0)}).catch({})}),audioAttachmentSchema=baseAttachmentSchema.extend({type:z$1.literal("audio"),meta:z$1.object({duration:z$1.number().optional().catch(void 0),colors:z$1.object({background:z$1.string().optional().catch(void 0),foreground:z$1.string().optional().catch(void 0),accent:z$1.string().optional().catch(void 0),duration:z$1.number().optional().catch(void 0)}).optional().catch(void 0)}).catch({})}),unknownAttachmentSchema=baseAttachmentSchema.extend({type:z$1.literal("unknown")}),attachmentSchema=z$1.discriminatedUnion("type",[imageAttachmentSchema,videoAttachmentSchema,gifvAttachmentSchema,audioAttachmentSchema,unknownAttachmentSchema]).transform(_e=>(_e.preview_url||(_e.preview_url=_e.url),_e)),maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexPunycode=/^xn--/,regexNonASCII=/[^\0-\x7F]/,regexSeparators=/[\x2E\u3002\uFF0E\uFF61]/g,errors={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},baseMinusTMin=base-tMin,floor$3=Math.floor,stringFromCharCode=String.fromCharCode;function error$1(_e){throw new RangeError(errors[_e])}function map(_e,et){const tt=[];let nt=_e.length;for(;nt--;)tt[nt]=et(_e[nt]);return tt}function mapDomain(_e,et){const tt=_e.split("@");let nt="";tt.length>1&&(nt=tt[0]+"@",_e=tt[1]),_e=_e.replace(regexSeparators,".");const rt=_e.split("."),at=map(rt,et).join(".");return nt+at}function ucs2decode(_e){const et=[];let tt=0;const nt=_e.length;for(;tt=55296&&rt<=56319&&ttString.fromCodePoint(..._e),basicToDigit=function(_e){return _e>=48&&_e<58?26+(_e-48):_e>=65&&_e<91?_e-65:_e>=97&&_e<123?_e-97:base},digitToBasic=function(_e,et){return _e+22+75*(_e<26)-((et!=0)<<5)},adapt=function(_e,et,tt){let nt=0;for(_e=tt?floor$3(_e/damp):_e>>1,_e+=floor$3(_e/et);_e>baseMinusTMin*tMax>>1;nt+=base)_e=floor$3(_e/baseMinusTMin);return floor$3(nt+(baseMinusTMin+1)*_e/(_e+skew))},decode$1=function(_e){const et=[],tt=_e.length;let nt=0,rt=initialN,at=initialBias,it=_e.lastIndexOf(delimiter);it<0&&(it=0);for(let ot=0;ot=128&&error$1("not-basic"),et.push(_e.charCodeAt(ot));for(let ot=it>0?it+1:0;ot=tt&&error$1("invalid-input");const ft=basicToDigit(_e.charCodeAt(ot++));ft>=base&&error$1("invalid-input"),ft>floor$3((maxInt-nt)/ut)&&error$1("overflow"),nt+=ft*ut;const pt=dt<=at?tMin:dt>=at+tMax?tMax:dt-at;if(ftfloor$3(maxInt/mt)&&error$1("overflow"),ut*=mt}const ct=et.length+1;at=adapt(nt-st,ct,st==0),floor$3(nt/ct)>maxInt-rt&&error$1("overflow"),rt+=floor$3(nt/ct),nt%=ct,et.splice(nt++,0,rt)}return String.fromCodePoint(...et)},encode$1=function(_e){const et=[];_e=ucs2decode(_e);const tt=_e.length;let nt=initialN,rt=0,at=initialBias;for(const st of _e)st<128&&et.push(stringFromCharCode(st));const it=et.length;let ot=it;for(it&&et.push(delimiter);ot=nt&&utfloor$3((maxInt-rt)/ct)&&error$1("overflow"),rt+=(st-nt)*ct,nt=st;for(const ut of _e)if(utmaxInt&&error$1("overflow"),ut===nt){let dt=rt;for(let ft=base;;ft+=base){const pt=ft<=at?tMin:ft>=at+tMax?tMax:ft-at;if(dt(_e.OWNER="owner",_e.ADMIN="admin",_e.USER="user",_e))(GroupRoles||{});const groupMemberSchema=z$1.object({id:z$1.string(),account:accountSchema,role:z$1.nativeEnum(GroupRoles)}),groupRelationshipSchema=z$1.object({blocked_by:z$1.boolean().catch(!1),id:z$1.string(),member:z$1.boolean().catch(!1),muting:z$1.boolean().nullable().catch(!1),notifying:z$1.boolean().nullable().catch(null),pending_requests:z$1.boolean().catch(!1),requested:z$1.boolean().catch(!1),role:z$1.nativeEnum(GroupRoles).catch(GroupRoles.USER)}),groupTagSchema=z$1.object({id:z$1.string(),name:z$1.string(),groups:z$1.number().optional(),url:z$1.string().optional(),uses:z$1.number().optional(),pinned:z$1.boolean().optional().catch(!1),visible:z$1.boolean().optional().default(!0)}),avatarMissing=vitePluginRequire_1697861817641_69752310,headerMissing=vitePluginRequire_1697861817641_37912257,groupSchema=z$1.object({avatar:z$1.string().catch(avatarMissing),avatar_static:z$1.string().catch(""),created_at:z$1.string().datetime().catch(new Date().toUTCString()),deleted_at:z$1.string().datetime().or(z$1.null()).catch(null),display_name:z$1.string().catch(""),domain:z$1.string().catch(""),emojis:filteredArray(customEmojiSchema),group_visibility:z$1.string().catch(""),header:z$1.string().catch(headerMissing),header_static:z$1.string().catch(""),id:z$1.coerce.string(),locked:z$1.boolean().catch(!1),membership_required:z$1.boolean().catch(!1),members_count:z$1.number().catch(0),owner:z$1.object({id:z$1.string()}),note:z$1.string().transform(_e=>_e==="

"?"":_e).catch(""),relationship:groupRelationshipSchema.nullable().catch(null),slug:z$1.string().catch(""),source:z$1.object({note:z$1.string()}).optional(),statuses_visibility:z$1.string().catch("public"),tags:z$1.array(groupTagSchema).catch([]),uri:z$1.string().catch(""),url:z$1.string().catch("")}).transform(_e=>{var tt;_e.avatar_static=_e.avatar_static||_e.avatar,_e.header_static=_e.header_static||_e.header,_e.locked=_e.locked||_e.group_visibility==="members_only";const et=makeCustomEmojiMap(_e.emojis);return{..._e,display_name_html:emojify(escapeTextContentForBrowser(_e.display_name),et),note_emojified:emojify(_e.note,et),note_plain:((tt=_e.source)==null?void 0:tt.note)||unescapeHTML(_e.note)}}),IDNA_PREFIX="xn--",cardSchema=z$1.object({author_name:z$1.string().catch(""),author_url:z$1.string().url().catch(""),blurhash:z$1.string().nullable().catch(null),description:z$1.string().catch(""),embed_url:z$1.string().url().catch(""),group:groupSchema.nullable().catch(null),height:z$1.number().catch(0),html:z$1.string().catch(""),image:z$1.string().nullable().catch(null),pleroma:z$1.object({opengraph:z$1.object({width:z$1.number(),height:z$1.number(),html:z$1.string(),thumbnail_url:z$1.string().url()}).optional().catch(void 0)}).optional().catch(void 0),provider_name:z$1.string().catch(""),provider_url:z$1.string().url().catch(""),title:z$1.string().catch(""),type:z$1.enum(["link","photo","video","rich"]).catch("link"),url:z$1.string().url(),width:z$1.number().catch(0)}).transform(({pleroma:_e,...et})=>(et.provider_name||(et.provider_name=decodeIDNA(new URL(et.url).hostname)),_e!=null&&_e.opengraph&&(!et.width&&!et.height&&(et.width=_e.opengraph.width,et.height=_e.opengraph.height),et.html||(et.html=_e.opengraph.html),et.image||(et.image=_e.opengraph.thumbnail_url)),et)),decodeIDNA=_e=>_e.split(".").map(et=>et.indexOf(IDNA_PREFIX)===0?punycode.decode(et.slice(IDNA_PREFIX.length)):et).join("."),chatMessageSchema=z$1.object({account_id:z$1.string(),media_attachments:filteredArray(attachmentSchema),card:cardSchema.nullable().catch(null),chat_id:z$1.string(),content:contentSchema,created_at:z$1.string().datetime().catch(new Date().toUTCString()),emojis:filteredArray(customEmojiSchema),expiration:z$1.number().optional().catch(void 0),emoji_reactions:z$1.array(emojiSchema).min(1).nullable().catch(null),id:z$1.string(),unread:z$1.coerce.boolean(),deleting:z$1.coerce.boolean(),pending:z$1.coerce.boolean()}),emojiReactionSchema=z$1.object({name:emojiSchema,count:z$1.number().nullable().catch(null),me:z$1.boolean().catch(!1),url:z$1.string().url().optional().catch(void 0)}),mrfSimpleSchema=coerceObject({accept:z$1.string().array().array().catch([]),avatar_removal:z$1.string().array().array().catch([]),banner_removal:z$1.string().array().array().catch([]),federated_timeline_removal:z$1.string().array().array().catch([]),followers_only:z$1.string().array().array().catch([]),media_nsfw:z$1.string().array().array().catch([]),media_removal:z$1.string().array().array().catch([]),reject:z$1.string().array().array().catch([]),reject_deletes:z$1.string().array().array().catch([]),report_removal:z$1.string().array().array().catch([]),handle_threads:z$1.boolean().catch(!0)}),configurationSchema=coerceObject({chats:coerceObject({max_characters:z$1.number().catch(5e3),max_media_attachments:z$1.number().catch(1)}),groups:coerceObject({max_characters_description:z$1.number().catch(160),max_characters_name:z$1.number().catch(50)}),media_attachments:coerceObject({image_matrix_limit:z$1.number().optional().catch(void 0),image_size_limit:z$1.number().optional().catch(void 0),supported_mime_types:mimeSchema.array().optional().catch(void 0),video_duration_limit:z$1.number().optional().catch(void 0),video_frame_rate_limit:z$1.number().optional().catch(void 0),video_matrix_limit:z$1.number().optional().catch(void 0),video_size_limit:z$1.number().optional().catch(void 0)}),polls:coerceObject({max_characters_per_option:z$1.number().catch(25),max_expiration:z$1.number().catch(2629746),max_options:z$1.number().catch(4),min_expiration:z$1.number().catch(300)}),statuses:coerceObject({max_characters:z$1.number().catch(500),max_media_attachments:z$1.number().catch(4)})}),pleromaSchema=coerceObject({metadata:coerceObject({account_activation_required:z$1.boolean().catch(!1),birthday_min_age:z$1.number().catch(0),birthday_required:z$1.boolean().catch(!1),features:z$1.string().array().catch([]),federation:coerceObject({enabled:z$1.boolean().catch(!0),mrf_policies:z$1.string().array().optional().catch(void 0),mrf_simple:mrfSimpleSchema}),fields_limits:z$1.any(),migration_cooldown_period:z$1.number().optional().catch(void 0),translation:coerceObject({allow_remote:z$1.boolean().catch(!0),allow_unauthenticated:z$1.boolean().catch(!1),source_languages:z$1.string().array().optional().catch(void 0),target_languages:z$1.string().array().optional().catch(void 0)})}),oauth_consumer_strategies:z$1.string().array().catch([]),stats:coerceObject({mau:z$1.number().optional().catch(void 0)}),vapid_public_key:z$1.string().catch("")}),statsSchema=coerceObject({domain_count:z$1.number().catch(0),status_count:z$1.number().catch(0),user_count:z$1.number().catch(0)}),urlsSchema=coerceObject({streaming_api:z$1.string().url().optional().catch(void 0)}),usageSchema=coerceObject({users:coerceObject({active_month:z$1.number().catch(0)})}),instanceSchema=coerceObject({approval_required:z$1.boolean().catch(!1),configuration:configurationSchema,contact_account:accountSchema.optional().catch(void 0),description:z$1.string().catch(""),description_limit:z$1.number().catch(1500),email:z$1.string().email().catch(""),feature_quote:z$1.boolean().catch(!1),fedibird_capabilities:z$1.array(z$1.string()).catch([]),languages:z$1.string().array().catch([]),pleroma:pleromaSchema,registrations:z$1.boolean().catch(!1),rules:z$1.any(),short_description:z$1.string().catch(""),stats:statsSchema,thumbnail:z$1.string().catch(""),title:z$1.string().catch(""),urls:urlsSchema,usage:usageSchema,version:z$1.string().catch("")}),mentionSchema=z$1.object({acct:z$1.string(),id:z$1.string(),url:z$1.string().url().catch(""),username:z$1.string().catch("")}).transform(_e=>(_e.username||(_e.username=_e.acct.split("@")[0]),_e)),locationSchema=z$1.object({url:z$1.string().url().catch(""),description:z$1.string().catch(""),country:z$1.string().catch(""),locality:z$1.string().catch(""),region:z$1.string().catch(""),postal_code:z$1.string().catch(""),street:z$1.string().catch(""),origin_id:z$1.string().catch(""),origin_provider:z$1.string().catch(""),type:z$1.string().catch(""),timezone:z$1.string().catch(""),name:z$1.string().catch(""),latitude:z$1.number().catch(0),longitude:z$1.number().catch(0),geom:z$1.object({coordinates:z$1.tuple([z$1.number(),z$1.number()]).nullable().catch(null),srid:z$1.string().catch("")}).nullable().catch(null)}),eventSchema=z$1.object({name:z$1.string().catch(""),start_time:z$1.string().datetime().nullable().catch(null),end_time:z$1.string().datetime().nullable().catch(null),join_mode:z$1.enum(["free","restricted","invite"]).nullable().catch(null),participants_count:z$1.number().catch(0),location:locationSchema.nullable().catch(null),join_state:z$1.enum(["pending","reject","accept"]).nullable().catch(null),banner:attachmentSchema.nullable().catch(null),links:z$1.array(attachmentSchema).nullable().catch(null)}),pollOptionSchema=z$1.object({title:z$1.string().catch(""),votes_count:z$1.number().catch(0)}),pollSchema=z$1.object({emojis:filteredArray(customEmojiSchema),expired:z$1.boolean().catch(!1),expires_at:z$1.string().datetime().nullable().catch(null),id:z$1.string(),multiple:z$1.boolean().catch(!1),options:z$1.array(pollOptionSchema).min(2),voters_count:z$1.number().catch(0),votes_count:z$1.number().catch(0),own_votes:z$1.array(z$1.number()).nonempty().nullable().catch(null),voted:z$1.boolean().catch(!1),pleroma:z$1.object({non_anonymous:z$1.boolean().catch(!1)}).optional().catch(void 0)}).transform(_e=>{var nt;const et=makeCustomEmojiMap(_e.emojis),tt=_e.options.map(rt=>({...rt,title_emojified:emojify(escapeTextContentForBrowser(rt.title),et)}));return(nt=_e.own_votes)!=null&&nt.length&&(_e.voted=!0),{..._e,options:tt}}),historySchema=z$1.object({accounts:z$1.coerce.number(),uses:z$1.coerce.number()}),tagSchema=z$1.object({name:z$1.string().min(1),url:z$1.string().url().catch(""),history:z$1.array(historySchema).nullable().catch(null),following:z$1.boolean().catch(!1)}),statusPleromaSchema=z$1.object({emoji_reactions:filteredArray(emojiReactionSchema),event:eventSchema.nullish().catch(void 0),quote:z$1.literal(null).catch(null),quote_visible:z$1.boolean().catch(!0)}),baseStatusSchema=z$1.object({account:accountSchema,application:z$1.object({name:z$1.string(),website:z$1.string().url().nullable().catch(null)}).nullable().catch(null),bookmarked:z$1.coerce.boolean(),card:cardSchema.nullable().catch(null),content:contentSchema,created_at:dateSchema,disliked:z$1.coerce.boolean(),dislikes_count:z$1.number().catch(0),edited_at:z$1.string().datetime().nullable().catch(null),emojis:filteredArray(customEmojiSchema),favourited:z$1.coerce.boolean(),favourites_count:z$1.number().catch(0),group:groupSchema.nullable().catch(null),in_reply_to_account_id:z$1.string().nullable().catch(null),in_reply_to_id:z$1.string().nullable().catch(null),id:z$1.string(),language:z$1.string().nullable().catch(null),media_attachments:filteredArray(attachmentSchema),mentions:filteredArray(mentionSchema),muted:z$1.coerce.boolean(),pinned:z$1.coerce.boolean(),pleroma:statusPleromaSchema.optional().catch(void 0),poll:pollSchema.nullable().catch(null),quote:z$1.literal(null).catch(null),quotes_count:z$1.number().catch(0),reblog:z$1.literal(null).catch(null),reblogged:z$1.coerce.boolean(),reblogs_count:z$1.number().catch(0),replies_count:z$1.number().catch(0),sensitive:z$1.coerce.boolean(),spoiler_text:contentSchema,tags:filteredArray(tagSchema),tombstone:z$1.object({reason:z$1.enum(["deleted"])}).nullable().optional().catch(void 0),uri:z$1.string().url().catch(""),url:z$1.string().url().catch(""),visibility:z$1.string().catch("public")}),buildSearchIndex=_e=>{const et=_e.poll?_e.poll.options.map(({title:at})=>at):[],tt=_e.mentions.map(({acct:at})=>`@${at}`),nt=[_e.spoiler_text,_e.content,...et,...tt],rt=unescapeHTML(nt.join(` +`).replace(/<[^>]*>/g,""),et.textContent||""},stripCompatibilityFeatures=_e=>{const et=document.createElement("div");return et.innerHTML=_e,[".quote-inline",".recipients-inline"].forEach(nt=>{et.querySelectorAll(nt).forEach(rt=>{rt.remove()})}),et.innerHTML},stripHTML=_e=>{const et=document.createElement("div");return et.innerHTML=_e,et.textContent||et.innerText||""},customEmojiSchema=z$1.object({category:z$1.string().catch(""),shortcode:z$1.string(),static_url:z$1.string().catch(""),url:z$1.string(),visible_in_picker:z$1.boolean().catch(!0)}),relationshipSchema=z$1.object({blocked_by:z$1.boolean().catch(!1),blocking:z$1.boolean().catch(!1),domain_blocking:z$1.boolean().catch(!1),endorsed:z$1.boolean().catch(!1),followed_by:z$1.boolean().catch(!1),following:z$1.boolean().catch(!1),id:z$1.string(),muting:z$1.boolean().catch(!1),muting_notifications:z$1.boolean().catch(!1),note:z$1.string().catch(""),notifying:z$1.boolean().catch(!1),requested:z$1.boolean().catch(!1),showing_reblogs:z$1.boolean().catch(!1),subscribing:z$1.boolean().catch(!1)}),contentSchema=z$1.string().catch("").transform(_e=>_e==="

"?"":_e),dateSchema=z$1.string().datetime().catch(new Date().toUTCString());function filteredArray(_e){return z$1.any().array().catch([]).transform(et=>et.map(tt=>{const nt=_e.safeParse(tt);return nt.success?nt.data:void 0}).filter(tt=>!!tt))}const emojiSchema=z$1.string().refine(_e=>/\p{Extended_Pictographic}/u.test(_e));function makeCustomEmojiMap(_e){return _e.reduce((et,tt)=>(et[`:${tt.shortcode}:`]=tt,et),{})}z$1.string().transform((_e,et)=>{try{return JSON.parse(_e)}catch{return et.addIssue({code:z$1.ZodIssueCode.custom,message:"Invalid JSON"}),z$1.NEVER}});const mimeSchema=z$1.string().regex(/^\w+\/[-+.\w]+$/);function coerceObject(_e){return z$1.object({}).passthrough().catch({}).pipe(z$1.object(_e))}const avatarMissing$1=vitePluginRequire_1697864661787_95587196,headerMissing$1=vitePluginRequire_1697864661787_6416804,birthdaySchema=z$1.string().regex(/^\d{4}-\d{2}-\d{2}$/),fieldSchema=z$1.object({name:z$1.string(),value:z$1.string(),verified_at:z$1.string().datetime().nullable().catch(null)}),baseAccountSchema=z$1.object({acct:z$1.string().catch(""),avatar:z$1.string().catch(avatarMissing$1),avatar_static:z$1.string().url().optional().catch(void 0),bot:z$1.boolean().catch(!1),created_at:z$1.string().datetime().catch(new Date().toUTCString()),discoverable:z$1.boolean().catch(!1),display_name:z$1.string().catch(""),emojis:filteredArray(customEmojiSchema),fields:filteredArray(fieldSchema),followers_count:z$1.number().catch(0),following_count:z$1.number().catch(0),fqn:z$1.string().optional().catch(void 0),header:z$1.string().url().catch(headerMissing$1),header_static:z$1.string().url().optional().catch(void 0),id:z$1.string(),last_status_at:z$1.string().datetime().optional().catch(void 0),location:z$1.string().optional().catch(void 0),locked:z$1.boolean().catch(!1),moved:z$1.literal(null).catch(null),mute_expires_at:z$1.union([z$1.string(),z$1.null()]).catch(null),note:contentSchema,other_settings:z$1.object({birthday:birthdaySchema.nullish().catch(void 0),location:z$1.string().optional().catch(void 0)}).optional().catch(void 0),pleroma:z$1.object({accepts_chat_messages:z$1.boolean().catch(!1),accepts_email_list:z$1.boolean().catch(!1),also_known_as:z$1.array(z$1.string().url()).catch([]),ap_id:z$1.string().url().optional().catch(void 0),birthday:birthdaySchema.nullish().catch(void 0),deactivated:z$1.boolean().catch(!1),favicon:z$1.string().url().optional().catch(void 0),hide_favorites:z$1.boolean().catch(!1),hide_followers:z$1.boolean().catch(!1),hide_followers_count:z$1.boolean().catch(!1),hide_follows:z$1.boolean().catch(!1),hide_follows_count:z$1.boolean().catch(!1),is_admin:z$1.boolean().catch(!1),is_moderator:z$1.boolean().catch(!1),is_suggested:z$1.boolean().catch(!1),location:z$1.string().optional().catch(void 0),notification_settings:z$1.object({block_from_strangers:z$1.boolean().catch(!1)}).optional().catch(void 0),relationship:relationshipSchema.optional().catch(void 0),tags:z$1.array(z$1.string()).catch([])}).optional().catch(void 0),source:z$1.object({approved:z$1.boolean().catch(!0),chats_onboarded:z$1.boolean().catch(!0),fields:filteredArray(fieldSchema),note:z$1.string().catch(""),pleroma:z$1.object({discoverable:z$1.boolean().catch(!0)}).optional().catch(void 0),sms_verified:z$1.boolean().catch(!1)}).optional().catch(void 0),statuses_count:z$1.number().catch(0),suspended:z$1.boolean().catch(!1),uri:z$1.string().url().catch(""),url:z$1.string().url(),username:z$1.string().catch(""),verified:z$1.boolean().catch(!1),website:z$1.string().catch("")}),getDomain$1=_e=>{try{return new URL(_e).host}catch{return""}},transformAccount=({pleroma:_e,other_settings:et,fields:tt,...nt})=>{var st,ct;const rt=makeCustomEmojiMap(nt.emojis),at=tt.map(ut=>({...ut,name_emojified:emojify(escapeTextContentForBrowser(ut.name),rt),value_emojified:emojify(ut.value,rt),value_plain:unescapeHTML(ut.value)})),it=nt.display_name.trim().length===0?nt.username:nt.display_name,ot=getDomain$1(nt.url||nt.uri);return _e&&(_e.birthday=_e.birthday||(et==null?void 0:et.birthday)),{...nt,admin:(_e==null?void 0:_e.is_admin)||!1,avatar_static:nt.avatar_static||nt.avatar,discoverable:nt.discoverable||((ct=(st=nt.source)==null?void 0:st.pleroma)==null?void 0:ct.discoverable)||!1,display_name:it,display_name_html:emojify(escapeTextContentForBrowser(it),rt),domain:ot,fields:at,fqn:nt.fqn||(nt.acct.includes("@")?nt.acct:`${nt.acct}@${ot}`),header_static:nt.header_static||nt.header,moderator:(_e==null?void 0:_e.is_moderator)||!1,location:nt.location||(_e==null?void 0:_e.location)||(et==null?void 0:et.location)||"",note_emojified:emojify(nt.note,rt),pleroma:(()=>{if(!_e)return;const{relationship:ut,...dt}=_e;return dt})(),relationship:_e==null?void 0:_e.relationship,staff:(_e==null?void 0:_e.is_admin)||(_e==null?void 0:_e.is_moderator)||!1,suspended:nt.suspended||(_e==null?void 0:_e.deactivated)||!1,verified:nt.verified||(_e==null?void 0:_e.tags.includes("verified"))||!1}},accountSchema=baseAccountSchema.extend({moved:baseAccountSchema.transform(transformAccount).nullable().catch(null)}).transform(transformAccount);var q$1=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],x=_e=>{let et=0;for(let tt=0;tt<_e.length;tt++){let nt=_e[tt],rt=q$1.indexOf(nt);et=et*83+rt}return et},f$2=_e=>{let et=_e/255;return et<=.04045?et/12.92:Math.pow((et+.055)/1.055,2.4)},h$2=_e=>{let et=Math.max(0,Math.min(1,_e));return et<=.0031308?Math.trunc(et*12.92*255+.5):Math.trunc((1.055*Math.pow(et,.4166666666666667)-.055)*255+.5)},F=_e=>_e<0?-1:1,M$1=(_e,et)=>F(_e)*Math.pow(Math.abs(_e),et),d$1=class extends Error{constructor(et){super(et),this.name="ValidationError",this.message=et}},C$1=_e=>{if(!_e||_e.length<6)throw new d$1("The blurhash string must be at least 6 characters");let et=x(_e[0]),tt=Math.floor(et/9)+1,nt=et%9+1;if(_e.length!==4+2*nt*tt)throw new d$1(`blurhash length mismatch: length is ${_e.length} but it should be ${4+2*nt*tt}`)},N=_e=>{try{C$1(_e)}catch(et){return{result:!1,errorReason:et.message}}return{result:!0}},z=_e=>{let et=_e>>16,tt=_e>>8&255,nt=_e&255;return[f$2(et),f$2(tt),f$2(nt)]},L=(_e,et)=>{let tt=Math.floor(_e/361),nt=Math.floor(_e/19)%19,rt=_e%19;return[M$1((tt-9)/9,2)*et,M$1((nt-9)/9,2)*et,M$1((rt-9)/9,2)*et]},U$1=(_e,et,tt,nt)=>{C$1(_e),nt=nt|1;let rt=x(_e[0]),at=Math.floor(rt/9)+1,it=rt%9+1,ot=(x(_e[1])+1)/166,st=new Array(it*at);for(let dt=0;dt{const tt=N(_e);tt.result||et.addIssue({code:z$1.ZodIssueCode.custom,message:tt.errorReason})}),baseAttachmentSchema=z$1.object({blurhash:blurhashSchema.nullable().catch(null),description:z$1.string().catch(""),external_video_id:z$1.string().optional().catch(void 0),id:z$1.string(),pleroma:z$1.object({mime_type:z$1.string().regex(/^\w+\/[-+.\w]+$/)}).optional().catch(void 0),preview_url:z$1.string().url().catch(""),remote_url:z$1.string().url().nullable().catch(null),type:z$1.string(),url:z$1.string().url()}),imageMetaSchema=z$1.object({width:z$1.number(),height:z$1.number(),aspect:z$1.number().optional().catch(void 0)}).transform(_e=>({..._e,aspect:typeof _e.aspect=="number"?_e.aspect:_e.width/_e.height})),imageAttachmentSchema=baseAttachmentSchema.extend({type:z$1.literal("image"),meta:z$1.object({original:imageMetaSchema.optional().catch(void 0)}).catch({})}),videoAttachmentSchema=baseAttachmentSchema.extend({type:z$1.literal("video"),meta:z$1.object({duration:z$1.number().optional().catch(void 0),original:imageMetaSchema.optional().catch(void 0)}).catch({})}),gifvAttachmentSchema=baseAttachmentSchema.extend({type:z$1.literal("gifv"),meta:z$1.object({duration:z$1.number().optional().catch(void 0),original:imageMetaSchema.optional().catch(void 0)}).catch({})}),audioAttachmentSchema=baseAttachmentSchema.extend({type:z$1.literal("audio"),meta:z$1.object({duration:z$1.number().optional().catch(void 0),colors:z$1.object({background:z$1.string().optional().catch(void 0),foreground:z$1.string().optional().catch(void 0),accent:z$1.string().optional().catch(void 0),duration:z$1.number().optional().catch(void 0)}).optional().catch(void 0)}).catch({})}),unknownAttachmentSchema=baseAttachmentSchema.extend({type:z$1.literal("unknown")}),attachmentSchema=z$1.discriminatedUnion("type",[imageAttachmentSchema,videoAttachmentSchema,gifvAttachmentSchema,audioAttachmentSchema,unknownAttachmentSchema]).transform(_e=>(_e.preview_url||(_e.preview_url=_e.url),_e)),maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexPunycode=/^xn--/,regexNonASCII=/[^\0-\x7F]/,regexSeparators=/[\x2E\u3002\uFF0E\uFF61]/g,errors={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},baseMinusTMin=base-tMin,floor$3=Math.floor,stringFromCharCode=String.fromCharCode;function error$1(_e){throw new RangeError(errors[_e])}function map(_e,et){const tt=[];let nt=_e.length;for(;nt--;)tt[nt]=et(_e[nt]);return tt}function mapDomain(_e,et){const tt=_e.split("@");let nt="";tt.length>1&&(nt=tt[0]+"@",_e=tt[1]),_e=_e.replace(regexSeparators,".");const rt=_e.split("."),at=map(rt,et).join(".");return nt+at}function ucs2decode(_e){const et=[];let tt=0;const nt=_e.length;for(;tt=55296&&rt<=56319&&ttString.fromCodePoint(..._e),basicToDigit=function(_e){return _e>=48&&_e<58?26+(_e-48):_e>=65&&_e<91?_e-65:_e>=97&&_e<123?_e-97:base},digitToBasic=function(_e,et){return _e+22+75*(_e<26)-((et!=0)<<5)},adapt=function(_e,et,tt){let nt=0;for(_e=tt?floor$3(_e/damp):_e>>1,_e+=floor$3(_e/et);_e>baseMinusTMin*tMax>>1;nt+=base)_e=floor$3(_e/baseMinusTMin);return floor$3(nt+(baseMinusTMin+1)*_e/(_e+skew))},decode$1=function(_e){const et=[],tt=_e.length;let nt=0,rt=initialN,at=initialBias,it=_e.lastIndexOf(delimiter);it<0&&(it=0);for(let ot=0;ot=128&&error$1("not-basic"),et.push(_e.charCodeAt(ot));for(let ot=it>0?it+1:0;ot=tt&&error$1("invalid-input");const ft=basicToDigit(_e.charCodeAt(ot++));ft>=base&&error$1("invalid-input"),ft>floor$3((maxInt-nt)/ut)&&error$1("overflow"),nt+=ft*ut;const pt=dt<=at?tMin:dt>=at+tMax?tMax:dt-at;if(ftfloor$3(maxInt/mt)&&error$1("overflow"),ut*=mt}const ct=et.length+1;at=adapt(nt-st,ct,st==0),floor$3(nt/ct)>maxInt-rt&&error$1("overflow"),rt+=floor$3(nt/ct),nt%=ct,et.splice(nt++,0,rt)}return String.fromCodePoint(...et)},encode$1=function(_e){const et=[];_e=ucs2decode(_e);const tt=_e.length;let nt=initialN,rt=0,at=initialBias;for(const st of _e)st<128&&et.push(stringFromCharCode(st));const it=et.length;let ot=it;for(it&&et.push(delimiter);ot=nt&&utfloor$3((maxInt-rt)/ct)&&error$1("overflow"),rt+=(st-nt)*ct,nt=st;for(const ut of _e)if(utmaxInt&&error$1("overflow"),ut===nt){let dt=rt;for(let ft=base;;ft+=base){const pt=ft<=at?tMin:ft>=at+tMax?tMax:ft-at;if(dt(_e.OWNER="owner",_e.ADMIN="admin",_e.USER="user",_e))(GroupRoles||{});const groupMemberSchema=z$1.object({id:z$1.string(),account:accountSchema,role:z$1.nativeEnum(GroupRoles)}),groupRelationshipSchema=z$1.object({blocked_by:z$1.boolean().catch(!1),id:z$1.string(),member:z$1.boolean().catch(!1),muting:z$1.boolean().nullable().catch(!1),notifying:z$1.boolean().nullable().catch(null),pending_requests:z$1.boolean().catch(!1),requested:z$1.boolean().catch(!1),role:z$1.nativeEnum(GroupRoles).catch(GroupRoles.USER)}),groupTagSchema=z$1.object({id:z$1.string(),name:z$1.string(),groups:z$1.number().optional(),url:z$1.string().optional(),uses:z$1.number().optional(),pinned:z$1.boolean().optional().catch(!1),visible:z$1.boolean().optional().default(!0)}),avatarMissing=vitePluginRequire_1697864661787_95587196,headerMissing=vitePluginRequire_1697864661787_6416804,groupSchema=z$1.object({avatar:z$1.string().catch(avatarMissing),avatar_static:z$1.string().catch(""),created_at:z$1.string().datetime().catch(new Date().toUTCString()),deleted_at:z$1.string().datetime().or(z$1.null()).catch(null),display_name:z$1.string().catch(""),domain:z$1.string().catch(""),emojis:filteredArray(customEmojiSchema),group_visibility:z$1.string().catch(""),header:z$1.string().catch(headerMissing),header_static:z$1.string().catch(""),id:z$1.coerce.string(),locked:z$1.boolean().catch(!1),membership_required:z$1.boolean().catch(!1),members_count:z$1.number().catch(0),owner:z$1.object({id:z$1.string()}),note:z$1.string().transform(_e=>_e==="

"?"":_e).catch(""),relationship:groupRelationshipSchema.nullable().catch(null),slug:z$1.string().catch(""),source:z$1.object({note:z$1.string()}).optional(),statuses_visibility:z$1.string().catch("public"),tags:z$1.array(groupTagSchema).catch([]),uri:z$1.string().catch(""),url:z$1.string().catch("")}).transform(_e=>{var tt;_e.avatar_static=_e.avatar_static||_e.avatar,_e.header_static=_e.header_static||_e.header,_e.locked=_e.locked||_e.group_visibility==="members_only";const et=makeCustomEmojiMap(_e.emojis);return{..._e,display_name_html:emojify(escapeTextContentForBrowser(_e.display_name),et),note_emojified:emojify(_e.note,et),note_plain:((tt=_e.source)==null?void 0:tt.note)||unescapeHTML(_e.note)}}),IDNA_PREFIX="xn--",cardSchema=z$1.object({author_name:z$1.string().catch(""),author_url:z$1.string().url().catch(""),blurhash:z$1.string().nullable().catch(null),description:z$1.string().catch(""),embed_url:z$1.string().url().catch(""),group:groupSchema.nullable().catch(null),height:z$1.number().catch(0),html:z$1.string().catch(""),image:z$1.string().nullable().catch(null),pleroma:z$1.object({opengraph:z$1.object({width:z$1.number(),height:z$1.number(),html:z$1.string(),thumbnail_url:z$1.string().url()}).optional().catch(void 0)}).optional().catch(void 0),provider_name:z$1.string().catch(""),provider_url:z$1.string().url().catch(""),title:z$1.string().catch(""),type:z$1.enum(["link","photo","video","rich"]).catch("link"),url:z$1.string().url(),width:z$1.number().catch(0)}).transform(({pleroma:_e,...et})=>(et.provider_name||(et.provider_name=decodeIDNA(new URL(et.url).hostname)),_e!=null&&_e.opengraph&&(!et.width&&!et.height&&(et.width=_e.opengraph.width,et.height=_e.opengraph.height),et.html||(et.html=_e.opengraph.html),et.image||(et.image=_e.opengraph.thumbnail_url)),et)),decodeIDNA=_e=>_e.split(".").map(et=>et.indexOf(IDNA_PREFIX)===0?punycode.decode(et.slice(IDNA_PREFIX.length)):et).join("."),chatMessageSchema=z$1.object({account_id:z$1.string(),media_attachments:filteredArray(attachmentSchema),card:cardSchema.nullable().catch(null),chat_id:z$1.string(),content:contentSchema,created_at:z$1.string().datetime().catch(new Date().toUTCString()),emojis:filteredArray(customEmojiSchema),expiration:z$1.number().optional().catch(void 0),emoji_reactions:z$1.array(emojiSchema).min(1).nullable().catch(null),id:z$1.string(),unread:z$1.coerce.boolean(),deleting:z$1.coerce.boolean(),pending:z$1.coerce.boolean()}),emojiReactionSchema=z$1.object({name:emojiSchema,count:z$1.number().nullable().catch(null),me:z$1.boolean().catch(!1),url:z$1.string().url().optional().catch(void 0)}),mrfSimpleSchema=coerceObject({accept:z$1.string().array().array().catch([]),avatar_removal:z$1.string().array().array().catch([]),banner_removal:z$1.string().array().array().catch([]),federated_timeline_removal:z$1.string().array().array().catch([]),followers_only:z$1.string().array().array().catch([]),media_nsfw:z$1.string().array().array().catch([]),media_removal:z$1.string().array().array().catch([]),reject:z$1.string().array().array().catch([]),reject_deletes:z$1.string().array().array().catch([]),report_removal:z$1.string().array().array().catch([]),handle_threads:z$1.boolean().catch(!0)}),configurationSchema=coerceObject({chats:coerceObject({max_characters:z$1.number().catch(5e3),max_media_attachments:z$1.number().catch(1)}),groups:coerceObject({max_characters_description:z$1.number().catch(160),max_characters_name:z$1.number().catch(50)}),media_attachments:coerceObject({image_matrix_limit:z$1.number().optional().catch(void 0),image_size_limit:z$1.number().optional().catch(void 0),supported_mime_types:mimeSchema.array().optional().catch(void 0),video_duration_limit:z$1.number().optional().catch(void 0),video_frame_rate_limit:z$1.number().optional().catch(void 0),video_matrix_limit:z$1.number().optional().catch(void 0),video_size_limit:z$1.number().optional().catch(void 0)}),polls:coerceObject({max_characters_per_option:z$1.number().catch(25),max_expiration:z$1.number().catch(2629746),max_options:z$1.number().catch(4),min_expiration:z$1.number().catch(300)}),statuses:coerceObject({max_characters:z$1.number().catch(500),max_media_attachments:z$1.number().catch(4)})}),pleromaSchema=coerceObject({metadata:coerceObject({account_activation_required:z$1.boolean().catch(!1),birthday_min_age:z$1.number().catch(0),birthday_required:z$1.boolean().catch(!1),features:z$1.string().array().catch([]),federation:coerceObject({enabled:z$1.boolean().catch(!0),mrf_policies:z$1.string().array().optional().catch(void 0),mrf_simple:mrfSimpleSchema}),fields_limits:z$1.any(),migration_cooldown_period:z$1.number().optional().catch(void 0),translation:coerceObject({allow_remote:z$1.boolean().catch(!0),allow_unauthenticated:z$1.boolean().catch(!1),source_languages:z$1.string().array().optional().catch(void 0),target_languages:z$1.string().array().optional().catch(void 0)})}),oauth_consumer_strategies:z$1.string().array().catch([]),stats:coerceObject({mau:z$1.number().optional().catch(void 0)}),vapid_public_key:z$1.string().catch("")}),statsSchema=coerceObject({domain_count:z$1.number().catch(0),status_count:z$1.number().catch(0),user_count:z$1.number().catch(0)}),urlsSchema=coerceObject({streaming_api:z$1.string().url().optional().catch(void 0)}),usageSchema=coerceObject({users:coerceObject({active_month:z$1.number().catch(0)})}),instanceSchema=coerceObject({approval_required:z$1.boolean().catch(!1),configuration:configurationSchema,contact_account:accountSchema.optional().catch(void 0),description:z$1.string().catch(""),description_limit:z$1.number().catch(1500),email:z$1.string().email().catch(""),feature_quote:z$1.boolean().catch(!1),fedibird_capabilities:z$1.array(z$1.string()).catch([]),languages:z$1.string().array().catch([]),pleroma:pleromaSchema,registrations:z$1.boolean().catch(!1),rules:z$1.any(),short_description:z$1.string().catch(""),stats:statsSchema,thumbnail:z$1.string().catch(""),title:z$1.string().catch(""),urls:urlsSchema,usage:usageSchema,version:z$1.string().catch("")}),mentionSchema=z$1.object({acct:z$1.string(),id:z$1.string(),url:z$1.string().url().catch(""),username:z$1.string().catch("")}).transform(_e=>(_e.username||(_e.username=_e.acct.split("@")[0]),_e)),locationSchema=z$1.object({url:z$1.string().url().catch(""),description:z$1.string().catch(""),country:z$1.string().catch(""),locality:z$1.string().catch(""),region:z$1.string().catch(""),postal_code:z$1.string().catch(""),street:z$1.string().catch(""),origin_id:z$1.string().catch(""),origin_provider:z$1.string().catch(""),type:z$1.string().catch(""),timezone:z$1.string().catch(""),name:z$1.string().catch(""),latitude:z$1.number().catch(0),longitude:z$1.number().catch(0),geom:z$1.object({coordinates:z$1.tuple([z$1.number(),z$1.number()]).nullable().catch(null),srid:z$1.string().catch("")}).nullable().catch(null)}),eventSchema=z$1.object({name:z$1.string().catch(""),start_time:z$1.string().datetime().nullable().catch(null),end_time:z$1.string().datetime().nullable().catch(null),join_mode:z$1.enum(["free","restricted","invite"]).nullable().catch(null),participants_count:z$1.number().catch(0),location:locationSchema.nullable().catch(null),join_state:z$1.enum(["pending","reject","accept"]).nullable().catch(null),banner:attachmentSchema.nullable().catch(null),links:z$1.array(attachmentSchema).nullable().catch(null)}),pollOptionSchema=z$1.object({title:z$1.string().catch(""),votes_count:z$1.number().catch(0)}),pollSchema=z$1.object({emojis:filteredArray(customEmojiSchema),expired:z$1.boolean().catch(!1),expires_at:z$1.string().datetime().nullable().catch(null),id:z$1.string(),multiple:z$1.boolean().catch(!1),options:z$1.array(pollOptionSchema).min(2),voters_count:z$1.number().catch(0),votes_count:z$1.number().catch(0),own_votes:z$1.array(z$1.number()).nonempty().nullable().catch(null),voted:z$1.boolean().catch(!1),pleroma:z$1.object({non_anonymous:z$1.boolean().catch(!1)}).optional().catch(void 0)}).transform(_e=>{var nt;const et=makeCustomEmojiMap(_e.emojis),tt=_e.options.map(rt=>({...rt,title_emojified:emojify(escapeTextContentForBrowser(rt.title),et)}));return(nt=_e.own_votes)!=null&&nt.length&&(_e.voted=!0),{..._e,options:tt}}),historySchema=z$1.object({accounts:z$1.coerce.number(),uses:z$1.coerce.number()}),tagSchema=z$1.object({name:z$1.string().min(1),url:z$1.string().url().catch(""),history:z$1.array(historySchema).nullable().catch(null),following:z$1.boolean().catch(!1)}),statusPleromaSchema=z$1.object({emoji_reactions:filteredArray(emojiReactionSchema),event:eventSchema.nullish().catch(void 0),quote:z$1.literal(null).catch(null),quote_visible:z$1.boolean().catch(!0)}),baseStatusSchema=z$1.object({account:accountSchema,application:z$1.object({name:z$1.string(),website:z$1.string().url().nullable().catch(null)}).nullable().catch(null),bookmarked:z$1.coerce.boolean(),card:cardSchema.nullable().catch(null),content:contentSchema,created_at:dateSchema,disliked:z$1.coerce.boolean(),dislikes_count:z$1.number().catch(0),edited_at:z$1.string().datetime().nullable().catch(null),emojis:filteredArray(customEmojiSchema),favourited:z$1.coerce.boolean(),favourites_count:z$1.number().catch(0),group:groupSchema.nullable().catch(null),in_reply_to_account_id:z$1.string().nullable().catch(null),in_reply_to_id:z$1.string().nullable().catch(null),id:z$1.string(),language:z$1.string().nullable().catch(null),media_attachments:filteredArray(attachmentSchema),mentions:filteredArray(mentionSchema),muted:z$1.coerce.boolean(),pinned:z$1.coerce.boolean(),pleroma:statusPleromaSchema.optional().catch(void 0),poll:pollSchema.nullable().catch(null),quote:z$1.literal(null).catch(null),quotes_count:z$1.number().catch(0),reblog:z$1.literal(null).catch(null),reblogged:z$1.coerce.boolean(),reblogs_count:z$1.number().catch(0),replies_count:z$1.number().catch(0),sensitive:z$1.coerce.boolean(),spoiler_text:contentSchema,tags:filteredArray(tagSchema),tombstone:z$1.object({reason:z$1.enum(["deleted"])}).nullable().optional().catch(void 0),uri:z$1.string().url().catch(""),url:z$1.string().url().catch(""),visibility:z$1.string().catch("public")}),buildSearchIndex=_e=>{const et=_e.poll?_e.poll.options.map(({title:at})=>at):[],tt=_e.mentions.map(({acct:at})=>`@${at}`),nt=[_e.spoiler_text,_e.content,...et,...tt],rt=unescapeHTML(nt.join(` -`))||"";return new DOMParser().parseFromString(rt,"text/html").documentElement.textContent||""},transformStatus=({pleroma:_e,...et})=>{const tt=makeCustomEmojiMap(et.emojis),nt=stripCompatibilityFeatures(emojify(et.content,tt)),rt=emojify(escapeTextContentForBrowser(et.spoiler_text),tt);return{...et,approval_status:"approval",contentHtml:nt,expectsCard:!1,event:_e==null?void 0:_e.event,filtered:[],hidden:!1,pleroma:_e?(()=>{const{event:at,...it}=_e;return it})():void 0,search_index:buildSearchIndex(et),showFiltered:!1,spoilerHtml:rt,translation:void 0}},embeddedStatusSchema=baseStatusSchema.transform(transformStatus).nullable().catch(null),statusSchema$1=baseStatusSchema.extend({quote:embeddedStatusSchema,reblog:embeddedStatusSchema,pleroma:statusPleromaSchema.extend({quote:embeddedStatusSchema}).optional().catch(void 0)}).transform(({pleroma:_e,...et})=>({...et,event:_e==null?void 0:_e.event,quote:(_e==null?void 0:_e.quote)||et.quote||null,pleroma:_e?(()=>{const{event:tt,quote:nt,...rt}=_e;return rt})():void 0})).transform(transformStatus),baseNotificationSchema=z$1.object({account:accountSchema,created_at:z$1.string().datetime().catch(new Date().toUTCString()),id:z$1.string(),type:z$1.string(),total_count:z$1.number().optional().catch(void 0)}),mentionNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("mention"),status:statusSchema$1}),statusNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("status"),status:statusSchema$1}),reblogNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("reblog"),status:statusSchema$1}),followNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("follow")}),followRequestNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("follow_request")}),favouriteNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("favourite"),status:statusSchema$1}),pollNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("poll"),status:statusSchema$1}),updateNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("update"),status:statusSchema$1}),moveNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("move"),target:accountSchema}),chatMessageNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("chat_message"),chat_message:chatMessageSchema}),emojiReactionNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("pleroma:emoji_reaction"),emoji:emojiSchema,emoji_url:z$1.string().url().optional().catch(void 0)}),eventReminderNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("pleroma:event_reminder"),status:statusSchema$1}),participationRequestNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("pleroma:participation_request"),status:statusSchema$1}),participationAcceptedNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("pleroma:participation_accepted"),status:statusSchema$1});z$1.discriminatedUnion("type",[mentionNotificationSchema,statusNotificationSchema,reblogNotificationSchema,followNotificationSchema,followRequestNotificationSchema,favouriteNotificationSchema,pollNotificationSchema,updateNotificationSchema,moveNotificationSchema,chatMessageNotificationSchema,emojiReactionNotificationSchema,eventReminderNotificationSchema,participationRequestNotificationSchema,participationAcceptedNotificationSchema]);const patronUserSchema=z$1.object({is_patron:z$1.boolean().catch(!1),url:z$1.string().url()}).transform(_e=>({id:_e.url,..._e})),tombstoneSchema=z$1.object({reason:z$1.enum(["deleted"])}),adSchema=z$1.object({card:cardSchema,impression:z$1.string().optional().catch(void 0),expires_at:z$1.string().datetime().optional().catch(void 0),reason:z$1.string().optional().catch(void 0)}),ACCOUNT_IMPORT="ACCOUNT_IMPORT",ACCOUNTS_IMPORT="ACCOUNTS_IMPORT",GROUPS_IMPORT="GROUPS_IMPORT",STATUS_IMPORT="STATUS_IMPORT",STATUSES_IMPORT="STATUSES_IMPORT",POLLS_IMPORT="POLLS_IMPORT",ACCOUNT_FETCH_FAIL_FOR_USERNAME_LOOKUP="ACCOUNT_FETCH_FAIL_FOR_USERNAME_LOOKUP",importAccounts$1=_e=>(et,tt)=>{et({type:ACCOUNTS_IMPORT,accounts:_e});try{const nt=filteredArray(accountSchema).parse(_e);et(importEntities$1(nt,Entities.ACCOUNTS))}catch{}},importGroups=_e=>importEntities$1(_e,Entities.GROUPS),importStatus$5=(_e,et)=>(tt,nt)=>{const rt=getSettings(nt()).get("expandSpoilers");return tt({type:STATUS_IMPORT,status:_e,idempotencyKey:et,expandSpoilers:rt})},importStatuses$4=_e=>(et,tt)=>{const nt=getSettings(tt()).get("expandSpoilers");return et({type:STATUSES_IMPORT,statuses:_e,expandSpoilers:nt})},importPolls$1=_e=>({type:POLLS_IMPORT,polls:_e}),importFetchedAccount$1=_e=>importFetchedAccounts([_e]),importFetchedAccounts=(_e,et={should_refetch:!1})=>{const{should_refetch:tt}=et,nt=[],rt=at=>{at.id&&(tt&&(at.should_refetch=!0),nt.push(at),at.moved&&rt(at.moved))};return _e.forEach(rt),importAccounts$1(nt)},importFetchedGroup=_e=>importFetchedGroups([_e]),importFetchedGroups=_e=>{const et=filteredArray(groupSchema).parse(_e);return importGroups(et)},importFetchedStatus=(_e,et)=>tt=>{var nt,rt,at,it,ot,st,ct,ut,dt,ft,pt;isBroken(_e)||((nt=_e.reblog)!=null&&nt.id&&tt(importFetchedStatus(_e.reblog)),(rt=_e.quote)!=null&&rt.id&&tt(importFetchedStatus(_e.quote)),(it=(at=_e.pleroma)==null?void 0:at.quote)!=null&&it.id&&tt(importFetchedStatus(_e.pleroma.quote)),(st=(ot=_e.reblog)==null?void 0:ot.quote)!=null&&st.id&&tt(importFetchedStatus(_e.reblog.quote)),(dt=(ut=(ct=_e.reblog)==null?void 0:ct.pleroma)==null?void 0:ut.quote)!=null&&dt.id&&tt(importFetchedStatus(_e.reblog.pleroma.quote)),(ft=_e.poll)!=null&&ft.id&&tt(importFetchedPoll(_e.poll)),(pt=_e.group)!=null&&pt.id&&tt(importFetchedGroup(_e.group)),tt(importFetchedAccount$1(_e.account)),tt(importStatus$5(_e,et)))},isBroken=_e=>{try{return!!(!_e.account.id||_e.reblog&&!_e.reblog.account.id)}catch{return!0}},importFetchedStatuses=_e=>(et,tt)=>{const nt=[],rt=[],at=[];function it(ot){var st,ct,ut,dt,ft,pt;isBroken(ot)||(rt.push(ot),nt.push(ot.account),(st=ot.reblog)!=null&&st.id&&it(ot.reblog),(ct=ot.quote)!=null&&ct.id&&it(ot.quote),(dt=(ut=ot.pleroma)==null?void 0:ut.quote)!=null&&dt.id&&it(ot.pleroma.quote),(ft=ot.poll)!=null&&ft.id&&at.push(ot.poll),(pt=ot.group)!=null&&pt.id&&et(importFetchedGroup(ot.group)))}_e.forEach(it),et(importPolls$1(at)),et(importFetchedAccounts(nt)),et(importStatuses$4(rt))},importFetchedPoll=_e=>et=>{et(importPolls$1([_e]))},importErrorWhileFetchingAccountByUsername=_e=>({type:ACCOUNT_FETCH_FAIL_FOR_USERNAME_LOOKUP,username:_e}),ACCOUNT_CREATE_REQUEST="ACCOUNT_CREATE_REQUEST",ACCOUNT_CREATE_SUCCESS="ACCOUNT_CREATE_SUCCESS",ACCOUNT_CREATE_FAIL="ACCOUNT_CREATE_FAIL",ACCOUNT_FETCH_REQUEST="ACCOUNT_FETCH_REQUEST",ACCOUNT_FETCH_SUCCESS="ACCOUNT_FETCH_SUCCESS",ACCOUNT_FETCH_FAIL="ACCOUNT_FETCH_FAIL",ACCOUNT_BLOCK_REQUEST="ACCOUNT_BLOCK_REQUEST",ACCOUNT_BLOCK_SUCCESS="ACCOUNT_BLOCK_SUCCESS",ACCOUNT_BLOCK_FAIL="ACCOUNT_BLOCK_FAIL",ACCOUNT_UNBLOCK_REQUEST="ACCOUNT_UNBLOCK_REQUEST",ACCOUNT_UNBLOCK_SUCCESS="ACCOUNT_UNBLOCK_SUCCESS",ACCOUNT_UNBLOCK_FAIL="ACCOUNT_UNBLOCK_FAIL",ACCOUNT_MUTE_REQUEST="ACCOUNT_MUTE_REQUEST",ACCOUNT_MUTE_SUCCESS="ACCOUNT_MUTE_SUCCESS",ACCOUNT_MUTE_FAIL="ACCOUNT_MUTE_FAIL",ACCOUNT_UNMUTE_REQUEST="ACCOUNT_UNMUTE_REQUEST",ACCOUNT_UNMUTE_SUCCESS="ACCOUNT_UNMUTE_SUCCESS",ACCOUNT_UNMUTE_FAIL="ACCOUNT_UNMUTE_FAIL",ACCOUNT_SUBSCRIBE_REQUEST="ACCOUNT_SUBSCRIBE_REQUEST",ACCOUNT_SUBSCRIBE_SUCCESS="ACCOUNT_SUBSCRIBE_SUCCESS",ACCOUNT_SUBSCRIBE_FAIL="ACCOUNT_SUBSCRIBE_FAIL",ACCOUNT_UNSUBSCRIBE_REQUEST="ACCOUNT_UNSUBSCRIBE_REQUEST",ACCOUNT_UNSUBSCRIBE_SUCCESS="ACCOUNT_UNSUBSCRIBE_SUCCESS",ACCOUNT_UNSUBSCRIBE_FAIL="ACCOUNT_UNSUBSCRIBE_FAIL",ACCOUNT_PIN_REQUEST="ACCOUNT_PIN_REQUEST",ACCOUNT_PIN_SUCCESS="ACCOUNT_PIN_SUCCESS",ACCOUNT_PIN_FAIL="ACCOUNT_PIN_FAIL",ACCOUNT_UNPIN_REQUEST="ACCOUNT_UNPIN_REQUEST",ACCOUNT_UNPIN_SUCCESS="ACCOUNT_UNPIN_SUCCESS",ACCOUNT_UNPIN_FAIL="ACCOUNT_UNPIN_FAIL",ACCOUNT_REMOVE_FROM_FOLLOWERS_REQUEST="ACCOUNT_REMOVE_FROM_FOLLOWERS_REQUEST",ACCOUNT_REMOVE_FROM_FOLLOWERS_SUCCESS="ACCOUNT_REMOVE_FROM_FOLLOWERS_SUCCESS",ACCOUNT_REMOVE_FROM_FOLLOWERS_FAIL="ACCOUNT_REMOVE_FROM_FOLLOWERS_FAIL",PINNED_ACCOUNTS_FETCH_REQUEST="PINNED_ACCOUNTS_FETCH_REQUEST",PINNED_ACCOUNTS_FETCH_SUCCESS="PINNED_ACCOUNTS_FETCH_SUCCESS",PINNED_ACCOUNTS_FETCH_FAIL="PINNED_ACCOUNTS_FETCH_FAIL",ACCOUNT_SEARCH_REQUEST="ACCOUNT_SEARCH_REQUEST",ACCOUNT_SEARCH_SUCCESS="ACCOUNT_SEARCH_SUCCESS",ACCOUNT_SEARCH_FAIL="ACCOUNT_SEARCH_FAIL",ACCOUNT_LOOKUP_REQUEST="ACCOUNT_LOOKUP_REQUEST",ACCOUNT_LOOKUP_SUCCESS="ACCOUNT_LOOKUP_SUCCESS",ACCOUNT_LOOKUP_FAIL="ACCOUNT_LOOKUP_FAIL",FOLLOWERS_FETCH_SUCCESS="FOLLOWERS_FETCH_SUCCESS",FOLLOWERS_EXPAND_SUCCESS="FOLLOWERS_EXPAND_SUCCESS",FOLLOWING_FETCH_SUCCESS="FOLLOWING_FETCH_SUCCESS",FOLLOWING_EXPAND_SUCCESS="FOLLOWING_EXPAND_SUCCESS",RELATIONSHIPS_FETCH_REQUEST="RELATIONSHIPS_FETCH_REQUEST",RELATIONSHIPS_FETCH_SUCCESS="RELATIONSHIPS_FETCH_SUCCESS",RELATIONSHIPS_FETCH_FAIL="RELATIONSHIPS_FETCH_FAIL",FOLLOW_REQUESTS_FETCH_REQUEST="FOLLOW_REQUESTS_FETCH_REQUEST",FOLLOW_REQUESTS_FETCH_SUCCESS="FOLLOW_REQUESTS_FETCH_SUCCESS",FOLLOW_REQUESTS_FETCH_FAIL="FOLLOW_REQUESTS_FETCH_FAIL",FOLLOW_REQUESTS_EXPAND_REQUEST="FOLLOW_REQUESTS_EXPAND_REQUEST",FOLLOW_REQUESTS_EXPAND_SUCCESS="FOLLOW_REQUESTS_EXPAND_SUCCESS",FOLLOW_REQUESTS_EXPAND_FAIL="FOLLOW_REQUESTS_EXPAND_FAIL",FOLLOW_REQUEST_AUTHORIZE_REQUEST="FOLLOW_REQUEST_AUTHORIZE_REQUEST",FOLLOW_REQUEST_AUTHORIZE_SUCCESS="FOLLOW_REQUEST_AUTHORIZE_SUCCESS",FOLLOW_REQUEST_AUTHORIZE_FAIL="FOLLOW_REQUEST_AUTHORIZE_FAIL",FOLLOW_REQUEST_REJECT_REQUEST="FOLLOW_REQUEST_REJECT_REQUEST",FOLLOW_REQUEST_REJECT_SUCCESS="FOLLOW_REQUEST_REJECT_SUCCESS",FOLLOW_REQUEST_REJECT_FAIL="FOLLOW_REQUEST_REJECT_FAIL",NOTIFICATION_SETTINGS_REQUEST="NOTIFICATION_SETTINGS_REQUEST",NOTIFICATION_SETTINGS_SUCCESS="NOTIFICATION_SETTINGS_SUCCESS",NOTIFICATION_SETTINGS_FAIL="NOTIFICATION_SETTINGS_FAIL",BIRTHDAY_REMINDERS_FETCH_REQUEST="BIRTHDAY_REMINDERS_FETCH_REQUEST",BIRTHDAY_REMINDERS_FETCH_SUCCESS="BIRTHDAY_REMINDERS_FETCH_SUCCESS",BIRTHDAY_REMINDERS_FETCH_FAIL="BIRTHDAY_REMINDERS_FETCH_FAIL",maybeRedirectLogin=(_e,et)=>{var tt;et&&((tt=_e==null?void 0:_e.response)==null?void 0:tt.status)===401&&et.push("/login")},noOp$c=()=>new Promise(_e=>_e(void 0)),createAccount$1=_e=>(et,tt)=>(et({type:ACCOUNT_CREATE_REQUEST,params:_e}),api(tt,"app").post("/api/v1/accounts",_e).then(({data:nt})=>et({type:ACCOUNT_CREATE_SUCCESS,params:_e,token:nt})).catch(nt=>{throw et({type:ACCOUNT_CREATE_FAIL,error:nt,params:_e}),nt})),fetchAccount=_e=>(et,tt)=>(et(fetchRelationships([_e])),selectAccount(tt(),_e)?null:(et(fetchAccountRequest(_e)),api(tt).get(`/api/v1/accounts/${_e}`).then(rt=>{et(importFetchedAccount$1(rt.data)),et(fetchAccountSuccess(rt.data))}).catch(rt=>{et(fetchAccountFail$1(_e,rt))}))),fetchAccountByUsername=(_e,et)=>(tt,nt)=>{const{instance:rt,me:at}=nt(),it=getFeatures(rt);return it.accountByUsername&&(at||!it.accountLookup)?api(nt).get(`/api/v1/accounts/${_e}`).then(ot=>{tt(fetchRelationships([ot.data.id])),tt(importFetchedAccount$1(ot.data)),tt(fetchAccountSuccess(ot.data))}).catch(ot=>{tt(fetchAccountFail$1(null,ot)),tt(importErrorWhileFetchingAccountByUsername(_e))}):it.accountLookup?tt(accountLookup(_e)).then(ot=>{tt(fetchRelationships([ot.id])),tt(fetchAccountSuccess(ot))}).catch(ot=>{tt(fetchAccountFail$1(null,ot)),tt(importErrorWhileFetchingAccountByUsername(_e)),maybeRedirectLogin(ot,et)}):tt(accountSearch({q:_e,limit:5,resolve:!0})).then(ot=>{const st=ot.find(ct=>ct.acct===_e);if(st)tt(fetchRelationships([st.id])),tt(fetchAccountSuccess(st));else throw ot}).catch(ot=>{tt(fetchAccountFail$1(null,ot)),tt(importErrorWhileFetchingAccountByUsername(_e))})},fetchAccountRequest=_e=>({type:ACCOUNT_FETCH_REQUEST,id:_e}),fetchAccountSuccess=_e=>({type:ACCOUNT_FETCH_SUCCESS,account:_e}),fetchAccountFail$1=(_e,et)=>({type:ACCOUNT_FETCH_FAIL,id:_e,error:et,skipAlert:!0}),blockAccount=_e=>(et,tt)=>isLoggedIn(tt)?(et(blockAccountRequest(_e)),api(tt).post(`/api/v1/accounts/${_e}/block`).then(nt=>(et(importEntities$1([nt.data],Entities.RELATIONSHIPS)),et(blockAccountSuccess(nt.data,tt().statuses)))).catch(nt=>et(blockAccountFail(nt)))):null,unblockAccount=_e=>(et,tt)=>isLoggedIn(tt)?(et(unblockAccountRequest(_e)),api(tt).post(`/api/v1/accounts/${_e}/unblock`).then(nt=>(et(importEntities$1([nt.data],Entities.RELATIONSHIPS)),et(unblockAccountSuccess(nt.data)))).catch(nt=>et(unblockAccountFail(nt)))):null,blockAccountRequest=_e=>({type:ACCOUNT_BLOCK_REQUEST,id:_e}),blockAccountSuccess=(_e,et)=>({type:ACCOUNT_BLOCK_SUCCESS,relationship:_e,statuses:et}),blockAccountFail=_e=>({type:ACCOUNT_BLOCK_FAIL,error:_e}),unblockAccountRequest=_e=>({type:ACCOUNT_UNBLOCK_REQUEST,id:_e}),unblockAccountSuccess=_e=>({type:ACCOUNT_UNBLOCK_SUCCESS,relationship:_e}),unblockAccountFail=_e=>({type:ACCOUNT_UNBLOCK_FAIL,error:_e}),muteAccount=(_e,et,tt=0)=>(nt,rt)=>{if(!isLoggedIn(rt))return null;nt(muteAccountRequest(_e));const at={notifications:et};if(tt){const ot=rt().instance,st=parseVersion(ot.version);st.software===PLEROMA||st.software===AKKOMA?at.expires_in=tt:at.duration=tt}return api(rt).post(`/api/v1/accounts/${_e}/mute`,at).then(it=>(nt(importEntities$1([it.data],Entities.RELATIONSHIPS)),nt(muteAccountSuccess(it.data,rt().statuses)))).catch(it=>nt(muteAccountFail(it)))},unmuteAccount=_e=>(et,tt)=>isLoggedIn(tt)?(et(unmuteAccountRequest(_e)),api(tt).post(`/api/v1/accounts/${_e}/unmute`).then(nt=>(et(importEntities$1([nt.data],Entities.RELATIONSHIPS)),et(unmuteAccountSuccess(nt.data)))).catch(nt=>et(unmuteAccountFail(nt)))):null,muteAccountRequest=_e=>({type:ACCOUNT_MUTE_REQUEST,id:_e}),muteAccountSuccess=(_e,et)=>({type:ACCOUNT_MUTE_SUCCESS,relationship:_e,statuses:et}),muteAccountFail=_e=>({type:ACCOUNT_MUTE_FAIL,error:_e}),unmuteAccountRequest=_e=>({type:ACCOUNT_UNMUTE_REQUEST,id:_e}),unmuteAccountSuccess=_e=>({type:ACCOUNT_UNMUTE_SUCCESS,relationship:_e}),unmuteAccountFail=_e=>({type:ACCOUNT_UNMUTE_FAIL,error:_e}),subscribeAccount=(_e,et)=>(tt,nt)=>isLoggedIn(nt)?(tt(subscribeAccountRequest(_e)),api(nt).post(`/api/v1/pleroma/accounts/${_e}/subscribe`,{notifications:et}).then(rt=>tt(subscribeAccountSuccess(rt.data))).catch(rt=>tt(subscribeAccountFail(rt)))):null,unsubscribeAccount=_e=>(et,tt)=>isLoggedIn(tt)?(et(unsubscribeAccountRequest(_e)),api(tt).post(`/api/v1/pleroma/accounts/${_e}/unsubscribe`).then(nt=>et(unsubscribeAccountSuccess(nt.data))).catch(nt=>et(unsubscribeAccountFail(nt)))):null,subscribeAccountRequest=_e=>({type:ACCOUNT_SUBSCRIBE_REQUEST,id:_e}),subscribeAccountSuccess=_e=>({type:ACCOUNT_SUBSCRIBE_SUCCESS,relationship:_e}),subscribeAccountFail=_e=>({type:ACCOUNT_SUBSCRIBE_FAIL,error:_e}),unsubscribeAccountRequest=_e=>({type:ACCOUNT_UNSUBSCRIBE_REQUEST,id:_e}),unsubscribeAccountSuccess=_e=>({type:ACCOUNT_UNSUBSCRIBE_SUCCESS,relationship:_e}),unsubscribeAccountFail=_e=>({type:ACCOUNT_UNSUBSCRIBE_FAIL,error:_e}),removeFromFollowers=_e=>(et,tt)=>isLoggedIn(tt)?(et(removeFromFollowersRequest(_e)),api(tt).post(`/api/v1/accounts/${_e}/remove_from_followers`).then(nt=>et(removeFromFollowersSuccess(nt.data))).catch(nt=>et(removeFromFollowersFail(_e,nt)))):null,removeFromFollowersRequest=_e=>({type:ACCOUNT_REMOVE_FROM_FOLLOWERS_REQUEST,id:_e}),removeFromFollowersSuccess=_e=>({type:ACCOUNT_REMOVE_FROM_FOLLOWERS_SUCCESS,relationship:_e}),removeFromFollowersFail=(_e,et)=>({type:ACCOUNT_REMOVE_FROM_FOLLOWERS_FAIL,id:_e,error:et}),fetchRelationships=_e=>(et,tt)=>{if(!isLoggedIn(tt))return null;const nt=tt().relationships,rt=_e.filter(at=>nt.get(at,null)===null);return rt.length===0?null:(et(fetchRelationshipsRequest(rt)),api(tt).get(`/api/v1/accounts/relationships?${rt.map(at=>`id[]=${at}`).join("&")}`).then(at=>{et(importEntities$1(at.data,Entities.RELATIONSHIPS)),et(fetchRelationshipsSuccess(at.data))}).catch(at=>et(fetchRelationshipsFail(at))))},fetchRelationshipsRequest=_e=>({type:RELATIONSHIPS_FETCH_REQUEST,ids:_e,skipLoading:!0}),fetchRelationshipsSuccess=_e=>({type:RELATIONSHIPS_FETCH_SUCCESS,relationships:_e,skipLoading:!0}),fetchRelationshipsFail=_e=>({type:RELATIONSHIPS_FETCH_FAIL,error:_e,skipLoading:!0}),fetchFollowRequests=()=>(_e,et)=>isLoggedIn(et)?(_e(fetchFollowRequestsRequest()),api(et).get("/api/v1/follow_requests").then(tt=>{const nt=getLinks(tt).refs.find(rt=>rt.rel==="next");_e(importFetchedAccounts(tt.data)),_e(fetchFollowRequestsSuccess(tt.data,nt?nt.uri:null))}).catch(tt=>_e(fetchFollowRequestsFail(tt)))):null,fetchFollowRequestsRequest=()=>({type:FOLLOW_REQUESTS_FETCH_REQUEST}),fetchFollowRequestsSuccess=(_e,et)=>({type:FOLLOW_REQUESTS_FETCH_SUCCESS,accounts:_e,next:et}),fetchFollowRequestsFail=_e=>({type:FOLLOW_REQUESTS_FETCH_FAIL,error:_e}),expandFollowRequests=()=>(_e,et)=>{if(!isLoggedIn(et))return null;const tt=et().user_lists.follow_requests.next;return tt===null?null:(_e(expandFollowRequestsRequest()),api(et).get(tt).then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");_e(importFetchedAccounts(nt.data)),_e(expandFollowRequestsSuccess(nt.data,rt?rt.uri:null))}).catch(nt=>_e(expandFollowRequestsFail(nt))))},expandFollowRequestsRequest=()=>({type:FOLLOW_REQUESTS_EXPAND_REQUEST}),expandFollowRequestsSuccess=(_e,et)=>({type:FOLLOW_REQUESTS_EXPAND_SUCCESS,accounts:_e,next:et}),expandFollowRequestsFail=_e=>({type:FOLLOW_REQUESTS_EXPAND_FAIL,error:_e}),authorizeFollowRequest=_e=>(et,tt)=>isLoggedIn(tt)?(et(authorizeFollowRequestRequest(_e)),api(tt).post(`/api/v1/follow_requests/${_e}/authorize`).then(()=>et(authorizeFollowRequestSuccess(_e))).catch(nt=>et(authorizeFollowRequestFail(_e,nt)))):null,authorizeFollowRequestRequest=_e=>({type:FOLLOW_REQUEST_AUTHORIZE_REQUEST,id:_e}),authorizeFollowRequestSuccess=_e=>({type:FOLLOW_REQUEST_AUTHORIZE_SUCCESS,id:_e}),authorizeFollowRequestFail=(_e,et)=>({type:FOLLOW_REQUEST_AUTHORIZE_FAIL,id:_e,error:et}),rejectFollowRequest=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(rejectFollowRequestRequest(_e)),api(tt).post(`/api/v1/follow_requests/${_e}/reject`).then(()=>et(rejectFollowRequestSuccess(_e))).catch(nt=>et(rejectFollowRequestFail(_e,nt))))},rejectFollowRequestRequest=_e=>({type:FOLLOW_REQUEST_REJECT_REQUEST,id:_e}),rejectFollowRequestSuccess=_e=>({type:FOLLOW_REQUEST_REJECT_SUCCESS,id:_e}),rejectFollowRequestFail=(_e,et)=>({type:FOLLOW_REQUEST_REJECT_FAIL,id:_e,error:et}),pinAccount=_e=>(et,tt)=>isLoggedIn(tt)?(et(pinAccountRequest(_e)),api(tt).post(`/api/v1/accounts/${_e}/pin`).then(nt=>{et(pinAccountSuccess(nt.data))}).catch(nt=>{et(pinAccountFail(nt))})):et(noOp$c),unpinAccount=_e=>(et,tt)=>isLoggedIn(tt)?(et(unpinAccountRequest(_e)),api(tt).post(`/api/v1/accounts/${_e}/unpin`).then(nt=>{et(unpinAccountSuccess(nt.data))}).catch(nt=>{et(unpinAccountFail(nt))})):et(noOp$c),updateNotificationSettings=_e=>(et,tt)=>(et({type:NOTIFICATION_SETTINGS_REQUEST,params:_e}),api(tt).put("/api/v1/pleroma/notification_settings",_e).then(({data:nt})=>{et({type:NOTIFICATION_SETTINGS_SUCCESS,params:_e,data:nt})}).catch(nt=>{throw et({type:NOTIFICATION_SETTINGS_FAIL,params:_e,error:nt}),nt})),pinAccountRequest=_e=>({type:ACCOUNT_PIN_REQUEST,id:_e}),pinAccountSuccess=_e=>({type:ACCOUNT_PIN_SUCCESS,relationship:_e}),pinAccountFail=_e=>({type:ACCOUNT_PIN_FAIL,error:_e}),unpinAccountRequest=_e=>({type:ACCOUNT_UNPIN_REQUEST,id:_e}),unpinAccountSuccess=_e=>({type:ACCOUNT_UNPIN_SUCCESS,relationship:_e}),unpinAccountFail=_e=>({type:ACCOUNT_UNPIN_FAIL,error:_e}),fetchPinnedAccounts=_e=>(et,tt)=>{et(fetchPinnedAccountsRequest(_e)),api(tt).get("/api/v1/endorsements").then(nt=>{et(importFetchedAccounts(nt.data)),et(fetchPinnedAccountsSuccess(_e,nt.data,null))}).catch(nt=>{et(fetchPinnedAccountsFail(_e,nt))})},fetchPinnedAccountsRequest=_e=>({type:PINNED_ACCOUNTS_FETCH_REQUEST,id:_e}),fetchPinnedAccountsSuccess=(_e,et,tt)=>({type:PINNED_ACCOUNTS_FETCH_SUCCESS,id:_e,accounts:et,next:tt}),fetchPinnedAccountsFail=(_e,et)=>({type:PINNED_ACCOUNTS_FETCH_FAIL,id:_e,error:et}),accountSearch=(_e,et)=>(tt,nt)=>(tt({type:ACCOUNT_SEARCH_REQUEST,params:_e}),api(nt).get("/api/v1/accounts/search",{params:_e,signal:et}).then(({data:rt})=>(tt(importFetchedAccounts(rt)),tt({type:ACCOUNT_SEARCH_SUCCESS,accounts:rt}),rt)).catch(rt=>{throw tt({type:ACCOUNT_SEARCH_FAIL,skipAlert:!0}),rt})),accountLookup=(_e,et)=>(tt,nt)=>(tt({type:ACCOUNT_LOOKUP_REQUEST,acct:_e}),api(nt).get("/api/v1/accounts/lookup",{params:{acct:_e},cancelToken:et}).then(({data:rt})=>(rt&&rt.id&&tt(importFetchedAccount$1(rt)),tt({type:ACCOUNT_LOOKUP_SUCCESS,account:rt}),rt)).catch(rt=>{throw tt({type:ACCOUNT_LOOKUP_FAIL}),rt})),fetchBirthdayReminders=(_e,et)=>(tt,nt)=>{if(!isLoggedIn(nt))return;const rt=nt().me;return tt({type:BIRTHDAY_REMINDERS_FETCH_REQUEST,day:et,month:_e,id:rt}),api(nt).get("/api/v1/pleroma/birthdays",{params:{day:et,month:_e}}).then(at=>{tt(importFetchedAccounts(at.data)),tt({type:BIRTHDAY_REMINDERS_FETCH_SUCCESS,accounts:at.data,day:et,month:_e,id:rt})}).catch(at=>{tt({type:BIRTHDAY_REMINDERS_FETCH_FAIL,day:et,month:_e,id:rt})})},APP_CREATE_REQUEST="APP_CREATE_REQUEST",APP_CREATE_SUCCESS="APP_CREATE_SUCCESS",APP_CREATE_FAIL="APP_CREATE_FAIL";function createApp(_e,et){return tt=>(tt({type:APP_CREATE_REQUEST,params:_e}),baseClient(null,et).post("/api/v1/apps",_e).then(({data:nt})=>(tt({type:APP_CREATE_SUCCESS,params:_e,app:nt}),nt)).catch(nt=>{throw tt({type:APP_CREATE_FAIL,params:_e,error:nt}),nt}))}const EmojiRecord=Record({category:"",shortcode:"",static_url:"",url:"",visible_in_picker:!0}),normalizeEmoji=_e=>EmojiRecord(Map$3(fromJS(_e))),mergeDefined=(_e,et)=>_e===void 0?et:_e,makeEmojiMap=_e=>_e.reduce((et,tt)=>(et[`:${tt.shortcode}:`]=tt,et),{}),normalizeId$1=_e=>z$1.string().nullable().catch(null).parse(_e),toSchema=_e=>z$1.custom().transform(_e),maybeFromJS=_e=>"toJS"in _e?_e.toJS():_e,AccountRecord=Record({accepts_chat_messages:!1,acct:"",avatar:"",avatar_static:"",birthday:"",bot:!1,chats_onboarded:!0,created_at:"",discoverable:!1,display_name:"",emojis:List$1(),favicon:"",fields:List$1(),followers_count:0,following_count:0,fqn:"",header:"",header_static:"",id:"",last_status_at:"",location:"",locked:!1,moved:null,mute_expires_at:null,note:"",pleroma:Map$3(),source:Map$3(),statuses_count:0,uri:"",url:"",username:"",website:"",verified:!1,admin:!1,display_name_html:"",domain:"",moderator:!1,note_emojified:"",note_plain:"",patron:null,relationship:null,should_refetch:!1,staff:!1}),FieldRecord=Record({name:"",value:"",verified_at:null,name_emojified:"",value_emojified:"",value_plain:""}),normalizePleromaLegacyFields=_e=>_e.update("pleroma",Map$3(),et=>et.withMutations(tt=>{const nt=Map$3({is_active:!tt.get("deactivated"),is_confirmed:!tt.get("confirmation_pending"),is_approved:!tt.get("approval_pending")});tt.mergeWith(mergeDefined,nt),tt.deleteAll(["deactivated","confirmation_pending","approval_pending"])})),normalizeAvatar$1=_e=>{const et=_e.get("avatar"),tt=_e.get("avatar_static"),nt=vitePluginRequire_1697861817641_69752310;return _e.withMutations(rt=>{rt.set("avatar",et||tt||nt),rt.set("avatar_static",tt||et||nt)})},normalizeHeader$1=_e=>{const et=_e.get("header"),tt=_e.get("header_static"),nt=vitePluginRequire_1697861817641_37912257;return _e.withMutations(rt=>{rt.set("header",et||tt||nt),rt.set("header_static",tt||et||nt)})},normalizeFields=_e=>_e.update("fields",List$1(),et=>et.map(FieldRecord)),normalizeEmojis$4=_e=>{const et=_e.get("emojis",List$1()).map(normalizeEmoji);return _e.set("emojis",et)},normalizeBirthday=_e=>{const et=[_e.getIn(["pleroma","birthday"]),_e.getIn(["other_settings","birthday"])].find(Boolean);return _e.set("birthday",et)},getTags=_e=>{const et=_e.getIn(["pleroma","tags"]);return List$1(List$1.isList(et)?et:[])},normalizeVerified=_e=>_e.update("verified",et=>[et===!0,getTags(_e).includes("verified")].some(Boolean)),normalizeDonor=_e=>{const et=getTags(_e),tt=et.includes("donor")?et.push("badge:donor"):et;return _e.setIn(["pleroma","tags"],tt)},normalizeLocation$1=_e=>_e.update("location",et=>[et,_e.getIn(["pleroma","location"]),_e.getIn(["other_settings","location"])].find(Boolean)),fixUsername=_e=>{const et=_e.get("acct")||"",tt=_e.get("username")||"";return _e.set("username",tt||et.split("@")[0])},fixDisplayName$1=_e=>{const et=_e.get("display_name")||"";return _e.set("display_name",et.trim().length===0?_e.get("username"):et)},addInternalFields$1=_e=>{const et=makeEmojiMap(_e.get("emojis"));return _e.withMutations(tt=>{tt.merge({display_name_html:emojify(escapeTextContentForBrowser(tt.get("display_name")),et),note_emojified:emojify(tt.get("note",""),et),note_plain:unescapeHTML(tt.get("note",""))}),tt.update("fields",List$1(),nt=>nt.map(rt=>rt.merge({name_emojified:emojify(escapeTextContentForBrowser(rt.get("name")),et),value_emojified:emojify(rt.get("value"),et),value_plain:unescapeHTML(rt.get("value"))})))})},getDomainFromURL$2=_e=>{try{const et=_e.get("url");return new URL(et).host}catch{return""}},guessFqn$1=_e=>{const et=_e.get("acct",""),[tt,nt]=et.split("@");return nt?et:[tt,getDomainFromURL$2(_e)].join("@")},normalizeFqn$1=_e=>{const et=_e.get("fqn")||guessFqn$1(_e);return _e.set("fqn",et)},normalizeFavicon=_e=>{const et=_e.getIn(["pleroma","favicon"])||"";return _e.set("favicon",et)},addDomain=_e=>{const et=_e.get("acct","").split("@")[1]||"";return _e.set("domain",et)},addStaffFields=_e=>{const et=_e.getIn(["pleroma","is_admin"])===!0,tt=_e.getIn(["pleroma","is_moderator"])===!0,nt=et||tt;return _e.merge({admin:et,moderator:tt,staff:nt})},normalizeDiscoverable=_e=>{const et=!!(_e.get("discoverable")||_e.getIn(["source","pleroma","discoverable"]));return _e.set("discoverable",et)},normalizeMessageAcceptance=_e=>{const et=!!(_e.getIn(["pleroma","accepts_chat_messages"])||_e.get("accepting_messages"));return _e.set("accepts_chat_messages",et)},fixBirthday=_e=>{const et=_e.get("birthday");return _e.set("birthday",et||"")},fixNote$1=_e=>_e.get("note")==="

"?_e.set("note",""):_e,normalizeAccount=_e=>AccountRecord(Map$3(fromJS(_e)).withMutations(et=>{normalizePleromaLegacyFields(et),normalizeEmojis$4(et),normalizeAvatar$1(et),normalizeHeader$1(et),normalizeFields(et),normalizeVerified(et),normalizeDonor(et),normalizeBirthday(et),normalizeLocation$1(et),normalizeFqn$1(et),normalizeFavicon(et),normalizeDiscoverable(et),normalizeMessageAcceptance(et),addDomain(et),addStaffFields(et),fixUsername(et),fixDisplayName$1(et),fixBirthday(et),fixNote$1(et),addInternalFields$1(et)})),AdminAccountRecord=Record({account:null,approved:!1,confirmed:!1,created_at:new Date,disabled:!1,domain:"",email:"",id:"",invite_request:null,ip:null,ips:List$1(),locale:null,role:null,sensitized:!1,silenced:!1,suspended:!1,username:""}),normalizePleromaAccount=_e=>_e.get("account")?_e:_e.withMutations(et=>{et.set("approved",et.get("is_approved")),et.set("confirmed",et.get("is_confirmed")),et.set("disabled",!et.get("is_active")),et.set("invite_request",et.get("registration_reason")),et.set("role",et.getIn(["roles","admin"])?"admin":et.getIn(["roles","moderator"])?"moderator":null)}),normalizeAdminAccount=_e=>AdminAccountRecord(Map$3(fromJS(_e)).withMutations(et=>{normalizePleromaAccount(et)})),AdminReportRecord=Record({account:null,action_taken:!1,action_taken_by_account:null,assigned_account:null,category:"",comment:"",created_at:new Date,id:"",rules:List$1(),statuses:List$1(),target_account:null,updated_at:new Date}),normalizePleromaReport=_e=>_e.get("actor")?_e.withMutations(et=>{et.set("target_account",et.get("account")),et.set("account",et.get("actor")),et.set("action_taken",et.get("state")!=="open"),et.set("comment",et.get("content")),et.set("updated_at",et.get("created_at"))}):_e,normalizeAdminReport=_e=>AdminReportRecord(Map$3(fromJS(_e)).withMutations(et=>{normalizePleromaReport(et)})),AnnouncementReactionRecord=Record({name:"",count:0,me:!1,url:null,static_url:null,announcement_id:""}),normalizeAnnouncementReaction=(_e,et)=>AnnouncementReactionRecord(Map$3(fromJS(_e)).withMutations(tt=>{tt.set("announcement_id",et)})),MentionRecord=Record({id:"",acct:"",username:"",url:""}),normalizeMention=_e=>MentionRecord(normalizeAccount(_e)),AnnouncementRecord=Record({id:"",content:"",starts_at:null,ends_at:null,all_day:!1,read:!1,published_at:Date,reactions:List$1(),statuses:Map$3(),mentions:List$1(),tags:List$1(),emojis:List$1(),updated_at:Date,pleroma:Map$3(),contentHtml:""}),normalizeMentions$1=_e=>_e.update("mentions",List$1(),et=>et.map(normalizeMention)),normalizeReactions=_e=>_e.update("reactions",List$1(),et=>et.map(tt=>normalizeAnnouncementReaction(tt,_e.get("id")))),normalizeEmojis$3=_e=>_e.update("emojis",List$1(),et=>et.map(normalizeEmoji)),normalizeContent$1=_e=>{const et=makeEmojiMap(_e.get("emojis")),tt=emojify(_e.get("content"),et);return _e.set("contentHtml",tt)},normalizeStatuses$1=_e=>{const et=_e.get("statuses",List$1()).reduce((tt,nt)=>tt.set(nt.get("url"),`/@${nt.getIn(["account","acct"])}/${nt.get("id")}`),Map$3());return _e.set("statuses",et)},normalizeAnnouncement=_e=>AnnouncementRecord(Map$3(fromJS(_e)).withMutations(et=>{normalizeMentions$1(et),normalizeReactions(et),normalizeEmojis$3(et),normalizeContent$1(et),normalizeStatuses$1(et)})),AttachmentRecord=Record({blurhash:void 0,description:"",external_video_id:null,id:"",meta:Map$3(),pleroma:Map$3(),preview_url:"",remote_url:null,type:"unknown",url:"",account:null,status:null}),normalizeUrls=_e=>{const et=[_e.get("url"),_e.get("preview_url"),_e.get("remote_url")].find(nt=>nt)||"",tt=Map$3({url:et,preview_url:et});return _e.mergeWith(mergeDefined,tt)},normalizeMeta=_e=>{const et=Map$3().merge(_e.get("meta"));return _e.set("meta",et)},normalizeAttachment=_e=>AttachmentRecord(Map$3(fromJS(_e)).withMutations(et=>{normalizeUrls(et),normalizeMeta(et)})),ChatRecord=Record({account:null,id:"",unread:0,last_message:null,updated_at:""}),normalizeChat=_e=>ChatRecord(Map$3(fromJS(_e))),ChatMessageRecord=Record({account_id:"",media_attachments:List$1(),card:null,chat_id:"",content:"",created_at:"",emojis:List$1(),expiration:null,emoji_reactions:null,id:"",unread:!1,deleting:!1,pending:!1}),normalizeMedia=_e=>{const et=_e.get("media_attachments"),tt=_e.get("attachment");return et?_e.set("media_attachments",List$1(et.map(normalizeAttachment))):tt?_e.set("media_attachments",List$1([normalizeAttachment(tt)])):_e.set("media_attachments",List$1())},normalizeChatMessageEmojiReaction=_e=>{const et=List$1(_e.get("emoji_reactions")||[]);return _e.set("emoji_reactions",filteredArray(emojiReactionSchema).parse(et.toJS()))},fixContent$1=_e=>_e.get("content")==="

"?_e.set("content",""):_e,normalizeChatMessage=_e=>ChatMessageRecord(Map$3(fromJS(_e)).withMutations(et=>{normalizeMedia(et),normalizeChatMessageEmojiReaction(et),fixContent$1(et)})),FilterKeywordRecord=Record({id:"",keyword:"",whole_word:!1}),normalizeFilterKeyword=_e=>FilterKeywordRecord(Map$3(fromJS(_e))),FilterStatusRecord=Record({id:"",status_id:""}),normalizeFilterStatus=_e=>FilterStatusRecord(Map$3(fromJS(_e))),FilterRecord=Record({id:"",title:"",context:List$1(),expires_at:"",filter_action:"warn",keywords:List$1(),statuses:List$1()}),normalizeFilterV1=_e=>_e.set("title",_e.get("phrase")).set("keywords",List$1([Map$3({keyword:_e.get("phrase"),whole_word:_e.get("whole_word")})])).set("filter_action",_e.get("irreversible")?"hide":"warn"),normalizeKeywords=_e=>_e.update("keywords",List$1(),et=>et.map(normalizeFilterKeyword)),normalizeStatuses=_e=>_e.update("statuses",List$1(),et=>et.map(normalizeFilterStatus)),normalizeFilter=_e=>FilterRecord(Map$3(fromJS(_e)).withMutations(et=>{et.has("phrase")&&normalizeFilterV1(et),normalizeKeywords(et),normalizeStatuses(et)})),GroupRecord=Record({avatar:"",avatar_static:"",created_at:"",deleted_at:null,display_name:"",domain:"",emojis:[],group_visibility:"",header:"",header_static:"",id:"",locked:!1,membership_required:!1,members_count:0,owner:{id:""},note:"",statuses_visibility:"public",slug:"",tags:[],uri:"",url:"",display_name_html:"",note_emojified:"",note_plain:"",relationship:null}),normalizeAvatar=_e=>{const et=_e.get("avatar"),tt=_e.get("avatar_static"),nt=vitePluginRequire_1697861817641_69752310;return _e.withMutations(rt=>{rt.set("avatar",et||tt||nt),rt.set("avatar_static",tt||et||nt)})},normalizeHeader=_e=>{const et=_e.get("header"),tt=_e.get("header_static"),nt=vitePluginRequire_1697861817641_37912257;return _e.withMutations(rt=>{rt.set("header",et||tt||nt),rt.set("header_static",tt||et||nt)})},normalizeEmojis$2=_e=>{const et=_e.get("emojis",List$1()).map(normalizeEmoji);return _e.set("emojis",et.toArray())},fixDisplayName=_e=>{const et=_e.get("display_name")||"";return _e.set("display_name",et.trim().length===0?_e.get("username"):et)},addInternalFields=_e=>{const et=makeEmojiMap(_e.get("emojis"));return _e.withMutations(tt=>{tt.merge({display_name_html:emojify(escapeTextContentForBrowser(tt.get("display_name")),et),note_emojified:emojify(tt.get("note",""),et),note_plain:unescapeHTML(tt.get("note",""))}),tt.update("fields",List$1(),nt=>nt.map(rt=>rt.merge({name_emojified:emojify(escapeTextContentForBrowser(rt.get("name")),et),value_emojified:emojify(rt.get("value"),et),value_plain:unescapeHTML(rt.get("value"))})))})},getDomainFromURL$1=_e=>{try{const et=_e.get("url");return new URL(et).host}catch{return""}},guessFqn=_e=>{const et=_e.get("acct",""),[tt,nt]=et.split("@");return nt?et:[tt,getDomainFromURL$1(_e)].join("@")},normalizeFqn=_e=>{const et=_e.get("fqn")||guessFqn(_e);return _e.set("fqn",et)},normalizeLocked=_e=>{const et=_e.get("locked")||_e.get("group_visibility")==="members_only";return _e.set("locked",et)},fixNote=_e=>_e.get("note")==="

"?_e.set("note",""):_e,normalizeGroup=_e=>GroupRecord(Map$3(fromJS(_e)).withMutations(et=>{normalizeEmojis$2(et),normalizeAvatar(et),normalizeHeader(et),normalizeFqn(et),normalizeLocked(et),fixDisplayName(et),fixNote(et),addInternalFields(et)})),GroupRelationshipRecord=Record({id:"",blocked_by:!1,member:!1,notifying:null,requested:!1,muting:!1,role:"user",pending_requests:!1}),normalizeGroupRelationship=_e=>GroupRelationshipRecord(Map$3(fromJS(_e))),HistoryRecord$1=Record({accounts:"",day:"",uses:""}),normalizeHistory=_e=>HistoryRecord$1(Map$3(fromJS(_e)));var global$i=global$w,path$3=global$i,uncurryThis$p=functionUncurryThis,aCallable$9=aCallable$b,functionUncurryThisAccessor=function(_e,et,tt){try{return uncurryThis$p(aCallable$9(Object.getOwnPropertyDescriptor(_e,et)[tt]))}catch{}},isCallable$g=isCallable$t,$String$1=String,$TypeError$e=TypeError,aPossiblePrototype$1=function(_e){if(typeof _e=="object"||isCallable$g(_e))return _e;throw $TypeError$e("Can't set "+$String$1(_e)+" as a prototype")},uncurryThisAccessor=functionUncurryThisAccessor,anObject$e=anObject$m,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var _e=!1,et={},tt;try{tt=uncurryThisAccessor(Object.prototype,"__proto__","set"),tt(et,[]),_e=et instanceof Array}catch{}return function(rt,at){return anObject$e(rt),aPossiblePrototype(at),_e?tt(rt,at):rt.__proto__=at,rt}}():void 0),isCallable$f=isCallable$t,isObject$k=isObject$u,setPrototypeOf$3=objectSetPrototypeOf,inheritIfRequired$4=function(_e,et,tt){var nt,rt;return setPrototypeOf$3&&isCallable$f(nt=et.constructor)&&nt!==tt&&isObject$k(rt=nt.prototype)&&rt!==tt.prototype&&setPrototypeOf$3(_e,rt),_e},uncurryThis$o=functionUncurryThis,thisNumberValue$1=uncurryThis$o(1 .valueOf),whitespaces$2=` +`))||"";return new DOMParser().parseFromString(rt,"text/html").documentElement.textContent||""},transformStatus=({pleroma:_e,...et})=>{const tt=makeCustomEmojiMap(et.emojis),nt=stripCompatibilityFeatures(emojify(et.content,tt)),rt=emojify(escapeTextContentForBrowser(et.spoiler_text),tt);return{...et,approval_status:"approval",contentHtml:nt,expectsCard:!1,event:_e==null?void 0:_e.event,filtered:[],hidden:!1,pleroma:_e?(()=>{const{event:at,...it}=_e;return it})():void 0,search_index:buildSearchIndex(et),showFiltered:!1,spoilerHtml:rt,translation:void 0}},embeddedStatusSchema=baseStatusSchema.transform(transformStatus).nullable().catch(null),statusSchema$1=baseStatusSchema.extend({quote:embeddedStatusSchema,reblog:embeddedStatusSchema,pleroma:statusPleromaSchema.extend({quote:embeddedStatusSchema}).optional().catch(void 0)}).transform(({pleroma:_e,...et})=>({...et,event:_e==null?void 0:_e.event,quote:(_e==null?void 0:_e.quote)||et.quote||null,pleroma:_e?(()=>{const{event:tt,quote:nt,...rt}=_e;return rt})():void 0})).transform(transformStatus),baseNotificationSchema=z$1.object({account:accountSchema,created_at:z$1.string().datetime().catch(new Date().toUTCString()),id:z$1.string(),type:z$1.string(),total_count:z$1.number().optional().catch(void 0)}),mentionNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("mention"),status:statusSchema$1}),statusNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("status"),status:statusSchema$1}),reblogNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("reblog"),status:statusSchema$1}),followNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("follow")}),followRequestNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("follow_request")}),favouriteNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("favourite"),status:statusSchema$1}),pollNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("poll"),status:statusSchema$1}),updateNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("update"),status:statusSchema$1}),moveNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("move"),target:accountSchema}),chatMessageNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("chat_message"),chat_message:chatMessageSchema}),emojiReactionNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("pleroma:emoji_reaction"),emoji:emojiSchema,emoji_url:z$1.string().url().optional().catch(void 0)}),eventReminderNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("pleroma:event_reminder"),status:statusSchema$1}),participationRequestNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("pleroma:participation_request"),status:statusSchema$1}),participationAcceptedNotificationSchema=baseNotificationSchema.extend({type:z$1.literal("pleroma:participation_accepted"),status:statusSchema$1});z$1.discriminatedUnion("type",[mentionNotificationSchema,statusNotificationSchema,reblogNotificationSchema,followNotificationSchema,followRequestNotificationSchema,favouriteNotificationSchema,pollNotificationSchema,updateNotificationSchema,moveNotificationSchema,chatMessageNotificationSchema,emojiReactionNotificationSchema,eventReminderNotificationSchema,participationRequestNotificationSchema,participationAcceptedNotificationSchema]);const patronUserSchema=z$1.object({is_patron:z$1.boolean().catch(!1),url:z$1.string().url()}).transform(_e=>({id:_e.url,..._e})),tombstoneSchema=z$1.object({reason:z$1.enum(["deleted"])}),adSchema=z$1.object({card:cardSchema,impression:z$1.string().optional().catch(void 0),expires_at:z$1.string().datetime().optional().catch(void 0),reason:z$1.string().optional().catch(void 0)}),ACCOUNT_IMPORT="ACCOUNT_IMPORT",ACCOUNTS_IMPORT="ACCOUNTS_IMPORT",GROUPS_IMPORT="GROUPS_IMPORT",STATUS_IMPORT="STATUS_IMPORT",STATUSES_IMPORT="STATUSES_IMPORT",POLLS_IMPORT="POLLS_IMPORT",ACCOUNT_FETCH_FAIL_FOR_USERNAME_LOOKUP="ACCOUNT_FETCH_FAIL_FOR_USERNAME_LOOKUP",importAccounts$1=_e=>(et,tt)=>{et({type:ACCOUNTS_IMPORT,accounts:_e});try{const nt=filteredArray(accountSchema).parse(_e);et(importEntities$1(nt,Entities.ACCOUNTS))}catch{}},importGroups=_e=>importEntities$1(_e,Entities.GROUPS),importStatus$5=(_e,et)=>(tt,nt)=>{const rt=getSettings(nt()).get("expandSpoilers");return tt({type:STATUS_IMPORT,status:_e,idempotencyKey:et,expandSpoilers:rt})},importStatuses$4=_e=>(et,tt)=>{const nt=getSettings(tt()).get("expandSpoilers");return et({type:STATUSES_IMPORT,statuses:_e,expandSpoilers:nt})},importPolls$1=_e=>({type:POLLS_IMPORT,polls:_e}),importFetchedAccount$1=_e=>importFetchedAccounts([_e]),importFetchedAccounts=(_e,et={should_refetch:!1})=>{const{should_refetch:tt}=et,nt=[],rt=at=>{at.id&&(tt&&(at.should_refetch=!0),nt.push(at),at.moved&&rt(at.moved))};return _e.forEach(rt),importAccounts$1(nt)},importFetchedGroup=_e=>importFetchedGroups([_e]),importFetchedGroups=_e=>{const et=filteredArray(groupSchema).parse(_e);return importGroups(et)},importFetchedStatus=(_e,et)=>tt=>{var nt,rt,at,it,ot,st,ct,ut,dt,ft,pt;isBroken(_e)||((nt=_e.reblog)!=null&&nt.id&&tt(importFetchedStatus(_e.reblog)),(rt=_e.quote)!=null&&rt.id&&tt(importFetchedStatus(_e.quote)),(it=(at=_e.pleroma)==null?void 0:at.quote)!=null&&it.id&&tt(importFetchedStatus(_e.pleroma.quote)),(st=(ot=_e.reblog)==null?void 0:ot.quote)!=null&&st.id&&tt(importFetchedStatus(_e.reblog.quote)),(dt=(ut=(ct=_e.reblog)==null?void 0:ct.pleroma)==null?void 0:ut.quote)!=null&&dt.id&&tt(importFetchedStatus(_e.reblog.pleroma.quote)),(ft=_e.poll)!=null&&ft.id&&tt(importFetchedPoll(_e.poll)),(pt=_e.group)!=null&&pt.id&&tt(importFetchedGroup(_e.group)),tt(importFetchedAccount$1(_e.account)),tt(importStatus$5(_e,et)))},isBroken=_e=>{try{return!!(!_e.account.id||_e.reblog&&!_e.reblog.account.id)}catch{return!0}},importFetchedStatuses=_e=>(et,tt)=>{const nt=[],rt=[],at=[];function it(ot){var st,ct,ut,dt,ft,pt;isBroken(ot)||(rt.push(ot),nt.push(ot.account),(st=ot.reblog)!=null&&st.id&&it(ot.reblog),(ct=ot.quote)!=null&&ct.id&&it(ot.quote),(dt=(ut=ot.pleroma)==null?void 0:ut.quote)!=null&&dt.id&&it(ot.pleroma.quote),(ft=ot.poll)!=null&&ft.id&&at.push(ot.poll),(pt=ot.group)!=null&&pt.id&&et(importFetchedGroup(ot.group)))}_e.forEach(it),et(importPolls$1(at)),et(importFetchedAccounts(nt)),et(importStatuses$4(rt))},importFetchedPoll=_e=>et=>{et(importPolls$1([_e]))},importErrorWhileFetchingAccountByUsername=_e=>({type:ACCOUNT_FETCH_FAIL_FOR_USERNAME_LOOKUP,username:_e}),ACCOUNT_CREATE_REQUEST="ACCOUNT_CREATE_REQUEST",ACCOUNT_CREATE_SUCCESS="ACCOUNT_CREATE_SUCCESS",ACCOUNT_CREATE_FAIL="ACCOUNT_CREATE_FAIL",ACCOUNT_FETCH_REQUEST="ACCOUNT_FETCH_REQUEST",ACCOUNT_FETCH_SUCCESS="ACCOUNT_FETCH_SUCCESS",ACCOUNT_FETCH_FAIL="ACCOUNT_FETCH_FAIL",ACCOUNT_BLOCK_REQUEST="ACCOUNT_BLOCK_REQUEST",ACCOUNT_BLOCK_SUCCESS="ACCOUNT_BLOCK_SUCCESS",ACCOUNT_BLOCK_FAIL="ACCOUNT_BLOCK_FAIL",ACCOUNT_UNBLOCK_REQUEST="ACCOUNT_UNBLOCK_REQUEST",ACCOUNT_UNBLOCK_SUCCESS="ACCOUNT_UNBLOCK_SUCCESS",ACCOUNT_UNBLOCK_FAIL="ACCOUNT_UNBLOCK_FAIL",ACCOUNT_MUTE_REQUEST="ACCOUNT_MUTE_REQUEST",ACCOUNT_MUTE_SUCCESS="ACCOUNT_MUTE_SUCCESS",ACCOUNT_MUTE_FAIL="ACCOUNT_MUTE_FAIL",ACCOUNT_UNMUTE_REQUEST="ACCOUNT_UNMUTE_REQUEST",ACCOUNT_UNMUTE_SUCCESS="ACCOUNT_UNMUTE_SUCCESS",ACCOUNT_UNMUTE_FAIL="ACCOUNT_UNMUTE_FAIL",ACCOUNT_SUBSCRIBE_REQUEST="ACCOUNT_SUBSCRIBE_REQUEST",ACCOUNT_SUBSCRIBE_SUCCESS="ACCOUNT_SUBSCRIBE_SUCCESS",ACCOUNT_SUBSCRIBE_FAIL="ACCOUNT_SUBSCRIBE_FAIL",ACCOUNT_UNSUBSCRIBE_REQUEST="ACCOUNT_UNSUBSCRIBE_REQUEST",ACCOUNT_UNSUBSCRIBE_SUCCESS="ACCOUNT_UNSUBSCRIBE_SUCCESS",ACCOUNT_UNSUBSCRIBE_FAIL="ACCOUNT_UNSUBSCRIBE_FAIL",ACCOUNT_PIN_REQUEST="ACCOUNT_PIN_REQUEST",ACCOUNT_PIN_SUCCESS="ACCOUNT_PIN_SUCCESS",ACCOUNT_PIN_FAIL="ACCOUNT_PIN_FAIL",ACCOUNT_UNPIN_REQUEST="ACCOUNT_UNPIN_REQUEST",ACCOUNT_UNPIN_SUCCESS="ACCOUNT_UNPIN_SUCCESS",ACCOUNT_UNPIN_FAIL="ACCOUNT_UNPIN_FAIL",ACCOUNT_REMOVE_FROM_FOLLOWERS_REQUEST="ACCOUNT_REMOVE_FROM_FOLLOWERS_REQUEST",ACCOUNT_REMOVE_FROM_FOLLOWERS_SUCCESS="ACCOUNT_REMOVE_FROM_FOLLOWERS_SUCCESS",ACCOUNT_REMOVE_FROM_FOLLOWERS_FAIL="ACCOUNT_REMOVE_FROM_FOLLOWERS_FAIL",PINNED_ACCOUNTS_FETCH_REQUEST="PINNED_ACCOUNTS_FETCH_REQUEST",PINNED_ACCOUNTS_FETCH_SUCCESS="PINNED_ACCOUNTS_FETCH_SUCCESS",PINNED_ACCOUNTS_FETCH_FAIL="PINNED_ACCOUNTS_FETCH_FAIL",ACCOUNT_SEARCH_REQUEST="ACCOUNT_SEARCH_REQUEST",ACCOUNT_SEARCH_SUCCESS="ACCOUNT_SEARCH_SUCCESS",ACCOUNT_SEARCH_FAIL="ACCOUNT_SEARCH_FAIL",ACCOUNT_LOOKUP_REQUEST="ACCOUNT_LOOKUP_REQUEST",ACCOUNT_LOOKUP_SUCCESS="ACCOUNT_LOOKUP_SUCCESS",ACCOUNT_LOOKUP_FAIL="ACCOUNT_LOOKUP_FAIL",FOLLOWERS_FETCH_SUCCESS="FOLLOWERS_FETCH_SUCCESS",FOLLOWERS_EXPAND_SUCCESS="FOLLOWERS_EXPAND_SUCCESS",FOLLOWING_FETCH_SUCCESS="FOLLOWING_FETCH_SUCCESS",FOLLOWING_EXPAND_SUCCESS="FOLLOWING_EXPAND_SUCCESS",RELATIONSHIPS_FETCH_REQUEST="RELATIONSHIPS_FETCH_REQUEST",RELATIONSHIPS_FETCH_SUCCESS="RELATIONSHIPS_FETCH_SUCCESS",RELATIONSHIPS_FETCH_FAIL="RELATIONSHIPS_FETCH_FAIL",FOLLOW_REQUESTS_FETCH_REQUEST="FOLLOW_REQUESTS_FETCH_REQUEST",FOLLOW_REQUESTS_FETCH_SUCCESS="FOLLOW_REQUESTS_FETCH_SUCCESS",FOLLOW_REQUESTS_FETCH_FAIL="FOLLOW_REQUESTS_FETCH_FAIL",FOLLOW_REQUESTS_EXPAND_REQUEST="FOLLOW_REQUESTS_EXPAND_REQUEST",FOLLOW_REQUESTS_EXPAND_SUCCESS="FOLLOW_REQUESTS_EXPAND_SUCCESS",FOLLOW_REQUESTS_EXPAND_FAIL="FOLLOW_REQUESTS_EXPAND_FAIL",FOLLOW_REQUEST_AUTHORIZE_REQUEST="FOLLOW_REQUEST_AUTHORIZE_REQUEST",FOLLOW_REQUEST_AUTHORIZE_SUCCESS="FOLLOW_REQUEST_AUTHORIZE_SUCCESS",FOLLOW_REQUEST_AUTHORIZE_FAIL="FOLLOW_REQUEST_AUTHORIZE_FAIL",FOLLOW_REQUEST_REJECT_REQUEST="FOLLOW_REQUEST_REJECT_REQUEST",FOLLOW_REQUEST_REJECT_SUCCESS="FOLLOW_REQUEST_REJECT_SUCCESS",FOLLOW_REQUEST_REJECT_FAIL="FOLLOW_REQUEST_REJECT_FAIL",NOTIFICATION_SETTINGS_REQUEST="NOTIFICATION_SETTINGS_REQUEST",NOTIFICATION_SETTINGS_SUCCESS="NOTIFICATION_SETTINGS_SUCCESS",NOTIFICATION_SETTINGS_FAIL="NOTIFICATION_SETTINGS_FAIL",BIRTHDAY_REMINDERS_FETCH_REQUEST="BIRTHDAY_REMINDERS_FETCH_REQUEST",BIRTHDAY_REMINDERS_FETCH_SUCCESS="BIRTHDAY_REMINDERS_FETCH_SUCCESS",BIRTHDAY_REMINDERS_FETCH_FAIL="BIRTHDAY_REMINDERS_FETCH_FAIL",maybeRedirectLogin=(_e,et)=>{var tt;et&&((tt=_e==null?void 0:_e.response)==null?void 0:tt.status)===401&&et.push("/login")},noOp$c=()=>new Promise(_e=>_e(void 0)),createAccount$1=_e=>(et,tt)=>(et({type:ACCOUNT_CREATE_REQUEST,params:_e}),api(tt,"app").post("/api/v1/accounts",_e).then(({data:nt})=>et({type:ACCOUNT_CREATE_SUCCESS,params:_e,token:nt})).catch(nt=>{throw et({type:ACCOUNT_CREATE_FAIL,error:nt,params:_e}),nt})),fetchAccount=_e=>(et,tt)=>(et(fetchRelationships([_e])),selectAccount(tt(),_e)?null:(et(fetchAccountRequest(_e)),api(tt).get(`/api/v1/accounts/${_e}`).then(rt=>{et(importFetchedAccount$1(rt.data)),et(fetchAccountSuccess(rt.data))}).catch(rt=>{et(fetchAccountFail$1(_e,rt))}))),fetchAccountByUsername=(_e,et)=>(tt,nt)=>{const{instance:rt,me:at}=nt(),it=getFeatures(rt);return it.accountByUsername&&(at||!it.accountLookup)?api(nt).get(`/api/v1/accounts/${_e}`).then(ot=>{tt(fetchRelationships([ot.data.id])),tt(importFetchedAccount$1(ot.data)),tt(fetchAccountSuccess(ot.data))}).catch(ot=>{tt(fetchAccountFail$1(null,ot)),tt(importErrorWhileFetchingAccountByUsername(_e))}):it.accountLookup?tt(accountLookup(_e)).then(ot=>{tt(fetchRelationships([ot.id])),tt(fetchAccountSuccess(ot))}).catch(ot=>{tt(fetchAccountFail$1(null,ot)),tt(importErrorWhileFetchingAccountByUsername(_e)),maybeRedirectLogin(ot,et)}):tt(accountSearch({q:_e,limit:5,resolve:!0})).then(ot=>{const st=ot.find(ct=>ct.acct===_e);if(st)tt(fetchRelationships([st.id])),tt(fetchAccountSuccess(st));else throw ot}).catch(ot=>{tt(fetchAccountFail$1(null,ot)),tt(importErrorWhileFetchingAccountByUsername(_e))})},fetchAccountRequest=_e=>({type:ACCOUNT_FETCH_REQUEST,id:_e}),fetchAccountSuccess=_e=>({type:ACCOUNT_FETCH_SUCCESS,account:_e}),fetchAccountFail$1=(_e,et)=>({type:ACCOUNT_FETCH_FAIL,id:_e,error:et,skipAlert:!0}),blockAccount=_e=>(et,tt)=>isLoggedIn(tt)?(et(blockAccountRequest(_e)),api(tt).post(`/api/v1/accounts/${_e}/block`).then(nt=>(et(importEntities$1([nt.data],Entities.RELATIONSHIPS)),et(blockAccountSuccess(nt.data,tt().statuses)))).catch(nt=>et(blockAccountFail(nt)))):null,unblockAccount=_e=>(et,tt)=>isLoggedIn(tt)?(et(unblockAccountRequest(_e)),api(tt).post(`/api/v1/accounts/${_e}/unblock`).then(nt=>(et(importEntities$1([nt.data],Entities.RELATIONSHIPS)),et(unblockAccountSuccess(nt.data)))).catch(nt=>et(unblockAccountFail(nt)))):null,blockAccountRequest=_e=>({type:ACCOUNT_BLOCK_REQUEST,id:_e}),blockAccountSuccess=(_e,et)=>({type:ACCOUNT_BLOCK_SUCCESS,relationship:_e,statuses:et}),blockAccountFail=_e=>({type:ACCOUNT_BLOCK_FAIL,error:_e}),unblockAccountRequest=_e=>({type:ACCOUNT_UNBLOCK_REQUEST,id:_e}),unblockAccountSuccess=_e=>({type:ACCOUNT_UNBLOCK_SUCCESS,relationship:_e}),unblockAccountFail=_e=>({type:ACCOUNT_UNBLOCK_FAIL,error:_e}),muteAccount=(_e,et,tt=0)=>(nt,rt)=>{if(!isLoggedIn(rt))return null;nt(muteAccountRequest(_e));const at={notifications:et};if(tt){const ot=rt().instance,st=parseVersion(ot.version);st.software===PLEROMA||st.software===AKKOMA?at.expires_in=tt:at.duration=tt}return api(rt).post(`/api/v1/accounts/${_e}/mute`,at).then(it=>(nt(importEntities$1([it.data],Entities.RELATIONSHIPS)),nt(muteAccountSuccess(it.data,rt().statuses)))).catch(it=>nt(muteAccountFail(it)))},unmuteAccount=_e=>(et,tt)=>isLoggedIn(tt)?(et(unmuteAccountRequest(_e)),api(tt).post(`/api/v1/accounts/${_e}/unmute`).then(nt=>(et(importEntities$1([nt.data],Entities.RELATIONSHIPS)),et(unmuteAccountSuccess(nt.data)))).catch(nt=>et(unmuteAccountFail(nt)))):null,muteAccountRequest=_e=>({type:ACCOUNT_MUTE_REQUEST,id:_e}),muteAccountSuccess=(_e,et)=>({type:ACCOUNT_MUTE_SUCCESS,relationship:_e,statuses:et}),muteAccountFail=_e=>({type:ACCOUNT_MUTE_FAIL,error:_e}),unmuteAccountRequest=_e=>({type:ACCOUNT_UNMUTE_REQUEST,id:_e}),unmuteAccountSuccess=_e=>({type:ACCOUNT_UNMUTE_SUCCESS,relationship:_e}),unmuteAccountFail=_e=>({type:ACCOUNT_UNMUTE_FAIL,error:_e}),subscribeAccount=(_e,et)=>(tt,nt)=>isLoggedIn(nt)?(tt(subscribeAccountRequest(_e)),api(nt).post(`/api/v1/pleroma/accounts/${_e}/subscribe`,{notifications:et}).then(rt=>tt(subscribeAccountSuccess(rt.data))).catch(rt=>tt(subscribeAccountFail(rt)))):null,unsubscribeAccount=_e=>(et,tt)=>isLoggedIn(tt)?(et(unsubscribeAccountRequest(_e)),api(tt).post(`/api/v1/pleroma/accounts/${_e}/unsubscribe`).then(nt=>et(unsubscribeAccountSuccess(nt.data))).catch(nt=>et(unsubscribeAccountFail(nt)))):null,subscribeAccountRequest=_e=>({type:ACCOUNT_SUBSCRIBE_REQUEST,id:_e}),subscribeAccountSuccess=_e=>({type:ACCOUNT_SUBSCRIBE_SUCCESS,relationship:_e}),subscribeAccountFail=_e=>({type:ACCOUNT_SUBSCRIBE_FAIL,error:_e}),unsubscribeAccountRequest=_e=>({type:ACCOUNT_UNSUBSCRIBE_REQUEST,id:_e}),unsubscribeAccountSuccess=_e=>({type:ACCOUNT_UNSUBSCRIBE_SUCCESS,relationship:_e}),unsubscribeAccountFail=_e=>({type:ACCOUNT_UNSUBSCRIBE_FAIL,error:_e}),removeFromFollowers=_e=>(et,tt)=>isLoggedIn(tt)?(et(removeFromFollowersRequest(_e)),api(tt).post(`/api/v1/accounts/${_e}/remove_from_followers`).then(nt=>et(removeFromFollowersSuccess(nt.data))).catch(nt=>et(removeFromFollowersFail(_e,nt)))):null,removeFromFollowersRequest=_e=>({type:ACCOUNT_REMOVE_FROM_FOLLOWERS_REQUEST,id:_e}),removeFromFollowersSuccess=_e=>({type:ACCOUNT_REMOVE_FROM_FOLLOWERS_SUCCESS,relationship:_e}),removeFromFollowersFail=(_e,et)=>({type:ACCOUNT_REMOVE_FROM_FOLLOWERS_FAIL,id:_e,error:et}),fetchRelationships=_e=>(et,tt)=>{if(!isLoggedIn(tt))return null;const nt=tt().relationships,rt=_e.filter(at=>nt.get(at,null)===null);return rt.length===0?null:(et(fetchRelationshipsRequest(rt)),api(tt).get(`/api/v1/accounts/relationships?${rt.map(at=>`id[]=${at}`).join("&")}`).then(at=>{et(importEntities$1(at.data,Entities.RELATIONSHIPS)),et(fetchRelationshipsSuccess(at.data))}).catch(at=>et(fetchRelationshipsFail(at))))},fetchRelationshipsRequest=_e=>({type:RELATIONSHIPS_FETCH_REQUEST,ids:_e,skipLoading:!0}),fetchRelationshipsSuccess=_e=>({type:RELATIONSHIPS_FETCH_SUCCESS,relationships:_e,skipLoading:!0}),fetchRelationshipsFail=_e=>({type:RELATIONSHIPS_FETCH_FAIL,error:_e,skipLoading:!0}),fetchFollowRequests=()=>(_e,et)=>isLoggedIn(et)?(_e(fetchFollowRequestsRequest()),api(et).get("/api/v1/follow_requests").then(tt=>{const nt=getLinks(tt).refs.find(rt=>rt.rel==="next");_e(importFetchedAccounts(tt.data)),_e(fetchFollowRequestsSuccess(tt.data,nt?nt.uri:null))}).catch(tt=>_e(fetchFollowRequestsFail(tt)))):null,fetchFollowRequestsRequest=()=>({type:FOLLOW_REQUESTS_FETCH_REQUEST}),fetchFollowRequestsSuccess=(_e,et)=>({type:FOLLOW_REQUESTS_FETCH_SUCCESS,accounts:_e,next:et}),fetchFollowRequestsFail=_e=>({type:FOLLOW_REQUESTS_FETCH_FAIL,error:_e}),expandFollowRequests=()=>(_e,et)=>{if(!isLoggedIn(et))return null;const tt=et().user_lists.follow_requests.next;return tt===null?null:(_e(expandFollowRequestsRequest()),api(et).get(tt).then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");_e(importFetchedAccounts(nt.data)),_e(expandFollowRequestsSuccess(nt.data,rt?rt.uri:null))}).catch(nt=>_e(expandFollowRequestsFail(nt))))},expandFollowRequestsRequest=()=>({type:FOLLOW_REQUESTS_EXPAND_REQUEST}),expandFollowRequestsSuccess=(_e,et)=>({type:FOLLOW_REQUESTS_EXPAND_SUCCESS,accounts:_e,next:et}),expandFollowRequestsFail=_e=>({type:FOLLOW_REQUESTS_EXPAND_FAIL,error:_e}),authorizeFollowRequest=_e=>(et,tt)=>isLoggedIn(tt)?(et(authorizeFollowRequestRequest(_e)),api(tt).post(`/api/v1/follow_requests/${_e}/authorize`).then(()=>et(authorizeFollowRequestSuccess(_e))).catch(nt=>et(authorizeFollowRequestFail(_e,nt)))):null,authorizeFollowRequestRequest=_e=>({type:FOLLOW_REQUEST_AUTHORIZE_REQUEST,id:_e}),authorizeFollowRequestSuccess=_e=>({type:FOLLOW_REQUEST_AUTHORIZE_SUCCESS,id:_e}),authorizeFollowRequestFail=(_e,et)=>({type:FOLLOW_REQUEST_AUTHORIZE_FAIL,id:_e,error:et}),rejectFollowRequest=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(rejectFollowRequestRequest(_e)),api(tt).post(`/api/v1/follow_requests/${_e}/reject`).then(()=>et(rejectFollowRequestSuccess(_e))).catch(nt=>et(rejectFollowRequestFail(_e,nt))))},rejectFollowRequestRequest=_e=>({type:FOLLOW_REQUEST_REJECT_REQUEST,id:_e}),rejectFollowRequestSuccess=_e=>({type:FOLLOW_REQUEST_REJECT_SUCCESS,id:_e}),rejectFollowRequestFail=(_e,et)=>({type:FOLLOW_REQUEST_REJECT_FAIL,id:_e,error:et}),pinAccount=_e=>(et,tt)=>isLoggedIn(tt)?(et(pinAccountRequest(_e)),api(tt).post(`/api/v1/accounts/${_e}/pin`).then(nt=>{et(pinAccountSuccess(nt.data))}).catch(nt=>{et(pinAccountFail(nt))})):et(noOp$c),unpinAccount=_e=>(et,tt)=>isLoggedIn(tt)?(et(unpinAccountRequest(_e)),api(tt).post(`/api/v1/accounts/${_e}/unpin`).then(nt=>{et(unpinAccountSuccess(nt.data))}).catch(nt=>{et(unpinAccountFail(nt))})):et(noOp$c),updateNotificationSettings=_e=>(et,tt)=>(et({type:NOTIFICATION_SETTINGS_REQUEST,params:_e}),api(tt).put("/api/v1/pleroma/notification_settings",_e).then(({data:nt})=>{et({type:NOTIFICATION_SETTINGS_SUCCESS,params:_e,data:nt})}).catch(nt=>{throw et({type:NOTIFICATION_SETTINGS_FAIL,params:_e,error:nt}),nt})),pinAccountRequest=_e=>({type:ACCOUNT_PIN_REQUEST,id:_e}),pinAccountSuccess=_e=>({type:ACCOUNT_PIN_SUCCESS,relationship:_e}),pinAccountFail=_e=>({type:ACCOUNT_PIN_FAIL,error:_e}),unpinAccountRequest=_e=>({type:ACCOUNT_UNPIN_REQUEST,id:_e}),unpinAccountSuccess=_e=>({type:ACCOUNT_UNPIN_SUCCESS,relationship:_e}),unpinAccountFail=_e=>({type:ACCOUNT_UNPIN_FAIL,error:_e}),fetchPinnedAccounts=_e=>(et,tt)=>{et(fetchPinnedAccountsRequest(_e)),api(tt).get("/api/v1/endorsements").then(nt=>{et(importFetchedAccounts(nt.data)),et(fetchPinnedAccountsSuccess(_e,nt.data,null))}).catch(nt=>{et(fetchPinnedAccountsFail(_e,nt))})},fetchPinnedAccountsRequest=_e=>({type:PINNED_ACCOUNTS_FETCH_REQUEST,id:_e}),fetchPinnedAccountsSuccess=(_e,et,tt)=>({type:PINNED_ACCOUNTS_FETCH_SUCCESS,id:_e,accounts:et,next:tt}),fetchPinnedAccountsFail=(_e,et)=>({type:PINNED_ACCOUNTS_FETCH_FAIL,id:_e,error:et}),accountSearch=(_e,et)=>(tt,nt)=>(tt({type:ACCOUNT_SEARCH_REQUEST,params:_e}),api(nt).get("/api/v1/accounts/search",{params:_e,signal:et}).then(({data:rt})=>(tt(importFetchedAccounts(rt)),tt({type:ACCOUNT_SEARCH_SUCCESS,accounts:rt}),rt)).catch(rt=>{throw tt({type:ACCOUNT_SEARCH_FAIL,skipAlert:!0}),rt})),accountLookup=(_e,et)=>(tt,nt)=>(tt({type:ACCOUNT_LOOKUP_REQUEST,acct:_e}),api(nt).get("/api/v1/accounts/lookup",{params:{acct:_e},cancelToken:et}).then(({data:rt})=>(rt&&rt.id&&tt(importFetchedAccount$1(rt)),tt({type:ACCOUNT_LOOKUP_SUCCESS,account:rt}),rt)).catch(rt=>{throw tt({type:ACCOUNT_LOOKUP_FAIL}),rt})),fetchBirthdayReminders=(_e,et)=>(tt,nt)=>{if(!isLoggedIn(nt))return;const rt=nt().me;return tt({type:BIRTHDAY_REMINDERS_FETCH_REQUEST,day:et,month:_e,id:rt}),api(nt).get("/api/v1/pleroma/birthdays",{params:{day:et,month:_e}}).then(at=>{tt(importFetchedAccounts(at.data)),tt({type:BIRTHDAY_REMINDERS_FETCH_SUCCESS,accounts:at.data,day:et,month:_e,id:rt})}).catch(at=>{tt({type:BIRTHDAY_REMINDERS_FETCH_FAIL,day:et,month:_e,id:rt})})},APP_CREATE_REQUEST="APP_CREATE_REQUEST",APP_CREATE_SUCCESS="APP_CREATE_SUCCESS",APP_CREATE_FAIL="APP_CREATE_FAIL";function createApp(_e,et){return tt=>(tt({type:APP_CREATE_REQUEST,params:_e}),baseClient(null,et).post("/api/v1/apps",_e).then(({data:nt})=>(tt({type:APP_CREATE_SUCCESS,params:_e,app:nt}),nt)).catch(nt=>{throw tt({type:APP_CREATE_FAIL,params:_e,error:nt}),nt}))}const EmojiRecord=Record({category:"",shortcode:"",static_url:"",url:"",visible_in_picker:!0}),normalizeEmoji=_e=>EmojiRecord(Map$3(fromJS(_e))),mergeDefined=(_e,et)=>_e===void 0?et:_e,makeEmojiMap=_e=>_e.reduce((et,tt)=>(et[`:${tt.shortcode}:`]=tt,et),{}),normalizeId$1=_e=>z$1.string().nullable().catch(null).parse(_e),toSchema=_e=>z$1.custom().transform(_e),maybeFromJS=_e=>"toJS"in _e?_e.toJS():_e,AccountRecord=Record({accepts_chat_messages:!1,acct:"",avatar:"",avatar_static:"",birthday:"",bot:!1,chats_onboarded:!0,created_at:"",discoverable:!1,display_name:"",emojis:List$1(),favicon:"",fields:List$1(),followers_count:0,following_count:0,fqn:"",header:"",header_static:"",id:"",last_status_at:"",location:"",locked:!1,moved:null,mute_expires_at:null,note:"",pleroma:Map$3(),source:Map$3(),statuses_count:0,uri:"",url:"",username:"",website:"",verified:!1,admin:!1,display_name_html:"",domain:"",moderator:!1,note_emojified:"",note_plain:"",patron:null,relationship:null,should_refetch:!1,staff:!1}),FieldRecord=Record({name:"",value:"",verified_at:null,name_emojified:"",value_emojified:"",value_plain:""}),normalizePleromaLegacyFields=_e=>_e.update("pleroma",Map$3(),et=>et.withMutations(tt=>{const nt=Map$3({is_active:!tt.get("deactivated"),is_confirmed:!tt.get("confirmation_pending"),is_approved:!tt.get("approval_pending")});tt.mergeWith(mergeDefined,nt),tt.deleteAll(["deactivated","confirmation_pending","approval_pending"])})),normalizeAvatar$1=_e=>{const et=_e.get("avatar"),tt=_e.get("avatar_static"),nt=vitePluginRequire_1697864661787_95587196;return _e.withMutations(rt=>{rt.set("avatar",et||tt||nt),rt.set("avatar_static",tt||et||nt)})},normalizeHeader$1=_e=>{const et=_e.get("header"),tt=_e.get("header_static"),nt=vitePluginRequire_1697864661787_6416804;return _e.withMutations(rt=>{rt.set("header",et||tt||nt),rt.set("header_static",tt||et||nt)})},normalizeFields=_e=>_e.update("fields",List$1(),et=>et.map(FieldRecord)),normalizeEmojis$4=_e=>{const et=_e.get("emojis",List$1()).map(normalizeEmoji);return _e.set("emojis",et)},normalizeBirthday=_e=>{const et=[_e.getIn(["pleroma","birthday"]),_e.getIn(["other_settings","birthday"])].find(Boolean);return _e.set("birthday",et)},getTags=_e=>{const et=_e.getIn(["pleroma","tags"]);return List$1(List$1.isList(et)?et:[])},normalizeVerified=_e=>_e.update("verified",et=>[et===!0,getTags(_e).includes("verified")].some(Boolean)),normalizeDonor=_e=>{const et=getTags(_e),tt=et.includes("donor")?et.push("badge:donor"):et;return _e.setIn(["pleroma","tags"],tt)},normalizeLocation$1=_e=>_e.update("location",et=>[et,_e.getIn(["pleroma","location"]),_e.getIn(["other_settings","location"])].find(Boolean)),fixUsername=_e=>{const et=_e.get("acct")||"",tt=_e.get("username")||"";return _e.set("username",tt||et.split("@")[0])},fixDisplayName$1=_e=>{const et=_e.get("display_name")||"";return _e.set("display_name",et.trim().length===0?_e.get("username"):et)},addInternalFields$1=_e=>{const et=makeEmojiMap(_e.get("emojis"));return _e.withMutations(tt=>{tt.merge({display_name_html:emojify(escapeTextContentForBrowser(tt.get("display_name")),et),note_emojified:emojify(tt.get("note",""),et),note_plain:unescapeHTML(tt.get("note",""))}),tt.update("fields",List$1(),nt=>nt.map(rt=>rt.merge({name_emojified:emojify(escapeTextContentForBrowser(rt.get("name")),et),value_emojified:emojify(rt.get("value"),et),value_plain:unescapeHTML(rt.get("value"))})))})},getDomainFromURL$2=_e=>{try{const et=_e.get("url");return new URL(et).host}catch{return""}},guessFqn$1=_e=>{const et=_e.get("acct",""),[tt,nt]=et.split("@");return nt?et:[tt,getDomainFromURL$2(_e)].join("@")},normalizeFqn$1=_e=>{const et=_e.get("fqn")||guessFqn$1(_e);return _e.set("fqn",et)},normalizeFavicon=_e=>{const et=_e.getIn(["pleroma","favicon"])||"";return _e.set("favicon",et)},addDomain=_e=>{const et=_e.get("acct","").split("@")[1]||"";return _e.set("domain",et)},addStaffFields=_e=>{const et=_e.getIn(["pleroma","is_admin"])===!0,tt=_e.getIn(["pleroma","is_moderator"])===!0,nt=et||tt;return _e.merge({admin:et,moderator:tt,staff:nt})},normalizeDiscoverable=_e=>{const et=!!(_e.get("discoverable")||_e.getIn(["source","pleroma","discoverable"]));return _e.set("discoverable",et)},normalizeMessageAcceptance=_e=>{const et=!!(_e.getIn(["pleroma","accepts_chat_messages"])||_e.get("accepting_messages"));return _e.set("accepts_chat_messages",et)},fixBirthday=_e=>{const et=_e.get("birthday");return _e.set("birthday",et||"")},fixNote$1=_e=>_e.get("note")==="

"?_e.set("note",""):_e,normalizeAccount=_e=>AccountRecord(Map$3(fromJS(_e)).withMutations(et=>{normalizePleromaLegacyFields(et),normalizeEmojis$4(et),normalizeAvatar$1(et),normalizeHeader$1(et),normalizeFields(et),normalizeVerified(et),normalizeDonor(et),normalizeBirthday(et),normalizeLocation$1(et),normalizeFqn$1(et),normalizeFavicon(et),normalizeDiscoverable(et),normalizeMessageAcceptance(et),addDomain(et),addStaffFields(et),fixUsername(et),fixDisplayName$1(et),fixBirthday(et),fixNote$1(et),addInternalFields$1(et)})),AdminAccountRecord=Record({account:null,approved:!1,confirmed:!1,created_at:new Date,disabled:!1,domain:"",email:"",id:"",invite_request:null,ip:null,ips:List$1(),locale:null,role:null,sensitized:!1,silenced:!1,suspended:!1,username:""}),normalizePleromaAccount=_e=>_e.get("account")?_e:_e.withMutations(et=>{et.set("approved",et.get("is_approved")),et.set("confirmed",et.get("is_confirmed")),et.set("disabled",!et.get("is_active")),et.set("invite_request",et.get("registration_reason")),et.set("role",et.getIn(["roles","admin"])?"admin":et.getIn(["roles","moderator"])?"moderator":null)}),normalizeAdminAccount=_e=>AdminAccountRecord(Map$3(fromJS(_e)).withMutations(et=>{normalizePleromaAccount(et)})),AdminReportRecord=Record({account:null,action_taken:!1,action_taken_by_account:null,assigned_account:null,category:"",comment:"",created_at:new Date,id:"",rules:List$1(),statuses:List$1(),target_account:null,updated_at:new Date}),normalizePleromaReport=_e=>_e.get("actor")?_e.withMutations(et=>{et.set("target_account",et.get("account")),et.set("account",et.get("actor")),et.set("action_taken",et.get("state")!=="open"),et.set("comment",et.get("content")),et.set("updated_at",et.get("created_at"))}):_e,normalizeAdminReport=_e=>AdminReportRecord(Map$3(fromJS(_e)).withMutations(et=>{normalizePleromaReport(et)})),AnnouncementReactionRecord=Record({name:"",count:0,me:!1,url:null,static_url:null,announcement_id:""}),normalizeAnnouncementReaction=(_e,et)=>AnnouncementReactionRecord(Map$3(fromJS(_e)).withMutations(tt=>{tt.set("announcement_id",et)})),MentionRecord=Record({id:"",acct:"",username:"",url:""}),normalizeMention=_e=>MentionRecord(normalizeAccount(_e)),AnnouncementRecord=Record({id:"",content:"",starts_at:null,ends_at:null,all_day:!1,read:!1,published_at:Date,reactions:List$1(),statuses:Map$3(),mentions:List$1(),tags:List$1(),emojis:List$1(),updated_at:Date,pleroma:Map$3(),contentHtml:""}),normalizeMentions$1=_e=>_e.update("mentions",List$1(),et=>et.map(normalizeMention)),normalizeReactions=_e=>_e.update("reactions",List$1(),et=>et.map(tt=>normalizeAnnouncementReaction(tt,_e.get("id")))),normalizeEmojis$3=_e=>_e.update("emojis",List$1(),et=>et.map(normalizeEmoji)),normalizeContent$1=_e=>{const et=makeEmojiMap(_e.get("emojis")),tt=emojify(_e.get("content"),et);return _e.set("contentHtml",tt)},normalizeStatuses$1=_e=>{const et=_e.get("statuses",List$1()).reduce((tt,nt)=>tt.set(nt.get("url"),`/@${nt.getIn(["account","acct"])}/${nt.get("id")}`),Map$3());return _e.set("statuses",et)},normalizeAnnouncement=_e=>AnnouncementRecord(Map$3(fromJS(_e)).withMutations(et=>{normalizeMentions$1(et),normalizeReactions(et),normalizeEmojis$3(et),normalizeContent$1(et),normalizeStatuses$1(et)})),AttachmentRecord=Record({blurhash:void 0,description:"",external_video_id:null,id:"",meta:Map$3(),pleroma:Map$3(),preview_url:"",remote_url:null,type:"unknown",url:"",account:null,status:null}),normalizeUrls=_e=>{const et=[_e.get("url"),_e.get("preview_url"),_e.get("remote_url")].find(nt=>nt)||"",tt=Map$3({url:et,preview_url:et});return _e.mergeWith(mergeDefined,tt)},normalizeMeta=_e=>{const et=Map$3().merge(_e.get("meta"));return _e.set("meta",et)},normalizeAttachment=_e=>AttachmentRecord(Map$3(fromJS(_e)).withMutations(et=>{normalizeUrls(et),normalizeMeta(et)})),ChatRecord=Record({account:null,id:"",unread:0,last_message:null,updated_at:""}),normalizeChat=_e=>ChatRecord(Map$3(fromJS(_e))),ChatMessageRecord=Record({account_id:"",media_attachments:List$1(),card:null,chat_id:"",content:"",created_at:"",emojis:List$1(),expiration:null,emoji_reactions:null,id:"",unread:!1,deleting:!1,pending:!1}),normalizeMedia=_e=>{const et=_e.get("media_attachments"),tt=_e.get("attachment");return et?_e.set("media_attachments",List$1(et.map(normalizeAttachment))):tt?_e.set("media_attachments",List$1([normalizeAttachment(tt)])):_e.set("media_attachments",List$1())},normalizeChatMessageEmojiReaction=_e=>{const et=List$1(_e.get("emoji_reactions")||[]);return _e.set("emoji_reactions",filteredArray(emojiReactionSchema).parse(et.toJS()))},fixContent$1=_e=>_e.get("content")==="

"?_e.set("content",""):_e,normalizeChatMessage=_e=>ChatMessageRecord(Map$3(fromJS(_e)).withMutations(et=>{normalizeMedia(et),normalizeChatMessageEmojiReaction(et),fixContent$1(et)})),FilterKeywordRecord=Record({id:"",keyword:"",whole_word:!1}),normalizeFilterKeyword=_e=>FilterKeywordRecord(Map$3(fromJS(_e))),FilterStatusRecord=Record({id:"",status_id:""}),normalizeFilterStatus=_e=>FilterStatusRecord(Map$3(fromJS(_e))),FilterRecord=Record({id:"",title:"",context:List$1(),expires_at:"",filter_action:"warn",keywords:List$1(),statuses:List$1()}),normalizeFilterV1=_e=>_e.set("title",_e.get("phrase")).set("keywords",List$1([Map$3({keyword:_e.get("phrase"),whole_word:_e.get("whole_word")})])).set("filter_action",_e.get("irreversible")?"hide":"warn"),normalizeKeywords=_e=>_e.update("keywords",List$1(),et=>et.map(normalizeFilterKeyword)),normalizeStatuses=_e=>_e.update("statuses",List$1(),et=>et.map(normalizeFilterStatus)),normalizeFilter=_e=>FilterRecord(Map$3(fromJS(_e)).withMutations(et=>{et.has("phrase")&&normalizeFilterV1(et),normalizeKeywords(et),normalizeStatuses(et)})),GroupRecord=Record({avatar:"",avatar_static:"",created_at:"",deleted_at:null,display_name:"",domain:"",emojis:[],group_visibility:"",header:"",header_static:"",id:"",locked:!1,membership_required:!1,members_count:0,owner:{id:""},note:"",statuses_visibility:"public",slug:"",tags:[],uri:"",url:"",display_name_html:"",note_emojified:"",note_plain:"",relationship:null}),normalizeAvatar=_e=>{const et=_e.get("avatar"),tt=_e.get("avatar_static"),nt=vitePluginRequire_1697864661787_95587196;return _e.withMutations(rt=>{rt.set("avatar",et||tt||nt),rt.set("avatar_static",tt||et||nt)})},normalizeHeader=_e=>{const et=_e.get("header"),tt=_e.get("header_static"),nt=vitePluginRequire_1697864661787_6416804;return _e.withMutations(rt=>{rt.set("header",et||tt||nt),rt.set("header_static",tt||et||nt)})},normalizeEmojis$2=_e=>{const et=_e.get("emojis",List$1()).map(normalizeEmoji);return _e.set("emojis",et.toArray())},fixDisplayName=_e=>{const et=_e.get("display_name")||"";return _e.set("display_name",et.trim().length===0?_e.get("username"):et)},addInternalFields=_e=>{const et=makeEmojiMap(_e.get("emojis"));return _e.withMutations(tt=>{tt.merge({display_name_html:emojify(escapeTextContentForBrowser(tt.get("display_name")),et),note_emojified:emojify(tt.get("note",""),et),note_plain:unescapeHTML(tt.get("note",""))}),tt.update("fields",List$1(),nt=>nt.map(rt=>rt.merge({name_emojified:emojify(escapeTextContentForBrowser(rt.get("name")),et),value_emojified:emojify(rt.get("value"),et),value_plain:unescapeHTML(rt.get("value"))})))})},getDomainFromURL$1=_e=>{try{const et=_e.get("url");return new URL(et).host}catch{return""}},guessFqn=_e=>{const et=_e.get("acct",""),[tt,nt]=et.split("@");return nt?et:[tt,getDomainFromURL$1(_e)].join("@")},normalizeFqn=_e=>{const et=_e.get("fqn")||guessFqn(_e);return _e.set("fqn",et)},normalizeLocked=_e=>{const et=_e.get("locked")||_e.get("group_visibility")==="members_only";return _e.set("locked",et)},fixNote=_e=>_e.get("note")==="

"?_e.set("note",""):_e,normalizeGroup=_e=>GroupRecord(Map$3(fromJS(_e)).withMutations(et=>{normalizeEmojis$2(et),normalizeAvatar(et),normalizeHeader(et),normalizeFqn(et),normalizeLocked(et),fixDisplayName(et),fixNote(et),addInternalFields(et)})),GroupRelationshipRecord=Record({id:"",blocked_by:!1,member:!1,notifying:null,requested:!1,muting:!1,role:"user",pending_requests:!1}),normalizeGroupRelationship=_e=>GroupRelationshipRecord(Map$3(fromJS(_e))),HistoryRecord$1=Record({accounts:"",day:"",uses:""}),normalizeHistory=_e=>HistoryRecord$1(Map$3(fromJS(_e)));var global$i=global$w,path$3=global$i,uncurryThis$p=functionUncurryThis,aCallable$9=aCallable$b,functionUncurryThisAccessor=function(_e,et,tt){try{return uncurryThis$p(aCallable$9(Object.getOwnPropertyDescriptor(_e,et)[tt]))}catch{}},isCallable$g=isCallable$t,$String$1=String,$TypeError$e=TypeError,aPossiblePrototype$1=function(_e){if(typeof _e=="object"||isCallable$g(_e))return _e;throw $TypeError$e("Can't set "+$String$1(_e)+" as a prototype")},uncurryThisAccessor=functionUncurryThisAccessor,anObject$e=anObject$m,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var _e=!1,et={},tt;try{tt=uncurryThisAccessor(Object.prototype,"__proto__","set"),tt(et,[]),_e=et instanceof Array}catch{}return function(rt,at){return anObject$e(rt),aPossiblePrototype(at),_e?tt(rt,at):rt.__proto__=at,rt}}():void 0),isCallable$f=isCallable$t,isObject$k=isObject$u,setPrototypeOf$3=objectSetPrototypeOf,inheritIfRequired$4=function(_e,et,tt){var nt,rt;return setPrototypeOf$3&&isCallable$f(nt=et.constructor)&&nt!==tt&&isObject$k(rt=nt.prototype)&&rt!==tt.prototype&&setPrototypeOf$3(_e,rt),_e},uncurryThis$o=functionUncurryThis,thisNumberValue$1=uncurryThis$o(1 .valueOf),whitespaces$2=` \v\f\r                 \u2028\u2029\uFEFF`,uncurryThis$n=functionUncurryThis,requireObjectCoercible$6=requireObjectCoercible$b,toString$k=toString$t,whitespaces$1=whitespaces$2,replace$7=uncurryThis$n("".replace),ltrim=RegExp("^["+whitespaces$1+"]+"),rtrim=RegExp("(^|[^"+whitespaces$1+"])["+whitespaces$1+"]+$"),createMethod$2=function(_e){return function(et){var tt=toString$k(requireObjectCoercible$6(et));return _e&1&&(tt=replace$7(tt,ltrim,"")),_e&2&&(tt=replace$7(tt,rtrim,"$1")),tt}},stringTrim={start:createMethod$2(1),end:createMethod$2(2),trim:createMethod$2(3)},$$J=_export,IS_PURE$2=isPure,DESCRIPTORS$h=descriptors$1,global$h=global$w,path$2=path$3,uncurryThis$m=functionUncurryThis,isForced$3=isForced_1,hasOwn$e=hasOwnProperty_1,inheritIfRequired$3=inheritIfRequired$4,isPrototypeOf$7=objectIsPrototypeOf,isSymbol$3=isSymbol$a,toPrimitive=toPrimitive$2,fails$s=fails$F,getOwnPropertyNames$1=objectGetOwnPropertyNames.f,getOwnPropertyDescriptor$5=objectGetOwnPropertyDescriptor.f,defineProperty$a=objectDefineProperty.f,thisNumberValue=thisNumberValue$1,trim$4=stringTrim.trim,NUMBER="Number",NativeNumber=global$h[NUMBER];path$2[NUMBER];var NumberPrototype=NativeNumber.prototype,TypeError$4=global$h.TypeError,stringSlice$6=uncurryThis$m("".slice),charCodeAt$1=uncurryThis$m("".charCodeAt),toNumeric=function(_e){var et=toPrimitive(_e,"number");return typeof et=="bigint"?et:toNumber$2(et)},toNumber$2=function(_e){var et=toPrimitive(_e,"number"),tt,nt,rt,at,it,ot,st,ct;if(isSymbol$3(et))throw TypeError$4("Cannot convert a Symbol value to a number");if(typeof et=="string"&&et.length>2){if(et=trim$4(et),tt=charCodeAt$1(et,0),tt===43||tt===45){if(nt=charCodeAt$1(et,2),nt===88||nt===120)return NaN}else if(tt===48){switch(charCodeAt$1(et,1)){case 66:case 98:rt=2,at=49;break;case 79:case 111:rt=8,at=55;break;default:return+et}for(it=stringSlice$6(et,2),ot=it.length,st=0;stat)return NaN;return parseInt(it,rt)}}return+et},FORCED$a=isForced$3(NUMBER,!NativeNumber(" 0o1")||!NativeNumber("0b1")||NativeNumber("+0x1")),calledWithNew=function(_e){return isPrototypeOf$7(NumberPrototype,_e)&&fails$s(function(){thisNumberValue(_e)})},NumberWrapper=function(et){var tt=arguments.length<1?0:NativeNumber(toNumeric(et));return calledWithNew(this)?inheritIfRequired$3(Object(tt),this,NumberWrapper):tt};NumberWrapper.prototype=NumberPrototype;FORCED$a&&!IS_PURE$2&&(NumberPrototype.constructor=NumberWrapper);$$J({global:!0,constructor:!0,wrap:!0,forced:FORCED$a},{Number:NumberWrapper});var copyConstructorProperties$2=function(_e,et){for(var tt=DESCRIPTORS$h?getOwnPropertyNames$1(et):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),nt=0,rt;tt.length>nt;nt++)hasOwn$e(et,rt=tt[nt])&&!hasOwn$e(_e,rt)&&defineProperty$a(_e,rt,getOwnPropertyDescriptor$5(et,rt))};(FORCED$a||IS_PURE$2)&©ConstructorProperties$2(path$2[NUMBER],NativeNumber);var $$I=_export,call$i=functionCall,isCallable$e=isCallable$t,anObject$d=anObject$m,toString$j=toString$t,DELEGATES_TO_EXEC=function(){var _e=!1,et=/[ac]/;return et.exec=function(){return _e=!0,/./.exec.apply(this,arguments)},et.test("abc")===!0&&_e}(),nativeTest=/./.test;$$I({target:"RegExp",proto:!0,forced:!DELEGATES_TO_EXEC},{test:function(_e){var et=anObject$d(this),tt=toString$j(_e),nt=et.exec;if(!isCallable$e(nt))return call$i(nativeTest,et,tt);var rt=call$i(nt,et,tt);return rt===null?!1:(anObject$d(rt),!0)}});var isObject$j=isObject$u,classof$b=classofRaw$2,wellKnownSymbol$o=wellKnownSymbol$t,MATCH$2=wellKnownSymbol$o("match"),isRegexp=function(_e){var et;return isObject$j(_e)&&((et=_e[MATCH$2])!==void 0?!!et:classof$b(_e)==="RegExp")},call$h=functionCall,hasOwn$d=hasOwnProperty_1,isPrototypeOf$6=objectIsPrototypeOf,regExpFlags$1=regexpFlags$1,RegExpPrototype$6=RegExp.prototype,regexpGetFlags=function(_e){var et=_e.flags;return et===void 0&&!("flags"in RegExpPrototype$6)&&!hasOwn$d(_e,"flags")&&isPrototypeOf$6(RegExpPrototype$6,_e)?call$h(regExpFlags$1,_e):et},defineProperty$9=objectDefineProperty.f,proxyAccessor$2=function(_e,et,tt){tt in _e||defineProperty$9(_e,tt,{configurable:!0,get:function(){return et[tt]},set:function(nt){et[tt]=nt}})},makeBuiltIn=makeBuiltInExports,defineProperty$8=objectDefineProperty,defineBuiltInAccessor$8=function(_e,et,tt){return tt.get&&makeBuiltIn(tt.get,et,{getter:!0}),tt.set&&makeBuiltIn(tt.set,et,{setter:!0}),defineProperty$8.f(_e,et,tt)},getBuiltIn$8=getBuiltIn$c,defineBuiltInAccessor$7=defineBuiltInAccessor$8,wellKnownSymbol$n=wellKnownSymbol$t,DESCRIPTORS$g=descriptors$1,SPECIES$5=wellKnownSymbol$n("species"),setSpecies$3=function(_e){var et=getBuiltIn$8(_e);DESCRIPTORS$g&&et&&!et[SPECIES$5]&&defineBuiltInAccessor$7(et,SPECIES$5,{configurable:!0,get:function(){return this}})},DESCRIPTORS$f=descriptors$1,global$g=global$w,uncurryThis$l=functionUncurryThis,isForced$2=isForced_1,inheritIfRequired$2=inheritIfRequired$4,createNonEnumerableProperty$6=createNonEnumerableProperty$a,getOwnPropertyNames=objectGetOwnPropertyNames.f,isPrototypeOf$5=objectIsPrototypeOf,isRegExp$2=isRegexp,toString$i=toString$t,getRegExpFlags$2=regexpGetFlags,stickyHelpers=regexpStickyHelpers,proxyAccessor$1=proxyAccessor$2,defineBuiltIn$b=defineBuiltIn$f,fails$r=fails$F,hasOwn$c=hasOwnProperty_1,enforceInternalState=internalState.enforce,setSpecies$2=setSpecies$3,wellKnownSymbol$m=wellKnownSymbol$t,UNSUPPORTED_DOT_ALL$1=regexpUnsupportedDotAll,UNSUPPORTED_NCG=regexpUnsupportedNcg,MATCH$1=wellKnownSymbol$m("match"),NativeRegExp=global$g.RegExp,RegExpPrototype$5=NativeRegExp.prototype,SyntaxError$1=global$g.SyntaxError,exec$2=uncurryThis$l(RegExpPrototype$5.exec),charAt$4=uncurryThis$l("".charAt),replace$6=uncurryThis$l("".replace),stringIndexOf$3=uncurryThis$l("".indexOf),stringSlice$5=uncurryThis$l("".slice),IS_NCG=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,re1=/a/g,re2=/a/g,CORRECT_NEW=new NativeRegExp(re1)!==re1,MISSED_STICKY$1=stickyHelpers.MISSED_STICKY,UNSUPPORTED_Y=stickyHelpers.UNSUPPORTED_Y,BASE_FORCED=DESCRIPTORS$f&&(!CORRECT_NEW||MISSED_STICKY$1||UNSUPPORTED_DOT_ALL$1||UNSUPPORTED_NCG||fails$r(function(){return re2[MATCH$1]=!1,NativeRegExp(re1)!==re1||NativeRegExp(re2)===re2||String(NativeRegExp(re1,"i"))!=="/a/i"})),handleDotAll=function(_e){for(var et=_e.length,tt=0,nt="",rt=!1,at;tt<=et;tt++){if(at=charAt$4(_e,tt),at==="\\"){nt+=at+charAt$4(_e,++tt);continue}!rt&&at==="."?nt+="[\\s\\S]":(at==="["?rt=!0:at==="]"&&(rt=!1),nt+=at)}return nt},handleNCG=function(_e){for(var et=_e.length,tt=0,nt="",rt=[],at={},it=!1,ot=!1,st=0,ct="",ut;tt<=et;tt++){if(ut=charAt$4(_e,tt),ut==="\\")ut+=charAt$4(_e,++tt);else if(ut==="]")it=!1;else if(!it)switch(!0){case ut==="[":it=!0;break;case ut==="(":exec$2(IS_NCG,stringSlice$5(_e,tt+1))&&(tt+=2,ot=!0),nt+=ut,st++;continue;case(ut===">"&&ot):if(ct===""||hasOwn$c(at,ct))throw new SyntaxError$1("Invalid capture group name");at[ct]=!0,rt[rt.length]=[ct,st],ot=!1,ct="";continue}ot?ct+=ut:nt+=ut}return[nt,rt]};if(isForced$2("RegExp",BASE_FORCED)){for(var RegExpWrapper=function(et,tt){var nt=isPrototypeOf$5(RegExpPrototype$5,this),rt=isRegExp$2(et),at=tt===void 0,it=[],ot=et,st,ct,ut,dt,ft,pt;if(!nt&&rt&&at&&et.constructor===RegExpWrapper)return et;if((rt||isPrototypeOf$5(RegExpPrototype$5,et))&&(et=et.source,at&&(tt=getRegExpFlags$2(ot))),et=et===void 0?"":toString$i(et),tt=tt===void 0?"":toString$i(tt),ot=et,UNSUPPORTED_DOT_ALL$1&&"dotAll"in re1&&(ct=!!tt&&stringIndexOf$3(tt,"s")>-1,ct&&(tt=replace$6(tt,/s/g,""))),st=tt,MISSED_STICKY$1&&"sticky"in re1&&(ut=!!tt&&stringIndexOf$3(tt,"y")>-1,ut&&UNSUPPORTED_Y&&(tt=replace$6(tt,/y/g,""))),UNSUPPORTED_NCG&&(dt=handleNCG(et),et=dt[0],it=dt[1]),ft=inheritIfRequired$2(NativeRegExp(et,tt),nt?this:RegExpPrototype$5,RegExpWrapper),(ct||ut||it.length)&&(pt=enforceInternalState(ft),ct&&(pt.dotAll=!0,pt.raw=RegExpWrapper(handleDotAll(et),st)),ut&&(pt.sticky=!0),it.length&&(pt.groups=it)),et!==ot)try{createNonEnumerableProperty$6(ft,"source",ot===""?"(?:)":ot)}catch{}return ft},keys$5=getOwnPropertyNames(NativeRegExp),index$5=0;keys$5.length>index$5;)proxyAccessor$1(RegExpWrapper,NativeRegExp,keys$5[index$5++]);RegExpPrototype$5.constructor=RegExpWrapper,RegExpWrapper.prototype=RegExpPrototype$5,defineBuiltIn$b(global$g,"RegExp",RegExpWrapper,{constructor:!0})}setSpecies$2("RegExp");var DESCRIPTORS$e=descriptors$1,UNSUPPORTED_DOT_ALL=regexpUnsupportedDotAll,classof$a=classofRaw$2,defineBuiltInAccessor$6=defineBuiltInAccessor$8,getInternalState$5=internalState.get,RegExpPrototype$4=RegExp.prototype,$TypeError$d=TypeError;DESCRIPTORS$e&&UNSUPPORTED_DOT_ALL&&defineBuiltInAccessor$6(RegExpPrototype$4,"dotAll",{configurable:!0,get:function(){if(this!==RegExpPrototype$4){if(classof$a(this)==="RegExp")return!!getInternalState$5(this).dotAll;throw $TypeError$d("Incompatible receiver, RegExp required")}}});var DESCRIPTORS$d=descriptors$1,MISSED_STICKY=regexpStickyHelpers.MISSED_STICKY,classof$9=classofRaw$2,defineBuiltInAccessor$5=defineBuiltInAccessor$8,getInternalState$4=internalState.get,RegExpPrototype$3=RegExp.prototype,$TypeError$c=TypeError;DESCRIPTORS$d&&MISSED_STICKY&&defineBuiltInAccessor$5(RegExpPrototype$3,"sticky",{configurable:!0,get:function(){if(this!==RegExpPrototype$3){if(classof$9(this)==="RegExp")return!!getInternalState$4(this).sticky;throw $TypeError$c("Incompatible receiver, RegExp required")}}});var PROPER_FUNCTION_NAME$2=functionName.PROPER,defineBuiltIn$a=defineBuiltIn$f,anObject$c=anObject$m,$toString$2=toString$t,fails$q=fails$F,getRegExpFlags$1=regexpGetFlags,TO_STRING="toString",RegExpPrototype$2=RegExp.prototype,nativeToString=RegExpPrototype$2[TO_STRING],NOT_GENERIC=fails$q(function(){return nativeToString.call({source:"a",flags:"b"})!=="/a/b"}),INCORRECT_NAME=PROPER_FUNCTION_NAME$2&&nativeToString.name!==TO_STRING;(NOT_GENERIC||INCORRECT_NAME)&&defineBuiltIn$a(RegExp.prototype,TO_STRING,function(){var et=anObject$c(this),tt=$toString$2(et.source),nt=$toString$2(getRegExpFlags$1(et));return"/"+tt+"/"+nt},{unsafe:!0});var isNumber=function(et){return typeof et=="number"&&!isNaN(et)},realNumberSchema=z$1.coerce.number().refine(function(_e){return!isNaN(_e)}),secondsToDays=function(et){return Math.floor(et/(3600*24))},roundDown=function(et){et>=100&&et<1e3&&(et=Math.floor(et));var tt=Number(et.toFixed(2));return tt>et?tt-1/Math.pow(10,2):tt},shortNumberFormat=function(et,tt){if(!isNumber(et))return"•";var nt=et,rt="";return et>=1e3&&et<1e6?(rt="k",nt=roundDown(nt/1e3)):et>=1e6&&(rt="M",nt=roundDown(nt/1e6)),tt&&nt>tt?_createRawReactElement("span",{},void 0,tt,"+"):_createRawReactElement("span",{},void 0,_createRawReactElement(FormattedNumber,{value:nt,maximumFractionDigits:0,minimumFractionDigits:0,maximumSignificantDigits:3,style:"decimal"}),rt)},isIntegerId=function(et){return new RegExp(/^-?[0-9]+$/g).test(et)};const InstanceRecord=Record({approval_required:!1,contact_account:Map$3(),configuration:Map$3({media_attachments:Map$3(),chats:Map$3({max_characters:5e3,max_media_attachments:1}),polls:Map$3({max_options:4,max_characters_per_option:25,min_expiration:300,max_expiration:2629746}),statuses:Map$3({max_characters:500,max_media_attachments:4}),groups:Map$3({max_characters_name:50,max_characters_description:160})}),description:"",description_limit:1500,email:"",feature_quote:!1,fedibird_capabilities:List$1(),invites_enabled:!1,languages:List$1(),login_message:"",pleroma:Map$3({metadata:Map$3({account_activation_required:!1,birthday_min_age:0,birthday_required:!1,features:List$1(),federation:Map$3({enabled:!0,exclusions:!1})}),stats:Map$3()}),registrations:!1,rules:List$1(),short_description:"",stats:Map$3({domain_count:0,status_count:0,user_count:0}),nostr:Map$3({relay:void 0,pubkey:void 0}),title:"",thumbnail:"",uri:"",urls:Map$3(),version:"0.0.0"}),pleromaToMastodonConfig=_e=>Map$3({statuses:Map$3({max_characters:_e.get("max_toot_chars")}),polls:Map$3({max_options:_e.getIn(["poll_limits","max_options"]),max_characters_per_option:_e.getIn(["poll_limits","max_option_chars"]),min_expiration:_e.getIn(["poll_limits","min_expiration"]),max_expiration:_e.getIn(["poll_limits","max_expiration"])})}),getAttachmentLimit=_e=>_e===PLEROMA||_e===AKKOMA?1/0:4,normalizeVersion=_e=>_e.update("version","0.0.0",et=>new RegExp(/[0-9\.]+rc[0-9]+/g).test(et)?et.split("rc").join("-rc"):et),fixTakahe=_e=>{const et=_e.get("version","");return et.startsWith("takahe/")?_e.set("version",`0.0.0 (compatible; Takahe ${et.slice(7)})`):_e},normalizeInstance=_e=>instanceSchema.parse(Map$3(fromJS(_e)).withMutations(et=>{const{software:tt}=parseVersion(et.get("version")),nt=pleromaToMastodonConfig(et);et.update("configuration",Map$3(),rt=>rt.mergeDeepWith(mergeDefined,nt)),et.updateIn(["configuration","statuses","max_media_attachments"],rt=>isNumber(rt)?rt:getAttachmentLimit(tt)),et.get("urls")===null&&et.delete("urls"),normalizeVersion(et),fixTakahe(et),et.mergeDeepWith(mergeDefined,InstanceRecord())}).toJS()),ListRecord$2=Record({id:"",title:"",replies_policy:null}),normalizeList$3=_e=>ListRecord$2(Map$3(fromJS(_e))),GeographicLocationRecord=Record({coordinates:null,srid:""}),LocationRecord=Record({url:"",description:"",country:"",locality:"",region:"",postal_code:"",street:"",origin_id:"",origin_provider:"",type:"",timezone:"",geom:null}),normalizeGeographicLocation=_e=>_e.get("geom")?_e.set("geom",GeographicLocationRecord(_e.get("geom"))):_e,normalizeLocation=_e=>LocationRecord(Map$3(fromJS(_e)).withMutations(et=>{normalizeGeographicLocation(et)})),NotificationRecord=Record({account:null,chat_message:null,created_at:new Date,emoji:null,emoji_url:null,id:"",status:null,target:null,type:"",total_count:null}),normalizeType=_e=>_e.get("type")==="group_mention"?_e.set("type","mention"):_e,normalizeNotification=_e=>NotificationRecord(Map$3(fromJS(_e)).withMutations(et=>{normalizeType(et)})),EventRecord=Record({name:"",start_time:null,end_time:null,join_mode:null,participants_count:0,location:null,join_state:null,banner:null,links:List$1()}),StatusRecord=Record({account:null,application:null,approval_status:"approved",bookmarked:!1,card:null,content:"",created_at:"",dislikes_count:0,disliked:!1,edited_at:null,emojis:List$1(),favourited:!1,favourites_count:0,filtered:List$1(),group:null,in_reply_to_account_id:null,in_reply_to_id:null,id:"",language:null,media_attachments:List$1(),mentions:List$1(),muted:!1,pinned:!1,pleroma:Map$3(),poll:null,quote:null,quotes_count:0,reblog:null,reblogged:!1,reblogs_count:0,replies_count:0,sensitive:!1,spoiler_text:"",tags:List$1(),tombstone:null,uri:"",url:"",visibility:"public",event:null,contentHtml:"",expectsCard:!1,hidden:!1,search_index:"",showFiltered:!0,spoilerHtml:"",translation:null}),normalizeAttachments$1=_e=>_e.update("media_attachments",List$1(),et=>et.map(normalizeAttachment)),normalizeMentions=_e=>_e.update("mentions",List$1(),et=>et.map(normalizeMention)),normalizeEmojis$1=_e=>_e.update("emojis",List$1(),et=>et.map(normalizeEmoji)),normalizeStatusPoll$1=_e=>{try{const et=pollSchema.parse(_e.get("poll").toJS());return _e.set("poll",et)}catch{return _e.set("poll",null)}},normalizeTombstone=_e=>{try{const et=tombstoneSchema.parse(_e.get("tombstone").toJS());return _e.set("tombstone",et)}catch{return _e.set("tombstone",null)}},normalizeStatusCard=_e=>{try{const et=cardSchema.parse(_e.get("card").toJS());return _e.set("card",et)}catch{return _e.set("card",null)}},fixMentionsOrder=_e=>{const et=_e.get("mentions",List$1()),tt=_e.get("in_reply_to_account_id"),nt=et.sort((rt,at)=>rt.get("id")===tt?-1:0);return _e.set("mentions",nt)},addSelfMention=_e=>{const et=_e.getIn(["account","id"]),tt=et===_e.get("in_reply_to_account_id"),nt=et===_e.getIn(["mentions",0,"id"]);if(tt&&!nt&&et){const rt=normalizeMention(_e.get("account"));return _e.update("mentions",List$1(),at=>List$1([rt]).concat(at))}else return _e},fixQuote$1=_e=>_e.withMutations(et=>{et.update("quote",tt=>tt||et.getIn(["pleroma","quote"])||null),et.deleteIn(["pleroma","quote"]),et.update("quotes_count",tt=>tt||et.getIn(["pleroma","quotes_count"],0)),et.deleteIn(["pleroma","quotes_count"])}),fixSensitivity=_e=>{_e.get("spoiler_text")&&_e.set("sensitive",!0)},normalizeEvent=_e=>{if(_e.getIn(["pleroma","event"])){const et=_e.get("media_attachments").first();let tt=null,nt=_e.get("media_attachments");et&&et.description==="Banner"&&et.type==="image"&&(tt=normalizeAttachment(et),nt=nt.shift());const rt=nt.filter(it=>it.pleroma.get("mime_type")==="text/html");nt=nt.filter(it=>it.pleroma.get("mime_type")!=="text/html");const at=EventRecord(_e.getIn(["pleroma","event"]).set("banner",tt).set("links",rt));_e.set("event",at).set("media_attachments",nt)}},fixContent=_e=>_e.get("content")==="

"?_e.set("content",""):_e,normalizeFilterResults=_e=>_e.update("filtered",List$1(),et=>et.map(tt=>tt.getIn(["filter","title"]))),normalizeDislikes=_e=>_e.get("friendica")?_e.set("dislikes_count",_e.getIn(["friendica","dislikes_count"])).set("disliked",_e.getIn(["friendica","disliked"])):_e,parseAccount=_e=>{try{const et=accountSchema.parse(maybeFromJS(_e.get("account")));return _e.set("account",et)}catch{return _e.set("account",null)}},parseGroup=_e=>{try{const et=groupSchema.parse(_e.get("group").toJS());return _e.set("group",et)}catch{return _e.set("group",null)}},normalizeStatus=_e=>StatusRecord(Map$3(fromJS(_e)).withMutations(et=>{normalizeAttachments$1(et),normalizeMentions(et),normalizeEmojis$1(et),normalizeStatusPoll$1(et),normalizeStatusCard(et),fixMentionsOrder(et),addSelfMention(et),fixQuote$1(et),fixSensitivity(et),normalizeEvent(et),fixContent(et),normalizeFilterResults(et),normalizeDislikes(et),normalizeTombstone(et),parseAccount(et),parseGroup(et)})),StatusEditRecord=Record({account:null,content:"",created_at:new Date,emojis:List$1(),favourited:!1,media_attachments:List$1(),poll:null,sensitive:!1,spoiler_text:"",contentHtml:"",spoilerHtml:""}),normalizeAttachments=_e=>_e.update("media_attachments",List$1(),et=>et.map(normalizeAttachment)),normalizeEmojis=_e=>_e.update("emojis",List$1(),et=>et.map(normalizeEmoji)),normalizeStatusPoll=_e=>{try{const et=pollSchema.parse(_e.get("poll").toJS());return _e.set("poll",et)}catch{return _e.set("poll",null)}},normalizeContent=_e=>{const et=makeEmojiMap(_e.get("emojis")),tt=stripCompatibilityFeatures(emojify(_e.get("content"),et)),nt=emojify(escapeTextContentForBrowser(_e.get("spoiler_text")),et);return _e.set("contentHtml",tt).set("spoilerHtml",nt)},normalizeStatusEdit=_e=>StatusEditRecord(Map$3(fromJS(_e)).withMutations(et=>{normalizeAttachments(et),normalizeEmojis(et),normalizeStatusPoll(et),normalizeContent(et)})),TagRecord=Record({name:"",url:"",history:null,following:!1}),normalizeHistoryList=_e=>_e.get("history")?_e.update("history",List$1(),et=>et.map(normalizeHistory)):_e.set("history",null),normalizeTag=_e=>TagRecord(Map$3(fromJS(_e)).withMutations(et=>{normalizeHistoryList(et)})),normalizeUsername=_e=>{const et=_e.trim();return et[0]==="@"?et.slice(1):et};function hexToRgb(_e){const et=_e.replace(/##/g,"#"),tt=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(et);if(!tt)return null;const[,nt,rt,at]=tt;return{r:parseInt(nt,16),g:parseInt(rt,16),b:parseInt(at,16)}}function rgbToHex(_e,et,tt){const nt=rt=>`0${rt.toString(16)}`.slice(-2);return`#${nt(_e)}${nt(et)}${nt(tt)}`}function lighten(_e,et){const tt=hexToRgb(`#${_e}`);if(!tt)return"";const nt=Math.round(tt.r+(255-tt.r)*et),rt=Math.round(tt.g+(255-tt.g)*et),at=Math.round(tt.b+(255-tt.b)*et);return rgbToHex(nt,rt,at)}function darken(_e,et){const tt=hexToRgb(_e);if(!tt)return"";const nt=Math.round(tt.r*et),rt=Math.round(tt.g*et),at=Math.round(tt.b*et);return rgbToHex(nt,rt,at)}function tintify(_e){const et={500:`#${_e}`.replace(/##/g,"#")},tt={50:.95,100:.9,200:.75,300:.3,400:.2,600:.9,700:.75,800:.3,900:.19};return[50,100,200,300,400].forEach(nt=>{et[nt]=lighten(_e,tt[nt])}),[600,700,800,900].forEach(nt=>{et[nt]=darken(_e,tt[nt])}),et}const rgbToHsl=_e=>{const et=_e.r/255,tt=_e.g/255,nt=_e.b/255,rt=[et,tt,nt].sort(),at=(rt[0]+rt[2])/2*100;let it,ot;return rt[0]===rt[2]?(it=0,ot=0):(at>=50?it=(rt[2]-rt[0])/(2-rt[2]-rt[0])*100:it=(rt[2]-rt[0])/(rt[2]+rt[0])*100,rt[2]===et?ot=(tt-nt)/(rt[2]-rt[0])*60:rt[2]===tt?ot=(2+(nt-et)/(rt[2]-rt[0]))*60:ot=(4+(et-tt)/(rt[2]-rt[0]))*60,ot<0?ot+=360:ot>360&&(ot=ot%360)),{h:ot,s:it,l:at}};function hslToHex(_e){const{h:et,s:tt}=_e;let{l:nt}=_e;nt/=100;const rt=tt*Math.min(nt,1-nt)/100,at=it=>{const ot=(it+et/30)%12,st=nt-rt*Math.max(Math.min(ot-3,9-ot,1),-1);return Math.round(255*st).toString(16).padStart(2,"0")};return`#${at(0)}${at(8)}${at(4)}`}const generateAccent=_e=>{const et=hexToRgb(_e);if(!et)return null;const{h:tt}=rgbToHsl(et);return hslToHex({h:tt-15,s:86,l:44})},generateNeutral=_e=>{const et=hexToRgb(_e);if(!et)return null;const{h:tt}=rgbToHsl(et);return hslToHex({h:tt,s:20,l:55})},parseShades=(_e,et,tt)=>{if(tt){if(typeof tt=="string"){const nt=hexToRgb(tt);if(!nt)return;const{r:rt,g:at,b:it}=nt;_e[`--color-${et}`]=`${rt} ${at} ${it}`;return}Object.keys(tt).forEach(nt=>{const rt=hexToRgb(tt[nt]);if(!rt)return;const{r:at,g:it,b:ot}=rt;_e[`--color-${et}-${nt}`]=`${at} ${it} ${ot}`})}},parseColors=_e=>Object.keys(_e).reduce((et,tt)=>(parseShades(et,tt,_e[tt]),et),{}),colorsToCss=_e=>{const et=parseColors(_e);return Object.keys(et).reduce((tt,nt)=>tt+`${nt}:${et[nt]};`,"")},generateThemeCss=_e=>colorsToCss(_e.colors.toJS()),hexToHsl=_e=>{const et=hexToRgb(_e);return et?rgbToHsl(et):null},hueShift=(_e,et)=>{const{h:tt,s:nt,l:rt}=hexToHsl(_e);return hslToHex({h:(tt+et)%360,s:nt,l:rt})},isHex=_e=>/^#([0-9A-F]{3}){1,2}$/i.test(_e),expandPalette=_e=>Object.entries(_e).reduce((et,tt)=>{const[nt,rt]=tt;return typeof rt=="string"&&isHex(rt)?et[nt]=tintify(rt):rt&&typeof rt=="object"&&(et[nt]=rt),et},{}),maybeGenerateAccentColor=_e=>isHex(_e)?generateAccent(_e):null,fromLegacyColors=_e=>{const et=_e.get("brandColor"),tt=_e.get("accentColor"),nt=isHex(tt)?tt:maybeGenerateAccentColor(et);return expandPalette({primary:isHex(et)?et:null,secondary:nt,accent:nt,gray:isHex(et)?generateNeutral(et):null})},toTailwind=_e=>{const et=Map$3(_e.get("colors")),tt=Map$3(fromJS(fromLegacyColors(_e)));return _e.set("colors",tt.mergeDeep(et))},DEFAULT_COLORS=Map$3({success:Map$3({50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"}),danger:Map$3({50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"}),greentext:"#789922"}),PromoPanelItemRecord=Record({icon:"",text:"",url:"",textLocales:Map$3()}),PromoPanelRecord=Record({items:List$1()}),FooterItemRecord=Record({title:"",url:""}),SoapboxConfigRecord=Record({ads:List$1(),appleAppId:null,authProvider:"",logo:"",logoDarkMode:null,banner:"",brandColor:"",accentColor:"",colors:Map$3(),copyright:`♥${new Date().getFullYear()}. Copying is an act of love. Please copy and share.`,customCss:List$1(),defaultSettings:Map$3(),extensions:Map$3(),gdpr:!1,gdprUrl:"",greentext:!1,promoPanel:PromoPanelRecord(),navlinks:Map$3({homeFooter:List$1()}),allowedEmoji:List$1(["⭐️","❤️","😆","😮","😢","😩"]),verifiedIcon:"",verifiedCanEditName:!1,displayFqn:!0,aboutPages:Map$3(),authenticatedProfile:!0,linkFooterMessage:"",links:Map$3(),displayCta:!0,feedInjection:!0,tileServer:"",tileServerAttribution:"",redirectRootNoLogin:"",mediaPreview:!1},"SoapboxConfig"),normalizeAds=_e=>{if(_e.has("ads")){const et=filteredArray(adSchema).parse(List$1(_e.get("ads")).toJS());return _e.set("ads",et)}else return _e},normalizeBrandColor=_e=>{const et=_e.get("brandColor")||_e.getIn(["colors","primary","500"])||"";return _e.set("brandColor",et)},normalizeAccentColor=_e=>{const et=_e.get("brandColor"),tt=_e.get("accentColor")||_e.getIn(["colors","accent","500"])||(et?generateAccent(et):"");return _e.set("accentColor",tt)},normalizeColors=_e=>{const et=DEFAULT_COLORS.mergeDeep(_e.get("colors"));return toTailwind(_e.set("colors",et))},maybeAddMissingColors=_e=>{const et=_e.get("colors"),tt=Map$3({"gradient-start":et.getIn(["primary","500"]),"gradient-end":et.getIn(["accent","500"]),"accent-blue":et.getIn(["primary","600"])});return _e.set("colors",tt.mergeDeep(et))},normalizePromoPanel=_e=>{const et=PromoPanelRecord(_e.get("promoPanel")),tt=et.items.map(PromoPanelItemRecord);return _e.set("promoPanel",et.set("items",tt))},normalizeFooterLinks=_e=>{const et=["navlinks","homeFooter"],tt=_e.getIn(et,List$1()).map(FooterItemRecord);return _e.setIn(et,tt)},normalizeAdsAlgorithm=_e=>{const et=_e.getIn(["extensions","ads","interval"]),tt=_e.getIn(["extensions","ads","algorithm"]);if(typeof et=="number"&&!tt){const nt=fromJS(["linear",{interval:et}]);return _e.setIn(["extensions","ads","algorithm"],nt)}else return _e},upgradeSingleUserMode=_e=>{const et=_e.get("singleUserMode"),tt=_e.get("singleUserModeProfile");return!_e.get("redirectRootNoLogin")&&et&&tt?_e.set("redirectRootNoLogin",`/@${normalizeUsername(tt)}`).deleteAll(["singleUserMode","singleUserModeProfile"]):_e.deleteAll(["singleUserMode","singleUserModeProfile"])},normalizeRedirectRootNoLogin=_e=>{const et=_e.get("redirectRootNoLogin");if(!et)return _e;try{const tt=new URL(et,"http://a").pathname;return tt!=="/"?_e.set("redirectRootNoLogin",tt):_e.delete("redirectRootNoLogin")}catch(tt){return console.error("You have configured an invalid redirect in Soapbox Config."),console.error(tt),_e.delete("redirectRootNoLogin")}},normalizeSoapboxConfig=_e=>SoapboxConfigRecord(Map$3(fromJS(_e)).withMutations(et=>{normalizeBrandColor(et),normalizeAccentColor(et),normalizeColors(et),normalizePromoPanel(et),normalizeFooterLinks(et),maybeAddMissingColors(et),normalizeAds(et),normalizeAdsAlgorithm(et),upgradeSingleUserMode(et),normalizeRedirectRootNoLogin(et)})),removeVS16s=_e=>{const et=/\uFE0F/g,tt=String.fromCharCode(8205);return _e.indexOf(tt)<0?_e.replace(et,""):_e},toCodePoints=_e=>{const et=[];let tt=0,nt=0,rt=0;for(;rt<_e.length;)tt=_e.charCodeAt(rt++),nt?(et.push((65536+(nt-55296<<10)+(tt-56320)).toString(16)),nt=0):tt>55296&&tt<=56319?nt=tt:et.push(tt.toString(16));return et},SOAPBOX_CONFIG_REQUEST_SUCCESS="SOAPBOX_CONFIG_REQUEST_SUCCESS",SOAPBOX_CONFIG_REQUEST_FAIL="SOAPBOX_CONFIG_REQUEST_FAIL",SOAPBOX_CONFIG_REMEMBER_REQUEST="SOAPBOX_CONFIG_REMEMBER_REQUEST",SOAPBOX_CONFIG_REMEMBER_SUCCESS="SOAPBOX_CONFIG_REMEMBER_SUCCESS",SOAPBOX_CONFIG_REMEMBER_FAIL="SOAPBOX_CONFIG_REMEMBER_FAIL",getSoapboxConfig=createSelector([_e=>_e.soapbox,_e=>getFeatures(_e.instance)],(_e,et)=>normalizeSoapboxConfig(_e).withMutations(tt=>{_e.get("displayFqn")===void 0&&tt.set("displayFqn",et.federating),et.emojiReactsNonRGI&&tt.set("allowedEmoji",tt.allowedEmoji.map(removeVS16s))})),rememberSoapboxConfig=_e=>et=>(et({type:SOAPBOX_CONFIG_REMEMBER_REQUEST,host:_e}),KVStore.getItemOrError(`soapbox_config:${_e}`).then(tt=>(et({type:SOAPBOX_CONFIG_REMEMBER_SUCCESS,host:_e,soapboxConfig:tt}),tt)).catch(tt=>{et({type:SOAPBOX_CONFIG_REMEMBER_FAIL,host:_e,error:tt,skipAlert:!0})})),fetchFrontendConfigurations=()=>(_e,et)=>api(et).get("/api/pleroma/frontend_configurations").then(({data:tt})=>tt),fetchSoapboxConfig=_e=>(et,tt)=>getFeatures(tt().instance).frontendConfigurations?et(fetchFrontendConfigurations()).then(rt=>rt.soapbox_fe?(et(importSoapboxConfig$1(rt.soapbox_fe,_e)),rt.soapbox_fe):et(fetchSoapboxJson(_e))):et(fetchSoapboxJson(_e)),loadSoapboxConfig=()=>(_e,et)=>{const tt=getHost$1(et());return _e(rememberSoapboxConfig(tt)).then(()=>_e(fetchSoapboxConfig(tt)))},fetchSoapboxJson=_e=>et=>staticClient.get("/instance/soapbox.json").then(({data:tt})=>{if(!isObject$i(tt))throw"soapbox.json failed";return et(importSoapboxConfig$1(tt,_e)),tt}).catch(tt=>{et(soapboxConfigFail(tt,_e))}),importSoapboxConfig$1=(_e,et)=>(_e.brandColor||(_e.brandColor="#0482d8"),{type:SOAPBOX_CONFIG_REQUEST_SUCCESS,soapboxConfig:_e,host:et}),soapboxConfigFail=(_e,et)=>({type:SOAPBOX_CONFIG_REQUEST_FAIL,error:_e,skipAlert:!0,host:et}),isObject$i=_e=>_e instanceof Object&&_e.constructor===Object,displayFqn=_e=>getSoapboxConfig(_e).displayFqn,federationRestrictionsDisclosed=_e=>!!_e.instance.pleroma.metadata.federation.mrf_policies,isStandalone=_e=>{const et=_e.meta.instance_fetch_failed;return isURL(BACKEND_URL)?!1:!isPrerendered&&et},getHost$2=_e=>{try{return new URL(_e).origin}catch{return""}},getBaseURL$1=_e=>{const et=selectOwnAccount(_e);return isURL(BACKEND_URL)?BACKEND_URL:getHost$2(et==null?void 0:et.url)},OAUTH_TOKEN_CREATE_REQUEST="OAUTH_TOKEN_CREATE_REQUEST",OAUTH_TOKEN_CREATE_SUCCESS="OAUTH_TOKEN_CREATE_SUCCESS",OAUTH_TOKEN_CREATE_FAIL="OAUTH_TOKEN_CREATE_FAIL",OAUTH_TOKEN_REVOKE_REQUEST="OAUTH_TOKEN_REVOKE_REQUEST",OAUTH_TOKEN_REVOKE_SUCCESS="OAUTH_TOKEN_REVOKE_SUCCESS",OAUTH_TOKEN_REVOKE_FAIL="OAUTH_TOKEN_REVOKE_FAIL",obtainOAuthToken=(_e,et)=>tt=>(tt({type:OAUTH_TOKEN_CREATE_REQUEST,params:_e}),baseClient(null,et).post("/oauth/token",_e).then(({data:nt})=>(tt({type:OAUTH_TOKEN_CREATE_SUCCESS,params:_e,token:nt}),nt)).catch(nt=>{throw tt({type:OAUTH_TOKEN_CREATE_FAIL,params:_e,error:nt,skipAlert:!0}),nt})),revokeOAuthToken=_e=>(et,tt)=>{et({type:OAUTH_TOKEN_REVOKE_REQUEST,params:_e});const nt=getBaseURL$1(tt());return baseClient(null,nt).post("/oauth/revoke",_e).then(({data:rt})=>(et({type:OAUTH_TOKEN_REVOKE_SUCCESS,params:_e,data:rt}),rt)).catch(rt=>{throw et({type:OAUTH_TOKEN_REVOKE_FAIL,params:_e,error:rt}),rt})},ONBOARDING_START="ONBOARDING_START",ONBOARDING_END="ONBOARDING_END",ONBOARDING_LOCAL_STORAGE_KEY="soapbox:onboarding",checkOnboardingStatus=()=>_e=>{localStorage.getItem(ONBOARDING_LOCAL_STORAGE_KEY)==="1"&&_e({type:ONBOARDING_START})},startOnboarding=()=>_e=>{localStorage.setItem(ONBOARDING_LOCAL_STORAGE_KEY,"1"),_e({type:ONBOARDING_START})},endOnboarding=()=>_e=>{localStorage.removeItem(ONBOARDING_LOCAL_STORAGE_KEY),_e({type:ONBOARDING_END})},queryClient=new QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:6e4,cacheTime:1/0,retry:!1}}});var uncurryThis$k=functionUncurryThisClause,aCallable$8=aCallable$b,NATIVE_BIND$2=functionBindNative,bind$9=uncurryThis$k(uncurryThis$k.bind),functionBindContext=function(_e,et){return aCallable$8(_e),et===void 0?_e:NATIVE_BIND$2?bind$9(_e,et):function(){return _e.apply(et,arguments)}},classof$8=classofRaw$2,isArray$b=Array.isArray||function(et){return classof$8(et)==="Array"},uncurryThis$j=functionUncurryThis,fails$p=fails$F,isCallable$d=isCallable$t,classof$7=classof$f,getBuiltIn$7=getBuiltIn$c,inspectSource$1=inspectSource$3,noop$4=function(){},empty=[],construct$1=getBuiltIn$7("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec$1=uncurryThis$j(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.exec(noop$4),isConstructorModern=function(et){if(!isCallable$d(et))return!1;try{return construct$1(noop$4,empty,et),!0}catch{return!1}},isConstructorLegacy=function(et){if(!isCallable$d(et))return!1;switch(classof$7(et)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING||!!exec$1(constructorRegExp,inspectSource$1(et))}catch{return!0}};isConstructorLegacy.sham=!0;var isConstructor$4=!construct$1||fails$p(function(){var _e;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern(function(){_e=!0})||_e})?isConstructorLegacy:isConstructorModern,isArray$a=isArray$b,isConstructor$3=isConstructor$4,isObject$h=isObject$u,wellKnownSymbol$l=wellKnownSymbol$t,SPECIES$4=wellKnownSymbol$l("species"),$Array$3=Array,arraySpeciesConstructor$1=function(_e){var et;return isArray$a(_e)&&(et=_e.constructor,isConstructor$3(et)&&(et===$Array$3||isArray$a(et.prototype))?et=void 0:isObject$h(et)&&(et=et[SPECIES$4],et===null&&(et=void 0))),et===void 0?$Array$3:et},arraySpeciesConstructor=arraySpeciesConstructor$1,arraySpeciesCreate$2=function(_e,et){return new(arraySpeciesConstructor(_e))(et===0?0:et)},bind$8=functionBindContext,uncurryThis$i=functionUncurryThis,IndexedObject$1=indexedObject,toObject$b=toObject$e,lengthOfArrayLike$9=lengthOfArrayLike$b,arraySpeciesCreate$1=arraySpeciesCreate$2,push$6=uncurryThis$i([].push),createMethod$1=function(_e){var et=_e===1,tt=_e===2,nt=_e===3,rt=_e===4,at=_e===6,it=_e===7,ot=_e===5||at;return function(st,ct,ut,dt){for(var ft=toObject$b(st),pt=IndexedObject$1(ft),mt=bind$8(ct,ut),ht=lengthOfArrayLike$9(pt),Et=0,yt=dt||arraySpeciesCreate$1,vt=et?yt(st,ht):tt||it?yt(st,0):void 0,gt,St;ht>Et;Et++)if((ot||Et in pt)&&(gt=pt[Et],St=mt(gt,Et,ft),_e))if(et)vt[Et]=St;else if(St)switch(_e){case 3:return!0;case 5:return gt;case 6:return Et;case 2:push$6(vt,gt)}else switch(_e){case 4:return!1;case 7:push$6(vt,gt)}return at?-1:nt||rt?rt:vt}},arrayIteration={forEach:createMethod$1(0),map:createMethod$1(1),filter:createMethod$1(2),some:createMethod$1(3),every:createMethod$1(4),find:createMethod$1(5),findIndex:createMethod$1(6),filterReject:createMethod$1(7)},wellKnownSymbol$k=wellKnownSymbol$t,create$5=objectCreate,defineProperty$7=objectDefineProperty.f,UNSCOPABLES=wellKnownSymbol$k("unscopables"),ArrayPrototype$1=Array.prototype;ArrayPrototype$1[UNSCOPABLES]===void 0&&defineProperty$7(ArrayPrototype$1,UNSCOPABLES,{configurable:!0,value:create$5(null)});var addToUnscopables$5=function(_e){ArrayPrototype$1[UNSCOPABLES][_e]=!0},$$H=_export,$find=arrayIteration.find,addToUnscopables$4=addToUnscopables$5,FIND="find",SKIPS_HOLES$1=!0;FIND in[]&&Array(1)[FIND](function(){SKIPS_HOLES$1=!1});$$H({target:"Array",proto:!0,forced:SKIPS_HOLES$1},{find:function(et){return $find(this,et,arguments.length>1?arguments[1]:void 0)}});addToUnscopables$4(FIND);var objectGetOwnPropertyNamesExternal={},toPropertyKey$1=toPropertyKey$4,definePropertyModule$1=objectDefineProperty,createPropertyDescriptor$4=createPropertyDescriptor$7,createProperty$6=function(_e,et,tt){var nt=toPropertyKey$1(et);nt in _e?definePropertyModule$1.f(_e,nt,createPropertyDescriptor$4(0,tt)):_e[nt]=tt},toAbsoluteIndex$2=toAbsoluteIndex$4,lengthOfArrayLike$8=lengthOfArrayLike$b,createProperty$5=createProperty$6,$Array$2=Array,max$3=Math.max,arraySliceSimple=function(_e,et,tt){for(var nt=lengthOfArrayLike$8(_e),rt=toAbsoluteIndex$2(et,nt),at=toAbsoluteIndex$2(tt===void 0?nt:tt,nt),it=$Array$2(max$3(at-rt,0)),ot=0;rttypeof window=="object"?((_e?_e.querySelector("#_goober"):window._goober)||Object.assign((_e||document.head).appendChild(document.createElement("style")),{nonce:window.__webpack_nonce__,innerHTML:" ",id:"_goober"})).firstChild:_e||e,l$1=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a=/\/\*[^]*?\*\/| +/g,n$2=/\n+/g,o=(_e,et)=>{let tt="",nt="",rt="";for(let at in _e){let it=_e[at];at[0]=="@"?at[1]=="i"?tt=at+" "+it+";":nt+=at[1]=="f"?o(it,at):at+"{"+o(it,at[1]=="k"?"":et)+"}":typeof it=="object"?nt+=o(it,et?et.replace(/([^,])+/g,ot=>at.replace(/(^:.*)|([^,])+/g,st=>/&/.test(st)?st.replace(/&/g,ot):ot?ot+" "+st:st)):at):it!=null&&(at=/^--/.test(at)?at:at.replace(/[A-Z]/g,"-$&").toLowerCase(),rt+=o.p?o.p(at,it):at+":"+it+";")}return tt+(et&&rt?et+"{"+rt+"}":rt)+nt},c={},s=_e=>{if(typeof _e=="object"){let et="";for(let tt in _e)et+=tt+s(_e[tt]);return et}return _e},i$2=(_e,et,tt,nt,rt)=>{let at=s(_e),it=c[at]||(c[at]=(st=>{let ct=0,ut=11;for(;ct>>0;return"go"+ut})(at));if(!c[it]){let st=at!==_e?_e:(ct=>{let ut,dt,ft=[{}];for(;ut=l$1.exec(ct.replace(a,""));)ut[4]?ft.shift():ut[3]?(dt=ut[3].replace(n$2," ").trim(),ft.unshift(ft[0][dt]=ft[0][dt]||{})):ft[0][ut[1]]=ut[2].replace(n$2," ").trim();return ft[0]})(_e);c[it]=o(rt?{["@keyframes "+it]:st}:st,tt?"":"."+it)}let ot=tt&&c.g?c.g:null;return tt&&(c.g=c[it]),((st,ct,ut,dt)=>{dt?ct.data=ct.data.replace(dt,st):ct.data.indexOf(st)===-1&&(ct.data=ut?st+ct.data:ct.data+st)})(c[it],et,nt,ot),it},p$1=(_e,et,tt)=>_e.reduce((nt,rt,at)=>{let it=et[at];if(it&&it.call){let ot=it(tt),st=ot&&ot.props&&ot.props.className||/^go/.test(ot)&&ot;it=st?"."+st:ot&&typeof ot=="object"?ot.props?"":o(ot,""):ot===!1?"":ot}return nt+rt+(it??"")},"");function u$1(_e){let et=this||{},tt=_e.call?_e(et.p):_e;return i$2(tt.unshift?tt.raw?p$1(tt,[].slice.call(arguments,1),et.p):tt.reduce((nt,rt)=>Object.assign(nt,rt&&rt.call?rt(et.p):rt),{}):tt,t(et.target),et.g,et.o,et.k)}let d,f$1,g;u$1.bind({g:1});let h$1=u$1.bind({k:1});function m$1(_e,et,tt,nt){o.p=et,d=_e,f$1=tt,g=nt}function j(_e,et){let tt=this||{};return function(){let nt=arguments;function rt(at,it){let ot=Object.assign({},at),st=ot.className||rt.className;tt.p=Object.assign({theme:f$1&&f$1()},ot),tt.o=/ *go\d+/.test(st),ot.className=u$1.apply(tt,nt)+(st?" "+st:""),et&&(ot.ref=it);let ct=_e;return _e[0]&&(ct=ot.as||_e,delete ot.as),g&&ct[0]&&g(ot),d(ct,ot)}return et?et(rt):rt}}var W=_e=>typeof _e=="function",T=(_e,et)=>W(_e)?_e(et):_e,U=(()=>{let _e=0;return()=>(++_e).toString()})(),b=(()=>{let _e;return()=>{if(_e===void 0&&typeof window<"u"){let et=matchMedia("(prefers-reduced-motion: reduce)");_e=!et||et.matches}return _e}})(),Q=20,S=new Map,X=1e3,$$A=_e=>{if(S.has(_e))return;let et=setTimeout(()=>{S.delete(_e),u({type:4,toastId:_e})},X);S.set(_e,et)},J=_e=>{let et=S.get(_e);et&&clearTimeout(et)},v=(_e,et)=>{switch(et.type){case 0:return{..._e,toasts:[et.toast,..._e.toasts].slice(0,Q)};case 1:return et.toast.id&&J(et.toast.id),{..._e,toasts:_e.toasts.map(at=>at.id===et.toast.id?{...at,...et.toast}:at)};case 2:let{toast:tt}=et;return _e.toasts.find(at=>at.id===tt.id)?v(_e,{type:1,toast:tt}):v(_e,{type:0,toast:tt});case 3:let{toastId:nt}=et;return nt?$$A(nt):_e.toasts.forEach(at=>{$$A(at.id)}),{..._e,toasts:_e.toasts.map(at=>at.id===nt||nt===void 0?{...at,visible:!1}:at)};case 4:return et.toastId===void 0?{..._e,toasts:[]}:{..._e,toasts:_e.toasts.filter(at=>at.id!==et.toastId)};case 5:return{..._e,pausedAt:et.time};case 6:let rt=et.time-(_e.pausedAt||0);return{..._e,pausedAt:void 0,toasts:_e.toasts.map(at=>({...at,pauseDuration:at.pauseDuration+rt}))}}},A=[],P$1={toasts:[],pausedAt:void 0},u=_e=>{P$1=v(P$1,_e),A.forEach(et=>{et(P$1)})},Y={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},I=(_e={})=>{let[et,tt]=reactExports.useState(P$1);reactExports.useEffect(()=>(A.push(tt),()=>{let rt=A.indexOf(tt);rt>-1&&A.splice(rt,1)}),[et]);let nt=et.toasts.map(rt=>{var at,it;return{..._e,..._e[rt.type],...rt,duration:rt.duration||((at=_e[rt.type])==null?void 0:at.duration)||(_e==null?void 0:_e.duration)||Y[rt.type],style:{..._e.style,...(it=_e[rt.type])==null?void 0:it.style,...rt.style}}});return{...et,toasts:nt}},G=(_e,et="blank",tt)=>({createdAt:Date.now(),visible:!0,type:et,ariaProps:{role:"status","aria-live":"polite"},message:_e,pauseDuration:0,...tt,id:(tt==null?void 0:tt.id)||U()}),h=_e=>(et,tt)=>{let nt=G(et,_e,tt);return u({type:2,toast:nt}),nt.id},n$1=(_e,et)=>h("blank")(_e,et);n$1.error=h("error");n$1.success=h("success");n$1.loading=h("loading");n$1.custom=h("custom");n$1.dismiss=_e=>{u({type:3,toastId:_e})};n$1.remove=_e=>u({type:4,toastId:_e});n$1.promise=(_e,et,tt)=>{let nt=n$1.loading(et.loading,{...tt,...tt==null?void 0:tt.loading});return _e.then(rt=>(n$1.success(T(et.success,rt),{id:nt,...tt,...tt==null?void 0:tt.success}),rt)).catch(rt=>{n$1.error(T(et.error,rt),{id:nt,...tt,...tt==null?void 0:tt.error})}),_e};var Z=(_e,et)=>{u({type:1,toast:{id:_e,height:et}})},ee=()=>{u({type:5,time:Date.now()})},D=_e=>{let{toasts:et,pausedAt:tt}=I(_e);reactExports.useEffect(()=>{if(tt)return;let at=Date.now(),it=et.map(ot=>{if(ot.duration===1/0)return;let st=(ot.duration||0)+ot.pauseDuration-(at-ot.createdAt);if(st<0){ot.visible&&n$1.dismiss(ot.id);return}return setTimeout(()=>n$1.dismiss(ot.id),st)});return()=>{it.forEach(ot=>ot&&clearTimeout(ot))}},[et,tt]);let nt=reactExports.useCallback(()=>{tt&&u({type:6,time:Date.now()})},[tt]),rt=reactExports.useCallback((at,it)=>{let{reverseOrder:ot=!1,gutter:st=8,defaultPosition:ct}=it||{},ut=et.filter(pt=>(pt.position||ct)===(at.position||ct)&&pt.height),dt=ut.findIndex(pt=>pt.id===at.id),ft=ut.filter((pt,mt)=>mtpt.visible).slice(...ot?[ft+1]:[0,ft]).reduce((pt,mt)=>pt+(mt.height||0)+st,0)},[et]);return{toasts:et,handlers:{updateHeight:Z,startPause:ee,endPause:nt,calculateOffset:rt}}},oe=h$1` from { transform: scale(0) rotate(45deg); @@ -310,12 +310,12 @@ to { > * { pointer-events: auto; } -`;var _t=n$1;const vitePluginRequire_1697861809669_7698334="/packs/assets/chevron-down-7f74ef2a.svg",vitePluginRequire_1697861833285_7157681="/packs/assets/chevron-up-c8b6d9f0.svg",vitePluginRequire_1697861810836_81866597="/packs/assets/dots-7567a32a.svg";function _objectWithoutProperties(_e,et){if(_e==null)return{};var tt=_objectWithoutPropertiesLoose(_e,et),nt,rt;if(Object.getOwnPropertySymbols){var at=Object.getOwnPropertySymbols(_e);for(rt=0;rt=0)&&Object.prototype.propertyIsEnumerable.call(_e,nt)&&(tt[nt]=_e[nt])}return tt}var DESCRIPTORS$a=descriptors$1,isArray$8=isArray$b,$TypeError$b=TypeError,getOwnPropertyDescriptor$4=Object.getOwnPropertyDescriptor,SILENT_ON_NON_WRITABLE_LENGTH_SET=DESCRIPTORS$a&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(_e){return _e instanceof TypeError}}(),arraySetLength=SILENT_ON_NON_WRITABLE_LENGTH_SET?function(_e,et){if(isArray$8(_e)&&!getOwnPropertyDescriptor$4(_e,"length").writable)throw $TypeError$b("Cannot set read only .length");return _e.length=et}:function(_e,et){return _e.length=et},$TypeError$a=TypeError,MAX_SAFE_INTEGER$2=9007199254740991,doesNotExceedSafeInteger$2=function(_e){if(_e>MAX_SAFE_INTEGER$2)throw $TypeError$a("Maximum allowed index exceeded");return _e},$$z=_export,toObject$9=toObject$e,lengthOfArrayLike$7=lengthOfArrayLike$b,setArrayLength=arraySetLength,doesNotExceedSafeInteger$1=doesNotExceedSafeInteger$2,fails$l=fails$F,INCORRECT_TO_LENGTH=fails$l(function(){return[].push.call({length:4294967296},1)!==4294967297}),properErrorOnNonWritableLength=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(_e){return _e instanceof TypeError}},FORCED$8=INCORRECT_TO_LENGTH||!properErrorOnNonWritableLength();$$z({target:"Array",proto:!0,arity:1,forced:FORCED$8},{push:function(et){var tt=toObject$9(this),nt=lengthOfArrayLike$7(tt),rt=arguments.length;doesNotExceedSafeInteger$1(nt+rt);for(var at=0;at1?arguments[1]:void 0,it=at!==void 0;it&&(at=bind$7(at,rt>2?arguments[2]:void 0));var ot=getIteratorMethod$2(tt),st=0,ct,ut,dt,ft,pt,mt;if(ot&&!(this===$Array$1&&isArrayIteratorMethod$1(ot)))for(ft=getIterator$2(tt,ot),pt=ft.next,ut=nt?new this:[];!(dt=call$a(pt,ft)).done;st++)mt=it?callWithSafeIterationClosing(ft,at,[dt.value,st],!0):dt.value,createProperty$4(ut,st,mt);else for(ct=lengthOfArrayLike$6(tt),ut=nt?new this(ct):$Array$1(ct);ct>st;st++)mt=it?at(tt[st],st):tt[st],createProperty$4(ut,st,mt);return ut.length=st,ut},wellKnownSymbol$d=wellKnownSymbol$t,ITERATOR$5=wellKnownSymbol$d("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR$5]=function(){return this},Array.from(iteratorWithReturn,function(){throw 2})}catch{}var checkCorrectnessOfIteration$3=function(_e,et){try{if(!et&&!SAFE_CLOSING)return!1}catch{return!1}var tt=!1;try{var nt={};nt[ITERATOR$5]=function(){return{next:function(){return{done:tt=!0}}}},_e(nt)}catch{}return tt},$$y=_export,from=arrayFrom,checkCorrectnessOfIteration$2=checkCorrectnessOfIteration$3,INCORRECT_ITERATION=!checkCorrectnessOfIteration$2(function(_e){Array.from(_e)});$$y({target:"Array",stat:!0,forced:INCORRECT_ITERATION},{from});var fails$k=fails$F,correctPrototypeGetter=!fails$k(function(){function _e(){}return _e.prototype.constructor=null,Object.getPrototypeOf(new _e)!==_e.prototype}),hasOwn$5=hasOwnProperty_1,isCallable$9=isCallable$t,toObject$7=toObject$e,sharedKey=sharedKey$4,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,IE_PROTO=sharedKey("IE_PROTO"),$Object=Object,ObjectPrototype$1=$Object.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?$Object.getPrototypeOf:function(_e){var et=toObject$7(_e);if(hasOwn$5(et,IE_PROTO))return et[IE_PROTO];var tt=et.constructor;return isCallable$9(tt)&&et instanceof tt?tt.prototype:et instanceof $Object?ObjectPrototype$1:null},fails$j=fails$F,isCallable$8=isCallable$t,isObject$g=isObject$u,getPrototypeOf$2=objectGetPrototypeOf,defineBuiltIn$7=defineBuiltIn$f,wellKnownSymbol$c=wellKnownSymbol$t,ITERATOR$4=wellKnownSymbol$c("iterator"),BUGGY_SAFARI_ITERATORS$1=!1,IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator;[].keys&&(arrayIterator=[].keys(),"next"in arrayIterator?(PrototypeOfArrayIteratorPrototype=getPrototypeOf$2(getPrototypeOf$2(arrayIterator)),PrototypeOfArrayIteratorPrototype!==Object.prototype&&(IteratorPrototype$2=PrototypeOfArrayIteratorPrototype)):BUGGY_SAFARI_ITERATORS$1=!0);var NEW_ITERATOR_PROTOTYPE=!isObject$g(IteratorPrototype$2)||fails$j(function(){var _e={};return IteratorPrototype$2[ITERATOR$4].call(_e)!==_e});NEW_ITERATOR_PROTOTYPE&&(IteratorPrototype$2={});isCallable$8(IteratorPrototype$2[ITERATOR$4])||defineBuiltIn$7(IteratorPrototype$2,ITERATOR$4,function(){return this});var iteratorsCore={IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1},IteratorPrototype$1=iteratorsCore.IteratorPrototype,create$4=objectCreate,createPropertyDescriptor$2=createPropertyDescriptor$7,setToStringTag$5=setToStringTag$7,Iterators$2=iterators,returnThis$1=function(){return this},iteratorCreateConstructor=function(_e,et,tt,nt){var rt=et+" Iterator";return _e.prototype=create$4(IteratorPrototype$1,{next:createPropertyDescriptor$2(+!nt,tt)}),setToStringTag$5(_e,rt,!1),Iterators$2[rt]=returnThis$1,_e},$$x=_export,call$9=functionCall,FunctionName=functionName,isCallable$7=isCallable$t,createIteratorConstructor$2=iteratorCreateConstructor,getPrototypeOf$1=objectGetPrototypeOf,setPrototypeOf$2=objectSetPrototypeOf,setToStringTag$4=setToStringTag$7,createNonEnumerableProperty$5=createNonEnumerableProperty$a,defineBuiltIn$6=defineBuiltIn$f,wellKnownSymbol$b=wellKnownSymbol$t,Iterators$1=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME$1=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,IteratorPrototype=IteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$3=wellKnownSymbol$b("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},iteratorDefine=function(_e,et,tt,nt,rt,at,it){createIteratorConstructor$2(tt,et,nt);var ot=function(yt){if(yt===rt&&ft)return ft;if(!BUGGY_SAFARI_ITERATORS&&yt&&yt in ut)return ut[yt];switch(yt){case KEYS:return function(){return new tt(this,yt)};case VALUES:return function(){return new tt(this,yt)};case ENTRIES:return function(){return new tt(this,yt)}}return function(){return new tt(this)}},st=et+" Iterator",ct=!1,ut=_e.prototype,dt=ut[ITERATOR$3]||ut["@@iterator"]||rt&&ut[rt],ft=!BUGGY_SAFARI_ITERATORS&&dt||ot(rt),pt=et==="Array"&&ut.entries||dt,mt,ht,Et;if(pt&&(mt=getPrototypeOf$1(pt.call(new _e)),mt!==Object.prototype&&mt.next&&(getPrototypeOf$1(mt)!==IteratorPrototype&&(setPrototypeOf$2?setPrototypeOf$2(mt,IteratorPrototype):isCallable$7(mt[ITERATOR$3])||defineBuiltIn$6(mt,ITERATOR$3,returnThis)),setToStringTag$4(mt,st,!0))),PROPER_FUNCTION_NAME$1&&rt===VALUES&&dt&&dt.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME?createNonEnumerableProperty$5(ut,"name",VALUES):(ct=!0,ft=function(){return call$9(dt,this)})),rt)if(ht={values:ot(VALUES),keys:at?ft:ot(KEYS),entries:ot(ENTRIES)},it)for(Et in ht)(BUGGY_SAFARI_ITERATORS||ct||!(Et in ut))&&defineBuiltIn$6(ut,Et,ht[Et]);else $$x({target:et,proto:!0,forced:BUGGY_SAFARI_ITERATORS||ct},ht);return ut[ITERATOR$3]!==ft&&defineBuiltIn$6(ut,ITERATOR$3,ft,{name:rt}),Iterators$1[et]=ft,ht},createIterResultObject$4=function(_e,et){return{value:_e,done:et}},charAt$2=stringMultibyte.charAt,toString$e=toString$t,InternalStateModule$5=internalState,defineIterator$2=iteratorDefine,createIterResultObject$3=createIterResultObject$4,STRING_ITERATOR="String Iterator",setInternalState$5=InternalStateModule$5.set,getInternalState$2=InternalStateModule$5.getterFor(STRING_ITERATOR);defineIterator$2(String,"String",function(_e){setInternalState$5(this,{type:STRING_ITERATOR,string:toString$e(_e),index:0})},function(){var et=getInternalState$2(this),tt=et.string,nt=et.index,rt;return nt>=tt.length?createIterResultObject$3(void 0,!0):(rt=charAt$2(tt,nt),et.index+=rt.length,createIterResultObject$3(rt,!1))});var fails$i=fails$F,arrayMethodIsStrict$4=function(_e,et){var tt=[][_e];return!!tt&&fails$i(function(){tt.call(null,et||function(){return 1},1)})},$$w=_export,uncurryThis$c=functionUncurryThisClause,$indexOf=arrayIncludes.indexOf,arrayMethodIsStrict$3=arrayMethodIsStrict$4,nativeIndexOf=uncurryThis$c([].indexOf),NEGATIVE_ZERO=!!nativeIndexOf&&1/nativeIndexOf([1],1,-0)<0,FORCED$7=NEGATIVE_ZERO||!arrayMethodIsStrict$3("indexOf");$$w({target:"Array",proto:!0,forced:FORCED$7},{indexOf:function(et){var tt=arguments.length>1?arguments[1]:void 0;return NEGATIVE_ZERO?nativeIndexOf(this,et,tt)||0:$indexOf(this,et,tt)}});var fails$h=fails$F,wellKnownSymbol$a=wellKnownSymbol$t,V8_VERSION$2=engineV8Version,SPECIES$3=wellKnownSymbol$a("species"),arrayMethodHasSpeciesSupport$4=function(_e){return V8_VERSION$2>=51||!fails$h(function(){var et=[],tt=et.constructor={};return tt[SPECIES$3]=function(){return{foo:1}},et[_e](Boolean).foo!==1})},$$v=_export,$map=arrayIteration.map,arrayMethodHasSpeciesSupport$3=arrayMethodHasSpeciesSupport$4,HAS_SPECIES_SUPPORT$2=arrayMethodHasSpeciesSupport$3("map");$$v({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$2},{map:function(et){return $map(this,et,arguments.length>1?arguments[1]:void 0)}});const sides=["top","right","bottom","left"],alignments$1=["start","end"],placements=sides.reduce((_e,et)=>_e.concat(et,et+"-"+alignments$1[0],et+"-"+alignments$1[1]),[]),min$3=Math.min,max$2=Math.max,round=Math.round,floor$2=Math.floor,createCoords=_e=>({x:_e,y:_e}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp(_e,et,tt){return max$2(_e,min$3(et,tt))}function evaluate(_e,et){return typeof _e=="function"?_e(et):_e}function getSide(_e){return _e.split("-")[0]}function getAlignment(_e){return _e.split("-")[1]}function getOppositeAxis(_e){return _e==="x"?"y":"x"}function getAxisLength(_e){return _e==="y"?"height":"width"}function getSideAxis(_e){return["top","bottom"].includes(getSide(_e))?"y":"x"}function getAlignmentAxis(_e){return getOppositeAxis(getSideAxis(_e))}function getAlignmentSides(_e,et,tt){tt===void 0&&(tt=!1);const nt=getAlignment(_e),rt=getAlignmentAxis(_e),at=getAxisLength(rt);let it=rt==="x"?nt===(tt?"end":"start")?"right":"left":nt==="start"?"bottom":"top";return et.reference[at]>et.floating[at]&&(it=getOppositePlacement(it)),[it,getOppositePlacement(it)]}function getExpandedPlacements(_e){const et=getOppositePlacement(_e);return[getOppositeAlignmentPlacement(_e),et,getOppositeAlignmentPlacement(et)]}function getOppositeAlignmentPlacement(_e){return _e.replace(/start|end/g,et=>oppositeAlignmentMap[et])}function getSideList(_e,et,tt){const nt=["left","right"],rt=["right","left"],at=["top","bottom"],it=["bottom","top"];switch(_e){case"top":case"bottom":return tt?et?rt:nt:et?nt:rt;case"left":case"right":return et?at:it;default:return[]}}function getOppositeAxisPlacements(_e,et,tt,nt){const rt=getAlignment(_e);let at=getSideList(getSide(_e),tt==="start",nt);return rt&&(at=at.map(it=>it+"-"+rt),et&&(at=at.concat(at.map(getOppositeAlignmentPlacement)))),at}function getOppositePlacement(_e){return _e.replace(/left|right|bottom|top/g,et=>oppositeSideMap[et])}function expandPaddingObject(_e){return{top:0,right:0,bottom:0,left:0,..._e}}function getPaddingObject(_e){return typeof _e!="number"?expandPaddingObject(_e):{top:_e,right:_e,bottom:_e,left:_e}}function rectToClientRect(_e){return{..._e,top:_e.y,left:_e.x,right:_e.x+_e.width,bottom:_e.y+_e.height}}function computeCoordsFromPlacement(_e,et,tt){let{reference:nt,floating:rt}=_e;const at=getSideAxis(et),it=getAlignmentAxis(et),ot=getAxisLength(it),st=getSide(et),ct=at==="y",ut=nt.x+nt.width/2-rt.width/2,dt=nt.y+nt.height/2-rt.height/2,ft=nt[ot]/2-rt[ot]/2;let pt;switch(st){case"top":pt={x:ut,y:nt.y-rt.height};break;case"bottom":pt={x:ut,y:nt.y+nt.height};break;case"right":pt={x:nt.x+nt.width,y:dt};break;case"left":pt={x:nt.x-rt.width,y:dt};break;default:pt={x:nt.x,y:nt.y}}switch(getAlignment(et)){case"start":pt[it]-=ft*(tt&&ct?-1:1);break;case"end":pt[it]+=ft*(tt&&ct?-1:1);break}return pt}const computePosition$1=async(_e,et,tt)=>{const{placement:nt="bottom",strategy:rt="absolute",middleware:at=[],platform:it}=tt,ot=at.filter(Boolean),st=await(it.isRTL==null?void 0:it.isRTL(et));let ct=await it.getElementRects({reference:_e,floating:et,strategy:rt}),{x:ut,y:dt}=computeCoordsFromPlacement(ct,nt,st),ft=nt,pt={},mt=0;for(let ht=0;ht({name:"arrow",options:_e,async fn(et){const{x:tt,y:nt,placement:rt,rects:at,platform:it,elements:ot,middlewareData:st}=et,{element:ct,padding:ut=0}=evaluate(_e,et)||{};if(ct==null)return{};const dt=getPaddingObject(ut),ft={x:tt,y:nt},pt=getAlignmentAxis(rt),mt=getAxisLength(pt),ht=await it.getDimensions(ct),Et=pt==="y",yt=Et?"top":"left",vt=Et?"bottom":"right",gt=Et?"clientHeight":"clientWidth",St=at.reference[mt]+at.reference[pt]-ft[pt]-at.floating[mt],Rt=ft[pt]-at.reference[pt],$t=await(it.getOffsetParent==null?void 0:it.getOffsetParent(ct));let bt=$t?$t[gt]:0;(!bt||!await(it.isElement==null?void 0:it.isElement($t)))&&(bt=ot.floating[gt]||at.floating[mt]);const wt=St/2-Rt/2,xt=bt/2-ht[mt]/2-1,Tt=min$3(dt[yt],xt),Ct=min$3(dt[vt],xt),Nt=Tt,At=bt-ht[mt]-Ct,kt=bt/2-ht[mt]/2+wt,Pt=clamp(Nt,kt,At),Ft=!st.arrow&&getAlignment(rt)!=null&&kt!=Pt&&at.reference[mt]/2-(ktgetAlignment(rt)===_e),...tt.filter(rt=>getAlignment(rt)!==_e)]:tt.filter(rt=>getSide(rt)===rt)).filter(rt=>_e?getAlignment(rt)===_e||(et?getOppositeAlignmentPlacement(rt)!==rt:!1):!0)}const autoPlacement=function(_e){return _e===void 0&&(_e={}),{name:"autoPlacement",options:_e,async fn(et){var tt,nt,rt;const{rects:at,middlewareData:it,placement:ot,platform:st,elements:ct}=et,{crossAxis:ut=!1,alignment:dt,allowedPlacements:ft=placements,autoAlignment:pt=!0,...mt}=evaluate(_e,et),ht=dt!==void 0||ft===placements?getPlacementList(dt||null,pt,ft):ft,Et=await detectOverflow(et,mt),yt=((tt=it.autoPlacement)==null?void 0:tt.index)||0,vt=ht[yt];if(vt==null)return{};const gt=getAlignmentSides(vt,at,await(st.isRTL==null?void 0:st.isRTL(ct.floating)));if(ot!==vt)return{reset:{placement:ht[0]}};const St=[Et[getSide(vt)],Et[gt[0]],Et[gt[1]]],Rt=[...((nt=it.autoPlacement)==null?void 0:nt.overflows)||[],{placement:vt,overflows:St}],$t=ht[yt+1];if($t)return{data:{index:yt+1,overflows:Rt},reset:{placement:$t}};const bt=Rt.map(Tt=>{const Ct=getAlignment(Tt.placement);return[Tt.placement,Ct&&ut?Tt.overflows.slice(0,2).reduce((Nt,At)=>Nt+At,0):Tt.overflows[0],Tt.overflows]}).sort((Tt,Ct)=>Tt[1]-Ct[1]),xt=((rt=bt.filter(Tt=>Tt[2].slice(0,getAlignment(Tt[0])?2:3).every(Ct=>Ct<=0))[0])==null?void 0:rt[0])||bt[0][0];return xt!==ot?{data:{index:yt+1,overflows:Rt},reset:{placement:xt}}:{}}}},flip=function(_e){return _e===void 0&&(_e={}),{name:"flip",options:_e,async fn(et){var tt,nt;const{placement:rt,middlewareData:at,rects:it,initialPlacement:ot,platform:st,elements:ct}=et,{mainAxis:ut=!0,crossAxis:dt=!0,fallbackPlacements:ft,fallbackStrategy:pt="bestFit",fallbackAxisSideDirection:mt="none",flipAlignment:ht=!0,...Et}=evaluate(_e,et);if((tt=at.arrow)!=null&&tt.alignmentOffset)return{};const yt=getSide(rt),vt=getSide(ot)===ot,gt=await(st.isRTL==null?void 0:st.isRTL(ct.floating)),St=ft||(vt||!ht?[getOppositePlacement(ot)]:getExpandedPlacements(ot));!ft&&mt!=="none"&&St.push(...getOppositeAxisPlacements(ot,ht,mt,gt));const Rt=[ot,...St],$t=await detectOverflow(et,Et),bt=[];let wt=((nt=at.flip)==null?void 0:nt.overflows)||[];if(ut&&bt.push($t[yt]),dt){const Nt=getAlignmentSides(rt,it,gt);bt.push($t[Nt[0]],$t[Nt[1]])}if(wt=[...wt,{placement:rt,overflows:bt}],!bt.every(Nt=>Nt<=0)){var xt,Tt;const Nt=(((xt=at.flip)==null?void 0:xt.index)||0)+1,At=Rt[Nt];if(At)return{data:{index:Nt,overflows:wt},reset:{placement:At}};let kt=(Tt=wt.filter(Pt=>Pt.overflows[0]<=0).sort((Pt,Ft)=>Pt.overflows[1]-Ft.overflows[1])[0])==null?void 0:Tt.placement;if(!kt)switch(pt){case"bestFit":{var Ct;const Pt=(Ct=wt.map(Ft=>[Ft.placement,Ft.overflows.filter(Dt=>Dt>0).reduce((Dt,Lt)=>Dt+Lt,0)]).sort((Ft,Dt)=>Ft[1]-Dt[1])[0])==null?void 0:Ct[0];Pt&&(kt=Pt);break}case"initialPlacement":kt=ot;break}if(rt!==kt)return{reset:{placement:kt}}}return{}}}};async function convertValueToCoords(_e,et){const{placement:tt,platform:nt,elements:rt}=_e,at=await(nt.isRTL==null?void 0:nt.isRTL(rt.floating)),it=getSide(tt),ot=getAlignment(tt),st=getSideAxis(tt)==="y",ct=["left","top"].includes(it)?-1:1,ut=at&&st?-1:1,dt=evaluate(et,_e);let{mainAxis:ft,crossAxis:pt,alignmentAxis:mt}=typeof dt=="number"?{mainAxis:dt,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...dt};return ot&&typeof mt=="number"&&(pt=ot==="end"?mt*-1:mt),st?{x:pt*ut,y:ft*ct}:{x:ft*ct,y:pt*ut}}const offset$1=function(_e){return _e===void 0&&(_e=0),{name:"offset",options:_e,async fn(et){const{x:tt,y:nt}=et,rt=await convertValueToCoords(et,_e);return{x:tt+rt.x,y:nt+rt.y,data:rt}}}},shift$1=function(_e){return _e===void 0&&(_e={}),{name:"shift",options:_e,async fn(et){const{x:tt,y:nt,placement:rt}=et,{mainAxis:at=!0,crossAxis:it=!1,limiter:ot={fn:Et=>{let{x:yt,y:vt}=Et;return{x:yt,y:vt}}},...st}=evaluate(_e,et),ct={x:tt,y:nt},ut=await detectOverflow(et,st),dt=getSideAxis(getSide(rt)),ft=getOppositeAxis(dt);let pt=ct[ft],mt=ct[dt];if(at){const Et=ft==="y"?"top":"left",yt=ft==="y"?"bottom":"right",vt=pt+ut[Et],gt=pt-ut[yt];pt=clamp(vt,pt,gt)}if(it){const Et=dt==="y"?"top":"left",yt=dt==="y"?"bottom":"right",vt=mt+ut[Et],gt=mt-ut[yt];mt=clamp(vt,mt,gt)}const ht=ot.fn({...et,[ft]:pt,[dt]:mt});return{...ht,data:{x:ht.x-tt,y:ht.y-nt}}}}};function getNodeName(_e){return isNode(_e)?(_e.nodeName||"").toLowerCase():"#document"}function getWindow$1(_e){var et;return(_e==null||(et=_e.ownerDocument)==null?void 0:et.defaultView)||window}function getDocumentElement(_e){var et;return(et=(isNode(_e)?_e.ownerDocument:_e.document)||window.document)==null?void 0:et.documentElement}function isNode(_e){return _e instanceof Node||_e instanceof getWindow$1(_e).Node}function isElement$1(_e){return _e instanceof Element||_e instanceof getWindow$1(_e).Element}function isHTMLElement$1(_e){return _e instanceof HTMLElement||_e instanceof getWindow$1(_e).HTMLElement}function isShadowRoot$1(_e){return typeof ShadowRoot>"u"?!1:_e instanceof ShadowRoot||_e instanceof getWindow$1(_e).ShadowRoot}function isOverflowElement(_e){const{overflow:et,overflowX:tt,overflowY:nt,display:rt}=getComputedStyle$3(_e);return/auto|scroll|overlay|hidden|clip/.test(et+nt+tt)&&!["inline","contents"].includes(rt)}function isTableElement(_e){return["table","td","th"].includes(getNodeName(_e))}function isContainingBlock(_e){const et=isWebKit(),tt=getComputedStyle$3(_e);return tt.transform!=="none"||tt.perspective!=="none"||(tt.containerType?tt.containerType!=="normal":!1)||!et&&(tt.backdropFilter?tt.backdropFilter!=="none":!1)||!et&&(tt.filter?tt.filter!=="none":!1)||["transform","perspective","filter"].some(nt=>(tt.willChange||"").includes(nt))||["paint","layout","strict","content"].some(nt=>(tt.contain||"").includes(nt))}function getContainingBlock(_e){let et=getParentNode$1(_e);for(;isHTMLElement$1(et)&&!isLastTraversableNode(et);){if(isContainingBlock(et))return et;et=getParentNode$1(et)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(_e){return["html","body","#document"].includes(getNodeName(_e))}function getComputedStyle$3(_e){return getWindow$1(_e).getComputedStyle(_e)}function getNodeScroll(_e){return isElement$1(_e)?{scrollLeft:_e.scrollLeft,scrollTop:_e.scrollTop}:{scrollLeft:_e.pageXOffset,scrollTop:_e.pageYOffset}}function getParentNode$1(_e){if(getNodeName(_e)==="html")return _e;const et=_e.assignedSlot||_e.parentNode||isShadowRoot$1(_e)&&_e.host||getDocumentElement(_e);return isShadowRoot$1(et)?et.host:et}function getNearestOverflowAncestor(_e){const et=getParentNode$1(_e);return isLastTraversableNode(et)?_e.ownerDocument?_e.ownerDocument.body:_e.body:isHTMLElement$1(et)&&isOverflowElement(et)?et:getNearestOverflowAncestor(et)}function getOverflowAncestors(_e,et,tt){var nt;et===void 0&&(et=[]),tt===void 0&&(tt=!0);const rt=getNearestOverflowAncestor(_e),at=rt===((nt=_e.ownerDocument)==null?void 0:nt.body),it=getWindow$1(rt);return at?et.concat(it,it.visualViewport||[],isOverflowElement(rt)?rt:[],it.frameElement&&tt?getOverflowAncestors(it.frameElement):[]):et.concat(rt,getOverflowAncestors(rt,[],tt))}function getCssDimensions(_e){const et=getComputedStyle$3(_e);let tt=parseFloat(et.width)||0,nt=parseFloat(et.height)||0;const rt=isHTMLElement$1(_e),at=rt?_e.offsetWidth:tt,it=rt?_e.offsetHeight:nt,ot=round(tt)!==at||round(nt)!==it;return ot&&(tt=at,nt=it),{width:tt,height:nt,$:ot}}function unwrapElement(_e){return isElement$1(_e)?_e:_e.contextElement}function getScale(_e){const et=unwrapElement(_e);if(!isHTMLElement$1(et))return createCoords(1);const tt=et.getBoundingClientRect(),{width:nt,height:rt,$:at}=getCssDimensions(et);let it=(at?round(tt.width):tt.width)/nt,ot=(at?round(tt.height):tt.height)/rt;return(!it||!Number.isFinite(it))&&(it=1),(!ot||!Number.isFinite(ot))&&(ot=1),{x:it,y:ot}}const noOffsets=createCoords(0);function getVisualOffsets(_e){const et=getWindow$1(_e);return!isWebKit()||!et.visualViewport?noOffsets:{x:et.visualViewport.offsetLeft,y:et.visualViewport.offsetTop}}function shouldAddVisualOffsets(_e,et,tt){return et===void 0&&(et=!1),!tt||et&&tt!==getWindow$1(_e)?!1:et}function getBoundingClientRect(_e,et,tt,nt){et===void 0&&(et=!1),tt===void 0&&(tt=!1);const rt=_e.getBoundingClientRect(),at=unwrapElement(_e);let it=createCoords(1);et&&(nt?isElement$1(nt)&&(it=getScale(nt)):it=getScale(_e));const ot=shouldAddVisualOffsets(at,tt,nt)?getVisualOffsets(at):createCoords(0);let st=(rt.left+ot.x)/it.x,ct=(rt.top+ot.y)/it.y,ut=rt.width/it.x,dt=rt.height/it.y;if(at){const ft=getWindow$1(at),pt=nt&&isElement$1(nt)?getWindow$1(nt):nt;let mt=ft.frameElement;for(;mt&&nt&&pt!==ft;){const ht=getScale(mt),Et=mt.getBoundingClientRect(),yt=getComputedStyle$3(mt),vt=Et.left+(mt.clientLeft+parseFloat(yt.paddingLeft))*ht.x,gt=Et.top+(mt.clientTop+parseFloat(yt.paddingTop))*ht.y;st*=ht.x,ct*=ht.y,ut*=ht.x,dt*=ht.y,st+=vt,ct+=gt,mt=getWindow$1(mt).frameElement}}return rectToClientRect({width:ut,height:dt,x:st,y:ct})}function convertOffsetParentRelativeRectToViewportRelativeRect(_e){let{rect:et,offsetParent:tt,strategy:nt}=_e;const rt=isHTMLElement$1(tt),at=getDocumentElement(tt);if(tt===at)return et;let it={scrollLeft:0,scrollTop:0},ot=createCoords(1);const st=createCoords(0);if((rt||!rt&&nt!=="fixed")&&((getNodeName(tt)!=="body"||isOverflowElement(at))&&(it=getNodeScroll(tt)),isHTMLElement$1(tt))){const ct=getBoundingClientRect(tt);ot=getScale(tt),st.x=ct.x+tt.clientLeft,st.y=ct.y+tt.clientTop}return{width:et.width*ot.x,height:et.height*ot.y,x:et.x*ot.x-it.scrollLeft*ot.x+st.x,y:et.y*ot.y-it.scrollTop*ot.y+st.y}}function getClientRects(_e){return Array.from(_e.getClientRects())}function getWindowScrollBarX(_e){return getBoundingClientRect(getDocumentElement(_e)).left+getNodeScroll(_e).scrollLeft}function getDocumentRect(_e){const et=getDocumentElement(_e),tt=getNodeScroll(_e),nt=_e.ownerDocument.body,rt=max$2(et.scrollWidth,et.clientWidth,nt.scrollWidth,nt.clientWidth),at=max$2(et.scrollHeight,et.clientHeight,nt.scrollHeight,nt.clientHeight);let it=-tt.scrollLeft+getWindowScrollBarX(_e);const ot=-tt.scrollTop;return getComputedStyle$3(nt).direction==="rtl"&&(it+=max$2(et.clientWidth,nt.clientWidth)-rt),{width:rt,height:at,x:it,y:ot}}function getViewportRect(_e,et){const tt=getWindow$1(_e),nt=getDocumentElement(_e),rt=tt.visualViewport;let at=nt.clientWidth,it=nt.clientHeight,ot=0,st=0;if(rt){at=rt.width,it=rt.height;const ct=isWebKit();(!ct||ct&&et==="fixed")&&(ot=rt.offsetLeft,st=rt.offsetTop)}return{width:at,height:it,x:ot,y:st}}function getInnerBoundingClientRect(_e,et){const tt=getBoundingClientRect(_e,!0,et==="fixed"),nt=tt.top+_e.clientTop,rt=tt.left+_e.clientLeft,at=isHTMLElement$1(_e)?getScale(_e):createCoords(1),it=_e.clientWidth*at.x,ot=_e.clientHeight*at.y,st=rt*at.x,ct=nt*at.y;return{width:it,height:ot,x:st,y:ct}}function getClientRectFromClippingAncestor(_e,et,tt){let nt;if(et==="viewport")nt=getViewportRect(_e,tt);else if(et==="document")nt=getDocumentRect(getDocumentElement(_e));else if(isElement$1(et))nt=getInnerBoundingClientRect(et,tt);else{const rt=getVisualOffsets(_e);nt={...et,x:et.x-rt.x,y:et.y-rt.y}}return rectToClientRect(nt)}function hasFixedPositionAncestor(_e,et){const tt=getParentNode$1(_e);return tt===et||!isElement$1(tt)||isLastTraversableNode(tt)?!1:getComputedStyle$3(tt).position==="fixed"||hasFixedPositionAncestor(tt,et)}function getClippingElementAncestors(_e,et){const tt=et.get(_e);if(tt)return tt;let nt=getOverflowAncestors(_e,[],!1).filter(ot=>isElement$1(ot)&&getNodeName(ot)!=="body"),rt=null;const at=getComputedStyle$3(_e).position==="fixed";let it=at?getParentNode$1(_e):_e;for(;isElement$1(it)&&!isLastTraversableNode(it);){const ot=getComputedStyle$3(it),st=isContainingBlock(it);!st&&ot.position==="fixed"&&(rt=null),(at?!st&&!rt:!st&&ot.position==="static"&&!!rt&&["absolute","fixed"].includes(rt.position)||isOverflowElement(it)&&!st&&hasFixedPositionAncestor(_e,it))?nt=nt.filter(ut=>ut!==it):rt=ot,it=getParentNode$1(it)}return et.set(_e,nt),nt}function getClippingRect(_e){let{element:et,boundary:tt,rootBoundary:nt,strategy:rt}=_e;const it=[...tt==="clippingAncestors"?getClippingElementAncestors(et,this._c):[].concat(tt),nt],ot=it[0],st=it.reduce((ct,ut)=>{const dt=getClientRectFromClippingAncestor(et,ut,rt);return ct.top=max$2(dt.top,ct.top),ct.right=min$3(dt.right,ct.right),ct.bottom=min$3(dt.bottom,ct.bottom),ct.left=max$2(dt.left,ct.left),ct},getClientRectFromClippingAncestor(et,ot,rt));return{width:st.right-st.left,height:st.bottom-st.top,x:st.left,y:st.top}}function getDimensions$1(_e){return getCssDimensions(_e)}function getRectRelativeToOffsetParent(_e,et,tt){const nt=isHTMLElement$1(et),rt=getDocumentElement(et),at=tt==="fixed",it=getBoundingClientRect(_e,!0,at,et);let ot={scrollLeft:0,scrollTop:0};const st=createCoords(0);if(nt||!nt&&!at)if((getNodeName(et)!=="body"||isOverflowElement(rt))&&(ot=getNodeScroll(et)),nt){const ct=getBoundingClientRect(et,!0,at,et);st.x=ct.x+et.clientLeft,st.y=ct.y+et.clientTop}else rt&&(st.x=getWindowScrollBarX(rt));return{x:it.left+ot.scrollLeft-st.x,y:it.top+ot.scrollTop-st.y,width:it.width,height:it.height}}function getTrueOffsetParent(_e,et){return!isHTMLElement$1(_e)||getComputedStyle$3(_e).position==="fixed"?null:et?et(_e):_e.offsetParent}function getOffsetParent(_e,et){const tt=getWindow$1(_e);if(!isHTMLElement$1(_e))return tt;let nt=getTrueOffsetParent(_e,et);for(;nt&&isTableElement(nt)&&getComputedStyle$3(nt).position==="static";)nt=getTrueOffsetParent(nt,et);return nt&&(getNodeName(nt)==="html"||getNodeName(nt)==="body"&&getComputedStyle$3(nt).position==="static"&&!isContainingBlock(nt))?tt:nt||getContainingBlock(_e)||tt}const getElementRects=async function(_e){let{reference:et,floating:tt,strategy:nt}=_e;const rt=this.getOffsetParent||getOffsetParent,at=this.getDimensions;return{reference:getRectRelativeToOffsetParent(et,await rt(tt),nt),floating:{x:0,y:0,...await at(tt)}}};function isRTL(_e){return getComputedStyle$3(_e).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions:getDimensions$1,getScale,isElement:isElement$1,isRTL};function observeMove(_e,et){let tt=null,nt;const rt=getDocumentElement(_e);function at(){clearTimeout(nt),tt&&tt.disconnect(),tt=null}function it(ot,st){ot===void 0&&(ot=!1),st===void 0&&(st=1),at();const{left:ct,top:ut,width:dt,height:ft}=_e.getBoundingClientRect();if(ot||et(),!dt||!ft)return;const pt=floor$2(ut),mt=floor$2(rt.clientWidth-(ct+dt)),ht=floor$2(rt.clientHeight-(ut+ft)),Et=floor$2(ct),vt={rootMargin:-pt+"px "+-mt+"px "+-ht+"px "+-Et+"px",threshold:max$2(0,min$3(1,st))||1};let gt=!0;function St(Rt){const $t=Rt[0].intersectionRatio;if($t!==st){if(!gt)return it();$t?it(!1,$t):nt=setTimeout(()=>{it(!1,1e-7)},100)}gt=!1}try{tt=new IntersectionObserver(St,{...vt,root:rt.ownerDocument})}catch{tt=new IntersectionObserver(St,vt)}tt.observe(_e)}return it(!0),at}function autoUpdate(_e,et,tt,nt){nt===void 0&&(nt={});const{ancestorScroll:rt=!0,ancestorResize:at=!0,elementResize:it=typeof ResizeObserver=="function",layoutShift:ot=typeof IntersectionObserver=="function",animationFrame:st=!1}=nt,ct=unwrapElement(_e),ut=rt||at?[...ct?getOverflowAncestors(ct):[],...getOverflowAncestors(et)]:[];ut.forEach(yt=>{rt&&yt.addEventListener("scroll",tt,{passive:!0}),at&&yt.addEventListener("resize",tt)});const dt=ct&&ot?observeMove(ct,tt):null;let ft=-1,pt=null;it&&(pt=new ResizeObserver(yt=>{let[vt]=yt;vt&&vt.target===ct&&pt&&(pt.unobserve(et),cancelAnimationFrame(ft),ft=requestAnimationFrame(()=>{pt&&pt.observe(et)})),tt()}),ct&&!st&&pt.observe(ct),pt.observe(et));let mt,ht=st?getBoundingClientRect(_e):null;st&&Et();function Et(){const yt=getBoundingClientRect(_e);ht&&(yt.x!==ht.x||yt.y!==ht.y||yt.width!==ht.width||yt.height!==ht.height)&&tt(),ht=yt,mt=requestAnimationFrame(Et)}return tt(),()=>{ut.forEach(yt=>{rt&&yt.removeEventListener("scroll",tt),at&&yt.removeEventListener("resize",tt)}),dt&&dt(),pt&&pt.disconnect(),pt=null,st&&cancelAnimationFrame(mt)}}const computePosition=(_e,et,tt)=>{const nt=new Map,rt={platform,...tt},at={...rt.platform,_c:nt};return computePosition$1(_e,et,{...rt,platform:at})},arrow=_e=>{function et(tt){return{}.hasOwnProperty.call(tt,"current")}return{name:"arrow",options:_e,fn(tt){const{element:nt,padding:rt}=typeof _e=="function"?_e(tt):_e;return nt&&et(nt)?nt.current!=null?arrow$1({element:nt.current,padding:rt}).fn(tt):{}:nt?arrow$1({element:nt,padding:rt}).fn(tt):{}}}};var index$4=typeof document<"u"?reactExports.useLayoutEffect:reactExports.useEffect;function deepEqual(_e,et){if(_e===et)return!0;if(typeof _e!=typeof et)return!1;if(typeof _e=="function"&&_e.toString()===et.toString())return!0;let tt,nt,rt;if(_e&&et&&typeof _e=="object"){if(Array.isArray(_e)){if(tt=_e.length,tt!=et.length)return!1;for(nt=tt;nt--!==0;)if(!deepEqual(_e[nt],et[nt]))return!1;return!0}if(rt=Object.keys(_e),tt=rt.length,tt!==Object.keys(et).length)return!1;for(nt=tt;nt--!==0;)if(!{}.hasOwnProperty.call(et,rt[nt]))return!1;for(nt=tt;nt--!==0;){const at=rt[nt];if(!(at==="_owner"&&_e.$$typeof)&&!deepEqual(_e[at],et[at]))return!1}return!0}return _e!==_e&&et!==et}function getDPR(_e){return typeof window>"u"?1:(_e.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(_e,et){const tt=getDPR(_e);return Math.round(et*tt)/tt}function useLatestRef$1(_e){const et=reactExports.useRef(_e);return index$4(()=>{et.current=_e}),et}function useFloating$1(_e){_e===void 0&&(_e={});const{placement:et="bottom",strategy:tt="absolute",middleware:nt=[],platform:rt,elements:{reference:at,floating:it}={},transform:ot=!0,whileElementsMounted:st,open:ct}=_e,[ut,dt]=reactExports.useState({x:0,y:0,strategy:tt,placement:et,middlewareData:{},isPositioned:!1}),[ft,pt]=reactExports.useState(nt);deepEqual(ft,nt)||pt(nt);const[mt,ht]=reactExports.useState(null),[Et,yt]=reactExports.useState(null),vt=reactExports.useCallback(Ft=>{Ft!=$t.current&&($t.current=Ft,ht(Ft))},[ht]),gt=reactExports.useCallback(Ft=>{Ft!==bt.current&&(bt.current=Ft,yt(Ft))},[yt]),St=at||mt,Rt=it||Et,$t=reactExports.useRef(null),bt=reactExports.useRef(null),wt=reactExports.useRef(ut),xt=useLatestRef$1(st),Tt=useLatestRef$1(rt),Ct=reactExports.useCallback(()=>{if(!$t.current||!bt.current)return;const Ft={placement:et,strategy:tt,middleware:ft};Tt.current&&(Ft.platform=Tt.current),computePosition($t.current,bt.current,Ft).then(Dt=>{const Lt={...Dt,isPositioned:!0};Nt.current&&!deepEqual(wt.current,Lt)&&(wt.current=Lt,reactDomExports.flushSync(()=>{dt(Lt)}))})},[ft,et,tt,Tt]);index$4(()=>{ct===!1&&wt.current.isPositioned&&(wt.current.isPositioned=!1,dt(Ft=>({...Ft,isPositioned:!1})))},[ct]);const Nt=reactExports.useRef(!1);index$4(()=>(Nt.current=!0,()=>{Nt.current=!1}),[]),index$4(()=>{if(St&&($t.current=St),Rt&&(bt.current=Rt),St&&Rt){if(xt.current)return xt.current(St,Rt,Ct);Ct()}},[St,Rt,Ct,xt]);const At=reactExports.useMemo(()=>({reference:$t,floating:bt,setReference:vt,setFloating:gt}),[vt,gt]),kt=reactExports.useMemo(()=>({reference:St,floating:Rt}),[St,Rt]),Pt=reactExports.useMemo(()=>{const Ft={position:tt,left:0,top:0};if(!kt.floating)return Ft;const Dt=roundByDPR(kt.floating,ut.x),Lt=roundByDPR(kt.floating,ut.y);return ot?{...Ft,transform:"translate("+Dt+"px, "+Lt+"px)",...getDPR(kt.floating)>=1.5&&{willChange:"transform"}}:{position:tt,left:Dt,top:Lt}},[tt,ot,kt.floating,ut.x,ut.y]);return reactExports.useMemo(()=>({...ut,update:Ct,refs:At,elements:kt,floatingStyles:Pt}),[ut,Ct,At,kt,Pt])}/*! +`;var _t=n$1;const vitePluginRequire_1697864653845_56554064="/packs/assets/chevron-down-7f74ef2a.svg",vitePluginRequire_1697864675597_425505="/packs/assets/chevron-up-c8b6d9f0.svg",vitePluginRequire_1697864655029_75763737="/packs/assets/dots-7567a32a.svg";function _objectWithoutProperties(_e,et){if(_e==null)return{};var tt=_objectWithoutPropertiesLoose(_e,et),nt,rt;if(Object.getOwnPropertySymbols){var at=Object.getOwnPropertySymbols(_e);for(rt=0;rt=0)&&Object.prototype.propertyIsEnumerable.call(_e,nt)&&(tt[nt]=_e[nt])}return tt}var DESCRIPTORS$a=descriptors$1,isArray$8=isArray$b,$TypeError$b=TypeError,getOwnPropertyDescriptor$4=Object.getOwnPropertyDescriptor,SILENT_ON_NON_WRITABLE_LENGTH_SET=DESCRIPTORS$a&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(_e){return _e instanceof TypeError}}(),arraySetLength=SILENT_ON_NON_WRITABLE_LENGTH_SET?function(_e,et){if(isArray$8(_e)&&!getOwnPropertyDescriptor$4(_e,"length").writable)throw $TypeError$b("Cannot set read only .length");return _e.length=et}:function(_e,et){return _e.length=et},$TypeError$a=TypeError,MAX_SAFE_INTEGER$2=9007199254740991,doesNotExceedSafeInteger$2=function(_e){if(_e>MAX_SAFE_INTEGER$2)throw $TypeError$a("Maximum allowed index exceeded");return _e},$$z=_export,toObject$9=toObject$e,lengthOfArrayLike$7=lengthOfArrayLike$b,setArrayLength=arraySetLength,doesNotExceedSafeInteger$1=doesNotExceedSafeInteger$2,fails$l=fails$F,INCORRECT_TO_LENGTH=fails$l(function(){return[].push.call({length:4294967296},1)!==4294967297}),properErrorOnNonWritableLength=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(_e){return _e instanceof TypeError}},FORCED$8=INCORRECT_TO_LENGTH||!properErrorOnNonWritableLength();$$z({target:"Array",proto:!0,arity:1,forced:FORCED$8},{push:function(et){var tt=toObject$9(this),nt=lengthOfArrayLike$7(tt),rt=arguments.length;doesNotExceedSafeInteger$1(nt+rt);for(var at=0;at1?arguments[1]:void 0,it=at!==void 0;it&&(at=bind$7(at,rt>2?arguments[2]:void 0));var ot=getIteratorMethod$2(tt),st=0,ct,ut,dt,ft,pt,mt;if(ot&&!(this===$Array$1&&isArrayIteratorMethod$1(ot)))for(ft=getIterator$2(tt,ot),pt=ft.next,ut=nt?new this:[];!(dt=call$a(pt,ft)).done;st++)mt=it?callWithSafeIterationClosing(ft,at,[dt.value,st],!0):dt.value,createProperty$4(ut,st,mt);else for(ct=lengthOfArrayLike$6(tt),ut=nt?new this(ct):$Array$1(ct);ct>st;st++)mt=it?at(tt[st],st):tt[st],createProperty$4(ut,st,mt);return ut.length=st,ut},wellKnownSymbol$d=wellKnownSymbol$t,ITERATOR$5=wellKnownSymbol$d("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR$5]=function(){return this},Array.from(iteratorWithReturn,function(){throw 2})}catch{}var checkCorrectnessOfIteration$3=function(_e,et){try{if(!et&&!SAFE_CLOSING)return!1}catch{return!1}var tt=!1;try{var nt={};nt[ITERATOR$5]=function(){return{next:function(){return{done:tt=!0}}}},_e(nt)}catch{}return tt},$$y=_export,from=arrayFrom,checkCorrectnessOfIteration$2=checkCorrectnessOfIteration$3,INCORRECT_ITERATION=!checkCorrectnessOfIteration$2(function(_e){Array.from(_e)});$$y({target:"Array",stat:!0,forced:INCORRECT_ITERATION},{from});var fails$k=fails$F,correctPrototypeGetter=!fails$k(function(){function _e(){}return _e.prototype.constructor=null,Object.getPrototypeOf(new _e)!==_e.prototype}),hasOwn$5=hasOwnProperty_1,isCallable$9=isCallable$t,toObject$7=toObject$e,sharedKey=sharedKey$4,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,IE_PROTO=sharedKey("IE_PROTO"),$Object=Object,ObjectPrototype$1=$Object.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?$Object.getPrototypeOf:function(_e){var et=toObject$7(_e);if(hasOwn$5(et,IE_PROTO))return et[IE_PROTO];var tt=et.constructor;return isCallable$9(tt)&&et instanceof tt?tt.prototype:et instanceof $Object?ObjectPrototype$1:null},fails$j=fails$F,isCallable$8=isCallable$t,isObject$g=isObject$u,getPrototypeOf$2=objectGetPrototypeOf,defineBuiltIn$7=defineBuiltIn$f,wellKnownSymbol$c=wellKnownSymbol$t,ITERATOR$4=wellKnownSymbol$c("iterator"),BUGGY_SAFARI_ITERATORS$1=!1,IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator;[].keys&&(arrayIterator=[].keys(),"next"in arrayIterator?(PrototypeOfArrayIteratorPrototype=getPrototypeOf$2(getPrototypeOf$2(arrayIterator)),PrototypeOfArrayIteratorPrototype!==Object.prototype&&(IteratorPrototype$2=PrototypeOfArrayIteratorPrototype)):BUGGY_SAFARI_ITERATORS$1=!0);var NEW_ITERATOR_PROTOTYPE=!isObject$g(IteratorPrototype$2)||fails$j(function(){var _e={};return IteratorPrototype$2[ITERATOR$4].call(_e)!==_e});NEW_ITERATOR_PROTOTYPE&&(IteratorPrototype$2={});isCallable$8(IteratorPrototype$2[ITERATOR$4])||defineBuiltIn$7(IteratorPrototype$2,ITERATOR$4,function(){return this});var iteratorsCore={IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1},IteratorPrototype$1=iteratorsCore.IteratorPrototype,create$4=objectCreate,createPropertyDescriptor$2=createPropertyDescriptor$7,setToStringTag$5=setToStringTag$7,Iterators$2=iterators,returnThis$1=function(){return this},iteratorCreateConstructor=function(_e,et,tt,nt){var rt=et+" Iterator";return _e.prototype=create$4(IteratorPrototype$1,{next:createPropertyDescriptor$2(+!nt,tt)}),setToStringTag$5(_e,rt,!1),Iterators$2[rt]=returnThis$1,_e},$$x=_export,call$9=functionCall,FunctionName=functionName,isCallable$7=isCallable$t,createIteratorConstructor$2=iteratorCreateConstructor,getPrototypeOf$1=objectGetPrototypeOf,setPrototypeOf$2=objectSetPrototypeOf,setToStringTag$4=setToStringTag$7,createNonEnumerableProperty$5=createNonEnumerableProperty$a,defineBuiltIn$6=defineBuiltIn$f,wellKnownSymbol$b=wellKnownSymbol$t,Iterators$1=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME$1=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,IteratorPrototype=IteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$3=wellKnownSymbol$b("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},iteratorDefine=function(_e,et,tt,nt,rt,at,it){createIteratorConstructor$2(tt,et,nt);var ot=function(yt){if(yt===rt&&ft)return ft;if(!BUGGY_SAFARI_ITERATORS&&yt&&yt in ut)return ut[yt];switch(yt){case KEYS:return function(){return new tt(this,yt)};case VALUES:return function(){return new tt(this,yt)};case ENTRIES:return function(){return new tt(this,yt)}}return function(){return new tt(this)}},st=et+" Iterator",ct=!1,ut=_e.prototype,dt=ut[ITERATOR$3]||ut["@@iterator"]||rt&&ut[rt],ft=!BUGGY_SAFARI_ITERATORS&&dt||ot(rt),pt=et==="Array"&&ut.entries||dt,mt,ht,Et;if(pt&&(mt=getPrototypeOf$1(pt.call(new _e)),mt!==Object.prototype&&mt.next&&(getPrototypeOf$1(mt)!==IteratorPrototype&&(setPrototypeOf$2?setPrototypeOf$2(mt,IteratorPrototype):isCallable$7(mt[ITERATOR$3])||defineBuiltIn$6(mt,ITERATOR$3,returnThis)),setToStringTag$4(mt,st,!0))),PROPER_FUNCTION_NAME$1&&rt===VALUES&&dt&&dt.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME?createNonEnumerableProperty$5(ut,"name",VALUES):(ct=!0,ft=function(){return call$9(dt,this)})),rt)if(ht={values:ot(VALUES),keys:at?ft:ot(KEYS),entries:ot(ENTRIES)},it)for(Et in ht)(BUGGY_SAFARI_ITERATORS||ct||!(Et in ut))&&defineBuiltIn$6(ut,Et,ht[Et]);else $$x({target:et,proto:!0,forced:BUGGY_SAFARI_ITERATORS||ct},ht);return ut[ITERATOR$3]!==ft&&defineBuiltIn$6(ut,ITERATOR$3,ft,{name:rt}),Iterators$1[et]=ft,ht},createIterResultObject$4=function(_e,et){return{value:_e,done:et}},charAt$2=stringMultibyte.charAt,toString$e=toString$t,InternalStateModule$5=internalState,defineIterator$2=iteratorDefine,createIterResultObject$3=createIterResultObject$4,STRING_ITERATOR="String Iterator",setInternalState$5=InternalStateModule$5.set,getInternalState$2=InternalStateModule$5.getterFor(STRING_ITERATOR);defineIterator$2(String,"String",function(_e){setInternalState$5(this,{type:STRING_ITERATOR,string:toString$e(_e),index:0})},function(){var et=getInternalState$2(this),tt=et.string,nt=et.index,rt;return nt>=tt.length?createIterResultObject$3(void 0,!0):(rt=charAt$2(tt,nt),et.index+=rt.length,createIterResultObject$3(rt,!1))});var fails$i=fails$F,arrayMethodIsStrict$4=function(_e,et){var tt=[][_e];return!!tt&&fails$i(function(){tt.call(null,et||function(){return 1},1)})},$$w=_export,uncurryThis$c=functionUncurryThisClause,$indexOf=arrayIncludes.indexOf,arrayMethodIsStrict$3=arrayMethodIsStrict$4,nativeIndexOf=uncurryThis$c([].indexOf),NEGATIVE_ZERO=!!nativeIndexOf&&1/nativeIndexOf([1],1,-0)<0,FORCED$7=NEGATIVE_ZERO||!arrayMethodIsStrict$3("indexOf");$$w({target:"Array",proto:!0,forced:FORCED$7},{indexOf:function(et){var tt=arguments.length>1?arguments[1]:void 0;return NEGATIVE_ZERO?nativeIndexOf(this,et,tt)||0:$indexOf(this,et,tt)}});var fails$h=fails$F,wellKnownSymbol$a=wellKnownSymbol$t,V8_VERSION$2=engineV8Version,SPECIES$3=wellKnownSymbol$a("species"),arrayMethodHasSpeciesSupport$4=function(_e){return V8_VERSION$2>=51||!fails$h(function(){var et=[],tt=et.constructor={};return tt[SPECIES$3]=function(){return{foo:1}},et[_e](Boolean).foo!==1})},$$v=_export,$map=arrayIteration.map,arrayMethodHasSpeciesSupport$3=arrayMethodHasSpeciesSupport$4,HAS_SPECIES_SUPPORT$2=arrayMethodHasSpeciesSupport$3("map");$$v({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$2},{map:function(et){return $map(this,et,arguments.length>1?arguments[1]:void 0)}});const sides=["top","right","bottom","left"],alignments$1=["start","end"],placements=sides.reduce((_e,et)=>_e.concat(et,et+"-"+alignments$1[0],et+"-"+alignments$1[1]),[]),min$3=Math.min,max$2=Math.max,round=Math.round,floor$2=Math.floor,createCoords=_e=>({x:_e,y:_e}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp(_e,et,tt){return max$2(_e,min$3(et,tt))}function evaluate(_e,et){return typeof _e=="function"?_e(et):_e}function getSide(_e){return _e.split("-")[0]}function getAlignment(_e){return _e.split("-")[1]}function getOppositeAxis(_e){return _e==="x"?"y":"x"}function getAxisLength(_e){return _e==="y"?"height":"width"}function getSideAxis(_e){return["top","bottom"].includes(getSide(_e))?"y":"x"}function getAlignmentAxis(_e){return getOppositeAxis(getSideAxis(_e))}function getAlignmentSides(_e,et,tt){tt===void 0&&(tt=!1);const nt=getAlignment(_e),rt=getAlignmentAxis(_e),at=getAxisLength(rt);let it=rt==="x"?nt===(tt?"end":"start")?"right":"left":nt==="start"?"bottom":"top";return et.reference[at]>et.floating[at]&&(it=getOppositePlacement(it)),[it,getOppositePlacement(it)]}function getExpandedPlacements(_e){const et=getOppositePlacement(_e);return[getOppositeAlignmentPlacement(_e),et,getOppositeAlignmentPlacement(et)]}function getOppositeAlignmentPlacement(_e){return _e.replace(/start|end/g,et=>oppositeAlignmentMap[et])}function getSideList(_e,et,tt){const nt=["left","right"],rt=["right","left"],at=["top","bottom"],it=["bottom","top"];switch(_e){case"top":case"bottom":return tt?et?rt:nt:et?nt:rt;case"left":case"right":return et?at:it;default:return[]}}function getOppositeAxisPlacements(_e,et,tt,nt){const rt=getAlignment(_e);let at=getSideList(getSide(_e),tt==="start",nt);return rt&&(at=at.map(it=>it+"-"+rt),et&&(at=at.concat(at.map(getOppositeAlignmentPlacement)))),at}function getOppositePlacement(_e){return _e.replace(/left|right|bottom|top/g,et=>oppositeSideMap[et])}function expandPaddingObject(_e){return{top:0,right:0,bottom:0,left:0,..._e}}function getPaddingObject(_e){return typeof _e!="number"?expandPaddingObject(_e):{top:_e,right:_e,bottom:_e,left:_e}}function rectToClientRect(_e){return{..._e,top:_e.y,left:_e.x,right:_e.x+_e.width,bottom:_e.y+_e.height}}function computeCoordsFromPlacement(_e,et,tt){let{reference:nt,floating:rt}=_e;const at=getSideAxis(et),it=getAlignmentAxis(et),ot=getAxisLength(it),st=getSide(et),ct=at==="y",ut=nt.x+nt.width/2-rt.width/2,dt=nt.y+nt.height/2-rt.height/2,ft=nt[ot]/2-rt[ot]/2;let pt;switch(st){case"top":pt={x:ut,y:nt.y-rt.height};break;case"bottom":pt={x:ut,y:nt.y+nt.height};break;case"right":pt={x:nt.x+nt.width,y:dt};break;case"left":pt={x:nt.x-rt.width,y:dt};break;default:pt={x:nt.x,y:nt.y}}switch(getAlignment(et)){case"start":pt[it]-=ft*(tt&&ct?-1:1);break;case"end":pt[it]+=ft*(tt&&ct?-1:1);break}return pt}const computePosition$1=async(_e,et,tt)=>{const{placement:nt="bottom",strategy:rt="absolute",middleware:at=[],platform:it}=tt,ot=at.filter(Boolean),st=await(it.isRTL==null?void 0:it.isRTL(et));let ct=await it.getElementRects({reference:_e,floating:et,strategy:rt}),{x:ut,y:dt}=computeCoordsFromPlacement(ct,nt,st),ft=nt,pt={},mt=0;for(let ht=0;ht({name:"arrow",options:_e,async fn(et){const{x:tt,y:nt,placement:rt,rects:at,platform:it,elements:ot,middlewareData:st}=et,{element:ct,padding:ut=0}=evaluate(_e,et)||{};if(ct==null)return{};const dt=getPaddingObject(ut),ft={x:tt,y:nt},pt=getAlignmentAxis(rt),mt=getAxisLength(pt),ht=await it.getDimensions(ct),Et=pt==="y",yt=Et?"top":"left",vt=Et?"bottom":"right",gt=Et?"clientHeight":"clientWidth",St=at.reference[mt]+at.reference[pt]-ft[pt]-at.floating[mt],Rt=ft[pt]-at.reference[pt],$t=await(it.getOffsetParent==null?void 0:it.getOffsetParent(ct));let bt=$t?$t[gt]:0;(!bt||!await(it.isElement==null?void 0:it.isElement($t)))&&(bt=ot.floating[gt]||at.floating[mt]);const wt=St/2-Rt/2,xt=bt/2-ht[mt]/2-1,Tt=min$3(dt[yt],xt),Ct=min$3(dt[vt],xt),Nt=Tt,At=bt-ht[mt]-Ct,kt=bt/2-ht[mt]/2+wt,Pt=clamp(Nt,kt,At),Ft=!st.arrow&&getAlignment(rt)!=null&&kt!=Pt&&at.reference[mt]/2-(ktgetAlignment(rt)===_e),...tt.filter(rt=>getAlignment(rt)!==_e)]:tt.filter(rt=>getSide(rt)===rt)).filter(rt=>_e?getAlignment(rt)===_e||(et?getOppositeAlignmentPlacement(rt)!==rt:!1):!0)}const autoPlacement=function(_e){return _e===void 0&&(_e={}),{name:"autoPlacement",options:_e,async fn(et){var tt,nt,rt;const{rects:at,middlewareData:it,placement:ot,platform:st,elements:ct}=et,{crossAxis:ut=!1,alignment:dt,allowedPlacements:ft=placements,autoAlignment:pt=!0,...mt}=evaluate(_e,et),ht=dt!==void 0||ft===placements?getPlacementList(dt||null,pt,ft):ft,Et=await detectOverflow(et,mt),yt=((tt=it.autoPlacement)==null?void 0:tt.index)||0,vt=ht[yt];if(vt==null)return{};const gt=getAlignmentSides(vt,at,await(st.isRTL==null?void 0:st.isRTL(ct.floating)));if(ot!==vt)return{reset:{placement:ht[0]}};const St=[Et[getSide(vt)],Et[gt[0]],Et[gt[1]]],Rt=[...((nt=it.autoPlacement)==null?void 0:nt.overflows)||[],{placement:vt,overflows:St}],$t=ht[yt+1];if($t)return{data:{index:yt+1,overflows:Rt},reset:{placement:$t}};const bt=Rt.map(Tt=>{const Ct=getAlignment(Tt.placement);return[Tt.placement,Ct&&ut?Tt.overflows.slice(0,2).reduce((Nt,At)=>Nt+At,0):Tt.overflows[0],Tt.overflows]}).sort((Tt,Ct)=>Tt[1]-Ct[1]),xt=((rt=bt.filter(Tt=>Tt[2].slice(0,getAlignment(Tt[0])?2:3).every(Ct=>Ct<=0))[0])==null?void 0:rt[0])||bt[0][0];return xt!==ot?{data:{index:yt+1,overflows:Rt},reset:{placement:xt}}:{}}}},flip=function(_e){return _e===void 0&&(_e={}),{name:"flip",options:_e,async fn(et){var tt,nt;const{placement:rt,middlewareData:at,rects:it,initialPlacement:ot,platform:st,elements:ct}=et,{mainAxis:ut=!0,crossAxis:dt=!0,fallbackPlacements:ft,fallbackStrategy:pt="bestFit",fallbackAxisSideDirection:mt="none",flipAlignment:ht=!0,...Et}=evaluate(_e,et);if((tt=at.arrow)!=null&&tt.alignmentOffset)return{};const yt=getSide(rt),vt=getSide(ot)===ot,gt=await(st.isRTL==null?void 0:st.isRTL(ct.floating)),St=ft||(vt||!ht?[getOppositePlacement(ot)]:getExpandedPlacements(ot));!ft&&mt!=="none"&&St.push(...getOppositeAxisPlacements(ot,ht,mt,gt));const Rt=[ot,...St],$t=await detectOverflow(et,Et),bt=[];let wt=((nt=at.flip)==null?void 0:nt.overflows)||[];if(ut&&bt.push($t[yt]),dt){const Nt=getAlignmentSides(rt,it,gt);bt.push($t[Nt[0]],$t[Nt[1]])}if(wt=[...wt,{placement:rt,overflows:bt}],!bt.every(Nt=>Nt<=0)){var xt,Tt;const Nt=(((xt=at.flip)==null?void 0:xt.index)||0)+1,At=Rt[Nt];if(At)return{data:{index:Nt,overflows:wt},reset:{placement:At}};let kt=(Tt=wt.filter(Pt=>Pt.overflows[0]<=0).sort((Pt,Ft)=>Pt.overflows[1]-Ft.overflows[1])[0])==null?void 0:Tt.placement;if(!kt)switch(pt){case"bestFit":{var Ct;const Pt=(Ct=wt.map(Ft=>[Ft.placement,Ft.overflows.filter(Dt=>Dt>0).reduce((Dt,Lt)=>Dt+Lt,0)]).sort((Ft,Dt)=>Ft[1]-Dt[1])[0])==null?void 0:Ct[0];Pt&&(kt=Pt);break}case"initialPlacement":kt=ot;break}if(rt!==kt)return{reset:{placement:kt}}}return{}}}};async function convertValueToCoords(_e,et){const{placement:tt,platform:nt,elements:rt}=_e,at=await(nt.isRTL==null?void 0:nt.isRTL(rt.floating)),it=getSide(tt),ot=getAlignment(tt),st=getSideAxis(tt)==="y",ct=["left","top"].includes(it)?-1:1,ut=at&&st?-1:1,dt=evaluate(et,_e);let{mainAxis:ft,crossAxis:pt,alignmentAxis:mt}=typeof dt=="number"?{mainAxis:dt,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...dt};return ot&&typeof mt=="number"&&(pt=ot==="end"?mt*-1:mt),st?{x:pt*ut,y:ft*ct}:{x:ft*ct,y:pt*ut}}const offset$1=function(_e){return _e===void 0&&(_e=0),{name:"offset",options:_e,async fn(et){const{x:tt,y:nt}=et,rt=await convertValueToCoords(et,_e);return{x:tt+rt.x,y:nt+rt.y,data:rt}}}},shift$1=function(_e){return _e===void 0&&(_e={}),{name:"shift",options:_e,async fn(et){const{x:tt,y:nt,placement:rt}=et,{mainAxis:at=!0,crossAxis:it=!1,limiter:ot={fn:Et=>{let{x:yt,y:vt}=Et;return{x:yt,y:vt}}},...st}=evaluate(_e,et),ct={x:tt,y:nt},ut=await detectOverflow(et,st),dt=getSideAxis(getSide(rt)),ft=getOppositeAxis(dt);let pt=ct[ft],mt=ct[dt];if(at){const Et=ft==="y"?"top":"left",yt=ft==="y"?"bottom":"right",vt=pt+ut[Et],gt=pt-ut[yt];pt=clamp(vt,pt,gt)}if(it){const Et=dt==="y"?"top":"left",yt=dt==="y"?"bottom":"right",vt=mt+ut[Et],gt=mt-ut[yt];mt=clamp(vt,mt,gt)}const ht=ot.fn({...et,[ft]:pt,[dt]:mt});return{...ht,data:{x:ht.x-tt,y:ht.y-nt}}}}};function getNodeName(_e){return isNode(_e)?(_e.nodeName||"").toLowerCase():"#document"}function getWindow$1(_e){var et;return(_e==null||(et=_e.ownerDocument)==null?void 0:et.defaultView)||window}function getDocumentElement(_e){var et;return(et=(isNode(_e)?_e.ownerDocument:_e.document)||window.document)==null?void 0:et.documentElement}function isNode(_e){return _e instanceof Node||_e instanceof getWindow$1(_e).Node}function isElement$1(_e){return _e instanceof Element||_e instanceof getWindow$1(_e).Element}function isHTMLElement$1(_e){return _e instanceof HTMLElement||_e instanceof getWindow$1(_e).HTMLElement}function isShadowRoot$1(_e){return typeof ShadowRoot>"u"?!1:_e instanceof ShadowRoot||_e instanceof getWindow$1(_e).ShadowRoot}function isOverflowElement(_e){const{overflow:et,overflowX:tt,overflowY:nt,display:rt}=getComputedStyle$3(_e);return/auto|scroll|overlay|hidden|clip/.test(et+nt+tt)&&!["inline","contents"].includes(rt)}function isTableElement(_e){return["table","td","th"].includes(getNodeName(_e))}function isContainingBlock(_e){const et=isWebKit(),tt=getComputedStyle$3(_e);return tt.transform!=="none"||tt.perspective!=="none"||(tt.containerType?tt.containerType!=="normal":!1)||!et&&(tt.backdropFilter?tt.backdropFilter!=="none":!1)||!et&&(tt.filter?tt.filter!=="none":!1)||["transform","perspective","filter"].some(nt=>(tt.willChange||"").includes(nt))||["paint","layout","strict","content"].some(nt=>(tt.contain||"").includes(nt))}function getContainingBlock(_e){let et=getParentNode$1(_e);for(;isHTMLElement$1(et)&&!isLastTraversableNode(et);){if(isContainingBlock(et))return et;et=getParentNode$1(et)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(_e){return["html","body","#document"].includes(getNodeName(_e))}function getComputedStyle$3(_e){return getWindow$1(_e).getComputedStyle(_e)}function getNodeScroll(_e){return isElement$1(_e)?{scrollLeft:_e.scrollLeft,scrollTop:_e.scrollTop}:{scrollLeft:_e.pageXOffset,scrollTop:_e.pageYOffset}}function getParentNode$1(_e){if(getNodeName(_e)==="html")return _e;const et=_e.assignedSlot||_e.parentNode||isShadowRoot$1(_e)&&_e.host||getDocumentElement(_e);return isShadowRoot$1(et)?et.host:et}function getNearestOverflowAncestor(_e){const et=getParentNode$1(_e);return isLastTraversableNode(et)?_e.ownerDocument?_e.ownerDocument.body:_e.body:isHTMLElement$1(et)&&isOverflowElement(et)?et:getNearestOverflowAncestor(et)}function getOverflowAncestors(_e,et,tt){var nt;et===void 0&&(et=[]),tt===void 0&&(tt=!0);const rt=getNearestOverflowAncestor(_e),at=rt===((nt=_e.ownerDocument)==null?void 0:nt.body),it=getWindow$1(rt);return at?et.concat(it,it.visualViewport||[],isOverflowElement(rt)?rt:[],it.frameElement&&tt?getOverflowAncestors(it.frameElement):[]):et.concat(rt,getOverflowAncestors(rt,[],tt))}function getCssDimensions(_e){const et=getComputedStyle$3(_e);let tt=parseFloat(et.width)||0,nt=parseFloat(et.height)||0;const rt=isHTMLElement$1(_e),at=rt?_e.offsetWidth:tt,it=rt?_e.offsetHeight:nt,ot=round(tt)!==at||round(nt)!==it;return ot&&(tt=at,nt=it),{width:tt,height:nt,$:ot}}function unwrapElement(_e){return isElement$1(_e)?_e:_e.contextElement}function getScale(_e){const et=unwrapElement(_e);if(!isHTMLElement$1(et))return createCoords(1);const tt=et.getBoundingClientRect(),{width:nt,height:rt,$:at}=getCssDimensions(et);let it=(at?round(tt.width):tt.width)/nt,ot=(at?round(tt.height):tt.height)/rt;return(!it||!Number.isFinite(it))&&(it=1),(!ot||!Number.isFinite(ot))&&(ot=1),{x:it,y:ot}}const noOffsets=createCoords(0);function getVisualOffsets(_e){const et=getWindow$1(_e);return!isWebKit()||!et.visualViewport?noOffsets:{x:et.visualViewport.offsetLeft,y:et.visualViewport.offsetTop}}function shouldAddVisualOffsets(_e,et,tt){return et===void 0&&(et=!1),!tt||et&&tt!==getWindow$1(_e)?!1:et}function getBoundingClientRect(_e,et,tt,nt){et===void 0&&(et=!1),tt===void 0&&(tt=!1);const rt=_e.getBoundingClientRect(),at=unwrapElement(_e);let it=createCoords(1);et&&(nt?isElement$1(nt)&&(it=getScale(nt)):it=getScale(_e));const ot=shouldAddVisualOffsets(at,tt,nt)?getVisualOffsets(at):createCoords(0);let st=(rt.left+ot.x)/it.x,ct=(rt.top+ot.y)/it.y,ut=rt.width/it.x,dt=rt.height/it.y;if(at){const ft=getWindow$1(at),pt=nt&&isElement$1(nt)?getWindow$1(nt):nt;let mt=ft.frameElement;for(;mt&&nt&&pt!==ft;){const ht=getScale(mt),Et=mt.getBoundingClientRect(),yt=getComputedStyle$3(mt),vt=Et.left+(mt.clientLeft+parseFloat(yt.paddingLeft))*ht.x,gt=Et.top+(mt.clientTop+parseFloat(yt.paddingTop))*ht.y;st*=ht.x,ct*=ht.y,ut*=ht.x,dt*=ht.y,st+=vt,ct+=gt,mt=getWindow$1(mt).frameElement}}return rectToClientRect({width:ut,height:dt,x:st,y:ct})}function convertOffsetParentRelativeRectToViewportRelativeRect(_e){let{rect:et,offsetParent:tt,strategy:nt}=_e;const rt=isHTMLElement$1(tt),at=getDocumentElement(tt);if(tt===at)return et;let it={scrollLeft:0,scrollTop:0},ot=createCoords(1);const st=createCoords(0);if((rt||!rt&&nt!=="fixed")&&((getNodeName(tt)!=="body"||isOverflowElement(at))&&(it=getNodeScroll(tt)),isHTMLElement$1(tt))){const ct=getBoundingClientRect(tt);ot=getScale(tt),st.x=ct.x+tt.clientLeft,st.y=ct.y+tt.clientTop}return{width:et.width*ot.x,height:et.height*ot.y,x:et.x*ot.x-it.scrollLeft*ot.x+st.x,y:et.y*ot.y-it.scrollTop*ot.y+st.y}}function getClientRects(_e){return Array.from(_e.getClientRects())}function getWindowScrollBarX(_e){return getBoundingClientRect(getDocumentElement(_e)).left+getNodeScroll(_e).scrollLeft}function getDocumentRect(_e){const et=getDocumentElement(_e),tt=getNodeScroll(_e),nt=_e.ownerDocument.body,rt=max$2(et.scrollWidth,et.clientWidth,nt.scrollWidth,nt.clientWidth),at=max$2(et.scrollHeight,et.clientHeight,nt.scrollHeight,nt.clientHeight);let it=-tt.scrollLeft+getWindowScrollBarX(_e);const ot=-tt.scrollTop;return getComputedStyle$3(nt).direction==="rtl"&&(it+=max$2(et.clientWidth,nt.clientWidth)-rt),{width:rt,height:at,x:it,y:ot}}function getViewportRect(_e,et){const tt=getWindow$1(_e),nt=getDocumentElement(_e),rt=tt.visualViewport;let at=nt.clientWidth,it=nt.clientHeight,ot=0,st=0;if(rt){at=rt.width,it=rt.height;const ct=isWebKit();(!ct||ct&&et==="fixed")&&(ot=rt.offsetLeft,st=rt.offsetTop)}return{width:at,height:it,x:ot,y:st}}function getInnerBoundingClientRect(_e,et){const tt=getBoundingClientRect(_e,!0,et==="fixed"),nt=tt.top+_e.clientTop,rt=tt.left+_e.clientLeft,at=isHTMLElement$1(_e)?getScale(_e):createCoords(1),it=_e.clientWidth*at.x,ot=_e.clientHeight*at.y,st=rt*at.x,ct=nt*at.y;return{width:it,height:ot,x:st,y:ct}}function getClientRectFromClippingAncestor(_e,et,tt){let nt;if(et==="viewport")nt=getViewportRect(_e,tt);else if(et==="document")nt=getDocumentRect(getDocumentElement(_e));else if(isElement$1(et))nt=getInnerBoundingClientRect(et,tt);else{const rt=getVisualOffsets(_e);nt={...et,x:et.x-rt.x,y:et.y-rt.y}}return rectToClientRect(nt)}function hasFixedPositionAncestor(_e,et){const tt=getParentNode$1(_e);return tt===et||!isElement$1(tt)||isLastTraversableNode(tt)?!1:getComputedStyle$3(tt).position==="fixed"||hasFixedPositionAncestor(tt,et)}function getClippingElementAncestors(_e,et){const tt=et.get(_e);if(tt)return tt;let nt=getOverflowAncestors(_e,[],!1).filter(ot=>isElement$1(ot)&&getNodeName(ot)!=="body"),rt=null;const at=getComputedStyle$3(_e).position==="fixed";let it=at?getParentNode$1(_e):_e;for(;isElement$1(it)&&!isLastTraversableNode(it);){const ot=getComputedStyle$3(it),st=isContainingBlock(it);!st&&ot.position==="fixed"&&(rt=null),(at?!st&&!rt:!st&&ot.position==="static"&&!!rt&&["absolute","fixed"].includes(rt.position)||isOverflowElement(it)&&!st&&hasFixedPositionAncestor(_e,it))?nt=nt.filter(ut=>ut!==it):rt=ot,it=getParentNode$1(it)}return et.set(_e,nt),nt}function getClippingRect(_e){let{element:et,boundary:tt,rootBoundary:nt,strategy:rt}=_e;const it=[...tt==="clippingAncestors"?getClippingElementAncestors(et,this._c):[].concat(tt),nt],ot=it[0],st=it.reduce((ct,ut)=>{const dt=getClientRectFromClippingAncestor(et,ut,rt);return ct.top=max$2(dt.top,ct.top),ct.right=min$3(dt.right,ct.right),ct.bottom=min$3(dt.bottom,ct.bottom),ct.left=max$2(dt.left,ct.left),ct},getClientRectFromClippingAncestor(et,ot,rt));return{width:st.right-st.left,height:st.bottom-st.top,x:st.left,y:st.top}}function getDimensions$1(_e){return getCssDimensions(_e)}function getRectRelativeToOffsetParent(_e,et,tt){const nt=isHTMLElement$1(et),rt=getDocumentElement(et),at=tt==="fixed",it=getBoundingClientRect(_e,!0,at,et);let ot={scrollLeft:0,scrollTop:0};const st=createCoords(0);if(nt||!nt&&!at)if((getNodeName(et)!=="body"||isOverflowElement(rt))&&(ot=getNodeScroll(et)),nt){const ct=getBoundingClientRect(et,!0,at,et);st.x=ct.x+et.clientLeft,st.y=ct.y+et.clientTop}else rt&&(st.x=getWindowScrollBarX(rt));return{x:it.left+ot.scrollLeft-st.x,y:it.top+ot.scrollTop-st.y,width:it.width,height:it.height}}function getTrueOffsetParent(_e,et){return!isHTMLElement$1(_e)||getComputedStyle$3(_e).position==="fixed"?null:et?et(_e):_e.offsetParent}function getOffsetParent(_e,et){const tt=getWindow$1(_e);if(!isHTMLElement$1(_e))return tt;let nt=getTrueOffsetParent(_e,et);for(;nt&&isTableElement(nt)&&getComputedStyle$3(nt).position==="static";)nt=getTrueOffsetParent(nt,et);return nt&&(getNodeName(nt)==="html"||getNodeName(nt)==="body"&&getComputedStyle$3(nt).position==="static"&&!isContainingBlock(nt))?tt:nt||getContainingBlock(_e)||tt}const getElementRects=async function(_e){let{reference:et,floating:tt,strategy:nt}=_e;const rt=this.getOffsetParent||getOffsetParent,at=this.getDimensions;return{reference:getRectRelativeToOffsetParent(et,await rt(tt),nt),floating:{x:0,y:0,...await at(tt)}}};function isRTL(_e){return getComputedStyle$3(_e).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions:getDimensions$1,getScale,isElement:isElement$1,isRTL};function observeMove(_e,et){let tt=null,nt;const rt=getDocumentElement(_e);function at(){clearTimeout(nt),tt&&tt.disconnect(),tt=null}function it(ot,st){ot===void 0&&(ot=!1),st===void 0&&(st=1),at();const{left:ct,top:ut,width:dt,height:ft}=_e.getBoundingClientRect();if(ot||et(),!dt||!ft)return;const pt=floor$2(ut),mt=floor$2(rt.clientWidth-(ct+dt)),ht=floor$2(rt.clientHeight-(ut+ft)),Et=floor$2(ct),vt={rootMargin:-pt+"px "+-mt+"px "+-ht+"px "+-Et+"px",threshold:max$2(0,min$3(1,st))||1};let gt=!0;function St(Rt){const $t=Rt[0].intersectionRatio;if($t!==st){if(!gt)return it();$t?it(!1,$t):nt=setTimeout(()=>{it(!1,1e-7)},100)}gt=!1}try{tt=new IntersectionObserver(St,{...vt,root:rt.ownerDocument})}catch{tt=new IntersectionObserver(St,vt)}tt.observe(_e)}return it(!0),at}function autoUpdate(_e,et,tt,nt){nt===void 0&&(nt={});const{ancestorScroll:rt=!0,ancestorResize:at=!0,elementResize:it=typeof ResizeObserver=="function",layoutShift:ot=typeof IntersectionObserver=="function",animationFrame:st=!1}=nt,ct=unwrapElement(_e),ut=rt||at?[...ct?getOverflowAncestors(ct):[],...getOverflowAncestors(et)]:[];ut.forEach(yt=>{rt&&yt.addEventListener("scroll",tt,{passive:!0}),at&&yt.addEventListener("resize",tt)});const dt=ct&&ot?observeMove(ct,tt):null;let ft=-1,pt=null;it&&(pt=new ResizeObserver(yt=>{let[vt]=yt;vt&&vt.target===ct&&pt&&(pt.unobserve(et),cancelAnimationFrame(ft),ft=requestAnimationFrame(()=>{pt&&pt.observe(et)})),tt()}),ct&&!st&&pt.observe(ct),pt.observe(et));let mt,ht=st?getBoundingClientRect(_e):null;st&&Et();function Et(){const yt=getBoundingClientRect(_e);ht&&(yt.x!==ht.x||yt.y!==ht.y||yt.width!==ht.width||yt.height!==ht.height)&&tt(),ht=yt,mt=requestAnimationFrame(Et)}return tt(),()=>{ut.forEach(yt=>{rt&&yt.removeEventListener("scroll",tt),at&&yt.removeEventListener("resize",tt)}),dt&&dt(),pt&&pt.disconnect(),pt=null,st&&cancelAnimationFrame(mt)}}const computePosition=(_e,et,tt)=>{const nt=new Map,rt={platform,...tt},at={...rt.platform,_c:nt};return computePosition$1(_e,et,{...rt,platform:at})},arrow=_e=>{function et(tt){return{}.hasOwnProperty.call(tt,"current")}return{name:"arrow",options:_e,fn(tt){const{element:nt,padding:rt}=typeof _e=="function"?_e(tt):_e;return nt&&et(nt)?nt.current!=null?arrow$1({element:nt.current,padding:rt}).fn(tt):{}:nt?arrow$1({element:nt,padding:rt}).fn(tt):{}}}};var index$4=typeof document<"u"?reactExports.useLayoutEffect:reactExports.useEffect;function deepEqual(_e,et){if(_e===et)return!0;if(typeof _e!=typeof et)return!1;if(typeof _e=="function"&&_e.toString()===et.toString())return!0;let tt,nt,rt;if(_e&&et&&typeof _e=="object"){if(Array.isArray(_e)){if(tt=_e.length,tt!=et.length)return!1;for(nt=tt;nt--!==0;)if(!deepEqual(_e[nt],et[nt]))return!1;return!0}if(rt=Object.keys(_e),tt=rt.length,tt!==Object.keys(et).length)return!1;for(nt=tt;nt--!==0;)if(!{}.hasOwnProperty.call(et,rt[nt]))return!1;for(nt=tt;nt--!==0;){const at=rt[nt];if(!(at==="_owner"&&_e.$$typeof)&&!deepEqual(_e[at],et[at]))return!1}return!0}return _e!==_e&&et!==et}function getDPR(_e){return typeof window>"u"?1:(_e.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(_e,et){const tt=getDPR(_e);return Math.round(et*tt)/tt}function useLatestRef$1(_e){const et=reactExports.useRef(_e);return index$4(()=>{et.current=_e}),et}function useFloating$1(_e){_e===void 0&&(_e={});const{placement:et="bottom",strategy:tt="absolute",middleware:nt=[],platform:rt,elements:{reference:at,floating:it}={},transform:ot=!0,whileElementsMounted:st,open:ct}=_e,[ut,dt]=reactExports.useState({x:0,y:0,strategy:tt,placement:et,middlewareData:{},isPositioned:!1}),[ft,pt]=reactExports.useState(nt);deepEqual(ft,nt)||pt(nt);const[mt,ht]=reactExports.useState(null),[Et,yt]=reactExports.useState(null),vt=reactExports.useCallback(Ft=>{Ft!=$t.current&&($t.current=Ft,ht(Ft))},[ht]),gt=reactExports.useCallback(Ft=>{Ft!==bt.current&&(bt.current=Ft,yt(Ft))},[yt]),St=at||mt,Rt=it||Et,$t=reactExports.useRef(null),bt=reactExports.useRef(null),wt=reactExports.useRef(ut),xt=useLatestRef$1(st),Tt=useLatestRef$1(rt),Ct=reactExports.useCallback(()=>{if(!$t.current||!bt.current)return;const Ft={placement:et,strategy:tt,middleware:ft};Tt.current&&(Ft.platform=Tt.current),computePosition($t.current,bt.current,Ft).then(Dt=>{const Lt={...Dt,isPositioned:!0};Nt.current&&!deepEqual(wt.current,Lt)&&(wt.current=Lt,reactDomExports.flushSync(()=>{dt(Lt)}))})},[ft,et,tt,Tt]);index$4(()=>{ct===!1&&wt.current.isPositioned&&(wt.current.isPositioned=!1,dt(Ft=>({...Ft,isPositioned:!1})))},[ct]);const Nt=reactExports.useRef(!1);index$4(()=>(Nt.current=!0,()=>{Nt.current=!1}),[]),index$4(()=>{if(St&&($t.current=St),Rt&&(bt.current=Rt),St&&Rt){if(xt.current)return xt.current(St,Rt,Ct);Ct()}},[St,Rt,Ct,xt]);const At=reactExports.useMemo(()=>({reference:$t,floating:bt,setReference:vt,setFloating:gt}),[vt,gt]),kt=reactExports.useMemo(()=>({reference:St,floating:Rt}),[St,Rt]),Pt=reactExports.useMemo(()=>{const Ft={position:tt,left:0,top:0};if(!kt.floating)return Ft;const Dt=roundByDPR(kt.floating,ut.x),Lt=roundByDPR(kt.floating,ut.y);return ot?{...Ft,transform:"translate("+Dt+"px, "+Lt+"px)",...getDPR(kt.floating)>=1.5&&{willChange:"transform"}}:{position:tt,left:Dt,top:Lt}},[tt,ot,kt.floating,ut.x,ut.y]);return reactExports.useMemo(()=>({...ut,update:Ct,refs:At,elements:kt,floatingStyles:Pt}),[ut,Ct,At,kt,Pt])}/*! * tabbable 6.2.0 * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE */var candidateSelectors$1=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],candidateSelector$1=candidateSelectors$1.join(","),NoElement$1=typeof Element>"u",matches$1=NoElement$1?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,getRootNode$2=!NoElement$1&&Element.prototype.getRootNode?function(_e){var et;return _e==null||(et=_e.getRootNode)===null||et===void 0?void 0:et.call(_e)}:function(_e){return _e==null?void 0:_e.ownerDocument},isInert=function _e(et,tt){var nt;tt===void 0&&(tt=!0);var rt=et==null||(nt=et.getAttribute)===null||nt===void 0?void 0:nt.call(et,"inert"),at=rt===""||rt==="true",it=at||tt&&et&&_e(et.parentNode);return it},isContentEditable=function(et){var tt,nt=et==null||(tt=et.getAttribute)===null||tt===void 0?void 0:tt.call(et,"contenteditable");return nt===""||nt==="true"},getCandidates$1=function(et,tt,nt){if(isInert(et))return[];var rt=Array.prototype.slice.apply(et.querySelectorAll(candidateSelector$1));return tt&&matches$1.call(et,candidateSelector$1)&&rt.unshift(et),rt=rt.filter(nt),rt},getCandidatesIteratively$1=function _e(et,tt,nt){for(var rt=[],at=Array.from(et);at.length;){var it=at.shift();if(!isInert(it,!1))if(it.tagName==="SLOT"){var ot=it.assignedElements(),st=ot.length?ot:it.children,ct=_e(st,!0,nt);nt.flatten?rt.push.apply(rt,ct):rt.push({scopeParent:it,candidates:ct})}else{var ut=matches$1.call(it,candidateSelector$1);ut&&nt.filter(it)&&(tt||!et.includes(it))&&rt.push(it);var dt=it.shadowRoot||typeof nt.getShadowRoot=="function"&&nt.getShadowRoot(it),ft=!isInert(dt,!1)&&(!nt.shadowRootFilter||nt.shadowRootFilter(it));if(dt&&ft){var pt=_e(dt===!0?it.children:dt.children,!0,nt);nt.flatten?rt.push.apply(rt,pt):rt.push({scopeParent:it,candidates:pt})}else at.unshift.apply(at,it.children)}}return rt},hasTabIndex=function(et){return!isNaN(parseInt(et.getAttribute("tabindex"),10))},getTabIndex=function(et){if(!et)throw new Error("No node provided");return et.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(et.tagName)||isContentEditable(et))&&!hasTabIndex(et)?0:et.tabIndex},getSortOrderTabIndex=function(et,tt){var nt=getTabIndex(et);return nt<0&&tt&&!hasTabIndex(et)?0:nt},sortOrderedTabbables$1=function(et,tt){return et.tabIndex===tt.tabIndex?et.documentOrder-tt.documentOrder:et.tabIndex-tt.tabIndex},isInput$1=function(et){return et.tagName==="INPUT"},isHiddenInput$1=function(et){return isInput$1(et)&&et.type==="hidden"},isDetailsWithSummary$1=function(et){var tt=et.tagName==="DETAILS"&&Array.prototype.slice.apply(et.children).some(function(nt){return nt.tagName==="SUMMARY"});return tt},getCheckedRadio$1=function(et,tt){for(var nt=0;ntsummary:first-of-type"),it=at?et.parentElement:et;if(matches$1.call(it,"details:not([open]) *"))return!0;if(!nt||nt==="full"||nt==="legacy-full"){if(typeof rt=="function"){for(var ot=et;et;){var st=et.parentElement,ct=getRootNode$2(et);if(st&&!st.shadowRoot&&rt(st)===!0)return isZeroArea$1(et);et.assignedSlot?et=et.assignedSlot:!st&&ct!==et.ownerDocument?et=ct.host:et=st}et=ot}if(isNodeAttached(et))return!et.getClientRects().length;if(nt!=="legacy-full")return!0}else if(nt==="non-zero-area")return isZeroArea$1(et);return!1},isDisabledFromFieldset$1=function(et){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(et.tagName))for(var tt=et.parentElement;tt;){if(tt.tagName==="FIELDSET"&&tt.disabled){for(var nt=0;nt=0)},sortByOrder$1=function _e(et){var tt=[],nt=[];return et.forEach(function(rt,at){var it=!!rt.scopeParent,ot=it?rt.scopeParent:rt,st=getSortOrderTabIndex(ot,it),ct=it?_e(rt.candidates):ot;st===0?it?tt.push.apply(tt,ct):tt.push(ot):nt.push({documentOrder:at,tabIndex:st,item:rt,isScope:it,content:ct})}),nt.sort(sortOrderedTabbables$1).reduce(function(rt,at){return at.isScope?rt.push.apply(rt,at.content):rt.push(at.content),rt},[]).concat(tt)},tabbable$1=function(et,tt){tt=tt||{};var nt;return tt.getShadowRoot?nt=getCandidatesIteratively$1([et],tt.includeContainer,{filter:isNodeMatchingSelectorTabbable$1.bind(null,tt),flatten:!1,getShadowRoot:tt.getShadowRoot,shadowRootFilter:isValidShadowRootTabbable$1}):nt=getCandidates$1(et,tt.includeContainer,isNodeMatchingSelectorTabbable$1.bind(null,tt)),sortByOrder$1(nt)};function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(_e){for(var et=1;et"floating-ui-"+count++;function useFloatingId(){const[_e,et]=reactExports.useState(()=>serverHandoffComplete$1?genId$1():void 0);return index$3(()=>{_e==null&&et(genId$1())},[]),reactExports.useEffect(()=>{serverHandoffComplete$1||(serverHandoffComplete$1=!0)},[]),_e}const useReactId=React$4["useId".toString()],useId$1=useReactId||useFloatingId,FloatingArrow=reactExports.forwardRef(function(et,tt){let{context:{placement:nt,elements:{floating:rt},middlewareData:{arrow:at}},width:it=14,height:ot=7,tipRadius:st=0,strokeWidth:ct=0,staticOffset:ut,stroke:dt,d:ft,style:{transform:pt,...mt}={},...ht}=et;const Et=useId$1();if(!rt)return null;ct*=2;const yt=ct/2,vt=it/2*(st/-8+1),gt=ot/2*st/4,[St,Rt]=nt.split("-"),$t=platform.isRTL(rt),bt=!!ft,wt=St==="top"||St==="bottom",xt=ut&&Rt==="end"?"bottom":"top";let Tt=ut&&Rt==="end"?"right":"left";ut&&$t&&(Tt=Rt==="end"?"left":"right");const Ct=(at==null?void 0:at.x)!=null?ut||at.x:"",Nt=(at==null?void 0:at.y)!=null?ut||at.y:"",At=ft||"M0,0"+(" H"+it)+(" L"+(it-vt)+","+(ot-gt))+(" Q"+it/2+","+ot+" "+vt+","+(ot-gt))+" Z",kt={top:bt?"rotate(180deg)":"",left:bt?"rotate(90deg)":"rotate(-90deg)",bottom:bt?"":"rotate(180deg)",right:bt?"rotate(-90deg)":"rotate(90deg)"}[St];return reactExports.createElement("svg",_extends$2({},ht,{"aria-hidden":!0,ref:tt,width:bt?it:it+ct,height:it,viewBox:"0 0 "+it+" "+(ot>it?ot:it),style:{position:"absolute",pointerEvents:"none",[Tt]:Ct,[xt]:Nt,[St]:wt||bt?"100%":"calc(100% - "+ct/2+"px)",transform:""+kt+(pt??""),...mt}}),ct>0&&reactExports.createElement("path",{clipPath:"url(#"+Et+")",fill:"none",stroke:dt,strokeWidth:ct+(ft?0:1),d:At}),reactExports.createElement("path",{stroke:ct&&!ft?ht.fill:"none",d:At}),reactExports.createElement("clipPath",{id:Et},reactExports.createElement("rect",{x:-yt,y:yt*(bt?-1:1),width:it+ct,height:it})))});function createPubSub(){const _e=new Map;return{emit(et,tt){var nt;(nt=_e.get(et))==null||nt.forEach(rt=>rt(tt))},on(et,tt){_e.set(et,[..._e.get(et)||[],tt])},off(et,tt){var nt;_e.set(et,((nt=_e.get(et))==null?void 0:nt.filter(rt=>rt!==tt))||[])}}}const FloatingNodeContext=reactExports.createContext(null),FloatingTreeContext=reactExports.createContext(null),useFloatingParentNodeId=()=>{var _e;return((_e=reactExports.useContext(FloatingNodeContext))==null?void 0:_e.id)||null},useFloatingTree=()=>reactExports.useContext(FloatingTreeContext);function getDocument(_e){return(_e==null?void 0:_e.ownerDocument)||document}function getPlatform(){const _e=navigator.userAgentData;return _e!=null&&_e.platform?_e.platform:navigator.platform}function getUserAgent(){const _e=navigator.userAgentData;return _e&&Array.isArray(_e.brands)?_e.brands.map(et=>{let{brand:tt,version:nt}=et;return tt+"/"+nt}).join(" "):navigator.userAgent}function getWindow(_e){return getDocument(_e).defaultView||window}function isElement(_e){return _e?_e instanceof Element||_e instanceof getWindow(_e).Element:!1}function isHTMLElement(_e){return _e?_e instanceof HTMLElement||_e instanceof getWindow(_e).HTMLElement:!1}function isShadowRoot(_e){if(typeof ShadowRoot>"u")return!1;const et=getWindow(_e).ShadowRoot;return _e instanceof et||_e instanceof ShadowRoot}function isVirtualClick(_e){if(_e.mozInputSource===0&&_e.isTrusted)return!0;const et=/Android/i;return(et.test(getPlatform())||et.test(getUserAgent()))&&_e.pointerType?_e.type==="click"&&_e.buttons===1:_e.detail===0&&!_e.pointerType}function isVirtualPointerEvent(_e){return _e.width===0&&_e.height===0||_e.width===1&&_e.height===1&&_e.pressure===0&&_e.detail===0&&_e.pointerType!=="mouse"||_e.width<1&&_e.height<1&&_e.pressure===0&&_e.detail===0}function isSafari(){return/apple/i.test(navigator.vendor)}function isMouseLikePointerType(_e,et){const tt=["mouse","pen"];return et||tt.push("",void 0),tt.includes(_e)}function isReactEvent(_e){return"nativeEvent"in _e}function contains$1(_e,et){if(!_e||!et)return!1;const tt=et.getRootNode&&et.getRootNode();if(_e.contains(et))return!0;if(tt&&isShadowRoot(tt)){let nt=et;for(;nt;){if(_e===nt)return!0;nt=nt.parentNode||nt.host}}return!1}function createAttribute(_e){return"data-floating-ui-"+_e}function useLatestRef(_e){const et=reactExports.useRef(_e);return index$3(()=>{et.current=_e}),et}const safePolygonIdentifier=createAttribute("safe-polygon");function getDelay(_e,et,tt){return tt&&!isMouseLikePointerType(tt)?0:typeof _e=="number"?_e:_e==null?void 0:_e[et]}function useHover(_e,et){et===void 0&&(et={});const{open:tt,onOpenChange:nt,dataRef:rt,events:at,elements:{domReference:it,floating:ot},refs:st}=_e,{enabled:ct=!0,delay:ut=0,handleClose:dt=null,mouseOnly:ft=!1,restMs:pt=0,move:mt=!0}=et,ht=useFloatingTree(),Et=useFloatingParentNodeId(),yt=useLatestRef(dt),vt=useLatestRef(ut),gt=reactExports.useRef(),St=reactExports.useRef(),Rt=reactExports.useRef(),$t=reactExports.useRef(),bt=reactExports.useRef(!0),wt=reactExports.useRef(!1),xt=reactExports.useRef(()=>{}),Tt=reactExports.useCallback(()=>{var kt;const Pt=(kt=rt.current.openEvent)==null?void 0:kt.type;return(Pt==null?void 0:Pt.includes("mouse"))&&Pt!=="mousedown"},[rt]);reactExports.useEffect(()=>{if(!ct)return;function kt(){clearTimeout(St.current),clearTimeout($t.current),bt.current=!0}return at.on("dismiss",kt),()=>{at.off("dismiss",kt)}},[ct,at]),reactExports.useEffect(()=>{if(!ct||!yt.current||!tt)return;function kt(Ft){Tt()&&nt(!1,Ft)}const Pt=getDocument(ot).documentElement;return Pt.addEventListener("mouseleave",kt),()=>{Pt.removeEventListener("mouseleave",kt)}},[ot,tt,nt,ct,yt,rt,Tt]);const Ct=reactExports.useCallback(function(kt,Pt){Pt===void 0&&(Pt=!0);const Ft=getDelay(vt.current,"close",gt.current);Ft&&!Rt.current?(clearTimeout(St.current),St.current=setTimeout(()=>nt(!1,kt),Ft)):Pt&&(clearTimeout(St.current),nt(!1,kt))},[vt,nt]),Nt=reactExports.useCallback(()=>{xt.current(),Rt.current=void 0},[]),At=reactExports.useCallback(()=>{if(wt.current){const kt=getDocument(st.floating.current).body;kt.style.pointerEvents="",kt.removeAttribute(safePolygonIdentifier),wt.current=!1}},[st]);return reactExports.useEffect(()=>{if(!ct)return;function kt(){return rt.current.openEvent?["click","mousedown"].includes(rt.current.openEvent.type):!1}function Pt(Lt){if(clearTimeout(St.current),bt.current=!1,ft&&!isMouseLikePointerType(gt.current)||pt>0&&getDelay(vt.current,"open")===0)return;const It=getDelay(vt.current,"open",gt.current);It?St.current=setTimeout(()=>{nt(!0,Lt)},It):nt(!0,Lt)}function Ft(Lt){if(kt())return;xt.current();const It=getDocument(ot);if(clearTimeout($t.current),yt.current){tt||clearTimeout(St.current),Rt.current=yt.current({..._e,tree:ht,x:Lt.clientX,y:Lt.clientY,onClose(){At(),Nt(),Ct(Lt)}});const Ut=Rt.current;It.addEventListener("mousemove",Ut),xt.current=()=>{It.removeEventListener("mousemove",Ut)};return}(gt.current==="touch"?!contains$1(ot,Lt.relatedTarget):!0)&&Ct(Lt)}function Dt(Lt){kt()||yt.current==null||yt.current({..._e,tree:ht,x:Lt.clientX,y:Lt.clientY,onClose(){At(),Nt(),Ct(Lt)}})(Lt)}if(isElement(it)){const Lt=it;return tt&&Lt.addEventListener("mouseleave",Dt),ot==null||ot.addEventListener("mouseleave",Dt),mt&&Lt.addEventListener("mousemove",Pt,{once:!0}),Lt.addEventListener("mouseenter",Pt),Lt.addEventListener("mouseleave",Ft),()=>{tt&&Lt.removeEventListener("mouseleave",Dt),ot==null||ot.removeEventListener("mouseleave",Dt),mt&&Lt.removeEventListener("mousemove",Pt),Lt.removeEventListener("mouseenter",Pt),Lt.removeEventListener("mouseleave",Ft)}}},[it,ot,ct,_e,ft,pt,mt,Ct,Nt,At,nt,tt,ht,vt,yt,rt]),index$3(()=>{var kt;if(ct&&tt&&(kt=yt.current)!=null&&kt.__options.blockPointerEvents&&Tt()){const Dt=getDocument(ot).body;if(Dt.setAttribute(safePolygonIdentifier,""),Dt.style.pointerEvents="none",wt.current=!0,isElement(it)&&ot){var Pt,Ft;const Lt=it,It=ht==null||(Pt=ht.nodesRef.current.find(Ot=>Ot.id===Et))==null||(Ft=Pt.context)==null?void 0:Ft.elements.floating;return It&&(It.style.pointerEvents=""),Lt.style.pointerEvents="auto",ot.style.pointerEvents="auto",()=>{Lt.style.pointerEvents="",ot.style.pointerEvents=""}}}},[ct,tt,Et,ot,it,ht,yt,rt,Tt]),index$3(()=>{tt||(gt.current=void 0,Nt(),At())},[tt,Nt,At]),reactExports.useEffect(()=>()=>{Nt(),clearTimeout(St.current),clearTimeout($t.current),At()},[ct,Nt,At]),reactExports.useMemo(()=>{if(!ct)return{};function kt(Pt){gt.current=Pt.pointerType}return{reference:{onPointerDown:kt,onPointerEnter:kt,onMouseMove(Pt){tt||pt===0||(clearTimeout($t.current),$t.current=setTimeout(()=>{bt.current||nt(!0,Pt.nativeEvent)},pt))}},floating:{onMouseEnter(){clearTimeout(St.current)},onMouseLeave(Pt){at.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),Ct(Pt.nativeEvent,!1)}}}},[at,ct,pt,tt,nt,Ct])}function activeElement(_e){let et=_e.activeElement;for(;((tt=et)==null||(nt=tt.shadowRoot)==null?void 0:nt.activeElement)!=null;){var tt,nt;et=et.shadowRoot.activeElement}return et}function getChildren(_e,et){let tt=_e.filter(rt=>{var at;return rt.parentId===et&&((at=rt.context)==null?void 0:at.open)}),nt=tt;for(;nt.length;)nt=_e.filter(rt=>{var at;return(at=nt)==null?void 0:at.some(it=>{var ot;return rt.parentId===it.id&&((ot=rt.context)==null?void 0:ot.open)})}),tt=tt.concat(nt);return tt}function getTarget(_e){return"composedPath"in _e?_e.composedPath()[0]:_e.target}const TYPEABLE_SELECTOR="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function isTypeableElement(_e){return isHTMLElement(_e)&&_e.matches(TYPEABLE_SELECTOR)}const getTabbableOptions=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function getTabbableIn(_e,et){const tt=tabbable$1(_e,getTabbableOptions());et==="prev"&&tt.reverse();const nt=tt.indexOf(activeElement(getDocument(_e)));return tt.slice(nt+1)[0]}function getNextTabbable(){return getTabbableIn(document.body,"next")}function getPreviousTabbable(){return getTabbableIn(document.body,"prev")}function isOutsideEvent(_e,et){const tt=et||_e.currentTarget,nt=_e.relatedTarget;return!nt||!contains$1(tt,nt)}function disableFocusInside(_e){tabbable$1(_e,getTabbableOptions()).forEach(tt=>{tt.dataset.tabindex=tt.getAttribute("tabindex")||"",tt.setAttribute("tabindex","-1")})}function enableFocusInside(_e){_e.querySelectorAll("[data-tabindex]").forEach(tt=>{const nt=tt.dataset.tabindex;delete tt.dataset.tabindex,nt?tt.setAttribute("tabindex",nt):tt.removeAttribute("tabindex")})}const HIDDEN_STYLES={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let timeoutId;function setActiveElementOnTab(_e){_e.key==="Tab"&&(_e.target,clearTimeout(timeoutId))}const FocusGuard=reactExports.forwardRef(function(et,tt){const[nt,rt]=reactExports.useState();index$3(()=>(isSafari()&&rt("button"),document.addEventListener("keydown",setActiveElementOnTab),()=>{document.removeEventListener("keydown",setActiveElementOnTab)}),[]);const at={ref:tt,tabIndex:0,role:nt,"aria-hidden":nt?void 0:!0,[createAttribute("focus-guard")]:"",style:HIDDEN_STYLES};return reactExports.createElement("span",_extends$2({},et,at))}),PortalContext=reactExports.createContext(null);function useFloatingPortalNode(_e){let{id:et,root:tt}=_e===void 0?{}:_e;const[nt,rt]=reactExports.useState(null),at=useId$1(),it=usePortalContext(),ot=reactExports.useMemo(()=>({id:et,root:tt,portalContext:it,uniqueId:at}),[et,tt,it,at]),st=reactExports.useRef();return index$3(()=>()=>{nt==null||nt.remove()},[nt,ot]),index$3(()=>{if(st.current===ot)return;st.current=ot;const{id:ct,root:ut,portalContext:dt,uniqueId:ft}=ot,pt=ct?document.getElementById(ct):null,mt=createAttribute("portal");if(pt){const ht=document.createElement("div");ht.id=ft,ht.setAttribute(mt,""),pt.appendChild(ht),rt(ht)}else{let ht=ut||(dt==null?void 0:dt.portalNode);ht&&!isElement(ht)&&(ht=ht.current),ht=ht||document.body;let Et=null;ct&&(Et=document.createElement("div"),Et.id=ct,ht.appendChild(Et));const yt=document.createElement("div");yt.id=ft,yt.setAttribute(mt,""),ht=Et||ht,ht.appendChild(yt),rt(yt)}},[ot]),nt}function FloatingPortal(_e){let{children:et,id:tt,root:nt=null,preserveTabOrder:rt=!0}=_e;const at=useFloatingPortalNode({id:tt,root:nt}),[it,ot]=reactExports.useState(null),st=reactExports.useRef(null),ct=reactExports.useRef(null),ut=reactExports.useRef(null),dt=reactExports.useRef(null),ft=!!it&&!it.modal&&it.open&&rt&&!!(nt||at);return reactExports.useEffect(()=>{if(!at||!rt||it!=null&&it.modal)return;function pt(mt){at&&isOutsideEvent(mt)&&(mt.type==="focusin"?enableFocusInside:disableFocusInside)(at)}return at.addEventListener("focusin",pt,!0),at.addEventListener("focusout",pt,!0),()=>{at.removeEventListener("focusin",pt,!0),at.removeEventListener("focusout",pt,!0)}},[at,rt,it==null?void 0:it.modal]),reactExports.createElement(PortalContext.Provider,{value:reactExports.useMemo(()=>({preserveTabOrder:rt,beforeOutsideRef:st,afterOutsideRef:ct,beforeInsideRef:ut,afterInsideRef:dt,portalNode:at,setFocusManagerState:ot}),[rt,at])},ft&&at&&reactExports.createElement(FocusGuard,{"data-type":"outside",ref:st,onFocus:pt=>{if(isOutsideEvent(pt,at)){var mt;(mt=ut.current)==null||mt.focus()}else{const ht=getPreviousTabbable()||(it==null?void 0:it.refs.domReference.current);ht==null||ht.focus()}}}),ft&&at&&reactExports.createElement("span",{"aria-owns":at.id,style:HIDDEN_STYLES}),at&&reactDomExports.createPortal(et,at),ft&&at&&reactExports.createElement(FocusGuard,{"data-type":"outside",ref:ct,onFocus:pt=>{if(isOutsideEvent(pt,at)){var mt;(mt=dt.current)==null||mt.focus()}else{const ht=getNextTabbable()||(it==null?void 0:it.refs.domReference.current);ht==null||ht.focus(),it!=null&&it.closeOnFocusOut&&(it==null||it.onOpenChange(!1,pt.nativeEvent))}}}))}const usePortalContext=()=>reactExports.useContext(PortalContext);function isButtonTarget(_e){return isHTMLElement(_e.target)&&_e.target.tagName==="BUTTON"}function isSpaceIgnored(_e){return isTypeableElement(_e)}function useClick(_e,et){et===void 0&&(et={});const{open:tt,onOpenChange:nt,dataRef:rt,elements:{domReference:at}}=_e,{enabled:it=!0,event:ot="click",toggle:st=!0,ignoreMouse:ct=!1,keyboardHandlers:ut=!0}=et,dt=reactExports.useRef(),ft=reactExports.useRef(!1);return reactExports.useMemo(()=>it?{reference:{onPointerDown(pt){dt.current=pt.pointerType},onMouseDown(pt){pt.button===0&&(isMouseLikePointerType(dt.current,!0)&&ct||ot!=="click"&&(tt&&st&&(!rt.current.openEvent||rt.current.openEvent.type==="mousedown")?nt(!1,pt.nativeEvent):(pt.preventDefault(),nt(!0,pt.nativeEvent))))},onClick(pt){if(ot==="mousedown"&&dt.current){dt.current=void 0;return}isMouseLikePointerType(dt.current,!0)&&ct||(tt&&st&&(!rt.current.openEvent||rt.current.openEvent.type==="click")?nt(!1,pt.nativeEvent):nt(!0,pt.nativeEvent))},onKeyDown(pt){dt.current=void 0,!(pt.defaultPrevented||!ut||isButtonTarget(pt))&&(pt.key===" "&&!isSpaceIgnored(at)&&(pt.preventDefault(),ft.current=!0),pt.key==="Enter"&&nt(!(tt&&st),pt.nativeEvent))},onKeyUp(pt){pt.defaultPrevented||!ut||isButtonTarget(pt)||isSpaceIgnored(at)||pt.key===" "&&ft.current&&(ft.current=!1,nt(!(tt&&st),pt.nativeEvent))}}}:{},[it,rt,ot,ct,ut,at,st,tt,nt])}const useInsertionEffect=React$4["useInsertionEffect".toString()],useSafeInsertionEffect=useInsertionEffect||(_e=>_e());function useEffectEvent(_e){const et=reactExports.useRef(()=>{});return useSafeInsertionEffect(()=>{et.current=_e}),reactExports.useCallback(function(){for(var tt=arguments.length,nt=new Array(tt),rt=0;rt{var et,tt;return{escapeKeyBubbles:typeof _e=="boolean"?_e:(et=_e==null?void 0:_e.escapeKey)!=null?et:!1,outsidePressBubbles:typeof _e=="boolean"?_e:(tt=_e==null?void 0:_e.outsidePress)!=null?tt:!0}};function useDismiss(_e,et){et===void 0&&(et={});const{open:tt,onOpenChange:nt,events:rt,nodeId:at,elements:{reference:it,domReference:ot,floating:st},dataRef:ct}=_e,{enabled:ut=!0,escapeKey:dt=!0,outsidePress:ft=!0,outsidePressEvent:pt="pointerdown",referencePress:mt=!1,referencePressEvent:ht="pointerdown",ancestorScroll:Et=!1,bubbles:yt}=et,vt=useFloatingTree(),gt=useFloatingParentNodeId()!=null,St=useEffectEvent(typeof ft=="function"?ft:()=>!1),Rt=typeof ft=="function"?St:ft,$t=reactExports.useRef(!1),{escapeKeyBubbles:bt,outsidePressBubbles:wt}=normalizeBubblesProp(yt),xt=useEffectEvent(Ct=>{if(!tt||!ut||!dt||Ct.key!=="Escape")return;const Nt=vt?getChildren(vt.nodesRef.current,at):[];if(!bt&&(Ct.stopPropagation(),Nt.length>0)){let At=!0;if(Nt.forEach(kt=>{var Pt;if((Pt=kt.context)!=null&&Pt.open&&!kt.context.dataRef.current.__escapeKeyBubbles){At=!1;return}}),!At)return}rt.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),nt(!1,isReactEvent(Ct)?Ct.nativeEvent:Ct)}),Tt=useEffectEvent(Ct=>{const Nt=$t.current;if($t.current=!1,Nt||typeof Rt=="function"&&!Rt(Ct))return;const At=getTarget(Ct);if(isHTMLElement(At)&&st){const Ft=At.clientWidth>0&&At.scrollWidth>At.clientWidth,Dt=At.clientHeight>0&&At.scrollHeight>At.clientHeight;let Lt=Dt&&Ct.offsetX>At.clientWidth;if(Dt&&getWindow(st).getComputedStyle(At).direction==="rtl"&&(Lt=Ct.offsetX<=At.offsetWidth-At.clientWidth),Lt||Ft&&Ct.offsetY>At.clientHeight)return}const kt=vt&&getChildren(vt.nodesRef.current,at).some(Ft=>{var Dt;return isEventTargetWithin(Ct,(Dt=Ft.context)==null?void 0:Dt.elements.floating)});if(isEventTargetWithin(Ct,st)||isEventTargetWithin(Ct,ot)||kt)return;const Pt=vt?getChildren(vt.nodesRef.current,at):[];if(Pt.length>0){let Ft=!0;if(Pt.forEach(Dt=>{var Lt;if((Lt=Dt.context)!=null&&Lt.open&&!Dt.context.dataRef.current.__outsidePressBubbles){Ft=!1;return}}),!Ft)return}rt.emit("dismiss",{type:"outsidePress",data:{returnFocus:gt?{preventScroll:!0}:isVirtualClick(Ct)||isVirtualPointerEvent(Ct)}}),nt(!1,Ct)});return reactExports.useEffect(()=>{if(!tt||!ut)return;ct.current.__escapeKeyBubbles=bt,ct.current.__outsidePressBubbles=wt;function Ct(kt){nt(!1,kt)}const Nt=getDocument(st);dt&&Nt.addEventListener("keydown",xt),Rt&&Nt.addEventListener(pt,Tt);let At=[];return Et&&(isElement(ot)&&(At=getOverflowAncestors(ot)),isElement(st)&&(At=At.concat(getOverflowAncestors(st))),!isElement(it)&&it&&it.contextElement&&(At=At.concat(getOverflowAncestors(it.contextElement)))),At=At.filter(kt=>{var Pt;return kt!==((Pt=Nt.defaultView)==null?void 0:Pt.visualViewport)}),At.forEach(kt=>{kt.addEventListener("scroll",Ct,{passive:!0})}),()=>{dt&&Nt.removeEventListener("keydown",xt),Rt&&Nt.removeEventListener(pt,Tt),At.forEach(kt=>{kt.removeEventListener("scroll",Ct)})}},[ct,st,ot,it,dt,Rt,pt,tt,nt,Et,ut,bt,wt,xt,Tt]),reactExports.useEffect(()=>{$t.current=!1},[Rt,pt]),reactExports.useMemo(()=>ut?{reference:{onKeyDown:xt,[bubbleHandlerKeys[ht]]:Ct=>{mt&&(rt.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),nt(!1,Ct.nativeEvent))}},floating:{onKeyDown:xt,[captureHandlerKeys[pt]]:()=>{$t.current=!0}}}:{},[ut,rt,mt,pt,ht,nt,xt])}function useFloating(_e){var et;_e===void 0&&(_e={});const{open:tt=!1,onOpenChange:nt,nodeId:rt}=_e,[at,it]=reactExports.useState(null),ot=((et=_e.elements)==null?void 0:et.reference)||at,st=useFloating$1(_e),ct=useFloatingTree(),ut=useEffectEvent((St,Rt)=>{St&&(ft.current.openEvent=Rt),nt==null||nt(St,Rt)}),dt=reactExports.useRef(null),ft=reactExports.useRef({}),pt=reactExports.useState(()=>createPubSub())[0],mt=useId$1(),ht=reactExports.useCallback(St=>{const Rt=isElement(St)?{getBoundingClientRect:()=>St.getBoundingClientRect(),contextElement:St}:St;st.refs.setReference(Rt)},[st.refs]),Et=reactExports.useCallback(St=>{(isElement(St)||St===null)&&(dt.current=St,it(St)),(isElement(st.refs.reference.current)||st.refs.reference.current===null||St!==null&&!isElement(St))&&st.refs.setReference(St)},[st.refs]),yt=reactExports.useMemo(()=>({...st.refs,setReference:Et,setPositionReference:ht,domReference:dt}),[st.refs,Et,ht]),vt=reactExports.useMemo(()=>({...st.elements,domReference:ot}),[st.elements,ot]),gt=reactExports.useMemo(()=>({...st,refs:yt,elements:vt,dataRef:ft,nodeId:rt,floatingId:mt,events:pt,open:tt,onOpenChange:ut}),[st,rt,mt,pt,tt,ut,yt,vt]);return index$3(()=>{const St=ct==null?void 0:ct.nodesRef.current.find(Rt=>Rt.id===rt);St&&(St.context=gt)}),reactExports.useMemo(()=>({...st,context:gt,refs:yt,elements:vt}),[st,yt,vt,gt])}function mergeProps(_e,et,tt){const nt=new Map;return{...tt==="floating"&&{tabIndex:-1},..._e,...et.map(rt=>rt?rt[tt]:null).concat(_e).reduce((rt,at)=>(at&&Object.entries(at).forEach(it=>{let[ot,st]=it;if(ot.indexOf("on")===0){if(nt.has(ot)||nt.set(ot,[]),typeof st=="function"){var ct;(ct=nt.get(ot))==null||ct.push(st),rt[ot]=function(){for(var ut,dt=arguments.length,ft=new Array(dt),pt=0;ptmt(...ft)).find(mt=>mt!==void 0)}}}else rt[ot]=st}),rt),{})}}function useInteractions(_e){_e===void 0&&(_e=[]);const et=_e,tt=reactExports.useCallback(at=>mergeProps(at,_e,"reference"),et),nt=reactExports.useCallback(at=>mergeProps(at,_e,"floating"),et),rt=reactExports.useCallback(at=>mergeProps(at,_e,"item"),_e.map(at=>at==null?void 0:at.item));return reactExports.useMemo(()=>({getReferenceProps:tt,getFloatingProps:nt,getItemProps:rt}),[tt,nt,rt])}const camelCaseToKebabCase=_e=>_e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(et,tt)=>(tt?"-":"")+et.toLowerCase());function execWithArgsOrReturn(_e,et){return typeof _e=="function"?_e(et):_e}function useDelayUnmount(_e,et){const[tt,nt]=reactExports.useState(_e);return _e&&!tt&&nt(!0),reactExports.useEffect(()=>{if(!_e){const rt=setTimeout(()=>nt(!1),et);return()=>clearTimeout(rt)}},[_e,et]),tt}function useTransitionStatus(_e,et){et===void 0&&(et={});const{open:tt,elements:{floating:nt}}=_e,{duration:rt=250}=et,it=(typeof rt=="number"?rt:rt.close)||0,[ot,st]=reactExports.useState(!1),[ct,ut]=reactExports.useState("unmounted"),dt=useDelayUnmount(tt,it);return index$3(()=>{ot&&!dt&&ut("unmounted")},[ot,dt]),index$3(()=>{if(nt)if(tt){ut("initial");const ft=requestAnimationFrame(()=>{ut("open")});return()=>{cancelAnimationFrame(ft)}}else st(!0),ut("close")},[tt,nt]),{isMounted:dt,status:ct}}function useTransitionStyles(_e,et){et===void 0&&(et={});const{initial:tt={opacity:0},open:nt,close:rt,common:at,duration:it=250}=et,ot=_e.placement,st=ot.split("-")[0],ct=reactExports.useMemo(()=>({side:st,placement:ot}),[st,ot]),ut=typeof it=="number",dt=(ut?it:it.open)||0,ft=(ut?it:it.close)||0,[pt,mt]=reactExports.useState(()=>({...execWithArgsOrReturn(at,ct),...execWithArgsOrReturn(tt,ct)})),{isMounted:ht,status:Et}=useTransitionStatus(_e,{duration:it}),yt=useLatestRef(tt),vt=useLatestRef(nt),gt=useLatestRef(rt),St=useLatestRef(at);return index$3(()=>{const Rt=execWithArgsOrReturn(yt.current,ct),$t=execWithArgsOrReturn(gt.current,ct),bt=execWithArgsOrReturn(St.current,ct),wt=execWithArgsOrReturn(vt.current,ct)||Object.keys(Rt).reduce((xt,Tt)=>(xt[Tt]="",xt),{});if(Et==="initial"&&mt(xt=>({transitionProperty:xt.transitionProperty,...bt,...Rt})),Et==="open"&&mt({transitionProperty:Object.keys(wt).map(camelCaseToKebabCase).join(","),transitionDuration:dt+"ms",...bt,...wt}),Et==="close"){const xt=$t||Rt;mt({transitionProperty:Object.keys(xt).map(camelCaseToKebabCase).join(","),transitionDuration:ft+"ms",...bt,...xt})}},[ft,gt,yt,vt,St,dt,Et,ct]),{isMounted:ht,styles:pt}}var w=typeof window<"u"?window:{screen:{},navigator:{}},matchMedia$1=(w.matchMedia||function(){return{matches:!1}}).bind(w),passiveOptionAccessed=!1,options={get passive(){return passiveOptionAccessed=!0}},noop$3=function(){};w.addEventListener&&w.addEventListener("p",noop$3,options);w.removeEventListener&&w.removeEventListener("p",noop$3,!1);var supportsPassiveEvents=passiveOptionAccessed,onTouchStartInWindow="ontouchstart"in w,touchEventInWindow="TouchEvent"in w,supportsTouchEvents=onTouchStartInWindow||touchEventInWindow&&matchMedia$1("(any-pointer: coarse)").matches;(w.navigator.maxTouchPoints||0)>0;var userAgent$5=w.navigator.userAgent||"",isIPad=matchMedia$1("(pointer: coarse)").matches&&/iPad|Macintosh/.test(userAgent$5)&&Math.min(w.screen.width||0,w.screen.height||0)>=768;(matchMedia$1("(pointer: coarse)").matches||!matchMedia$1("(pointer: fine)").matches&&onTouchStartInWindow)&&/Windows.*Firefox/.test(userAgent$5);matchMedia$1("(any-pointer: fine)").matches||matchMedia$1("(any-hover: hover)").matches;const DROPDOWN_MENU_OPEN="DROPDOWN_MENU_OPEN",DROPDOWN_MENU_CLOSE="DROPDOWN_MENU_CLOSE",openDropdownMenu=()=>({type:DROPDOWN_MENU_OPEN}),closeDropdownMenu=()=>({type:DROPDOWN_MENU_CLOSE}),MODAL_OPEN="MODAL_OPEN",MODAL_CLOSE="MODAL_CLOSE";function openModal(_e,et){return tt=>{tt(closeModal(_e)),tt(openModalSuccess(_e,et))}}const openModalSuccess=(_e,et)=>({type:MODAL_OPEN,modalType:_e,modalProps:et});function closeModal(_e){return{type:MODAL_CLOSE,modalType:_e}}const useAppDispatch=()=>useDispatch();function useGetState(){const _e=useAppDispatch();return()=>_e((et,tt)=>tt())}const useApi=()=>{const _e=useGetState();return api(_e)},useAppSelector=useSelector,useInstance=()=>useAppSelector(_e=>_e.instance),useBackend=()=>{const _e=useInstance();return parseVersion(_e.version)},useClickOutside=(_e,et)=>{const tt=reactExports.useCallback(nt=>{if(nt.target){const rt=nt.target,at=_e.floating.current,it=_e.reference.current;at!=null&&at.contains(rt)||it!=null&&it.contains(rt)||et(nt)}},[_e.floating.current,_e.reference.current]);reactExports.useEffect(()=>(window.addEventListener("click",tt),()=>{window.removeEventListener("click",tt)}),[])},useCompose=_e=>useAppSelector(et=>et.compose.get(_e,et.compose.get("default")));function useDraggedFiles(_e,et){const[tt,nt]=reactExports.useState(!1),[rt,at]=reactExports.useState(!1),it=reactExports.useCallback(ft=>{isDraggingFiles(ft)&&nt(!0)},[nt]),ot=reactExports.useCallback(ft=>{isDraggedOffscreen(ft)&&nt(!1)},[nt]),st=reactExports.useCallback(ft=>{nt(!1),at(!1)},[nt]),ct=reactExports.useCallback(ft=>{isDraggingFiles(ft)&&at(!0)},[at]),ut=reactExports.useCallback(ft=>{(!_e.current||isDraggedOutOfNode(ft,_e.current))&&at(!1)},[at]),dt=reactExports.useCallback(ft=>{isDraggingFiles(ft)&&et&&et(ft.dataTransfer.files),nt(!1),at(!1),ft.preventDefault()},[et]);return reactExports.useEffect(()=>(document.addEventListener("dragenter",it),document.addEventListener("dragleave",ot),document.addEventListener("drop",st),()=>{document.removeEventListener("dragenter",it),document.removeEventListener("dragleave",ot),document.removeEventListener("drop",st)}),[]),reactExports.useEffect(()=>{var ft,pt,mt;return(ft=_e.current)==null||ft.addEventListener("dragenter",ct),(pt=_e.current)==null||pt.addEventListener("dragleave",ut),(mt=_e.current)==null||mt.addEventListener("drop",dt),()=>{var ht,Et,yt;(ht=_e.current)==null||ht.removeEventListener("dragenter",ct),(Et=_e.current)==null||Et.removeEventListener("dragleave",ut),(yt=_e.current)==null||yt.removeEventListener("drop",dt)}},[_e.current]),{isDragging:tt,isDraggedOver:rt}}function isDraggingFiles(_e){if(_e.dataTransfer){const{types:et}=_e.dataTransfer;return et.length===1&&et[0]==="Files"}else return!1}function isDraggedOffscreen(_e){return _e.screenX===0&&_e.screenY===0}function isDraggedOutOfNode(_e,et){return!et.contains(document.elementFromPoint(_e.clientX,_e.clientY))}const selectCache=(_e,et)=>_e.entities[et[0]],selectList=(_e,et)=>{var rt;const[,...tt]=et,nt=tt.join(":");return(rt=selectCache(_e,et))==null?void 0:rt.lists[nt]};function selectListState(_e,et,tt){var rt;const nt=(rt=selectList(_e,et))==null?void 0:rt.state;return nt?nt[tt]:void 0}function useListState(_e,et){return useAppSelector(tt=>selectListState(tt,_e,et))}function selectEntity(_e,et,tt){var nt;return(nt=_e.entities[et])==null?void 0:nt.store[tt]}function selectEntities(_e,et){const tt=selectCache(_e,et),nt=selectList(_e,et),rt=nt==null?void 0:nt.ids;return rt?Array.from(rt).reduce((at,it)=>{const ot=tt==null?void 0:tt.store[it];return ot&&at.push(ot),at},[]):[]}function findEntity(_e,et,tt){const nt=_e.entities[et];if(nt)return Object.values(nt.store).find(tt)}function parseEntitiesPath(_e){const[et,...tt]=_e,nt=(tt||[]).join(":");return{entityType:et,listKey:nt,path:[et,nt]}}function useEntities(_e,et,tt={}){const nt=useApi(),rt=useAppDispatch(),at=useGetState(),{entityType:it,listKey:ot,path:st}=parseEntitiesPath(_e),ct=useAppSelector(Tt=>selectEntities(Tt,st)),ut=tt.schema||z$1.custom(),dt=tt.enabled??!0,ft=useListState(st,"fetching"),pt=useListState(st,"lastFetchedAt"),mt=useListState(st,"fetched"),ht=!!useListState(st,"error"),Et=useListState(st,"totalCount"),yt=useListState(st,"invalid"),vt=useListState(st,"next"),gt=useListState(st,"prev"),St=async(Tt,Ct,Nt=!1)=>{if(!selectListState(at(),st,"fetching")){rt(entitiesFetchRequest(it,ot));try{const kt=await Tt(),Pt=filteredArray(ut).parse(kt.data),Ft=realNumberSchema.safeParse(kt.headers["x-total-count"]),Dt=Ft.success?Ft.data:void 0;rt(entitiesFetchSuccess(Pt,it,ot,Ct,{next:getNextLink(kt),prev:getPrevLink(kt),totalCount:Number(Dt)>=Pt.length?Dt:void 0,fetching:!1,fetched:!0,error:null,lastFetchedAt:new Date,invalid:!1},Nt))}catch(kt){rt(entitiesFetchFail(it,ot,kt))}}},Rt=async()=>{await St(et,"end",!0)},$t=async()=>{vt&&await St(()=>nt.get(vt),"end")},bt=async()=>{gt&&await St(()=>nt.get(gt),"start")},wt=()=>{rt(invalidateEntityList$1(it,ot))},xt=tt.staleTime??6e4;return reactExports.useEffect(()=>{if(!dt||ft)return;const Tt=!pt,Ct=pt?Date.now()>=pt.getTime()+xt:!1;(yt||Tt||Ct)&&Rt()},[dt,...st]),{entities:ct,fetchEntities:Rt,fetchNextPage:$t,fetchPreviousPage:bt,hasNextPage:!!vt,hasPreviousPage:!!gt,totalCount:Et,isError:ht,isFetched:mt,isFetching:ft,isLoading:ft&&ct.length===0,invalidate:wt,count:typeof Et=="number"?Et:ct.length}}function useEntity(_e,et,tt={}){var yt,vt;const[nt,rt]=useLoading(!0),[at,it]=reactExports.useState(),ot=useAppDispatch(),[st,ct]=_e,ut=z$1.custom(),dt=tt.schema||ut,ft=useAppSelector(gt=>selectEntity(gt,st,ct)),pt=tt.enabled??!0,mt=nt&&!ft,ht=!nt&&!!ft,Et=async()=>{try{const gt=await rt(et()),St=dt.parse(gt.data);ot(importEntities$1([St],st))}catch(gt){it(gt)}};return reactExports.useEffect(()=>{!pt||at||(!ft||tt.refetch)&&Et()},[pt]),{entity:ft,fetchEntity:Et,isFetching:nt,isLoading:mt,isLoaded:ht,error:at,isUnauthorized:at instanceof AxiosError&&((yt=at.response)==null?void 0:yt.status)===401,isForbidden:at instanceof AxiosError&&((vt=at.response)==null?void 0:vt.status)===403}}function useCreateEntity(_e,et,tt={}){const nt=useAppDispatch(),[rt,at]=useLoading(),{entityType:it,listKey:ot}=parseEntitiesPath(_e);async function st(ct,ut={}){try{const dt=await at(et(ct)),pt=(tt.schema||z$1.custom()).parse(dt.data);nt(importEntities$1([pt],it,ot,"start")),ut.onSuccess&&ut.onSuccess(pt)}catch(dt){if(dt instanceof AxiosError)ut.onError&&ut.onError(dt);else throw dt}}return{createEntity:st,isSubmitting:rt}}function useDeleteEntity(_e,et){const tt=useAppDispatch(),nt=useGetState(),[rt,at]=useLoading();async function it(ot,st={}){var ut;const ct=(ut=nt().entities[_e])==null?void 0:ut.store[ot];tt(deleteEntities$1([ot],_e,{preserveLists:!0}));try{await at(et(ot)),tt(deleteEntities$1([ot],_e)),st.onSuccess&&st.onSuccess(ot)}catch(dt){ct&&tt(importEntities$1([ct],_e)),st.onError&&st.onError(dt)}}return{deleteEntity:it,isSubmitting:rt}}function useEntityActions(_e,et,tt={}){const nt=useApi(),{entityType:rt,path:at}=parseEntitiesPath(_e),{deleteEntity:it,isSubmitting:ot}=useDeleteEntity(rt,ft=>nt.delete(et.delete.replace(/:id/g,ft))),{createEntity:st,isSubmitting:ct}=useCreateEntity(at,ft=>nt.post(et.post,ft),tt),{createEntity:ut,isSubmitting:dt}=useCreateEntity(at,ft=>nt.patch(et.patch,ft),tt);return{createEntity:st,deleteEntity:it,updateEntity:ut,isSubmitting:ct||ot||dt}}function useEntityLookup(_e,et,tt,nt={}){var mt,ht;const{schema:rt=z$1.custom()}=nt,at=useAppDispatch(),[it,ot]=useLoading(!0),[st,ct]=reactExports.useState(),ut=useAppSelector(Et=>findEntity(Et,_e,et)),dt=nt.enabled??!0,ft=it&&!ut,pt=async()=>{try{const Et=await ot(tt()),yt=rt.parse(Et.data);at(importEntities$1([yt],_e))}catch(Et){ct(Et)}};return reactExports.useEffect(()=>{dt&&(!ut||nt.refetch)&&pt()},[dt]),{entity:ut,fetchEntity:pt,isFetching:it,isLoading:ft,isUnauthorized:st instanceof AxiosError&&((mt=st.response)==null?void 0:mt.status)===401,isForbidden:st instanceof AxiosError&&((ht=st.response)==null?void 0:ht.status)===403}}function useDismissEntity(_e,et){const tt=useAppDispatch(),[nt,rt]=useLoading(),{entityType:at,listKey:it}=parseEntitiesPath(_e);async function ot(st){const ct=await rt(et(st));return tt(dismissEntities$1([st],at,it)),ct}return{dismissEntity:ot,isLoading:nt}}function useTransaction(){const _e=useAppDispatch();function et(tt){_e(entitiesTransaction(tt))}return{transaction:et}}function useRelationship(_e,et={}){const tt=useApi(),{enabled:nt=!1}=et,{entity:rt,...at}=useEntity([Entities.RELATIONSHIPS,_e],()=>tt.get(`/api/v1/accounts/relationships?id[]=${_e}`),{enabled:nt&&!!_e,schema:z$1.array(relationshipSchema).nonempty().transform(it=>it[0])});return{relationship:rt,...at}}function useAccount(_e,et={}){var ht;const tt=useApi(),nt=useHistory(),rt=useFeatures(),{me:at}=useLoggedIn(),{withRelationship:it}=et,{entity:ot,isUnauthorized:st,...ct}=useEntity([Entities.ACCOUNTS,_e],()=>tt.get(`/api/v1/accounts/${_e}`),{schema:accountSchema,enabled:!!_e}),{relationship:ut,isLoading:dt}=useRelationship(_e,{enabled:it}),ft=((ht=ot==null?void 0:ot.relationship)==null?void 0:ht.blocked_by)===!0,pt=at===(ot==null?void 0:ot.id)?!1:ft&&!rt.blockersVisible,mt=reactExports.useMemo(()=>ot?{...ot,relationship:ut}:void 0,[ot,ut]);return reactExports.useEffect(()=>{st&&nt.push("/login")},[st]),{...ct,isLoading:ct.isLoading,isRelationshipLoading:dt,isUnauthorized:st,isUnavailable:pt,account:mt}}function useAccountLookup(_e,et={}){var mt;const tt=useApi(),nt=useFeatures(),rt=useHistory(),{me:at}=useLoggedIn(),{withRelationship:it}=et,{entity:ot,isUnauthorized:st,...ct}=useEntityLookup(Entities.ACCOUNTS,ht=>ht.acct.toLowerCase()===(_e==null?void 0:_e.toLowerCase()),()=>tt.get(`/api/v1/accounts/lookup?acct=${_e}`),{schema:accountSchema,enabled:!!_e}),{relationship:ut,isLoading:dt}=useRelationship(ot==null?void 0:ot.id,{enabled:it}),ft=((mt=ot==null?void 0:ot.relationship)==null?void 0:mt.blocked_by)===!0,pt=at===(ot==null?void 0:ot.id)?!1:ft&&!nt.blockersVisible;return reactExports.useEffect(()=>{st&&rt.push("/login")},[st]),{...ct,isLoading:ct.isLoading,isRelationshipLoading:dt,isUnauthorized:st,isUnavailable:pt,account:ot?{...ot,relationship:ut}:void 0}}function useBatchedEntities(_e,et,tt,nt={}){const rt=useGetState(),at=useAppDispatch(),{entityType:it,listKey:ot,path:st}=parseEntitiesPath(_e),ct=nt.schema||z$1.custom(),ut=nt.enabled??!0,dt=useListState(st,"fetching"),ft=useListState(st,"lastFetchedAt"),pt=useListState(st,"fetched"),mt=useListState(st,"invalid"),ht=useListState(st,"error"),Et=useAppSelector(gt=>{const St=selectCache(gt,st);return St?et.filter(Rt=>!St.store[Rt]):et}),yt=useAppSelector(gt=>selectEntityMap(gt,st,et));async function vt(){if(!selectListState(rt(),st,"fetching")){at(entitiesFetchRequest(it,ot));try{const St=await tt(Et),Rt=filteredArray(ct).parse(St.data);at(entitiesFetchSuccess(Rt,it,ot,"end",{next:void 0,prev:void 0,totalCount:void 0,fetching:!1,fetched:!0,error:null,lastFetchedAt:new Date,invalid:!1}))}catch(St){at(entitiesFetchFail(it,ot,St))}}}return reactExports.useEffect(()=>{Et.length&&ut&&vt()},[Et.length]),{entityMap:yt,isFetching:dt,lastFetchedAt:ft,isFetched:pt,isError:!!ht,isInvalid:mt}}function selectEntityMap(_e,et,tt){const nt=selectCache(_e,et);return tt.reduce((rt,at)=>{const it=nt==null?void 0:nt.store[at];return it&&(rt[at]=it),rt},{})}function useFollow(){const _e=useApi(),et=useAppDispatch(),{isLoggedIn:tt}=useLoggedIn(),{transaction:nt}=useTransaction();function rt(st){nt({Accounts:{[st]:ct=>({...ct,followers_count:ct.followers_count+1})},Relationships:{[st]:ct=>({...ct,following:!0})}})}function at(st){nt({Accounts:{[st]:ct=>({...ct,followers_count:Math.max(0,ct.followers_count-1)})},Relationships:{[st]:ct=>({...ct,following:!1})}})}async function it(st,ct={}){if(tt){rt(st);try{const ut=await _e.post(`/api/v1/accounts/${st}/follow`,ct),dt=relationshipSchema.safeParse(ut.data);dt.success&&et(importEntities$1([dt.data],Entities.RELATIONSHIPS))}catch{at(st)}}}async function ot(st){if(tt){at(st);try{await _e.post(`/api/v1/accounts/${st}/unfollow`)}catch{rt(st)}}}return{follow:it,unfollow:ot,followEffect:rt,unfollowEffect:at}}function useBlockGroupMember(_e,et){const{createEntity:tt}=useEntityActions([Entities.GROUP_MEMBERSHIPS,et.id],{post:`/api/v1/groups/${_e==null?void 0:_e.id}/blocks`});return tt}function useCancelMembershipRequest(_e){const et=useApi(),{account:tt}=useOwnAccount(),{createEntity:nt,isSubmitting:rt}=useCreateEntity([Entities.GROUP_RELATIONSHIPS],()=>et.post(`/api/v1/groups/${_e.id}/membership_requests/${tt==null?void 0:tt.id}/reject`));return{mutate:nt,isSubmitting:rt}}function useGroupRelationship(_e){const et=useApi(),{entity:tt,...nt}=useEntity([Entities.GROUP_RELATIONSHIPS,_e],()=>et.get(`/api/v1/groups/relationships?id[]=${_e}`),{enabled:!!_e,schema:z$1.array(groupRelationshipSchema).nonempty().transform(rt=>rt[0])});return{groupRelationship:tt,...nt}}function useGroup(_e,et=!0){const tt=useApi(),nt=useHistory(),{entity:rt,isUnauthorized:at,...it}=useEntity([Entities.GROUPS,_e],()=>tt.get(`/api/v1/groups/${_e}`),{schema:groupSchema,refetch:et,enabled:!!_e}),{groupRelationship:ot}=useGroupRelationship(_e);return reactExports.useEffect(()=>{at&&nt.push("/login")},[at]),{...it,isUnauthorized:at,group:rt?{...rt,relationship:ot||null}:void 0}}const useFeatures=()=>{const _e=useInstance();return getFeatures(_e)};function useGroupLookup(_e){const et=useApi(),tt=useFeatures(),nt=useHistory(),{entity:rt,isUnauthorized:at,...it}=useEntityLookup(Entities.GROUPS,st=>st.slug.toLowerCase()===_e.toLowerCase(),()=>et.get(`/api/v1/groups/lookup?name=${_e}`),{schema:groupSchema,enabled:tt.groups&&!!_e}),{groupRelationship:ot}=useGroupRelationship(rt==null?void 0:rt.id);return reactExports.useEffect(()=>{at&&nt.push("/login")},[at]),{...it,isUnauthorized:at,entity:rt?{...rt,relationship:ot||null}:void 0}}const statusSchema=toSchema(normalizeStatus);function useGroupMedia(_e){const et=useApi();return useEntities([Entities.STATUSES,"groupMedia",_e],()=>et.get(`/api/v1/timelines/group/${_e}?only_media=true`),{schema:statusSchema})}function useGroupMembershipRequests(_e){const et=useApi(),tt=[Entities.ACCOUNTS,"membership_requests",_e],{groupRelationship:nt}=useGroupRelationship(_e),{entities:rt,invalidate:at,fetchEntities:it,...ot}=useEntities(tt,()=>et.get(`/api/v1/groups/${_e}/membership_requests`),{schema:accountSchema,enabled:(nt==null?void 0:nt.role)===GroupRoles.OWNER||(nt==null?void 0:nt.role)===GroupRoles.ADMIN}),{dismissEntity:st}=useDismissEntity(tt,async ut=>{const dt=await et.post(`/api/v1/groups/${_e}/membership_requests/${ut}/authorize`);return at(),dt}),{dismissEntity:ct}=useDismissEntity(tt,async ut=>{const dt=await et.post(`/api/v1/groups/${_e}/membership_requests/${ut}/reject`);return at(),dt});return{accounts:rt,refetch:it,authorize:st,reject:ct,...ot}}function useGroupRelationships(_e,et){const tt=useApi(),{isLoggedIn:nt}=useLoggedIn();function rt(ot){const st=ot.map(ct=>`id[]=${ct}`).join("&");return tt.get(`/api/v1/groups/relationships?${st}`)}const{entityMap:at,...it}=useBatchedEntities([Entities.RELATIONSHIPS,..._e],et,rt,{schema:groupRelationshipSchema,enabled:nt});return{relationships:at,...it}}function useGroups(_e=""){const et=useApi(),tt=useFeatures(),{entities:nt,...rt}=useEntities([Entities.GROUPS,"search",_e],()=>et.get("/api/v1/groups",{params:{q:_e}}),{enabled:tt.groups,schema:groupSchema}),{relationships:at}=useGroupRelationships(["search",_e],nt.map(ot=>ot.id)),it=nt.map(ot=>({...ot,relationship:at[ot.id]||null}));return{...rt,groups:it}}function useJoinGroup(_e){const{invalidate:et}=useGroups(),{createEntity:tt,isSubmitting:nt}=useEntityActions([Entities.GROUP_RELATIONSHIPS,_e.id],{post:`/api/v1/groups/${_e.id}/join`},{schema:groupRelationshipSchema});return{mutate:tt,isSubmitting:nt,invalidate:et}}function useMuteGroup(_e){const{createEntity:et,isSubmitting:tt}=useEntityActions([Entities.GROUP_RELATIONSHIPS,_e==null?void 0:_e.id],{post:`/api/v1/groups/${_e==null?void 0:_e.id}/mute`},{schema:groupRelationshipSchema});return{mutate:et,isSubmitting:tt}}function useLeaveGroup(_e){const{invalidate:et}=useGroups(),{createEntity:tt,isSubmitting:nt}=useEntityActions([Entities.GROUP_RELATIONSHIPS,_e.id],{post:`/api/v1/groups/${_e.id}/leave`},{schema:groupRelationshipSchema});return{mutate:tt,isSubmitting:nt,invalidate:et}}function usePendingGroups(){const _e=useApi(),{account:et}=useOwnAccount(),tt=useFeatures(),{entities:nt,...rt}=useEntities([Entities.GROUPS,et==null?void 0:et.id,"pending"],()=>_e.get("/api/v1/groups",{params:{pending:!0}}),{schema:groupSchema,enabled:!!et&&tt.groupsPending});return{...rt,groups:nt}}function useUnmuteGroup(_e){const{createEntity:et,isSubmitting:tt}=useEntityActions([Entities.GROUP_RELATIONSHIPS,_e==null?void 0:_e.id],{post:`/api/v1/groups/${_e==null?void 0:_e.id}/unmute`},{schema:groupRelationshipSchema});return{mutate:et,isSubmitting:tt}}const ANNOUNCEMENTS_FETCH_REQUEST="ANNOUNCEMENTS_FETCH_REQUEST",ANNOUNCEMENTS_FETCH_SUCCESS="ANNOUNCEMENTS_FETCH_SUCCESS",ANNOUNCEMENTS_FETCH_FAIL="ANNOUNCEMENTS_FETCH_FAIL",ANNOUNCEMENTS_UPDATE="ANNOUNCEMENTS_UPDATE",ANNOUNCEMENTS_DELETE="ANNOUNCEMENTS_DELETE",ANNOUNCEMENTS_DISMISS_SUCCESS="ANNOUNCEMENTS_DISMISS_SUCCESS",ANNOUNCEMENTS_REACTION_ADD_REQUEST="ANNOUNCEMENTS_REACTION_ADD_REQUEST",ANNOUNCEMENTS_REACTION_ADD_SUCCESS="ANNOUNCEMENTS_REACTION_ADD_SUCCESS",ANNOUNCEMENTS_REACTION_ADD_FAIL="ANNOUNCEMENTS_REACTION_ADD_FAIL",ANNOUNCEMENTS_REACTION_REMOVE_REQUEST="ANNOUNCEMENTS_REACTION_REMOVE_REQUEST",ANNOUNCEMENTS_REACTION_REMOVE_SUCCESS="ANNOUNCEMENTS_REACTION_REMOVE_SUCCESS",ANNOUNCEMENTS_REACTION_REMOVE_FAIL="ANNOUNCEMENTS_REACTION_REMOVE_FAIL",ANNOUNCEMENTS_REACTION_UPDATE="ANNOUNCEMENTS_REACTION_UPDATE",ANNOUNCEMENTS_TOGGLE_SHOW="ANNOUNCEMENTS_TOGGLE_SHOW",noOp$b=()=>{},fetchAnnouncements=(_e=noOp$b)=>(et,tt)=>{const{instance:nt}=tt();return getFeatures(nt).announcements?(et(fetchAnnouncementsRequest()),api(tt).get("/api/v1/announcements").then(at=>{et(fetchAnnouncementsSuccess(at.data)),et(importFetchedStatuses(at.data.map(({statuses:it})=>it)))}).catch(at=>{et(fetchAnnouncementsFail(at))}).finally(()=>{_e()})):null},fetchAnnouncementsRequest=()=>({type:ANNOUNCEMENTS_FETCH_REQUEST,skipLoading:!0}),fetchAnnouncementsSuccess=_e=>({type:ANNOUNCEMENTS_FETCH_SUCCESS,announcements:_e,skipLoading:!0}),fetchAnnouncementsFail=_e=>({type:ANNOUNCEMENTS_FETCH_FAIL,error:_e,skipLoading:!0,skipAlert:!0}),updateAnnouncements=_e=>({type:ANNOUNCEMENTS_UPDATE,announcement:_e}),addReaction$1=(_e,et)=>(tt,nt)=>{const rt=nt().announcements.items.find(it=>it.get("id")===_e);let at=!1;if(rt){const it=rt.reactions.find(ot=>ot.name===et);it&&it.me&&(at=!0)}return at||tt(addReactionRequest(_e,et)),api(nt).put(`/api/v1/announcements/${_e}/reactions/${et}`).then(()=>{tt(addReactionSuccess(_e,et))}).catch(it=>{at||tt(addReactionFail(_e,et,it))})},addReactionRequest=(_e,et,tt)=>({type:ANNOUNCEMENTS_REACTION_ADD_REQUEST,id:_e,name:et,skipLoading:!0}),addReactionSuccess=(_e,et,tt)=>({type:ANNOUNCEMENTS_REACTION_ADD_SUCCESS,id:_e,name:et,skipLoading:!0}),addReactionFail=(_e,et,tt)=>({type:ANNOUNCEMENTS_REACTION_ADD_FAIL,id:_e,name:et,error:tt,skipLoading:!0}),removeReaction$1=(_e,et)=>(tt,nt)=>(tt(removeReactionRequest(_e,et)),api(nt).delete(`/api/v1/announcements/${_e}/reactions/${et}`).then(()=>{tt(removeReactionSuccess(_e,et))}).catch(rt=>{tt(removeReactionFail(_e,et,rt))})),removeReactionRequest=(_e,et)=>({type:ANNOUNCEMENTS_REACTION_REMOVE_REQUEST,id:_e,name:et,skipLoading:!0}),removeReactionSuccess=(_e,et)=>({type:ANNOUNCEMENTS_REACTION_REMOVE_SUCCESS,id:_e,name:et,skipLoading:!0}),removeReactionFail=(_e,et,tt)=>({type:ANNOUNCEMENTS_REACTION_REMOVE_FAIL,id:_e,name:et,error:tt,skipLoading:!0}),updateReaction$1=_e=>({type:ANNOUNCEMENTS_REACTION_UPDATE,reaction:_e}),deleteAnnouncement$1=_e=>({type:ANNOUNCEMENTS_DELETE,id:_e});function _typeof$7(_e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$7=function(et){return typeof et}:_typeof$7=function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$7(_e)}function _classCallCheck$d(_e,et){if(!(_e instanceof et))throw new TypeError("Cannot call a class as a function")}function _defineProperties$c(_e,et){for(var tt=0;tt1&&arguments[1]!==void 0?arguments[1]:{};_classCallCheck$d(this,it),this._locale=rt(ot),this._select=et(this._locale),this._type=getType$1(st.type),this._nf=new _e("en",st)}return _createClass$d(it,[{key:"resolvedOptions",value:function(){var st=this._nf.resolvedOptions(),ct=st.minimumIntegerDigits,ut=st.minimumFractionDigits,dt=st.maximumFractionDigits,ft=st.minimumSignificantDigits,pt=st.maximumSignificantDigits,mt={locale:this._locale,minimumIntegerDigits:ct,minimumFractionDigits:ut,maximumFractionDigits:dt,pluralCategories:tt(this._locale,this._type==="ordinal"),type:this._type};return typeof ft=="number"&&(mt.minimumSignificantDigits=ft,mt.maximumSignificantDigits=pt),mt}},{key:"select",value:function(st){if(!(this instanceof it))throw new TypeError("select() called on incompatible ".concat(this));if(typeof st!="number"&&(st=Number(st)),!isFinite(st))return"other";var ct=this._nf.format(Math.abs(st));return this._select(ct,this._type==="ordinal")}}],[{key:"supportedLocalesOf",value:function(st){return canonicalizeLocaleList(st).filter(nt)}}]),it}();return Object.defineProperty(at,"prototype",{writable:!1}),at}const factory=Object.freeze(Object.defineProperty({__proto__:null,default:getPluralRules$1},Symbol.toStringTag,{value:"Module"})),require$$0$2=getAugmentedNamespace(factory);function _classCallCheck$c(_e,et){if(!(_e instanceof et))throw new TypeError("Cannot call a class as a function")}function _defineProperties$b(_e,et){for(var tt=0;tt="0"&&it<="9"&&++rt}return rtthis._maxSD?tt.toPrecision(this._maxSD):nt}return this._minFD>0?tt.toFixed(this._minFD):this._maxFD===0?tt.toFixed(0):String(tt)}}]),_e}(),pseudoNumberFormat=PseudoNumberFormat$1,getPluralRules=require$$0$2,PseudoNumberFormat=pseudoNumberFormat;function _interopDefaultLegacy$1(_e){return _e&&typeof _e=="object"&&"default"in _e?_e:{default:_e}}var getPluralRules__default=_interopDefaultLegacy$1(getPluralRules),PseudoNumberFormat__default=_interopDefaultLegacy$1(PseudoNumberFormat);function _typeof$6(_e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$6=function(et){return typeof et}:_typeof$6=function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$6(_e)}var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof commonjsGlobal$2<"u"?commonjsGlobal$2:typeof self<"u"?self:{};function getDefaultExportFromCjs(_e){return _e&&_e.__esModule&&Object.prototype.hasOwnProperty.call(_e,"default")?_e.default:_e}var plurals$1={exports:{}};(function(_e,et){var tt=function(ct,ut){return ut?"other":ct==1?"one":"other"},nt=function(ct,ut){return ut?"other":ct==0||ct==1?"one":"other"},rt=function(ct,ut){return ut?"other":ct>=0&&ct<=1?"one":"other"},at=function(ct,ut){var dt=String(ct).split("."),ft=!dt[1];return ut?"other":ct==1&&ft?"one":"other"},it=function(ct,ut){return"other"},ot=function(ct,ut){return ut?"other":ct==1?"one":ct==2?"two":"other"};(function(st,ct){Object.defineProperty(ct,"__esModule",{value:!0}),_e.exports=ct})(commonjsGlobal,{_in:it,af:tt,ak:nt,am:rt,an:tt,ar:function(ct,ut){var dt=String(ct).split("."),ft=Number(dt[0])==ct,pt=ft&&dt[0].slice(-2);return ut?"other":ct==0?"zero":ct==1?"one":ct==2?"two":pt>=3&&pt<=10?"few":pt>=11&&pt<=99?"many":"other"},ars:function(ct,ut){var dt=String(ct).split("."),ft=Number(dt[0])==ct,pt=ft&&dt[0].slice(-2);return ut?"other":ct==0?"zero":ct==1?"one":ct==2?"two":pt>=3&&pt<=10?"few":pt>=11&&pt<=99?"many":"other"},as:function(ct,ut){return ut?ct==1||ct==5||ct==7||ct==8||ct==9||ct==10?"one":ct==2||ct==3?"two":ct==4?"few":ct==6?"many":"other":ct>=0&&ct<=1?"one":"other"},asa:tt,ast:at,az:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=ft.slice(-1),mt=ft.slice(-2),ht=ft.slice(-3);return ut?pt==1||pt==2||pt==5||pt==7||pt==8||mt==20||mt==50||mt==70||mt==80?"one":pt==3||pt==4||ht==100||ht==200||ht==300||ht==400||ht==500||ht==600||ht==700||ht==800||ht==900?"few":ft==0||pt==6||mt==40||mt==60||mt==90?"many":"other":ct==1?"one":"other"},be:function(ct,ut){var dt=String(ct).split("."),ft=Number(dt[0])==ct,pt=ft&&dt[0].slice(-1),mt=ft&&dt[0].slice(-2);return ut?(pt==2||pt==3)&&mt!=12&&mt!=13?"few":"other":pt==1&&mt!=11?"one":pt>=2&&pt<=4&&(mt<12||mt>14)?"few":ft&&pt==0||pt>=5&&pt<=9||mt>=11&&mt<=14?"many":"other"},bem:tt,bez:tt,bg:tt,bho:nt,bm:it,bn:function(ct,ut){return ut?ct==1||ct==5||ct==7||ct==8||ct==9||ct==10?"one":ct==2||ct==3?"two":ct==4?"few":ct==6?"many":"other":ct>=0&&ct<=1?"one":"other"},bo:it,br:function(ct,ut){var dt=String(ct).split("."),ft=Number(dt[0])==ct,pt=ft&&dt[0].slice(-1),mt=ft&&dt[0].slice(-2),ht=ft&&dt[0].slice(-6);return ut?"other":pt==1&&mt!=11&&mt!=71&&mt!=91?"one":pt==2&&mt!=12&&mt!=72&&mt!=92?"two":(pt==3||pt==4||pt==9)&&(mt<10||mt>19)&&(mt<70||mt>79)&&(mt<90||mt>99)?"few":ct!=0&&ft&&ht==0?"many":"other"},brx:tt,bs:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=dt[1]||"",mt=!dt[1],ht=ft.slice(-1),Et=ft.slice(-2),yt=pt.slice(-1),vt=pt.slice(-2);return ut?"other":mt&&ht==1&&Et!=11||yt==1&&vt!=11?"one":mt&&ht>=2&&ht<=4&&(Et<12||Et>14)||yt>=2&&yt<=4&&(vt<12||vt>14)?"few":"other"},ca:function(ct,ut){var dt=String(ct).split("."),ft=!dt[1];return ut?ct==1||ct==3?"one":ct==2?"two":ct==4?"few":"other":ct==1&&ft?"one":"other"},ce:tt,ceb:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=dt[1]||"",mt=!dt[1],ht=ft.slice(-1),Et=pt.slice(-1);return ut?"other":mt&&(ft==1||ft==2||ft==3)||mt&&ht!=4&&ht!=6&&ht!=9||!mt&&Et!=4&&Et!=6&&Et!=9?"one":"other"},cgg:tt,chr:tt,ckb:tt,cs:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=!dt[1];return ut?"other":ct==1&&pt?"one":ft>=2&&ft<=4&&pt?"few":pt?"other":"many"},cy:function(ct,ut){return ut?ct==0||ct==7||ct==8||ct==9?"zero":ct==1?"one":ct==2?"two":ct==3||ct==4?"few":ct==5||ct==6?"many":"other":ct==0?"zero":ct==1?"one":ct==2?"two":ct==3?"few":ct==6?"many":"other"},da:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=Number(dt[0])==ct;return ut?"other":ct==1||!pt&&(ft==0||ft==1)?"one":"other"},de:at,doi:rt,dsb:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=dt[1]||"",mt=!dt[1],ht=ft.slice(-2),Et=pt.slice(-2);return ut?"other":mt&&ht==1||Et==1?"one":mt&&ht==2||Et==2?"two":mt&&(ht==3||ht==4)||Et==3||Et==4?"few":"other"},dv:tt,dz:it,ee:tt,el:tt,en:function(ct,ut){var dt=String(ct).split("."),ft=!dt[1],pt=Number(dt[0])==ct,mt=pt&&dt[0].slice(-1),ht=pt&&dt[0].slice(-2);return ut?mt==1&&ht!=11?"one":mt==2&&ht!=12?"two":mt==3&&ht!=13?"few":"other":ct==1&&ft?"one":"other"},eo:tt,es:tt,et:at,eu:tt,fa:rt,ff:function(ct,ut){return ut?"other":ct>=0&&ct<2?"one":"other"},fi:at,fil:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=dt[1]||"",mt=!dt[1],ht=ft.slice(-1),Et=pt.slice(-1);return ut?ct==1?"one":"other":mt&&(ft==1||ft==2||ft==3)||mt&&ht!=4&&ht!=6&&ht!=9||!mt&&Et!=4&&Et!=6&&Et!=9?"one":"other"},fo:tt,fr:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=!dt[1],mt=ft.slice(-6);return ut?ct==1?"one":"other":ct>=0&&ct<2?"one":ft!=0&&mt==0&&pt?"many":"other"},fur:tt,fy:at,ga:function(ct,ut){var dt=String(ct).split("."),ft=Number(dt[0])==ct;return ut?ct==1?"one":"other":ct==1?"one":ct==2?"two":ft&&ct>=3&&ct<=6?"few":ft&&ct>=7&&ct<=10?"many":"other"},gd:function(ct,ut){var dt=String(ct).split("."),ft=Number(dt[0])==ct;return ut?ct==1||ct==11?"one":ct==2||ct==12?"two":ct==3||ct==13?"few":"other":ct==1||ct==11?"one":ct==2||ct==12?"two":ft&&ct>=3&&ct<=10||ft&&ct>=13&&ct<=19?"few":"other"},gl:at,gsw:tt,gu:function(ct,ut){return ut?ct==1?"one":ct==2||ct==3?"two":ct==4?"few":ct==6?"many":"other":ct>=0&&ct<=1?"one":"other"},guw:nt,gv:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=!dt[1],mt=ft.slice(-1),ht=ft.slice(-2);return ut?"other":pt&&mt==1?"one":pt&&mt==2?"two":pt&&(ht==0||ht==20||ht==40||ht==60||ht==80)?"few":pt?"other":"many"},ha:tt,haw:tt,he:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=!dt[1],mt=Number(dt[0])==ct,ht=mt&&dt[0].slice(-1);return ut?"other":ct==1&&pt?"one":ft==2&&pt?"two":pt&&(ct<0||ct>10)&&mt&&ht==0?"many":"other"},hi:function(ct,ut){return ut?ct==1?"one":ct==2||ct==3?"two":ct==4?"few":ct==6?"many":"other":ct>=0&&ct<=1?"one":"other"},hr:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=dt[1]||"",mt=!dt[1],ht=ft.slice(-1),Et=ft.slice(-2),yt=pt.slice(-1),vt=pt.slice(-2);return ut?"other":mt&&ht==1&&Et!=11||yt==1&&vt!=11?"one":mt&&ht>=2&&ht<=4&&(Et<12||Et>14)||yt>=2&&yt<=4&&(vt<12||vt>14)?"few":"other"},hsb:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=dt[1]||"",mt=!dt[1],ht=ft.slice(-2),Et=pt.slice(-2);return ut?"other":mt&&ht==1||Et==1?"one":mt&&ht==2||Et==2?"two":mt&&(ht==3||ht==4)||Et==3||Et==4?"few":"other"},hu:function(ct,ut){return ut?ct==1||ct==5?"one":"other":ct==1?"one":"other"},hy:function(ct,ut){return ut?ct==1?"one":"other":ct>=0&&ct<2?"one":"other"},ia:at,id:it,ig:it,ii:it,io:at,is:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=Number(dt[0])==ct,mt=ft.slice(-1),ht=ft.slice(-2);return ut?"other":pt&&mt==1&&ht!=11||!pt?"one":"other"},it:function(ct,ut){var dt=String(ct).split("."),ft=!dt[1];return ut?ct==11||ct==8||ct==80||ct==800?"many":"other":ct==1&&ft?"one":"other"},iu:ot,iw:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=!dt[1],mt=Number(dt[0])==ct,ht=mt&&dt[0].slice(-1);return ut?"other":ct==1&&pt?"one":ft==2&&pt?"two":pt&&(ct<0||ct>10)&&mt&&ht==0?"many":"other"},ja:it,jbo:it,jgo:tt,ji:at,jmc:tt,jv:it,jw:it,ka:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=ft.slice(-2);return ut?ft==1?"one":ft==0||pt>=2&&pt<=20||pt==40||pt==60||pt==80?"many":"other":ct==1?"one":"other"},kab:function(ct,ut){return ut?"other":ct>=0&&ct<2?"one":"other"},kaj:tt,kcg:tt,kde:it,kea:it,kk:function(ct,ut){var dt=String(ct).split("."),ft=Number(dt[0])==ct,pt=ft&&dt[0].slice(-1);return ut?pt==6||pt==9||ft&&pt==0&&ct!=0?"many":"other":ct==1?"one":"other"},kkj:tt,kl:tt,km:it,kn:rt,ko:it,ks:tt,ksb:tt,ksh:function(ct,ut){return ut?"other":ct==0?"zero":ct==1?"one":"other"},ku:tt,kw:function(ct,ut){var dt=String(ct).split("."),ft=Number(dt[0])==ct,pt=ft&&dt[0].slice(-2),mt=ft&&dt[0].slice(-3),ht=ft&&dt[0].slice(-5),Et=ft&&dt[0].slice(-6);return ut?ft&&ct>=1&&ct<=4||pt>=1&&pt<=4||pt>=21&&pt<=24||pt>=41&&pt<=44||pt>=61&&pt<=64||pt>=81&&pt<=84?"one":ct==5||pt==5?"many":"other":ct==0?"zero":ct==1?"one":pt==2||pt==22||pt==42||pt==62||pt==82||ft&&mt==0&&(ht>=1e3&&ht<=2e4||ht==4e4||ht==6e4||ht==8e4)||ct!=0&&Et==1e5?"two":pt==3||pt==23||pt==43||pt==63||pt==83?"few":ct!=1&&(pt==1||pt==21||pt==41||pt==61||pt==81)?"many":"other"},ky:tt,lag:function(ct,ut){var dt=String(ct).split("."),ft=dt[0];return ut?"other":ct==0?"zero":(ft==0||ft==1)&&ct!=0?"one":"other"},lb:tt,lg:tt,lij:function(ct,ut){var dt=String(ct).split("."),ft=!dt[1],pt=Number(dt[0])==ct;return ut?ct==11||ct==8||pt&&ct>=80&&ct<=89||pt&&ct>=800&&ct<=899?"many":"other":ct==1&&ft?"one":"other"},lkt:it,ln:nt,lo:function(ct,ut){return ut&&ct==1?"one":"other"},lt:function(ct,ut){var dt=String(ct).split("."),ft=dt[1]||"",pt=Number(dt[0])==ct,mt=pt&&dt[0].slice(-1),ht=pt&&dt[0].slice(-2);return ut?"other":mt==1&&(ht<11||ht>19)?"one":mt>=2&&mt<=9&&(ht<11||ht>19)?"few":ft!=0?"many":"other"},lv:function(ct,ut){var dt=String(ct).split("."),ft=dt[1]||"",pt=ft.length,mt=Number(dt[0])==ct,ht=mt&&dt[0].slice(-1),Et=mt&&dt[0].slice(-2),yt=ft.slice(-2),vt=ft.slice(-1);return ut?"other":mt&&ht==0||Et>=11&&Et<=19||pt==2&&yt>=11&&yt<=19?"zero":ht==1&&Et!=11||pt==2&&vt==1&&yt!=11||pt!=2&&vt==1?"one":"other"},mas:tt,mg:nt,mgo:tt,mk:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=dt[1]||"",mt=!dt[1],ht=ft.slice(-1),Et=ft.slice(-2),yt=pt.slice(-1),vt=pt.slice(-2);return ut?ht==1&&Et!=11?"one":ht==2&&Et!=12?"two":(ht==7||ht==8)&&Et!=17&&Et!=18?"many":"other":mt&&ht==1&&Et!=11||yt==1&&vt!=11?"one":"other"},ml:tt,mn:tt,mo:function(ct,ut){var dt=String(ct).split("."),ft=!dt[1],pt=Number(dt[0])==ct,mt=pt&&dt[0].slice(-2);return ut?ct==1?"one":"other":ct==1&&ft?"one":!ft||ct==0||mt>=2&&mt<=19?"few":"other"},mr:function(ct,ut){return ut?ct==1?"one":ct==2||ct==3?"two":ct==4?"few":"other":ct==1?"one":"other"},ms:function(ct,ut){return ut&&ct==1?"one":"other"},mt:function(ct,ut){var dt=String(ct).split("."),ft=Number(dt[0])==ct,pt=ft&&dt[0].slice(-2);return ut?"other":ct==1?"one":ct==0||pt>=2&&pt<=10?"few":pt>=11&&pt<=19?"many":"other"},my:it,nah:tt,naq:ot,nb:tt,nd:tt,ne:function(ct,ut){var dt=String(ct).split("."),ft=Number(dt[0])==ct;return ut?ft&&ct>=1&&ct<=4?"one":"other":ct==1?"one":"other"},nl:at,nn:tt,nnh:tt,no:tt,nqo:it,nr:tt,nso:nt,ny:tt,nyn:tt,om:tt,or:function(ct,ut){var dt=String(ct).split("."),ft=Number(dt[0])==ct;return ut?ct==1||ct==5||ft&&ct>=7&&ct<=9?"one":ct==2||ct==3?"two":ct==4?"few":ct==6?"many":"other":ct==1?"one":"other"},os:tt,osa:it,pa:nt,pap:tt,pcm:rt,pl:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=!dt[1],mt=ft.slice(-1),ht=ft.slice(-2);return ut?"other":ct==1&&pt?"one":pt&&mt>=2&&mt<=4&&(ht<12||ht>14)?"few":pt&&ft!=1&&(mt==0||mt==1)||pt&&mt>=5&&mt<=9||pt&&ht>=12&&ht<=14?"many":"other"},prg:function(ct,ut){var dt=String(ct).split("."),ft=dt[1]||"",pt=ft.length,mt=Number(dt[0])==ct,ht=mt&&dt[0].slice(-1),Et=mt&&dt[0].slice(-2),yt=ft.slice(-2),vt=ft.slice(-1);return ut?"other":mt&&ht==0||Et>=11&&Et<=19||pt==2&&yt>=11&&yt<=19?"zero":ht==1&&Et!=11||pt==2&&vt==1&&yt!=11||pt!=2&&vt==1?"one":"other"},ps:tt,pt:function(ct,ut){var dt=String(ct).split("."),ft=dt[0];return ut?"other":ft==0||ft==1?"one":"other"},pt_PT:at,rm:tt,ro:function(ct,ut){var dt=String(ct).split("."),ft=!dt[1],pt=Number(dt[0])==ct,mt=pt&&dt[0].slice(-2);return ut?ct==1?"one":"other":ct==1&&ft?"one":!ft||ct==0||mt>=2&&mt<=19?"few":"other"},rof:tt,root:it,ru:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=!dt[1],mt=ft.slice(-1),ht=ft.slice(-2);return ut?"other":pt&&mt==1&&ht!=11?"one":pt&&mt>=2&&mt<=4&&(ht<12||ht>14)?"few":pt&&mt==0||pt&&mt>=5&&mt<=9||pt&&ht>=11&&ht<=14?"many":"other"},rwk:tt,sah:it,saq:tt,sat:ot,sc:function(ct,ut){var dt=String(ct).split("."),ft=!dt[1];return ut?ct==11||ct==8||ct==80||ct==800?"many":"other":ct==1&&ft?"one":"other"},scn:function(ct,ut){var dt=String(ct).split("."),ft=!dt[1];return ut?ct==11||ct==8||ct==80||ct==800?"many":"other":ct==1&&ft?"one":"other"},sd:tt,sdh:tt,se:ot,seh:tt,ses:it,sg:it,sh:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=dt[1]||"",mt=!dt[1],ht=ft.slice(-1),Et=ft.slice(-2),yt=pt.slice(-1),vt=pt.slice(-2);return ut?"other":mt&&ht==1&&Et!=11||yt==1&&vt!=11?"one":mt&&ht>=2&&ht<=4&&(Et<12||Et>14)||yt>=2&&yt<=4&&(vt<12||vt>14)?"few":"other"},shi:function(ct,ut){var dt=String(ct).split("."),ft=Number(dt[0])==ct;return ut?"other":ct>=0&&ct<=1?"one":ft&&ct>=2&&ct<=10?"few":"other"},si:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=dt[1]||"";return ut?"other":ct==0||ct==1||ft==0&&pt==1?"one":"other"},sk:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=!dt[1];return ut?"other":ct==1&&pt?"one":ft>=2&&ft<=4&&pt?"few":pt?"other":"many"},sl:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=!dt[1],mt=ft.slice(-2);return ut?"other":pt&&mt==1?"one":pt&&mt==2?"two":pt&&(mt==3||mt==4)||!pt?"few":"other"},sma:ot,smi:ot,smj:ot,smn:ot,sms:ot,sn:tt,so:tt,sq:function(ct,ut){var dt=String(ct).split("."),ft=Number(dt[0])==ct,pt=ft&&dt[0].slice(-1),mt=ft&&dt[0].slice(-2);return ut?ct==1?"one":pt==4&&mt!=14?"many":"other":ct==1?"one":"other"},sr:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=dt[1]||"",mt=!dt[1],ht=ft.slice(-1),Et=ft.slice(-2),yt=pt.slice(-1),vt=pt.slice(-2);return ut?"other":mt&&ht==1&&Et!=11||yt==1&&vt!=11?"one":mt&&ht>=2&&ht<=4&&(Et<12||Et>14)||yt>=2&&yt<=4&&(vt<12||vt>14)?"few":"other"},ss:tt,ssy:tt,st:tt,su:it,sv:function(ct,ut){var dt=String(ct).split("."),ft=!dt[1],pt=Number(dt[0])==ct,mt=pt&&dt[0].slice(-1),ht=pt&&dt[0].slice(-2);return ut?(mt==1||mt==2)&&ht!=11&&ht!=12?"one":"other":ct==1&&ft?"one":"other"},sw:at,syr:tt,ta:tt,te:tt,teo:tt,th:it,ti:nt,tig:tt,tk:function(ct,ut){var dt=String(ct).split("."),ft=Number(dt[0])==ct,pt=ft&&dt[0].slice(-1);return ut?pt==6||pt==9||ct==10?"few":"other":ct==1?"one":"other"},tl:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=dt[1]||"",mt=!dt[1],ht=ft.slice(-1),Et=pt.slice(-1);return ut?ct==1?"one":"other":mt&&(ft==1||ft==2||ft==3)||mt&&ht!=4&&ht!=6&&ht!=9||!mt&&Et!=4&&Et!=6&&Et!=9?"one":"other"},tn:tt,to:it,tr:tt,ts:tt,tzm:function(ct,ut){var dt=String(ct).split("."),ft=Number(dt[0])==ct;return ut?"other":ct==0||ct==1||ft&&ct>=11&&ct<=99?"one":"other"},ug:tt,uk:function(ct,ut){var dt=String(ct).split("."),ft=dt[0],pt=!dt[1],mt=Number(dt[0])==ct,ht=mt&&dt[0].slice(-1),Et=mt&&dt[0].slice(-2),yt=ft.slice(-1),vt=ft.slice(-2);return ut?ht==3&&Et!=13?"few":"other":pt&&yt==1&&vt!=11?"one":pt&&yt>=2&&yt<=4&&(vt<12||vt>14)?"few":pt&&yt==0||pt&&yt>=5&&yt<=9||pt&&vt>=11&&vt<=14?"many":"other"},ur:at,uz:tt,ve:tt,vi:function(ct,ut){return ut&&ct==1?"one":"other"},vo:tt,vun:tt,wa:nt,wae:tt,wo:it,xh:tt,xog:tt,yi:at,yo:it,yue:it,zh:it,zu:rt})})(plurals$1);var plurals=getDefaultExportFromCjs(plurals$1.exports),P=Object.freeze(Object.assign(Object.create(null),plurals$1.exports,{default:plurals})),pluralCategories$1={exports:{}};(function(_e,et){var tt="zero",nt="one",rt="two",at="few",it="many",ot="other",st={cardinal:[nt,ot],ordinal:[ot]},ct={cardinal:[ot],ordinal:[ot]},ut={cardinal:[nt,at,it,ot],ordinal:[ot]},dt={cardinal:[nt,ot],ordinal:[nt,ot]},ft={cardinal:[nt,rt,ot],ordinal:[ot]};(function(pt,mt){Object.defineProperty(mt,"__esModule",{value:!0}),_e.exports=mt})(commonjsGlobal,{_in:ct,af:st,ak:st,am:st,an:st,ar:{cardinal:[tt,nt,rt,at,it,ot],ordinal:[ot]},ars:{cardinal:[tt,nt,rt,at,it,ot],ordinal:[ot]},as:{cardinal:[nt,ot],ordinal:[nt,rt,at,it,ot]},asa:st,ast:st,az:{cardinal:[nt,ot],ordinal:[nt,at,it,ot]},be:{cardinal:[nt,at,it,ot],ordinal:[at,ot]},bem:st,bez:st,bg:st,bho:st,bm:ct,bn:{cardinal:[nt,ot],ordinal:[nt,rt,at,it,ot]},bo:ct,br:{cardinal:[nt,rt,at,it,ot],ordinal:[ot]},brx:st,bs:{cardinal:[nt,at,ot],ordinal:[ot]},ca:{cardinal:[nt,ot],ordinal:[nt,rt,at,ot]},ce:st,ceb:st,cgg:st,chr:st,ckb:st,cs:ut,cy:{cardinal:[tt,nt,rt,at,it,ot],ordinal:[tt,nt,rt,at,it,ot]},da:st,de:st,doi:st,dsb:{cardinal:[nt,rt,at,ot],ordinal:[ot]},dv:st,dz:ct,ee:st,el:st,en:{cardinal:[nt,ot],ordinal:[nt,rt,at,ot]},eo:st,es:st,et:st,eu:st,fa:st,ff:st,fi:st,fil:dt,fo:st,fr:{cardinal:[nt,it,ot],ordinal:[nt,ot]},fur:st,fy:st,ga:{cardinal:[nt,rt,at,it,ot],ordinal:[nt,ot]},gd:{cardinal:[nt,rt,at,ot],ordinal:[nt,rt,at,ot]},gl:st,gsw:st,gu:{cardinal:[nt,ot],ordinal:[nt,rt,at,it,ot]},guw:st,gv:{cardinal:[nt,rt,at,it,ot],ordinal:[ot]},ha:st,haw:st,he:{cardinal:[nt,rt,it,ot],ordinal:[ot]},hi:{cardinal:[nt,ot],ordinal:[nt,rt,at,it,ot]},hr:{cardinal:[nt,at,ot],ordinal:[ot]},hsb:{cardinal:[nt,rt,at,ot],ordinal:[ot]},hu:dt,hy:dt,ia:st,id:ct,ig:ct,ii:ct,io:st,is:st,it:{cardinal:[nt,ot],ordinal:[it,ot]},iu:ft,iw:{cardinal:[nt,rt,it,ot],ordinal:[ot]},ja:ct,jbo:ct,jgo:st,ji:st,jmc:st,jv:ct,jw:ct,ka:{cardinal:[nt,ot],ordinal:[nt,it,ot]},kab:st,kaj:st,kcg:st,kde:ct,kea:ct,kk:{cardinal:[nt,ot],ordinal:[it,ot]},kkj:st,kl:st,km:ct,kn:st,ko:ct,ks:st,ksb:st,ksh:{cardinal:[tt,nt,ot],ordinal:[ot]},ku:st,kw:{cardinal:[tt,nt,rt,at,it,ot],ordinal:[nt,it,ot]},ky:st,lag:{cardinal:[tt,nt,ot],ordinal:[ot]},lb:st,lg:st,lij:{cardinal:[nt,ot],ordinal:[it,ot]},lkt:ct,ln:st,lo:{cardinal:[ot],ordinal:[nt,ot]},lt:ut,lv:{cardinal:[tt,nt,ot],ordinal:[ot]},mas:st,mg:st,mgo:st,mk:{cardinal:[nt,ot],ordinal:[nt,rt,it,ot]},ml:st,mn:st,mo:{cardinal:[nt,at,ot],ordinal:[nt,ot]},mr:{cardinal:[nt,ot],ordinal:[nt,rt,at,ot]},ms:{cardinal:[ot],ordinal:[nt,ot]},mt:ut,my:ct,nah:st,naq:ft,nb:st,nd:st,ne:dt,nl:st,nn:st,nnh:st,no:st,nqo:ct,nr:st,nso:st,ny:st,nyn:st,om:st,or:{cardinal:[nt,ot],ordinal:[nt,rt,at,it,ot]},os:st,osa:ct,pa:st,pap:st,pcm:st,pl:ut,prg:{cardinal:[tt,nt,ot],ordinal:[ot]},ps:st,pt:st,pt_PT:st,rm:st,ro:{cardinal:[nt,at,ot],ordinal:[nt,ot]},rof:st,root:ct,ru:ut,rwk:st,sah:ct,saq:st,sat:ft,sc:{cardinal:[nt,ot],ordinal:[it,ot]},scn:{cardinal:[nt,ot],ordinal:[it,ot]},sd:st,sdh:st,se:ft,seh:st,ses:ct,sg:ct,sh:{cardinal:[nt,at,ot],ordinal:[ot]},shi:{cardinal:[nt,at,ot],ordinal:[ot]},si:st,sk:ut,sl:{cardinal:[nt,rt,at,ot],ordinal:[ot]},sma:ft,smi:ft,smj:ft,smn:ft,sms:ft,sn:st,so:st,sq:{cardinal:[nt,ot],ordinal:[nt,it,ot]},sr:{cardinal:[nt,at,ot],ordinal:[ot]},ss:st,ssy:st,st,su:ct,sv:dt,sw:st,syr:st,ta:st,te:st,teo:st,th:ct,ti:st,tig:st,tk:{cardinal:[nt,ot],ordinal:[at,ot]},tl:dt,tn:st,to:ct,tr:st,ts:st,tzm:st,ug:st,uk:{cardinal:[nt,at,it,ot],ordinal:[at,ot]},ur:st,uz:st,ve:st,vi:{cardinal:[ot],ordinal:[nt,ot]},vo:st,vun:st,wa:st,wae:st,wo:ct,xh:st,xog:st,yi:st,yo:ct,yue:ct,zh:ct,zu:st})})(pluralCategories$1);var pluralCategories=getDefaultExportFromCjs(pluralCategories$1.exports),C=Object.freeze(Object.assign(Object.create(null),pluralCategories$1.exports,{default:pluralCategories})),Plurals=plurals||P,Categories=pluralCategories||C,NumberFormat=(typeof Intl>"u"?"undefined":_typeof$6(Intl))==="object"&&Intl.NumberFormat||PseudoNumberFormat__default.default,id$3=function(et){return et==="in"?"_in":et==="pt-PT"?"pt_PT":et},getSelector=function(et){return Plurals[id$3(et)]},getCategories=function(et,tt){return Categories[id$3(et)][tt?"ordinal":"cardinal"]},PluralRules$1=getPluralRules__default.default(NumberFormat,getSelector,getCategories),pluralRules=PluralRules$1,PluralRules=pluralRules;function _interopDefaultLegacy(_e){return _e&&typeof _e=="object"&&"default"in _e?_e:{default:_e}}var PluralRules__default=_interopDefaultLegacy(PluralRules);if(typeof Intl>"u")typeof commonjsGlobal$2<"u"?commonjsGlobal$2.Intl={PluralRules:PluralRules__default.default}:typeof window<"u"?window.Intl={PluralRules:PluralRules__default.default}:commonjsGlobal$2.Intl={PluralRules:PluralRules__default.default},PluralRules__default.default.polyfill=!0;else if(!Intl.PluralRules)Intl.PluralRules=PluralRules__default.default,PluralRules__default.default.polyfill=!0;else{var test$1=["en","es","ru","zh"],supported=Intl.PluralRules.supportedLocalesOf(test$1);supported.lengthet?1:-1:_e.length>et.length?1:-1}function compareDate(_e,et){const tt=new Date(_e),nt=new Date(et);return nttt?1:0}const NOTIFICATION_TYPES=["follow","follow_request","mention","reblog","favourite","group_favourite","group_reblog","poll","status","move","pleroma:chat_mention","pleroma:emoji_reaction","user_approved","update","pleroma:event_reminder","pleroma:participation_request","pleroma:participation_accepted"],EXCLUDE_TYPES=["pleroma:chat_mention","chat"],validType=_e=>NOTIFICATION_TYPES.includes(_e);function assertPath(_e){if(typeof _e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(_e))}function normalizeStringPosix(_e,et){for(var tt="",nt=0,rt=-1,at=0,it,ot=0;ot<=_e.length;++ot){if(ot<_e.length)it=_e.charCodeAt(ot);else{if(it===47)break;it=47}if(it===47){if(!(rt===ot-1||at===1))if(rt!==ot-1&&at===2){if(tt.length<2||nt!==2||tt.charCodeAt(tt.length-1)!==46||tt.charCodeAt(tt.length-2)!==46){if(tt.length>2){var st=tt.lastIndexOf("/");if(st!==tt.length-1){st===-1?(tt="",nt=0):(tt=tt.slice(0,st),nt=tt.length-1-tt.lastIndexOf("/")),rt=ot,at=0;continue}}else if(tt.length===2||tt.length===1){tt="",nt=0,rt=ot,at=0;continue}}et&&(tt.length>0?tt+="/..":tt="..",nt=2)}else tt.length>0?tt+="/"+_e.slice(rt+1,ot):tt=_e.slice(rt+1,ot),nt=ot-rt-1;rt=ot,at=0}else it===46&&at!==-1?++at:at=-1}return tt}function _format(_e,et){var tt=et.dir||et.root,nt=et.base||(et.name||"")+(et.ext||"");return tt?tt===et.root?tt+nt:tt+_e+nt:nt}var posix={resolve:function(){for(var et="",tt=!1,nt,rt=arguments.length-1;rt>=-1&&!tt;rt--){var at;rt>=0?at=arguments[rt]:(nt===void 0&&(nt=process.cwd()),at=nt),assertPath(at),at.length!==0&&(et=at+"/"+et,tt=at.charCodeAt(0)===47)}return et=normalizeStringPosix(et,!tt),tt?et.length>0?"/"+et:"/":et.length>0?et:"."},normalize:function(et){if(assertPath(et),et.length===0)return".";var tt=et.charCodeAt(0)===47,nt=et.charCodeAt(et.length-1)===47;return et=normalizeStringPosix(et,!tt),et.length===0&&!tt&&(et="."),et.length>0&&nt&&(et+="/"),tt?"/"+et:et},isAbsolute:function(et){return assertPath(et),et.length>0&&et.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var et,tt=0;tt0&&(et===void 0?et=nt:et+="/"+nt)}return et===void 0?".":posix.normalize(et)},relative:function(et,tt){if(assertPath(et),assertPath(tt),et===tt||(et=posix.resolve(et),tt=posix.resolve(tt),et===tt))return"";for(var nt=1;ntct){if(tt.charCodeAt(it+dt)===47)return tt.slice(it+dt+1);if(dt===0)return tt.slice(it+dt)}else at>ct&&(et.charCodeAt(nt+dt)===47?ut=dt:dt===0&&(ut=0));break}var ft=et.charCodeAt(nt+dt),pt=tt.charCodeAt(it+dt);if(ft!==pt)break;ft===47&&(ut=dt)}var mt="";for(dt=nt+ut+1;dt<=rt;++dt)(dt===rt||et.charCodeAt(dt)===47)&&(mt.length===0?mt+="..":mt+="/..");return mt.length>0?mt+tt.slice(it+ut):(it+=ut,tt.charCodeAt(it)===47&&++it,tt.slice(it))},_makeLong:function(et){return et},dirname:function(et){if(assertPath(et),et.length===0)return".";for(var tt=et.charCodeAt(0),nt=tt===47,rt=-1,at=!0,it=et.length-1;it>=1;--it)if(tt=et.charCodeAt(it),tt===47){if(!at){rt=it;break}}else at=!1;return rt===-1?nt?"/":".":nt&&rt===1?"//":et.slice(0,rt)},basename:function(et,tt){if(tt!==void 0&&typeof tt!="string")throw new TypeError('"ext" argument must be a string');assertPath(et);var nt=0,rt=-1,at=!0,it;if(tt!==void 0&&tt.length>0&&tt.length<=et.length){if(tt.length===et.length&&tt===et)return"";var ot=tt.length-1,st=-1;for(it=et.length-1;it>=0;--it){var ct=et.charCodeAt(it);if(ct===47){if(!at){nt=it+1;break}}else st===-1&&(at=!1,st=it+1),ot>=0&&(ct===tt.charCodeAt(ot)?--ot===-1&&(rt=it):(ot=-1,rt=st))}return nt===rt?rt=st:rt===-1&&(rt=et.length),et.slice(nt,rt)}else{for(it=et.length-1;it>=0;--it)if(et.charCodeAt(it)===47){if(!at){nt=it+1;break}}else rt===-1&&(at=!1,rt=it+1);return rt===-1?"":et.slice(nt,rt)}},extname:function(et){assertPath(et);for(var tt=-1,nt=0,rt=-1,at=!0,it=0,ot=et.length-1;ot>=0;--ot){var st=et.charCodeAt(ot);if(st===47){if(!at){nt=ot+1;break}continue}rt===-1&&(at=!1,rt=ot+1),st===46?tt===-1?tt=ot:it!==1&&(it=1):tt!==-1&&(it=-1)}return tt===-1||rt===-1||it===0||it===1&&tt===rt-1&&tt===nt+1?"":et.slice(tt,rt)},format:function(et){if(et===null||typeof et!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof et);return _format("/",et)},parse:function(et){assertPath(et);var tt={root:"",dir:"",base:"",ext:"",name:""};if(et.length===0)return tt;var nt=et.charCodeAt(0),rt=nt===47,at;rt?(tt.root="/",at=1):at=0;for(var it=-1,ot=0,st=-1,ct=!0,ut=et.length-1,dt=0;ut>=at;--ut){if(nt=et.charCodeAt(ut),nt===47){if(!ct){ot=ut+1;break}continue}st===-1&&(ct=!1,st=ut+1),nt===46?it===-1?it=ut:dt!==1&&(dt=1):it!==-1&&(dt=-1)}return it===-1||st===-1||dt===0||dt===1&&it===st-1&&it===ot+1?st!==-1&&(ot===0&&rt?tt.base=tt.name=et.slice(1,st):tt.base=tt.name=et.slice(ot,st)):(ot===0&&rt?(tt.name=et.slice(1,it),tt.base=et.slice(1,st)):(tt.name=et.slice(ot,it),tt.base=et.slice(ot,st)),tt.ext=et.slice(it,st)),ot>0?tt.dir=et.slice(0,ot-1):rt&&(tt.dir="/"),tt},sep:"/",delimiter:":",win32:null,posix:null};posix.posix=posix;var pathBrowserify=posix;const joinPublicPath=(..._e)=>pathBrowserify.join(FE_SUBDIRECTORY,..._e),GROUP_CREATE_SUCCESS="GROUP_CREATE_SUCCESS",GROUP_UPDATE_SUCCESS="GROUP_UPDATE_SUCCESS",GROUP_DELETE_SUCCESS="GROUP_DELETE_SUCCESS",GROUP_FETCH_REQUEST="GROUP_FETCH_REQUEST",GROUP_FETCH_FAIL="GROUP_FETCH_FAIL",GROUP_RELATIONSHIPS_FETCH_REQUEST="GROUP_RELATIONSHIPS_FETCH_REQUEST",GROUP_RELATIONSHIPS_FETCH_SUCCESS="GROUP_RELATIONSHIPS_FETCH_SUCCESS",GROUP_RELATIONSHIPS_FETCH_FAIL="GROUP_RELATIONSHIPS_FETCH_FAIL",GROUP_KICK_REQUEST="GROUP_KICK_REQUEST",GROUP_KICK_SUCCESS="GROUP_KICK_SUCCESS",GROUP_BLOCKS_FETCH_REQUEST="GROUP_BLOCKS_FETCH_REQUEST",GROUP_BLOCKS_FETCH_SUCCESS="GROUP_BLOCKS_FETCH_SUCCESS",GROUP_BLOCKS_FETCH_FAIL="GROUP_BLOCKS_FETCH_FAIL",GROUP_BLOCKS_EXPAND_REQUEST="GROUP_BLOCKS_EXPAND_REQUEST",GROUP_BLOCKS_EXPAND_SUCCESS="GROUP_BLOCKS_EXPAND_SUCCESS",GROUP_BLOCKS_EXPAND_FAIL="GROUP_BLOCKS_EXPAND_FAIL",GROUP_BLOCK_SUCCESS="GROUP_BLOCK_SUCCESS",GROUP_UNBLOCK_REQUEST="GROUP_UNBLOCK_REQUEST",GROUP_UNBLOCK_SUCCESS="GROUP_UNBLOCK_SUCCESS",GROUP_UNBLOCK_FAIL="GROUP_UNBLOCK_FAIL",GROUP_PROMOTE_SUCCESS="GROUP_PROMOTE_SUCCESS",GROUP_DEMOTE_SUCCESS="GROUP_DEMOTE_SUCCESS",GROUP_MEMBERSHIPS_FETCH_REQUEST="GROUP_MEMBERSHIPS_FETCH_REQUEST",GROUP_MEMBERSHIPS_FETCH_SUCCESS="GROUP_MEMBERSHIPS_FETCH_SUCCESS",GROUP_MEMBERSHIPS_FETCH_FAIL="GROUP_MEMBERSHIPS_FETCH_FAIL",GROUP_MEMBERSHIPS_EXPAND_REQUEST="GROUP_MEMBERSHIPS_EXPAND_REQUEST",GROUP_MEMBERSHIPS_EXPAND_SUCCESS="GROUP_MEMBERSHIPS_EXPAND_SUCCESS",GROUP_MEMBERSHIPS_EXPAND_FAIL="GROUP_MEMBERSHIPS_EXPAND_FAIL",GROUP_MEMBERSHIP_REQUESTS_FETCH_REQUEST="GROUP_MEMBERSHIP_REQUESTS_FETCH_REQUEST",GROUP_MEMBERSHIP_REQUESTS_FETCH_SUCCESS="GROUP_MEMBERSHIP_REQUESTS_FETCH_SUCCESS",GROUP_MEMBERSHIP_REQUESTS_FETCH_FAIL="GROUP_MEMBERSHIP_REQUESTS_FETCH_FAIL",GROUP_MEMBERSHIP_REQUESTS_EXPAND_REQUEST="GROUP_MEMBERSHIP_REQUESTS_EXPAND_REQUEST",GROUP_MEMBERSHIP_REQUESTS_EXPAND_SUCCESS="GROUP_MEMBERSHIP_REQUESTS_EXPAND_SUCCESS",GROUP_MEMBERSHIP_REQUESTS_EXPAND_FAIL="GROUP_MEMBERSHIP_REQUESTS_EXPAND_FAIL",GROUP_MEMBERSHIP_REQUEST_AUTHORIZE_SUCCESS="GROUP_MEMBERSHIP_REQUEST_AUTHORIZE_SUCCESS",GROUP_MEMBERSHIP_REQUEST_REJECT_SUCCESS="GROUP_MEMBERSHIP_REQUEST_REJECT_SUCCESS",fetchGroupRelationships=_e=>(et,tt)=>{const nt=tt(),rt=nt.group_relationships,at=_e.filter(it=>rt.get(it,null)===null);if(!(!nt.me||at.length===0))return et(fetchGroupRelationshipsRequest(at)),api(tt).get(`/api/v1/groups/relationships?${at.map(it=>`id[]=${it}`).join("&")}`).then(it=>{et(fetchGroupRelationshipsSuccess(it.data))}).catch(it=>{et(fetchGroupRelationshipsFail(it))})},fetchGroupRelationshipsRequest=_e=>({type:GROUP_RELATIONSHIPS_FETCH_REQUEST,ids:_e,skipLoading:!0}),fetchGroupRelationshipsSuccess=_e=>({type:GROUP_RELATIONSHIPS_FETCH_SUCCESS,relationships:_e,skipLoading:!0}),fetchGroupRelationshipsFail=_e=>({type:GROUP_RELATIONSHIPS_FETCH_FAIL,error:_e,skipLoading:!0,skipNotFound:!0}),groupKick=(_e,et)=>(tt,nt)=>(tt(groupKickRequest(_e,et)),api(nt).post(`/api/v1/groups/${_e}/kick`,{account_ids:[et]}).then(()=>tt(groupKickSuccess(_e,et))).catch(rt=>tt(groupKickFail(_e,et,rt)))),groupKickRequest=(_e,et)=>({type:GROUP_KICK_REQUEST,groupId:_e,accountId:et}),groupKickSuccess=(_e,et)=>({type:GROUP_KICK_SUCCESS,groupId:_e,accountId:et}),groupKickFail=(_e,et,tt)=>({type:GROUP_KICK_SUCCESS,groupId:_e,accountId:et,error:tt}),fetchGroupBlocks=_e=>(et,tt)=>(et(fetchGroupBlocksRequest(_e)),api(tt).get(`/api/v1/groups/${_e}/blocks`).then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");et(importFetchedAccounts(nt.data)),et(fetchGroupBlocksSuccess(_e,nt.data,rt?rt.uri:null))}).catch(nt=>{et(fetchGroupBlocksFail(_e,nt))})),fetchGroupBlocksRequest=_e=>({type:GROUP_BLOCKS_FETCH_REQUEST,id:_e}),fetchGroupBlocksSuccess=(_e,et,tt)=>({type:GROUP_BLOCKS_FETCH_SUCCESS,id:_e,accounts:et,next:tt}),fetchGroupBlocksFail=(_e,et)=>({type:GROUP_BLOCKS_FETCH_FAIL,id:_e,error:et,skipNotFound:!0}),groupUnblock=(_e,et)=>(tt,nt)=>(tt(groupUnblockRequest(_e,et)),api(nt).delete(`/api/v1/groups/${_e}/blocks?account_ids[]=${et}`).then(()=>tt(groupUnblockSuccess(_e,et))).catch(rt=>tt(groupUnblockFail(_e,et,rt)))),groupUnblockRequest=(_e,et)=>({type:GROUP_UNBLOCK_REQUEST,groupId:_e,accountId:et}),groupUnblockSuccess=(_e,et)=>({type:GROUP_UNBLOCK_SUCCESS,groupId:_e,accountId:et}),groupUnblockFail=(_e,et,tt)=>({type:GROUP_UNBLOCK_FAIL,groupId:_e,accountId:et,error:tt}),MARKER_FETCH_REQUEST="MARKER_FETCH_REQUEST",MARKER_FETCH_SUCCESS="MARKER_FETCH_SUCCESS",MARKER_FETCH_FAIL="MARKER_FETCH_FAIL",MARKER_SAVE_REQUEST="MARKER_SAVE_REQUEST",MARKER_SAVE_SUCCESS="MARKER_SAVE_SUCCESS",MARKER_SAVE_FAIL="MARKER_SAVE_FAIL",fetchMarker=_e=>(et,tt)=>(et({type:MARKER_FETCH_REQUEST}),api(tt).get("/api/v1/markers",{params:{timeline:_e}}).then(({data:nt})=>{et({type:MARKER_FETCH_SUCCESS,marker:nt})}).catch(nt=>{et({type:MARKER_FETCH_FAIL,error:nt})})),saveMarker=_e=>(et,tt)=>(et({type:MARKER_SAVE_REQUEST,marker:_e}),api(tt).post("/api/v1/markers",_e).then(({data:nt})=>{et({type:MARKER_SAVE_SUCCESS,marker:nt})}).catch(nt=>{et({type:MARKER_SAVE_FAIL,error:nt})})),NOTIFICATIONS_UPDATE="NOTIFICATIONS_UPDATE",NOTIFICATIONS_UPDATE_NOOP="NOTIFICATIONS_UPDATE_NOOP",NOTIFICATIONS_UPDATE_QUEUE="NOTIFICATIONS_UPDATE_QUEUE",NOTIFICATIONS_DEQUEUE="NOTIFICATIONS_DEQUEUE",NOTIFICATIONS_EXPAND_REQUEST="NOTIFICATIONS_EXPAND_REQUEST",NOTIFICATIONS_EXPAND_SUCCESS="NOTIFICATIONS_EXPAND_SUCCESS",NOTIFICATIONS_EXPAND_FAIL="NOTIFICATIONS_EXPAND_FAIL",NOTIFICATIONS_FILTER_SET="NOTIFICATIONS_FILTER_SET",NOTIFICATIONS_CLEAR="NOTIFICATIONS_CLEAR",NOTIFICATIONS_SCROLL_TOP="NOTIFICATIONS_SCROLL_TOP",NOTIFICATIONS_MARK_READ_REQUEST="NOTIFICATIONS_MARK_READ_REQUEST",MAX_QUEUED_NOTIFICATIONS=40,fetchRelatedRelationships=(_e,et)=>{const tt=et.filter(nt=>nt.type==="follow").map(nt=>nt.account.id);tt.length>0&&_e(fetchRelationships(tt))},updateNotifications=_e=>(et,tt)=>{const nt=getSettings(tt()).getIn(["notifications","shows",_e.type],!0);_e.account&&et(importFetchedAccount$1(_e.account)),_e.target&&et(importFetchedAccount$1(_e.target)),_e.status&&et(importFetchedStatus(_e.status)),nt&&(et({type:NOTIFICATIONS_UPDATE,notification:_e}),fetchRelatedRelationships(et,[_e]))},updateNotificationsQueue$1=(_e,et,tt,nt)=>(rt,at)=>{var dt;if(!_e.type||_e.type==="pleroma:chat_mention"||_e.type==="chat")return;const it=getSettings(at()).getIn(["notifications","alerts",_e.type]),ot=getFilters(at(),{contextType:"notifications"}),st=getSettings(at()).getIn(["notifications","sounds",_e.type]);let ct=!1;const ut=nt==="/notifications";if(["mention","status"].includes(_e.type)){const ft=regexFromFilters(ot),pt=_e.status.spoiler_text+` -`+unescapeHTML(_e.status.content);ct=ft&&ft.test(pt)}try{const ft=((dt=window.Notification)==null?void 0:dt.permission)==="granted";if(it&&!ct&&ft){const pt=new IntlMessageFormat(et[`notification.${_e.type}`],tt).format({name:_e.account.display_name.length>0?_e.account.display_name:_e.account.username}),mt=_e.status&&_e.status.spoiler_text.length>0?_e.status.spoiler_text:unescapeHTML(_e.status?_e.status.content:"");navigator.serviceWorker.ready.then(ht=>{ht.showNotification(pt,{body:mt,icon:_e.account.avatar,tag:_e.id,data:{url:joinPublicPath("/notifications")}}).catch(console.error)}).catch(console.error)}}catch(ft){console.warn(ft)}st&&!ct&&rt({type:NOTIFICATIONS_UPDATE_NOOP,meta:{sound:"boop"}}),rt(ut?{type:NOTIFICATIONS_UPDATE_QUEUE,notification:_e,intlMessages:et,intlLocale:tt}:updateNotifications(_e))},dequeueNotifications=()=>(_e,et)=>{const tt=et().notifications.queuedNotifications,nt=et().notifications.totalQueuedNotificationsCount;nt!==0&&(nt>0&&nt<=MAX_QUEUED_NOTIFICATIONS?tt.forEach(rt=>{_e(updateNotifications(rt.notification))}):_e(expandNotifications()),_e({type:NOTIFICATIONS_DEQUEUE}),_e(markReadNotifications()))},excludeTypesFromFilter=_e=>NOTIFICATION_TYPES.filter(et=>et!==_e),noOp$a=()=>new Promise(_e=>_e(void 0)),expandNotifications=({maxId:_e}={},et=noOp$a)=>(tt,nt)=>{if(!isLoggedIn(nt))return tt(noOp$a);const rt=nt(),at=getFeatures(rt.instance),it=getSettings(rt).getIn(["notifications","quickFilter","active"]),ot=rt.notifications,st=!!_e;if(ot.isLoading)return et(),tt(noOp$a);const ct={max_id:_e};return it==="all"?at.notificationsIncludeTypes?ct.types=NOTIFICATION_TYPES.filter(ut=>!EXCLUDE_TYPES.includes(ut)):ct.exclude_types=EXCLUDE_TYPES:at.notificationsIncludeTypes?ct.types=[it]:ct.exclude_types=excludeTypesFromFilter(it),!_e&&ot.items.size>0&&(ct.since_id=ot.getIn(["items",0,"id"])),tt(expandNotificationsRequest(st)),api(nt).get("/api/v1/notifications",{params:ct}).then(ut=>{const dt=getLinks(ut).refs.find(mt=>mt.rel==="next"),ft=ut.data.reduce((mt,ht)=>{var Et,yt,vt;return(Et=ht.account)!=null&&Et.id&&(mt.accounts[ht.account.id]=ht.account),(yt=ht.target)!=null&&yt.id&&(mt.accounts[ht.target.id]=ht.target),(vt=ht.status)!=null&&vt.id&&(mt.statuses[ht.status.id]=ht.status),mt},{accounts:{},statuses:{}});tt(importFetchedAccounts(Object.values(ft.accounts))),tt(importFetchedStatuses(Object.values(ft.statuses)));const pt=Object.values(ft.statuses).filter(mt=>!!mt.group);tt(fetchGroupRelationships(pt.map(mt=>{var ht;return(ht=mt.group)==null?void 0:ht.id}))),tt(expandNotificationsSuccess(ut.data,dt?dt.uri:null,st)),fetchRelatedRelationships(tt,ut.data),et()}).catch(ut=>{tt(expandNotificationsFail(ut,st)),et()})},expandNotificationsRequest=_e=>({type:NOTIFICATIONS_EXPAND_REQUEST,skipLoading:!_e}),expandNotificationsSuccess=(_e,et,tt)=>({type:NOTIFICATIONS_EXPAND_SUCCESS,notifications:_e,next:et,skipLoading:!tt}),expandNotificationsFail=(_e,et)=>({type:NOTIFICATIONS_EXPAND_FAIL,error:_e,skipLoading:!et}),scrollTopNotifications=_e=>et=>{et({type:NOTIFICATIONS_SCROLL_TOP,top:_e}),et(markReadNotifications())},setFilter$1=_e=>et=>{et({type:NOTIFICATIONS_FILTER_SET,path:["notifications","quickFilter","active"],value:_e}),et(expandNotifications()),et(saveSettings())},markReadPleroma=_e=>(et,tt)=>api(tt).post("/api/v1/pleroma/notifications/read",{max_id:_e}),markReadNotifications=()=>(_e,et)=>{var it;if(!isLoggedIn(et))return;const tt=et(),nt=(it=tt.notifications.items.first())==null?void 0:it.id,rt=tt.notifications.lastRead,at=parseVersion(tt.instance.version);nt&&(rt===-1||compareId(nt,rt)>0)&&(_e(saveMarker({notifications:{last_read_id:nt}})),(at.software===PLEROMA||at.software===AKKOMA)&&_e(markReadPleroma(nt)))},shouldFilter=(_e,et)=>Map$3({reblog:_e.reblog!==null,reply:_e.in_reply_to_id!==null,direct:_e.visibility==="direct"}).some((nt,rt)=>et.getIn(["shows",rt])===!1&&nt),TIMELINE_UPDATE="TIMELINE_UPDATE",TIMELINE_DELETE="TIMELINE_DELETE",TIMELINE_CLEAR="TIMELINE_CLEAR",TIMELINE_UPDATE_QUEUE="TIMELINE_UPDATE_QUEUE",TIMELINE_DEQUEUE="TIMELINE_DEQUEUE",TIMELINE_SCROLL_TOP="TIMELINE_SCROLL_TOP",TIMELINE_EXPAND_REQUEST="TIMELINE_EXPAND_REQUEST",TIMELINE_EXPAND_SUCCESS="TIMELINE_EXPAND_SUCCESS",TIMELINE_EXPAND_FAIL="TIMELINE_EXPAND_FAIL",TIMELINE_CONNECT="TIMELINE_CONNECT",TIMELINE_DISCONNECT="TIMELINE_DISCONNECT",TIMELINE_REPLACE="TIMELINE_REPLACE",TIMELINE_INSERT="TIMELINE_INSERT",TIMELINE_CLEAR_FEED_ACCOUNT_ID="TIMELINE_CLEAR_FEED_ACCOUNT_ID",MAX_QUEUED_ITEMS=40,processTimelineUpdate=(_e,et,tt)=>(nt,rt)=>{var ut;const at=rt().me,it=((ut=et.account)==null?void 0:ut.id)===at,ot=!rt().pending_statuses.isEmpty(),st=getSettings(rt()).get(_e,Map$3()),ct=shouldFilter(normalizeStatus(et),st);it&&ot||(nt(importFetchedStatus(et)),nt(ct?updateTimeline$1(_e,et.id):updateTimelineQueue$1(_e,et.id)))},updateTimeline$1=(_e,et,tt)=>nt=>{nt({type:TIMELINE_UPDATE,timeline:_e,statusId:et})},updateTimelineQueue$1=(_e,et,tt)=>nt=>{nt({type:TIMELINE_UPDATE_QUEUE,timeline:_e,statusId:et})},dequeueTimeline=(_e,et,tt)=>(nt,rt)=>{var ot;const it=((ot=rt().timelines.get(_e))==null?void 0:ot.totalQueuedItemsCount)||0;if(!(it<=0)){if(it<=MAX_QUEUED_ITEMS){nt({type:TIMELINE_DEQUEUE,timeline:_e});return}typeof et=="function"?(nt(clearTimeline$1(_e)),et()):_e==="home"?(nt(clearTimeline$1(_e)),nt(expandHomeTimeline(tt))):_e==="community"&&(nt(clearTimeline$1(_e)),nt(expandCommunityTimeline(tt)))}},deleteFromTimelines=_e=>(et,tt)=>{var ot,st;const nt=(st=(ot=tt().statuses.get(_e))==null?void 0:ot.account)==null?void 0:st.id,rt=tt().statuses.filter(ct=>ct.reblog===_e).map(ct=>[ct.id,ct.account.id]),at=tt().statuses.getIn([_e,"reblog"],null);et({type:TIMELINE_DELETE,id:_e,accountId:nt,references:rt,reblogOf:at})},clearTimeline$1=_e=>et=>et({type:TIMELINE_CLEAR,timeline:_e}),noOp$9=()=>{},noOpAsync=()=>()=>new Promise(_e=>_e(void 0)),parseTags=(_e={},et)=>(_e[et]||[]).map(tt=>tt.value),replaceHomeTimeline=(_e,{maxId:et}={},tt)=>(nt,rt)=>{nt({type:TIMELINE_REPLACE,accountId:_e}),nt(expandHomeTimeline({accountId:_e,maxId:et},()=>{nt(insertSuggestionsIntoTimeline()),tt&&tt()}))},expandTimeline=(_e,et,tt={},nt=noOp$9)=>(rt,at)=>{const it=at().timelines.get(_e)||{},ot=!!tt.max_id;if(it.isLoading)return nt(),rt(noOpAsync());!tt.max_id&&!tt.pinned&&(it.items||OrderedSet()).size>0&&!et.includes("max_id=")&&(tt.since_id=it.getIn(["items",0]));const st=!!tt.since_id;return rt(expandTimelineRequest(_e,ot)),api(at).get(et,{params:tt}).then(ct=>{rt(importFetchedStatuses(ct.data));const ut=ct.data.filter(dt=>!!dt.group);rt(fetchGroupRelationships(ut.map(dt=>{var ft;return(ft=dt.group)==null?void 0:ft.id}))),rt(expandTimelineSuccess(_e,ct.data,getNextLink(ct),getPrevLink(ct),ct.status===206,st,ot)),nt()}).catch(ct=>{rt(expandTimelineFail(_e,ct,ot)),nt()})},expandHomeTimeline=({url:_e,accountId:et,maxId:tt}={},nt=noOp$9)=>{const rt=_e||(et?`/api/v1/accounts/${et}/statuses`:"/api/v1/timelines/home"),at={};return!_e&&tt&&(at.max_id=tt),et&&(at.exclude_replies=!0,at.with_muted=!0),expandTimeline("home",rt,at,nt)},expandPublicTimeline=({url:_e,maxId:et,onlyMedia:tt}={},nt=noOp$9)=>expandTimeline(`public${tt?":media":""}`,_e||"/api/v1/timelines/public",_e?{}:{max_id:et,only_media:!!tt},nt),expandRemoteTimeline=(_e,{url:et,maxId:tt,onlyMedia:nt}={},rt=noOp$9)=>expandTimeline(`remote${nt?":media":""}:${_e}`,et||"/api/v1/timelines/public",et?{}:{local:!1,instance:_e,max_id:tt,only_media:!!nt},rt),expandCommunityTimeline=({url:_e,maxId:et,onlyMedia:tt}={},nt=noOp$9)=>expandTimeline(`community${tt?":media":""}`,_e||"/api/v1/timelines/public",_e?{}:{local:!0,max_id:et,only_media:!!tt},nt),expandDirectTimeline=({url:_e,maxId:et}={},tt=noOp$9)=>expandTimeline("direct",_e||"/api/v1/timelines/direct",_e?{}:{max_id:et},tt),expandAccountTimeline=(_e,{url:et,maxId:tt,withReplies:nt}={})=>expandTimeline(`account:${_e}${nt?":with_replies":""}`,et||`/api/v1/accounts/${_e}/statuses`,et?{}:{exclude_replies:!nt,max_id:tt,with_muted:!0,limit:20}),expandAccountFeaturedTimeline=_e=>expandTimeline(`account:${_e}:pinned`,`/api/v1/accounts/${_e}/statuses`,{pinned:!0,with_muted:!0}),expandAccountMediaTimeline=(_e,{url:et,maxId:tt}={})=>expandTimeline(`account:${_e}:media`,et||`/api/v1/accounts/${_e}/statuses`,et?{}:{max_id:tt,only_media:!0,limit:20,with_muted:!0}),expandListTimeline=(_e,{url:et,maxId:tt}={},nt=noOp$9)=>expandTimeline(`list:${_e}`,et||`/api/v1/timelines/list/${_e}`,et?{}:{max_id:tt},nt),expandGroupTimeline=(_e,{maxId:et}={},tt=noOp$9)=>expandTimeline(`group:${_e}`,`/api/v1/timelines/group/${_e}`,{max_id:et},tt),expandGroupFeaturedTimeline=_e=>expandTimeline(`group:${_e}:pinned`,`/api/v1/timelines/group/${_e}`,{pinned:!0}),expandGroupTimelineFromTag=(_e,et,{maxId:tt}={},nt=noOp$9)=>expandTimeline(`group:tags:${_e}:${et}`,`/api/v1/timelines/group/${_e}/tags/${et}`,{max_id:tt},nt),expandGroupMediaTimeline=(_e,{maxId:et}={})=>expandTimeline(`group:${_e}:media`,`/api/v1/timelines/group/${_e}`,{max_id:et,only_media:!0,limit:20,with_muted:!0}),expandHashtagTimeline=(_e,{url:et,maxId:tt,tags:nt}={},rt=noOp$9)=>expandTimeline(`hashtag:${_e}`,et||`/api/v1/timelines/tag/${_e}`,et?{}:{max_id:tt,any:parseTags(nt,"any"),all:parseTags(nt,"all"),none:parseTags(nt,"none")},rt),expandTimelineRequest=(_e,et)=>({type:TIMELINE_EXPAND_REQUEST,timeline:_e,skipLoading:!et}),expandTimelineSuccess=(_e,et,tt,nt,rt,at,it)=>({type:TIMELINE_EXPAND_SUCCESS,timeline:_e,statuses:et,next:tt,prev:nt,partial:rt,isLoadingRecent:at,skipLoading:!it,isLoadingMore:it}),expandTimelineFail=(_e,et,tt)=>({type:TIMELINE_EXPAND_FAIL,timeline:_e,error:et,skipLoading:!tt}),connectTimeline=_e=>({type:TIMELINE_CONNECT,timeline:_e}),disconnectTimeline=_e=>({type:TIMELINE_DISCONNECT,timeline:_e}),scrollTopTimeline=(_e,et)=>({type:TIMELINE_SCROLL_TOP,timeline:_e,top:et}),insertSuggestionsIntoTimeline=()=>(_e,et)=>{_e({type:TIMELINE_INSERT,timeline:"home"})},clearFeedAccountId=()=>(_e,et)=>{_e({type:TIMELINE_CLEAR_FEED_ACCOUNT_ID})};var StatContext=reactExports.createContext({unreadChatsCount:0}),StatProvider=function(et){var tt=et.children,nt=reactExports.useState(0),rt=_slicedToArray$4(nt,2),at=rt[0],it=rt[1],ot=reactExports.useMemo(function(){return{unreadChatsCount:at,setUnreadChatsCount:it}},[at]);return _createRawReactElement(StatContext.Provider,{value:ot},void 0,tt)},useStatContext=function(){return reactExports.useContext(StatContext)};const scriptRel="modulepreload",assetsURL=function(_e){return"/"+_e},seen={},__vitePreload=function(et,tt,nt){if(!tt||tt.length===0)return et();const rt=document.getElementsByTagName("link");return Promise.all(tt.map(at=>{if(at=assetsURL(at),at in seen)return;seen[at]=!0;const it=at.endsWith(".css"),ot=it?'[rel="stylesheet"]':"";if(!!nt)for(let ut=rt.length-1;ut>=0;ut--){const dt=rt[ut];if(dt.href===at&&(!it||dt.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${at}"]${ot}`))return;const ct=document.createElement("link");if(ct.rel=it?"stylesheet":scriptRel,it||(ct.as="script",ct.crossOrigin=""),ct.href=at,document.head.appendChild(ct),it)return new Promise((ut,dt)=>{ct.addEventListener("load",ut),ct.addEventListener("error",()=>dt(new Error(`Unable to preload CSS for ${at}`)))})})).then(()=>et()).catch(at=>{const it=new Event("vite:preloadError",{cancelable:!0});if(it.payload=at,window.dispatchEvent(it),!it.defaultPrevented)throw at})},__variableDynamicImportRuntimeHelper=(_e,et)=>{const tt=_e[et];return tt?typeof tt=="function"?tt():Promise.resolve(tt):new Promise((nt,rt)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(rt.bind(null,new Error("Unknown variable dynamic import: "+et)))})},importCustom=async _e=>{try{return await __variableDynamicImportRuntimeHelper(Object.assign({}),`../../custom/locales/${_e}.json`)}catch{return{default:{}}}},importMessages$2=_e=>__variableDynamicImportRuntimeHelper(Object.assign({"./locales/en.json":()=>__vitePreload(()=>import("./js/en-13e98705.js"),[]),"./locales/id.json":()=>__vitePreload(()=>import("./js/id-cf076250.js"),[]),"./locales/ja.json":()=>__vitePreload(()=>import("./js/ja-83493ca6.js"),[]),"./locales/whitelist_en.json":()=>__vitePreload(()=>import("./js/whitelist_en-eeb5cf20.js"),[]),"./locales/whitelist_id.json":()=>__vitePreload(()=>import("./js/whitelist_id-eeb5cf20.js"),[]),"./locales/whitelist_ja.json":()=>__vitePreload(()=>import("./js/whitelist_ja-eeb5cf20.js"),[])}),`./locales/${_e}.json`),importMessagesWithCustom=async _e=>{try{const et=await Promise.all([importMessages$2(_e),importCustom(_e)]),[tt,nt]=et;return Object.assign(tt.default,nt.default)}catch(et){throw console.error(et),et}},locales=["en","id","ja"],messages$1a=locales.reduce((_e,et)=>(_e[et]=()=>importMessagesWithCustom(et),_e),{});var ListCache$2=_ListCache;function stackClear$1(){this.__data__=new ListCache$2,this.size=0}var _stackClear=stackClear$1;function stackDelete$1(_e){var et=this.__data__,tt=et.delete(_e);return this.size=et.size,tt}var _stackDelete=stackDelete$1;function stackGet$1(_e){return this.__data__.get(_e)}var _stackGet=stackGet$1;function stackHas$1(_e){return this.__data__.has(_e)}var _stackHas=stackHas$1,ListCache$1=_ListCache,Map$2=_Map,MapCache$1=_MapCache,LARGE_ARRAY_SIZE=200;function stackSet$1(_e,et){var tt=this.__data__;if(tt instanceof ListCache$1){var nt=tt.__data__;if(!Map$2||nt.lengthot))return!1;var ct=at.get(_e),ut=at.get(et);if(ct&&ut)return ct==et&&ut==_e;var dt=-1,ft=!0,pt=tt&COMPARE_UNORDERED_FLAG$3?new SetCache:void 0;for(at.set(_e,et),at.set(et,_e);++dt-1&&_e%1==0&&_e-1&&_e%1==0&&_e<=MAX_SAFE_INTEGER}var isLength_1=isLength$3,baseGetTag$1=_baseGetTag,isLength$2=isLength_1,isObjectLike$1=isObjectLike_1,argsTag$1="[object Arguments]",arrayTag$1="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag$1="[object Map]",numberTag="[object Number]",objectTag$2="[object Object]",regexpTag="[object RegExp]",setTag$1="[object Set]",stringTag="[object String]",weakMapTag$1="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0;typedArrayTags[argsTag$1]=typedArrayTags[arrayTag$1]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag$1]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag$1]=typedArrayTags[numberTag]=typedArrayTags[objectTag$2]=typedArrayTags[regexpTag]=typedArrayTags[setTag$1]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag$1]=!1;function baseIsTypedArray$1(_e){return isObjectLike$1(_e)&&isLength$2(_e.length)&&!!typedArrayTags[baseGetTag$1(_e)]}var _baseIsTypedArray=baseIsTypedArray$1;function baseUnary$1(_e){return function(et){return _e(et)}}var _baseUnary=baseUnary$1,_nodeUtil={exports:{}};_nodeUtil.exports;(function(_e,et){var tt=_freeGlobal,nt=et&&!et.nodeType&&et,rt=nt&&!0&&_e&&!_e.nodeType&&_e,at=rt&&rt.exports===nt,it=at&&tt.process,ot=function(){try{var st=rt&&rt.require&&rt.require("util").types;return st||it&&it.binding&&it.binding("util")}catch{}}();_e.exports=ot})(_nodeUtil,_nodeUtil.exports);var _nodeUtilExports=_nodeUtil.exports,baseIsTypedArray=_baseIsTypedArray,baseUnary=_baseUnary,nodeUtil=_nodeUtilExports,nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,isTypedArray$2=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray,isTypedArray_1=isTypedArray$2,baseTimes=_baseTimes,isArguments$1=isArguments_1,isArray$6=isArray_1,isBuffer$1=isBufferExports,isIndex$1=_isIndex,isTypedArray$1=isTypedArray_1,objectProto$4=Object.prototype,hasOwnProperty$5=objectProto$4.hasOwnProperty;function arrayLikeKeys$1(_e,et){var tt=isArray$6(_e),nt=!tt&&isArguments$1(_e),rt=!tt&&!nt&&isBuffer$1(_e),at=!tt&&!nt&&!rt&&isTypedArray$1(_e),it=tt||nt||rt||at,ot=it?baseTimes(_e.length,String):[],st=ot.length;for(var ct in _e)(et||hasOwnProperty$5.call(_e,ct))&&!(it&&(ct=="length"||rt&&(ct=="offset"||ct=="parent")||at&&(ct=="buffer"||ct=="byteLength"||ct=="byteOffset")||isIndex$1(ct,st)))&&ot.push(ct);return ot}var _arrayLikeKeys=arrayLikeKeys$1,objectProto$3=Object.prototype;function isPrototype$1(_e){var et=_e&&_e.constructor,tt=typeof et=="function"&&et.prototype||objectProto$3;return _e===tt}var _isPrototype=isPrototype$1;function overArg$1(_e,et){return function(tt){return _e(et(tt))}}var _overArg=overArg$1,overArg=_overArg,nativeKeys$2=overArg(Object.keys,Object),_nativeKeys=nativeKeys$2,isPrototype=_isPrototype,nativeKeys$1=_nativeKeys,objectProto$2=Object.prototype,hasOwnProperty$4=objectProto$2.hasOwnProperty;function baseKeys$1(_e){if(!isPrototype(_e))return nativeKeys$1(_e);var et=[];for(var tt in Object(_e))hasOwnProperty$4.call(_e,tt)&&tt!="constructor"&&et.push(tt);return et}var _baseKeys=baseKeys$1,isFunction$1=isFunction_1,isLength$1=isLength_1;function isArrayLike$1(_e){return _e!=null&&isLength$1(_e.length)&&!isFunction$1(_e)}var isArrayLike_1=isArrayLike$1,arrayLikeKeys=_arrayLikeKeys,baseKeys=_baseKeys,isArrayLike=isArrayLike_1;function keys$4(_e){return isArrayLike(_e)?arrayLikeKeys(_e):baseKeys(_e)}var keys_1=keys$4,baseGetAllKeys=_baseGetAllKeys,getSymbols=_getSymbols,keys$3=keys_1;function getAllKeys$1(_e){return baseGetAllKeys(_e,keys$3,getSymbols)}var _getAllKeys=getAllKeys$1,getAllKeys=_getAllKeys,COMPARE_PARTIAL_FLAG$3=1,objectProto$1=Object.prototype,hasOwnProperty$3=objectProto$1.hasOwnProperty;function equalObjects$1(_e,et,tt,nt,rt,at){var it=tt&COMPARE_PARTIAL_FLAG$3,ot=getAllKeys(_e),st=ot.length,ct=getAllKeys(et),ut=ct.length;if(st!=ut&&!it)return!1;for(var dt=st;dt--;){var ft=ot[dt];if(!(it?ft in et:hasOwnProperty$3.call(et,ft)))return!1}var pt=at.get(_e),mt=at.get(et);if(pt&&mt)return pt==et&&mt==_e;var ht=!0;at.set(_e,et),at.set(et,_e);for(var Et=it;++dt(_e,et)=>api(et).get("/api/v1/pleroma/chats").then(tt=>{_e({type:CHATS_FETCH_SUCCESS,chats:tt.data})}).catch(tt=>{_e({type:CHATS_FETCH_FAIL,error:tt})}),fetchChatsV2=()=>(_e,et)=>api(et).get("/api/v2/pleroma/chats").then(tt=>{let nt=getLinks(tt).refs.find(rt=>rt.rel==="next");!nt&&tt.data.length&&(nt={uri:`/api/v2/pleroma/chats?max_id=${tt.data[tt.data.length-1].id}&offset=0`}),_e({type:CHATS_FETCH_SUCCESS,chats:tt.data,next:nt?nt.uri:null})}).catch(tt=>{_e({type:CHATS_FETCH_FAIL,error:tt})}),fetchChats=()=>(_e,et)=>{const tt=et(),{instance:nt}=tt,rt=getFeatures(nt);return _e({type:CHATS_FETCH_REQUEST}),rt.chatsV2?_e(fetchChatsV2()):_e(fetchChatsV1())},openChat=_e=>(et,tt)=>{const nt=tt(),rt=getSettings(nt).getIn(["chats","panes"]),at=rt.findIndex(it=>it.get("chat_id")===_e);if(et(markChatRead(_e)),at>-1)return et(changeSetting(["chats","panes",at,"state"],"open"));{const it=Map$3({chat_id:_e,state:"open"});return et(changeSetting(["chats","panes"],rt.push(it)))}},toggleMainWindow=()=>(_e,et)=>{const nt=getSettings(et()).getIn(["chats","mainWindow"])==="minimized"?"open":"minimized";return _e(changeSetting(["chats","mainWindow"],nt))},startChat=_e=>(et,tt)=>(et({type:CHAT_FETCH_REQUEST,accountId:_e}),api(tt).post(`/api/v1/pleroma/chats/by-account-id/${_e}`).then(({data:nt})=>(et({type:CHAT_FETCH_SUCCESS,chat:nt}),nt)).catch(nt=>{et({type:CHAT_FETCH_FAIL,accountId:_e,error:nt})})),markChatRead=(_e,et)=>(tt,nt)=>{const rt=nt().chats.items.get(_e);et||(et=rt.last_message),!(rt.get("unread")<1)&&et&&(tt({type:CHAT_READ_REQUEST,chatId:_e,lastReadId:et}),api(nt).post(`/api/v1/pleroma/chats/${_e}/read`,{last_read_id:et}).then(({data:at})=>{tt({type:CHAT_READ_SUCCESS,chat:at,lastReadId:et})}).catch(at=>{tt({type:CHAT_READ_FAIL,chatId:_e,error:at,lastReadId:et})}))},launchChat=(_e,et,tt=!1)=>{const nt=rt=>rt<=1190;return rt=>rt(startChat(_e)).then(at=>{tt||nt(window.innerWidth)?et.push(`/chats/${at.id}`):rt(openChat(at.id))})};var ChatContext=reactExports.createContext({isOpen:!1,needsAcceptance:!1}),ChatWidgetScreens=function(_e){return _e.INBOX="INBOX",_e.SEARCH="SEARCH",_e.CHAT="CHAT",_e.CHAT_SETTINGS="CHAT_SETTINGS",_e}(ChatWidgetScreens||{}),ChatProvider=function(et){var tt=et.children,nt=useHistory(),rt=useAppDispatch(),at=useSettings(),it=useOwnAccount(),ot=it.account,st=nt.location.pathname,ct=!!st.match(/^\/chats/),ut=useParams(),dt=ut.chatId,ft=reactExports.useState(ChatWidgetScreens.INBOX),pt=_slicedToArray$4(ft,2),mt=pt[0],ht=pt[1],Et=reactExports.useState(dt),yt=_slicedToArray$4(Et,2),vt=yt[0],gt=yt[1],St=useChat(vt),Rt=St.data,$t=at.getIn(["chats","mainWindow"]),bt=!(Rt!=null&&Rt.accepted)&&(Rt==null?void 0:Rt.created_by_account)!==(ot==null?void 0:ot.id),wt=$t==="open",xt=function(At,kt){gt(kt||null),ht(At)},Tt=function(){return rt(toggleMainWindow())},Ct=reactExports.useMemo(function(){return{chat:Rt,needsAcceptance:bt,isOpen:wt,isUsingMainChatPage:ct,toggleChatPane:Tt,screen:mt,changeScreen:xt,currentChatId:vt}},[Rt,vt,bt,ct,wt,mt,xt]);return reactExports.useEffect(function(){gt(dt||null)},[dt]),_createRawReactElement(ChatContext.Provider,{value:Ct},void 0,tt)},useChatContext=function(){return reactExports.useContext(ChatContext)};const isEntity=_e=>_e&&typeof _e=="object"&&"id"in _e,deduplicateById=_e=>{const et=_e.reduce((tt,nt)=>tt.set(nt.id,nt),new Map);return Array.from(et.values())},flattenPages=_e=>{const et=_e==null?void 0:_e.pages.reduce((tt,nt)=>[...tt,...nt.result],[]);if(et&&et.every(isEntity))return deduplicateById(et);if(et)return et},updatePageItem=(_e,et,tt)=>{queryClient.setQueriesData(_e,nt=>{if(nt){const rt=nt.pages.map(at=>{const it=at.result.map(ot=>tt(ot,et)?et:ot);return{...at,result:it}});return{...nt,pages:rt}}})},appendPageItem=(_e,et)=>{queryClient.setQueryData(_e,tt=>{if(tt){const nt=[...tt.pages];return nt[0]={...nt[0],result:[et,...nt[0].result]},{...tt,pages:nt}}})},removePageItem=(_e,et,tt)=>{queryClient.setQueriesData(_e,nt=>{if(nt){const rt=nt.pages.map(at=>{const it=at.result.filter(ot=>!tt(ot,et));return{...at,result:it}});return{...nt,pages:rt}}})},paginateQueryData=_e=>_e==null?void 0:_e.reduce((et,tt,nt)=>{const rt=Math.floor(nt/20);return et[rt]||(et[rt]=[]),et[rt].push(tt),et},[]),sortQueryData=(_e,et)=>{queryClient.setQueryData(_e,tt=>{if(tt){const nt={...tt},rt=flattenPages(nt),at=rt==null?void 0:rt.sort(et),ot=paginateQueryData(at).map((st,ct)=>({...tt.pages[ct],result:st}));return nt.pages=ot,nt}})},updateChatInChatSearchQuery=_e=>{updatePageItem(ChatKeys.chatSearch(),_e,(et,tt)=>et.id===tt.id)},reOrderChatListItems=()=>{sortQueryData(ChatKeys.chatSearch(),(_e,et)=>{var tt,nt;return compareDate((tt=_e.last_message)==null?void 0:tt.created_at,(nt=et.last_message)==null?void 0:nt.created_at)})},checkIfChatExists=_e=>{const et=flattenPages(queryClient.getQueryData(ChatKeys.chatSearch()));return et==null?void 0:et.find(tt=>tt.id===_e)},invalidateChatSearchQuery=()=>{queryClient.invalidateQueries(ChatKeys.chatSearch())},updateChatListItem=_e=>{const{id:et,last_message:tt}=_e;checkIfChatExists(et)?(updateChatInChatSearchQuery(_e),reOrderChatListItems()):invalidateChatSearchQuery(),tt&&appendPageItem(ChatKeys.chatMessages(_e.id),normalizeChatMessage(tt))},getUnreadChatsCount=()=>{const _e=flattenPages(queryClient.getQueryData(ChatKeys.chatSearch()));return sumBy$1(_e,et=>et.unread)},updateChatMessage=_e=>updatePageItem(ChatKeys.chatMessages(_e.chat_id),normalizeChatMessage(_e),(et,tt)=>et.id===tt.id),useFetchRelationships=()=>{const _e=useApi(),et=useAppDispatch();return useMutation(({accountIds:tt})=>{const nt=tt.map(rt=>`id[]=${rt}`).join("&");return _e.get(`/api/v1/accounts/relationships?${nt}`)},{onSuccess(tt){et(fetchRelationshipsSuccess(tt.data))},onError(tt){et(fetchRelationshipsFail(tt))}})},messageExpirationOptions=[604800,1209600,2592e3,7776e3];var MessageExpirationValues=(_e=>(_e[_e.SEVEN=messageExpirationOptions[0]]="SEVEN",_e[_e.FOURTEEN=messageExpirationOptions[1]]="FOURTEEN",_e[_e.THIRTY=messageExpirationOptions[2]]="THIRTY",_e[_e.NINETY=messageExpirationOptions[3]]="NINETY",_e))(MessageExpirationValues||{});const ChatKeys={chat:_e=>["chats","chat",_e],chatMessages:_e=>["chats","messages",_e],chatSearch:_e=>_e?["chats","search",_e]:["chats","search"]},isLastMessage=_e=>{const et=queryClient.getQueryData(ChatKeys.chatSearch()),tt=flattenPages(et);return!!(tt==null?void 0:tt.find(rt=>{var at;return((at=rt.last_message)==null?void 0:at.id)===_e}))},useChatMessages=_e=>{var it;const et=useApi(),tt=useAppSelector(ot=>ot.getIn(["relationships",_e.account.id,"blocked_by"])),nt=async(ot,st)=>{const ut=(st==null?void 0:st.link)||`/api/v1/pleroma/chats/${ot}/messages`,dt=await et.get(ut),{data:ft}=dt,pt=getNextLink(dt),mt=!!pt;return{result:ft.map(normalizeChatMessage),link:pt,hasMore:mt}},rt=useInfiniteQuery(ChatKeys.chatMessages(_e.id),({pageParam:ot})=>nt(_e.id,ot),{enabled:!tt,cacheTime:0,staleTime:0,getNextPageParam:ot=>{if(ot.hasMore)return{link:ot.link}}}),at=(it=flattenPages(rt.data))==null?void 0:it.reverse();return{...rt,data:at}},useChats=_e=>{const et=useApi(),tt=useAppDispatch(),nt=useFeatures(),{setUnreadChatsCount:rt}=useStatContext(),at=useFetchRelationships(),it=async dt=>{const ft=nt.chatsV2?"/api/v2/pleroma/chats":"/api/v1/pleroma/chats",mt=(dt==null?void 0:dt.link)||ft,ht=await et.get(mt,{params:_e?{search:_e}:void 0}),{data:Et}=ht,yt=getNextLink(ht),vt=!!yt;return rt(Number(ht.headers["x-unread-messages-count"])||sumBy$1(Et,gt=>gt.unread)),at.mutate({accountIds:Et.map(gt=>gt.account.id)}),tt(importFetchedAccounts(Et.map(gt=>gt.account))),{result:Et,hasMore:vt,link:yt}},ot=useInfiniteQuery(ChatKeys.chatSearch(_e),({pageParam:dt})=>it(dt),{keepPreviousData:!0,enabled:nt.chats,getNextPageParam:dt=>{if(dt.hasMore)return{link:dt.link}}}),st=flattenPages(ot.data);return{chatsQuery:{...ot,data:st},getOrCreateChatByAccountId:dt=>et.post(`/api/v1/pleroma/chats/by-account-id/${dt}`)}},useChat=_e=>{const et=useApi(),tt=useAppDispatch(),nt=useFetchRelationships(),rt=async()=>{if(_e){const{data:at}=await et.get(`/api/v1/pleroma/chats/${_e}`);return nt.mutate({accountIds:[at.account.id]}),tt(importFetchedAccount$1(at.account)),at}};return useQuery(ChatKeys.chat(_e),rt,{cacheTime:0,enabled:!!_e})},useChatActions=_e=>{const{account:et}=useOwnAccount(),tt=useApi(),{setUnreadChatsCount:nt}=useStatContext(),{chat:rt,changeScreen:at}=useChatContext(),it=async mt=>tt.post(`/api/v1/pleroma/chats/${_e}/read`,{last_read_id:mt}).then(({data:ht})=>{var yt;updatePageItem(ChatKeys.chatSearch(),ht,(vt,gt)=>vt.id===gt.id);const Et=queryClient.getQueryData(ChatKeys.chatSearch());if(Et){const vt=(yt=flattenPages(Et))==null?void 0:yt.map(gt=>gt.id===ht.id?ht:gt);nt(sumBy$1(vt,gt=>gt.unread))}return ht}).catch(()=>null),ot=useMutation(({chatId:mt,content:ht,mediaIds:Et})=>tt.post(`/api/v1/pleroma/chats/${mt}/messages`,{content:ht,media_id:Et&&Et.length===1?Et[0]:void 0,media_ids:Et}),{retry:!1,onMutate:async mt=>{await queryClient.cancelQueries(["chats","messages",mt.chatId]);const ht=mt.content,Et=queryClient.getQueryData(["chats","messages",mt.chatId]),yt=String(Number(new Date));return queryClient.setQueryData(ChatKeys.chatMessages(mt.chatId),vt=>{const gt={...vt};return gt.pages=gt.pages.map((St,Rt)=>Rt===0?{...St,result:[normalizeChatMessage({content:mt.content,id:yt,created_at:new Date,account_id:et==null?void 0:et.id,pending:!0,unread:!0}),...St.result]}:St),gt}),{prevChatMessages:Et,prevContent:ht,pendingId:yt}},onError:(mt,ht,Et)=>{queryClient.setQueryData(["chats","messages",ht.chatId],Et.prevChatMessages)},onSuccess:(mt,ht,Et)=>{const yt={...rt,last_message:mt.data};updatePageItem(ChatKeys.chatSearch(),yt,(vt,gt)=>vt.id===gt.id),updatePageItem(ChatKeys.chatMessages(ht.chatId),normalizeChatMessage(mt.data),vt=>vt.id===Et.pendingId),reOrderChatListItems()}}),st=useMutation(mt=>tt.patch(`/api/v1/pleroma/chats/${_e}`,mt),{onMutate:async mt=>{await queryClient.cancelQueries(ChatKeys.chat(_e));const ht={...rt},Et={...rt,...mt};return queryClient.setQueryData(ChatKeys.chat(_e),Et),{prevChat:ht}},onError:(mt,ht,Et)=>{at(ChatWidgetScreens.CHAT,Et.prevChat.id),queryClient.setQueryData(ChatKeys.chat(_e),Et.prevChat),toast.error("Chat Settings failed to update.")},onSuccess(){queryClient.invalidateQueries(ChatKeys.chat(_e)),queryClient.invalidateQueries(ChatKeys.chatSearch()),toast.success("Chat Settings updated successfully")}}),ct=mt=>tt.delete(`/api/v1/pleroma/chats/${_e}/messages/${mt}`),ut=useMutation(()=>tt.post(`/api/v1/pleroma/chats/${_e}/accept`),{onSuccess(mt){at(ChatWidgetScreens.CHAT,mt.data.id),queryClient.invalidateQueries(ChatKeys.chat(_e)),queryClient.invalidateQueries(ChatKeys.chatMessages(_e)),queryClient.invalidateQueries(ChatKeys.chatSearch())}}),dt=useMutation(()=>tt.delete(`/api/v1/pleroma/chats/${_e}`),{onSuccess(){at(ChatWidgetScreens.INBOX),queryClient.invalidateQueries(ChatKeys.chatMessages(_e)),queryClient.invalidateQueries(ChatKeys.chatSearch())}}),ft=useMutation(mt=>tt.post(`/api/v1/pleroma/chats/${_e}/messages/${mt.messageId}/reactions`,{emoji:mt.emoji}),{onSuccess(mt){updateChatMessage(mt.data)}}),pt=useMutation(mt=>tt.delete(`/api/v1/pleroma/chats/${_e}/messages/${mt.messageId}/reactions/${mt.emoji}`),{onSuccess(){queryClient.invalidateQueries(ChatKeys.chatMessages(_e))}});return{acceptChat:ut,createChatMessage:ot,createReaction:ft,deleteChat:dt,deleteChatMessage:ct,deleteReaction:pt,markChatAsRead:it,updateChat:st}},vitePluginRequire_1697861816335_11429602="/packs/assets/chat-0c18dae4.mp3",vitePluginRequire_1697861816334_45611638="/packs/assets/chat-5c28f759.oga",vitePluginRequire_1697861816334_25745050="/packs/assets/boop-1c813d11.mp3",vitePluginRequire_1697861816334_10561710="/packs/assets/boop-c1dea078.ogg",createAudio=_e=>{const et=new Audio;return _e.forEach(({type:tt,src:nt})=>{const rt=document.createElement("source");rt.type=tt,rt.src=nt,et.appendChild(rt)}),et},play=_e=>{_e.paused||(_e.pause(),typeof _e.fastSeek=="function"?_e.fastSeek(0):_e.currentTime=0),_e.play()},soundCache={boop:createAudio([{src:vitePluginRequire_1697861816334_10561710,type:"audio/ogg"},{src:vitePluginRequire_1697861816334_25745050,type:"audio/mpeg"}]),chat:createAudio([{src:vitePluginRequire_1697861816334_45611638,type:"audio/ogg"},{src:vitePluginRequire_1697861816335_11429602,type:"audio/mpeg"}])};var lib$5={},backoff$1={};Object.defineProperty(backoff$1,"__esModule",{value:!0});backoff$1.createBackoff=createBackoff$1;var backoff={exponential:function(et,tt){return Math.floor(Math.random()*Math.pow(2,et)*tt)},fibonacci:function(et,tt){var nt=1;if(et>nt)for(var rt=1,nt=2,at=2;at2&&arguments[2]!==void 0?arguments[2]:{};_classCallCheck$b(this,_e),this.url=et,this.protocols=tt,this.reconnectEnabled=!0,this.listeners={},this.backoff=createBackoff(nt.backoff||"exponential",nt),this.backoff.onReady=this.onBackoffReady.bind(this),(typeof nt.connect>"u"||nt.connect)&&this.open()}return _createClass$b(_e,[{key:"open",value:function(){var tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.isReconnect=tt;var nt=this.ws&&this.ws.binaryType;this.ws=new WebSocketImpl(this.url,this.protocols),this.ws.onclose=this.onCloseCallback.bind(this),this.ws.onerror=this.onErrorCallback.bind(this),this.ws.onmessage=this.onMessageCallback.bind(this),this.ws.onopen=this.onOpenCallback.bind(this),nt&&(this.ws.binaryType=nt)}},{key:"onBackoffReady",value:function(tt,nt){this.open(!0)}},{key:"onCloseCallback",value:function(tt){!this.isReconnect&&this.listeners.onclose&&this.listeners.onclose.apply(null,arguments),this.reconnectEnabled&&tt.code<3e3&&this.backoff.backoff()}},{key:"onErrorCallback",value:function(){this.listeners.onerror&&this.listeners.onerror.apply(null,arguments)}},{key:"onMessageCallback",value:function(){this.listeners.onmessage&&this.listeners.onmessage.apply(null,arguments)}},{key:"onOpenCallback",value:function(){this.listeners.onopen&&this.listeners.onopen.apply(null,arguments),this.isReconnect&&this.listeners.onreconnect&&this.listeners.onreconnect.apply(null,arguments),this.isReconnect=!1}},{key:"close",value:function(tt,nt){typeof tt>"u"&&(tt=1e3),this.reconnectEnabled=!1,this.ws.close(tt,nt)}},{key:"send",value:function(tt){this.ws.send(tt)}},{key:"bufferedAmount",get:function(){return this.ws.bufferedAmount}},{key:"readyState",get:function(){return this.ws.readyState}},{key:"binaryType",get:function(){return this.ws.binaryType},set:function(tt){this.ws.binaryType=tt}},{key:"extensions",get:function(){return this.ws.extensions},set:function(tt){this.ws.extensions=tt}},{key:"protocol",get:function(){return this.ws.protocol},set:function(tt){this.ws.protocol=tt}},{key:"onclose",set:function(tt){this.listeners.onclose=tt},get:function(){return this.listeners.onclose}},{key:"onerror",set:function(tt){this.listeners.onerror=tt},get:function(){return this.listeners.onerror}},{key:"onmessage",set:function(tt){this.listeners.onmessage=tt},get:function(){return this.listeners.onmessage}},{key:"onopen",set:function(tt){this.listeners.onopen=tt},get:function(){return this.listeners.onopen}},{key:"onreconnect",set:function(tt){this.listeners.onreconnect=tt},get:function(){return this.listeners.onreconnect}}]),_e}();WebSocketClient.CONNECTING=WebSocketImpl.CONNECTING;WebSocketClient.OPEN=WebSocketImpl.OPEN;WebSocketClient.CLOSING=WebSocketImpl.CLOSING;WebSocketClient.CLOSED=WebSocketImpl.CLOSED;var _default=lib$5.default=WebSocketClient;const randomIntUpTo=_e=>Math.floor(Math.random()*Math.floor(_e));function connectStream(_e,et=null,tt){return(nt,rt)=>{const at=rt().instance.urls.streaming_api,it=getAccessToken(rt()),{onConnect:ot,onDisconnect:st,onReceive:ct}=tt(nt,rt);let ut=null;const dt=()=>{et&&et(nt,()=>{ut=setTimeout(()=>dt(),2e4+randomIntUpTo(2e4))})},ft=()=>{ut&&(clearTimeout(ut),ut=null)};let pt;try{pt=getStream(at,it,_e,{connected(){et&&ft(),ot()},disconnected(){et&&(ut=setTimeout(()=>dt(),randomIntUpTo(4e4))),st()},received(ht){ct(pt,ht)},reconnected(){et&&(ft(),et(nt)),ot()}})}catch(ht){console.error(ht)}return()=>{pt&&pt.close(),ft()}}}function getStream(_e,et,tt,{connected:nt,received:rt,disconnected:at,reconnected:it}){const ot=[`stream=${tt}`],st=new _default(`${_e}/api/v1/streaming/?${ot.join("&")}`,et);return st.onopen=nt,st.onclose=at,st.onreconnect=it,st.onmessage=ct=>{if(ct.data)try{rt(JSON.parse(ct.data))}catch(ut){console.error(ct),console.error(`Could not parse the above streaming event. -${ut}`)}},st}const CONVERSATIONS_MOUNT="CONVERSATIONS_MOUNT",CONVERSATIONS_UNMOUNT="CONVERSATIONS_UNMOUNT",CONVERSATIONS_FETCH_REQUEST="CONVERSATIONS_FETCH_REQUEST",CONVERSATIONS_FETCH_SUCCESS="CONVERSATIONS_FETCH_SUCCESS",CONVERSATIONS_FETCH_FAIL="CONVERSATIONS_FETCH_FAIL",CONVERSATIONS_UPDATE="CONVERSATIONS_UPDATE",CONVERSATIONS_READ="CONVERSATIONS_READ",mountConversations=()=>({type:CONVERSATIONS_MOUNT}),unmountConversations=()=>({type:CONVERSATIONS_UNMOUNT}),markConversationRead=_e=>(et,tt)=>{isLoggedIn(tt)&&(et({type:CONVERSATIONS_READ,id:_e}),api(tt).post(`/api/v1/conversations/${_e}/read`))},expandConversations=({maxId:_e}={})=>(et,tt)=>{if(!isLoggedIn(tt))return;et(expandConversationsRequest());const nt={max_id:_e};_e||(nt.since_id=tt().conversations.items.getIn([0,"id"]));const rt=!!nt.since_id;api(tt).get("/api/v1/conversations",{params:nt}).then(at=>{const it=getLinks(at).refs.find(ot=>ot.rel==="next");et(importFetchedAccounts(at.data.reduce((ot,st)=>ot.concat(st.accounts),[]))),et(importFetchedStatuses(at.data.map(ot=>ot.last_status).filter(ot=>!!ot))),et(expandConversationsSuccess(at.data,it?it.uri:null,rt))}).catch(at=>et(expandConversationsFail(at)))},expandConversationsRequest=()=>({type:CONVERSATIONS_FETCH_REQUEST}),expandConversationsSuccess=(_e,et,tt)=>({type:CONVERSATIONS_FETCH_SUCCESS,conversations:_e,next:et,isLoadingRecent:tt}),expandConversationsFail=_e=>({type:CONVERSATIONS_FETCH_FAIL,error:_e}),updateConversations=_e=>et=>(et(importFetchedAccounts(_e.accounts)),_e.last_status&&et(importFetchedStatus(_e.last_status)),et({type:CONVERSATIONS_UPDATE,conversation:_e})),FILTERS_FETCH_REQUEST="FILTERS_FETCH_REQUEST",FILTERS_FETCH_SUCCESS="FILTERS_FETCH_SUCCESS",FILTERS_FETCH_FAIL="FILTERS_FETCH_FAIL",FILTER_FETCH_REQUEST="FILTER_FETCH_REQUEST",FILTER_FETCH_SUCCESS="FILTER_FETCH_SUCCESS",FILTER_FETCH_FAIL="FILTER_FETCH_FAIL",FILTERS_CREATE_REQUEST="FILTERS_CREATE_REQUEST",FILTERS_CREATE_SUCCESS="FILTERS_CREATE_SUCCESS",FILTERS_CREATE_FAIL="FILTERS_CREATE_FAIL",FILTERS_UPDATE_REQUEST="FILTERS_UPDATE_REQUEST",FILTERS_UPDATE_SUCCESS="FILTERS_UPDATE_SUCCESS",FILTERS_UPDATE_FAIL="FILTERS_UPDATE_FAIL",FILTERS_DELETE_REQUEST="FILTERS_DELETE_REQUEST",FILTERS_DELETE_SUCCESS="FILTERS_DELETE_SUCCESS",FILTERS_DELETE_FAIL="FILTERS_DELETE_FAIL",messages$19={added:{id:"filters.added",defaultMessage:"Filter added."},removed:{id:"filters.removed",defaultMessage:"Filter deleted."}},fetchFiltersV1=()=>(_e,et)=>(_e({type:FILTERS_FETCH_REQUEST,skipLoading:!0}),api(et).get("/api/v1/filters").then(({data:tt})=>_e({type:FILTERS_FETCH_SUCCESS,filters:tt,skipLoading:!0})).catch(tt=>_e({type:FILTERS_FETCH_FAIL,err:tt,skipLoading:!0,skipAlert:!0}))),fetchFiltersV2=()=>(_e,et)=>(_e({type:FILTERS_FETCH_REQUEST,skipLoading:!0}),api(et).get("/api/v2/filters").then(({data:tt})=>_e({type:FILTERS_FETCH_SUCCESS,filters:tt,skipLoading:!0})).catch(tt=>_e({type:FILTERS_FETCH_FAIL,err:tt,skipLoading:!0,skipAlert:!0}))),fetchFilters=(_e=!1)=>(et,tt)=>{if(!isLoggedIn(tt))return;const rt=tt().instance,at=getFeatures(rt);if(at.filtersV2&&_e)return et(fetchFiltersV2());if(at.filters)return et(fetchFiltersV1())},fetchFilterV1=_e=>(et,tt)=>(et({type:FILTER_FETCH_REQUEST,skipLoading:!0}),api(tt).get(`/api/v1/filters/${_e}`).then(({data:nt})=>et({type:FILTER_FETCH_SUCCESS,filter:nt,skipLoading:!0})).catch(nt=>et({type:FILTER_FETCH_FAIL,err:nt,skipLoading:!0,skipAlert:!0}))),fetchFilterV2=_e=>(et,tt)=>(et({type:FILTER_FETCH_REQUEST,skipLoading:!0}),api(tt).get(`/api/v2/filters/${_e}`).then(({data:nt})=>et({type:FILTER_FETCH_SUCCESS,filter:nt,skipLoading:!0})).catch(nt=>et({type:FILTER_FETCH_FAIL,err:nt,skipLoading:!0,skipAlert:!0}))),fetchFilter=_e=>(et,tt)=>{const rt=tt().instance,at=getFeatures(rt);if(at.filtersV2)return et(fetchFilterV2(_e));if(at.filters)return et(fetchFilterV1(_e))},createFilterV1=(_e,et,tt,nt,rt)=>(at,it)=>(at({type:FILTERS_CREATE_REQUEST}),api(it).post("/api/v1/filters",{phrase:rt[0].keyword,context:tt,irreversible:nt,whole_word:rt[0].whole_word,expires_in:et}).then(ot=>{at({type:FILTERS_CREATE_SUCCESS,filter:ot.data}),toast.success(messages$19.added)}).catch(ot=>{at({type:FILTERS_CREATE_FAIL,error:ot})})),createFilterV2=(_e,et,tt,nt,rt)=>(at,it)=>(at({type:FILTERS_CREATE_REQUEST}),api(it).post("/api/v2/filters",{title:_e,context:tt,filter_action:nt?"hide":"warn",expires_in:et,keywords_attributes:rt}).then(ot=>{at({type:FILTERS_CREATE_SUCCESS,filter:ot.data}),toast.success(messages$19.added)}).catch(ot=>{at({type:FILTERS_CREATE_FAIL,error:ot})})),createFilter=(_e,et,tt,nt,rt)=>(at,it)=>{const st=it().instance;return getFeatures(st).filtersV2?at(createFilterV2(_e,et,tt,nt,rt)):at(createFilterV1(_e,et,tt,nt,rt))},updateFilterV1=(_e,et,tt,nt,rt,at)=>(it,ot)=>(it({type:FILTERS_UPDATE_REQUEST}),api(ot).patch(`/api/v1/filters/${_e}`,{phrase:at[0].keyword,context:nt,irreversible:rt,whole_word:at[0].whole_word,expires_in:tt}).then(st=>{it({type:FILTERS_UPDATE_SUCCESS,filter:st.data}),toast.success(messages$19.added)}).catch(st=>{it({type:FILTERS_UPDATE_FAIL,error:st})})),updateFilterV2=(_e,et,tt,nt,rt,at)=>(it,ot)=>(it({type:FILTERS_UPDATE_REQUEST}),api(ot).patch(`/api/v2/filters/${_e}`,{title:et,context:nt,filter_action:rt?"hide":"warn",expires_in:tt,keywords_attributes:at}).then(st=>{it({type:FILTERS_UPDATE_SUCCESS,filter:st.data}),toast.success(messages$19.added)}).catch(st=>{it({type:FILTERS_UPDATE_FAIL,error:st})})),updateFilter=(_e,et,tt,nt,rt,at)=>(it,ot)=>{const ct=ot().instance;return getFeatures(ct).filtersV2?it(updateFilterV2(_e,et,tt,nt,rt,at)):it(updateFilterV1(_e,et,tt,nt,rt,at))},deleteFilterV1=_e=>(et,tt)=>(et({type:FILTERS_DELETE_REQUEST}),api(tt).delete(`/api/v1/filters/${_e}`).then(nt=>{et({type:FILTERS_DELETE_SUCCESS,filter:nt.data}),toast.success(messages$19.removed)}).catch(nt=>{et({type:FILTERS_DELETE_FAIL,error:nt})})),deleteFilterV2=_e=>(et,tt)=>(et({type:FILTERS_DELETE_REQUEST}),api(tt).delete(`/api/v2/filters/${_e}`).then(nt=>{et({type:FILTERS_DELETE_SUCCESS,filter:nt.data}),toast.success(messages$19.removed)}).catch(nt=>{et({type:FILTERS_DELETE_FAIL,error:nt})})),deleteFilter=_e=>(et,tt)=>{const rt=tt().instance;return getFeatures(rt).filtersV2?et(deleteFilterV2(_e)):et(deleteFilterV1(_e))},defaultMediaVisibility=(_e,et)=>!_e||(_e=getActualStatus(_e),_e.visibility==="self")?!1:et?!0:!(_e!=null&&_e.sensitive),getFirstExternalLink=_e=>{try{const et='a:not(.mention,.hashtag,.attachment,[rel~="tag"])',tt=document.createElement("div");return tt.innerHTML=_e.content,tt.querySelector(et)}catch{return null}},shouldHaveCard=_e=>!!getFirstExternalLink(_e),hasIntegerMediaIds=_e=>_e.media_attachments.some(({id:et})=>isIntegerId(et)),textForScreenReader=(_e,et,tt)=>{const{account:nt}=et;if(!nt||typeof nt!="object")return"";const rt=nt.display_name,at=[rt.length===0?nt.acct.split("@")[0]:rt,et.spoiler_text&&et.hidden?et.spoiler_text:et.search_index.slice(et.spoiler_text.length),_e.formatDate(et.created_at,{hour:"2-digit",minute:"2-digit",month:"short",day:"numeric"}),nt.acct];return tt&&at.push(tt),at.join(", ")},getActualStatus=_e=>_e!=null&&_e.reblog&&typeof(_e==null?void 0:_e.reblog)=="object"?_e.reblog:_e;var root$1=_root,now$2=function(){return root$1.Date.now()},now_1=now$2,reWhitespace=/\s/;function trimmedEndIndex$1(_e){for(var et=_e.length;et--&&reWhitespace.test(_e.charAt(et)););return et}var _trimmedEndIndex=trimmedEndIndex$1,trimmedEndIndex=_trimmedEndIndex,reTrimStart$1=/^\s+/;function baseTrim$2(_e){return _e&&_e.slice(0,trimmedEndIndex(_e)+1).replace(reTrimStart$1,"")}var _baseTrim=baseTrim$2,baseTrim$1=_baseTrim,isObject$e=isObject_1,isSymbol=isSymbol_1,NAN=0/0,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;function toNumber$1(_e){if(typeof _e=="number")return _e;if(isSymbol(_e))return NAN;if(isObject$e(_e)){var et=typeof _e.valueOf=="function"?_e.valueOf():_e;_e=isObject$e(et)?et+"":et}if(typeof _e!="string")return _e===0?_e:+_e;_e=baseTrim$1(_e);var tt=reIsBinary.test(_e);return tt||reIsOctal.test(_e)?freeParseInt(_e.slice(2),tt?2:8):reIsBadHex.test(_e)?NAN:+_e}var toNumber_1=toNumber$1,isObject$d=isObject_1,now$1=now_1,toNumber=toNumber_1,FUNC_ERROR_TEXT$1="Expected a function",nativeMax=Math.max,nativeMin=Math.min;function debounce$1(_e,et,tt){var nt,rt,at,it,ot,st,ct=0,ut=!1,dt=!1,ft=!0;if(typeof _e!="function")throw new TypeError(FUNC_ERROR_TEXT$1);et=toNumber(et)||0,isObject$d(tt)&&(ut=!!tt.leading,dt="maxWait"in tt,at=dt?nativeMax(toNumber(tt.maxWait)||0,et):at,ft="trailing"in tt?!!tt.trailing:ft);function pt($t){var bt=nt,wt=rt;return nt=rt=void 0,ct=$t,it=_e.apply(wt,bt),it}function mt($t){return ct=$t,ot=setTimeout(yt,et),ut?pt($t):it}function ht($t){var bt=$t-st,wt=$t-ct,xt=et-bt;return dt?nativeMin(xt,at-wt):xt}function Et($t){var bt=$t-st,wt=$t-ct;return st===void 0||bt>=et||bt<0||dt&&wt>=at}function yt(){var $t=now$1();if(Et($t))return vt($t);ot=setTimeout(yt,ht($t))}function vt($t){return ot=void 0,ft&&nt?pt($t):(nt=rt=void 0,it)}function gt(){ot!==void 0&&clearTimeout(ot),ct=0,nt=st=rt=ot=void 0}function St(){return ot===void 0?it:vt(now$1())}function Rt(){var $t=now$1(),bt=Et($t);if(nt=arguments,rt=this,st=$t,bt){if(ot===void 0)return mt(st);if(dt)return clearTimeout(ot),ot=setTimeout(yt,et),pt(st)}return ot===void 0&&(ot=setTimeout(yt,et)),it}return Rt.cancel=gt,Rt.flush=St,Rt}var debounce_1=debounce$1;const debounce$2=getDefaultExportFromCjs$1(debounce_1);var debounce=debounce_1,isObject$c=isObject_1,FUNC_ERROR_TEXT="Expected a function";function throttle(_e,et,tt){var nt=!0,rt=!0;if(typeof _e!="function")throw new TypeError(FUNC_ERROR_TEXT);return isObject$c(tt)&&(nt="leading"in tt?!!tt.leading:nt,rt="trailing"in tt?!!tt.trailing:rt),debounce(_e,et,{leading:nt,maxWait:et,trailing:rt})}var throttle_1=throttle;const throttle$1=getDefaultExportFromCjs$1(throttle_1);function parse_option(_e,et){return typeof _e<"u"?_e:et}function create_object_array(_e){const et=new Array(_e);for(let tt=0;tt<_e;tt++)et[tt]=create_object();return et}function get_keys(_e){return Object.keys(_e)}function create_object(){return Object.create(null)}function concat$2(_e){return[].concat.apply([],_e)}function sort_by_length_down(_e,et){return et.length-_e.length}function is_array(_e){return _e.constructor===Array}function is_string(_e){return typeof _e=="string"}function is_object$1(_e){return typeof _e=="object"}function is_function(_e){return typeof _e=="function"}function pipeline(_e,et,tt,nt){if(_e&&(et&&(_e=replace$3(_e,et)),this.matcher&&(_e=replace$3(_e,this.matcher)),this.stemmer&&_e.length>1&&(_e=replace$3(_e,this.stemmer)),nt&&_e.length>1&&(_e=collapse(_e)),tt||tt==="")){const rt=_e.split(tt);return this.filter?filter(rt,this.filter):rt}return _e}const regex_whitespace=/[\p{Z}\p{S}\p{P}\p{C}]+/u;function init_filter(_e){const et=create_object();for(let tt=0,nt=_e.length;tt=0;ct--){const ut=_e[ct],dt=ut.length,ft=create_object();let pt=!it;for(let mt=0;mt=0;ct--){ut=nt[ct],dt=ut.length;for(let ft=0,pt;ft0;nt--)this.queue[nt]=this.queue[nt-1];this.queue[0]=_e}this.cache[_e]=et};CacheClass.prototype.get=function(_e){const et=this.cache[_e];if(this.limit&&et){const tt=this.queue.indexOf(_e);if(tt){const nt=this.queue[tt-1];this.queue[tt-1]=this.queue[tt],this.queue[tt]=nt}}return et};CacheClass.prototype.del=function(_e){for(let et=0,tt,nt;et"u"&&self.exports,rt=this;this.worker=create$3(tt,nt,_e.worker),this.resolver=create_object(),this.worker&&(nt?this.worker.on("message",function(at){rt.resolver[at.id](at.msg),delete rt.resolver[at.id]}):this.worker.onmessage=function(at){at=at.data,rt.resolver[at.id](at.msg),delete rt.resolver[at.id]},this.worker.postMessage({task:"init",factory:tt,options:_e}))}register$2("add");register$2("append");register$2("search");register$2("update");register$2("remove");function register$2(_e){WorkerIndex.prototype[_e]=WorkerIndex.prototype[_e+"Async"]=function(){const et=this,tt=[].slice.call(arguments),nt=tt[tt.length-1];let rt;is_function(nt)&&(rt=nt,tt.splice(tt.length-1,1));const at=new Promise(function(it){setTimeout(function(){et.resolver[++pid]=it,et.worker.postMessage({task:_e,id:pid,args:tt})})});return rt?(at.then(rt),this):at}}function create$3(factory,is_node_js,worker_path){let worker;try{worker=is_node_js?eval('new (require("worker_threads")["Worker"])("../dist/node/node.js")'):factory?new Worker(URL.createObjectURL(new Blob(["onmessage="+handler.toString()],{type:"text/javascript"}))):new Worker(is_string(worker_path)?worker_path:"worker/worker.js",{type:"module"})}catch(_e){}return worker}function Document$1(_e){if(!(this instanceof Document$1))return new Document$1(_e);const et=_e.document||_e.doc||_e;let tt;this.tree=[],this.field=[],this.marker=[],this.register=create_object(),this.key=(tt=et.key||et.id)&&parse_tree(tt,this.marker)||"id",this.fastupdate=parse_option(_e.fastupdate,!0),this.storetree=(tt=et.store)&&tt!==!0&&[],this.store=tt&&create_object(),this.tag=(tt=et.tag)&&parse_tree(tt,this.marker),this.tagindex=tt&&create_object(),this.cache=(tt=_e.cache)&&new CacheClass(tt),_e.cache=!1,this.worker=_e.worker,this.async=!1,this.index=parse_descriptor.call(this,_e,et)}function parse_descriptor(_e,et){const tt=create_object();let nt=et.index||et.field||et;is_string(nt)&&(nt=[nt]);for(let rt=0,at,it;rt=0&&(_e=_e.substring(0,_e.length-2),_e&&(et[nt]=!0)),_e&&(tt[nt++]=_e);return nt1?tt:tt[0]}function parse_simple(_e,et){if(is_string(et))_e=_e[et];else for(let tt=0;_e&&tt1?tt.splice(nt,1):delete this.tagindex[et])}this.store&&delete this.store[_e],delete this.register[_e]}return this};Document$1.prototype.search=function(_e,et,tt,nt){tt||(!et&&is_object$1(_e)?(tt=_e,_e=""):is_object$1(et)&&(tt=et,et=0));let rt=[],at=[],it,ot,st,ct,ut,dt,ft=0;if(tt)if(is_array(tt))st=tt,tt=null;else{if(_e=tt.query||_e,it=tt.pluck,st=it||tt.index||tt.field,ct=tt.tag,ot=this.store&&tt.enrich,ut=tt.bool==="and",et=tt.limit||et||100,dt=tt.offset||0,ct&&(is_string(ct)&&(ct=[ct]),!_e)){for(let mt=0,ht;mt1||ct&&ct.length>1);const pt=!nt&&(this.worker||this.async)&&[];for(let mt=0,ht,Et,yt;mt0)return(at>et||tt)&&(rt=rt.slice(tt,tt+et)),nt&&(rt=apply_enrich.call(this,rt)),{tag:_e,result:rt}}function apply_enrich(_e){const et=new Array(_e.length);for(let tt=0,nt;tt<_e.length;tt++)nt=_e[tt],et[tt]={id:nt,doc:this.store[nt]};return et}Document$1.prototype.contain=function(_e){return!!this.register[_e]};Document$1.prototype.get=function(_e){return this.store[_e]},Document$1.prototype.set=function(_e,et){return this.store[_e]=et,this};Document$1.prototype.searchCache=searchCache;Document$1.prototype.export=exportDocument,Document$1.prototype.import=importDocument;apply_async(Document$1.prototype);function Index(_e,et){if(!(this instanceof Index))return new Index(_e);let tt,nt,rt;_e?(_e=apply_preset(_e),tt=_e.charset,nt=_e.lang,is_string(tt)&&(tt.indexOf(":")===-1&&(tt+=":default"),tt=global_charset[tt]),is_string(nt)&&(nt=global_lang[nt])):_e={};let at,it,ot=_e.context||{};this.encode=_e.encode||tt&&tt.encode||encode,this.register=et||create_object(),this.resolution=at=_e.resolution||9,this.tokenize=rt=tt&&tt.tokenize||_e.tokenize||"strict",this.depth=rt==="strict"&&ot.depth,this.bidirectional=parse_option(ot.bidirectional,!0),this.optimize=it=parse_option(_e.optimize,!0),this.fastupdate=parse_option(_e.fastupdate,!0),this.minlength=_e.minlength||1,this.boost=_e.boost,this.map=it?create_object_array(at):create_object(),this.resolution_ctx=at=ot.resolution||1,this.ctx=it?create_object_array(at):create_object(),this.rtl=tt&&tt.rtl||_e.rtl,this.matcher=(rt=_e.matcher||nt&&nt.matcher)&&init_stemmer_or_matcher(rt,!1),this.stemmer=(rt=_e.stemmer||nt&&nt.stemmer)&&init_stemmer_or_matcher(rt,!0),this.filter=(rt=_e.filter||nt&&nt.filter)&&init_filter(rt),this.cache=(rt=_e.cache)&&new CacheClass(rt)}Index.prototype.append=function(_e,et){return this.add(_e,et,!0)};Index.prototype.add=function(_e,et,tt,nt){if(et&&(_e||_e===0)){if(!nt&&!tt&&this.register[_e])return this.update(_e,et);et=this.encode(""+et);const rt=et.length;if(rt){const at=create_object(),it=create_object(),ot=this.depth,st=this.resolution;for(let ct=0;ct=this.minlength&&(ot||!it[ut])){let ft=get_score(st,rt,ct),pt="";switch(this.tokenize){case"full":if(dt>2){for(let mt=0;mtmt;ht--)if(ht-mt>=this.minlength){const Et=get_score(st,rt,ct,dt,mt);pt=ut.substring(mt,ht),this.push_index(it,pt,Et,_e,tt)}break}case"reverse":if(dt>1){for(let mt=dt-1;mt>0;mt--)if(pt=ut[mt]+pt,pt.length>=this.minlength){const ht=get_score(st,rt,ct,dt,mt);this.push_index(it,pt,ht,_e,tt)}pt=""}case"forward":if(dt>1){for(let mt=0;mt=this.minlength&&this.push_index(it,pt,ft,_e,tt);break}default:if(this.boost&&(ft=Math.min(ft/this.boost(et,ut,ct)|0,st-1)),this.push_index(it,ut,ft,_e,tt),ot&&rt>1&&ct=this.minlength&&!mt[ut]){mt[ut]=1;const gt=get_score(ht+(rt/2>ht?0:1),rt,ct,yt-1,vt-1),St=this.bidirectional&&ut>Et;this.push_index(at,St?Et:ut,gt,_e,tt,St?ut:Et)}}}}}this.fastupdate||(this.register[_e]=1)}}return this};function get_score(_e,et,tt,nt,rt){return tt&&_e>1?et+(nt||0)<=_e?tt+(rt||0):(_e-1)/(et+(nt||0))*(tt+(rt||0))+1|0:0}Index.prototype.push_index=function(_e,et,tt,nt,rt,at){let it=at?this.ctx:this.map;if((!_e[et]||at&&!_e[et][at])&&(this.optimize&&(it=it[tt]),at?(_e=_e[et]||(_e[et]=create_object()),_e[at]=1,it=it[at]||(it[at]=create_object())):_e[et]=1,it=it[et]||(it[et]=[]),this.optimize||(it=it[tt]||(it[tt]=[])),(!rt||!it.includes(nt))&&(it[it.length]=nt,this.fastupdate))){const ot=this.register[nt]||(this.register[nt]=[]);ot[ot.length]=it}};Index.prototype.search=function(_e,et,tt){tt||(!et&&is_object$1(_e)?(tt=_e,_e=tt.query):is_object$1(et)&&(tt=et));let nt=[],rt,at,it,ot=0;if(tt&&(_e=tt.query||_e,et=tt.limit,ot=tt.offset||0,at=tt.context,it=tt.suggest),_e&&(_e=this.encode(""+_e),rt=_e.length,rt>1)){const dt=create_object(),ft=[];for(let pt=0,mt=0,ht;pt=this.minlength&&!dt[ht]){if(!this.optimize&&!it&&!this.map[ht])return nt;ft[mt++]=ht,dt[ht]=1}_e=ft,rt=_e.length}if(!rt)return nt;et||(et=100);let st=this.depth&&rt>1&&at!==!1,ct=0,ut;st?(ut=_e[0],ct=1):rt>1&&_e.sort(sort_by_length_down);for(let dt,ft;ct=tt)))));dt++);if(ct){if(rt)return single_result(ot,tt,0);_e[_e.length]=ot;return}}return!et&&ot};function single_result(_e,et,tt){return _e.length===1?_e=_e[0]:_e=concat$2(_e),tt||_e.length>et?_e.slice(tt,tt+et):_e}function get_array(_e,et,tt,nt){if(tt){const rt=nt&&et>tt;_e=_e[rt?et:tt],_e=_e&&_e[rt?tt:et]}else _e=_e[et];return _e}Index.prototype.contain=function(_e){return!!this.register[_e]};Index.prototype.update=function(_e,et){return this.remove(_e).add(_e,et)};Index.prototype.remove=function(_e,et){const tt=this.register[_e];if(tt){if(this.fastupdate)for(let nt=0,rt;nt1&&(_e.splice(it,1),at++):at++}else{rt=Math.min(_e.length,tt);for(let it=0,ot;it_e[0].localeCompare(et[0]));for(const[_e,et]of sortedEmojis)index$2.add("n"+_e,`${et.id} ${et.name} ${et.keywords.join(" ")}`);const addCustomToPool=_e=>{for(const tt in index$2.register)tt[0]==="c"&&index$2.remove(tt);let et=0;for(const tt of _e)index$2.add("c"+et++,tt.id)},search$1=(_e,{maxResults:et=5}={},tt)=>index$2.search(_e,et).flatMap(nt=>{var at;if(typeof nt!="string")return;if(nt[0]==="c"&&tt){const it=Number(nt.slice(1)),ot=tt.get(it);if(ot)return{id:ot.get("shortcode",""),colons:":"+ot.get("shortcode","")+":",custom:!0,imageUrl:ot.get("static_url","")}}const rt=(at=emojiData.emojis[nt.slice(1)])==null?void 0:at.skins;if(rt)return{id:nt.slice(1),colons:":"+nt.slice(1)+":",unified:rt[0].unified,native:rt[0].native}}).filter(Boolean);let Settings$1=class{constructor(et=null){Fr(this,"keyBase",null);this.keyBase=et}generateKey(et){return this.keyBase?[this.keyBase,`id${et}`].join("."):et}set(et,tt){const nt=this.generateKey(et);try{const rt=JSON.stringify(tt);return localStorage.setItem(nt,rt),tt}catch{return null}}get(et){const tt=this.generateKey(et);try{const nt=localStorage.getItem(tt);return nt?JSON.parse(nt):null}catch{return null}}remove(et){const tt=this.get(et);if(tt){const nt=this.generateKey(et);try{localStorage.removeItem(nt)}catch{}}return tt}};const pushNotificationsSetting=new Settings$1("soapbox_push_notification_data"),tagHistory=new Settings$1("soapbox_tag_history"),groupSearchHistory=new Settings$1("soapbox_group_search_history"),truncateFilename=(_e,et)=>{const tt=_e.split("/").pop();return!tt||tt.length<=et?tt:[tt.substr(0,et/2),tt.substr(tt.length-et/2)].join("…")},formatBytes=(_e,et=2)=>{if(_e===0)return"0 Bytes";const tt=1024,nt=et<0?0:et,rt=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],at=Math.floor(Math.log(_e)/Math.log(tt));return parseFloat((_e/Math.pow(tt,at)).toFixed(nt))+" "+rt[at]},getVideoDuration=_e=>{const et=document.createElement("video"),tt=new Promise((nt,rt)=>{et.addEventListener("loadedmetadata",()=>{et.duration===1/0?(et.currentTime=Number.MAX_SAFE_INTEGER,et.ontimeupdate=()=>{et.ontimeupdate=null,nt(et.duration),et.currentTime=0}):nt(et.duration)}),et.onerror=at=>rt(at.target.error)});return et.src=window.URL.createObjectURL(_e),tt},domParser$3=new DOMParser,addAutoPlay=_e=>{try{const et=domParser$3.parseFromString(_e,"text/html").documentElement,tt=et.querySelector("iframe");if(tt){const nt=new URL(tt.src);return new URL(tt.src).host==="rumble.com"?(nt.searchParams.append("pub","7a20"),nt.searchParams.append("autoplay","2")):(nt.searchParams.append("autoplay","1"),nt.searchParams.append("auto_play","1"),tt.allow="autoplay"),tt.src=nt.toString(),et.querySelector("body").innerHTML}}catch{return _e}return _e},DEFAULT_MAX_PIXELS=1920*1080,_browser_quirks={},dropOrientationIfNeeded=_e=>new Promise(et=>{switch(_browser_quirks["image-orientation-automatic"]){case!0:et(1);break;case!1:et(_e);break;default:const tt="data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==",nt=new Image;nt.onload=()=>{const rt=nt.width===1&&nt.height===2;_browser_quirks["image-orientation-automatic"]=rt,et(rt?1:_e)},nt.onerror=()=>{_browser_quirks["image-orientation-automatic"]=!1,et(_e)},nt.src=tt}}),getImageUrl=_e=>new Promise((et,tt)=>{var rt;if((rt=window.URL)!=null&&rt.createObjectURL){try{et(URL.createObjectURL(_e))}catch(at){tt(at)}return}const nt=new FileReader;nt.onerror=(...at)=>tt(...at),nt.onload=({target:at})=>et((at==null?void 0:at.result)||""),nt.readAsDataURL(_e)}),loadImage=_e=>new Promise((et,tt)=>{getImageUrl(_e).then(nt=>{const rt=new Image;rt.onerror=(...at)=>tt([...at]),rt.onload=()=>et(rt),rt.src=nt}).catch(tt)}),getOrientation=(_e,et="image/png")=>new Promise(tt=>{if(!["image/jpeg","image/webp"].includes(et)){tt(1);return}__vitePreload(()=>import("./js/exif-ab0e667c.js").then(nt=>nt.e),[]).then(({default:nt})=>{nt.getData(_e,()=>{const rt=nt.getTag(_e,"Orientation");rt!==1?dropOrientationIfNeeded(rt).then(tt).catch(()=>tt(rt)):tt(rt)})}).catch(()=>{})}),processImage=(_e,{width:et,height:tt,orientation:nt,type:rt="image/png",name:at="resized.png"})=>new Promise((it,ot)=>{const st=document.createElement("canvas");4{if(!ut){ot(ut);return}it(new File([ut],at,{type:rt,lastModified:new Date().getTime()}))},rt)}),resizeImage=(_e,et,tt)=>new Promise((nt,rt)=>{const{width:at,height:it}=_e,ot=et.type||"image/png",st=Math.round(Math.sqrt(tt*(at/it))),ct=Math.round(Math.sqrt(tt*(it/at)));getOrientation(_e,ot).then(ut=>processImage(_e,{width:st,height:ct,name:et.name,orientation:ut,type:ot})).then(nt).catch(rt)}),resizeImage$1=(_e,et=DEFAULT_MAX_PIXELS)=>new Promise(tt=>{if(!_e.type.match(/image.*/)||_e.type==="image/gif"){tt(_e);return}loadImage(_e).then(nt=>{if(nt.width*nt.height{console.error(rt),tt(_e)})}).catch(()=>tt(_e))}),EMOJI_USE="EMOJI_USE",useEmoji=_e=>et=>{et({type:EMOJI_USE,emoji:_e}),et(saveSettings())},noOp$8=_e=>{},fetchMedia=_e=>(et,tt)=>api(tt).get(`/api/v1/media/${_e}`),updateMedia=(_e,et)=>(tt,nt)=>api(nt).put(`/api/v1/media/${_e}`,et),uploadMediaV1=(_e,et=noOp$8)=>(tt,nt)=>api(nt).post("/api/v1/media",_e,{onUploadProgress:et}),uploadMediaV2=(_e,et=noOp$8)=>(tt,nt)=>api(nt).post("/api/v2/media",_e,{onUploadProgress:et}),uploadMedia=(_e,et=noOp$8)=>(tt,nt)=>{const at=nt().instance;return getFeatures(at).mediaV2?tt(uploadMediaV2(_e,et)):tt(uploadMediaV1(_e,et))},{CancelToken,isCancel}=axios$1;let cancelFetchComposeSuggestionsAccounts;const COMPOSE_CHANGE="COMPOSE_CHANGE",COMPOSE_SUBMIT_REQUEST="COMPOSE_SUBMIT_REQUEST",COMPOSE_SUBMIT_SUCCESS="COMPOSE_SUBMIT_SUCCESS",COMPOSE_SUBMIT_FAIL="COMPOSE_SUBMIT_FAIL",COMPOSE_REPLY="COMPOSE_REPLY",COMPOSE_EVENT_REPLY="COMPOSE_EVENT_REPLY",COMPOSE_REPLY_CANCEL="COMPOSE_REPLY_CANCEL",COMPOSE_QUOTE="COMPOSE_QUOTE",COMPOSE_QUOTE_CANCEL="COMPOSE_QUOTE_CANCEL",COMPOSE_DIRECT="COMPOSE_DIRECT",COMPOSE_MENTION="COMPOSE_MENTION",COMPOSE_RESET="COMPOSE_RESET",COMPOSE_UPLOAD_REQUEST="COMPOSE_UPLOAD_REQUEST",COMPOSE_UPLOAD_SUCCESS="COMPOSE_UPLOAD_SUCCESS",COMPOSE_UPLOAD_FAIL="COMPOSE_UPLOAD_FAIL",COMPOSE_UPLOAD_PROGRESS="COMPOSE_UPLOAD_PROGRESS",COMPOSE_UPLOAD_UNDO="COMPOSE_UPLOAD_UNDO",COMPOSE_GROUP_POST="COMPOSE_GROUP_POST",COMPOSE_SET_GROUP_TIMELINE_VISIBLE="COMPOSE_SET_GROUP_TIMELINE_VISIBLE",COMPOSE_SUGGESTIONS_CLEAR="COMPOSE_SUGGESTIONS_CLEAR",COMPOSE_SUGGESTIONS_READY="COMPOSE_SUGGESTIONS_READY",COMPOSE_SUGGESTION_SELECT="COMPOSE_SUGGESTION_SELECT",COMPOSE_SUGGESTION_TAGS_UPDATE="COMPOSE_SUGGESTION_TAGS_UPDATE",COMPOSE_TAG_HISTORY_UPDATE="COMPOSE_TAG_HISTORY_UPDATE",COMPOSE_SPOILERNESS_CHANGE="COMPOSE_SPOILERNESS_CHANGE",COMPOSE_TYPE_CHANGE="COMPOSE_TYPE_CHANGE",COMPOSE_SPOILER_TEXT_CHANGE="COMPOSE_SPOILER_TEXT_CHANGE",COMPOSE_VISIBILITY_CHANGE="COMPOSE_VISIBILITY_CHANGE",COMPOSE_EMOJI_INSERT="COMPOSE_EMOJI_INSERT",COMPOSE_UPLOAD_CHANGE_REQUEST="COMPOSE_UPLOAD_UPDATE_REQUEST",COMPOSE_UPLOAD_CHANGE_SUCCESS="COMPOSE_UPLOAD_UPDATE_SUCCESS",COMPOSE_UPLOAD_CHANGE_FAIL="COMPOSE_UPLOAD_UPDATE_FAIL",COMPOSE_POLL_ADD="COMPOSE_POLL_ADD",COMPOSE_POLL_REMOVE="COMPOSE_POLL_REMOVE",COMPOSE_POLL_OPTION_ADD="COMPOSE_POLL_OPTION_ADD",COMPOSE_POLL_OPTION_CHANGE="COMPOSE_POLL_OPTION_CHANGE",COMPOSE_POLL_OPTION_REMOVE="COMPOSE_POLL_OPTION_REMOVE",COMPOSE_POLL_SETTINGS_CHANGE="COMPOSE_POLL_SETTINGS_CHANGE",COMPOSE_SCHEDULE_ADD="COMPOSE_SCHEDULE_ADD",COMPOSE_SCHEDULE_SET="COMPOSE_SCHEDULE_SET",COMPOSE_SCHEDULE_REMOVE="COMPOSE_SCHEDULE_REMOVE",COMPOSE_ADD_TO_MENTIONS="COMPOSE_ADD_TO_MENTIONS",COMPOSE_REMOVE_FROM_MENTIONS="COMPOSE_REMOVE_FROM_MENTIONS",COMPOSE_SET_STATUS="COMPOSE_SET_STATUS",messages$18={exceededImageSizeLimit:{id:"upload_error.image_size_limit",defaultMessage:"Image exceeds the current file size limit ({limit})"},exceededVideoSizeLimit:{id:"upload_error.video_size_limit",defaultMessage:"Video exceeds the current file size limit ({limit})"},exceededVideoDurationLimit:{id:"upload_error.video_duration_limit",defaultMessage:"Video exceeds the current duration limit ({limit, plural, one {# second} other {# seconds}})"},scheduleError:{id:"compose.invalid_schedule",defaultMessage:"You must schedule a post at least 5 minutes out."},success:{id:"compose.submit_success",defaultMessage:"Your post was sent"},editSuccess:{id:"compose.edit_success",defaultMessage:"Your post was edited"},uploadErrorLimit:{id:"upload_error.limit",defaultMessage:"File upload limit exceeded."},uploadErrorPoll:{id:"upload_error.poll",defaultMessage:"File upload not allowed with polls."},view:{id:"toast.view",defaultMessage:"View"},replyConfirm:{id:"confirmations.reply.confirm",defaultMessage:"Reply"},replyMessage:{id:"confirmations.reply.message",defaultMessage:"Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?"}},setComposeToStatus=(_e,et,tt,nt,rt)=>(at,it)=>{const{instance:ot}=it(),{explicitAddressing:st}=getFeatures(ot),ct={type:COMPOSE_SET_STATUS,id:"compose-modal",status:_e,rawText:et,explicitAddressing:st,spoilerText:tt,contentType:nt,v:parseVersion(ot.version),withRedraft:rt};at(ct)},changeCompose=(_e,et)=>({type:COMPOSE_CHANGE,id:_e,text:et}),replyCompose=_e=>(et,tt)=>{const nt=tt(),rt=nt.instance,{explicitAddressing:at}=getFeatures(rt),it=!!getSettings(nt).get("preserveSpoilers"),ot=selectOwnAccount(nt);if(!ot)return;et({type:COMPOSE_REPLY,id:"compose-modal",status:_e,account:ot,explicitAddressing:at,preserveSpoilers:it}),et(openModal("COMPOSE"))},cancelReplyCompose=()=>({type:COMPOSE_REPLY_CANCEL,id:"compose-modal"}),quoteCompose=_e=>(et,tt)=>{const nt=tt(),rt=nt.instance,{explicitAddressing:at}=getFeatures(rt),it={type:COMPOSE_QUOTE,id:"compose-modal",status:_e,account:selectOwnAccount(nt),explicitAddressing:at};et(it),et(openModal("COMPOSE"))},cancelQuoteCompose=()=>({type:COMPOSE_QUOTE_CANCEL,id:"compose-modal"}),groupComposeModal=_e=>(et,tt)=>{const nt=`group:${_e.id}`;et(groupCompose(nt,_e.id)),et(openModal("COMPOSE",{composeId:nt}))},resetCompose=(_e="compose-modal")=>({type:COMPOSE_RESET,id:_e}),mentionCompose=_e=>et=>{et({type:COMPOSE_MENTION,id:"compose-modal",account:_e}),et(openModal("COMPOSE"))},directCompose=_e=>et=>{et({type:COMPOSE_DIRECT,id:"compose-modal",account:_e}),et(openModal("COMPOSE"))},directComposeById=_e=>(et,tt)=>{const nt=selectAccount(tt(),_e);if(!nt)return;et({type:COMPOSE_DIRECT,id:"compose-modal",account:nt}),et(openModal("COMPOSE"))},handleComposeSubmit=(_e,et,tt,nt,rt,at)=>{!_e||!et||(_e(insertIntoTagHistory(tt,nt.tags||[],rt)),_e(submitComposeSuccess(tt,{...nt})),toast.success(at?messages$18.editSuccess:messages$18.success,{actionLabel:messages$18.view,actionLink:`/@${nt.account.acct}/posts/${nt.id}`}))},needsDescriptions=(_e,et)=>{const tt=_e.compose.get(et).media_attachments,nt=getSettings(_e).get("missingDescriptionModal"),rt=tt.filter(at=>!at.description).size>0;return nt&&rt},validateSchedule=(_e,et)=>{var rt;const tt=(rt=_e.compose.get(et))==null?void 0:rt.schedule;if(!tt)return!0;const nt=new Date(new Date().getTime()+3e5);return tt.getTime()>nt.getTime()},submitCompose=(_e,et,tt=!1)=>(nt,rt)=>{if(!isLoggedIn(rt))return;const at=rt(),it=at.compose.get(_e),ot=it.text,st=it.media_attachments,ct=it.id;let ut=it.to;if(!validateSchedule(at,_e)){toast.error(messages$18.scheduleError);return}if((!ot||!ot.length)&&st.size===0)return;if(!tt&&needsDescriptions(at,_e)){nt(openModal("MISSING_DESCRIPTION",{onContinue:()=>{nt(closeModal("MISSING_DESCRIPTION")),nt(submitCompose(_e,et,!0))}}));return}const dt=ot.match(/(?:^|\s)@([a-z\d_-]+(?:@[^@\s]+)?)/gi);dt&&(ut=ut.union(dt.map(mt=>mt.trim().slice(1)))),nt(submitComposeRequest(_e)),nt(closeModal());const ft=it.idempotencyKey,pt={status:ot,in_reply_to_id:it.in_reply_to,quote_id:it.quote,media_ids:st.map(mt=>mt.id),sensitive:it.sensitive,spoiler_text:it.spoiler_text,visibility:it.privacy,content_type:it.content_type,poll:it.poll,scheduled_at:it.schedule,to:ut};it.privacy==="group"&&(pt.group_id=it.group_id,pt.group_timeline_visible=it.group_timeline_visible),nt(createStatus(pt,ft,ct)).then(function(mt){!ct&&mt.visibility==="direct"&&rt().conversations.mounted<=0&&et&&et.push("/messages"),handleComposeSubmit(nt,rt,_e,mt,ot,!!ct)}).catch(function(mt){nt(submitComposeFail(_e,mt))})},submitComposeRequest=_e=>({type:COMPOSE_SUBMIT_REQUEST,id:_e}),submitComposeSuccess=(_e,et)=>({type:COMPOSE_SUBMIT_SUCCESS,id:_e,status:et}),submitComposeFail=(_e,et)=>({type:COMPOSE_SUBMIT_FAIL,id:_e,error:et}),uploadCompose=(_e,et,tt)=>(nt,rt)=>{var pt;if(!isLoggedIn(rt))return;const at=rt().instance.configuration.statuses.max_media_attachments,it=rt().instance.configuration.media_attachments.image_size_limit,ot=rt().instance.configuration.media_attachments.video_size_limit,st=rt().instance.configuration.media_attachments.video_duration_limit,ct=(pt=rt().compose.get(_e))==null?void 0:pt.media_attachments,ut=new Array(et.length).fill(0);let dt=Array.from(et).reduce((mt,ht)=>mt+ht.size,0);const ft=ct?ct.size:0;if(et.length+ft>at){toast.error(messages$18.uploadErrorLimit);return}nt(uploadComposeRequest(_e)),Array.from(et).forEach(async(mt,ht)=>{if(ft+ht>at-1)return;const Et=mt.type.match(/image.*/),yt=mt.type.match(/video.*/),vt=yt&&st?await getVideoDuration(mt):0;if(Et&&it&&mt.size>it){const gt=formatBytes(it),St=tt.formatMessage(messages$18.exceededImageSizeLimit,{limit:gt});toast.error(St),nt(uploadComposeFail(_e,!0));return}else if(yt&&ot&&mt.size>ot){const gt=formatBytes(ot),St=tt.formatMessage(messages$18.exceededVideoSizeLimit,{limit:gt});toast.error(St),nt(uploadComposeFail(_e,!0));return}else if(yt&&st&&vt>st){const gt=tt.formatMessage(messages$18.exceededVideoDurationLimit,{limit:st});toast.error(gt),nt(uploadComposeFail(_e,!0));return}resizeImage$1(mt).then(gt=>{const St=new FormData;return St.append("file",gt),dt+=gt.size-mt.size,nt(uploadMedia(St,({loaded:$t})=>{ut[ht]=$t,nt(uploadComposeProgress(_e,ut.reduce((bt,wt)=>bt+wt,0),dt))})).then(({status:$t,data:bt})=>{if($t===200)nt(uploadComposeSuccess(_e,bt,mt));else if($t===202){const wt=()=>{nt(fetchMedia(bt.id)).then(({status:xt,data:Tt})=>{xt===200?nt(uploadComposeSuccess(_e,Tt,mt)):xt===206&&setTimeout(()=>wt(),1e3)}).catch(xt=>nt(uploadComposeFail(_e,xt)))};wt()}})}).catch(gt=>nt(uploadComposeFail(_e,gt)))})},changeUploadCompose=(_e,et,tt)=>(nt,rt)=>{isLoggedIn(rt)&&(nt(changeUploadComposeRequest(_e)),nt(updateMedia(et,tt)).then(at=>{nt(changeUploadComposeSuccess(_e,at.data))}).catch(at=>{nt(changeUploadComposeFail(_e,et,at))}))},changeUploadComposeRequest=_e=>({type:COMPOSE_UPLOAD_CHANGE_REQUEST,id:_e,skipLoading:!0}),changeUploadComposeSuccess=(_e,et)=>({type:COMPOSE_UPLOAD_CHANGE_SUCCESS,id:_e,media:et,skipLoading:!0}),changeUploadComposeFail=(_e,et,tt)=>({type:COMPOSE_UPLOAD_CHANGE_FAIL,composeId:_e,id:et,error:tt,skipLoading:!0}),uploadComposeRequest=_e=>({type:COMPOSE_UPLOAD_REQUEST,id:_e,skipLoading:!0}),uploadComposeProgress=(_e,et,tt)=>({type:COMPOSE_UPLOAD_PROGRESS,id:_e,loaded:et,total:tt}),uploadComposeSuccess=(_e,et,tt)=>({type:COMPOSE_UPLOAD_SUCCESS,id:_e,media:et,file:tt,skipLoading:!0}),uploadComposeFail=(_e,et)=>({type:COMPOSE_UPLOAD_FAIL,id:_e,error:et,skipLoading:!0}),undoUploadCompose=(_e,et)=>({type:COMPOSE_UPLOAD_UNDO,id:_e,media_id:et}),groupCompose=(_e,et)=>({type:COMPOSE_GROUP_POST,id:_e,group_id:et}),setGroupTimelineVisible=(_e,et)=>({type:COMPOSE_SET_GROUP_TIMELINE_VISIBLE,id:_e,groupTimelineVisible:et}),clearComposeSuggestions=_e=>(cancelFetchComposeSuggestionsAccounts&&cancelFetchComposeSuggestionsAccounts(),{type:COMPOSE_SUGGESTIONS_CLEAR,id:_e}),fetchComposeSuggestionsAccounts=throttle$1((_e,et,tt,nt)=>{cancelFetchComposeSuggestionsAccounts&&cancelFetchComposeSuggestionsAccounts(tt),api(et).get("/api/v1/accounts/search",{cancelToken:new CancelToken(rt=>{cancelFetchComposeSuggestionsAccounts=rt}),params:{q:nt.slice(1),resolve:!1,limit:4}}).then(rt=>{_e(importFetchedAccounts(rt.data)),_e(readyComposeSuggestionsAccounts(tt,nt,rt.data))}).catch(rt=>{isCancel(rt)||toast.showAlertForError(rt)})},200,{leading:!0,trailing:!0}),fetchComposeSuggestionsEmojis=(_e,et,tt,nt)=>{const rt=et(),at=search$1(nt.replace(":",""),{maxResults:5},rt.custom_emojis);_e(readyComposeSuggestionsEmojis(tt,nt,at))},fetchComposeSuggestionsTags=(_e,et,tt,nt)=>{const at=et().trends.items;_e(updateSuggestionTags$1(tt,nt,at))},fetchComposeSuggestions=(_e,et)=>(tt,nt)=>{switch(et[0]){case":":fetchComposeSuggestionsEmojis(tt,nt,_e,et);break;case"#":fetchComposeSuggestionsTags(tt,nt,_e,et);break;default:fetchComposeSuggestionsAccounts(tt,nt,_e,et);break}},readyComposeSuggestionsEmojis=(_e,et,tt)=>({type:COMPOSE_SUGGESTIONS_READY,id:_e,token:et,emojis:tt}),readyComposeSuggestionsAccounts=(_e,et,tt)=>({type:COMPOSE_SUGGESTIONS_READY,id:_e,token:et,accounts:tt}),selectComposeSuggestion=(_e,et,tt,nt,rt)=>(at,it)=>{let ot="",st=et;typeof nt=="object"&&nt.id?(ot=isNativeEmoji(nt)?nt.native:nt.colons,st=et-1,at(useEmoji(nt))):typeof nt=="string"&&nt[0]==="#"?(ot=nt,st=et-1):typeof nt=="string"&&(ot=selectAccount(it(),nt).acct,st=et),at({type:COMPOSE_SUGGESTION_SELECT,id:_e,position:st,token:tt,completion:ot,path:rt})},updateSuggestionTags$1=(_e,et,tt)=>({type:COMPOSE_SUGGESTION_TAGS_UPDATE,id:_e,token:et,currentTrends:tt}),updateTagHistory=(_e,et)=>({type:COMPOSE_TAG_HISTORY_UPDATE,id:_e,tags:et}),insertIntoTagHistory=(_e,et,tt)=>(nt,rt)=>{const at=rt(),it=at.compose.get(_e).tagHistory,ot=at.me,st=et.filter(dt=>tt.match(new RegExp(`#${dt.name}`,"i"))).map(dt=>dt.name),ct=it.filter(dt=>st.findIndex(ft=>ft.toLowerCase()===dt.toLowerCase())===-1);st.push(...ct.toJS());const ut=st.slice(0,1e3);tagHistory.set(ot,ut),nt(updateTagHistory(_e,ut))},changeComposeSpoilerness=_e=>({type:COMPOSE_SPOILERNESS_CHANGE,id:_e}),changeComposeContentType=(_e,et)=>({type:COMPOSE_TYPE_CHANGE,id:_e,value:et}),changeComposeSpoilerText=(_e,et)=>({type:COMPOSE_SPOILER_TEXT_CHANGE,id:_e,text:et}),changeComposeVisibility=(_e,et)=>({type:COMPOSE_VISIBILITY_CHANGE,id:_e,value:et}),insertEmojiCompose=(_e,et,tt,nt)=>({type:COMPOSE_EMOJI_INSERT,id:_e,position:et,emoji:tt,needsSpace:nt}),addPoll=_e=>({type:COMPOSE_POLL_ADD,id:_e}),removePoll=_e=>({type:COMPOSE_POLL_REMOVE,id:_e}),addSchedule=_e=>({type:COMPOSE_SCHEDULE_ADD,id:_e}),setSchedule=(_e,et)=>({type:COMPOSE_SCHEDULE_SET,id:_e,date:et}),removeSchedule=_e=>({type:COMPOSE_SCHEDULE_REMOVE,id:_e}),addPollOption=(_e,et)=>({type:COMPOSE_POLL_OPTION_ADD,id:_e,title:et}),changePollOption=(_e,et,tt)=>({type:COMPOSE_POLL_OPTION_CHANGE,id:_e,index:et,title:tt}),removePollOption=(_e,et)=>({type:COMPOSE_POLL_OPTION_REMOVE,id:_e,index:et}),changePollSettings=(_e,et,tt)=>({type:COMPOSE_POLL_SETTINGS_CHANGE,id:_e,expiresIn:et,isMultiple:tt}),openComposeWithText=(_e,et="")=>tt=>{tt(resetCompose(_e)),tt(openModal("COMPOSE")),tt(changeCompose(_e,et))},addToMentions=(_e,et)=>(tt,nt)=>{const rt=nt(),at=selectAccount(rt,et);if(!at)return;const it={type:COMPOSE_ADD_TO_MENTIONS,id:_e,account:at.acct};return tt(it)},removeFromMentions=(_e,et)=>(tt,nt)=>{const rt=nt(),at=selectAccount(rt,et);if(!at)return;const it={type:COMPOSE_REMOVE_FROM_MENTIONS,id:_e,account:at.acct};return tt(it)},eventDiscussionCompose=(_e,et)=>(tt,nt)=>{const rt=nt(),at=rt.instance,{explicitAddressing:it}=getFeatures(at);return tt({type:COMPOSE_EVENT_REPLY,id:_e,status:et,account:selectOwnAccount(rt),explicitAddressing:it})},STATUS_CREATE_REQUEST="STATUS_CREATE_REQUEST",STATUS_CREATE_SUCCESS="STATUS_CREATE_SUCCESS",STATUS_CREATE_FAIL="STATUS_CREATE_FAIL",STATUS_FETCH_SOURCE_REQUEST="STATUS_FETCH_SOURCE_REQUEST",STATUS_FETCH_SOURCE_SUCCESS="STATUS_FETCH_SOURCE_SUCCESS",STATUS_FETCH_SOURCE_FAIL="STATUS_FETCH_SOURCE_FAIL",STATUS_FETCH_REQUEST="STATUS_FETCH_REQUEST",STATUS_FETCH_SUCCESS="STATUS_FETCH_SUCCESS",STATUS_FETCH_FAIL="STATUS_FETCH_FAIL",STATUS_DELETE_REQUEST="STATUS_DELETE_REQUEST",STATUS_DELETE_SUCCESS="STATUS_DELETE_SUCCESS",STATUS_DELETE_FAIL="STATUS_DELETE_FAIL",CONTEXT_FETCH_REQUEST="CONTEXT_FETCH_REQUEST",CONTEXT_FETCH_SUCCESS="CONTEXT_FETCH_SUCCESS",CONTEXT_FETCH_FAIL="CONTEXT_FETCH_FAIL",STATUS_MUTE_REQUEST="STATUS_MUTE_REQUEST",STATUS_MUTE_SUCCESS="STATUS_MUTE_SUCCESS",STATUS_MUTE_FAIL="STATUS_MUTE_FAIL",STATUS_UNMUTE_REQUEST="STATUS_UNMUTE_REQUEST",STATUS_UNMUTE_SUCCESS="STATUS_UNMUTE_SUCCESS",STATUS_UNMUTE_FAIL="STATUS_UNMUTE_FAIL",STATUS_REVEAL="STATUS_REVEAL",STATUS_HIDE="STATUS_HIDE",STATUS_TRANSLATE_REQUEST="STATUS_TRANSLATE_REQUEST",STATUS_TRANSLATE_SUCCESS="STATUS_TRANSLATE_SUCCESS",STATUS_TRANSLATE_FAIL="STATUS_TRANSLATE_FAIL",STATUS_TRANSLATE_REDO="STATUS_TRANSLATE_REDO",STATUS_TRANSLATE_UNDO="STATUS_TRANSLATE_UNDO",STATUS_UNFILTER="STATUS_UNFILTER",statusExists=(_e,et)=>(_e().statuses.get(et)||null)!==null,createStatus=(_e,et,tt)=>(nt,rt)=>(nt({type:STATUS_CREATE_REQUEST,params:_e,idempotencyKey:et,editing:!!tt}),api(rt).request({url:tt===null?"/api/v1/statuses":`/api/v1/statuses/${tt}`,method:tt===null?"post":"put",data:_e,headers:{"Idempotency-Key":et}}).then(({data:at})=>{if(!at.card&&shouldHaveCard(at)&&(at.expectsCard=!0),nt(importFetchedStatus(at,et)),nt({type:STATUS_CREATE_SUCCESS,status:at,params:_e,idempotencyKey:et,editing:!!tt}),at.expectsCard){const ot=(st=5)=>{api(rt).get(`/api/v1/statuses/${at.id}`).then(ct=>{var ut;(ut=ct.data)!=null&&ut.card?nt(importFetchedStatus(ct.data)):st>0&&ct.status===200&&setTimeout(()=>ot(st-1),1e3)}).catch(console.error)};setTimeout(()=>ot(),1e3)}return at}).catch(at=>{throw nt({type:STATUS_CREATE_FAIL,error:at,params:_e,idempotencyKey:et,editing:!!tt}),at})),editStatus=_e=>(et,tt)=>{let nt=tt().statuses.get(_e);nt.poll&&(nt=nt.set("poll",tt().polls.get(nt.poll))),et({type:STATUS_FETCH_SOURCE_REQUEST}),api(tt).get(`/api/v1/statuses/${_e}/source`).then(rt=>{et({type:STATUS_FETCH_SOURCE_SUCCESS}),et(setComposeToStatus(nt,rt.data.text,rt.data.spoiler_text,rt.data.content_type,!1)),et(openModal("COMPOSE"))}).catch(rt=>{et({type:STATUS_FETCH_SOURCE_FAIL,error:rt})})},fetchStatus=_e=>(et,tt)=>{const nt=statusExists(tt,_e);return et({type:STATUS_FETCH_REQUEST,id:_e,skipLoading:nt}),api(tt).get(`/api/v1/statuses/${_e}`).then(({data:rt})=>(et(importFetchedStatus(rt)),rt.group&&et(fetchGroupRelationships([rt.group.id])),et({type:STATUS_FETCH_SUCCESS,status:rt,skipLoading:nt}),rt)).catch(rt=>{et({type:STATUS_FETCH_FAIL,id:_e,error:rt,skipLoading:nt,skipAlert:!0})})},deleteStatus$6=(_e,et=!1)=>(tt,nt)=>{if(!isLoggedIn(nt))return null;let rt=nt().statuses.get(_e);return rt.poll&&(rt=rt.set("poll",nt().polls.get(rt.poll))),tt({type:STATUS_DELETE_REQUEST,params:rt}),api(nt).delete(`/api/v1/statuses/${_e}`).then(at=>{var it;tt({type:STATUS_DELETE_SUCCESS,id:_e}),tt(deleteFromTimelines(_e)),et&&(tt(setComposeToStatus(rt,at.data.text,at.data.spoiler_text,(it=at.data.pleroma)==null?void 0:it.content_type,et)),tt(openModal("COMPOSE")))}).catch(at=>{tt({type:STATUS_DELETE_FAIL,params:rt,error:at})})},updateStatus=_e=>et=>et(importFetchedStatus(_e)),fetchContext=_e=>(et,tt)=>(et({type:CONTEXT_FETCH_REQUEST,id:_e}),api(tt).get(`/api/v1/statuses/${_e}/context`).then(({data:nt})=>{if(Array.isArray(nt))et(importFetchedStatuses(nt));else if(typeof nt=="object"){const{ancestors:rt,descendants:at}=nt,it=rt.concat(at);et(importFetchedStatuses(it)),et({type:CONTEXT_FETCH_SUCCESS,id:_e,ancestors:rt,descendants:at})}else throw nt;return nt}).catch(nt=>{var rt;((rt=nt.response)==null?void 0:rt.status)===404&&et(deleteFromTimelines(_e)),et({type:CONTEXT_FETCH_FAIL,id:_e,error:nt,skipAlert:!0})})),fetchNext=(_e,et)=>async(tt,nt)=>{const rt=await api(nt).get(et);return tt(importFetchedStatuses(rt.data)),tt({type:CONTEXT_FETCH_SUCCESS,id:_e,ancestors:[],descendants:rt.data}),{next:getNextLink(rt)}},fetchAncestors=_e=>async(et,tt)=>{const nt=await api(tt).get(`/api/v1/statuses/${_e}/context/ancestors`);return et(importFetchedStatuses(nt.data)),nt},fetchDescendants=_e=>async(et,tt)=>{const nt=await api(tt).get(`/api/v1/statuses/${_e}/context/descendants`);return et(importFetchedStatuses(nt.data)),nt},fetchStatusWithContext=_e=>async(et,tt)=>{if(getFeatures(tt().instance).paginatedContext){await et(fetchStatus(_e));const rt=await Promise.all([et(fetchAncestors(_e)),et(fetchDescendants(_e))]);return et({type:CONTEXT_FETCH_SUCCESS,id:_e,ancestors:rt[0].data,descendants:rt[1].data}),{next:getNextLink(rt[1])}}else return await Promise.all([et(fetchContext(_e)),et(fetchStatus(_e))]),{next:void 0}},muteStatus=_e=>(et,tt)=>{isLoggedIn(tt)&&(et({type:STATUS_MUTE_REQUEST,id:_e}),api(tt).post(`/api/v1/statuses/${_e}/mute`).then(()=>{et({type:STATUS_MUTE_SUCCESS,id:_e})}).catch(nt=>{et({type:STATUS_MUTE_FAIL,id:_e,error:nt})}))},unmuteStatus=_e=>(et,tt)=>{isLoggedIn(tt)&&(et({type:STATUS_UNMUTE_REQUEST,id:_e}),api(tt).post(`/api/v1/statuses/${_e}/unmute`).then(()=>{et({type:STATUS_UNMUTE_SUCCESS,id:_e})}).catch(nt=>{et({type:STATUS_UNMUTE_FAIL,id:_e,error:nt})}))},toggleMuteStatus=_e=>(et,tt)=>{_e.muted?et(unmuteStatus(_e.id)):et(muteStatus(_e.id))},hideStatus=_e=>(Array.isArray(_e)||(_e=[_e]),{type:STATUS_HIDE,ids:_e}),revealStatus=_e=>(Array.isArray(_e)||(_e=[_e]),{type:STATUS_REVEAL,ids:_e}),translateStatus=(_e,et)=>(tt,nt)=>{tt({type:STATUS_TRANSLATE_REQUEST,id:_e});const rt=nt();if(Map$3(rt.statuses.getIn([_e,"translation"])||{}).get("status")){tt({type:STATUS_TRANSLATE_REDO,id:_e});return}const it=rt.instance,ot=parseVersion(it.version),st=ot.software===AKKOMA?api(nt).get:api(nt).post,ct=`/api/v1/statuses/${_e}/`+(ot.software===AKKOMA?`translations/${et||"en"}`:"translate");st(ct,ot.software!==AKKOMA?{target_language:et}:void 0).then(({data:ut})=>{tt({type:STATUS_TRANSLATE_SUCCESS,id:_e,translation:ot.software!==AKKOMA?ut:{content:ut.text,detected_source_language:ut.detected_language,provider:"Ghost",status:"visible"}})}).catch(ut=>{tt({type:STATUS_TRANSLATE_FAIL,id:_e,error:ut})})},undoStatusTranslation=_e=>({type:STATUS_TRANSLATE_UNDO,id:_e}),unfilterStatus=_e=>({type:STATUS_UNFILTER,id:_e}),STREAMING_CHAT_UPDATE="STREAMING_CHAT_UPDATE",removeChatMessage=_e=>{const et=JSON.parse(_e),tt=et.chat_id,nt=et.deleted_message_id;isLastMessage(nt)&&queryClient.invalidateQueries(ChatKeys.chatSearch()),removePageItem(ChatKeys.chatMessages(tt),nt,(rt,at)=>String(rt.id)===String(at))},updateChatQuery=_e=>{const et=queryClient.getQueryData(ChatKeys.chat(_e.id));if(!et)return;const tt={...et,latest_read_message_by_account:_e.latest_read_message_by_account,latest_read_message_created_at:_e.latest_read_message_created_at};queryClient.setQueryData(ChatKeys.chat(_e.id),tt)},connectTimelineStream=(_e,et,tt=null,nt=null,rt)=>connectStream(et,tt,(at,it)=>{const ot=getLocale(it());return{onConnect(){at(connectTimeline(_e))},onDisconnect(){at(disconnectTimeline(_e))},onReceive(st,ct){switch(ct.event){case"update":at(processTimelineUpdate(_e,JSON.parse(ct.payload)));break;case"status.update":at(updateStatus(JSON.parse(ct.payload)));break;case"notification":messages$1a[ot]().then(ut=>{at(updateNotificationsQueue$1(JSON.parse(ct.payload),ut,ot,window.location.pathname))}).catch(ut=>{console.error(ut)});break;case"conversation":at(updateConversations(JSON.parse(ct.payload)));break;case"filters_changed":at(fetchFilters());break;case"pleroma:chat_update":case"chat_message.created":at((ut,dt)=>{var Et,yt;const ft=JSON.parse(ct.payload),pt=dt().me,mt=((Et=ft.last_message)==null?void 0:Et.account_id)===pt,ht=getSettings(dt());mt||(updateChatListItem(ft),ht.getIn(["chats","sound"])&&play(soundCache.chat),(yt=rt==null?void 0:rt.statContext)==null||yt.setUnreadChatsCount(getUnreadChatsCount()))});break;case"chat_message.deleted":removeChatMessage(ct.payload);break;case"chat_message.read":at((ut,dt)=>{const ft=JSON.parse(ct.payload),pt=dt().me;ft.account.id!==pt&&updateChatQuery(JSON.parse(ct.payload))});break;case"chat_message.reaction":updateChatMessage(JSON.parse(ct.payload));break;case"pleroma:follow_relationships_update":at(updateFollowRelationships(JSON.parse(ct.payload)));break;case"announcement":at(updateAnnouncements(JSON.parse(ct.payload)));break;case"announcement.reaction":at(updateReaction$1(JSON.parse(ct.payload)));break;case"announcement.delete":at(deleteAnnouncement$1(ct.payload));break;case"marker":at({type:MARKER_FETCH_SUCCESS,marker:JSON.parse(ct.payload)});break}}}});function followStateToRelationship(_e){switch(_e){case"follow_pending":return{following:!1,requested:!0};case"follow_accept":return{following:!0,requested:!1};case"follow_reject":return{following:!1,requested:!1};default:return{}}}function updateFollowRelationships(_e){return(et,tt)=>{const nt=tt().me,rt=selectEntity(tt(),Entities.RELATIONSHIPS,_e.following.id);if(_e.follower.id===nt&&rt){const at={...rt,...followStateToRelationship(_e.state)};setTimeout(()=>et(importEntities$1([at],Entities.RELATIONSHIPS)),300)}}}function useTimelineStream(..._e){const[et,tt]=_e,{enabled:nt=!0}=_e[4]??{},rt=useAppDispatch(),at=useInstance(),it=reactExports.useRef(null),ot=useAppSelector(getAccessToken),st=at.urls.streaming_api,ct=()=>{nt&&st&&!it.current&&(it.current=rt(connectTimelineStream(..._e)))},ut=()=>{it.current&&(it.current(),it.current=null)};return reactExports.useEffect(()=>(ct(),ut),[ot,st,et,tt,nt]),{disconnect:ut}}function useUserStream(){const{isLoggedIn:_e}=useLoggedIn(),et=useStatContext();return useTimelineStream("home","user",refresh,null,{statContext:et,enabled:_e})}function refresh(_e,et){return _e(expandHomeTimeline({},()=>_e(expandNotifications({},()=>_e(fetchAnnouncements(et))))))}const useGroupsPath=()=>{const _e=useFeatures(),{groups:et}=useGroups();return _e.groupsDiscovery?et.length>0?"/groups":"/groups/discover":"/groups"},defaultState={width:0,height:0},useDimensions=()=>{const[_e,et]=reactExports.useState(null),[tt,nt]=reactExports.useState(defaultState),rt=reactExports.useMemo(()=>new ResizeObserver(at=>{if(at[0]){const{width:it,height:ot}=at[0].contentRect;nt({width:it,height:ot})}}),[]);return reactExports.useEffect(()=>{if(_e)return rt.observe(_e),()=>{rt.disconnect()}},[_e]),[_e,et,tt]};function useLoading(_e=!1){const[et,tt]=reactExports.useState(_e);function nt(rt){return tt(!0),rt.then(()=>tt(!1)).catch(()=>tt(!1)),rt}return[et,nt]}const RTL_LOCALES=["ar","ckb","fa","he"],useLocale=(_e="en")=>{const et=useAppSelector(nt=>getLocale(nt,_e)),tt=RTL_LOCALES.includes(et)?"rtl":"ltr";return{locale:et,direction:tt}};function useLoggedIn(){const _e=useAppSelector(et=>et.me);return{isLoggedIn:typeof _e=="string",isLoginLoading:_e===null,isLoginFailed:_e===!1,me:_e}}const useOwnAccount=()=>{const _e=reactExports.useCallback(makeGetAccount(),[]);return{account:useAppSelector(tt=>{const{me:nt}=tt;if(typeof nt=="string")return _e(tt,nt)})||void 0}},usePrevious$1=_e=>{const et=reactExports.useRef();return reactExports.useEffect(()=>{et.current=_e},[_e]),et.current},useSoapboxConfig=()=>useAppSelector(_e=>getSoapboxConfig(_e)),useRegistrationStatus=()=>{const _e=useInstance(),et=useFeatures(),tt=useSoapboxConfig(),nt=useAppSelector(at=>at.verification.instance.get("registrations")===!0),rt=tt.getIn(["extensions","pepe","enabled"])===!0;return{isOpen:et.accountCreation&&_e.registrations||rt&&nt,pepeOpen:nt,pepeEnabled:rt}},useSettings=()=>useAppSelector(_e=>getSettings(_e)),useSystemTheme=()=>{const _e=window.matchMedia("(prefers-color-scheme: dark)"),[et,tt]=reactExports.useState(_e.matches),nt=rt=>{tt(rt.matches)};return reactExports.useEffect(()=>{try{_e.addEventListener("change",nt)}catch{}return()=>{try{_e.removeEventListener("change",nt)}catch{}}},[]),et?"dark":"light"},useTheme=()=>{const _e=useSettings(),et=useSystemTheme(),tt=_e.get("themeMode");return tt==="dark"||tt==="system"&&et==="dark"?"dark":"light"};class Leaf{constructor(et){this.children=[],this.parent=et}delete(et){const tt=this.children.indexOf(et);return tt===-1?!1:(this.children=this.children.slice(0,tt).concat(this.children.slice(tt+1)),this.children.length===0&&this.parent.delete(this),!0)}add(et){return this.children.push(et),this}}class RadixTrie{constructor(et){this.parent=null,this.children={},this.parent=et||null}get(et){return this.children[et]}insert(et){let tt=this;for(let nt=0;ntrt.filter(at=>at!=="")).filter(rt=>rt.length>0)}function hotkey(_e){const{ctrlKey:et,altKey:tt,metaKey:nt,key:rt}=_e,at=[],it=[et,tt,nt,showShift(_e)];for(const[ot,st]of it.entries())st&&at.push(modifierKeyNames[ot]);return modifierKeyNames.includes(rt)||at.push(rt),at.join("+")}const modifierKeyNames=["Control","Alt","Meta","Shift"];function showShift(_e){const{shiftKey:et,code:tt,key:nt}=_e;return et&&!(tt.startsWith("Key")&&nt.toUpperCase()===nt)}const hotkeyRadixTrie=new RadixTrie,elementsLeaves=new WeakMap;let currentTriePosition=hotkeyRadixTrie,resetTriePositionTimer=null,path=[];function resetTriePosition(){path=[],resetTriePositionTimer=null,currentTriePosition=hotkeyRadixTrie}function keyDownHandler(_e){if(_e.defaultPrevented||!(_e.target instanceof Node))return;if(isFormField(_e.target)){const tt=_e.target;if(!tt.id||!tt.ownerDocument.querySelector(`[data-hotkey-scope="${tt.id}"]`))return}resetTriePositionTimer!=null&&window.clearTimeout(resetTriePositionTimer),resetTriePositionTimer=window.setTimeout(resetTriePosition,1500);const et=currentTriePosition.get(hotkey(_e));if(!et){resetTriePosition();return}if(path.push(hotkey(_e)),currentTriePosition=et,et instanceof Leaf){const tt=_e.target;let nt=!1,rt;const at=isFormField(tt);for(let it=et.children.length-1;it>=0;it-=1){rt=et.children[it];const ot=rt.getAttribute("data-hotkey-scope");if(!at&&!ot||at&&tt.id===ot){nt=!0;break}}rt&&nt&&(fireDeterminedAction(rt,path),_e.preventDefault()),resetTriePosition()}}function install(_e,et){Object.keys(hotkeyRadixTrie.children).length===0&&document.addEventListener("keydown",keyDownHandler);const nt=expandHotkeyToEdges(et||_e.getAttribute("data-hotkey")||"").map(rt=>hotkeyRadixTrie.insert(rt).add(_e));elementsLeaves.set(_e,nt)}function uninstall(_e){const et=elementsLeaves.get(_e);if(et&&et.length)for(const tt of et)tt&&tt.delete(_e);Object.keys(hotkeyRadixTrie.children).length===0&&document.removeEventListener("keydown",keyDownHandler)}const useHotkey=(_e,et={initialEl:null})=>{const[tt,nt]=reactExports.useState(et.initialEl);return reactExports.useEffect(()=>!tt||!_e?()=>{}:(install(tt,_e),et.event&&tt.addEventListener("hotkey-fire",rt=>{rt.preventDefault(),et.event(rt.target)}),()=>{uninstall(tt)}),[tt]),nt},LAYOUT_BREAKPOINT=630;function isMobile(_e){return _e<=LAYOUT_BREAKPOINT}const iOS=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream;let userTouching=!1;(function(_e){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(_e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(_e.substring(0,4)))&&(userTouching=!0)})(navigator.userAgent||navigator.vendor||window.opera||"");const listenerOptions$3=supportsPassiveEvents?{passive:!0}:!1;function touchListener(){userTouching=!0,window.removeEventListener("touchstart",touchListener,listenerOptions$3)}window.addEventListener("touchstart",touchListener,listenerOptions$3);function isUserTouching(){return userTouching}function isIOS(){return iOS}var DropdownMenuItem=function _e(et){var tt=et.index,nt=et.item,rt=et.onClick,at=useHistory(),it=reactExports.useRef(null),ot=function(dt){dt.stopPropagation(),nt&&(rt&&rt(),nt.to?(dt.preventDefault(),at.push(nt.to)):typeof nt.action=="function"&&(dt.preventDefault(),nt.action(dt)))},st=function(dt){nt&&(rt&&rt(),dt.button===1&&nt.middleClick&&nt.middleClick(dt))},ct=function(dt){(dt.key==="Enter"||dt.key===" ")&&ot(dt)};return reactExports.useEffect(function(){var ut=tt===0;it.current&&ut&&it.current.focus({preventScroll:!0})},[it.current,tt]),nt===null?_createRawReactElement("li",{className:"mx-2 my-1 h-[2px] bg-gray-100 dark:bg-gray-800"}):_createRawReactElement("li",{className:"truncate focus-visible:ring-2 focus-visible:ring-primary-500"},void 0,React$3.createElement("a",{href:nt.href||nt.to||"#",role:"button",tabIndex:0,ref:it,"data-index":tt,onClick:ot,onAuxClick:st,onKeyPress:ct,target:nt.target,title:nt.text,className:clsx({"flex px-4 py-2.5 text-sm text-gray-700 dark:text-gray-500 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none cursor-pointer":!0,"text-danger-600 dark:text-danger-400":nt.destructive})},nt.icon&&_createRawReactElement(Icon$1,{src:nt.icon,className:"mr-3 h-5 w-5 flex-none rtl:ml-3 rtl:mr-0"}),_createRawReactElement("span",{className:"truncate font-medium"},void 0,nt.text),nt.count?_createRawReactElement("span",{className:"ml-auto h-5 w-5 flex-none"},void 0,_createRawReactElement(Counter,{count:nt.count})):null))},_excluded$s=["children","disabled","items","onClose","onOpen","onShiftClick","placement","src","title"],listenerOptions$2=supportsPassiveEvents?{passive:!0}:!1,DropdownMenu=function _e(et){var tt=et.children,nt=et.disabled,rt=et.items,at=et.onClose,it=et.onOpen,ot=et.onShiftClick,st=et.placement,ct=st===void 0?"top":st,ut=et.src,dt=ut===void 0?vitePluginRequire_1697861810836_81866597:ut,ft=et.title,pt=ft===void 0?"Menu":ft,mt=_objectWithoutProperties(et,_excluded$s),ht=useAppDispatch(),Et=useHistory(),yt=reactExports.useState(!1),vt=_slicedToArray$4(yt,2),gt=vt[0],St=vt[1],Rt=reactExports.useRef(null),$t=isUserTouching(),bt=useFloating({placement:ct,transform:!1,middleware:[offset$1(12),flip({fallbackPlacements:["right","left","bottom"]}),shift$1({padding:8}),arrow({element:Rt})],whileElementsMounted:$t?void 0:autoUpdate}),wt=bt.refs,xt=bt.middlewareData,Tt=bt.placement,Ct=bt.floatingStyles,Nt=function(jt){if(jt.stopPropagation(),ot&&jt.shiftKey){jt.preventDefault(),ot(jt);return}gt?kt():At()},At=function(){$t?ht(openModal("ACTIONS",{status:mt.status,actions:rt,onClick:Dt})):(ht(openDropdownMenu()),St(!0)),it&&it()},kt=function(){var jt;(jt=wt.reference.current)===null||jt===void 0||jt.focus(),$t?ht(closeModal("ACTIONS")):(Pt(),St(!1)),at&&at()},Pt=function(){ht(function(jt,zt){var Qt=zt().dropdown_menu.isOpen;Qt&&jt(closeDropdownMenu())})},Ft=function(jt){switch(jt.key){case" ":case"Enter":jt.stopPropagation(),jt.preventDefault(),Nt(jt);break}},Dt=function(jt){jt.preventDefault(),jt.stopPropagation();var zt=Number(jt.currentTarget.getAttribute("data-index")),Qt=rt[zt];if(Qt){var Xt=Qt.action,Yt=Qt.to;kt(),typeof Xt=="function"?Xt(jt):Yt&&Et.push(Yt)}},Lt=function(jt){wt.floating.current&&!wt.floating.current.contains(jt.target)&&kt()},It=function(jt){if(wt.floating.current){var zt=Array.from(wt.floating.current.getElementsByTagName("a")),Qt=zt.indexOf(document.activeElement),Xt=null;switch(jt.key){case"ArrowDown":Xt=zt[Qt+1]||zt[0];break;case"ArrowUp":Xt=zt[Qt-1]||zt[zt.length-1];break;case"Tab":jt.shiftKey?Xt=zt[Qt-1]||zt[zt.length-1]:Xt=zt[Qt+1]||zt[0];break;case"Home":Xt=zt[0];break;case"End":Xt=zt[zt.length-1];break;case"Escape":kt();break}Xt&&(Xt.focus(),jt.preventDefault(),jt.stopPropagation())}},Ot=reactExports.useMemo(function(){if(xt.arrow){var Ut,jt,zt=xt.arrow,Qt=zt.x,Xt=zt.y,Yt={top:"bottom",right:"left",bottom:"top",left:"right"}[Tt.split("-")[0]];return jt={left:Qt!==null?"".concat(Qt,"px"):"",top:Xt!==null?"".concat(Xt,"px"):"",right:"",bottom:""},_defineProperty$7(jt,Yt,"".concat(-(((Ut=Rt.current)===null||Ut===void 0?void 0:Ut.offsetWidth)||0)/2,"px")),_defineProperty$7(jt,"transform","rotate(45deg)"),jt}return{}},[xt.arrow,Tt]);return reactExports.useEffect(function(){return function(){Pt()}},[]),reactExports.useEffect(function(){if(gt){if(wt.floating.current){var Ut;(Ut=wt.floating.current)===null||Ut===void 0||(Ut=Ut.querySelector("li a[role='button']"))===null||Ut===void 0||Ut.focus()}return document.addEventListener("click",Lt,!1),document.addEventListener("keydown",It,!1),document.addEventListener("touchend",Lt,listenerOptions$2),function(){document.removeEventListener("click",Lt),document.removeEventListener("keydown",It),document.removeEventListener("touchend",Lt)}}},[gt,wt.floating.current]),rt.length===0?null:React$3.createElement(React$3.Fragment,null,tt?React$3.cloneElement(tt,{disabled:nt,onClick:Nt,onKeyPress:Ft,ref:wt.setReference}):React$3.createElement(IconButton$1,{disabled:nt,className:clsx({"text-gray-600 hover:text-gray-700 dark:hover:text-gray-500":!0,"text-gray-700 dark:text-gray-500":gt}),title:pt,src:dt,onClick:Nt,onKeyPress:Ft,ref:wt.setReference}),gt?_createRawReactElement(Portal$1,{},void 0,React$3.createElement("div",{"data-testid":"dropdown-menu",ref:wt.setFloating,className:clsx("z-[1001] w-56 rounded-md bg-white py-1 shadow-lg transition-opacity duration-100 focus:outline-none dark:bg-gray-900 dark:ring-2 dark:ring-primary-700",{"opacity-0 pointer-events-none":!gt}),style:Ct},_createRawReactElement("ul",{},void 0,rt.map(function(Ut,jt){return _createRawReactElement(DropdownMenuItem,{item:Ut,index:jt,onClick:kt},jt)})),React$3.createElement("div",{ref:Rt,style:Ot,className:"pointer-events-none absolute z-[-1] h-3 w-3 bg-white dark:bg-gray-900"}))):null)},_excluded$r=["space","alignItems","justifyContent","className","grow","element","wrap"],_spaces$1,justifyContentOptions$1={between:"justify-between",center:"justify-center",start:"justify-start",end:"justify-end",around:"justify-around"},alignItemsOptions$1={top:"items-start",bottom:"items-end",center:"items-center",start:"items-start",stretch:"items-stretch"},spaces$1=(_spaces$1={0:"space-x-0"},_defineProperty$7(_spaces$1,.5,"space-x-0.5"),_defineProperty$7(_spaces$1,1,"space-x-1"),_defineProperty$7(_spaces$1,1.5,"space-x-1.5"),_defineProperty$7(_spaces$1,2,"space-x-2"),_defineProperty$7(_spaces$1,2.5,"space-x-2.5"),_defineProperty$7(_spaces$1,3,"space-x-3"),_defineProperty$7(_spaces$1,4,"space-x-4"),_defineProperty$7(_spaces$1,5,"space-x-5"),_defineProperty$7(_spaces$1,6,"space-x-6"),_defineProperty$7(_spaces$1,8,"space-x-8"),_spaces$1),HStack=reactExports.forwardRef(function(_e,et){var tt,nt=_e.space,rt=_e.alignItems,at=_e.justifyContent,it=_e.className,ot=_e.grow,st=_e.element,ct=st===void 0?"div":st,ut=_e.wrap,dt=_objectWithoutProperties(_e,_excluded$r),ft=ct;return React$3.createElement(ft,_extends$4({},dt,{ref:et,className:clsx("flex rtl:space-x-reverse",(tt={},_defineProperty$7(tt,alignItemsOptions$1[rt],typeof rt<"u"),_defineProperty$7(tt,justifyContentOptions$1[at],typeof at<"u"),_defineProperty$7(tt,spaces$1[nt],typeof nt<"u"),_defineProperty$7(tt,"grow",ot),_defineProperty$7(tt,"flex-wrap",ut),tt),it)}))}),Counter=function _e(et){var tt=et.count,nt=et.countMax;return _createRawReactElement("span",{className:"flex h-5 min-w-[20px] max-w-[26px] items-center justify-center rounded-full bg-secondary-500 text-xs font-medium text-white ring-2 ring-white dark:ring-gray-800"},void 0,shortNumberFormat(tt,nt))},__read$1=globalThis&&globalThis.__read||function(_e,et){var tt=typeof Symbol=="function"&&_e[Symbol.iterator];if(!tt)return _e;var nt=tt.call(_e),rt,at=[],it;try{for(;(et===void 0||et-- >0)&&!(rt=nt.next()).done;)at.push(rt.value)}catch(ot){it={error:ot}}finally{try{rt&&!rt.done&&(tt=nt.return)&&tt.call(nt)}finally{if(it)throw it.error}}return at},styleToObject$1=function(_e){var et=_e.split(/ ?; ?/);return et.reduce(function(tt,nt){var rt=__read$1(nt.split(/ ?: ?/),2),at=rt[0],it=rt[1];return at&&it&&(tt[at.replace(/-(\w)/g,function(ot,st){return st.toUpperCase()})]=Number.isNaN(Number(it))?it:Number(it)),tt},{})};function randomString$1(_e){_e===void 0&&(_e=6);for(var et="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",tt="",nt=_e;nt>0;--nt)tt+=et[Math.round(Math.random()*(et.length-1))];return tt}var noTextChildNodes=["br","col","colgroup","dl","hr","iframe","img","input","link","menuitem","meta","ol","param","select","table","tbody","tfoot","thead","tr","ul","wbr"],possibleStandardNames$1={"accept-charset":"acceptCharset",acceptcharset:"acceptCharset",accesskey:"accessKey",allowfullscreen:"allowFullScreen",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",class:"className",classid:"classID",classname:"className",colspan:"colSpan",contenteditable:"contentEditable",contextmenu:"contextMenu",controlslist:"controlsList",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",datetime:"dateTime",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",enctype:"encType",for:"htmlFor",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",innerhtml:"innerHTML",inputmode:"inputMode",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",marginwidth:"marginWidth",marginheight:"marginHeight",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",nomodule:"noModule",novalidate:"noValidate",playsinline:"playsInline",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rowspan:"rowSpan",spellcheck:"spellCheck",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex",typemustmatch:"typeMustMatch",usemap:"useMap",accentheight:"accentHeight","accent-height":"accentHeight",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",arabicform:"arabicForm","arabic-form":"arabicForm",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",diffuseconstant:"diffuseConstant",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",edgemode:"edgeMode",enablebackground:"enableBackground","enable-background":"enableBackground",externalresourcesrequired:"externalResourcesRequired",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",imagerendering:"imageRendering","image-rendering":"imageRendering",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",vmathematical:"vMathematical","v-mathematical":"vMathematical",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan",onblur:"onBlur",onchange:"onChange",onclick:"onClick",oncontextmenu:"onContextMenu",ondoubleclick:"onDoubleClick",ondrag:"onDrag",ondragend:"onDragEnd",ondragenter:"onDragEnter",ondragexit:"onDragExit",ondragleave:"onDragLeave",ondragover:"onDragOver",ondragstart:"onDragStart",ondrop:"onDrop",onerror:"onError",onfocus:"onFocus",oninput:"onInput",oninvalid:"onInvalid",onkeydown:"onKeyDown",onkeypress:"onKeyPress",onkeyup:"onKeyUp",onload:"onLoad",onmousedown:"onMouseDown",onmouseenter:"onMouseEnter",onmouseleave:"onMouseLeave",onmousemove:"onMouseMove",onmouseout:"onMouseOut",onmouseover:"onMouseOver",onmouseup:"onMouseUp",onscroll:"onScroll",onsubmit:"onSubmit",ontouchcancel:"onTouchCancel",ontouchend:"onTouchEnd",ontouchmove:"onTouchMove",ontouchstart:"onTouchStart",onwheel:"onWheel"},__assign$1=globalThis&&globalThis.__assign||function(){return __assign$1=Object.assign||function(_e){for(var et,tt=1,nt=arguments.length;tt0)&&!(rt=nt.next()).done;)at.push(rt.value)}catch(ot){it={error:ot}}finally{try{rt&&!rt.done&&(tt=nt.return)&&tt.call(nt)}finally{if(it)throw it.error}}return at},__spreadArray=globalThis&&globalThis.__spreadArray||function(_e,et,tt){if(tt||arguments.length===2)for(var nt=0,rt=et.length,at;nt *":rt,it=et.type,ot=it===void 0?"text/html":it;try{var st=new DOMParser,ct=st.parseFromString(_e,ot),ut=ct.querySelector(at);if(!(ut instanceof Node))throw new TypeError("Error parsing input");return nt?ut:convertFromNode(ut,et)}catch{}return null}function convert(_e,et){return et===void 0&&(et={}),typeof _e=="string"?convertFromString(_e,et):_e instanceof Node?convertFromNode(_e,et):null}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={};/** +`+unescapeHTML(_e.status.content);ct=ft&&ft.test(pt)}try{const ft=((dt=window.Notification)==null?void 0:dt.permission)==="granted";if(it&&!ct&&ft){const pt=new IntlMessageFormat(et[`notification.${_e.type}`],tt).format({name:_e.account.display_name.length>0?_e.account.display_name:_e.account.username}),mt=_e.status&&_e.status.spoiler_text.length>0?_e.status.spoiler_text:unescapeHTML(_e.status?_e.status.content:"");navigator.serviceWorker.ready.then(ht=>{ht.showNotification(pt,{body:mt,icon:_e.account.avatar,tag:_e.id,data:{url:joinPublicPath("/notifications")}}).catch(console.error)}).catch(console.error)}}catch(ft){console.warn(ft)}st&&!ct&&rt({type:NOTIFICATIONS_UPDATE_NOOP,meta:{sound:"boop"}}),rt(ut?{type:NOTIFICATIONS_UPDATE_QUEUE,notification:_e,intlMessages:et,intlLocale:tt}:updateNotifications(_e))},dequeueNotifications=()=>(_e,et)=>{const tt=et().notifications.queuedNotifications,nt=et().notifications.totalQueuedNotificationsCount;nt!==0&&(nt>0&&nt<=MAX_QUEUED_NOTIFICATIONS?tt.forEach(rt=>{_e(updateNotifications(rt.notification))}):_e(expandNotifications()),_e({type:NOTIFICATIONS_DEQUEUE}),_e(markReadNotifications()))},excludeTypesFromFilter=_e=>NOTIFICATION_TYPES.filter(et=>et!==_e),noOp$a=()=>new Promise(_e=>_e(void 0)),expandNotifications=({maxId:_e}={},et=noOp$a)=>(tt,nt)=>{if(!isLoggedIn(nt))return tt(noOp$a);const rt=nt(),at=getFeatures(rt.instance),it=getSettings(rt).getIn(["notifications","quickFilter","active"]),ot=rt.notifications,st=!!_e;if(ot.isLoading)return et(),tt(noOp$a);const ct={max_id:_e};return it==="all"?at.notificationsIncludeTypes?ct.types=NOTIFICATION_TYPES.filter(ut=>!EXCLUDE_TYPES.includes(ut)):ct.exclude_types=EXCLUDE_TYPES:at.notificationsIncludeTypes?ct.types=[it]:ct.exclude_types=excludeTypesFromFilter(it),!_e&&ot.items.size>0&&(ct.since_id=ot.getIn(["items",0,"id"])),tt(expandNotificationsRequest(st)),api(nt).get("/api/v1/notifications",{params:ct}).then(ut=>{const dt=getLinks(ut).refs.find(mt=>mt.rel==="next"),ft=ut.data.reduce((mt,ht)=>{var Et,yt,vt;return(Et=ht.account)!=null&&Et.id&&(mt.accounts[ht.account.id]=ht.account),(yt=ht.target)!=null&&yt.id&&(mt.accounts[ht.target.id]=ht.target),(vt=ht.status)!=null&&vt.id&&(mt.statuses[ht.status.id]=ht.status),mt},{accounts:{},statuses:{}});tt(importFetchedAccounts(Object.values(ft.accounts))),tt(importFetchedStatuses(Object.values(ft.statuses)));const pt=Object.values(ft.statuses).filter(mt=>!!mt.group);tt(fetchGroupRelationships(pt.map(mt=>{var ht;return(ht=mt.group)==null?void 0:ht.id}))),tt(expandNotificationsSuccess(ut.data,dt?dt.uri:null,st)),fetchRelatedRelationships(tt,ut.data),et()}).catch(ut=>{tt(expandNotificationsFail(ut,st)),et()})},expandNotificationsRequest=_e=>({type:NOTIFICATIONS_EXPAND_REQUEST,skipLoading:!_e}),expandNotificationsSuccess=(_e,et,tt)=>({type:NOTIFICATIONS_EXPAND_SUCCESS,notifications:_e,next:et,skipLoading:!tt}),expandNotificationsFail=(_e,et)=>({type:NOTIFICATIONS_EXPAND_FAIL,error:_e,skipLoading:!et}),scrollTopNotifications=_e=>et=>{et({type:NOTIFICATIONS_SCROLL_TOP,top:_e}),et(markReadNotifications())},setFilter$1=_e=>et=>{et({type:NOTIFICATIONS_FILTER_SET,path:["notifications","quickFilter","active"],value:_e}),et(expandNotifications()),et(saveSettings())},markReadPleroma=_e=>(et,tt)=>api(tt).post("/api/v1/pleroma/notifications/read",{max_id:_e}),markReadNotifications=()=>(_e,et)=>{var it;if(!isLoggedIn(et))return;const tt=et(),nt=(it=tt.notifications.items.first())==null?void 0:it.id,rt=tt.notifications.lastRead,at=parseVersion(tt.instance.version);nt&&(rt===-1||compareId(nt,rt)>0)&&(_e(saveMarker({notifications:{last_read_id:nt}})),(at.software===PLEROMA||at.software===AKKOMA)&&_e(markReadPleroma(nt)))},shouldFilter=(_e,et)=>Map$3({reblog:_e.reblog!==null,reply:_e.in_reply_to_id!==null,direct:_e.visibility==="direct"}).some((nt,rt)=>et.getIn(["shows",rt])===!1&&nt),TIMELINE_UPDATE="TIMELINE_UPDATE",TIMELINE_DELETE="TIMELINE_DELETE",TIMELINE_CLEAR="TIMELINE_CLEAR",TIMELINE_UPDATE_QUEUE="TIMELINE_UPDATE_QUEUE",TIMELINE_DEQUEUE="TIMELINE_DEQUEUE",TIMELINE_SCROLL_TOP="TIMELINE_SCROLL_TOP",TIMELINE_EXPAND_REQUEST="TIMELINE_EXPAND_REQUEST",TIMELINE_EXPAND_SUCCESS="TIMELINE_EXPAND_SUCCESS",TIMELINE_EXPAND_FAIL="TIMELINE_EXPAND_FAIL",TIMELINE_CONNECT="TIMELINE_CONNECT",TIMELINE_DISCONNECT="TIMELINE_DISCONNECT",TIMELINE_REPLACE="TIMELINE_REPLACE",TIMELINE_INSERT="TIMELINE_INSERT",TIMELINE_CLEAR_FEED_ACCOUNT_ID="TIMELINE_CLEAR_FEED_ACCOUNT_ID",MAX_QUEUED_ITEMS=40,processTimelineUpdate=(_e,et,tt)=>(nt,rt)=>{var ut;const at=rt().me,it=((ut=et.account)==null?void 0:ut.id)===at,ot=!rt().pending_statuses.isEmpty(),st=getSettings(rt()).get(_e,Map$3()),ct=shouldFilter(normalizeStatus(et),st);it&&ot||(nt(importFetchedStatus(et)),nt(ct?updateTimeline$1(_e,et.id):updateTimelineQueue$1(_e,et.id)))},updateTimeline$1=(_e,et,tt)=>nt=>{nt({type:TIMELINE_UPDATE,timeline:_e,statusId:et})},updateTimelineQueue$1=(_e,et,tt)=>nt=>{nt({type:TIMELINE_UPDATE_QUEUE,timeline:_e,statusId:et})},dequeueTimeline=(_e,et,tt)=>(nt,rt)=>{var ot;const it=((ot=rt().timelines.get(_e))==null?void 0:ot.totalQueuedItemsCount)||0;if(!(it<=0)){if(it<=MAX_QUEUED_ITEMS){nt({type:TIMELINE_DEQUEUE,timeline:_e});return}typeof et=="function"?(nt(clearTimeline$1(_e)),et()):_e==="home"?(nt(clearTimeline$1(_e)),nt(expandHomeTimeline(tt))):_e==="community"&&(nt(clearTimeline$1(_e)),nt(expandCommunityTimeline(tt)))}},deleteFromTimelines=_e=>(et,tt)=>{var ot,st;const nt=(st=(ot=tt().statuses.get(_e))==null?void 0:ot.account)==null?void 0:st.id,rt=tt().statuses.filter(ct=>ct.reblog===_e).map(ct=>[ct.id,ct.account.id]),at=tt().statuses.getIn([_e,"reblog"],null);et({type:TIMELINE_DELETE,id:_e,accountId:nt,references:rt,reblogOf:at})},clearTimeline$1=_e=>et=>et({type:TIMELINE_CLEAR,timeline:_e}),noOp$9=()=>{},noOpAsync=()=>()=>new Promise(_e=>_e(void 0)),parseTags=(_e={},et)=>(_e[et]||[]).map(tt=>tt.value),replaceHomeTimeline=(_e,{maxId:et}={},tt)=>(nt,rt)=>{nt({type:TIMELINE_REPLACE,accountId:_e}),nt(expandHomeTimeline({accountId:_e,maxId:et},()=>{nt(insertSuggestionsIntoTimeline()),tt&&tt()}))},expandTimeline=(_e,et,tt={},nt=noOp$9)=>(rt,at)=>{const it=at().timelines.get(_e)||{},ot=!!tt.max_id;if(it.isLoading)return nt(),rt(noOpAsync());!tt.max_id&&!tt.pinned&&(it.items||OrderedSet()).size>0&&!et.includes("max_id=")&&(tt.since_id=it.getIn(["items",0]));const st=!!tt.since_id;return rt(expandTimelineRequest(_e,ot)),api(at).get(et,{params:tt}).then(ct=>{rt(importFetchedStatuses(ct.data));const ut=ct.data.filter(dt=>!!dt.group);rt(fetchGroupRelationships(ut.map(dt=>{var ft;return(ft=dt.group)==null?void 0:ft.id}))),rt(expandTimelineSuccess(_e,ct.data,getNextLink(ct),getPrevLink(ct),ct.status===206,st,ot)),nt()}).catch(ct=>{rt(expandTimelineFail(_e,ct,ot)),nt()})},expandHomeTimeline=({url:_e,accountId:et,maxId:tt}={},nt=noOp$9)=>{const rt=_e||(et?`/api/v1/accounts/${et}/statuses`:"/api/v1/timelines/home"),at={};return!_e&&tt&&(at.max_id=tt),et&&(at.exclude_replies=!0,at.with_muted=!0),expandTimeline("home",rt,at,nt)},expandPublicTimeline=({url:_e,maxId:et,onlyMedia:tt}={},nt=noOp$9)=>expandTimeline(`public${tt?":media":""}`,_e||"/api/v1/timelines/public",_e?{}:{max_id:et,only_media:!!tt},nt),expandRemoteTimeline=(_e,{url:et,maxId:tt,onlyMedia:nt}={},rt=noOp$9)=>expandTimeline(`remote${nt?":media":""}:${_e}`,et||"/api/v1/timelines/public",et?{}:{local:!1,instance:_e,max_id:tt,only_media:!!nt},rt),expandCommunityTimeline=({url:_e,maxId:et,onlyMedia:tt}={},nt=noOp$9)=>expandTimeline(`community${tt?":media":""}`,_e||"/api/v1/timelines/public",_e?{}:{local:!0,max_id:et,only_media:!!tt},nt),expandDirectTimeline=({url:_e,maxId:et}={},tt=noOp$9)=>expandTimeline("direct",_e||"/api/v1/timelines/direct",_e?{}:{max_id:et},tt),expandAccountTimeline=(_e,{url:et,maxId:tt,withReplies:nt}={})=>expandTimeline(`account:${_e}${nt?":with_replies":""}`,et||`/api/v1/accounts/${_e}/statuses`,et?{}:{exclude_replies:!nt,max_id:tt,with_muted:!0,limit:20}),expandAccountFeaturedTimeline=_e=>expandTimeline(`account:${_e}:pinned`,`/api/v1/accounts/${_e}/statuses`,{pinned:!0,with_muted:!0}),expandAccountMediaTimeline=(_e,{url:et,maxId:tt}={})=>expandTimeline(`account:${_e}:media`,et||`/api/v1/accounts/${_e}/statuses`,et?{}:{max_id:tt,only_media:!0,limit:20,with_muted:!0}),expandListTimeline=(_e,{url:et,maxId:tt}={},nt=noOp$9)=>expandTimeline(`list:${_e}`,et||`/api/v1/timelines/list/${_e}`,et?{}:{max_id:tt},nt),expandGroupTimeline=(_e,{maxId:et}={},tt=noOp$9)=>expandTimeline(`group:${_e}`,`/api/v1/timelines/group/${_e}`,{max_id:et},tt),expandGroupFeaturedTimeline=_e=>expandTimeline(`group:${_e}:pinned`,`/api/v1/timelines/group/${_e}`,{pinned:!0}),expandGroupTimelineFromTag=(_e,et,{maxId:tt}={},nt=noOp$9)=>expandTimeline(`group:tags:${_e}:${et}`,`/api/v1/timelines/group/${_e}/tags/${et}`,{max_id:tt},nt),expandGroupMediaTimeline=(_e,{maxId:et}={})=>expandTimeline(`group:${_e}:media`,`/api/v1/timelines/group/${_e}`,{max_id:et,only_media:!0,limit:20,with_muted:!0}),expandHashtagTimeline=(_e,{url:et,maxId:tt,tags:nt}={},rt=noOp$9)=>expandTimeline(`hashtag:${_e}`,et||`/api/v1/timelines/tag/${_e}`,et?{}:{max_id:tt,any:parseTags(nt,"any"),all:parseTags(nt,"all"),none:parseTags(nt,"none")},rt),expandTimelineRequest=(_e,et)=>({type:TIMELINE_EXPAND_REQUEST,timeline:_e,skipLoading:!et}),expandTimelineSuccess=(_e,et,tt,nt,rt,at,it)=>({type:TIMELINE_EXPAND_SUCCESS,timeline:_e,statuses:et,next:tt,prev:nt,partial:rt,isLoadingRecent:at,skipLoading:!it,isLoadingMore:it}),expandTimelineFail=(_e,et,tt)=>({type:TIMELINE_EXPAND_FAIL,timeline:_e,error:et,skipLoading:!tt}),connectTimeline=_e=>({type:TIMELINE_CONNECT,timeline:_e}),disconnectTimeline=_e=>({type:TIMELINE_DISCONNECT,timeline:_e}),scrollTopTimeline=(_e,et)=>({type:TIMELINE_SCROLL_TOP,timeline:_e,top:et}),insertSuggestionsIntoTimeline=()=>(_e,et)=>{_e({type:TIMELINE_INSERT,timeline:"home"})},clearFeedAccountId=()=>(_e,et)=>{_e({type:TIMELINE_CLEAR_FEED_ACCOUNT_ID})};var StatContext=reactExports.createContext({unreadChatsCount:0}),StatProvider=function(et){var tt=et.children,nt=reactExports.useState(0),rt=_slicedToArray$4(nt,2),at=rt[0],it=rt[1],ot=reactExports.useMemo(function(){return{unreadChatsCount:at,setUnreadChatsCount:it}},[at]);return _createRawReactElement(StatContext.Provider,{value:ot},void 0,tt)},useStatContext=function(){return reactExports.useContext(StatContext)};const scriptRel="modulepreload",assetsURL=function(_e){return"/"+_e},seen={},__vitePreload=function(et,tt,nt){if(!tt||tt.length===0)return et();const rt=document.getElementsByTagName("link");return Promise.all(tt.map(at=>{if(at=assetsURL(at),at in seen)return;seen[at]=!0;const it=at.endsWith(".css"),ot=it?'[rel="stylesheet"]':"";if(!!nt)for(let ut=rt.length-1;ut>=0;ut--){const dt=rt[ut];if(dt.href===at&&(!it||dt.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${at}"]${ot}`))return;const ct=document.createElement("link");if(ct.rel=it?"stylesheet":scriptRel,it||(ct.as="script",ct.crossOrigin=""),ct.href=at,document.head.appendChild(ct),it)return new Promise((ut,dt)=>{ct.addEventListener("load",ut),ct.addEventListener("error",()=>dt(new Error(`Unable to preload CSS for ${at}`)))})})).then(()=>et()).catch(at=>{const it=new Event("vite:preloadError",{cancelable:!0});if(it.payload=at,window.dispatchEvent(it),!it.defaultPrevented)throw at})},__variableDynamicImportRuntimeHelper=(_e,et)=>{const tt=_e[et];return tt?typeof tt=="function"?tt():Promise.resolve(tt):new Promise((nt,rt)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(rt.bind(null,new Error("Unknown variable dynamic import: "+et)))})},importCustom=async _e=>{try{return await __variableDynamicImportRuntimeHelper(Object.assign({}),`../../custom/locales/${_e}.json`)}catch{return{default:{}}}},importMessages$2=_e=>__variableDynamicImportRuntimeHelper(Object.assign({"./locales/en.json":()=>__vitePreload(()=>import("./js/en-13e98705.js"),[]),"./locales/id.json":()=>__vitePreload(()=>import("./js/id-cf076250.js"),[]),"./locales/ja.json":()=>__vitePreload(()=>import("./js/ja-83493ca6.js"),[]),"./locales/whitelist_en.json":()=>__vitePreload(()=>import("./js/whitelist_en-eeb5cf20.js"),[]),"./locales/whitelist_id.json":()=>__vitePreload(()=>import("./js/whitelist_id-eeb5cf20.js"),[]),"./locales/whitelist_ja.json":()=>__vitePreload(()=>import("./js/whitelist_ja-eeb5cf20.js"),[])}),`./locales/${_e}.json`),importMessagesWithCustom=async _e=>{try{const et=await Promise.all([importMessages$2(_e),importCustom(_e)]),[tt,nt]=et;return Object.assign(tt.default,nt.default)}catch(et){throw console.error(et),et}},locales=["en","id","ja"],messages$1a=locales.reduce((_e,et)=>(_e[et]=()=>importMessagesWithCustom(et),_e),{});var ListCache$2=_ListCache;function stackClear$1(){this.__data__=new ListCache$2,this.size=0}var _stackClear=stackClear$1;function stackDelete$1(_e){var et=this.__data__,tt=et.delete(_e);return this.size=et.size,tt}var _stackDelete=stackDelete$1;function stackGet$1(_e){return this.__data__.get(_e)}var _stackGet=stackGet$1;function stackHas$1(_e){return this.__data__.has(_e)}var _stackHas=stackHas$1,ListCache$1=_ListCache,Map$2=_Map,MapCache$1=_MapCache,LARGE_ARRAY_SIZE=200;function stackSet$1(_e,et){var tt=this.__data__;if(tt instanceof ListCache$1){var nt=tt.__data__;if(!Map$2||nt.lengthot))return!1;var ct=at.get(_e),ut=at.get(et);if(ct&&ut)return ct==et&&ut==_e;var dt=-1,ft=!0,pt=tt&COMPARE_UNORDERED_FLAG$3?new SetCache:void 0;for(at.set(_e,et),at.set(et,_e);++dt-1&&_e%1==0&&_e-1&&_e%1==0&&_e<=MAX_SAFE_INTEGER}var isLength_1=isLength$3,baseGetTag$1=_baseGetTag,isLength$2=isLength_1,isObjectLike$1=isObjectLike_1,argsTag$1="[object Arguments]",arrayTag$1="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag$1="[object Map]",numberTag="[object Number]",objectTag$2="[object Object]",regexpTag="[object RegExp]",setTag$1="[object Set]",stringTag="[object String]",weakMapTag$1="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0;typedArrayTags[argsTag$1]=typedArrayTags[arrayTag$1]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag$1]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag$1]=typedArrayTags[numberTag]=typedArrayTags[objectTag$2]=typedArrayTags[regexpTag]=typedArrayTags[setTag$1]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag$1]=!1;function baseIsTypedArray$1(_e){return isObjectLike$1(_e)&&isLength$2(_e.length)&&!!typedArrayTags[baseGetTag$1(_e)]}var _baseIsTypedArray=baseIsTypedArray$1;function baseUnary$1(_e){return function(et){return _e(et)}}var _baseUnary=baseUnary$1,_nodeUtil={exports:{}};_nodeUtil.exports;(function(_e,et){var tt=_freeGlobal,nt=et&&!et.nodeType&&et,rt=nt&&!0&&_e&&!_e.nodeType&&_e,at=rt&&rt.exports===nt,it=at&&tt.process,ot=function(){try{var st=rt&&rt.require&&rt.require("util").types;return st||it&&it.binding&&it.binding("util")}catch{}}();_e.exports=ot})(_nodeUtil,_nodeUtil.exports);var _nodeUtilExports=_nodeUtil.exports,baseIsTypedArray=_baseIsTypedArray,baseUnary=_baseUnary,nodeUtil=_nodeUtilExports,nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,isTypedArray$2=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray,isTypedArray_1=isTypedArray$2,baseTimes=_baseTimes,isArguments$1=isArguments_1,isArray$6=isArray_1,isBuffer$1=isBufferExports,isIndex$1=_isIndex,isTypedArray$1=isTypedArray_1,objectProto$4=Object.prototype,hasOwnProperty$5=objectProto$4.hasOwnProperty;function arrayLikeKeys$1(_e,et){var tt=isArray$6(_e),nt=!tt&&isArguments$1(_e),rt=!tt&&!nt&&isBuffer$1(_e),at=!tt&&!nt&&!rt&&isTypedArray$1(_e),it=tt||nt||rt||at,ot=it?baseTimes(_e.length,String):[],st=ot.length;for(var ct in _e)(et||hasOwnProperty$5.call(_e,ct))&&!(it&&(ct=="length"||rt&&(ct=="offset"||ct=="parent")||at&&(ct=="buffer"||ct=="byteLength"||ct=="byteOffset")||isIndex$1(ct,st)))&&ot.push(ct);return ot}var _arrayLikeKeys=arrayLikeKeys$1,objectProto$3=Object.prototype;function isPrototype$1(_e){var et=_e&&_e.constructor,tt=typeof et=="function"&&et.prototype||objectProto$3;return _e===tt}var _isPrototype=isPrototype$1;function overArg$1(_e,et){return function(tt){return _e(et(tt))}}var _overArg=overArg$1,overArg=_overArg,nativeKeys$2=overArg(Object.keys,Object),_nativeKeys=nativeKeys$2,isPrototype=_isPrototype,nativeKeys$1=_nativeKeys,objectProto$2=Object.prototype,hasOwnProperty$4=objectProto$2.hasOwnProperty;function baseKeys$1(_e){if(!isPrototype(_e))return nativeKeys$1(_e);var et=[];for(var tt in Object(_e))hasOwnProperty$4.call(_e,tt)&&tt!="constructor"&&et.push(tt);return et}var _baseKeys=baseKeys$1,isFunction$1=isFunction_1,isLength$1=isLength_1;function isArrayLike$1(_e){return _e!=null&&isLength$1(_e.length)&&!isFunction$1(_e)}var isArrayLike_1=isArrayLike$1,arrayLikeKeys=_arrayLikeKeys,baseKeys=_baseKeys,isArrayLike=isArrayLike_1;function keys$4(_e){return isArrayLike(_e)?arrayLikeKeys(_e):baseKeys(_e)}var keys_1=keys$4,baseGetAllKeys=_baseGetAllKeys,getSymbols=_getSymbols,keys$3=keys_1;function getAllKeys$1(_e){return baseGetAllKeys(_e,keys$3,getSymbols)}var _getAllKeys=getAllKeys$1,getAllKeys=_getAllKeys,COMPARE_PARTIAL_FLAG$3=1,objectProto$1=Object.prototype,hasOwnProperty$3=objectProto$1.hasOwnProperty;function equalObjects$1(_e,et,tt,nt,rt,at){var it=tt&COMPARE_PARTIAL_FLAG$3,ot=getAllKeys(_e),st=ot.length,ct=getAllKeys(et),ut=ct.length;if(st!=ut&&!it)return!1;for(var dt=st;dt--;){var ft=ot[dt];if(!(it?ft in et:hasOwnProperty$3.call(et,ft)))return!1}var pt=at.get(_e),mt=at.get(et);if(pt&&mt)return pt==et&&mt==_e;var ht=!0;at.set(_e,et),at.set(et,_e);for(var Et=it;++dt(_e,et)=>api(et).get("/api/v1/pleroma/chats").then(tt=>{_e({type:CHATS_FETCH_SUCCESS,chats:tt.data})}).catch(tt=>{_e({type:CHATS_FETCH_FAIL,error:tt})}),fetchChatsV2=()=>(_e,et)=>api(et).get("/api/v2/pleroma/chats").then(tt=>{let nt=getLinks(tt).refs.find(rt=>rt.rel==="next");!nt&&tt.data.length&&(nt={uri:`/api/v2/pleroma/chats?max_id=${tt.data[tt.data.length-1].id}&offset=0`}),_e({type:CHATS_FETCH_SUCCESS,chats:tt.data,next:nt?nt.uri:null})}).catch(tt=>{_e({type:CHATS_FETCH_FAIL,error:tt})}),fetchChats=()=>(_e,et)=>{const tt=et(),{instance:nt}=tt,rt=getFeatures(nt);return _e({type:CHATS_FETCH_REQUEST}),rt.chatsV2?_e(fetchChatsV2()):_e(fetchChatsV1())},openChat=_e=>(et,tt)=>{const nt=tt(),rt=getSettings(nt).getIn(["chats","panes"]),at=rt.findIndex(it=>it.get("chat_id")===_e);if(et(markChatRead(_e)),at>-1)return et(changeSetting(["chats","panes",at,"state"],"open"));{const it=Map$3({chat_id:_e,state:"open"});return et(changeSetting(["chats","panes"],rt.push(it)))}},toggleMainWindow=()=>(_e,et)=>{const nt=getSettings(et()).getIn(["chats","mainWindow"])==="minimized"?"open":"minimized";return _e(changeSetting(["chats","mainWindow"],nt))},startChat=_e=>(et,tt)=>(et({type:CHAT_FETCH_REQUEST,accountId:_e}),api(tt).post(`/api/v1/pleroma/chats/by-account-id/${_e}`).then(({data:nt})=>(et({type:CHAT_FETCH_SUCCESS,chat:nt}),nt)).catch(nt=>{et({type:CHAT_FETCH_FAIL,accountId:_e,error:nt})})),markChatRead=(_e,et)=>(tt,nt)=>{const rt=nt().chats.items.get(_e);et||(et=rt.last_message),!(rt.get("unread")<1)&&et&&(tt({type:CHAT_READ_REQUEST,chatId:_e,lastReadId:et}),api(nt).post(`/api/v1/pleroma/chats/${_e}/read`,{last_read_id:et}).then(({data:at})=>{tt({type:CHAT_READ_SUCCESS,chat:at,lastReadId:et})}).catch(at=>{tt({type:CHAT_READ_FAIL,chatId:_e,error:at,lastReadId:et})}))},launchChat=(_e,et,tt=!1)=>{const nt=rt=>rt<=1190;return rt=>rt(startChat(_e)).then(at=>{tt||nt(window.innerWidth)?et.push(`/chats/${at.id}`):rt(openChat(at.id))})};var ChatContext=reactExports.createContext({isOpen:!1,needsAcceptance:!1}),ChatWidgetScreens=function(_e){return _e.INBOX="INBOX",_e.SEARCH="SEARCH",_e.CHAT="CHAT",_e.CHAT_SETTINGS="CHAT_SETTINGS",_e}(ChatWidgetScreens||{}),ChatProvider=function(et){var tt=et.children,nt=useHistory(),rt=useAppDispatch(),at=useSettings(),it=useOwnAccount(),ot=it.account,st=nt.location.pathname,ct=!!st.match(/^\/chats/),ut=useParams(),dt=ut.chatId,ft=reactExports.useState(ChatWidgetScreens.INBOX),pt=_slicedToArray$4(ft,2),mt=pt[0],ht=pt[1],Et=reactExports.useState(dt),yt=_slicedToArray$4(Et,2),vt=yt[0],gt=yt[1],St=useChat(vt),Rt=St.data,$t=at.getIn(["chats","mainWindow"]),bt=!(Rt!=null&&Rt.accepted)&&(Rt==null?void 0:Rt.created_by_account)!==(ot==null?void 0:ot.id),wt=$t==="open",xt=function(At,kt){gt(kt||null),ht(At)},Tt=function(){return rt(toggleMainWindow())},Ct=reactExports.useMemo(function(){return{chat:Rt,needsAcceptance:bt,isOpen:wt,isUsingMainChatPage:ct,toggleChatPane:Tt,screen:mt,changeScreen:xt,currentChatId:vt}},[Rt,vt,bt,ct,wt,mt,xt]);return reactExports.useEffect(function(){gt(dt||null)},[dt]),_createRawReactElement(ChatContext.Provider,{value:Ct},void 0,tt)},useChatContext=function(){return reactExports.useContext(ChatContext)};const isEntity=_e=>_e&&typeof _e=="object"&&"id"in _e,deduplicateById=_e=>{const et=_e.reduce((tt,nt)=>tt.set(nt.id,nt),new Map);return Array.from(et.values())},flattenPages=_e=>{const et=_e==null?void 0:_e.pages.reduce((tt,nt)=>[...tt,...nt.result],[]);if(et&&et.every(isEntity))return deduplicateById(et);if(et)return et},updatePageItem=(_e,et,tt)=>{queryClient.setQueriesData(_e,nt=>{if(nt){const rt=nt.pages.map(at=>{const it=at.result.map(ot=>tt(ot,et)?et:ot);return{...at,result:it}});return{...nt,pages:rt}}})},appendPageItem=(_e,et)=>{queryClient.setQueryData(_e,tt=>{if(tt){const nt=[...tt.pages];return nt[0]={...nt[0],result:[et,...nt[0].result]},{...tt,pages:nt}}})},removePageItem=(_e,et,tt)=>{queryClient.setQueriesData(_e,nt=>{if(nt){const rt=nt.pages.map(at=>{const it=at.result.filter(ot=>!tt(ot,et));return{...at,result:it}});return{...nt,pages:rt}}})},paginateQueryData=_e=>_e==null?void 0:_e.reduce((et,tt,nt)=>{const rt=Math.floor(nt/20);return et[rt]||(et[rt]=[]),et[rt].push(tt),et},[]),sortQueryData=(_e,et)=>{queryClient.setQueryData(_e,tt=>{if(tt){const nt={...tt},rt=flattenPages(nt),at=rt==null?void 0:rt.sort(et),ot=paginateQueryData(at).map((st,ct)=>({...tt.pages[ct],result:st}));return nt.pages=ot,nt}})},updateChatInChatSearchQuery=_e=>{updatePageItem(ChatKeys.chatSearch(),_e,(et,tt)=>et.id===tt.id)},reOrderChatListItems=()=>{sortQueryData(ChatKeys.chatSearch(),(_e,et)=>{var tt,nt;return compareDate((tt=_e.last_message)==null?void 0:tt.created_at,(nt=et.last_message)==null?void 0:nt.created_at)})},checkIfChatExists=_e=>{const et=flattenPages(queryClient.getQueryData(ChatKeys.chatSearch()));return et==null?void 0:et.find(tt=>tt.id===_e)},invalidateChatSearchQuery=()=>{queryClient.invalidateQueries(ChatKeys.chatSearch())},updateChatListItem=_e=>{const{id:et,last_message:tt}=_e;checkIfChatExists(et)?(updateChatInChatSearchQuery(_e),reOrderChatListItems()):invalidateChatSearchQuery(),tt&&appendPageItem(ChatKeys.chatMessages(_e.id),normalizeChatMessage(tt))},getUnreadChatsCount=()=>{const _e=flattenPages(queryClient.getQueryData(ChatKeys.chatSearch()));return sumBy$1(_e,et=>et.unread)},updateChatMessage=_e=>updatePageItem(ChatKeys.chatMessages(_e.chat_id),normalizeChatMessage(_e),(et,tt)=>et.id===tt.id),useFetchRelationships=()=>{const _e=useApi(),et=useAppDispatch();return useMutation(({accountIds:tt})=>{const nt=tt.map(rt=>`id[]=${rt}`).join("&");return _e.get(`/api/v1/accounts/relationships?${nt}`)},{onSuccess(tt){et(fetchRelationshipsSuccess(tt.data))},onError(tt){et(fetchRelationshipsFail(tt))}})},messageExpirationOptions=[604800,1209600,2592e3,7776e3];var MessageExpirationValues=(_e=>(_e[_e.SEVEN=messageExpirationOptions[0]]="SEVEN",_e[_e.FOURTEEN=messageExpirationOptions[1]]="FOURTEEN",_e[_e.THIRTY=messageExpirationOptions[2]]="THIRTY",_e[_e.NINETY=messageExpirationOptions[3]]="NINETY",_e))(MessageExpirationValues||{});const ChatKeys={chat:_e=>["chats","chat",_e],chatMessages:_e=>["chats","messages",_e],chatSearch:_e=>_e?["chats","search",_e]:["chats","search"]},isLastMessage=_e=>{const et=queryClient.getQueryData(ChatKeys.chatSearch()),tt=flattenPages(et);return!!(tt==null?void 0:tt.find(rt=>{var at;return((at=rt.last_message)==null?void 0:at.id)===_e}))},useChatMessages=_e=>{var it;const et=useApi(),tt=useAppSelector(ot=>ot.getIn(["relationships",_e.account.id,"blocked_by"])),nt=async(ot,st)=>{const ut=(st==null?void 0:st.link)||`/api/v1/pleroma/chats/${ot}/messages`,dt=await et.get(ut),{data:ft}=dt,pt=getNextLink(dt),mt=!!pt;return{result:ft.map(normalizeChatMessage),link:pt,hasMore:mt}},rt=useInfiniteQuery(ChatKeys.chatMessages(_e.id),({pageParam:ot})=>nt(_e.id,ot),{enabled:!tt,cacheTime:0,staleTime:0,getNextPageParam:ot=>{if(ot.hasMore)return{link:ot.link}}}),at=(it=flattenPages(rt.data))==null?void 0:it.reverse();return{...rt,data:at}},useChats=_e=>{const et=useApi(),tt=useAppDispatch(),nt=useFeatures(),{setUnreadChatsCount:rt}=useStatContext(),at=useFetchRelationships(),it=async dt=>{const ft=nt.chatsV2?"/api/v2/pleroma/chats":"/api/v1/pleroma/chats",mt=(dt==null?void 0:dt.link)||ft,ht=await et.get(mt,{params:_e?{search:_e}:void 0}),{data:Et}=ht,yt=getNextLink(ht),vt=!!yt;return rt(Number(ht.headers["x-unread-messages-count"])||sumBy$1(Et,gt=>gt.unread)),at.mutate({accountIds:Et.map(gt=>gt.account.id)}),tt(importFetchedAccounts(Et.map(gt=>gt.account))),{result:Et,hasMore:vt,link:yt}},ot=useInfiniteQuery(ChatKeys.chatSearch(_e),({pageParam:dt})=>it(dt),{keepPreviousData:!0,enabled:nt.chats,getNextPageParam:dt=>{if(dt.hasMore)return{link:dt.link}}}),st=flattenPages(ot.data);return{chatsQuery:{...ot,data:st},getOrCreateChatByAccountId:dt=>et.post(`/api/v1/pleroma/chats/by-account-id/${dt}`)}},useChat=_e=>{const et=useApi(),tt=useAppDispatch(),nt=useFetchRelationships(),rt=async()=>{if(_e){const{data:at}=await et.get(`/api/v1/pleroma/chats/${_e}`);return nt.mutate({accountIds:[at.account.id]}),tt(importFetchedAccount$1(at.account)),at}};return useQuery(ChatKeys.chat(_e),rt,{cacheTime:0,enabled:!!_e})},useChatActions=_e=>{const{account:et}=useOwnAccount(),tt=useApi(),{setUnreadChatsCount:nt}=useStatContext(),{chat:rt,changeScreen:at}=useChatContext(),it=async mt=>tt.post(`/api/v1/pleroma/chats/${_e}/read`,{last_read_id:mt}).then(({data:ht})=>{var yt;updatePageItem(ChatKeys.chatSearch(),ht,(vt,gt)=>vt.id===gt.id);const Et=queryClient.getQueryData(ChatKeys.chatSearch());if(Et){const vt=(yt=flattenPages(Et))==null?void 0:yt.map(gt=>gt.id===ht.id?ht:gt);nt(sumBy$1(vt,gt=>gt.unread))}return ht}).catch(()=>null),ot=useMutation(({chatId:mt,content:ht,mediaIds:Et})=>tt.post(`/api/v1/pleroma/chats/${mt}/messages`,{content:ht,media_id:Et&&Et.length===1?Et[0]:void 0,media_ids:Et}),{retry:!1,onMutate:async mt=>{await queryClient.cancelQueries(["chats","messages",mt.chatId]);const ht=mt.content,Et=queryClient.getQueryData(["chats","messages",mt.chatId]),yt=String(Number(new Date));return queryClient.setQueryData(ChatKeys.chatMessages(mt.chatId),vt=>{const gt={...vt};return gt.pages=gt.pages.map((St,Rt)=>Rt===0?{...St,result:[normalizeChatMessage({content:mt.content,id:yt,created_at:new Date,account_id:et==null?void 0:et.id,pending:!0,unread:!0}),...St.result]}:St),gt}),{prevChatMessages:Et,prevContent:ht,pendingId:yt}},onError:(mt,ht,Et)=>{queryClient.setQueryData(["chats","messages",ht.chatId],Et.prevChatMessages)},onSuccess:(mt,ht,Et)=>{const yt={...rt,last_message:mt.data};updatePageItem(ChatKeys.chatSearch(),yt,(vt,gt)=>vt.id===gt.id),updatePageItem(ChatKeys.chatMessages(ht.chatId),normalizeChatMessage(mt.data),vt=>vt.id===Et.pendingId),reOrderChatListItems()}}),st=useMutation(mt=>tt.patch(`/api/v1/pleroma/chats/${_e}`,mt),{onMutate:async mt=>{await queryClient.cancelQueries(ChatKeys.chat(_e));const ht={...rt},Et={...rt,...mt};return queryClient.setQueryData(ChatKeys.chat(_e),Et),{prevChat:ht}},onError:(mt,ht,Et)=>{at(ChatWidgetScreens.CHAT,Et.prevChat.id),queryClient.setQueryData(ChatKeys.chat(_e),Et.prevChat),toast.error("Chat Settings failed to update.")},onSuccess(){queryClient.invalidateQueries(ChatKeys.chat(_e)),queryClient.invalidateQueries(ChatKeys.chatSearch()),toast.success("Chat Settings updated successfully")}}),ct=mt=>tt.delete(`/api/v1/pleroma/chats/${_e}/messages/${mt}`),ut=useMutation(()=>tt.post(`/api/v1/pleroma/chats/${_e}/accept`),{onSuccess(mt){at(ChatWidgetScreens.CHAT,mt.data.id),queryClient.invalidateQueries(ChatKeys.chat(_e)),queryClient.invalidateQueries(ChatKeys.chatMessages(_e)),queryClient.invalidateQueries(ChatKeys.chatSearch())}}),dt=useMutation(()=>tt.delete(`/api/v1/pleroma/chats/${_e}`),{onSuccess(){at(ChatWidgetScreens.INBOX),queryClient.invalidateQueries(ChatKeys.chatMessages(_e)),queryClient.invalidateQueries(ChatKeys.chatSearch())}}),ft=useMutation(mt=>tt.post(`/api/v1/pleroma/chats/${_e}/messages/${mt.messageId}/reactions`,{emoji:mt.emoji}),{onSuccess(mt){updateChatMessage(mt.data)}}),pt=useMutation(mt=>tt.delete(`/api/v1/pleroma/chats/${_e}/messages/${mt.messageId}/reactions/${mt.emoji}`),{onSuccess(){queryClient.invalidateQueries(ChatKeys.chatMessages(_e))}});return{acceptChat:ut,createChatMessage:ot,createReaction:ft,deleteChat:dt,deleteChatMessage:ct,deleteReaction:pt,markChatAsRead:it,updateChat:st}},vitePluginRequire_1697864660606_68906380="/packs/assets/chat-0c18dae4.mp3",vitePluginRequire_1697864660606_77885030="/packs/assets/chat-5c28f759.oga",vitePluginRequire_1697864660606_78932352="/packs/assets/boop-1c813d11.mp3",vitePluginRequire_1697864660606_51766562="/packs/assets/boop-c1dea078.ogg",createAudio=_e=>{const et=new Audio;return _e.forEach(({type:tt,src:nt})=>{const rt=document.createElement("source");rt.type=tt,rt.src=nt,et.appendChild(rt)}),et},play=_e=>{_e.paused||(_e.pause(),typeof _e.fastSeek=="function"?_e.fastSeek(0):_e.currentTime=0),_e.play()},soundCache={boop:createAudio([{src:vitePluginRequire_1697864660606_51766562,type:"audio/ogg"},{src:vitePluginRequire_1697864660606_78932352,type:"audio/mpeg"}]),chat:createAudio([{src:vitePluginRequire_1697864660606_77885030,type:"audio/ogg"},{src:vitePluginRequire_1697864660606_68906380,type:"audio/mpeg"}])};var lib$5={},backoff$1={};Object.defineProperty(backoff$1,"__esModule",{value:!0});backoff$1.createBackoff=createBackoff$1;var backoff={exponential:function(et,tt){return Math.floor(Math.random()*Math.pow(2,et)*tt)},fibonacci:function(et,tt){var nt=1;if(et>nt)for(var rt=1,nt=2,at=2;at2&&arguments[2]!==void 0?arguments[2]:{};_classCallCheck$b(this,_e),this.url=et,this.protocols=tt,this.reconnectEnabled=!0,this.listeners={},this.backoff=createBackoff(nt.backoff||"exponential",nt),this.backoff.onReady=this.onBackoffReady.bind(this),(typeof nt.connect>"u"||nt.connect)&&this.open()}return _createClass$b(_e,[{key:"open",value:function(){var tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.isReconnect=tt;var nt=this.ws&&this.ws.binaryType;this.ws=new WebSocketImpl(this.url,this.protocols),this.ws.onclose=this.onCloseCallback.bind(this),this.ws.onerror=this.onErrorCallback.bind(this),this.ws.onmessage=this.onMessageCallback.bind(this),this.ws.onopen=this.onOpenCallback.bind(this),nt&&(this.ws.binaryType=nt)}},{key:"onBackoffReady",value:function(tt,nt){this.open(!0)}},{key:"onCloseCallback",value:function(tt){!this.isReconnect&&this.listeners.onclose&&this.listeners.onclose.apply(null,arguments),this.reconnectEnabled&&tt.code<3e3&&this.backoff.backoff()}},{key:"onErrorCallback",value:function(){this.listeners.onerror&&this.listeners.onerror.apply(null,arguments)}},{key:"onMessageCallback",value:function(){this.listeners.onmessage&&this.listeners.onmessage.apply(null,arguments)}},{key:"onOpenCallback",value:function(){this.listeners.onopen&&this.listeners.onopen.apply(null,arguments),this.isReconnect&&this.listeners.onreconnect&&this.listeners.onreconnect.apply(null,arguments),this.isReconnect=!1}},{key:"close",value:function(tt,nt){typeof tt>"u"&&(tt=1e3),this.reconnectEnabled=!1,this.ws.close(tt,nt)}},{key:"send",value:function(tt){this.ws.send(tt)}},{key:"bufferedAmount",get:function(){return this.ws.bufferedAmount}},{key:"readyState",get:function(){return this.ws.readyState}},{key:"binaryType",get:function(){return this.ws.binaryType},set:function(tt){this.ws.binaryType=tt}},{key:"extensions",get:function(){return this.ws.extensions},set:function(tt){this.ws.extensions=tt}},{key:"protocol",get:function(){return this.ws.protocol},set:function(tt){this.ws.protocol=tt}},{key:"onclose",set:function(tt){this.listeners.onclose=tt},get:function(){return this.listeners.onclose}},{key:"onerror",set:function(tt){this.listeners.onerror=tt},get:function(){return this.listeners.onerror}},{key:"onmessage",set:function(tt){this.listeners.onmessage=tt},get:function(){return this.listeners.onmessage}},{key:"onopen",set:function(tt){this.listeners.onopen=tt},get:function(){return this.listeners.onopen}},{key:"onreconnect",set:function(tt){this.listeners.onreconnect=tt},get:function(){return this.listeners.onreconnect}}]),_e}();WebSocketClient.CONNECTING=WebSocketImpl.CONNECTING;WebSocketClient.OPEN=WebSocketImpl.OPEN;WebSocketClient.CLOSING=WebSocketImpl.CLOSING;WebSocketClient.CLOSED=WebSocketImpl.CLOSED;var _default=lib$5.default=WebSocketClient;const randomIntUpTo=_e=>Math.floor(Math.random()*Math.floor(_e));function connectStream(_e,et=null,tt){return(nt,rt)=>{const at=rt().instance.urls.streaming_api,it=getAccessToken(rt()),{onConnect:ot,onDisconnect:st,onReceive:ct}=tt(nt,rt);let ut=null;const dt=()=>{et&&et(nt,()=>{ut=setTimeout(()=>dt(),2e4+randomIntUpTo(2e4))})},ft=()=>{ut&&(clearTimeout(ut),ut=null)};let pt;try{pt=getStream(at,it,_e,{connected(){et&&ft(),ot()},disconnected(){et&&(ut=setTimeout(()=>dt(),randomIntUpTo(4e4))),st()},received(ht){ct(pt,ht)},reconnected(){et&&(ft(),et(nt)),ot()}})}catch(ht){console.error(ht)}return()=>{pt&&pt.close(),ft()}}}function getStream(_e,et,tt,{connected:nt,received:rt,disconnected:at,reconnected:it}){const ot=[`stream=${tt}`],st=new _default(`${_e}/api/v1/streaming/?${ot.join("&")}`,et);return st.onopen=nt,st.onclose=at,st.onreconnect=it,st.onmessage=ct=>{if(ct.data)try{rt(JSON.parse(ct.data))}catch(ut){console.error(ct),console.error(`Could not parse the above streaming event. +${ut}`)}},st}const CONVERSATIONS_MOUNT="CONVERSATIONS_MOUNT",CONVERSATIONS_UNMOUNT="CONVERSATIONS_UNMOUNT",CONVERSATIONS_FETCH_REQUEST="CONVERSATIONS_FETCH_REQUEST",CONVERSATIONS_FETCH_SUCCESS="CONVERSATIONS_FETCH_SUCCESS",CONVERSATIONS_FETCH_FAIL="CONVERSATIONS_FETCH_FAIL",CONVERSATIONS_UPDATE="CONVERSATIONS_UPDATE",CONVERSATIONS_READ="CONVERSATIONS_READ",mountConversations=()=>({type:CONVERSATIONS_MOUNT}),unmountConversations=()=>({type:CONVERSATIONS_UNMOUNT}),markConversationRead=_e=>(et,tt)=>{isLoggedIn(tt)&&(et({type:CONVERSATIONS_READ,id:_e}),api(tt).post(`/api/v1/conversations/${_e}/read`))},expandConversations=({maxId:_e}={})=>(et,tt)=>{if(!isLoggedIn(tt))return;et(expandConversationsRequest());const nt={max_id:_e};_e||(nt.since_id=tt().conversations.items.getIn([0,"id"]));const rt=!!nt.since_id;api(tt).get("/api/v1/conversations",{params:nt}).then(at=>{const it=getLinks(at).refs.find(ot=>ot.rel==="next");et(importFetchedAccounts(at.data.reduce((ot,st)=>ot.concat(st.accounts),[]))),et(importFetchedStatuses(at.data.map(ot=>ot.last_status).filter(ot=>!!ot))),et(expandConversationsSuccess(at.data,it?it.uri:null,rt))}).catch(at=>et(expandConversationsFail(at)))},expandConversationsRequest=()=>({type:CONVERSATIONS_FETCH_REQUEST}),expandConversationsSuccess=(_e,et,tt)=>({type:CONVERSATIONS_FETCH_SUCCESS,conversations:_e,next:et,isLoadingRecent:tt}),expandConversationsFail=_e=>({type:CONVERSATIONS_FETCH_FAIL,error:_e}),updateConversations=_e=>et=>(et(importFetchedAccounts(_e.accounts)),_e.last_status&&et(importFetchedStatus(_e.last_status)),et({type:CONVERSATIONS_UPDATE,conversation:_e})),FILTERS_FETCH_REQUEST="FILTERS_FETCH_REQUEST",FILTERS_FETCH_SUCCESS="FILTERS_FETCH_SUCCESS",FILTERS_FETCH_FAIL="FILTERS_FETCH_FAIL",FILTER_FETCH_REQUEST="FILTER_FETCH_REQUEST",FILTER_FETCH_SUCCESS="FILTER_FETCH_SUCCESS",FILTER_FETCH_FAIL="FILTER_FETCH_FAIL",FILTERS_CREATE_REQUEST="FILTERS_CREATE_REQUEST",FILTERS_CREATE_SUCCESS="FILTERS_CREATE_SUCCESS",FILTERS_CREATE_FAIL="FILTERS_CREATE_FAIL",FILTERS_UPDATE_REQUEST="FILTERS_UPDATE_REQUEST",FILTERS_UPDATE_SUCCESS="FILTERS_UPDATE_SUCCESS",FILTERS_UPDATE_FAIL="FILTERS_UPDATE_FAIL",FILTERS_DELETE_REQUEST="FILTERS_DELETE_REQUEST",FILTERS_DELETE_SUCCESS="FILTERS_DELETE_SUCCESS",FILTERS_DELETE_FAIL="FILTERS_DELETE_FAIL",messages$19={added:{id:"filters.added",defaultMessage:"Filter added."},removed:{id:"filters.removed",defaultMessage:"Filter deleted."}},fetchFiltersV1=()=>(_e,et)=>(_e({type:FILTERS_FETCH_REQUEST,skipLoading:!0}),api(et).get("/api/v1/filters").then(({data:tt})=>_e({type:FILTERS_FETCH_SUCCESS,filters:tt,skipLoading:!0})).catch(tt=>_e({type:FILTERS_FETCH_FAIL,err:tt,skipLoading:!0,skipAlert:!0}))),fetchFiltersV2=()=>(_e,et)=>(_e({type:FILTERS_FETCH_REQUEST,skipLoading:!0}),api(et).get("/api/v2/filters").then(({data:tt})=>_e({type:FILTERS_FETCH_SUCCESS,filters:tt,skipLoading:!0})).catch(tt=>_e({type:FILTERS_FETCH_FAIL,err:tt,skipLoading:!0,skipAlert:!0}))),fetchFilters=(_e=!1)=>(et,tt)=>{if(!isLoggedIn(tt))return;const rt=tt().instance,at=getFeatures(rt);if(at.filtersV2&&_e)return et(fetchFiltersV2());if(at.filters)return et(fetchFiltersV1())},fetchFilterV1=_e=>(et,tt)=>(et({type:FILTER_FETCH_REQUEST,skipLoading:!0}),api(tt).get(`/api/v1/filters/${_e}`).then(({data:nt})=>et({type:FILTER_FETCH_SUCCESS,filter:nt,skipLoading:!0})).catch(nt=>et({type:FILTER_FETCH_FAIL,err:nt,skipLoading:!0,skipAlert:!0}))),fetchFilterV2=_e=>(et,tt)=>(et({type:FILTER_FETCH_REQUEST,skipLoading:!0}),api(tt).get(`/api/v2/filters/${_e}`).then(({data:nt})=>et({type:FILTER_FETCH_SUCCESS,filter:nt,skipLoading:!0})).catch(nt=>et({type:FILTER_FETCH_FAIL,err:nt,skipLoading:!0,skipAlert:!0}))),fetchFilter=_e=>(et,tt)=>{const rt=tt().instance,at=getFeatures(rt);if(at.filtersV2)return et(fetchFilterV2(_e));if(at.filters)return et(fetchFilterV1(_e))},createFilterV1=(_e,et,tt,nt,rt)=>(at,it)=>(at({type:FILTERS_CREATE_REQUEST}),api(it).post("/api/v1/filters",{phrase:rt[0].keyword,context:tt,irreversible:nt,whole_word:rt[0].whole_word,expires_in:et}).then(ot=>{at({type:FILTERS_CREATE_SUCCESS,filter:ot.data}),toast.success(messages$19.added)}).catch(ot=>{at({type:FILTERS_CREATE_FAIL,error:ot})})),createFilterV2=(_e,et,tt,nt,rt)=>(at,it)=>(at({type:FILTERS_CREATE_REQUEST}),api(it).post("/api/v2/filters",{title:_e,context:tt,filter_action:nt?"hide":"warn",expires_in:et,keywords_attributes:rt}).then(ot=>{at({type:FILTERS_CREATE_SUCCESS,filter:ot.data}),toast.success(messages$19.added)}).catch(ot=>{at({type:FILTERS_CREATE_FAIL,error:ot})})),createFilter=(_e,et,tt,nt,rt)=>(at,it)=>{const st=it().instance;return getFeatures(st).filtersV2?at(createFilterV2(_e,et,tt,nt,rt)):at(createFilterV1(_e,et,tt,nt,rt))},updateFilterV1=(_e,et,tt,nt,rt,at)=>(it,ot)=>(it({type:FILTERS_UPDATE_REQUEST}),api(ot).patch(`/api/v1/filters/${_e}`,{phrase:at[0].keyword,context:nt,irreversible:rt,whole_word:at[0].whole_word,expires_in:tt}).then(st=>{it({type:FILTERS_UPDATE_SUCCESS,filter:st.data}),toast.success(messages$19.added)}).catch(st=>{it({type:FILTERS_UPDATE_FAIL,error:st})})),updateFilterV2=(_e,et,tt,nt,rt,at)=>(it,ot)=>(it({type:FILTERS_UPDATE_REQUEST}),api(ot).patch(`/api/v2/filters/${_e}`,{title:et,context:nt,filter_action:rt?"hide":"warn",expires_in:tt,keywords_attributes:at}).then(st=>{it({type:FILTERS_UPDATE_SUCCESS,filter:st.data}),toast.success(messages$19.added)}).catch(st=>{it({type:FILTERS_UPDATE_FAIL,error:st})})),updateFilter=(_e,et,tt,nt,rt,at)=>(it,ot)=>{const ct=ot().instance;return getFeatures(ct).filtersV2?it(updateFilterV2(_e,et,tt,nt,rt,at)):it(updateFilterV1(_e,et,tt,nt,rt,at))},deleteFilterV1=_e=>(et,tt)=>(et({type:FILTERS_DELETE_REQUEST}),api(tt).delete(`/api/v1/filters/${_e}`).then(nt=>{et({type:FILTERS_DELETE_SUCCESS,filter:nt.data}),toast.success(messages$19.removed)}).catch(nt=>{et({type:FILTERS_DELETE_FAIL,error:nt})})),deleteFilterV2=_e=>(et,tt)=>(et({type:FILTERS_DELETE_REQUEST}),api(tt).delete(`/api/v2/filters/${_e}`).then(nt=>{et({type:FILTERS_DELETE_SUCCESS,filter:nt.data}),toast.success(messages$19.removed)}).catch(nt=>{et({type:FILTERS_DELETE_FAIL,error:nt})})),deleteFilter=_e=>(et,tt)=>{const rt=tt().instance;return getFeatures(rt).filtersV2?et(deleteFilterV2(_e)):et(deleteFilterV1(_e))},defaultMediaVisibility=(_e,et)=>!_e||(_e=getActualStatus(_e),_e.visibility==="self")?!1:et?!0:!(_e!=null&&_e.sensitive),getFirstExternalLink=_e=>{try{const et='a:not(.mention,.hashtag,.attachment,[rel~="tag"])',tt=document.createElement("div");return tt.innerHTML=_e.content,tt.querySelector(et)}catch{return null}},shouldHaveCard=_e=>!!getFirstExternalLink(_e),hasIntegerMediaIds=_e=>_e.media_attachments.some(({id:et})=>isIntegerId(et)),textForScreenReader=(_e,et,tt)=>{const{account:nt}=et;if(!nt||typeof nt!="object")return"";const rt=nt.display_name,at=[rt.length===0?nt.acct.split("@")[0]:rt,et.spoiler_text&&et.hidden?et.spoiler_text:et.search_index.slice(et.spoiler_text.length),_e.formatDate(et.created_at,{hour:"2-digit",minute:"2-digit",month:"short",day:"numeric"}),nt.acct];return tt&&at.push(tt),at.join(", ")},getActualStatus=_e=>_e!=null&&_e.reblog&&typeof(_e==null?void 0:_e.reblog)=="object"?_e.reblog:_e;var root$1=_root,now$2=function(){return root$1.Date.now()},now_1=now$2,reWhitespace=/\s/;function trimmedEndIndex$1(_e){for(var et=_e.length;et--&&reWhitespace.test(_e.charAt(et)););return et}var _trimmedEndIndex=trimmedEndIndex$1,trimmedEndIndex=_trimmedEndIndex,reTrimStart$1=/^\s+/;function baseTrim$2(_e){return _e&&_e.slice(0,trimmedEndIndex(_e)+1).replace(reTrimStart$1,"")}var _baseTrim=baseTrim$2,baseTrim$1=_baseTrim,isObject$e=isObject_1,isSymbol=isSymbol_1,NAN=0/0,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;function toNumber$1(_e){if(typeof _e=="number")return _e;if(isSymbol(_e))return NAN;if(isObject$e(_e)){var et=typeof _e.valueOf=="function"?_e.valueOf():_e;_e=isObject$e(et)?et+"":et}if(typeof _e!="string")return _e===0?_e:+_e;_e=baseTrim$1(_e);var tt=reIsBinary.test(_e);return tt||reIsOctal.test(_e)?freeParseInt(_e.slice(2),tt?2:8):reIsBadHex.test(_e)?NAN:+_e}var toNumber_1=toNumber$1,isObject$d=isObject_1,now$1=now_1,toNumber=toNumber_1,FUNC_ERROR_TEXT$1="Expected a function",nativeMax=Math.max,nativeMin=Math.min;function debounce$1(_e,et,tt){var nt,rt,at,it,ot,st,ct=0,ut=!1,dt=!1,ft=!0;if(typeof _e!="function")throw new TypeError(FUNC_ERROR_TEXT$1);et=toNumber(et)||0,isObject$d(tt)&&(ut=!!tt.leading,dt="maxWait"in tt,at=dt?nativeMax(toNumber(tt.maxWait)||0,et):at,ft="trailing"in tt?!!tt.trailing:ft);function pt($t){var bt=nt,wt=rt;return nt=rt=void 0,ct=$t,it=_e.apply(wt,bt),it}function mt($t){return ct=$t,ot=setTimeout(yt,et),ut?pt($t):it}function ht($t){var bt=$t-st,wt=$t-ct,xt=et-bt;return dt?nativeMin(xt,at-wt):xt}function Et($t){var bt=$t-st,wt=$t-ct;return st===void 0||bt>=et||bt<0||dt&&wt>=at}function yt(){var $t=now$1();if(Et($t))return vt($t);ot=setTimeout(yt,ht($t))}function vt($t){return ot=void 0,ft&&nt?pt($t):(nt=rt=void 0,it)}function gt(){ot!==void 0&&clearTimeout(ot),ct=0,nt=st=rt=ot=void 0}function St(){return ot===void 0?it:vt(now$1())}function Rt(){var $t=now$1(),bt=Et($t);if(nt=arguments,rt=this,st=$t,bt){if(ot===void 0)return mt(st);if(dt)return clearTimeout(ot),ot=setTimeout(yt,et),pt(st)}return ot===void 0&&(ot=setTimeout(yt,et)),it}return Rt.cancel=gt,Rt.flush=St,Rt}var debounce_1=debounce$1;const debounce$2=getDefaultExportFromCjs$1(debounce_1);var debounce=debounce_1,isObject$c=isObject_1,FUNC_ERROR_TEXT="Expected a function";function throttle(_e,et,tt){var nt=!0,rt=!0;if(typeof _e!="function")throw new TypeError(FUNC_ERROR_TEXT);return isObject$c(tt)&&(nt="leading"in tt?!!tt.leading:nt,rt="trailing"in tt?!!tt.trailing:rt),debounce(_e,et,{leading:nt,maxWait:et,trailing:rt})}var throttle_1=throttle;const throttle$1=getDefaultExportFromCjs$1(throttle_1);function parse_option(_e,et){return typeof _e<"u"?_e:et}function create_object_array(_e){const et=new Array(_e);for(let tt=0;tt<_e;tt++)et[tt]=create_object();return et}function get_keys(_e){return Object.keys(_e)}function create_object(){return Object.create(null)}function concat$2(_e){return[].concat.apply([],_e)}function sort_by_length_down(_e,et){return et.length-_e.length}function is_array(_e){return _e.constructor===Array}function is_string(_e){return typeof _e=="string"}function is_object$1(_e){return typeof _e=="object"}function is_function(_e){return typeof _e=="function"}function pipeline(_e,et,tt,nt){if(_e&&(et&&(_e=replace$3(_e,et)),this.matcher&&(_e=replace$3(_e,this.matcher)),this.stemmer&&_e.length>1&&(_e=replace$3(_e,this.stemmer)),nt&&_e.length>1&&(_e=collapse(_e)),tt||tt==="")){const rt=_e.split(tt);return this.filter?filter(rt,this.filter):rt}return _e}const regex_whitespace=/[\p{Z}\p{S}\p{P}\p{C}]+/u;function init_filter(_e){const et=create_object();for(let tt=0,nt=_e.length;tt=0;ct--){const ut=_e[ct],dt=ut.length,ft=create_object();let pt=!it;for(let mt=0;mt=0;ct--){ut=nt[ct],dt=ut.length;for(let ft=0,pt;ft0;nt--)this.queue[nt]=this.queue[nt-1];this.queue[0]=_e}this.cache[_e]=et};CacheClass.prototype.get=function(_e){const et=this.cache[_e];if(this.limit&&et){const tt=this.queue.indexOf(_e);if(tt){const nt=this.queue[tt-1];this.queue[tt-1]=this.queue[tt],this.queue[tt]=nt}}return et};CacheClass.prototype.del=function(_e){for(let et=0,tt,nt;et"u"&&self.exports,rt=this;this.worker=create$3(tt,nt,_e.worker),this.resolver=create_object(),this.worker&&(nt?this.worker.on("message",function(at){rt.resolver[at.id](at.msg),delete rt.resolver[at.id]}):this.worker.onmessage=function(at){at=at.data,rt.resolver[at.id](at.msg),delete rt.resolver[at.id]},this.worker.postMessage({task:"init",factory:tt,options:_e}))}register$2("add");register$2("append");register$2("search");register$2("update");register$2("remove");function register$2(_e){WorkerIndex.prototype[_e]=WorkerIndex.prototype[_e+"Async"]=function(){const et=this,tt=[].slice.call(arguments),nt=tt[tt.length-1];let rt;is_function(nt)&&(rt=nt,tt.splice(tt.length-1,1));const at=new Promise(function(it){setTimeout(function(){et.resolver[++pid]=it,et.worker.postMessage({task:_e,id:pid,args:tt})})});return rt?(at.then(rt),this):at}}function create$3(factory,is_node_js,worker_path){let worker;try{worker=is_node_js?eval('new (require("worker_threads")["Worker"])("../dist/node/node.js")'):factory?new Worker(URL.createObjectURL(new Blob(["onmessage="+handler.toString()],{type:"text/javascript"}))):new Worker(is_string(worker_path)?worker_path:"worker/worker.js",{type:"module"})}catch(_e){}return worker}function Document$1(_e){if(!(this instanceof Document$1))return new Document$1(_e);const et=_e.document||_e.doc||_e;let tt;this.tree=[],this.field=[],this.marker=[],this.register=create_object(),this.key=(tt=et.key||et.id)&&parse_tree(tt,this.marker)||"id",this.fastupdate=parse_option(_e.fastupdate,!0),this.storetree=(tt=et.store)&&tt!==!0&&[],this.store=tt&&create_object(),this.tag=(tt=et.tag)&&parse_tree(tt,this.marker),this.tagindex=tt&&create_object(),this.cache=(tt=_e.cache)&&new CacheClass(tt),_e.cache=!1,this.worker=_e.worker,this.async=!1,this.index=parse_descriptor.call(this,_e,et)}function parse_descriptor(_e,et){const tt=create_object();let nt=et.index||et.field||et;is_string(nt)&&(nt=[nt]);for(let rt=0,at,it;rt=0&&(_e=_e.substring(0,_e.length-2),_e&&(et[nt]=!0)),_e&&(tt[nt++]=_e);return nt1?tt:tt[0]}function parse_simple(_e,et){if(is_string(et))_e=_e[et];else for(let tt=0;_e&&tt1?tt.splice(nt,1):delete this.tagindex[et])}this.store&&delete this.store[_e],delete this.register[_e]}return this};Document$1.prototype.search=function(_e,et,tt,nt){tt||(!et&&is_object$1(_e)?(tt=_e,_e=""):is_object$1(et)&&(tt=et,et=0));let rt=[],at=[],it,ot,st,ct,ut,dt,ft=0;if(tt)if(is_array(tt))st=tt,tt=null;else{if(_e=tt.query||_e,it=tt.pluck,st=it||tt.index||tt.field,ct=tt.tag,ot=this.store&&tt.enrich,ut=tt.bool==="and",et=tt.limit||et||100,dt=tt.offset||0,ct&&(is_string(ct)&&(ct=[ct]),!_e)){for(let mt=0,ht;mt1||ct&&ct.length>1);const pt=!nt&&(this.worker||this.async)&&[];for(let mt=0,ht,Et,yt;mt0)return(at>et||tt)&&(rt=rt.slice(tt,tt+et)),nt&&(rt=apply_enrich.call(this,rt)),{tag:_e,result:rt}}function apply_enrich(_e){const et=new Array(_e.length);for(let tt=0,nt;tt<_e.length;tt++)nt=_e[tt],et[tt]={id:nt,doc:this.store[nt]};return et}Document$1.prototype.contain=function(_e){return!!this.register[_e]};Document$1.prototype.get=function(_e){return this.store[_e]},Document$1.prototype.set=function(_e,et){return this.store[_e]=et,this};Document$1.prototype.searchCache=searchCache;Document$1.prototype.export=exportDocument,Document$1.prototype.import=importDocument;apply_async(Document$1.prototype);function Index(_e,et){if(!(this instanceof Index))return new Index(_e);let tt,nt,rt;_e?(_e=apply_preset(_e),tt=_e.charset,nt=_e.lang,is_string(tt)&&(tt.indexOf(":")===-1&&(tt+=":default"),tt=global_charset[tt]),is_string(nt)&&(nt=global_lang[nt])):_e={};let at,it,ot=_e.context||{};this.encode=_e.encode||tt&&tt.encode||encode,this.register=et||create_object(),this.resolution=at=_e.resolution||9,this.tokenize=rt=tt&&tt.tokenize||_e.tokenize||"strict",this.depth=rt==="strict"&&ot.depth,this.bidirectional=parse_option(ot.bidirectional,!0),this.optimize=it=parse_option(_e.optimize,!0),this.fastupdate=parse_option(_e.fastupdate,!0),this.minlength=_e.minlength||1,this.boost=_e.boost,this.map=it?create_object_array(at):create_object(),this.resolution_ctx=at=ot.resolution||1,this.ctx=it?create_object_array(at):create_object(),this.rtl=tt&&tt.rtl||_e.rtl,this.matcher=(rt=_e.matcher||nt&&nt.matcher)&&init_stemmer_or_matcher(rt,!1),this.stemmer=(rt=_e.stemmer||nt&&nt.stemmer)&&init_stemmer_or_matcher(rt,!0),this.filter=(rt=_e.filter||nt&&nt.filter)&&init_filter(rt),this.cache=(rt=_e.cache)&&new CacheClass(rt)}Index.prototype.append=function(_e,et){return this.add(_e,et,!0)};Index.prototype.add=function(_e,et,tt,nt){if(et&&(_e||_e===0)){if(!nt&&!tt&&this.register[_e])return this.update(_e,et);et=this.encode(""+et);const rt=et.length;if(rt){const at=create_object(),it=create_object(),ot=this.depth,st=this.resolution;for(let ct=0;ct=this.minlength&&(ot||!it[ut])){let ft=get_score(st,rt,ct),pt="";switch(this.tokenize){case"full":if(dt>2){for(let mt=0;mtmt;ht--)if(ht-mt>=this.minlength){const Et=get_score(st,rt,ct,dt,mt);pt=ut.substring(mt,ht),this.push_index(it,pt,Et,_e,tt)}break}case"reverse":if(dt>1){for(let mt=dt-1;mt>0;mt--)if(pt=ut[mt]+pt,pt.length>=this.minlength){const ht=get_score(st,rt,ct,dt,mt);this.push_index(it,pt,ht,_e,tt)}pt=""}case"forward":if(dt>1){for(let mt=0;mt=this.minlength&&this.push_index(it,pt,ft,_e,tt);break}default:if(this.boost&&(ft=Math.min(ft/this.boost(et,ut,ct)|0,st-1)),this.push_index(it,ut,ft,_e,tt),ot&&rt>1&&ct=this.minlength&&!mt[ut]){mt[ut]=1;const gt=get_score(ht+(rt/2>ht?0:1),rt,ct,yt-1,vt-1),St=this.bidirectional&&ut>Et;this.push_index(at,St?Et:ut,gt,_e,tt,St?ut:Et)}}}}}this.fastupdate||(this.register[_e]=1)}}return this};function get_score(_e,et,tt,nt,rt){return tt&&_e>1?et+(nt||0)<=_e?tt+(rt||0):(_e-1)/(et+(nt||0))*(tt+(rt||0))+1|0:0}Index.prototype.push_index=function(_e,et,tt,nt,rt,at){let it=at?this.ctx:this.map;if((!_e[et]||at&&!_e[et][at])&&(this.optimize&&(it=it[tt]),at?(_e=_e[et]||(_e[et]=create_object()),_e[at]=1,it=it[at]||(it[at]=create_object())):_e[et]=1,it=it[et]||(it[et]=[]),this.optimize||(it=it[tt]||(it[tt]=[])),(!rt||!it.includes(nt))&&(it[it.length]=nt,this.fastupdate))){const ot=this.register[nt]||(this.register[nt]=[]);ot[ot.length]=it}};Index.prototype.search=function(_e,et,tt){tt||(!et&&is_object$1(_e)?(tt=_e,_e=tt.query):is_object$1(et)&&(tt=et));let nt=[],rt,at,it,ot=0;if(tt&&(_e=tt.query||_e,et=tt.limit,ot=tt.offset||0,at=tt.context,it=tt.suggest),_e&&(_e=this.encode(""+_e),rt=_e.length,rt>1)){const dt=create_object(),ft=[];for(let pt=0,mt=0,ht;pt=this.minlength&&!dt[ht]){if(!this.optimize&&!it&&!this.map[ht])return nt;ft[mt++]=ht,dt[ht]=1}_e=ft,rt=_e.length}if(!rt)return nt;et||(et=100);let st=this.depth&&rt>1&&at!==!1,ct=0,ut;st?(ut=_e[0],ct=1):rt>1&&_e.sort(sort_by_length_down);for(let dt,ft;ct=tt)))));dt++);if(ct){if(rt)return single_result(ot,tt,0);_e[_e.length]=ot;return}}return!et&&ot};function single_result(_e,et,tt){return _e.length===1?_e=_e[0]:_e=concat$2(_e),tt||_e.length>et?_e.slice(tt,tt+et):_e}function get_array(_e,et,tt,nt){if(tt){const rt=nt&&et>tt;_e=_e[rt?et:tt],_e=_e&&_e[rt?tt:et]}else _e=_e[et];return _e}Index.prototype.contain=function(_e){return!!this.register[_e]};Index.prototype.update=function(_e,et){return this.remove(_e).add(_e,et)};Index.prototype.remove=function(_e,et){const tt=this.register[_e];if(tt){if(this.fastupdate)for(let nt=0,rt;nt1&&(_e.splice(it,1),at++):at++}else{rt=Math.min(_e.length,tt);for(let it=0,ot;it_e[0].localeCompare(et[0]));for(const[_e,et]of sortedEmojis)index$2.add("n"+_e,`${et.id} ${et.name} ${et.keywords.join(" ")}`);const addCustomToPool=_e=>{for(const tt in index$2.register)tt[0]==="c"&&index$2.remove(tt);let et=0;for(const tt of _e)index$2.add("c"+et++,tt.id)},search$1=(_e,{maxResults:et=5}={},tt)=>index$2.search(_e,et).flatMap(nt=>{var at;if(typeof nt!="string")return;if(nt[0]==="c"&&tt){const it=Number(nt.slice(1)),ot=tt.get(it);if(ot)return{id:ot.get("shortcode",""),colons:":"+ot.get("shortcode","")+":",custom:!0,imageUrl:ot.get("static_url","")}}const rt=(at=emojiData.emojis[nt.slice(1)])==null?void 0:at.skins;if(rt)return{id:nt.slice(1),colons:":"+nt.slice(1)+":",unified:rt[0].unified,native:rt[0].native}}).filter(Boolean);let Settings$1=class{constructor(et=null){Fr(this,"keyBase",null);this.keyBase=et}generateKey(et){return this.keyBase?[this.keyBase,`id${et}`].join("."):et}set(et,tt){const nt=this.generateKey(et);try{const rt=JSON.stringify(tt);return localStorage.setItem(nt,rt),tt}catch{return null}}get(et){const tt=this.generateKey(et);try{const nt=localStorage.getItem(tt);return nt?JSON.parse(nt):null}catch{return null}}remove(et){const tt=this.get(et);if(tt){const nt=this.generateKey(et);try{localStorage.removeItem(nt)}catch{}}return tt}};const pushNotificationsSetting=new Settings$1("soapbox_push_notification_data"),tagHistory=new Settings$1("soapbox_tag_history"),groupSearchHistory=new Settings$1("soapbox_group_search_history"),truncateFilename=(_e,et)=>{const tt=_e.split("/").pop();return!tt||tt.length<=et?tt:[tt.substr(0,et/2),tt.substr(tt.length-et/2)].join("…")},formatBytes=(_e,et=2)=>{if(_e===0)return"0 Bytes";const tt=1024,nt=et<0?0:et,rt=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],at=Math.floor(Math.log(_e)/Math.log(tt));return parseFloat((_e/Math.pow(tt,at)).toFixed(nt))+" "+rt[at]},getVideoDuration=_e=>{const et=document.createElement("video"),tt=new Promise((nt,rt)=>{et.addEventListener("loadedmetadata",()=>{et.duration===1/0?(et.currentTime=Number.MAX_SAFE_INTEGER,et.ontimeupdate=()=>{et.ontimeupdate=null,nt(et.duration),et.currentTime=0}):nt(et.duration)}),et.onerror=at=>rt(at.target.error)});return et.src=window.URL.createObjectURL(_e),tt},domParser$3=new DOMParser,addAutoPlay=_e=>{try{const et=domParser$3.parseFromString(_e,"text/html").documentElement,tt=et.querySelector("iframe");if(tt){const nt=new URL(tt.src);return new URL(tt.src).host==="rumble.com"?(nt.searchParams.append("pub","7a20"),nt.searchParams.append("autoplay","2")):(nt.searchParams.append("autoplay","1"),nt.searchParams.append("auto_play","1"),tt.allow="autoplay"),tt.src=nt.toString(),et.querySelector("body").innerHTML}}catch{return _e}return _e},DEFAULT_MAX_PIXELS=1920*1080,_browser_quirks={},dropOrientationIfNeeded=_e=>new Promise(et=>{switch(_browser_quirks["image-orientation-automatic"]){case!0:et(1);break;case!1:et(_e);break;default:const tt="data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==",nt=new Image;nt.onload=()=>{const rt=nt.width===1&&nt.height===2;_browser_quirks["image-orientation-automatic"]=rt,et(rt?1:_e)},nt.onerror=()=>{_browser_quirks["image-orientation-automatic"]=!1,et(_e)},nt.src=tt}}),getImageUrl=_e=>new Promise((et,tt)=>{var rt;if((rt=window.URL)!=null&&rt.createObjectURL){try{et(URL.createObjectURL(_e))}catch(at){tt(at)}return}const nt=new FileReader;nt.onerror=(...at)=>tt(...at),nt.onload=({target:at})=>et((at==null?void 0:at.result)||""),nt.readAsDataURL(_e)}),loadImage=_e=>new Promise((et,tt)=>{getImageUrl(_e).then(nt=>{const rt=new Image;rt.onerror=(...at)=>tt([...at]),rt.onload=()=>et(rt),rt.src=nt}).catch(tt)}),getOrientation=(_e,et="image/png")=>new Promise(tt=>{if(!["image/jpeg","image/webp"].includes(et)){tt(1);return}__vitePreload(()=>import("./js/exif-05f4a801.js").then(nt=>nt.e),[]).then(({default:nt})=>{nt.getData(_e,()=>{const rt=nt.getTag(_e,"Orientation");rt!==1?dropOrientationIfNeeded(rt).then(tt).catch(()=>tt(rt)):tt(rt)})}).catch(()=>{})}),processImage=(_e,{width:et,height:tt,orientation:nt,type:rt="image/png",name:at="resized.png"})=>new Promise((it,ot)=>{const st=document.createElement("canvas");4{if(!ut){ot(ut);return}it(new File([ut],at,{type:rt,lastModified:new Date().getTime()}))},rt)}),resizeImage=(_e,et,tt)=>new Promise((nt,rt)=>{const{width:at,height:it}=_e,ot=et.type||"image/png",st=Math.round(Math.sqrt(tt*(at/it))),ct=Math.round(Math.sqrt(tt*(it/at)));getOrientation(_e,ot).then(ut=>processImage(_e,{width:st,height:ct,name:et.name,orientation:ut,type:ot})).then(nt).catch(rt)}),resizeImage$1=(_e,et=DEFAULT_MAX_PIXELS)=>new Promise(tt=>{if(!_e.type.match(/image.*/)||_e.type==="image/gif"){tt(_e);return}loadImage(_e).then(nt=>{if(nt.width*nt.height{console.error(rt),tt(_e)})}).catch(()=>tt(_e))}),EMOJI_USE="EMOJI_USE",useEmoji=_e=>et=>{et({type:EMOJI_USE,emoji:_e}),et(saveSettings())},noOp$8=_e=>{},fetchMedia=_e=>(et,tt)=>api(tt).get(`/api/v1/media/${_e}`),updateMedia=(_e,et)=>(tt,nt)=>api(nt).put(`/api/v1/media/${_e}`,et),uploadMediaV1=(_e,et=noOp$8)=>(tt,nt)=>api(nt).post("/api/v1/media",_e,{onUploadProgress:et}),uploadMediaV2=(_e,et=noOp$8)=>(tt,nt)=>api(nt).post("/api/v2/media",_e,{onUploadProgress:et}),uploadMedia=(_e,et=noOp$8)=>(tt,nt)=>{const at=nt().instance;return getFeatures(at).mediaV2?tt(uploadMediaV2(_e,et)):tt(uploadMediaV1(_e,et))},{CancelToken,isCancel}=axios$1;let cancelFetchComposeSuggestionsAccounts;const COMPOSE_CHANGE="COMPOSE_CHANGE",COMPOSE_SUBMIT_REQUEST="COMPOSE_SUBMIT_REQUEST",COMPOSE_SUBMIT_SUCCESS="COMPOSE_SUBMIT_SUCCESS",COMPOSE_SUBMIT_FAIL="COMPOSE_SUBMIT_FAIL",COMPOSE_REPLY="COMPOSE_REPLY",COMPOSE_EVENT_REPLY="COMPOSE_EVENT_REPLY",COMPOSE_REPLY_CANCEL="COMPOSE_REPLY_CANCEL",COMPOSE_QUOTE="COMPOSE_QUOTE",COMPOSE_QUOTE_CANCEL="COMPOSE_QUOTE_CANCEL",COMPOSE_DIRECT="COMPOSE_DIRECT",COMPOSE_MENTION="COMPOSE_MENTION",COMPOSE_RESET="COMPOSE_RESET",COMPOSE_UPLOAD_REQUEST="COMPOSE_UPLOAD_REQUEST",COMPOSE_UPLOAD_SUCCESS="COMPOSE_UPLOAD_SUCCESS",COMPOSE_UPLOAD_FAIL="COMPOSE_UPLOAD_FAIL",COMPOSE_UPLOAD_PROGRESS="COMPOSE_UPLOAD_PROGRESS",COMPOSE_UPLOAD_UNDO="COMPOSE_UPLOAD_UNDO",COMPOSE_GROUP_POST="COMPOSE_GROUP_POST",COMPOSE_SET_GROUP_TIMELINE_VISIBLE="COMPOSE_SET_GROUP_TIMELINE_VISIBLE",COMPOSE_SUGGESTIONS_CLEAR="COMPOSE_SUGGESTIONS_CLEAR",COMPOSE_SUGGESTIONS_READY="COMPOSE_SUGGESTIONS_READY",COMPOSE_SUGGESTION_SELECT="COMPOSE_SUGGESTION_SELECT",COMPOSE_SUGGESTION_TAGS_UPDATE="COMPOSE_SUGGESTION_TAGS_UPDATE",COMPOSE_TAG_HISTORY_UPDATE="COMPOSE_TAG_HISTORY_UPDATE",COMPOSE_SPOILERNESS_CHANGE="COMPOSE_SPOILERNESS_CHANGE",COMPOSE_TYPE_CHANGE="COMPOSE_TYPE_CHANGE",COMPOSE_SPOILER_TEXT_CHANGE="COMPOSE_SPOILER_TEXT_CHANGE",COMPOSE_VISIBILITY_CHANGE="COMPOSE_VISIBILITY_CHANGE",COMPOSE_EMOJI_INSERT="COMPOSE_EMOJI_INSERT",COMPOSE_UPLOAD_CHANGE_REQUEST="COMPOSE_UPLOAD_UPDATE_REQUEST",COMPOSE_UPLOAD_CHANGE_SUCCESS="COMPOSE_UPLOAD_UPDATE_SUCCESS",COMPOSE_UPLOAD_CHANGE_FAIL="COMPOSE_UPLOAD_UPDATE_FAIL",COMPOSE_POLL_ADD="COMPOSE_POLL_ADD",COMPOSE_POLL_REMOVE="COMPOSE_POLL_REMOVE",COMPOSE_POLL_OPTION_ADD="COMPOSE_POLL_OPTION_ADD",COMPOSE_POLL_OPTION_CHANGE="COMPOSE_POLL_OPTION_CHANGE",COMPOSE_POLL_OPTION_REMOVE="COMPOSE_POLL_OPTION_REMOVE",COMPOSE_POLL_SETTINGS_CHANGE="COMPOSE_POLL_SETTINGS_CHANGE",COMPOSE_SCHEDULE_ADD="COMPOSE_SCHEDULE_ADD",COMPOSE_SCHEDULE_SET="COMPOSE_SCHEDULE_SET",COMPOSE_SCHEDULE_REMOVE="COMPOSE_SCHEDULE_REMOVE",COMPOSE_ADD_TO_MENTIONS="COMPOSE_ADD_TO_MENTIONS",COMPOSE_REMOVE_FROM_MENTIONS="COMPOSE_REMOVE_FROM_MENTIONS",COMPOSE_SET_STATUS="COMPOSE_SET_STATUS",messages$18={exceededImageSizeLimit:{id:"upload_error.image_size_limit",defaultMessage:"Image exceeds the current file size limit ({limit})"},exceededVideoSizeLimit:{id:"upload_error.video_size_limit",defaultMessage:"Video exceeds the current file size limit ({limit})"},exceededVideoDurationLimit:{id:"upload_error.video_duration_limit",defaultMessage:"Video exceeds the current duration limit ({limit, plural, one {# second} other {# seconds}})"},scheduleError:{id:"compose.invalid_schedule",defaultMessage:"You must schedule a post at least 5 minutes out."},success:{id:"compose.submit_success",defaultMessage:"Your post was sent"},editSuccess:{id:"compose.edit_success",defaultMessage:"Your post was edited"},uploadErrorLimit:{id:"upload_error.limit",defaultMessage:"File upload limit exceeded."},uploadErrorPoll:{id:"upload_error.poll",defaultMessage:"File upload not allowed with polls."},view:{id:"toast.view",defaultMessage:"View"},replyConfirm:{id:"confirmations.reply.confirm",defaultMessage:"Reply"},replyMessage:{id:"confirmations.reply.message",defaultMessage:"Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?"}},setComposeToStatus=(_e,et,tt,nt,rt)=>(at,it)=>{const{instance:ot}=it(),{explicitAddressing:st}=getFeatures(ot),ct={type:COMPOSE_SET_STATUS,id:"compose-modal",status:_e,rawText:et,explicitAddressing:st,spoilerText:tt,contentType:nt,v:parseVersion(ot.version),withRedraft:rt};at(ct)},changeCompose=(_e,et)=>({type:COMPOSE_CHANGE,id:_e,text:et}),replyCompose=_e=>(et,tt)=>{const nt=tt(),rt=nt.instance,{explicitAddressing:at}=getFeatures(rt),it=!!getSettings(nt).get("preserveSpoilers"),ot=selectOwnAccount(nt);if(!ot)return;et({type:COMPOSE_REPLY,id:"compose-modal",status:_e,account:ot,explicitAddressing:at,preserveSpoilers:it}),et(openModal("COMPOSE"))},cancelReplyCompose=()=>({type:COMPOSE_REPLY_CANCEL,id:"compose-modal"}),quoteCompose=_e=>(et,tt)=>{const nt=tt(),rt=nt.instance,{explicitAddressing:at}=getFeatures(rt),it={type:COMPOSE_QUOTE,id:"compose-modal",status:_e,account:selectOwnAccount(nt),explicitAddressing:at};et(it),et(openModal("COMPOSE"))},cancelQuoteCompose=()=>({type:COMPOSE_QUOTE_CANCEL,id:"compose-modal"}),groupComposeModal=_e=>(et,tt)=>{const nt=`group:${_e.id}`;et(groupCompose(nt,_e.id)),et(openModal("COMPOSE",{composeId:nt}))},resetCompose=(_e="compose-modal")=>({type:COMPOSE_RESET,id:_e}),mentionCompose=_e=>et=>{et({type:COMPOSE_MENTION,id:"compose-modal",account:_e}),et(openModal("COMPOSE"))},directCompose=_e=>et=>{et({type:COMPOSE_DIRECT,id:"compose-modal",account:_e}),et(openModal("COMPOSE"))},directComposeById=_e=>(et,tt)=>{const nt=selectAccount(tt(),_e);if(!nt)return;et({type:COMPOSE_DIRECT,id:"compose-modal",account:nt}),et(openModal("COMPOSE"))},handleComposeSubmit=(_e,et,tt,nt,rt,at)=>{!_e||!et||(_e(insertIntoTagHistory(tt,nt.tags||[],rt)),_e(submitComposeSuccess(tt,{...nt})),toast.success(at?messages$18.editSuccess:messages$18.success,{actionLabel:messages$18.view,actionLink:`/@${nt.account.acct}/posts/${nt.id}`}))},needsDescriptions=(_e,et)=>{const tt=_e.compose.get(et).media_attachments,nt=getSettings(_e).get("missingDescriptionModal"),rt=tt.filter(at=>!at.description).size>0;return nt&&rt},validateSchedule=(_e,et)=>{var rt;const tt=(rt=_e.compose.get(et))==null?void 0:rt.schedule;if(!tt)return!0;const nt=new Date(new Date().getTime()+3e5);return tt.getTime()>nt.getTime()},submitCompose=(_e,et,tt=!1)=>(nt,rt)=>{if(!isLoggedIn(rt))return;const at=rt(),it=at.compose.get(_e),ot=it.text,st=it.media_attachments,ct=it.id;let ut=it.to;if(!validateSchedule(at,_e)){toast.error(messages$18.scheduleError);return}if((!ot||!ot.length)&&st.size===0)return;if(!tt&&needsDescriptions(at,_e)){nt(openModal("MISSING_DESCRIPTION",{onContinue:()=>{nt(closeModal("MISSING_DESCRIPTION")),nt(submitCompose(_e,et,!0))}}));return}const dt=ot.match(/(?:^|\s)@([a-z\d_-]+(?:@[^@\s]+)?)/gi);dt&&(ut=ut.union(dt.map(mt=>mt.trim().slice(1)))),nt(submitComposeRequest(_e)),nt(closeModal());const ft=it.idempotencyKey,pt={status:ot,in_reply_to_id:it.in_reply_to,quote_id:it.quote,media_ids:st.map(mt=>mt.id),sensitive:it.sensitive,spoiler_text:it.spoiler_text,visibility:it.privacy,content_type:it.content_type,poll:it.poll,scheduled_at:it.schedule,to:ut};it.privacy==="group"&&(pt.group_id=it.group_id,pt.group_timeline_visible=it.group_timeline_visible),nt(createStatus(pt,ft,ct)).then(function(mt){!ct&&mt.visibility==="direct"&&rt().conversations.mounted<=0&&et&&et.push("/messages"),handleComposeSubmit(nt,rt,_e,mt,ot,!!ct)}).catch(function(mt){nt(submitComposeFail(_e,mt))})},submitComposeRequest=_e=>({type:COMPOSE_SUBMIT_REQUEST,id:_e}),submitComposeSuccess=(_e,et)=>({type:COMPOSE_SUBMIT_SUCCESS,id:_e,status:et}),submitComposeFail=(_e,et)=>({type:COMPOSE_SUBMIT_FAIL,id:_e,error:et}),uploadCompose=(_e,et,tt)=>(nt,rt)=>{var pt;if(!isLoggedIn(rt))return;const at=rt().instance.configuration.statuses.max_media_attachments,it=rt().instance.configuration.media_attachments.image_size_limit,ot=rt().instance.configuration.media_attachments.video_size_limit,st=rt().instance.configuration.media_attachments.video_duration_limit,ct=(pt=rt().compose.get(_e))==null?void 0:pt.media_attachments,ut=new Array(et.length).fill(0);let dt=Array.from(et).reduce((mt,ht)=>mt+ht.size,0);const ft=ct?ct.size:0;if(et.length+ft>at){toast.error(messages$18.uploadErrorLimit);return}nt(uploadComposeRequest(_e)),Array.from(et).forEach(async(mt,ht)=>{if(ft+ht>at-1)return;const Et=mt.type.match(/image.*/),yt=mt.type.match(/video.*/),vt=yt&&st?await getVideoDuration(mt):0;if(Et&&it&&mt.size>it){const gt=formatBytes(it),St=tt.formatMessage(messages$18.exceededImageSizeLimit,{limit:gt});toast.error(St),nt(uploadComposeFail(_e,!0));return}else if(yt&&ot&&mt.size>ot){const gt=formatBytes(ot),St=tt.formatMessage(messages$18.exceededVideoSizeLimit,{limit:gt});toast.error(St),nt(uploadComposeFail(_e,!0));return}else if(yt&&st&&vt>st){const gt=tt.formatMessage(messages$18.exceededVideoDurationLimit,{limit:st});toast.error(gt),nt(uploadComposeFail(_e,!0));return}resizeImage$1(mt).then(gt=>{const St=new FormData;return St.append("file",gt),dt+=gt.size-mt.size,nt(uploadMedia(St,({loaded:$t})=>{ut[ht]=$t,nt(uploadComposeProgress(_e,ut.reduce((bt,wt)=>bt+wt,0),dt))})).then(({status:$t,data:bt})=>{if($t===200)nt(uploadComposeSuccess(_e,bt,mt));else if($t===202){const wt=()=>{nt(fetchMedia(bt.id)).then(({status:xt,data:Tt})=>{xt===200?nt(uploadComposeSuccess(_e,Tt,mt)):xt===206&&setTimeout(()=>wt(),1e3)}).catch(xt=>nt(uploadComposeFail(_e,xt)))};wt()}})}).catch(gt=>nt(uploadComposeFail(_e,gt)))})},changeUploadCompose=(_e,et,tt)=>(nt,rt)=>{isLoggedIn(rt)&&(nt(changeUploadComposeRequest(_e)),nt(updateMedia(et,tt)).then(at=>{nt(changeUploadComposeSuccess(_e,at.data))}).catch(at=>{nt(changeUploadComposeFail(_e,et,at))}))},changeUploadComposeRequest=_e=>({type:COMPOSE_UPLOAD_CHANGE_REQUEST,id:_e,skipLoading:!0}),changeUploadComposeSuccess=(_e,et)=>({type:COMPOSE_UPLOAD_CHANGE_SUCCESS,id:_e,media:et,skipLoading:!0}),changeUploadComposeFail=(_e,et,tt)=>({type:COMPOSE_UPLOAD_CHANGE_FAIL,composeId:_e,id:et,error:tt,skipLoading:!0}),uploadComposeRequest=_e=>({type:COMPOSE_UPLOAD_REQUEST,id:_e,skipLoading:!0}),uploadComposeProgress=(_e,et,tt)=>({type:COMPOSE_UPLOAD_PROGRESS,id:_e,loaded:et,total:tt}),uploadComposeSuccess=(_e,et,tt)=>({type:COMPOSE_UPLOAD_SUCCESS,id:_e,media:et,file:tt,skipLoading:!0}),uploadComposeFail=(_e,et)=>({type:COMPOSE_UPLOAD_FAIL,id:_e,error:et,skipLoading:!0}),undoUploadCompose=(_e,et)=>({type:COMPOSE_UPLOAD_UNDO,id:_e,media_id:et}),groupCompose=(_e,et)=>({type:COMPOSE_GROUP_POST,id:_e,group_id:et}),setGroupTimelineVisible=(_e,et)=>({type:COMPOSE_SET_GROUP_TIMELINE_VISIBLE,id:_e,groupTimelineVisible:et}),clearComposeSuggestions=_e=>(cancelFetchComposeSuggestionsAccounts&&cancelFetchComposeSuggestionsAccounts(),{type:COMPOSE_SUGGESTIONS_CLEAR,id:_e}),fetchComposeSuggestionsAccounts=throttle$1((_e,et,tt,nt)=>{cancelFetchComposeSuggestionsAccounts&&cancelFetchComposeSuggestionsAccounts(tt),api(et).get("/api/v1/accounts/search",{cancelToken:new CancelToken(rt=>{cancelFetchComposeSuggestionsAccounts=rt}),params:{q:nt.slice(1),resolve:!1,limit:4}}).then(rt=>{_e(importFetchedAccounts(rt.data)),_e(readyComposeSuggestionsAccounts(tt,nt,rt.data))}).catch(rt=>{isCancel(rt)||toast.showAlertForError(rt)})},200,{leading:!0,trailing:!0}),fetchComposeSuggestionsEmojis=(_e,et,tt,nt)=>{const rt=et(),at=search$1(nt.replace(":",""),{maxResults:5},rt.custom_emojis);_e(readyComposeSuggestionsEmojis(tt,nt,at))},fetchComposeSuggestionsTags=(_e,et,tt,nt)=>{const at=et().trends.items;_e(updateSuggestionTags$1(tt,nt,at))},fetchComposeSuggestions=(_e,et)=>(tt,nt)=>{switch(et[0]){case":":fetchComposeSuggestionsEmojis(tt,nt,_e,et);break;case"#":fetchComposeSuggestionsTags(tt,nt,_e,et);break;default:fetchComposeSuggestionsAccounts(tt,nt,_e,et);break}},readyComposeSuggestionsEmojis=(_e,et,tt)=>({type:COMPOSE_SUGGESTIONS_READY,id:_e,token:et,emojis:tt}),readyComposeSuggestionsAccounts=(_e,et,tt)=>({type:COMPOSE_SUGGESTIONS_READY,id:_e,token:et,accounts:tt}),selectComposeSuggestion=(_e,et,tt,nt,rt)=>(at,it)=>{let ot="",st=et;typeof nt=="object"&&nt.id?(ot=isNativeEmoji(nt)?nt.native:nt.colons,st=et-1,at(useEmoji(nt))):typeof nt=="string"&&nt[0]==="#"?(ot=nt,st=et-1):typeof nt=="string"&&(ot=selectAccount(it(),nt).acct,st=et),at({type:COMPOSE_SUGGESTION_SELECT,id:_e,position:st,token:tt,completion:ot,path:rt})},updateSuggestionTags$1=(_e,et,tt)=>({type:COMPOSE_SUGGESTION_TAGS_UPDATE,id:_e,token:et,currentTrends:tt}),updateTagHistory=(_e,et)=>({type:COMPOSE_TAG_HISTORY_UPDATE,id:_e,tags:et}),insertIntoTagHistory=(_e,et,tt)=>(nt,rt)=>{const at=rt(),it=at.compose.get(_e).tagHistory,ot=at.me,st=et.filter(dt=>tt.match(new RegExp(`#${dt.name}`,"i"))).map(dt=>dt.name),ct=it.filter(dt=>st.findIndex(ft=>ft.toLowerCase()===dt.toLowerCase())===-1);st.push(...ct.toJS());const ut=st.slice(0,1e3);tagHistory.set(ot,ut),nt(updateTagHistory(_e,ut))},changeComposeSpoilerness=_e=>({type:COMPOSE_SPOILERNESS_CHANGE,id:_e}),changeComposeContentType=(_e,et)=>({type:COMPOSE_TYPE_CHANGE,id:_e,value:et}),changeComposeSpoilerText=(_e,et)=>({type:COMPOSE_SPOILER_TEXT_CHANGE,id:_e,text:et}),changeComposeVisibility=(_e,et)=>({type:COMPOSE_VISIBILITY_CHANGE,id:_e,value:et}),insertEmojiCompose=(_e,et,tt,nt)=>({type:COMPOSE_EMOJI_INSERT,id:_e,position:et,emoji:tt,needsSpace:nt}),addPoll=_e=>({type:COMPOSE_POLL_ADD,id:_e}),removePoll=_e=>({type:COMPOSE_POLL_REMOVE,id:_e}),addSchedule=_e=>({type:COMPOSE_SCHEDULE_ADD,id:_e}),setSchedule=(_e,et)=>({type:COMPOSE_SCHEDULE_SET,id:_e,date:et}),removeSchedule=_e=>({type:COMPOSE_SCHEDULE_REMOVE,id:_e}),addPollOption=(_e,et)=>({type:COMPOSE_POLL_OPTION_ADD,id:_e,title:et}),changePollOption=(_e,et,tt)=>({type:COMPOSE_POLL_OPTION_CHANGE,id:_e,index:et,title:tt}),removePollOption=(_e,et)=>({type:COMPOSE_POLL_OPTION_REMOVE,id:_e,index:et}),changePollSettings=(_e,et,tt)=>({type:COMPOSE_POLL_SETTINGS_CHANGE,id:_e,expiresIn:et,isMultiple:tt}),openComposeWithText=(_e,et="")=>tt=>{tt(resetCompose(_e)),tt(openModal("COMPOSE")),tt(changeCompose(_e,et))},addToMentions=(_e,et)=>(tt,nt)=>{const rt=nt(),at=selectAccount(rt,et);if(!at)return;const it={type:COMPOSE_ADD_TO_MENTIONS,id:_e,account:at.acct};return tt(it)},removeFromMentions=(_e,et)=>(tt,nt)=>{const rt=nt(),at=selectAccount(rt,et);if(!at)return;const it={type:COMPOSE_REMOVE_FROM_MENTIONS,id:_e,account:at.acct};return tt(it)},eventDiscussionCompose=(_e,et)=>(tt,nt)=>{const rt=nt(),at=rt.instance,{explicitAddressing:it}=getFeatures(at);return tt({type:COMPOSE_EVENT_REPLY,id:_e,status:et,account:selectOwnAccount(rt),explicitAddressing:it})},STATUS_CREATE_REQUEST="STATUS_CREATE_REQUEST",STATUS_CREATE_SUCCESS="STATUS_CREATE_SUCCESS",STATUS_CREATE_FAIL="STATUS_CREATE_FAIL",STATUS_FETCH_SOURCE_REQUEST="STATUS_FETCH_SOURCE_REQUEST",STATUS_FETCH_SOURCE_SUCCESS="STATUS_FETCH_SOURCE_SUCCESS",STATUS_FETCH_SOURCE_FAIL="STATUS_FETCH_SOURCE_FAIL",STATUS_FETCH_REQUEST="STATUS_FETCH_REQUEST",STATUS_FETCH_SUCCESS="STATUS_FETCH_SUCCESS",STATUS_FETCH_FAIL="STATUS_FETCH_FAIL",STATUS_DELETE_REQUEST="STATUS_DELETE_REQUEST",STATUS_DELETE_SUCCESS="STATUS_DELETE_SUCCESS",STATUS_DELETE_FAIL="STATUS_DELETE_FAIL",CONTEXT_FETCH_REQUEST="CONTEXT_FETCH_REQUEST",CONTEXT_FETCH_SUCCESS="CONTEXT_FETCH_SUCCESS",CONTEXT_FETCH_FAIL="CONTEXT_FETCH_FAIL",STATUS_MUTE_REQUEST="STATUS_MUTE_REQUEST",STATUS_MUTE_SUCCESS="STATUS_MUTE_SUCCESS",STATUS_MUTE_FAIL="STATUS_MUTE_FAIL",STATUS_UNMUTE_REQUEST="STATUS_UNMUTE_REQUEST",STATUS_UNMUTE_SUCCESS="STATUS_UNMUTE_SUCCESS",STATUS_UNMUTE_FAIL="STATUS_UNMUTE_FAIL",STATUS_REVEAL="STATUS_REVEAL",STATUS_HIDE="STATUS_HIDE",STATUS_TRANSLATE_REQUEST="STATUS_TRANSLATE_REQUEST",STATUS_TRANSLATE_SUCCESS="STATUS_TRANSLATE_SUCCESS",STATUS_TRANSLATE_FAIL="STATUS_TRANSLATE_FAIL",STATUS_TRANSLATE_REDO="STATUS_TRANSLATE_REDO",STATUS_TRANSLATE_UNDO="STATUS_TRANSLATE_UNDO",STATUS_UNFILTER="STATUS_UNFILTER",statusExists=(_e,et)=>(_e().statuses.get(et)||null)!==null,createStatus=(_e,et,tt)=>(nt,rt)=>(nt({type:STATUS_CREATE_REQUEST,params:_e,idempotencyKey:et,editing:!!tt}),api(rt).request({url:tt===null?"/api/v1/statuses":`/api/v1/statuses/${tt}`,method:tt===null?"post":"put",data:_e,headers:{"Idempotency-Key":et}}).then(({data:at})=>{if(!at.card&&shouldHaveCard(at)&&(at.expectsCard=!0),nt(importFetchedStatus(at,et)),nt({type:STATUS_CREATE_SUCCESS,status:at,params:_e,idempotencyKey:et,editing:!!tt}),at.expectsCard){const ot=(st=5)=>{api(rt).get(`/api/v1/statuses/${at.id}`).then(ct=>{var ut;(ut=ct.data)!=null&&ut.card?nt(importFetchedStatus(ct.data)):st>0&&ct.status===200&&setTimeout(()=>ot(st-1),1e3)}).catch(console.error)};setTimeout(()=>ot(),1e3)}return at}).catch(at=>{throw nt({type:STATUS_CREATE_FAIL,error:at,params:_e,idempotencyKey:et,editing:!!tt}),at})),editStatus=_e=>(et,tt)=>{let nt=tt().statuses.get(_e);nt.poll&&(nt=nt.set("poll",tt().polls.get(nt.poll))),et({type:STATUS_FETCH_SOURCE_REQUEST}),api(tt).get(`/api/v1/statuses/${_e}/source`).then(rt=>{et({type:STATUS_FETCH_SOURCE_SUCCESS}),et(setComposeToStatus(nt,rt.data.text,rt.data.spoiler_text,rt.data.content_type,!1)),et(openModal("COMPOSE"))}).catch(rt=>{et({type:STATUS_FETCH_SOURCE_FAIL,error:rt})})},fetchStatus=_e=>(et,tt)=>{const nt=statusExists(tt,_e);return et({type:STATUS_FETCH_REQUEST,id:_e,skipLoading:nt}),api(tt).get(`/api/v1/statuses/${_e}`).then(({data:rt})=>(et(importFetchedStatus(rt)),rt.group&&et(fetchGroupRelationships([rt.group.id])),et({type:STATUS_FETCH_SUCCESS,status:rt,skipLoading:nt}),rt)).catch(rt=>{et({type:STATUS_FETCH_FAIL,id:_e,error:rt,skipLoading:nt,skipAlert:!0})})},deleteStatus$6=(_e,et=!1)=>(tt,nt)=>{if(!isLoggedIn(nt))return null;let rt=nt().statuses.get(_e);return rt.poll&&(rt=rt.set("poll",nt().polls.get(rt.poll))),tt({type:STATUS_DELETE_REQUEST,params:rt}),api(nt).delete(`/api/v1/statuses/${_e}`).then(at=>{var it;tt({type:STATUS_DELETE_SUCCESS,id:_e}),tt(deleteFromTimelines(_e)),et&&(tt(setComposeToStatus(rt,at.data.text,at.data.spoiler_text,(it=at.data.pleroma)==null?void 0:it.content_type,et)),tt(openModal("COMPOSE")))}).catch(at=>{tt({type:STATUS_DELETE_FAIL,params:rt,error:at})})},updateStatus=_e=>et=>et(importFetchedStatus(_e)),fetchContext=_e=>(et,tt)=>(et({type:CONTEXT_FETCH_REQUEST,id:_e}),api(tt).get(`/api/v1/statuses/${_e}/context`).then(({data:nt})=>{if(Array.isArray(nt))et(importFetchedStatuses(nt));else if(typeof nt=="object"){const{ancestors:rt,descendants:at}=nt,it=rt.concat(at);et(importFetchedStatuses(it)),et({type:CONTEXT_FETCH_SUCCESS,id:_e,ancestors:rt,descendants:at})}else throw nt;return nt}).catch(nt=>{var rt;((rt=nt.response)==null?void 0:rt.status)===404&&et(deleteFromTimelines(_e)),et({type:CONTEXT_FETCH_FAIL,id:_e,error:nt,skipAlert:!0})})),fetchNext=(_e,et)=>async(tt,nt)=>{const rt=await api(nt).get(et);return tt(importFetchedStatuses(rt.data)),tt({type:CONTEXT_FETCH_SUCCESS,id:_e,ancestors:[],descendants:rt.data}),{next:getNextLink(rt)}},fetchAncestors=_e=>async(et,tt)=>{const nt=await api(tt).get(`/api/v1/statuses/${_e}/context/ancestors`);return et(importFetchedStatuses(nt.data)),nt},fetchDescendants=_e=>async(et,tt)=>{const nt=await api(tt).get(`/api/v1/statuses/${_e}/context/descendants`);return et(importFetchedStatuses(nt.data)),nt},fetchStatusWithContext=_e=>async(et,tt)=>{if(getFeatures(tt().instance).paginatedContext){await et(fetchStatus(_e));const rt=await Promise.all([et(fetchAncestors(_e)),et(fetchDescendants(_e))]);return et({type:CONTEXT_FETCH_SUCCESS,id:_e,ancestors:rt[0].data,descendants:rt[1].data}),{next:getNextLink(rt[1])}}else return await Promise.all([et(fetchContext(_e)),et(fetchStatus(_e))]),{next:void 0}},muteStatus=_e=>(et,tt)=>{isLoggedIn(tt)&&(et({type:STATUS_MUTE_REQUEST,id:_e}),api(tt).post(`/api/v1/statuses/${_e}/mute`).then(()=>{et({type:STATUS_MUTE_SUCCESS,id:_e})}).catch(nt=>{et({type:STATUS_MUTE_FAIL,id:_e,error:nt})}))},unmuteStatus=_e=>(et,tt)=>{isLoggedIn(tt)&&(et({type:STATUS_UNMUTE_REQUEST,id:_e}),api(tt).post(`/api/v1/statuses/${_e}/unmute`).then(()=>{et({type:STATUS_UNMUTE_SUCCESS,id:_e})}).catch(nt=>{et({type:STATUS_UNMUTE_FAIL,id:_e,error:nt})}))},toggleMuteStatus=_e=>(et,tt)=>{_e.muted?et(unmuteStatus(_e.id)):et(muteStatus(_e.id))},hideStatus=_e=>(Array.isArray(_e)||(_e=[_e]),{type:STATUS_HIDE,ids:_e}),revealStatus=_e=>(Array.isArray(_e)||(_e=[_e]),{type:STATUS_REVEAL,ids:_e}),translateStatus=(_e,et)=>(tt,nt)=>{tt({type:STATUS_TRANSLATE_REQUEST,id:_e});const rt=nt();if(Map$3(rt.statuses.getIn([_e,"translation"])||{}).get("status")){tt({type:STATUS_TRANSLATE_REDO,id:_e});return}const it=rt.instance,ot=parseVersion(it.version),st=ot.software===AKKOMA?api(nt).get:api(nt).post,ct=`/api/v1/statuses/${_e}/`+(ot.software===AKKOMA?`translations/${et||"en"}`:"translate");st(ct,ot.software!==AKKOMA?{target_language:et}:void 0).then(({data:ut})=>{tt({type:STATUS_TRANSLATE_SUCCESS,id:_e,translation:ot.software!==AKKOMA?ut:{content:ut.text,detected_source_language:ut.detected_language,provider:"Ghost",status:"visible"}})}).catch(ut=>{tt({type:STATUS_TRANSLATE_FAIL,id:_e,error:ut})})},undoStatusTranslation=_e=>({type:STATUS_TRANSLATE_UNDO,id:_e}),unfilterStatus=_e=>({type:STATUS_UNFILTER,id:_e}),STREAMING_CHAT_UPDATE="STREAMING_CHAT_UPDATE",removeChatMessage=_e=>{const et=JSON.parse(_e),tt=et.chat_id,nt=et.deleted_message_id;isLastMessage(nt)&&queryClient.invalidateQueries(ChatKeys.chatSearch()),removePageItem(ChatKeys.chatMessages(tt),nt,(rt,at)=>String(rt.id)===String(at))},updateChatQuery=_e=>{const et=queryClient.getQueryData(ChatKeys.chat(_e.id));if(!et)return;const tt={...et,latest_read_message_by_account:_e.latest_read_message_by_account,latest_read_message_created_at:_e.latest_read_message_created_at};queryClient.setQueryData(ChatKeys.chat(_e.id),tt)},connectTimelineStream=(_e,et,tt=null,nt=null,rt)=>connectStream(et,tt,(at,it)=>{const ot=getLocale(it());return{onConnect(){at(connectTimeline(_e))},onDisconnect(){at(disconnectTimeline(_e))},onReceive(st,ct){switch(ct.event){case"update":at(processTimelineUpdate(_e,JSON.parse(ct.payload)));break;case"status.update":at(updateStatus(JSON.parse(ct.payload)));break;case"notification":messages$1a[ot]().then(ut=>{at(updateNotificationsQueue$1(JSON.parse(ct.payload),ut,ot,window.location.pathname))}).catch(ut=>{console.error(ut)});break;case"conversation":at(updateConversations(JSON.parse(ct.payload)));break;case"filters_changed":at(fetchFilters());break;case"pleroma:chat_update":case"chat_message.created":at((ut,dt)=>{var Et,yt;const ft=JSON.parse(ct.payload),pt=dt().me,mt=((Et=ft.last_message)==null?void 0:Et.account_id)===pt,ht=getSettings(dt());mt||(updateChatListItem(ft),ht.getIn(["chats","sound"])&&play(soundCache.chat),(yt=rt==null?void 0:rt.statContext)==null||yt.setUnreadChatsCount(getUnreadChatsCount()))});break;case"chat_message.deleted":removeChatMessage(ct.payload);break;case"chat_message.read":at((ut,dt)=>{const ft=JSON.parse(ct.payload),pt=dt().me;ft.account.id!==pt&&updateChatQuery(JSON.parse(ct.payload))});break;case"chat_message.reaction":updateChatMessage(JSON.parse(ct.payload));break;case"pleroma:follow_relationships_update":at(updateFollowRelationships(JSON.parse(ct.payload)));break;case"announcement":at(updateAnnouncements(JSON.parse(ct.payload)));break;case"announcement.reaction":at(updateReaction$1(JSON.parse(ct.payload)));break;case"announcement.delete":at(deleteAnnouncement$1(ct.payload));break;case"marker":at({type:MARKER_FETCH_SUCCESS,marker:JSON.parse(ct.payload)});break}}}});function followStateToRelationship(_e){switch(_e){case"follow_pending":return{following:!1,requested:!0};case"follow_accept":return{following:!0,requested:!1};case"follow_reject":return{following:!1,requested:!1};default:return{}}}function updateFollowRelationships(_e){return(et,tt)=>{const nt=tt().me,rt=selectEntity(tt(),Entities.RELATIONSHIPS,_e.following.id);if(_e.follower.id===nt&&rt){const at={...rt,...followStateToRelationship(_e.state)};setTimeout(()=>et(importEntities$1([at],Entities.RELATIONSHIPS)),300)}}}function useTimelineStream(..._e){const[et,tt]=_e,{enabled:nt=!0}=_e[4]??{},rt=useAppDispatch(),at=useInstance(),it=reactExports.useRef(null),ot=useAppSelector(getAccessToken),st=at.urls.streaming_api,ct=()=>{nt&&st&&!it.current&&(it.current=rt(connectTimelineStream(..._e)))},ut=()=>{it.current&&(it.current(),it.current=null)};return reactExports.useEffect(()=>(ct(),ut),[ot,st,et,tt,nt]),{disconnect:ut}}function useUserStream(){const{isLoggedIn:_e}=useLoggedIn(),et=useStatContext();return useTimelineStream("home","user",refresh,null,{statContext:et,enabled:_e})}function refresh(_e,et){return _e(expandHomeTimeline({},()=>_e(expandNotifications({},()=>_e(fetchAnnouncements(et))))))}const useGroupsPath=()=>{const _e=useFeatures(),{groups:et}=useGroups();return _e.groupsDiscovery?et.length>0?"/groups":"/groups/discover":"/groups"},defaultState={width:0,height:0},useDimensions=()=>{const[_e,et]=reactExports.useState(null),[tt,nt]=reactExports.useState(defaultState),rt=reactExports.useMemo(()=>new ResizeObserver(at=>{if(at[0]){const{width:it,height:ot}=at[0].contentRect;nt({width:it,height:ot})}}),[]);return reactExports.useEffect(()=>{if(_e)return rt.observe(_e),()=>{rt.disconnect()}},[_e]),[_e,et,tt]};function useLoading(_e=!1){const[et,tt]=reactExports.useState(_e);function nt(rt){return tt(!0),rt.then(()=>tt(!1)).catch(()=>tt(!1)),rt}return[et,nt]}const RTL_LOCALES=["ar","ckb","fa","he"],useLocale=(_e="en")=>{const et=useAppSelector(nt=>getLocale(nt,_e)),tt=RTL_LOCALES.includes(et)?"rtl":"ltr";return{locale:et,direction:tt}};function useLoggedIn(){const _e=useAppSelector(et=>et.me);return{isLoggedIn:typeof _e=="string",isLoginLoading:_e===null,isLoginFailed:_e===!1,me:_e}}const useOwnAccount=()=>{const _e=reactExports.useCallback(makeGetAccount(),[]);return{account:useAppSelector(tt=>{const{me:nt}=tt;if(typeof nt=="string")return _e(tt,nt)})||void 0}},usePrevious$1=_e=>{const et=reactExports.useRef();return reactExports.useEffect(()=>{et.current=_e},[_e]),et.current},useSoapboxConfig=()=>useAppSelector(_e=>getSoapboxConfig(_e)),useRegistrationStatus=()=>{const _e=useInstance(),et=useFeatures(),tt=useSoapboxConfig(),nt=useAppSelector(at=>at.verification.instance.get("registrations")===!0),rt=tt.getIn(["extensions","pepe","enabled"])===!0;return{isOpen:et.accountCreation&&_e.registrations||rt&&nt,pepeOpen:nt,pepeEnabled:rt}},useSettings=()=>useAppSelector(_e=>getSettings(_e)),useSystemTheme=()=>{const _e=window.matchMedia("(prefers-color-scheme: dark)"),[et,tt]=reactExports.useState(_e.matches),nt=rt=>{tt(rt.matches)};return reactExports.useEffect(()=>{try{_e.addEventListener("change",nt)}catch{}return()=>{try{_e.removeEventListener("change",nt)}catch{}}},[]),et?"dark":"light"},useTheme=()=>{const _e=useSettings(),et=useSystemTheme(),tt=_e.get("themeMode");return tt==="dark"||tt==="system"&&et==="dark"?"dark":"light"};class Leaf{constructor(et){this.children=[],this.parent=et}delete(et){const tt=this.children.indexOf(et);return tt===-1?!1:(this.children=this.children.slice(0,tt).concat(this.children.slice(tt+1)),this.children.length===0&&this.parent.delete(this),!0)}add(et){return this.children.push(et),this}}class RadixTrie{constructor(et){this.parent=null,this.children={},this.parent=et||null}get(et){return this.children[et]}insert(et){let tt=this;for(let nt=0;ntrt.filter(at=>at!=="")).filter(rt=>rt.length>0)}function hotkey(_e){const{ctrlKey:et,altKey:tt,metaKey:nt,key:rt}=_e,at=[],it=[et,tt,nt,showShift(_e)];for(const[ot,st]of it.entries())st&&at.push(modifierKeyNames[ot]);return modifierKeyNames.includes(rt)||at.push(rt),at.join("+")}const modifierKeyNames=["Control","Alt","Meta","Shift"];function showShift(_e){const{shiftKey:et,code:tt,key:nt}=_e;return et&&!(tt.startsWith("Key")&&nt.toUpperCase()===nt)}const hotkeyRadixTrie=new RadixTrie,elementsLeaves=new WeakMap;let currentTriePosition=hotkeyRadixTrie,resetTriePositionTimer=null,path=[];function resetTriePosition(){path=[],resetTriePositionTimer=null,currentTriePosition=hotkeyRadixTrie}function keyDownHandler(_e){if(_e.defaultPrevented||!(_e.target instanceof Node))return;if(isFormField(_e.target)){const tt=_e.target;if(!tt.id||!tt.ownerDocument.querySelector(`[data-hotkey-scope="${tt.id}"]`))return}resetTriePositionTimer!=null&&window.clearTimeout(resetTriePositionTimer),resetTriePositionTimer=window.setTimeout(resetTriePosition,1500);const et=currentTriePosition.get(hotkey(_e));if(!et){resetTriePosition();return}if(path.push(hotkey(_e)),currentTriePosition=et,et instanceof Leaf){const tt=_e.target;let nt=!1,rt;const at=isFormField(tt);for(let it=et.children.length-1;it>=0;it-=1){rt=et.children[it];const ot=rt.getAttribute("data-hotkey-scope");if(!at&&!ot||at&&tt.id===ot){nt=!0;break}}rt&&nt&&(fireDeterminedAction(rt,path),_e.preventDefault()),resetTriePosition()}}function install(_e,et){Object.keys(hotkeyRadixTrie.children).length===0&&document.addEventListener("keydown",keyDownHandler);const nt=expandHotkeyToEdges(et||_e.getAttribute("data-hotkey")||"").map(rt=>hotkeyRadixTrie.insert(rt).add(_e));elementsLeaves.set(_e,nt)}function uninstall(_e){const et=elementsLeaves.get(_e);if(et&&et.length)for(const tt of et)tt&&tt.delete(_e);Object.keys(hotkeyRadixTrie.children).length===0&&document.removeEventListener("keydown",keyDownHandler)}const useHotkey=(_e,et={initialEl:null})=>{const[tt,nt]=reactExports.useState(et.initialEl);return reactExports.useEffect(()=>!tt||!_e?()=>{}:(install(tt,_e),et.event&&tt.addEventListener("hotkey-fire",rt=>{rt.preventDefault(),et.event(rt.target)}),()=>{uninstall(tt)}),[tt]),nt},LAYOUT_BREAKPOINT=630;function isMobile(_e){return _e<=LAYOUT_BREAKPOINT}const iOS=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream;let userTouching=!1;(function(_e){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(_e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(_e.substring(0,4)))&&(userTouching=!0)})(navigator.userAgent||navigator.vendor||window.opera||"");const listenerOptions$3=supportsPassiveEvents?{passive:!0}:!1;function touchListener(){userTouching=!0,window.removeEventListener("touchstart",touchListener,listenerOptions$3)}window.addEventListener("touchstart",touchListener,listenerOptions$3);function isUserTouching(){return userTouching}function isIOS(){return iOS}var DropdownMenuItem=function _e(et){var tt=et.index,nt=et.item,rt=et.onClick,at=useHistory(),it=reactExports.useRef(null),ot=function(dt){dt.stopPropagation(),nt&&(rt&&rt(),nt.to?(dt.preventDefault(),at.push(nt.to)):typeof nt.action=="function"&&(dt.preventDefault(),nt.action(dt)))},st=function(dt){nt&&(rt&&rt(),dt.button===1&&nt.middleClick&&nt.middleClick(dt))},ct=function(dt){(dt.key==="Enter"||dt.key===" ")&&ot(dt)};return reactExports.useEffect(function(){var ut=tt===0;it.current&&ut&&it.current.focus({preventScroll:!0})},[it.current,tt]),nt===null?_createRawReactElement("li",{className:"mx-2 my-1 h-[2px] bg-gray-100 dark:bg-gray-800"}):_createRawReactElement("li",{className:"truncate focus-visible:ring-2 focus-visible:ring-primary-500"},void 0,React$3.createElement("a",{href:nt.href||nt.to||"#",role:"button",tabIndex:0,ref:it,"data-index":tt,onClick:ot,onAuxClick:st,onKeyPress:ct,target:nt.target,title:nt.text,className:clsx({"flex px-4 py-2.5 text-sm text-gray-700 dark:text-gray-500 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none cursor-pointer":!0,"text-danger-600 dark:text-danger-400":nt.destructive})},nt.icon&&_createRawReactElement(Icon$1,{src:nt.icon,className:"mr-3 h-5 w-5 flex-none rtl:ml-3 rtl:mr-0"}),_createRawReactElement("span",{className:"truncate font-medium"},void 0,nt.text),nt.count?_createRawReactElement("span",{className:"ml-auto h-5 w-5 flex-none"},void 0,_createRawReactElement(Counter,{count:nt.count})):null))},_excluded$s=["children","disabled","items","onClose","onOpen","onShiftClick","placement","src","title"],listenerOptions$2=supportsPassiveEvents?{passive:!0}:!1,DropdownMenu=function _e(et){var tt=et.children,nt=et.disabled,rt=et.items,at=et.onClose,it=et.onOpen,ot=et.onShiftClick,st=et.placement,ct=st===void 0?"top":st,ut=et.src,dt=ut===void 0?vitePluginRequire_1697864655029_75763737:ut,ft=et.title,pt=ft===void 0?"Menu":ft,mt=_objectWithoutProperties(et,_excluded$s),ht=useAppDispatch(),Et=useHistory(),yt=reactExports.useState(!1),vt=_slicedToArray$4(yt,2),gt=vt[0],St=vt[1],Rt=reactExports.useRef(null),$t=isUserTouching(),bt=useFloating({placement:ct,transform:!1,middleware:[offset$1(12),flip({fallbackPlacements:["right","left","bottom"]}),shift$1({padding:8}),arrow({element:Rt})],whileElementsMounted:$t?void 0:autoUpdate}),wt=bt.refs,xt=bt.middlewareData,Tt=bt.placement,Ct=bt.floatingStyles,Nt=function(jt){if(jt.stopPropagation(),ot&&jt.shiftKey){jt.preventDefault(),ot(jt);return}gt?kt():At()},At=function(){$t?ht(openModal("ACTIONS",{status:mt.status,actions:rt,onClick:Dt})):(ht(openDropdownMenu()),St(!0)),it&&it()},kt=function(){var jt;(jt=wt.reference.current)===null||jt===void 0||jt.focus(),$t?ht(closeModal("ACTIONS")):(Pt(),St(!1)),at&&at()},Pt=function(){ht(function(jt,zt){var Qt=zt().dropdown_menu.isOpen;Qt&&jt(closeDropdownMenu())})},Ft=function(jt){switch(jt.key){case" ":case"Enter":jt.stopPropagation(),jt.preventDefault(),Nt(jt);break}},Dt=function(jt){jt.preventDefault(),jt.stopPropagation();var zt=Number(jt.currentTarget.getAttribute("data-index")),Qt=rt[zt];if(Qt){var Xt=Qt.action,Yt=Qt.to;kt(),typeof Xt=="function"?Xt(jt):Yt&&Et.push(Yt)}},Lt=function(jt){wt.floating.current&&!wt.floating.current.contains(jt.target)&&kt()},It=function(jt){if(wt.floating.current){var zt=Array.from(wt.floating.current.getElementsByTagName("a")),Qt=zt.indexOf(document.activeElement),Xt=null;switch(jt.key){case"ArrowDown":Xt=zt[Qt+1]||zt[0];break;case"ArrowUp":Xt=zt[Qt-1]||zt[zt.length-1];break;case"Tab":jt.shiftKey?Xt=zt[Qt-1]||zt[zt.length-1]:Xt=zt[Qt+1]||zt[0];break;case"Home":Xt=zt[0];break;case"End":Xt=zt[zt.length-1];break;case"Escape":kt();break}Xt&&(Xt.focus(),jt.preventDefault(),jt.stopPropagation())}},Ot=reactExports.useMemo(function(){if(xt.arrow){var Ut,jt,zt=xt.arrow,Qt=zt.x,Xt=zt.y,Yt={top:"bottom",right:"left",bottom:"top",left:"right"}[Tt.split("-")[0]];return jt={left:Qt!==null?"".concat(Qt,"px"):"",top:Xt!==null?"".concat(Xt,"px"):"",right:"",bottom:""},_defineProperty$7(jt,Yt,"".concat(-(((Ut=Rt.current)===null||Ut===void 0?void 0:Ut.offsetWidth)||0)/2,"px")),_defineProperty$7(jt,"transform","rotate(45deg)"),jt}return{}},[xt.arrow,Tt]);return reactExports.useEffect(function(){return function(){Pt()}},[]),reactExports.useEffect(function(){if(gt){if(wt.floating.current){var Ut;(Ut=wt.floating.current)===null||Ut===void 0||(Ut=Ut.querySelector("li a[role='button']"))===null||Ut===void 0||Ut.focus()}return document.addEventListener("click",Lt,!1),document.addEventListener("keydown",It,!1),document.addEventListener("touchend",Lt,listenerOptions$2),function(){document.removeEventListener("click",Lt),document.removeEventListener("keydown",It),document.removeEventListener("touchend",Lt)}}},[gt,wt.floating.current]),rt.length===0?null:React$3.createElement(React$3.Fragment,null,tt?React$3.cloneElement(tt,{disabled:nt,onClick:Nt,onKeyPress:Ft,ref:wt.setReference}):React$3.createElement(IconButton$1,{disabled:nt,className:clsx({"text-gray-600 hover:text-gray-700 dark:hover:text-gray-500":!0,"text-gray-700 dark:text-gray-500":gt}),title:pt,src:dt,onClick:Nt,onKeyPress:Ft,ref:wt.setReference}),gt?_createRawReactElement(Portal$1,{},void 0,React$3.createElement("div",{"data-testid":"dropdown-menu",ref:wt.setFloating,className:clsx("z-[1001] w-56 rounded-md bg-white py-1 shadow-lg transition-opacity duration-100 focus:outline-none dark:bg-gray-900 dark:ring-2 dark:ring-primary-700",{"opacity-0 pointer-events-none":!gt}),style:Ct},_createRawReactElement("ul",{},void 0,rt.map(function(Ut,jt){return _createRawReactElement(DropdownMenuItem,{item:Ut,index:jt,onClick:kt},jt)})),React$3.createElement("div",{ref:Rt,style:Ot,className:"pointer-events-none absolute z-[-1] h-3 w-3 bg-white dark:bg-gray-900"}))):null)},_excluded$r=["space","alignItems","justifyContent","className","grow","element","wrap"],_spaces$1,justifyContentOptions$1={between:"justify-between",center:"justify-center",start:"justify-start",end:"justify-end",around:"justify-around"},alignItemsOptions$1={top:"items-start",bottom:"items-end",center:"items-center",start:"items-start",stretch:"items-stretch"},spaces$1=(_spaces$1={0:"space-x-0"},_defineProperty$7(_spaces$1,.5,"space-x-0.5"),_defineProperty$7(_spaces$1,1,"space-x-1"),_defineProperty$7(_spaces$1,1.5,"space-x-1.5"),_defineProperty$7(_spaces$1,2,"space-x-2"),_defineProperty$7(_spaces$1,2.5,"space-x-2.5"),_defineProperty$7(_spaces$1,3,"space-x-3"),_defineProperty$7(_spaces$1,4,"space-x-4"),_defineProperty$7(_spaces$1,5,"space-x-5"),_defineProperty$7(_spaces$1,6,"space-x-6"),_defineProperty$7(_spaces$1,8,"space-x-8"),_spaces$1),HStack=reactExports.forwardRef(function(_e,et){var tt,nt=_e.space,rt=_e.alignItems,at=_e.justifyContent,it=_e.className,ot=_e.grow,st=_e.element,ct=st===void 0?"div":st,ut=_e.wrap,dt=_objectWithoutProperties(_e,_excluded$r),ft=ct;return React$3.createElement(ft,_extends$4({},dt,{ref:et,className:clsx("flex rtl:space-x-reverse",(tt={},_defineProperty$7(tt,alignItemsOptions$1[rt],typeof rt<"u"),_defineProperty$7(tt,justifyContentOptions$1[at],typeof at<"u"),_defineProperty$7(tt,spaces$1[nt],typeof nt<"u"),_defineProperty$7(tt,"grow",ot),_defineProperty$7(tt,"flex-wrap",ut),tt),it)}))}),Counter=function _e(et){var tt=et.count,nt=et.countMax;return _createRawReactElement("span",{className:"flex h-5 min-w-[20px] max-w-[26px] items-center justify-center rounded-full bg-secondary-500 text-xs font-medium text-white ring-2 ring-white dark:ring-gray-800"},void 0,shortNumberFormat(tt,nt))},__read$1=globalThis&&globalThis.__read||function(_e,et){var tt=typeof Symbol=="function"&&_e[Symbol.iterator];if(!tt)return _e;var nt=tt.call(_e),rt,at=[],it;try{for(;(et===void 0||et-- >0)&&!(rt=nt.next()).done;)at.push(rt.value)}catch(ot){it={error:ot}}finally{try{rt&&!rt.done&&(tt=nt.return)&&tt.call(nt)}finally{if(it)throw it.error}}return at},styleToObject$1=function(_e){var et=_e.split(/ ?; ?/);return et.reduce(function(tt,nt){var rt=__read$1(nt.split(/ ?: ?/),2),at=rt[0],it=rt[1];return at&&it&&(tt[at.replace(/-(\w)/g,function(ot,st){return st.toUpperCase()})]=Number.isNaN(Number(it))?it:Number(it)),tt},{})};function randomString$1(_e){_e===void 0&&(_e=6);for(var et="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",tt="",nt=_e;nt>0;--nt)tt+=et[Math.round(Math.random()*(et.length-1))];return tt}var noTextChildNodes=["br","col","colgroup","dl","hr","iframe","img","input","link","menuitem","meta","ol","param","select","table","tbody","tfoot","thead","tr","ul","wbr"],possibleStandardNames$1={"accept-charset":"acceptCharset",acceptcharset:"acceptCharset",accesskey:"accessKey",allowfullscreen:"allowFullScreen",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",class:"className",classid:"classID",classname:"className",colspan:"colSpan",contenteditable:"contentEditable",contextmenu:"contextMenu",controlslist:"controlsList",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",datetime:"dateTime",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",enctype:"encType",for:"htmlFor",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",innerhtml:"innerHTML",inputmode:"inputMode",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",marginwidth:"marginWidth",marginheight:"marginHeight",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",nomodule:"noModule",novalidate:"noValidate",playsinline:"playsInline",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rowspan:"rowSpan",spellcheck:"spellCheck",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex",typemustmatch:"typeMustMatch",usemap:"useMap",accentheight:"accentHeight","accent-height":"accentHeight",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",arabicform:"arabicForm","arabic-form":"arabicForm",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",diffuseconstant:"diffuseConstant",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",edgemode:"edgeMode",enablebackground:"enableBackground","enable-background":"enableBackground",externalresourcesrequired:"externalResourcesRequired",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",imagerendering:"imageRendering","image-rendering":"imageRendering",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",vmathematical:"vMathematical","v-mathematical":"vMathematical",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan",onblur:"onBlur",onchange:"onChange",onclick:"onClick",oncontextmenu:"onContextMenu",ondoubleclick:"onDoubleClick",ondrag:"onDrag",ondragend:"onDragEnd",ondragenter:"onDragEnter",ondragexit:"onDragExit",ondragleave:"onDragLeave",ondragover:"onDragOver",ondragstart:"onDragStart",ondrop:"onDrop",onerror:"onError",onfocus:"onFocus",oninput:"onInput",oninvalid:"onInvalid",onkeydown:"onKeyDown",onkeypress:"onKeyPress",onkeyup:"onKeyUp",onload:"onLoad",onmousedown:"onMouseDown",onmouseenter:"onMouseEnter",onmouseleave:"onMouseLeave",onmousemove:"onMouseMove",onmouseout:"onMouseOut",onmouseover:"onMouseOver",onmouseup:"onMouseUp",onscroll:"onScroll",onsubmit:"onSubmit",ontouchcancel:"onTouchCancel",ontouchend:"onTouchEnd",ontouchmove:"onTouchMove",ontouchstart:"onTouchStart",onwheel:"onWheel"},__assign$1=globalThis&&globalThis.__assign||function(){return __assign$1=Object.assign||function(_e){for(var et,tt=1,nt=arguments.length;tt0)&&!(rt=nt.next()).done;)at.push(rt.value)}catch(ot){it={error:ot}}finally{try{rt&&!rt.done&&(tt=nt.return)&&tt.call(nt)}finally{if(it)throw it.error}}return at},__spreadArray=globalThis&&globalThis.__spreadArray||function(_e,et,tt){if(tt||arguments.length===2)for(var nt=0,rt=et.length,at;nt *":rt,it=et.type,ot=it===void 0?"text/html":it;try{var st=new DOMParser,ct=st.parseFromString(_e,ot),ut=ct.querySelector(at);if(!(ut instanceof Node))throw new TypeError("Error parsing input");return nt?ut:convertFromNode(ut,et)}catch{}return null}function convert(_e,et){return et===void 0&&(et={}),typeof _e=="string"?convertFromString(_e,et):_e instanceof Node?convertFromNode(_e,et):null}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={};/** * @license React * react-jsx-runtime.production.min.js * @@ -323,7 +323,7 @@ ${ut}`)}},st}const CONVERSATIONS_MOUNT="CONVERSATIONS_MOUNT",CONVERSATIONS_UNMOU * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var f=reactExports,k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function q(_e,et,tt){var nt,rt={},at=null,it=null;tt!==void 0&&(at=""+tt),et.key!==void 0&&(at=""+et.key),et.ref!==void 0&&(it=et.ref);for(nt in et)m.call(et,nt)&&!p.hasOwnProperty(nt)&&(rt[nt]=et[nt]);if(_e&&_e.defaultProps)for(nt in et=_e.defaultProps,et)rt[nt]===void 0&&(rt[nt]=et[nt]);return{$$typeof:k,type:_e,key:at,ref:it,props:rt,_owner:n.current}}reactJsxRuntime_production_min.Fragment=l;reactJsxRuntime_production_min.jsx=q;reactJsxRuntime_production_min.jsxs=q;jsxRuntime.exports=reactJsxRuntime_production_min;var jsxRuntimeExports=jsxRuntime.exports,__defProp=Object.defineProperty,__defNormalProp=(_e,et,tt)=>et in _e?__defProp(_e,et,{enumerable:!0,configurable:!0,writable:!0,value:tt}):_e[et]=tt,__publicField=(_e,et,tt)=>(__defNormalProp(_e,typeof et!="symbol"?et+"":et,tt),tt),CACHE_NAME="react-inlinesvg",CACHE_MAX_RETRIES=10,STATUS={IDLE:"idle",LOADING:"loading",LOADED:"loaded",FAILED:"failed",READY:"ready",UNSUPPORTED:"unsupported"};function canUseDOM$2(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function isSupportedEnvironment(){return supportsInlineSVG()&&typeof window<"u"&&window!==null}async function request(_e,et){const tt=await fetch(_e,et),nt=tt.headers.get("content-type"),[rt]=(nt??"").split(/ ?; ?/);if(tt.status>299)throw new Error("Not found");if(!["image/svg+xml","text/plain"].some(at=>rt.includes(at)))throw new Error(`Content type isn't valid: ${rt}`);return tt.text()}function sleep(_e=1){return new Promise(et=>{setTimeout(et,_e*1e3)})}function supportsInlineSVG(){if(!document)return!1;const _e=document.createElement("div");_e.innerHTML="";const et=_e.firstChild;return!!et&&et.namespaceURI==="http://www.w3.org/2000/svg"}function randomCharacter(_e){return _e[Math.floor(Math.random()*_e.length)]}function randomString(_e){const et="abcdefghijklmnopqrstuvwxyz",tt="1234567890",nt=`${et}${et.toUpperCase()}${tt}`;let rt="";for(let at=0;at<_e;at++)rt+=randomCharacter(nt);return rt}function omit(_e,...et){const tt={};for(const nt in _e)({}).hasOwnProperty.call(_e,nt)&&(et.includes(nt)||(tt[nt]=_e[nt]));return tt}var CacheStore=class{constructor(){__publicField(this,"cacheApi"),__publicField(this,"cacheStore"),__publicField(this,"subscribers",[]),__publicField(this,"isReady",!1),this.cacheStore=new Map;let _e=CACHE_NAME,et=!1;canUseDOM$2()&&(_e=window.REACT_INLINESVG_CACHE_NAME??CACHE_NAME,et=!!window.REACT_INLINESVG_PERSISTENT_CACHE),et?caches.open(_e).then(tt=>{this.cacheApi=tt,this.isReady=!0,this.subscribers.forEach(nt=>nt())}):this.isReady=!0}onReady(_e){this.isReady?_e():this.subscribers.push(_e)}async get(_e,et){var tt;return await(this.cacheApi?this.fetchAndAddToPersistentCache(_e,et):this.fetchAndAddToInternalCache(_e,et)),((tt=this.cacheStore.get(_e))==null?void 0:tt.content)??""}set(_e,et){this.cacheStore.set(_e,et)}isCached(_e){var et;return((et=this.cacheStore.get(_e))==null?void 0:et.status)===STATUS.LOADED}async fetchAndAddToInternalCache(_e,et){const tt=this.cacheStore.get(_e);if((tt==null?void 0:tt.status)===STATUS.LOADING){await this.handleLoading(_e,async()=>{this.cacheStore.set(_e,{content:"",status:STATUS.IDLE}),await this.fetchAndAddToInternalCache(_e,et)});return}if(!(tt!=null&&tt.content)){this.cacheStore.set(_e,{content:"",status:STATUS.LOADING});try{const nt=await request(_e,et);this.cacheStore.set(_e,{content:nt,status:STATUS.LOADED})}catch(nt){throw this.cacheStore.set(_e,{content:"",status:STATUS.FAILED}),nt}}}async fetchAndAddToPersistentCache(_e,et){var rt,at,it;const tt=this.cacheStore.get(_e);if((tt==null?void 0:tt.status)===STATUS.LOADED)return;if((tt==null?void 0:tt.status)===STATUS.LOADING){await this.handleLoading(_e,async()=>{this.cacheStore.set(_e,{content:"",status:STATUS.IDLE}),await this.fetchAndAddToPersistentCache(_e,et)});return}this.cacheStore.set(_e,{content:"",status:STATUS.LOADING});const nt=await((rt=this.cacheApi)==null?void 0:rt.match(_e));if(nt){const ot=await nt.text();this.cacheStore.set(_e,{content:ot,status:STATUS.LOADED});return}try{await((at=this.cacheApi)==null?void 0:at.add(new Request(_e,et)));const ot=await((it=this.cacheApi)==null?void 0:it.match(_e)),st=await(ot==null?void 0:ot.text())??"";this.cacheStore.set(_e,{content:st,status:STATUS.LOADED})}catch(ot){throw this.cacheStore.set(_e,{content:"",status:STATUS.FAILED}),ot}}async handleLoading(_e,et){var nt;let tt=0;for(;((nt=this.cacheStore.get(_e))==null?void 0:nt.status)===STATUS.LOADING&&tt=CACHE_MAX_RETRIES&&await et()}keys(){return[...this.cacheStore.keys()]}data(){return[...this.cacheStore.entries()].map(([_e,et])=>({[_e]:et}))}async delete(_e){this.cacheApi&&await this.cacheApi.delete(_e),this.cacheStore.delete(_e)}async clear(){if(this.cacheApi){const _e=await this.cacheApi.keys();for(const et of _e)await this.cacheApi.delete(et)}this.cacheStore.clear()}},cacheStore,ReactInlineSVG=class extends reactExports.PureComponent{constructor(_e){super(_e),__publicField(this,"hash"),__publicField(this,"isActive",!1),__publicField(this,"isInitialized",!1),__publicField(this,"fetchContent",async()=>{const{fetchOptions:et,src:tt}=this.props,nt=await request(tt,et);this.handleLoad(nt)}),__publicField(this,"handleError",et=>{const{onError:tt}=this.props,nt=et.message==="Browser does not support SVG"?STATUS.UNSUPPORTED:STATUS.FAILED;this.isActive&&this.setState({status:nt},()=>{typeof tt=="function"&&tt(et)})}),__publicField(this,"handleLoad",(et,tt=!1)=>{this.isActive&&this.setState({content:et,isCached:tt,status:STATUS.LOADED},this.getElement)}),this.state={content:"",element:null,isCached:!!_e.cacheRequests&&cacheStore.isCached(_e.src),status:STATUS.IDLE},this.hash=_e.uniqueHash??randomString(8)}componentDidMount(){if(this.isActive=!0,!canUseDOM$2()||this.isInitialized)return;const{status:_e}=this.state,{src:et}=this.props;try{if(_e===STATUS.IDLE){if(!isSupportedEnvironment())throw new Error("Browser does not support SVG");if(!et)throw new Error("Missing src");this.load()}}catch(tt){this.handleError(tt)}this.isInitialized=!0}componentDidUpdate(_e,et){if(!canUseDOM$2())return;const{isCached:tt,status:nt}=this.state,{onLoad:rt,src:at}=this.props;if(et.status!==STATUS.READY&&nt===STATUS.READY&&rt&&rt(at,tt),_e.src!==at){if(!at){this.handleError(new Error("Missing src"));return}this.load()}}componentWillUnmount(){this.isActive=!1}getElement(){try{const _e=this.getNode(),et=convert(_e);if(!et||!reactExports.isValidElement(et))throw new Error("Could not convert the src to a React element");this.setState({element:et,status:STATUS.READY})}catch(_e){this.handleError(new Error(_e.message))}}getNode(){const{description:_e,title:et}=this.props;try{const tt=this.processSVG(),nt=convert(tt,{nodeOnly:!0});if(!nt||!(nt instanceof SVGSVGElement))throw new Error("Could not convert the src to a DOM Node");const rt=this.updateSVGAttributes(nt);if(_e){const at=rt.querySelector("desc");at!=null&&at.parentNode&&at.parentNode.removeChild(at);const it=document.createElementNS("http://www.w3.org/2000/svg","desc");it.innerHTML=_e,rt.prepend(it)}if(typeof et<"u"){const at=rt.querySelector("title");if(at!=null&&at.parentNode&&at.parentNode.removeChild(at),et){const it=document.createElementNS("http://www.w3.org/2000/svg","title");it.innerHTML=et,rt.prepend(it)}}return rt}catch(tt){return this.handleError(tt)}}load(){this.isActive&&this.setState({content:"",element:null,isCached:!1,status:STATUS.LOADING},async()=>{const{cacheRequests:_e,fetchOptions:et,src:tt}=this.props,nt=/^data:image\/svg[^,]*?(;base64)?,(.*)/u.exec(tt);let rt;if(nt?rt=nt[1]?window.atob(nt[2]):decodeURIComponent(nt[2]):tt.includes("rt.includes(it)&&(ot?!ot.includes("#"):!1);return tt&&[..._e.children].forEach(it=>{var ot;if((ot=it.attributes)!=null&&ot.length){const st=Object.values(it.attributes).map(ct=>{const ut=ct,dt=/url\((.*?)\)/.exec(ct.value);return dt!=null&&dt[1]&&(ut.value=ct.value.replace(dt[0],`url(${et}${dt[1]}__${this.hash})`)),ut});nt.forEach(ct=>{const ut=st.find(dt=>dt.name===ct);ut&&!at(ct,ut.value)&&(ut.value=`${ut.value}__${this.hash}`)})}return it.children.length?this.updateSVGAttributes(it):it}),_e}render(){const{element:_e,status:et}=this.state,{children:tt=null,innerRef:nt,loader:rt=null}=this.props,at=omit(this.props,"baseURL","cacheRequests","children","description","fetchOptions","innerRef","loader","onError","onLoad","preProcessor","src","title","uniqueHash","uniquifyIDs");return canUseDOM$2()?_e?reactExports.cloneElement(_e,{ref:nt,...at}):[STATUS.UNSUPPORTED,STATUS.FAILED].includes(et)?tt:rt:rt}};__publicField(ReactInlineSVG,"defaultProps",{cacheRequests:!0,uniquifyIDs:!1});function InlineSVG(_e){cacheStore||(cacheStore=new CacheStore);const{loader:et}=_e,tt=reactExports.useRef(!1),[nt,rt]=reactExports.useState(cacheStore.isReady);return reactExports.useEffect(()=>{tt.current||(cacheStore.onReady(()=>{rt(!0)}),tt.current=!0)},[]),nt?jsxRuntimeExports.jsx(ReactInlineSVG,{..._e}):et}var _excluded$q=["src","alt","size","className"],SvgIcon=function _e(et){var tt=et.src,nt=et.alt,rt=et.size,at=rt===void 0?24:rt,it=et.className,ot=_objectWithoutProperties(et,_excluded$q),st=_createRawReactElement("svg",{className:it,width:at,height:at,"data-src":tt,"data-testid":"svg-icon-loader"});return React$3.createElement(InlineSVG,_extends$4({className:it,src:tt,title:nt,width:at,height:at,loader:st,"data-testid":"svg-icon"},ot),st)},_excluded$p=["src","alt","count","size","countMax","title"],Icon$1=function _e(et){var tt=et.src,nt=et.alt,rt=et.count,at=et.size,it=et.countMax,ot=et.title,st=_objectWithoutProperties(et,_excluded$p);return _createRawReactElement("div",{className:"relative flex shrink-0 flex-col","data-testid":st["data-testid"]||"icon",title:ot},void 0,rt?_createRawReactElement("span",{className:"absolute -right-3 -top-2 flex h-5 min-w-[20px] shrink-0 items-center justify-center whitespace-nowrap break-words"},void 0,_createRawReactElement(Counter,{count:rt,countMax:it})):null,React$3.createElement(SvgIcon,_extends$4({src:tt,size:at,alt:nt},st)))},_excluded$o=["align","className","direction","family","size","tag","theme","tracking","transform","truncate","weight"],themes$1={default:"text-gray-900 dark:text-gray-100",danger:"text-danger-600",primary:"text-primary-600 dark:text-accent-blue",muted:"text-gray-700 dark:text-gray-600",subtle:"text-gray-400 dark:text-gray-500",success:"text-success-600",inherit:"text-inherit",white:"text-white"},weights={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},sizes$2={xs:"text-xs",sm:"text-sm",md:"text-base leading-5",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl"},alignments={left:"text-left",center:"text-center",right:"text-right"},trackingSizes={normal:"tracking-normal",wide:"tracking-wide"},transformProperties={normal:"normal-case",uppercase:"uppercase"},families={sans:"font-sans",mono:"font-mono"},Text$2=React$3.forwardRef(function(_e,et){var tt,nt=_e.align,rt=_e.className,at=_e.direction,it=_e.family,ot=it===void 0?"sans":it,st=_e.size,ct=st===void 0?"md":st,ut=_e.tag,dt=ut===void 0?"p":ut,ft=_e.theme,pt=ft===void 0?"default":ft,mt=_e.tracking,ht=mt===void 0?"normal":mt,Et=_e.transform,yt=Et===void 0?"normal":Et,vt=_e.truncate,gt=vt===void 0?!1:vt,St=_e.weight,Rt=St===void 0?"normal":St,$t=_objectWithoutProperties(_e,_excluded$o),bt=dt,wt=typeof nt=="string"?alignments[nt]:"";return React$3.createElement(bt,_extends$4({},$t,{ref:et,className:clsx((tt={"underline decoration-dotted cursor-default":dt==="abbr"},_defineProperty$7(tt,at,typeof at<"u"),_defineProperty$7(tt,"truncate",gt),_defineProperty$7(tt,sizes$2[ct],!0),_defineProperty$7(tt,themes$1[pt],!0),_defineProperty$7(tt,weights[Rt],!0),_defineProperty$7(tt,trackingSizes[ht],!0),_defineProperty$7(tt,families[ot],!0),_defineProperty$7(tt,wt,typeof nt<"u"),_defineProperty$7(tt,transformProperties[yt],typeof yt<"u"),tt),rt)}))});const vitePluginRequire_1697861824033_64069345="/packs/assets/photo-off-a5883c4a.svg";var isRegExp$1=isRegexp,$TypeError$8=TypeError,notARegexp=function(_e){if(isRegExp$1(_e))throw $TypeError$8("The method doesn't accept regular expressions");return _e},wellKnownSymbol$9=wellKnownSymbol$t,MATCH=wellKnownSymbol$9("match"),correctIsRegexpLogic=function(_e){var et=/./;try{"/./"[_e](et)}catch{try{return et[MATCH]=!1,"/./"[_e](et)}catch{}}return!1},$$u=_export,uncurryThis$b=functionUncurryThisClause,getOwnPropertyDescriptor$3=objectGetOwnPropertyDescriptor.f,toLength$3=toLength$6,toString$d=toString$t,notARegExp$2=notARegexp,requireObjectCoercible$5=requireObjectCoercible$b,correctIsRegExpLogic$2=correctIsRegexpLogic,nativeEndsWith=uncurryThis$b("".endsWith),slice=uncurryThis$b("".slice),min$2=Math.min,CORRECT_IS_REGEXP_LOGIC$1=correctIsRegExpLogic$2("endsWith"),MDN_POLYFILL_BUG$1=!CORRECT_IS_REGEXP_LOGIC$1&&!!function(){var _e=getOwnPropertyDescriptor$3(String.prototype,"endsWith");return _e&&!_e.writable}();$$u({target:"String",proto:!0,forced:!MDN_POLYFILL_BUG$1&&!CORRECT_IS_REGEXP_LOGIC$1},{endsWith:function _e(et){var tt=toString$d(requireObjectCoercible$5(this));notARegExp$2(et);var nt=arguments.length>1?arguments[1]:void 0,rt=tt.length,at=nt===void 0?rt:min$2(toLength$3(nt),rt),it=toString$d(et);return nativeEndsWith?nativeEndsWith(tt,it,at):slice(tt,at-it.length,at)===it}});var $$t=_export,uncurryThis$a=functionUncurryThisClause,getOwnPropertyDescriptor$2=objectGetOwnPropertyDescriptor.f,toLength$2=toLength$6,toString$c=toString$t,notARegExp$1=notARegexp,requireObjectCoercible$4=requireObjectCoercible$b,correctIsRegExpLogic$1=correctIsRegexpLogic,nativeStartsWith=uncurryThis$a("".startsWith),stringSlice$3=uncurryThis$a("".slice),min$1=Math.min,CORRECT_IS_REGEXP_LOGIC=correctIsRegExpLogic$1("startsWith"),MDN_POLYFILL_BUG=!CORRECT_IS_REGEXP_LOGIC&&!!function(){var _e=getOwnPropertyDescriptor$2(String.prototype,"startsWith");return _e&&!_e.writable}();$$t({target:"String",proto:!0,forced:!MDN_POLYFILL_BUG&&!CORRECT_IS_REGEXP_LOGIC},{startsWith:function _e(et){var tt=toString$c(requireObjectCoercible$4(this));notARegExp$1(et);var nt=toLength$2(min$1(arguments.length>1?arguments[1]:void 0,tt.length)),rt=toString$c(et);return nativeStartsWith?nativeStartsWith(tt,rt,nt):stringSlice$3(tt,nt,nt+rt.length)===rt}});var StillImage=function _e(et){var tt=et.alt,nt=et.className,rt=et.src,at=et.style,it=et.letterboxed,ot=it===void 0?!1:it,st=et.showExt,ct=st===void 0?!1:st,ut=et.onError,dt=useSettings(),ft=dt.get("autoPlayGif"),pt=reactExports.useRef(null),mt=reactExports.useRef(null),ht=rt&&!ft&&(rt.endsWith(".gif")||rt.startsWith("blob:")),Et=function(){if(ht&&pt.current&&mt.current){var gt;pt.current.width=mt.current.naturalWidth,pt.current.height=mt.current.naturalHeight,(gt=pt.current.getContext("2d"))===null||gt===void 0||gt.drawImage(mt.current,0,0)}},yt=clsx("block h-full w-full",{"object-contain":ot,"object-cover":!ot});return _createRawReactElement("div",{"data-testid":"still-image-container",className:clsx(nt,"group relative isolate overflow-hidden"),style:at},void 0,React$3.createElement("img",{src:rt,alt:tt,ref:mt,onLoad:Et,onError:ut,className:clsx(yt,{"invisible group-hover:visible":ht})}),ht&&React$3.createElement("canvas",{ref:pt,className:clsx(yt,{"absolute group-hover:invisible top-0":ht})}),ht&&ct&&_createRawReactElement("div",{className:"pointer-events-none absolute bottom-2 left-2 opacity-90 group-hover:hidden"},void 0,_createRawReactElement(ExtensionBadge,{ext:"GIF"})))},ExtensionBadge=function _e(et){var tt=et.ext;return _createRawReactElement("div",{className:"inline-flex items-center rounded bg-gray-100 px-2 py-0.5 text-sm font-medium text-gray-900 dark:bg-gray-800 dark:text-gray-100"},void 0,tt)},AVATAR_SIZE=42,Avatar=function _e(et){var tt=et.src,nt=et.size,rt=nt===void 0?AVATAR_SIZE:nt,at=et.className,it=reactExports.useState(!1),ot=_slicedToArray$4(it,2),st=ot[0],ct=ot[1],ut=function(){return ct(!0)},dt=React$3.useMemo(function(){return{width:rt,height:rt}},[rt]);return st?_createRawReactElement("div",{style:{width:rt,height:rt},className:clsx("flex items-center justify-center rounded-full bg-gray-200 dark:bg-gray-900",at)},void 0,_createRawReactElement(Icon$1,{src:vitePluginRequire_1697861824033_64069345,className:"h-4 w-4 text-gray-500 dark:text-gray-700",alt:"Avatar"})):_createRawReactElement(StillImage,{className:clsx("rounded-full",at),style:dt,src:tt,alt:"Avatar",onError:ut})},Banner=function _e(et){var tt=et.theme,nt=et.children,rt=et.className;return _createRawReactElement("div",{"data-testid":"banner",className:clsx("fixed inset-x-0 bottom-0 z-50 py-8",{"backdrop-blur bg-primary-800/80 dark:bg-primary-900/80":tt==="frosted","bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 shadow-3xl dark:shadow-inset":tt==="opaque"},rt)},void 0,_createRawReactElement("div",{className:"mx-auto max-w-4xl px-4"},void 0,nt))};const themes={primary:"bg-primary-500 hover:bg-primary-400 dark:hover:bg-primary-600 border-transparent focus:bg-primary-500 text-gray-100 focus:ring-primary-300",secondary:"border-transparent bg-primary-100 dark:bg-primary-800 hover:bg-primary-50 dark:hover:bg-primary-700 focus:bg-primary-100 dark:focus:bg-primary-800 text-primary-500 dark:text-primary-200",ghost:"shadow-none border-gray-200 text-gray-700 bg-white/75 dark:border-slate-700 hover:bg-gray-200/75 dark:bg-slate-800/80 dark:hover:bg-slate-700/80 dark:text-slate-200 focus:ring-primary-500",tertiary:"bg-transparent border-gray-400 dark:border-gray-800 hover:border-primary-300 dark:hover:border-primary-700 focus:border-primary-500 text-gray-900 dark:text-gray-100 focus:ring-primary-500",accent:"border-transparent bg-secondary-500 hover:bg-secondary-400 focus:bg-secondary-500 text-gray-100 focus:ring-secondary-300",danger:"border-transparent bg-danger-100 dark:bg-danger-900 text-danger-600 dark:text-danger-200 hover:bg-danger-600 hover:text-gray-100 dark:hover:text-gray-100 dark:hover:bg-danger-500 focus:ring-danger-500",transparent:"border-transparent bg-transparent text-primary-600 dark:text-accent-blue dark:bg-transparent hover:bg-gray-200 dark:hover:bg-gray-800/50",outline:"border-gray-100 border-2 bg-transparent text-gray-100 hover:bg-white/10",muted:"border border-solid bg-transparent border-gray-400 dark:border-gray-800 hover:border-primary-300 dark:hover:border-primary-700 focus:border-primary-500 text-gray-900 dark:text-gray-100 focus:ring-primary-500"},sizes$1={xs:"px-3 py-1 text-xs",sm:"px-3 py-1.5 text-xs leading-4",md:"px-4 py-2 text-sm",lg:"px-6 py-3 text-base"},useButtonStyles=({theme:_e,block:et,disabled:tt,size:nt})=>clsx({"inline-flex items-center place-content-center border font-medium rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 appearance-none transition-all":!0,"select-none disabled:opacity-75 disabled:cursor-default":tt,[`${themes[_e]}`]:!0,[`${sizes$1[nt]}`]:!0,"flex w-full justify-center":et});var Button=React$3.forwardRef(function(_e,et){var tt=_e.block,nt=tt===void 0?!1:tt,rt=_e.children,at=_e.disabled,it=at===void 0?!1:at,ot=_e.icon,st=_e.onClick,ct=_e.size,ut=ct===void 0?"md":ct,dt=_e.text,ft=_e.theme,pt=ft===void 0?"secondary":ft,mt=_e.to,ht=_e.type,Et=ht===void 0?"button":ht,yt=_e.className,vt=dt||rt,gt=useButtonStyles({theme:pt,block:nt,disabled:it,size:ut}),St=function(){return ot?_createRawReactElement(Icon$1,{src:ot,className:"h-4 w-4"}):null},Rt=React$3.useCallback(function(bt){st&&!it&&st(bt)},[st,it]),$t=function(){return React$3.createElement("button",{className:clsx("space-x-2 rtl:space-x-reverse",gt,yt),disabled:it,onClick:Rt,ref:et,type:Et,"data-testid":"button"},St(),vt&&_createRawReactElement("span",{},void 0,vt))};return mt?_createRawReactElement(Link$2,{to:mt,tabIndex:-1,className:"inline-flex"},void 0,$t()):$t()});const vitePluginRequire_1697861828086_76580221="/packs/assets/chevron-right-f90f5add.svg",vitePluginRequire_1697861826697_12112271="/packs/assets/chevron-left-28dd7555.svg",vitePluginRequire_1697861811668_43235124="/packs/assets/arrow-left-bfa0bfb7.svg";var _excluded$n=["children","variant","size","className"],sizes={md:"p-4 sm:rounded-xl",lg:"p-4 sm:p-6 sm:rounded-xl",xl:"p-4 sm:p-10 sm:rounded-3xl"},messages$17={back:{id:"card.back.label",defaultMessage:"Back"}},Card$1=React$3.forwardRef(function(_e,et){var tt,nt=_e.children,rt=_e.variant,at=rt===void 0?"default":rt,it=_e.size,ot=it===void 0?"md":it,st=_e.className,ct=_objectWithoutProperties(_e,_excluded$n);return React$3.createElement("div",_extends$4({ref:et},ct,{className:clsx((tt={"bg-white dark:bg-primary-900 text-gray-900 dark:text-gray-100 shadow-lg dark:shadow-none":at==="rounded"},_defineProperty$7(tt,sizes[ot],at==="rounded"),_defineProperty$7(tt,"py-4",at==="slim"),tt),st)}),nt)}),CardHeader=function _e(et){var tt=et.className,nt=et.children,rt=et.backHref,at=et.onBackClick,it=useIntl(),ot=function(){if(!rt&&!at)return null;var ct=rt?Link$2:"button",ut=rt?{to:rt}:{onClick:at};return React$3.createElement(ct,_extends$4({ref:useHotkey("Backspace")},ut,{className:"rounded-full text-gray-900 focus:ring-2 focus:ring-primary-500 dark:text-gray-100","aria-label":it.formatMessage(messages$17.back)}),_createRawReactElement(SvgIcon,{src:vitePluginRequire_1697861811668_43235124,className:"h-6 w-6 rtl:rotate-180"}),_createRawReactElement("span",{className:"sr-only","data-testid":"back-button"},void 0,it.formatMessage(messages$17.back)))};return _createRawReactElement(HStack,{alignItems:"center",space:2,className:tt},void 0,ot(),nt)},CardTitle=function _e(et){var tt=et.title;return _createRawReactElement(Text$2,{size:"xl",weight:"bold",tag:"h1","data-testid":"card-title",truncate:!0},void 0,tt)},CardBody=function _e(et){var tt=et.className,nt=et.children;return _createRawReactElement("div",{"data-testid":"card-body",className:tt},void 0,nt)},Checkbox=React$3.forwardRef(function(_e,et){return React$3.createElement("input",_extends$4({},_e,{ref:et,type:"checkbox",className:"h-4 w-4 rounded border-2 border-gray-300 text-primary-600 focus:ring-primary-500 dark:border-gray-800 dark:bg-gray-900"}))}),$$s=_export,fails$g=fails$F,isArray$2=isArray$b,isObject$b=isObject$u,toObject$6=toObject$e,lengthOfArrayLike$5=lengthOfArrayLike$b,doesNotExceedSafeInteger=doesNotExceedSafeInteger$2,createProperty$3=createProperty$6,arraySpeciesCreate=arraySpeciesCreate$2,arrayMethodHasSpeciesSupport$2=arrayMethodHasSpeciesSupport$4,wellKnownSymbol$8=wellKnownSymbol$t,V8_VERSION$1=engineV8Version,IS_CONCAT_SPREADABLE=wellKnownSymbol$8("isConcatSpreadable"),IS_CONCAT_SPREADABLE_SUPPORT=V8_VERSION$1>=51||!fails$g(function(){var _e=[];return _e[IS_CONCAT_SPREADABLE]=!1,_e.concat()[0]!==_e}),isConcatSpreadable=function(_e){if(!isObject$b(_e))return!1;var et=_e[IS_CONCAT_SPREADABLE];return et!==void 0?!!et:isArray$2(_e)},FORCED$6=!IS_CONCAT_SPREADABLE_SUPPORT||!arrayMethodHasSpeciesSupport$2("concat");$$s({target:"Array",proto:!0,arity:1,forced:FORCED$6},{concat:function _e(et){var tt=toObject$6(this),nt=arraySpeciesCreate(tt,0),rt=0,at,it,ot,st,ct;for(at=-1,ot=arguments.length;atet in _e?__defProp(_e,et,{enumerable:!0,configurable:!0,writable:!0,value:tt}):_e[et]=tt,__publicField=(_e,et,tt)=>(__defNormalProp(_e,typeof et!="symbol"?et+"":et,tt),tt),CACHE_NAME="react-inlinesvg",CACHE_MAX_RETRIES=10,STATUS={IDLE:"idle",LOADING:"loading",LOADED:"loaded",FAILED:"failed",READY:"ready",UNSUPPORTED:"unsupported"};function canUseDOM$2(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function isSupportedEnvironment(){return supportsInlineSVG()&&typeof window<"u"&&window!==null}async function request(_e,et){const tt=await fetch(_e,et),nt=tt.headers.get("content-type"),[rt]=(nt??"").split(/ ?; ?/);if(tt.status>299)throw new Error("Not found");if(!["image/svg+xml","text/plain"].some(at=>rt.includes(at)))throw new Error(`Content type isn't valid: ${rt}`);return tt.text()}function sleep(_e=1){return new Promise(et=>{setTimeout(et,_e*1e3)})}function supportsInlineSVG(){if(!document)return!1;const _e=document.createElement("div");_e.innerHTML="";const et=_e.firstChild;return!!et&&et.namespaceURI==="http://www.w3.org/2000/svg"}function randomCharacter(_e){return _e[Math.floor(Math.random()*_e.length)]}function randomString(_e){const et="abcdefghijklmnopqrstuvwxyz",tt="1234567890",nt=`${et}${et.toUpperCase()}${tt}`;let rt="";for(let at=0;at<_e;at++)rt+=randomCharacter(nt);return rt}function omit(_e,...et){const tt={};for(const nt in _e)({}).hasOwnProperty.call(_e,nt)&&(et.includes(nt)||(tt[nt]=_e[nt]));return tt}var CacheStore=class{constructor(){__publicField(this,"cacheApi"),__publicField(this,"cacheStore"),__publicField(this,"subscribers",[]),__publicField(this,"isReady",!1),this.cacheStore=new Map;let _e=CACHE_NAME,et=!1;canUseDOM$2()&&(_e=window.REACT_INLINESVG_CACHE_NAME??CACHE_NAME,et=!!window.REACT_INLINESVG_PERSISTENT_CACHE),et?caches.open(_e).then(tt=>{this.cacheApi=tt,this.isReady=!0,this.subscribers.forEach(nt=>nt())}):this.isReady=!0}onReady(_e){this.isReady?_e():this.subscribers.push(_e)}async get(_e,et){var tt;return await(this.cacheApi?this.fetchAndAddToPersistentCache(_e,et):this.fetchAndAddToInternalCache(_e,et)),((tt=this.cacheStore.get(_e))==null?void 0:tt.content)??""}set(_e,et){this.cacheStore.set(_e,et)}isCached(_e){var et;return((et=this.cacheStore.get(_e))==null?void 0:et.status)===STATUS.LOADED}async fetchAndAddToInternalCache(_e,et){const tt=this.cacheStore.get(_e);if((tt==null?void 0:tt.status)===STATUS.LOADING){await this.handleLoading(_e,async()=>{this.cacheStore.set(_e,{content:"",status:STATUS.IDLE}),await this.fetchAndAddToInternalCache(_e,et)});return}if(!(tt!=null&&tt.content)){this.cacheStore.set(_e,{content:"",status:STATUS.LOADING});try{const nt=await request(_e,et);this.cacheStore.set(_e,{content:nt,status:STATUS.LOADED})}catch(nt){throw this.cacheStore.set(_e,{content:"",status:STATUS.FAILED}),nt}}}async fetchAndAddToPersistentCache(_e,et){var rt,at,it;const tt=this.cacheStore.get(_e);if((tt==null?void 0:tt.status)===STATUS.LOADED)return;if((tt==null?void 0:tt.status)===STATUS.LOADING){await this.handleLoading(_e,async()=>{this.cacheStore.set(_e,{content:"",status:STATUS.IDLE}),await this.fetchAndAddToPersistentCache(_e,et)});return}this.cacheStore.set(_e,{content:"",status:STATUS.LOADING});const nt=await((rt=this.cacheApi)==null?void 0:rt.match(_e));if(nt){const ot=await nt.text();this.cacheStore.set(_e,{content:ot,status:STATUS.LOADED});return}try{await((at=this.cacheApi)==null?void 0:at.add(new Request(_e,et)));const ot=await((it=this.cacheApi)==null?void 0:it.match(_e)),st=await(ot==null?void 0:ot.text())??"";this.cacheStore.set(_e,{content:st,status:STATUS.LOADED})}catch(ot){throw this.cacheStore.set(_e,{content:"",status:STATUS.FAILED}),ot}}async handleLoading(_e,et){var nt;let tt=0;for(;((nt=this.cacheStore.get(_e))==null?void 0:nt.status)===STATUS.LOADING&&tt=CACHE_MAX_RETRIES&&await et()}keys(){return[...this.cacheStore.keys()]}data(){return[...this.cacheStore.entries()].map(([_e,et])=>({[_e]:et}))}async delete(_e){this.cacheApi&&await this.cacheApi.delete(_e),this.cacheStore.delete(_e)}async clear(){if(this.cacheApi){const _e=await this.cacheApi.keys();for(const et of _e)await this.cacheApi.delete(et)}this.cacheStore.clear()}},cacheStore,ReactInlineSVG=class extends reactExports.PureComponent{constructor(_e){super(_e),__publicField(this,"hash"),__publicField(this,"isActive",!1),__publicField(this,"isInitialized",!1),__publicField(this,"fetchContent",async()=>{const{fetchOptions:et,src:tt}=this.props,nt=await request(tt,et);this.handleLoad(nt)}),__publicField(this,"handleError",et=>{const{onError:tt}=this.props,nt=et.message==="Browser does not support SVG"?STATUS.UNSUPPORTED:STATUS.FAILED;this.isActive&&this.setState({status:nt},()=>{typeof tt=="function"&&tt(et)})}),__publicField(this,"handleLoad",(et,tt=!1)=>{this.isActive&&this.setState({content:et,isCached:tt,status:STATUS.LOADED},this.getElement)}),this.state={content:"",element:null,isCached:!!_e.cacheRequests&&cacheStore.isCached(_e.src),status:STATUS.IDLE},this.hash=_e.uniqueHash??randomString(8)}componentDidMount(){if(this.isActive=!0,!canUseDOM$2()||this.isInitialized)return;const{status:_e}=this.state,{src:et}=this.props;try{if(_e===STATUS.IDLE){if(!isSupportedEnvironment())throw new Error("Browser does not support SVG");if(!et)throw new Error("Missing src");this.load()}}catch(tt){this.handleError(tt)}this.isInitialized=!0}componentDidUpdate(_e,et){if(!canUseDOM$2())return;const{isCached:tt,status:nt}=this.state,{onLoad:rt,src:at}=this.props;if(et.status!==STATUS.READY&&nt===STATUS.READY&&rt&&rt(at,tt),_e.src!==at){if(!at){this.handleError(new Error("Missing src"));return}this.load()}}componentWillUnmount(){this.isActive=!1}getElement(){try{const _e=this.getNode(),et=convert(_e);if(!et||!reactExports.isValidElement(et))throw new Error("Could not convert the src to a React element");this.setState({element:et,status:STATUS.READY})}catch(_e){this.handleError(new Error(_e.message))}}getNode(){const{description:_e,title:et}=this.props;try{const tt=this.processSVG(),nt=convert(tt,{nodeOnly:!0});if(!nt||!(nt instanceof SVGSVGElement))throw new Error("Could not convert the src to a DOM Node");const rt=this.updateSVGAttributes(nt);if(_e){const at=rt.querySelector("desc");at!=null&&at.parentNode&&at.parentNode.removeChild(at);const it=document.createElementNS("http://www.w3.org/2000/svg","desc");it.innerHTML=_e,rt.prepend(it)}if(typeof et<"u"){const at=rt.querySelector("title");if(at!=null&&at.parentNode&&at.parentNode.removeChild(at),et){const it=document.createElementNS("http://www.w3.org/2000/svg","title");it.innerHTML=et,rt.prepend(it)}}return rt}catch(tt){return this.handleError(tt)}}load(){this.isActive&&this.setState({content:"",element:null,isCached:!1,status:STATUS.LOADING},async()=>{const{cacheRequests:_e,fetchOptions:et,src:tt}=this.props,nt=/^data:image\/svg[^,]*?(;base64)?,(.*)/u.exec(tt);let rt;if(nt?rt=nt[1]?window.atob(nt[2]):decodeURIComponent(nt[2]):tt.includes("rt.includes(it)&&(ot?!ot.includes("#"):!1);return tt&&[..._e.children].forEach(it=>{var ot;if((ot=it.attributes)!=null&&ot.length){const st=Object.values(it.attributes).map(ct=>{const ut=ct,dt=/url\((.*?)\)/.exec(ct.value);return dt!=null&&dt[1]&&(ut.value=ct.value.replace(dt[0],`url(${et}${dt[1]}__${this.hash})`)),ut});nt.forEach(ct=>{const ut=st.find(dt=>dt.name===ct);ut&&!at(ct,ut.value)&&(ut.value=`${ut.value}__${this.hash}`)})}return it.children.length?this.updateSVGAttributes(it):it}),_e}render(){const{element:_e,status:et}=this.state,{children:tt=null,innerRef:nt,loader:rt=null}=this.props,at=omit(this.props,"baseURL","cacheRequests","children","description","fetchOptions","innerRef","loader","onError","onLoad","preProcessor","src","title","uniqueHash","uniquifyIDs");return canUseDOM$2()?_e?reactExports.cloneElement(_e,{ref:nt,...at}):[STATUS.UNSUPPORTED,STATUS.FAILED].includes(et)?tt:rt:rt}};__publicField(ReactInlineSVG,"defaultProps",{cacheRequests:!0,uniquifyIDs:!1});function InlineSVG(_e){cacheStore||(cacheStore=new CacheStore);const{loader:et}=_e,tt=reactExports.useRef(!1),[nt,rt]=reactExports.useState(cacheStore.isReady);return reactExports.useEffect(()=>{tt.current||(cacheStore.onReady(()=>{rt(!0)}),tt.current=!0)},[]),nt?jsxRuntimeExports.jsx(ReactInlineSVG,{..._e}):et}var _excluded$q=["src","alt","size","className"],SvgIcon=function _e(et){var tt=et.src,nt=et.alt,rt=et.size,at=rt===void 0?24:rt,it=et.className,ot=_objectWithoutProperties(et,_excluded$q),st=_createRawReactElement("svg",{className:it,width:at,height:at,"data-src":tt,"data-testid":"svg-icon-loader"});return React$3.createElement(InlineSVG,_extends$4({className:it,src:tt,title:nt,width:at,height:at,loader:st,"data-testid":"svg-icon"},ot),st)},_excluded$p=["src","alt","count","size","countMax","title"],Icon$1=function _e(et){var tt=et.src,nt=et.alt,rt=et.count,at=et.size,it=et.countMax,ot=et.title,st=_objectWithoutProperties(et,_excluded$p);return _createRawReactElement("div",{className:"relative flex shrink-0 flex-col","data-testid":st["data-testid"]||"icon",title:ot},void 0,rt?_createRawReactElement("span",{className:"absolute -right-3 -top-2 flex h-5 min-w-[20px] shrink-0 items-center justify-center whitespace-nowrap break-words"},void 0,_createRawReactElement(Counter,{count:rt,countMax:it})):null,React$3.createElement(SvgIcon,_extends$4({src:tt,size:at,alt:nt},st)))},_excluded$o=["align","className","direction","family","size","tag","theme","tracking","transform","truncate","weight"],themes$1={default:"text-gray-900 dark:text-gray-100",danger:"text-danger-600",primary:"text-primary-600 dark:text-accent-blue",muted:"text-gray-700 dark:text-gray-600",subtle:"text-gray-400 dark:text-gray-500",success:"text-success-600",inherit:"text-inherit",white:"text-white"},weights={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},sizes$2={xs:"text-xs",sm:"text-sm",md:"text-base leading-5",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl"},alignments={left:"text-left",center:"text-center",right:"text-right"},trackingSizes={normal:"tracking-normal",wide:"tracking-wide"},transformProperties={normal:"normal-case",uppercase:"uppercase"},families={sans:"font-sans",mono:"font-mono"},Text$2=React$3.forwardRef(function(_e,et){var tt,nt=_e.align,rt=_e.className,at=_e.direction,it=_e.family,ot=it===void 0?"sans":it,st=_e.size,ct=st===void 0?"md":st,ut=_e.tag,dt=ut===void 0?"p":ut,ft=_e.theme,pt=ft===void 0?"default":ft,mt=_e.tracking,ht=mt===void 0?"normal":mt,Et=_e.transform,yt=Et===void 0?"normal":Et,vt=_e.truncate,gt=vt===void 0?!1:vt,St=_e.weight,Rt=St===void 0?"normal":St,$t=_objectWithoutProperties(_e,_excluded$o),bt=dt,wt=typeof nt=="string"?alignments[nt]:"";return React$3.createElement(bt,_extends$4({},$t,{ref:et,className:clsx((tt={"underline decoration-dotted cursor-default":dt==="abbr"},_defineProperty$7(tt,at,typeof at<"u"),_defineProperty$7(tt,"truncate",gt),_defineProperty$7(tt,sizes$2[ct],!0),_defineProperty$7(tt,themes$1[pt],!0),_defineProperty$7(tt,weights[Rt],!0),_defineProperty$7(tt,trackingSizes[ht],!0),_defineProperty$7(tt,families[ot],!0),_defineProperty$7(tt,wt,typeof nt<"u"),_defineProperty$7(tt,transformProperties[yt],typeof yt<"u"),tt),rt)}))});const vitePluginRequire_1697864667038_72002981="/packs/assets/photo-off-a5883c4a.svg";var isRegExp$1=isRegexp,$TypeError$8=TypeError,notARegexp=function(_e){if(isRegExp$1(_e))throw $TypeError$8("The method doesn't accept regular expressions");return _e},wellKnownSymbol$9=wellKnownSymbol$t,MATCH=wellKnownSymbol$9("match"),correctIsRegexpLogic=function(_e){var et=/./;try{"/./"[_e](et)}catch{try{return et[MATCH]=!1,"/./"[_e](et)}catch{}}return!1},$$u=_export,uncurryThis$b=functionUncurryThisClause,getOwnPropertyDescriptor$3=objectGetOwnPropertyDescriptor.f,toLength$3=toLength$6,toString$d=toString$t,notARegExp$2=notARegexp,requireObjectCoercible$5=requireObjectCoercible$b,correctIsRegExpLogic$2=correctIsRegexpLogic,nativeEndsWith=uncurryThis$b("".endsWith),slice=uncurryThis$b("".slice),min$2=Math.min,CORRECT_IS_REGEXP_LOGIC$1=correctIsRegExpLogic$2("endsWith"),MDN_POLYFILL_BUG$1=!CORRECT_IS_REGEXP_LOGIC$1&&!!function(){var _e=getOwnPropertyDescriptor$3(String.prototype,"endsWith");return _e&&!_e.writable}();$$u({target:"String",proto:!0,forced:!MDN_POLYFILL_BUG$1&&!CORRECT_IS_REGEXP_LOGIC$1},{endsWith:function _e(et){var tt=toString$d(requireObjectCoercible$5(this));notARegExp$2(et);var nt=arguments.length>1?arguments[1]:void 0,rt=tt.length,at=nt===void 0?rt:min$2(toLength$3(nt),rt),it=toString$d(et);return nativeEndsWith?nativeEndsWith(tt,it,at):slice(tt,at-it.length,at)===it}});var $$t=_export,uncurryThis$a=functionUncurryThisClause,getOwnPropertyDescriptor$2=objectGetOwnPropertyDescriptor.f,toLength$2=toLength$6,toString$c=toString$t,notARegExp$1=notARegexp,requireObjectCoercible$4=requireObjectCoercible$b,correctIsRegExpLogic$1=correctIsRegexpLogic,nativeStartsWith=uncurryThis$a("".startsWith),stringSlice$3=uncurryThis$a("".slice),min$1=Math.min,CORRECT_IS_REGEXP_LOGIC=correctIsRegExpLogic$1("startsWith"),MDN_POLYFILL_BUG=!CORRECT_IS_REGEXP_LOGIC&&!!function(){var _e=getOwnPropertyDescriptor$2(String.prototype,"startsWith");return _e&&!_e.writable}();$$t({target:"String",proto:!0,forced:!MDN_POLYFILL_BUG&&!CORRECT_IS_REGEXP_LOGIC},{startsWith:function _e(et){var tt=toString$c(requireObjectCoercible$4(this));notARegExp$1(et);var nt=toLength$2(min$1(arguments.length>1?arguments[1]:void 0,tt.length)),rt=toString$c(et);return nativeStartsWith?nativeStartsWith(tt,rt,nt):stringSlice$3(tt,nt,nt+rt.length)===rt}});var StillImage=function _e(et){var tt=et.alt,nt=et.className,rt=et.src,at=et.style,it=et.letterboxed,ot=it===void 0?!1:it,st=et.showExt,ct=st===void 0?!1:st,ut=et.onError,dt=useSettings(),ft=dt.get("autoPlayGif"),pt=reactExports.useRef(null),mt=reactExports.useRef(null),ht=rt&&!ft&&(rt.endsWith(".gif")||rt.startsWith("blob:")),Et=function(){if(ht&&pt.current&&mt.current){var gt;pt.current.width=mt.current.naturalWidth,pt.current.height=mt.current.naturalHeight,(gt=pt.current.getContext("2d"))===null||gt===void 0||gt.drawImage(mt.current,0,0)}},yt=clsx("block h-full w-full",{"object-contain":ot,"object-cover":!ot});return _createRawReactElement("div",{"data-testid":"still-image-container",className:clsx(nt,"group relative isolate overflow-hidden"),style:at},void 0,React$3.createElement("img",{src:rt,alt:tt,ref:mt,onLoad:Et,onError:ut,className:clsx(yt,{"invisible group-hover:visible":ht})}),ht&&React$3.createElement("canvas",{ref:pt,className:clsx(yt,{"absolute group-hover:invisible top-0":ht})}),ht&&ct&&_createRawReactElement("div",{className:"pointer-events-none absolute bottom-2 left-2 opacity-90 group-hover:hidden"},void 0,_createRawReactElement(ExtensionBadge,{ext:"GIF"})))},ExtensionBadge=function _e(et){var tt=et.ext;return _createRawReactElement("div",{className:"inline-flex items-center rounded bg-gray-100 px-2 py-0.5 text-sm font-medium text-gray-900 dark:bg-gray-800 dark:text-gray-100"},void 0,tt)},AVATAR_SIZE=42,Avatar=function _e(et){var tt=et.src,nt=et.size,rt=nt===void 0?AVATAR_SIZE:nt,at=et.className,it=reactExports.useState(!1),ot=_slicedToArray$4(it,2),st=ot[0],ct=ot[1],ut=function(){return ct(!0)},dt=React$3.useMemo(function(){return{width:rt,height:rt}},[rt]);return st?_createRawReactElement("div",{style:{width:rt,height:rt},className:clsx("flex items-center justify-center rounded-full bg-gray-200 dark:bg-gray-900",at)},void 0,_createRawReactElement(Icon$1,{src:vitePluginRequire_1697864667038_72002981,className:"h-4 w-4 text-gray-500 dark:text-gray-700",alt:"Avatar"})):_createRawReactElement(StillImage,{className:clsx("rounded-full",at),style:dt,src:tt,alt:"Avatar",onError:ut})},Banner=function _e(et){var tt=et.theme,nt=et.children,rt=et.className;return _createRawReactElement("div",{"data-testid":"banner",className:clsx("fixed inset-x-0 bottom-0 z-50 py-8",{"backdrop-blur bg-primary-800/80 dark:bg-primary-900/80":tt==="frosted","bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 shadow-3xl dark:shadow-inset":tt==="opaque"},rt)},void 0,_createRawReactElement("div",{className:"mx-auto max-w-4xl px-4"},void 0,nt))};const themes={primary:"bg-primary-500 hover:bg-primary-400 dark:hover:bg-primary-600 border-transparent focus:bg-primary-500 text-gray-100 focus:ring-primary-300",secondary:"border-transparent bg-primary-100 dark:bg-primary-800 hover:bg-primary-50 dark:hover:bg-primary-700 focus:bg-primary-100 dark:focus:bg-primary-800 text-primary-500 dark:text-primary-200",ghost:"shadow-none border-gray-200 text-gray-700 bg-white/75 dark:border-slate-700 hover:bg-gray-200/75 dark:bg-slate-800/80 dark:hover:bg-slate-700/80 dark:text-slate-200 focus:ring-primary-500",tertiary:"bg-transparent border-gray-400 dark:border-gray-800 hover:border-primary-300 dark:hover:border-primary-700 focus:border-primary-500 text-gray-900 dark:text-gray-100 focus:ring-primary-500",accent:"border-transparent bg-secondary-500 hover:bg-secondary-400 focus:bg-secondary-500 text-gray-100 focus:ring-secondary-300",danger:"border-transparent bg-danger-100 dark:bg-danger-900 text-danger-600 dark:text-danger-200 hover:bg-danger-600 hover:text-gray-100 dark:hover:text-gray-100 dark:hover:bg-danger-500 focus:ring-danger-500",transparent:"border-transparent bg-transparent text-primary-600 dark:text-accent-blue dark:bg-transparent hover:bg-gray-200 dark:hover:bg-gray-800/50",outline:"border-gray-100 border-2 bg-transparent text-gray-100 hover:bg-white/10",muted:"border border-solid bg-transparent border-gray-400 dark:border-gray-800 hover:border-primary-300 dark:hover:border-primary-700 focus:border-primary-500 text-gray-900 dark:text-gray-100 focus:ring-primary-500"},sizes$1={xs:"px-3 py-1 text-xs",sm:"px-3 py-1.5 text-xs leading-4",md:"px-4 py-2 text-sm",lg:"px-6 py-3 text-base"},useButtonStyles=({theme:_e,block:et,disabled:tt,size:nt})=>clsx({"inline-flex items-center place-content-center border font-medium rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 appearance-none transition-all":!0,"select-none disabled:opacity-75 disabled:cursor-default":tt,[`${themes[_e]}`]:!0,[`${sizes$1[nt]}`]:!0,"flex w-full justify-center":et});var Button=React$3.forwardRef(function(_e,et){var tt=_e.block,nt=tt===void 0?!1:tt,rt=_e.children,at=_e.disabled,it=at===void 0?!1:at,ot=_e.icon,st=_e.onClick,ct=_e.size,ut=ct===void 0?"md":ct,dt=_e.text,ft=_e.theme,pt=ft===void 0?"secondary":ft,mt=_e.to,ht=_e.type,Et=ht===void 0?"button":ht,yt=_e.className,vt=dt||rt,gt=useButtonStyles({theme:pt,block:nt,disabled:it,size:ut}),St=function(){return ot?_createRawReactElement(Icon$1,{src:ot,className:"h-4 w-4"}):null},Rt=React$3.useCallback(function(bt){st&&!it&&st(bt)},[st,it]),$t=function(){return React$3.createElement("button",{className:clsx("space-x-2 rtl:space-x-reverse",gt,yt),disabled:it,onClick:Rt,ref:et,type:Et,"data-testid":"button"},St(),vt&&_createRawReactElement("span",{},void 0,vt))};return mt?_createRawReactElement(Link$2,{to:mt,tabIndex:-1,className:"inline-flex"},void 0,$t()):$t()});const vitePluginRequire_1697864669800_65455099="/packs/assets/chevron-right-f90f5add.svg",vitePluginRequire_1697864669074_22691868="/packs/assets/chevron-left-28dd7555.svg",vitePluginRequire_1697864655763_40111002="/packs/assets/arrow-left-bfa0bfb7.svg";var _excluded$n=["children","variant","size","className"],sizes={md:"p-4 sm:rounded-xl",lg:"p-4 sm:p-6 sm:rounded-xl",xl:"p-4 sm:p-10 sm:rounded-3xl"},messages$17={back:{id:"card.back.label",defaultMessage:"Back"}},Card$1=React$3.forwardRef(function(_e,et){var tt,nt=_e.children,rt=_e.variant,at=rt===void 0?"default":rt,it=_e.size,ot=it===void 0?"md":it,st=_e.className,ct=_objectWithoutProperties(_e,_excluded$n);return React$3.createElement("div",_extends$4({ref:et},ct,{className:clsx((tt={"bg-white dark:bg-primary-900 text-gray-900 dark:text-gray-100 shadow-lg dark:shadow-none":at==="rounded"},_defineProperty$7(tt,sizes[ot],at==="rounded"),_defineProperty$7(tt,"py-4",at==="slim"),tt),st)}),nt)}),CardHeader=function _e(et){var tt=et.className,nt=et.children,rt=et.backHref,at=et.onBackClick,it=useIntl(),ot=function(){if(!rt&&!at)return null;var ct=rt?Link$2:"button",ut=rt?{to:rt}:{onClick:at};return React$3.createElement(ct,_extends$4({ref:useHotkey("Backspace")},ut,{className:"rounded-full text-gray-900 focus:ring-2 focus:ring-primary-500 dark:text-gray-100","aria-label":it.formatMessage(messages$17.back)}),_createRawReactElement(SvgIcon,{src:vitePluginRequire_1697864655763_40111002,className:"h-6 w-6 rtl:rotate-180"}),_createRawReactElement("span",{className:"sr-only","data-testid":"back-button"},void 0,it.formatMessage(messages$17.back)))};return _createRawReactElement(HStack,{alignItems:"center",space:2,className:tt},void 0,ot(),nt)},CardTitle=function _e(et){var tt=et.title;return _createRawReactElement(Text$2,{size:"xl",weight:"bold",tag:"h1","data-testid":"card-title",truncate:!0},void 0,tt)},CardBody=function _e(et){var tt=et.className,nt=et.children;return _createRawReactElement("div",{"data-testid":"card-body",className:tt},void 0,nt)},Checkbox=React$3.forwardRef(function(_e,et){return React$3.createElement("input",_extends$4({},_e,{ref:et,type:"checkbox",className:"h-4 w-4 rounded border-2 border-gray-300 text-primary-600 focus:ring-primary-500 dark:border-gray-800 dark:bg-gray-900"}))}),$$s=_export,fails$g=fails$F,isArray$2=isArray$b,isObject$b=isObject$u,toObject$6=toObject$e,lengthOfArrayLike$5=lengthOfArrayLike$b,doesNotExceedSafeInteger=doesNotExceedSafeInteger$2,createProperty$3=createProperty$6,arraySpeciesCreate=arraySpeciesCreate$2,arrayMethodHasSpeciesSupport$2=arrayMethodHasSpeciesSupport$4,wellKnownSymbol$8=wellKnownSymbol$t,V8_VERSION$1=engineV8Version,IS_CONCAT_SPREADABLE=wellKnownSymbol$8("isConcatSpreadable"),IS_CONCAT_SPREADABLE_SUPPORT=V8_VERSION$1>=51||!fails$g(function(){var _e=[];return _e[IS_CONCAT_SPREADABLE]=!1,_e.concat()[0]!==_e}),isConcatSpreadable=function(_e){if(!isObject$b(_e))return!1;var et=_e[IS_CONCAT_SPREADABLE];return et!==void 0?!!et:isArray$2(_e)},FORCED$6=!IS_CONCAT_SPREADABLE_SUPPORT||!arrayMethodHasSpeciesSupport$2("concat");$$s({target:"Array",proto:!0,arity:1,forced:FORCED$6},{concat:function _e(et){var tt=toObject$6(this),nt=arraySpeciesCreate(tt,0),rt=0,at,it,ot,st,ct;for(at=-1,ot=arguments.length;atsummary:first-of-type","details"],candidateSelector=candidateSelectors.join(","),NoElement=typeof Element>"u",matches=NoElement?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,getRootNode$1=!NoElement&&Element.prototype.getRootNode?function(_e){return _e.getRootNode()}:function(_e){return _e.ownerDocument},getCandidates=function _e(et,tt,nt){var rt=Array.prototype.slice.apply(et.querySelectorAll(candidateSelector));return tt&&matches.call(et,candidateSelector)&&rt.unshift(et),rt=rt.filter(nt),rt},getCandidatesIteratively=function _e(et,tt,nt){for(var rt=[],at=Array.from(et);at.length;){var it=at.shift();if(it.tagName==="SLOT"){var ot=it.assignedElements(),st=ot.length?ot:it.children,ct=_e(st,!0,nt);nt.flatten?rt.push.apply(rt,ct):rt.push({scope:it,candidates:ct})}else{var ut=matches.call(it,candidateSelector);ut&&nt.filter(it)&&(tt||!et.includes(it))&&rt.push(it);var dt=it.shadowRoot||typeof nt.getShadowRoot=="function"&&nt.getShadowRoot(it),ft=!nt.shadowRootFilter||nt.shadowRootFilter(it);if(dt&&ft){var pt=_e(dt===!0?it.children:dt.children,!0,nt);nt.flatten?rt.push.apply(rt,pt):rt.push({scope:it,candidates:pt})}else at.unshift.apply(at,it.children)}}return rt},getTabindex=function _e(et,tt){return et.tabIndex<0&&(tt||/^(AUDIO|VIDEO|DETAILS)$/.test(et.tagName)||et.isContentEditable)&&isNaN(parseInt(et.getAttribute("tabindex"),10))?0:et.tabIndex},sortOrderedTabbables=function _e(et,tt){return et.tabIndex===tt.tabIndex?et.documentOrder-tt.documentOrder:et.tabIndex-tt.tabIndex},isInput=function _e(et){return et.tagName==="INPUT"},isHiddenInput=function _e(et){return isInput(et)&&et.type==="hidden"},isDetailsWithSummary=function _e(et){var tt=et.tagName==="DETAILS"&&Array.prototype.slice.apply(et.children).some(function(nt){return nt.tagName==="SUMMARY"});return tt},getCheckedRadio=function _e(et,tt){for(var nt=0;ntsummary:first-of-type"),it=at?et.parentElement:et;if(matches.call(it,"details:not([open]) *"))return!0;var ot=getRootNode$1(et).host,st=(ot==null?void 0:ot.ownerDocument.contains(ot))||et.ownerDocument.contains(et);if(!nt||nt==="full"){if(typeof rt=="function"){for(var ct=et;et;){var ut=et.parentElement,dt=getRootNode$1(et);if(ut&&!ut.shadowRoot&&rt(ut)===!0)return isZeroArea(et);et.assignedSlot?et=et.assignedSlot:!ut&&dt!==et.ownerDocument?et=dt.host:et=ut}et=ct}if(st)return!et.getClientRects().length}else if(nt==="non-zero-area")return isZeroArea(et);return!1},isDisabledFromFieldset=function _e(et){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(et.tagName))for(var tt=et.parentElement;tt;){if(tt.tagName==="FIELDSET"&&tt.disabled){for(var nt=0;nt=0)},sortByOrder=function _e(et){var tt=[],nt=[];return et.forEach(function(rt,at){var it=!!rt.scope,ot=it?rt.scope:rt,st=getTabindex(ot,it),ct=it?_e(rt.candidates):ot;st===0?it?tt.push.apply(tt,ct):tt.push(ot):nt.push({documentOrder:at,tabIndex:st,item:rt,isScope:it,content:ct})}),nt.sort(sortOrderedTabbables).reduce(function(rt,at){return at.isScope?rt.push.apply(rt,at.content):rt.push(at.content),rt},[]).concat(tt)},tabbable=function _e(et,tt){tt=tt||{};var nt;return tt.getShadowRoot?nt=getCandidatesIteratively([et],tt.includeContainer,{filter:isNodeMatchingSelectorTabbable.bind(null,tt),flatten:!1,getShadowRoot:tt.getShadowRoot,shadowRootFilter:isValidShadowRootTabbable}):nt=getCandidates(et,tt.includeContainer,isNodeMatchingSelectorTabbable.bind(null,tt)),sortByOrder(nt)},Popover$1=reactExports.forwardRef(function _e({unstable_skipInitialPortalRender:et,...tt},nt){return reactExports.createElement(Portal$2,{unstable_skipInitialRender:et},reactExports.createElement(PopoverImpl,{ref:nt,...tt}))});Popover$1.displayName="Popover";var PopoverImpl=reactExports.forwardRef(function _e({as:et="div",targetRef:tt,position:nt=positionDefault,unstable_observableRefs:rt=[],...at},it){const ot=reactExports.useRef(null),st=useRect(ot,{observe:!at.hidden}),ct=useRect(tt,{observe:!0}),ut=useComposedRefs(ot,it);return useSimulateTabNavigationForReactTree(tt,ot),reactExports.createElement(et,{"data-reach-popover":"",ref:ut,...at,style:{position:"absolute",...getStyles(nt,ct,st,...rt),...at.style}})});PopoverImpl.displayName="PopoverImpl";function getStyles(_e,et,tt,...nt){return tt?_e(et,tt,...nt.map(rt=>rt.current)):{visibility:"hidden"}}function getTopPosition(_e,et,tt){return{top:tt?`${_e.top-et.height+window.pageYOffset}px`:`${_e.top+_e.height+window.pageYOffset}px`}}var positionDefault=(_e,et)=>{if(!_e||!et)return{};const{directionRight:tt,directionUp:nt}=getCollisions(_e,et);return{left:tt?`${_e.right-et.width+window.pageXOffset}px`:`${_e.left+window.pageXOffset}px`,...getTopPosition(_e,et,nt)}},positionRight=(_e,et)=>{if(!_e||!et)return{};const{directionLeft:tt,directionUp:nt}=getCollisions(_e,et);return{left:tt?`${_e.left+window.pageXOffset}px`:`${_e.right-et.width+window.pageXOffset}px`,...getTopPosition(_e,et,nt)}},positionMatchWidth=(_e,et)=>{if(!_e||!et)return{};const{directionUp:tt}=getCollisions(_e,et);return{width:_e.width,left:_e.left,...getTopPosition(_e,et,tt)}};function getCollisions(_e,et,tt=0,nt=0){const rt={top:_e.top-et.height<0,right:window.innerWidth<_e.left+et.width-tt,bottom:window.innerHeight<_e.bottom+et.height-nt,left:_e.left+_e.width-et.width<0},at=rt.right&&!rt.left,it=rt.left&&!rt.right,ot=rt.bottom&&!rt.top,st=rt.top&&!rt.bottom;return{directionRight:at,directionLeft:it,directionUp:ot,directionDown:st}}function useSimulateTabNavigationForReactTree(_e,et){const tt=getOwnerDocument(_e.current);function nt(vt){vt.key==="Tab"&&et.current&&tabbable(et.current).length===0||(vt.key==="Tab"&&vt.shiftKey?ct(vt)?ut(vt):dt(vt)?ft(vt):mt(vt)&&Et():vt.key==="Tab"&&(at()?it(vt):ot()?st(vt):pt(vt)&&Et()))}reactExports.useEffect(()=>(tt.addEventListener("keydown",nt),()=>{tt.removeEventListener("keydown",nt)}),[]);function rt(){const vt=tabbable(tt),gt=vt&&_e.current?vt.indexOf(_e.current):-1,St=vt&&vt[gt+1];return et.current&&et.current.contains(St||null)?!1:St}function at(){return _e.current?_e.current===tt.activeElement:!1}function it(vt){const gt=et.current&&tabbable(et.current);gt&>[0]&&(vt.preventDefault(),gt[0].focus())}function ot(){if(et.current?et.current.contains(tt.activeElement||null):!1){const gt=et.current&&tabbable(et.current);return!!(gt&>[gt.length-1]===tt.activeElement)}return!1}function st(vt){const gt=rt();gt&&(vt.preventDefault(),gt.focus())}function ct(vt){if(!vt.shiftKey)return;const gt=rt();return vt.target===gt}function ut(vt){const gt=et.current&&tabbable(et.current),St=gt&>[gt.length-1];St&&(vt.preventDefault(),St.focus())}function dt(vt){const gt=et.current&&tabbable(et.current);return gt?gt.length===0?!1:vt.target===gt[0]:!1}function ft(vt){var gt;vt.preventDefault(),(gt=_e.current)==null||gt.focus()}function pt(vt){const gt=et.current?tabbable(tt).filter(St=>!et.current.contains(St)):null;return gt?vt.target===gt[gt.length-1]:!1}function mt(vt){return vt.target===tabbable(tt)[0]}let ht=[];function Et(){const vt=et.current&&tabbable(et.current);vt&&(vt.forEach(gt=>{ht.push([gt,gt.tabIndex]),gt.tabIndex=-1}),tt.addEventListener("focusin",yt))}function yt(){tt.removeEventListener("focusin",yt),ht.forEach(([vt,gt])=>{vt.tabIndex=gt})}}function _arrayWithoutHoles(_e){if(Array.isArray(_e))return _arrayLikeToArray$e(_e)}function _iterableToArray(_e){if(typeof Symbol<"u"&&_e[Symbol.iterator]!=null||_e["@@iterator"]!=null)return Array.from(_e)}function _nonIterableSpread(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _toConsumableArray(_e){return _arrayWithoutHoles(_e)||_iterableToArray(_e)||_unsupportedIterableToArray$e(_e)||_nonIterableSpread()}var _excluded$m=["children","className"],Select=React$3.forwardRef(function(_e,et){var tt=_e.children,nt=_e.className,rt=_objectWithoutProperties(_e,_excluded$m);return React$3.createElement("select",_extends$4({ref:et,className:clsx("w-full truncate rounded-md border-gray-300 py-2 pl-3 pr-10 text-base focus:border-primary-500 focus:outline-none focus:ring-primary-500 disabled:opacity-50 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-100 dark:ring-1 dark:ring-gray-800 dark:focus:border-primary-500 dark:focus:ring-primary-500 sm:text-sm",nt)},rt),tt)}),_excluded$l=["space","alignItems","justifyContent","className","grow","element"],_spaces,spaces=(_spaces={0:"space-y-0"},_defineProperty$7(_spaces,.5,"space-y-0.5"),_defineProperty$7(_spaces,1,"space-y-1"),_defineProperty$7(_spaces,1.5,"space-y-1.5"),_defineProperty$7(_spaces,2,"space-y-2"),_defineProperty$7(_spaces,3,"space-y-3"),_defineProperty$7(_spaces,4,"space-y-4"),_defineProperty$7(_spaces,5,"space-y-5"),_defineProperty$7(_spaces,6,"space-y-6"),_defineProperty$7(_spaces,9,"space-y-9"),_defineProperty$7(_spaces,10,"space-y-10"),_spaces),justifyContentOptions={between:"justify-between",center:"justify-center",end:"justify-end"},alignItemsOptions={top:"items-start",bottom:"items-end",center:"items-center",start:"items-start",end:"items-end"},Stack=React$3.forwardRef(function(_e,et){var tt,nt=_e.space,rt=_e.alignItems,at=_e.justifyContent,it=_e.className,ot=_e.grow,st=_e.element,ct=st===void 0?"div":st,ut=_objectWithoutProperties(_e,_excluded$l),dt=ct;return React$3.createElement(dt,_extends$4({},ut,{ref:et,className:clsx("flex flex-col",(tt={},_defineProperty$7(tt,spaces[nt],typeof nt<"u"),_defineProperty$7(tt,alignItemsOptions[rt],typeof rt<"u"),_defineProperty$7(tt,justifyContentOptions[at],typeof at<"u"),_defineProperty$7(tt,"grow",ot),tt),it)}))}),getDaysInMonth=function _e(et,tt){return new Date(tt,et+1,0).getDate()},currentYear=new Date().getFullYear(),Datepicker=function _e(et){var tt=et.onChange,nt=useIntl(),rt=reactExports.useState(new Date().getMonth()),at=_slicedToArray$4(rt,2),it=at[0],ot=at[1],st=reactExports.useState(new Date().getDate()),ct=_slicedToArray$4(st,2),ut=ct[0],dt=ct[1],ft=reactExports.useState(new Date().getFullYear()),pt=_slicedToArray$4(ft,2),mt=pt[0],ht=pt[1],Et=reactExports.useMemo(function(){return getDaysInMonth(it,mt)},[it,mt]);return reactExports.useEffect(function(){tt(new Date(mt,it,ut))},[it,ut,mt]),_createRawReactElement("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-3"},void 0,_createRawReactElement("div",{className:"sm:col-span-1"},void 0,_createRawReactElement(Stack,{},void 0,_createRawReactElement(Text$2,{size:"sm",weight:"medium",theme:"muted"},void 0,_createRawReactElement(FormattedMessage$1,{id:"datepicker.month",defaultMessage:"Month"})),_createRawReactElement(Select,{value:it,onChange:function(vt){return ot(Number(vt.target.value))},"data-testid":"datepicker-month"},void 0,_toConsumableArray(Array(12)).map(function(yt,vt){return _createRawReactElement("option",{value:vt},vt,nt.formatDate(new Date(mt,vt,1),{month:"long"}))})))),_createRawReactElement("div",{className:"sm:col-span-1"},void 0,_createRawReactElement(Stack,{},void 0,_createRawReactElement(Text$2,{size:"sm",weight:"medium",theme:"muted"},void 0,_createRawReactElement(FormattedMessage$1,{id:"datepicker.day",defaultMessage:"Day"})),_createRawReactElement(Select,{value:ut,onChange:function(vt){return dt(Number(vt.target.value))},"data-testid":"datepicker-day"},void 0,_toConsumableArray(Array(Et)).map(function(yt,vt){return _createRawReactElement("option",{value:vt+1},vt,vt+1)})))),_createRawReactElement("div",{className:"sm:col-span-1"},void 0,_createRawReactElement(Stack,{},void 0,_createRawReactElement(Text$2,{size:"sm",weight:"medium",theme:"muted"},void 0,_createRawReactElement(FormattedMessage$1,{id:"datepicker.year",defaultMessage:"Year"})),_createRawReactElement(Select,{value:mt,onChange:function(vt){return ht(Number(vt.target.value))},"data-testid":"datepicker-year"},void 0,_toConsumableArray(Array(121)).map(function(yt,vt){return _createRawReactElement("option",{value:currentYear-vt},vt,currentYear-vt)})))))},Divider=function _e(et){var tt=et.text,nt=et.textSize,rt=nt===void 0?"md":nt;return _createRawReactElement("div",{className:"relative","data-testid":"divider"},void 0,_createRawReactElement("div",{className:"absolute inset-0 flex items-center","aria-hidden":"true"},void 0,_createRawReactElement("div",{className:"w-full border-t-2 border-solid border-gray-100 dark:border-gray-800"})),tt&&_createRawReactElement("div",{className:"relative flex justify-center"},void 0,_createRawReactElement("span",{className:"bg-white px-2 text-gray-700 dark:bg-gray-900 dark:text-gray-600","data-testid":"divider-text"},void 0,_createRawReactElement(Text$2,{size:rt,tag:"span",theme:"inherit"},void 0,tt))))},_excluded$k=["emoji","alt","src"],Emoji=function _e(et){var tt=et.emoji,nt=et.alt,rt=et.src,at=_objectWithoutProperties(et,_excluded$k),it=toCodePoints(removeVS16s(tt)),ot=it.join("-");return ot?React$3.createElement("img",_extends$4({draggable:"false",alt:nt||tt,src:rt||joinPublicPath("packs/emoji/".concat(ot,".svg"))},at)):null},global$d=global$w,classof$3=classofRaw$2,engineIsNode=classof$3(global$d.process)==="process",isPrototypeOf$2=objectIsPrototypeOf,$TypeError$7=TypeError,anInstance$4=function(_e,et){if(isPrototypeOf$2(et,_e))return _e;throw $TypeError$7("Incorrect invocation")},isConstructor$1=isConstructor$4,tryToString$2=tryToString$6,$TypeError$6=TypeError,aConstructor$2=function(_e){if(isConstructor$1(_e))return _e;throw $TypeError$6(tryToString$2(_e)+" is not a constructor")},anObject$7=anObject$m,aConstructor$1=aConstructor$2,isNullOrUndefined$5=isNullOrUndefined$a,wellKnownSymbol$7=wellKnownSymbol$t,SPECIES$2=wellKnownSymbol$7("species"),speciesConstructor$2=function(_e,et){var tt=anObject$7(_e).constructor,nt;return tt===void 0||isNullOrUndefined$5(nt=anObject$7(tt)[SPECIES$2])?et:aConstructor$1(nt)},$TypeError$5=TypeError,validateArgumentsLength$2=function(_e,et){if(_edt;dt++)if(pt=yt(_e[dt]),pt&&isPrototypeOf$1(ResultPrototype,pt))return pt;return new Result(!1)}ct=getIterator$1(_e,ut)}for(mt=at?_e.next:ct.next;!(ht=call$7(mt,ct)).done;){try{pt=yt(ht.value)}catch(vt){iteratorClose(ct,"throw",vt)}if(typeof pt=="object"&&pt&&isPrototypeOf$1(ResultPrototype,pt))return pt}return new Result(!1)},NativePromiseConstructor$1=promiseNativeConstructor,checkCorrectnessOfIteration$1=checkCorrectnessOfIteration$3,FORCED_PROMISE_CONSTRUCTOR$3=promiseConstructorDetection.CONSTRUCTOR,promiseStaticsIncorrectIteration=FORCED_PROMISE_CONSTRUCTOR$3||!checkCorrectnessOfIteration$1(function(_e){NativePromiseConstructor$1.all(_e).then(void 0,function(){})}),$$q=_export,call$6=functionCall,aCallable$4=aCallable$b,newPromiseCapabilityModule$2=newPromiseCapability$2,perform$1=perform$3,iterate$4=iterate$5,PROMISE_STATICS_INCORRECT_ITERATION$1=promiseStaticsIncorrectIteration;$$q({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$1},{all:function _e(et){var tt=this,nt=newPromiseCapabilityModule$2.f(tt),rt=nt.resolve,at=nt.reject,it=perform$1(function(){var ot=aCallable$4(tt.resolve),st=[],ct=0,ut=1;iterate$4(et,function(dt){var ft=ct++,pt=!1;ut++,call$6(ot,tt,dt).then(function(mt){pt||(pt=!0,st[ft]=mt,--ut||rt(st))},at)}),--ut||rt(st)});return it.error&&at(it.value),nt.promise}});var $$p=_export,FORCED_PROMISE_CONSTRUCTOR$2=promiseConstructorDetection.CONSTRUCTOR,NativePromiseConstructor=promiseNativeConstructor,getBuiltIn$3=getBuiltIn$c,isCallable$3=isCallable$t,defineBuiltIn$4=defineBuiltIn$f,NativePromisePrototype=NativePromiseConstructor&&NativePromiseConstructor.prototype;$$p({target:"Promise",proto:!0,forced:FORCED_PROMISE_CONSTRUCTOR$2,real:!0},{catch:function(_e){return this.then(void 0,_e)}});if(isCallable$3(NativePromiseConstructor)){var method=getBuiltIn$3("Promise").prototype.catch;NativePromisePrototype.catch!==method&&defineBuiltIn$4(NativePromisePrototype,"catch",method,{unsafe:!0})}var $$o=_export,call$5=functionCall,aCallable$3=aCallable$b,newPromiseCapabilityModule$1=newPromiseCapability$2,perform=perform$3,iterate$3=iterate$5,PROMISE_STATICS_INCORRECT_ITERATION=promiseStaticsIncorrectIteration;$$o({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION},{race:function _e(et){var tt=this,nt=newPromiseCapabilityModule$1.f(tt),rt=nt.reject,at=perform(function(){var it=aCallable$3(tt.resolve);iterate$3(et,function(ot){call$5(it,tt,ot).then(nt.resolve,rt)})});return at.error&&rt(at.value),nt.promise}});var $$n=_export,call$4=functionCall,newPromiseCapabilityModule=newPromiseCapability$2,FORCED_PROMISE_CONSTRUCTOR$1=promiseConstructorDetection.CONSTRUCTOR;$$n({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$1},{reject:function _e(et){var tt=newPromiseCapabilityModule.f(this);return call$4(tt.reject,void 0,et),tt.promise}});var anObject$5=anObject$m,isObject$9=isObject$u,newPromiseCapability=newPromiseCapability$2,promiseResolve$1=function(_e,et){if(anObject$5(_e),isObject$9(et)&&et.constructor===_e)return et;var tt=newPromiseCapability.f(_e),nt=tt.resolve;return nt(et),tt.promise},$$m=_export,getBuiltIn$2=getBuiltIn$c,FORCED_PROMISE_CONSTRUCTOR=promiseConstructorDetection.CONSTRUCTOR,promiseResolve=promiseResolve$1;getBuiltIn$2("Promise");$$m({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR},{resolve:function _e(et){return promiseResolve(this,et)}});var $$l=_export,isArray$1=isArray$b,isConstructor=isConstructor$4,isObject$8=isObject$u,toAbsoluteIndex$1=toAbsoluteIndex$4,lengthOfArrayLike$3=lengthOfArrayLike$b,toIndexedObject$3=toIndexedObject$a,createProperty$2=createProperty$6,wellKnownSymbol$5=wellKnownSymbol$t,arrayMethodHasSpeciesSupport$1=arrayMethodHasSpeciesSupport$4,nativeSlice=arraySlice$4,HAS_SPECIES_SUPPORT$1=arrayMethodHasSpeciesSupport$1("slice"),SPECIES=wellKnownSymbol$5("species"),$Array=Array,max$1=Math.max;$$l({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$1},{slice:function _e(et,tt){var nt=toIndexedObject$3(this),rt=lengthOfArrayLike$3(nt),at=toAbsoluteIndex$1(et,rt),it=toAbsoluteIndex$1(tt===void 0?rt:tt,rt),ot,st,ct;if(isArray$1(nt)&&(ot=nt.constructor,isConstructor(ot)&&(ot===$Array||isArray$1(ot.prototype))?ot=void 0:isObject$8(ot)&&(ot=ot[SPECIES],ot===null&&(ot=void 0)),ot===$Array||ot===void 0))return nativeSlice(nt,at,it);for(st=new(ot===void 0?$Array:ot)(max$1(it-at,0)),ct=0;at0;)_e[at]=_e[--at];at!==nt++&&(_e[at]=rt)}return _e},merge=function(_e,et,tt,nt){for(var rt=et.length,at=tt.length,it=0,ot=0;it3)){if(IE_OR_EDGE)return!0;if(WEBKIT)return WEBKIT<603;var _e="",et,tt,nt,rt;for(et=65;et<76;et++){switch(tt=String.fromCharCode(et),et){case 66:case 69:case 70:case 72:nt=3;break;case 68:case 71:nt=4;break;default:nt=2}for(rt=0;rt<47;rt++)test.push({k:tt+rt,v:nt})}for(test.sort(function(at,it){return it.v-at.v}),rt=0;rttoString$b(tt)?1:-1}};$$k({target:"Array",proto:!0,forced:FORCED$5},{sort:function _e(et){et!==void 0&&aCallable$2(et);var tt=toObject$4(this);if(STABLE_SORT)return et===void 0?nativeSort(tt):nativeSort(tt,et);var nt=[],rt=lengthOfArrayLike$2(tt),at,it;for(it=0;it1?arguments[1]:void 0)}});var $$i=_export,$includes=arrayIncludes.includes,fails$d=fails$F,addToUnscopables$3=addToUnscopables$5,BROKEN_ON_SPARSE=fails$d(function(){return!Array(1).includes()});$$i({target:"Array",proto:!0,forced:BROKEN_ON_SPARSE},{includes:function _e(et){return $includes(this,et,arguments.length>1?arguments[1]:void 0)}});addToUnscopables$3("includes");var $$h=_export,uncurryThis$8=functionUncurryThis,notARegExp=notARegexp,requireObjectCoercible$3=requireObjectCoercible$b,toString$a=toString$t,correctIsRegExpLogic=correctIsRegexpLogic,stringIndexOf$2=uncurryThis$8("".indexOf);$$h({target:"String",proto:!0,forced:!correctIsRegExpLogic("includes")},{includes:function _e(et){return!!~stringIndexOf$2(toString$a(requireObjectCoercible$3(this)),toString$a(notARegExp(et)),arguments.length>1?arguments[1]:void 0)}});var global$7=global$w,DESCRIPTORS$9=descriptors$1,defineBuiltInAccessor$2=defineBuiltInAccessor$8,regExpFlags=regexpFlags$1,fails$c=fails$F,RegExp$2=global$7.RegExp,RegExpPrototype$1=RegExp$2.prototype,FORCED$4=DESCRIPTORS$9&&fails$c(function(){var _e=!0;try{RegExp$2(".","d")}catch{_e=!1}var et={},tt="",nt=_e?"dgimsy":"gimsy",rt=function(st,ct){Object.defineProperty(et,st,{get:function(){return tt+=ct,!0}})},at={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};_e&&(at.hasIndices="d");for(var it in at)rt(it,at[it]);var ot=Object.getOwnPropertyDescriptor(RegExpPrototype$1,"flags").get.call(et);return ot!==nt||tt!==nt});FORCED$4&&defineBuiltInAccessor$2(RegExpPrototype$1,"flags",{configurable:!0,get:regExpFlags});var $$g=_export,toObject$3=toObject$e,nativeKeys=objectKeys$2,fails$b=fails$F,FAILS_ON_PRIMITIVES$1=fails$b(function(){nativeKeys(1)});$$g({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$1},{keys:function _e(et){return nativeKeys(toObject$3(et))}});function EmojiPicker$1(){return __vitePreload(()=>import("./js/emoji-picker-2ef1c775.js"),[])}function Notifications(){return __vitePreload(()=>import("./js/index-fa21c2a3.js"),["packs/js/index-fa21c2a3.js","packs/js/pull-to-refresh-b8beecbe.js","packs/js/scroll-top-button-95820d24.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/mood-smile-6a052395.js"])}function HomeTimeline(){return __vitePreload(()=>import("./js/index-c8e0cd43.js"),["packs/js/index-c8e0cd43.js","packs/js/pull-to-refresh-b8beecbe.js","packs/js/timeline-585cfcf0.js","packs/js/scroll-top-button-95820d24.js","packs/js/status-list-13fdd81b.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/status-container-59e57baf.js","packs/js/pending-status-7f660229.js","packs/js/poll-preview-66340c9e.js","packs/js/noop-19c18e1e.js"])}function PublicTimeline(){return __vitePreload(()=>import("./js/index-2dd95a59.js"),["packs/js/index-2dd95a59.js","packs/js/accordion-9597afee.js","packs/js/dots-vertical-68cbc8e2.js","packs/js/pull-to-refresh-b8beecbe.js","packs/js/pinned-hosts-picker-5815755c.js","packs/js/timeline-585cfcf0.js","packs/js/scroll-top-button-95820d24.js","packs/js/status-list-13fdd81b.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/status-container-59e57baf.js","packs/js/pending-status-7f660229.js","packs/js/poll-preview-66340c9e.js","packs/js/noop-19c18e1e.js"])}function RemoteTimeline(){return __vitePreload(()=>import("./js/index-de5510c5.js"),["packs/js/index-de5510c5.js","packs/js/timeline-585cfcf0.js","packs/js/scroll-top-button-95820d24.js","packs/js/status-list-13fdd81b.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/status-container-59e57baf.js","packs/js/pending-status-7f660229.js","packs/js/poll-preview-66340c9e.js","packs/js/noop-19c18e1e.js","packs/js/pinned-hosts-picker-5815755c.js"])}function CommunityTimeline(){return __vitePreload(()=>import("./js/index-71d7c29c.js"),["packs/js/index-71d7c29c.js","packs/js/pull-to-refresh-b8beecbe.js","packs/js/timeline-585cfcf0.js","packs/js/scroll-top-button-95820d24.js","packs/js/status-list-13fdd81b.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/status-container-59e57baf.js","packs/js/pending-status-7f660229.js","packs/js/poll-preview-66340c9e.js","packs/js/noop-19c18e1e.js"])}function HashtagTimeline(){return __vitePreload(()=>import("./js/index-83b6cf03.js"),["packs/js/index-83b6cf03.js","packs/js/timeline-585cfcf0.js","packs/js/scroll-top-button-95820d24.js","packs/js/status-list-13fdd81b.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/status-container-59e57baf.js","packs/js/pending-status-7f660229.js","packs/js/poll-preview-66340c9e.js","packs/js/noop-19c18e1e.js"])}function DirectTimeline(){return __vitePreload(()=>import("./js/index-1b47413a.js"),["packs/js/index-1b47413a.js","packs/js/account-search-61b68090.js","packs/js/timeline-585cfcf0.js","packs/js/scroll-top-button-95820d24.js","packs/js/status-list-13fdd81b.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/status-container-59e57baf.js","packs/js/pending-status-7f660229.js","packs/js/poll-preview-66340c9e.js","packs/js/noop-19c18e1e.js"])}function Conversations(){return __vitePreload(()=>import("./js/index-dae99015.js"),["packs/js/index-dae99015.js","packs/js/account-search-61b68090.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/status-container-59e57baf.js"])}function ListTimeline(){return __vitePreload(()=>import("./js/index-4f4d03b8.js"),["packs/js/index-4f4d03b8.js","packs/js/timeline-585cfcf0.js","packs/js/scroll-top-button-95820d24.js","packs/js/status-list-13fdd81b.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/status-container-59e57baf.js","packs/js/pending-status-7f660229.js","packs/js/poll-preview-66340c9e.js","packs/js/noop-19c18e1e.js"])}function Lists(){return __vitePreload(()=>import("./js/index-ff8b63a3.js"),["packs/js/index-ff8b63a3.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/new-list-form-085135e5.js"])}function Bookmarks(){return __vitePreload(()=>import("./js/index-fbc91b1f.js"),["packs/js/index-fbc91b1f.js","packs/js/pull-to-refresh-b8beecbe.js","packs/js/status-list-13fdd81b.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/status-container-59e57baf.js","packs/js/pending-status-7f660229.js","packs/js/poll-preview-66340c9e.js","packs/js/noop-19c18e1e.js"])}function Status$1(){return __vitePreload(()=>import("./js/index-4bb15783.js"),["packs/js/index-4bb15783.js","packs/js/pull-to-refresh-b8beecbe.js","packs/js/thread-b9635854.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/pending-status-7f660229.js","packs/js/poll-preview-66340c9e.js","packs/js/noop-19c18e1e.js","packs/js/status-container-59e57baf.js"])}function PinnedStatuses(){return __vitePreload(()=>import("./js/index-2846fb7c.js"),["packs/js/index-2846fb7c.js","packs/js/status-list-13fdd81b.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/status-container-59e57baf.js","packs/js/pending-status-7f660229.js","packs/js/poll-preview-66340c9e.js","packs/js/noop-19c18e1e.js"])}function AccountTimeline(){return __vitePreload(()=>import("./js/index-d2abd689.js"),["packs/js/index-d2abd689.js","packs/js/status-list-13fdd81b.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/status-container-59e57baf.js","packs/js/pending-status-7f660229.js","packs/js/poll-preview-66340c9e.js","packs/js/noop-19c18e1e.js"])}function AccountGallery(){return __vitePreload(()=>import("./js/index-f98470b1.js"),["packs/js/index-f98470b1.js","packs/js/load-more-b53b8d88.js","packs/js/media-item-9b67131c.js","packs/js/volume-08f8a8f1.js","packs/js/es.array.last-index-of-ca8fdd84.js"])}function Followers(){return __vitePreload(()=>import("./js/index-bc2f66c5.js"),["packs/js/index-bc2f66c5.js","packs/js/useAccountList-6ddad2aa.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js"])}function Following(){return __vitePreload(()=>import("./js/index-8318dff9.js"),["packs/js/index-8318dff9.js","packs/js/useAccountList-6ddad2aa.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js"])}function FollowRequests(){return __vitePreload(()=>import("./js/index-faefcaa0.js"),["packs/js/index-faefcaa0.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/authorize-reject-buttons-f28a0539.js"])}function GenericNotFound(){return __vitePreload(()=>import("./js/index-605b2951.js"),[])}function FavouritedStatuses(){return __vitePreload(()=>import("./js/index-f30036af.js"),["packs/js/index-f30036af.js","packs/js/status-list-13fdd81b.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/status-container-59e57baf.js","packs/js/pending-status-7f660229.js","packs/js/poll-preview-66340c9e.js","packs/js/noop-19c18e1e.js"])}function Blocks(){return __vitePreload(()=>import("./js/index-fb44cfe6.js"),["packs/js/index-fb44cfe6.js","packs/js/useAccountList-6ddad2aa.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js"])}function DomainBlocks(){return __vitePreload(()=>import("./js/index-704aaec3.js"),["packs/js/index-704aaec3.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js"])}function Mutes(){return __vitePreload(()=>import("./js/index-bbc2ca16.js"),["packs/js/index-bbc2ca16.js","packs/js/useAccountList-6ddad2aa.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js"])}function MuteModal(){return __vitePreload(()=>import("./js/mute-modal-ee4db2be.js"),[])}function Filters(){return __vitePreload(()=>import("./js/index-66aa4115.js"),["packs/js/index-66aa4115.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js"])}function EditFilter(){return __vitePreload(()=>import("./js/edit-filter-a7163632.js"),["packs/js/edit-filter-a7163632.js","packs/js/streamfield-757f31b8.js"])}function ReportModal(){return __vitePreload(()=>import("./js/report-modal-97969a9e.js"),["packs/js/report-modal-97969a9e.js","packs/js/group-card-c9aa3023.js","packs/js/group-header-image-e076498c.js","packs/js/arrows-minimize-7c27a12c.js","packs/js/noop-19c18e1e.js"])}function AccountModerationModal(){return __vitePreload(()=>import("./js/account-moderation-modal-bc2704fb.js"),[])}function PolicyModal$1(){return __vitePreload(()=>Promise.resolve().then(()=>policyModal),void 0)}const MediaGallery=reactExports.lazy(()=>__vitePreload(()=>import("./js/media-gallery-3853c23c.js"),["packs/js/media-gallery-3853c23c.js","packs/js/volume-08f8a8f1.js","packs/js/media-aspect-ratio-df6a7bb1.js"])),Video=reactExports.lazy(()=>__vitePreload(()=>import("./js/index-486dc940.js").then(_e=>_e.i),["packs/js/index-486dc940.js","packs/js/arrows-minimize-7c27a12c.js","packs/js/volume-08f8a8f1.js","packs/js/web.url.constructor-8f9eaf9c.js","packs/js/object-assign-7ac9a0a3.js","packs/js/es.array.last-index-of-ca8fdd84.js","packs/js/media-aspect-ratio-df6a7bb1.js"])),Audio$1=reactExports.lazy(()=>__vitePreload(()=>import("./js/index-e88098cf.js"),["packs/js/index-e88098cf.js","packs/js/download-ac53125a.js","packs/js/volume-08f8a8f1.js","packs/js/index-486dc940.js","packs/js/arrows-minimize-7c27a12c.js","packs/js/web.url.constructor-8f9eaf9c.js","packs/js/object-assign-7ac9a0a3.js","packs/js/es.array.last-index-of-ca8fdd84.js","packs/js/media-aspect-ratio-df6a7bb1.js"]));function MediaModal(){return __vitePreload(()=>import("./js/media-modal-4e3635a1.js"),["packs/js/media-modal-4e3635a1.js","packs/js/arrow-right-b75290c7.js","packs/js/index-486dc940.js","packs/js/arrows-minimize-7c27a12c.js","packs/js/volume-08f8a8f1.js","packs/js/web.url.constructor-8f9eaf9c.js","packs/js/object-assign-7ac9a0a3.js","packs/js/es.array.last-index-of-ca8fdd84.js","packs/js/media-aspect-ratio-df6a7bb1.js","packs/js/download-ac53125a.js","packs/js/index-571dd45e.js","packs/js/warning-07d0fac9.js","packs/js/index-e88098cf.js","packs/js/thread-b9635854.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/pending-status-7f660229.js","packs/js/poll-preview-66340c9e.js","packs/js/noop-19c18e1e.js","packs/js/status-container-59e57baf.js"])}function VideoModal(){return __vitePreload(()=>import("./js/video-modal-4719b4f5.js"),["packs/js/video-modal-4719b4f5.js","packs/js/index-486dc940.js","packs/js/arrows-minimize-7c27a12c.js","packs/js/volume-08f8a8f1.js","packs/js/web.url.constructor-8f9eaf9c.js","packs/js/object-assign-7ac9a0a3.js","packs/js/es.array.last-index-of-ca8fdd84.js","packs/js/media-aspect-ratio-df6a7bb1.js"])}function BoostModal(){return __vitePreload(()=>import("./js/boost-modal-f29bf243.js"),[])}function ConfirmationModal(){return __vitePreload(()=>import("./js/confirmation-modal-548edfc8.js"),[])}function MissingDescriptionModal(){return __vitePreload(()=>import("./js/missing-description-modal-250e0a46.js"),[])}function ActionsModal(){return __vitePreload(()=>import("./js/actions-modal-70064cbb.js"),[])}function HotkeysModal(){return __vitePreload(()=>import("./js/hotkeys-modal-4d4ec08e.js"),[])}function ComposeModal(){return __vitePreload(()=>import("./js/compose-modal-2eac5d18.js"),["packs/js/compose-modal-2eac5d18.js","packs/js/modal-root-dfddfde1.js"])}function ReplyMentionsModal(){return __vitePreload(()=>import("./js/reply-mentions-modal-48dcf84b.js"),[])}function UnauthorizedModal(){return __vitePreload(()=>import("./js/unauthorized-modal-96327280.js"),[])}function EditFederationModal(){return __vitePreload(()=>import("./js/edit-federation-modal-e453cf1b.js"),[])}function EmbedModal(){return __vitePreload(()=>import("./js/embed-modal-2c187d85.js"),[])}function ComponentModal(){return __vitePreload(()=>import("./js/component-modal-cfb69ccb.js"),[])}function ReblogsModal(){return __vitePreload(()=>import("./js/reblogs-modal-e81d7374.js"),["packs/js/reblogs-modal-e81d7374.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js"])}function FavouritesModal(){return __vitePreload(()=>import("./js/favourites-modal-7d9dd035.js"),["packs/js/favourites-modal-7d9dd035.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js"])}function DislikesModal(){return __vitePreload(()=>import("./js/dislikes-modal-35340864.js"),["packs/js/dislikes-modal-35340864.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js"])}function ReactionsModal(){return __vitePreload(()=>import("./js/reactions-modal-c74f7f81.js"),["packs/js/reactions-modal-c74f7f81.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js"])}function MentionsModal(){return __vitePreload(()=>import("./js/mentions-modal-023f3271.js"),["packs/js/mentions-modal-023f3271.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js"])}function LandingPageModal(){return __vitePreload(()=>import("./js/landing-page-modal-0f71e319.js"),[])}function BirthdaysModal(){return __vitePreload(()=>import("./js/birthdays-modal-39b60060.js"),["packs/js/birthdays-modal-39b60060.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/balloon-551f6642.js"])}function BirthdayPanel(){return __vitePreload(()=>import("./js/birthday-panel-63d3155f.js"),["packs/js/birthday-panel-63d3155f.js","packs/js/widget-2ac720e4.js","packs/js/arrow-right-b75290c7.js"])}function AccountNoteModal(){return __vitePreload(()=>import("./js/account-note-modal-9be786e2.js"),[])}function ListEditor(){return __vitePreload(()=>import("./js/index-7e14f476.js"),["packs/js/index-7e14f476.js","packs/js/backspace-c284aa0a.js"])}function ListAdder(){return __vitePreload(()=>import("./js/index-df990da1.js"),["packs/js/index-df990da1.js","packs/js/new-list-form-085135e5.js"])}function Search$1(){return __vitePreload(()=>import("./js/index-b84c723b.js"),["packs/js/index-b84c723b.js","packs/js/hashtag-1d2f7520.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/status-container-59e57baf.js","packs/js/placeholder-account-a1add042.js","packs/js/placeholder-hashtag-f832d585.js"])}function LogoutPage(){return __vitePreload(()=>import("./js/logout-5666ded9.js"),[])}function Settings(){return __vitePreload(()=>import("./js/index-3011f076.js"),["packs/js/index-3011f076.js","packs/js/accounts-1cafdbcf.js"])}function EditProfile(){return __vitePreload(()=>import("./js/index-5df8a359.js"),["packs/js/index-5df8a359.js","packs/js/es.array.splice-d733542e.js","packs/js/streamfield-757f31b8.js","packs/js/useImageField-871ba8c6.js","packs/js/header-picker-eba39776.js","packs/js/photo-plus-14444f2c.js"])}function EditEmail(){return __vitePreload(()=>import("./js/index-8c1d8805.js"),["packs/js/index-8c1d8805.js","packs/js/es.promise.finally-9155a4db.js"])}function EmailConfirmation(){return __vitePreload(()=>import("./js/index-dd438a69.js"),[])}function EditPassword(){return __vitePreload(()=>import("./js/index-acec8e9a.js"),["packs/js/index-acec8e9a.js","packs/js/es.promise.finally-9155a4db.js"])}function DeleteAccount(){return __vitePreload(()=>import("./js/index-c7b8e620.js"),["packs/js/index-c7b8e620.js","packs/js/es.promise.finally-9155a4db.js"])}function SoapboxConfig(){return __vitePreload(()=>import("./js/index-6907f734.js"),["packs/js/index-6907f734.js","packs/js/accordion-9597afee.js","packs/js/dots-vertical-68cbc8e2.js","packs/js/file-input-e3eba176.js","packs/js/streamfield-757f31b8.js","packs/js/fork-awesome-icon-170511cf.js","packs/js/object-to-array-a4f09672.js"])}function ExportData(){return __vitePreload(()=>import("./js/index-0de3a47b.js"),[])}function ImportData(){return __vitePreload(()=>import("./js/index-9bd9b506.js"),["packs/js/index-9bd9b506.js","packs/js/file-input-e3eba176.js"])}function Backups(){return __vitePreload(()=>import("./js/index-3e0b735e.js"),["packs/js/index-3e0b735e.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js"])}function MfaForm(){return __vitePreload(()=>import("./js/mfa-form-055b9d1a.js"),["packs/js/mfa-form-055b9d1a.js","packs/js/es.promise.finally-9155a4db.js"])}function ChatIndex(){return __vitePreload(()=>import("./js/index-899a85e6.js"),["packs/js/index-899a85e6.js","packs/js/chat-search-input-88ce0ef4.js","packs/js/es.array.splice-d733542e.js","packs/js/index-75eb026b.js","packs/js/mood-smile-6a052395.js","packs/js/lodash-787b41ad.js","packs/js/useDebounce-0d4ed135.js","packs/js/pull-to-refresh-b8beecbe.js","packs/js/accounts-1cafdbcf.js"])}function ChatWidget(){return __vitePreload(()=>import("./js/chat-widget-c0fe4d5a.js"),["packs/js/chat-widget-c0fe4d5a.js","packs/js/useDebounce-0d4ed135.js","packs/js/chat-search-input-88ce0ef4.js","packs/js/es.array.splice-d733542e.js","packs/js/index-75eb026b.js","packs/js/mood-smile-6a052395.js","packs/js/lodash-787b41ad.js","packs/js/pull-to-refresh-b8beecbe.js"])}function ServerInfo(){return __vitePreload(()=>import("./js/index-d5bf05ba.js"),["packs/js/index-d5bf05ba.js","packs/js/promo-panel-c3b530d1.js","packs/js/fork-awesome-icon-170511cf.js","packs/js/widget-2ac720e4.js","packs/js/arrow-right-b75290c7.js"])}function Dashboard(){return __vitePreload(()=>import("./js/index-f32c46c0.js"),["packs/js/index-f32c46c0.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/authorize-reject-buttons-f28a0539.js","packs/js/download-ac53125a.js","packs/js/download-2e3dfb39.js","packs/js/dots-vertical-68cbc8e2.js","packs/js/accordion-9597afee.js"])}function ModerationLog(){return __vitePreload(()=>import("./js/moderation-log-06409133.js"),["packs/js/moderation-log-06409133.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js"])}function ThemeEditor(){return __vitePreload(()=>import("./js/index-4be17463.js"),["packs/js/index-4be17463.js","packs/js/download-ac53125a.js","packs/js/download-2e3dfb39.js","packs/js/object-to-array-a4f09672.js"])}function UserPanel(){return __vitePreload(()=>import("./js/user-panel-76f12776.js"),[])}function PromoPanel(){return __vitePreload(()=>import("./js/promo-panel-c3b530d1.js"),["packs/js/promo-panel-c3b530d1.js","packs/js/fork-awesome-icon-170511cf.js","packs/js/widget-2ac720e4.js","packs/js/arrow-right-b75290c7.js"])}function SignUpPanel(){return __vitePreload(()=>import("./js/sign-up-panel-7566c684.js"),[])}function CtaBanner(){return __vitePreload(()=>import("./js/cta-banner-c29bb4cb.js"),[])}function FundingPanel(){return __vitePreload(()=>import("./js/funding-panel-905e05e2.js"),["packs/js/funding-panel-905e05e2.js","packs/js/object-assign-7ac9a0a3.js","packs/js/widget-2ac720e4.js","packs/js/arrow-right-b75290c7.js"])}function TrendsPanel(){return __vitePreload(()=>import("./js/trends-panel-7e8ff0ce.js"),["packs/js/trends-panel-7e8ff0ce.js","packs/js/hashtag-1d2f7520.js","packs/js/widget-2ac720e4.js","packs/js/arrow-right-b75290c7.js"])}function ProfileInfoPanel(){return __vitePreload(()=>import("./js/profile-info-panel-9fddd91a.js"),["packs/js/profile-info-panel-9fddd91a.js","packs/js/balloon-551f6642.js","packs/js/web.url.constructor-8f9eaf9c.js","packs/js/object-assign-7ac9a0a3.js","packs/js/usePatronUser-de20e9c0.js","packs/js/profile-field-200e6fc1.js","packs/js/profile-stats-adc53a08.js"])}function ProfileMediaPanel(){return __vitePreload(()=>import("./js/profile-media-panel-2b1eb0c9.js"),["packs/js/profile-media-panel-2b1eb0c9.js","packs/js/widget-2ac720e4.js","packs/js/arrow-right-b75290c7.js","packs/js/media-item-9b67131c.js","packs/js/volume-08f8a8f1.js","packs/js/es.array.last-index-of-ca8fdd84.js"])}function ProfileFieldsPanel(){return __vitePreload(()=>import("./js/profile-fields-panel-f2d1726d.js"),["packs/js/profile-fields-panel-f2d1726d.js","packs/js/widget-2ac720e4.js","packs/js/arrow-right-b75290c7.js","packs/js/profile-field-200e6fc1.js"])}function PinnedAccountsPanel(){return __vitePreload(()=>import("./js/pinned-accounts-panel-67ec6a97.js"),["packs/js/pinned-accounts-panel-67ec6a97.js","packs/js/widget-2ac720e4.js","packs/js/arrow-right-b75290c7.js"])}function InstanceInfoPanel(){return __vitePreload(()=>import("./js/instance-info-panel-52087a4c.js"),["packs/js/instance-info-panel-52087a4c.js","packs/js/widget-2ac720e4.js","packs/js/arrow-right-b75290c7.js"])}function InstanceModerationPanel(){return __vitePreload(()=>import("./js/instance-moderation-panel-94f25c40.js"),["packs/js/instance-moderation-panel-94f25c40.js","packs/js/dots-vertical-68cbc8e2.js","packs/js/widget-2ac720e4.js","packs/js/arrow-right-b75290c7.js","packs/js/instance-restrictions-85d3f8a1.js"])}function LatestAccountsPanel(){return __vitePreload(()=>import("./js/latest-accounts-panel-fe48dc2e.js"),["packs/js/latest-accounts-panel-fe48dc2e.js","packs/js/widget-2ac720e4.js","packs/js/arrow-right-b75290c7.js"])}function SidebarMenu(){return __vitePreload(()=>import("./js/sidebar-menu-598bffb6.js"),["packs/js/sidebar-menu-598bffb6.js","packs/js/hash-746ab8b6.js","packs/js/profile-stats-adc53a08.js"])}function ModalContainer(){return __vitePreload(()=>import("./js/modal-container-bd39a3de.js"),["packs/js/modal-container-bd39a3de.js","packs/js/modal-root-dfddfde1.js"])}function ProfileHoverCard(){return __vitePreload(()=>import("./js/profile-hover-card-6034bfe5.js"),["packs/js/profile-hover-card-6034bfe5.js","packs/js/usePopper-24b8ee92.js","packs/js/usePatronUser-de20e9c0.js"])}function StatusHoverCard(){return __vitePreload(()=>import("./js/status-hover-card-612ae817.js"),["packs/js/status-hover-card-612ae817.js","packs/js/usePopper-24b8ee92.js","packs/js/status-container-59e57baf.js"])}function ScheduledStatuses(){return __vitePreload(()=>import("./js/index-a0951cf4.js"),["packs/js/index-a0951cf4.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/poll-preview-66340c9e.js","packs/js/noop-19c18e1e.js"])}function UserIndex(){return __vitePreload(()=>import("./js/user-index-b6d304df.js"),["packs/js/user-index-b6d304df.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js"])}function FederationRestrictions(){return __vitePreload(()=>import("./js/index-7b6c023e.js"),["packs/js/index-7b6c023e.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/accordion-9597afee.js","packs/js/dots-vertical-68cbc8e2.js","packs/js/instance-restrictions-85d3f8a1.js"])}function Aliases(){return __vitePreload(()=>import("./js/index-23ba0bda.js"),["packs/js/index-23ba0bda.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/backspace-c284aa0a.js"])}function Migration(){return __vitePreload(()=>import("./js/index-88311901.js"),[])}function ScheduleForm(){return __vitePreload(()=>import("./js/schedule-form-ae47b3a7.js"),[])}function WhoToFollowPanel(){return __vitePreload(()=>import("./js/who-to-follow-panel-ba5370e1.js"),["packs/js/who-to-follow-panel-ba5370e1.js","packs/js/widget-2ac720e4.js","packs/js/arrow-right-b75290c7.js","packs/js/suggestions-c5444903.js"])}function FollowRecommendations(){return __vitePreload(()=>import("./js/index-3321aada.js"),["packs/js/index-3321aada.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js"])}function Directory(){return __vitePreload(()=>import("./js/index-d07463ea.js"),["packs/js/index-d07463ea.js","packs/js/load-more-b53b8d88.js"])}function Share(){return __vitePreload(()=>import("./js/index-5fa99826.js"),[])}function NewStatus(){return __vitePreload(()=>import("./js/index-45f57580.js"),[])}function IntentionalError(){return __vitePreload(()=>import("./js/index-71d24d87.js"),[])}function Developers(){return __vitePreload(()=>import("./js/index-5c8fa37d.js"),[])}function CreateApp(){return __vitePreload(()=>import("./js/create-aa354598.js"),[])}function SettingsStore(){return __vitePreload(()=>import("./js/settings-store-ebcfb308.js"),[])}function TestTimeline(){return __vitePreload(()=>import("./js/index-625bf5da.js"),["packs/js/index-625bf5da.js","packs/js/timeline-585cfcf0.js","packs/js/scroll-top-button-95820d24.js","packs/js/status-list-13fdd81b.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/status-container-59e57baf.js","packs/js/pending-status-7f660229.js","packs/js/poll-preview-66340c9e.js","packs/js/noop-19c18e1e.js"])}function ServiceWorkerInfo(){return __vitePreload(()=>import("./js/service-worker-info-8e511663.js"),[])}function DatePicker(){return __vitePreload(()=>import("./js/date-picker-d2d1ed31.js"),["packs/js/date-picker-d2d1ed31.js","packs/js/usePopper-24b8ee92.js","packs/js/warning-07d0fac9.js"])}function OnboardingWizard(){return __vitePreload(()=>import("./js/onboarding-wizard-f9b75a48.js"),["packs/js/onboarding-wizard-f9b75a48.js","packs/js/index-571dd45e.js","packs/js/warning-07d0fac9.js","packs/js/web.url.constructor-8f9eaf9c.js","packs/js/object-assign-7ac9a0a3.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/suggestions-c5444903.js"])}function WaitlistPage(){return __vitePreload(()=>import("./js/waitlist-page-2cc03b24.js"),[])}function CompareHistoryModal(){return __vitePreload(()=>import("./js/compare-history-modal-c59be2bc.js"),[])}function AuthTokenList(){return __vitePreload(()=>import("./js/index-8bd82675.js"),[])}function VerifySmsModal(){return __vitePreload(()=>import("./js/verify-sms-modal-de5c58f2.js"),["packs/js/verify-sms-modal-de5c58f2.js","packs/js/es.promise.finally-9155a4db.js"])}function FamiliarFollowersModal(){return __vitePreload(()=>import("./js/familiar-followers-modal-0c091b6c.js"),["packs/js/familiar-followers-modal-0c091b6c.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js"])}function AnnouncementsPanel(){return __vitePreload(()=>import("./js/announcements-panel-452327e5.js"),["packs/js/announcements-panel-452327e5.js","packs/js/index-571dd45e.js","packs/js/warning-07d0fac9.js","packs/js/widget-2ac720e4.js","packs/js/arrow-right-b75290c7.js"])}function Quotes(){return __vitePreload(()=>import("./js/index-49cb607b.js"),["packs/js/index-49cb607b.js","packs/js/lodash-787b41ad.js","packs/js/status-list-13fdd81b.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/status-container-59e57baf.js","packs/js/pending-status-7f660229.js","packs/js/poll-preview-66340c9e.js","packs/js/noop-19c18e1e.js"])}function ComposeEventModal(){return __vitePreload(()=>import("./js/compose-event-modal-35589ff5.js"),["packs/js/compose-event-modal-35589ff5.js","packs/js/backspace-c284aa0a.js","packs/js/modal-root-dfddfde1.js","packs/js/schedule-form-ae47b3a7.js","packs/js/photo-plus-14444f2c.js"])}function JoinEventModal(){return __vitePreload(()=>import("./js/join-event-modal-088ec15c.js"),[])}function EventHeader(){return __vitePreload(()=>import("./js/event-header-163e2ab5.js"),["packs/js/event-header-163e2ab5.js","packs/js/download-2e3dfb39.js"])}function EventInformation(){return __vitePreload(()=>import("./js/event-information-31e23e20.js"),[])}function EventDiscussion(){return __vitePreload(()=>import("./js/event-discussion-882e912d.js"),["packs/js/event-discussion-882e912d.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/pending-status-7f660229.js","packs/js/poll-preview-66340c9e.js","packs/js/noop-19c18e1e.js","packs/js/thread-b9635854.js","packs/js/status-container-59e57baf.js"])}function EventMapModal(){return __vitePreload(()=>import("./js/event-map-modal-ae05b221.js"),["packs/js/event-map-modal-ae05b221.js","packs/assets/event-map-modal-8c7ef4a9.css"])}function EventParticipantsModal(){return __vitePreload(()=>import("./js/event-participants-modal-6e79025e.js"),["packs/js/event-participants-modal-6e79025e.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js"])}function Events(){return __vitePreload(()=>import("./js/index-5bcfa526.js"),["packs/js/index-5bcfa526.js","packs/js/index-571dd45e.js","packs/js/warning-07d0fac9.js"])}function Groups(){return __vitePreload(()=>import("./js/index-e384b39c.js"),["packs/js/index-e384b39c.js","packs/js/useDebounce-0d4ed135.js","packs/js/group-card-c9aa3023.js","packs/js/group-header-image-e076498c.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/permissions-2149f5e2.js","packs/js/placeholder-group-card-d679cbe1.js","packs/js/pending-items-row-3c568fd1.js","packs/js/tab-bar-b3f08956.js"])}function GroupsDiscover(){return __vitePreload(()=>import("./js/discover-9143ae25.js"),["packs/js/discover-9143ae25.js","packs/js/usePopularGroups-953a6f15.js","packs/js/layout-list-fe4f62ad.js","packs/js/group-header-image-e076498c.js","packs/js/tag-list-item-16aa64ec.js","packs/js/useDebounce-0d4ed135.js","packs/js/placeholder-group-search-5e3066d6.js","packs/js/index-75eb026b.js","packs/js/group-list-item-c21d0638.js","packs/js/layout-buttons-5e2bb51b.js","packs/js/useSuggestedGroups-ad7e5c64.js","packs/js/tab-bar-b3f08956.js"])}function GroupsPopular(){return __vitePreload(()=>import("./js/popular-663f5bb0.js"),["packs/js/popular-663f5bb0.js","packs/js/index-75eb026b.js","packs/js/usePopularGroups-953a6f15.js","packs/js/layout-list-fe4f62ad.js","packs/js/group-header-image-e076498c.js","packs/js/group-list-item-c21d0638.js","packs/js/layout-buttons-5e2bb51b.js"])}function GroupsSuggested(){return __vitePreload(()=>import("./js/suggested-196479cb.js"),["packs/js/suggested-196479cb.js","packs/js/index-75eb026b.js","packs/js/useSuggestedGroups-ad7e5c64.js","packs/js/layout-list-fe4f62ad.js","packs/js/group-header-image-e076498c.js","packs/js/group-list-item-c21d0638.js","packs/js/layout-buttons-5e2bb51b.js"])}function GroupsTag(){return __vitePreload(()=>import("./js/tag-708fa6df.js"),["packs/js/tag-708fa6df.js","packs/js/layout-list-fe4f62ad.js","packs/js/group-header-image-e076498c.js","packs/js/index-75eb026b.js","packs/js/useGroupTag-49646e08.js","packs/js/group-list-item-c21d0638.js"])}function GroupsTags(){return __vitePreload(()=>import("./js/tags-8516eaa3.js"),["packs/js/tags-8516eaa3.js","packs/js/index-75eb026b.js","packs/js/tag-list-item-16aa64ec.js"])}function PendingGroupRequests(){return __vitePreload(()=>import("./js/pending-requests-b08ce6bc.js"),["packs/js/pending-requests-b08ce6bc.js","packs/js/group-card-c9aa3023.js","packs/js/group-header-image-e076498c.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/placeholder-group-card-d679cbe1.js"])}function GroupMembers(){return __vitePreload(()=>import("./js/group-members-8d014300.js"),["packs/js/group-members-8d014300.js","packs/js/useGroupMembers-d353ac79.js","packs/js/pending-items-row-3c568fd1.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/placeholder-account-a1add042.js"])}function GroupTags(){return __vitePreload(()=>import("./js/group-tags-537025c4.js"),["packs/js/group-tags-537025c4.js","packs/js/hash-746ab8b6.js","packs/js/useGroupTags-604f28f5.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/placeholder-account-a1add042.js"])}function GroupTagTimeline(){return __vitePreload(()=>import("./js/group-tag-timeline-60da9f6d.js"),["packs/js/group-tag-timeline-60da9f6d.js","packs/js/message-2-2f21ce66.js","packs/js/useGroupTag-49646e08.js","packs/js/timeline-585cfcf0.js","packs/js/scroll-top-button-95820d24.js","packs/js/status-list-13fdd81b.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/status-container-59e57baf.js","packs/js/pending-status-7f660229.js","packs/js/poll-preview-66340c9e.js","packs/js/noop-19c18e1e.js"])}function GroupTimeline(){return __vitePreload(()=>import("./js/group-timeline-e28dc6fd.js"),["packs/js/group-timeline-e28dc6fd.js","packs/js/message-2-2f21ce66.js","packs/js/timeline-585cfcf0.js","packs/js/scroll-top-button-95820d24.js","packs/js/status-list-13fdd81b.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/status-container-59e57baf.js","packs/js/pending-status-7f660229.js","packs/js/poll-preview-66340c9e.js","packs/js/noop-19c18e1e.js"])}function ManageGroup(){return __vitePreload(()=>import("./js/manage-group-46c1b3b3.js"),[])}function EditGroup(){return __vitePreload(()=>import("./js/edit-group-72b712f0.js"),["packs/js/edit-group-72b712f0.js","packs/js/es.array.splice-d733542e.js","packs/js/useGroupTags-604f28f5.js","packs/js/useImageField-871ba8c6.js","packs/js/header-picker-eba39776.js","packs/js/photo-plus-14444f2c.js","packs/js/group-tags-field-90f3aeb2.js","packs/js/streamfield-757f31b8.js"])}function GroupBlockedMembers(){return __vitePreload(()=>import("./js/group-blocked-members-35abae37.js"),["packs/js/group-blocked-members-35abae37.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js"])}function GroupMembershipRequests(){return __vitePreload(()=>import("./js/group-membership-requests-608c55f0.js"),["packs/js/group-membership-requests-608c55f0.js","packs/js/useGroupMembers-d353ac79.js","packs/js/authorize-reject-buttons-f28a0539.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js"])}function GroupGallery(){return __vitePreload(()=>import("./js/group-gallery-643efd4a.js"),["packs/js/group-gallery-643efd4a.js","packs/js/load-more-b53b8d88.js","packs/js/media-item-9b67131c.js","packs/js/volume-08f8a8f1.js","packs/js/es.array.last-index-of-ca8fdd84.js"])}function CreateGroupModal(){return __vitePreload(()=>import("./js/create-group-modal-4a948c40.js"),["packs/js/create-group-modal-4a948c40.js","packs/js/useDebounce-0d4ed135.js","packs/js/es.array.splice-d733542e.js","packs/js/header-picker-eba39776.js","packs/js/photo-plus-14444f2c.js","packs/js/group-tags-field-90f3aeb2.js","packs/js/streamfield-757f31b8.js"])}function NewGroupPanel(){return __vitePreload(()=>import("./js/new-group-panel-d8f75bf3.js"),["packs/js/new-group-panel-d8f75bf3.js","packs/js/permissions-2149f5e2.js"])}function MyGroupsPanel(){return __vitePreload(()=>import("./js/my-groups-panel-cc88785b.js"),["packs/js/my-groups-panel-cc88785b.js","packs/js/widget-2ac720e4.js","packs/js/arrow-right-b75290c7.js","packs/js/group-list-item-c21d0638.js","packs/js/placeholder-group-search-5e3066d6.js"])}function SuggestedGroupsPanel(){return __vitePreload(()=>import("./js/suggested-groups-panel-465564b3.js"),["packs/js/suggested-groups-panel-465564b3.js","packs/js/useSuggestedGroups-ad7e5c64.js","packs/js/widget-2ac720e4.js","packs/js/arrow-right-b75290c7.js","packs/js/group-list-item-c21d0638.js","packs/js/placeholder-group-search-5e3066d6.js"])}function GroupMediaPanel(){return __vitePreload(()=>import("./js/group-media-panel-e0279183.js"),["packs/js/group-media-panel-e0279183.js","packs/js/widget-2ac720e4.js","packs/js/arrow-right-b75290c7.js","packs/js/media-item-9b67131c.js","packs/js/volume-08f8a8f1.js","packs/js/es.array.last-index-of-ca8fdd84.js"])}function NewEventPanel(){return __vitePreload(()=>import("./js/new-event-panel-29372c07.js"),[])}function Announcements(){return __vitePreload(()=>import("./js/announcements-d5697a45.js"),["packs/js/announcements-d5697a45.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js"])}function EditAnnouncementModal(){return __vitePreload(()=>import("./js/edit-announcement-modal-5d4f1578.js"),[])}function FollowedTags(){return __vitePreload(()=>import("./js/index-ba3389ca.js"),["packs/js/index-ba3389ca.js","packs/js/hashtag-1d2f7520.js","packs/js/scrollable-list-df58e451.js","packs/js/index-75eb026b.js","packs/js/load-more-b53b8d88.js","packs/js/placeholder-hashtag-f832d585.js"])}function EmojiPickerModal(){return __vitePreload(()=>import("./js/emoji-picker-modal-3d0b0818.js"),[])}var EmojiPicker,messages$16={emoji:{id:"emoji_button.label",defaultMessage:"Insert emoji"},emoji_pick:{id:"emoji_button.pick",defaultMessage:"Pick an emoji…"},emoji_oh_no:{id:"emoji_button.oh_no",defaultMessage:"Oh no!"},emoji_search:{id:"emoji_button.search",defaultMessage:"Search…"},emoji_not_found:{id:"emoji_button.not_found",defaultMessage:"No emoji's found."},emoji_add_custom:{id:"emoji_button.add_custom",defaultMessage:"Add custom emoji"},recent:{id:"emoji_button.recent",defaultMessage:"Frequently used"},search_results:{id:"emoji_button.search_results",defaultMessage:"Search results"},people:{id:"emoji_button.people",defaultMessage:"People"},nature:{id:"emoji_button.nature",defaultMessage:"Nature"},food:{id:"emoji_button.food",defaultMessage:"Food & Drink"},activity:{id:"emoji_button.activity",defaultMessage:"Activity"},travel:{id:"emoji_button.travel",defaultMessage:"Travel & Places"},objects:{id:"emoji_button.objects",defaultMessage:"Objects"},symbols:{id:"emoji_button.symbols",defaultMessage:"Symbols"},flags:{id:"emoji_button.flags",defaultMessage:"Flags"},skins_choose:{id:"emoji_button.skins_choose",defaultMessage:"Choose default skin tone"},skins_1:{id:"emoji_button.skins_1",defaultMessage:"Default"},skins_2:{id:"emoji_button.skins_2",defaultMessage:"Light"},skins_3:{id:"emoji_button.skins_3",defaultMessage:"Medium-Light"},skins_4:{id:"emoji_button.skins_4",defaultMessage:"Medium"},skins_5:{id:"emoji_button.skins_5",defaultMessage:"Medium-Dark"},skins_6:{id:"emoji_button.skins_6",defaultMessage:"Dark"}},perLine=8,lines=2,DEFAULTS=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","yum","disappointed","thinking_face","weary","sob","sunglasses","heart","ok_hand"],getFrequentlyUsedEmojis=createSelector([function(_e){return _e.settings.get("frequentlyUsedEmojis",Map$3())}],function(_e){var et=_e.keySeq().sort(function(nt,rt){return _e.get(nt)-_e.get(rt)}).reverse().slice(0,perLine*lines).toArray();if(et.lengthrt?1:0})}),RenderAfter=function _e(et){var tt=et.children,nt=et.update,rt=reactExports.useState(!1),at=_slicedToArray$4(rt,2),it=at[0],ot=at[1];return reactExports.useEffect(function(){setTimeout(function(){ot(!0)},0)},[]),reactExports.useLayoutEffect(function(){it&&nt()},[it,nt]),it?tt:null},EmojiPickerDropdown=function _e(et){var tt=et.onPickEmoji,nt=et.visible,rt=et.setVisible,at=et.update,it=et.withCustom,ot=it===void 0?!0:it,st=et.dynamicWidth,ct=st===void 0?!1:st,ut=et.emojiSize,dt=ut===void 0?{size:22,buttonSize:34}:ut,ft=useIntl(),pt=useAppDispatch(),mt=useSettings(),ht=ft.formatMessage(messages$16.emoji),Et=mt.get("themeMode"),yt=Et==="dark"||Et==="light"?Et:"auto",vt=useAppSelector(function(kt){return getCustomEmojis(kt)}),gt=useAppSelector(function(kt){return getFrequentlyUsedEmojis(kt)}),St=reactExports.useState(!1),Rt=_slicedToArray$4(St,2),$t=Rt[0],bt=Rt[1],wt=function(Pt){rt(!1);var Ft;Pt.native?Ft={id:Pt.id,colons:Pt.shortcodes,custom:!1,native:Pt.native,unified:Pt.unified}:Ft={id:Pt.id,colons:Pt.shortcodes,custom:!0,imageUrl:Pt.src},pt(useEmoji(Ft)),tt&&tt(Ft)},xt=function(Pt){pt(changeSetting(["skinTone"],Pt))},Tt=function(){return{search:ft.formatMessage(messages$16.emoji_search),pick:ft.formatMessage(messages$16.emoji_pick),search_no_results_1:ft.formatMessage(messages$16.emoji_oh_no),search_no_results_2:ft.formatMessage(messages$16.emoji_not_found),add_custom:ft.formatMessage(messages$16.emoji_add_custom),categories:{search:ft.formatMessage(messages$16.search_results),frequent:ft.formatMessage(messages$16.recent),people:ft.formatMessage(messages$16.people),nature:ft.formatMessage(messages$16.nature),foods:ft.formatMessage(messages$16.food),activity:ft.formatMessage(messages$16.activity),places:ft.formatMessage(messages$16.travel),objects:ft.formatMessage(messages$16.objects),symbols:ft.formatMessage(messages$16.symbols),flags:ft.formatMessage(messages$16.flags)},skins:{choose:ft.formatMessage(messages$16.skins_choose),1:ft.formatMessage(messages$16.skins_1),2:ft.formatMessage(messages$16.skins_2),3:ft.formatMessage(messages$16.skins_3),4:ft.formatMessage(messages$16.skins_4),5:ft.formatMessage(messages$16.skins_5),6:ft.formatMessage(messages$16.skins_6)}}};reactExports.useEffect(function(){nt?document.body.style.overflow="hidden":document.body.style.overflow="",EmojiPicker||(bt(!0),EmojiPicker$1().then(function(kt){EmojiPicker=kt.Picker,bt(!1)}).catch(function(){bt(!1)}))},[nt]),reactExports.useEffect(function(){return function(){document.body.style.overflow=""}},[]);var Ct;ot&&(Ct=buildCustomEmojiPack(vt));var Nt=Ct?Object.keys(Ct):[],At=["frequent"].concat(_toConsumableArray(Nt),["people","nature","foods","activity","places","objects","symbols","flags"]);return nt?_createRawReactElement(RenderAfter,{update:at},void 0,!$t&&_createRawReactElement(EmojiPicker,{custom:Nt.map(function(kt){var Pt;return((Pt=Ct)!==null&&Pt!==void 0?Pt:{})[kt]}),categories:At,title:ht,onEmojiSelect:wt,recent:gt,perLine:8,skin:xt,emojiSize:dt.size,emojiButtonSize:dt.buttonSize,set:"twitter",theme:yt,i18n:Tt(),skinTonePosition:"search",previewPosition:"none",dynamicWidth:ct})):null},EmojiButton=function _e(et){var tt=et.emoji,nt=et.className,rt=et.onClick,at=et.tabIndex,it=function(st){st.preventDefault(),st.stopPropagation(),rt(tt)};return _createRawReactElement("button",{className:clsx(nt),onClick:it,tabIndex:at},void 0,_createRawReactElement(Emoji,{className:"h-6 w-6 duration-100 hover:scale-110",emoji:tt}))},EmojiSelector=function _e(et){var tt=et.referenceElement,nt=et.onClose,rt=et.onReact,at=et.placement,it=at===void 0?"top":at,ot=et.visible,st=ot===void 0?!1:ot,ct=et.offsetOptions,ut=et.all,dt=ut===void 0?!0:ut,ft=useAppDispatch(),pt=useSoapboxConfig(),mt=useFeatures(),ht=mt.customEmojiReacts,Et=reactExports.useState(!1),yt=_slicedToArray$4(Et,2),vt=yt[0],gt=yt[1],St=isUserTouching(),Rt=useFloating({placement:it,transform:!1,middleware:[offset$1(ct),flip({fallbackPlacements:["right","left","bottom"]}),shift$1({crossAxis:!0})]}),$t=Rt.x,bt=Rt.y,wt=Rt.strategy,xt=Rt.refs,Tt=Rt.update,Ct=function(){St?(ft(openModal("EMOJI_PICKER",{onPickEmoji:Nt})),nt&&nt()):gt(!0)},Nt=function(kt){rt(kt.custom?kt.id:kt.native,kt.custom?kt.imageUrl:void 0)};return reactExports.useEffect(function(){xt.setReference(tt)},[tt]),reactExports.useEffect(function(){return function(){document.body.style.overflow=""}},[]),reactExports.useEffect(function(){gt(!1)},[st]),useClickOutside(xt,function(){nt&&nt()}),React$3.createElement("div",{className:clsx("z-[101] transition-opacity duration-100",{"opacity-0 pointer-events-none":!st}),ref:xt.setFloating,style:{position:wt,top:bt??0,left:$t??0,width:"max-content"}},vt?_createRawReactElement(EmojiPickerDropdown,{visible:vt,setVisible:gt,update:Tt,withCustom:ht,onPickEmoji:Nt}):_createRawReactElement(HStack,{className:clsx("z-[999] flex w-max max-w-[100vw] flex-wrap space-x-3 rounded-full bg-white px-3 py-2.5 shadow-lg focus:outline-none dark:bg-gray-900 dark:ring-2 dark:ring-primary-700")},void 0,Array.from(pt.allowedEmoji).map(function(At,kt){return _createRawReactElement(EmojiButton,{emoji:At,onClick:rt,tabIndex:st?0:-1},kt)}),dt&&_createRawReactElement(IconButton$1,{className:"text-gray-600 hover:text-gray-600 dark:hover:text-white",src:vitePluginRequire_1697861810836_81866597,onClick:Ct})))},_excluded$j=["onSubmit","children"],Form=function _e(et){var tt=et.onSubmit,nt=et.children,rt=_objectWithoutProperties(et,_excluded$j),at=React$3.useCallback(function(it){it.preventDefault(),tt&&tt(it)},[tt]);return React$3.createElement("form",_extends$4({"data-testid":"form",onSubmit:at,className:"space-y-4"},rt),nt)},FormActions=function _e(et){var tt=et.children;return _createRawReactElement(HStack,{space:2,justifyContent:"end"},void 0,tt)},FormGroup=function _e(et){var tt,nt=et.children,rt=et.errors,at=rt===void 0?[]:rt,it=et.labelText,ot=et.labelTitle,st=et.hintText,ct=reactExports.useMemo(function(){return"field-".concat(v4())},[]),ut=React$3.Children.toArray(nt),dt=(at==null?void 0:at.length)>0,ft;React$3.isValidElement(ut[0])&&(ft=React$3.cloneElement(ut[0],{id:ct}));var pt=((tt=ft)===null||tt===void 0?void 0:tt.type)===Checkbox;return pt?_createRawReactElement(HStack,{alignItems:"start",space:2},void 0,ft,_createRawReactElement(Stack,{},void 0,it&&_createRawReactElement("label",{htmlFor:ct,"data-testid":"form-group-label",className:"-mt-0.5 block text-sm font-medium text-gray-900 dark:text-gray-100",title:ot},void 0,it),dt&&_createRawReactElement("div",{},void 0,_createRawReactElement("p",{"data-testid":"form-group-error",className:"form-error relative mt-0.5 inline-block rounded-md bg-danger-200 px-2 py-1 text-xs text-danger-900"},void 0,at.join(", "))),st&&_createRawReactElement("p",{"data-testid":"form-group-hint",className:"mt-0.5 text-xs text-gray-700 dark:text-gray-600"},void 0,st))):_createRawReactElement("div",{},void 0,it&&_createRawReactElement("label",{htmlFor:ct,"data-testid":"form-group-label",className:"block text-sm font-medium text-gray-900 dark:text-gray-100",title:ot},void 0,it),_createRawReactElement("div",{className:"mt-1 dark:text-white"},void 0,st&&_createRawReactElement("p",{"data-testid":"form-group-hint",className:"mb-0.5 text-xs text-gray-700 dark:text-gray-600"},void 0,st),ft,ut.filter(function(mt,ht){return ht!==0}),dt&&_createRawReactElement("p",{"data-testid":"form-group-error",className:"form-error relative mt-0.5 inline-block rounded-md bg-danger-200 px-2 py-1 text-xs text-danger-900"},void 0,at.join(", "))))},_excluded$i=["src","className","iconClassName","text","theme"],IconButton$1=React$3.forwardRef(function(_e,et){var tt=_e.src,nt=_e.className,rt=_e.iconClassName,at=_e.text,it=_e.theme,ot=it===void 0?"seamless":it,st=_objectWithoutProperties(_e,_excluded$i);return React$3.createElement("button",_extends$4({ref:et,type:"button",className:clsx("flex items-center space-x-2 rounded-full p-1 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:ring-offset-0",{"bg-white dark:bg-transparent":ot==="seamless","border border-solid bg-transparent border-gray-400 dark:border-gray-800 hover:border-primary-300 dark:hover:border-primary-700 focus:border-primary-500 text-gray-900 dark:text-gray-100 focus:ring-primary-500":ot==="outlined","border-transparent bg-primary-100 dark:bg-primary-800 hover:bg-primary-50 dark:hover:bg-primary-700 focus:bg-primary-100 dark:focus:bg-primary-800 text-primary-500 dark:text-primary-200":ot==="secondary","bg-gray-900 text-white":ot==="dark","opacity-50":st.disabled},nt)},st,{"data-testid":st["data-testid"]||"icon-button"}),_createRawReactElement(SvgIcon,{src:tt,className:rt}),at?_createRawReactElement(Text$2,{tag:"span",theme:"inherit",size:"sm"},void 0,at):null)});const vitePluginRequire_1697861828084_10716620="/packs/assets/eye-e16766ce.svg",vitePluginRequire_1697861828084_81550747="/packs/assets/eye-off-3304e20e.svg";var $$f=_export,fails$a=fails$F,toIndexedObject$2=toIndexedObject$a,nativeGetOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,DESCRIPTORS$8=descriptors$1,FORCED$3=!DESCRIPTORS$8||fails$a(function(){nativeGetOwnPropertyDescriptor(1)});$$f({target:"Object",stat:!0,forced:FORCED$3,sham:!DESCRIPTORS$8},{getOwnPropertyDescriptor:function _e(et,tt){return nativeGetOwnPropertyDescriptor(toIndexedObject$2(et),tt)}});var domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},documentCreateElement=documentCreateElement$2,classList=documentCreateElement("span").classList,DOMTokenListPrototype$2=classList&&classList.constructor&&classList.constructor.prototype,domTokenListPrototype=DOMTokenListPrototype$2===Object.prototype?void 0:DOMTokenListPrototype$2,$forEach=arrayIteration.forEach,arrayMethodIsStrict$1=arrayMethodIsStrict$4,STRICT_METHOD=arrayMethodIsStrict$1("forEach"),arrayForEach=STRICT_METHOD?[].forEach:function _e(et){return $forEach(this,et,arguments.length>1?arguments[1]:void 0)},global$6=global$w,DOMIterables$1=domIterables,DOMTokenListPrototype$1=domTokenListPrototype,forEach=arrayForEach,createNonEnumerableProperty$4=createNonEnumerableProperty$a,handlePrototype$1=function(_e){if(_e&&_e.forEach!==forEach)try{createNonEnumerableProperty$4(_e,"forEach",forEach)}catch{_e.forEach=forEach}};for(var COLLECTION_NAME$1 in DOMIterables$1)DOMIterables$1[COLLECTION_NAME$1]&&handlePrototype$1(global$6[COLLECTION_NAME$1]&&global$6[COLLECTION_NAME$1].prototype);handlePrototype$1(DOMTokenListPrototype$1);var $$e=_export,DESCRIPTORS$7=descriptors$1,ownKeys$i=ownKeys$l,toIndexedObject$1=toIndexedObject$a,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,createProperty$1=createProperty$6;$$e({target:"Object",stat:!0,sham:!DESCRIPTORS$7},{getOwnPropertyDescriptors:function _e(et){for(var tt=toIndexedObject$1(et),nt=getOwnPropertyDescriptorModule.f,rt=ownKeys$i(tt),at={},it=0,ot,st;rt.length>it;)st=nt(tt,ot=rt[it++]),st!==void 0&&createProperty$1(at,ot,st);return at}});var $$d=_export,DESCRIPTORS$6=descriptors$1,defineProperties=objectDefineProperties.f;$$d({target:"Object",stat:!0,forced:Object.defineProperties!==defineProperties,sham:!DESCRIPTORS$6},{defineProperties});var $$c=_export,DESCRIPTORS$5=descriptors$1,defineProperty$4=objectDefineProperty.f;$$c({target:"Object",stat:!0,forced:Object.defineProperty!==defineProperty$4,sham:!DESCRIPTORS$5},{defineProperty:defineProperty$4});function ownKeys$h(_e,et){var tt=Object.keys(_e);if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(_e);et&&(nt=nt.filter(function(rt){return Object.getOwnPropertyDescriptor(_e,rt).enumerable})),tt.push.apply(tt,nt)}return tt}function _objectSpread$g(_e){for(var et=1;et{let et=_e;for(;et=et.parentElement;){const tt=getComputedStyle(et,null).getPropertyValue("overflow-y");if(et===document.body)return window;if(tt==="auto"||tt==="scroll"||tt==="overlay")return et}return window},isOffsetElement=_e=>_e.firstChild?_e.firstChild.offsetParent===_e:!0,offsetTill=(_e,et)=>{let tt=_e,nt=0;isOffsetElement(et)||(nt+=_e.offsetTop-et.offsetTop,et=_e.offsetParent,nt+=-_e.offsetTop);do nt+=tt.offsetTop,tt=tt.offsetParent;while(tt&&tt!==et);return nt},getParentNode=_e=>{let et=_e.parentElement;for(;et&&getComputedStyle(et,null).getPropertyValue("display")==="contents";)et=et.parentElement;return et||window},stickyProp=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?stickyProp="sticky":CSS.supports("position","-webkit-sticky")&&(stickyProp="-webkit-sticky"));var passiveArg=!1;try{const _e=Object.defineProperty({},"passive",{get(){passiveArg={passive:!0}}}),et=()=>{};window.addEventListener("testPassive",et,_e),window.removeEventListener("testPassive",et,_e)}catch(_e){}var getDimensions=_e=>{const{el:et,onChange:tt,unsubs:nt,measure:rt}=_e;if(et===window){const at=()=>({top:0,left:0,height:window.innerHeight,width:window.innerWidth}),it=rt(at()),ot=()=>{Object.assign(it,rt(at())),tt()};return window.addEventListener("resize",ot,passiveArg),nt.push(()=>window.removeEventListener("resize",ot)),it}else{const at=rt(et.getBoundingClientRect()),it=()=>{Object.assign(at,rt(et.getBoundingClientRect())),tt()},ot=new ResizeObserver(it);return ot.observe(et),nt.push(()=>ot.disconnect()),at}},getVerticalPadding=_e=>{const et=getComputedStyle(_e,null),tt=parseInt(et.getPropertyValue("padding-top"),10),nt=parseInt(et.getPropertyValue("padding-bottom"),10);return{top:tt,bottom:nt}},setup=(_e,et,tt)=>{const{bottom:nt,offsetBottom:rt,offsetTop:at}=tt,it=getScrollParent(_e);let ot=!1;const st=()=>{ot||requestAnimationFrame(()=>{const bt=dt();bt!==gt&&St(bt),ot=!1}),ot=!0};let ct=it===window?window.scrollY:it.scrollTop;const ut=bt=>{const{offsetTop:wt,height:xt}=pt,{naturalTop:Tt}=Et,{height:Ct}=yt;return bt+wt+xt>=Tt+Ct+vt+rt},dt=()=>{const{height:bt}=pt,{height:wt}=yt;return wt+at+rt<=bt?3:ut(ct)?1:2},ft=it!==window&&isOffsetElement(it),pt=getDimensions({el:it,onChange:st,unsubs:et,measure:({height:bt,top:wt})=>({height:bt,offsetTop:ft?wt:0})}),mt=getParentNode(_e),ht=mt===window?{top:0,bottom:0}:getVerticalPadding(mt),Et=getDimensions({el:mt,onChange:st,unsubs:et,measure:({height:bt})=>({height:bt-ht.top-ht.bottom,naturalTop:mt===window?0:offsetTill(mt,it)+ht.top+pt.offsetTop})}),yt=getDimensions({el:_e,onChange:st,unsubs:et,measure:({height:bt})=>({height:bt})});let vt=0,gt=dt();const St=bt=>{const wt=gt;if(gt=bt,wt===2&&(vt=-1),bt===3){_e.style.position=stickyProp,nt?_e.style.bottom=`${rt}px`:_e.style.top=`${at}px`;return}const{height:xt,offsetTop:Tt}=pt,{height:Ct,naturalTop:Nt}=Et,{height:At}=yt;if(bt===2)if(_e.style.position="relative",vt=wt===0?Math.max(0,Tt+ct-Nt+at):Math.max(0,Tt+ct+xt-(Nt+At+rt)),nt){const kt=Math.max(0,Ct-At-vt);_e.style.bottom=`${kt}px`}else _e.style.top=`${vt}px`;else _e.style.position=stickyProp,bt===1?nt?_e.style.bottom=`${rt}px`:_e.style.top=`${xt-At-rt}px`:nt?_e.style.bottom=`${xt-At-rt}px`:_e.style.top=`${at}px`};St(gt);const Rt=bt=>{if(bt===ct)return;const wt=bt-ct;if(ct=bt,gt===3)return;const{offsetTop:xt,height:Tt}=pt,{naturalTop:Ct,height:Nt}=Et,{height:At}=yt;if(wt>0)if(gt===0){if(bt+xt+at>Ct){const kt=Math.max(0,xt+ct-Ct+at);bt+xt+Tt<=Ct+At+kt+rt?St(2):St(1)}}else gt===2&&ut(bt)&&St(1);else if(gt===1){if(xt+bt+Tt=Ct+kt?St(2):St(0)}}else gt===2&&xt+bt+atRt(window.scrollY):()=>Rt(it.scrollTop);it.addEventListener("scroll",$t,passiveArg),it.addEventListener("mousewheel",$t,passiveArg),et.push(()=>it.removeEventListener("scroll",$t),()=>it.removeEventListener("mousewheel",$t))},useStickyBox=({offsetTop:_e=0,offsetBottom:et=0,bottom:tt=!1}={})=>{const[nt,rt]=reactExports.useState(null);return reactExports.useEffect(()=>{if(!nt||!stickyProp)return;const at=[];return setup(nt,at,{offsetBottom:et,offsetTop:_e,bottom:tt}),()=>{at.forEach(it=>it())}},[nt,et,_e,tt]),rt},StickyBox=_e=>{const{offsetTop:et,offsetBottom:tt,bottom:nt,children:rt,className:at,style:it}=_e,ot=useStickyBox({offsetTop:et,offsetBottom:tt,bottom:nt});return jsxRuntimeExports.jsx("div",{className:at,style:it,ref:ot,children:rt})},src_default=StickyBox,Layout=function _e(et){var tt=et.children;return _createRawReactElement("div",{className:"relative sm:pt-4"},void 0,_createRawReactElement("div",{className:"mx-auto max-w-3xl sm:px-6 md:grid md:max-w-7xl md:grid-cols-12 md:gap-8 md:px-8"},void 0,tt))},Sidebar=function _e(et){var tt=et.children;return _createRawReactElement("div",{className:"hidden lg:col-span-3 lg:block"},void 0,_createRawReactElement(src_default,{offsetTop:80,className:"pb-4"},void 0,tt))},Main=function _e(et){var tt=et.children,nt=et.className;return _createRawReactElement("main",{className:clsx({"md:col-span-12 lg:col-span-9 xl:col-span-6 pb-36":!0},nt)},void 0,tt)},Aside=function _e(et){var tt=et.children;return _createRawReactElement("aside",{className:"hidden xl:col-span-3 xl:block"},void 0,_createRawReactElement(src_default,{offsetTop:80,className:"space-y-6 pb-12"},void 0,tt))};Layout.Sidebar=Sidebar;Layout.Main=Main;Layout.Aside=Aside;var CLEAR_SELECTION_INDEX="CLEAR_SELECTION_INDEX",CLICK_MENU_ITEM="CLICK_MENU_ITEM",CLOSE_MENU="CLOSE_MENU",OPEN_MENU_AT_FIRST_ITEM="OPEN_MENU_AT_FIRST_ITEM",OPEN_MENU_AT_INDEX="OPEN_MENU_AT_INDEX",OPEN_MENU_CLEARED="OPEN_MENU_CLEARED",SEARCH_FOR_ITEM="SEARCH_FOR_ITEM",SELECT_ITEM_AT_INDEX="SELECT_ITEM_AT_INDEX",SET_BUTTON_ID="SET_BUTTON_ID",DropdownDescendantContext=createDescendantContext("DropdownDescendantContext"),[DropdownProvider,useDropdownContext]=createContext2("Dropdown"),initialState$n={triggerId:null,isExpanded:!1,typeaheadQuery:"",selectionIndex:-1},DropdownProvider_=({id:_e,children:et})=>{let tt=reactExports.useRef(null),nt=reactExports.useRef(null),rt=reactExports.useRef(null),[at,it]=useDescendantsInit(),ot=useId(_e),st=_e||makeId("menu",ot),ct=makeId("menu-button",st),[ut,dt]=reactExports.useReducer(reducer$2,{...initialState$n,triggerId:ct}),ft=reactExports.useRef(!1),pt=reactExports.useRef([]),mt=reactExports.useRef(!1),ht=reactExports.useRef({x:0,y:0});return reactExports.useEffect(()=>{ut.isExpanded?(window.__REACH_DISABLE_TOOLTIPS=!0,window.requestAnimationFrame(()=>{focus(nt.current)})):window.__REACH_DISABLE_TOOLTIPS=!1},[ut.isExpanded]),reactExports.createElement(DescendantProvider,{context:DropdownDescendantContext,items:at,set:it},reactExports.createElement(DropdownProvider,{dispatch:dt,dropdownId:st,dropdownRef:nt,mouseDownStartPosRef:ht,popoverRef:rt,readyToSelect:mt,selectCallbacks:pt,state:ut,triggerClickedRef:ft,triggerRef:tt},isFunction(et)?et({isExpanded:ut.isExpanded,isOpen:ut.isExpanded}):et))};DropdownProvider_.displayName="DropdownProvider";function useDropdownTrigger({onKeyDown:_e,onMouseDown:et,id:tt,ref:nt,...rt}){let{dispatch:at,dropdownId:it,mouseDownStartPosRef:ot,triggerClickedRef:st,triggerRef:ct,state:{triggerId:ut,isExpanded:dt}}=useDropdownContext("useDropdownTrigger"),ft=useComposedRefs(ct,nt),pt=useDropdownDescendants(),mt=reactExports.useMemo(()=>pt.findIndex(yt=>!yt.disabled),[pt]);reactExports.useEffect(()=>{tt!=null&&tt!==ut&&at({type:SET_BUTTON_ID,payload:tt})},[ut,at,tt]),reactExports.useEffect(()=>{tt==null&&at({type:SET_BUTTON_ID,payload:makeId("menu-button",it)})},[it,at,tt]);function ht(yt){switch(yt.key){case"ArrowDown":case"ArrowUp":yt.preventDefault(),at({type:OPEN_MENU_AT_INDEX,payload:{index:mt}});break;case"Enter":case" ":at({type:OPEN_MENU_AT_INDEX,payload:{index:mt}});break}}function Et(yt){isRightClick(yt.nativeEvent)||(ot.current={x:yt.clientX,y:yt.clientY},dt||(st.current=!0),at(dt?{type:CLOSE_MENU}:{type:OPEN_MENU_CLEARED}))}return{data:{isExpanded:dt,controls:it},props:{...rt,ref:ft,id:ut||void 0,onKeyDown:composeEventHandlers(_e,ht),onMouseDown:composeEventHandlers(et,Et),type:"button"}}}var DropdownTrigger=reactExports.forwardRef(({as:_e="button",...et},tt)=>{let{props:nt}=useDropdownTrigger({...et,ref:tt});return reactExports.createElement(_e,{"data-reach-dropdown-trigger":"",...nt})});DropdownTrigger.displayName="DropdownTrigger";function useDropdownItem({index:_e,isLink:et=!1,onClick:tt,onDragStart:nt,onMouseDown:rt,onMouseEnter:at,onMouseLeave:it,onMouseMove:ot,onMouseUp:st,onSelect:ct,disabled:ut,onFocus:dt,valueText:ft,ref:pt,...mt}){let{dispatch:ht,dropdownRef:Et,mouseDownStartPosRef:yt,readyToSelect:vt,selectCallbacks:gt,triggerRef:St,state:{selectionIndex:Rt,isExpanded:$t}}=useDropdownContext("useDropdownItem"),bt=reactExports.useRef(null),[wt,xt]=reactExports.useState(ft||""),Tt=reactExports.useCallback(Bt=>{!ft&&(Bt!=null&&Bt.textContent)&&xt(Bt.textContent)},[ft]),Ct=reactExports.useRef(!1),[Nt,At]=useStatefulRefValue(bt,null),kt=reactExports.useMemo(()=>({element:Nt,key:wt,disabled:ut,isLink:et}),[ut,Nt,et,wt]),Pt=useDescendant(kt,DropdownDescendantContext,_e),Ft=Pt===Rt&&!ut,Dt=useComposedRefs(pt,At,Tt);gt.current[Pt]=ct;function Lt(){focus(St.current),ct&&ct(),ht({type:CLICK_MENU_ITEM})}function It(Bt){isRightClick(Bt.nativeEvent)||et&&(ut?Bt.preventDefault():Lt())}function Ot(Bt){et&&Bt.preventDefault()}function Ut(Bt){isRightClick(Bt.nativeEvent)||(et?Ct.current=!0:Bt.preventDefault())}function jt(Bt){let Kt=getOwnerDocument(Et.current);!Ft&&Pt!=null&&!ut&&(Et!=null&&Et.current&&Et.current!==Kt.activeElement&&bt.current!==Kt.activeElement&&Et.current.focus(),ht({type:SELECT_ITEM_AT_INDEX,payload:{index:Pt}}))}function zt(Bt){ht({type:CLEAR_SELECTION_INDEX})}function Qt(Bt){if(!vt.current){let Kt=8,Wt=Math.abs(Bt.clientX-yt.current.x),sn=Math.abs(Bt.clientY-yt.current.y);(Wt>Kt||sn>Kt)&&(vt.current=!0)}!Ft&&Pt!=null&&!ut&&ht({type:SELECT_ITEM_AT_INDEX,payload:{index:Pt,dropdownRef:Et}})}function Xt(){vt.current=!0,!Ft&&Pt!=null&&!ut&&ht({type:SELECT_ITEM_AT_INDEX,payload:{index:Pt}})}function Yt(Bt){if(!isRightClick(Bt.nativeEvent)){if(!vt.current){vt.current=!0;return}et?Ct.current?Ct.current=!1:bt.current&&bt.current.click():ut||Lt()}}return reactExports.useEffect(()=>{if($t){let Bt=window.setTimeout(()=>{vt.current=!0},400);return()=>{window.clearTimeout(Bt)}}else vt.current=!1},[$t,vt]),reactExports.useEffect(()=>{let Bt=getOwnerDocument(bt.current);return Bt.addEventListener("mouseup",Kt),()=>{Bt.removeEventListener("mouseup",Kt)};function Kt(){Ct.current=!1}},[]),{data:{disabled:ut},props:{id:useItemId(Pt),tabIndex:-1,...mt,ref:Dt,"data-disabled":ut?"":void 0,"data-selected":Ft?"":void 0,"data-valuetext":wt,onClick:composeEventHandlers(tt,It),onDragStart:composeEventHandlers(nt,Ot),onMouseDown:composeEventHandlers(rt,Ut),onMouseEnter:composeEventHandlers(at,jt),onMouseLeave:composeEventHandlers(it,zt),onMouseMove:composeEventHandlers(ot,Qt),onFocus:composeEventHandlers(dt,Xt),onMouseUp:composeEventHandlers(st,Yt)}}}var DropdownItem=reactExports.forwardRef(({as:_e="div",...et},tt)=>{let{props:nt}=useDropdownItem({...et,ref:tt});return reactExports.createElement(_e,{"data-reach-dropdown-item":"",...nt})});DropdownItem.displayName="DropdownItem";function useDropdownItems({id:_e,onKeyDown:et,ref:tt,...nt}){let{dispatch:rt,triggerRef:at,dropdownRef:it,selectCallbacks:ot,dropdownId:st,state:{isExpanded:ct,triggerId:ut,selectionIndex:dt,typeaheadQuery:ft}}=useDropdownContext("useDropdownItems"),pt=useDropdownDescendants(),mt=useComposedRefs(it,tt);reactExports.useEffect(()=>{let gt=findItemFromTypeahead(pt,ft);ft&>!=null&&rt({type:SELECT_ITEM_AT_INDEX,payload:{index:gt,dropdownRef:it}});let St=window.setTimeout(()=>ft&&rt({type:SEARCH_FOR_ITEM,payload:""}),1e3);return()=>window.clearTimeout(St)},[rt,pt,ft,it]);let ht=usePrevious(pt.length),Et=usePrevious(pt[dt]),yt=usePrevious(dt);reactExports.useEffect(()=>{dt>pt.length-1?rt({type:SELECT_ITEM_AT_INDEX,payload:{index:pt.length-1,dropdownRef:it}}):ht!==pt.length&&dt>-1&&Et&&yt===dt&&pt[dt]!==Et&&rt({type:SELECT_ITEM_AT_INDEX,payload:{index:pt.findIndex(gt=>gt.key===(Et==null?void 0:Et.key)),dropdownRef:it}})},[it,rt,pt,ht,Et,yt,dt]);let vt=composeEventHandlers(function(St){let{key:Rt}=St;if(ct)switch(Rt){case"Enter":case" ":let $t=pt.find(bt=>bt.index===dt);$t&&!$t.disabled&&(St.preventDefault(),$t.isLink&&$t.element?$t.element.click():(focus(at.current),ot.current[$t.index]&&ot.current[$t.index](),rt({type:CLICK_MENU_ITEM})));break;case"Escape":focus(at.current),rt({type:CLOSE_MENU});break;case"Tab":St.preventDefault();break;default:if(isString(Rt)&&Rt.length===1){let bt=ft+Rt.toLowerCase();rt({type:SEARCH_FOR_ITEM,payload:bt})}break}},useDescendantKeyDown(DropdownDescendantContext,{currentIndex:dt,orientation:"vertical",rotate:!1,filter:gt=>!gt.disabled,callback:gt=>{rt({type:SELECT_ITEM_AT_INDEX,payload:{index:gt,dropdownRef:it}})},key:"index"}));return{data:{activeDescendant:useItemId(dt)||void 0,triggerId:ut},props:{tabIndex:-1,...nt,ref:mt,id:st,onKeyDown:composeEventHandlers(et,vt)}}}var DropdownItems=reactExports.forwardRef(({as:_e="div",...et},tt)=>{let{props:nt}=useDropdownItems({...et,ref:tt});return reactExports.createElement(_e,{"data-reach-dropdown-items":"",...nt})});DropdownItems.displayName="DropdownItems";function useDropdownPopover({onBlur:_e,portal:et=!0,position:tt,ref:nt,...rt}){let{triggerRef:at,triggerClickedRef:it,dispatch:ot,dropdownRef:st,popoverRef:ct,state:{isExpanded:ut}}=useDropdownContext("useDropdownPopover"),dt=useComposedRefs(ct,nt);return reactExports.useEffect(()=>{if(!ut)return;let ft=getOwnerDocument(ct.current);function pt(mt){it.current?it.current=!1:popoverContainsEventTarget(ct.current,mt.target)||ot({type:CLOSE_MENU})}return ft.addEventListener("mousedown",pt),()=>{ft.removeEventListener("mousedown",pt)}},[it,at,ot,st,ct,ut]),{data:{portal:et,position:tt,targetRef:at,isExpanded:ut},props:{ref:dt,hidden:!ut,onBlur:composeEventHandlers(_e,ft=>{ft.currentTarget.contains(ft.relatedTarget)||ot({type:CLOSE_MENU})}),...rt}}}var DropdownPopover=reactExports.forwardRef(({as:_e="div",...et},tt)=>{let{data:{portal:nt,targetRef:rt,position:at},props:it}=useDropdownPopover({...et,ref:tt}),ot={"data-reach-dropdown-popover":""};return nt?reactExports.createElement(Popover$1,{...it,...ot,as:_e,targetRef:rt,position:at,unstable_skipInitialPortalRender:!0}):reactExports.createElement(_e,{...it,...ot})});DropdownPopover.displayName="DropdownPopover";function findItemFromTypeahead(_e,et=""){if(!et)return null;let tt=_e.find(nt=>{var rt,at,it;return nt.disabled?!1:(it=(at=(rt=nt.element)==null?void 0:rt.dataset)==null?void 0:at.valuetext)==null?void 0:it.toLowerCase().startsWith(et)});return tt?_e.indexOf(tt):null}function useItemId(_e){let{dropdownId:et}=useDropdownContext("useItemId");return _e!=null&&_e>-1?makeId(`option-${_e}`,et):void 0}function focus(_e){_e&&_e.focus()}function popoverContainsEventTarget(_e,et){return!!(_e&&_e.contains(et))}function reducer$2(_e,et={}){switch(et.type){case CLICK_MENU_ITEM:return{..._e,isExpanded:!1,selectionIndex:-1};case CLOSE_MENU:return{..._e,isExpanded:!1,selectionIndex:-1};case OPEN_MENU_AT_FIRST_ITEM:return{..._e,isExpanded:!0,selectionIndex:0};case OPEN_MENU_AT_INDEX:return{..._e,isExpanded:!0,selectionIndex:et.payload.index};case OPEN_MENU_CLEARED:return{..._e,isExpanded:!0,selectionIndex:-1};case SELECT_ITEM_AT_INDEX:{let{dropdownRef:tt={current:null}}=et.payload;if(et.payload.index>=0&&et.payload.index!==_e.selectionIndex){if(tt.current){let nt=getOwnerDocument(tt.current);tt.current!==(nt==null?void 0:nt.activeElement)&&tt.current.focus()}return{..._e,selectionIndex:et.payload.max!=null?Math.min(Math.max(et.payload.index,0),et.payload.max):Math.max(et.payload.index,0)}}return _e}case CLEAR_SELECTION_INDEX:return{..._e,selectionIndex:-1};case SET_BUTTON_ID:return{..._e,triggerId:et.payload};case SEARCH_FOR_ITEM:return typeof et.payload<"u"?{..._e,typeaheadQuery:et.payload}:_e;default:return _e}}function useDropdownDescendants(){return useDescendants(DropdownDescendantContext)}var Menu=reactExports.forwardRef(({as:_e=reactExports.Fragment,id:et,children:tt,...nt},rt)=>{let it=reactExports.useMemo(()=>{try{return reactIsExports$1.isFragment(reactExports.createElement(_e,null))}catch{return!1}},[_e])?{}:{ref:rt,id:et,"data-reach-menu":"",...nt};return reactExports.createElement(_e,{...it},reactExports.createElement(DropdownProvider_,{id:et,children:tt}))});Menu.displayName="Menu";var MenuButton=reactExports.forwardRef(({as:_e="button",...et},tt)=>{let{data:{isExpanded:nt,controls:rt},props:at}=useDropdownTrigger({...et,ref:tt});return reactExports.createElement(_e,{"aria-expanded":nt?!0:void 0,"aria-haspopup":!0,"aria-controls":rt,...at,"data-reach-menu-button":""})});MenuButton.displayName="MenuButton";var MenuItemImpl=reactExports.forwardRef(({as:_e="div",...et},tt)=>{let{data:{disabled:nt},props:rt}=useDropdownItem({...et,ref:tt});return reactExports.createElement(_e,{role:"menuitem",...rt,"aria-disabled":nt||void 0,"data-reach-menu-item":""})});MenuItemImpl.displayName="MenuItemImpl";var MenuItem$1=reactExports.forwardRef(({as:_e="div",...et},tt)=>reactExports.createElement(MenuItemImpl,{...et,ref:tt,as:_e}));MenuItem$1.displayName="MenuItem";var MenuItems=reactExports.forwardRef(({as:_e="div",...et},tt)=>{let{data:{activeDescendant:nt,triggerId:rt},props:at}=useDropdownItems({...et,ref:tt});return reactExports.createElement(_e,{"aria-activedescendant":nt,"aria-labelledby":rt||void 0,role:"menu",...at,"data-reach-menu-items":""})});MenuItems.displayName="MenuItems";var MenuLink=reactExports.forwardRef(({as:_e="a",component:et,onSelect:tt,...nt},rt)=>(reactExports.useEffect(()=>{et&&console.warn("[@reach/menu-button]: Please use the `as` prop instead of `component`")},[et]),reactExports.createElement(MenuItemImpl,{...nt,ref:rt,"data-reach-menu-link":"",as:_e,isLink:!0,onSelect:tt||noop$2})));MenuLink.displayName="MenuLink";var MenuList$1=reactExports.forwardRef(({portal:_e=!0,...et},tt)=>reactExports.createElement(MenuPopover,{portal:_e},reactExports.createElement(MenuItems,{...et,ref:tt,"data-reach-menu-list":""})));MenuList$1.displayName="MenuList";var MenuPopover=reactExports.forwardRef(({as:_e="div",...et},tt)=>{let{data:{portal:nt,targetRef:rt,position:at},props:it}=useDropdownPopover({...et,ref:tt}),ot={"data-reach-menu-popover":""};return nt?reactExports.createElement(Popover$1,{...it,...ot,as:_e,targetRef:rt,position:at,unstable_skipInitialPortalRender:!0}):reactExports.createElement(_e,{...it,...ot})});MenuPopover.displayName="MenuPopover";const menu="";var _excluded$g=["position","className"],MenuList=function _e(et){et.position;var tt=et.className,nt=_objectWithoutProperties(et,_excluded$g);return _createRawReactElement(MenuPopover,{position:et.position==="left"?positionDefault:positionRight},void 0,React$3.createElement(MenuItems,_extends$4({onKeyDown:function(at){return at.nativeEvent.stopImmediatePropagation()},className:clsx(tt,"shadow-menu rounded-lg bg-white py-1 dark:bg-primary-900")},nt)))},MenuDivider=function _e(){return _createRawReactElement("hr",{className:"mx-2 my-1 border-t-2 border-gray-100 dark:border-gray-800"})};const vitePluginRequire_1697861811668_44144977="/packs/assets/x-36cb9490.svg";var messages$14={close:{id:"lightbox.close",defaultMessage:"Close"},confirm:{id:"confirmations.delete.confirm",defaultMessage:"Delete"}},widths={xs:"max-w-xs",sm:"max-w-sm",md:"max-w-base",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","3xl":"max-w-3xl","4xl":"max-w-4xl"},Modal=React$3.forwardRef(function(_e,et){var tt=_e.cancelAction,nt=_e.cancelText,rt=_e.children,at=_e.closeIcon,it=at===void 0?vitePluginRequire_1697861811668_44144977:at,ot=_e.closePosition,st=ot===void 0?"right":ot,ct=_e.confirmationAction,ut=_e.confirmationDisabled,dt=_e.confirmationText,ft=_e.confirmationTheme,pt=_e.confirmationFullWidth,mt=_e.onClose,ht=_e.secondaryAction,Et=_e.secondaryDisabled,yt=Et===void 0?!1:Et,vt=_e.secondaryText,gt=_e.skipFocus,St=gt===void 0?!1:gt,Rt=_e.title,$t=_e.width,bt=$t===void 0?"xl":$t,wt=_e.className,xt=useIntl(),Tt=React$3.useRef(null);return React$3.useEffect(function(){Tt!=null&&Tt.current&&!St&&Tt.current.focus()},[St,Tt]),React$3.createElement("div",{ref:et,"data-testid":"modal",className:clsx(wt,"pointer-events-auto mx-auto block w-full rounded-2xl bg-white p-6 text-start align-middle text-gray-900 shadow-xl transition-all dark:bg-primary-900 dark:text-gray-100",widths[bt])},_createRawReactElement("div",{className:"w-full justify-between sm:flex sm:items-start"},void 0,_createRawReactElement("div",{className:"w-full"},void 0,Rt&&_createRawReactElement("div",{className:clsx("flex w-full items-center gap-2",{"flex-row-reverse":st==="left"})},void 0,_createRawReactElement("h3",{className:"grow truncate text-lg font-bold leading-6 text-gray-900 dark:text-white"},void 0,Rt),mt&&_createRawReactElement(IconButton$1,{src:it,title:xt.formatMessage(messages$14.close),onClick:mt,className:"text-gray-500 hover:text-gray-700 rtl:rotate-180 dark:text-gray-300 dark:hover:text-gray-200"})),Rt?_createRawReactElement("div",{className:"mt-2 w-full"},void 0,rt):rt)),ct&&_createRawReactElement(HStack,{className:"mt-5",justifyContent:"between","data-testid":"modal-actions"},void 0,_createRawReactElement("div",{className:clsx({grow:!pt})},void 0,tt&&_createRawReactElement(Button,{theme:"tertiary",onClick:tt},void 0,nt||"Cancel")),_createRawReactElement(HStack,{space:2,className:clsx({grow:pt})},void 0,ht&&_createRawReactElement(Button,{theme:"secondary",onClick:ht,disabled:yt},void 0,vt),React$3.createElement(Button,{theme:ft||"primary",onClick:ct,disabled:ut,ref:Tt,block:pt},dt))))});const metadata={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8]))\\d{3}|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4]))|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[016-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|22"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[025-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","[24-689]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]]]],BL:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:395|76[018])\\d|475[0-5])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-467]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[17]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","(?:[2-8]\\d|90)\\d{8}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[125-9]|33|44|66|77|88)|622)[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[016-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","[189]\\d{8}|[1-68]\\d{6}",[7,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","1[127]\\d{8,9}|2\\d{9}(?:\\d{2})?|[12]\\d{6,7}|86\\d{6}|(?:1[03-689]\\d|6)\\d{7,9}|(?:[3-579]\\d|8[0-57-9])\\d{6,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","10(?:10|9[56])|2[0-57-9](?:100|9[56])"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:60\\d\\d|9101)\\d{6}|(?:1\\d|3)\\d{9}",[10,11],[["(\\d{3})(\\d{7})","$1 $2",["6"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|91"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0(4(?:[14]4|56)|[579])?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","[27]\\d{6,7}|[34]\\d{5,7}|63\\d{6}|(?:5|8\\d\\d)\\d{7}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[016-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[0568]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d)(\\d{4,9})","$1 $2",["[2568][1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["[12]00|[368]|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[1245]|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0235])|4(?:[0-5]\\d\\d|69[7-9]|70[0-79])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-2]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","[56]94\\d{6}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[56]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:395|76[018])\\d|475[0-5])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([3-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","9008\\d{3}|(?:[2-467]\\d\\d|510|862)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",[6,7,8,9],[["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-5]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","(?:[2-489]\\d|55)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","(?:(?:00[1-9]|8\\d)\\d{4}|[1-36])\\d{6}|00\\d{10}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]]],0,0,0,0,0,0,[["0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[1-9]\\d{8}|3[2-9]\\d{7}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],0,0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97[7-9]))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[257-9]"],"0$1"]],"0",0,"(000[259]\\d{6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30[013-9]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[25]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[4-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(8-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"8 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(8-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(8-$1)",1]],"8",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{5})(\\d{4})","$1-$2",["5(?:29|38)","5(?:29[1289]|389)","529(?:1[1-46-9]|2[013-8]|90)|5(?:298|389)[0-46-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-489]|3[5-9]|9)|892","5(?:2(?:[2-49]|8[235-9])|3[5-9]|9)|892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5293[01]\\d{4}|5(?:2(?:[0-25-7]\\d|3[1-578]|4[02-46-8]|8[0235-7]|9[0-289])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[0189]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[017]\\d|2[0-2]|6[0-8]|8[0-3]))\\d{6}"],["80\\d{7}"],["89\\d{7}"],0,0,0,0,["592(?:4[0-2]|93)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:395|76[018])\\d|475[0-5])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","596\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","1(?:(?:[27]2|44|99)[1-9]|65[0-689])\\d{7}|(?:1(?:[01]\\d|2[13-9]|[35][1-9]|4[0-35-9]|6[0-46-9]|7[013-9]|8[1-79]|9[1-8])|[2-9]\\d)\\d{8}",[10,11],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"],0,1],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 $3 $4",["1(?:33|5[56]|81)"],0,1],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 $3 $4",["1"],0,1]],"01",0,"0(?:[12]|4[45])|1",0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[047]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:[124-7]|9\\d{3})\\d{6}|[1-9]\\d{7}|[78]\\d{9,13}",[7,8,10,11,12,13,14],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["78"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|9(?:0[3-9]|[1-9])"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-7]|8[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:444|(?:55|8\\d)\\d|666)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[4-68]"]]]],NU:["683","00","(?:[47]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|80\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-6])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[16]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-5]))\\d{4}"],["69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-27]|8[0-8]|9[0-479]))\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-5]|76(?:2[27]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[2378]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[237-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"3[04-689]|[489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","92\\d{7}|(?:[15]|8\\d)\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["81"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","(?:[1-6]|[7-9]\\d\\d)\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","800\\d{4}|(?:[249]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-8]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|77|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|68|[78]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-8]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[267]\\d{7}|[89]00\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-39]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[69]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2679]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","[0-57-9]\\d{8}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[04]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3[1-5]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","[1-6]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["6"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|616)","5(?:[0-59]|6161)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["5056(?:[0-35-9]\\d|4[46])\\d{4}|(?:4722|505[2-57-9]|983[29])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-589]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[01356]|3[0-24679]|4[167]|5[0-2]|6[014]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|[34][016]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-7]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","(?:0004|4)\\d{9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",[7,8,10,13],[["(\\d{3})(\\d{4})","$1 $2",["405|8|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["4"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","810","200\\d{6}|(?:33|[5-79]\\d|88)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72)\\d{4}|8\\d{5}(?:\\d{3})?",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[478]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","[23]\\d{7,8}|(?:4\\d\\d|[89]00)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[23]"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|5[0-4]|6\\d|[78]0)\\d{4}"],["639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|63|[79]\\d)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[79]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[35-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[35-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"[0-36-9]\\d{8}",[9],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-36-9]"]]],0,0,0,0,0,0,[0,["[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,0,0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[013-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function withMetadataArgument(_e,et){var tt=Array.prototype.slice.call(et);return tt.push(metadata),_e.apply(this,tt)}function _typeof$4(_e){"@babel/helpers - typeof";return _typeof$4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$4(_e)}function _defineProperties$a(_e,et){for(var tt=0;tt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _isNativeFunction(_e){return Function.toString.call(_e).indexOf("[native code]")!==-1}function _setPrototypeOf$1(_e,et){return _setPrototypeOf$1=Object.setPrototypeOf||function(nt,rt){return nt.__proto__=rt,nt},_setPrototypeOf$1(_e,et)}function _getPrototypeOf$2(_e){return _getPrototypeOf$2=Object.setPrototypeOf?Object.getPrototypeOf:function(tt){return tt.__proto__||Object.getPrototypeOf(tt)},_getPrototypeOf$2(_e)}var ParseError=function(_e){_inherits$2(tt,_e);var et=_createSuper$5(tt);function tt(nt){var rt;return _classCallCheck$a(this,tt),rt=et.call(this,nt),Object.setPrototypeOf(_assertThisInitialized$2(rt),tt.prototype),rt.name=rt.constructor.name,rt}return _createClass$a(tt)}(_wrapNativeSuper(Error)),MIN_LENGTH_FOR_NSN=2,MAX_LENGTH_FOR_NSN=17,MAX_LENGTH_COUNTRY_CODE=3,VALID_DIGITS="0-90-9٠-٩۰-۹",DASHES="-‐-―−ー-",SLASHES="//",DOTS="..",WHITESPACE="  ­​⁠ ",BRACKETS="()()[]\\[\\]",TILDES="~⁓∼~",VALID_PUNCTUATION="".concat(DASHES).concat(SLASHES).concat(DOTS).concat(WHITESPACE).concat(BRACKETS).concat(TILDES),PLUS_CHARS="++";function compare(_e,et){_e=_e.split("-"),et=et.split("-");for(var tt=_e[0].split("."),nt=et[0].split("."),rt=0;rt<3;rt++){var at=Number(tt[rt]),it=Number(nt[rt]);if(at>it)return 1;if(it>at)return-1;if(!isNaN(at)&&isNaN(it))return 1;if(isNaN(at)&&!isNaN(it))return-1}return _e[1]&&et[1]?_e[1]>et[1]?1:_e[1]=MIN_LENGTH_FOR_NSN&&VALID_PHONE_NUMBER_PATTERN.test(_e)}function isViablePhoneNumberStart(_e){return VALID_PHONE_NUMBER_START_REG_EXP.test(_e)}var EXTN_PATTERN=new RegExp("(?:"+createExtensionPattern()+")$","i");function extractExtension(_e){var et=_e.search(EXTN_PATTERN);if(et<0)return{};for(var tt=_e.slice(0,et),nt=_e.match(EXTN_PATTERN),rt=1;rt=_e.length?{done:!0}:{done:!1,value:_e[nt++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _toConsumableArray(_e){return _arrayWithoutHoles(_e)||_iterableToArray(_e)||_unsupportedIterableToArray$e(_e)||_nonIterableSpread()}var _excluded$m=["children","className"],Select=React$3.forwardRef(function(_e,et){var tt=_e.children,nt=_e.className,rt=_objectWithoutProperties(_e,_excluded$m);return React$3.createElement("select",_extends$4({ref:et,className:clsx("w-full truncate rounded-md border-gray-300 py-2 pl-3 pr-10 text-base focus:border-primary-500 focus:outline-none focus:ring-primary-500 disabled:opacity-50 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-100 dark:ring-1 dark:ring-gray-800 dark:focus:border-primary-500 dark:focus:ring-primary-500 sm:text-sm",nt)},rt),tt)}),_excluded$l=["space","alignItems","justifyContent","className","grow","element"],_spaces,spaces=(_spaces={0:"space-y-0"},_defineProperty$7(_spaces,.5,"space-y-0.5"),_defineProperty$7(_spaces,1,"space-y-1"),_defineProperty$7(_spaces,1.5,"space-y-1.5"),_defineProperty$7(_spaces,2,"space-y-2"),_defineProperty$7(_spaces,3,"space-y-3"),_defineProperty$7(_spaces,4,"space-y-4"),_defineProperty$7(_spaces,5,"space-y-5"),_defineProperty$7(_spaces,6,"space-y-6"),_defineProperty$7(_spaces,9,"space-y-9"),_defineProperty$7(_spaces,10,"space-y-10"),_spaces),justifyContentOptions={between:"justify-between",center:"justify-center",end:"justify-end"},alignItemsOptions={top:"items-start",bottom:"items-end",center:"items-center",start:"items-start",end:"items-end"},Stack=React$3.forwardRef(function(_e,et){var tt,nt=_e.space,rt=_e.alignItems,at=_e.justifyContent,it=_e.className,ot=_e.grow,st=_e.element,ct=st===void 0?"div":st,ut=_objectWithoutProperties(_e,_excluded$l),dt=ct;return React$3.createElement(dt,_extends$4({},ut,{ref:et,className:clsx("flex flex-col",(tt={},_defineProperty$7(tt,spaces[nt],typeof nt<"u"),_defineProperty$7(tt,alignItemsOptions[rt],typeof rt<"u"),_defineProperty$7(tt,justifyContentOptions[at],typeof at<"u"),_defineProperty$7(tt,"grow",ot),tt),it)}))}),getDaysInMonth=function _e(et,tt){return new Date(tt,et+1,0).getDate()},currentYear=new Date().getFullYear(),Datepicker=function _e(et){var tt=et.onChange,nt=useIntl(),rt=reactExports.useState(new Date().getMonth()),at=_slicedToArray$4(rt,2),it=at[0],ot=at[1],st=reactExports.useState(new Date().getDate()),ct=_slicedToArray$4(st,2),ut=ct[0],dt=ct[1],ft=reactExports.useState(new Date().getFullYear()),pt=_slicedToArray$4(ft,2),mt=pt[0],ht=pt[1],Et=reactExports.useMemo(function(){return getDaysInMonth(it,mt)},[it,mt]);return reactExports.useEffect(function(){tt(new Date(mt,it,ut))},[it,ut,mt]),_createRawReactElement("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-3"},void 0,_createRawReactElement("div",{className:"sm:col-span-1"},void 0,_createRawReactElement(Stack,{},void 0,_createRawReactElement(Text$2,{size:"sm",weight:"medium",theme:"muted"},void 0,_createRawReactElement(FormattedMessage$1,{id:"datepicker.month",defaultMessage:"Month"})),_createRawReactElement(Select,{value:it,onChange:function(vt){return ot(Number(vt.target.value))},"data-testid":"datepicker-month"},void 0,_toConsumableArray(Array(12)).map(function(yt,vt){return _createRawReactElement("option",{value:vt},vt,nt.formatDate(new Date(mt,vt,1),{month:"long"}))})))),_createRawReactElement("div",{className:"sm:col-span-1"},void 0,_createRawReactElement(Stack,{},void 0,_createRawReactElement(Text$2,{size:"sm",weight:"medium",theme:"muted"},void 0,_createRawReactElement(FormattedMessage$1,{id:"datepicker.day",defaultMessage:"Day"})),_createRawReactElement(Select,{value:ut,onChange:function(vt){return dt(Number(vt.target.value))},"data-testid":"datepicker-day"},void 0,_toConsumableArray(Array(Et)).map(function(yt,vt){return _createRawReactElement("option",{value:vt+1},vt,vt+1)})))),_createRawReactElement("div",{className:"sm:col-span-1"},void 0,_createRawReactElement(Stack,{},void 0,_createRawReactElement(Text$2,{size:"sm",weight:"medium",theme:"muted"},void 0,_createRawReactElement(FormattedMessage$1,{id:"datepicker.year",defaultMessage:"Year"})),_createRawReactElement(Select,{value:mt,onChange:function(vt){return ht(Number(vt.target.value))},"data-testid":"datepicker-year"},void 0,_toConsumableArray(Array(121)).map(function(yt,vt){return _createRawReactElement("option",{value:currentYear-vt},vt,currentYear-vt)})))))},Divider=function _e(et){var tt=et.text,nt=et.textSize,rt=nt===void 0?"md":nt;return _createRawReactElement("div",{className:"relative","data-testid":"divider"},void 0,_createRawReactElement("div",{className:"absolute inset-0 flex items-center","aria-hidden":"true"},void 0,_createRawReactElement("div",{className:"w-full border-t-2 border-solid border-gray-100 dark:border-gray-800"})),tt&&_createRawReactElement("div",{className:"relative flex justify-center"},void 0,_createRawReactElement("span",{className:"bg-white px-2 text-gray-700 dark:bg-gray-900 dark:text-gray-600","data-testid":"divider-text"},void 0,_createRawReactElement(Text$2,{size:rt,tag:"span",theme:"inherit"},void 0,tt))))},_excluded$k=["emoji","alt","src"],Emoji=function _e(et){var tt=et.emoji,nt=et.alt,rt=et.src,at=_objectWithoutProperties(et,_excluded$k),it=toCodePoints(removeVS16s(tt)),ot=it.join("-");return ot?React$3.createElement("img",_extends$4({draggable:"false",alt:nt||tt,src:rt||joinPublicPath("packs/emoji/".concat(ot,".svg"))},at)):null},global$d=global$w,classof$3=classofRaw$2,engineIsNode=classof$3(global$d.process)==="process",isPrototypeOf$2=objectIsPrototypeOf,$TypeError$7=TypeError,anInstance$4=function(_e,et){if(isPrototypeOf$2(et,_e))return _e;throw $TypeError$7("Incorrect invocation")},isConstructor$1=isConstructor$4,tryToString$2=tryToString$6,$TypeError$6=TypeError,aConstructor$2=function(_e){if(isConstructor$1(_e))return _e;throw $TypeError$6(tryToString$2(_e)+" is not a constructor")},anObject$7=anObject$m,aConstructor$1=aConstructor$2,isNullOrUndefined$5=isNullOrUndefined$a,wellKnownSymbol$7=wellKnownSymbol$t,SPECIES$2=wellKnownSymbol$7("species"),speciesConstructor$2=function(_e,et){var tt=anObject$7(_e).constructor,nt;return tt===void 0||isNullOrUndefined$5(nt=anObject$7(tt)[SPECIES$2])?et:aConstructor$1(nt)},$TypeError$5=TypeError,validateArgumentsLength$2=function(_e,et){if(_edt;dt++)if(pt=yt(_e[dt]),pt&&isPrototypeOf$1(ResultPrototype,pt))return pt;return new Result(!1)}ct=getIterator$1(_e,ut)}for(mt=at?_e.next:ct.next;!(ht=call$7(mt,ct)).done;){try{pt=yt(ht.value)}catch(vt){iteratorClose(ct,"throw",vt)}if(typeof pt=="object"&&pt&&isPrototypeOf$1(ResultPrototype,pt))return pt}return new Result(!1)},NativePromiseConstructor$1=promiseNativeConstructor,checkCorrectnessOfIteration$1=checkCorrectnessOfIteration$3,FORCED_PROMISE_CONSTRUCTOR$3=promiseConstructorDetection.CONSTRUCTOR,promiseStaticsIncorrectIteration=FORCED_PROMISE_CONSTRUCTOR$3||!checkCorrectnessOfIteration$1(function(_e){NativePromiseConstructor$1.all(_e).then(void 0,function(){})}),$$q=_export,call$6=functionCall,aCallable$4=aCallable$b,newPromiseCapabilityModule$2=newPromiseCapability$2,perform$1=perform$3,iterate$4=iterate$5,PROMISE_STATICS_INCORRECT_ITERATION$1=promiseStaticsIncorrectIteration;$$q({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$1},{all:function _e(et){var tt=this,nt=newPromiseCapabilityModule$2.f(tt),rt=nt.resolve,at=nt.reject,it=perform$1(function(){var ot=aCallable$4(tt.resolve),st=[],ct=0,ut=1;iterate$4(et,function(dt){var ft=ct++,pt=!1;ut++,call$6(ot,tt,dt).then(function(mt){pt||(pt=!0,st[ft]=mt,--ut||rt(st))},at)}),--ut||rt(st)});return it.error&&at(it.value),nt.promise}});var $$p=_export,FORCED_PROMISE_CONSTRUCTOR$2=promiseConstructorDetection.CONSTRUCTOR,NativePromiseConstructor=promiseNativeConstructor,getBuiltIn$3=getBuiltIn$c,isCallable$3=isCallable$t,defineBuiltIn$4=defineBuiltIn$f,NativePromisePrototype=NativePromiseConstructor&&NativePromiseConstructor.prototype;$$p({target:"Promise",proto:!0,forced:FORCED_PROMISE_CONSTRUCTOR$2,real:!0},{catch:function(_e){return this.then(void 0,_e)}});if(isCallable$3(NativePromiseConstructor)){var method=getBuiltIn$3("Promise").prototype.catch;NativePromisePrototype.catch!==method&&defineBuiltIn$4(NativePromisePrototype,"catch",method,{unsafe:!0})}var $$o=_export,call$5=functionCall,aCallable$3=aCallable$b,newPromiseCapabilityModule$1=newPromiseCapability$2,perform=perform$3,iterate$3=iterate$5,PROMISE_STATICS_INCORRECT_ITERATION=promiseStaticsIncorrectIteration;$$o({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION},{race:function _e(et){var tt=this,nt=newPromiseCapabilityModule$1.f(tt),rt=nt.reject,at=perform(function(){var it=aCallable$3(tt.resolve);iterate$3(et,function(ot){call$5(it,tt,ot).then(nt.resolve,rt)})});return at.error&&rt(at.value),nt.promise}});var $$n=_export,call$4=functionCall,newPromiseCapabilityModule=newPromiseCapability$2,FORCED_PROMISE_CONSTRUCTOR$1=promiseConstructorDetection.CONSTRUCTOR;$$n({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$1},{reject:function _e(et){var tt=newPromiseCapabilityModule.f(this);return call$4(tt.reject,void 0,et),tt.promise}});var anObject$5=anObject$m,isObject$9=isObject$u,newPromiseCapability=newPromiseCapability$2,promiseResolve$1=function(_e,et){if(anObject$5(_e),isObject$9(et)&&et.constructor===_e)return et;var tt=newPromiseCapability.f(_e),nt=tt.resolve;return nt(et),tt.promise},$$m=_export,getBuiltIn$2=getBuiltIn$c,FORCED_PROMISE_CONSTRUCTOR=promiseConstructorDetection.CONSTRUCTOR,promiseResolve=promiseResolve$1;getBuiltIn$2("Promise");$$m({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR},{resolve:function _e(et){return promiseResolve(this,et)}});var $$l=_export,isArray$1=isArray$b,isConstructor=isConstructor$4,isObject$8=isObject$u,toAbsoluteIndex$1=toAbsoluteIndex$4,lengthOfArrayLike$3=lengthOfArrayLike$b,toIndexedObject$3=toIndexedObject$a,createProperty$2=createProperty$6,wellKnownSymbol$5=wellKnownSymbol$t,arrayMethodHasSpeciesSupport$1=arrayMethodHasSpeciesSupport$4,nativeSlice=arraySlice$4,HAS_SPECIES_SUPPORT$1=arrayMethodHasSpeciesSupport$1("slice"),SPECIES=wellKnownSymbol$5("species"),$Array=Array,max$1=Math.max;$$l({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$1},{slice:function _e(et,tt){var nt=toIndexedObject$3(this),rt=lengthOfArrayLike$3(nt),at=toAbsoluteIndex$1(et,rt),it=toAbsoluteIndex$1(tt===void 0?rt:tt,rt),ot,st,ct;if(isArray$1(nt)&&(ot=nt.constructor,isConstructor(ot)&&(ot===$Array||isArray$1(ot.prototype))?ot=void 0:isObject$8(ot)&&(ot=ot[SPECIES],ot===null&&(ot=void 0)),ot===$Array||ot===void 0))return nativeSlice(nt,at,it);for(st=new(ot===void 0?$Array:ot)(max$1(it-at,0)),ct=0;at0;)_e[at]=_e[--at];at!==nt++&&(_e[at]=rt)}return _e},merge=function(_e,et,tt,nt){for(var rt=et.length,at=tt.length,it=0,ot=0;it3)){if(IE_OR_EDGE)return!0;if(WEBKIT)return WEBKIT<603;var _e="",et,tt,nt,rt;for(et=65;et<76;et++){switch(tt=String.fromCharCode(et),et){case 66:case 69:case 70:case 72:nt=3;break;case 68:case 71:nt=4;break;default:nt=2}for(rt=0;rt<47;rt++)test.push({k:tt+rt,v:nt})}for(test.sort(function(at,it){return it.v-at.v}),rt=0;rttoString$b(tt)?1:-1}};$$k({target:"Array",proto:!0,forced:FORCED$5},{sort:function _e(et){et!==void 0&&aCallable$2(et);var tt=toObject$4(this);if(STABLE_SORT)return et===void 0?nativeSort(tt):nativeSort(tt,et);var nt=[],rt=lengthOfArrayLike$2(tt),at,it;for(it=0;it1?arguments[1]:void 0)}});var $$i=_export,$includes=arrayIncludes.includes,fails$d=fails$F,addToUnscopables$3=addToUnscopables$5,BROKEN_ON_SPARSE=fails$d(function(){return!Array(1).includes()});$$i({target:"Array",proto:!0,forced:BROKEN_ON_SPARSE},{includes:function _e(et){return $includes(this,et,arguments.length>1?arguments[1]:void 0)}});addToUnscopables$3("includes");var $$h=_export,uncurryThis$8=functionUncurryThis,notARegExp=notARegexp,requireObjectCoercible$3=requireObjectCoercible$b,toString$a=toString$t,correctIsRegExpLogic=correctIsRegexpLogic,stringIndexOf$2=uncurryThis$8("".indexOf);$$h({target:"String",proto:!0,forced:!correctIsRegExpLogic("includes")},{includes:function _e(et){return!!~stringIndexOf$2(toString$a(requireObjectCoercible$3(this)),toString$a(notARegExp(et)),arguments.length>1?arguments[1]:void 0)}});var global$7=global$w,DESCRIPTORS$9=descriptors$1,defineBuiltInAccessor$2=defineBuiltInAccessor$8,regExpFlags=regexpFlags$1,fails$c=fails$F,RegExp$2=global$7.RegExp,RegExpPrototype$1=RegExp$2.prototype,FORCED$4=DESCRIPTORS$9&&fails$c(function(){var _e=!0;try{RegExp$2(".","d")}catch{_e=!1}var et={},tt="",nt=_e?"dgimsy":"gimsy",rt=function(st,ct){Object.defineProperty(et,st,{get:function(){return tt+=ct,!0}})},at={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};_e&&(at.hasIndices="d");for(var it in at)rt(it,at[it]);var ot=Object.getOwnPropertyDescriptor(RegExpPrototype$1,"flags").get.call(et);return ot!==nt||tt!==nt});FORCED$4&&defineBuiltInAccessor$2(RegExpPrototype$1,"flags",{configurable:!0,get:regExpFlags});var $$g=_export,toObject$3=toObject$e,nativeKeys=objectKeys$2,fails$b=fails$F,FAILS_ON_PRIMITIVES$1=fails$b(function(){nativeKeys(1)});$$g({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$1},{keys:function _e(et){return nativeKeys(toObject$3(et))}});function EmojiPicker$1(){return __vitePreload(()=>import("./js/emoji-picker-7d9d02c1.js"),[])}function Notifications(){return __vitePreload(()=>import("./js/index-a35ea6ff.js"),["packs/js/index-a35ea6ff.js","packs/js/pull-to-refresh-a7e092ab.js","packs/js/scroll-top-button-73ec9889.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/mood-smile-6a052395.js"])}function HomeTimeline(){return __vitePreload(()=>import("./js/index-aa78d199.js"),["packs/js/index-aa78d199.js","packs/js/pull-to-refresh-a7e092ab.js","packs/js/timeline-456dace7.js","packs/js/scroll-top-button-73ec9889.js","packs/js/status-list-c10445e1.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/status-container-e53698d2.js","packs/js/pending-status-959f7aeb.js","packs/js/poll-preview-ddaf662b.js","packs/js/noop-3f99ae3e.js"])}function PublicTimeline(){return __vitePreload(()=>import("./js/index-1086304d.js"),["packs/js/index-1086304d.js","packs/js/accordion-0fbf6d28.js","packs/js/dots-vertical-68cbc8e2.js","packs/js/pull-to-refresh-a7e092ab.js","packs/js/pinned-hosts-picker-55861ba6.js","packs/js/timeline-456dace7.js","packs/js/scroll-top-button-73ec9889.js","packs/js/status-list-c10445e1.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/status-container-e53698d2.js","packs/js/pending-status-959f7aeb.js","packs/js/poll-preview-ddaf662b.js","packs/js/noop-3f99ae3e.js"])}function RemoteTimeline(){return __vitePreload(()=>import("./js/index-9c870042.js"),["packs/js/index-9c870042.js","packs/js/timeline-456dace7.js","packs/js/scroll-top-button-73ec9889.js","packs/js/status-list-c10445e1.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/status-container-e53698d2.js","packs/js/pending-status-959f7aeb.js","packs/js/poll-preview-ddaf662b.js","packs/js/noop-3f99ae3e.js","packs/js/pinned-hosts-picker-55861ba6.js"])}function CommunityTimeline(){return __vitePreload(()=>import("./js/index-b320f3f0.js"),["packs/js/index-b320f3f0.js","packs/js/pull-to-refresh-a7e092ab.js","packs/js/timeline-456dace7.js","packs/js/scroll-top-button-73ec9889.js","packs/js/status-list-c10445e1.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/status-container-e53698d2.js","packs/js/pending-status-959f7aeb.js","packs/js/poll-preview-ddaf662b.js","packs/js/noop-3f99ae3e.js"])}function HashtagTimeline(){return __vitePreload(()=>import("./js/index-654bbfc5.js"),["packs/js/index-654bbfc5.js","packs/js/timeline-456dace7.js","packs/js/scroll-top-button-73ec9889.js","packs/js/status-list-c10445e1.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/status-container-e53698d2.js","packs/js/pending-status-959f7aeb.js","packs/js/poll-preview-ddaf662b.js","packs/js/noop-3f99ae3e.js"])}function DirectTimeline(){return __vitePreload(()=>import("./js/index-e1f19958.js"),["packs/js/index-e1f19958.js","packs/js/account-search-46dd7dbb.js","packs/js/timeline-456dace7.js","packs/js/scroll-top-button-73ec9889.js","packs/js/status-list-c10445e1.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/status-container-e53698d2.js","packs/js/pending-status-959f7aeb.js","packs/js/poll-preview-ddaf662b.js","packs/js/noop-3f99ae3e.js"])}function Conversations(){return __vitePreload(()=>import("./js/index-96c112b4.js"),["packs/js/index-96c112b4.js","packs/js/account-search-46dd7dbb.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/status-container-e53698d2.js"])}function ListTimeline(){return __vitePreload(()=>import("./js/index-b4b4f3e9.js"),["packs/js/index-b4b4f3e9.js","packs/js/timeline-456dace7.js","packs/js/scroll-top-button-73ec9889.js","packs/js/status-list-c10445e1.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/status-container-e53698d2.js","packs/js/pending-status-959f7aeb.js","packs/js/poll-preview-ddaf662b.js","packs/js/noop-3f99ae3e.js"])}function Lists(){return __vitePreload(()=>import("./js/index-0b097d9d.js"),["packs/js/index-0b097d9d.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/new-list-form-396f644a.js"])}function Bookmarks(){return __vitePreload(()=>import("./js/index-00fe90fc.js"),["packs/js/index-00fe90fc.js","packs/js/pull-to-refresh-a7e092ab.js","packs/js/status-list-c10445e1.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/status-container-e53698d2.js","packs/js/pending-status-959f7aeb.js","packs/js/poll-preview-ddaf662b.js","packs/js/noop-3f99ae3e.js"])}function Status$1(){return __vitePreload(()=>import("./js/index-78fe1150.js"),["packs/js/index-78fe1150.js","packs/js/pull-to-refresh-a7e092ab.js","packs/js/thread-f9f548a4.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/pending-status-959f7aeb.js","packs/js/poll-preview-ddaf662b.js","packs/js/noop-3f99ae3e.js","packs/js/status-container-e53698d2.js"])}function PinnedStatuses(){return __vitePreload(()=>import("./js/index-566a3dfd.js"),["packs/js/index-566a3dfd.js","packs/js/status-list-c10445e1.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/status-container-e53698d2.js","packs/js/pending-status-959f7aeb.js","packs/js/poll-preview-ddaf662b.js","packs/js/noop-3f99ae3e.js"])}function AccountTimeline(){return __vitePreload(()=>import("./js/index-da62f213.js"),["packs/js/index-da62f213.js","packs/js/status-list-c10445e1.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/status-container-e53698d2.js","packs/js/pending-status-959f7aeb.js","packs/js/poll-preview-ddaf662b.js","packs/js/noop-3f99ae3e.js"])}function AccountGallery(){return __vitePreload(()=>import("./js/index-357ae570.js"),["packs/js/index-357ae570.js","packs/js/load-more-55559f32.js","packs/js/media-item-f8ffc0fb.js","packs/js/volume-08f8a8f1.js","packs/js/es.array.last-index-of-d76ad0ed.js"])}function Followers(){return __vitePreload(()=>import("./js/index-fb691b05.js"),["packs/js/index-fb691b05.js","packs/js/useAccountList-32cce5e6.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js"])}function Following(){return __vitePreload(()=>import("./js/index-df9dbbbc.js"),["packs/js/index-df9dbbbc.js","packs/js/useAccountList-32cce5e6.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js"])}function FollowRequests(){return __vitePreload(()=>import("./js/index-d390d93a.js"),["packs/js/index-d390d93a.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/authorize-reject-buttons-1aaf0a6a.js"])}function GenericNotFound(){return __vitePreload(()=>import("./js/index-501024f5.js"),[])}function FavouritedStatuses(){return __vitePreload(()=>import("./js/index-57b05c05.js"),["packs/js/index-57b05c05.js","packs/js/status-list-c10445e1.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/status-container-e53698d2.js","packs/js/pending-status-959f7aeb.js","packs/js/poll-preview-ddaf662b.js","packs/js/noop-3f99ae3e.js"])}function Blocks(){return __vitePreload(()=>import("./js/index-4d67014f.js"),["packs/js/index-4d67014f.js","packs/js/useAccountList-32cce5e6.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js"])}function DomainBlocks(){return __vitePreload(()=>import("./js/index-78ab572e.js"),["packs/js/index-78ab572e.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js"])}function Mutes(){return __vitePreload(()=>import("./js/index-67126278.js"),["packs/js/index-67126278.js","packs/js/useAccountList-32cce5e6.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js"])}function MuteModal(){return __vitePreload(()=>import("./js/mute-modal-adf71913.js"),[])}function Filters(){return __vitePreload(()=>import("./js/index-194f1846.js"),["packs/js/index-194f1846.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js"])}function EditFilter(){return __vitePreload(()=>import("./js/edit-filter-eb79beb3.js"),["packs/js/edit-filter-eb79beb3.js","packs/js/streamfield-6197ce03.js"])}function ReportModal(){return __vitePreload(()=>import("./js/report-modal-0b861280.js"),["packs/js/report-modal-0b861280.js","packs/js/group-card-e8bab249.js","packs/js/group-header-image-068adc6d.js","packs/js/arrows-minimize-7c27a12c.js","packs/js/noop-3f99ae3e.js"])}function AccountModerationModal(){return __vitePreload(()=>import("./js/account-moderation-modal-e488ae8f.js"),[])}function PolicyModal$1(){return __vitePreload(()=>Promise.resolve().then(()=>policyModal),void 0)}const MediaGallery=reactExports.lazy(()=>__vitePreload(()=>import("./js/media-gallery-b081354c.js"),["packs/js/media-gallery-b081354c.js","packs/js/volume-08f8a8f1.js","packs/js/media-aspect-ratio-df6a7bb1.js"])),Video=reactExports.lazy(()=>__vitePreload(()=>import("./js/index-63ea9ebf.js").then(_e=>_e.i),["packs/js/index-63ea9ebf.js","packs/js/arrows-minimize-7c27a12c.js","packs/js/volume-08f8a8f1.js","packs/js/web.url.constructor-0fbaa340.js","packs/js/object-assign-35b0699c.js","packs/js/es.array.last-index-of-d76ad0ed.js","packs/js/media-aspect-ratio-df6a7bb1.js"])),Audio$1=reactExports.lazy(()=>__vitePreload(()=>import("./js/index-305a8551.js"),["packs/js/index-305a8551.js","packs/js/download-ac53125a.js","packs/js/volume-08f8a8f1.js","packs/js/index-63ea9ebf.js","packs/js/arrows-minimize-7c27a12c.js","packs/js/web.url.constructor-0fbaa340.js","packs/js/object-assign-35b0699c.js","packs/js/es.array.last-index-of-d76ad0ed.js","packs/js/media-aspect-ratio-df6a7bb1.js"]));function MediaModal(){return __vitePreload(()=>import("./js/media-modal-735f29ce.js"),["packs/js/media-modal-735f29ce.js","packs/js/arrow-right-b75290c7.js","packs/js/index-63ea9ebf.js","packs/js/arrows-minimize-7c27a12c.js","packs/js/volume-08f8a8f1.js","packs/js/web.url.constructor-0fbaa340.js","packs/js/object-assign-35b0699c.js","packs/js/es.array.last-index-of-d76ad0ed.js","packs/js/media-aspect-ratio-df6a7bb1.js","packs/js/download-ac53125a.js","packs/js/index-3399e540.js","packs/js/warning-07d0fac9.js","packs/js/index-305a8551.js","packs/js/thread-f9f548a4.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/pending-status-959f7aeb.js","packs/js/poll-preview-ddaf662b.js","packs/js/noop-3f99ae3e.js","packs/js/status-container-e53698d2.js"])}function VideoModal(){return __vitePreload(()=>import("./js/video-modal-1e593c2c.js"),["packs/js/video-modal-1e593c2c.js","packs/js/index-63ea9ebf.js","packs/js/arrows-minimize-7c27a12c.js","packs/js/volume-08f8a8f1.js","packs/js/web.url.constructor-0fbaa340.js","packs/js/object-assign-35b0699c.js","packs/js/es.array.last-index-of-d76ad0ed.js","packs/js/media-aspect-ratio-df6a7bb1.js"])}function BoostModal(){return __vitePreload(()=>import("./js/boost-modal-acdb3394.js"),[])}function ConfirmationModal(){return __vitePreload(()=>import("./js/confirmation-modal-fb803cce.js"),[])}function MissingDescriptionModal(){return __vitePreload(()=>import("./js/missing-description-modal-b7099f96.js"),[])}function ActionsModal(){return __vitePreload(()=>import("./js/actions-modal-50b0f682.js"),[])}function HotkeysModal(){return __vitePreload(()=>import("./js/hotkeys-modal-e6f1a2b7.js"),[])}function ComposeModal(){return __vitePreload(()=>import("./js/compose-modal-4c08c001.js"),["packs/js/compose-modal-4c08c001.js","packs/js/modal-root-3073c8e6.js"])}function ReplyMentionsModal(){return __vitePreload(()=>import("./js/reply-mentions-modal-88976cd4.js"),[])}function UnauthorizedModal(){return __vitePreload(()=>import("./js/unauthorized-modal-7c536f36.js"),[])}function EditFederationModal(){return __vitePreload(()=>import("./js/edit-federation-modal-75e12d59.js"),[])}function EmbedModal(){return __vitePreload(()=>import("./js/embed-modal-5ddfa846.js"),[])}function ComponentModal(){return __vitePreload(()=>import("./js/component-modal-db8b465c.js"),[])}function ReblogsModal(){return __vitePreload(()=>import("./js/reblogs-modal-3d6a5daf.js"),["packs/js/reblogs-modal-3d6a5daf.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js"])}function FavouritesModal(){return __vitePreload(()=>import("./js/favourites-modal-4f88d92b.js"),["packs/js/favourites-modal-4f88d92b.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js"])}function DislikesModal(){return __vitePreload(()=>import("./js/dislikes-modal-1a832d05.js"),["packs/js/dislikes-modal-1a832d05.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js"])}function ReactionsModal(){return __vitePreload(()=>import("./js/reactions-modal-c5e40e75.js"),["packs/js/reactions-modal-c5e40e75.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js"])}function MentionsModal(){return __vitePreload(()=>import("./js/mentions-modal-12dc1b96.js"),["packs/js/mentions-modal-12dc1b96.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js"])}function LandingPageModal(){return __vitePreload(()=>import("./js/landing-page-modal-a616178b.js"),[])}function BirthdaysModal(){return __vitePreload(()=>import("./js/birthdays-modal-6fbebf50.js"),["packs/js/birthdays-modal-6fbebf50.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/balloon-551f6642.js"])}function BirthdayPanel(){return __vitePreload(()=>import("./js/birthday-panel-af5c7f67.js"),["packs/js/birthday-panel-af5c7f67.js","packs/js/widget-84f84d09.js","packs/js/arrow-right-b75290c7.js"])}function AccountNoteModal(){return __vitePreload(()=>import("./js/account-note-modal-61325a84.js"),[])}function ListEditor(){return __vitePreload(()=>import("./js/index-4c479bc1.js"),["packs/js/index-4c479bc1.js","packs/js/backspace-c284aa0a.js"])}function ListAdder(){return __vitePreload(()=>import("./js/index-c3905184.js"),["packs/js/index-c3905184.js","packs/js/new-list-form-396f644a.js"])}function Search$1(){return __vitePreload(()=>import("./js/index-6f58feb4.js"),["packs/js/index-6f58feb4.js","packs/js/hashtag-394c7092.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/status-container-e53698d2.js","packs/js/placeholder-account-dcc395bb.js","packs/js/placeholder-hashtag-fb054a2b.js"])}function LogoutPage(){return __vitePreload(()=>import("./js/logout-c14b6e6f.js"),[])}function Settings(){return __vitePreload(()=>import("./js/index-9628cdd2.js"),["packs/js/index-9628cdd2.js","packs/js/accounts-2089f869.js"])}function EditProfile(){return __vitePreload(()=>import("./js/index-e23414ba.js"),["packs/js/index-e23414ba.js","packs/js/es.array.splice-adb98933.js","packs/js/streamfield-6197ce03.js","packs/js/useImageField-712debc5.js","packs/js/header-picker-cd9089b7.js","packs/js/photo-plus-14444f2c.js"])}function EditEmail(){return __vitePreload(()=>import("./js/index-ed3ec024.js"),["packs/js/index-ed3ec024.js","packs/js/es.promise.finally-0ef07e66.js"])}function EmailConfirmation(){return __vitePreload(()=>import("./js/index-75561210.js"),[])}function EditPassword(){return __vitePreload(()=>import("./js/index-245fef5c.js"),["packs/js/index-245fef5c.js","packs/js/es.promise.finally-0ef07e66.js"])}function DeleteAccount(){return __vitePreload(()=>import("./js/index-e3103347.js"),["packs/js/index-e3103347.js","packs/js/es.promise.finally-0ef07e66.js"])}function SoapboxConfig(){return __vitePreload(()=>import("./js/index-431739eb.js"),["packs/js/index-431739eb.js","packs/js/accordion-0fbf6d28.js","packs/js/dots-vertical-68cbc8e2.js","packs/js/file-input-c35dcc9b.js","packs/js/streamfield-6197ce03.js","packs/js/fork-awesome-icon-42a9fa19.js","packs/js/object-to-array-ff10cf63.js"])}function ExportData(){return __vitePreload(()=>import("./js/index-ba6fc339.js"),[])}function ImportData(){return __vitePreload(()=>import("./js/index-65e95827.js"),["packs/js/index-65e95827.js","packs/js/file-input-c35dcc9b.js"])}function Backups(){return __vitePreload(()=>import("./js/index-ef87d61e.js"),["packs/js/index-ef87d61e.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js"])}function MfaForm(){return __vitePreload(()=>import("./js/mfa-form-f8ae9bea.js"),["packs/js/mfa-form-f8ae9bea.js","packs/js/es.promise.finally-0ef07e66.js"])}function ChatIndex(){return __vitePreload(()=>import("./js/index-6797616c.js"),["packs/js/index-6797616c.js","packs/js/chat-search-input-ec7e67b1.js","packs/js/es.array.splice-adb98933.js","packs/js/index-85a17314.js","packs/js/mood-smile-6a052395.js","packs/js/lodash-e014fe55.js","packs/js/useDebounce-93e74587.js","packs/js/pull-to-refresh-a7e092ab.js","packs/js/accounts-2089f869.js"])}function ChatWidget(){return __vitePreload(()=>import("./js/chat-widget-a6429f4e.js"),["packs/js/chat-widget-a6429f4e.js","packs/js/useDebounce-93e74587.js","packs/js/chat-search-input-ec7e67b1.js","packs/js/es.array.splice-adb98933.js","packs/js/index-85a17314.js","packs/js/mood-smile-6a052395.js","packs/js/lodash-e014fe55.js","packs/js/pull-to-refresh-a7e092ab.js"])}function ServerInfo(){return __vitePreload(()=>import("./js/index-f8a350bd.js"),["packs/js/index-f8a350bd.js","packs/js/promo-panel-60d3b884.js","packs/js/fork-awesome-icon-42a9fa19.js","packs/js/widget-84f84d09.js","packs/js/arrow-right-b75290c7.js"])}function Dashboard(){return __vitePreload(()=>import("./js/index-aac4aed4.js"),["packs/js/index-aac4aed4.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/authorize-reject-buttons-1aaf0a6a.js","packs/js/download-ac53125a.js","packs/js/download-2e3dfb39.js","packs/js/dots-vertical-68cbc8e2.js","packs/js/accordion-0fbf6d28.js"])}function ModerationLog(){return __vitePreload(()=>import("./js/moderation-log-bade4226.js"),["packs/js/moderation-log-bade4226.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js"])}function ThemeEditor(){return __vitePreload(()=>import("./js/index-a4ed1d8d.js"),["packs/js/index-a4ed1d8d.js","packs/js/download-ac53125a.js","packs/js/download-2e3dfb39.js","packs/js/object-to-array-ff10cf63.js"])}function UserPanel(){return __vitePreload(()=>import("./js/user-panel-e3830968.js"),[])}function PromoPanel(){return __vitePreload(()=>import("./js/promo-panel-60d3b884.js"),["packs/js/promo-panel-60d3b884.js","packs/js/fork-awesome-icon-42a9fa19.js","packs/js/widget-84f84d09.js","packs/js/arrow-right-b75290c7.js"])}function SignUpPanel(){return __vitePreload(()=>import("./js/sign-up-panel-96b7bc81.js"),[])}function CtaBanner(){return __vitePreload(()=>import("./js/cta-banner-fbac72b3.js"),[])}function FundingPanel(){return __vitePreload(()=>import("./js/funding-panel-d69ca9fb.js"),["packs/js/funding-panel-d69ca9fb.js","packs/js/object-assign-35b0699c.js","packs/js/widget-84f84d09.js","packs/js/arrow-right-b75290c7.js"])}function TrendsPanel(){return __vitePreload(()=>import("./js/trends-panel-ab54a034.js"),["packs/js/trends-panel-ab54a034.js","packs/js/hashtag-394c7092.js","packs/js/widget-84f84d09.js","packs/js/arrow-right-b75290c7.js"])}function ProfileInfoPanel(){return __vitePreload(()=>import("./js/profile-info-panel-cec85d6e.js"),["packs/js/profile-info-panel-cec85d6e.js","packs/js/balloon-551f6642.js","packs/js/web.url.constructor-0fbaa340.js","packs/js/object-assign-35b0699c.js","packs/js/usePatronUser-c97ecc3d.js","packs/js/profile-field-946d1d6f.js","packs/js/profile-stats-6fec8ab1.js"])}function ProfileMediaPanel(){return __vitePreload(()=>import("./js/profile-media-panel-4acaf1d7.js"),["packs/js/profile-media-panel-4acaf1d7.js","packs/js/widget-84f84d09.js","packs/js/arrow-right-b75290c7.js","packs/js/media-item-f8ffc0fb.js","packs/js/volume-08f8a8f1.js","packs/js/es.array.last-index-of-d76ad0ed.js"])}function ProfileFieldsPanel(){return __vitePreload(()=>import("./js/profile-fields-panel-9418d645.js"),["packs/js/profile-fields-panel-9418d645.js","packs/js/widget-84f84d09.js","packs/js/arrow-right-b75290c7.js","packs/js/profile-field-946d1d6f.js"])}function PinnedAccountsPanel(){return __vitePreload(()=>import("./js/pinned-accounts-panel-22ccbc02.js"),["packs/js/pinned-accounts-panel-22ccbc02.js","packs/js/widget-84f84d09.js","packs/js/arrow-right-b75290c7.js"])}function InstanceInfoPanel(){return __vitePreload(()=>import("./js/instance-info-panel-1387c676.js"),["packs/js/instance-info-panel-1387c676.js","packs/js/widget-84f84d09.js","packs/js/arrow-right-b75290c7.js"])}function InstanceModerationPanel(){return __vitePreload(()=>import("./js/instance-moderation-panel-a8c2611c.js"),["packs/js/instance-moderation-panel-a8c2611c.js","packs/js/dots-vertical-68cbc8e2.js","packs/js/widget-84f84d09.js","packs/js/arrow-right-b75290c7.js","packs/js/instance-restrictions-d5ec77d9.js"])}function LatestAccountsPanel(){return __vitePreload(()=>import("./js/latest-accounts-panel-54623f66.js"),["packs/js/latest-accounts-panel-54623f66.js","packs/js/widget-84f84d09.js","packs/js/arrow-right-b75290c7.js"])}function SidebarMenu(){return __vitePreload(()=>import("./js/sidebar-menu-9774afae.js"),["packs/js/sidebar-menu-9774afae.js","packs/js/hash-746ab8b6.js","packs/js/profile-stats-6fec8ab1.js"])}function ModalContainer(){return __vitePreload(()=>import("./js/modal-container-d4d02030.js"),["packs/js/modal-container-d4d02030.js","packs/js/modal-root-3073c8e6.js"])}function ProfileHoverCard(){return __vitePreload(()=>import("./js/profile-hover-card-4eadd46d.js"),["packs/js/profile-hover-card-4eadd46d.js","packs/js/usePopper-4a92d7ef.js","packs/js/usePatronUser-c97ecc3d.js"])}function StatusHoverCard(){return __vitePreload(()=>import("./js/status-hover-card-f61749bb.js"),["packs/js/status-hover-card-f61749bb.js","packs/js/usePopper-4a92d7ef.js","packs/js/status-container-e53698d2.js"])}function ScheduledStatuses(){return __vitePreload(()=>import("./js/index-6adba802.js"),["packs/js/index-6adba802.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/poll-preview-ddaf662b.js","packs/js/noop-3f99ae3e.js"])}function UserIndex(){return __vitePreload(()=>import("./js/user-index-7d345da1.js"),["packs/js/user-index-7d345da1.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js"])}function FederationRestrictions(){return __vitePreload(()=>import("./js/index-d7234eb4.js"),["packs/js/index-d7234eb4.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/accordion-0fbf6d28.js","packs/js/dots-vertical-68cbc8e2.js","packs/js/instance-restrictions-d5ec77d9.js"])}function Aliases(){return __vitePreload(()=>import("./js/index-5b71c76b.js"),["packs/js/index-5b71c76b.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/backspace-c284aa0a.js"])}function Migration(){return __vitePreload(()=>import("./js/index-74f11771.js"),[])}function ScheduleForm(){return __vitePreload(()=>import("./js/schedule-form-89b40965.js"),[])}function WhoToFollowPanel(){return __vitePreload(()=>import("./js/who-to-follow-panel-105a50e7.js"),["packs/js/who-to-follow-panel-105a50e7.js","packs/js/widget-84f84d09.js","packs/js/arrow-right-b75290c7.js","packs/js/suggestions-28e579c4.js"])}function FollowRecommendations(){return __vitePreload(()=>import("./js/index-f4071e0c.js"),["packs/js/index-f4071e0c.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js"])}function Directory(){return __vitePreload(()=>import("./js/index-e00cba31.js"),["packs/js/index-e00cba31.js","packs/js/load-more-55559f32.js"])}function Share(){return __vitePreload(()=>import("./js/index-89c90e00.js"),[])}function NewStatus(){return __vitePreload(()=>import("./js/index-f47cddad.js"),[])}function IntentionalError(){return __vitePreload(()=>import("./js/index-71d24d87.js"),[])}function Developers(){return __vitePreload(()=>import("./js/index-733cc03a.js"),[])}function CreateApp(){return __vitePreload(()=>import("./js/create-990cc91d.js"),[])}function SettingsStore(){return __vitePreload(()=>import("./js/settings-store-be34f359.js"),[])}function TestTimeline(){return __vitePreload(()=>import("./js/index-5eda592e.js"),["packs/js/index-5eda592e.js","packs/js/timeline-456dace7.js","packs/js/scroll-top-button-73ec9889.js","packs/js/status-list-c10445e1.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/status-container-e53698d2.js","packs/js/pending-status-959f7aeb.js","packs/js/poll-preview-ddaf662b.js","packs/js/noop-3f99ae3e.js"])}function ServiceWorkerInfo(){return __vitePreload(()=>import("./js/service-worker-info-8051c8bb.js"),[])}function DatePicker(){return __vitePreload(()=>import("./js/date-picker-63c681ce.js"),["packs/js/date-picker-63c681ce.js","packs/js/usePopper-4a92d7ef.js","packs/js/warning-07d0fac9.js"])}function OnboardingWizard(){return __vitePreload(()=>import("./js/onboarding-wizard-d2099c82.js"),["packs/js/onboarding-wizard-d2099c82.js","packs/js/index-3399e540.js","packs/js/warning-07d0fac9.js","packs/js/web.url.constructor-0fbaa340.js","packs/js/object-assign-35b0699c.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/suggestions-28e579c4.js"])}function WaitlistPage(){return __vitePreload(()=>import("./js/waitlist-page-7f7001df.js"),[])}function CompareHistoryModal(){return __vitePreload(()=>import("./js/compare-history-modal-03ca0264.js"),[])}function AuthTokenList(){return __vitePreload(()=>import("./js/index-fb7821f2.js"),[])}function VerifySmsModal(){return __vitePreload(()=>import("./js/verify-sms-modal-34fd41dc.js"),["packs/js/verify-sms-modal-34fd41dc.js","packs/js/es.promise.finally-0ef07e66.js"])}function FamiliarFollowersModal(){return __vitePreload(()=>import("./js/familiar-followers-modal-6deccc90.js"),["packs/js/familiar-followers-modal-6deccc90.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js"])}function AnnouncementsPanel(){return __vitePreload(()=>import("./js/announcements-panel-4de5dd74.js"),["packs/js/announcements-panel-4de5dd74.js","packs/js/index-3399e540.js","packs/js/warning-07d0fac9.js","packs/js/widget-84f84d09.js","packs/js/arrow-right-b75290c7.js"])}function Quotes(){return __vitePreload(()=>import("./js/index-ea8f597d.js"),["packs/js/index-ea8f597d.js","packs/js/lodash-e014fe55.js","packs/js/status-list-c10445e1.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/status-container-e53698d2.js","packs/js/pending-status-959f7aeb.js","packs/js/poll-preview-ddaf662b.js","packs/js/noop-3f99ae3e.js"])}function ComposeEventModal(){return __vitePreload(()=>import("./js/compose-event-modal-d79d7a70.js"),["packs/js/compose-event-modal-d79d7a70.js","packs/js/backspace-c284aa0a.js","packs/js/modal-root-3073c8e6.js","packs/js/schedule-form-89b40965.js","packs/js/photo-plus-14444f2c.js"])}function JoinEventModal(){return __vitePreload(()=>import("./js/join-event-modal-75060207.js"),[])}function EventHeader(){return __vitePreload(()=>import("./js/event-header-55d43bbc.js"),["packs/js/event-header-55d43bbc.js","packs/js/download-2e3dfb39.js"])}function EventInformation(){return __vitePreload(()=>import("./js/event-information-8646cc5b.js"),[])}function EventDiscussion(){return __vitePreload(()=>import("./js/event-discussion-d1b152dc.js"),["packs/js/event-discussion-d1b152dc.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/pending-status-959f7aeb.js","packs/js/poll-preview-ddaf662b.js","packs/js/noop-3f99ae3e.js","packs/js/thread-f9f548a4.js","packs/js/status-container-e53698d2.js"])}function EventMapModal(){return __vitePreload(()=>import("./js/event-map-modal-4a83ec56.js"),["packs/js/event-map-modal-4a83ec56.js","packs/assets/event-map-modal-8c7ef4a9.css"])}function EventParticipantsModal(){return __vitePreload(()=>import("./js/event-participants-modal-c140b263.js"),["packs/js/event-participants-modal-c140b263.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js"])}function Events(){return __vitePreload(()=>import("./js/index-1a285129.js"),["packs/js/index-1a285129.js","packs/js/index-3399e540.js","packs/js/warning-07d0fac9.js"])}function Groups(){return __vitePreload(()=>import("./js/index-d7afcbc5.js"),["packs/js/index-d7afcbc5.js","packs/js/useDebounce-93e74587.js","packs/js/group-card-e8bab249.js","packs/js/group-header-image-068adc6d.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/permissions-2149f5e2.js","packs/js/placeholder-group-card-a81c5966.js","packs/js/pending-items-row-1f87d8f3.js","packs/js/tab-bar-777df18a.js"])}function GroupsDiscover(){return __vitePreload(()=>import("./js/discover-2d5870bd.js"),["packs/js/discover-2d5870bd.js","packs/js/usePopularGroups-d12a3589.js","packs/js/layout-list-e34f9942.js","packs/js/group-header-image-068adc6d.js","packs/js/tag-list-item-bf8ca941.js","packs/js/useDebounce-93e74587.js","packs/js/placeholder-group-search-1a309751.js","packs/js/index-85a17314.js","packs/js/group-list-item-d71c8a2e.js","packs/js/layout-buttons-127c2f5f.js","packs/js/useSuggestedGroups-a15d5e07.js","packs/js/tab-bar-777df18a.js"])}function GroupsPopular(){return __vitePreload(()=>import("./js/popular-208feabb.js"),["packs/js/popular-208feabb.js","packs/js/index-85a17314.js","packs/js/usePopularGroups-d12a3589.js","packs/js/layout-list-e34f9942.js","packs/js/group-header-image-068adc6d.js","packs/js/group-list-item-d71c8a2e.js","packs/js/layout-buttons-127c2f5f.js"])}function GroupsSuggested(){return __vitePreload(()=>import("./js/suggested-be3633e0.js"),["packs/js/suggested-be3633e0.js","packs/js/index-85a17314.js","packs/js/useSuggestedGroups-a15d5e07.js","packs/js/layout-list-e34f9942.js","packs/js/group-header-image-068adc6d.js","packs/js/group-list-item-d71c8a2e.js","packs/js/layout-buttons-127c2f5f.js"])}function GroupsTag(){return __vitePreload(()=>import("./js/tag-ca20a566.js"),["packs/js/tag-ca20a566.js","packs/js/layout-list-e34f9942.js","packs/js/group-header-image-068adc6d.js","packs/js/index-85a17314.js","packs/js/useGroupTag-9c7d1cac.js","packs/js/group-list-item-d71c8a2e.js"])}function GroupsTags(){return __vitePreload(()=>import("./js/tags-f0b4cdee.js"),["packs/js/tags-f0b4cdee.js","packs/js/index-85a17314.js","packs/js/tag-list-item-bf8ca941.js"])}function PendingGroupRequests(){return __vitePreload(()=>import("./js/pending-requests-aa9d3531.js"),["packs/js/pending-requests-aa9d3531.js","packs/js/group-card-e8bab249.js","packs/js/group-header-image-068adc6d.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/placeholder-group-card-a81c5966.js"])}function GroupMembers(){return __vitePreload(()=>import("./js/group-members-c0d4ea9d.js"),["packs/js/group-members-c0d4ea9d.js","packs/js/useGroupMembers-4d4508c4.js","packs/js/pending-items-row-1f87d8f3.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/placeholder-account-dcc395bb.js"])}function GroupTags(){return __vitePreload(()=>import("./js/group-tags-42eed4b5.js"),["packs/js/group-tags-42eed4b5.js","packs/js/hash-746ab8b6.js","packs/js/useGroupTags-a5aa31b5.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/placeholder-account-dcc395bb.js"])}function GroupTagTimeline(){return __vitePreload(()=>import("./js/group-tag-timeline-f9340654.js"),["packs/js/group-tag-timeline-f9340654.js","packs/js/message-2-2f21ce66.js","packs/js/useGroupTag-9c7d1cac.js","packs/js/timeline-456dace7.js","packs/js/scroll-top-button-73ec9889.js","packs/js/status-list-c10445e1.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/status-container-e53698d2.js","packs/js/pending-status-959f7aeb.js","packs/js/poll-preview-ddaf662b.js","packs/js/noop-3f99ae3e.js"])}function GroupTimeline(){return __vitePreload(()=>import("./js/group-timeline-754a6fbe.js"),["packs/js/group-timeline-754a6fbe.js","packs/js/message-2-2f21ce66.js","packs/js/timeline-456dace7.js","packs/js/scroll-top-button-73ec9889.js","packs/js/status-list-c10445e1.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/status-container-e53698d2.js","packs/js/pending-status-959f7aeb.js","packs/js/poll-preview-ddaf662b.js","packs/js/noop-3f99ae3e.js"])}function ManageGroup(){return __vitePreload(()=>import("./js/manage-group-7434b0f0.js"),[])}function EditGroup(){return __vitePreload(()=>import("./js/edit-group-81dff6cb.js"),["packs/js/edit-group-81dff6cb.js","packs/js/es.array.splice-adb98933.js","packs/js/useGroupTags-a5aa31b5.js","packs/js/useImageField-712debc5.js","packs/js/header-picker-cd9089b7.js","packs/js/photo-plus-14444f2c.js","packs/js/group-tags-field-13c248c9.js","packs/js/streamfield-6197ce03.js"])}function GroupBlockedMembers(){return __vitePreload(()=>import("./js/group-blocked-members-92a06c91.js"),["packs/js/group-blocked-members-92a06c91.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js"])}function GroupMembershipRequests(){return __vitePreload(()=>import("./js/group-membership-requests-400e3915.js"),["packs/js/group-membership-requests-400e3915.js","packs/js/useGroupMembers-4d4508c4.js","packs/js/authorize-reject-buttons-1aaf0a6a.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js"])}function GroupGallery(){return __vitePreload(()=>import("./js/group-gallery-df350fcd.js"),["packs/js/group-gallery-df350fcd.js","packs/js/load-more-55559f32.js","packs/js/media-item-f8ffc0fb.js","packs/js/volume-08f8a8f1.js","packs/js/es.array.last-index-of-d76ad0ed.js"])}function CreateGroupModal(){return __vitePreload(()=>import("./js/create-group-modal-efc3bce4.js"),["packs/js/create-group-modal-efc3bce4.js","packs/js/useDebounce-93e74587.js","packs/js/es.array.splice-adb98933.js","packs/js/header-picker-cd9089b7.js","packs/js/photo-plus-14444f2c.js","packs/js/group-tags-field-13c248c9.js","packs/js/streamfield-6197ce03.js"])}function NewGroupPanel(){return __vitePreload(()=>import("./js/new-group-panel-00a252ec.js"),["packs/js/new-group-panel-00a252ec.js","packs/js/permissions-2149f5e2.js"])}function MyGroupsPanel(){return __vitePreload(()=>import("./js/my-groups-panel-d41ae74e.js"),["packs/js/my-groups-panel-d41ae74e.js","packs/js/widget-84f84d09.js","packs/js/arrow-right-b75290c7.js","packs/js/group-list-item-d71c8a2e.js","packs/js/placeholder-group-search-1a309751.js"])}function SuggestedGroupsPanel(){return __vitePreload(()=>import("./js/suggested-groups-panel-20f9b5ed.js"),["packs/js/suggested-groups-panel-20f9b5ed.js","packs/js/useSuggestedGroups-a15d5e07.js","packs/js/widget-84f84d09.js","packs/js/arrow-right-b75290c7.js","packs/js/group-list-item-d71c8a2e.js","packs/js/placeholder-group-search-1a309751.js"])}function GroupMediaPanel(){return __vitePreload(()=>import("./js/group-media-panel-8bea6b23.js"),["packs/js/group-media-panel-8bea6b23.js","packs/js/widget-84f84d09.js","packs/js/arrow-right-b75290c7.js","packs/js/media-item-f8ffc0fb.js","packs/js/volume-08f8a8f1.js","packs/js/es.array.last-index-of-d76ad0ed.js"])}function NewEventPanel(){return __vitePreload(()=>import("./js/new-event-panel-1fbbcf6a.js"),[])}function Announcements(){return __vitePreload(()=>import("./js/announcements-7255f0c7.js"),["packs/js/announcements-7255f0c7.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js"])}function EditAnnouncementModal(){return __vitePreload(()=>import("./js/edit-announcement-modal-7321cc37.js"),[])}function FollowedTags(){return __vitePreload(()=>import("./js/index-4dc438b1.js"),["packs/js/index-4dc438b1.js","packs/js/hashtag-394c7092.js","packs/js/scrollable-list-1e43c72d.js","packs/js/index-85a17314.js","packs/js/load-more-55559f32.js","packs/js/placeholder-hashtag-fb054a2b.js"])}function EmojiPickerModal(){return __vitePreload(()=>import("./js/emoji-picker-modal-a3e23f07.js"),[])}var EmojiPicker,messages$16={emoji:{id:"emoji_button.label",defaultMessage:"Insert emoji"},emoji_pick:{id:"emoji_button.pick",defaultMessage:"Pick an emoji…"},emoji_oh_no:{id:"emoji_button.oh_no",defaultMessage:"Oh no!"},emoji_search:{id:"emoji_button.search",defaultMessage:"Search…"},emoji_not_found:{id:"emoji_button.not_found",defaultMessage:"No emoji's found."},emoji_add_custom:{id:"emoji_button.add_custom",defaultMessage:"Add custom emoji"},recent:{id:"emoji_button.recent",defaultMessage:"Frequently used"},search_results:{id:"emoji_button.search_results",defaultMessage:"Search results"},people:{id:"emoji_button.people",defaultMessage:"People"},nature:{id:"emoji_button.nature",defaultMessage:"Nature"},food:{id:"emoji_button.food",defaultMessage:"Food & Drink"},activity:{id:"emoji_button.activity",defaultMessage:"Activity"},travel:{id:"emoji_button.travel",defaultMessage:"Travel & Places"},objects:{id:"emoji_button.objects",defaultMessage:"Objects"},symbols:{id:"emoji_button.symbols",defaultMessage:"Symbols"},flags:{id:"emoji_button.flags",defaultMessage:"Flags"},skins_choose:{id:"emoji_button.skins_choose",defaultMessage:"Choose default skin tone"},skins_1:{id:"emoji_button.skins_1",defaultMessage:"Default"},skins_2:{id:"emoji_button.skins_2",defaultMessage:"Light"},skins_3:{id:"emoji_button.skins_3",defaultMessage:"Medium-Light"},skins_4:{id:"emoji_button.skins_4",defaultMessage:"Medium"},skins_5:{id:"emoji_button.skins_5",defaultMessage:"Medium-Dark"},skins_6:{id:"emoji_button.skins_6",defaultMessage:"Dark"}},perLine=8,lines=2,DEFAULTS=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","yum","disappointed","thinking_face","weary","sob","sunglasses","heart","ok_hand"],getFrequentlyUsedEmojis=createSelector([function(_e){return _e.settings.get("frequentlyUsedEmojis",Map$3())}],function(_e){var et=_e.keySeq().sort(function(nt,rt){return _e.get(nt)-_e.get(rt)}).reverse().slice(0,perLine*lines).toArray();if(et.lengthrt?1:0})}),RenderAfter=function _e(et){var tt=et.children,nt=et.update,rt=reactExports.useState(!1),at=_slicedToArray$4(rt,2),it=at[0],ot=at[1];return reactExports.useEffect(function(){setTimeout(function(){ot(!0)},0)},[]),reactExports.useLayoutEffect(function(){it&&nt()},[it,nt]),it?tt:null},EmojiPickerDropdown=function _e(et){var tt=et.onPickEmoji,nt=et.visible,rt=et.setVisible,at=et.update,it=et.withCustom,ot=it===void 0?!0:it,st=et.dynamicWidth,ct=st===void 0?!1:st,ut=et.emojiSize,dt=ut===void 0?{size:22,buttonSize:34}:ut,ft=useIntl(),pt=useAppDispatch(),mt=useSettings(),ht=ft.formatMessage(messages$16.emoji),Et=mt.get("themeMode"),yt=Et==="dark"||Et==="light"?Et:"auto",vt=useAppSelector(function(kt){return getCustomEmojis(kt)}),gt=useAppSelector(function(kt){return getFrequentlyUsedEmojis(kt)}),St=reactExports.useState(!1),Rt=_slicedToArray$4(St,2),$t=Rt[0],bt=Rt[1],wt=function(Pt){rt(!1);var Ft;Pt.native?Ft={id:Pt.id,colons:Pt.shortcodes,custom:!1,native:Pt.native,unified:Pt.unified}:Ft={id:Pt.id,colons:Pt.shortcodes,custom:!0,imageUrl:Pt.src},pt(useEmoji(Ft)),tt&&tt(Ft)},xt=function(Pt){pt(changeSetting(["skinTone"],Pt))},Tt=function(){return{search:ft.formatMessage(messages$16.emoji_search),pick:ft.formatMessage(messages$16.emoji_pick),search_no_results_1:ft.formatMessage(messages$16.emoji_oh_no),search_no_results_2:ft.formatMessage(messages$16.emoji_not_found),add_custom:ft.formatMessage(messages$16.emoji_add_custom),categories:{search:ft.formatMessage(messages$16.search_results),frequent:ft.formatMessage(messages$16.recent),people:ft.formatMessage(messages$16.people),nature:ft.formatMessage(messages$16.nature),foods:ft.formatMessage(messages$16.food),activity:ft.formatMessage(messages$16.activity),places:ft.formatMessage(messages$16.travel),objects:ft.formatMessage(messages$16.objects),symbols:ft.formatMessage(messages$16.symbols),flags:ft.formatMessage(messages$16.flags)},skins:{choose:ft.formatMessage(messages$16.skins_choose),1:ft.formatMessage(messages$16.skins_1),2:ft.formatMessage(messages$16.skins_2),3:ft.formatMessage(messages$16.skins_3),4:ft.formatMessage(messages$16.skins_4),5:ft.formatMessage(messages$16.skins_5),6:ft.formatMessage(messages$16.skins_6)}}};reactExports.useEffect(function(){nt?document.body.style.overflow="hidden":document.body.style.overflow="",EmojiPicker||(bt(!0),EmojiPicker$1().then(function(kt){EmojiPicker=kt.Picker,bt(!1)}).catch(function(){bt(!1)}))},[nt]),reactExports.useEffect(function(){return function(){document.body.style.overflow=""}},[]);var Ct;ot&&(Ct=buildCustomEmojiPack(vt));var Nt=Ct?Object.keys(Ct):[],At=["frequent"].concat(_toConsumableArray(Nt),["people","nature","foods","activity","places","objects","symbols","flags"]);return nt?_createRawReactElement(RenderAfter,{update:at},void 0,!$t&&_createRawReactElement(EmojiPicker,{custom:Nt.map(function(kt){var Pt;return((Pt=Ct)!==null&&Pt!==void 0?Pt:{})[kt]}),categories:At,title:ht,onEmojiSelect:wt,recent:gt,perLine:8,skin:xt,emojiSize:dt.size,emojiButtonSize:dt.buttonSize,set:"twitter",theme:yt,i18n:Tt(),skinTonePosition:"search",previewPosition:"none",dynamicWidth:ct})):null},EmojiButton=function _e(et){var tt=et.emoji,nt=et.className,rt=et.onClick,at=et.tabIndex,it=function(st){st.preventDefault(),st.stopPropagation(),rt(tt)};return _createRawReactElement("button",{className:clsx(nt),onClick:it,tabIndex:at},void 0,_createRawReactElement(Emoji,{className:"h-6 w-6 duration-100 hover:scale-110",emoji:tt}))},EmojiSelector=function _e(et){var tt=et.referenceElement,nt=et.onClose,rt=et.onReact,at=et.placement,it=at===void 0?"top":at,ot=et.visible,st=ot===void 0?!1:ot,ct=et.offsetOptions,ut=et.all,dt=ut===void 0?!0:ut,ft=useAppDispatch(),pt=useSoapboxConfig(),mt=useFeatures(),ht=mt.customEmojiReacts,Et=reactExports.useState(!1),yt=_slicedToArray$4(Et,2),vt=yt[0],gt=yt[1],St=isUserTouching(),Rt=useFloating({placement:it,transform:!1,middleware:[offset$1(ct),flip({fallbackPlacements:["right","left","bottom"]}),shift$1({crossAxis:!0})]}),$t=Rt.x,bt=Rt.y,wt=Rt.strategy,xt=Rt.refs,Tt=Rt.update,Ct=function(){St?(ft(openModal("EMOJI_PICKER",{onPickEmoji:Nt})),nt&&nt()):gt(!0)},Nt=function(kt){rt(kt.custom?kt.id:kt.native,kt.custom?kt.imageUrl:void 0)};return reactExports.useEffect(function(){xt.setReference(tt)},[tt]),reactExports.useEffect(function(){return function(){document.body.style.overflow=""}},[]),reactExports.useEffect(function(){gt(!1)},[st]),useClickOutside(xt,function(){nt&&nt()}),React$3.createElement("div",{className:clsx("z-[101] transition-opacity duration-100",{"opacity-0 pointer-events-none":!st}),ref:xt.setFloating,style:{position:wt,top:bt??0,left:$t??0,width:"max-content"}},vt?_createRawReactElement(EmojiPickerDropdown,{visible:vt,setVisible:gt,update:Tt,withCustom:ht,onPickEmoji:Nt}):_createRawReactElement(HStack,{className:clsx("z-[999] flex w-max max-w-[100vw] flex-wrap space-x-3 rounded-full bg-white px-3 py-2.5 shadow-lg focus:outline-none dark:bg-gray-900 dark:ring-2 dark:ring-primary-700")},void 0,Array.from(pt.allowedEmoji).map(function(At,kt){return _createRawReactElement(EmojiButton,{emoji:At,onClick:rt,tabIndex:st?0:-1},kt)}),dt&&_createRawReactElement(IconButton$1,{className:"text-gray-600 hover:text-gray-600 dark:hover:text-white",src:vitePluginRequire_1697864655029_75763737,onClick:Ct})))},_excluded$j=["onSubmit","children"],Form=function _e(et){var tt=et.onSubmit,nt=et.children,rt=_objectWithoutProperties(et,_excluded$j),at=React$3.useCallback(function(it){it.preventDefault(),tt&&tt(it)},[tt]);return React$3.createElement("form",_extends$4({"data-testid":"form",onSubmit:at,className:"space-y-4"},rt),nt)},FormActions=function _e(et){var tt=et.children;return _createRawReactElement(HStack,{space:2,justifyContent:"end"},void 0,tt)},FormGroup=function _e(et){var tt,nt=et.children,rt=et.errors,at=rt===void 0?[]:rt,it=et.labelText,ot=et.labelTitle,st=et.hintText,ct=reactExports.useMemo(function(){return"field-".concat(v4())},[]),ut=React$3.Children.toArray(nt),dt=(at==null?void 0:at.length)>0,ft;React$3.isValidElement(ut[0])&&(ft=React$3.cloneElement(ut[0],{id:ct}));var pt=((tt=ft)===null||tt===void 0?void 0:tt.type)===Checkbox;return pt?_createRawReactElement(HStack,{alignItems:"start",space:2},void 0,ft,_createRawReactElement(Stack,{},void 0,it&&_createRawReactElement("label",{htmlFor:ct,"data-testid":"form-group-label",className:"-mt-0.5 block text-sm font-medium text-gray-900 dark:text-gray-100",title:ot},void 0,it),dt&&_createRawReactElement("div",{},void 0,_createRawReactElement("p",{"data-testid":"form-group-error",className:"form-error relative mt-0.5 inline-block rounded-md bg-danger-200 px-2 py-1 text-xs text-danger-900"},void 0,at.join(", "))),st&&_createRawReactElement("p",{"data-testid":"form-group-hint",className:"mt-0.5 text-xs text-gray-700 dark:text-gray-600"},void 0,st))):_createRawReactElement("div",{},void 0,it&&_createRawReactElement("label",{htmlFor:ct,"data-testid":"form-group-label",className:"block text-sm font-medium text-gray-900 dark:text-gray-100",title:ot},void 0,it),_createRawReactElement("div",{className:"mt-1 dark:text-white"},void 0,st&&_createRawReactElement("p",{"data-testid":"form-group-hint",className:"mb-0.5 text-xs text-gray-700 dark:text-gray-600"},void 0,st),ft,ut.filter(function(mt,ht){return ht!==0}),dt&&_createRawReactElement("p",{"data-testid":"form-group-error",className:"form-error relative mt-0.5 inline-block rounded-md bg-danger-200 px-2 py-1 text-xs text-danger-900"},void 0,at.join(", "))))},_excluded$i=["src","className","iconClassName","text","theme"],IconButton$1=React$3.forwardRef(function(_e,et){var tt=_e.src,nt=_e.className,rt=_e.iconClassName,at=_e.text,it=_e.theme,ot=it===void 0?"seamless":it,st=_objectWithoutProperties(_e,_excluded$i);return React$3.createElement("button",_extends$4({ref:et,type:"button",className:clsx("flex items-center space-x-2 rounded-full p-1 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:ring-offset-0",{"bg-white dark:bg-transparent":ot==="seamless","border border-solid bg-transparent border-gray-400 dark:border-gray-800 hover:border-primary-300 dark:hover:border-primary-700 focus:border-primary-500 text-gray-900 dark:text-gray-100 focus:ring-primary-500":ot==="outlined","border-transparent bg-primary-100 dark:bg-primary-800 hover:bg-primary-50 dark:hover:bg-primary-700 focus:bg-primary-100 dark:focus:bg-primary-800 text-primary-500 dark:text-primary-200":ot==="secondary","bg-gray-900 text-white":ot==="dark","opacity-50":st.disabled},nt)},st,{"data-testid":st["data-testid"]||"icon-button"}),_createRawReactElement(SvgIcon,{src:tt,className:rt}),at?_createRawReactElement(Text$2,{tag:"span",theme:"inherit",size:"sm"},void 0,at):null)});const vitePluginRequire_1697864669798_42893661="/packs/assets/eye-e16766ce.svg",vitePluginRequire_1697864669798_43594879="/packs/assets/eye-off-3304e20e.svg";var $$f=_export,fails$a=fails$F,toIndexedObject$2=toIndexedObject$a,nativeGetOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,DESCRIPTORS$8=descriptors$1,FORCED$3=!DESCRIPTORS$8||fails$a(function(){nativeGetOwnPropertyDescriptor(1)});$$f({target:"Object",stat:!0,forced:FORCED$3,sham:!DESCRIPTORS$8},{getOwnPropertyDescriptor:function _e(et,tt){return nativeGetOwnPropertyDescriptor(toIndexedObject$2(et),tt)}});var domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},documentCreateElement=documentCreateElement$2,classList=documentCreateElement("span").classList,DOMTokenListPrototype$2=classList&&classList.constructor&&classList.constructor.prototype,domTokenListPrototype=DOMTokenListPrototype$2===Object.prototype?void 0:DOMTokenListPrototype$2,$forEach=arrayIteration.forEach,arrayMethodIsStrict$1=arrayMethodIsStrict$4,STRICT_METHOD=arrayMethodIsStrict$1("forEach"),arrayForEach=STRICT_METHOD?[].forEach:function _e(et){return $forEach(this,et,arguments.length>1?arguments[1]:void 0)},global$6=global$w,DOMIterables$1=domIterables,DOMTokenListPrototype$1=domTokenListPrototype,forEach=arrayForEach,createNonEnumerableProperty$4=createNonEnumerableProperty$a,handlePrototype$1=function(_e){if(_e&&_e.forEach!==forEach)try{createNonEnumerableProperty$4(_e,"forEach",forEach)}catch{_e.forEach=forEach}};for(var COLLECTION_NAME$1 in DOMIterables$1)DOMIterables$1[COLLECTION_NAME$1]&&handlePrototype$1(global$6[COLLECTION_NAME$1]&&global$6[COLLECTION_NAME$1].prototype);handlePrototype$1(DOMTokenListPrototype$1);var $$e=_export,DESCRIPTORS$7=descriptors$1,ownKeys$i=ownKeys$l,toIndexedObject$1=toIndexedObject$a,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,createProperty$1=createProperty$6;$$e({target:"Object",stat:!0,sham:!DESCRIPTORS$7},{getOwnPropertyDescriptors:function _e(et){for(var tt=toIndexedObject$1(et),nt=getOwnPropertyDescriptorModule.f,rt=ownKeys$i(tt),at={},it=0,ot,st;rt.length>it;)st=nt(tt,ot=rt[it++]),st!==void 0&&createProperty$1(at,ot,st);return at}});var $$d=_export,DESCRIPTORS$6=descriptors$1,defineProperties=objectDefineProperties.f;$$d({target:"Object",stat:!0,forced:Object.defineProperties!==defineProperties,sham:!DESCRIPTORS$6},{defineProperties});var $$c=_export,DESCRIPTORS$5=descriptors$1,defineProperty$4=objectDefineProperty.f;$$c({target:"Object",stat:!0,forced:Object.defineProperty!==defineProperty$4,sham:!DESCRIPTORS$5},{defineProperty:defineProperty$4});function ownKeys$h(_e,et){var tt=Object.keys(_e);if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(_e);et&&(nt=nt.filter(function(rt){return Object.getOwnPropertyDescriptor(_e,rt).enumerable})),tt.push.apply(tt,nt)}return tt}function _objectSpread$g(_e){for(var et=1;et{let et=_e;for(;et=et.parentElement;){const tt=getComputedStyle(et,null).getPropertyValue("overflow-y");if(et===document.body)return window;if(tt==="auto"||tt==="scroll"||tt==="overlay")return et}return window},isOffsetElement=_e=>_e.firstChild?_e.firstChild.offsetParent===_e:!0,offsetTill=(_e,et)=>{let tt=_e,nt=0;isOffsetElement(et)||(nt+=_e.offsetTop-et.offsetTop,et=_e.offsetParent,nt+=-_e.offsetTop);do nt+=tt.offsetTop,tt=tt.offsetParent;while(tt&&tt!==et);return nt},getParentNode=_e=>{let et=_e.parentElement;for(;et&&getComputedStyle(et,null).getPropertyValue("display")==="contents";)et=et.parentElement;return et||window},stickyProp=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?stickyProp="sticky":CSS.supports("position","-webkit-sticky")&&(stickyProp="-webkit-sticky"));var passiveArg=!1;try{const _e=Object.defineProperty({},"passive",{get(){passiveArg={passive:!0}}}),et=()=>{};window.addEventListener("testPassive",et,_e),window.removeEventListener("testPassive",et,_e)}catch(_e){}var getDimensions=_e=>{const{el:et,onChange:tt,unsubs:nt,measure:rt}=_e;if(et===window){const at=()=>({top:0,left:0,height:window.innerHeight,width:window.innerWidth}),it=rt(at()),ot=()=>{Object.assign(it,rt(at())),tt()};return window.addEventListener("resize",ot,passiveArg),nt.push(()=>window.removeEventListener("resize",ot)),it}else{const at=rt(et.getBoundingClientRect()),it=()=>{Object.assign(at,rt(et.getBoundingClientRect())),tt()},ot=new ResizeObserver(it);return ot.observe(et),nt.push(()=>ot.disconnect()),at}},getVerticalPadding=_e=>{const et=getComputedStyle(_e,null),tt=parseInt(et.getPropertyValue("padding-top"),10),nt=parseInt(et.getPropertyValue("padding-bottom"),10);return{top:tt,bottom:nt}},setup=(_e,et,tt)=>{const{bottom:nt,offsetBottom:rt,offsetTop:at}=tt,it=getScrollParent(_e);let ot=!1;const st=()=>{ot||requestAnimationFrame(()=>{const bt=dt();bt!==gt&&St(bt),ot=!1}),ot=!0};let ct=it===window?window.scrollY:it.scrollTop;const ut=bt=>{const{offsetTop:wt,height:xt}=pt,{naturalTop:Tt}=Et,{height:Ct}=yt;return bt+wt+xt>=Tt+Ct+vt+rt},dt=()=>{const{height:bt}=pt,{height:wt}=yt;return wt+at+rt<=bt?3:ut(ct)?1:2},ft=it!==window&&isOffsetElement(it),pt=getDimensions({el:it,onChange:st,unsubs:et,measure:({height:bt,top:wt})=>({height:bt,offsetTop:ft?wt:0})}),mt=getParentNode(_e),ht=mt===window?{top:0,bottom:0}:getVerticalPadding(mt),Et=getDimensions({el:mt,onChange:st,unsubs:et,measure:({height:bt})=>({height:bt-ht.top-ht.bottom,naturalTop:mt===window?0:offsetTill(mt,it)+ht.top+pt.offsetTop})}),yt=getDimensions({el:_e,onChange:st,unsubs:et,measure:({height:bt})=>({height:bt})});let vt=0,gt=dt();const St=bt=>{const wt=gt;if(gt=bt,wt===2&&(vt=-1),bt===3){_e.style.position=stickyProp,nt?_e.style.bottom=`${rt}px`:_e.style.top=`${at}px`;return}const{height:xt,offsetTop:Tt}=pt,{height:Ct,naturalTop:Nt}=Et,{height:At}=yt;if(bt===2)if(_e.style.position="relative",vt=wt===0?Math.max(0,Tt+ct-Nt+at):Math.max(0,Tt+ct+xt-(Nt+At+rt)),nt){const kt=Math.max(0,Ct-At-vt);_e.style.bottom=`${kt}px`}else _e.style.top=`${vt}px`;else _e.style.position=stickyProp,bt===1?nt?_e.style.bottom=`${rt}px`:_e.style.top=`${xt-At-rt}px`:nt?_e.style.bottom=`${xt-At-rt}px`:_e.style.top=`${at}px`};St(gt);const Rt=bt=>{if(bt===ct)return;const wt=bt-ct;if(ct=bt,gt===3)return;const{offsetTop:xt,height:Tt}=pt,{naturalTop:Ct,height:Nt}=Et,{height:At}=yt;if(wt>0)if(gt===0){if(bt+xt+at>Ct){const kt=Math.max(0,xt+ct-Ct+at);bt+xt+Tt<=Ct+At+kt+rt?St(2):St(1)}}else gt===2&&ut(bt)&&St(1);else if(gt===1){if(xt+bt+Tt=Ct+kt?St(2):St(0)}}else gt===2&&xt+bt+atRt(window.scrollY):()=>Rt(it.scrollTop);it.addEventListener("scroll",$t,passiveArg),it.addEventListener("mousewheel",$t,passiveArg),et.push(()=>it.removeEventListener("scroll",$t),()=>it.removeEventListener("mousewheel",$t))},useStickyBox=({offsetTop:_e=0,offsetBottom:et=0,bottom:tt=!1}={})=>{const[nt,rt]=reactExports.useState(null);return reactExports.useEffect(()=>{if(!nt||!stickyProp)return;const at=[];return setup(nt,at,{offsetBottom:et,offsetTop:_e,bottom:tt}),()=>{at.forEach(it=>it())}},[nt,et,_e,tt]),rt},StickyBox=_e=>{const{offsetTop:et,offsetBottom:tt,bottom:nt,children:rt,className:at,style:it}=_e,ot=useStickyBox({offsetTop:et,offsetBottom:tt,bottom:nt});return jsxRuntimeExports.jsx("div",{className:at,style:it,ref:ot,children:rt})},src_default=StickyBox,Layout=function _e(et){var tt=et.children;return _createRawReactElement("div",{className:"relative sm:pt-4"},void 0,_createRawReactElement("div",{className:"mx-auto max-w-3xl sm:px-6 md:grid md:max-w-7xl md:grid-cols-12 md:gap-8 md:px-8"},void 0,tt))},Sidebar=function _e(et){var tt=et.children;return _createRawReactElement("div",{className:"hidden lg:col-span-3 lg:block"},void 0,_createRawReactElement(src_default,{offsetTop:80,className:"pb-4"},void 0,tt))},Main=function _e(et){var tt=et.children,nt=et.className;return _createRawReactElement("main",{className:clsx({"md:col-span-12 lg:col-span-9 xl:col-span-6 pb-36":!0},nt)},void 0,tt)},Aside=function _e(et){var tt=et.children;return _createRawReactElement("aside",{className:"hidden xl:col-span-3 xl:block"},void 0,_createRawReactElement(src_default,{offsetTop:80,className:"space-y-6 pb-12"},void 0,tt))};Layout.Sidebar=Sidebar;Layout.Main=Main;Layout.Aside=Aside;var CLEAR_SELECTION_INDEX="CLEAR_SELECTION_INDEX",CLICK_MENU_ITEM="CLICK_MENU_ITEM",CLOSE_MENU="CLOSE_MENU",OPEN_MENU_AT_FIRST_ITEM="OPEN_MENU_AT_FIRST_ITEM",OPEN_MENU_AT_INDEX="OPEN_MENU_AT_INDEX",OPEN_MENU_CLEARED="OPEN_MENU_CLEARED",SEARCH_FOR_ITEM="SEARCH_FOR_ITEM",SELECT_ITEM_AT_INDEX="SELECT_ITEM_AT_INDEX",SET_BUTTON_ID="SET_BUTTON_ID",DropdownDescendantContext=createDescendantContext("DropdownDescendantContext"),[DropdownProvider,useDropdownContext]=createContext2("Dropdown"),initialState$n={triggerId:null,isExpanded:!1,typeaheadQuery:"",selectionIndex:-1},DropdownProvider_=({id:_e,children:et})=>{let tt=reactExports.useRef(null),nt=reactExports.useRef(null),rt=reactExports.useRef(null),[at,it]=useDescendantsInit(),ot=useId(_e),st=_e||makeId("menu",ot),ct=makeId("menu-button",st),[ut,dt]=reactExports.useReducer(reducer$2,{...initialState$n,triggerId:ct}),ft=reactExports.useRef(!1),pt=reactExports.useRef([]),mt=reactExports.useRef(!1),ht=reactExports.useRef({x:0,y:0});return reactExports.useEffect(()=>{ut.isExpanded?(window.__REACH_DISABLE_TOOLTIPS=!0,window.requestAnimationFrame(()=>{focus(nt.current)})):window.__REACH_DISABLE_TOOLTIPS=!1},[ut.isExpanded]),reactExports.createElement(DescendantProvider,{context:DropdownDescendantContext,items:at,set:it},reactExports.createElement(DropdownProvider,{dispatch:dt,dropdownId:st,dropdownRef:nt,mouseDownStartPosRef:ht,popoverRef:rt,readyToSelect:mt,selectCallbacks:pt,state:ut,triggerClickedRef:ft,triggerRef:tt},isFunction(et)?et({isExpanded:ut.isExpanded,isOpen:ut.isExpanded}):et))};DropdownProvider_.displayName="DropdownProvider";function useDropdownTrigger({onKeyDown:_e,onMouseDown:et,id:tt,ref:nt,...rt}){let{dispatch:at,dropdownId:it,mouseDownStartPosRef:ot,triggerClickedRef:st,triggerRef:ct,state:{triggerId:ut,isExpanded:dt}}=useDropdownContext("useDropdownTrigger"),ft=useComposedRefs(ct,nt),pt=useDropdownDescendants(),mt=reactExports.useMemo(()=>pt.findIndex(yt=>!yt.disabled),[pt]);reactExports.useEffect(()=>{tt!=null&&tt!==ut&&at({type:SET_BUTTON_ID,payload:tt})},[ut,at,tt]),reactExports.useEffect(()=>{tt==null&&at({type:SET_BUTTON_ID,payload:makeId("menu-button",it)})},[it,at,tt]);function ht(yt){switch(yt.key){case"ArrowDown":case"ArrowUp":yt.preventDefault(),at({type:OPEN_MENU_AT_INDEX,payload:{index:mt}});break;case"Enter":case" ":at({type:OPEN_MENU_AT_INDEX,payload:{index:mt}});break}}function Et(yt){isRightClick(yt.nativeEvent)||(ot.current={x:yt.clientX,y:yt.clientY},dt||(st.current=!0),at(dt?{type:CLOSE_MENU}:{type:OPEN_MENU_CLEARED}))}return{data:{isExpanded:dt,controls:it},props:{...rt,ref:ft,id:ut||void 0,onKeyDown:composeEventHandlers(_e,ht),onMouseDown:composeEventHandlers(et,Et),type:"button"}}}var DropdownTrigger=reactExports.forwardRef(({as:_e="button",...et},tt)=>{let{props:nt}=useDropdownTrigger({...et,ref:tt});return reactExports.createElement(_e,{"data-reach-dropdown-trigger":"",...nt})});DropdownTrigger.displayName="DropdownTrigger";function useDropdownItem({index:_e,isLink:et=!1,onClick:tt,onDragStart:nt,onMouseDown:rt,onMouseEnter:at,onMouseLeave:it,onMouseMove:ot,onMouseUp:st,onSelect:ct,disabled:ut,onFocus:dt,valueText:ft,ref:pt,...mt}){let{dispatch:ht,dropdownRef:Et,mouseDownStartPosRef:yt,readyToSelect:vt,selectCallbacks:gt,triggerRef:St,state:{selectionIndex:Rt,isExpanded:$t}}=useDropdownContext("useDropdownItem"),bt=reactExports.useRef(null),[wt,xt]=reactExports.useState(ft||""),Tt=reactExports.useCallback(Bt=>{!ft&&(Bt!=null&&Bt.textContent)&&xt(Bt.textContent)},[ft]),Ct=reactExports.useRef(!1),[Nt,At]=useStatefulRefValue(bt,null),kt=reactExports.useMemo(()=>({element:Nt,key:wt,disabled:ut,isLink:et}),[ut,Nt,et,wt]),Pt=useDescendant(kt,DropdownDescendantContext,_e),Ft=Pt===Rt&&!ut,Dt=useComposedRefs(pt,At,Tt);gt.current[Pt]=ct;function Lt(){focus(St.current),ct&&ct(),ht({type:CLICK_MENU_ITEM})}function It(Bt){isRightClick(Bt.nativeEvent)||et&&(ut?Bt.preventDefault():Lt())}function Ot(Bt){et&&Bt.preventDefault()}function Ut(Bt){isRightClick(Bt.nativeEvent)||(et?Ct.current=!0:Bt.preventDefault())}function jt(Bt){let Kt=getOwnerDocument(Et.current);!Ft&&Pt!=null&&!ut&&(Et!=null&&Et.current&&Et.current!==Kt.activeElement&&bt.current!==Kt.activeElement&&Et.current.focus(),ht({type:SELECT_ITEM_AT_INDEX,payload:{index:Pt}}))}function zt(Bt){ht({type:CLEAR_SELECTION_INDEX})}function Qt(Bt){if(!vt.current){let Kt=8,Wt=Math.abs(Bt.clientX-yt.current.x),sn=Math.abs(Bt.clientY-yt.current.y);(Wt>Kt||sn>Kt)&&(vt.current=!0)}!Ft&&Pt!=null&&!ut&&ht({type:SELECT_ITEM_AT_INDEX,payload:{index:Pt,dropdownRef:Et}})}function Xt(){vt.current=!0,!Ft&&Pt!=null&&!ut&&ht({type:SELECT_ITEM_AT_INDEX,payload:{index:Pt}})}function Yt(Bt){if(!isRightClick(Bt.nativeEvent)){if(!vt.current){vt.current=!0;return}et?Ct.current?Ct.current=!1:bt.current&&bt.current.click():ut||Lt()}}return reactExports.useEffect(()=>{if($t){let Bt=window.setTimeout(()=>{vt.current=!0},400);return()=>{window.clearTimeout(Bt)}}else vt.current=!1},[$t,vt]),reactExports.useEffect(()=>{let Bt=getOwnerDocument(bt.current);return Bt.addEventListener("mouseup",Kt),()=>{Bt.removeEventListener("mouseup",Kt)};function Kt(){Ct.current=!1}},[]),{data:{disabled:ut},props:{id:useItemId(Pt),tabIndex:-1,...mt,ref:Dt,"data-disabled":ut?"":void 0,"data-selected":Ft?"":void 0,"data-valuetext":wt,onClick:composeEventHandlers(tt,It),onDragStart:composeEventHandlers(nt,Ot),onMouseDown:composeEventHandlers(rt,Ut),onMouseEnter:composeEventHandlers(at,jt),onMouseLeave:composeEventHandlers(it,zt),onMouseMove:composeEventHandlers(ot,Qt),onFocus:composeEventHandlers(dt,Xt),onMouseUp:composeEventHandlers(st,Yt)}}}var DropdownItem=reactExports.forwardRef(({as:_e="div",...et},tt)=>{let{props:nt}=useDropdownItem({...et,ref:tt});return reactExports.createElement(_e,{"data-reach-dropdown-item":"",...nt})});DropdownItem.displayName="DropdownItem";function useDropdownItems({id:_e,onKeyDown:et,ref:tt,...nt}){let{dispatch:rt,triggerRef:at,dropdownRef:it,selectCallbacks:ot,dropdownId:st,state:{isExpanded:ct,triggerId:ut,selectionIndex:dt,typeaheadQuery:ft}}=useDropdownContext("useDropdownItems"),pt=useDropdownDescendants(),mt=useComposedRefs(it,tt);reactExports.useEffect(()=>{let gt=findItemFromTypeahead(pt,ft);ft&>!=null&&rt({type:SELECT_ITEM_AT_INDEX,payload:{index:gt,dropdownRef:it}});let St=window.setTimeout(()=>ft&&rt({type:SEARCH_FOR_ITEM,payload:""}),1e3);return()=>window.clearTimeout(St)},[rt,pt,ft,it]);let ht=usePrevious(pt.length),Et=usePrevious(pt[dt]),yt=usePrevious(dt);reactExports.useEffect(()=>{dt>pt.length-1?rt({type:SELECT_ITEM_AT_INDEX,payload:{index:pt.length-1,dropdownRef:it}}):ht!==pt.length&&dt>-1&&Et&&yt===dt&&pt[dt]!==Et&&rt({type:SELECT_ITEM_AT_INDEX,payload:{index:pt.findIndex(gt=>gt.key===(Et==null?void 0:Et.key)),dropdownRef:it}})},[it,rt,pt,ht,Et,yt,dt]);let vt=composeEventHandlers(function(St){let{key:Rt}=St;if(ct)switch(Rt){case"Enter":case" ":let $t=pt.find(bt=>bt.index===dt);$t&&!$t.disabled&&(St.preventDefault(),$t.isLink&&$t.element?$t.element.click():(focus(at.current),ot.current[$t.index]&&ot.current[$t.index](),rt({type:CLICK_MENU_ITEM})));break;case"Escape":focus(at.current),rt({type:CLOSE_MENU});break;case"Tab":St.preventDefault();break;default:if(isString(Rt)&&Rt.length===1){let bt=ft+Rt.toLowerCase();rt({type:SEARCH_FOR_ITEM,payload:bt})}break}},useDescendantKeyDown(DropdownDescendantContext,{currentIndex:dt,orientation:"vertical",rotate:!1,filter:gt=>!gt.disabled,callback:gt=>{rt({type:SELECT_ITEM_AT_INDEX,payload:{index:gt,dropdownRef:it}})},key:"index"}));return{data:{activeDescendant:useItemId(dt)||void 0,triggerId:ut},props:{tabIndex:-1,...nt,ref:mt,id:st,onKeyDown:composeEventHandlers(et,vt)}}}var DropdownItems=reactExports.forwardRef(({as:_e="div",...et},tt)=>{let{props:nt}=useDropdownItems({...et,ref:tt});return reactExports.createElement(_e,{"data-reach-dropdown-items":"",...nt})});DropdownItems.displayName="DropdownItems";function useDropdownPopover({onBlur:_e,portal:et=!0,position:tt,ref:nt,...rt}){let{triggerRef:at,triggerClickedRef:it,dispatch:ot,dropdownRef:st,popoverRef:ct,state:{isExpanded:ut}}=useDropdownContext("useDropdownPopover"),dt=useComposedRefs(ct,nt);return reactExports.useEffect(()=>{if(!ut)return;let ft=getOwnerDocument(ct.current);function pt(mt){it.current?it.current=!1:popoverContainsEventTarget(ct.current,mt.target)||ot({type:CLOSE_MENU})}return ft.addEventListener("mousedown",pt),()=>{ft.removeEventListener("mousedown",pt)}},[it,at,ot,st,ct,ut]),{data:{portal:et,position:tt,targetRef:at,isExpanded:ut},props:{ref:dt,hidden:!ut,onBlur:composeEventHandlers(_e,ft=>{ft.currentTarget.contains(ft.relatedTarget)||ot({type:CLOSE_MENU})}),...rt}}}var DropdownPopover=reactExports.forwardRef(({as:_e="div",...et},tt)=>{let{data:{portal:nt,targetRef:rt,position:at},props:it}=useDropdownPopover({...et,ref:tt}),ot={"data-reach-dropdown-popover":""};return nt?reactExports.createElement(Popover$1,{...it,...ot,as:_e,targetRef:rt,position:at,unstable_skipInitialPortalRender:!0}):reactExports.createElement(_e,{...it,...ot})});DropdownPopover.displayName="DropdownPopover";function findItemFromTypeahead(_e,et=""){if(!et)return null;let tt=_e.find(nt=>{var rt,at,it;return nt.disabled?!1:(it=(at=(rt=nt.element)==null?void 0:rt.dataset)==null?void 0:at.valuetext)==null?void 0:it.toLowerCase().startsWith(et)});return tt?_e.indexOf(tt):null}function useItemId(_e){let{dropdownId:et}=useDropdownContext("useItemId");return _e!=null&&_e>-1?makeId(`option-${_e}`,et):void 0}function focus(_e){_e&&_e.focus()}function popoverContainsEventTarget(_e,et){return!!(_e&&_e.contains(et))}function reducer$2(_e,et={}){switch(et.type){case CLICK_MENU_ITEM:return{..._e,isExpanded:!1,selectionIndex:-1};case CLOSE_MENU:return{..._e,isExpanded:!1,selectionIndex:-1};case OPEN_MENU_AT_FIRST_ITEM:return{..._e,isExpanded:!0,selectionIndex:0};case OPEN_MENU_AT_INDEX:return{..._e,isExpanded:!0,selectionIndex:et.payload.index};case OPEN_MENU_CLEARED:return{..._e,isExpanded:!0,selectionIndex:-1};case SELECT_ITEM_AT_INDEX:{let{dropdownRef:tt={current:null}}=et.payload;if(et.payload.index>=0&&et.payload.index!==_e.selectionIndex){if(tt.current){let nt=getOwnerDocument(tt.current);tt.current!==(nt==null?void 0:nt.activeElement)&&tt.current.focus()}return{..._e,selectionIndex:et.payload.max!=null?Math.min(Math.max(et.payload.index,0),et.payload.max):Math.max(et.payload.index,0)}}return _e}case CLEAR_SELECTION_INDEX:return{..._e,selectionIndex:-1};case SET_BUTTON_ID:return{..._e,triggerId:et.payload};case SEARCH_FOR_ITEM:return typeof et.payload<"u"?{..._e,typeaheadQuery:et.payload}:_e;default:return _e}}function useDropdownDescendants(){return useDescendants(DropdownDescendantContext)}var Menu=reactExports.forwardRef(({as:_e=reactExports.Fragment,id:et,children:tt,...nt},rt)=>{let it=reactExports.useMemo(()=>{try{return reactIsExports$1.isFragment(reactExports.createElement(_e,null))}catch{return!1}},[_e])?{}:{ref:rt,id:et,"data-reach-menu":"",...nt};return reactExports.createElement(_e,{...it},reactExports.createElement(DropdownProvider_,{id:et,children:tt}))});Menu.displayName="Menu";var MenuButton=reactExports.forwardRef(({as:_e="button",...et},tt)=>{let{data:{isExpanded:nt,controls:rt},props:at}=useDropdownTrigger({...et,ref:tt});return reactExports.createElement(_e,{"aria-expanded":nt?!0:void 0,"aria-haspopup":!0,"aria-controls":rt,...at,"data-reach-menu-button":""})});MenuButton.displayName="MenuButton";var MenuItemImpl=reactExports.forwardRef(({as:_e="div",...et},tt)=>{let{data:{disabled:nt},props:rt}=useDropdownItem({...et,ref:tt});return reactExports.createElement(_e,{role:"menuitem",...rt,"aria-disabled":nt||void 0,"data-reach-menu-item":""})});MenuItemImpl.displayName="MenuItemImpl";var MenuItem$1=reactExports.forwardRef(({as:_e="div",...et},tt)=>reactExports.createElement(MenuItemImpl,{...et,ref:tt,as:_e}));MenuItem$1.displayName="MenuItem";var MenuItems=reactExports.forwardRef(({as:_e="div",...et},tt)=>{let{data:{activeDescendant:nt,triggerId:rt},props:at}=useDropdownItems({...et,ref:tt});return reactExports.createElement(_e,{"aria-activedescendant":nt,"aria-labelledby":rt||void 0,role:"menu",...at,"data-reach-menu-items":""})});MenuItems.displayName="MenuItems";var MenuLink=reactExports.forwardRef(({as:_e="a",component:et,onSelect:tt,...nt},rt)=>(reactExports.useEffect(()=>{et&&console.warn("[@reach/menu-button]: Please use the `as` prop instead of `component`")},[et]),reactExports.createElement(MenuItemImpl,{...nt,ref:rt,"data-reach-menu-link":"",as:_e,isLink:!0,onSelect:tt||noop$2})));MenuLink.displayName="MenuLink";var MenuList$1=reactExports.forwardRef(({portal:_e=!0,...et},tt)=>reactExports.createElement(MenuPopover,{portal:_e},reactExports.createElement(MenuItems,{...et,ref:tt,"data-reach-menu-list":""})));MenuList$1.displayName="MenuList";var MenuPopover=reactExports.forwardRef(({as:_e="div",...et},tt)=>{let{data:{portal:nt,targetRef:rt,position:at},props:it}=useDropdownPopover({...et,ref:tt}),ot={"data-reach-menu-popover":""};return nt?reactExports.createElement(Popover$1,{...it,...ot,as:_e,targetRef:rt,position:at,unstable_skipInitialPortalRender:!0}):reactExports.createElement(_e,{...it,...ot})});MenuPopover.displayName="MenuPopover";const menu="";var _excluded$g=["position","className"],MenuList=function _e(et){et.position;var tt=et.className,nt=_objectWithoutProperties(et,_excluded$g);return _createRawReactElement(MenuPopover,{position:et.position==="left"?positionDefault:positionRight},void 0,React$3.createElement(MenuItems,_extends$4({onKeyDown:function(at){return at.nativeEvent.stopImmediatePropagation()},className:clsx(tt,"shadow-menu rounded-lg bg-white py-1 dark:bg-primary-900")},nt)))},MenuDivider=function _e(){return _createRawReactElement("hr",{className:"mx-2 my-1 border-t-2 border-gray-100 dark:border-gray-800"})};const vitePluginRequire_1697864655763_93677134="/packs/assets/x-36cb9490.svg";var messages$14={close:{id:"lightbox.close",defaultMessage:"Close"},confirm:{id:"confirmations.delete.confirm",defaultMessage:"Delete"}},widths={xs:"max-w-xs",sm:"max-w-sm",md:"max-w-base",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","3xl":"max-w-3xl","4xl":"max-w-4xl"},Modal=React$3.forwardRef(function(_e,et){var tt=_e.cancelAction,nt=_e.cancelText,rt=_e.children,at=_e.closeIcon,it=at===void 0?vitePluginRequire_1697864655763_93677134:at,ot=_e.closePosition,st=ot===void 0?"right":ot,ct=_e.confirmationAction,ut=_e.confirmationDisabled,dt=_e.confirmationText,ft=_e.confirmationTheme,pt=_e.confirmationFullWidth,mt=_e.onClose,ht=_e.secondaryAction,Et=_e.secondaryDisabled,yt=Et===void 0?!1:Et,vt=_e.secondaryText,gt=_e.skipFocus,St=gt===void 0?!1:gt,Rt=_e.title,$t=_e.width,bt=$t===void 0?"xl":$t,wt=_e.className,xt=useIntl(),Tt=React$3.useRef(null);return React$3.useEffect(function(){Tt!=null&&Tt.current&&!St&&Tt.current.focus()},[St,Tt]),React$3.createElement("div",{ref:et,"data-testid":"modal",className:clsx(wt,"pointer-events-auto mx-auto block w-full rounded-2xl bg-white p-6 text-start align-middle text-gray-900 shadow-xl transition-all dark:bg-primary-900 dark:text-gray-100",widths[bt])},_createRawReactElement("div",{className:"w-full justify-between sm:flex sm:items-start"},void 0,_createRawReactElement("div",{className:"w-full"},void 0,Rt&&_createRawReactElement("div",{className:clsx("flex w-full items-center gap-2",{"flex-row-reverse":st==="left"})},void 0,_createRawReactElement("h3",{className:"grow truncate text-lg font-bold leading-6 text-gray-900 dark:text-white"},void 0,Rt),mt&&_createRawReactElement(IconButton$1,{src:it,title:xt.formatMessage(messages$14.close),onClick:mt,className:"text-gray-500 hover:text-gray-700 rtl:rotate-180 dark:text-gray-300 dark:hover:text-gray-200"})),Rt?_createRawReactElement("div",{className:"mt-2 w-full"},void 0,rt):rt)),ct&&_createRawReactElement(HStack,{className:"mt-5",justifyContent:"between","data-testid":"modal-actions"},void 0,_createRawReactElement("div",{className:clsx({grow:!pt})},void 0,tt&&_createRawReactElement(Button,{theme:"tertiary",onClick:tt},void 0,nt||"Cancel")),_createRawReactElement(HStack,{space:2,className:clsx({grow:pt})},void 0,ht&&_createRawReactElement(Button,{theme:"secondary",onClick:ht,disabled:yt},void 0,vt),React$3.createElement(Button,{theme:ft||"primary",onClick:ct,disabled:ut,ref:Tt,block:pt},dt))))});const metadata={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8]))\\d{3}|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4]))|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[016-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|22"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[025-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","[24-689]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]]]],BL:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:395|76[018])\\d|475[0-5])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-467]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[17]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","(?:[2-8]\\d|90)\\d{8}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[125-9]|33|44|66|77|88)|622)[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[016-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","[189]\\d{8}|[1-68]\\d{6}",[7,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","1[127]\\d{8,9}|2\\d{9}(?:\\d{2})?|[12]\\d{6,7}|86\\d{6}|(?:1[03-689]\\d|6)\\d{7,9}|(?:[3-579]\\d|8[0-57-9])\\d{6,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","10(?:10|9[56])|2[0-57-9](?:100|9[56])"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:60\\d\\d|9101)\\d{6}|(?:1\\d|3)\\d{9}",[10,11],[["(\\d{3})(\\d{7})","$1 $2",["6"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|91"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0(4(?:[14]4|56)|[579])?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","[27]\\d{6,7}|[34]\\d{5,7}|63\\d{6}|(?:5|8\\d\\d)\\d{7}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[016-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[0568]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d)(\\d{4,9})","$1 $2",["[2568][1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["[12]00|[368]|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[1245]|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0235])|4(?:[0-5]\\d\\d|69[7-9]|70[0-79])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-2]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","[56]94\\d{6}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[56]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:395|76[018])\\d|475[0-5])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([3-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","9008\\d{3}|(?:[2-467]\\d\\d|510|862)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",[6,7,8,9],[["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-5]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","(?:[2-489]\\d|55)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","(?:(?:00[1-9]|8\\d)\\d{4}|[1-36])\\d{6}|00\\d{10}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]]],0,0,0,0,0,0,[["0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[1-9]\\d{8}|3[2-9]\\d{7}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],0,0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97[7-9]))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[257-9]"],"0$1"]],"0",0,"(000[259]\\d{6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30[013-9]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[25]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[4-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(8-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"8 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(8-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(8-$1)",1]],"8",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{5})(\\d{4})","$1-$2",["5(?:29|38)","5(?:29[1289]|389)","529(?:1[1-46-9]|2[013-8]|90)|5(?:298|389)[0-46-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-489]|3[5-9]|9)|892","5(?:2(?:[2-49]|8[235-9])|3[5-9]|9)|892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5293[01]\\d{4}|5(?:2(?:[0-25-7]\\d|3[1-578]|4[02-46-8]|8[0235-7]|9[0-289])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[0189]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[017]\\d|2[0-2]|6[0-8]|8[0-3]))\\d{6}"],["80\\d{7}"],["89\\d{7}"],0,0,0,0,["592(?:4[0-2]|93)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:395|76[018])\\d|475[0-5])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","596\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","1(?:(?:[27]2|44|99)[1-9]|65[0-689])\\d{7}|(?:1(?:[01]\\d|2[13-9]|[35][1-9]|4[0-35-9]|6[0-46-9]|7[013-9]|8[1-79]|9[1-8])|[2-9]\\d)\\d{8}",[10,11],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"],0,1],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 $3 $4",["1(?:33|5[56]|81)"],0,1],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 $3 $4",["1"],0,1]],"01",0,"0(?:[12]|4[45])|1",0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[047]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:[124-7]|9\\d{3})\\d{6}|[1-9]\\d{7}|[78]\\d{9,13}",[7,8,10,11,12,13,14],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["78"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|9(?:0[3-9]|[1-9])"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-7]|8[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:444|(?:55|8\\d)\\d|666)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[4-68]"]]]],NU:["683","00","(?:[47]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|80\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-6])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[16]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-5]))\\d{4}"],["69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-27]|8[0-8]|9[0-479]))\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-5]|76(?:2[27]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[2378]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[237-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"3[04-689]|[489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","92\\d{7}|(?:[15]|8\\d)\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["81"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","(?:[1-6]|[7-9]\\d\\d)\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","800\\d{4}|(?:[249]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-8]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|77|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|68|[78]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-8]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[267]\\d{7}|[89]00\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-39]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[69]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2679]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","[0-57-9]\\d{8}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[04]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3[1-5]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","[1-6]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["6"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|616)","5(?:[0-59]|6161)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["5056(?:[0-35-9]\\d|4[46])\\d{4}|(?:4722|505[2-57-9]|983[29])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-589]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[01356]|3[0-24679]|4[167]|5[0-2]|6[014]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|[34][016]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-7]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","(?:0004|4)\\d{9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",[7,8,10,13],[["(\\d{3})(\\d{4})","$1 $2",["405|8|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["4"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","810","200\\d{6}|(?:33|[5-79]\\d|88)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72)\\d{4}|8\\d{5}(?:\\d{3})?",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[478]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","[23]\\d{7,8}|(?:4\\d\\d|[89]00)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[23]"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|5[0-4]|6\\d|[78]0)\\d{4}"],["639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|63|[79]\\d)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[79]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[35-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[35-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"[0-36-9]\\d{8}",[9],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-36-9]"]]],0,0,0,0,0,0,[0,["[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,0,0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[013-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function withMetadataArgument(_e,et){var tt=Array.prototype.slice.call(et);return tt.push(metadata),_e.apply(this,tt)}function _typeof$4(_e){"@babel/helpers - typeof";return _typeof$4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$4(_e)}function _defineProperties$a(_e,et){for(var tt=0;tt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _isNativeFunction(_e){return Function.toString.call(_e).indexOf("[native code]")!==-1}function _setPrototypeOf$1(_e,et){return _setPrototypeOf$1=Object.setPrototypeOf||function(nt,rt){return nt.__proto__=rt,nt},_setPrototypeOf$1(_e,et)}function _getPrototypeOf$2(_e){return _getPrototypeOf$2=Object.setPrototypeOf?Object.getPrototypeOf:function(tt){return tt.__proto__||Object.getPrototypeOf(tt)},_getPrototypeOf$2(_e)}var ParseError=function(_e){_inherits$2(tt,_e);var et=_createSuper$5(tt);function tt(nt){var rt;return _classCallCheck$a(this,tt),rt=et.call(this,nt),Object.setPrototypeOf(_assertThisInitialized$2(rt),tt.prototype),rt.name=rt.constructor.name,rt}return _createClass$a(tt)}(_wrapNativeSuper(Error)),MIN_LENGTH_FOR_NSN=2,MAX_LENGTH_FOR_NSN=17,MAX_LENGTH_COUNTRY_CODE=3,VALID_DIGITS="0-90-9٠-٩۰-۹",DASHES="-‐-―−ー-",SLASHES="//",DOTS="..",WHITESPACE="  ­​⁠ ",BRACKETS="()()[]\\[\\]",TILDES="~⁓∼~",VALID_PUNCTUATION="".concat(DASHES).concat(SLASHES).concat(DOTS).concat(WHITESPACE).concat(BRACKETS).concat(TILDES),PLUS_CHARS="++";function compare(_e,et){_e=_e.split("-"),et=et.split("-");for(var tt=_e[0].split("."),nt=et[0].split("."),rt=0;rt<3;rt++){var at=Number(tt[rt]),it=Number(nt[rt]);if(at>it)return 1;if(it>at)return-1;if(!isNaN(at)&&isNaN(it))return 1;if(isNaN(at)&&!isNaN(it))return-1}return _e[1]&&et[1]?_e[1]>et[1]?1:_e[1]=MIN_LENGTH_FOR_NSN&&VALID_PHONE_NUMBER_PATTERN.test(_e)}function isViablePhoneNumberStart(_e){return VALID_PHONE_NUMBER_START_REG_EXP.test(_e)}var EXTN_PATTERN=new RegExp("(?:"+createExtensionPattern()+")$","i");function extractExtension(_e){var et=_e.search(EXTN_PATTERN);if(et<0)return{};for(var tt=_e.slice(0,et),nt=_e.match(EXTN_PATTERN),rt=1;rt=_e.length?{done:!0}:{done:!1,value:_e[nt++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$d(_e,et){if(_e){if(typeof _e=="string")return _arrayLikeToArray$d(_e,et);var tt=Object.prototype.toString.call(_e).slice(8,-1);if(tt==="Object"&&_e.constructor&&(tt=_e.constructor.name),tt==="Map"||tt==="Set")return Array.from(_e);if(tt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(tt))return _arrayLikeToArray$d(_e,et)}}function _arrayLikeToArray$d(_e,et){(et==null||et>_e.length)&&(et=_e.length);for(var tt=0,nt=new Array(et);tt=_e.length?{done:!0}:{done:!1,value:_e[nt++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$c(_e,et){if(_e){if(typeof _e=="string")return _arrayLikeToArray$c(_e,et);var tt=Object.prototype.toString.call(_e).slice(8,-1);if(tt==="Object"&&_e.constructor&&(tt=_e.constructor.name),tt==="Map"||tt==="Set")return Array.from(_e);if(tt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(tt))return _arrayLikeToArray$c(_e,et)}}function _arrayLikeToArray$c(_e,et){(et==null||et>_e.length)&&(et=_e.length);for(var tt=0,nt=new Array(et);tt=_e.length?{done:!0}:{done:!1,value:_e[nt++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$b(_e,et){if(_e){if(typeof _e=="string")return _arrayLikeToArray$b(_e,et);var tt=Object.prototype.toString.call(_e).slice(8,-1);if(tt==="Object"&&_e.constructor&&(tt=_e.constructor.name),tt==="Map"||tt==="Set")return Array.from(_e);if(tt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(tt))return _arrayLikeToArray$b(_e,et)}}function _arrayLikeToArray$b(_e,et){(et==null||et>_e.length)&&(et=_e.length);for(var tt=0,nt=new Array(et);ttit?"TOO_SHORT":rt[rt.length-1]=0?"IS_POSSIBLE":"INVALID_LENGTH"}function isPossiblePhoneNumber(_e,et,tt){if(et===void 0&&(et={}),tt=new Metadata(tt),et.v2){if(!_e.countryCallingCode)throw new Error("Invalid phone number object passed");tt.selectNumberingPlan(_e.countryCallingCode)}else{if(!_e.phone)return!1;if(_e.country){if(!tt.hasCountry(_e.country))throw new Error("Unknown country: ".concat(_e.country));tt.country(_e.country)}else{if(!_e.countryCallingCode)throw new Error("Invalid phone number object passed");tt.selectNumberingPlan(_e.countryCallingCode)}}if(tt.possibleLengths())return isPossibleNumber(_e.phone||_e.nationalNumber,tt);if(_e.countryCallingCode&&tt.isNonGeographicCallingCode(_e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}function isPossibleNumber(_e,et){switch(checkNumberLength(_e,et)){case"IS_POSSIBLE":return!0;default:return!1}}function matchesEntirely(_e,et){return _e=_e||"",new RegExp("^(?:"+et+")$").test(_e)}function _createForOfIteratorHelperLoose$5(_e,et){var tt=typeof Symbol<"u"&&_e[Symbol.iterator]||_e["@@iterator"];if(tt)return(tt=tt.call(_e)).next.bind(tt);if(Array.isArray(_e)||(tt=_unsupportedIterableToArray$a(_e))||et&&_e&&typeof _e.length=="number"){tt&&(_e=tt);var nt=0;return function(){return nt>=_e.length?{done:!0}:{done:!1,value:_e[nt++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. @@ -364,9 +364,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `.concat(JSON.stringify(ft,null,2)))}}return st?{partialMatch:!0}:void 0;case"[]":for(var pt=_createForOfIteratorHelperLoose$1(et.args),mt;!(mt=pt()).done;){var ht=mt.value;if(_e[0]===ht)return _e.length===1?{match:!0,matchedChars:_e}:tt?{overflow:!0}:{match:!0,matchedChars:[ht]}}return;default:throw new Error("Unsupported instruction tree: ".concat(et))}}function _createForOfIteratorHelperLoose(_e,et){var tt=typeof Symbol<"u"&&_e[Symbol.iterator]||_e["@@iterator"];if(tt)return(tt=tt.call(_e)).next.bind(tt);if(Array.isArray(_e)||(tt=_unsupportedIterableToArray$4(_e))||et&&_e&&typeof _e.length=="number"){tt&&(_e=tt);var nt=0;return function(){return nt>=_e.length?{done:!0}:{done:!1,value:_e[nt++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$4(_e,et){if(_e){if(typeof _e=="string")return _arrayLikeToArray$4(_e,et);var tt=Object.prototype.toString.call(_e).slice(8,-1);if(tt==="Object"&&_e.constructor&&(tt=_e.constructor.name),tt==="Map"||tt==="Set")return Array.from(_e);if(tt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(tt))return _arrayLikeToArray$4(_e,et)}}function _arrayLikeToArray$4(_e,et){(et==null||et>_e.length)&&(et=_e.length);for(var tt=0,nt=new Array(et);tt=0)){var rt=this.getTemplateForFormat(tt,nt);if(rt)return this.setNationalNumberTemplate(rt,nt),!0}}},{key:"getSeparatorAfterNationalPrefix",value:function(tt){return this.isNANP||tt&&tt.nationalPrefixFormattingRule()&&NATIONAL_PREFIX_SEPARATORS_PATTERN.test(tt.nationalPrefixFormattingRule())?" ":""}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function(tt,nt){var rt=tt.IDDPrefix,at=tt.missingPlus;return rt?nt&&nt.spacing===!1?rt:rt+" ":at?"":"+"}},{key:"getTemplate",value:function(tt){if(this.template){for(var nt=-1,rt=0,at=tt.international?this.getInternationalPrefixBeforeCountryCallingCode(tt,{spacing:!1}):"";rtct.length)){var ut=new RegExp("^"+st+"$"),dt=rt.replace(/\d/g,DUMMY_DIGIT);ut.test(dt)&&(ct=dt);var ft=this.getFormatFormat(tt,at),pt;if(this.shouldTryNationalPrefixFormattingRule(tt,{international:at,nationalPrefix:it})){var mt=ft.replace(FIRST_GROUP_PATTERN,tt.nationalPrefixFormattingRule());if(parseDigits(tt.nationalPrefixFormattingRule())===(it||"")+parseDigits("$1")&&(ft=mt,pt=!0,it))for(var ht=it.length;ht>0;)ft=ft.replace(/\d/,DIGIT_PLACEHOLDER),ht--}var Et=ct.replace(new RegExp(st),ft).replace(new RegExp(DUMMY_DIGIT,"g"),DIGIT_PLACEHOLDER);return pt||(ot?Et=repeat(DIGIT_PLACEHOLDER,ot.length)+" "+Et:it&&(Et=repeat(DIGIT_PLACEHOLDER,it.length)+this.getSeparatorAfterNationalPrefix(tt)+Et)),at&&(Et=applyInternationalSeparatorStyle(Et)),Et}}},{key:"formatNextNationalNumberDigits",value:function(tt){var nt=populateTemplateWithDigits(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,tt);if(!nt){this.resetFormat();return}return this.populatedNationalNumberTemplate=nt[0],this.populatedNationalNumberTemplatePosition=nt[1],cutAndStripNonPairedParens(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1)}},{key:"shouldTryNationalPrefixFormattingRule",value:function(tt,nt){var rt=nt.international,at=nt.nationalPrefix;if(tt.nationalPrefixFormattingRule()){var it=tt.usesNationalPrefix();if(it&&at||!it&&!rt)return!0}}}]),_e}();function _slicedToArray$2(_e,et){return _arrayWithHoles$2(_e)||_iterableToArrayLimit$2(_e,et)||_unsupportedIterableToArray$3(_e,et)||_nonIterableRest$2()}function _nonIterableRest$2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$3(_e,et){if(_e){if(typeof _e=="string")return _arrayLikeToArray$3(_e,et);var tt=Object.prototype.toString.call(_e).slice(8,-1);if(tt==="Object"&&_e.constructor&&(tt=_e.constructor.name),tt==="Map"||tt==="Set")return Array.from(_e);if(tt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(tt))return _arrayLikeToArray$3(_e,et)}}function _arrayLikeToArray$3(_e,et){(et==null||et>_e.length)&&(et=_e.length);for(var tt=0,nt=new Array(et);tt=3;if(nt.appendDigits(tt),at&&this.extractIddPrefix(nt),this.isWaitingForCountryCallingCode(nt)){if(!this.extractCountryCallingCode(nt))return}else nt.appendNationalSignificantNumberDigits(tt);nt.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(nt.getNationalDigits(),function(it){return nt.update(it)})}},{key:"isWaitingForCountryCallingCode",value:function(tt){var nt=tt.international,rt=tt.callingCode;return nt&&!rt}},{key:"extractCountryCallingCode",value:function(tt){var nt=extractCountryCallingCode("+"+tt.getDigitsWithoutInternationalPrefix(),this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),rt=nt.countryCallingCode,at=nt.number;if(rt)return tt.setCallingCode(rt),tt.update({nationalSignificantNumber:at}),!0}},{key:"reset",value:function(tt){if(tt){this.hasSelectedNumberingPlan=!0;var nt=tt._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=nt&&COMPLEX_NATIONAL_PREFIX.test(nt)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(tt,nt){if(this.hasSelectedNumberingPlan){var rt=extractNationalNumberFromPossiblyIncompleteNumber(tt,this.metadata),at=rt.nationalPrefix,it=rt.nationalNumber,ot=rt.carrierCode;if(it!==tt)return this.onExtractedNationalNumber(at,ot,it,tt,nt),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(tt,nt,rt){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(tt,rt);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var at=extractNationalNumberFromPossiblyIncompleteNumber(tt,this.metadata),it=at.nationalPrefix,ot=at.nationalNumber,st=at.carrierCode;if(ot!==nt)return this.onExtractedNationalNumber(it,st,ot,tt,rt),!0}}},{key:"onExtractedNationalNumber",value:function(tt,nt,rt,at,it){var ot,st,ct=at.lastIndexOf(rt);if(ct>=0&&ct===at.length-rt.length){st=!0;var ut=at.slice(0,ct);ut!==tt&&(ot=ut)}it({nationalPrefix:tt,carrierCode:nt,nationalSignificantNumber:rt,nationalSignificantNumberMatchesInput:st,complexPrefixBeforeNationalSignificantNumber:ot}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(tt){if(this.extractAnotherNationalSignificantNumber(tt.getNationalDigits(),tt.nationalSignificantNumber,function(nt){return tt.update(nt)}))return!0;if(this.extractIddPrefix(tt))return this.extractCallingCodeAndNationalSignificantNumber(tt),!0;if(this.fixMissingPlus(tt))return this.extractCallingCodeAndNationalSignificantNumber(tt),!0}},{key:"extractIddPrefix",value:function(tt){var nt=tt.international,rt=tt.IDDPrefix,at=tt.digits;if(tt.nationalSignificantNumber,!(nt||rt)){var it=stripIddPrefix(at,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);if(it!==void 0&&it!==at)return tt.update({IDDPrefix:at.slice(0,at.length-it.length)}),this.startInternationalNumber(tt,{country:void 0,callingCode:void 0}),!0}}},{key:"fixMissingPlus",value:function(tt){if(!tt.international){var nt=extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(tt.digits,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),rt=nt.countryCallingCode;if(nt.number,rt)return tt.update({missingPlus:!0}),this.startInternationalNumber(tt,{country:tt.country,callingCode:rt}),!0}}},{key:"startInternationalNumber",value:function(tt,nt){var rt=nt.country,at=nt.callingCode;tt.startInternationalNumber(rt,at),tt.nationalSignificantNumber&&(tt.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(tt){this.extractCountryCallingCode(tt)&&this.extractNationalSignificantNumber(tt.getNationalDigits(),function(nt){return tt.update(nt)})}}]),_e}();function extractFormattedPhoneNumber(_e){var et=_e.search(VALID_FORMATTED_PHONE_NUMBER_PART);if(!(et<0)){_e=_e.slice(et);var tt;return _e[0]==="+"&&(tt=!0,_e=_e.slice(1)),_e=_e.replace(AFTER_PHONE_NUMBER_DIGITS_END_PATTERN,""),tt&&(_e="+"+_e),_e}}function _extractFormattedDigitsAndPlus(_e){var et=extractFormattedPhoneNumber(_e)||"";return et[0]==="+"?[et.slice(1),!0]:[et]}function extractFormattedDigitsAndPlus(_e){var et=_extractFormattedDigitsAndPlus(_e),tt=_slicedToArray$2(et,2),nt=tt[0],rt=tt[1];return VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN.test(nt)||(nt=""),[nt,rt]}function _typeof$1(_e){"@babel/helpers - typeof";return _typeof$1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$1(_e)}function _slicedToArray$1(_e,et){return _arrayWithHoles$1(_e)||_iterableToArrayLimit$1(_e,et)||_unsupportedIterableToArray$2(_e,et)||_nonIterableRest$1()}function _nonIterableRest$1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$2(_e,et){if(_e){if(typeof _e=="string")return _arrayLikeToArray$2(_e,et);var tt=Object.prototype.toString.call(_e).slice(8,-1);if(tt==="Object"&&_e.constructor&&(tt=_e.constructor.name),tt==="Map"||tt==="Set")return Array.from(_e);if(tt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(tt))return _arrayLikeToArray$2(_e,et)}}function _arrayLikeToArray$2(_e,et){(et==null||et>_e.length)&&(et=_e.length);for(var tt=0,nt=new Array(et);tt1}},{key:"determineTheCountry",value:function(){this.state.setCountry(getCountryByCallingCode(this.isInternational()?this.state.callingCode:this.defaultCallingCode,{nationalNumber:this.state.nationalSignificantNumber,defaultCountry:this.defaultCountry,metadata:this.metadata}))}},{key:"getNumberValue",value:function(){var tt=this.state,nt=tt.digits,rt=tt.callingCode,at=tt.country,it=tt.nationalSignificantNumber;if(nt){if(this.isInternational())return rt?"+"+rt+it:"+"+nt;if(at||rt){var ot=at?this.metadata.countryCallingCode():rt;return"+"+ot+it}}}},{key:"getNumber",value:function(){var tt=this.state,nt=tt.nationalSignificantNumber,rt=tt.carrierCode,at=tt.callingCode,it=this._getCountry();if(nt&&!(!it&&!at)){if(it&&it===this.defaultCountry){var ot=new Metadata(this.metadata.metadata);ot.selectNumberingPlan(it);var st=ot.numberingPlan.callingCode(),ct=this.metadata.getCountryCodesForCallingCode(st);if(ct.length>1){var ut=getCountryByNationalNumber(nt,{countries:ct,defaultCountry:this.defaultCountry,metadata:this.metadata.metadata});ut&&(it=ut)}}var dt=new PhoneNumber(it||at,nt,this.metadata.metadata);return rt&&(dt.carrierCode=rt),dt}}},{key:"isPossible",value:function(){var tt=this.getNumber();return tt?tt.isPossible():!1}},{key:"isValid",value:function(){var tt=this.getNumber();return tt?tt.isValid():!1}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}]),_e}();function parsePhoneNumberWithError(){return withMetadataArgument(parsePhoneNumberWithError$1,arguments)}function AsYouType(_e){return AsYouType$1.call(this,_e,metadata)}AsYouType.prototype=Object.create(AsYouType$1.prototype,{});AsYouType.prototype.constructor=AsYouType;const COUNTRY_CODES=["1","351","44","55"];var CountryCodeDropdown=function _e(et){var tt=et.countryCode,nt=et.onChange;return _createRawReactElement("select",{value:tt,className:"h-full rounded-md border-transparent bg-transparent py-0 pl-3 pr-7 text-base focus:outline-none focus:ring-primary-500 dark:text-white sm:text-sm",onChange:function(rt){function at(it){return rt.apply(this,arguments)}return at.toString=function(){return rt.toString()},at}(function(rt){return nt(rt.target.value)})},void 0,COUNTRY_CODES.map(function(rt){return _createRawReactElement("option",{value:rt},rt,"+",rt)}))},_excluded$f=["value","onChange","defaultCountryCode"],PhoneInput=function _e(et){et.value;var tt=et.onChange,nt=et.defaultCountryCode,rt=nt===void 0?"1":nt,at=_objectWithoutProperties(et,_excluded$f),it=reactExports.useState(rt),ot=_slicedToArray$4(it,2),st=ot[0],ct=ot[1],ut=reactExports.useState(""),dt=_slicedToArray$4(ut,2),ft=dt[0],pt=dt[1],mt=function(Et){var yt=Et.target,vt=new AsYouType({defaultCallingCode:st}),gt=vt.input(yt.value);gt===ft&&yt.value!==ft?pt(yt.value):pt(gt)};return reactExports.useEffect(function(){if(tt)try{var ht={defaultCallingCode:st,extract:!1},Et=parsePhoneNumberWithError(ft,ht);if(!Et.isPossible())throw Et;tt(Et.format("E.164"))}catch{tt(void 0)}},[st,ft]),reactExports.useEffect(function(){mt({target:{value:ft}})},[st,ft]),React$3.createElement(Input,_extends$4({onChange:mt,value:ft,prepend:_createRawReactElement(CountryCodeDropdown,{countryCode:st,onChange:ct})},at))},Portal$1=function _e(et){var tt=et.children,nt=et.target,rt=reactExports.useState(!1),at=_slicedToArray$4(rt,2),it=at[0],ot=at[1];return nt||(nt=nt=document.getElementById("soapbox")),reactExports.useLayoutEffect(function(){ot(!0)},[]),it?ae.createPortal(tt,nt):null};function ownKeys$c(_e,et){var tt=Object.keys(_e);if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(_e);et&&(nt=nt.filter(function(rt){return Object.getOwnPropertyDescriptor(_e,rt).enumerable})),tt.push.apply(tt,nt)}return tt}function _objectSpread$b(_e){for(var et=1;et"u"?commonjsGlobal$2:window,vendors=["moz","webkit"],suffix="AnimationFrame",raf=root["request"+suffix],caf=root["cancel"+suffix]||root["cancelRequest"+suffix];for(var i$1=0;!raf&&i$1bt*10&&(Nt.accumulatedTime=0),Nt.accumulatedTime===0){Nt.animationID=null,Nt.startAnimationIfNecessary();return}var Dt=(Nt.accumulatedTime-Math.floor(Nt.accumulatedTime/bt)*bt)/bt,Lt=Math.floor(Nt.accumulatedTime/bt),It={},Ot={},Ut={},jt={};for(var zt in kt)if(Object.prototype.hasOwnProperty.call(kt,zt)){var Qt=kt[zt];if(typeof Qt=="number")Ut[zt]=Qt,jt[zt]=0,It[zt]=Qt,Ot[zt]=0;else{for(var Xt=Nt.state.lastIdealStyle[zt],Yt=Nt.state.lastIdealVelocity[zt],Bt=0;Btbt*10&&(At.accumulatedTime=0),At.accumulatedTime===0){At.animationID=null,At.startAnimationIfNecessary();return}for(var Lt=(At.accumulatedTime-Math.floor(At.accumulatedTime/bt)*bt)/bt,It=Math.floor(At.accumulatedTime/bt),Ot=[],Ut=[],jt=[],zt=[],Qt=0;Qtit[vt])return-1;if(pt>st[vt]&&Etit[vt])return 1;if(mt>st[vt]&&htxt*10&&(Dt.accumulatedTime=0),Dt.accumulatedTime===0){Dt.animationID=null,Dt.startAnimationIfNecessary();return}for(var zt=(Dt.accumulatedTime-Math.floor(Dt.accumulatedTime/xt)*xt)/xt,Qt=Math.floor(Dt.accumulatedTime/xt),Xt=Nt(Dt.props.willEnter,Dt.props.willLeave,Dt.props.didLeave,Dt.state.mergedPropsStyles,Ot,Dt.state.currentStyles,Dt.state.currentVelocities,Dt.state.lastIdealStyles,Dt.state.lastIdealVelocities),Yt=Xt[0],Bt=Xt[1],Kt=Xt[2],Wt=Xt[3],sn=Xt[4],pn=0;pn=et.length)return _e.target=void 0,createIterResultObject$2(void 0,!0);switch(tt){case"keys":return createIterResultObject$2(nt,!1);case"values":return createIterResultObject$2(et[nt],!1)}return createIterResultObject$2([nt,et[nt]],!1)},"values"),values$2=Iterators.Arguments=Iterators.Array;addToUnscopables$2("keys");addToUnscopables$2("values");addToUnscopables$2("entries");if(DESCRIPTORS$4&&values$2.name!=="values")try{defineProperty$3(values$2,"name",{value:"values"})}catch(_e){}var global$5=global$w,DOMIterables=domIterables,DOMTokenListPrototype=domTokenListPrototype,ArrayIteratorMethods=es_array_iterator,createNonEnumerableProperty$3=createNonEnumerableProperty$a,wellKnownSymbol$4=wellKnownSymbol$t,ITERATOR$2=wellKnownSymbol$4("iterator"),TO_STRING_TAG=wellKnownSymbol$4("toStringTag"),ArrayValues=ArrayIteratorMethods.values,handlePrototype=function(_e,et){if(_e){if(_e[ITERATOR$2]!==ArrayValues)try{createNonEnumerableProperty$3(_e,ITERATOR$2,ArrayValues)}catch{_e[ITERATOR$2]=ArrayValues}if(_e[TO_STRING_TAG]||createNonEnumerableProperty$3(_e,TO_STRING_TAG,et),DOMIterables[et]){for(var tt in ArrayIteratorMethods)if(_e[tt]!==ArrayIteratorMethods[tt])try{createNonEnumerableProperty$3(_e,tt,ArrayIteratorMethods[tt])}catch{_e[tt]=ArrayIteratorMethods[tt]}}}};for(var COLLECTION_NAME in DOMIterables)handlePrototype(global$5[COLLECTION_NAME]&&global$5[COLLECTION_NAME].prototype,COLLECTION_NAME);handlePrototype(DOMTokenListPrototype,"DOMTokenList");var $$b=_export,$findIndex=arrayIteration.findIndex,addToUnscopables$1=addToUnscopables$5,FIND_INDEX="findIndex",SKIPS_HOLES=!0;FIND_INDEX in[]&&Array(1)[FIND_INDEX](function(){SKIPS_HOLES=!1});$$b({target:"Array",proto:!0,forced:SKIPS_HOLES},{findIndex:function _e(et){return $findIndex(this,et,arguments.length>1?arguments[1]:void 0)}});addToUnscopables$1(FIND_INDEX);var TabsDescendantsContext=createDescendantContext("TabsDescendantsContext"),TabPanelDescendantsContext=createDescendantContext("TabPanelDescendantsContext"),[TabsProvider,useTabsCtx]=createContext2("Tabs"),Tabs$1=reactExports.forwardRef(({as:_e="div",children:et,defaultIndex:tt,orientation:nt="horizontal",index:rt=void 0,keyboardActivation:at="auto",onChange:it,readOnly:ot=!1,...st},ct)=>{let{current:ut}=reactExports.useRef(rt!==void 0),dt=useId(st.id||"tabs"),ft=reactExports.useRef(null),pt=reactExports.useRef(!1),[mt,ht]=useControlledState({controlledValue:rt,defaultValue:tt??0,calledFrom:"Tabs"}),[Et,yt]=reactExports.useState(-1),[vt,gt]=useDescendantsInit(),St=reactExports.useCallback(()=>{ft.current&&isFunction(ft.current.focus)&&ft.current.focus()},[]),Rt=reactExports.useCallback(bt=>{it&&it(bt),ht(bt)},[it,ht]),$t=reactExports.useCallback(bt=>{var Tt;let wt=(Tt=vt[bt])==null?void 0:Tt.element,xt=getOwnerDocument(wt);at==="auto"&&(it&&it(bt),ht(bt)),wt&&wt!==xt.activeElement&&isFunction(wt.focus)&&wt.focus()},[at,it,ht,vt]);return reactExports.createElement(DescendantProvider,{context:TabsDescendantsContext,items:vt,set:gt},reactExports.createElement(TabsProvider,{focusedIndex:Et,id:dt,isControlled:ut,isRTL:pt,keyboardActivation:at,onFocusPanel:St,onSelectTab:ot?noop$2:Rt,onSelectTabWithKeyboard:ot?noop$2:$t,orientation:nt,selectedIndex:mt,selectedPanelRef:ft,setFocusedIndex:yt,setSelectedIndex:ht},reactExports.createElement(_e,{...st,ref:ct,"data-reach-tabs":"","data-orientation":nt,id:st.id},isFunction(et)?et({focusedIndex:Et,id:dt,selectedIndex:mt}):et)))});Tabs$1.displayName="Tabs";var TabListImpl=reactExports.forwardRef(({children:_e,as:et="div",onKeyDown:tt,...nt},rt)=>{let{focusedIndex:at,isControlled:it,isRTL:ot,keyboardActivation:st,onSelectTabWithKeyboard:ct,orientation:ut,selectedIndex:dt,setSelectedIndex:ft}=useTabsCtx("TabList"),pt=useDescendants(TabsDescendantsContext),mt=reactExports.useRef(null),ht=useComposedRefs(rt,mt);reactExports.useEffect(()=>{mt.current&&(mt.current.ownerDocument&&mt.current.ownerDocument.dir==="rtl"||getComputedStyle$2(mt.current,"direction")==="rtl")&&(ot.current=!0)},[ot]);let Et=composeEventHandlers(tt,useDescendantKeyDown(TabsDescendantsContext,{currentIndex:st==="manual"?at:dt,orientation:ut,rotate:!0,callback:ct,filter:yt=>!yt.disabled,rtl:ot.current}));return useIsomorphicLayoutEffect(()=>{var yt;if(!it&&boolOrBoolString((yt=pt[dt])==null?void 0:yt.disabled)){let vt=pt.find(gt=>!gt.disabled);vt&&ft(vt.index)}},[pt,it,dt,ft]),reactExports.createElement(et,{role:"tablist","aria-orientation":ut,...nt,"data-reach-tab-list":"",ref:ht,onKeyDown:Et},_e)});TabListImpl.displayName="TabList";var TabList=reactExports.memo(TabListImpl);TabList.displayName="TabList";var Tab=reactExports.forwardRef(({isSelected:_e,children:et,as:tt="button",index:nt,disabled:rt,onBlur:at,onFocus:it,...ot},st)=>{let{id:ct,onSelectTab:ut,orientation:dt,selectedIndex:ft,setFocusedIndex:pt}=useTabsCtx("Tab"),mt=reactExports.useRef(null),[ht,Et]=useStatefulRefValue(mt,null),yt=useComposedRefs(st,Et),vt=reactExports.useMemo(()=>({element:ht,disabled:!!rt}),[rt,ht]),gt=useDescendant(vt,TabsDescendantsContext,nt),St=tt==="button"&&ot.type==null?"button":ot.type,Rt=gt===ft;function $t(){ut(gt)}return reactExports.createElement(tt,{"aria-controls":makeId(ct,"panel",gt),"aria-disabled":rt,"aria-selected":Rt,role:"tab",tabIndex:Rt?0:-1,...ot,ref:yt,"data-reach-tab":"","data-orientation":dt,"data-selected":Rt?"":void 0,disabled:rt,id:makeId(ct,"tab",gt),onClick:$t,onFocus:composeEventHandlers(it,()=>{pt(gt)}),onBlur:composeEventHandlers(at,()=>{pt(-1)}),type:St},et)});Tab.displayName="Tab";var TabPanelsImpl=reactExports.forwardRef(({children:_e,as:et="div",...tt},nt)=>{let rt=reactExports.useRef(),at=useComposedRefs(rt,nt),[it,ot]=useDescendantsInit();return reactExports.createElement(DescendantProvider,{context:TabPanelDescendantsContext,items:it,set:ot},reactExports.createElement(et,{...tt,ref:at,"data-reach-tab-panels":""},_e))});TabPanelsImpl.displayName="TabPanels";var TabPanels=reactExports.memo(TabPanelsImpl);TabPanels.displayName="TabPanels";var TabPanel=reactExports.forwardRef(({children:_e,"aria-label":et,as:tt="div",index:nt,...rt},at)=>{let{selectedPanelRef:it,selectedIndex:ot,id:st}=useTabsCtx("TabPanel"),ct=reactExports.useRef(null),[ut,dt]=useStatefulRefValue(ct,null),ft=reactExports.useMemo(()=>({element:ut}),[ut]),pt=useDescendant(ft,TabPanelDescendantsContext,nt),mt=makeId(st,"panel",pt),ht=pt===ot,Et=reactExports.useRef(!1),yt=Et.current?!ht:!1;reactExports.useEffect(()=>{Et.current=!0},[]);let vt=useComposedRefs(at,dt,ht?it:null);return reactExports.createElement(tt,{"aria-labelledby":makeId(st,"tab",pt),hidden:yt,role:"tabpanel",tabIndex:ht?0:-1,...rt,ref:vt,"data-reach-tab-panel":"",id:mt},_e)});TabPanel.displayName="TabPanel";function useTabsContext(){let{focusedIndex:_e,id:et,selectedIndex:tt}=useTabsCtx("useTabsContext");return reactExports.useMemo(()=>({focusedIndex:_e,id:et,selectedIndex:tt}),[_e,et,tt])}function boolOrBoolString(_e){return _e==="true"?!0:isBoolean(_e)?_e:!1}const tabs="";var _excluded$e=["children"],_excluded2=["index"],HORIZONTAL_PADDING=8,AnimatedContext=React$3.createContext(null),AnimatedTabs=function _e(et){var tt=et.children,nt=_objectWithoutProperties(et,_excluded$e),rt=React$3.useState(null),at=_slicedToArray$4(rt,2),it=at[0],ot=at[1],st=React$3.useRef(),ct=useRect(st),ut=(it&&it.bottom)-(ct&&ct.top),dt=it&&it.width-HORIZONTAL_PADDING*2,ft=(it&&it.left)-(ct&&ct.left)+HORIZONTAL_PADDING;return _createRawReactElement(AnimatedContext.Provider,{value:ot},void 0,React$3.createElement(Tabs$1,_extends$4({},nt,{ref:st}),_createRawReactElement("div",{className:"absolute h-[3px] w-full bg-primary-200 dark:bg-gray-800",style:{top:ut}}),_createRawReactElement("div",{className:clsx("absolute h-[3px] bg-primary-500 transition-all duration-200",{hidden:ut<=0}),style:{left:ft,top:ut,width:dt}}),tt))},AnimatedTab=function _e(et){var tt=et.index,nt=_objectWithoutProperties(et,_excluded2),rt=useTabsContext(),at=rt.selectedIndex,it=at===tt,ot=React$3.useRef(),st=useRect(ot,{observe:it}),ct=React$3.useContext(AnimatedContext);return React$3.useLayoutEffect(function(){it&&ct(st)},[it,st,ct]),React$3.createElement(Tab,_extends$4({ref:ot},nt))},Tabs=function _e(et){var tt=et.items,nt=et.activeItem,rt=tt.findIndex(function(st){var ct=st.name;return ct===nt}),at=useHistory(),it=function(ct){var ut=tt[ct];typeof ut.action=="function"?ut.action():ut.to&&at.push(ut.to)},ot=function(ct,ut){var dt=ct.name,ft=ct.text,pt=ct.title,mt=ct.count;return _createRawReactElement(AnimatedTab,{as:"button",role:"button",title:pt,index:ut},dt,_createRawReactElement("div",{className:"relative"},void 0,mt?_createRawReactElement("span",{className:"absolute left-full ml-2"},void 0,_createRawReactElement(Counter,{count:mt})):null,ft))};return _createRawReactElement(AnimatedTabs,{onChange:it,defaultIndex:rt},void 0,_createRawReactElement(TabList,{},void 0,tt.map(function(st,ct){return ot(st,ct)})))},PROPER_FUNCTION_NAME=functionName.PROPER,fails$9=fails$F,whitespaces=whitespaces$2,non="​…᠎",stringTrimForced=function(_e){return fails$9(function(){return!!whitespaces[_e]()||non[_e]()!==non||PROPER_FUNCTION_NAME&&whitespaces[_e].name!==_e})},$$a=_export,$trim=stringTrim.trim,forcedStringTrimMethod=stringTrimForced;$$a({target:"String",proto:!0,forced:forcedStringTrimMethod("trim")},{trim:function _e(){return $trim(this)}});var _excluded$d=["isCodeEditor","hasError","isResizeable","onChange","autoGrow","maxRows","minRows","theme","maxLength","value"],Textarea=React$3.forwardRef(function(_e,et){var tt=_e.isCodeEditor,nt=tt===void 0?!1:tt,rt=_e.hasError,at=rt===void 0?!1:rt,it=_e.isResizeable,ot=it===void 0?!0:it,st=_e.onChange,ct=_e.autoGrow,ut=ct===void 0?!1:ct,dt=_e.maxRows,ft=dt===void 0?10:dt,pt=_e.minRows,mt=pt===void 0?1:pt,ht=_e.theme,Et=ht===void 0?"default":ht,yt=_e.maxLength,vt=_e.value,gt=_objectWithoutProperties(_e,_excluded$d),St=(vt==null?void 0:vt.length)||0,Rt=reactExports.useState(ut?1:4),$t=_slicedToArray$4(Rt,2),bt=$t[0],wt=$t[1],xt=function(Ct){if(ut){var Nt=20,At=Ct.target.rows;Ct.target.rows=mt;var kt=~~(Ct.target.scrollHeight/Nt);kt===At&&(Ct.target.rows=kt),kt>=ft&&(Ct.target.rows=ft,Ct.target.scrollTop=Ct.target.scrollHeight),wt(kt"u"?"normal":"medium"},void 0,renderText(nt))),dt()),_createRawReactElement("div",{className:"flex shrink-0 pt-0.5"},void 0,_createRawReactElement("button",{type:"button",className:"inline-flex rounded-md text-gray-600 hover:text-gray-700 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:text-gray-600 dark:hover:text-gray-500",onClick:ct,"data-testid":"toast-dismiss"},void 0,_createRawReactElement("span",{className:"sr-only"},void 0,"Close"),_createRawReactElement(Icon$1,{src:vitePluginRequire_1697861811668_44144977,className:"h-5 w-5"})))),st?_createRawReactElement(Text$2,{theme:"muted",size:"sm"},void 0,st):null))},Toggle=function _e(et){var tt=et.id,nt=et.size,rt=nt===void 0?"md":nt,at=et.name,it=et.checked,ot=it===void 0?!1:it,st=et.onChange,ct=et.required,ut=et.disabled,dt=reactExports.useRef(null),ft=function(){var mt,ht;(mt=dt.current)===null||mt===void 0||mt.focus(),(ht=dt.current)===null||ht===void 0||ht.click()};return _createRawReactElement("button",{className:clsx("flex-none rounded-full focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:ring-gray-800 dark:ring-offset-0 dark:focus:ring-primary-500",{"bg-gray-500":!ot&&!ut,"bg-primary-600":ot&&!ut,"bg-gray-200":!ot&&ut,"bg-primary-200":ot&&ut,"w-9 p-0.5":rt==="sm","w-11 p-0.5":rt==="md","cursor-default":ut}),onClick:ft,type:"button"},void 0,_createRawReactElement("div",{className:clsx("rounded-full bg-white transition-transform",{"h-4.5 w-4.5":rt==="sm","translate-x-3.5":rt==="sm"&&ot,"h-6 w-6":rt==="md","translate-x-4":rt==="md"&&ot})}),React$3.createElement("input",{id:tt,ref:dt,name:at,type:"checkbox",className:"sr-only",checked:ot,onChange:st,required:ct,disabled:ut,tabIndex:-1}))};function baseSlice$1(_e,et,tt){var nt=-1,rt=_e.length;et<0&&(et=-et>rt?0:rt+et),tt=tt>rt?rt:tt,tt<0&&(tt+=rt),rt=et>tt?0:tt-et>>>0,et>>>=0;for(var at=Array(rt);++nt=nt?_e:baseSlice(_e,et,tt)}var _castSlice=castSlice$3,rsAstralRange$2="\\ud800-\\udfff",rsComboMarksRange$3="\\u0300-\\u036f",reComboHalfMarksRange$3="\\ufe20-\\ufe2f",rsComboSymbolsRange$3="\\u20d0-\\u20ff",rsComboRange$3=rsComboMarksRange$3+reComboHalfMarksRange$3+rsComboSymbolsRange$3,rsVarRange$2="\\ufe0e\\ufe0f",rsZWJ$2="\\u200d",reHasUnicode=RegExp("["+rsZWJ$2+rsAstralRange$2+rsComboRange$3+rsVarRange$2+"]");function hasUnicode$2(_e){return reHasUnicode.test(_e)}var _hasUnicode=hasUnicode$2;function asciiToArray$1(_e){return _e.split("")}var _asciiToArray=asciiToArray$1,rsAstralRange$1="\\ud800-\\udfff",rsComboMarksRange$2="\\u0300-\\u036f",reComboHalfMarksRange$2="\\ufe20-\\ufe2f",rsComboSymbolsRange$2="\\u20d0-\\u20ff",rsComboRange$2=rsComboMarksRange$2+reComboHalfMarksRange$2+rsComboSymbolsRange$2,rsVarRange$1="\\ufe0e\\ufe0f",rsAstral="["+rsAstralRange$1+"]",rsCombo$2="["+rsComboRange$2+"]",rsFitz$1="\\ud83c[\\udffb-\\udfff]",rsModifier$1="(?:"+rsCombo$2+"|"+rsFitz$1+")",rsNonAstral$1="[^"+rsAstralRange$1+"]",rsRegional$1="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair$1="[\\ud800-\\udbff][\\udc00-\\udfff]",rsZWJ$1="\\u200d",reOptMod$1=rsModifier$1+"?",rsOptVar$1="["+rsVarRange$1+"]?",rsOptJoin$1="(?:"+rsZWJ$1+"(?:"+[rsNonAstral$1,rsRegional$1,rsSurrPair$1].join("|")+")"+rsOptVar$1+reOptMod$1+")*",rsSeq$1=rsOptVar$1+reOptMod$1+rsOptJoin$1,rsSymbol="(?:"+[rsNonAstral$1+rsCombo$2+"?",rsCombo$2,rsRegional$1,rsSurrPair$1,rsAstral].join("|")+")",reUnicode=RegExp(rsFitz$1+"(?="+rsFitz$1+")|"+rsSymbol+rsSeq$1,"g");function unicodeToArray$1(_e){return _e.match(reUnicode)||[]}var _unicodeToArray=unicodeToArray$1,asciiToArray=_asciiToArray,hasUnicode$1=_hasUnicode,unicodeToArray=_unicodeToArray;function stringToArray$3(_e){return hasUnicode$1(_e)?unicodeToArray(_e):asciiToArray(_e)}var _stringToArray=stringToArray$3,castSlice$2=_castSlice,hasUnicode=_hasUnicode,stringToArray$2=_stringToArray,toString$9=toString_1;function createCaseFirst$1(_e){return function(et){et=toString$9(et);var tt=hasUnicode(et)?stringToArray$2(et):void 0,nt=tt?tt[0]:et.charAt(0),rt=tt?castSlice$2(tt,1).join(""):et.slice(1);return nt[_e]()+rt}}var _createCaseFirst=createCaseFirst$1,createCaseFirst=_createCaseFirst,upperFirst$2=createCaseFirst("toUpperCase"),upperFirst_1=upperFirst$2,toString$8=toString_1,upperFirst$1=upperFirst_1;function capitalize$4(_e){return upperFirst$1(toString$8(_e).toLowerCase())}var capitalize_1=capitalize$4;function arrayReduce$2(_e,et,tt,nt){var rt=-1,at=_e==null?0:_e.length;for(nt&&at&&(tt=_e[++rt]);++rt_e.reduce((et,tt,nt)=>et+tt+(nt===_e.length-2?" and ":", "),"").slice(0,-2),buildErrorMessage=_e=>{const et=Object.keys(_e).map(tt=>`${startCase$1(camelCase$2(tt))} ${toSentence(_e[tt])}`);return toSentence(et)},httpErrorMessages=[{code:100,name:"Continue",description:"The server has received the request headers, and the client should proceed to send the request body"},{code:101,name:"Switching Protocols",description:"The requester has asked the server to switch protocols"},{code:103,name:"Checkpoint",description:"Used in the resumable requests proposal to resume aborted PUT or POST requests"},{code:200,name:"OK",description:"The request is OK (this is the standard response for successful HTTP requests)"},{code:201,name:"Created",description:"The request has been fulfilled"},{code:202,name:"Accepted",description:"The request has been accepted for processing"},{code:203,name:"Non-Authoritative Information",description:"The request has been successfully processed"},{code:204,name:"No Content",description:"The request has been successfully processed"},{code:205,name:"Reset Content",description:"The request has been successfully processed"},{code:206,name:"Partial Content",description:"The server is delivering only part of the resource due to a range header sent by the client"},{code:400,name:"Bad Request",description:"The request cannot be fulfilled due to bad syntax"},{code:401,name:"Unauthorized",description:"The request was a legal request"},{code:402,name:"Payment Required",description:"Reserved for future use"},{code:403,name:"Forbidden",description:"The request was a legal request"},{code:404,name:"Not Found",description:"The requested page could not be found but may be available again in the future"},{code:405,name:"Method Not Allowed",description:"A request was made of a page using a request method not supported by that page"},{code:406,name:"Not Acceptable",description:"The server can only generate a response that is not accepted by the client"},{code:407,name:"Proxy Authentication Required",description:"The client must first authenticate itself with the proxy"},{code:408,name:"Request",description:" Timeout The server timed out waiting for the request"},{code:409,name:"Conflict",description:"The request could not be completed because of a conflict in the request"},{code:410,name:"Gone",description:"The requested page is no longer available"},{code:411,name:"Length Required",description:'The "Content-Length" is not defined. The server will not accept the request without it'},{code:412,name:"Precondition",description:" Failed. The precondition given in the request evaluated to false by the server"},{code:413,name:"Request Entity Too Large",description:"The server will not accept the request"},{code:414,name:"Request-URI Too Long",description:"The server will not accept the request"},{code:415,name:"Unsupported Media Type",description:"The server will not accept the request"},{code:416,name:"Requested Range Not Satisfiable",description:"The client has asked for a portion of the file"},{code:417,name:"Expectation Failed",description:"The server cannot meet the requirements of the Expect request-header field"},{code:500,name:"Internal Server Error",description:"An unexpected error occurred"},{code:501,name:"Not Implemented",description:"The server either does not recognize the request method"},{code:502,name:"Bad Gateway",description:"The server was acting as a gateway or proxy and received an invalid response from the upstream server"},{code:503,name:"Service Unavailable",description:"The server is currently unavailable (overloaded or down)"},{code:504,name:"Gateway Timeout",description:"The server was acting as a gateway or proxy and did not receive a timely response from the upstream server"},{code:505,name:"HTTP Version Not Supported",description:"The server does not support the HTTP protocol version used in the request"},{code:511,name:"Network Authentication Required",description:"The client needs to auth"}];var DEFAULT_DURATION=4e3,createToast=function _e(et,tt,nt){var rt=(nt==null?void 0:nt.duration)||DEFAULT_DURATION;_t.custom(function(at){return React$3.createElement(Toast,_extends$4({t:at,message:tt,type:et},nt))},{duration:rt})};function info(_e,et){createToast("info",_e,et)}function success(_e,et){createToast("success",_e,et)}function error(_e,et){createToast("error",_e,et)}var messages$13={unexpectedMessage:{id:"alert.unexpected.message",defaultMessage:"An unexpected error occurred."}};function showAlertForError(_e){if(_e!=null&&_e.response){var et=_e.response,tt=et.data,nt=et.status,rt=et.statusText;if(nt===502)return error("The server is down");if(nt===404||nt===410)return null;var at=rt;if(tt!=null&&tt.error&&(at=tt.error),!at){var it;at=(it=httpErrorMessages.find(function(ot){return ot.code===nt}))===null||it===void 0?void 0:it.description}if(at)return error(at)}else return console.error(_e),error(messages$13.unexpectedMessage)}const toast={info,success,error,showAlertForError},sourceCode={name:"ghostbox",displayName:"Ghostbox",url:"https://github.com/null2264/ghostbox",repository:"null2264/ghostbox",version:"2023.10.4-1c1ddc6",homepage:"https://fedi.aap.my.id",ref:"develop"},getInstanceScopes=_e=>{switch(parseVersion(_e.version).software){case PLEROMA:case AKKOMA:return"read write follow push admin";default:return"read write follow push"}},getScopes=_e=>getInstanceScopes(_e.instance),SWITCH_ACCOUNT="SWITCH_ACCOUNT",AUTH_APP_CREATED="AUTH_APP_CREATED",AUTH_APP_AUTHORIZED="AUTH_APP_AUTHORIZED",AUTH_LOGGED_IN="AUTH_LOGGED_IN",AUTH_LOGGED_OUT="AUTH_LOGGED_OUT",VERIFY_CREDENTIALS_REQUEST="VERIFY_CREDENTIALS_REQUEST",VERIFY_CREDENTIALS_SUCCESS="VERIFY_CREDENTIALS_SUCCESS",VERIFY_CREDENTIALS_FAIL="VERIFY_CREDENTIALS_FAIL",AUTH_ACCOUNT_REMEMBER_REQUEST="AUTH_ACCOUNT_REMEMBER_REQUEST",AUTH_ACCOUNT_REMEMBER_SUCCESS="AUTH_ACCOUNT_REMEMBER_SUCCESS",AUTH_ACCOUNT_REMEMBER_FAIL="AUTH_ACCOUNT_REMEMBER_FAIL",customApp=custom$1("app"),messages$12={loggedOut:{id:"auth.logged_out",defaultMessage:"Logged out."},awaitingApproval:{id:"auth.awaiting_approval",defaultMessage:"Your account is awaiting approval"},invalidCredentials:{id:"auth.invalid_credentials",defaultMessage:"Wrong username or password"}},noOp$7=()=>new Promise(_e=>_e(void 0)),createAppAndToken=()=>_e=>_e(getAuthApp()).then(()=>_e(createAppToken())),getAuthApp=()=>_e=>customApp!=null&&customApp.client_secret?noOp$7().then(()=>_e({type:AUTH_APP_CREATED,app:customApp})):_e(createAuthApp()),createAuthApp=()=>(_e,et)=>{const tt={client_name:sourceCode.displayName,redirect_uris:"urn:ietf:wg:oauth:2.0:oob",scopes:getScopes(et()),website:sourceCode.homepage};return _e(createApp(tt)).then(nt=>_e({type:AUTH_APP_CREATED,app:nt}))},createAppToken=()=>(_e,et)=>{const tt=et().auth.app,nt={client_id:tt.client_id,client_secret:tt.client_secret,redirect_uri:"urn:ietf:wg:oauth:2.0:oob",grant_type:"client_credentials",scope:getScopes(et())};return _e(obtainOAuthToken(nt)).then(rt=>_e({type:AUTH_APP_AUTHORIZED,app:tt,token:rt}))},createUserToken=(_e,et)=>(tt,nt)=>{const rt=nt().auth.app,at={client_id:rt.client_id,client_secret:rt.client_secret,redirect_uri:"urn:ietf:wg:oauth:2.0:oob",grant_type:"password",username:_e,password:et,scope:getScopes(nt())};return tt(obtainOAuthToken(at)).then(it=>tt(authLoggedIn(it)))},otpVerify=(_e,et)=>(tt,nt)=>{const rt=nt().auth.app;return api(nt,"app").post("/oauth/mfa/challenge",{client_id:rt.client_id,client_secret:rt.client_secret,mfa_token:et,code:_e,challenge_type:"totp",redirect_uri:"urn:ietf:wg:oauth:2.0:oob",scope:getScopes(nt())}).then(({data:at})=>tt(authLoggedIn(at)))},verifyCredentials=(_e,et)=>{const tt=parseBaseURL(et);return(nt,rt)=>(nt({type:VERIFY_CREDENTIALS_REQUEST,token:_e}),baseClient(_e,tt).get("/api/v1/accounts/verify_credentials").then(({data:at})=>(nt(importFetchedAccount$1(at)),nt({type:VERIFY_CREDENTIALS_SUCCESS,token:_e,account:at}),at.id===rt().me&&nt(fetchMeSuccess(at)),at)).catch(at=>{var it,ot,st;if(((it=at==null?void 0:at.response)==null?void 0:it.status)===403&&((st=(ot=at==null?void 0:at.response)==null?void 0:ot.data)!=null&&st.id)){const ct=at.response.data;return nt(importFetchedAccount$1(ct)),nt({type:VERIFY_CREDENTIALS_SUCCESS,token:_e,account:ct}),ct.id===rt().me&&nt(fetchMeSuccess(ct)),ct}else throw rt().me===null&&nt(fetchMeFail(at)),nt({type:VERIFY_CREDENTIALS_FAIL,token:_e,error:at}),at}))},rememberAuthAccount=_e=>(et,tt)=>(et({type:AUTH_ACCOUNT_REMEMBER_REQUEST,accountUrl:_e}),KVStore.getItemOrError(`authAccount:${_e}`).then(nt=>(et(importFetchedAccount$1(nt)),et({type:AUTH_ACCOUNT_REMEMBER_SUCCESS,account:nt,accountUrl:_e}),nt.id===tt().me&&et(fetchMeSuccess(nt)),nt)).catch(nt=>{et({type:AUTH_ACCOUNT_REMEMBER_FAIL,error:nt,accountUrl:_e,skipAlert:!0})})),loadCredentials=(_e,et)=>tt=>tt(rememberAuthAccount(et)).finally(()=>tt(verifyCredentials(_e,et))),logIn=(_e,et)=>tt=>tt(getAuthApp()).then(()=>tt(createUserToken(normalizeUsername(_e),et))).catch(nt=>{var rt,at,it,ot;throw((at=(rt=nt.response)==null?void 0:rt.data)==null?void 0:at.error)==="mfa_required"||(((ot=(it=nt.response)==null?void 0:it.data)==null?void 0:ot.identifier)==="awaiting_approval"?toast.error(messages$12.awaitingApproval):toast.error(messages$12.invalidCredentials)),nt}),logOut$1=()=>(_e,et)=>{const tt=et(),nt=getLoggedInAccount(tt),rt=isStandalone(tt);if(!nt)return _e(noOp$7);const at={client_id:tt.auth.app.client_id,client_secret:tt.auth.app.client_secret,token:tt.auth.users.get(nt.url).access_token};return _e(revokeOAuthToken(at)).finally(()=>{queryClient.invalidateQueries(),queryClient.clear(),_e({type:AUTH_LOGGED_OUT,account:nt,standalone:rt}),toast.success(messages$12.loggedOut)})},switchAccount=(_e,et=!1)=>(tt,nt)=>{const rt=selectAccount(nt(),_e);return queryClient.invalidateQueries(),queryClient.clear(),tt({type:SWITCH_ACCOUNT,account:rt,background:et})},fetchOwnAccounts=()=>(_e,et)=>{const tt=et();return tt.auth.users.forEach(nt=>{selectAccount(tt,nt.id)||_e(verifyCredentials(nt.access_token,nt.url)).catch(()=>console.warn(`Failed to load account: ${nt.url}`))})},register$1=_e=>et=>(_e.fullname=_e.username,et(createAppAndToken()).then(()=>et(createAccount$1(_e))).then(({token:tt})=>(et(startOnboarding()),et(authLoggedIn(tt))))),fetchCaptcha=()=>(_e,et)=>api(et).get("/api/v1/pleroma/captcha"),authLoggedIn=_e=>et=>(et({type:AUTH_LOGGED_IN,token:_e}),_e),ME_FETCH_REQUEST="ME_FETCH_REQUEST",ME_FETCH_SUCCESS="ME_FETCH_SUCCESS",ME_FETCH_FAIL="ME_FETCH_FAIL",ME_FETCH_SKIP="ME_FETCH_SKIP",ME_PATCH_REQUEST="ME_PATCH_REQUEST",ME_PATCH_SUCCESS="ME_PATCH_SUCCESS",ME_PATCH_FAIL="ME_PATCH_FAIL",noOp$6=()=>new Promise(_e=>_e(void 0)),getMeId=_e=>_e.me||getAuthUserId(_e),getMeUrl$1=_e=>{var tt;const et=getMeId(_e);if(et)return((tt=selectAccount(_e,et))==null?void 0:tt.url)||getAuthUserUrl(_e)},getMeToken=_e=>{var tt;const et=getMeUrl$1(_e)||_e.auth.me;return(tt=_e.auth.users.get(et))==null?void 0:tt.access_token},fetchMe=()=>(_e,et)=>{const tt=et(),nt=getMeToken(tt),rt=getMeUrl$1(tt);return nt?(_e(fetchMeRequest()),_e(loadCredentials(nt,rt)).catch(at=>_e(fetchMeFail(at)))):(_e({type:ME_FETCH_SKIP}),noOp$6())},persistAuthAccount$1=(_e,et)=>{_e&&_e.url&&(_e.pleroma||(_e.pleroma={}),_e.pleroma.settings_store||(_e.pleroma.settings_store=et.pleroma_settings_store||{}),KVStore.setItem(`authAccount:${_e.url}`,_e).catch(console.error))},patchMe=(_e,et=!1)=>(tt,nt)=>{tt(patchMeRequest());const rt=et?{"Content-Type":"multipart/form-data"}:{};return api(nt).patch("/api/v1/accounts/update_credentials",_e,{headers:rt}).then(at=>{persistAuthAccount$1(at.data,_e),tt(patchMeSuccess(at.data))}).catch(at=>{throw tt(patchMeFail(at)),at})},fetchMeRequest=()=>({type:ME_FETCH_REQUEST}),fetchMeSuccess=_e=>({type:ME_FETCH_SUCCESS,me:_e}),fetchMeFail=_e=>({type:ME_FETCH_FAIL,error:_e,skipAlert:!0}),patchMeRequest=()=>({type:ME_PATCH_REQUEST}),patchMeSuccess=_e=>et=>{const tt={type:ME_PATCH_SUCCESS,me:_e};et(importFetchedAccount$1(_e)),et(tt)},patchMeFail=_e=>({type:ME_PATCH_FAIL,error:_e,skipAlert:!0}),SETTING_CHANGE="SETTING_CHANGE",SETTING_SAVE="SETTING_SAVE",SETTINGS_UPDATE="SETTINGS_UPDATE",FE_NAME="soapbox_fe",saveSuccessMessage={id:"settings.save.success",defaultMessage:"Your preferences have been saved!"},defaultSettings=Map$3({onboarded:!1,skinTone:1,reduceMotion:!1,underlineLinks:!1,autoPlayGif:!0,expandSpoilers:!1,showSensitiveMedia:!1,unfollowModal:!1,boostModal:!1,deleteModal:!0,missingDescriptionModal:!1,defaultPrivacy:"public",defaultContentType:"text/plain",themeMode:"system",locale:navigator.language||"en",showExplanationBox:!0,explanationBox:!0,autoloadTimelines:!0,autoloadMore:!0,preserveSpoilers:!1,systemFont:!1,demetricator:!1,isDeveloper:!1,chats:Map$3({panes:List$1(),mainWindow:"minimized",sound:!0}),home:Map$3({shows:Map$3({reblog:!0,reply:!0,direct:!1}),regex:Map$3({body:""})}),notifications:Map$3({alerts:Map$3({follow:!0,follow_request:!1,favourite:!0,reblog:!0,mention:!0,poll:!0,move:!0,"pleroma:emoji_reaction":!0}),quickFilter:Map$3({active:"all",show:!0,advanced:!1}),shows:Map$3({follow:!0,follow_request:!0,favourite:!0,reblog:!0,mention:!0,poll:!0,move:!0,"pleroma:emoji_reaction":!0}),sounds:Map$3({follow:!1,follow_request:!1,favourite:!1,reblog:!1,mention:!1,poll:!1,move:!1,"pleroma:emoji_reaction":!1}),birthdays:Map$3({show:!0})}),community:Map$3({shows:Map$3({reblog:!1,reply:!0,direct:!1}),other:Map$3({onlyMedia:!1}),regex:Map$3({body:""})}),public:Map$3({shows:Map$3({reblog:!0,reply:!0,direct:!1}),other:Map$3({onlyMedia:!1}),regex:Map$3({body:""})}),direct:Map$3({regex:Map$3({body:""})}),account_timeline:Map$3({shows:Map$3({reblog:!0,pinned:!0,direct:!1})}),groups:Map$3({}),trends:Map$3({show:!0}),columns:List$1([Map$3({id:"COMPOSE",uuid:v4(),params:{}}),Map$3({id:"HOME",uuid:v4(),params:{}}),Map$3({id:"NOTIFICATIONS",uuid:v4(),params:{}})]),remote_timeline:Map$3({pinnedHosts:OrderedSet()})}),getSettings=createSelector([_e=>_e.soapbox.get("defaultSettings"),_e=>_e.settings],(_e,et)=>defaultSettings.mergeDeep(_e).mergeDeep(et)),changeSettingImmediate=(_e,et,tt)=>nt=>{nt({type:SETTING_CHANGE,path:_e,value:et}),nt(saveSettingsImmediate(tt))},changeSetting=(_e,et,tt)=>nt=>(nt({type:SETTING_CHANGE,path:_e,value:et}),nt(saveSettings(tt))),saveSettingsImmediate=_e=>(et,tt)=>{if(!isLoggedIn(tt))return;const nt=tt();if(getSettings(nt).getIn(["saved"]))return;const rt=nt.settings.delete("saved").toJS();et(patchMe({pleroma_settings_store:{[FE_NAME]:rt}})).then(()=>{et({type:SETTING_SAVE}),_e!=null&&_e.showAlert&&toast.success(saveSuccessMessage)}).catch(at=>{toast.showAlertForError(at)})},saveSettings=_e=>et=>et(saveSettingsImmediate(_e)),getLocale=(_e,et="en")=>{const tt=getSettings(_e).get("locale").replace("_","-"),nt=tt.split("-")[0];return Object.keys(messages$1a).includes(tt)?tt:Object.keys(messages$1a).includes(nt)?nt:et},getDomainFromURL=_e=>{try{const et=_e.url;return new URL(et).host}catch{return""}},getDomain=_e=>{const et=_e.acct.split("@")[1];return et||getDomainFromURL(_e)},getBaseURL=_e=>{try{return new URL(_e.url).origin}catch{return""}},getAcct=(_e,et)=>et===!0?_e.fqn:_e.acct,isLocal=_e=>_e.acct.split("@")[1]===void 0,isRemote=_e=>!isLocal(_e),DEFAULT_HEADERS=["/headers/original/missing.png","/images/banner.png",vitePluginRequire_1697861817641_37912257],isDefaultHeader=_e=>DEFAULT_HEADERS.some(et=>_e.endsWith(et)),DEFAULT_AVATARS=["/avatars/original/missing.png","/images/avi.png",vitePluginRequire_1697861817641_69752310],isDefaultAvatar=_e=>DEFAULT_AVATARS.some(et=>_e.endsWith(et));function baseFindIndex$1(_e,et,tt,nt){for(var rt=_e.length,at=tt+(nt?1:-1);nt?at--:++at-1;);return tt}var _charsStartIndex=charsStartIndex$2,baseToString$1=_baseToString,castSlice$1=_castSlice,charsStartIndex$1=_charsStartIndex,stringToArray$1=_stringToArray,toString$5=toString_1,reTrimStart=/^\s+/;function trimStart(_e,et,tt){if(_e=toString$5(_e),_e&&(tt||et===void 0))return _e.replace(reTrimStart,"");if(!_e||!(et=baseToString$1(et)))return _e;var nt=stringToArray$1(_e),rt=charsStartIndex$1(nt,stringToArray$1(et));return castSlice$1(nt,rt).join("")}var trimStart_1=trimStart;const trimStart$1=getDefaultExportFromCjs$1(trimStart_1),isSuperset=(_e,et)=>{if(_e.isSuperset!==void 0)return _e.isSuperset(et);for(const tt in et)if(!Object.prototype.hasOwnProperty.call(_e,tt)||_e[tt]!==et.get(tt))return!1;return!0},tuple=(_e,et)=>({tuple:[_e,et]}),getQuirks=createSelector([_e=>parseVersion(_e.version)],_e=>({invertedPagination:any([_e.software===PLEROMA,_e.software===AKKOMA]),mrfWithReason:any([_e.software===PLEROMA&>e$1(_e.compatVersion,"2.5.0"),_e.software===AKKOMA]),noApps:_e.software===MITRA,noOAuthForm:_e.software===MITRA})),find$1=(_e,et,tt)=>_e.find(nt=>isSuperset(nt,Map$3({group:et,key:tt}))),toSimplePolicy=_e=>{const et=find$1(_e,":pleroma",":mrf_simple"),tt=(nt,rt)=>{const at=rt.getIn(["tuple",0]),it=rt.getIn(["tuple",1]);let ot;return typeof it=="boolean"?ot=it:ot=Set$3(it.map(st=>Set$3(typeof st=="string"?[st,"No reason"]:st.get("tuple")))),nt.set(trimStart$1(at,":"),ot)};if(et!=null&&et.get){const rt=et.get("value",List$1()).reduce(tt,Map$3());return mrfSimpleSchema.parse(rt.toJS())}else return mrfSimpleSchema.parse({})},fromSimplePolicy=(_e,et)=>{const tt=getQuirks(et().instance),nt=Object.entries(_e).map(([rt,at])=>{const it=[`:${rt}`,at];if(typeof at=="boolean")return fromJS(tuple(it[0],it[1]));if(tt.mrfWithReason){const ot=at.map(st=>fromJS(typeof st=="string"?tuple(st,"No reason"):tuple(st[0],st[1])));it[1]=ot}return fromJS(tuple(it[0],it[1]))});return List$1([Map$3({group:":pleroma",key:":mrf_simple",value:nt})])},ConfigDB={find:find$1,toSimplePolicy,fromSimplePolicy},normalizeId=_e=>typeof _e=="string"?_e:"";function selectAccount(_e,et){var tt;return(tt=_e.entities[Entities.ACCOUNTS])==null?void 0:tt.store[et]}function selectOwnAccount(_e){if(_e.me)return selectAccount(_e,_e.me)}const accountIdsToAccts=(_e,et)=>et.map(tt=>selectAccount(_e,tt).acct),getAccountBase=(_e,et)=>{var tt;return(tt=_e.entities[Entities.ACCOUNTS])==null?void 0:tt.store[et]},getAccountRelationship=(_e,et)=>_e.relationships.get(et),makeGetAccount=()=>createSelector([getAccountBase,getAccountRelationship],(_e,et)=>_e?{..._e,relationship:et}:null),toServerSideType=_e=>{switch(_e){case"home":case"notifications":case"public":case"thread":return _e;default:return _e.includes("list:")?"home":"public"}},getFilters=(_e,et)=>_e.filters.filter(tt=>(!(et!=null&&et.contextType)||tt.context.includes(toServerSideType(et.contextType)))&&(tt.expires_at===null||Date.parse(tt.expires_at)>new Date().getTime())),escapeRegExp=_e=>_e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),regexFromFilters=_e=>_e.size===0?null:new RegExp(_e.map(et=>et.keywords.map(tt=>{let nt=escapeRegExp(tt.keyword);return tt.whole_word&&(/^[\w]/.test(nt)&&(nt=`\\b${nt}`),/[\w]$/.test(nt)&&(nt=`${nt}\\b`)),nt}).join("|")).join("|"),"i"),checkFiltered=(_e,et)=>et.reduce((tt,nt)=>tt.concat(nt.keywords.reduce((rt,at)=>{let it=escapeRegExp(at.keyword);return at.whole_word&&(/^[\w]/.test(it)&&(it=`\\b${it}`),/[\w]$/.test(it)&&(it=`${it}\\b`)),new RegExp(it).test(_e)?rt.concat(nt.title):rt},List$1())),List$1()),makeGetStatus=()=>createSelector([(_e,{id:et})=>_e.statuses.get(et),(_e,{id:et})=>{var tt;return _e.statuses.get(((tt=_e.statuses.get(et))==null?void 0:tt.reblog)||"")},(_e,{username:et})=>et,getFilters,_e=>_e.me,_e=>getFeatures(_e.instance)],(_e,et,tt,nt,rt,at)=>{if(!_e)return null;const{account:it}=_e;return it.acct!==tt&&tt!==void 0?null:_e.withMutations(st=>{if(st.set("reblog",et||null),at.filters&&it.id!==rt){const ct=checkFiltered((et==null?void 0:et.search_index)||_e.search_index,nt);st.set("filtered",ct)}})}),makeGetNotification=()=>createSelector([(_e,et)=>et,(_e,et)=>selectAccount(_e,normalizeId(et.account)),(_e,et)=>selectAccount(_e,normalizeId(et.target)),(_e,et)=>_e.statuses.get(normalizeId(et.status))],(_e,et,tt,nt)=>_e.merge({account:et||null,target:tt||null,status:nt||null})),getAccountGallery=createSelector([(_e,et)=>{var tt;return((tt=_e.timelines.get(`account:${et}:media`))==null?void 0:tt.items)||OrderedSet()},_e=>_e.statuses],(_e,et)=>_e.reduce((tt,nt)=>{const rt=et.get(nt);return!rt||rt.reblog?tt:tt.concat(rt.media_attachments.map(at=>at.merge({status:rt,account:rt.account})))},List$1())),getGroupGallery=createSelector([(_e,et)=>{var tt;return((tt=_e.timelines.get(`group:${et}:media`))==null?void 0:tt.items)||OrderedSet()},_e=>_e.statuses],(_e,et)=>_e.reduce((tt,nt)=>{const rt=et.get(nt);return!rt||rt.reblog?tt:tt.concat(rt.media_attachments.map(at=>at.merge({status:rt,account:rt.account})))},List$1())),makeGetReport=()=>{const _e=makeGetStatus();return createSelector([(et,tt)=>et.admin.reports.get(tt),(et,tt)=>{var nt;return selectAccount(et,((nt=et.admin.reports.get(tt))==null?void 0:nt.account)||"")},(et,tt)=>{var nt;return selectAccount(et,((nt=et.admin.reports.get(tt))==null?void 0:nt.target_account)||"")},(et,tt)=>{var nt;return List$1(fromJS((nt=et.admin.reports.get(tt))==null?void 0:nt.statuses)).map(rt=>et.statuses.get(normalizeId(rt))).filter(rt=>rt).map(rt=>_e(et,rt.toJS()))}],(et,tt,nt,rt)=>et?et.withMutations(at=>{at.set("account",tt),at.set("target_account",nt),at.set("statuses",rt)}):null)},getAuthUserIds=createSelector([_e=>_e.auth.users],_e=>_e.reduce((et,tt)=>{try{const nt=tt.id;return validId(nt)?et.add(nt):et}catch{return et}},OrderedSet())),makeGetOtherAccounts=()=>createSelector([_e=>{var et;return(et=_e.entities[Entities.ACCOUNTS])==null?void 0:et.store},getAuthUserIds,_e=>_e.me],(_e,et,tt)=>et.reduce((nt,rt)=>{if(rt===tt)return nt;const at=_e[rt];return at?nt.push(at):nt},List$1())),getSimplePolicy=createSelector([_e=>_e.admin.configs,_e=>_e.instance.pleroma.metadata.federation.mrf_simple],(_e,et)=>({...et,...ConfigDB.toSimplePolicy(_e)})),getRemoteInstanceFavicon=(_e,et)=>{var rt,at,it;const tt=(rt=_e.entities[Entities.ACCOUNTS])==null?void 0:rt.store,nt=(at=Object.entries(tt).find(([ot,st])=>st&&getDomain(st)===et))==null?void 0:at[1];return(it=nt==null?void 0:nt.pleroma)==null?void 0:it.favicon},getRemoteInstanceFederation=(_e,et)=>{const tt=getSimplePolicy(_e);return fromJS(Object.fromEntries(Object.entries(tt).map(([nt,rt])=>[nt,typeof rt=="boolean"?rt:!!rt.find(at=>at[0]===et)])))},makeGetHosts=()=>createSelector([getSimplePolicy],_e=>{const{accept:et,reject_deletes:tt,report_removal:nt,handle_threads:rt,...at}=_e;return Object.values(at).reduce((it,ot)=>it.union(ot),OrderedSet()).sort()}),makeGetRemoteInstance=()=>createSelector([(_e,et)=>et,getRemoteInstanceFavicon,getRemoteInstanceFederation],(_e,et,tt)=>Map$3({host:_e,favicon:et,federation:tt})),makeGetStatusIds=()=>createSelector([(_e,{type:et,prefix:tt})=>getSettings(_e).get(tt||et,Map$3()),(_e,{type:et})=>{var tt;return((tt=_e.timelines.get(et))==null?void 0:tt.items)||OrderedSet()},_e=>_e.statuses],(_e,et,tt)=>et.filter(nt=>{const rt=tt.get(nt);return rt?!shouldFilter(rt,_e):!0})),validId=_e=>typeof _e=="string"&&_e!=="null"&&_e!=="undefined",isURL=_e=>{if(typeof _e!="string")return!1;try{return new URL(_e),!0}catch{return!1}},parseBaseURL=_e=>{try{return new URL(_e).origin}catch{return""}},getLoggedInAccount=_e=>selectOwnAccount(_e),isLoggedIn=_e=>validId(_e().me),getAppToken=_e=>_e.auth.app.access_token,getUserToken=(_e,et)=>{var nt,rt;if(!et)return;const tt=(nt=selectAccount(_e,et))==null?void 0:nt.url;if(tt)return(rt=_e.auth.users.get(tt))==null?void 0:rt.access_token},getAccessToken=_e=>{const et=_e.me;return getUserToken(_e,et)},getAuthUserId=_e=>{var tt;const et=_e.auth.me;return List$1([(tt=_e.auth.users.get(et))==null?void 0:tt.id,et].filter(nt=>nt)).find(validId)},getAuthUserUrl=_e=>{var tt;const et=_e.auth.me;return List$1([(tt=_e.auth.users.get(et))==null?void 0:tt.url,et].filter(nt=>nt)).find(isURL)},getVapidKey=_e=>_e.auth.app.vapid_key||_e.instance.pleroma.vapid_public_key,getMeUrl=_e=>{var et;return(et=selectOwnAccount(_e))==null?void 0:et.url},getHost$1=_e=>{const et=getMeUrl(_e)||getAuthUserUrl(_e);try{return new URL(et).host}catch{return null}},rememberInstance=createAsyncThunk("instance/remember",async _e=>await KVStore.getItemOrError(`instance:${_e}`)),needsNodeinfo=_e=>parseVersion(get$4(_e,"version")).software==="Pleroma"&&!get$4(_e,["pleroma","metadata"]),fetchInstance=createAsyncThunk("instance/fetch",async(_e,{dispatch:et,getState:tt,rejectWithValue:nt})=>{try{const{data:rt}=await api(tt).get("/api/v1/instance");return needsNodeinfo(rt)&&et(fetchNodeinfo()),rt}catch(rt){return nt(rt)}}),loadInstance=createAsyncThunk("instance/load",async(_e,{dispatch:et,getState:tt})=>{const nt=getHost$1(tt());await Promise.all([et(rememberInstance(nt||"")),et(fetchInstance())])}),fetchNodeinfo=createAsyncThunk("nodeinfo/fetch",async(_e,{getState:et})=>await api(et).get("/nodeinfo/2.1.json")),LOCAL_STORAGE_VERIFICATION_KEY="soapbox:verification",PEPE_FETCH_INSTANCE_SUCCESS="PEPE_FETCH_INSTANCE_SUCCESS",FETCH_CHALLENGES_SUCCESS="FETCH_CHALLENGES_SUCCESS",FETCH_TOKEN_SUCCESS="FETCH_TOKEN_SUCCESS",SET_NEXT_CHALLENGE="SET_NEXT_CHALLENGE",SET_CHALLENGES_COMPLETE="SET_CHALLENGES_COMPLETE",SET_LOADING="SET_LOADING",EMAIL="email",SMS="sms",AGE="age",fetchStoredVerification=()=>{try{return JSON.parse(localStorage.getItem(LOCAL_STORAGE_VERIFICATION_KEY))}catch{return null}},removeStoredVerification=()=>{localStorage.removeItem(LOCAL_STORAGE_VERIFICATION_KEY)},fetchStoredToken=()=>{try{return fetchStoredVerification().token}catch{return null}},fetchStoredChallenges=()=>{try{return fetchStoredVerification().challenges}catch{return null}},fetchStoredChallengeTypes=()=>{try{return fetchStoredVerification().challengeTypes}catch{return null}},updateStorage=({..._e})=>{const et=fetchStoredVerification();localStorage.setItem(LOCAL_STORAGE_VERIFICATION_KEY,JSON.stringify({...et,..._e}))},fetchVerificationConfig=()=>async _e=>{await _e(fetchPepeInstance()),_e(fetchRegistrationToken())};function saveChallenges(_e){const et=fetchStoredChallenges()||{};Object.keys(et).filter(nt=>!_e.includes(nt)).forEach(nt=>delete et[nt]);for(let nt=0;nt<_e.length;nt++){const rt=_e[nt];typeof et[rt]!="number"&&(et[rt]=0)}updateStorage({challenges:et,challengeTypes:_e})}function finishChallenge(_e){const et=fetchStoredChallenges()||{};et[_e]=1,updateStorage({challenges:et})}const fetchNextChallenge=()=>{const _e=fetchStoredChallenges()||{};return Object.keys(_e).find(et=>_e[et]===0)},dispatchNextChallenge=_e=>{const et=fetchNextChallenge();_e(et?{type:SET_NEXT_CHALLENGE,challenge:et}:{type:SET_CHALLENGES_COMPLETE})},fetchPepeInstance=()=>(_e,et)=>(_e({type:SET_LOADING}),api(et).get("/api/v1/pepe/instance").then(tt=>{const{challenges:nt,age_minimum:rt}=tt.data;saveChallenges(nt);const at=fetchNextChallenge();_e({type:PEPE_FETCH_INSTANCE_SUCCESS,instance:{isReady:!0,...tt.data}}),_e({type:FETCH_CHALLENGES_SUCCESS,ageMinimum:rt,currentChallenge:at,isComplete:!at})}).finally(()=>_e({type:SET_LOADING,value:!1}))),fetchRegistrationToken=()=>(_e,et)=>{_e({type:SET_LOADING});const tt=fetchStoredToken();return tt?(_e({type:FETCH_TOKEN_SUCCESS,value:tt}),null):api(et).post("/api/v1/pepe/registrations").then(nt=>(updateStorage({token:nt.data.access_token}),_e({type:FETCH_TOKEN_SUCCESS,value:nt.data.access_token}))).finally(()=>_e({type:SET_LOADING,value:!1}))},requestEmailVerification=_e=>(et,tt)=>{et({type:SET_LOADING});const nt=fetchStoredToken();return api(tt).post("/api/v1/pepe/verify_email/request",{email:_e},{headers:{Authorization:`Bearer ${nt}`}}).finally(()=>et({type:SET_LOADING,value:!1}))},checkEmailVerification=()=>(_e,et)=>{const tt=fetchStoredToken();return api(et).get("/api/v1/pepe/verify_email",{headers:{Authorization:`Bearer ${tt}`}})},confirmEmailVerification=_e=>(et,tt)=>{et({type:SET_LOADING});const nt=fetchStoredToken();return api(tt).post("/api/v1/pepe/verify_email/confirm",{token:_e},{headers:{Authorization:`Bearer ${nt}`}}).then(rt=>{updateStorageFromEmailConfirmation(et,rt.data.token)}).finally(()=>et({type:SET_LOADING,value:!1}))},updateStorageFromEmailConfirmation=(_e,et)=>{const tt=fetchStoredChallengeTypes();if(!tt)return;const nt=tt.indexOf("email"),rt={};tt==null||tt.forEach((at,it)=>{const ot=it<=nt?1:0;rt[at]=ot}),updateStorage({token:et,challengeTypes:tt,challenges:rt}),dispatchNextChallenge(_e)},postEmailVerification=()=>_e=>{finishChallenge(EMAIL),dispatchNextChallenge(_e)},requestPhoneVerification=_e=>(et,tt)=>{et({type:SET_LOADING});const nt=fetchStoredToken();return api(tt).post("/api/v1/pepe/verify_sms/request",{phone:_e},{headers:{Authorization:`Bearer ${nt}`}}).finally(()=>et({type:SET_LOADING,value:!1}))},reRequestPhoneVerification=_e=>(et,tt)=>(et({type:SET_LOADING}),api(tt).post("/api/v1/pepe/reverify_sms/request",{phone:_e}).finally(()=>et({type:SET_LOADING,value:!1}))),confirmPhoneVerification=_e=>(et,tt)=>{et({type:SET_LOADING});const nt=fetchStoredToken();return api(tt).post("/api/v1/pepe/verify_sms/confirm",{code:_e},{headers:{Authorization:`Bearer ${nt}`}}).then(()=>{finishChallenge(SMS),dispatchNextChallenge(et)}).finally(()=>et({type:SET_LOADING,value:!1}))},reConfirmPhoneVerification=_e=>(et,tt)=>(et({type:SET_LOADING}),api(tt).post("/api/v1/pepe/reverify_sms/confirm",{code:_e}).finally(()=>et({type:SET_LOADING,value:!1}))),verifyAge=_e=>(et,tt)=>{et({type:SET_LOADING});const nt=fetchStoredToken();return api(tt).post("/api/v1/pepe/verify_age/confirm",{birthday:_e},{headers:{Authorization:`Bearer ${nt}`}}).then(()=>{finishChallenge(AGE),dispatchNextChallenge(et)}).finally(()=>et({type:SET_LOADING,value:!1}))},createAccount=(_e,et)=>(tt,nt)=>{tt({type:SET_LOADING});const rt=fetchStoredToken();return api(nt).post("/api/v1/pepe/accounts",{username:_e,password:et},{headers:{Authorization:`Bearer ${rt}`}}).finally(()=>tt({type:SET_LOADING,value:!1}))};var acceptedGdpr=!!localStorage.getItem("soapbox:gdpr"),GdprBanner=function _e(){var et=reactExports.useState(acceptedGdpr),tt=_slicedToArray$4(et,2),nt=tt[0],rt=tt[1],at=reactExports.useState(!1),it=_slicedToArray$4(at,2),ot=it[0],st=it[1],ct=useInstance(),ut=useSoapboxConfig(),dt=useAppSelector(function(mt){return!!mt.me}),ft=function(){localStorage.setItem("soapbox:gdpr","true"),st(!0),setTimeout(function(){return rt(!0)},200)},pt=ut.gdpr&&!dt&&!nt;return pt?_createRawReactElement(Banner,{theme:"opaque",className:clsx("transition-transform",{"translate-y-full":ot})},void 0,_createRawReactElement("div",{className:"flex flex-col space-y-4 rtl:space-x-reverse lg:flex-row lg:items-center lg:justify-between lg:space-x-4 lg:space-y-0"},void 0,_createRawReactElement(Stack,{space:2},void 0,_createRawReactElement(Text$2,{size:"xl",weight:"bold"},void 0,_createRawReactElement(FormattedMessage$1,{id:"gdpr.title",defaultMessage:"{siteTitle} uses cookies",values:{siteTitle:ct.title}})),_createRawReactElement(Text$2,{weight:"medium",className:"opacity-60"},void 0,_createRawReactElement(FormattedMessage$1,{id:"gdpr.message",defaultMessage:"{siteTitle} uses session cookies, which are essential to the website's functioning.",values:{siteTitle:ct.title}}))),_createRawReactElement(HStack,{space:2,alignItems:"center",className:"flex-none"},void 0,ut.gdprUrl&&_createRawReactElement("a",{href:ut.gdprUrl,tabIndex:-1,className:"inline-flex"},void 0,_createRawReactElement(Button,{theme:"secondary"},void 0,_createRawReactElement(FormattedMessage$1,{id:"gdpr.learn_more",defaultMessage:"Learn more"}))),_createRawReactElement(Button,{theme:"accent",onClick:ft},void 0,_createRawReactElement(FormattedMessage$1,{id:"gdpr.accept",defaultMessage:"Accept"}))))):null},LandingGradient=function _e(){return _createRawReactElement("div",{className:"fixed h-screen w-full bg-gradient-to-tr from-primary-50 via-white to-gradient-end/10 dark:from-primary-900/50 dark:via-primary-900 dark:to-primary-800/50"})},LoadingScreen=function _e(){return _createRawReactElement("div",{className:"fixed h-screen w-screen"},void 0,_createRawReactElement(LandingGradient,{}),_createRawReactElement("div",{className:"d-screen fixed z-10 flex w-screen items-center justify-center"},void 0,_createRawReactElement("div",{className:"p-4"},void 0,_createRawReactElement(Spinner,{size:40,withText:!1}))))};const vitePluginRequire_1697861809668_3303363="/packs/assets/user-1a0da6f5.svg";var sameValue$1=Object.is||function _e(et,tt){return et===tt?et!==0||1/et===1/tt:et!==et&&tt!==tt},call$3=functionCall,fixRegExpWellKnownSymbolLogic$1=fixRegexpWellKnownSymbolLogic,anObject$4=anObject$m,isNullOrUndefined$4=isNullOrUndefined$a,requireObjectCoercible$2=requireObjectCoercible$b,sameValue=sameValue$1,toString$4=toString$t,getMethod$2=getMethod$7,regExpExec$2=regexpExecAbstract;fixRegExpWellKnownSymbolLogic$1("search",function(_e,et,tt){return[function(rt){var at=requireObjectCoercible$2(this),it=isNullOrUndefined$4(rt)?void 0:getMethod$2(rt,_e);return it?call$3(it,rt,at):new RegExp(rt)[_e](toString$4(at))},function(nt){var rt=anObject$4(this),at=toString$4(nt),it=tt(et,rt,at);if(it.done)return it.value;var ot=rt.lastIndex;sameValue(ot,0)||(rt.lastIndex=0);var st=regExpExec$2(rt,at);return sameValue(rt.lastIndex,ot)||(rt.lastIndex=ot),st===null?-1:st.index}]});const vitePluginRequire_1697861799667_99146864="/packs/assets/soapbox-logo-bc8c5e10.svg",vitePluginRequire_1697861799667_51012484="/packs/assets/soapbox-logo-white-bbd3c469.svg";var _excluded$c=["className","theme"],SiteLogo=function _e(et){var tt=et.className,nt=et.theme,rt=_objectWithoutProperties(et,_excluded$c),at=useSoapboxConfig(),it=at.logo,ot=at.logoDarkMode,st=useSettings(),ct=useTheme()==="dark";nt==="dark"&&(ct=!0);var ut=ct?vitePluginRequire_1697861799667_51012484:vitePluginRequire_1697861799667_99146864,dt=function(){return st.get("demo")?ut:ct&&ot?ot:it||ot||ut};return React$3.createElement("img",_extends$4({className:clsx("object-contain",tt),src:dt()},rt))},fails$8=fails$F,wellKnownSymbol$3=wellKnownSymbol$t,DESCRIPTORS$3=descriptors$1,IS_PURE$1=isPure,ITERATOR$1=wellKnownSymbol$3("iterator"),urlConstructorDetection=!fails$8(function(){var _e=new URL("b?a=1&b=2&c=3","http://a"),et=_e.searchParams,tt=new URLSearchParams("a=1&a=2&b=3"),nt="";return _e.pathname="c%20d",et.forEach(function(rt,at){et.delete("b"),nt+=at+rt}),tt.delete("a",2),tt.delete("b",void 0),IS_PURE$1&&(!_e.toJSON||!tt.has("a",1)||tt.has("a",2)||!tt.has("a",void 0)||tt.has("b"))||!et.size&&(IS_PURE$1||!DESCRIPTORS$3)||!et.sort||_e.href!=="http://a/c%20d?a=1&c=3"||et.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!et[ITERATOR$1]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://тест").host!=="xn--e1aybc"||new URL("http://a#б").hash!=="#%D0%B1"||nt!=="a1c3"||new URL("http://x",void 0).host!=="x"}),defineBuiltIn$3=defineBuiltIn$f,defineBuiltIns$2=function(_e,et,tt){for(var nt in et)defineBuiltIn$3(_e,nt,et[nt],tt);return _e},$$9=_export,global$4=global$w,call$2=functionCall,uncurryThis$7=functionUncurryThis,DESCRIPTORS$2=descriptors$1,USE_NATIVE_URL=urlConstructorDetection,defineBuiltIn$2=defineBuiltIn$f,defineBuiltInAccessor$1=defineBuiltInAccessor$8,defineBuiltIns$1=defineBuiltIns$2,setToStringTag$2=setToStringTag$7,createIteratorConstructor$1=iteratorCreateConstructor,InternalStateModule$2=internalState,anInstance$2=anInstance$4,isCallable$2=isCallable$t,hasOwn$3=hasOwnProperty_1,bind$2=functionBindContext,classof$2=classof$f,anObject$3=anObject$m,isObject$6=isObject$u,$toString=toString$t,create$2=objectCreate,createPropertyDescriptor$1=createPropertyDescriptor$7,getIterator=getIterator$3,getIteratorMethod=getIteratorMethod$4,validateArgumentsLength=validateArgumentsLength$2,wellKnownSymbol$2=wellKnownSymbol$t,arraySort=arraySort$1,ITERATOR=wellKnownSymbol$2("iterator"),URL_SEARCH_PARAMS="URLSearchParams",URL_SEARCH_PARAMS_ITERATOR=URL_SEARCH_PARAMS+"Iterator",setInternalState$2=InternalStateModule$2.set,getInternalParamsState=InternalStateModule$2.getterFor(URL_SEARCH_PARAMS),getInternalIteratorState=InternalStateModule$2.getterFor(URL_SEARCH_PARAMS_ITERATOR),getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,safeGetBuiltIn=function(_e){if(!DESCRIPTORS$2)return global$4[_e];var et=getOwnPropertyDescriptor(global$4,_e);return et&&et.value},nativeFetch=safeGetBuiltIn("fetch"),NativeRequest=safeGetBuiltIn("Request"),Headers$1=safeGetBuiltIn("Headers"),RequestPrototype=NativeRequest&&NativeRequest.prototype,HeadersPrototype=Headers$1&&Headers$1.prototype,RegExp$1=global$4.RegExp,TypeError$1=global$4.TypeError,decodeURIComponent$1=global$4.decodeURIComponent,encodeURIComponent$1=global$4.encodeURIComponent,charAt$1=uncurryThis$7("".charAt),join$1=uncurryThis$7([].join),push$2=uncurryThis$7([].push),replace$2=uncurryThis$7("".replace),shift=uncurryThis$7([].shift),splice=uncurryThis$7([].splice),split=uncurryThis$7("".split),stringSlice$2=uncurryThis$7("".slice),plus=/\+/g,sequences=Array(4),percentSequence=function(_e){return sequences[_e-1]||(sequences[_e-1]=RegExp$1("((?:%[\\da-f]{2}){"+_e+"})","gi"))},percentDecode=function(_e){try{return decodeURIComponent$1(_e)}catch{return _e}},deserialize=function(_e){var et=replace$2(_e,plus," "),tt=4;try{return decodeURIComponent$1(et)}catch{for(;tt;)et=replace$2(et,percentSequence(tt--),percentDecode);return et}},find=/[!'()~]|%20/g,replacements={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(_e){return replacements[_e]},serialize=function(_e){return replace$2(encodeURIComponent$1(_e),find,replacer)},URLSearchParamsIterator=createIteratorConstructor$1(function _e(et,tt){setInternalState$2(this,{type:URL_SEARCH_PARAMS_ITERATOR,iterator:getIterator(getInternalParamsState(et).entries),kind:tt})},"Iterator",function _e(){var et=getInternalIteratorState(this),tt=et.kind,nt=et.iterator.next(),rt=nt.value;return nt.done||(nt.value=tt==="keys"?rt.key:tt==="values"?rt.value:[rt.key,rt.value]),nt},!0),URLSearchParamsState=function(_e){this.entries=[],this.url=null,_e!==void 0&&(isObject$6(_e)?this.parseObject(_e):this.parseQuery(typeof _e=="string"?charAt$1(_e,0)==="?"?stringSlice$2(_e,1):_e:$toString(_e)))};URLSearchParamsState.prototype={type:URL_SEARCH_PARAMS,bindURL:function(_e){this.url=_e,this.update()},parseObject:function(_e){var et=getIteratorMethod(_e),tt,nt,rt,at,it,ot,st;if(et)for(tt=getIterator(_e,et),nt=tt.next;!(rt=call$2(nt,tt)).done;){if(at=getIterator(anObject$3(rt.value)),it=at.next,(ot=call$2(it,at)).done||(st=call$2(it,at)).done||!call$2(it,at).done)throw TypeError$1("Expected sequence with length 2");push$2(this.entries,{key:$toString(ot.value),value:$toString(st.value)})}else for(var ct in _e)hasOwn$3(_e,ct)&&push$2(this.entries,{key:ct,value:$toString(_e[ct])})},parseQuery:function(_e){if(_e)for(var et=split(_e,"&"),tt=0,nt,rt;tt0?arguments[0]:void 0,tt=setInternalState$2(this,new URLSearchParamsState(et));DESCRIPTORS$2||(this.size=tt.entries.length)},URLSearchParamsPrototype=URLSearchParamsConstructor.prototype;defineBuiltIns$1(URLSearchParamsPrototype,{append:function _e(et,tt){var nt=getInternalParamsState(this);validateArgumentsLength(arguments.length,2),push$2(nt.entries,{key:$toString(et),value:$toString(tt)}),DESCRIPTORS$2||this.length++,nt.updateURL()},delete:function(_e){for(var et=getInternalParamsState(this),tt=validateArgumentsLength(arguments.length,1),nt=et.entries,rt=$toString(_e),at=tt<2?void 0:arguments[1],it=at===void 0?at:$toString(at),ot=0;otnt.key?1:-1}),et.updateURL()},forEach:function _e(et){for(var tt=getInternalParamsState(this).entries,nt=bind$2(et,arguments.length>1?arguments[1]:void 0),rt=0,at;rt1?wrapRequestOptions(arguments[1]):{})}}),isCallable$2(NativeRequest)){var RequestConstructor=function(et){return anInstance$2(this,RequestPrototype),new NativeRequest(et,arguments.length>1?wrapRequestOptions(arguments[1]):{})};RequestPrototype.constructor=RequestConstructor,RequestConstructor.prototype=RequestPrototype,$$9({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:RequestConstructor})}}var web_urlSearchParams_constructor={URLSearchParams:URLSearchParamsConstructor,getState:getInternalParamsState},$$8=_export,iterate$2=iterate$5,createProperty=createProperty$6;$$8({target:"Object",stat:!0},{fromEntries:function _e(et){var tt={};return iterate$2(et,function(nt,rt){createProperty(tt,nt,rt)},{AS_ENTRIES:!0}),tt}});const LOCAL_STORAGE_REDIRECT_KEY="soapbox:redirect-uri",getRedirectUrl=()=>{let _e=localStorage.getItem(LOCAL_STORAGE_REDIRECT_KEY);return _e&&(_e=decodeURIComponent(_e)),localStorage.removeItem(LOCAL_STORAGE_REDIRECT_KEY),_e||"/"},useCachedLocationHandler=()=>{const _e=()=>localStorage.removeItem(LOCAL_STORAGE_REDIRECT_KEY);return reactExports.useEffect(()=>(window.addEventListener("beforeunload",_e),()=>{window.removeEventListener("beforeunload",_e)}),[]),null},vitePluginRequire_1697861834958_14655583="/packs/assets/key-73a26022.svg",vitePluginRequire_1697861834958_18196223="/packs/assets/brand-github-67acf9a6.svg",vitePluginRequire_1697861834958_6742064="/packs/assets/brand-slack-da4d4eeb.svg",vitePluginRequire_1697861834958_31697286="/packs/assets/brand-windows-8c405104.svg",vitePluginRequire_1697861834958_73327257="/packs/assets/brand-google-3718a30e.svg",vitePluginRequire_1697861834958_36356568="/packs/assets/brand-facebook-16d7d158.svg",vitePluginRequire_1697861834958_14363503="/packs/assets/brand-twitter-153358e5.svg",createProviderApp=()=>async(_e,et)=>{const tt=getScopes(et()),nt={client_name:sourceCode.displayName,redirect_uris:`${window.location.origin}/login/external`,website:sourceCode.homepage,scopes:tt};return _e(createApp(nt))},prepareRequest=_e=>async(et,tt)=>{const nt=isURL(BACKEND_URL)?BACKEND_URL:"",rt=getScopes(tt()),at=await et(createProviderApp()),{client_id:it,redirect_uri:ot}=at;localStorage.setItem("soapbox:external:app",JSON.stringify(at)),localStorage.setItem("soapbox:external:baseurl",nt),localStorage.setItem("soapbox:external:scopes",rt);const st={provider:_e,authorization:{client_id:it,redirect_uri:ot,scope:rt}},ct=axios$1.toFormData(st),ut=new URLSearchParams(ct);location.href=`${nt}/oauth/prepare_request?${ut.toString()}`};function capitalize$2(_e){return _e.charAt(0).toUpperCase()+_e.slice(1)}var messages$11={tooltip:{id:"oauth_consumer.tooltip",defaultMessage:"Sign in with {provider}"}},BRAND_ICONS={twitter:vitePluginRequire_1697861834958_14363503,facebook:vitePluginRequire_1697861834958_36356568,google:vitePluginRequire_1697861834958_73327257,microsoft:vitePluginRequire_1697861834958_31697286,slack:vitePluginRequire_1697861834958_6742064,github:vitePluginRequire_1697861834958_18196223},ConsumerButton=function _e(et){var tt=et.provider,nt=useIntl(),rt=useAppDispatch(),at=BRAND_ICONS[tt]||vitePluginRequire_1697861834958_14655583,it=function(){rt(prepareRequest(tt))};return _createRawReactElement(Tooltip,{text:nt.formatMessage(messages$11.tooltip,{provider:capitalize$2(tt)})},void 0,_createRawReactElement(IconButton$1,{theme:"outlined",className:"p-2.5",iconClassName:"h-6 w-6",src:at,onClick:it}))},ConsumersList=function _e(){var et=useInstance(),tt=List$1(et.pleroma.oauth_consumer_strategies);return tt.size>0?_createRawReactElement(Card$1,{className:"bg-gray-50 p-4 dark:bg-primary-800 sm:rounded-xl"},void 0,_createRawReactElement(Text$2,{size:"xs",theme:"muted"},void 0,_createRawReactElement(FormattedMessage$1,{id:"oauth_consumers.title",defaultMessage:"Other ways to sign in"})),_createRawReactElement(HStack,{space:2},void 0,tt.map(function(nt){return _createRawReactElement(ConsumerButton,{provider:nt})}))):null},messages$10={username:{id:"login.fields.username_label",defaultMessage:"E-mail or username"},email:{id:"login.fields.email_label",defaultMessage:"E-mail address"},password:{id:"login.fields.password_placeholder",defaultMessage:"Password"}},LoginForm=function _e(et){var tt=et.isLoading,nt=et.handleSubmit,rt=useIntl(),at=useFeatures(),it=rt.formatMessage(at.logInWithUsername?messages$10.username:messages$10.email),ot=rt.formatMessage(messages$10.password);return _createRawReactElement("div",{},void 0,_createRawReactElement("div",{className:"-mx-4 mb-4 border-b border-solid border-gray-200 pb-4 dark:border-gray-800 sm:-mx-10 sm:pb-10"},void 0,_createRawReactElement("h1",{className:"text-center text-2xl font-bold"},void 0,_createRawReactElement(FormattedMessage$1,{id:"login_form.header",defaultMessage:"Sign In"}))),_createRawReactElement(Stack,{className:"mx-auto sm:w-2/3 sm:pt-10 md:w-1/2",space:5},void 0,_createRawReactElement(Form,{onSubmit:nt},void 0,_createRawReactElement(FormGroup,{labelText:it},void 0,_createRawReactElement(Input,{"aria-label":it,placeholder:it,type:"text",name:"username",autoCorrect:"off",autoCapitalize:"off",required:!0})),_createRawReactElement(FormGroup,{labelText:ot,hintText:_createRawReactElement(Link$2,{to:"/reset-password",className:"hover:underline",tabIndex:-1},void 0,_createRawReactElement(FormattedMessage$1,{id:"login.reset_password_hint",defaultMessage:"Trouble logging in?"}))},void 0,_createRawReactElement(Input,{"aria-label":ot,placeholder:ot,type:"password",name:"password",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",required:!0})),_createRawReactElement(FormActions,{},void 0,_createRawReactElement(Button,{theme:"primary",type:"submit",disabled:tt},void 0,_createRawReactElement(FormattedMessage$1,{id:"login.sign_in",defaultMessage:"Sign in"})))),_createRawReactElement(ConsumersList,{})))},messages$$={otpCodeHint:{id:"login.fields.otp_code_hint",defaultMessage:"Enter the two-factor code generated by your phone app or use one of your recovery codes"},otpCodeLabel:{id:"login.fields.otp_code_label",defaultMessage:"Two-factor code:"},otpLoginFail:{id:"login.otp_log_in.fail",defaultMessage:"Invalid code, please try again."}},OtpAuthForm=function _e(et){var tt=et.mfa_token,nt=useAppDispatch(),rt=useIntl(),at=reactExports.useState(!1),it=_slicedToArray$4(at,2),ot=it[0],st=it[1],ct=reactExports.useState(!1),ut=_slicedToArray$4(ct,2),dt=ut[0],ft=ut[1],pt=reactExports.useState(""),mt=_slicedToArray$4(pt,2),ht=mt[0],Et=mt[1],yt=function(St){return Object.fromEntries(Array.from(St).map(function(Rt){return[Rt.name,Rt.value]}))},vt=function(St){var Rt=yt(St.target),$t=Rt.code;nt(otpVerify($t,tt)).then(function(bt){var wt=bt.access_token;return Et(!1),nt(verifyCredentials(wt))}).then(function(bt){return ft(!0),nt(switchAccount(bt.id))}).catch(function(){st(!1),Et(!0)}),st(!0),St.preventDefault()};return dt?_createRawReactElement(Redirect,{to:"/"}):_createRawReactElement("div",{},void 0,_createRawReactElement("div",{className:"-mx-4 mb-4 border-b border-solid border-gray-200 pb-4 dark:border-gray-600 sm:-mx-10 sm:pb-10"},void 0,_createRawReactElement("h1",{className:"text-center text-2xl font-bold"},void 0,_createRawReactElement(FormattedMessage$1,{id:"login.otp_log_in",defaultMessage:"OTP Login"}))),_createRawReactElement("div",{className:"mx-auto sm:w-2/3 sm:pt-10 md:w-1/2"},void 0,_createRawReactElement(Form,{onSubmit:vt},void 0,_createRawReactElement(FormGroup,{labelText:rt.formatMessage(messages$$.otpCodeLabel),hintText:rt.formatMessage(messages$$.otpCodeHint),errors:ht?[rt.formatMessage(messages$$.otpLoginFail)]:[]},void 0,_createRawReactElement(Input,{name:"code",type:"text",autoComplete:"off",autoFocus:!0,required:!0})),_createRawReactElement(FormActions,{},void 0,_createRawReactElement(Button,{theme:"primary",type:"submit",disabled:ot},void 0,_createRawReactElement(FormattedMessage$1,{id:"login.sign_in",defaultMessage:"Sign in"}))))))},LoginPage=function _e(){var et=useAppDispatch(),tt=useAppSelector(function(wt){return wt.me}),nt=useAppSelector(function(wt){return isStandalone(wt)}),rt=new URLSearchParams(window.location.search).get("token"),at=reactExports.useState(!1),it=_slicedToArray$4(at,2),ot=it[0],st=it[1],ct=reactExports.useState(!!rt),ut=_slicedToArray$4(ct,2),dt=ut[0],ft=ut[1],pt=reactExports.useState(rt||""),mt=_slicedToArray$4(pt,2),ht=mt[0],Et=mt[1],yt=reactExports.useState(!1),vt=_slicedToArray$4(yt,2),gt=vt[0],St=vt[1],Rt=function(xt){return Object.fromEntries(Array.from(xt).map(function(Tt){return[Tt.name,Tt.value]}))},$t=function(xt){var Tt=Rt(xt.target),Ct=Tt.username,Nt=Tt.password;et(logIn(Ct,Nt)).then(function(At){var kt=At.access_token;return et(verifyCredentials(kt))}).then(function(){var At=_asyncToGenerator(regeneratorRuntime.mark(function kt(Pt){return regeneratorRuntime.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:return Dt.next=2,et(fetchInstance());case 2:return Dt.abrupt("return",Pt);case 3:case"end":return Dt.stop()}},kt)}));return function(kt){return At.apply(this,arguments)}}()).then(function(At){et(closeModal()),typeof tt=="string"?et(switchAccount(At.id)):St(!0)}).catch(function(At){var kt,Pt=(kt=At.response)===null||kt===void 0?void 0:kt.data;(Pt==null?void 0:Pt.error)==="mfa_required"&&(ft(!0),Et(Pt.mfa_token)),st(!1)}),st(!0),xt.preventDefault()};if(nt)return _createRawReactElement(Redirect,{to:"/login/external"});if(gt){var bt=getRedirectUrl();return _createRawReactElement(Redirect,{to:bt})}return dt?_createRawReactElement(OtpAuthForm,{mfa_token:ht}):_createRawReactElement(LoginForm,{handleSubmit:$t,isLoading:ot})};const FETCH_TOKENS_REQUEST="FETCH_TOKENS_REQUEST",FETCH_TOKENS_SUCCESS="FETCH_TOKENS_SUCCESS",FETCH_TOKENS_FAIL="FETCH_TOKENS_FAIL",REVOKE_TOKEN_REQUEST="REVOKE_TOKEN_REQUEST",REVOKE_TOKEN_SUCCESS="REVOKE_TOKEN_SUCCESS",REVOKE_TOKEN_FAIL="REVOKE_TOKEN_FAIL",RESET_PASSWORD_REQUEST="RESET_PASSWORD_REQUEST",RESET_PASSWORD_SUCCESS="RESET_PASSWORD_SUCCESS",RESET_PASSWORD_FAIL="RESET_PASSWORD_FAIL",RESET_PASSWORD_CONFIRM_REQUEST="RESET_PASSWORD_CONFIRM_REQUEST",RESET_PASSWORD_CONFIRM_SUCCESS="RESET_PASSWORD_CONFIRM_SUCCESS",RESET_PASSWORD_CONFIRM_FAIL="RESET_PASSWORD_CONFIRM_FAIL",CHANGE_PASSWORD_REQUEST="CHANGE_PASSWORD_REQUEST",CHANGE_PASSWORD_SUCCESS="CHANGE_PASSWORD_SUCCESS",CHANGE_PASSWORD_FAIL="CHANGE_PASSWORD_FAIL",CHANGE_EMAIL_REQUEST="CHANGE_EMAIL_REQUEST",CHANGE_EMAIL_SUCCESS="CHANGE_EMAIL_SUCCESS",CHANGE_EMAIL_FAIL="CHANGE_EMAIL_FAIL",DELETE_ACCOUNT_REQUEST="DELETE_ACCOUNT_REQUEST",DELETE_ACCOUNT_SUCCESS="DELETE_ACCOUNT_SUCCESS",DELETE_ACCOUNT_FAIL="DELETE_ACCOUNT_FAIL",MOVE_ACCOUNT_REQUEST="MOVE_ACCOUNT_REQUEST",MOVE_ACCOUNT_SUCCESS="MOVE_ACCOUNT_SUCCESS",MOVE_ACCOUNT_FAIL="MOVE_ACCOUNT_FAIL",fetchOAuthTokens=()=>(_e,et)=>(_e({type:FETCH_TOKENS_REQUEST}),api(et).get("/api/oauth_tokens").then(({data:tt})=>{_e({type:FETCH_TOKENS_SUCCESS,tokens:tt})}).catch(()=>{_e({type:FETCH_TOKENS_FAIL})})),revokeOAuthTokenById=_e=>(et,tt)=>(et({type:REVOKE_TOKEN_REQUEST,id:_e}),api(tt).delete(`/api/oauth_tokens/${_e}`).then(()=>{et({type:REVOKE_TOKEN_SUCCESS,id:_e})}).catch(()=>{et({type:REVOKE_TOKEN_FAIL,id:_e})})),changePassword=(_e,et,tt)=>(nt,rt)=>(nt({type:CHANGE_PASSWORD_REQUEST}),api(rt).post("/api/v1/pleroma/change_password",{password:_e,new_password:et,new_password_confirmation:tt}).then(at=>{if(at.data.error)throw at.data.error;nt({type:CHANGE_PASSWORD_SUCCESS,response:at})}).catch(at=>{throw nt({type:CHANGE_PASSWORD_FAIL,error:at,skipAlert:!0}),at})),resetPassword=_e=>(et,tt)=>{const nt=normalizeUsername(_e),rt=tt(),at=parseVersion(rt.instance.version);et({type:RESET_PASSWORD_REQUEST});const it=nt.includes("@")?{email:nt}:{nickname:nt,username:nt},ot=at.software===TRUTHSOCIAL?"/api/v1/truth/password_reset/request":"/auth/password";return api(tt).post(ot,it).then(()=>{et({type:RESET_PASSWORD_SUCCESS})}).catch(st=>{throw et({type:RESET_PASSWORD_FAIL,error:st}),st})},resetPasswordConfirm=(_e,et)=>(tt,nt)=>{const rt={password:_e,reset_password_token:et};return tt({type:RESET_PASSWORD_CONFIRM_REQUEST}),api(nt).post("/api/v1/truth/password_reset/confirm",rt).then(()=>{tt({type:RESET_PASSWORD_CONFIRM_SUCCESS})}).catch(at=>{throw tt({type:RESET_PASSWORD_CONFIRM_FAIL,error:at}),at})},changeEmail=(_e,et)=>(tt,nt)=>(tt({type:CHANGE_EMAIL_REQUEST,email:_e}),api(nt).post("/api/v1/pleroma/change_email",{email:_e,password:et}).then(rt=>{if(rt.data.error)throw rt.data.error;tt({type:CHANGE_EMAIL_SUCCESS,email:_e,response:rt})}).catch(rt=>{throw tt({type:CHANGE_EMAIL_FAIL,email:_e,error:rt,skipAlert:!0}),rt})),confirmChangedEmail=_e=>(et,tt)=>api(tt).get(`/api/v1/truth/email/confirm?confirmation_token=${_e}`),deleteAccount=_e=>(et,tt)=>{const nt=getLoggedInAccount(tt());return et({type:DELETE_ACCOUNT_REQUEST}),api(tt).post("/api/v1/pleroma/delete_account",{password:_e}).then(rt=>{if(rt.data.error)throw rt.data.error;et({type:DELETE_ACCOUNT_SUCCESS,response:rt}),et({type:AUTH_LOGGED_OUT,account:nt}),toast.success(messages$12.loggedOut)}).catch(rt=>{throw et({type:DELETE_ACCOUNT_FAIL,error:rt,skipAlert:!0}),rt})},moveAccount=(_e,et)=>(tt,nt)=>(tt({type:MOVE_ACCOUNT_REQUEST}),api(nt).post("/api/v1/pleroma/move_account",{password:et,target_account:_e}).then(rt=>{if(rt.data.error)throw rt.data.error;tt({type:MOVE_ACCOUNT_SUCCESS,response:rt})}).catch(rt=>{throw tt({type:MOVE_ACCOUNT_FAIL,error:rt,skipAlert:!0}),rt}));var messages$_={nicknameOrEmail:{id:"password_reset.fields.username_placeholder",defaultMessage:"E-mail or username"},email:{id:"password_reset.fields.email_placeholder",defaultMessage:"E-mail address"},confirmation:{id:"password_reset.confirmation",defaultMessage:"Check your email for confirmation."}},PasswordReset=function _e(){var et=useAppDispatch(),tt=useIntl(),nt=useFeatures(),rt=reactExports.useState(!1),at=_slicedToArray$4(rt,2),it=at[0],ot=at[1],st=reactExports.useState(!1),ct=_slicedToArray$4(st,2),ut=ct[0],dt=ct[1],ft=function(mt){var ht=mt.target.nickname_or_email.value;ot(!0),et(resetPassword(ht)).then(function(){ot(!1),dt(!0),toast.info(tt.formatMessage(messages$_.confirmation))}).catch(function(){ot(!1)})};return ut?_createRawReactElement(Redirect,{to:"/"}):_createRawReactElement("div",{},void 0,_createRawReactElement("div",{className:"-mx-4 mb-4 border-b border-solid border-gray-200 pb-4 dark:border-gray-600 sm:-mx-10 sm:pb-10"},void 0,_createRawReactElement("h1",{className:"text-center text-2xl font-bold"},void 0,_createRawReactElement(FormattedMessage$1,{id:"password_reset.header",defaultMessage:"Reset Password"}))),_createRawReactElement("div",{className:"mx-auto sm:w-2/3 sm:pt-10 md:w-1/2"},void 0,_createRawReactElement(Form,{onSubmit:ft},void 0,_createRawReactElement(FormGroup,{labelText:tt.formatMessage(nt.logInWithUsername?messages$_.nicknameOrEmail:messages$_.email)},void 0,_createRawReactElement(Input,{type:"text",name:"nickname_or_email",placeholder:"me@example.com",required:!0})),_createRawReactElement(FormActions,{},void 0,_createRawReactElement(Button,{type:"submit",theme:"primary",disabled:it},void 0,_createRawReactElement(FormattedMessage$1,{id:"password_reset.reset",defaultMessage:"Reset password"}))))))};const vitePluginRequire_1697861832162_60905940="/packs/assets/point-a0dc1c0a.svg",vitePluginRequire_1697861823905_3845308="/packs/assets/check-44829451.svg";var ValidationCheckmark=function _e(et){var tt=et.isValid,nt=et.text;return _createRawReactElement(HStack,{alignItems:"center",space:2,"data-testid":"validation-checkmark"},void 0,_createRawReactElement(Icon$1,{src:tt?vitePluginRequire_1697861823905_3845308:vitePluginRequire_1697861832162_60905940,className:clsx({"w-4 h-4":!0,"text-gray-400 dark:text-gray-600 dark:fill-gray-600 fill-gray-400":!tt,"text-success-500":tt})}),_createRawReactElement(Text$2,{theme:"muted",size:"sm"},void 0,nt))},messages$Z={minimumCharacters:{id:"registration.validation.minimum_characters",defaultMessage:"8 characters"},capitalLetter:{id:"registration.validation.capital_letter",defaultMessage:"1 capital letter"},lowercaseLetter:{id:"registration.validation.lowercase_letter",defaultMessage:"1 lowercase letter"}},hasUppercaseCharacter=function _e(et){for(var tt=0;tt=8},[nt]),it=reactExports.useMemo(function(){return hasUppercaseCharacter(nt)},[nt]),ot=reactExports.useMemo(function(){return hasLowercaseCharacter(nt)},[nt]),st=at&&it&&ot;return reactExports.useEffect(function(){tt(st)},[st]),_createRawReactElement(Stack,{className:"mt-2",space:1},void 0,_createRawReactElement(ValidationCheckmark,{isValid:at,text:rt.formatMessage(messages$Z.minimumCharacters)}),_createRawReactElement(ValidationCheckmark,{isValid:it,text:rt.formatMessage(messages$Z.capitalLetter)}),_createRawReactElement(ValidationCheckmark,{isValid:ot,text:rt.formatMessage(messages$Z.lowercaseLetter)}))},token=new URLSearchParams(window.location.search).get("reset_password_token"),messages$Y={resetPasswordFail:{id:"reset_password.fail",defaultMessage:"Expired token, please try again."},passwordPlaceholder:{id:"reset_password.password.placeholder",defaultMessage:"Placeholder"}},Statuses$3={IDLE:"IDLE",LOADING:"LOADING",SUCCESS:"SUCCESS",FAIL:"FAIL"},PasswordResetConfirm=function _e(){var et=useIntl(),tt=useAppDispatch(),nt=useFeatures(),rt=nt.passwordRequirements,at=React$3.useState(""),it=_slicedToArray$4(at,2),ot=it[0],st=it[1],ct=React$3.useState(Statuses$3.IDLE),ut=_slicedToArray$4(ct,2),dt=ut[0],ft=ut[1],pt=React$3.useState(!rt),mt=_slicedToArray$4(pt,2),ht=mt[0],Et=mt[1],yt=dt===Statuses$3.LOADING,vt=React$3.useCallback(function(Rt){Rt.preventDefault(),ft(Statuses$3.LOADING),tt(resetPasswordConfirm(ot,token)).then(function(){return ft(Statuses$3.SUCCESS)}).catch(function(){return ft(Statuses$3.FAIL)})},[ot]),gt=React$3.useCallback(function(Rt){st(Rt.target.value)},[]),St=function(){return dt===Statuses$3.FAIL?[et.formatMessage(messages$Y.resetPasswordFail)]:[]};return dt===Statuses$3.SUCCESS?_createRawReactElement(Redirect,{to:"/"}):_createRawReactElement("div",{},void 0,_createRawReactElement("div",{className:"-mx-4 mb-4 border-b border-solid border-gray-200 pb-4 dark:border-gray-600 sm:-mx-10 sm:pb-10"},void 0,_createRawReactElement("h1",{className:"text-center text-2xl font-bold"},void 0,_createRawReactElement(FormattedMessage$1,{id:"reset_password.header",defaultMessage:"Set New Password"}))),_createRawReactElement("div",{className:"mx-auto sm:w-2/3 sm:pt-10 md:w-1/2"},void 0,_createRawReactElement(Form,{onSubmit:vt},void 0,_createRawReactElement(FormGroup,{labelText:_createRawReactElement(FormattedMessage$1,{id:"reset_password.password.label",defaultMessage:"Password"}),errors:St()},void 0,_createRawReactElement(Input,{type:"password",name:"password",placeholder:et.formatMessage(messages$Y.passwordPlaceholder),onChange:gt,required:!0}),rt&&_createRawReactElement(PasswordIndicator,{password:ot,onChange:Et})),_createRawReactElement(FormActions,{},void 0,_createRawReactElement(Button,{type:"submit",theme:"primary",disabled:yt||!ht},void 0,_createRawReactElement(FormattedMessage$1,{id:"password_reset.reset",defaultMessage:"Reset password"}))))))};const vitePluginRequire_1697861810834_25410229="/packs/assets/at-0ee55bf2.svg";var _excluded$b=["src","alt","className"],Icon=function _e(et){var tt=et.src,nt=et.alt,rt=et.className,at=_objectWithoutProperties(et,_excluded$b);return React$3.createElement("div",_extends$4({className:clsx("svg-icon",rt)},at),_createRawReactElement(InlineSVG,{src:tt,title:nt,loader:React$3.createElement(React$3.Fragment,null)}))},IconButton=function _e(et){var tt=et.active,nt=et.className,rt=et.disabled,at=et.expanded,it=et.iconClassName,ot=et.onClick,st=et.onKeyDown,ct=et.onKeyUp,ut=et.onKeyPress,dt=et.onMouseDown,ft=et.onMouseEnter,pt=et.onMouseLeave,mt=et.pressed;et.size;var ht=et.src,Et=et.tabIndex,yt=Et===void 0?0:Et,vt=et.text,gt=et.title,St=function(Ct){Ct.preventDefault(),!rt&&ot&&ot(Ct)},Rt=function(Ct){!rt&&dt&&dt(Ct)},$t=function(Ct){!rt&&st&&st(Ct)},bt=function(Ct){!rt&&ct&&ct(Ct)},wt=function(Ct){ut&&!rt&&ut(Ct)},xt=clsx(nt,"icon-button",{active:tt,disabled:rt});return _createRawReactElement("button",{"aria-label":gt,"aria-pressed":mt,"aria-expanded":at,title:gt,className:xt,onClick:St,onMouseDown:Rt,onKeyDown:$t,onKeyUp:bt,onKeyPress:wt,onMouseEnter:ft,onMouseLeave:pt,tabIndex:yt,disabled:rt,type:"button"},void 0,_createRawReactElement("div",{},void 0,_createRawReactElement(Icon,{className:it,src:ht,"aria-hidden":"true"})),vt&&_createRawReactElement("span",{className:"icon-button__text"},void 0,vt))};const BUNDLE_FETCH_REQUEST="BUNDLE_FETCH_REQUEST",BUNDLE_FETCH_SUCCESS="BUNDLE_FETCH_SUCCESS",BUNDLE_FETCH_FAIL="BUNDLE_FETCH_FAIL",fetchBundleRequest=_e=>({type:BUNDLE_FETCH_REQUEST,skipLoading:_e}),fetchBundleSuccess=_e=>({type:BUNDLE_FETCH_SUCCESS,skipLoading:_e}),fetchBundleFail=(_e,et)=>({type:BUNDLE_FETCH_FAIL,error:_e,skipLoading:et});var $$7=_export,global$3=global$w,setToStringTag$1=setToStringTag$7;$$7({global:!0},{Reflect:{}});setToStringTag$1(global$3.Reflect,"Reflect",!0);var uncurryThis$6=functionUncurryThis,aCallable$1=aCallable$b,isObject$5=isObject$u,hasOwn$2=hasOwnProperty_1,arraySlice=arraySlice$4,NATIVE_BIND=functionBindNative,$Function=Function,concat$1=uncurryThis$6([].concat),join=uncurryThis$6([].join),factories={},construct=function(_e,et,tt){if(!hasOwn$2(factories,et)){for(var nt=[],rt=0;rt1?arguments[1]:void 0),pt;pt=pt?pt.next:dt.first;)for(ft(pt.value,pt.key,this);pt&&pt.removed;)pt=pt.previous},has:function(ut){return!!st(this,ut)}}),defineBuiltIns(at,tt?{get:function(ut){var dt=st(this,ut);return dt&&dt.value},set:function(ut,dt){return ot(this,ut===0?0:ut,dt)}}:{add:function(ut){return ot(this,ut=ut===0?0:ut,ut)}}),DESCRIPTORS$1&&defineBuiltInAccessor(at,"size",{configurable:!0,get:function(){return it(this).size}}),rt},setStrong:function(_e,et,tt){var nt=et+" Iterator",rt=internalStateGetterFor(et),at=internalStateGetterFor(nt);defineIterator(_e,et,function(it,ot){setInternalState$1(this,{type:nt,target:it,state:rt(it),kind:ot,last:void 0})},function(){for(var it=at(this),ot=it.kind,st=it.last;st&&st.removed;)st=st.previous;return!it.target||!(it.last=st=st?st.next:it.state.first)?(it.target=void 0,createIterResultObject$1(void 0,!0)):createIterResultObject$1(ot==="keys"?st.key:ot==="values"?st.value:[st.key,st.value],!1)},tt?"entries":"values",!tt,!0),setSpecies(et)}},collection=collection$1,collectionStrong=collectionStrong$1;collection("Map",function(_e){return function(){return _e(this,arguments.length?arguments[0]:void 0)}},collectionStrong);function _createSuper$4(_e){var et=_isNativeReflectConstruct$4();return function(){var nt=_getPrototypeOf$1(_e),rt;if(et){var at=_getPrototypeOf$1(this).constructor;rt=Reflect.construct(nt,arguments,at)}else rt=nt.apply(this,arguments);return _possibleConstructorReturn$1(this,rt)}}function _isNativeReflectConstruct$4(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var emptyComponent=function _e(){return null},noop$1=function _e(){},Bundle=function(_e){_inherits$1(tt,_e);var et=_createSuper$4(tt);function tt(){var nt;_classCallCheck$1(this,tt);for(var rt=arguments.length,at=new Array(rt),it=0;it=st||dt?_createRawReactElement(at,{}):null:ut===null?_createRawReactElement(it,{onRetry:this.load}):ot(ut)}}]),tt}(React$3.PureComponent);_defineProperty$7(Bundle,"defaultProps",{loading:emptyComponent,error:emptyComponent,renderDelay:0,onFetch:noop$1,onFetchSuccess:noop$1,onFetchFail:noop$1});_defineProperty$7(Bundle,"cache",new Map);var mapDispatchToProps$2=function _e(et){return{onFetch:function(){et(fetchBundleRequest())},onFetchSuccess:function(){et(fetchBundleSuccess())},onFetchFail:function(nt){et(fetchBundleFail(nt))}}};const BundleContainer=connect(null,mapDispatchToProps$2)(Bundle);var messages$X={birthdayPlaceholder:{id:"edit_profile.fields.birthday_placeholder",defaultMessage:"Your birthday"},previousMonth:{id:"datepicker.previous_month",defaultMessage:"Previous month"},nextMonth:{id:"datepicker.next_month",defaultMessage:"Next month"},previousYear:{id:"datepicker.previous_year",defaultMessage:"Previous year"},nextYear:{id:"datepicker.next_year",defaultMessage:"Next year"}},BirthdayInput=function _e(et){var tt=et.value,nt=et.onChange,rt=et.required,at=useIntl(),it=useFeatures(),ot=useInstance(),st=it.birthdays,ct=ot.pleroma.metadata.birthday_min_age,ut=reactExports.useMemo(function(){if(!st)return null;var mt=new Date;return mt=new Date(mt.getTime()-ct*1e3*60*60*24+mt.getTimezoneOffset()*1e3*60),mt},[ct]),dt=reactExports.useMemo(function(){if(!st||!tt)return null;var mt=new Date(tt);return new Date(mt.getTime()+mt.getTimezoneOffset()*6e4)},[tt]);if(!st)return null;var ft=function(ht){var Et=ht.decreaseMonth,yt=ht.increaseMonth,vt=ht.prevMonthButtonDisabled,gt=ht.nextMonthButtonDisabled,St=ht.decreaseYear,Rt=ht.increaseYear,$t=ht.prevYearButtonDisabled,bt=ht.nextYearButtonDisabled,wt=ht.date;return _createRawReactElement("div",{className:"flex flex-col gap-2"},void 0,_createRawReactElement("div",{className:"flex items-center justify-between"},void 0,_createRawReactElement(IconButton,{className:"datepicker__button rtl:rotate-180",src:vitePluginRequire_1697861826697_12112271,onClick:Et,disabled:vt,"aria-label":at.formatMessage(messages$X.previousMonth),title:at.formatMessage(messages$X.previousMonth)}),at.formatDate(wt,{month:"long"}),_createRawReactElement(IconButton,{className:"datepicker__button rtl:rotate-180",src:vitePluginRequire_1697861828086_76580221,onClick:yt,disabled:gt,"aria-label":at.formatMessage(messages$X.nextMonth),title:at.formatMessage(messages$X.nextMonth)})),_createRawReactElement("div",{className:"flex items-center justify-between"},void 0,_createRawReactElement(IconButton,{className:"datepicker__button rtl:rotate-180",src:vitePluginRequire_1697861826697_12112271,onClick:St,disabled:$t,"aria-label":at.formatMessage(messages$X.previousYear),title:at.formatMessage(messages$X.previousYear)}),at.formatDate(wt,{year:"numeric"}),_createRawReactElement(IconButton,{className:"datepicker__button rtl:rotate-180",src:vitePluginRequire_1697861828086_76580221,onClick:Rt,disabled:bt,"aria-label":at.formatMessage(messages$X.nextYear),title:at.formatMessage(messages$X.nextYear)})))},pt=function(ht){return nt(ht?new Date(ht.getTime()-ht.getTimezoneOffset()*6e4).toISOString().slice(0,10):"")};return _createRawReactElement("div",{className:"relative mt-1 rounded-md shadow-sm"},void 0,_createRawReactElement(BundleContainer,{fetchComponent:DatePicker},void 0,function(mt){return _createRawReactElement(mt,{selected:dt,wrapperClassName:"react-datepicker-wrapper",onChange:pt,placeholderText:at.formatMessage(messages$X.birthdayPlaceholder),minDate:new Date("1900-01-01"),maxDate:ut,required:rt,renderCustomHeader:ft,isClearable:!rt})}))},noOp$5=function _e(){},messages$W={placeholder:{id:"registration.captcha.placeholder",defaultMessage:"Enter the pictured text"}},CaptchaField=function _e(et){var tt=et.name,nt=et.value,rt=et.onChange,at=rt===void 0?noOp$5:rt,it=et.onFetch,ot=it===void 0?noOp$5:it,st=et.onFetchFail,ct=st===void 0?noOp$5:st,ut=et.onClick,dt=ut===void 0?noOp$5:ut,ft=et.refreshInterval,pt=ft===void 0?5*60*1e3:ft,mt=et.idempotencyKey,ht=useAppDispatch(),Et=reactExports.useState(Map$3()),yt=_slicedToArray$4(Et,2),vt=yt[0],gt=yt[1],St=reactExports.useState(void 0),Rt=_slicedToArray$4(St,2),$t=Rt[0],bt=Rt[1],wt=function(){ht(fetchCaptcha()).then(function(Nt){var At=Map$3(Nt.data);gt(At),ot(At)}).catch(function(Nt){ct(Nt)})},xt=function(){if(pt){var Nt=setInterval(wt,pt);bt(Nt)}},Tt=function(){$t&&clearInterval($t)};switch(reactExports.useEffect(function(){return wt(),Tt(),xt(),function(){Tt()}},[mt]),vt.get("type")){case"native":return _createRawReactElement("div",{},void 0,_createRawReactElement(Text$2,{},void 0,_createRawReactElement(FormattedMessage$1,{id:"registration.captcha.hint",defaultMessage:"Click the image to get a new captcha"})),_createRawReactElement(NativeCaptchaField,{captcha:vt,onChange:at,onClick:dt,name:tt,value:nt}));case"none":default:return null}},NativeCaptchaField=function _e(et){var tt=et.captcha,nt=et.onChange,rt=et.onClick,at=et.name,it=et.value,ot=useIntl();return _createRawReactElement(Stack,{space:2},void 0,_createRawReactElement("div",{className:"flex w-full items-center justify-center rounded-md border border-solid border-gray-300 bg-white dark:border-gray-600"},void 0,_createRawReactElement("img",{alt:"captcha",src:tt.get("url"),onClick:rt})),_createRawReactElement(Input,{type:"text",placeholder:ot.formatMessage(messages$W.placeholder),name:at,value:it,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",onChange:nt,required:!0}))},messages$V={username:{id:"registration.fields.username_placeholder",defaultMessage:"Username"},username_hint:{id:"registration.fields.username_hint",defaultMessage:"Only letters, numbers, and underscores are allowed."},usernameUnavailable:{id:"registration.username_unavailable",defaultMessage:"Username is already taken."},email:{id:"registration.fields.email_placeholder",defaultMessage:"E-Mail address"},password:{id:"registration.fields.password_placeholder",defaultMessage:"Password"},passwordMismatch:{id:"registration.password_mismatch",defaultMessage:"Passwords don't match."},confirm:{id:"registration.fields.confirm_placeholder",defaultMessage:"Password (again)"},agreement:{id:"registration.agreement",defaultMessage:"I agree to the {tos}."},tos:{id:"registration.tos",defaultMessage:"Terms of Service"},close:{id:"registration.confirmation_modal.close",defaultMessage:"Close"},newsletter:{id:"registration.newsletter",defaultMessage:"Subscribe to newsletter."},needsConfirmationHeader:{id:"confirmations.register.needs_confirmation.header",defaultMessage:"Confirmation needed"},needsApprovalHeader:{id:"confirmations.register.needs_approval.header",defaultMessage:"Approval needed"},reasonHint:{id:"registration.reason_hint",defaultMessage:"This will help us review your application"}},RegistrationForm=function _e(et){var tt=et.inviteToken,nt=useIntl(),rt=useHistory(),at=useAppDispatch(),it=useSettings(),ot=useFeatures(),st=useInstance(),ct=it.get("locale"),ut=!!st.pleroma.metadata.account_activation_required,dt=st.approval_required,ft=ot.emailList,pt=ot.accountLookup,mt=st.pleroma.metadata.birthday_required,ht=reactExports.useState(!0),Et=_slicedToArray$4(ht,2),yt=Et[0],vt=Et[1],gt=reactExports.useState(!1),St=_slicedToArray$4(gt,2),Rt=St[0],$t=St[1],bt=reactExports.useState(Map$3()),wt=_slicedToArray$4(bt,2),xt=wt[0],Tt=wt[1],Ct=reactExports.useState(v4()),Nt=_slicedToArray$4(Ct,2),At=Nt[0],kt=Nt[1],Pt=reactExports.useState(!1),Ft=_slicedToArray$4(Pt,2),Dt=Ft[0],Lt=Ft[1],It=reactExports.useState(""),Ot=_slicedToArray$4(It,2),Ut=Ot[0],jt=Ot[1],zt=reactExports.useState(!1),Qt=_slicedToArray$4(zt,2),Xt=Qt[0],Yt=Qt[1],Bt=reactExports.useRef(axios$1.CancelToken.source()),Kt=function(){return Bt.current.cancel(),Bt.current=axios$1.CancelToken.source(),Bt.current},Wt=function($n){Tt(xt.merge(Map$3($n)))},sn=function($n){Wt(_defineProperty$7({},$n.target.name,$n.target.value))},pn=function($n){Wt({username:$n.target.value}),Lt(!1),Bt.current.cancel(),Fn($n.target.value)},mn=function($n){Wt(_defineProperty$7({},$n.target.name,$n.target.checked))},hn=function($n){var Ln=$n.target.value;sn($n),Ln===Ut&&Yt(!1)},_n=function($n){var Ln=xt.get("password",""),Gn=$n.target.value;jt(Gn),Ln===Gn&&Yt(!1)},En=function(){Yt(!Mn())},On=function($n){Wt({birthday:$n})},Cn=function(){var $n=React$3.createElement(React$3.Fragment,null,ut&&_createRawReactElement("p",{},void 0,_createRawReactElement(FormattedMessage$1,{id:"confirmations.register.needs_confirmation",defaultMessage:"Please check your inbox at {email} for confirmation instructions. You will need to verify your email address to continue.",values:{email:_createRawReactElement("strong",{},void 0,xt.get("email"))}})),dt&&_createRawReactElement("p",{},void 0,_createRawReactElement(FormattedMessage$1,{id:"confirmations.register.needs_approval",defaultMessage:"Your account will be manually approved by an admin. Please be patient while we review your details."})));at(openModal("CONFIRM",{icon:vitePluginRequire_1697861823905_3845308,heading:ut?nt.formatMessage(messages$V.needsConfirmationHeader):dt?nt.formatMessage(messages$V.needsApprovalHeader):void 0,message:$n,confirm:nt.formatMessage(messages$V.close)}))},Tn=function($n){var Ln=$n.access_token;return ut||dt?Cn():at(verifyCredentials(Ln)).then(function(){rt.push("/")})},Mn=function(){return xt.get("password","")===Ut},Fn=reactExports.useCallback(debounce$2(function(Pn){if(pt){var $n=Kt();at(accountLookup(Pn,$n.token)).then(function(Ln){Lt(!!Ln)}).catch(function(Ln){var Gn;((Gn=Ln.response)===null||Gn===void 0?void 0:Gn.status)===404&&Lt(!1)})}},1e3,{trailing:!0}),[]),zn=function(){if(!Mn()){Yt(!0);return}var $n=xt.withMutations(function(Ln){Ln.set("locale",ct),tt&&Ln.set("token",tt)});$t(!0),at(register$1($n.toJS())).then(Tn).catch(function(){$t(!1),Zn()})},Dn=function(){Zn()},Bn=function($n){vt(!1),Wt({captcha_token:$n.get("token"),captcha_answer_data:$n.get("answer_data")})},Vn=function(){vt(!1)},Zn=function(){kt(v4()),Wt({captcha_solution:""})},er=yt||Rt;return _createRawReactElement(Form,{onSubmit:zn,"data-testid":"registrations-open"},void 0,_createRawReactElement("fieldset",{disabled:er,className:"space-y-3"},void 0,React$3.createElement(React$3.Fragment,null,_createRawReactElement(FormGroup,{hintText:nt.formatMessage(messages$V.username_hint),errors:Dt?[nt.formatMessage(messages$V.usernameUnavailable)]:void 0},void 0,_createRawReactElement(Input,{type:"text",name:"username",placeholder:nt.formatMessage(messages$V.username),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",pattern:"^[a-zA-Z\\d_-]+",icon:vitePluginRequire_1697861810834_25410229,onChange:pn,value:xt.get("username",""),required:!0})),_createRawReactElement(Input,{type:"email",name:"email",placeholder:nt.formatMessage(messages$V.email),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",onChange:sn,value:xt.get("email",""),required:!0}),_createRawReactElement(Input,{type:"password",name:"password",placeholder:nt.formatMessage(messages$V.password),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",onChange:hn,value:xt.get("password",""),required:!0}),_createRawReactElement(FormGroup,{errors:Xt?[nt.formatMessage(messages$V.passwordMismatch)]:void 0},void 0,_createRawReactElement(Input,{type:"password",name:"password_confirmation",placeholder:nt.formatMessage(messages$V.confirm),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",onChange:_n,onBlur:En,value:Ut,required:!0})),mt&&_createRawReactElement(BirthdayInput,{value:xt.get("birthday"),onChange:On,required:!0}),dt&&_createRawReactElement(FormGroup,{labelText:_createRawReactElement(FormattedMessage$1,{id:"registration.reason",defaultMessage:"Why do you want to join?"})},void 0,_createRawReactElement(Textarea,{name:"reason",placeholder:nt.formatMessage(messages$V.reasonHint),maxLength:500,onChange:sn,value:xt.get("reason",""),autoGrow:!0,required:!0})),_createRawReactElement(CaptchaField,{onFetch:Bn,onFetchFail:Vn,onChange:sn,onClick:Dn,idempotencyKey:At,name:"captcha_solution",value:xt.get("captcha_solution","")}),_createRawReactElement(FormGroup,{labelText:nt.formatMessage(messages$V.agreement,{tos:_createRawReactElement(Link$2,{to:"/about/tos",target:"_blank"},0,nt.formatMessage(messages$V.tos))})},void 0,_createRawReactElement(Checkbox,{name:"agreement",onChange:mn,checked:xt.get("agreement",!1),required:!0})),ft&&_createRawReactElement(FormGroup,{labelText:nt.formatMessage(messages$V.newsletter)},void 0,_createRawReactElement(Checkbox,{name:"accepts_email_list",onChange:mn,checked:xt.get("accepts_email_list",!1)})),_createRawReactElement(FormActions,{},void 0,_createRawReactElement(Button,{type:"submit"},void 0,_createRawReactElement(FormattedMessage$1,{id:"registration.sign_up",defaultMessage:"Sign up"}))))))};const fetchExternalInstance=_e=>baseClient(null,_e).get("/api/v1/instance").then(({data:et})=>normalizeInstance(et)).catch(et=>{var tt;if(((tt=et.response)==null?void 0:tt.status)===401)return instanceSchema.parse({});throw et}),createExternalApp=(_e,et)=>(tt,nt)=>{if(getQuirks(_e).noApps)return new Promise(at=>at({}));const rt={client_name:sourceCode.displayName,redirect_uris:`${window.location.origin}/login/external`,website:sourceCode.homepage,scopes:getInstanceScopes(_e)};return tt(createApp(rt,et))},externalAuthorize=(_e,et)=>(tt,nt)=>{const rt=getInstanceScopes(_e);return tt(createExternalApp(_e,et)).then(at=>{const{client_id:it,redirect_uri:ot}=at,st=new URLSearchParams({client_id:it,redirect_uri:ot,response_type:"code",scope:rt});localStorage.setItem("soapbox:external:app",JSON.stringify(at)),localStorage.setItem("soapbox:external:baseurl",et),localStorage.setItem("soapbox:external:scopes",rt),window.location.href=`${et}/oauth/authorize?${st.toString()}`})},externalLogin=_e=>et=>{const tt=parseBaseURL(_e)||parseBaseURL(`https://${_e}`);return fetchExternalInstance(tt).then(nt=>{et(externalAuthorize(nt,tt))})},loginWithCode=_e=>et=>{const{client_id:tt,client_secret:nt,redirect_uri:rt}=JSON.parse(localStorage.getItem("soapbox:external:app")),at=localStorage.getItem("soapbox:external:baseurl"),it=localStorage.getItem("soapbox:external:scopes");return et(obtainOAuthToken({client_id:tt,client_secret:nt,redirect_uri:rt,grant_type:"authorization_code",scope:it,code:_e},at)).then(st=>et(authLoggedIn(st))).then(({access_token:st})=>et(verifyCredentials(st,at))).then(st=>et(switchAccount(st.id))).then(()=>window.location.href="/")};var messages$U={instanceLabel:{id:"login.fields.instance_label",defaultMessage:"Instance"},instancePlaceholder:{id:"login.fields.instance_placeholder",defaultMessage:"example.com"},instanceFailed:{id:"login_external.errors.instance_fail",defaultMessage:"The instance returned an error."},networkFailed:{id:"login_external.errors.network_fail",defaultMessage:"Connection failed. Is a browser extension blocking it?"}},ExternalLoginForm=function _e(){var et=new URLSearchParams(window.location.search),tt=et.get("code"),nt=et.get("server"),rt=useIntl(),at=useAppDispatch(),it=reactExports.useState(nt||""),ot=_slicedToArray$4(it,2),st=ot[0],ct=ot[1],ut=reactExports.useState(!1),dt=_slicedToArray$4(ut,2),ft=dt[0],pt=dt[1],mt=function(yt){var vt=yt.currentTarget;ct(vt.value)},ht=function(){pt(!0),at(externalLogin(st)).then(function(){return pt(!1)}).catch(function(yt){var vt;console.error(yt);var gt=(vt=yt.response)===null||vt===void 0?void 0:vt.status;gt?toast.error(rt.formatMessage(messages$U.instanceFailed)):!gt&&yt.code==="ERR_NETWORK"&&toast.error(rt.formatMessage(messages$U.networkFailed)),nt&&window.history.pushState(null,"",window.location.pathname),pt(!1)})};return reactExports.useEffect(function(){tt&&at(loginWithCode(tt))},[tt]),reactExports.useEffect(function(){nt&&!tt&&ht()},[nt]),tt||nt?_createRawReactElement(Spinner,{}):_createRawReactElement(Form,{onSubmit:ht,"data-testid":"external-login"},void 0,_createRawReactElement(FormGroup,{labelText:rt.formatMessage(messages$U.instanceLabel)},void 0,_createRawReactElement(Input,{"aria-label":rt.formatMessage(messages$U.instancePlaceholder),placeholder:rt.formatMessage(messages$U.instancePlaceholder),type:"text",name:"host",onChange:mt,autoCorrect:"off",autoCapitalize:"off",required:!0})),_createRawReactElement(FormActions,{},void 0,_createRawReactElement(Button,{theme:"primary",type:"submit",disabled:ft},void 0,_createRawReactElement(FormattedMessage$1,{id:"login.log_in",defaultMessage:"Log in"}))))},Footer=function _e(){var et=useAppSelector(function(at){var it=getSoapboxConfig(at);return{copyright:it.copyright,navlinks:it.navlinks.get("homeFooter")||List$1(),locale:getSettings(at).get("locale")}}),tt=et.copyright,nt=et.navlinks,rt=et.locale;return _createRawReactElement("footer",{className:"relative mx-auto mt-auto max-w-7xl px-4 py-12 sm:px-6 lg:px-8 xl:flex xl:items-center xl:justify-between"},void 0,_createRawReactElement("div",{className:"flex flex-wrap justify-center"},void 0,nt.map(function(at,it){var ot=at.get("url"),st=ot.startsWith("http"),ct=st?"a":Link$2,ut=st?{href:ot,target:"_blank"}:{to:ot};return _createRawReactElement("div",{className:"px-5 py-2"},it,React$3.createElement(ct,_extends$4({},ut,{className:"text-primary-600 hover:underline dark:text-primary-400"}),_createRawReactElement(Text$2,{tag:"span",theme:"inherit",size:"sm"},void 0,at.getIn(["titleLocales",rt])||at.get("title"))))})),_createRawReactElement("div",{className:"mt-6 xl:mt-0"},void 0,_createRawReactElement(Text$2,{theme:"muted",align:"center",size:"sm"},void 0,tt)))},RegisterInvite=function _e(){var et=useInstance(),tt=useParams(),nt=tt.token,rt=_createRawReactElement(FormattedMessage$1,{id:"register_invite.title",defaultMessage:"You've been invited to join {siteTitle}!",values:{siteTitle:et.title}});return _createRawReactElement(Stack,{space:3},void 0,_createRawReactElement(Stack,{className:"mb-4"},void 0,_createRawReactElement(CardTitle,{title:rt}),_createRawReactElement(Text$2,{theme:"muted"},void 0,_createRawReactElement(FormattedMessage$1,{id:"register_invite.lead",defaultMessage:"Complete the form below to create an account."}))),_createRawReactElement(RegistrationForm,{inviteToken:nt}))};function ownKeys$b(_e,et){var tt=Object.keys(_e);if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(_e);et&&(nt=nt.filter(function(rt){return Object.getOwnPropertyDescriptor(_e,rt).enumerable})),tt.push.apply(tt,nt)}return tt}function _objectSpread$a(_e){for(var et=1;et0&&EMAIL_REGEX.test(it),yt=React$3.useCallback(function(St){ot(St.target.value)},[]),vt=React$3.useCallback(function(St){St.preventDefault(),ht([]),gt()},[it]),gt=function(){return tt(requestEmailVerification(it)).then(function(){dt(Statuses$2.REQUESTED),toast.success(et.formatMessage(messages$R.verificationSuccess))}).catch(function(Rt){var $t,bt=($t=Rt.response)===null||$t===void 0||($t=$t.data)===null||$t===void 0?void 0:$t.error,wt=bt==="email_taken",xt=et.formatMessage(messages$R.verificationFail);wt?xt=et.formatMessage(messages$R.verificationFailTakenAlert):bt&&(xt=bt),wt&&ht([et.formatMessage(messages$R.verificationFailTaken)]),toast.error(xt),dt(Statuses$2.FAIL)})};return ut===Statuses$2.REQUESTED?_createRawReactElement(EmailSent,{handleSubmit:vt}):_createRawReactElement("div",{},void 0,_createRawReactElement("div",{className:"-mx-4 mb-4 border-b border-solid border-gray-200 pb-4 dark:border-gray-800 sm:-mx-10 sm:pb-10"},void 0,_createRawReactElement("h1",{className:"text-center text-2xl font-bold"},void 0,_createRawReactElement(FormattedMessage$1,{id:"email_verification.header",defaultMessage:"Enter your email address"}))),_createRawReactElement("div",{className:"mx-auto sm:w-2/3 sm:pt-10 md:w-1/2"},void 0,_createRawReactElement(Form,{onSubmit:vt},void 0,_createRawReactElement(FormGroup,{labelText:et.formatMessage(messages$R.emailLabel),errors:mt},void 0,_createRawReactElement(Input,{type:"email",value:it,name:"email",onChange:yt,placeholder:"you@email.com",required:!0})),_createRawReactElement("div",{className:"text-center"},void 0,_createRawReactElement(Button,{block:!0,theme:"primary",type:"submit",disabled:nt||!Et},void 0,_createRawReactElement(FormattedMessage$1,{id:"onboarding.next",defaultMessage:"Next"}))))))},lib$3={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.default=void 0;var et=rt(reactExports),tt=["placeholder","separator","isLastChild","inputStyle","focus","isDisabled","hasErrored","errorStyle","focusStyle","disabledStyle","shouldAutoFocus","isInputNum","index","value","className","isInputSecure"];function nt(At){if(typeof WeakMap!="function")return null;var kt=new WeakMap,Pt=new WeakMap;return(nt=function(Dt){return Dt?Pt:kt})(At)}function rt(At,kt){if(!kt&&At&&At.__esModule)return At;if(At===null||gt(At)!=="object"&&typeof At!="function")return{default:At};var Pt=nt(kt);if(Pt&&Pt.has(At))return Pt.get(At);var Ft={},Dt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Lt in At)if(Lt!=="default"&&Object.prototype.hasOwnProperty.call(At,Lt)){var It=Dt?Object.getOwnPropertyDescriptor(At,Lt):null;It&&(It.get||It.set)?Object.defineProperty(Ft,Lt,It):Ft[Lt]=At[Lt]}return Ft.default=At,Pt&&Pt.set(At,Ft),Ft}function at(){return at=Object.assign||function(At){for(var kt=1;kt=0)&&Object.prototype.propertyIsEnumerable.call(At,Ft)&&(Pt[Ft]=At[Ft])}return Pt}function ot(At,kt){if(At==null)return{};var Pt={},Ft=Object.keys(At),Dt,Lt;for(Lt=0;Lt=0)&&(Pt[Dt]=At[Dt]);return Pt}function st(At,kt){if(!(At instanceof kt))throw new TypeError("Cannot call a class as a function")}function ct(At,kt){for(var Pt=0;Pt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function yt(At){return yt=Object.setPrototypeOf?Object.getPrototypeOf:function(Pt){return Pt.__proto__||Object.getPrototypeOf(Pt)},yt(At)}function vt(At,kt,Pt){return kt in At?Object.defineProperty(At,kt,{value:Pt,enumerable:!0,configurable:!0,writable:!0}):At[kt]=Pt,At}function gt(At){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gt=function(Pt){return typeof Pt}:gt=function(Pt){return Pt&&typeof Symbol=="function"&&Pt.constructor===Symbol&&Pt!==Symbol.prototype?"symbol":typeof Pt},gt(At)}var St=8,Rt=37,$t=39,bt=46,wt=32,xt=function(kt){return gt(kt)==="object"},Tt=function(At){dt(Pt,At);var kt=pt(Pt);function Pt(Ft){var Dt;return st(this,Pt),Dt=kt.call(this,Ft),vt(ht(Dt),"getClasses",function(){for(var Lt=arguments.length,It=new Array(Lt),Ot=0;Ot0&&console.error("Length of the placeholder should be equal to the number of inputs.")}}),vt(ht(Ft),"handleOtpChange",function(Ot){var Ut=Ft.props.onChange,jt=Ot.join("");Ut(jt)}),vt(ht(Ft),"isInputValueValid",function(Ot){var Ut=Ft.props.isInputNum?!isNaN(parseInt(Ot,10)):typeof Ot=="string";return Ut&&Ot.trim().length===1}),vt(ht(Ft),"focusInput",function(Ot){var Ut=Ft.props.numInputs,jt=Math.max(Math.min(Ut-1,Ot),0);Ft.setState({activeInput:jt})}),vt(ht(Ft),"focusNextInput",function(){var Ot=Ft.state.activeInput;Ft.focusInput(Ot+1)}),vt(ht(Ft),"focusPrevInput",function(){var Ot=Ft.state.activeInput;Ft.focusInput(Ot-1)}),vt(ht(Ft),"changeCodeAtFocus",function(Ot){var Ut=Ft.state.activeInput,jt=Ft.getOtpValue();jt[Ut]=Ot[0],Ft.handleOtpChange(jt)}),vt(ht(Ft),"handleOnPaste",function(Ot){Ot.preventDefault();var Ut=Ft.state.activeInput,jt=Ft.props,zt=jt.numInputs,Qt=jt.isDisabled;if(!Qt){for(var Xt=Ft.getOtpValue(),Yt=Ut,Bt=Ot.clipboardData.getData("text/plain").slice(0,zt-Ut).split(""),Kt=0;Kt=Ut&&Bt.length>0&&(Xt[Kt]=Bt.shift(),Yt++);Ft.setState({activeInput:Yt},function(){Ft.focusInput(Yt),Ft.handleOtpChange(Xt)})}}),vt(ht(Ft),"handleOnChange",function(Ot){var Ut=Ot.target.value;Ft.isInputValueValid(Ut)&&Ft.changeCodeAtFocus(Ut)}),vt(ht(Ft),"handleOnKeyDown",function(Ot){Ot.keyCode===St||Ot.key==="Backspace"?(Ot.preventDefault(),Ft.changeCodeAtFocus(""),Ft.focusPrevInput()):Ot.keyCode===bt||Ot.key==="Delete"?(Ot.preventDefault(),Ft.changeCodeAtFocus("")):Ot.keyCode===Rt||Ot.key==="ArrowLeft"?(Ot.preventDefault(),Ft.focusPrevInput()):Ot.keyCode===$t||Ot.key==="ArrowRight"?(Ot.preventDefault(),Ft.focusNextInput()):(Ot.keyCode===wt||Ot.key===" "||Ot.key==="Spacebar"||Ot.key==="Space")&&Ot.preventDefault()}),vt(ht(Ft),"handleOnInput",function(Ot){if(Ft.isInputValueValid(Ot.target.value))Ft.focusNextInput();else if(!Ft.props.isInputNum){var Ut=Ot.nativeEvent;Ut.data===null&&Ut.inputType==="deleteContentBackward"&&(Ot.preventDefault(),Ft.changeCodeAtFocus(""),Ft.focusPrevInput())}}),vt(ht(Ft),"renderInputs",function(){for(var Ot=Ft.state.activeInput,Ut=Ft.props,jt=Ut.numInputs,zt=Ut.inputStyle,Qt=Ut.focusStyle,Xt=Ut.separator,Yt=Ut.isDisabled,Bt=Ut.disabledStyle,Kt=Ut.hasErrored,Wt=Ut.errorStyle,sn=Ut.shouldAutoFocus,pn=Ut.isInputNum,mn=Ut.isInputSecure,hn=Ut.className,_n=[],En=Ft.getOtpValue(),On=Ft.getPlaceholderValue(),Cn=Ft.props["data-cy"],Tn=Ft.props["data-testid"],Mn=function(Dn){_n.push(et.default.createElement(Tt,{placeholder:On&&On[Dn],key:Dn,index:Dn,focus:Ot===Dn,value:En&&En[Dn],onChange:Ft.handleOnChange,onKeyDown:Ft.handleOnKeyDown,onInput:Ft.handleOnInput,onPaste:Ft.handleOnPaste,onFocus:function(Vn){Ft.setState({activeInput:Dn}),Vn.target.select()},onBlur:function(){return Ft.setState({activeInput:-1})},separator:Xt,inputStyle:zt,focusStyle:Qt,isLastChild:Dn===jt-1,isDisabled:Yt,disabledStyle:Bt,hasErrored:Kt,errorStyle:Wt,shouldAutoFocus:sn,isInputNum:pn,isInputSecure:mn,className:hn,"data-cy":Cn&&"".concat(Cn,"-").concat(Dn),"data-testid":Tn&&"".concat(Tn,"-").concat(Dn)}))},Fn=0;Fn({type:PROFILE_HOVER_CARD_OPEN,ref:_e,accountId:et}),updateProfileHoverCard=()=>({type:PROFILE_HOVER_CARD_UPDATE}),closeProfileHoverCard=(_e=!1)=>({type:PROFILE_HOVER_CARD_CLOSE,force:_e});var showProfileHoverCard=debounce$2(function(_e,et,tt){_e(openProfileHoverCard(et,tt))},600),HoverRefWrapper=function _e(et){var tt=et.accountId,nt=et.children,rt=et.inline,at=rt===void 0?!1:rt,it=et.className,ot=useAppDispatch(),st=reactExports.useRef(null),ct=at?"span":"div",ut=function(){isMobile(window.innerWidth)||(ot(fetchAccount(tt)),showProfileHoverCard(ot,st,tt))},dt=function(){showProfileHoverCard.cancel(),setTimeout(function(){return ot(closeProfileHoverCard())},300)},ft=function(){showProfileHoverCard.cancel(),ot(closeProfileHoverCard(!0))};return React$3.createElement(ct,{ref:st,className:clsx("hover-ref-wrapper",it),onMouseEnter:ut,onMouseLeave:dt,onClick:ft},nt)};const vitePluginRequire_1697861819752_32223882="/packs/assets/verified-d0505451.svg";var messages$N={verified:{id:"account.verified",defaultMessage:"Verified Account"}},VerificationBadge=function _e(et){var tt=et.className,nt=useIntl(),rt=useSoapboxConfig(),at=rt.verifiedIcon||vitePluginRequire_1697861819752_32223882,it=at.endsWith(".svg")?Icon$1:"img";return _createRawReactElement("span",{className:"verified-icon","data-testid":"verified-badge"},void 0,_createRawReactElement(it,{className:clsx("w-4 text-accent-500",tt),src:at,alt:nt.formatMessage(messages$N.verified)}))};const vitePluginRequire_1697861812358_77020136="/packs/assets/plus-5c8a6778.svg",vitePluginRequire_1697861828079_95498444="/packs/assets/ban-3255c86b.svg";var messages$M={block:{id:"account.block",defaultMessage:"Block @{name}"},blocked:{id:"account.blocked",defaultMessage:"Blocked"},edit_profile:{id:"account.edit_profile",defaultMessage:"Edit profile"},follow:{id:"account.follow",defaultMessage:"Follow"},mute:{id:"account.mute",defaultMessage:"Mute @{name}"},remote_follow:{id:"account.remote_follow",defaultMessage:"Remote follow"},requested:{id:"account.requested",defaultMessage:"Awaiting approval"},unblock:{id:"account.unblock",defaultMessage:"Unblock @{name}"},unfollow:{id:"account.unfollow",defaultMessage:"Unfollow"},unmute:{id:"account.unmute",defaultMessage:"Unmute @{name}"},authorize:{id:"follow_request.authorize",defaultMessage:"Authorize"},reject:{id:"follow_request.reject",defaultMessage:"Reject"}},ActionButton=function _e(et){var tt=et.account,nt=et.actionType;et.small;var rt=useAppDispatch(),at=useFeatures(),it=useIntl(),ot=useLoggedIn(),st=ot.isLoggedIn,ct=ot.me,ut=useFollow(),dt=ut.follow,ft=ut.unfollow,pt=function(){var Dt,Lt;(Dt=tt.relationship)!==null&&Dt!==void 0&&Dt.following||(Lt=tt.relationship)!==null&&Lt!==void 0&&Lt.requested?ft(tt.id):dt(tt.id)},mt=function(){var Dt;(Dt=tt.relationship)!==null&&Dt!==void 0&&Dt.blocking?rt(unblockAccount(tt.id)):rt(blockAccount(tt.id))},ht=function(){var Dt;(Dt=tt.relationship)!==null&&Dt!==void 0&&Dt.muting?rt(unmuteAccount(tt.id)):rt(muteAccount(tt.id))},Et=function(){rt(authorizeFollowRequest(tt.id))},yt=function(){rt(rejectFollowRequest(tt.id))},vt=function(){rt(openModal("UNAUTHORIZED",{action:"FOLLOW",account:tt.id,ap_id:tt.url}))},gt=function(){var Dt,Lt=(Dt=tt.relationship)===null||Dt===void 0?void 0:Dt.muting,It=Lt?messages$M.unmute:messages$M.mute,Ot=it.formatMessage(It,{name:tt.username});return _createRawReactElement(Button,{theme:Lt?"danger":"secondary",size:"sm",text:Ot,onClick:ht})},St=function(){var Dt,Lt=(Dt=tt.relationship)===null||Dt===void 0?void 0:Dt.blocking,It=Lt?messages$M.unblock:messages$M.block,Ot=it.formatMessage(It,{name:tt.username});return _createRawReactElement(Button,{theme:Lt?"danger":"secondary",size:"sm",text:Ot,onClick:mt})},Rt=function(){var Dt;return(Dt=tt.relationship)!==null&&Dt!==void 0&&Dt.followed_by?null:_createRawReactElement(HStack,{space:2},void 0,_createRawReactElement(Button,{theme:"secondary",size:"sm",text:it.formatMessage(messages$M.authorize),onClick:Et}),_createRawReactElement(Button,{theme:"danger",size:"sm",text:it.formatMessage(messages$M.reject),onClick:yt}))},$t=function(){return at.remoteInteractions?_createRawReactElement(Button,{onClick:vt,icon:vitePluginRequire_1697861812358_77020136,text:it.formatMessage(messages$M.follow),size:"sm"}):at.pleromaRemoteFollow?_createRawReactElement("form",{method:"POST",action:"/main/ostatus"},void 0,_createRawReactElement("input",{type:"hidden",name:"nickname",value:tt.acct}),_createRawReactElement("input",{type:"hidden",name:"profile",value:""}),_createRawReactElement(Button,{text:it.formatMessage(messages$M.remote_follow),type:"submit",size:"sm"})):null},bt=function(){return at.federating?$t():null};if(!st)return bt();if(ct!==tt.id){var wt,xt,Tt,Ct,Nt,At,kt=(wt=tt.relationship)===null||wt===void 0?void 0:wt.following,Pt=(xt=tt.relationship)===null||xt===void 0?void 0:xt.blocked_by;if(nt){if(nt==="muting")return gt();if(nt==="blocking")return St();if(nt==="follow_request")return Rt()}if(tt.relationship){if((Tt=tt.relationship)!==null&&Tt!==void 0&&Tt.requested)return _createRawReactElement(Button,{size:"sm",theme:"tertiary",text:it.formatMessage(messages$M.requested),onClick:pt});if(!((Ct=tt.relationship)!==null&&Ct!==void 0&&Ct.blocking)&&!((Nt=tt.relationship)!==null&&Nt!==void 0&&Nt.muting))return _createRawReactElement(Button,{size:"sm",disabled:Pt,theme:kt?"secondary":"primary",icon:Pt?vitePluginRequire_1697861828079_95498444:!kt&&vitePluginRequire_1697861812358_77020136,onClick:pt},void 0,kt?it.formatMessage(messages$M.unfollow):it.formatMessage(Pt?messages$M.blocked:messages$M.follow));if((At=tt.relationship)!==null&&At!==void 0&&At.blocking)return _createRawReactElement(Button,{theme:"danger",size:"sm",text:it.formatMessage(messages$M.unblock,{name:tt.username}),onClick:mt})}else return null}else return _createRawReactElement(Button,{theme:"tertiary",size:"sm",text:it.formatMessage(messages$M.edit_profile),to:"/settings/profile"});return null},Badge=function _e(et){var tt=et.title,nt=et.slug,rt=!["patron","admin","moderator","opaque","badge:donor"].includes(nt);return _createRawReactElement("span",{"data-testid":"badge",className:clsx("inline-flex items-center rounded px-2 py-0.5 text-xs font-medium",{"bg-fuchsia-700 text-white":nt==="patron","bg-emerald-800 text-white":nt==="badge:donor","bg-black text-white":nt==="admin","bg-cyan-600 text-white":nt==="moderator","bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-gray-100":rt,"bg-white/75 text-gray-900":nt==="opaque"})},void 0,tt)},_excluded$a=["timestamp","intl","year","futureDate","theme"];function _createSuper$3(_e){var et=_isNativeReflectConstruct$3();return function(){var nt=_getPrototypeOf$1(_e),rt;if(et){var at=_getPrototypeOf$1(this).constructor;rt=Reflect.construct(nt,arguments,at)}else rt=nt.apply(this,arguments);return _possibleConstructorReturn$1(this,rt)}}function _isNativeReflectConstruct$3(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ownKeys$a(_e,et){var tt=Object.keys(_e);if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(_e);et&&(nt=nt.filter(function(rt){return Object.getOwnPropertyDescriptor(_e,rt).enumerable})),tt.push.apply(tt,nt)}return tt}function _objectSpread$9(_e){for(var et=1;et{let et="";for(let tt=0;tt<_e;tt++)et+=PLACEHOLDER_CHAR;return et},randomIntFromInterval=(_e,et)=>Math.floor(Math.random()*(et-_e+1)+_e);var PlaceholderCard=function _e(){return _createRawReactElement("div",{className:clsx("status-card",{"animate-pulse":!0})},void 0,_createRawReactElement("div",{className:"primary-500 w-2/5 rounded-l"},void 0," "),_createRawReactElement("div",{className:"flex w-3/5 flex-col justify-between break-words p-4 text-primary-50"},void 0,_createRawReactElement("p",{},void 0,generateText(randomIntFromInterval(5,25))),_createRawReactElement("p",{},void 0,generateText(randomIntFromInterval(5,75))),_createRawReactElement("p",{},void 0,generateText(randomIntFromInterval(5,15)))))};const PlaceholderCard$1=React$3.memo(PlaceholderCard),vitePluginRequire_1697861810833_45315206="/packs/assets/external-link-bbf6b321.svg",vitePluginRequire_1697861822232_37680774="/packs/assets/zoom-in-a7d42acb.svg",vitePluginRequire_1697861806677_55396631="/packs/assets/player-play-2fabf751.svg",vitePluginRequire_1697861828130_67878877="/packs/assets/link-38bf5988.svg";var _excluded$8=["hash","width","height","dummy"],Blurhash=function _e(et){var tt=et.hash,nt=et.width,rt=nt===void 0?32:nt,at=et.height,it=at===void 0?rt:at,ot=et.dummy,st=ot===void 0?!1:ot,ct=_objectWithoutProperties(et,_excluded$8),ut=reactExports.useRef(null);return reactExports.useEffect(function(){var dt=ut.current;if(dt&&(dt.width=dt.width,!(st||!tt)))try{var ft=j$1(tt,rt,it),pt=dt.getContext("2d"),mt=new ImageData(ft,rt,it);if(!pt)return;pt.putImageData(mt,0,0)}catch(ht){console.error("Blurhash decoding failure",{err:ht,hash:tt})}},[st,tt,rt,it]),React$3.createElement("canvas",_extends$4({},ct,{ref:ut,width:rt,height:it}))};const Blurhash$1=React$3.memo(Blurhash);var trim$3=function _e(et,tt){var nt=et.indexOf(" ",tt);return nt===-1?et:et.substring(0,nt)+(et.length>tt?"…":"")},Card=function _e(et){var tt=et.card,nt=et.defaultWidth,rt=nt===void 0?467:nt,at=et.maxTitle,it=at===void 0?120:at,ot=et.maxDescription,st=ot===void 0?200:ot,ct=et.compact,ut=ct===void 0?!1:ct,dt=et.cacheWidth,ft=et.onOpenMedia,pt=et.horizontal,mt=reactExports.useState(rt),ht=_slicedToArray$4(mt,2),Et=ht[0],yt=ht[1],vt=reactExports.useState(!1),gt=_slicedToArray$4(vt,2),St=gt[0],Rt=gt[1];reactExports.useEffect(function(){Rt(!1)},[tt.url]);var $t=trim$3(tt.title,it),bt=trim$3(tt.description,st),wt=function(){var Qt=normalizeAttachment({type:"image",url:tt.embed_url,description:$t,meta:{original:{width:tt.width,height:tt.height}}});ft(List$1([Qt]),0)},xt=function(Qt){Qt.stopPropagation(),tt.type==="photo"?wt():Rt(!0)},Tt=function(Qt){Qt&&(dt&&dt(Qt.offsetWidth),yt(Qt.offsetWidth))},Ct=function(){var Qt={__html:addAutoPlay(tt.html)},Xt=Nt(tt),Yt=Et/Xt;return React$3.createElement("div",{ref:Tt,className:"status-card__image status-card-video",dangerouslySetInnerHTML:Qt,style:{height:Yt}})},Nt=function(Qt){var Xt=Qt.width/Qt.height||1.7777777777777777;return Math.min(Math.max(9/16,Xt),4)},At=tt.type!=="link";pt=typeof pt=="boolean"?pt:At||St;var kt=clsx("status-card",{horizontal:pt,compact:ut,interactive:At},"status-card--".concat(tt.type)),Pt=Nt(tt),Ft=ut&&!St?Et/(16/9):Et/Pt,Dt=At?_createRawReactElement("a",{onClick:function(Qt){return Qt.stopPropagation()},href:tt.url,title:$t,rel:"noopener",target:"_blank"},void 0,_createRawReactElement("span",{},void 0,$t)):_createRawReactElement("span",{title:$t},void 0,$t),Lt=_createRawReactElement(Stack,{space:2,className:"flex-1 overflow-hidden p-4"},void 0,$t&&_createRawReactElement(Text$2,{weight:"bold"},void 0,Dt),bt&&_createRawReactElement(Text$2,{},void 0,bt),_createRawReactElement(HStack,{space:1,alignItems:"center"},void 0,_createRawReactElement(Text$2,{tag:"span",theme:"muted"},void 0,_createRawReactElement(Icon,{src:vitePluginRequire_1697861828130_67878877})),_createRawReactElement(Text$2,{tag:"span",theme:"muted",size:"sm"},void 0,tt.provider_name))),It=null,Ot=_createRawReactElement(Blurhash$1,{className:"absolute inset-0 -z-10 h-full w-full",hash:tt.blurhash}),Ut=_createRawReactElement("div",{style:{backgroundImage:"url(".concat(tt.image,")"),width:pt?Et:void 0,height:pt?Ft:void 0},className:"status-card__image-image"});if(At){if(St)It=Ct();else{var jt=vitePluginRequire_1697861806677_55396631;tt.type==="photo"&&(jt=vitePluginRequire_1697861822232_37680774),It=_createRawReactElement("div",{className:"status-card__image"},void 0,Ot,Ut,_createRawReactElement("div",{className:"absolute inset-0 flex items-center justify-center"},void 0,_createRawReactElement("div",{className:"flex items-center justify-center rounded-full bg-gray-500/90 px-4 py-3 shadow-md dark:bg-gray-700/90"},void 0,_createRawReactElement(HStack,{space:3,alignItems:"center"},void 0,_createRawReactElement("button",{onClick:xt,className:"appearance-none text-gray-700 hover:text-gray-900 dark:text-gray-500 dark:hover:text-gray-100"},void 0,_createRawReactElement(Icon,{src:jt,className:"h-6 w-6 text-inherit"})),pt&&_createRawReactElement("a",{onClick:function(Qt){return Qt.stopPropagation()},href:tt.url,target:"_blank",rel:"noopener",className:"text-gray-700 hover:text-gray-900 dark:text-gray-500 dark:hover:text-gray-100"},void 0,_createRawReactElement(Icon,{src:vitePluginRequire_1697861810833_45315206,className:"h-6 w-6 text-inherit"}))))))}return React$3.createElement("div",{className:kt,ref:Tt},It,Lt)}else tt.image&&(It=_createRawReactElement("div",{className:clsx("status-card__image","w-full flex-none rounded-l md:h-auto md:w-auto md:flex-auto",{"h-auto":pt,"h-[200px]":!pt})},void 0,Ot,Ut));return React$3.createElement("a",{href:tt.url,className:kt,target:"_blank",rel:"noopener",ref:Tt,onClick:function(Qt){return Qt.stopPropagation()}},It,Lt)};const vitePluginRequire_1697861833888_16194040="/packs/assets/headset-1ede0cb8.svg",vitePluginRequire_1697861811799_72054898="/packs/assets/trash-a42f5fff.svg";var messages$J={delete:{id:"status.delete",defaultMessage:"Delete"},deleteConfirm:{id:"confirmations.delete.confirm",defaultMessage:"Delete"},deleteHeading:{id:"confirmations.delete.heading",defaultMessage:"Delete post"},deleteMessage:{id:"confirmations.delete.message",defaultMessage:"Are you sure you want to delete this post?"},hide:{id:"moderation_overlay.hide",defaultMessage:"Hide"},show:{id:"moderation_overlay.show_content",defaultMessage:"Show content"},hiddenTitle:{id:"status.hidden",defaultMessage:"Media hidden"},sensitiveTitle:{id:"status.sensitive_warning",defaultMessage:"Sensitive content"},underReviewTitle:{id:"moderation_overlay.title",defaultMessage:"Content Under Review"},underReviewSubtitle:{id:"moderation_overlay.subtitle",defaultMessage:"This Post has been sent to Moderation for review and is only visible to you. If you believe this is an error please contact Support."},sensitiveSubtitle:{id:"status.sensitive_warning.subtitle",defaultMessage:"This content may not be suitable for all audiences."},contact:{id:"moderation_overlay.contact",defaultMessage:"Contact"}},SensitiveContentOverlay=React$3.forwardRef(function(_e,et){var tt=_e.onToggleVisibility,nt=_e.status,rt=_e.hideHideButton,at=rt===void 0?!1:rt,it=useOwnAccount(),ot=it.account,st=useAppDispatch(),ct=useIntl(),ut=useSettings(),dt=useSoapboxConfig(),ft=dt.links,pt=nt.visibility==="self",mt=nt.getIn(["account","id"])===(ot==null?void 0:ot.id),ht=ut.get("showSensitiveMedia"),Et=reactExports.useState(defaultMediaVisibility(nt,ht)),yt=_slicedToArray$4(Et,2),vt=yt[0],gt=yt[1],St=function(wt){wt.stopPropagation(),tt?tt():gt(function(xt){return!xt})},Rt=function(){var wt=ut.get("deleteModal");st(wt?openModal("CONFIRM",{icon:vitePluginRequire_1697861811799_72054898,heading:ct.formatMessage(messages$J.deleteHeading),message:ct.formatMessage(messages$J.deleteMessage),confirm:ct.formatMessage(messages$J.deleteConfirm),onConfirm:function(){return st(deleteStatus$6(nt.id,!1))}}):deleteStatus$6(nt.id,!1))},$t=reactExports.useMemo(function(){return[{text:ct.formatMessage(messages$J.delete),action:Rt,icon:vitePluginRequire_1697861811799_72054898,destructive:!0}]},[]);return reactExports.useEffect(function(){typeof _e.visible<"u"&>(!!_e.visible)},[_e.visible]),_createRawReactElement("div",{className:clsx("absolute z-40",{"w-full h-full":!vt,"bottom-1 right-1":vt}),"data-testid":"sensitive-overlay"},void 0,vt?!at&&_createRawReactElement(Button,{text:ct.formatMessage(messages$J.hide),icon:vitePluginRequire_1697861828084_81550747,onClick:St,theme:"ghost",size:"sm"}):_createRawReactElement("button",{className:"flex h-full w-full items-center justify-center",onClick:St},void 0,React$3.createElement("div",{className:"max-w-[15rem] space-y-4 rounded-xl bg-white p-4 text-center text-gray-900 backdrop-blur-lg dark:bg-primary-900 dark:text-gray-100",ref:et},nt.sensitive||pt?_createRawReactElement("div",{className:"space-y-1"},void 0,_createRawReactElement(Text$2,{weight:"semibold"},void 0,ct.formatMessage(pt?messages$J.underReviewTitle:messages$J.sensitiveTitle)),_createRawReactElement(Text$2,{size:"sm",weight:"medium"},void 0,ct.formatMessage(pt?messages$J.underReviewSubtitle:messages$J.sensitiveSubtitle))):_createRawReactElement(Text$2,{weight:"semibold"},void 0,ct.formatMessage(messages$J.hiddenTitle)),_createRawReactElement(HStack,{alignItems:"center",justifyContent:"center",space:2},void 0,pt?React$3.createElement(React$3.Fragment,null,ft.get("support")&&_createRawReactElement("a",{href:ft.get("support"),target:"_blank",onClick:function(wt){return wt.stopPropagation()}},void 0,_createRawReactElement(Button,{type:"button",theme:"primary",size:"sm",icon:vitePluginRequire_1697861833888_16194040},void 0,ct.formatMessage(messages$J.contact)))):null,_createRawReactElement(Button,{type:"button",theme:"primary",size:"sm",icon:vitePluginRequire_1697861828084_10716620,onClick:St,className:"min-w-max"},void 0,ct.formatMessage(messages$J.show)),pt&&mt?_createRawReactElement(DropdownMenu,{items:$t,src:vitePluginRequire_1697861810836_81866597}):null))))}),StatusMedia=function _e(et){var tt,nt=et.status,rt=et.muted,at=rt===void 0?!1:rt,it=et.onClick,ot=et.showMedia,st=ot===void 0?!0:ot,ct=et.onToggleVisibility,ut=ct===void 0?function(){}:ct,dt=useAppDispatch(),ft=useSettings(),pt=ft.get("autoPlayVideo"),mt=reactExports.useState(void 0),ht=_slicedToArray$4(mt,2),Et=ht[0],yt=ht[1],vt=nt.media_attachments.size,gt=nt.media_attachments.first(),St=null,Rt=function(Ft){Ft&&yt(Ft.offsetWidth)},$t=function(){return _createRawReactElement("div",{className:"media_gallery",style:{height:"285px"}})},bt=function(){return _createRawReactElement("div",{className:"media-spoiler-video",style:{height:"285px"}})},wt=function(){return _createRawReactElement("div",{className:"media-spoiler-audio",style:{height:"285px"}})},xt=function(Ft,Dt){dt(openModal("MEDIA",{media:Ft,status:nt,index:Dt}))};if(vt>0&>){var Tt=_createRawReactElement(SensitiveContentOverlay,{status:nt,visible:st,onToggleVisibility:ut,hideHideButton:gt.type==="video"||gt.type==="audio"});if(at)St=_createRawReactElement(AttachmentThumbs,{media:nt.media_attachments,onClick:it,sensitive:nt.sensitive});else if(vt===1&>.type==="video"){var Ct=gt;if(Ct.external_video_id&&nt.card){var Nt=function(){var Ft=Number(Ct.meta.getIn(["original","width"])),Dt=Number(Ct.meta.getIn(["original","height"]));return Number(Et)/(Ft/Dt)},At=Nt();St=_createRawReactElement("div",{className:"status-card horizontal compact interactive status-card--video"},void 0,React$3.createElement("div",{ref:Rt,className:"status-card__image status-card-video",style:At?{height:At}:void 0,dangerouslySetInnerHTML:{__html:pt?addAutoPlay(nt.card.html):nt.card.html}}))}else St=React$3.createElement(React$3.Fragment,null,_createRawReactElement(reactExports.Suspense,{fallback:bt()},void 0,_createRawReactElement(Video,{preview:Ct.preview_url,blurhash:Ct.blurhash,src:Ct.url,alt:Ct.description,aspectRatio:Number(Ct.meta.getIn(["original","aspect"])),height:285,visible:st,sensitiveOverlay:Tt,onToggleVisibility:ut,inline:!0})))}else if(vt===1&>.type==="audio"){var kt=gt;St=React$3.createElement(React$3.Fragment,null,_createRawReactElement(reactExports.Suspense,{fallback:wt()},void 0,_createRawReactElement(Audio$1,{src:kt.url,alt:kt.description,poster:kt.preview_url!==kt.url?kt.preview_url:nt.getIn(["account","avatar_static"]),backgroundColor:kt.meta.getIn(["colors","background"]),foregroundColor:kt.meta.getIn(["colors","foreground"]),accentColor:kt.meta.getIn(["colors","accent"]),duration:kt.meta.getIn(["original","duration"],0),height:263,visible:st,sensitiveOverlay:Tt,onToggleVisibility:ut})))}else St=React$3.createElement(React$3.Fragment,null,_createRawReactElement(reactExports.Suspense,{fallback:$t()},void 0,_createRawReactElement(MediaGallery,{media:nt.media_attachments,sensitiveOverlay:Tt,height:285,onOpenMedia:xt,visible:st,onToggleVisibility:ut})))}else nt.spoiler_text.length===0&&!nt.quote&&(tt=nt.card)!==null&&tt!==void 0&&tt.group?St=_createRawReactElement(GroupLinkPreview,{card:nt.card}):nt.spoiler_text.length===0&&!nt.quote&&nt.card?St=_createRawReactElement(Card,{onOpenMedia:xt,card:nt.card,compact:!0}):nt.expectsCard&&(St=_createRawReactElement(PlaceholderCard$1,{}));return St?_createRawReactElement("div",{onClick:function(Ft){return Ft.stopPropagation()}},void 0,St):null};const vitePluginRequire_1697861826482_39458643="/packs/assets/language-9fb1b580.svg",rtlChars=/[\u0590-\u083F]|[\u08A0-\u08FF]|[\uFB1D-\uFDFF]|[\uFE70-\uFEFF]/mg;function isRtl(_e){if(_e.length===0)return!1;_e=_e.replace(/(?:https?|ftp|sftp|ws|wss|blob|smtp|smtps):\/\/[\S]+/g,""),_e=_e.replace(/(mailto:)([^\s@]+@[^\s@]+\.[^\s@]+)/g,""),_e=_e.replace(/(tel:)([+\d\s()-]+)/g,""),_e=_e.replace(/(?:^|[^\/\w])@([a-z0-9_]+(@[a-z0-9\.\-]+)?)/ig,""),_e=_e.replace(/(?:^|[^\/\w])#([\S]+)/ig,""),_e=_e.replace(/\s+/g,"");const et=_e.match(rtlChars);return et?et.length/_e.length>.3:!1}const mfm="",markup="";var Markup=React$3.forwardRef(function(_e,et){return React$3.createElement(Text$2,_extends$4({ref:et},_e,{"data-markup":!0}))}),TranslateButton=function _e(et){var tt,nt=et.status,rt=useAppDispatch(),at=useIntl(),it=useFeatures(),ot=useInstance(),st=parseVersion(ot.version),ct=useAppSelector(function(bt){return bt.me}),ut=ot.pleroma.metadata.translation.allow_unauthenticated,dt=ot.pleroma.metadata.translation.allow_remote,ft=ot.pleroma.metadata.translation.source_languages,pt=ot.pleroma.metadata.translation.target_languages,mt=(ct||ut)&&(dt||isLocal(nt.account))&&["public","unlisted"].includes(nt.visibility)&&nt.contentHtml.length>0&&(nt.language!==null&&at.locale!==nt.language||st.software===AKKOMA),ht=(!ft||ft.includes(nt.language))&&(!pt||pt.includes(at.locale))||st.software===AKKOMA,Et=function(wt){wt.stopPropagation(),!nt.translation||nt.translation.get("status")==="hidden"?rt(translateStatus(nt.id,at.locale)):rt(undoStatusTranslation(nt.id))},yt=reactExports.useRef(null);if(reactExports.useLayoutEffect(function(){if(yt.current){var bt=yt.current.querySelectorAll("a[href]");bt.forEach(function(wt){wt.setAttribute("href","#")})}},[nt.translation]),!it.translations||!mt||!ht)return null;if(!nt.translation||nt.translation.get("status")==="hidden")return _createRawReactElement("div",{},void 0,_createRawReactElement(Button,{theme:"muted",text:_createRawReactElement(FormattedMessage$1,{id:"status.translate",defaultMessage:"Translate"}),icon:vitePluginRequire_1697861826482_39458643,onClick:Et}));var vt=new Intl.DisplayNames([at.locale],{type:"language"}),gt=(tt=nt.language)!==null&&tt!==void 0?tt:nt.translation.get("detected_source_language"),St=gt?vt.of(gt):"Unknown",Rt=nt.translation.get("provider"),$t=isRtl(nt.search_index)?"rtl":"ltr";return _createRawReactElement(Stack,{space:3,alignItems:"start"},void 0,_createRawReactElement(Button,{theme:"muted",text:_createRawReactElement(FormattedMessage$1,{id:"status.translate_hide",defaultMessage:"Hide translation"}),icon:vitePluginRequire_1697861826482_39458643,onClick:Et}),_createRawReactElement(Text$2,{theme:"muted"},void 0,_createRawReactElement(FormattedMessage$1,{id:"status.translated_from_with",defaultMessage:"Translated from {lang} using {provider}",values:{lang:St,provider:Rt}})),React$3.createElement(Markup,{ref:yt,tabIndex:0,key:"content",className:"relative overflow-y-clip overflow-x-visible text-ellipsis break-words text-gray-900 focus:outline-none dark:text-gray-100",direction:$t,dangerouslySetInnerHTML:{__html:nt.translation.get("content")||""},lang:nt.language||void 0,size:"md"}))};const vitePluginRequire_1697861810877_40645275="/packs/assets/map-pin-1b09db51.svg",LOCATION_SEARCH_REQUEST="LOCATION_SEARCH_REQUEST",LOCATION_SEARCH_SUCCESS="LOCATION_SEARCH_SUCCESS",LOCATION_SEARCH_FAIL="LOCATION_SEARCH_FAIL",EDIT_EVENT_NAME_CHANGE="EDIT_EVENT_NAME_CHANGE",EDIT_EVENT_DESCRIPTION_CHANGE="EDIT_EVENT_DESCRIPTION_CHANGE",EDIT_EVENT_START_TIME_CHANGE="EDIT_EVENT_START_TIME_CHANGE",EDIT_EVENT_HAS_END_TIME_CHANGE="EDIT_EVENT_HAS_END_TIME_CHANGE",EDIT_EVENT_END_TIME_CHANGE="EDIT_EVENT_END_TIME_CHANGE",EDIT_EVENT_APPROVAL_REQUIRED_CHANGE="EDIT_EVENT_APPROVAL_REQUIRED_CHANGE",EDIT_EVENT_LOCATION_CHANGE="EDIT_EVENT_LOCATION_CHANGE",EVENT_BANNER_UPLOAD_REQUEST="EVENT_BANNER_UPLOAD_REQUEST",EVENT_BANNER_UPLOAD_PROGRESS="EVENT_BANNER_UPLOAD_PROGRESS",EVENT_BANNER_UPLOAD_SUCCESS="EVENT_BANNER_UPLOAD_SUCCESS",EVENT_BANNER_UPLOAD_FAIL="EVENT_BANNER_UPLOAD_FAIL",EVENT_BANNER_UPLOAD_UNDO="EVENT_BANNER_UPLOAD_UNDO",EVENT_SUBMIT_REQUEST="EVENT_SUBMIT_REQUEST",EVENT_SUBMIT_SUCCESS="EVENT_SUBMIT_SUCCESS",EVENT_SUBMIT_FAIL="EVENT_SUBMIT_FAIL",EVENT_JOIN_REQUEST="EVENT_JOIN_REQUEST",EVENT_JOIN_SUCCESS="EVENT_JOIN_SUCCESS",EVENT_JOIN_FAIL="EVENT_JOIN_FAIL",EVENT_LEAVE_REQUEST="EVENT_LEAVE_REQUEST",EVENT_LEAVE_SUCCESS="EVENT_LEAVE_SUCCESS",EVENT_LEAVE_FAIL="EVENT_LEAVE_FAIL",EVENT_PARTICIPATIONS_FETCH_REQUEST="EVENT_PARTICIPATIONS_FETCH_REQUEST",EVENT_PARTICIPATIONS_FETCH_SUCCESS="EVENT_PARTICIPATIONS_FETCH_SUCCESS",EVENT_PARTICIPATIONS_FETCH_FAIL="EVENT_PARTICIPATIONS_FETCH_FAIL",EVENT_PARTICIPATIONS_EXPAND_SUCCESS="EVENT_PARTICIPATIONS_EXPAND_SUCCESS",EVENT_PARTICIPATION_REQUESTS_FETCH_REQUEST="EVENT_PARTICIPATION_REQUESTS_FETCH_REQUEST",EVENT_PARTICIPATION_REQUESTS_FETCH_SUCCESS="EVENT_PARTICIPATION_REQUESTS_FETCH_SUCCESS",EVENT_PARTICIPATION_REQUESTS_FETCH_FAIL="EVENT_PARTICIPATION_REQUESTS_FETCH_FAIL",EVENT_PARTICIPATION_REQUESTS_EXPAND_SUCCESS="EVENT_PARTICIPATION_REQUESTS_EXPAND_SUCCESS",EVENT_PARTICIPATION_REQUEST_AUTHORIZE_REQUEST="EVENT_PARTICIPATION_REQUEST_AUTHORIZE_REQUEST",EVENT_PARTICIPATION_REQUEST_AUTHORIZE_SUCCESS="EVENT_PARTICIPATION_REQUEST_AUTHORIZE_SUCCESS",EVENT_PARTICIPATION_REQUEST_AUTHORIZE_FAIL="EVENT_PARTICIPATION_REQUEST_AUTHORIZE_FAIL",EVENT_PARTICIPATION_REQUEST_REJECT_REQUEST="EVENT_PARTICIPATION_REQUEST_REJECT_REQUEST",EVENT_PARTICIPATION_REQUEST_REJECT_SUCCESS="EVENT_PARTICIPATION_REQUEST_REJECT_SUCCESS",EVENT_PARTICIPATION_REQUEST_REJECT_FAIL="EVENT_PARTICIPATION_REQUEST_REJECT_FAIL",EVENT_COMPOSE_CANCEL="EVENT_COMPOSE_CANCEL",EVENT_FORM_SET="EVENT_FORM_SET",RECENT_EVENTS_FETCH_REQUEST="RECENT_EVENTS_FETCH_REQUEST",RECENT_EVENTS_FETCH_SUCCESS="RECENT_EVENTS_FETCH_SUCCESS",RECENT_EVENTS_FETCH_FAIL="RECENT_EVENTS_FETCH_FAIL",JOINED_EVENTS_FETCH_REQUEST="JOINED_EVENTS_FETCH_REQUEST",JOINED_EVENTS_FETCH_SUCCESS="JOINED_EVENTS_FETCH_SUCCESS",JOINED_EVENTS_FETCH_FAIL="JOINED_EVENTS_FETCH_FAIL",noOp$4=()=>new Promise(_e=>_e(void 0)),messages$I={exceededImageSizeLimit:{id:"upload_error.image_size_limit",defaultMessage:"Image exceeds the current file size limit ({limit})"},success:{id:"compose_event.submit_success",defaultMessage:"Your event was created"},editSuccess:{id:"compose_event.edit_success",defaultMessage:"Your event was edited"},joinSuccess:{id:"join_event.success",defaultMessage:"Joined the event"},joinRequestSuccess:{id:"join_event.request_success",defaultMessage:"Requested to join the event"},view:{id:"toast.view",defaultMessage:"View"},authorized:{id:"compose_event.participation_requests.authorize_success",defaultMessage:"User accepted"},rejected:{id:"compose_event.participation_requests.reject_success",defaultMessage:"User rejected"}},locationSearch=(_e,et)=>(tt,nt)=>(tt({type:LOCATION_SEARCH_REQUEST,query:_e}),api(nt).get("/api/v1/pleroma/search/location",{params:{q:_e},signal:et}).then(({data:rt})=>(tt({type:LOCATION_SEARCH_SUCCESS,locations:rt}),rt)).catch(rt=>{throw tt({type:LOCATION_SEARCH_FAIL}),rt})),changeEditEventName=_e=>({type:EDIT_EVENT_NAME_CHANGE,value:_e}),changeEditEventDescription=_e=>({type:EDIT_EVENT_DESCRIPTION_CHANGE,value:_e}),changeEditEventStartTime=_e=>({type:EDIT_EVENT_START_TIME_CHANGE,value:_e}),changeEditEventEndTime=_e=>({type:EDIT_EVENT_END_TIME_CHANGE,value:_e}),changeEditEventHasEndTime=_e=>({type:EDIT_EVENT_HAS_END_TIME_CHANGE,value:_e}),changeEditEventApprovalRequired=_e=>({type:EDIT_EVENT_APPROVAL_REQUIRED_CHANGE,value:_e}),changeEditEventLocation=_e=>(et,tt)=>{let nt=null;_e&&(nt=tt().locations.get(_e)),et({type:EDIT_EVENT_LOCATION_CHANGE,value:nt})},uploadEventBanner=(_e,et)=>(tt,nt)=>{const rt=nt().instance.configuration.media_attachments.image_size_limit;let at=0;if(tt(uploadEventBannerRequest()),rt&&_e.size>rt){const it=formatBytes(rt),ot=et.formatMessage(messages$I.exceededImageSizeLimit,{limit:it});toast.error(ot),tt(uploadEventBannerFail(!0));return}resizeImage$1(_e).then(it=>{const ot=new FormData;return ot.append("file",it),tt(uploadMedia(ot,({loaded:ct})=>{at=ct,tt(uploadEventBannerProgress(at))})).then(({status:ct,data:ut})=>{if(ct===200)tt(uploadEventBannerSuccess(ut,it));else if(ct===202){const dt=()=>{tt(fetchMedia(ut.id)).then(({status:ft,data:pt})=>{ft===200?tt(uploadEventBannerSuccess(pt,it)):ft===206&&setTimeout(()=>dt(),1e3)}).catch(ft=>tt(uploadEventBannerFail(ft)))};dt()}})}).catch(it=>tt(uploadEventBannerFail(it)))},uploadEventBannerRequest=()=>({type:EVENT_BANNER_UPLOAD_REQUEST}),uploadEventBannerProgress=_e=>({type:EVENT_BANNER_UPLOAD_PROGRESS,loaded:_e}),uploadEventBannerSuccess=(_e,et)=>({type:EVENT_BANNER_UPLOAD_SUCCESS,media:_e,file:et}),uploadEventBannerFail=_e=>({type:EVENT_BANNER_UPLOAD_FAIL,error:_e}),undoUploadEventBanner=()=>({type:EVENT_BANNER_UPLOAD_UNDO}),submitEvent=()=>(_e,et)=>{const tt=et(),nt=tt.compose_event.id,rt=tt.compose_event.name,at=tt.compose_event.status,it=tt.compose_event.banner,ot=tt.compose_event.start_time,st=tt.compose_event.end_time,ct=tt.compose_event.approval_required?"restricted":"free",ut=tt.compose_event.location;if(!rt||!rt.length)return;_e(submitEventRequest());const dt={name:rt,status:at,start_time:ot,join_mode:ct,content_type:"text/markdown"};return st&&(dt.end_time=st),it&&(dt.banner_id=it.id),ut&&(dt.location_id=ut.origin_id),api(et).request({url:nt===null?"/api/v1/pleroma/events":`/api/v1/pleroma/events/${nt}`,method:nt===null?"post":"put",data:dt}).then(({data:ft})=>{_e(closeModal("COMPOSE_EVENT")),_e(importFetchedStatus(ft)),_e(submitEventSuccess(ft)),toast.success(nt?messages$I.editSuccess:messages$I.success,{actionLabel:messages$I.view,actionLink:`/@${ft.account.acct}/events/${ft.id}`})}).catch(function(ft){_e(submitEventFail(ft))})},submitEventRequest=()=>({type:EVENT_SUBMIT_REQUEST}),submitEventSuccess=_e=>({type:EVENT_SUBMIT_SUCCESS,status:_e}),submitEventFail=_e=>({type:EVENT_SUBMIT_FAIL,error:_e}),joinEvent=(_e,et)=>(tt,nt)=>{const rt=nt().statuses.get(_e);return!rt||!rt.event||rt.event.join_state?tt(noOp$4):(tt(joinEventRequest(rt)),api(nt).post(`/api/v1/pleroma/events/${_e}/join`,{participation_message:et}).then(({data:at})=>{var it;tt(importFetchedStatus(at)),tt(joinEventSuccess(at)),toast.success(((it=at.pleroma.event)==null?void 0:it.join_state)==="pending"?messages$I.joinRequestSuccess:messages$I.joinSuccess,{actionLabel:messages$I.view,actionLink:`/@${at.account.acct}/events/${at.id}`})}).catch(function(at){var it;tt(joinEventFail(at,rt,((it=rt==null?void 0:rt.event)==null?void 0:it.join_state)||null))}))},joinEventRequest=_e=>({type:EVENT_JOIN_REQUEST,id:_e.id}),joinEventSuccess=_e=>({type:EVENT_JOIN_SUCCESS,id:_e.id}),joinEventFail=(_e,et,tt)=>({type:EVENT_JOIN_FAIL,error:_e,id:et.id,previousState:tt}),leaveEvent=_e=>(et,tt)=>{const nt=tt().statuses.get(_e);return!nt||!nt.event||!nt.event.join_state?et(noOp$4):(et(leaveEventRequest(nt)),api(tt).post(`/api/v1/pleroma/events/${_e}/leave`).then(({data:rt})=>{et(importFetchedStatus(rt)),et(leaveEventSuccess(rt))}).catch(function(rt){et(leaveEventFail(rt,nt))}))},leaveEventRequest=_e=>({type:EVENT_LEAVE_REQUEST,id:_e.id}),leaveEventSuccess=_e=>({type:EVENT_LEAVE_SUCCESS,id:_e.id}),leaveEventFail=(_e,et)=>({type:EVENT_LEAVE_FAIL,id:et.id,error:_e}),fetchEventParticipations=_e=>(et,tt)=>(et(fetchEventParticipationsRequest(_e)),api(tt).get(`/api/v1/pleroma/events/${_e}/participations`).then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");return et(importFetchedAccounts(nt.data)),et(fetchEventParticipationsSuccess(_e,nt.data,rt?rt.uri:null))}).catch(nt=>{et(fetchEventParticipationsFail(_e,nt))})),fetchEventParticipationsRequest=_e=>({type:EVENT_PARTICIPATIONS_FETCH_REQUEST,id:_e}),fetchEventParticipationsSuccess=(_e,et,tt)=>({type:EVENT_PARTICIPATIONS_FETCH_SUCCESS,id:_e,accounts:et,next:tt}),fetchEventParticipationsFail=(_e,et)=>({type:EVENT_PARTICIPATIONS_FETCH_FAIL,id:_e,error:et}),fetchEventParticipationRequests=_e=>(et,tt)=>(et(fetchEventParticipationRequestsRequest(_e)),api(tt).get(`/api/v1/pleroma/events/${_e}/participation_requests`).then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");return et(importFetchedAccounts(nt.data.map(({account:at})=>at))),et(fetchEventParticipationRequestsSuccess(_e,nt.data,rt?rt.uri:null))}).catch(nt=>{et(fetchEventParticipationRequestsFail(_e,nt))})),fetchEventParticipationRequestsRequest=_e=>({type:EVENT_PARTICIPATION_REQUESTS_FETCH_REQUEST,id:_e}),fetchEventParticipationRequestsSuccess=(_e,et,tt)=>({type:EVENT_PARTICIPATION_REQUESTS_FETCH_SUCCESS,id:_e,participations:et,next:tt}),fetchEventParticipationRequestsFail=(_e,et)=>({type:EVENT_PARTICIPATION_REQUESTS_FETCH_FAIL,id:_e,error:et}),authorizeEventParticipationRequest=(_e,et)=>(tt,nt)=>(tt(authorizeEventParticipationRequestRequest(_e,et)),api(nt).post(`/api/v1/pleroma/events/${_e}/participation_requests/${et}/authorize`).then(()=>{tt(authorizeEventParticipationRequestSuccess(_e,et)),toast.success(messages$I.authorized)}).catch(rt=>tt(authorizeEventParticipationRequestFail(_e,et,rt)))),authorizeEventParticipationRequestRequest=(_e,et)=>({type:EVENT_PARTICIPATION_REQUEST_AUTHORIZE_REQUEST,id:_e,accountId:et}),authorizeEventParticipationRequestSuccess=(_e,et)=>({type:EVENT_PARTICIPATION_REQUEST_AUTHORIZE_SUCCESS,id:_e,accountId:et}),authorizeEventParticipationRequestFail=(_e,et,tt)=>({type:EVENT_PARTICIPATION_REQUEST_AUTHORIZE_FAIL,id:_e,accountId:et,error:tt}),rejectEventParticipationRequest=(_e,et)=>(tt,nt)=>(tt(rejectEventParticipationRequestRequest(_e,et)),api(nt).post(`/api/v1/pleroma/events/${_e}/participation_requests/${et}/reject`).then(()=>{tt(rejectEventParticipationRequestSuccess(_e,et)),toast.success(messages$I.rejected)}).catch(rt=>tt(rejectEventParticipationRequestFail(_e,et,rt)))),rejectEventParticipationRequestRequest=(_e,et)=>({type:EVENT_PARTICIPATION_REQUEST_REJECT_REQUEST,id:_e,accountId:et}),rejectEventParticipationRequestSuccess=(_e,et)=>({type:EVENT_PARTICIPATION_REQUEST_REJECT_SUCCESS,id:_e,accountId:et}),rejectEventParticipationRequestFail=(_e,et,tt)=>({type:EVENT_PARTICIPATION_REQUEST_REJECT_FAIL,id:_e,accountId:et,error:tt}),fetchEventIcs=_e=>(et,tt)=>api(tt).get(`/api/v1/pleroma/events/${_e}/ics`),cancelEventCompose=()=>({type:EVENT_COMPOSE_CANCEL}),editEvent=_e=>(et,tt)=>{const nt=tt().statuses.get(_e);et({type:STATUS_FETCH_SOURCE_REQUEST}),api(tt).get(`/api/v1/statuses/${_e}/source`).then(rt=>{et({type:STATUS_FETCH_SOURCE_SUCCESS}),et({type:EVENT_FORM_SET,status:nt,text:rt.data.text,location:rt.data.location}),et(openModal("COMPOSE_EVENT"))}).catch(rt=>{et({type:STATUS_FETCH_SOURCE_FAIL,error:rt})})},fetchRecentEvents=()=>(_e,et)=>{var tt;(tt=et().status_lists.get("recent_events"))!=null&&tt.isLoading||(_e({type:RECENT_EVENTS_FETCH_REQUEST}),api(et).get("/api/v1/timelines/public?only_events=true").then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");_e(importFetchedStatuses(nt.data)),_e({type:RECENT_EVENTS_FETCH_SUCCESS,statuses:nt.data,next:rt?rt.uri:null})}).catch(nt=>{_e({type:RECENT_EVENTS_FETCH_FAIL,error:nt})}))},fetchJoinedEvents=()=>(_e,et)=>{var tt;(tt=et().status_lists.get("joined_events"))!=null&&tt.isLoading||(_e({type:JOINED_EVENTS_FETCH_REQUEST}),api(et).get("/api/v1/pleroma/events/joined_events").then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");_e(importFetchedStatuses(nt.data)),_e({type:JOINED_EVENTS_FETCH_SUCCESS,statuses:nt.data,next:rt?rt.uri:null})}).catch(nt=>{_e({type:JOINED_EVENTS_FETCH_FAIL,error:nt})}))};var messages$H={leaveConfirm:{id:"confirmations.leave_event.confirm",defaultMessage:"Leave event"},leaveMessage:{id:"confirmations.leave_event.message",defaultMessage:"If you want to rejoin the event, the request will be manually reviewed again. Are you sure you want to proceed?"}},EventActionButton=function _e(et){var tt=et.status,nt=et.theme,rt=nt===void 0?"secondary":nt,at=useIntl(),it=useAppDispatch(),ot=useAppSelector(function(Et){return Et.me}),st=tt.event,ct=function(yt){yt.preventDefault(),st.join_mode==="free"?it(joinEvent(tt.id)):it(openModal("JOIN_EVENT",{statusId:tt.id}))},ut=function(yt){yt.preventDefault(),st.join_mode==="restricted"?it(openModal("CONFIRM",{message:at.formatMessage(messages$H.leaveMessage),confirm:at.formatMessage(messages$H.leaveConfirm),onConfirm:function(){return it(leaveEvent(tt.id))}})):it(leaveEvent(tt.id))},dt=function(yt){yt.preventDefault(),it(openModal("UNAUTHORIZED",{action:"JOIN",ap_id:tt.url}))},ft,pt,mt=!1,ht=ut;switch(st.join_state){case"accept":ft=_createRawReactElement(FormattedMessage$1,{id:"event.join_state.accept",defaultMessage:"Going"}),pt=vitePluginRequire_1697861823905_3845308;break;case"pending":ft=_createRawReactElement(FormattedMessage$1,{id:"event.join_state.pending",defaultMessage:"Pending"});break;case"reject":ft=_createRawReactElement(FormattedMessage$1,{id:"event.join_state.rejected",defaultMessage:"Going"}),pt=vitePluginRequire_1697861828079_95498444,mt=!0;break;default:ft=_createRawReactElement(FormattedMessage$1,{id:"event.join_state.empty",defaultMessage:"Participate"}),ht=ot?ct:dt}return _createRawReactElement(Button,{size:"sm",theme:rt,icon:pt,onClick:ht,disabled:mt},void 0,ft)};const vitePluginRequire_1697861810877_74518360="/packs/assets/calendar-f47bc58c.svg";var EventDate=function _e(et){var tt=et.status,nt=tt.event;if(!nt.start_time)return null;var rt=new Date(nt.start_time),at;if(nt.end_time){var it=new Date(nt.end_time),ot=rt.getFullYear()===it.getFullYear(),st=rt.getDate()===it.getDate()&&rt.getMonth()===it.getMonth()&&ot;st?at=React$3.createElement(React$3.Fragment,null,_createRawReactElement(FormattedDate,{value:nt.start_time,year:ot?void 0:"2-digit",month:"short",day:"2-digit",weekday:"short",hour:"2-digit",minute:"2-digit"})," - ",_createRawReactElement(FormattedDate,{value:nt.end_time,hour:"2-digit",minute:"2-digit"})):at=React$3.createElement(React$3.Fragment,null,_createRawReactElement(FormattedDate,{value:nt.start_time,year:"2-digit",month:"short",day:"2-digit",weekday:"short"})," - ",_createRawReactElement(FormattedDate,{value:nt.end_time,year:"2-digit",month:"short",day:"2-digit",weekday:"short"}))}else at=_createRawReactElement(FormattedDate,{value:nt.start_time,year:"2-digit",month:"short",day:"2-digit",weekday:"short",hour:"2-digit",minute:"2-digit"});return _createRawReactElement(HStack,{alignItems:"center",space:2},void 0,_createRawReactElement(Icon,{src:vitePluginRequire_1697861810877_74518360}),_createRawReactElement("span",{},void 0,at))},messages$G={eventBanner:{id:"event.banner",defaultMessage:"Event banner"},leaveConfirm:{id:"confirmations.leave_event.confirm",defaultMessage:"Leave event"},leaveMessage:{id:"confirmations.leave_event.message",defaultMessage:"If you want to rejoin the event, the request will be manually reviewed again. Are you sure you want to proceed?"}},EventPreview=function _e(et){var tt=et.status,nt=et.className,rt=et.hideAction,at=et.floatingAction,it=at===void 0?!0:at,ot=useIntl(),st=useAppSelector(function(pt){return pt.me}),ct=tt.account,ut=tt.event,dt=ut.banner,ft=!rt&&(ct.id===st?_createRawReactElement(Button,{size:"sm",theme:it?"secondary":"primary",to:"/@".concat(ct.acct,"/events/").concat(tt.id)},void 0,_createRawReactElement(FormattedMessage$1,{id:"event.manage",defaultMessage:"Manage"})):_createRawReactElement(EventActionButton,{status:tt,theme:it?"secondary":"primary"}));return _createRawReactElement("div",{className:clsx("relative w-full overflow-hidden rounded-lg bg-gray-100 dark:bg-primary-800",nt)},void 0,_createRawReactElement("div",{className:"absolute right-3 top-28"},void 0,it&&ft),_createRawReactElement("div",{className:"h-40 bg-primary-200 dark:bg-gray-600"},void 0,dt&&_createRawReactElement("img",{className:"h-full w-full object-cover",src:dt.url,alt:ot.formatMessage(messages$G.eventBanner)})),_createRawReactElement(Stack,{className:"p-2.5",space:2},void 0,_createRawReactElement(HStack,{space:2,alignItems:"center",justifyContent:"between"},void 0,_createRawReactElement(Text$2,{weight:"semibold",truncate:!0},void 0,ut.name),!it&&ft),_createRawReactElement("div",{className:"flex flex-wrap gap-x-2 gap-y-1 text-gray-700 dark:text-gray-600"},void 0,_createRawReactElement(HStack,{alignItems:"center",space:2},void 0,_createRawReactElement(Icon,{src:vitePluginRequire_1697861809668_3303363}),_createRawReactElement(HStack,{space:1,alignItems:"center",grow:!0},void 0,_createRawReactElement("span",{dangerouslySetInnerHTML:{__html:ct.display_name_html}}),ct.verified&&_createRawReactElement(VerificationBadge,{}))),_createRawReactElement(EventDate,{status:tt}),ut.location&&_createRawReactElement(HStack,{alignItems:"center",space:2},void 0,_createRawReactElement(Icon,{src:vitePluginRequire_1697861810877_40645275}),_createRawReactElement("span",{},void 0,ut.location.get("name"))))))},$$3=_export,call$1=functionCall,uncurryThis$3=functionUncurryThisClause,createIteratorConstructor=iteratorCreateConstructor,createIterResultObject=createIterResultObject$4,requireObjectCoercible$1=requireObjectCoercible$b,toLength$1=toLength$6,toString$3=toString$t,anObject$1=anObject$m,isNullOrUndefined$1=isNullOrUndefined$a,classof=classofRaw$2,isRegExp=isRegexp,getRegExpFlags=regexpGetFlags,getMethod$1=getMethod$7,defineBuiltIn=defineBuiltIn$f,fails$2=fails$F,wellKnownSymbol$1=wellKnownSymbol$t,speciesConstructor=speciesConstructor$2,advanceStringIndex$1=advanceStringIndex$3,regExpExec$1=regexpExecAbstract,InternalStateModule=internalState,IS_PURE=isPure,MATCH_ALL=wellKnownSymbol$1("matchAll"),REGEXP_STRING="RegExp String",REGEXP_STRING_ITERATOR=REGEXP_STRING+" Iterator",setInternalState=InternalStateModule.set,getInternalState=InternalStateModule.getterFor(REGEXP_STRING_ITERATOR),RegExpPrototype=RegExp.prototype,$TypeError$1=TypeError,stringIndexOf$1=uncurryThis$3("".indexOf),nativeMatchAll=uncurryThis$3("".matchAll),WORKS_WITH_NON_GLOBAL_REGEX=!!nativeMatchAll&&!fails$2(function(){nativeMatchAll("a",/./)}),$RegExpStringIterator=createIteratorConstructor(function _e(et,tt,nt,rt){setInternalState(this,{type:REGEXP_STRING_ITERATOR,regexp:et,string:tt,global:nt,unicode:rt,done:!1})},REGEXP_STRING,function _e(){var et=getInternalState(this);if(et.done)return createIterResultObject(void 0,!0);var tt=et.regexp,nt=et.string,rt=regExpExec$1(tt,nt);return rt===null?(et.done=!0,createIterResultObject(void 0,!0)):et.global?(toString$3(rt[0])===""&&(tt.lastIndex=advanceStringIndex$1(nt,toLength$1(tt.lastIndex),et.unicode)),createIterResultObject(rt,!1)):(et.done=!0,createIterResultObject(rt,!1))}),$matchAll=function(_e){var et=anObject$1(this),tt=toString$3(_e),nt=speciesConstructor(et,RegExp),rt=toString$3(getRegExpFlags(et)),at,it,ot;return at=new nt(nt===RegExp?et.source:et,rt),it=!!~stringIndexOf$1(rt,"g"),ot=!!~stringIndexOf$1(rt,"u"),at.lastIndex=toLength$1(et.lastIndex),new $RegExpStringIterator(at,tt,it,ot)};$$3({target:"String",proto:!0,forced:WORKS_WITH_NON_GLOBAL_REGEX},{matchAll:function _e(et){var tt=requireObjectCoercible$1(this),nt,rt,at,it;if(isNullOrUndefined$1(et)){if(WORKS_WITH_NON_GLOBAL_REGEX)return nativeMatchAll(tt,et)}else{if(isRegExp(et)&&(nt=toString$3(requireObjectCoercible$1(getRegExpFlags(et))),!~stringIndexOf$1(nt,"g")))throw $TypeError$1("`.matchAll` does not allow non-global regexes");if(WORKS_WITH_NON_GLOBAL_REGEX)return nativeMatchAll(tt,et);if(at=getMethod$1(et,MATCH_ALL),at===void 0&&IS_PURE&&classof(et)==="RegExp"&&(at=$matchAll),at)return call$1(at,et,tt)}return rt=toString$3(tt),it=new RegExp(et,"g"),it[MATCH_ALL](rt)}});MATCH_ALL in RegExpPrototype||defineBuiltIn(RegExpPrototype,MATCH_ALL,$matchAll);var uncurryThis$2=functionUncurryThis,toObject$2=toObject$e,floor=Math.floor,charAt=uncurryThis$2("".charAt),replace$1=uncurryThis$2("".replace),stringSlice$1=uncurryThis$2("".slice),SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d{1,2})/g,getSubstitution$1=function(_e,et,tt,nt,rt,at){var it=tt+_e.length,ot=nt.length,st=SUBSTITUTION_SYMBOLS_NO_NAMED;return rt!==void 0&&(rt=toObject$2(rt),st=SUBSTITUTION_SYMBOLS),replace$1(at,st,function(ct,ut){var dt;switch(charAt(ut,0)){case"$":return"$";case"&":return _e;case"`":return stringSlice$1(et,0,tt);case"'":return stringSlice$1(et,it);case"<":dt=rt[stringSlice$1(ut,1,-1)];break;default:var ft=+ut;if(ft===0)return ct;if(ft>ot){var pt=floor(ft/10);return pt===0?ct:pt<=ot?nt[pt-1]===void 0?charAt(ut,1):nt[pt-1]+charAt(ut,1):ct}dt=nt[ft-1]}return dt===void 0?"":dt})},apply$1=functionApply,call=functionCall,uncurryThis$1=functionUncurryThis,fixRegExpWellKnownSymbolLogic=fixRegexpWellKnownSymbolLogic,fails$1=fails$F,anObject=anObject$m,isCallable=isCallable$t,isNullOrUndefined=isNullOrUndefined$a,toIntegerOrInfinity=toIntegerOrInfinity$4,toLength=toLength$6,toString$2=toString$t,requireObjectCoercible=requireObjectCoercible$b,advanceStringIndex=advanceStringIndex$3,getMethod=getMethod$7,getSubstitution=getSubstitution$1,regExpExec=regexpExecAbstract,wellKnownSymbol=wellKnownSymbol$t,REPLACE=wellKnownSymbol("replace"),max=Math.max,min=Math.min,concat=uncurryThis$1([].concat),push=uncurryThis$1([].push),stringIndexOf=uncurryThis$1("".indexOf),stringSlice=uncurryThis$1("".slice),maybeToString=function(_e){return _e===void 0?_e:String(_e)},REPLACE_KEEPS_$0=function(){return"a".replace(/./,"$0")==="$0"}(),REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE=function(){return/./[REPLACE]?/./[REPLACE]("a","$0")==="":!1}(),REPLACE_SUPPORTS_NAMED_GROUPS=!fails$1(function(){var _e=/./;return _e.exec=function(){var et=[];return et.groups={a:"7"},et},"".replace(_e,"$")!=="7"});fixRegExpWellKnownSymbolLogic("replace",function(_e,et,tt){var nt=REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE?"$":"$0";return[function(at,it){var ot=requireObjectCoercible(this),st=isNullOrUndefined(at)?void 0:getMethod(at,REPLACE);return st?call(st,at,ot,it):call(et,toString$2(ot),at,it)},function(rt,at){var it=anObject(this),ot=toString$2(rt);if(typeof at=="string"&&stringIndexOf(at,nt)===-1&&stringIndexOf(at,"$<")===-1){var st=tt(et,it,ot,at);if(st.done)return st.value}var ct=isCallable(at);ct||(at=toString$2(at));var ut=it.global,dt;ut&&(dt=it.unicode,it.lastIndex=0);for(var ft=[],pt;pt=regExpExec(it,ot),!(pt===null||(push(ft,pt),!ut));){var mt=toString$2(pt[0]);mt===""&&(it.lastIndex=advanceStringIndex(ot,toLength(it.lastIndex),dt))}for(var ht="",Et=0,yt=0;yt=Et&&(ht+=stringSlice(ot,Et,gt)+Rt,Et=gt+vt.length)}return ht+stringSlice(ot,Et)}]},!REPLACE_SUPPORTS_NAMED_GROUPS||!REPLACE_KEEPS_$0||REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);var lib$2={},lib$1={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Doctype=_e.CDATA=_e.Tag=_e.Style=_e.Script=_e.Comment=_e.Directive=_e.Text=_e.Root=_e.isTag=_e.ElementType=void 0;var et;(function(nt){nt.Root="root",nt.Text="text",nt.Directive="directive",nt.Comment="comment",nt.Script="script",nt.Style="style",nt.Tag="tag",nt.CDATA="cdata",nt.Doctype="doctype"})(et=_e.ElementType||(_e.ElementType={}));function tt(nt){return nt.type===et.Tag||nt.type===et.Script||nt.type===et.Style}_e.isTag=tt,_e.Root=et.Root,_e.Text=et.Text,_e.Directive=et.Directive,_e.Comment=et.Comment,_e.Script=et.Script,_e.Style=et.Style,_e.Tag=et.Tag,_e.CDATA=et.CDATA,_e.Doctype=et.Doctype})(lib$1);var node={},__extends=commonjsGlobal$2&&commonjsGlobal$2.__extends||function(){var _e=function(et,tt){return _e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(nt,rt){nt.__proto__=rt}||function(nt,rt){for(var at in rt)Object.prototype.hasOwnProperty.call(rt,at)&&(nt[at]=rt[at])},_e(et,tt)};return function(et,tt){if(typeof tt!="function"&&tt!==null)throw new TypeError("Class extends value "+String(tt)+" is not a constructor or null");_e(et,tt);function nt(){this.constructor=et}et.prototype=tt===null?Object.create(tt):(nt.prototype=tt.prototype,new nt)}}(),__assign=commonjsGlobal$2&&commonjsGlobal$2.__assign||function(){return __assign=Object.assign||function(_e){for(var et,tt=1,nt=arguments.length;tt0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"childNodes",{get:function(){return this.children},set:function(tt){this.children=tt},enumerable:!1,configurable:!0}),et}(Node$1);node.NodeWithChildren=NodeWithChildren;var CDATA=function(_e){__extends(et,_e);function et(){var tt=_e!==null&&_e.apply(this,arguments)||this;return tt.type=domelementtype_1.ElementType.CDATA,tt}return Object.defineProperty(et.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),et}(NodeWithChildren);node.CDATA=CDATA;var Document=function(_e){__extends(et,_e);function et(){var tt=_e!==null&&_e.apply(this,arguments)||this;return tt.type=domelementtype_1.ElementType.Root,tt}return Object.defineProperty(et.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),et}(NodeWithChildren);node.Document=Document;var Element$3=function(_e){__extends(et,_e);function et(tt,nt,rt,at){rt===void 0&&(rt=[]),at===void 0&&(at=tt==="script"?domelementtype_1.ElementType.Script:tt==="style"?domelementtype_1.ElementType.Style:domelementtype_1.ElementType.Tag);var it=_e.call(this,rt)||this;return it.name=tt,it.attribs=nt,it.type=at,it}return Object.defineProperty(et.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"tagName",{get:function(){return this.name},set:function(tt){this.name=tt},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"attributes",{get:function(){var tt=this;return Object.keys(this.attribs).map(function(nt){var rt,at;return{name:nt,value:tt.attribs[nt],namespace:(rt=tt["x-attribsNamespace"])===null||rt===void 0?void 0:rt[nt],prefix:(at=tt["x-attribsPrefix"])===null||at===void 0?void 0:at[nt]}})},enumerable:!1,configurable:!0}),et}(NodeWithChildren);node.Element=Element$3;function isTag(_e){return(0,domelementtype_1.isTag)(_e)}node.isTag=isTag;function isCDATA(_e){return _e.type===domelementtype_1.ElementType.CDATA}node.isCDATA=isCDATA;function isText(_e){return _e.type===domelementtype_1.ElementType.Text}node.isText=isText;function isComment(_e){return _e.type===domelementtype_1.ElementType.Comment}node.isComment=isComment;function isDirective(_e){return _e.type===domelementtype_1.ElementType.Directive}node.isDirective=isDirective;function isDocument(_e){return _e.type===domelementtype_1.ElementType.Root}node.isDocument=isDocument;function hasChildren(_e){return Object.prototype.hasOwnProperty.call(_e,"children")}node.hasChildren=hasChildren;function cloneNode(_e,et){et===void 0&&(et=!1);var tt;if(isText(_e))tt=new Text$1(_e.data);else if(isComment(_e))tt=new Comment$1(_e.data);else if(isTag(_e)){var nt=et?cloneChildren(_e.children):[],rt=new Element$3(_e.name,__assign({},_e.attribs),nt);nt.forEach(function(st){return st.parent=rt}),_e.namespace!=null&&(rt.namespace=_e.namespace),_e["x-attribsNamespace"]&&(rt["x-attribsNamespace"]=__assign({},_e["x-attribsNamespace"])),_e["x-attribsPrefix"]&&(rt["x-attribsPrefix"]=__assign({},_e["x-attribsPrefix"])),tt=rt}else if(isCDATA(_e)){var nt=et?cloneChildren(_e.children):[],at=new CDATA(nt);nt.forEach(function(ct){return ct.parent=at}),tt=at}else if(isDocument(_e)){var nt=et?cloneChildren(_e.children):[],it=new Document(nt);nt.forEach(function(ct){return ct.parent=it}),_e["x-mode"]&&(it["x-mode"]=_e["x-mode"]),tt=it}else if(isDirective(_e)){var ot=new ProcessingInstruction$1(_e.name,_e.data);_e["x-name"]!=null&&(ot["x-name"]=_e["x-name"],ot["x-publicId"]=_e["x-publicId"],ot["x-systemId"]=_e["x-systemId"]),tt=ot}else throw new Error("Not implemented yet: ".concat(_e.type));return tt.startIndex=_e.startIndex,tt.endIndex=_e.endIndex,_e.sourceCodeLocation!=null&&(tt.sourceCodeLocation=_e.sourceCodeLocation),tt}node.cloneNode=cloneNode;function cloneChildren(_e){for(var et=_e.map(function(nt){return cloneNode(nt,!0)}),tt=1;tt/i,BODY_TAG_REGEX=//i,parseFromDocument=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},parseFromString=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},DOMParser$1=typeof window=="object"&&window.DOMParser;if(typeof DOMParser$1=="function"){var domParser$2=new DOMParser$1,mimeType="text/html";parseFromString=function(_e,et){return et&&(_e="<"+et+">"+_e+""),domParser$2.parseFromString(_e,mimeType)},parseFromDocument=parseFromString}if(typeof document=="object"&&document.implementation){var doc=document.implementation.createHTMLDocument();parseFromDocument=function(_e,et){if(et){var tt=doc.documentElement.querySelector(et);return tt.innerHTML=_e,doc}return doc.documentElement.innerHTML=_e,doc}}var template=typeof document=="object"?document.createElement("template"):{},parseFromTemplate;template.content&&(parseFromTemplate=function(_e){return template.innerHTML=_e,template.content.childNodes});function domparser$1(_e){var et,tt=_e.match(FIRST_TAG_REGEX);tt&&tt[1]&&(et=tt[1].toLowerCase());var nt,rt,at;switch(et){case HTML:return nt=parseFromString(_e),HEAD_TAG_REGEX.test(_e)||(rt=nt.querySelector(HEAD),rt&&rt.parentNode.removeChild(rt)),BODY_TAG_REGEX.test(_e)||(rt=nt.querySelector(BODY),rt&&rt.parentNode.removeChild(rt)),nt.querySelectorAll(HTML);case HEAD:case BODY:return nt=parseFromDocument(_e),at=nt.querySelectorAll(et),BODY_TAG_REGEX.test(_e)&&HEAD_TAG_REGEX.test(_e)?at[0].parentNode.childNodes:at;default:return parseFromTemplate?parseFromTemplate(_e):(rt=parseFromDocument(_e,BODY).querySelector(BODY),rt.childNodes)}}var domparser_1=domparser$1,utilities$6={},constants$1={};constants$1.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"];var domhandler$1=lib$2,constants=constants$1,CASE_SENSITIVE_TAG_NAMES=constants.CASE_SENSITIVE_TAG_NAMES,Comment=domhandler$1.Comment,Element$2=domhandler$1.Element,ProcessingInstruction=domhandler$1.ProcessingInstruction,Text=domhandler$1.Text,caseSensitiveTagNamesMap={},tagName;for(var i=0,len=CASE_SENSITIVE_TAG_NAMES.length;i/;function HTMLDOMParser(_e){if(typeof _e!="string")throw new TypeError("First argument must be a string");if(_e==="")return[];var et=_e.match(DIRECTIVE_REGEX),tt;return et&&et[1]&&(tt=et[1]),formatDOM(domparser(_e),null,tt)}var htmlToDom=HTMLDOMParser,lib={},possibleStandardNamesOptimized$1={},SAME$1=0;possibleStandardNamesOptimized$1.SAME=SAME$1;var CAMELCASE$1=1;possibleStandardNamesOptimized$1.CAMELCASE=CAMELCASE$1;possibleStandardNamesOptimized$1.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1};Object.defineProperty(lib,"__esModule",{value:!0});function _slicedToArray(_e,et){return _arrayWithHoles(_e)||_iterableToArrayLimit(_e,et)||_unsupportedIterableToArray$1(_e,et)||_nonIterableRest()}function _arrayWithHoles(_e){if(Array.isArray(_e))return _e}function _iterableToArrayLimit(_e,et){var tt=_e==null?null:typeof Symbol<"u"&&_e[Symbol.iterator]||_e["@@iterator"];if(tt!=null){var nt=[],rt=!0,at=!1,it,ot;try{for(tt=tt.call(_e);!(rt=(it=tt.next()).done)&&(nt.push(it.value),!(et&&nt.length===et));rt=!0);}catch(st){at=!0,ot=st}finally{try{!rt&&tt.return!=null&&tt.return()}finally{if(at)throw ot}}return nt}}function _unsupportedIterableToArray$1(_e,et){if(_e){if(typeof _e=="string")return _arrayLikeToArray$1(_e,et);var tt=Object.prototype.toString.call(_e).slice(8,-1);if(tt==="Object"&&_e.constructor&&(tt=_e.constructor.name),tt==="Map"||tt==="Set")return Array.from(_e);if(tt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(tt))return _arrayLikeToArray$1(_e,et)}}function _arrayLikeToArray$1(_e,et){(et==null||et>_e.length)&&(et=_e.length);for(var tt=0,nt=new Array(et);tt_e.length)&&(et=_e.length);for(var tt=0,nt=new Array(et);tt1}},{key:"determineTheCountry",value:function(){this.state.setCountry(getCountryByCallingCode(this.isInternational()?this.state.callingCode:this.defaultCallingCode,{nationalNumber:this.state.nationalSignificantNumber,defaultCountry:this.defaultCountry,metadata:this.metadata}))}},{key:"getNumberValue",value:function(){var tt=this.state,nt=tt.digits,rt=tt.callingCode,at=tt.country,it=tt.nationalSignificantNumber;if(nt){if(this.isInternational())return rt?"+"+rt+it:"+"+nt;if(at||rt){var ot=at?this.metadata.countryCallingCode():rt;return"+"+ot+it}}}},{key:"getNumber",value:function(){var tt=this.state,nt=tt.nationalSignificantNumber,rt=tt.carrierCode,at=tt.callingCode,it=this._getCountry();if(nt&&!(!it&&!at)){if(it&&it===this.defaultCountry){var ot=new Metadata(this.metadata.metadata);ot.selectNumberingPlan(it);var st=ot.numberingPlan.callingCode(),ct=this.metadata.getCountryCodesForCallingCode(st);if(ct.length>1){var ut=getCountryByNationalNumber(nt,{countries:ct,defaultCountry:this.defaultCountry,metadata:this.metadata.metadata});ut&&(it=ut)}}var dt=new PhoneNumber(it||at,nt,this.metadata.metadata);return rt&&(dt.carrierCode=rt),dt}}},{key:"isPossible",value:function(){var tt=this.getNumber();return tt?tt.isPossible():!1}},{key:"isValid",value:function(){var tt=this.getNumber();return tt?tt.isValid():!1}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}]),_e}();function parsePhoneNumberWithError(){return withMetadataArgument(parsePhoneNumberWithError$1,arguments)}function AsYouType(_e){return AsYouType$1.call(this,_e,metadata)}AsYouType.prototype=Object.create(AsYouType$1.prototype,{});AsYouType.prototype.constructor=AsYouType;const COUNTRY_CODES=["1","351","44","55"];var CountryCodeDropdown=function _e(et){var tt=et.countryCode,nt=et.onChange;return _createRawReactElement("select",{value:tt,className:"h-full rounded-md border-transparent bg-transparent py-0 pl-3 pr-7 text-base focus:outline-none focus:ring-primary-500 dark:text-white sm:text-sm",onChange:function(rt){function at(it){return rt.apply(this,arguments)}return at.toString=function(){return rt.toString()},at}(function(rt){return nt(rt.target.value)})},void 0,COUNTRY_CODES.map(function(rt){return _createRawReactElement("option",{value:rt},rt,"+",rt)}))},_excluded$f=["value","onChange","defaultCountryCode"],PhoneInput=function _e(et){et.value;var tt=et.onChange,nt=et.defaultCountryCode,rt=nt===void 0?"1":nt,at=_objectWithoutProperties(et,_excluded$f),it=reactExports.useState(rt),ot=_slicedToArray$4(it,2),st=ot[0],ct=ot[1],ut=reactExports.useState(""),dt=_slicedToArray$4(ut,2),ft=dt[0],pt=dt[1],mt=function(Et){var yt=Et.target,vt=new AsYouType({defaultCallingCode:st}),gt=vt.input(yt.value);gt===ft&&yt.value!==ft?pt(yt.value):pt(gt)};return reactExports.useEffect(function(){if(tt)try{var ht={defaultCallingCode:st,extract:!1},Et=parsePhoneNumberWithError(ft,ht);if(!Et.isPossible())throw Et;tt(Et.format("E.164"))}catch{tt(void 0)}},[st,ft]),reactExports.useEffect(function(){mt({target:{value:ft}})},[st,ft]),React$3.createElement(Input,_extends$4({onChange:mt,value:ft,prepend:_createRawReactElement(CountryCodeDropdown,{countryCode:st,onChange:ct})},at))},Portal$1=function _e(et){var tt=et.children,nt=et.target,rt=reactExports.useState(!1),at=_slicedToArray$4(rt,2),it=at[0],ot=at[1];return nt||(nt=nt=document.getElementById("soapbox")),reactExports.useLayoutEffect(function(){ot(!0)},[]),it?ae.createPortal(tt,nt):null};function ownKeys$c(_e,et){var tt=Object.keys(_e);if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(_e);et&&(nt=nt.filter(function(rt){return Object.getOwnPropertyDescriptor(_e,rt).enumerable})),tt.push.apply(tt,nt)}return tt}function _objectSpread$b(_e){for(var et=1;et"u"?commonjsGlobal$2:window,vendors=["moz","webkit"],suffix="AnimationFrame",raf=root["request"+suffix],caf=root["cancel"+suffix]||root["cancelRequest"+suffix];for(var i$1=0;!raf&&i$1bt*10&&(Nt.accumulatedTime=0),Nt.accumulatedTime===0){Nt.animationID=null,Nt.startAnimationIfNecessary();return}var Dt=(Nt.accumulatedTime-Math.floor(Nt.accumulatedTime/bt)*bt)/bt,Lt=Math.floor(Nt.accumulatedTime/bt),It={},Ot={},Ut={},jt={};for(var zt in kt)if(Object.prototype.hasOwnProperty.call(kt,zt)){var Qt=kt[zt];if(typeof Qt=="number")Ut[zt]=Qt,jt[zt]=0,It[zt]=Qt,Ot[zt]=0;else{for(var Xt=Nt.state.lastIdealStyle[zt],Yt=Nt.state.lastIdealVelocity[zt],Bt=0;Btbt*10&&(At.accumulatedTime=0),At.accumulatedTime===0){At.animationID=null,At.startAnimationIfNecessary();return}for(var Lt=(At.accumulatedTime-Math.floor(At.accumulatedTime/bt)*bt)/bt,It=Math.floor(At.accumulatedTime/bt),Ot=[],Ut=[],jt=[],zt=[],Qt=0;Qtit[vt])return-1;if(pt>st[vt]&&Etit[vt])return 1;if(mt>st[vt]&&htxt*10&&(Dt.accumulatedTime=0),Dt.accumulatedTime===0){Dt.animationID=null,Dt.startAnimationIfNecessary();return}for(var zt=(Dt.accumulatedTime-Math.floor(Dt.accumulatedTime/xt)*xt)/xt,Qt=Math.floor(Dt.accumulatedTime/xt),Xt=Nt(Dt.props.willEnter,Dt.props.willLeave,Dt.props.didLeave,Dt.state.mergedPropsStyles,Ot,Dt.state.currentStyles,Dt.state.currentVelocities,Dt.state.lastIdealStyles,Dt.state.lastIdealVelocities),Yt=Xt[0],Bt=Xt[1],Kt=Xt[2],Wt=Xt[3],sn=Xt[4],pn=0;pn=et.length)return _e.target=void 0,createIterResultObject$2(void 0,!0);switch(tt){case"keys":return createIterResultObject$2(nt,!1);case"values":return createIterResultObject$2(et[nt],!1)}return createIterResultObject$2([nt,et[nt]],!1)},"values"),values$2=Iterators.Arguments=Iterators.Array;addToUnscopables$2("keys");addToUnscopables$2("values");addToUnscopables$2("entries");if(DESCRIPTORS$4&&values$2.name!=="values")try{defineProperty$3(values$2,"name",{value:"values"})}catch(_e){}var global$5=global$w,DOMIterables=domIterables,DOMTokenListPrototype=domTokenListPrototype,ArrayIteratorMethods=es_array_iterator,createNonEnumerableProperty$3=createNonEnumerableProperty$a,wellKnownSymbol$4=wellKnownSymbol$t,ITERATOR$2=wellKnownSymbol$4("iterator"),TO_STRING_TAG=wellKnownSymbol$4("toStringTag"),ArrayValues=ArrayIteratorMethods.values,handlePrototype=function(_e,et){if(_e){if(_e[ITERATOR$2]!==ArrayValues)try{createNonEnumerableProperty$3(_e,ITERATOR$2,ArrayValues)}catch{_e[ITERATOR$2]=ArrayValues}if(_e[TO_STRING_TAG]||createNonEnumerableProperty$3(_e,TO_STRING_TAG,et),DOMIterables[et]){for(var tt in ArrayIteratorMethods)if(_e[tt]!==ArrayIteratorMethods[tt])try{createNonEnumerableProperty$3(_e,tt,ArrayIteratorMethods[tt])}catch{_e[tt]=ArrayIteratorMethods[tt]}}}};for(var COLLECTION_NAME in DOMIterables)handlePrototype(global$5[COLLECTION_NAME]&&global$5[COLLECTION_NAME].prototype,COLLECTION_NAME);handlePrototype(DOMTokenListPrototype,"DOMTokenList");var $$b=_export,$findIndex=arrayIteration.findIndex,addToUnscopables$1=addToUnscopables$5,FIND_INDEX="findIndex",SKIPS_HOLES=!0;FIND_INDEX in[]&&Array(1)[FIND_INDEX](function(){SKIPS_HOLES=!1});$$b({target:"Array",proto:!0,forced:SKIPS_HOLES},{findIndex:function _e(et){return $findIndex(this,et,arguments.length>1?arguments[1]:void 0)}});addToUnscopables$1(FIND_INDEX);var TabsDescendantsContext=createDescendantContext("TabsDescendantsContext"),TabPanelDescendantsContext=createDescendantContext("TabPanelDescendantsContext"),[TabsProvider,useTabsCtx]=createContext2("Tabs"),Tabs$1=reactExports.forwardRef(({as:_e="div",children:et,defaultIndex:tt,orientation:nt="horizontal",index:rt=void 0,keyboardActivation:at="auto",onChange:it,readOnly:ot=!1,...st},ct)=>{let{current:ut}=reactExports.useRef(rt!==void 0),dt=useId(st.id||"tabs"),ft=reactExports.useRef(null),pt=reactExports.useRef(!1),[mt,ht]=useControlledState({controlledValue:rt,defaultValue:tt??0,calledFrom:"Tabs"}),[Et,yt]=reactExports.useState(-1),[vt,gt]=useDescendantsInit(),St=reactExports.useCallback(()=>{ft.current&&isFunction(ft.current.focus)&&ft.current.focus()},[]),Rt=reactExports.useCallback(bt=>{it&&it(bt),ht(bt)},[it,ht]),$t=reactExports.useCallback(bt=>{var Tt;let wt=(Tt=vt[bt])==null?void 0:Tt.element,xt=getOwnerDocument(wt);at==="auto"&&(it&&it(bt),ht(bt)),wt&&wt!==xt.activeElement&&isFunction(wt.focus)&&wt.focus()},[at,it,ht,vt]);return reactExports.createElement(DescendantProvider,{context:TabsDescendantsContext,items:vt,set:gt},reactExports.createElement(TabsProvider,{focusedIndex:Et,id:dt,isControlled:ut,isRTL:pt,keyboardActivation:at,onFocusPanel:St,onSelectTab:ot?noop$2:Rt,onSelectTabWithKeyboard:ot?noop$2:$t,orientation:nt,selectedIndex:mt,selectedPanelRef:ft,setFocusedIndex:yt,setSelectedIndex:ht},reactExports.createElement(_e,{...st,ref:ct,"data-reach-tabs":"","data-orientation":nt,id:st.id},isFunction(et)?et({focusedIndex:Et,id:dt,selectedIndex:mt}):et)))});Tabs$1.displayName="Tabs";var TabListImpl=reactExports.forwardRef(({children:_e,as:et="div",onKeyDown:tt,...nt},rt)=>{let{focusedIndex:at,isControlled:it,isRTL:ot,keyboardActivation:st,onSelectTabWithKeyboard:ct,orientation:ut,selectedIndex:dt,setSelectedIndex:ft}=useTabsCtx("TabList"),pt=useDescendants(TabsDescendantsContext),mt=reactExports.useRef(null),ht=useComposedRefs(rt,mt);reactExports.useEffect(()=>{mt.current&&(mt.current.ownerDocument&&mt.current.ownerDocument.dir==="rtl"||getComputedStyle$2(mt.current,"direction")==="rtl")&&(ot.current=!0)},[ot]);let Et=composeEventHandlers(tt,useDescendantKeyDown(TabsDescendantsContext,{currentIndex:st==="manual"?at:dt,orientation:ut,rotate:!0,callback:ct,filter:yt=>!yt.disabled,rtl:ot.current}));return useIsomorphicLayoutEffect(()=>{var yt;if(!it&&boolOrBoolString((yt=pt[dt])==null?void 0:yt.disabled)){let vt=pt.find(gt=>!gt.disabled);vt&&ft(vt.index)}},[pt,it,dt,ft]),reactExports.createElement(et,{role:"tablist","aria-orientation":ut,...nt,"data-reach-tab-list":"",ref:ht,onKeyDown:Et},_e)});TabListImpl.displayName="TabList";var TabList=reactExports.memo(TabListImpl);TabList.displayName="TabList";var Tab=reactExports.forwardRef(({isSelected:_e,children:et,as:tt="button",index:nt,disabled:rt,onBlur:at,onFocus:it,...ot},st)=>{let{id:ct,onSelectTab:ut,orientation:dt,selectedIndex:ft,setFocusedIndex:pt}=useTabsCtx("Tab"),mt=reactExports.useRef(null),[ht,Et]=useStatefulRefValue(mt,null),yt=useComposedRefs(st,Et),vt=reactExports.useMemo(()=>({element:ht,disabled:!!rt}),[rt,ht]),gt=useDescendant(vt,TabsDescendantsContext,nt),St=tt==="button"&&ot.type==null?"button":ot.type,Rt=gt===ft;function $t(){ut(gt)}return reactExports.createElement(tt,{"aria-controls":makeId(ct,"panel",gt),"aria-disabled":rt,"aria-selected":Rt,role:"tab",tabIndex:Rt?0:-1,...ot,ref:yt,"data-reach-tab":"","data-orientation":dt,"data-selected":Rt?"":void 0,disabled:rt,id:makeId(ct,"tab",gt),onClick:$t,onFocus:composeEventHandlers(it,()=>{pt(gt)}),onBlur:composeEventHandlers(at,()=>{pt(-1)}),type:St},et)});Tab.displayName="Tab";var TabPanelsImpl=reactExports.forwardRef(({children:_e,as:et="div",...tt},nt)=>{let rt=reactExports.useRef(),at=useComposedRefs(rt,nt),[it,ot]=useDescendantsInit();return reactExports.createElement(DescendantProvider,{context:TabPanelDescendantsContext,items:it,set:ot},reactExports.createElement(et,{...tt,ref:at,"data-reach-tab-panels":""},_e))});TabPanelsImpl.displayName="TabPanels";var TabPanels=reactExports.memo(TabPanelsImpl);TabPanels.displayName="TabPanels";var TabPanel=reactExports.forwardRef(({children:_e,"aria-label":et,as:tt="div",index:nt,...rt},at)=>{let{selectedPanelRef:it,selectedIndex:ot,id:st}=useTabsCtx("TabPanel"),ct=reactExports.useRef(null),[ut,dt]=useStatefulRefValue(ct,null),ft=reactExports.useMemo(()=>({element:ut}),[ut]),pt=useDescendant(ft,TabPanelDescendantsContext,nt),mt=makeId(st,"panel",pt),ht=pt===ot,Et=reactExports.useRef(!1),yt=Et.current?!ht:!1;reactExports.useEffect(()=>{Et.current=!0},[]);let vt=useComposedRefs(at,dt,ht?it:null);return reactExports.createElement(tt,{"aria-labelledby":makeId(st,"tab",pt),hidden:yt,role:"tabpanel",tabIndex:ht?0:-1,...rt,ref:vt,"data-reach-tab-panel":"",id:mt},_e)});TabPanel.displayName="TabPanel";function useTabsContext(){let{focusedIndex:_e,id:et,selectedIndex:tt}=useTabsCtx("useTabsContext");return reactExports.useMemo(()=>({focusedIndex:_e,id:et,selectedIndex:tt}),[_e,et,tt])}function boolOrBoolString(_e){return _e==="true"?!0:isBoolean(_e)?_e:!1}const tabs="";var _excluded$e=["children"],_excluded2=["index"],HORIZONTAL_PADDING=8,AnimatedContext=React$3.createContext(null),AnimatedTabs=function _e(et){var tt=et.children,nt=_objectWithoutProperties(et,_excluded$e),rt=React$3.useState(null),at=_slicedToArray$4(rt,2),it=at[0],ot=at[1],st=React$3.useRef(),ct=useRect(st),ut=(it&&it.bottom)-(ct&&ct.top),dt=it&&it.width-HORIZONTAL_PADDING*2,ft=(it&&it.left)-(ct&&ct.left)+HORIZONTAL_PADDING;return _createRawReactElement(AnimatedContext.Provider,{value:ot},void 0,React$3.createElement(Tabs$1,_extends$4({},nt,{ref:st}),_createRawReactElement("div",{className:"absolute h-[3px] w-full bg-primary-200 dark:bg-gray-800",style:{top:ut}}),_createRawReactElement("div",{className:clsx("absolute h-[3px] bg-primary-500 transition-all duration-200",{hidden:ut<=0}),style:{left:ft,top:ut,width:dt}}),tt))},AnimatedTab=function _e(et){var tt=et.index,nt=_objectWithoutProperties(et,_excluded2),rt=useTabsContext(),at=rt.selectedIndex,it=at===tt,ot=React$3.useRef(),st=useRect(ot,{observe:it}),ct=React$3.useContext(AnimatedContext);return React$3.useLayoutEffect(function(){it&&ct(st)},[it,st,ct]),React$3.createElement(Tab,_extends$4({ref:ot},nt))},Tabs=function _e(et){var tt=et.items,nt=et.activeItem,rt=tt.findIndex(function(st){var ct=st.name;return ct===nt}),at=useHistory(),it=function(ct){var ut=tt[ct];typeof ut.action=="function"?ut.action():ut.to&&at.push(ut.to)},ot=function(ct,ut){var dt=ct.name,ft=ct.text,pt=ct.title,mt=ct.count;return _createRawReactElement(AnimatedTab,{as:"button",role:"button",title:pt,index:ut},dt,_createRawReactElement("div",{className:"relative"},void 0,mt?_createRawReactElement("span",{className:"absolute left-full ml-2"},void 0,_createRawReactElement(Counter,{count:mt})):null,ft))};return _createRawReactElement(AnimatedTabs,{onChange:it,defaultIndex:rt},void 0,_createRawReactElement(TabList,{},void 0,tt.map(function(st,ct){return ot(st,ct)})))},PROPER_FUNCTION_NAME=functionName.PROPER,fails$9=fails$F,whitespaces=whitespaces$2,non="​…᠎",stringTrimForced=function(_e){return fails$9(function(){return!!whitespaces[_e]()||non[_e]()!==non||PROPER_FUNCTION_NAME&&whitespaces[_e].name!==_e})},$$a=_export,$trim=stringTrim.trim,forcedStringTrimMethod=stringTrimForced;$$a({target:"String",proto:!0,forced:forcedStringTrimMethod("trim")},{trim:function _e(){return $trim(this)}});var _excluded$d=["isCodeEditor","hasError","isResizeable","onChange","autoGrow","maxRows","minRows","theme","maxLength","value"],Textarea=React$3.forwardRef(function(_e,et){var tt=_e.isCodeEditor,nt=tt===void 0?!1:tt,rt=_e.hasError,at=rt===void 0?!1:rt,it=_e.isResizeable,ot=it===void 0?!0:it,st=_e.onChange,ct=_e.autoGrow,ut=ct===void 0?!1:ct,dt=_e.maxRows,ft=dt===void 0?10:dt,pt=_e.minRows,mt=pt===void 0?1:pt,ht=_e.theme,Et=ht===void 0?"default":ht,yt=_e.maxLength,vt=_e.value,gt=_objectWithoutProperties(_e,_excluded$d),St=(vt==null?void 0:vt.length)||0,Rt=reactExports.useState(ut?1:4),$t=_slicedToArray$4(Rt,2),bt=$t[0],wt=$t[1],xt=function(Ct){if(ut){var Nt=20,At=Ct.target.rows;Ct.target.rows=mt;var kt=~~(Ct.target.scrollHeight/Nt);kt===At&&(Ct.target.rows=kt),kt>=ft&&(Ct.target.rows=ft,Ct.target.scrollTop=Ct.target.scrollHeight),wt(kt"u"?"normal":"medium"},void 0,renderText(nt))),dt()),_createRawReactElement("div",{className:"flex shrink-0 pt-0.5"},void 0,_createRawReactElement("button",{type:"button",className:"inline-flex rounded-md text-gray-600 hover:text-gray-700 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:text-gray-600 dark:hover:text-gray-500",onClick:ct,"data-testid":"toast-dismiss"},void 0,_createRawReactElement("span",{className:"sr-only"},void 0,"Close"),_createRawReactElement(Icon$1,{src:vitePluginRequire_1697864655763_93677134,className:"h-5 w-5"})))),st?_createRawReactElement(Text$2,{theme:"muted",size:"sm"},void 0,st):null))},Toggle=function _e(et){var tt=et.id,nt=et.size,rt=nt===void 0?"md":nt,at=et.name,it=et.checked,ot=it===void 0?!1:it,st=et.onChange,ct=et.required,ut=et.disabled,dt=reactExports.useRef(null),ft=function(){var mt,ht;(mt=dt.current)===null||mt===void 0||mt.focus(),(ht=dt.current)===null||ht===void 0||ht.click()};return _createRawReactElement("button",{className:clsx("flex-none rounded-full focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:ring-gray-800 dark:ring-offset-0 dark:focus:ring-primary-500",{"bg-gray-500":!ot&&!ut,"bg-primary-600":ot&&!ut,"bg-gray-200":!ot&&ut,"bg-primary-200":ot&&ut,"w-9 p-0.5":rt==="sm","w-11 p-0.5":rt==="md","cursor-default":ut}),onClick:ft,type:"button"},void 0,_createRawReactElement("div",{className:clsx("rounded-full bg-white transition-transform",{"h-4.5 w-4.5":rt==="sm","translate-x-3.5":rt==="sm"&&ot,"h-6 w-6":rt==="md","translate-x-4":rt==="md"&&ot})}),React$3.createElement("input",{id:tt,ref:dt,name:at,type:"checkbox",className:"sr-only",checked:ot,onChange:st,required:ct,disabled:ut,tabIndex:-1}))};function baseSlice$1(_e,et,tt){var nt=-1,rt=_e.length;et<0&&(et=-et>rt?0:rt+et),tt=tt>rt?rt:tt,tt<0&&(tt+=rt),rt=et>tt?0:tt-et>>>0,et>>>=0;for(var at=Array(rt);++nt=nt?_e:baseSlice(_e,et,tt)}var _castSlice=castSlice$3,rsAstralRange$2="\\ud800-\\udfff",rsComboMarksRange$3="\\u0300-\\u036f",reComboHalfMarksRange$3="\\ufe20-\\ufe2f",rsComboSymbolsRange$3="\\u20d0-\\u20ff",rsComboRange$3=rsComboMarksRange$3+reComboHalfMarksRange$3+rsComboSymbolsRange$3,rsVarRange$2="\\ufe0e\\ufe0f",rsZWJ$2="\\u200d",reHasUnicode=RegExp("["+rsZWJ$2+rsAstralRange$2+rsComboRange$3+rsVarRange$2+"]");function hasUnicode$2(_e){return reHasUnicode.test(_e)}var _hasUnicode=hasUnicode$2;function asciiToArray$1(_e){return _e.split("")}var _asciiToArray=asciiToArray$1,rsAstralRange$1="\\ud800-\\udfff",rsComboMarksRange$2="\\u0300-\\u036f",reComboHalfMarksRange$2="\\ufe20-\\ufe2f",rsComboSymbolsRange$2="\\u20d0-\\u20ff",rsComboRange$2=rsComboMarksRange$2+reComboHalfMarksRange$2+rsComboSymbolsRange$2,rsVarRange$1="\\ufe0e\\ufe0f",rsAstral="["+rsAstralRange$1+"]",rsCombo$2="["+rsComboRange$2+"]",rsFitz$1="\\ud83c[\\udffb-\\udfff]",rsModifier$1="(?:"+rsCombo$2+"|"+rsFitz$1+")",rsNonAstral$1="[^"+rsAstralRange$1+"]",rsRegional$1="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair$1="[\\ud800-\\udbff][\\udc00-\\udfff]",rsZWJ$1="\\u200d",reOptMod$1=rsModifier$1+"?",rsOptVar$1="["+rsVarRange$1+"]?",rsOptJoin$1="(?:"+rsZWJ$1+"(?:"+[rsNonAstral$1,rsRegional$1,rsSurrPair$1].join("|")+")"+rsOptVar$1+reOptMod$1+")*",rsSeq$1=rsOptVar$1+reOptMod$1+rsOptJoin$1,rsSymbol="(?:"+[rsNonAstral$1+rsCombo$2+"?",rsCombo$2,rsRegional$1,rsSurrPair$1,rsAstral].join("|")+")",reUnicode=RegExp(rsFitz$1+"(?="+rsFitz$1+")|"+rsSymbol+rsSeq$1,"g");function unicodeToArray$1(_e){return _e.match(reUnicode)||[]}var _unicodeToArray=unicodeToArray$1,asciiToArray=_asciiToArray,hasUnicode$1=_hasUnicode,unicodeToArray=_unicodeToArray;function stringToArray$3(_e){return hasUnicode$1(_e)?unicodeToArray(_e):asciiToArray(_e)}var _stringToArray=stringToArray$3,castSlice$2=_castSlice,hasUnicode=_hasUnicode,stringToArray$2=_stringToArray,toString$9=toString_1;function createCaseFirst$1(_e){return function(et){et=toString$9(et);var tt=hasUnicode(et)?stringToArray$2(et):void 0,nt=tt?tt[0]:et.charAt(0),rt=tt?castSlice$2(tt,1).join(""):et.slice(1);return nt[_e]()+rt}}var _createCaseFirst=createCaseFirst$1,createCaseFirst=_createCaseFirst,upperFirst$2=createCaseFirst("toUpperCase"),upperFirst_1=upperFirst$2,toString$8=toString_1,upperFirst$1=upperFirst_1;function capitalize$4(_e){return upperFirst$1(toString$8(_e).toLowerCase())}var capitalize_1=capitalize$4;function arrayReduce$2(_e,et,tt,nt){var rt=-1,at=_e==null?0:_e.length;for(nt&&at&&(tt=_e[++rt]);++rt_e.reduce((et,tt,nt)=>et+tt+(nt===_e.length-2?" and ":", "),"").slice(0,-2),buildErrorMessage=_e=>{const et=Object.keys(_e).map(tt=>`${startCase$1(camelCase$2(tt))} ${toSentence(_e[tt])}`);return toSentence(et)},httpErrorMessages=[{code:100,name:"Continue",description:"The server has received the request headers, and the client should proceed to send the request body"},{code:101,name:"Switching Protocols",description:"The requester has asked the server to switch protocols"},{code:103,name:"Checkpoint",description:"Used in the resumable requests proposal to resume aborted PUT or POST requests"},{code:200,name:"OK",description:"The request is OK (this is the standard response for successful HTTP requests)"},{code:201,name:"Created",description:"The request has been fulfilled"},{code:202,name:"Accepted",description:"The request has been accepted for processing"},{code:203,name:"Non-Authoritative Information",description:"The request has been successfully processed"},{code:204,name:"No Content",description:"The request has been successfully processed"},{code:205,name:"Reset Content",description:"The request has been successfully processed"},{code:206,name:"Partial Content",description:"The server is delivering only part of the resource due to a range header sent by the client"},{code:400,name:"Bad Request",description:"The request cannot be fulfilled due to bad syntax"},{code:401,name:"Unauthorized",description:"The request was a legal request"},{code:402,name:"Payment Required",description:"Reserved for future use"},{code:403,name:"Forbidden",description:"The request was a legal request"},{code:404,name:"Not Found",description:"The requested page could not be found but may be available again in the future"},{code:405,name:"Method Not Allowed",description:"A request was made of a page using a request method not supported by that page"},{code:406,name:"Not Acceptable",description:"The server can only generate a response that is not accepted by the client"},{code:407,name:"Proxy Authentication Required",description:"The client must first authenticate itself with the proxy"},{code:408,name:"Request",description:" Timeout The server timed out waiting for the request"},{code:409,name:"Conflict",description:"The request could not be completed because of a conflict in the request"},{code:410,name:"Gone",description:"The requested page is no longer available"},{code:411,name:"Length Required",description:'The "Content-Length" is not defined. The server will not accept the request without it'},{code:412,name:"Precondition",description:" Failed. The precondition given in the request evaluated to false by the server"},{code:413,name:"Request Entity Too Large",description:"The server will not accept the request"},{code:414,name:"Request-URI Too Long",description:"The server will not accept the request"},{code:415,name:"Unsupported Media Type",description:"The server will not accept the request"},{code:416,name:"Requested Range Not Satisfiable",description:"The client has asked for a portion of the file"},{code:417,name:"Expectation Failed",description:"The server cannot meet the requirements of the Expect request-header field"},{code:500,name:"Internal Server Error",description:"An unexpected error occurred"},{code:501,name:"Not Implemented",description:"The server either does not recognize the request method"},{code:502,name:"Bad Gateway",description:"The server was acting as a gateway or proxy and received an invalid response from the upstream server"},{code:503,name:"Service Unavailable",description:"The server is currently unavailable (overloaded or down)"},{code:504,name:"Gateway Timeout",description:"The server was acting as a gateway or proxy and did not receive a timely response from the upstream server"},{code:505,name:"HTTP Version Not Supported",description:"The server does not support the HTTP protocol version used in the request"},{code:511,name:"Network Authentication Required",description:"The client needs to auth"}];var DEFAULT_DURATION=4e3,createToast=function _e(et,tt,nt){var rt=(nt==null?void 0:nt.duration)||DEFAULT_DURATION;_t.custom(function(at){return React$3.createElement(Toast,_extends$4({t:at,message:tt,type:et},nt))},{duration:rt})};function info(_e,et){createToast("info",_e,et)}function success(_e,et){createToast("success",_e,et)}function error(_e,et){createToast("error",_e,et)}var messages$13={unexpectedMessage:{id:"alert.unexpected.message",defaultMessage:"An unexpected error occurred."}};function showAlertForError(_e){if(_e!=null&&_e.response){var et=_e.response,tt=et.data,nt=et.status,rt=et.statusText;if(nt===502)return error("The server is down");if(nt===404||nt===410)return null;var at=rt;if(tt!=null&&tt.error&&(at=tt.error),!at){var it;at=(it=httpErrorMessages.find(function(ot){return ot.code===nt}))===null||it===void 0?void 0:it.description}if(at)return error(at)}else return console.error(_e),error(messages$13.unexpectedMessage)}const toast={info,success,error,showAlertForError},sourceCode={name:"ghostbox",displayName:"Ghostbox",url:"https://github.com/null2264/ghostbox",repository:"null2264/ghostbox",version:"2023.10.4-57f7ffe",homepage:"https://fedi.aap.my.id",ref:"develop"},getInstanceScopes=_e=>{switch(parseVersion(_e.version).software){case PLEROMA:case AKKOMA:return"read write follow push admin";default:return"read write follow push"}},getScopes=_e=>getInstanceScopes(_e.instance),SWITCH_ACCOUNT="SWITCH_ACCOUNT",AUTH_APP_CREATED="AUTH_APP_CREATED",AUTH_APP_AUTHORIZED="AUTH_APP_AUTHORIZED",AUTH_LOGGED_IN="AUTH_LOGGED_IN",AUTH_LOGGED_OUT="AUTH_LOGGED_OUT",VERIFY_CREDENTIALS_REQUEST="VERIFY_CREDENTIALS_REQUEST",VERIFY_CREDENTIALS_SUCCESS="VERIFY_CREDENTIALS_SUCCESS",VERIFY_CREDENTIALS_FAIL="VERIFY_CREDENTIALS_FAIL",AUTH_ACCOUNT_REMEMBER_REQUEST="AUTH_ACCOUNT_REMEMBER_REQUEST",AUTH_ACCOUNT_REMEMBER_SUCCESS="AUTH_ACCOUNT_REMEMBER_SUCCESS",AUTH_ACCOUNT_REMEMBER_FAIL="AUTH_ACCOUNT_REMEMBER_FAIL",customApp=custom$1("app"),messages$12={loggedOut:{id:"auth.logged_out",defaultMessage:"Logged out."},awaitingApproval:{id:"auth.awaiting_approval",defaultMessage:"Your account is awaiting approval"},invalidCredentials:{id:"auth.invalid_credentials",defaultMessage:"Wrong username or password"}},noOp$7=()=>new Promise(_e=>_e(void 0)),createAppAndToken=()=>_e=>_e(getAuthApp()).then(()=>_e(createAppToken())),getAuthApp=()=>_e=>customApp!=null&&customApp.client_secret?noOp$7().then(()=>_e({type:AUTH_APP_CREATED,app:customApp})):_e(createAuthApp()),createAuthApp=()=>(_e,et)=>{const tt={client_name:sourceCode.displayName,redirect_uris:"urn:ietf:wg:oauth:2.0:oob",scopes:getScopes(et()),website:sourceCode.homepage};return _e(createApp(tt)).then(nt=>_e({type:AUTH_APP_CREATED,app:nt}))},createAppToken=()=>(_e,et)=>{const tt=et().auth.app,nt={client_id:tt.client_id,client_secret:tt.client_secret,redirect_uri:"urn:ietf:wg:oauth:2.0:oob",grant_type:"client_credentials",scope:getScopes(et())};return _e(obtainOAuthToken(nt)).then(rt=>_e({type:AUTH_APP_AUTHORIZED,app:tt,token:rt}))},createUserToken=(_e,et)=>(tt,nt)=>{const rt=nt().auth.app,at={client_id:rt.client_id,client_secret:rt.client_secret,redirect_uri:"urn:ietf:wg:oauth:2.0:oob",grant_type:"password",username:_e,password:et,scope:getScopes(nt())};return tt(obtainOAuthToken(at)).then(it=>tt(authLoggedIn(it)))},otpVerify=(_e,et)=>(tt,nt)=>{const rt=nt().auth.app;return api(nt,"app").post("/oauth/mfa/challenge",{client_id:rt.client_id,client_secret:rt.client_secret,mfa_token:et,code:_e,challenge_type:"totp",redirect_uri:"urn:ietf:wg:oauth:2.0:oob",scope:getScopes(nt())}).then(({data:at})=>tt(authLoggedIn(at)))},verifyCredentials=(_e,et)=>{const tt=parseBaseURL(et);return(nt,rt)=>(nt({type:VERIFY_CREDENTIALS_REQUEST,token:_e}),baseClient(_e,tt).get("/api/v1/accounts/verify_credentials").then(({data:at})=>(nt(importFetchedAccount$1(at)),nt({type:VERIFY_CREDENTIALS_SUCCESS,token:_e,account:at}),at.id===rt().me&&nt(fetchMeSuccess(at)),at)).catch(at=>{var it,ot,st;if(((it=at==null?void 0:at.response)==null?void 0:it.status)===403&&((st=(ot=at==null?void 0:at.response)==null?void 0:ot.data)!=null&&st.id)){const ct=at.response.data;return nt(importFetchedAccount$1(ct)),nt({type:VERIFY_CREDENTIALS_SUCCESS,token:_e,account:ct}),ct.id===rt().me&&nt(fetchMeSuccess(ct)),ct}else throw rt().me===null&&nt(fetchMeFail(at)),nt({type:VERIFY_CREDENTIALS_FAIL,token:_e,error:at}),at}))},rememberAuthAccount=_e=>(et,tt)=>(et({type:AUTH_ACCOUNT_REMEMBER_REQUEST,accountUrl:_e}),KVStore.getItemOrError(`authAccount:${_e}`).then(nt=>(et(importFetchedAccount$1(nt)),et({type:AUTH_ACCOUNT_REMEMBER_SUCCESS,account:nt,accountUrl:_e}),nt.id===tt().me&&et(fetchMeSuccess(nt)),nt)).catch(nt=>{et({type:AUTH_ACCOUNT_REMEMBER_FAIL,error:nt,accountUrl:_e,skipAlert:!0})})),loadCredentials=(_e,et)=>tt=>tt(rememberAuthAccount(et)).finally(()=>tt(verifyCredentials(_e,et))),logIn=(_e,et)=>tt=>tt(getAuthApp()).then(()=>tt(createUserToken(normalizeUsername(_e),et))).catch(nt=>{var rt,at,it,ot;throw((at=(rt=nt.response)==null?void 0:rt.data)==null?void 0:at.error)==="mfa_required"||(((ot=(it=nt.response)==null?void 0:it.data)==null?void 0:ot.identifier)==="awaiting_approval"?toast.error(messages$12.awaitingApproval):toast.error(messages$12.invalidCredentials)),nt}),logOut$1=()=>(_e,et)=>{const tt=et(),nt=getLoggedInAccount(tt),rt=isStandalone(tt);if(!nt)return _e(noOp$7);const at={client_id:tt.auth.app.client_id,client_secret:tt.auth.app.client_secret,token:tt.auth.users.get(nt.url).access_token};return _e(revokeOAuthToken(at)).finally(()=>{queryClient.invalidateQueries(),queryClient.clear(),_e({type:AUTH_LOGGED_OUT,account:nt,standalone:rt}),toast.success(messages$12.loggedOut)})},switchAccount=(_e,et=!1)=>(tt,nt)=>{const rt=selectAccount(nt(),_e);return queryClient.invalidateQueries(),queryClient.clear(),tt({type:SWITCH_ACCOUNT,account:rt,background:et})},fetchOwnAccounts=()=>(_e,et)=>{const tt=et();return tt.auth.users.forEach(nt=>{selectAccount(tt,nt.id)||_e(verifyCredentials(nt.access_token,nt.url)).catch(()=>console.warn(`Failed to load account: ${nt.url}`))})},register$1=_e=>et=>(_e.fullname=_e.username,et(createAppAndToken()).then(()=>et(createAccount$1(_e))).then(({token:tt})=>(et(startOnboarding()),et(authLoggedIn(tt))))),fetchCaptcha=()=>(_e,et)=>api(et).get("/api/v1/pleroma/captcha"),authLoggedIn=_e=>et=>(et({type:AUTH_LOGGED_IN,token:_e}),_e),ME_FETCH_REQUEST="ME_FETCH_REQUEST",ME_FETCH_SUCCESS="ME_FETCH_SUCCESS",ME_FETCH_FAIL="ME_FETCH_FAIL",ME_FETCH_SKIP="ME_FETCH_SKIP",ME_PATCH_REQUEST="ME_PATCH_REQUEST",ME_PATCH_SUCCESS="ME_PATCH_SUCCESS",ME_PATCH_FAIL="ME_PATCH_FAIL",noOp$6=()=>new Promise(_e=>_e(void 0)),getMeId=_e=>_e.me||getAuthUserId(_e),getMeUrl$1=_e=>{var tt;const et=getMeId(_e);if(et)return((tt=selectAccount(_e,et))==null?void 0:tt.url)||getAuthUserUrl(_e)},getMeToken=_e=>{var tt;const et=getMeUrl$1(_e)||_e.auth.me;return(tt=_e.auth.users.get(et))==null?void 0:tt.access_token},fetchMe=()=>(_e,et)=>{const tt=et(),nt=getMeToken(tt),rt=getMeUrl$1(tt);return nt?(_e(fetchMeRequest()),_e(loadCredentials(nt,rt)).catch(at=>_e(fetchMeFail(at)))):(_e({type:ME_FETCH_SKIP}),noOp$6())},persistAuthAccount$1=(_e,et)=>{_e&&_e.url&&(_e.pleroma||(_e.pleroma={}),_e.pleroma.settings_store||(_e.pleroma.settings_store=et.pleroma_settings_store||{}),KVStore.setItem(`authAccount:${_e.url}`,_e).catch(console.error))},patchMe=(_e,et=!1)=>(tt,nt)=>{tt(patchMeRequest());const rt=et?{"Content-Type":"multipart/form-data"}:{};return api(nt).patch("/api/v1/accounts/update_credentials",_e,{headers:rt}).then(at=>{persistAuthAccount$1(at.data,_e),tt(patchMeSuccess(at.data))}).catch(at=>{throw tt(patchMeFail(at)),at})},fetchMeRequest=()=>({type:ME_FETCH_REQUEST}),fetchMeSuccess=_e=>({type:ME_FETCH_SUCCESS,me:_e}),fetchMeFail=_e=>({type:ME_FETCH_FAIL,error:_e,skipAlert:!0}),patchMeRequest=()=>({type:ME_PATCH_REQUEST}),patchMeSuccess=_e=>et=>{const tt={type:ME_PATCH_SUCCESS,me:_e};et(importFetchedAccount$1(_e)),et(tt)},patchMeFail=_e=>({type:ME_PATCH_FAIL,error:_e,skipAlert:!0}),SETTING_CHANGE="SETTING_CHANGE",SETTING_SAVE="SETTING_SAVE",SETTINGS_UPDATE="SETTINGS_UPDATE",FE_NAME="soapbox_fe",saveSuccessMessage={id:"settings.save.success",defaultMessage:"Your preferences have been saved!"},defaultSettings=Map$3({onboarded:!1,skinTone:1,reduceMotion:!1,underlineLinks:!1,autoPlayGif:!0,expandSpoilers:!1,showSensitiveMedia:!1,unfollowModal:!1,boostModal:!1,deleteModal:!0,missingDescriptionModal:!1,defaultPrivacy:"public",defaultContentType:"text/plain",themeMode:"system",locale:navigator.language||"en",showExplanationBox:!0,explanationBox:!0,autoloadTimelines:!0,autoloadMore:!0,preserveSpoilers:!1,systemFont:!1,demetricator:!1,isDeveloper:!1,chats:Map$3({panes:List$1(),mainWindow:"minimized",sound:!0}),home:Map$3({shows:Map$3({reblog:!0,reply:!0,direct:!1}),regex:Map$3({body:""})}),notifications:Map$3({alerts:Map$3({follow:!0,follow_request:!1,favourite:!0,reblog:!0,mention:!0,poll:!0,move:!0,"pleroma:emoji_reaction":!0}),quickFilter:Map$3({active:"all",show:!0,advanced:!1}),shows:Map$3({follow:!0,follow_request:!0,favourite:!0,reblog:!0,mention:!0,poll:!0,move:!0,"pleroma:emoji_reaction":!0}),sounds:Map$3({follow:!1,follow_request:!1,favourite:!1,reblog:!1,mention:!1,poll:!1,move:!1,"pleroma:emoji_reaction":!1}),birthdays:Map$3({show:!0})}),community:Map$3({shows:Map$3({reblog:!1,reply:!0,direct:!1}),other:Map$3({onlyMedia:!1}),regex:Map$3({body:""})}),public:Map$3({shows:Map$3({reblog:!0,reply:!0,direct:!1}),other:Map$3({onlyMedia:!1}),regex:Map$3({body:""})}),direct:Map$3({regex:Map$3({body:""})}),account_timeline:Map$3({shows:Map$3({reblog:!0,pinned:!0,direct:!1})}),groups:Map$3({}),trends:Map$3({show:!0}),columns:List$1([Map$3({id:"COMPOSE",uuid:v4(),params:{}}),Map$3({id:"HOME",uuid:v4(),params:{}}),Map$3({id:"NOTIFICATIONS",uuid:v4(),params:{}})]),remote_timeline:Map$3({pinnedHosts:OrderedSet()})}),getSettings=createSelector([_e=>_e.soapbox.get("defaultSettings"),_e=>_e.settings],(_e,et)=>defaultSettings.mergeDeep(_e).mergeDeep(et)),changeSettingImmediate=(_e,et,tt)=>nt=>{nt({type:SETTING_CHANGE,path:_e,value:et}),nt(saveSettingsImmediate(tt))},changeSetting=(_e,et,tt)=>nt=>(nt({type:SETTING_CHANGE,path:_e,value:et}),nt(saveSettings(tt))),saveSettingsImmediate=_e=>(et,tt)=>{if(!isLoggedIn(tt))return;const nt=tt();if(getSettings(nt).getIn(["saved"]))return;const rt=nt.settings.delete("saved").toJS();et(patchMe({pleroma_settings_store:{[FE_NAME]:rt}})).then(()=>{et({type:SETTING_SAVE}),_e!=null&&_e.showAlert&&toast.success(saveSuccessMessage)}).catch(at=>{toast.showAlertForError(at)})},saveSettings=_e=>et=>et(saveSettingsImmediate(_e)),getLocale=(_e,et="en")=>{const tt=getSettings(_e).get("locale").replace("_","-"),nt=tt.split("-")[0];return Object.keys(messages$1a).includes(tt)?tt:Object.keys(messages$1a).includes(nt)?nt:et},getDomainFromURL=_e=>{try{const et=_e.url;return new URL(et).host}catch{return""}},getDomain=_e=>{const et=_e.acct.split("@")[1];return et||getDomainFromURL(_e)},getBaseURL=_e=>{try{return new URL(_e.url).origin}catch{return""}},getAcct=(_e,et)=>et===!0?_e.fqn:_e.acct,isLocal=_e=>_e.acct.split("@")[1]===void 0,isRemote=_e=>!isLocal(_e),DEFAULT_HEADERS=["/headers/original/missing.png","/images/banner.png",vitePluginRequire_1697864661787_6416804],isDefaultHeader=_e=>DEFAULT_HEADERS.some(et=>_e.endsWith(et)),DEFAULT_AVATARS=["/avatars/original/missing.png","/images/avi.png",vitePluginRequire_1697864661787_95587196],isDefaultAvatar=_e=>DEFAULT_AVATARS.some(et=>_e.endsWith(et));function baseFindIndex$1(_e,et,tt,nt){for(var rt=_e.length,at=tt+(nt?1:-1);nt?at--:++at-1;);return tt}var _charsStartIndex=charsStartIndex$2,baseToString$1=_baseToString,castSlice$1=_castSlice,charsStartIndex$1=_charsStartIndex,stringToArray$1=_stringToArray,toString$5=toString_1,reTrimStart=/^\s+/;function trimStart(_e,et,tt){if(_e=toString$5(_e),_e&&(tt||et===void 0))return _e.replace(reTrimStart,"");if(!_e||!(et=baseToString$1(et)))return _e;var nt=stringToArray$1(_e),rt=charsStartIndex$1(nt,stringToArray$1(et));return castSlice$1(nt,rt).join("")}var trimStart_1=trimStart;const trimStart$1=getDefaultExportFromCjs$1(trimStart_1),isSuperset=(_e,et)=>{if(_e.isSuperset!==void 0)return _e.isSuperset(et);for(const tt in et)if(!Object.prototype.hasOwnProperty.call(_e,tt)||_e[tt]!==et.get(tt))return!1;return!0},tuple=(_e,et)=>({tuple:[_e,et]}),getQuirks=createSelector([_e=>parseVersion(_e.version)],_e=>({invertedPagination:any([_e.software===PLEROMA,_e.software===AKKOMA]),mrfWithReason:any([_e.software===PLEROMA&>e$1(_e.compatVersion,"2.5.0"),_e.software===AKKOMA]),noApps:_e.software===MITRA,noOAuthForm:_e.software===MITRA})),find$1=(_e,et,tt)=>_e.find(nt=>isSuperset(nt,Map$3({group:et,key:tt}))),toSimplePolicy=_e=>{const et=find$1(_e,":pleroma",":mrf_simple"),tt=(nt,rt)=>{const at=rt.getIn(["tuple",0]),it=rt.getIn(["tuple",1]);let ot;return typeof it=="boolean"?ot=it:ot=Set$3(it.map(st=>Set$3(typeof st=="string"?[st,"No reason"]:st.get("tuple")))),nt.set(trimStart$1(at,":"),ot)};if(et!=null&&et.get){const rt=et.get("value",List$1()).reduce(tt,Map$3());return mrfSimpleSchema.parse(rt.toJS())}else return mrfSimpleSchema.parse({})},fromSimplePolicy=(_e,et)=>{const tt=getQuirks(et().instance),nt=Object.entries(_e).map(([rt,at])=>{const it=[`:${rt}`,at];if(typeof at=="boolean")return fromJS(tuple(it[0],it[1]));if(tt.mrfWithReason){const ot=at.map(st=>fromJS(typeof st=="string"?tuple(st,"No reason"):tuple(st[0],st[1])));it[1]=ot}return fromJS(tuple(it[0],it[1]))});return List$1([Map$3({group:":pleroma",key:":mrf_simple",value:nt})])},ConfigDB={find:find$1,toSimplePolicy,fromSimplePolicy},normalizeId=_e=>typeof _e=="string"?_e:"";function selectAccount(_e,et){var tt;return(tt=_e.entities[Entities.ACCOUNTS])==null?void 0:tt.store[et]}function selectOwnAccount(_e){if(_e.me)return selectAccount(_e,_e.me)}const accountIdsToAccts=(_e,et)=>et.map(tt=>selectAccount(_e,tt).acct),getAccountBase=(_e,et)=>{var tt;return(tt=_e.entities[Entities.ACCOUNTS])==null?void 0:tt.store[et]},getAccountRelationship=(_e,et)=>_e.relationships.get(et),makeGetAccount=()=>createSelector([getAccountBase,getAccountRelationship],(_e,et)=>_e?{..._e,relationship:et}:null),toServerSideType=_e=>{switch(_e){case"home":case"notifications":case"public":case"thread":return _e;default:return _e.includes("list:")?"home":"public"}},getFilters=(_e,et)=>_e.filters.filter(tt=>(!(et!=null&&et.contextType)||tt.context.includes(toServerSideType(et.contextType)))&&(tt.expires_at===null||Date.parse(tt.expires_at)>new Date().getTime())),escapeRegExp=_e=>_e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),regexFromFilters=_e=>_e.size===0?null:new RegExp(_e.map(et=>et.keywords.map(tt=>{let nt=escapeRegExp(tt.keyword);return tt.whole_word&&(/^[\w]/.test(nt)&&(nt=`\\b${nt}`),/[\w]$/.test(nt)&&(nt=`${nt}\\b`)),nt}).join("|")).join("|"),"i"),checkFiltered=(_e,et)=>et.reduce((tt,nt)=>tt.concat(nt.keywords.reduce((rt,at)=>{let it=escapeRegExp(at.keyword);return at.whole_word&&(/^[\w]/.test(it)&&(it=`\\b${it}`),/[\w]$/.test(it)&&(it=`${it}\\b`)),new RegExp(it).test(_e)?rt.concat(nt.title):rt},List$1())),List$1()),makeGetStatus=()=>createSelector([(_e,{id:et})=>_e.statuses.get(et),(_e,{id:et})=>{var tt;return _e.statuses.get(((tt=_e.statuses.get(et))==null?void 0:tt.reblog)||"")},(_e,{username:et})=>et,getFilters,_e=>_e.me,_e=>getFeatures(_e.instance)],(_e,et,tt,nt,rt,at)=>{if(!_e)return null;const{account:it}=_e;return it.acct!==tt&&tt!==void 0?null:_e.withMutations(st=>{if(st.set("reblog",et||null),at.filters&&it.id!==rt){const ct=checkFiltered((et==null?void 0:et.search_index)||_e.search_index,nt);st.set("filtered",ct)}})}),makeGetNotification=()=>createSelector([(_e,et)=>et,(_e,et)=>selectAccount(_e,normalizeId(et.account)),(_e,et)=>selectAccount(_e,normalizeId(et.target)),(_e,et)=>_e.statuses.get(normalizeId(et.status))],(_e,et,tt,nt)=>_e.merge({account:et||null,target:tt||null,status:nt||null})),getAccountGallery=createSelector([(_e,et)=>{var tt;return((tt=_e.timelines.get(`account:${et}:media`))==null?void 0:tt.items)||OrderedSet()},_e=>_e.statuses],(_e,et)=>_e.reduce((tt,nt)=>{const rt=et.get(nt);return!rt||rt.reblog?tt:tt.concat(rt.media_attachments.map(at=>at.merge({status:rt,account:rt.account})))},List$1())),getGroupGallery=createSelector([(_e,et)=>{var tt;return((tt=_e.timelines.get(`group:${et}:media`))==null?void 0:tt.items)||OrderedSet()},_e=>_e.statuses],(_e,et)=>_e.reduce((tt,nt)=>{const rt=et.get(nt);return!rt||rt.reblog?tt:tt.concat(rt.media_attachments.map(at=>at.merge({status:rt,account:rt.account})))},List$1())),makeGetReport=()=>{const _e=makeGetStatus();return createSelector([(et,tt)=>et.admin.reports.get(tt),(et,tt)=>{var nt;return selectAccount(et,((nt=et.admin.reports.get(tt))==null?void 0:nt.account)||"")},(et,tt)=>{var nt;return selectAccount(et,((nt=et.admin.reports.get(tt))==null?void 0:nt.target_account)||"")},(et,tt)=>{var nt;return List$1(fromJS((nt=et.admin.reports.get(tt))==null?void 0:nt.statuses)).map(rt=>et.statuses.get(normalizeId(rt))).filter(rt=>rt).map(rt=>_e(et,rt.toJS()))}],(et,tt,nt,rt)=>et?et.withMutations(at=>{at.set("account",tt),at.set("target_account",nt),at.set("statuses",rt)}):null)},getAuthUserIds=createSelector([_e=>_e.auth.users],_e=>_e.reduce((et,tt)=>{try{const nt=tt.id;return validId(nt)?et.add(nt):et}catch{return et}},OrderedSet())),makeGetOtherAccounts=()=>createSelector([_e=>{var et;return(et=_e.entities[Entities.ACCOUNTS])==null?void 0:et.store},getAuthUserIds,_e=>_e.me],(_e,et,tt)=>et.reduce((nt,rt)=>{if(rt===tt)return nt;const at=_e[rt];return at?nt.push(at):nt},List$1())),getSimplePolicy=createSelector([_e=>_e.admin.configs,_e=>_e.instance.pleroma.metadata.federation.mrf_simple],(_e,et)=>({...et,...ConfigDB.toSimplePolicy(_e)})),getRemoteInstanceFavicon=(_e,et)=>{var rt,at,it;const tt=(rt=_e.entities[Entities.ACCOUNTS])==null?void 0:rt.store,nt=(at=Object.entries(tt).find(([ot,st])=>st&&getDomain(st)===et))==null?void 0:at[1];return(it=nt==null?void 0:nt.pleroma)==null?void 0:it.favicon},getRemoteInstanceFederation=(_e,et)=>{const tt=getSimplePolicy(_e);return fromJS(Object.fromEntries(Object.entries(tt).map(([nt,rt])=>[nt,typeof rt=="boolean"?rt:!!rt.find(at=>at[0]===et)])))},makeGetHosts=()=>createSelector([getSimplePolicy],_e=>{const{accept:et,reject_deletes:tt,report_removal:nt,handle_threads:rt,...at}=_e;return Object.values(at).reduce((it,ot)=>it.union(ot),OrderedSet()).sort()}),makeGetRemoteInstance=()=>createSelector([(_e,et)=>et,getRemoteInstanceFavicon,getRemoteInstanceFederation],(_e,et,tt)=>Map$3({host:_e,favicon:et,federation:tt})),makeGetStatusIds=()=>createSelector([(_e,{type:et,prefix:tt})=>getSettings(_e).get(tt||et,Map$3()),(_e,{type:et})=>{var tt;return((tt=_e.timelines.get(et))==null?void 0:tt.items)||OrderedSet()},_e=>_e.statuses],(_e,et,tt)=>et.filter(nt=>{const rt=tt.get(nt);return rt?!shouldFilter(rt,_e):!0})),validId=_e=>typeof _e=="string"&&_e!=="null"&&_e!=="undefined",isURL=_e=>{if(typeof _e!="string")return!1;try{return new URL(_e),!0}catch{return!1}},parseBaseURL=_e=>{try{return new URL(_e).origin}catch{return""}},getLoggedInAccount=_e=>selectOwnAccount(_e),isLoggedIn=_e=>validId(_e().me),getAppToken=_e=>_e.auth.app.access_token,getUserToken=(_e,et)=>{var nt,rt;if(!et)return;const tt=(nt=selectAccount(_e,et))==null?void 0:nt.url;if(tt)return(rt=_e.auth.users.get(tt))==null?void 0:rt.access_token},getAccessToken=_e=>{const et=_e.me;return getUserToken(_e,et)},getAuthUserId=_e=>{var tt;const et=_e.auth.me;return List$1([(tt=_e.auth.users.get(et))==null?void 0:tt.id,et].filter(nt=>nt)).find(validId)},getAuthUserUrl=_e=>{var tt;const et=_e.auth.me;return List$1([(tt=_e.auth.users.get(et))==null?void 0:tt.url,et].filter(nt=>nt)).find(isURL)},getVapidKey=_e=>_e.auth.app.vapid_key||_e.instance.pleroma.vapid_public_key,getMeUrl=_e=>{var et;return(et=selectOwnAccount(_e))==null?void 0:et.url},getHost$1=_e=>{const et=getMeUrl(_e)||getAuthUserUrl(_e);try{return new URL(et).host}catch{return null}},rememberInstance=createAsyncThunk("instance/remember",async _e=>await KVStore.getItemOrError(`instance:${_e}`)),needsNodeinfo=_e=>parseVersion(get$4(_e,"version")).software==="Pleroma"&&!get$4(_e,["pleroma","metadata"]),fetchInstance=createAsyncThunk("instance/fetch",async(_e,{dispatch:et,getState:tt,rejectWithValue:nt})=>{try{const{data:rt}=await api(tt).get("/api/v1/instance");return needsNodeinfo(rt)&&et(fetchNodeinfo()),rt}catch(rt){return nt(rt)}}),loadInstance=createAsyncThunk("instance/load",async(_e,{dispatch:et,getState:tt})=>{const nt=getHost$1(tt());await Promise.all([et(rememberInstance(nt||"")),et(fetchInstance())])}),fetchNodeinfo=createAsyncThunk("nodeinfo/fetch",async(_e,{getState:et})=>await api(et).get("/nodeinfo/2.1.json")),LOCAL_STORAGE_VERIFICATION_KEY="soapbox:verification",PEPE_FETCH_INSTANCE_SUCCESS="PEPE_FETCH_INSTANCE_SUCCESS",FETCH_CHALLENGES_SUCCESS="FETCH_CHALLENGES_SUCCESS",FETCH_TOKEN_SUCCESS="FETCH_TOKEN_SUCCESS",SET_NEXT_CHALLENGE="SET_NEXT_CHALLENGE",SET_CHALLENGES_COMPLETE="SET_CHALLENGES_COMPLETE",SET_LOADING="SET_LOADING",EMAIL="email",SMS="sms",AGE="age",fetchStoredVerification=()=>{try{return JSON.parse(localStorage.getItem(LOCAL_STORAGE_VERIFICATION_KEY))}catch{return null}},removeStoredVerification=()=>{localStorage.removeItem(LOCAL_STORAGE_VERIFICATION_KEY)},fetchStoredToken=()=>{try{return fetchStoredVerification().token}catch{return null}},fetchStoredChallenges=()=>{try{return fetchStoredVerification().challenges}catch{return null}},fetchStoredChallengeTypes=()=>{try{return fetchStoredVerification().challengeTypes}catch{return null}},updateStorage=({..._e})=>{const et=fetchStoredVerification();localStorage.setItem(LOCAL_STORAGE_VERIFICATION_KEY,JSON.stringify({...et,..._e}))},fetchVerificationConfig=()=>async _e=>{await _e(fetchPepeInstance()),_e(fetchRegistrationToken())};function saveChallenges(_e){const et=fetchStoredChallenges()||{};Object.keys(et).filter(nt=>!_e.includes(nt)).forEach(nt=>delete et[nt]);for(let nt=0;nt<_e.length;nt++){const rt=_e[nt];typeof et[rt]!="number"&&(et[rt]=0)}updateStorage({challenges:et,challengeTypes:_e})}function finishChallenge(_e){const et=fetchStoredChallenges()||{};et[_e]=1,updateStorage({challenges:et})}const fetchNextChallenge=()=>{const _e=fetchStoredChallenges()||{};return Object.keys(_e).find(et=>_e[et]===0)},dispatchNextChallenge=_e=>{const et=fetchNextChallenge();_e(et?{type:SET_NEXT_CHALLENGE,challenge:et}:{type:SET_CHALLENGES_COMPLETE})},fetchPepeInstance=()=>(_e,et)=>(_e({type:SET_LOADING}),api(et).get("/api/v1/pepe/instance").then(tt=>{const{challenges:nt,age_minimum:rt}=tt.data;saveChallenges(nt);const at=fetchNextChallenge();_e({type:PEPE_FETCH_INSTANCE_SUCCESS,instance:{isReady:!0,...tt.data}}),_e({type:FETCH_CHALLENGES_SUCCESS,ageMinimum:rt,currentChallenge:at,isComplete:!at})}).finally(()=>_e({type:SET_LOADING,value:!1}))),fetchRegistrationToken=()=>(_e,et)=>{_e({type:SET_LOADING});const tt=fetchStoredToken();return tt?(_e({type:FETCH_TOKEN_SUCCESS,value:tt}),null):api(et).post("/api/v1/pepe/registrations").then(nt=>(updateStorage({token:nt.data.access_token}),_e({type:FETCH_TOKEN_SUCCESS,value:nt.data.access_token}))).finally(()=>_e({type:SET_LOADING,value:!1}))},requestEmailVerification=_e=>(et,tt)=>{et({type:SET_LOADING});const nt=fetchStoredToken();return api(tt).post("/api/v1/pepe/verify_email/request",{email:_e},{headers:{Authorization:`Bearer ${nt}`}}).finally(()=>et({type:SET_LOADING,value:!1}))},checkEmailVerification=()=>(_e,et)=>{const tt=fetchStoredToken();return api(et).get("/api/v1/pepe/verify_email",{headers:{Authorization:`Bearer ${tt}`}})},confirmEmailVerification=_e=>(et,tt)=>{et({type:SET_LOADING});const nt=fetchStoredToken();return api(tt).post("/api/v1/pepe/verify_email/confirm",{token:_e},{headers:{Authorization:`Bearer ${nt}`}}).then(rt=>{updateStorageFromEmailConfirmation(et,rt.data.token)}).finally(()=>et({type:SET_LOADING,value:!1}))},updateStorageFromEmailConfirmation=(_e,et)=>{const tt=fetchStoredChallengeTypes();if(!tt)return;const nt=tt.indexOf("email"),rt={};tt==null||tt.forEach((at,it)=>{const ot=it<=nt?1:0;rt[at]=ot}),updateStorage({token:et,challengeTypes:tt,challenges:rt}),dispatchNextChallenge(_e)},postEmailVerification=()=>_e=>{finishChallenge(EMAIL),dispatchNextChallenge(_e)},requestPhoneVerification=_e=>(et,tt)=>{et({type:SET_LOADING});const nt=fetchStoredToken();return api(tt).post("/api/v1/pepe/verify_sms/request",{phone:_e},{headers:{Authorization:`Bearer ${nt}`}}).finally(()=>et({type:SET_LOADING,value:!1}))},reRequestPhoneVerification=_e=>(et,tt)=>(et({type:SET_LOADING}),api(tt).post("/api/v1/pepe/reverify_sms/request",{phone:_e}).finally(()=>et({type:SET_LOADING,value:!1}))),confirmPhoneVerification=_e=>(et,tt)=>{et({type:SET_LOADING});const nt=fetchStoredToken();return api(tt).post("/api/v1/pepe/verify_sms/confirm",{code:_e},{headers:{Authorization:`Bearer ${nt}`}}).then(()=>{finishChallenge(SMS),dispatchNextChallenge(et)}).finally(()=>et({type:SET_LOADING,value:!1}))},reConfirmPhoneVerification=_e=>(et,tt)=>(et({type:SET_LOADING}),api(tt).post("/api/v1/pepe/reverify_sms/confirm",{code:_e}).finally(()=>et({type:SET_LOADING,value:!1}))),verifyAge=_e=>(et,tt)=>{et({type:SET_LOADING});const nt=fetchStoredToken();return api(tt).post("/api/v1/pepe/verify_age/confirm",{birthday:_e},{headers:{Authorization:`Bearer ${nt}`}}).then(()=>{finishChallenge(AGE),dispatchNextChallenge(et)}).finally(()=>et({type:SET_LOADING,value:!1}))},createAccount=(_e,et)=>(tt,nt)=>{tt({type:SET_LOADING});const rt=fetchStoredToken();return api(nt).post("/api/v1/pepe/accounts",{username:_e,password:et},{headers:{Authorization:`Bearer ${rt}`}}).finally(()=>tt({type:SET_LOADING,value:!1}))};var acceptedGdpr=!!localStorage.getItem("soapbox:gdpr"),GdprBanner=function _e(){var et=reactExports.useState(acceptedGdpr),tt=_slicedToArray$4(et,2),nt=tt[0],rt=tt[1],at=reactExports.useState(!1),it=_slicedToArray$4(at,2),ot=it[0],st=it[1],ct=useInstance(),ut=useSoapboxConfig(),dt=useAppSelector(function(mt){return!!mt.me}),ft=function(){localStorage.setItem("soapbox:gdpr","true"),st(!0),setTimeout(function(){return rt(!0)},200)},pt=ut.gdpr&&!dt&&!nt;return pt?_createRawReactElement(Banner,{theme:"opaque",className:clsx("transition-transform",{"translate-y-full":ot})},void 0,_createRawReactElement("div",{className:"flex flex-col space-y-4 rtl:space-x-reverse lg:flex-row lg:items-center lg:justify-between lg:space-x-4 lg:space-y-0"},void 0,_createRawReactElement(Stack,{space:2},void 0,_createRawReactElement(Text$2,{size:"xl",weight:"bold"},void 0,_createRawReactElement(FormattedMessage$1,{id:"gdpr.title",defaultMessage:"{siteTitle} uses cookies",values:{siteTitle:ct.title}})),_createRawReactElement(Text$2,{weight:"medium",className:"opacity-60"},void 0,_createRawReactElement(FormattedMessage$1,{id:"gdpr.message",defaultMessage:"{siteTitle} uses session cookies, which are essential to the website's functioning.",values:{siteTitle:ct.title}}))),_createRawReactElement(HStack,{space:2,alignItems:"center",className:"flex-none"},void 0,ut.gdprUrl&&_createRawReactElement("a",{href:ut.gdprUrl,tabIndex:-1,className:"inline-flex"},void 0,_createRawReactElement(Button,{theme:"secondary"},void 0,_createRawReactElement(FormattedMessage$1,{id:"gdpr.learn_more",defaultMessage:"Learn more"}))),_createRawReactElement(Button,{theme:"accent",onClick:ft},void 0,_createRawReactElement(FormattedMessage$1,{id:"gdpr.accept",defaultMessage:"Accept"}))))):null},LandingGradient=function _e(){return _createRawReactElement("div",{className:"fixed h-screen w-full bg-gradient-to-tr from-primary-50 via-white to-gradient-end/10 dark:from-primary-900/50 dark:via-primary-900 dark:to-primary-800/50"})},LoadingScreen=function _e(){return _createRawReactElement("div",{className:"fixed h-screen w-screen"},void 0,_createRawReactElement(LandingGradient,{}),_createRawReactElement("div",{className:"d-screen fixed z-10 flex w-screen items-center justify-center"},void 0,_createRawReactElement("div",{className:"p-4"},void 0,_createRawReactElement(Spinner,{size:40,withText:!1}))))};const vitePluginRequire_1697864653844_80969986="/packs/assets/user-1a0da6f5.svg";var sameValue$1=Object.is||function _e(et,tt){return et===tt?et!==0||1/et===1/tt:et!==et&&tt!==tt},call$3=functionCall,fixRegExpWellKnownSymbolLogic$1=fixRegexpWellKnownSymbolLogic,anObject$4=anObject$m,isNullOrUndefined$4=isNullOrUndefined$a,requireObjectCoercible$2=requireObjectCoercible$b,sameValue=sameValue$1,toString$4=toString$t,getMethod$2=getMethod$7,regExpExec$2=regexpExecAbstract;fixRegExpWellKnownSymbolLogic$1("search",function(_e,et,tt){return[function(rt){var at=requireObjectCoercible$2(this),it=isNullOrUndefined$4(rt)?void 0:getMethod$2(rt,_e);return it?call$3(it,rt,at):new RegExp(rt)[_e](toString$4(at))},function(nt){var rt=anObject$4(this),at=toString$4(nt),it=tt(et,rt,at);if(it.done)return it.value;var ot=rt.lastIndex;sameValue(ot,0)||(rt.lastIndex=0);var st=regExpExec$2(rt,at);return sameValue(rt.lastIndex,ot)||(rt.lastIndex=ot),st===null?-1:st.index}]});const vitePluginRequire_1697864644932_87128717="/packs/assets/soapbox-logo-bc8c5e10.svg",vitePluginRequire_1697864644932_90506475="/packs/assets/soapbox-logo-white-bbd3c469.svg";var _excluded$c=["className","theme"],SiteLogo=function _e(et){var tt=et.className,nt=et.theme,rt=_objectWithoutProperties(et,_excluded$c),at=useSoapboxConfig(),it=at.logo,ot=at.logoDarkMode,st=useSettings(),ct=useTheme()==="dark";nt==="dark"&&(ct=!0);var ut=ct?vitePluginRequire_1697864644932_90506475:vitePluginRequire_1697864644932_87128717,dt=function(){return st.get("demo")?ut:ct&&ot?ot:it||ot||ut};return React$3.createElement("img",_extends$4({className:clsx("object-contain",tt),src:dt()},rt))},fails$8=fails$F,wellKnownSymbol$3=wellKnownSymbol$t,DESCRIPTORS$3=descriptors$1,IS_PURE$1=isPure,ITERATOR$1=wellKnownSymbol$3("iterator"),urlConstructorDetection=!fails$8(function(){var _e=new URL("b?a=1&b=2&c=3","http://a"),et=_e.searchParams,tt=new URLSearchParams("a=1&a=2&b=3"),nt="";return _e.pathname="c%20d",et.forEach(function(rt,at){et.delete("b"),nt+=at+rt}),tt.delete("a",2),tt.delete("b",void 0),IS_PURE$1&&(!_e.toJSON||!tt.has("a",1)||tt.has("a",2)||!tt.has("a",void 0)||tt.has("b"))||!et.size&&(IS_PURE$1||!DESCRIPTORS$3)||!et.sort||_e.href!=="http://a/c%20d?a=1&c=3"||et.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!et[ITERATOR$1]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://тест").host!=="xn--e1aybc"||new URL("http://a#б").hash!=="#%D0%B1"||nt!=="a1c3"||new URL("http://x",void 0).host!=="x"}),defineBuiltIn$3=defineBuiltIn$f,defineBuiltIns$2=function(_e,et,tt){for(var nt in et)defineBuiltIn$3(_e,nt,et[nt],tt);return _e},$$9=_export,global$4=global$w,call$2=functionCall,uncurryThis$7=functionUncurryThis,DESCRIPTORS$2=descriptors$1,USE_NATIVE_URL=urlConstructorDetection,defineBuiltIn$2=defineBuiltIn$f,defineBuiltInAccessor$1=defineBuiltInAccessor$8,defineBuiltIns$1=defineBuiltIns$2,setToStringTag$2=setToStringTag$7,createIteratorConstructor$1=iteratorCreateConstructor,InternalStateModule$2=internalState,anInstance$2=anInstance$4,isCallable$2=isCallable$t,hasOwn$3=hasOwnProperty_1,bind$2=functionBindContext,classof$2=classof$f,anObject$3=anObject$m,isObject$6=isObject$u,$toString=toString$t,create$2=objectCreate,createPropertyDescriptor$1=createPropertyDescriptor$7,getIterator=getIterator$3,getIteratorMethod=getIteratorMethod$4,validateArgumentsLength=validateArgumentsLength$2,wellKnownSymbol$2=wellKnownSymbol$t,arraySort=arraySort$1,ITERATOR=wellKnownSymbol$2("iterator"),URL_SEARCH_PARAMS="URLSearchParams",URL_SEARCH_PARAMS_ITERATOR=URL_SEARCH_PARAMS+"Iterator",setInternalState$2=InternalStateModule$2.set,getInternalParamsState=InternalStateModule$2.getterFor(URL_SEARCH_PARAMS),getInternalIteratorState=InternalStateModule$2.getterFor(URL_SEARCH_PARAMS_ITERATOR),getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,safeGetBuiltIn=function(_e){if(!DESCRIPTORS$2)return global$4[_e];var et=getOwnPropertyDescriptor(global$4,_e);return et&&et.value},nativeFetch=safeGetBuiltIn("fetch"),NativeRequest=safeGetBuiltIn("Request"),Headers$1=safeGetBuiltIn("Headers"),RequestPrototype=NativeRequest&&NativeRequest.prototype,HeadersPrototype=Headers$1&&Headers$1.prototype,RegExp$1=global$4.RegExp,TypeError$1=global$4.TypeError,decodeURIComponent$1=global$4.decodeURIComponent,encodeURIComponent$1=global$4.encodeURIComponent,charAt$1=uncurryThis$7("".charAt),join$1=uncurryThis$7([].join),push$2=uncurryThis$7([].push),replace$2=uncurryThis$7("".replace),shift=uncurryThis$7([].shift),splice=uncurryThis$7([].splice),split=uncurryThis$7("".split),stringSlice$2=uncurryThis$7("".slice),plus=/\+/g,sequences=Array(4),percentSequence=function(_e){return sequences[_e-1]||(sequences[_e-1]=RegExp$1("((?:%[\\da-f]{2}){"+_e+"})","gi"))},percentDecode=function(_e){try{return decodeURIComponent$1(_e)}catch{return _e}},deserialize=function(_e){var et=replace$2(_e,plus," "),tt=4;try{return decodeURIComponent$1(et)}catch{for(;tt;)et=replace$2(et,percentSequence(tt--),percentDecode);return et}},find=/[!'()~]|%20/g,replacements={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(_e){return replacements[_e]},serialize=function(_e){return replace$2(encodeURIComponent$1(_e),find,replacer)},URLSearchParamsIterator=createIteratorConstructor$1(function _e(et,tt){setInternalState$2(this,{type:URL_SEARCH_PARAMS_ITERATOR,iterator:getIterator(getInternalParamsState(et).entries),kind:tt})},"Iterator",function _e(){var et=getInternalIteratorState(this),tt=et.kind,nt=et.iterator.next(),rt=nt.value;return nt.done||(nt.value=tt==="keys"?rt.key:tt==="values"?rt.value:[rt.key,rt.value]),nt},!0),URLSearchParamsState=function(_e){this.entries=[],this.url=null,_e!==void 0&&(isObject$6(_e)?this.parseObject(_e):this.parseQuery(typeof _e=="string"?charAt$1(_e,0)==="?"?stringSlice$2(_e,1):_e:$toString(_e)))};URLSearchParamsState.prototype={type:URL_SEARCH_PARAMS,bindURL:function(_e){this.url=_e,this.update()},parseObject:function(_e){var et=getIteratorMethod(_e),tt,nt,rt,at,it,ot,st;if(et)for(tt=getIterator(_e,et),nt=tt.next;!(rt=call$2(nt,tt)).done;){if(at=getIterator(anObject$3(rt.value)),it=at.next,(ot=call$2(it,at)).done||(st=call$2(it,at)).done||!call$2(it,at).done)throw TypeError$1("Expected sequence with length 2");push$2(this.entries,{key:$toString(ot.value),value:$toString(st.value)})}else for(var ct in _e)hasOwn$3(_e,ct)&&push$2(this.entries,{key:ct,value:$toString(_e[ct])})},parseQuery:function(_e){if(_e)for(var et=split(_e,"&"),tt=0,nt,rt;tt0?arguments[0]:void 0,tt=setInternalState$2(this,new URLSearchParamsState(et));DESCRIPTORS$2||(this.size=tt.entries.length)},URLSearchParamsPrototype=URLSearchParamsConstructor.prototype;defineBuiltIns$1(URLSearchParamsPrototype,{append:function _e(et,tt){var nt=getInternalParamsState(this);validateArgumentsLength(arguments.length,2),push$2(nt.entries,{key:$toString(et),value:$toString(tt)}),DESCRIPTORS$2||this.length++,nt.updateURL()},delete:function(_e){for(var et=getInternalParamsState(this),tt=validateArgumentsLength(arguments.length,1),nt=et.entries,rt=$toString(_e),at=tt<2?void 0:arguments[1],it=at===void 0?at:$toString(at),ot=0;otnt.key?1:-1}),et.updateURL()},forEach:function _e(et){for(var tt=getInternalParamsState(this).entries,nt=bind$2(et,arguments.length>1?arguments[1]:void 0),rt=0,at;rt1?wrapRequestOptions(arguments[1]):{})}}),isCallable$2(NativeRequest)){var RequestConstructor=function(et){return anInstance$2(this,RequestPrototype),new NativeRequest(et,arguments.length>1?wrapRequestOptions(arguments[1]):{})};RequestPrototype.constructor=RequestConstructor,RequestConstructor.prototype=RequestPrototype,$$9({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:RequestConstructor})}}var web_urlSearchParams_constructor={URLSearchParams:URLSearchParamsConstructor,getState:getInternalParamsState},$$8=_export,iterate$2=iterate$5,createProperty=createProperty$6;$$8({target:"Object",stat:!0},{fromEntries:function _e(et){var tt={};return iterate$2(et,function(nt,rt){createProperty(tt,nt,rt)},{AS_ENTRIES:!0}),tt}});const LOCAL_STORAGE_REDIRECT_KEY="soapbox:redirect-uri",getRedirectUrl=()=>{let _e=localStorage.getItem(LOCAL_STORAGE_REDIRECT_KEY);return _e&&(_e=decodeURIComponent(_e)),localStorage.removeItem(LOCAL_STORAGE_REDIRECT_KEY),_e||"/"},useCachedLocationHandler=()=>{const _e=()=>localStorage.removeItem(LOCAL_STORAGE_REDIRECT_KEY);return reactExports.useEffect(()=>(window.addEventListener("beforeunload",_e),()=>{window.removeEventListener("beforeunload",_e)}),[]),null},vitePluginRequire_1697864677273_43542324="/packs/assets/key-73a26022.svg",vitePluginRequire_1697864677273_2100612="/packs/assets/brand-github-67acf9a6.svg",vitePluginRequire_1697864677273_89759585="/packs/assets/brand-slack-da4d4eeb.svg",vitePluginRequire_1697864677273_35901730="/packs/assets/brand-windows-8c405104.svg",vitePluginRequire_1697864677273_88014060="/packs/assets/brand-google-3718a30e.svg",vitePluginRequire_1697864677273_74387817="/packs/assets/brand-facebook-16d7d158.svg",vitePluginRequire_1697864677273_27564434="/packs/assets/brand-twitter-153358e5.svg",createProviderApp=()=>async(_e,et)=>{const tt=getScopes(et()),nt={client_name:sourceCode.displayName,redirect_uris:`${window.location.origin}/login/external`,website:sourceCode.homepage,scopes:tt};return _e(createApp(nt))},prepareRequest=_e=>async(et,tt)=>{const nt=isURL(BACKEND_URL)?BACKEND_URL:"",rt=getScopes(tt()),at=await et(createProviderApp()),{client_id:it,redirect_uri:ot}=at;localStorage.setItem("soapbox:external:app",JSON.stringify(at)),localStorage.setItem("soapbox:external:baseurl",nt),localStorage.setItem("soapbox:external:scopes",rt);const st={provider:_e,authorization:{client_id:it,redirect_uri:ot,scope:rt}},ct=axios$1.toFormData(st),ut=new URLSearchParams(ct);location.href=`${nt}/oauth/prepare_request?${ut.toString()}`};function capitalize$2(_e){return _e.charAt(0).toUpperCase()+_e.slice(1)}var messages$11={tooltip:{id:"oauth_consumer.tooltip",defaultMessage:"Sign in with {provider}"}},BRAND_ICONS={twitter:vitePluginRequire_1697864677273_27564434,facebook:vitePluginRequire_1697864677273_74387817,google:vitePluginRequire_1697864677273_88014060,microsoft:vitePluginRequire_1697864677273_35901730,slack:vitePluginRequire_1697864677273_89759585,github:vitePluginRequire_1697864677273_2100612},ConsumerButton=function _e(et){var tt=et.provider,nt=useIntl(),rt=useAppDispatch(),at=BRAND_ICONS[tt]||vitePluginRequire_1697864677273_43542324,it=function(){rt(prepareRequest(tt))};return _createRawReactElement(Tooltip,{text:nt.formatMessage(messages$11.tooltip,{provider:capitalize$2(tt)})},void 0,_createRawReactElement(IconButton$1,{theme:"outlined",className:"p-2.5",iconClassName:"h-6 w-6",src:at,onClick:it}))},ConsumersList=function _e(){var et=useInstance(),tt=List$1(et.pleroma.oauth_consumer_strategies);return tt.size>0?_createRawReactElement(Card$1,{className:"bg-gray-50 p-4 dark:bg-primary-800 sm:rounded-xl"},void 0,_createRawReactElement(Text$2,{size:"xs",theme:"muted"},void 0,_createRawReactElement(FormattedMessage$1,{id:"oauth_consumers.title",defaultMessage:"Other ways to sign in"})),_createRawReactElement(HStack,{space:2},void 0,tt.map(function(nt){return _createRawReactElement(ConsumerButton,{provider:nt})}))):null},messages$10={username:{id:"login.fields.username_label",defaultMessage:"E-mail or username"},email:{id:"login.fields.email_label",defaultMessage:"E-mail address"},password:{id:"login.fields.password_placeholder",defaultMessage:"Password"}},LoginForm=function _e(et){var tt=et.isLoading,nt=et.handleSubmit,rt=useIntl(),at=useFeatures(),it=rt.formatMessage(at.logInWithUsername?messages$10.username:messages$10.email),ot=rt.formatMessage(messages$10.password);return _createRawReactElement("div",{},void 0,_createRawReactElement("div",{className:"-mx-4 mb-4 border-b border-solid border-gray-200 pb-4 dark:border-gray-800 sm:-mx-10 sm:pb-10"},void 0,_createRawReactElement("h1",{className:"text-center text-2xl font-bold"},void 0,_createRawReactElement(FormattedMessage$1,{id:"login_form.header",defaultMessage:"Sign In"}))),_createRawReactElement(Stack,{className:"mx-auto sm:w-2/3 sm:pt-10 md:w-1/2",space:5},void 0,_createRawReactElement(Form,{onSubmit:nt},void 0,_createRawReactElement(FormGroup,{labelText:it},void 0,_createRawReactElement(Input,{"aria-label":it,placeholder:it,type:"text",name:"username",autoCorrect:"off",autoCapitalize:"off",required:!0})),_createRawReactElement(FormGroup,{labelText:ot,hintText:_createRawReactElement(Link$2,{to:"/reset-password",className:"hover:underline",tabIndex:-1},void 0,_createRawReactElement(FormattedMessage$1,{id:"login.reset_password_hint",defaultMessage:"Trouble logging in?"}))},void 0,_createRawReactElement(Input,{"aria-label":ot,placeholder:ot,type:"password",name:"password",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",required:!0})),_createRawReactElement(FormActions,{},void 0,_createRawReactElement(Button,{theme:"primary",type:"submit",disabled:tt},void 0,_createRawReactElement(FormattedMessage$1,{id:"login.sign_in",defaultMessage:"Sign in"})))),_createRawReactElement(ConsumersList,{})))},messages$$={otpCodeHint:{id:"login.fields.otp_code_hint",defaultMessage:"Enter the two-factor code generated by your phone app or use one of your recovery codes"},otpCodeLabel:{id:"login.fields.otp_code_label",defaultMessage:"Two-factor code:"},otpLoginFail:{id:"login.otp_log_in.fail",defaultMessage:"Invalid code, please try again."}},OtpAuthForm=function _e(et){var tt=et.mfa_token,nt=useAppDispatch(),rt=useIntl(),at=reactExports.useState(!1),it=_slicedToArray$4(at,2),ot=it[0],st=it[1],ct=reactExports.useState(!1),ut=_slicedToArray$4(ct,2),dt=ut[0],ft=ut[1],pt=reactExports.useState(""),mt=_slicedToArray$4(pt,2),ht=mt[0],Et=mt[1],yt=function(St){return Object.fromEntries(Array.from(St).map(function(Rt){return[Rt.name,Rt.value]}))},vt=function(St){var Rt=yt(St.target),$t=Rt.code;nt(otpVerify($t,tt)).then(function(bt){var wt=bt.access_token;return Et(!1),nt(verifyCredentials(wt))}).then(function(bt){return ft(!0),nt(switchAccount(bt.id))}).catch(function(){st(!1),Et(!0)}),st(!0),St.preventDefault()};return dt?_createRawReactElement(Redirect,{to:"/"}):_createRawReactElement("div",{},void 0,_createRawReactElement("div",{className:"-mx-4 mb-4 border-b border-solid border-gray-200 pb-4 dark:border-gray-600 sm:-mx-10 sm:pb-10"},void 0,_createRawReactElement("h1",{className:"text-center text-2xl font-bold"},void 0,_createRawReactElement(FormattedMessage$1,{id:"login.otp_log_in",defaultMessage:"OTP Login"}))),_createRawReactElement("div",{className:"mx-auto sm:w-2/3 sm:pt-10 md:w-1/2"},void 0,_createRawReactElement(Form,{onSubmit:vt},void 0,_createRawReactElement(FormGroup,{labelText:rt.formatMessage(messages$$.otpCodeLabel),hintText:rt.formatMessage(messages$$.otpCodeHint),errors:ht?[rt.formatMessage(messages$$.otpLoginFail)]:[]},void 0,_createRawReactElement(Input,{name:"code",type:"text",autoComplete:"off",autoFocus:!0,required:!0})),_createRawReactElement(FormActions,{},void 0,_createRawReactElement(Button,{theme:"primary",type:"submit",disabled:ot},void 0,_createRawReactElement(FormattedMessage$1,{id:"login.sign_in",defaultMessage:"Sign in"}))))))},LoginPage=function _e(){var et=useAppDispatch(),tt=useAppSelector(function(wt){return wt.me}),nt=useAppSelector(function(wt){return isStandalone(wt)}),rt=new URLSearchParams(window.location.search).get("token"),at=reactExports.useState(!1),it=_slicedToArray$4(at,2),ot=it[0],st=it[1],ct=reactExports.useState(!!rt),ut=_slicedToArray$4(ct,2),dt=ut[0],ft=ut[1],pt=reactExports.useState(rt||""),mt=_slicedToArray$4(pt,2),ht=mt[0],Et=mt[1],yt=reactExports.useState(!1),vt=_slicedToArray$4(yt,2),gt=vt[0],St=vt[1],Rt=function(xt){return Object.fromEntries(Array.from(xt).map(function(Tt){return[Tt.name,Tt.value]}))},$t=function(xt){var Tt=Rt(xt.target),Ct=Tt.username,Nt=Tt.password;et(logIn(Ct,Nt)).then(function(At){var kt=At.access_token;return et(verifyCredentials(kt))}).then(function(){var At=_asyncToGenerator(regeneratorRuntime.mark(function kt(Pt){return regeneratorRuntime.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:return Dt.next=2,et(fetchInstance());case 2:return Dt.abrupt("return",Pt);case 3:case"end":return Dt.stop()}},kt)}));return function(kt){return At.apply(this,arguments)}}()).then(function(At){et(closeModal()),typeof tt=="string"?et(switchAccount(At.id)):St(!0)}).catch(function(At){var kt,Pt=(kt=At.response)===null||kt===void 0?void 0:kt.data;(Pt==null?void 0:Pt.error)==="mfa_required"&&(ft(!0),Et(Pt.mfa_token)),st(!1)}),st(!0),xt.preventDefault()};if(nt)return _createRawReactElement(Redirect,{to:"/login/external"});if(gt){var bt=getRedirectUrl();return _createRawReactElement(Redirect,{to:bt})}return dt?_createRawReactElement(OtpAuthForm,{mfa_token:ht}):_createRawReactElement(LoginForm,{handleSubmit:$t,isLoading:ot})};const FETCH_TOKENS_REQUEST="FETCH_TOKENS_REQUEST",FETCH_TOKENS_SUCCESS="FETCH_TOKENS_SUCCESS",FETCH_TOKENS_FAIL="FETCH_TOKENS_FAIL",REVOKE_TOKEN_REQUEST="REVOKE_TOKEN_REQUEST",REVOKE_TOKEN_SUCCESS="REVOKE_TOKEN_SUCCESS",REVOKE_TOKEN_FAIL="REVOKE_TOKEN_FAIL",RESET_PASSWORD_REQUEST="RESET_PASSWORD_REQUEST",RESET_PASSWORD_SUCCESS="RESET_PASSWORD_SUCCESS",RESET_PASSWORD_FAIL="RESET_PASSWORD_FAIL",RESET_PASSWORD_CONFIRM_REQUEST="RESET_PASSWORD_CONFIRM_REQUEST",RESET_PASSWORD_CONFIRM_SUCCESS="RESET_PASSWORD_CONFIRM_SUCCESS",RESET_PASSWORD_CONFIRM_FAIL="RESET_PASSWORD_CONFIRM_FAIL",CHANGE_PASSWORD_REQUEST="CHANGE_PASSWORD_REQUEST",CHANGE_PASSWORD_SUCCESS="CHANGE_PASSWORD_SUCCESS",CHANGE_PASSWORD_FAIL="CHANGE_PASSWORD_FAIL",CHANGE_EMAIL_REQUEST="CHANGE_EMAIL_REQUEST",CHANGE_EMAIL_SUCCESS="CHANGE_EMAIL_SUCCESS",CHANGE_EMAIL_FAIL="CHANGE_EMAIL_FAIL",DELETE_ACCOUNT_REQUEST="DELETE_ACCOUNT_REQUEST",DELETE_ACCOUNT_SUCCESS="DELETE_ACCOUNT_SUCCESS",DELETE_ACCOUNT_FAIL="DELETE_ACCOUNT_FAIL",MOVE_ACCOUNT_REQUEST="MOVE_ACCOUNT_REQUEST",MOVE_ACCOUNT_SUCCESS="MOVE_ACCOUNT_SUCCESS",MOVE_ACCOUNT_FAIL="MOVE_ACCOUNT_FAIL",fetchOAuthTokens=()=>(_e,et)=>(_e({type:FETCH_TOKENS_REQUEST}),api(et).get("/api/oauth_tokens").then(({data:tt})=>{_e({type:FETCH_TOKENS_SUCCESS,tokens:tt})}).catch(()=>{_e({type:FETCH_TOKENS_FAIL})})),revokeOAuthTokenById=_e=>(et,tt)=>(et({type:REVOKE_TOKEN_REQUEST,id:_e}),api(tt).delete(`/api/oauth_tokens/${_e}`).then(()=>{et({type:REVOKE_TOKEN_SUCCESS,id:_e})}).catch(()=>{et({type:REVOKE_TOKEN_FAIL,id:_e})})),changePassword=(_e,et,tt)=>(nt,rt)=>(nt({type:CHANGE_PASSWORD_REQUEST}),api(rt).post("/api/v1/pleroma/change_password",{password:_e,new_password:et,new_password_confirmation:tt}).then(at=>{if(at.data.error)throw at.data.error;nt({type:CHANGE_PASSWORD_SUCCESS,response:at})}).catch(at=>{throw nt({type:CHANGE_PASSWORD_FAIL,error:at,skipAlert:!0}),at})),resetPassword=_e=>(et,tt)=>{const nt=normalizeUsername(_e),rt=tt(),at=parseVersion(rt.instance.version);et({type:RESET_PASSWORD_REQUEST});const it=nt.includes("@")?{email:nt}:{nickname:nt,username:nt},ot=at.software===TRUTHSOCIAL?"/api/v1/truth/password_reset/request":"/auth/password";return api(tt).post(ot,it).then(()=>{et({type:RESET_PASSWORD_SUCCESS})}).catch(st=>{throw et({type:RESET_PASSWORD_FAIL,error:st}),st})},resetPasswordConfirm=(_e,et)=>(tt,nt)=>{const rt={password:_e,reset_password_token:et};return tt({type:RESET_PASSWORD_CONFIRM_REQUEST}),api(nt).post("/api/v1/truth/password_reset/confirm",rt).then(()=>{tt({type:RESET_PASSWORD_CONFIRM_SUCCESS})}).catch(at=>{throw tt({type:RESET_PASSWORD_CONFIRM_FAIL,error:at}),at})},changeEmail=(_e,et)=>(tt,nt)=>(tt({type:CHANGE_EMAIL_REQUEST,email:_e}),api(nt).post("/api/v1/pleroma/change_email",{email:_e,password:et}).then(rt=>{if(rt.data.error)throw rt.data.error;tt({type:CHANGE_EMAIL_SUCCESS,email:_e,response:rt})}).catch(rt=>{throw tt({type:CHANGE_EMAIL_FAIL,email:_e,error:rt,skipAlert:!0}),rt})),confirmChangedEmail=_e=>(et,tt)=>api(tt).get(`/api/v1/truth/email/confirm?confirmation_token=${_e}`),deleteAccount=_e=>(et,tt)=>{const nt=getLoggedInAccount(tt());return et({type:DELETE_ACCOUNT_REQUEST}),api(tt).post("/api/v1/pleroma/delete_account",{password:_e}).then(rt=>{if(rt.data.error)throw rt.data.error;et({type:DELETE_ACCOUNT_SUCCESS,response:rt}),et({type:AUTH_LOGGED_OUT,account:nt}),toast.success(messages$12.loggedOut)}).catch(rt=>{throw et({type:DELETE_ACCOUNT_FAIL,error:rt,skipAlert:!0}),rt})},moveAccount=(_e,et)=>(tt,nt)=>(tt({type:MOVE_ACCOUNT_REQUEST}),api(nt).post("/api/v1/pleroma/move_account",{password:et,target_account:_e}).then(rt=>{if(rt.data.error)throw rt.data.error;tt({type:MOVE_ACCOUNT_SUCCESS,response:rt})}).catch(rt=>{throw tt({type:MOVE_ACCOUNT_FAIL,error:rt,skipAlert:!0}),rt}));var messages$_={nicknameOrEmail:{id:"password_reset.fields.username_placeholder",defaultMessage:"E-mail or username"},email:{id:"password_reset.fields.email_placeholder",defaultMessage:"E-mail address"},confirmation:{id:"password_reset.confirmation",defaultMessage:"Check your email for confirmation."}},PasswordReset=function _e(){var et=useAppDispatch(),tt=useIntl(),nt=useFeatures(),rt=reactExports.useState(!1),at=_slicedToArray$4(rt,2),it=at[0],ot=at[1],st=reactExports.useState(!1),ct=_slicedToArray$4(st,2),ut=ct[0],dt=ct[1],ft=function(mt){var ht=mt.target.nickname_or_email.value;ot(!0),et(resetPassword(ht)).then(function(){ot(!1),dt(!0),toast.info(tt.formatMessage(messages$_.confirmation))}).catch(function(){ot(!1)})};return ut?_createRawReactElement(Redirect,{to:"/"}):_createRawReactElement("div",{},void 0,_createRawReactElement("div",{className:"-mx-4 mb-4 border-b border-solid border-gray-200 pb-4 dark:border-gray-600 sm:-mx-10 sm:pb-10"},void 0,_createRawReactElement("h1",{className:"text-center text-2xl font-bold"},void 0,_createRawReactElement(FormattedMessage$1,{id:"password_reset.header",defaultMessage:"Reset Password"}))),_createRawReactElement("div",{className:"mx-auto sm:w-2/3 sm:pt-10 md:w-1/2"},void 0,_createRawReactElement(Form,{onSubmit:ft},void 0,_createRawReactElement(FormGroup,{labelText:tt.formatMessage(nt.logInWithUsername?messages$_.nicknameOrEmail:messages$_.email)},void 0,_createRawReactElement(Input,{type:"text",name:"nickname_or_email",placeholder:"me@example.com",required:!0})),_createRawReactElement(FormActions,{},void 0,_createRawReactElement(Button,{type:"submit",theme:"primary",disabled:it},void 0,_createRawReactElement(FormattedMessage$1,{id:"password_reset.reset",defaultMessage:"Reset password"}))))))};const vitePluginRequire_1697864673872_33005308="/packs/assets/point-a0dc1c0a.svg",vitePluginRequire_1697864666744_94924775="/packs/assets/check-44829451.svg";var ValidationCheckmark=function _e(et){var tt=et.isValid,nt=et.text;return _createRawReactElement(HStack,{alignItems:"center",space:2,"data-testid":"validation-checkmark"},void 0,_createRawReactElement(Icon$1,{src:tt?vitePluginRequire_1697864666744_94924775:vitePluginRequire_1697864673872_33005308,className:clsx({"w-4 h-4":!0,"text-gray-400 dark:text-gray-600 dark:fill-gray-600 fill-gray-400":!tt,"text-success-500":tt})}),_createRawReactElement(Text$2,{theme:"muted",size:"sm"},void 0,nt))},messages$Z={minimumCharacters:{id:"registration.validation.minimum_characters",defaultMessage:"8 characters"},capitalLetter:{id:"registration.validation.capital_letter",defaultMessage:"1 capital letter"},lowercaseLetter:{id:"registration.validation.lowercase_letter",defaultMessage:"1 lowercase letter"}},hasUppercaseCharacter=function _e(et){for(var tt=0;tt=8},[nt]),it=reactExports.useMemo(function(){return hasUppercaseCharacter(nt)},[nt]),ot=reactExports.useMemo(function(){return hasLowercaseCharacter(nt)},[nt]),st=at&&it&&ot;return reactExports.useEffect(function(){tt(st)},[st]),_createRawReactElement(Stack,{className:"mt-2",space:1},void 0,_createRawReactElement(ValidationCheckmark,{isValid:at,text:rt.formatMessage(messages$Z.minimumCharacters)}),_createRawReactElement(ValidationCheckmark,{isValid:it,text:rt.formatMessage(messages$Z.capitalLetter)}),_createRawReactElement(ValidationCheckmark,{isValid:ot,text:rt.formatMessage(messages$Z.lowercaseLetter)}))},token=new URLSearchParams(window.location.search).get("reset_password_token"),messages$Y={resetPasswordFail:{id:"reset_password.fail",defaultMessage:"Expired token, please try again."},passwordPlaceholder:{id:"reset_password.password.placeholder",defaultMessage:"Placeholder"}},Statuses$3={IDLE:"IDLE",LOADING:"LOADING",SUCCESS:"SUCCESS",FAIL:"FAIL"},PasswordResetConfirm=function _e(){var et=useIntl(),tt=useAppDispatch(),nt=useFeatures(),rt=nt.passwordRequirements,at=React$3.useState(""),it=_slicedToArray$4(at,2),ot=it[0],st=it[1],ct=React$3.useState(Statuses$3.IDLE),ut=_slicedToArray$4(ct,2),dt=ut[0],ft=ut[1],pt=React$3.useState(!rt),mt=_slicedToArray$4(pt,2),ht=mt[0],Et=mt[1],yt=dt===Statuses$3.LOADING,vt=React$3.useCallback(function(Rt){Rt.preventDefault(),ft(Statuses$3.LOADING),tt(resetPasswordConfirm(ot,token)).then(function(){return ft(Statuses$3.SUCCESS)}).catch(function(){return ft(Statuses$3.FAIL)})},[ot]),gt=React$3.useCallback(function(Rt){st(Rt.target.value)},[]),St=function(){return dt===Statuses$3.FAIL?[et.formatMessage(messages$Y.resetPasswordFail)]:[]};return dt===Statuses$3.SUCCESS?_createRawReactElement(Redirect,{to:"/"}):_createRawReactElement("div",{},void 0,_createRawReactElement("div",{className:"-mx-4 mb-4 border-b border-solid border-gray-200 pb-4 dark:border-gray-600 sm:-mx-10 sm:pb-10"},void 0,_createRawReactElement("h1",{className:"text-center text-2xl font-bold"},void 0,_createRawReactElement(FormattedMessage$1,{id:"reset_password.header",defaultMessage:"Set New Password"}))),_createRawReactElement("div",{className:"mx-auto sm:w-2/3 sm:pt-10 md:w-1/2"},void 0,_createRawReactElement(Form,{onSubmit:vt},void 0,_createRawReactElement(FormGroup,{labelText:_createRawReactElement(FormattedMessage$1,{id:"reset_password.password.label",defaultMessage:"Password"}),errors:St()},void 0,_createRawReactElement(Input,{type:"password",name:"password",placeholder:et.formatMessage(messages$Y.passwordPlaceholder),onChange:gt,required:!0}),rt&&_createRawReactElement(PasswordIndicator,{password:ot,onChange:Et})),_createRawReactElement(FormActions,{},void 0,_createRawReactElement(Button,{type:"submit",theme:"primary",disabled:yt||!ht},void 0,_createRawReactElement(FormattedMessage$1,{id:"password_reset.reset",defaultMessage:"Reset password"}))))))};const vitePluginRequire_1697864655029_83209601="/packs/assets/at-0ee55bf2.svg";var _excluded$b=["src","alt","className"],Icon=function _e(et){var tt=et.src,nt=et.alt,rt=et.className,at=_objectWithoutProperties(et,_excluded$b);return React$3.createElement("div",_extends$4({className:clsx("svg-icon",rt)},at),_createRawReactElement(InlineSVG,{src:tt,title:nt,loader:React$3.createElement(React$3.Fragment,null)}))},IconButton=function _e(et){var tt=et.active,nt=et.className,rt=et.disabled,at=et.expanded,it=et.iconClassName,ot=et.onClick,st=et.onKeyDown,ct=et.onKeyUp,ut=et.onKeyPress,dt=et.onMouseDown,ft=et.onMouseEnter,pt=et.onMouseLeave,mt=et.pressed;et.size;var ht=et.src,Et=et.tabIndex,yt=Et===void 0?0:Et,vt=et.text,gt=et.title,St=function(Ct){Ct.preventDefault(),!rt&&ot&&ot(Ct)},Rt=function(Ct){!rt&&dt&&dt(Ct)},$t=function(Ct){!rt&&st&&st(Ct)},bt=function(Ct){!rt&&ct&&ct(Ct)},wt=function(Ct){ut&&!rt&&ut(Ct)},xt=clsx(nt,"icon-button",{active:tt,disabled:rt});return _createRawReactElement("button",{"aria-label":gt,"aria-pressed":mt,"aria-expanded":at,title:gt,className:xt,onClick:St,onMouseDown:Rt,onKeyDown:$t,onKeyUp:bt,onKeyPress:wt,onMouseEnter:ft,onMouseLeave:pt,tabIndex:yt,disabled:rt,type:"button"},void 0,_createRawReactElement("div",{},void 0,_createRawReactElement(Icon,{className:it,src:ht,"aria-hidden":"true"})),vt&&_createRawReactElement("span",{className:"icon-button__text"},void 0,vt))};const BUNDLE_FETCH_REQUEST="BUNDLE_FETCH_REQUEST",BUNDLE_FETCH_SUCCESS="BUNDLE_FETCH_SUCCESS",BUNDLE_FETCH_FAIL="BUNDLE_FETCH_FAIL",fetchBundleRequest=_e=>({type:BUNDLE_FETCH_REQUEST,skipLoading:_e}),fetchBundleSuccess=_e=>({type:BUNDLE_FETCH_SUCCESS,skipLoading:_e}),fetchBundleFail=(_e,et)=>({type:BUNDLE_FETCH_FAIL,error:_e,skipLoading:et});var $$7=_export,global$3=global$w,setToStringTag$1=setToStringTag$7;$$7({global:!0},{Reflect:{}});setToStringTag$1(global$3.Reflect,"Reflect",!0);var uncurryThis$6=functionUncurryThis,aCallable$1=aCallable$b,isObject$5=isObject$u,hasOwn$2=hasOwnProperty_1,arraySlice=arraySlice$4,NATIVE_BIND=functionBindNative,$Function=Function,concat$1=uncurryThis$6([].concat),join=uncurryThis$6([].join),factories={},construct=function(_e,et,tt){if(!hasOwn$2(factories,et)){for(var nt=[],rt=0;rt1?arguments[1]:void 0),pt;pt=pt?pt.next:dt.first;)for(ft(pt.value,pt.key,this);pt&&pt.removed;)pt=pt.previous},has:function(ut){return!!st(this,ut)}}),defineBuiltIns(at,tt?{get:function(ut){var dt=st(this,ut);return dt&&dt.value},set:function(ut,dt){return ot(this,ut===0?0:ut,dt)}}:{add:function(ut){return ot(this,ut=ut===0?0:ut,ut)}}),DESCRIPTORS$1&&defineBuiltInAccessor(at,"size",{configurable:!0,get:function(){return it(this).size}}),rt},setStrong:function(_e,et,tt){var nt=et+" Iterator",rt=internalStateGetterFor(et),at=internalStateGetterFor(nt);defineIterator(_e,et,function(it,ot){setInternalState$1(this,{type:nt,target:it,state:rt(it),kind:ot,last:void 0})},function(){for(var it=at(this),ot=it.kind,st=it.last;st&&st.removed;)st=st.previous;return!it.target||!(it.last=st=st?st.next:it.state.first)?(it.target=void 0,createIterResultObject$1(void 0,!0)):createIterResultObject$1(ot==="keys"?st.key:ot==="values"?st.value:[st.key,st.value],!1)},tt?"entries":"values",!tt,!0),setSpecies(et)}},collection=collection$1,collectionStrong=collectionStrong$1;collection("Map",function(_e){return function(){return _e(this,arguments.length?arguments[0]:void 0)}},collectionStrong);function _createSuper$4(_e){var et=_isNativeReflectConstruct$4();return function(){var nt=_getPrototypeOf$1(_e),rt;if(et){var at=_getPrototypeOf$1(this).constructor;rt=Reflect.construct(nt,arguments,at)}else rt=nt.apply(this,arguments);return _possibleConstructorReturn$1(this,rt)}}function _isNativeReflectConstruct$4(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var emptyComponent=function _e(){return null},noop$1=function _e(){},Bundle=function(_e){_inherits$1(tt,_e);var et=_createSuper$4(tt);function tt(){var nt;_classCallCheck$1(this,tt);for(var rt=arguments.length,at=new Array(rt),it=0;it=st||dt?_createRawReactElement(at,{}):null:ut===null?_createRawReactElement(it,{onRetry:this.load}):ot(ut)}}]),tt}(React$3.PureComponent);_defineProperty$7(Bundle,"defaultProps",{loading:emptyComponent,error:emptyComponent,renderDelay:0,onFetch:noop$1,onFetchSuccess:noop$1,onFetchFail:noop$1});_defineProperty$7(Bundle,"cache",new Map);var mapDispatchToProps$2=function _e(et){return{onFetch:function(){et(fetchBundleRequest())},onFetchSuccess:function(){et(fetchBundleSuccess())},onFetchFail:function(nt){et(fetchBundleFail(nt))}}};const BundleContainer=connect(null,mapDispatchToProps$2)(Bundle);var messages$X={birthdayPlaceholder:{id:"edit_profile.fields.birthday_placeholder",defaultMessage:"Your birthday"},previousMonth:{id:"datepicker.previous_month",defaultMessage:"Previous month"},nextMonth:{id:"datepicker.next_month",defaultMessage:"Next month"},previousYear:{id:"datepicker.previous_year",defaultMessage:"Previous year"},nextYear:{id:"datepicker.next_year",defaultMessage:"Next year"}},BirthdayInput=function _e(et){var tt=et.value,nt=et.onChange,rt=et.required,at=useIntl(),it=useFeatures(),ot=useInstance(),st=it.birthdays,ct=ot.pleroma.metadata.birthday_min_age,ut=reactExports.useMemo(function(){if(!st)return null;var mt=new Date;return mt=new Date(mt.getTime()-ct*1e3*60*60*24+mt.getTimezoneOffset()*1e3*60),mt},[ct]),dt=reactExports.useMemo(function(){if(!st||!tt)return null;var mt=new Date(tt);return new Date(mt.getTime()+mt.getTimezoneOffset()*6e4)},[tt]);if(!st)return null;var ft=function(ht){var Et=ht.decreaseMonth,yt=ht.increaseMonth,vt=ht.prevMonthButtonDisabled,gt=ht.nextMonthButtonDisabled,St=ht.decreaseYear,Rt=ht.increaseYear,$t=ht.prevYearButtonDisabled,bt=ht.nextYearButtonDisabled,wt=ht.date;return _createRawReactElement("div",{className:"flex flex-col gap-2"},void 0,_createRawReactElement("div",{className:"flex items-center justify-between"},void 0,_createRawReactElement(IconButton,{className:"datepicker__button rtl:rotate-180",src:vitePluginRequire_1697864669074_22691868,onClick:Et,disabled:vt,"aria-label":at.formatMessage(messages$X.previousMonth),title:at.formatMessage(messages$X.previousMonth)}),at.formatDate(wt,{month:"long"}),_createRawReactElement(IconButton,{className:"datepicker__button rtl:rotate-180",src:vitePluginRequire_1697864669800_65455099,onClick:yt,disabled:gt,"aria-label":at.formatMessage(messages$X.nextMonth),title:at.formatMessage(messages$X.nextMonth)})),_createRawReactElement("div",{className:"flex items-center justify-between"},void 0,_createRawReactElement(IconButton,{className:"datepicker__button rtl:rotate-180",src:vitePluginRequire_1697864669074_22691868,onClick:St,disabled:$t,"aria-label":at.formatMessage(messages$X.previousYear),title:at.formatMessage(messages$X.previousYear)}),at.formatDate(wt,{year:"numeric"}),_createRawReactElement(IconButton,{className:"datepicker__button rtl:rotate-180",src:vitePluginRequire_1697864669800_65455099,onClick:Rt,disabled:bt,"aria-label":at.formatMessage(messages$X.nextYear),title:at.formatMessage(messages$X.nextYear)})))},pt=function(ht){return nt(ht?new Date(ht.getTime()-ht.getTimezoneOffset()*6e4).toISOString().slice(0,10):"")};return _createRawReactElement("div",{className:"relative mt-1 rounded-md shadow-sm"},void 0,_createRawReactElement(BundleContainer,{fetchComponent:DatePicker},void 0,function(mt){return _createRawReactElement(mt,{selected:dt,wrapperClassName:"react-datepicker-wrapper",onChange:pt,placeholderText:at.formatMessage(messages$X.birthdayPlaceholder),minDate:new Date("1900-01-01"),maxDate:ut,required:rt,renderCustomHeader:ft,isClearable:!rt})}))},noOp$5=function _e(){},messages$W={placeholder:{id:"registration.captcha.placeholder",defaultMessage:"Enter the pictured text"}},CaptchaField=function _e(et){var tt=et.name,nt=et.value,rt=et.onChange,at=rt===void 0?noOp$5:rt,it=et.onFetch,ot=it===void 0?noOp$5:it,st=et.onFetchFail,ct=st===void 0?noOp$5:st,ut=et.onClick,dt=ut===void 0?noOp$5:ut,ft=et.refreshInterval,pt=ft===void 0?5*60*1e3:ft,mt=et.idempotencyKey,ht=useAppDispatch(),Et=reactExports.useState(Map$3()),yt=_slicedToArray$4(Et,2),vt=yt[0],gt=yt[1],St=reactExports.useState(void 0),Rt=_slicedToArray$4(St,2),$t=Rt[0],bt=Rt[1],wt=function(){ht(fetchCaptcha()).then(function(Nt){var At=Map$3(Nt.data);gt(At),ot(At)}).catch(function(Nt){ct(Nt)})},xt=function(){if(pt){var Nt=setInterval(wt,pt);bt(Nt)}},Tt=function(){$t&&clearInterval($t)};switch(reactExports.useEffect(function(){return wt(),Tt(),xt(),function(){Tt()}},[mt]),vt.get("type")){case"native":return _createRawReactElement("div",{},void 0,_createRawReactElement(Text$2,{},void 0,_createRawReactElement(FormattedMessage$1,{id:"registration.captcha.hint",defaultMessage:"Click the image to get a new captcha"})),_createRawReactElement(NativeCaptchaField,{captcha:vt,onChange:at,onClick:dt,name:tt,value:nt}));case"none":default:return null}},NativeCaptchaField=function _e(et){var tt=et.captcha,nt=et.onChange,rt=et.onClick,at=et.name,it=et.value,ot=useIntl();return _createRawReactElement(Stack,{space:2},void 0,_createRawReactElement("div",{className:"flex w-full items-center justify-center rounded-md border border-solid border-gray-300 bg-white dark:border-gray-600"},void 0,_createRawReactElement("img",{alt:"captcha",src:tt.get("url"),onClick:rt})),_createRawReactElement(Input,{type:"text",placeholder:ot.formatMessage(messages$W.placeholder),name:at,value:it,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",onChange:nt,required:!0}))},messages$V={username:{id:"registration.fields.username_placeholder",defaultMessage:"Username"},username_hint:{id:"registration.fields.username_hint",defaultMessage:"Only letters, numbers, and underscores are allowed."},usernameUnavailable:{id:"registration.username_unavailable",defaultMessage:"Username is already taken."},email:{id:"registration.fields.email_placeholder",defaultMessage:"E-Mail address"},password:{id:"registration.fields.password_placeholder",defaultMessage:"Password"},passwordMismatch:{id:"registration.password_mismatch",defaultMessage:"Passwords don't match."},confirm:{id:"registration.fields.confirm_placeholder",defaultMessage:"Password (again)"},agreement:{id:"registration.agreement",defaultMessage:"I agree to the {tos}."},tos:{id:"registration.tos",defaultMessage:"Terms of Service"},close:{id:"registration.confirmation_modal.close",defaultMessage:"Close"},newsletter:{id:"registration.newsletter",defaultMessage:"Subscribe to newsletter."},needsConfirmationHeader:{id:"confirmations.register.needs_confirmation.header",defaultMessage:"Confirmation needed"},needsApprovalHeader:{id:"confirmations.register.needs_approval.header",defaultMessage:"Approval needed"},reasonHint:{id:"registration.reason_hint",defaultMessage:"This will help us review your application"}},RegistrationForm=function _e(et){var tt=et.inviteToken,nt=useIntl(),rt=useHistory(),at=useAppDispatch(),it=useSettings(),ot=useFeatures(),st=useInstance(),ct=it.get("locale"),ut=!!st.pleroma.metadata.account_activation_required,dt=st.approval_required,ft=ot.emailList,pt=ot.accountLookup,mt=st.pleroma.metadata.birthday_required,ht=reactExports.useState(!0),Et=_slicedToArray$4(ht,2),yt=Et[0],vt=Et[1],gt=reactExports.useState(!1),St=_slicedToArray$4(gt,2),Rt=St[0],$t=St[1],bt=reactExports.useState(Map$3()),wt=_slicedToArray$4(bt,2),xt=wt[0],Tt=wt[1],Ct=reactExports.useState(v4()),Nt=_slicedToArray$4(Ct,2),At=Nt[0],kt=Nt[1],Pt=reactExports.useState(!1),Ft=_slicedToArray$4(Pt,2),Dt=Ft[0],Lt=Ft[1],It=reactExports.useState(""),Ot=_slicedToArray$4(It,2),Ut=Ot[0],jt=Ot[1],zt=reactExports.useState(!1),Qt=_slicedToArray$4(zt,2),Xt=Qt[0],Yt=Qt[1],Bt=reactExports.useRef(axios$1.CancelToken.source()),Kt=function(){return Bt.current.cancel(),Bt.current=axios$1.CancelToken.source(),Bt.current},Wt=function($n){Tt(xt.merge(Map$3($n)))},sn=function($n){Wt(_defineProperty$7({},$n.target.name,$n.target.value))},pn=function($n){Wt({username:$n.target.value}),Lt(!1),Bt.current.cancel(),Fn($n.target.value)},mn=function($n){Wt(_defineProperty$7({},$n.target.name,$n.target.checked))},hn=function($n){var Ln=$n.target.value;sn($n),Ln===Ut&&Yt(!1)},_n=function($n){var Ln=xt.get("password",""),Gn=$n.target.value;jt(Gn),Ln===Gn&&Yt(!1)},En=function(){Yt(!Mn())},On=function($n){Wt({birthday:$n})},Cn=function(){var $n=React$3.createElement(React$3.Fragment,null,ut&&_createRawReactElement("p",{},void 0,_createRawReactElement(FormattedMessage$1,{id:"confirmations.register.needs_confirmation",defaultMessage:"Please check your inbox at {email} for confirmation instructions. You will need to verify your email address to continue.",values:{email:_createRawReactElement("strong",{},void 0,xt.get("email"))}})),dt&&_createRawReactElement("p",{},void 0,_createRawReactElement(FormattedMessage$1,{id:"confirmations.register.needs_approval",defaultMessage:"Your account will be manually approved by an admin. Please be patient while we review your details."})));at(openModal("CONFIRM",{icon:vitePluginRequire_1697864666744_94924775,heading:ut?nt.formatMessage(messages$V.needsConfirmationHeader):dt?nt.formatMessage(messages$V.needsApprovalHeader):void 0,message:$n,confirm:nt.formatMessage(messages$V.close)}))},Tn=function($n){var Ln=$n.access_token;return ut||dt?Cn():at(verifyCredentials(Ln)).then(function(){rt.push("/")})},Mn=function(){return xt.get("password","")===Ut},Fn=reactExports.useCallback(debounce$2(function(Pn){if(pt){var $n=Kt();at(accountLookup(Pn,$n.token)).then(function(Ln){Lt(!!Ln)}).catch(function(Ln){var Gn;((Gn=Ln.response)===null||Gn===void 0?void 0:Gn.status)===404&&Lt(!1)})}},1e3,{trailing:!0}),[]),zn=function(){if(!Mn()){Yt(!0);return}var $n=xt.withMutations(function(Ln){Ln.set("locale",ct),tt&&Ln.set("token",tt)});$t(!0),at(register$1($n.toJS())).then(Tn).catch(function(){$t(!1),Zn()})},Dn=function(){Zn()},Bn=function($n){vt(!1),Wt({captcha_token:$n.get("token"),captcha_answer_data:$n.get("answer_data")})},Vn=function(){vt(!1)},Zn=function(){kt(v4()),Wt({captcha_solution:""})},er=yt||Rt;return _createRawReactElement(Form,{onSubmit:zn,"data-testid":"registrations-open"},void 0,_createRawReactElement("fieldset",{disabled:er,className:"space-y-3"},void 0,React$3.createElement(React$3.Fragment,null,_createRawReactElement(FormGroup,{hintText:nt.formatMessage(messages$V.username_hint),errors:Dt?[nt.formatMessage(messages$V.usernameUnavailable)]:void 0},void 0,_createRawReactElement(Input,{type:"text",name:"username",placeholder:nt.formatMessage(messages$V.username),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",pattern:"^[a-zA-Z\\d_-]+",icon:vitePluginRequire_1697864655029_83209601,onChange:pn,value:xt.get("username",""),required:!0})),_createRawReactElement(Input,{type:"email",name:"email",placeholder:nt.formatMessage(messages$V.email),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",onChange:sn,value:xt.get("email",""),required:!0}),_createRawReactElement(Input,{type:"password",name:"password",placeholder:nt.formatMessage(messages$V.password),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",onChange:hn,value:xt.get("password",""),required:!0}),_createRawReactElement(FormGroup,{errors:Xt?[nt.formatMessage(messages$V.passwordMismatch)]:void 0},void 0,_createRawReactElement(Input,{type:"password",name:"password_confirmation",placeholder:nt.formatMessage(messages$V.confirm),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",onChange:_n,onBlur:En,value:Ut,required:!0})),mt&&_createRawReactElement(BirthdayInput,{value:xt.get("birthday"),onChange:On,required:!0}),dt&&_createRawReactElement(FormGroup,{labelText:_createRawReactElement(FormattedMessage$1,{id:"registration.reason",defaultMessage:"Why do you want to join?"})},void 0,_createRawReactElement(Textarea,{name:"reason",placeholder:nt.formatMessage(messages$V.reasonHint),maxLength:500,onChange:sn,value:xt.get("reason",""),autoGrow:!0,required:!0})),_createRawReactElement(CaptchaField,{onFetch:Bn,onFetchFail:Vn,onChange:sn,onClick:Dn,idempotencyKey:At,name:"captcha_solution",value:xt.get("captcha_solution","")}),_createRawReactElement(FormGroup,{labelText:nt.formatMessage(messages$V.agreement,{tos:_createRawReactElement(Link$2,{to:"/about/tos",target:"_blank"},0,nt.formatMessage(messages$V.tos))})},void 0,_createRawReactElement(Checkbox,{name:"agreement",onChange:mn,checked:xt.get("agreement",!1),required:!0})),ft&&_createRawReactElement(FormGroup,{labelText:nt.formatMessage(messages$V.newsletter)},void 0,_createRawReactElement(Checkbox,{name:"accepts_email_list",onChange:mn,checked:xt.get("accepts_email_list",!1)})),_createRawReactElement(FormActions,{},void 0,_createRawReactElement(Button,{type:"submit"},void 0,_createRawReactElement(FormattedMessage$1,{id:"registration.sign_up",defaultMessage:"Sign up"}))))))};const fetchExternalInstance=_e=>baseClient(null,_e).get("/api/v1/instance").then(({data:et})=>normalizeInstance(et)).catch(et=>{var tt;if(((tt=et.response)==null?void 0:tt.status)===401)return instanceSchema.parse({});throw et}),createExternalApp=(_e,et)=>(tt,nt)=>{if(getQuirks(_e).noApps)return new Promise(at=>at({}));const rt={client_name:sourceCode.displayName,redirect_uris:`${window.location.origin}/login/external`,website:sourceCode.homepage,scopes:getInstanceScopes(_e)};return tt(createApp(rt,et))},externalAuthorize=(_e,et)=>(tt,nt)=>{const rt=getInstanceScopes(_e);return tt(createExternalApp(_e,et)).then(at=>{const{client_id:it,redirect_uri:ot}=at,st=new URLSearchParams({client_id:it,redirect_uri:ot,response_type:"code",scope:rt});localStorage.setItem("soapbox:external:app",JSON.stringify(at)),localStorage.setItem("soapbox:external:baseurl",et),localStorage.setItem("soapbox:external:scopes",rt),window.location.href=`${et}/oauth/authorize?${st.toString()}`})},externalLogin=_e=>et=>{const tt=parseBaseURL(_e)||parseBaseURL(`https://${_e}`);return fetchExternalInstance(tt).then(nt=>{et(externalAuthorize(nt,tt))})},loginWithCode=_e=>et=>{const{client_id:tt,client_secret:nt,redirect_uri:rt}=JSON.parse(localStorage.getItem("soapbox:external:app")),at=localStorage.getItem("soapbox:external:baseurl"),it=localStorage.getItem("soapbox:external:scopes");return et(obtainOAuthToken({client_id:tt,client_secret:nt,redirect_uri:rt,grant_type:"authorization_code",scope:it,code:_e},at)).then(st=>et(authLoggedIn(st))).then(({access_token:st})=>et(verifyCredentials(st,at))).then(st=>et(switchAccount(st.id))).then(()=>window.location.href="/")};var messages$U={instanceLabel:{id:"login.fields.instance_label",defaultMessage:"Instance"},instancePlaceholder:{id:"login.fields.instance_placeholder",defaultMessage:"example.com"},instanceFailed:{id:"login_external.errors.instance_fail",defaultMessage:"The instance returned an error."},networkFailed:{id:"login_external.errors.network_fail",defaultMessage:"Connection failed. Is a browser extension blocking it?"}},ExternalLoginForm=function _e(){var et=new URLSearchParams(window.location.search),tt=et.get("code"),nt=et.get("server"),rt=useIntl(),at=useAppDispatch(),it=reactExports.useState(nt||""),ot=_slicedToArray$4(it,2),st=ot[0],ct=ot[1],ut=reactExports.useState(!1),dt=_slicedToArray$4(ut,2),ft=dt[0],pt=dt[1],mt=function(yt){var vt=yt.currentTarget;ct(vt.value)},ht=function(){pt(!0),at(externalLogin(st)).then(function(){return pt(!1)}).catch(function(yt){var vt;console.error(yt);var gt=(vt=yt.response)===null||vt===void 0?void 0:vt.status;gt?toast.error(rt.formatMessage(messages$U.instanceFailed)):!gt&&yt.code==="ERR_NETWORK"&&toast.error(rt.formatMessage(messages$U.networkFailed)),nt&&window.history.pushState(null,"",window.location.pathname),pt(!1)})};return reactExports.useEffect(function(){tt&&at(loginWithCode(tt))},[tt]),reactExports.useEffect(function(){nt&&!tt&&ht()},[nt]),tt||nt?_createRawReactElement(Spinner,{}):_createRawReactElement(Form,{onSubmit:ht,"data-testid":"external-login"},void 0,_createRawReactElement(FormGroup,{labelText:rt.formatMessage(messages$U.instanceLabel)},void 0,_createRawReactElement(Input,{"aria-label":rt.formatMessage(messages$U.instancePlaceholder),placeholder:rt.formatMessage(messages$U.instancePlaceholder),type:"text",name:"host",onChange:mt,autoCorrect:"off",autoCapitalize:"off",required:!0})),_createRawReactElement(FormActions,{},void 0,_createRawReactElement(Button,{theme:"primary",type:"submit",disabled:ft},void 0,_createRawReactElement(FormattedMessage$1,{id:"login.log_in",defaultMessage:"Log in"}))))},Footer=function _e(){var et=useAppSelector(function(at){var it=getSoapboxConfig(at);return{copyright:it.copyright,navlinks:it.navlinks.get("homeFooter")||List$1(),locale:getSettings(at).get("locale")}}),tt=et.copyright,nt=et.navlinks,rt=et.locale;return _createRawReactElement("footer",{className:"relative mx-auto mt-auto max-w-7xl px-4 py-12 sm:px-6 lg:px-8 xl:flex xl:items-center xl:justify-between"},void 0,_createRawReactElement("div",{className:"flex flex-wrap justify-center"},void 0,nt.map(function(at,it){var ot=at.get("url"),st=ot.startsWith("http"),ct=st?"a":Link$2,ut=st?{href:ot,target:"_blank"}:{to:ot};return _createRawReactElement("div",{className:"px-5 py-2"},it,React$3.createElement(ct,_extends$4({},ut,{className:"text-primary-600 hover:underline dark:text-primary-400"}),_createRawReactElement(Text$2,{tag:"span",theme:"inherit",size:"sm"},void 0,at.getIn(["titleLocales",rt])||at.get("title"))))})),_createRawReactElement("div",{className:"mt-6 xl:mt-0"},void 0,_createRawReactElement(Text$2,{theme:"muted",align:"center",size:"sm"},void 0,tt)))},RegisterInvite=function _e(){var et=useInstance(),tt=useParams(),nt=tt.token,rt=_createRawReactElement(FormattedMessage$1,{id:"register_invite.title",defaultMessage:"You've been invited to join {siteTitle}!",values:{siteTitle:et.title}});return _createRawReactElement(Stack,{space:3},void 0,_createRawReactElement(Stack,{className:"mb-4"},void 0,_createRawReactElement(CardTitle,{title:rt}),_createRawReactElement(Text$2,{theme:"muted"},void 0,_createRawReactElement(FormattedMessage$1,{id:"register_invite.lead",defaultMessage:"Complete the form below to create an account."}))),_createRawReactElement(RegistrationForm,{inviteToken:nt}))};function ownKeys$b(_e,et){var tt=Object.keys(_e);if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(_e);et&&(nt=nt.filter(function(rt){return Object.getOwnPropertyDescriptor(_e,rt).enumerable})),tt.push.apply(tt,nt)}return tt}function _objectSpread$a(_e){for(var et=1;et0&&EMAIL_REGEX.test(it),yt=React$3.useCallback(function(St){ot(St.target.value)},[]),vt=React$3.useCallback(function(St){St.preventDefault(),ht([]),gt()},[it]),gt=function(){return tt(requestEmailVerification(it)).then(function(){dt(Statuses$2.REQUESTED),toast.success(et.formatMessage(messages$R.verificationSuccess))}).catch(function(Rt){var $t,bt=($t=Rt.response)===null||$t===void 0||($t=$t.data)===null||$t===void 0?void 0:$t.error,wt=bt==="email_taken",xt=et.formatMessage(messages$R.verificationFail);wt?xt=et.formatMessage(messages$R.verificationFailTakenAlert):bt&&(xt=bt),wt&&ht([et.formatMessage(messages$R.verificationFailTaken)]),toast.error(xt),dt(Statuses$2.FAIL)})};return ut===Statuses$2.REQUESTED?_createRawReactElement(EmailSent,{handleSubmit:vt}):_createRawReactElement("div",{},void 0,_createRawReactElement("div",{className:"-mx-4 mb-4 border-b border-solid border-gray-200 pb-4 dark:border-gray-800 sm:-mx-10 sm:pb-10"},void 0,_createRawReactElement("h1",{className:"text-center text-2xl font-bold"},void 0,_createRawReactElement(FormattedMessage$1,{id:"email_verification.header",defaultMessage:"Enter your email address"}))),_createRawReactElement("div",{className:"mx-auto sm:w-2/3 sm:pt-10 md:w-1/2"},void 0,_createRawReactElement(Form,{onSubmit:vt},void 0,_createRawReactElement(FormGroup,{labelText:et.formatMessage(messages$R.emailLabel),errors:mt},void 0,_createRawReactElement(Input,{type:"email",value:it,name:"email",onChange:yt,placeholder:"you@email.com",required:!0})),_createRawReactElement("div",{className:"text-center"},void 0,_createRawReactElement(Button,{block:!0,theme:"primary",type:"submit",disabled:nt||!Et},void 0,_createRawReactElement(FormattedMessage$1,{id:"onboarding.next",defaultMessage:"Next"}))))))},lib$3={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.default=void 0;var et=rt(reactExports),tt=["placeholder","separator","isLastChild","inputStyle","focus","isDisabled","hasErrored","errorStyle","focusStyle","disabledStyle","shouldAutoFocus","isInputNum","index","value","className","isInputSecure"];function nt(At){if(typeof WeakMap!="function")return null;var kt=new WeakMap,Pt=new WeakMap;return(nt=function(Dt){return Dt?Pt:kt})(At)}function rt(At,kt){if(!kt&&At&&At.__esModule)return At;if(At===null||gt(At)!=="object"&&typeof At!="function")return{default:At};var Pt=nt(kt);if(Pt&&Pt.has(At))return Pt.get(At);var Ft={},Dt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Lt in At)if(Lt!=="default"&&Object.prototype.hasOwnProperty.call(At,Lt)){var It=Dt?Object.getOwnPropertyDescriptor(At,Lt):null;It&&(It.get||It.set)?Object.defineProperty(Ft,Lt,It):Ft[Lt]=At[Lt]}return Ft.default=At,Pt&&Pt.set(At,Ft),Ft}function at(){return at=Object.assign||function(At){for(var kt=1;kt=0)&&Object.prototype.propertyIsEnumerable.call(At,Ft)&&(Pt[Ft]=At[Ft])}return Pt}function ot(At,kt){if(At==null)return{};var Pt={},Ft=Object.keys(At),Dt,Lt;for(Lt=0;Lt=0)&&(Pt[Dt]=At[Dt]);return Pt}function st(At,kt){if(!(At instanceof kt))throw new TypeError("Cannot call a class as a function")}function ct(At,kt){for(var Pt=0;Pt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function yt(At){return yt=Object.setPrototypeOf?Object.getPrototypeOf:function(Pt){return Pt.__proto__||Object.getPrototypeOf(Pt)},yt(At)}function vt(At,kt,Pt){return kt in At?Object.defineProperty(At,kt,{value:Pt,enumerable:!0,configurable:!0,writable:!0}):At[kt]=Pt,At}function gt(At){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gt=function(Pt){return typeof Pt}:gt=function(Pt){return Pt&&typeof Symbol=="function"&&Pt.constructor===Symbol&&Pt!==Symbol.prototype?"symbol":typeof Pt},gt(At)}var St=8,Rt=37,$t=39,bt=46,wt=32,xt=function(kt){return gt(kt)==="object"},Tt=function(At){dt(Pt,At);var kt=pt(Pt);function Pt(Ft){var Dt;return st(this,Pt),Dt=kt.call(this,Ft),vt(ht(Dt),"getClasses",function(){for(var Lt=arguments.length,It=new Array(Lt),Ot=0;Ot0&&console.error("Length of the placeholder should be equal to the number of inputs.")}}),vt(ht(Ft),"handleOtpChange",function(Ot){var Ut=Ft.props.onChange,jt=Ot.join("");Ut(jt)}),vt(ht(Ft),"isInputValueValid",function(Ot){var Ut=Ft.props.isInputNum?!isNaN(parseInt(Ot,10)):typeof Ot=="string";return Ut&&Ot.trim().length===1}),vt(ht(Ft),"focusInput",function(Ot){var Ut=Ft.props.numInputs,jt=Math.max(Math.min(Ut-1,Ot),0);Ft.setState({activeInput:jt})}),vt(ht(Ft),"focusNextInput",function(){var Ot=Ft.state.activeInput;Ft.focusInput(Ot+1)}),vt(ht(Ft),"focusPrevInput",function(){var Ot=Ft.state.activeInput;Ft.focusInput(Ot-1)}),vt(ht(Ft),"changeCodeAtFocus",function(Ot){var Ut=Ft.state.activeInput,jt=Ft.getOtpValue();jt[Ut]=Ot[0],Ft.handleOtpChange(jt)}),vt(ht(Ft),"handleOnPaste",function(Ot){Ot.preventDefault();var Ut=Ft.state.activeInput,jt=Ft.props,zt=jt.numInputs,Qt=jt.isDisabled;if(!Qt){for(var Xt=Ft.getOtpValue(),Yt=Ut,Bt=Ot.clipboardData.getData("text/plain").slice(0,zt-Ut).split(""),Kt=0;Kt=Ut&&Bt.length>0&&(Xt[Kt]=Bt.shift(),Yt++);Ft.setState({activeInput:Yt},function(){Ft.focusInput(Yt),Ft.handleOtpChange(Xt)})}}),vt(ht(Ft),"handleOnChange",function(Ot){var Ut=Ot.target.value;Ft.isInputValueValid(Ut)&&Ft.changeCodeAtFocus(Ut)}),vt(ht(Ft),"handleOnKeyDown",function(Ot){Ot.keyCode===St||Ot.key==="Backspace"?(Ot.preventDefault(),Ft.changeCodeAtFocus(""),Ft.focusPrevInput()):Ot.keyCode===bt||Ot.key==="Delete"?(Ot.preventDefault(),Ft.changeCodeAtFocus("")):Ot.keyCode===Rt||Ot.key==="ArrowLeft"?(Ot.preventDefault(),Ft.focusPrevInput()):Ot.keyCode===$t||Ot.key==="ArrowRight"?(Ot.preventDefault(),Ft.focusNextInput()):(Ot.keyCode===wt||Ot.key===" "||Ot.key==="Spacebar"||Ot.key==="Space")&&Ot.preventDefault()}),vt(ht(Ft),"handleOnInput",function(Ot){if(Ft.isInputValueValid(Ot.target.value))Ft.focusNextInput();else if(!Ft.props.isInputNum){var Ut=Ot.nativeEvent;Ut.data===null&&Ut.inputType==="deleteContentBackward"&&(Ot.preventDefault(),Ft.changeCodeAtFocus(""),Ft.focusPrevInput())}}),vt(ht(Ft),"renderInputs",function(){for(var Ot=Ft.state.activeInput,Ut=Ft.props,jt=Ut.numInputs,zt=Ut.inputStyle,Qt=Ut.focusStyle,Xt=Ut.separator,Yt=Ut.isDisabled,Bt=Ut.disabledStyle,Kt=Ut.hasErrored,Wt=Ut.errorStyle,sn=Ut.shouldAutoFocus,pn=Ut.isInputNum,mn=Ut.isInputSecure,hn=Ut.className,_n=[],En=Ft.getOtpValue(),On=Ft.getPlaceholderValue(),Cn=Ft.props["data-cy"],Tn=Ft.props["data-testid"],Mn=function(Dn){_n.push(et.default.createElement(Tt,{placeholder:On&&On[Dn],key:Dn,index:Dn,focus:Ot===Dn,value:En&&En[Dn],onChange:Ft.handleOnChange,onKeyDown:Ft.handleOnKeyDown,onInput:Ft.handleOnInput,onPaste:Ft.handleOnPaste,onFocus:function(Vn){Ft.setState({activeInput:Dn}),Vn.target.select()},onBlur:function(){return Ft.setState({activeInput:-1})},separator:Xt,inputStyle:zt,focusStyle:Qt,isLastChild:Dn===jt-1,isDisabled:Yt,disabledStyle:Bt,hasErrored:Kt,errorStyle:Wt,shouldAutoFocus:sn,isInputNum:pn,isInputSecure:mn,className:hn,"data-cy":Cn&&"".concat(Cn,"-").concat(Dn),"data-testid":Tn&&"".concat(Tn,"-").concat(Dn)}))},Fn=0;Fn({type:PROFILE_HOVER_CARD_OPEN,ref:_e,accountId:et}),updateProfileHoverCard=()=>({type:PROFILE_HOVER_CARD_UPDATE}),closeProfileHoverCard=(_e=!1)=>({type:PROFILE_HOVER_CARD_CLOSE,force:_e});var showProfileHoverCard=debounce$2(function(_e,et,tt){_e(openProfileHoverCard(et,tt))},600),HoverRefWrapper=function _e(et){var tt=et.accountId,nt=et.children,rt=et.inline,at=rt===void 0?!1:rt,it=et.className,ot=useAppDispatch(),st=reactExports.useRef(null),ct=at?"span":"div",ut=function(){isMobile(window.innerWidth)||(ot(fetchAccount(tt)),showProfileHoverCard(ot,st,tt))},dt=function(){showProfileHoverCard.cancel(),setTimeout(function(){return ot(closeProfileHoverCard())},300)},ft=function(){showProfileHoverCard.cancel(),ot(closeProfileHoverCard(!0))};return React$3.createElement(ct,{ref:st,className:clsx("hover-ref-wrapper",it),onMouseEnter:ut,onMouseLeave:dt,onClick:ft},nt)};const vitePluginRequire_1697864663391_99513036="/packs/assets/verified-d0505451.svg";var messages$N={verified:{id:"account.verified",defaultMessage:"Verified Account"}},VerificationBadge=function _e(et){var tt=et.className,nt=useIntl(),rt=useSoapboxConfig(),at=rt.verifiedIcon||vitePluginRequire_1697864663391_99513036,it=at.endsWith(".svg")?Icon$1:"img";return _createRawReactElement("span",{className:"verified-icon","data-testid":"verified-badge"},void 0,_createRawReactElement(it,{className:clsx("w-4 text-accent-500",tt),src:at,alt:nt.formatMessage(messages$N.verified)}))};const vitePluginRequire_1697864656348_26092255="/packs/assets/plus-5c8a6778.svg",vitePluginRequire_1697864669750_71014420="/packs/assets/ban-3255c86b.svg";var messages$M={block:{id:"account.block",defaultMessage:"Block @{name}"},blocked:{id:"account.blocked",defaultMessage:"Blocked"},edit_profile:{id:"account.edit_profile",defaultMessage:"Edit profile"},follow:{id:"account.follow",defaultMessage:"Follow"},mute:{id:"account.mute",defaultMessage:"Mute @{name}"},remote_follow:{id:"account.remote_follow",defaultMessage:"Remote follow"},requested:{id:"account.requested",defaultMessage:"Awaiting approval"},unblock:{id:"account.unblock",defaultMessage:"Unblock @{name}"},unfollow:{id:"account.unfollow",defaultMessage:"Unfollow"},unmute:{id:"account.unmute",defaultMessage:"Unmute @{name}"},authorize:{id:"follow_request.authorize",defaultMessage:"Authorize"},reject:{id:"follow_request.reject",defaultMessage:"Reject"}},ActionButton=function _e(et){var tt=et.account,nt=et.actionType;et.small;var rt=useAppDispatch(),at=useFeatures(),it=useIntl(),ot=useLoggedIn(),st=ot.isLoggedIn,ct=ot.me,ut=useFollow(),dt=ut.follow,ft=ut.unfollow,pt=function(){var Dt,Lt;(Dt=tt.relationship)!==null&&Dt!==void 0&&Dt.following||(Lt=tt.relationship)!==null&&Lt!==void 0&&Lt.requested?ft(tt.id):dt(tt.id)},mt=function(){var Dt;(Dt=tt.relationship)!==null&&Dt!==void 0&&Dt.blocking?rt(unblockAccount(tt.id)):rt(blockAccount(tt.id))},ht=function(){var Dt;(Dt=tt.relationship)!==null&&Dt!==void 0&&Dt.muting?rt(unmuteAccount(tt.id)):rt(muteAccount(tt.id))},Et=function(){rt(authorizeFollowRequest(tt.id))},yt=function(){rt(rejectFollowRequest(tt.id))},vt=function(){rt(openModal("UNAUTHORIZED",{action:"FOLLOW",account:tt.id,ap_id:tt.url}))},gt=function(){var Dt,Lt=(Dt=tt.relationship)===null||Dt===void 0?void 0:Dt.muting,It=Lt?messages$M.unmute:messages$M.mute,Ot=it.formatMessage(It,{name:tt.username});return _createRawReactElement(Button,{theme:Lt?"danger":"secondary",size:"sm",text:Ot,onClick:ht})},St=function(){var Dt,Lt=(Dt=tt.relationship)===null||Dt===void 0?void 0:Dt.blocking,It=Lt?messages$M.unblock:messages$M.block,Ot=it.formatMessage(It,{name:tt.username});return _createRawReactElement(Button,{theme:Lt?"danger":"secondary",size:"sm",text:Ot,onClick:mt})},Rt=function(){var Dt;return(Dt=tt.relationship)!==null&&Dt!==void 0&&Dt.followed_by?null:_createRawReactElement(HStack,{space:2},void 0,_createRawReactElement(Button,{theme:"secondary",size:"sm",text:it.formatMessage(messages$M.authorize),onClick:Et}),_createRawReactElement(Button,{theme:"danger",size:"sm",text:it.formatMessage(messages$M.reject),onClick:yt}))},$t=function(){return at.remoteInteractions?_createRawReactElement(Button,{onClick:vt,icon:vitePluginRequire_1697864656348_26092255,text:it.formatMessage(messages$M.follow),size:"sm"}):at.pleromaRemoteFollow?_createRawReactElement("form",{method:"POST",action:"/main/ostatus"},void 0,_createRawReactElement("input",{type:"hidden",name:"nickname",value:tt.acct}),_createRawReactElement("input",{type:"hidden",name:"profile",value:""}),_createRawReactElement(Button,{text:it.formatMessage(messages$M.remote_follow),type:"submit",size:"sm"})):null},bt=function(){return at.federating?$t():null};if(!st)return bt();if(ct!==tt.id){var wt,xt,Tt,Ct,Nt,At,kt=(wt=tt.relationship)===null||wt===void 0?void 0:wt.following,Pt=(xt=tt.relationship)===null||xt===void 0?void 0:xt.blocked_by;if(nt){if(nt==="muting")return gt();if(nt==="blocking")return St();if(nt==="follow_request")return Rt()}if(tt.relationship){if((Tt=tt.relationship)!==null&&Tt!==void 0&&Tt.requested)return _createRawReactElement(Button,{size:"sm",theme:"tertiary",text:it.formatMessage(messages$M.requested),onClick:pt});if(!((Ct=tt.relationship)!==null&&Ct!==void 0&&Ct.blocking)&&!((Nt=tt.relationship)!==null&&Nt!==void 0&&Nt.muting))return _createRawReactElement(Button,{size:"sm",disabled:Pt,theme:kt?"secondary":"primary",icon:Pt?vitePluginRequire_1697864669750_71014420:!kt&&vitePluginRequire_1697864656348_26092255,onClick:pt},void 0,kt?it.formatMessage(messages$M.unfollow):it.formatMessage(Pt?messages$M.blocked:messages$M.follow));if((At=tt.relationship)!==null&&At!==void 0&&At.blocking)return _createRawReactElement(Button,{theme:"danger",size:"sm",text:it.formatMessage(messages$M.unblock,{name:tt.username}),onClick:mt})}else return null}else return _createRawReactElement(Button,{theme:"tertiary",size:"sm",text:it.formatMessage(messages$M.edit_profile),to:"/settings/profile"});return null},Badge=function _e(et){var tt=et.title,nt=et.slug,rt=!["patron","admin","moderator","opaque","badge:donor"].includes(nt);return _createRawReactElement("span",{"data-testid":"badge",className:clsx("inline-flex items-center rounded px-2 py-0.5 text-xs font-medium",{"bg-fuchsia-700 text-white":nt==="patron","bg-emerald-800 text-white":nt==="badge:donor","bg-black text-white":nt==="admin","bg-cyan-600 text-white":nt==="moderator","bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-gray-100":rt,"bg-white/75 text-gray-900":nt==="opaque"})},void 0,tt)},_excluded$a=["timestamp","intl","year","futureDate","theme"];function _createSuper$3(_e){var et=_isNativeReflectConstruct$3();return function(){var nt=_getPrototypeOf$1(_e),rt;if(et){var at=_getPrototypeOf$1(this).constructor;rt=Reflect.construct(nt,arguments,at)}else rt=nt.apply(this,arguments);return _possibleConstructorReturn$1(this,rt)}}function _isNativeReflectConstruct$3(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ownKeys$a(_e,et){var tt=Object.keys(_e);if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(_e);et&&(nt=nt.filter(function(rt){return Object.getOwnPropertyDescriptor(_e,rt).enumerable})),tt.push.apply(tt,nt)}return tt}function _objectSpread$9(_e){for(var et=1;et{let et="";for(let tt=0;tt<_e;tt++)et+=PLACEHOLDER_CHAR;return et},randomIntFromInterval=(_e,et)=>Math.floor(Math.random()*(et-_e+1)+_e);var PlaceholderCard=function _e(){return _createRawReactElement("div",{className:clsx("status-card",{"animate-pulse":!0})},void 0,_createRawReactElement("div",{className:"primary-500 w-2/5 rounded-l"},void 0," "),_createRawReactElement("div",{className:"flex w-3/5 flex-col justify-between break-words p-4 text-primary-50"},void 0,_createRawReactElement("p",{},void 0,generateText(randomIntFromInterval(5,25))),_createRawReactElement("p",{},void 0,generateText(randomIntFromInterval(5,75))),_createRawReactElement("p",{},void 0,generateText(randomIntFromInterval(5,15)))))};const PlaceholderCard$1=React$3.memo(PlaceholderCard),vitePluginRequire_1697864655028_67397852="/packs/assets/external-link-bbf6b321.svg",vitePluginRequire_1697864664829_52338194="/packs/assets/zoom-in-a7d42acb.svg",vitePluginRequire_1697864651438_21676720="/packs/assets/player-play-2fabf751.svg",vitePluginRequire_1697864669816_30572675="/packs/assets/link-38bf5988.svg";var _excluded$8=["hash","width","height","dummy"],Blurhash=function _e(et){var tt=et.hash,nt=et.width,rt=nt===void 0?32:nt,at=et.height,it=at===void 0?rt:at,ot=et.dummy,st=ot===void 0?!1:ot,ct=_objectWithoutProperties(et,_excluded$8),ut=reactExports.useRef(null);return reactExports.useEffect(function(){var dt=ut.current;if(dt&&(dt.width=dt.width,!(st||!tt)))try{var ft=j$1(tt,rt,it),pt=dt.getContext("2d"),mt=new ImageData(ft,rt,it);if(!pt)return;pt.putImageData(mt,0,0)}catch(ht){console.error("Blurhash decoding failure",{err:ht,hash:tt})}},[st,tt,rt,it]),React$3.createElement("canvas",_extends$4({},ct,{ref:ut,width:rt,height:it}))};const Blurhash$1=React$3.memo(Blurhash);var trim$3=function _e(et,tt){var nt=et.indexOf(" ",tt);return nt===-1?et:et.substring(0,nt)+(et.length>tt?"…":"")},Card=function _e(et){var tt=et.card,nt=et.defaultWidth,rt=nt===void 0?467:nt,at=et.maxTitle,it=at===void 0?120:at,ot=et.maxDescription,st=ot===void 0?200:ot,ct=et.compact,ut=ct===void 0?!1:ct,dt=et.cacheWidth,ft=et.onOpenMedia,pt=et.horizontal,mt=reactExports.useState(rt),ht=_slicedToArray$4(mt,2),Et=ht[0],yt=ht[1],vt=reactExports.useState(!1),gt=_slicedToArray$4(vt,2),St=gt[0],Rt=gt[1];reactExports.useEffect(function(){Rt(!1)},[tt.url]);var $t=trim$3(tt.title,it),bt=trim$3(tt.description,st),wt=function(){var Qt=normalizeAttachment({type:"image",url:tt.embed_url,description:$t,meta:{original:{width:tt.width,height:tt.height}}});ft(List$1([Qt]),0)},xt=function(Qt){Qt.stopPropagation(),tt.type==="photo"?wt():Rt(!0)},Tt=function(Qt){Qt&&(dt&&dt(Qt.offsetWidth),yt(Qt.offsetWidth))},Ct=function(){var Qt={__html:addAutoPlay(tt.html)},Xt=Nt(tt),Yt=Et/Xt;return React$3.createElement("div",{ref:Tt,className:"status-card__image status-card-video",dangerouslySetInnerHTML:Qt,style:{height:Yt}})},Nt=function(Qt){var Xt=Qt.width/Qt.height||1.7777777777777777;return Math.min(Math.max(9/16,Xt),4)},At=tt.type!=="link";pt=typeof pt=="boolean"?pt:At||St;var kt=clsx("status-card",{horizontal:pt,compact:ut,interactive:At},"status-card--".concat(tt.type)),Pt=Nt(tt),Ft=ut&&!St?Et/(16/9):Et/Pt,Dt=At?_createRawReactElement("a",{onClick:function(Qt){return Qt.stopPropagation()},href:tt.url,title:$t,rel:"noopener",target:"_blank"},void 0,_createRawReactElement("span",{},void 0,$t)):_createRawReactElement("span",{title:$t},void 0,$t),Lt=_createRawReactElement(Stack,{space:2,className:"flex-1 overflow-hidden p-4"},void 0,$t&&_createRawReactElement(Text$2,{weight:"bold"},void 0,Dt),bt&&_createRawReactElement(Text$2,{},void 0,bt),_createRawReactElement(HStack,{space:1,alignItems:"center"},void 0,_createRawReactElement(Text$2,{tag:"span",theme:"muted"},void 0,_createRawReactElement(Icon,{src:vitePluginRequire_1697864669816_30572675})),_createRawReactElement(Text$2,{tag:"span",theme:"muted",size:"sm"},void 0,tt.provider_name))),It=null,Ot=_createRawReactElement(Blurhash$1,{className:"absolute inset-0 -z-10 h-full w-full",hash:tt.blurhash}),Ut=_createRawReactElement("div",{style:{backgroundImage:"url(".concat(tt.image,")"),width:pt?Et:void 0,height:pt?Ft:void 0},className:"status-card__image-image"});if(At){if(St)It=Ct();else{var jt=vitePluginRequire_1697864651438_21676720;tt.type==="photo"&&(jt=vitePluginRequire_1697864664829_52338194),It=_createRawReactElement("div",{className:"status-card__image"},void 0,Ot,Ut,_createRawReactElement("div",{className:"absolute inset-0 flex items-center justify-center"},void 0,_createRawReactElement("div",{className:"flex items-center justify-center rounded-full bg-gray-500/90 px-4 py-3 shadow-md dark:bg-gray-700/90"},void 0,_createRawReactElement(HStack,{space:3,alignItems:"center"},void 0,_createRawReactElement("button",{onClick:xt,className:"appearance-none text-gray-700 hover:text-gray-900 dark:text-gray-500 dark:hover:text-gray-100"},void 0,_createRawReactElement(Icon,{src:jt,className:"h-6 w-6 text-inherit"})),pt&&_createRawReactElement("a",{onClick:function(Qt){return Qt.stopPropagation()},href:tt.url,target:"_blank",rel:"noopener",className:"text-gray-700 hover:text-gray-900 dark:text-gray-500 dark:hover:text-gray-100"},void 0,_createRawReactElement(Icon,{src:vitePluginRequire_1697864655028_67397852,className:"h-6 w-6 text-inherit"}))))))}return React$3.createElement("div",{className:kt,ref:Tt},It,Lt)}else tt.image&&(It=_createRawReactElement("div",{className:clsx("status-card__image","w-full flex-none rounded-l md:h-auto md:w-auto md:flex-auto",{"h-auto":pt,"h-[200px]":!pt})},void 0,Ot,Ut));return React$3.createElement("a",{href:tt.url,className:kt,target:"_blank",rel:"noopener",ref:Tt,onClick:function(Qt){return Qt.stopPropagation()}},It,Lt)};const vitePluginRequire_1697864676368_39040715="/packs/assets/headset-1ede0cb8.svg",vitePluginRequire_1697864655833_97692366="/packs/assets/trash-a42f5fff.svg";var messages$J={delete:{id:"status.delete",defaultMessage:"Delete"},deleteConfirm:{id:"confirmations.delete.confirm",defaultMessage:"Delete"},deleteHeading:{id:"confirmations.delete.heading",defaultMessage:"Delete post"},deleteMessage:{id:"confirmations.delete.message",defaultMessage:"Are you sure you want to delete this post?"},hide:{id:"moderation_overlay.hide",defaultMessage:"Hide"},show:{id:"moderation_overlay.show_content",defaultMessage:"Show content"},hiddenTitle:{id:"status.hidden",defaultMessage:"Media hidden"},sensitiveTitle:{id:"status.sensitive_warning",defaultMessage:"Sensitive content"},underReviewTitle:{id:"moderation_overlay.title",defaultMessage:"Content Under Review"},underReviewSubtitle:{id:"moderation_overlay.subtitle",defaultMessage:"This Post has been sent to Moderation for review and is only visible to you. If you believe this is an error please contact Support."},sensitiveSubtitle:{id:"status.sensitive_warning.subtitle",defaultMessage:"This content may not be suitable for all audiences."},contact:{id:"moderation_overlay.contact",defaultMessage:"Contact"}},SensitiveContentOverlay=React$3.forwardRef(function(_e,et){var tt=_e.onToggleVisibility,nt=_e.status,rt=_e.hideHideButton,at=rt===void 0?!1:rt,it=useOwnAccount(),ot=it.account,st=useAppDispatch(),ct=useIntl(),ut=useSettings(),dt=useSoapboxConfig(),ft=dt.links,pt=nt.visibility==="self",mt=nt.getIn(["account","id"])===(ot==null?void 0:ot.id),ht=ut.get("showSensitiveMedia"),Et=reactExports.useState(defaultMediaVisibility(nt,ht)),yt=_slicedToArray$4(Et,2),vt=yt[0],gt=yt[1],St=function(wt){wt.stopPropagation(),tt?tt():gt(function(xt){return!xt})},Rt=function(){var wt=ut.get("deleteModal");st(wt?openModal("CONFIRM",{icon:vitePluginRequire_1697864655833_97692366,heading:ct.formatMessage(messages$J.deleteHeading),message:ct.formatMessage(messages$J.deleteMessage),confirm:ct.formatMessage(messages$J.deleteConfirm),onConfirm:function(){return st(deleteStatus$6(nt.id,!1))}}):deleteStatus$6(nt.id,!1))},$t=reactExports.useMemo(function(){return[{text:ct.formatMessage(messages$J.delete),action:Rt,icon:vitePluginRequire_1697864655833_97692366,destructive:!0}]},[]);return reactExports.useEffect(function(){typeof _e.visible<"u"&>(!!_e.visible)},[_e.visible]),_createRawReactElement("div",{className:clsx("absolute z-40",{"w-full h-full":!vt,"bottom-1 right-1":vt}),"data-testid":"sensitive-overlay"},void 0,vt?!at&&_createRawReactElement(Button,{text:ct.formatMessage(messages$J.hide),icon:vitePluginRequire_1697864669798_43594879,onClick:St,theme:"ghost",size:"sm"}):_createRawReactElement("button",{className:"flex h-full w-full items-center justify-center",onClick:St},void 0,React$3.createElement("div",{className:"max-w-[15rem] space-y-4 rounded-xl bg-white p-4 text-center text-gray-900 backdrop-blur-lg dark:bg-primary-900 dark:text-gray-100",ref:et},nt.sensitive||pt?_createRawReactElement("div",{className:"space-y-1"},void 0,_createRawReactElement(Text$2,{weight:"semibold"},void 0,ct.formatMessage(pt?messages$J.underReviewTitle:messages$J.sensitiveTitle)),_createRawReactElement(Text$2,{size:"sm",weight:"medium"},void 0,ct.formatMessage(pt?messages$J.underReviewSubtitle:messages$J.sensitiveSubtitle))):_createRawReactElement(Text$2,{weight:"semibold"},void 0,ct.formatMessage(messages$J.hiddenTitle)),_createRawReactElement(HStack,{alignItems:"center",justifyContent:"center",space:2},void 0,pt?React$3.createElement(React$3.Fragment,null,ft.get("support")&&_createRawReactElement("a",{href:ft.get("support"),target:"_blank",onClick:function(wt){return wt.stopPropagation()}},void 0,_createRawReactElement(Button,{type:"button",theme:"primary",size:"sm",icon:vitePluginRequire_1697864676368_39040715},void 0,ct.formatMessage(messages$J.contact)))):null,_createRawReactElement(Button,{type:"button",theme:"primary",size:"sm",icon:vitePluginRequire_1697864669798_42893661,onClick:St,className:"min-w-max"},void 0,ct.formatMessage(messages$J.show)),pt&&mt?_createRawReactElement(DropdownMenu,{items:$t,src:vitePluginRequire_1697864655029_75763737}):null))))}),StatusMedia=function _e(et){var tt,nt=et.status,rt=et.muted,at=rt===void 0?!1:rt,it=et.onClick,ot=et.showMedia,st=ot===void 0?!0:ot,ct=et.onToggleVisibility,ut=ct===void 0?function(){}:ct,dt=useAppDispatch(),ft=useSettings(),pt=ft.get("autoPlayVideo"),mt=reactExports.useState(void 0),ht=_slicedToArray$4(mt,2),Et=ht[0],yt=ht[1],vt=nt.media_attachments.size,gt=nt.media_attachments.first(),St=null,Rt=function(Ft){Ft&&yt(Ft.offsetWidth)},$t=function(){return _createRawReactElement("div",{className:"media_gallery",style:{height:"285px"}})},bt=function(){return _createRawReactElement("div",{className:"media-spoiler-video",style:{height:"285px"}})},wt=function(){return _createRawReactElement("div",{className:"media-spoiler-audio",style:{height:"285px"}})},xt=function(Ft,Dt){dt(openModal("MEDIA",{media:Ft,status:nt,index:Dt}))};if(vt>0&>){var Tt=_createRawReactElement(SensitiveContentOverlay,{status:nt,visible:st,onToggleVisibility:ut,hideHideButton:gt.type==="video"||gt.type==="audio"});if(at)St=_createRawReactElement(AttachmentThumbs,{media:nt.media_attachments,onClick:it,sensitive:nt.sensitive});else if(vt===1&>.type==="video"){var Ct=gt;if(Ct.external_video_id&&nt.card){var Nt=function(){var Ft=Number(Ct.meta.getIn(["original","width"])),Dt=Number(Ct.meta.getIn(["original","height"]));return Number(Et)/(Ft/Dt)},At=Nt();St=_createRawReactElement("div",{className:"status-card horizontal compact interactive status-card--video"},void 0,React$3.createElement("div",{ref:Rt,className:"status-card__image status-card-video",style:At?{height:At}:void 0,dangerouslySetInnerHTML:{__html:pt?addAutoPlay(nt.card.html):nt.card.html}}))}else St=React$3.createElement(React$3.Fragment,null,_createRawReactElement(reactExports.Suspense,{fallback:bt()},void 0,_createRawReactElement(Video,{preview:Ct.preview_url,blurhash:Ct.blurhash,src:Ct.url,alt:Ct.description,aspectRatio:Number(Ct.meta.getIn(["original","aspect"])),height:285,visible:st,sensitiveOverlay:Tt,onToggleVisibility:ut,inline:!0})))}else if(vt===1&>.type==="audio"){var kt=gt;St=React$3.createElement(React$3.Fragment,null,_createRawReactElement(reactExports.Suspense,{fallback:wt()},void 0,_createRawReactElement(Audio$1,{src:kt.url,alt:kt.description,poster:kt.preview_url!==kt.url?kt.preview_url:nt.getIn(["account","avatar_static"]),backgroundColor:kt.meta.getIn(["colors","background"]),foregroundColor:kt.meta.getIn(["colors","foreground"]),accentColor:kt.meta.getIn(["colors","accent"]),duration:kt.meta.getIn(["original","duration"],0),height:263,visible:st,sensitiveOverlay:Tt,onToggleVisibility:ut})))}else St=React$3.createElement(React$3.Fragment,null,_createRawReactElement(reactExports.Suspense,{fallback:$t()},void 0,_createRawReactElement(MediaGallery,{media:nt.media_attachments,sensitiveOverlay:Tt,height:285,onOpenMedia:xt,visible:st,onToggleVisibility:ut})))}else nt.spoiler_text.length===0&&!nt.quote&&(tt=nt.card)!==null&&tt!==void 0&&tt.group?St=_createRawReactElement(GroupLinkPreview,{card:nt.card}):nt.spoiler_text.length===0&&!nt.quote&&nt.card?St=_createRawReactElement(Card,{onOpenMedia:xt,card:nt.card,compact:!0}):nt.expectsCard&&(St=_createRawReactElement(PlaceholderCard$1,{}));return St?_createRawReactElement("div",{onClick:function(Ft){return Ft.stopPropagation()}},void 0,St):null};const vitePluginRequire_1697864669070_17782288="/packs/assets/language-9fb1b580.svg",rtlChars=/[\u0590-\u083F]|[\u08A0-\u08FF]|[\uFB1D-\uFDFF]|[\uFE70-\uFEFF]/mg;function isRtl(_e){if(_e.length===0)return!1;_e=_e.replace(/(?:https?|ftp|sftp|ws|wss|blob|smtp|smtps):\/\/[\S]+/g,""),_e=_e.replace(/(mailto:)([^\s@]+@[^\s@]+\.[^\s@]+)/g,""),_e=_e.replace(/(tel:)([+\d\s()-]+)/g,""),_e=_e.replace(/(?:^|[^\/\w])@([a-z0-9_]+(@[a-z0-9\.\-]+)?)/ig,""),_e=_e.replace(/(?:^|[^\/\w])#([\S]+)/ig,""),_e=_e.replace(/\s+/g,"");const et=_e.match(rtlChars);return et?et.length/_e.length>.3:!1}const mfm="",markup="";var Markup=React$3.forwardRef(function(_e,et){return React$3.createElement(Text$2,_extends$4({ref:et},_e,{"data-markup":!0}))}),TranslateButton=function _e(et){var tt,nt=et.status,rt=useAppDispatch(),at=useIntl(),it=useFeatures(),ot=useInstance(),st=parseVersion(ot.version),ct=useAppSelector(function(bt){return bt.me}),ut=ot.pleroma.metadata.translation.allow_unauthenticated,dt=ot.pleroma.metadata.translation.allow_remote,ft=ot.pleroma.metadata.translation.source_languages,pt=ot.pleroma.metadata.translation.target_languages,mt=(ct||ut)&&(dt||isLocal(nt.account))&&["public","unlisted"].includes(nt.visibility)&&nt.contentHtml.length>0&&(nt.language!==null&&at.locale!==nt.language||st.software===AKKOMA),ht=(!ft||ft.includes(nt.language))&&(!pt||pt.includes(at.locale))||st.software===AKKOMA,Et=function(wt){wt.stopPropagation(),!nt.translation||nt.translation.get("status")==="hidden"?rt(translateStatus(nt.id,at.locale)):rt(undoStatusTranslation(nt.id))},yt=reactExports.useRef(null);if(reactExports.useLayoutEffect(function(){if(yt.current){var bt=yt.current.querySelectorAll("a[href]");bt.forEach(function(wt){wt.setAttribute("href","#")})}},[nt.translation]),!it.translations||!mt||!ht)return null;if(!nt.translation||nt.translation.get("status")==="hidden")return _createRawReactElement("div",{},void 0,_createRawReactElement(Button,{theme:"muted",text:_createRawReactElement(FormattedMessage$1,{id:"status.translate",defaultMessage:"Translate"}),icon:vitePluginRequire_1697864669070_17782288,onClick:Et}));var vt=new Intl.DisplayNames([at.locale],{type:"language"}),gt=(tt=nt.language)!==null&&tt!==void 0?tt:nt.translation.get("detected_source_language"),St=gt?vt.of(gt):"Unknown",Rt=nt.translation.get("provider"),$t=isRtl(nt.search_index)?"rtl":"ltr";return _createRawReactElement(Stack,{space:3,alignItems:"start"},void 0,_createRawReactElement(Button,{theme:"muted",text:_createRawReactElement(FormattedMessage$1,{id:"status.translate_hide",defaultMessage:"Hide translation"}),icon:vitePluginRequire_1697864669070_17782288,onClick:Et}),_createRawReactElement(Text$2,{theme:"muted"},void 0,_createRawReactElement(FormattedMessage$1,{id:"status.translated_from_with",defaultMessage:"Translated from {lang} using {provider}",values:{lang:St,provider:Rt}})),React$3.createElement(Markup,{ref:yt,tabIndex:0,key:"content",className:"relative overflow-y-clip overflow-x-visible text-ellipsis break-words text-gray-900 focus:outline-none dark:text-gray-100",direction:$t,dangerouslySetInnerHTML:{__html:nt.translation.get("content")||""},lang:nt.language||void 0,size:"md"}))};const vitePluginRequire_1697864655059_86873773="/packs/assets/map-pin-1b09db51.svg",LOCATION_SEARCH_REQUEST="LOCATION_SEARCH_REQUEST",LOCATION_SEARCH_SUCCESS="LOCATION_SEARCH_SUCCESS",LOCATION_SEARCH_FAIL="LOCATION_SEARCH_FAIL",EDIT_EVENT_NAME_CHANGE="EDIT_EVENT_NAME_CHANGE",EDIT_EVENT_DESCRIPTION_CHANGE="EDIT_EVENT_DESCRIPTION_CHANGE",EDIT_EVENT_START_TIME_CHANGE="EDIT_EVENT_START_TIME_CHANGE",EDIT_EVENT_HAS_END_TIME_CHANGE="EDIT_EVENT_HAS_END_TIME_CHANGE",EDIT_EVENT_END_TIME_CHANGE="EDIT_EVENT_END_TIME_CHANGE",EDIT_EVENT_APPROVAL_REQUIRED_CHANGE="EDIT_EVENT_APPROVAL_REQUIRED_CHANGE",EDIT_EVENT_LOCATION_CHANGE="EDIT_EVENT_LOCATION_CHANGE",EVENT_BANNER_UPLOAD_REQUEST="EVENT_BANNER_UPLOAD_REQUEST",EVENT_BANNER_UPLOAD_PROGRESS="EVENT_BANNER_UPLOAD_PROGRESS",EVENT_BANNER_UPLOAD_SUCCESS="EVENT_BANNER_UPLOAD_SUCCESS",EVENT_BANNER_UPLOAD_FAIL="EVENT_BANNER_UPLOAD_FAIL",EVENT_BANNER_UPLOAD_UNDO="EVENT_BANNER_UPLOAD_UNDO",EVENT_SUBMIT_REQUEST="EVENT_SUBMIT_REQUEST",EVENT_SUBMIT_SUCCESS="EVENT_SUBMIT_SUCCESS",EVENT_SUBMIT_FAIL="EVENT_SUBMIT_FAIL",EVENT_JOIN_REQUEST="EVENT_JOIN_REQUEST",EVENT_JOIN_SUCCESS="EVENT_JOIN_SUCCESS",EVENT_JOIN_FAIL="EVENT_JOIN_FAIL",EVENT_LEAVE_REQUEST="EVENT_LEAVE_REQUEST",EVENT_LEAVE_SUCCESS="EVENT_LEAVE_SUCCESS",EVENT_LEAVE_FAIL="EVENT_LEAVE_FAIL",EVENT_PARTICIPATIONS_FETCH_REQUEST="EVENT_PARTICIPATIONS_FETCH_REQUEST",EVENT_PARTICIPATIONS_FETCH_SUCCESS="EVENT_PARTICIPATIONS_FETCH_SUCCESS",EVENT_PARTICIPATIONS_FETCH_FAIL="EVENT_PARTICIPATIONS_FETCH_FAIL",EVENT_PARTICIPATIONS_EXPAND_SUCCESS="EVENT_PARTICIPATIONS_EXPAND_SUCCESS",EVENT_PARTICIPATION_REQUESTS_FETCH_REQUEST="EVENT_PARTICIPATION_REQUESTS_FETCH_REQUEST",EVENT_PARTICIPATION_REQUESTS_FETCH_SUCCESS="EVENT_PARTICIPATION_REQUESTS_FETCH_SUCCESS",EVENT_PARTICIPATION_REQUESTS_FETCH_FAIL="EVENT_PARTICIPATION_REQUESTS_FETCH_FAIL",EVENT_PARTICIPATION_REQUESTS_EXPAND_SUCCESS="EVENT_PARTICIPATION_REQUESTS_EXPAND_SUCCESS",EVENT_PARTICIPATION_REQUEST_AUTHORIZE_REQUEST="EVENT_PARTICIPATION_REQUEST_AUTHORIZE_REQUEST",EVENT_PARTICIPATION_REQUEST_AUTHORIZE_SUCCESS="EVENT_PARTICIPATION_REQUEST_AUTHORIZE_SUCCESS",EVENT_PARTICIPATION_REQUEST_AUTHORIZE_FAIL="EVENT_PARTICIPATION_REQUEST_AUTHORIZE_FAIL",EVENT_PARTICIPATION_REQUEST_REJECT_REQUEST="EVENT_PARTICIPATION_REQUEST_REJECT_REQUEST",EVENT_PARTICIPATION_REQUEST_REJECT_SUCCESS="EVENT_PARTICIPATION_REQUEST_REJECT_SUCCESS",EVENT_PARTICIPATION_REQUEST_REJECT_FAIL="EVENT_PARTICIPATION_REQUEST_REJECT_FAIL",EVENT_COMPOSE_CANCEL="EVENT_COMPOSE_CANCEL",EVENT_FORM_SET="EVENT_FORM_SET",RECENT_EVENTS_FETCH_REQUEST="RECENT_EVENTS_FETCH_REQUEST",RECENT_EVENTS_FETCH_SUCCESS="RECENT_EVENTS_FETCH_SUCCESS",RECENT_EVENTS_FETCH_FAIL="RECENT_EVENTS_FETCH_FAIL",JOINED_EVENTS_FETCH_REQUEST="JOINED_EVENTS_FETCH_REQUEST",JOINED_EVENTS_FETCH_SUCCESS="JOINED_EVENTS_FETCH_SUCCESS",JOINED_EVENTS_FETCH_FAIL="JOINED_EVENTS_FETCH_FAIL",noOp$4=()=>new Promise(_e=>_e(void 0)),messages$I={exceededImageSizeLimit:{id:"upload_error.image_size_limit",defaultMessage:"Image exceeds the current file size limit ({limit})"},success:{id:"compose_event.submit_success",defaultMessage:"Your event was created"},editSuccess:{id:"compose_event.edit_success",defaultMessage:"Your event was edited"},joinSuccess:{id:"join_event.success",defaultMessage:"Joined the event"},joinRequestSuccess:{id:"join_event.request_success",defaultMessage:"Requested to join the event"},view:{id:"toast.view",defaultMessage:"View"},authorized:{id:"compose_event.participation_requests.authorize_success",defaultMessage:"User accepted"},rejected:{id:"compose_event.participation_requests.reject_success",defaultMessage:"User rejected"}},locationSearch=(_e,et)=>(tt,nt)=>(tt({type:LOCATION_SEARCH_REQUEST,query:_e}),api(nt).get("/api/v1/pleroma/search/location",{params:{q:_e},signal:et}).then(({data:rt})=>(tt({type:LOCATION_SEARCH_SUCCESS,locations:rt}),rt)).catch(rt=>{throw tt({type:LOCATION_SEARCH_FAIL}),rt})),changeEditEventName=_e=>({type:EDIT_EVENT_NAME_CHANGE,value:_e}),changeEditEventDescription=_e=>({type:EDIT_EVENT_DESCRIPTION_CHANGE,value:_e}),changeEditEventStartTime=_e=>({type:EDIT_EVENT_START_TIME_CHANGE,value:_e}),changeEditEventEndTime=_e=>({type:EDIT_EVENT_END_TIME_CHANGE,value:_e}),changeEditEventHasEndTime=_e=>({type:EDIT_EVENT_HAS_END_TIME_CHANGE,value:_e}),changeEditEventApprovalRequired=_e=>({type:EDIT_EVENT_APPROVAL_REQUIRED_CHANGE,value:_e}),changeEditEventLocation=_e=>(et,tt)=>{let nt=null;_e&&(nt=tt().locations.get(_e)),et({type:EDIT_EVENT_LOCATION_CHANGE,value:nt})},uploadEventBanner=(_e,et)=>(tt,nt)=>{const rt=nt().instance.configuration.media_attachments.image_size_limit;let at=0;if(tt(uploadEventBannerRequest()),rt&&_e.size>rt){const it=formatBytes(rt),ot=et.formatMessage(messages$I.exceededImageSizeLimit,{limit:it});toast.error(ot),tt(uploadEventBannerFail(!0));return}resizeImage$1(_e).then(it=>{const ot=new FormData;return ot.append("file",it),tt(uploadMedia(ot,({loaded:ct})=>{at=ct,tt(uploadEventBannerProgress(at))})).then(({status:ct,data:ut})=>{if(ct===200)tt(uploadEventBannerSuccess(ut,it));else if(ct===202){const dt=()=>{tt(fetchMedia(ut.id)).then(({status:ft,data:pt})=>{ft===200?tt(uploadEventBannerSuccess(pt,it)):ft===206&&setTimeout(()=>dt(),1e3)}).catch(ft=>tt(uploadEventBannerFail(ft)))};dt()}})}).catch(it=>tt(uploadEventBannerFail(it)))},uploadEventBannerRequest=()=>({type:EVENT_BANNER_UPLOAD_REQUEST}),uploadEventBannerProgress=_e=>({type:EVENT_BANNER_UPLOAD_PROGRESS,loaded:_e}),uploadEventBannerSuccess=(_e,et)=>({type:EVENT_BANNER_UPLOAD_SUCCESS,media:_e,file:et}),uploadEventBannerFail=_e=>({type:EVENT_BANNER_UPLOAD_FAIL,error:_e}),undoUploadEventBanner=()=>({type:EVENT_BANNER_UPLOAD_UNDO}),submitEvent=()=>(_e,et)=>{const tt=et(),nt=tt.compose_event.id,rt=tt.compose_event.name,at=tt.compose_event.status,it=tt.compose_event.banner,ot=tt.compose_event.start_time,st=tt.compose_event.end_time,ct=tt.compose_event.approval_required?"restricted":"free",ut=tt.compose_event.location;if(!rt||!rt.length)return;_e(submitEventRequest());const dt={name:rt,status:at,start_time:ot,join_mode:ct,content_type:"text/markdown"};return st&&(dt.end_time=st),it&&(dt.banner_id=it.id),ut&&(dt.location_id=ut.origin_id),api(et).request({url:nt===null?"/api/v1/pleroma/events":`/api/v1/pleroma/events/${nt}`,method:nt===null?"post":"put",data:dt}).then(({data:ft})=>{_e(closeModal("COMPOSE_EVENT")),_e(importFetchedStatus(ft)),_e(submitEventSuccess(ft)),toast.success(nt?messages$I.editSuccess:messages$I.success,{actionLabel:messages$I.view,actionLink:`/@${ft.account.acct}/events/${ft.id}`})}).catch(function(ft){_e(submitEventFail(ft))})},submitEventRequest=()=>({type:EVENT_SUBMIT_REQUEST}),submitEventSuccess=_e=>({type:EVENT_SUBMIT_SUCCESS,status:_e}),submitEventFail=_e=>({type:EVENT_SUBMIT_FAIL,error:_e}),joinEvent=(_e,et)=>(tt,nt)=>{const rt=nt().statuses.get(_e);return!rt||!rt.event||rt.event.join_state?tt(noOp$4):(tt(joinEventRequest(rt)),api(nt).post(`/api/v1/pleroma/events/${_e}/join`,{participation_message:et}).then(({data:at})=>{var it;tt(importFetchedStatus(at)),tt(joinEventSuccess(at)),toast.success(((it=at.pleroma.event)==null?void 0:it.join_state)==="pending"?messages$I.joinRequestSuccess:messages$I.joinSuccess,{actionLabel:messages$I.view,actionLink:`/@${at.account.acct}/events/${at.id}`})}).catch(function(at){var it;tt(joinEventFail(at,rt,((it=rt==null?void 0:rt.event)==null?void 0:it.join_state)||null))}))},joinEventRequest=_e=>({type:EVENT_JOIN_REQUEST,id:_e.id}),joinEventSuccess=_e=>({type:EVENT_JOIN_SUCCESS,id:_e.id}),joinEventFail=(_e,et,tt)=>({type:EVENT_JOIN_FAIL,error:_e,id:et.id,previousState:tt}),leaveEvent=_e=>(et,tt)=>{const nt=tt().statuses.get(_e);return!nt||!nt.event||!nt.event.join_state?et(noOp$4):(et(leaveEventRequest(nt)),api(tt).post(`/api/v1/pleroma/events/${_e}/leave`).then(({data:rt})=>{et(importFetchedStatus(rt)),et(leaveEventSuccess(rt))}).catch(function(rt){et(leaveEventFail(rt,nt))}))},leaveEventRequest=_e=>({type:EVENT_LEAVE_REQUEST,id:_e.id}),leaveEventSuccess=_e=>({type:EVENT_LEAVE_SUCCESS,id:_e.id}),leaveEventFail=(_e,et)=>({type:EVENT_LEAVE_FAIL,id:et.id,error:_e}),fetchEventParticipations=_e=>(et,tt)=>(et(fetchEventParticipationsRequest(_e)),api(tt).get(`/api/v1/pleroma/events/${_e}/participations`).then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");return et(importFetchedAccounts(nt.data)),et(fetchEventParticipationsSuccess(_e,nt.data,rt?rt.uri:null))}).catch(nt=>{et(fetchEventParticipationsFail(_e,nt))})),fetchEventParticipationsRequest=_e=>({type:EVENT_PARTICIPATIONS_FETCH_REQUEST,id:_e}),fetchEventParticipationsSuccess=(_e,et,tt)=>({type:EVENT_PARTICIPATIONS_FETCH_SUCCESS,id:_e,accounts:et,next:tt}),fetchEventParticipationsFail=(_e,et)=>({type:EVENT_PARTICIPATIONS_FETCH_FAIL,id:_e,error:et}),fetchEventParticipationRequests=_e=>(et,tt)=>(et(fetchEventParticipationRequestsRequest(_e)),api(tt).get(`/api/v1/pleroma/events/${_e}/participation_requests`).then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");return et(importFetchedAccounts(nt.data.map(({account:at})=>at))),et(fetchEventParticipationRequestsSuccess(_e,nt.data,rt?rt.uri:null))}).catch(nt=>{et(fetchEventParticipationRequestsFail(_e,nt))})),fetchEventParticipationRequestsRequest=_e=>({type:EVENT_PARTICIPATION_REQUESTS_FETCH_REQUEST,id:_e}),fetchEventParticipationRequestsSuccess=(_e,et,tt)=>({type:EVENT_PARTICIPATION_REQUESTS_FETCH_SUCCESS,id:_e,participations:et,next:tt}),fetchEventParticipationRequestsFail=(_e,et)=>({type:EVENT_PARTICIPATION_REQUESTS_FETCH_FAIL,id:_e,error:et}),authorizeEventParticipationRequest=(_e,et)=>(tt,nt)=>(tt(authorizeEventParticipationRequestRequest(_e,et)),api(nt).post(`/api/v1/pleroma/events/${_e}/participation_requests/${et}/authorize`).then(()=>{tt(authorizeEventParticipationRequestSuccess(_e,et)),toast.success(messages$I.authorized)}).catch(rt=>tt(authorizeEventParticipationRequestFail(_e,et,rt)))),authorizeEventParticipationRequestRequest=(_e,et)=>({type:EVENT_PARTICIPATION_REQUEST_AUTHORIZE_REQUEST,id:_e,accountId:et}),authorizeEventParticipationRequestSuccess=(_e,et)=>({type:EVENT_PARTICIPATION_REQUEST_AUTHORIZE_SUCCESS,id:_e,accountId:et}),authorizeEventParticipationRequestFail=(_e,et,tt)=>({type:EVENT_PARTICIPATION_REQUEST_AUTHORIZE_FAIL,id:_e,accountId:et,error:tt}),rejectEventParticipationRequest=(_e,et)=>(tt,nt)=>(tt(rejectEventParticipationRequestRequest(_e,et)),api(nt).post(`/api/v1/pleroma/events/${_e}/participation_requests/${et}/reject`).then(()=>{tt(rejectEventParticipationRequestSuccess(_e,et)),toast.success(messages$I.rejected)}).catch(rt=>tt(rejectEventParticipationRequestFail(_e,et,rt)))),rejectEventParticipationRequestRequest=(_e,et)=>({type:EVENT_PARTICIPATION_REQUEST_REJECT_REQUEST,id:_e,accountId:et}),rejectEventParticipationRequestSuccess=(_e,et)=>({type:EVENT_PARTICIPATION_REQUEST_REJECT_SUCCESS,id:_e,accountId:et}),rejectEventParticipationRequestFail=(_e,et,tt)=>({type:EVENT_PARTICIPATION_REQUEST_REJECT_FAIL,id:_e,accountId:et,error:tt}),fetchEventIcs=_e=>(et,tt)=>api(tt).get(`/api/v1/pleroma/events/${_e}/ics`),cancelEventCompose=()=>({type:EVENT_COMPOSE_CANCEL}),editEvent=_e=>(et,tt)=>{const nt=tt().statuses.get(_e);et({type:STATUS_FETCH_SOURCE_REQUEST}),api(tt).get(`/api/v1/statuses/${_e}/source`).then(rt=>{et({type:STATUS_FETCH_SOURCE_SUCCESS}),et({type:EVENT_FORM_SET,status:nt,text:rt.data.text,location:rt.data.location}),et(openModal("COMPOSE_EVENT"))}).catch(rt=>{et({type:STATUS_FETCH_SOURCE_FAIL,error:rt})})},fetchRecentEvents=()=>(_e,et)=>{var tt;(tt=et().status_lists.get("recent_events"))!=null&&tt.isLoading||(_e({type:RECENT_EVENTS_FETCH_REQUEST}),api(et).get("/api/v1/timelines/public?only_events=true").then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");_e(importFetchedStatuses(nt.data)),_e({type:RECENT_EVENTS_FETCH_SUCCESS,statuses:nt.data,next:rt?rt.uri:null})}).catch(nt=>{_e({type:RECENT_EVENTS_FETCH_FAIL,error:nt})}))},fetchJoinedEvents=()=>(_e,et)=>{var tt;(tt=et().status_lists.get("joined_events"))!=null&&tt.isLoading||(_e({type:JOINED_EVENTS_FETCH_REQUEST}),api(et).get("/api/v1/pleroma/events/joined_events").then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");_e(importFetchedStatuses(nt.data)),_e({type:JOINED_EVENTS_FETCH_SUCCESS,statuses:nt.data,next:rt?rt.uri:null})}).catch(nt=>{_e({type:JOINED_EVENTS_FETCH_FAIL,error:nt})}))};var messages$H={leaveConfirm:{id:"confirmations.leave_event.confirm",defaultMessage:"Leave event"},leaveMessage:{id:"confirmations.leave_event.message",defaultMessage:"If you want to rejoin the event, the request will be manually reviewed again. Are you sure you want to proceed?"}},EventActionButton=function _e(et){var tt=et.status,nt=et.theme,rt=nt===void 0?"secondary":nt,at=useIntl(),it=useAppDispatch(),ot=useAppSelector(function(Et){return Et.me}),st=tt.event,ct=function(yt){yt.preventDefault(),st.join_mode==="free"?it(joinEvent(tt.id)):it(openModal("JOIN_EVENT",{statusId:tt.id}))},ut=function(yt){yt.preventDefault(),st.join_mode==="restricted"?it(openModal("CONFIRM",{message:at.formatMessage(messages$H.leaveMessage),confirm:at.formatMessage(messages$H.leaveConfirm),onConfirm:function(){return it(leaveEvent(tt.id))}})):it(leaveEvent(tt.id))},dt=function(yt){yt.preventDefault(),it(openModal("UNAUTHORIZED",{action:"JOIN",ap_id:tt.url}))},ft,pt,mt=!1,ht=ut;switch(st.join_state){case"accept":ft=_createRawReactElement(FormattedMessage$1,{id:"event.join_state.accept",defaultMessage:"Going"}),pt=vitePluginRequire_1697864666744_94924775;break;case"pending":ft=_createRawReactElement(FormattedMessage$1,{id:"event.join_state.pending",defaultMessage:"Pending"});break;case"reject":ft=_createRawReactElement(FormattedMessage$1,{id:"event.join_state.rejected",defaultMessage:"Going"}),pt=vitePluginRequire_1697864669750_71014420,mt=!0;break;default:ft=_createRawReactElement(FormattedMessage$1,{id:"event.join_state.empty",defaultMessage:"Participate"}),ht=ot?ct:dt}return _createRawReactElement(Button,{size:"sm",theme:rt,icon:pt,onClick:ht,disabled:mt},void 0,ft)};const vitePluginRequire_1697864655059_97688881="/packs/assets/calendar-f47bc58c.svg";var EventDate=function _e(et){var tt=et.status,nt=tt.event;if(!nt.start_time)return null;var rt=new Date(nt.start_time),at;if(nt.end_time){var it=new Date(nt.end_time),ot=rt.getFullYear()===it.getFullYear(),st=rt.getDate()===it.getDate()&&rt.getMonth()===it.getMonth()&&ot;st?at=React$3.createElement(React$3.Fragment,null,_createRawReactElement(FormattedDate,{value:nt.start_time,year:ot?void 0:"2-digit",month:"short",day:"2-digit",weekday:"short",hour:"2-digit",minute:"2-digit"})," - ",_createRawReactElement(FormattedDate,{value:nt.end_time,hour:"2-digit",minute:"2-digit"})):at=React$3.createElement(React$3.Fragment,null,_createRawReactElement(FormattedDate,{value:nt.start_time,year:"2-digit",month:"short",day:"2-digit",weekday:"short"})," - ",_createRawReactElement(FormattedDate,{value:nt.end_time,year:"2-digit",month:"short",day:"2-digit",weekday:"short"}))}else at=_createRawReactElement(FormattedDate,{value:nt.start_time,year:"2-digit",month:"short",day:"2-digit",weekday:"short",hour:"2-digit",minute:"2-digit"});return _createRawReactElement(HStack,{alignItems:"center",space:2},void 0,_createRawReactElement(Icon,{src:vitePluginRequire_1697864655059_97688881}),_createRawReactElement("span",{},void 0,at))},messages$G={eventBanner:{id:"event.banner",defaultMessage:"Event banner"},leaveConfirm:{id:"confirmations.leave_event.confirm",defaultMessage:"Leave event"},leaveMessage:{id:"confirmations.leave_event.message",defaultMessage:"If you want to rejoin the event, the request will be manually reviewed again. Are you sure you want to proceed?"}},EventPreview=function _e(et){var tt=et.status,nt=et.className,rt=et.hideAction,at=et.floatingAction,it=at===void 0?!0:at,ot=useIntl(),st=useAppSelector(function(pt){return pt.me}),ct=tt.account,ut=tt.event,dt=ut.banner,ft=!rt&&(ct.id===st?_createRawReactElement(Button,{size:"sm",theme:it?"secondary":"primary",to:"/@".concat(ct.acct,"/events/").concat(tt.id)},void 0,_createRawReactElement(FormattedMessage$1,{id:"event.manage",defaultMessage:"Manage"})):_createRawReactElement(EventActionButton,{status:tt,theme:it?"secondary":"primary"}));return _createRawReactElement("div",{className:clsx("relative w-full overflow-hidden rounded-lg bg-gray-100 dark:bg-primary-800",nt)},void 0,_createRawReactElement("div",{className:"absolute right-3 top-28"},void 0,it&&ft),_createRawReactElement("div",{className:"h-40 bg-primary-200 dark:bg-gray-600"},void 0,dt&&_createRawReactElement("img",{className:"h-full w-full object-cover",src:dt.url,alt:ot.formatMessage(messages$G.eventBanner)})),_createRawReactElement(Stack,{className:"p-2.5",space:2},void 0,_createRawReactElement(HStack,{space:2,alignItems:"center",justifyContent:"between"},void 0,_createRawReactElement(Text$2,{weight:"semibold",truncate:!0},void 0,ut.name),!it&&ft),_createRawReactElement("div",{className:"flex flex-wrap gap-x-2 gap-y-1 text-gray-700 dark:text-gray-600"},void 0,_createRawReactElement(HStack,{alignItems:"center",space:2},void 0,_createRawReactElement(Icon,{src:vitePluginRequire_1697864653844_80969986}),_createRawReactElement(HStack,{space:1,alignItems:"center",grow:!0},void 0,_createRawReactElement("span",{dangerouslySetInnerHTML:{__html:ct.display_name_html}}),ct.verified&&_createRawReactElement(VerificationBadge,{}))),_createRawReactElement(EventDate,{status:tt}),ut.location&&_createRawReactElement(HStack,{alignItems:"center",space:2},void 0,_createRawReactElement(Icon,{src:vitePluginRequire_1697864655059_86873773}),_createRawReactElement("span",{},void 0,ut.location.get("name"))))))},$$3=_export,call$1=functionCall,uncurryThis$3=functionUncurryThisClause,createIteratorConstructor=iteratorCreateConstructor,createIterResultObject=createIterResultObject$4,requireObjectCoercible$1=requireObjectCoercible$b,toLength$1=toLength$6,toString$3=toString$t,anObject$1=anObject$m,isNullOrUndefined$1=isNullOrUndefined$a,classof=classofRaw$2,isRegExp=isRegexp,getRegExpFlags=regexpGetFlags,getMethod$1=getMethod$7,defineBuiltIn=defineBuiltIn$f,fails$2=fails$F,wellKnownSymbol$1=wellKnownSymbol$t,speciesConstructor=speciesConstructor$2,advanceStringIndex$1=advanceStringIndex$3,regExpExec$1=regexpExecAbstract,InternalStateModule=internalState,IS_PURE=isPure,MATCH_ALL=wellKnownSymbol$1("matchAll"),REGEXP_STRING="RegExp String",REGEXP_STRING_ITERATOR=REGEXP_STRING+" Iterator",setInternalState=InternalStateModule.set,getInternalState=InternalStateModule.getterFor(REGEXP_STRING_ITERATOR),RegExpPrototype=RegExp.prototype,$TypeError$1=TypeError,stringIndexOf$1=uncurryThis$3("".indexOf),nativeMatchAll=uncurryThis$3("".matchAll),WORKS_WITH_NON_GLOBAL_REGEX=!!nativeMatchAll&&!fails$2(function(){nativeMatchAll("a",/./)}),$RegExpStringIterator=createIteratorConstructor(function _e(et,tt,nt,rt){setInternalState(this,{type:REGEXP_STRING_ITERATOR,regexp:et,string:tt,global:nt,unicode:rt,done:!1})},REGEXP_STRING,function _e(){var et=getInternalState(this);if(et.done)return createIterResultObject(void 0,!0);var tt=et.regexp,nt=et.string,rt=regExpExec$1(tt,nt);return rt===null?(et.done=!0,createIterResultObject(void 0,!0)):et.global?(toString$3(rt[0])===""&&(tt.lastIndex=advanceStringIndex$1(nt,toLength$1(tt.lastIndex),et.unicode)),createIterResultObject(rt,!1)):(et.done=!0,createIterResultObject(rt,!1))}),$matchAll=function(_e){var et=anObject$1(this),tt=toString$3(_e),nt=speciesConstructor(et,RegExp),rt=toString$3(getRegExpFlags(et)),at,it,ot;return at=new nt(nt===RegExp?et.source:et,rt),it=!!~stringIndexOf$1(rt,"g"),ot=!!~stringIndexOf$1(rt,"u"),at.lastIndex=toLength$1(et.lastIndex),new $RegExpStringIterator(at,tt,it,ot)};$$3({target:"String",proto:!0,forced:WORKS_WITH_NON_GLOBAL_REGEX},{matchAll:function _e(et){var tt=requireObjectCoercible$1(this),nt,rt,at,it;if(isNullOrUndefined$1(et)){if(WORKS_WITH_NON_GLOBAL_REGEX)return nativeMatchAll(tt,et)}else{if(isRegExp(et)&&(nt=toString$3(requireObjectCoercible$1(getRegExpFlags(et))),!~stringIndexOf$1(nt,"g")))throw $TypeError$1("`.matchAll` does not allow non-global regexes");if(WORKS_WITH_NON_GLOBAL_REGEX)return nativeMatchAll(tt,et);if(at=getMethod$1(et,MATCH_ALL),at===void 0&&IS_PURE&&classof(et)==="RegExp"&&(at=$matchAll),at)return call$1(at,et,tt)}return rt=toString$3(tt),it=new RegExp(et,"g"),it[MATCH_ALL](rt)}});MATCH_ALL in RegExpPrototype||defineBuiltIn(RegExpPrototype,MATCH_ALL,$matchAll);var uncurryThis$2=functionUncurryThis,toObject$2=toObject$e,floor=Math.floor,charAt=uncurryThis$2("".charAt),replace$1=uncurryThis$2("".replace),stringSlice$1=uncurryThis$2("".slice),SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d{1,2})/g,getSubstitution$1=function(_e,et,tt,nt,rt,at){var it=tt+_e.length,ot=nt.length,st=SUBSTITUTION_SYMBOLS_NO_NAMED;return rt!==void 0&&(rt=toObject$2(rt),st=SUBSTITUTION_SYMBOLS),replace$1(at,st,function(ct,ut){var dt;switch(charAt(ut,0)){case"$":return"$";case"&":return _e;case"`":return stringSlice$1(et,0,tt);case"'":return stringSlice$1(et,it);case"<":dt=rt[stringSlice$1(ut,1,-1)];break;default:var ft=+ut;if(ft===0)return ct;if(ft>ot){var pt=floor(ft/10);return pt===0?ct:pt<=ot?nt[pt-1]===void 0?charAt(ut,1):nt[pt-1]+charAt(ut,1):ct}dt=nt[ft-1]}return dt===void 0?"":dt})},apply$1=functionApply,call=functionCall,uncurryThis$1=functionUncurryThis,fixRegExpWellKnownSymbolLogic=fixRegexpWellKnownSymbolLogic,fails$1=fails$F,anObject=anObject$m,isCallable=isCallable$t,isNullOrUndefined=isNullOrUndefined$a,toIntegerOrInfinity=toIntegerOrInfinity$4,toLength=toLength$6,toString$2=toString$t,requireObjectCoercible=requireObjectCoercible$b,advanceStringIndex=advanceStringIndex$3,getMethod=getMethod$7,getSubstitution=getSubstitution$1,regExpExec=regexpExecAbstract,wellKnownSymbol=wellKnownSymbol$t,REPLACE=wellKnownSymbol("replace"),max=Math.max,min=Math.min,concat=uncurryThis$1([].concat),push=uncurryThis$1([].push),stringIndexOf=uncurryThis$1("".indexOf),stringSlice=uncurryThis$1("".slice),maybeToString=function(_e){return _e===void 0?_e:String(_e)},REPLACE_KEEPS_$0=function(){return"a".replace(/./,"$0")==="$0"}(),REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE=function(){return/./[REPLACE]?/./[REPLACE]("a","$0")==="":!1}(),REPLACE_SUPPORTS_NAMED_GROUPS=!fails$1(function(){var _e=/./;return _e.exec=function(){var et=[];return et.groups={a:"7"},et},"".replace(_e,"$")!=="7"});fixRegExpWellKnownSymbolLogic("replace",function(_e,et,tt){var nt=REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE?"$":"$0";return[function(at,it){var ot=requireObjectCoercible(this),st=isNullOrUndefined(at)?void 0:getMethod(at,REPLACE);return st?call(st,at,ot,it):call(et,toString$2(ot),at,it)},function(rt,at){var it=anObject(this),ot=toString$2(rt);if(typeof at=="string"&&stringIndexOf(at,nt)===-1&&stringIndexOf(at,"$<")===-1){var st=tt(et,it,ot,at);if(st.done)return st.value}var ct=isCallable(at);ct||(at=toString$2(at));var ut=it.global,dt;ut&&(dt=it.unicode,it.lastIndex=0);for(var ft=[],pt;pt=regExpExec(it,ot),!(pt===null||(push(ft,pt),!ut));){var mt=toString$2(pt[0]);mt===""&&(it.lastIndex=advanceStringIndex(ot,toLength(it.lastIndex),dt))}for(var ht="",Et=0,yt=0;yt=Et&&(ht+=stringSlice(ot,Et,gt)+Rt,Et=gt+vt.length)}return ht+stringSlice(ot,Et)}]},!REPLACE_SUPPORTS_NAMED_GROUPS||!REPLACE_KEEPS_$0||REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);var lib$2={},lib$1={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Doctype=_e.CDATA=_e.Tag=_e.Style=_e.Script=_e.Comment=_e.Directive=_e.Text=_e.Root=_e.isTag=_e.ElementType=void 0;var et;(function(nt){nt.Root="root",nt.Text="text",nt.Directive="directive",nt.Comment="comment",nt.Script="script",nt.Style="style",nt.Tag="tag",nt.CDATA="cdata",nt.Doctype="doctype"})(et=_e.ElementType||(_e.ElementType={}));function tt(nt){return nt.type===et.Tag||nt.type===et.Script||nt.type===et.Style}_e.isTag=tt,_e.Root=et.Root,_e.Text=et.Text,_e.Directive=et.Directive,_e.Comment=et.Comment,_e.Script=et.Script,_e.Style=et.Style,_e.Tag=et.Tag,_e.CDATA=et.CDATA,_e.Doctype=et.Doctype})(lib$1);var node={},__extends=commonjsGlobal$2&&commonjsGlobal$2.__extends||function(){var _e=function(et,tt){return _e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(nt,rt){nt.__proto__=rt}||function(nt,rt){for(var at in rt)Object.prototype.hasOwnProperty.call(rt,at)&&(nt[at]=rt[at])},_e(et,tt)};return function(et,tt){if(typeof tt!="function"&&tt!==null)throw new TypeError("Class extends value "+String(tt)+" is not a constructor or null");_e(et,tt);function nt(){this.constructor=et}et.prototype=tt===null?Object.create(tt):(nt.prototype=tt.prototype,new nt)}}(),__assign=commonjsGlobal$2&&commonjsGlobal$2.__assign||function(){return __assign=Object.assign||function(_e){for(var et,tt=1,nt=arguments.length;tt0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"childNodes",{get:function(){return this.children},set:function(tt){this.children=tt},enumerable:!1,configurable:!0}),et}(Node$1);node.NodeWithChildren=NodeWithChildren;var CDATA=function(_e){__extends(et,_e);function et(){var tt=_e!==null&&_e.apply(this,arguments)||this;return tt.type=domelementtype_1.ElementType.CDATA,tt}return Object.defineProperty(et.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),et}(NodeWithChildren);node.CDATA=CDATA;var Document=function(_e){__extends(et,_e);function et(){var tt=_e!==null&&_e.apply(this,arguments)||this;return tt.type=domelementtype_1.ElementType.Root,tt}return Object.defineProperty(et.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),et}(NodeWithChildren);node.Document=Document;var Element$3=function(_e){__extends(et,_e);function et(tt,nt,rt,at){rt===void 0&&(rt=[]),at===void 0&&(at=tt==="script"?domelementtype_1.ElementType.Script:tt==="style"?domelementtype_1.ElementType.Style:domelementtype_1.ElementType.Tag);var it=_e.call(this,rt)||this;return it.name=tt,it.attribs=nt,it.type=at,it}return Object.defineProperty(et.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"tagName",{get:function(){return this.name},set:function(tt){this.name=tt},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"attributes",{get:function(){var tt=this;return Object.keys(this.attribs).map(function(nt){var rt,at;return{name:nt,value:tt.attribs[nt],namespace:(rt=tt["x-attribsNamespace"])===null||rt===void 0?void 0:rt[nt],prefix:(at=tt["x-attribsPrefix"])===null||at===void 0?void 0:at[nt]}})},enumerable:!1,configurable:!0}),et}(NodeWithChildren);node.Element=Element$3;function isTag(_e){return(0,domelementtype_1.isTag)(_e)}node.isTag=isTag;function isCDATA(_e){return _e.type===domelementtype_1.ElementType.CDATA}node.isCDATA=isCDATA;function isText(_e){return _e.type===domelementtype_1.ElementType.Text}node.isText=isText;function isComment(_e){return _e.type===domelementtype_1.ElementType.Comment}node.isComment=isComment;function isDirective(_e){return _e.type===domelementtype_1.ElementType.Directive}node.isDirective=isDirective;function isDocument(_e){return _e.type===domelementtype_1.ElementType.Root}node.isDocument=isDocument;function hasChildren(_e){return Object.prototype.hasOwnProperty.call(_e,"children")}node.hasChildren=hasChildren;function cloneNode(_e,et){et===void 0&&(et=!1);var tt;if(isText(_e))tt=new Text$1(_e.data);else if(isComment(_e))tt=new Comment$1(_e.data);else if(isTag(_e)){var nt=et?cloneChildren(_e.children):[],rt=new Element$3(_e.name,__assign({},_e.attribs),nt);nt.forEach(function(st){return st.parent=rt}),_e.namespace!=null&&(rt.namespace=_e.namespace),_e["x-attribsNamespace"]&&(rt["x-attribsNamespace"]=__assign({},_e["x-attribsNamespace"])),_e["x-attribsPrefix"]&&(rt["x-attribsPrefix"]=__assign({},_e["x-attribsPrefix"])),tt=rt}else if(isCDATA(_e)){var nt=et?cloneChildren(_e.children):[],at=new CDATA(nt);nt.forEach(function(ct){return ct.parent=at}),tt=at}else if(isDocument(_e)){var nt=et?cloneChildren(_e.children):[],it=new Document(nt);nt.forEach(function(ct){return ct.parent=it}),_e["x-mode"]&&(it["x-mode"]=_e["x-mode"]),tt=it}else if(isDirective(_e)){var ot=new ProcessingInstruction$1(_e.name,_e.data);_e["x-name"]!=null&&(ot["x-name"]=_e["x-name"],ot["x-publicId"]=_e["x-publicId"],ot["x-systemId"]=_e["x-systemId"]),tt=ot}else throw new Error("Not implemented yet: ".concat(_e.type));return tt.startIndex=_e.startIndex,tt.endIndex=_e.endIndex,_e.sourceCodeLocation!=null&&(tt.sourceCodeLocation=_e.sourceCodeLocation),tt}node.cloneNode=cloneNode;function cloneChildren(_e){for(var et=_e.map(function(nt){return cloneNode(nt,!0)}),tt=1;tt/i,BODY_TAG_REGEX=//i,parseFromDocument=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},parseFromString=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},DOMParser$1=typeof window=="object"&&window.DOMParser;if(typeof DOMParser$1=="function"){var domParser$2=new DOMParser$1,mimeType="text/html";parseFromString=function(_e,et){return et&&(_e="<"+et+">"+_e+""),domParser$2.parseFromString(_e,mimeType)},parseFromDocument=parseFromString}if(typeof document=="object"&&document.implementation){var doc=document.implementation.createHTMLDocument();parseFromDocument=function(_e,et){if(et){var tt=doc.documentElement.querySelector(et);return tt.innerHTML=_e,doc}return doc.documentElement.innerHTML=_e,doc}}var template=typeof document=="object"?document.createElement("template"):{},parseFromTemplate;template.content&&(parseFromTemplate=function(_e){return template.innerHTML=_e,template.content.childNodes});function domparser$1(_e){var et,tt=_e.match(FIRST_TAG_REGEX);tt&&tt[1]&&(et=tt[1].toLowerCase());var nt,rt,at;switch(et){case HTML:return nt=parseFromString(_e),HEAD_TAG_REGEX.test(_e)||(rt=nt.querySelector(HEAD),rt&&rt.parentNode.removeChild(rt)),BODY_TAG_REGEX.test(_e)||(rt=nt.querySelector(BODY),rt&&rt.parentNode.removeChild(rt)),nt.querySelectorAll(HTML);case HEAD:case BODY:return nt=parseFromDocument(_e),at=nt.querySelectorAll(et),BODY_TAG_REGEX.test(_e)&&HEAD_TAG_REGEX.test(_e)?at[0].parentNode.childNodes:at;default:return parseFromTemplate?parseFromTemplate(_e):(rt=parseFromDocument(_e,BODY).querySelector(BODY),rt.childNodes)}}var domparser_1=domparser$1,utilities$6={},constants$1={};constants$1.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"];var domhandler$1=lib$2,constants=constants$1,CASE_SENSITIVE_TAG_NAMES=constants.CASE_SENSITIVE_TAG_NAMES,Comment=domhandler$1.Comment,Element$2=domhandler$1.Element,ProcessingInstruction=domhandler$1.ProcessingInstruction,Text=domhandler$1.Text,caseSensitiveTagNamesMap={},tagName;for(var i=0,len=CASE_SENSITIVE_TAG_NAMES.length;i/;function HTMLDOMParser(_e){if(typeof _e!="string")throw new TypeError("First argument must be a string");if(_e==="")return[];var et=_e.match(DIRECTIVE_REGEX),tt;return et&&et[1]&&(tt=et[1]),formatDOM(domparser(_e),null,tt)}var htmlToDom=HTMLDOMParser,lib={},possibleStandardNamesOptimized$1={},SAME$1=0;possibleStandardNamesOptimized$1.SAME=SAME$1;var CAMELCASE$1=1;possibleStandardNamesOptimized$1.CAMELCASE=CAMELCASE$1;possibleStandardNamesOptimized$1.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1};Object.defineProperty(lib,"__esModule",{value:!0});function _slicedToArray(_e,et){return _arrayWithHoles(_e)||_iterableToArrayLimit(_e,et)||_unsupportedIterableToArray$1(_e,et)||_nonIterableRest()}function _arrayWithHoles(_e){if(Array.isArray(_e))return _e}function _iterableToArrayLimit(_e,et){var tt=_e==null?null:typeof Symbol<"u"&&_e[Symbol.iterator]||_e["@@iterator"];if(tt!=null){var nt=[],rt=!0,at=!1,it,ot;try{for(tt=tt.call(_e);!(rt=(it=tt.next()).done)&&(nt.push(it.value),!(et&&nt.length===et));rt=!0);}catch(st){at=!0,ot=st}finally{try{!rt&&tt.return!=null&&tt.return()}finally{if(at)throw ot}}return nt}}function _unsupportedIterableToArray$1(_e,et){if(_e){if(typeof _e=="string")return _arrayLikeToArray$1(_e,et);var tt=Object.prototype.toString.call(_e).slice(8,-1);if(tt==="Object"&&_e.constructor&&(tt=_e.constructor.name),tt==="Map"||tt==="Set")return Array.from(_e);if(tt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(tt))return _arrayLikeToArray$1(_e,et)}}function _arrayLikeToArray$1(_e,et){(et==null||et>_e.length)&&(et=_e.length);for(var tt=0,nt=new Array(et);tt=16,ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);function canTextBeChildOfNode$1(_e){return!ELEMENTS_WITH_NO_TEXT_CHILDREN.has(_e.name)}function returnFirstArg(_e){return _e}var utilities$3={PRESERVE_CUSTOM_ATTRIBUTES,ELEMENTS_WITH_NO_TEXT_CHILDREN,invertObject,isCustomComponent,setStyleProp:setStyleProp$1,canTextBeChildOfNode:canTextBeChildOfNode$1,returnFirstArg},reactProperty=lib,utilities$2=utilities$3,UNCONTROLLED_COMPONENT_ATTRIBUTES=["checked","value"],UNCONTROLLED_COMPONENT_NAMES=["input","select","textarea"],VALUE_ONLY_INPUTS={reset:!0,submit:!0},attributesToProps$2=function _e(et,tt){et=et||{};var nt,rt,at,it,ot,st={},ct=et.type&&VALUE_ONLY_INPUTS[et.type];for(nt in et){if(at=et[nt],reactProperty.isCustomAttribute(nt)){st[nt]=at;continue}if(rt=nt.toLowerCase(),it=getPropName(rt),it){switch(ot=reactProperty.getPropertyInfo(it),UNCONTROLLED_COMPONENT_ATTRIBUTES.indexOf(it)!==-1&&UNCONTROLLED_COMPONENT_NAMES.indexOf(tt)!==-1&&!ct&&(it=getPropName("default"+rt)),st[it]=at,ot&&ot.type){case reactProperty.BOOLEAN:st[it]=!0;break;case reactProperty.OVERLOADED_BOOLEAN:at===""&&(st[it]=!0);break}continue}utilities$2.PRESERVE_CUSTOM_ATTRIBUTES&&(st[nt]=at)}return utilities$2.setStyleProp(et.style,st),st};function getPropName(_e){return reactProperty.possibleStandardNames[_e]}var React=reactExports,attributesToProps$1=attributesToProps$2,utilities$1=utilities$3,setStyleProp=utilities$1.setStyleProp,canTextBeChildOfNode=utilities$1.canTextBeChildOfNode;function domToReact$2(_e,et){et=et||{};for(var tt=et.library||React,nt=tt.cloneElement,rt=tt.createElement,at=tt.isValidElement,it=[],ot,st,ct=typeof et.replace=="function",ut=et.transform||utilities$1.returnFirstArg,dt,ft,pt,mt=et.trim,ht=0,Et=_e.length;ht1&&(dt=nt(dt,{key:dt.key||ht})),it.push(ut(dt,ot,ht));continue}if(ot.type==="text"){if(st=!ot.data.trim().length,st&&ot.parent&&!canTextBeChildOfNode(ot.parent)||mt&&st)continue;it.push(ut(ot.data,ot,ht));continue}switch(ft=ot.attribs,skipAttributesToProps(ot)?setStyleProp(ft.style,ft):ft&&(ft=attributesToProps$1(ft,ot.name)),pt=null,ot.type){case"script":case"style":ot.children[0]&&(ft.dangerouslySetInnerHTML={__html:ot.children[0].data});break;case"tag":ot.name==="textarea"&&ot.children[0]?ft.defaultValue=ot.children[0].data:ot.children&&ot.children.length&&(pt=domToReact$2(ot.children,et));break;default:continue}Et>1&&(ft.key=ht),it.push(ut(rt(ot.name,ft,pt),ot,ht))}return it.length===1?it[0]:it}function skipAttributesToProps(_e){return utilities$1.PRESERVE_CUSTOM_ATTRIBUTES&&_e.type==="tag"&&utilities$1.isCustomComponent(_e.name,_e.attribs)}var domToReact_1=domToReact$2,domhandler=lib$2,htmlToDOM=htmlToDom,attributesToProps=attributesToProps$2,domToReact$1=domToReact_1;htmlToDOM=typeof htmlToDOM.default=="function"?htmlToDOM.default:htmlToDOM;var domParserOptions={lowerCaseAttributeNames:!1};function HTMLReactParser(_e,et){if(typeof _e!="string")throw new TypeError("First argument must be a string");return _e===""?[]:(et=et||{},domToReact$1(htmlToDOM(_e,et.htmlparser2||domParserOptions),et))}HTMLReactParser.domToReact=domToReact$1;HTMLReactParser.htmlToDOM=htmlToDOM;HTMLReactParser.attributesToProps=attributesToProps;HTMLReactParser.Comment=domhandler.Comment;HTMLReactParser.Element=domhandler.Element;HTMLReactParser.ProcessingInstruction=domhandler.ProcessingInstruction;HTMLReactParser.Text=domhandler.Text;var htmlReactParser=HTMLReactParser;HTMLReactParser.default=HTMLReactParser;const HTMLReactParser$1=getDefaultExportFromCjs$1(htmlReactParser);var domToReact=HTMLReactParser$1.domToReact;HTMLReactParser$1.htmlToDOM;HTMLReactParser$1.attributesToProps;HTMLReactParser$1.Comment;var Element$1=HTMLReactParser$1.Element;HTMLReactParser$1.ProcessingInstruction;HTMLReactParser$1.Text;const reactText=(_e,et=[])=>{if(!_e||typeof _e=="string"&&et.includes(_e))return"";if(typeof _e=="string")return _e;const tt=_e.props&&_e.props.children;return Array.isArray(tt)?tt.map(nt=>reactText(nt,et)).join(""):reactText(tt,et)},onlyEmoji=(_e,et=1,tt=!0)=>{var nt;if(!_e)return!1;try{if(tt&&(_e=_e.cloneNode(!0),_e.querySelectorAll("a.mention").forEach(it=>{var ot;return(ot=it.parentNode)==null?void 0:ot.removeChild(it)})),((nt=_e.textContent)==null?void 0:nt.replace(new RegExp(" ","g"),""))!=="")return!1;const rt=Array.from(_e.querySelectorAll("img.emojione"));return!(rt.length===0||rt.length>et||Array.from(_e.querySelectorAll("img")).length>rt.length)}catch(rt){return console.error(rt),!1}};var Link=function _e(et){return React$3.createElement(Link$2,_extends$4({},et,{className:"text-primary-600 hover:underline dark:text-accent-blue"}))},getAccount$1=makeGetAccount(),Mention=function _e(et){var tt=et.mention,nt=useAppSelector(function(it){return tt.id!==""?getAccount$1(it,tt.id):null}),rt=20,at="mention inline-block rounded-full bg-primary-200 text-primary-600 dark:bg-primary-800 dark:text-primary-400";return nt?_createRawReactElement(Link$2,{onClick:function(ot){return ot.stopPropagation()},to:"/@".concat(nt.acct),title:"@".concat(nt.fqn),className:clsx(at,"py-1 pl-1 pr-2")},void 0,_createRawReactElement(HoverRefWrapper,{accountId:nt.id,className:"inline-flex items-center align-top"},nt.id,_createRawReactElement(Avatar,{size:rt,src:nt.avatar,className:"mr-1.5 inline-flex items-center align-bottom"}),_createRawReactElement("span",{},void 0,"@",nt.acct))):_createRawReactElement(Link$2,{onClick:function(ot){return ot.stopPropagation()},to:"/@".concat(tt.acct),title:"@".concat(tt.acct),className:clsx(at,"px-2 py-1")},void 0,tt.id!==""?_createRawReactElement(HoverRefWrapper,{accountId:tt.id,className:"inline-flex items-center align-top"},tt.id,"@",tt.acct):React$3.createElement(React$3.Fragment,null,"@",tt.acct))};const POLL_VOTE_REQUEST="POLL_VOTE_REQUEST",POLL_VOTE_SUCCESS="POLL_VOTE_SUCCESS",POLL_VOTE_FAIL="POLL_VOTE_FAIL",POLL_FETCH_REQUEST="POLL_FETCH_REQUEST",POLL_FETCH_SUCCESS="POLL_FETCH_SUCCESS",POLL_FETCH_FAIL="POLL_FETCH_FAIL",vote=(_e,et)=>(tt,nt)=>{tt(voteRequest()),api(nt).post(`/api/v1/polls/${_e}/votes`,{choices:et}).then(({data:rt})=>{tt(importFetchedPoll(rt)),tt(voteSuccess(rt))}).catch(rt=>tt(voteFail(rt)))},fetchPoll=_e=>(et,tt)=>{et(fetchPollRequest()),api(tt).get(`/api/v1/polls/${_e}`).then(({data:nt})=>{et(importFetchedPoll(nt)),et(fetchPollSuccess(nt))}).catch(nt=>et(fetchPollFail(nt)))},voteRequest=()=>({type:POLL_VOTE_REQUEST}),voteSuccess=_e=>({type:POLL_VOTE_SUCCESS,poll:_e}),voteFail=_e=>({type:POLL_VOTE_FAIL,error:_e}),fetchPollRequest=()=>({type:POLL_FETCH_REQUEST}),fetchPollSuccess=_e=>({type:POLL_FETCH_SUCCESS,poll:_e}),fetchPollFail=_e=>({type:POLL_FETCH_FAIL,error:_e});var messages$F={closed:{id:"poll.closed",defaultMessage:"Closed"},nonAnonymous:{id:"poll.non_anonymous.label",defaultMessage:"Other instances may display the options you voted for"}},PollFooter=function _e(et){var tt,nt=et.poll,rt=et.showResults,at=et.selected,it=useAppDispatch(),ot=useIntl(),st=function(){return it(vote(nt.id,Object.keys(at)))},ct=function(pt){it(fetchPoll(nt.id)),pt.stopPropagation(),pt.preventDefault()},ut=null;nt.expires_at!==null&&(ut=nt.expired?ot.formatMessage(messages$F.closed):_createRawReactElement(RelativeTimestamp$1,{weight:"medium",timestamp:nt.expires_at,futureDate:!0}));var dt=_createRawReactElement(FormattedMessage$1,{id:"poll.total_votes",defaultMessage:"{count, plural, one {# vote} other {# votes}}",values:{count:nt.votes_count}});return _createRawReactElement(Stack,{space:4,"data-testid":"poll-footer"},void 0,!rt&&nt.multiple&&_createRawReactElement(Button,{onClick:st,theme:"primary",block:!0},void 0,_createRawReactElement(FormattedMessage$1,{id:"poll.vote",defaultMessage:"Vote"})),_createRawReactElement(HStack,{space:1.5,alignItems:"center",wrap:!0},void 0,((tt=nt.pleroma)===null||tt===void 0?void 0:tt.non_anonymous)&&React$3.createElement(React$3.Fragment,null,_createRawReactElement(Tooltip,{text:ot.formatMessage(messages$F.nonAnonymous)},void 0,_createRawReactElement(Text$2,{theme:"muted",weight:"medium"},void 0,_createRawReactElement(FormattedMessage$1,{id:"poll.non_anonymous",defaultMessage:"Public poll"}))),_createRawReactElement(Text$2,{theme:"muted"},void 0,"·")),rt&&React$3.createElement(React$3.Fragment,null,_createRawReactElement("button",{className:"text-gray-600 underline",onClick:ct,"data-testid":"poll-refresh"},void 0,_createRawReactElement(Text$2,{theme:"muted",weight:"medium"},void 0,_createRawReactElement(FormattedMessage$1,{id:"poll.refresh",defaultMessage:"Refresh"}))),_createRawReactElement(Text$2,{theme:"muted"},void 0,"·")),_createRawReactElement(Text$2,{theme:"muted",weight:"medium"},void 0,dt),ut!==null&&React$3.createElement(React$3.Fragment,null,_createRawReactElement(Text$2,{theme:"muted"},void 0,"·"),_createRawReactElement(Text$2,{weight:"medium",theme:"muted","data-testid":"poll-expiration"},void 0,ut))))};function ownKeys$9(_e,et){var tt=Object.keys(_e);if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(_e);et&&(nt=nt.filter(function(rt){return Object.getOwnPropertyDescriptor(_e,rt).enumerable})),tt.push.apply(tt,nt)}return tt}function _objectSpread$8(_e){for(var et=1;et=pt.votes_count});return _createRawReactElement("div",{},at.title,it?_createRawReactElement("div",{title:ut?dt:void 0},void 0,_createRawReactElement(HStack,{justifyContent:"between",alignItems:"center",className:"relative w-full overflow-hidden rounded-md bg-white p-2 dark:bg-primary-800"},void 0,_createRawReactElement(PollPercentageBar,{percent:ct,leading:ft}),_createRawReactElement("div",{className:"text-primary-600 dark:text-white"},void 0,_createRawReactElement(Text$2,{theme:"inherit",weight:"medium",dangerouslySetInnerHTML:{__html:at.title_emojified},className:"relative"})),_createRawReactElement(HStack,{space:2,alignItems:"center",className:"relative"},void 0,ut?_createRawReactElement(Icon$1,{src:vitePluginRequire_1697861835152_74863398,alt:ot.formatMessage(messages$E.voted),className:"h-4 w-4 text-primary-600 dark:fill-white dark:text-primary-800"}):_createRawReactElement("div",{className:"svg-icon"}),_createRawReactElement("div",{className:"text-primary-600 dark:text-white"},void 0,_createRawReactElement(Text$2,{weight:"medium",theme:"inherit"},void 0,rt.multiple?dt:"".concat(Math.round(ct),"%")))))):React$3.createElement(PollOptionText,_extends$4({percent:ct},et)))};function ownKeys$8(_e,et){var tt=Object.keys(_e);if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(_e);et&&(nt=nt.filter(function(rt){return Object.getOwnPropertyDescriptor(_e,rt).enumerable})),tt.push.apply(tt,nt)}return tt}function _objectSpread$7(_e){for(var et=1;etMAX_HEIGHT&&(dt(!0),ht(!0))},bt=function(){if(St.current){var Lt=onlyEmoji(St.current,BIG_EMOJI_LIMIT,!0);Lt!==vt&>(Lt)}};reactExports.useLayoutEffect(function(){$t()},[]),reactExports.useLayoutEffect(function(){bt()});var wt={replace:function(Lt){if(Lt instanceof Element$1&&["script","iframe"].includes(Lt.name))return null;if(Lt instanceof Element$1&&Lt.name==="a"){var It,Ot=((It=Lt.attribs.class)===null||It===void 0?void 0:It.split(" "))||[];if(Ot.includes("mention")){var Ut=tt.mentions.find(function(Xt){var Yt=Xt.url;return Lt.attribs.href===Yt});if(Ut)return _createRawReactElement(Mention,{mention:Ut});if(Lt.attribs.href){var jt=_toConsumableArray(Lt.attribs.href.matchAll(/^http(?:s)?:\/\/(\S+)\/@(\S+)/gm))[0];if(jt)return _createRawReactElement(Mention,{mention:{acct:"".concat(jt[2],"@").concat(jt[1]),url:Lt.attribs.href,id:"",username:""}})}}if(Ot.includes("hashtag")||Lt.attribs.href.match(/^http(?:s)?:\/\/\S*\/tags/)){var zt=Lt.attribs.dataTag;if(!zt){var Qt=domToReact(Lt.children);Array.isArray(Qt)?zt=Qt.map(function(Xt){return reactText(Xt,["#"])}).join(""):zt=typeof Qt=="string"?Qt.replace("#",""):void 0}if(zt)return _createRawReactElement(Link,{to:"/tags/".concat(zt)},void 0,"#",zt)}return React$3.createElement("a",_extends$4({},Lt.attribs,{onClick:function(Yt){return Yt.stopPropagation()},rel:"nofollow noopener",target:"_blank",title:Lt.attribs.href}),domToReact(Lt.children,wt))}}},xt=reactExports.useMemo(function(){return tt.contentHtml},[tt.contentHtml]);if(tt.content.length===0)return null;var Tt=tt.spoiler_text.length>0,Ct="text-gray-900 dark:text-gray-100 break-words text-ellipsis overflow-x-visible overflow-y-clip relative focus:outline-none",Nt=HTMLReactParser$1(xt,wt),At=isRtl(tt.search_index)?"rtl":"ltr",kt=clsx(Ct,{"cursor-pointer":nt,"whitespace-normal":Tt,"max-h-[300px]":mt,"leading-normal big-emoji":vt}),Pt=tt.poll&&typeof tt.poll=="string",Ft=[React$3.createElement(Markup,{ref:St,tabIndex:0,key:"content",className:kt,direction:At,lang:tt.language||void 0,size:ot},Nt)];return ut&&mt&&Ft.push(_createRawReactElement("div",{className:"flex w-full justify-center pt-2",role:"button",tabIndex:0,onClick:Rt},void 0,_createRawReactElement(Button,{type:"button",theme:"primary",size:"sm",icon:vitePluginRequire_1697861809669_7698334,onClick:Rt},void 0,_createRawReactElement(FormattedMessage$1,{id:"status.show_more",defaultMessage:"Show more"})))),Pt&&!mt&&Ft.push(_createRawReactElement(Poll,{id:tt.poll,status:tt.url},"poll")),ut&&!mt&&Ft.push(_createRawReactElement("div",{className:"flex w-full justify-center pt-2",role:"button",tabIndex:0,onClick:Rt},void 0,_createRawReactElement(Button,{type:"button",theme:"primary",size:"sm",icon:vitePluginRequire_1697861833285_7157681,onClick:Rt},void 0,_createRawReactElement(FormattedMessage$1,{id:"status.show_less",defaultMessage:"Show less"})))),nt?_createRawReactElement("div",{className:clsx({"bg-gray-100 dark:bg-primary-800 rounded-md p-4":Pt})},void 0,Ft):React$3.createElement(React$3.Fragment,null,Ft)};const StatusContent$1=React$3.memo(StatusContent);var _excluded$7=["collapsable"],messages$C={cancel:{id:"reply_indicator.cancel",defaultMessage:"Cancel"},show:{id:"moderation_overlay.show_content",defaultMessage:"Show content"},hide:{id:"moderation_overlay.hide_content",defaultMessage:"Hide content"}},StatusContainer=function _e(et){var tt=et.contentOption,nt=et.hasMedia,rt=et.showMedia,at=et.isSensitive,it=et.additionalMediaCondition,ot=it===void 0?!0:it,st=et.quote,ct=et.compose,ut=et.onToggleMediaVisibility,dt=ut===void 0?function(){}:ut,ft=tt.status,pt=tt.translatable,mt=useIntl(),ht=useAppDispatch(),Et=ft.hidden,yt=function(){Et?ht(revealStatus(ft.id)):(ht(hideStatus(ft.id)),rt&&dt())},vt=function(wt){wt.stopPropagation(),yt()},gt=ft.spoiler_text,St=nt&&!gt,Rt=tt.collapsable,$t=_objectWithoutProperties(tt,_excluded$7);return _createRawReactElement("div",{className:"status-container"},void 0,at&>&&_createRawReactElement("div",{className:"pb-4"},void 0,_createRawReactElement(Text$2,{className:"line-clamp-6",size:tt.textSize,theme:"white",weight:"medium"},void 0,_createRawReactElement("span",{dangerouslySetInnerHTML:{__html:ft.spoilerHtml}}))),ft.event?_createRawReactElement(EventPreview,{status:ft,hideAction:!0}):_createRawReactElement("div",{className:"relative"},void 0,!St&&at&&Et&>&&_createRawReactElement("div",{className:"absolute z-[1] flex h-full w-full items-center justify-center",role:"button",tabIndex:0,onClick:vt},void 0,_createRawReactElement(Button,{type:"button",theme:"primary",size:"sm",icon:vitePluginRequire_1697861828084_10716620,onClick:vt},void 0,mt.formatMessage(messages$C.show))),_createRawReactElement(Stack,{className:clsx("relative z-0",{"max-h-24 overflow-x-visible overflow-y-clip blur-sm select-none pointer-events-none":!St&&at&&Et&>})},void 0,_createRawReactElement(Stack,{space:4},void 0,React$3.createElement(StatusContent$1,_extends$4({},$t,{collapsable:Rt&&!(at&>)})),pt&&_createRawReactElement(TranslateButton,{status:ft}),ot&&nt&&_createRawReactElement(StatusMedia,{status:ft,muted:ct,showMedia:rt,onToggleVisibility:dt}),st)),!St&&at&&!Et&>&&_createRawReactElement("div",{className:"flex w-full justify-center pt-2",role:"button",tabIndex:0,onClick:vt},void 0,_createRawReactElement(Button,{type:"button",theme:"primary",size:"sm",icon:vitePluginRequire_1697861828084_81550747,onClick:vt},void 0,mt.formatMessage(messages$C.hide)))))},_excluded$6=["children","className"],OutlineBox=function _e(et){var tt=et.children,nt=et.className,rt=_objectWithoutProperties(et,_excluded$6);return React$3.createElement("div",_extends$4({className:clsx("rounded-lg border border-solid border-gray-300 p-4 dark:border-gray-800",nt)},rt),tt)};const STATUS_HOVER_CARD_OPEN="STATUS_HOVER_CARD_OPEN",STATUS_HOVER_CARD_UPDATE="STATUS_HOVER_CARD_UPDATE",STATUS_HOVER_CARD_CLOSE="STATUS_HOVER_CARD_CLOSE",openStatusHoverCard=(_e,et)=>({type:STATUS_HOVER_CARD_OPEN,ref:_e,statusId:et}),updateStatusHoverCard=()=>({type:STATUS_HOVER_CARD_UPDATE}),closeStatusHoverCard=(_e=!1)=>({type:STATUS_HOVER_CARD_CLOSE,force:_e});var showStatusHoverCard=debounce$2(function(_e,et,tt){_e(openStatusHoverCard(et,tt))},300),HoverStatusWrapper=function _e(et){var tt=et.statusId,nt=et.children,rt=et.inline,at=rt===void 0?!1:rt,it=et.className,ot=useDispatch(),st=reactExports.useRef(null),ct=at?"span":"div",ut=function(){isMobile(window.innerWidth)||showStatusHoverCard(ot,st,tt)},dt=function(){showStatusHoverCard.cancel(),setTimeout(function(){return ot(closeStatusHoverCard())},200)},ft=function(){showStatusHoverCard.cancel(),ot(closeStatusHoverCard(!0))};return React$3.createElement(ct,{ref:st,className:clsx("hover-status-wrapper",it),onMouseEnter:ut,onMouseLeave:dt,onClick:ft},nt)};const isPubkey=_e=>/^[0-9a-f]{64}$/i.test(_e);var StatusReplyMentions=function _e(et){var tt=et.status,nt=et.hoverable,rt=nt===void 0?!0:nt,at=useAppDispatch(),it=function(ut){ut.stopPropagation();var dt=tt.account;at(openModal("MENTIONS",{username:dt.acct,statusId:tt.id}))};if(!tt.in_reply_to_id)return null;var ot=tt.mentions;if(ot.size===0)return _createRawReactElement("div",{className:"reply-mentions"},void 0,_createRawReactElement(FormattedMessage$1,{id:"reply_mentions.reply_empty",defaultMessage:"Replying to post"}));var st=ot.slice(0,2).map(function(ct){var ut=_createRawReactElement(Link$2,{to:"/@".concat(ct.acct),className:"reply-mentions__account max-w-[200px] truncate align-bottom",onClick:function(ft){return ft.stopPropagation()}},ct.id,"@",isPubkey(ct.username)?ct.username.slice(0,8):ct.username);return rt?_createRawReactElement(HoverRefWrapper,{accountId:ct.id,inline:!0},ct.id,ut):ut}).toArray();return ot.size>2&&st.push(_createRawReactElement("span",{className:"cursor-pointer hover:underline",role:"button",onClick:it,tabIndex:0},"more",_createRawReactElement(FormattedMessage$1,{id:"reply_mentions.more",defaultMessage:"{count} more",values:{count:ot.size-2}}))),_createRawReactElement("div",{className:"reply-mentions"},void 0,_createRawReactElement(FormattedMessage$1,{id:"reply_mentions.reply.hoverable",defaultMessage:"Replying to {accounts}",values:{accounts:_createRawReactElement(FormattedList,{type:"conjunction",value:st}),hover:function(ut){return rt?_createRawReactElement(HoverStatusWrapper,{statusId:tt.in_reply_to_id,inline:!0},void 0,_createRawReactElement("span",{className:"cursor-pointer hover:underline",role:"presentation"},"hoverstatus",ut)):ut}}}))},messages$B={cancel:{id:"reply_indicator.cancel",defaultMessage:"Cancel"},show:{id:"moderation_overlay.show_content",defaultMessage:"Show content"},hide:{id:"moderation_overlay.hide_content",defaultMessage:"Hide content"}},QuotedStatus=function _e(et){var tt=et.status,nt=et.onCancel,rt=et.compose,at=useIntl(),it=useHistory(),ot=useSettings(),st=ot.get("showSensitiveMedia"),ct=reactExports.useState(defaultMediaVisibility(tt,st)),ut=_slicedToArray$4(ct,2),dt=ut[0],ft=ut[1],pt=function(gt){if(tt){var St=tt.account;if(!rt&>.button===0){var Rt="/@".concat(St.acct,"/posts/").concat(tt.id);gt.ctrlKey||gt.metaKey?window.open(Rt,"_blank"):it.push(Rt),gt.stopPropagation(),gt.preventDefault()}}},mt=function(){nt&&nt()},ht=function(){ft(!dt)};if(!tt)return null;var Et=tt.account,yt={};return nt&&(yt={onActionClick:mt,actionIcon:vitePluginRequire_1697861811668_44144977,actionAlignment:"top",actionTitle:at.formatMessage(messages$B.cancel)}),_createRawReactElement(OutlineBox,{"data-testid":"quoted-status",className:clsx("cursor-pointer",{"hover:bg-gray-100 dark:hover:bg-gray-800":!rt})},void 0,_createRawReactElement(Stack,{space:2,onClick:pt},void 0,React$3.createElement(AccountContainer,_extends$4({},yt,{id:Et.id,timestamp:tt.created_at,withRelationship:!1,showProfileHoverCard:!rt,withLinkToProfile:!rt})),_createRawReactElement(StatusReplyMentions,{status:tt,hoverable:!1}),_createRawReactElement(StatusContainer,{showMedia:dt,isSensitive:tt.sensitive,onToggleMediaVisibility:ht,hasMedia:tt.media_attachments.size>0,contentOption:{status:tt,collapsable:!0}})))},Tombstone=function _e(et){return et.id,et.onMoveUp,et.onMoveDown,_createRawReactElement("div",{className:"h-16"},void 0,_createRawReactElement("div",{className:"focusable flex h-[42px] items-center justify-center rounded-lg border-2 border-gray-200 text-center dark:border-gray-800"},void 0,_createRawReactElement(Text$2,{theme:"muted"},void 0,_createRawReactElement(FormattedMessage$1,{id:"statuses.tombstone",defaultMessage:"One or more posts are unavailable."}))))},QuotedStatusContainer$1=function _e(et){var tt=et.statusId,nt=reactExports.useCallback(makeGetStatus(),[]),rt=useAppSelector(function(at){return nt(at,{id:tt})});return rt?rt.tombstone?_createRawReactElement(Tombstone,{id:rt.id}):_createRawReactElement(QuotedStatus,{status:rt}):null};const vitePluginRequire_1697861808850_96938226="/packs/assets/upload-78adfb93.svg",vitePluginRequire_1697861817757_74398257="/packs/assets/thumb-down-a65cd7fe.svg",vitePluginRequire_1697861820192_13017256="/packs/assets/star-d5853b0b.svg",vitePluginRequire_1697861817757_12600091="/packs/assets/thumb-up-9f748bd1.svg",vitePluginRequire_1697861817757_28781507="/packs/assets/message-circle-2-46d03d0e.svg",vitePluginRequire_1697861810834_29007330="/packs/assets/quote-98b4789c.svg",vitePluginRequire_1697861811805_60977601="/packs/assets/lock-78f1ab9b.svg",vitePluginRequire_1697861810834_33454440="/packs/assets/mail-6305d0d8.svg",vitePluginRequire_1697861810834_37299420="/packs/assets/alert-triangle-097e7c76.svg",vitePluginRequire_1697861810834_38963235="/packs/assets/gavel-fb282a59.svg",vitePluginRequire_1697861810834_83829185="/packs/assets/flag-246ad051.svg",vitePluginRequire_1697861806677_81747454="/packs/assets/volume-3-258a22f7.svg",vitePluginRequire_1697861810834_58630734="/packs/assets/messages-ab62d88e.svg",vitePluginRequire_1697861809581_59959258="/packs/assets/edit-5e8dc169.svg",vitePluginRequire_1697861828084_9357167="/packs/assets/pin-f98409a9.svg",vitePluginRequire_1697861810834_40852917="/packs/assets/pinned-off-bb83f58a.svg",vitePluginRequire_1697861817755_10587808="/packs/assets/bell-off-e5234858.svg",vitePluginRequire_1697861831311_54316318="/packs/assets/bell-22e4fc2a.svg",vitePluginRequire_1697861810834_3571213="/packs/assets/bookmark-278aca9e.svg",vitePluginRequire_1697861810834_78521829="/packs/assets/bookmark-off-594880a2.svg",vitePluginRequire_1697861828130_86868126="/packs/assets/share-a19db25c.svg",vitePluginRequire_1697861817685_18392263="/packs/assets/clipboard-copy-b7f89476.svg",vitePluginRequire_1697861817755_14152020="/packs/assets/arrows-vertical-2f0457e2.svg";var aCallable=aCallable$b,toObject$1=toObject$e,IndexedObject=indexedObject,lengthOfArrayLike$1=lengthOfArrayLike$b,$TypeError=TypeError,createMethod=function(_e){return function(et,tt,nt,rt){aCallable(tt);var at=toObject$1(et),it=IndexedObject(at),ot=lengthOfArrayLike$1(at),st=_e?ot-1:0,ct=_e?-1:1;if(nt<2)for(;;){if(st in it){rt=it[st],st+=ct;break}if(st+=ct,_e?st<0:ot<=st)throw $TypeError("Reduce of empty array with no initial value")}for(;_e?st>=0:ot>st;st+=ct)st in it&&(rt=tt(rt,it[st],st,at));return rt}},arrayReduce={left:createMethod(!1),right:createMethod(!0)},$$2=_export,$reduce=arrayReduce.left,arrayMethodIsStrict=arrayMethodIsStrict$4,CHROME_VERSION=engineV8Version,IS_NODE=engineIsNode,CHROME_BUG=!IS_NODE&&CHROME_VERSION>79&&CHROME_VERSION<83,FORCED$1=CHROME_BUG||!arrayMethodIsStrict("reduce");$$2({target:"Array",proto:!0,forced:FORCED$1},{reduce:function _e(et){var tt=arguments.length;return $reduce(this,et,tt,tt>1?arguments[1]:void 0)}});const REBLOG_REQUEST="REBLOG_REQUEST",REBLOG_SUCCESS="REBLOG_SUCCESS",REBLOG_FAIL="REBLOG_FAIL",FAVOURITE_REQUEST="FAVOURITE_REQUEST",FAVOURITE_SUCCESS="FAVOURITE_SUCCESS",FAVOURITE_FAIL="FAVOURITE_FAIL",DISLIKE_REQUEST="DISLIKE_REQUEST",DISLIKE_SUCCESS="DISLIKE_SUCCESS",DISLIKE_FAIL="DISLIKE_FAIL",UNREBLOG_REQUEST="UNREBLOG_REQUEST",UNREBLOG_SUCCESS="UNREBLOG_SUCCESS",UNREBLOG_FAIL="UNREBLOG_FAIL",UNFAVOURITE_REQUEST="UNFAVOURITE_REQUEST",UNFAVOURITE_SUCCESS="UNFAVOURITE_SUCCESS",UNFAVOURITE_FAIL="UNFAVOURITE_FAIL",UNDISLIKE_REQUEST="UNDISLIKE_REQUEST",UNDISLIKE_SUCCESS="UNDISLIKE_SUCCESS",UNDISLIKE_FAIL="UNDISLIKE_FAIL",REBLOGS_FETCH_REQUEST="REBLOGS_FETCH_REQUEST",REBLOGS_FETCH_SUCCESS="REBLOGS_FETCH_SUCCESS",REBLOGS_FETCH_FAIL="REBLOGS_FETCH_FAIL",FAVOURITES_FETCH_REQUEST="FAVOURITES_FETCH_REQUEST",FAVOURITES_FETCH_SUCCESS="FAVOURITES_FETCH_SUCCESS",FAVOURITES_FETCH_FAIL="FAVOURITES_FETCH_FAIL",DISLIKES_FETCH_REQUEST="DISLIKES_FETCH_REQUEST",DISLIKES_FETCH_SUCCESS="DISLIKES_FETCH_SUCCESS",DISLIKES_FETCH_FAIL="DISLIKES_FETCH_FAIL",REACTIONS_FETCH_REQUEST="REACTIONS_FETCH_REQUEST",REACTIONS_FETCH_SUCCESS="REACTIONS_FETCH_SUCCESS",REACTIONS_FETCH_FAIL="REACTIONS_FETCH_FAIL",PIN_REQUEST="PIN_REQUEST",PIN_SUCCESS="PIN_SUCCESS",PIN_FAIL="PIN_FAIL",UNPIN_REQUEST="UNPIN_REQUEST",UNPIN_SUCCESS="UNPIN_SUCCESS",UNPIN_FAIL="UNPIN_FAIL",BOOKMARK_REQUEST="BOOKMARK_REQUEST",BOOKMARK_SUCCESS="BOOKMARKED_SUCCESS",BOOKMARK_FAIL="BOOKMARKED_FAIL",UNBOOKMARK_REQUEST="UNBOOKMARKED_REQUEST",UNBOOKMARK_SUCCESS="UNBOOKMARKED_SUCCESS",UNBOOKMARK_FAIL="UNBOOKMARKED_FAIL",REMOTE_INTERACTION_REQUEST="REMOTE_INTERACTION_REQUEST",REMOTE_INTERACTION_SUCCESS="REMOTE_INTERACTION_SUCCESS",REMOTE_INTERACTION_FAIL="REMOTE_INTERACTION_FAIL",FAVOURITES_EXPAND_SUCCESS="FAVOURITES_EXPAND_SUCCESS",FAVOURITES_EXPAND_FAIL="FAVOURITES_EXPAND_FAIL",REBLOGS_EXPAND_SUCCESS="REBLOGS_EXPAND_SUCCESS",REBLOGS_EXPAND_FAIL="REBLOGS_EXPAND_FAIL",messages$A={bookmarkAdded:{id:"status.bookmarked",defaultMessage:"Bookmark added."},bookmarkRemoved:{id:"status.unbookmarked",defaultMessage:"Bookmark removed."},view:{id:"toast.view",defaultMessage:"View"}},reblog=_e=>function(et,tt){isLoggedIn(tt)&&(et(reblogRequest(_e)),api(tt).post(`/api/v1/statuses/${_e.id}/reblog`).then(function(nt){et(importFetchedStatus(nt.data.reblog)),et(reblogSuccess(_e))}).catch(nt=>{et(reblogFail(_e,nt))}))},unreblog=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(unreblogRequest(_e)),api(tt).post(`/api/v1/statuses/${_e.id}/unreblog`).then(()=>{et(unreblogSuccess(_e))}).catch(nt=>{et(unreblogFail(_e,nt))}))},toggleReblog=_e=>et=>{_e.reblogged?et(unreblog(_e)):et(reblog(_e))},reblogRequest=_e=>({type:REBLOG_REQUEST,status:_e,skipLoading:!0}),reblogSuccess=_e=>({type:REBLOG_SUCCESS,status:_e,skipLoading:!0}),reblogFail=(_e,et)=>({type:REBLOG_FAIL,status:_e,error:et,skipLoading:!0}),unreblogRequest=_e=>({type:UNREBLOG_REQUEST,status:_e,skipLoading:!0}),unreblogSuccess=_e=>({type:UNREBLOG_SUCCESS,status:_e,skipLoading:!0}),unreblogFail=(_e,et)=>({type:UNREBLOG_FAIL,status:_e,error:et,skipLoading:!0}),favourite=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(favouriteRequest(_e)),api(tt).post(`/api/v1/statuses/${_e.id}/favourite`).then(function(nt){et(favouriteSuccess(_e))}).catch(function(nt){et(favouriteFail(_e,nt))}))},unfavourite=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(unfavouriteRequest(_e)),api(tt).post(`/api/v1/statuses/${_e.id}/unfavourite`).then(()=>{et(unfavouriteSuccess(_e))}).catch(nt=>{et(unfavouriteFail(_e,nt))}))},toggleFavourite=_e=>et=>{_e.favourited?et(unfavourite(_e)):et(favourite(_e))},favouriteRequest=_e=>({type:FAVOURITE_REQUEST,status:_e,skipLoading:!0}),favouriteSuccess=_e=>({type:FAVOURITE_SUCCESS,status:_e,skipLoading:!0}),favouriteFail=(_e,et)=>({type:FAVOURITE_FAIL,status:_e,error:et,skipLoading:!0}),unfavouriteRequest=_e=>({type:UNFAVOURITE_REQUEST,status:_e,skipLoading:!0}),unfavouriteSuccess=_e=>({type:UNFAVOURITE_SUCCESS,status:_e,skipLoading:!0}),unfavouriteFail=(_e,et)=>({type:UNFAVOURITE_FAIL,status:_e,error:et,skipLoading:!0}),dislike=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(dislikeRequest(_e)),api(tt).post(`/api/friendica/statuses/${_e.id}/dislike`).then(function(){et(dislikeSuccess(_e))}).catch(function(nt){et(dislikeFail(_e,nt))}))},undislike=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(undislikeRequest(_e)),api(tt).post(`/api/friendica/statuses/${_e.id}/undislike`).then(()=>{et(undislikeSuccess(_e))}).catch(nt=>{et(undislikeFail(_e,nt))}))},toggleDislike=_e=>et=>{_e.disliked?et(undislike(_e)):et(dislike(_e))},dislikeRequest=_e=>({type:DISLIKE_REQUEST,status:_e,skipLoading:!0}),dislikeSuccess=_e=>({type:DISLIKE_SUCCESS,status:_e,skipLoading:!0}),dislikeFail=(_e,et)=>({type:DISLIKE_FAIL,status:_e,error:et,skipLoading:!0}),undislikeRequest=_e=>({type:UNDISLIKE_REQUEST,status:_e,skipLoading:!0}),undislikeSuccess=_e=>({type:UNDISLIKE_SUCCESS,status:_e,skipLoading:!0}),undislikeFail=(_e,et)=>({type:UNDISLIKE_FAIL,status:_e,error:et,skipLoading:!0}),bookmark=_e=>(et,tt)=>{et(bookmarkRequest(_e)),api(tt).post(`/api/v1/statuses/${_e.id}/bookmark`).then(function(nt){et(importFetchedStatus(nt.data)),et(bookmarkSuccess(_e,nt.data)),toast.success(messages$A.bookmarkAdded,{actionLabel:messages$A.view,actionLink:"/bookmarks"})}).catch(function(nt){et(bookmarkFail(_e,nt))})},unbookmark=_e=>(et,tt)=>{et(unbookmarkRequest(_e)),api(tt).post(`/api/v1/statuses/${_e.id}/unbookmark`).then(nt=>{et(importFetchedStatus(nt.data)),et(unbookmarkSuccess(_e,nt.data)),toast.success(messages$A.bookmarkRemoved)}).catch(nt=>{et(unbookmarkFail(_e,nt))})},toggleBookmark=_e=>(et,tt)=>{_e.bookmarked?et(unbookmark(_e)):et(bookmark(_e))},bookmarkRequest=_e=>({type:BOOKMARK_REQUEST,status:_e}),bookmarkSuccess=(_e,et)=>({type:BOOKMARK_SUCCESS,status:_e,response:et}),bookmarkFail=(_e,et)=>({type:BOOKMARK_FAIL,status:_e,error:et}),unbookmarkRequest=_e=>({type:UNBOOKMARK_REQUEST,status:_e}),unbookmarkSuccess=(_e,et)=>({type:UNBOOKMARK_SUCCESS,status:_e,response:et}),unbookmarkFail=(_e,et)=>({type:UNBOOKMARK_FAIL,status:_e,error:et}),fetchReblogs=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(fetchReblogsRequest(_e)),api(tt).get(`/api/v1/statuses/${_e}/reblogged_by`).then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");et(importFetchedAccounts(nt.data)),et(fetchRelationships(nt.data.map(at=>at.id))),et(fetchReblogsSuccess(_e,nt.data,rt?rt.uri:null))}).catch(nt=>{et(fetchReblogsFail(_e,nt))}))},fetchReblogsRequest=_e=>({type:REBLOGS_FETCH_REQUEST,id:_e}),fetchReblogsSuccess=(_e,et,tt)=>({type:REBLOGS_FETCH_SUCCESS,id:_e,accounts:et,next:tt}),fetchReblogsFail=(_e,et)=>({type:REBLOGS_FETCH_FAIL,id:_e,error:et}),expandReblogs=(_e,et)=>(tt,nt)=>{api(nt).get(et).then(rt=>{const at=getLinks(rt).refs.find(it=>it.rel==="next");tt(importFetchedAccounts(rt.data)),tt(fetchRelationships(rt.data.map(it=>it.id))),tt(expandReblogsSuccess(_e,rt.data,at?at.uri:null))}).catch(rt=>{tt(expandReblogsFail(_e,rt))})},expandReblogsSuccess=(_e,et,tt)=>({type:REBLOGS_EXPAND_SUCCESS,id:_e,accounts:et,next:tt}),expandReblogsFail=(_e,et)=>({type:REBLOGS_EXPAND_FAIL,id:_e,error:et}),fetchFavourites=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(fetchFavouritesRequest(_e)),api(tt).get(`/api/v1/statuses/${_e}/favourited_by`).then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");et(importFetchedAccounts(nt.data)),et(fetchRelationships(nt.data.map(at=>at.id))),et(fetchFavouritesSuccess(_e,nt.data,rt?rt.uri:null))}).catch(nt=>{et(fetchFavouritesFail(_e,nt))}))},fetchFavouritesRequest=_e=>({type:FAVOURITES_FETCH_REQUEST,id:_e}),fetchFavouritesSuccess=(_e,et,tt)=>({type:FAVOURITES_FETCH_SUCCESS,id:_e,accounts:et,next:tt}),fetchFavouritesFail=(_e,et)=>({type:FAVOURITES_FETCH_FAIL,id:_e,error:et}),expandFavourites=(_e,et)=>(tt,nt)=>{api(nt).get(et).then(rt=>{const at=getLinks(rt).refs.find(it=>it.rel==="next");tt(importFetchedAccounts(rt.data)),tt(fetchRelationships(rt.data.map(it=>it.id))),tt(expandFavouritesSuccess(_e,rt.data,at?at.uri:null))}).catch(rt=>{tt(expandFavouritesFail(_e,rt))})},expandFavouritesSuccess=(_e,et,tt)=>({type:FAVOURITES_EXPAND_SUCCESS,id:_e,accounts:et,next:tt}),expandFavouritesFail=(_e,et)=>({type:FAVOURITES_EXPAND_FAIL,id:_e,error:et}),fetchDislikes=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(fetchDislikesRequest(_e)),api(tt).get(`/api/friendica/statuses/${_e}/disliked_by`).then(nt=>{et(importFetchedAccounts(nt.data)),et(fetchRelationships(nt.data.map(rt=>rt.id))),et(fetchDislikesSuccess(_e,nt.data))}).catch(nt=>{et(fetchDislikesFail(_e,nt))}))},fetchDislikesRequest=_e=>({type:DISLIKES_FETCH_REQUEST,id:_e}),fetchDislikesSuccess=(_e,et)=>({type:DISLIKES_FETCH_SUCCESS,id:_e,accounts:et}),fetchDislikesFail=(_e,et)=>({type:DISLIKES_FETCH_FAIL,id:_e,error:et}),fetchReactions=_e=>(et,tt)=>{et(fetchReactionsRequest(_e)),api(tt).get(`/api/v1/pleroma/statuses/${_e}/reactions`).then(nt=>{et(importFetchedAccounts(nt.data.map(({accounts:rt})=>rt).flat())),et(fetchReactionsSuccess(_e,nt.data))}).catch(nt=>{et(fetchReactionsFail(_e,nt))})},fetchReactionsRequest=_e=>({type:REACTIONS_FETCH_REQUEST,id:_e}),fetchReactionsSuccess=(_e,et)=>({type:REACTIONS_FETCH_SUCCESS,id:_e,reactions:et}),fetchReactionsFail=(_e,et)=>({type:REACTIONS_FETCH_FAIL,id:_e,error:et}),pin=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(pinRequest(_e)),api(tt).post(`/api/v1/statuses/${_e.id}/pin`).then(nt=>{et(importFetchedStatus(nt.data)),et(pinSuccess(_e))}).catch(nt=>{et(pinFail(_e,nt))}))},pinToGroup=(_e,et)=>(tt,nt)=>api(nt).post(`/api/v1/groups/${et.id}/statuses/${_e.id}/pin`).then(()=>tt(expandGroupFeaturedTimeline(et.id))),unpinFromGroup=(_e,et)=>(tt,nt)=>api(nt).post(`/api/v1/groups/${et.id}/statuses/${_e.id}/unpin`).then(()=>tt(expandGroupFeaturedTimeline(et.id))),pinRequest=_e=>({type:PIN_REQUEST,status:_e,skipLoading:!0}),pinSuccess=_e=>({type:PIN_SUCCESS,status:_e,skipLoading:!0}),pinFail=(_e,et)=>({type:PIN_FAIL,status:_e,error:et,skipLoading:!0}),unpin=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(unpinRequest(_e)),api(tt).post(`/api/v1/statuses/${_e.id}/unpin`).then(nt=>{et(importFetchedStatus(nt.data)),et(unpinSuccess(_e))}).catch(nt=>{et(unpinFail(_e,nt))}))},togglePin=_e=>(et,tt)=>{_e.pinned?et(unpin(_e)):et(pin(_e))},unpinRequest=_e=>({type:UNPIN_REQUEST,status:_e,skipLoading:!0}),unpinSuccess=_e=>({type:UNPIN_SUCCESS,status:_e,skipLoading:!0}),unpinFail=(_e,et)=>({type:UNPIN_FAIL,status:_e,error:et,skipLoading:!0}),remoteInteraction=(_e,et)=>(tt,nt)=>(tt(remoteInteractionRequest(_e,et)),api(nt).post("/api/v1/pleroma/remote_interaction",{ap_id:_e,profile:et}).then(({data:rt})=>{if(rt.error)throw new Error(rt.error);return tt(remoteInteractionSuccess(_e,et,rt.url)),rt.url}).catch(rt=>{throw tt(remoteInteractionFail(_e,et,rt)),rt})),remoteInteractionRequest=(_e,et)=>({type:REMOTE_INTERACTION_REQUEST,ap_id:_e,profile:et}),remoteInteractionSuccess=(_e,et,tt)=>({type:REMOTE_INTERACTION_SUCCESS,ap_id:_e,profile:et,url:tt}),remoteInteractionFail=(_e,et,tt)=>({type:REMOTE_INTERACTION_FAIL,ap_id:_e,profile:et,error:tt}),vitePluginRequire_1697861828078_94410874="/packs/assets/user-minus-f6f109c6.svg",vitePluginRequire_1697861822040_83037141="/packs/assets/user-off-f3bc1ad5.svg",tagToBadge=_e=>`badge:${_e}`,badgeToTag=_e=>_e.replace(/^badge:/,""),getTagDiff=(_e,et)=>{const tt=OrderedSet(_e),nt=OrderedSet(et);return{added:nt.subtract(tt).toArray(),removed:tt.subtract(nt).toArray()}},filterBadges=_e=>_e.filter(et=>et.startsWith("badge:")),getBadges=_e=>{var tt;const et=((tt=_e==null?void 0:_e.pleroma)==null?void 0:tt.tags)??[];return filterBadges(et)},ADMIN_CONFIG_FETCH_REQUEST="ADMIN_CONFIG_FETCH_REQUEST",ADMIN_CONFIG_FETCH_SUCCESS="ADMIN_CONFIG_FETCH_SUCCESS",ADMIN_CONFIG_FETCH_FAIL="ADMIN_CONFIG_FETCH_FAIL",ADMIN_CONFIG_UPDATE_REQUEST="ADMIN_CONFIG_UPDATE_REQUEST",ADMIN_CONFIG_UPDATE_SUCCESS="ADMIN_CONFIG_UPDATE_SUCCESS",ADMIN_CONFIG_UPDATE_FAIL="ADMIN_CONFIG_UPDATE_FAIL",ADMIN_REPORTS_FETCH_REQUEST="ADMIN_REPORTS_FETCH_REQUEST",ADMIN_REPORTS_FETCH_SUCCESS="ADMIN_REPORTS_FETCH_SUCCESS",ADMIN_REPORTS_FETCH_FAIL="ADMIN_REPORTS_FETCH_FAIL",ADMIN_REPORTS_PATCH_REQUEST="ADMIN_REPORTS_PATCH_REQUEST",ADMIN_REPORTS_PATCH_SUCCESS="ADMIN_REPORTS_PATCH_SUCCESS",ADMIN_REPORTS_PATCH_FAIL="ADMIN_REPORTS_PATCH_FAIL",ADMIN_USERS_FETCH_REQUEST="ADMIN_USERS_FETCH_REQUEST",ADMIN_USERS_FETCH_SUCCESS="ADMIN_USERS_FETCH_SUCCESS",ADMIN_USERS_FETCH_FAIL="ADMIN_USERS_FETCH_FAIL",ADMIN_USERS_DELETE_REQUEST="ADMIN_USERS_DELETE_REQUEST",ADMIN_USERS_DELETE_SUCCESS="ADMIN_USERS_DELETE_SUCCESS",ADMIN_USERS_DELETE_FAIL="ADMIN_USERS_DELETE_FAIL",ADMIN_USERS_APPROVE_REQUEST="ADMIN_USERS_APPROVE_REQUEST",ADMIN_USERS_APPROVE_SUCCESS="ADMIN_USERS_APPROVE_SUCCESS",ADMIN_USERS_APPROVE_FAIL="ADMIN_USERS_APPROVE_FAIL",ADMIN_USERS_DEACTIVATE_REQUEST="ADMIN_USERS_DEACTIVATE_REQUEST",ADMIN_USERS_DEACTIVATE_SUCCESS="ADMIN_USERS_DEACTIVATE_SUCCESS",ADMIN_USERS_DEACTIVATE_FAIL="ADMIN_USERS_DEACTIVATE_FAIL",ADMIN_STATUS_DELETE_REQUEST="ADMIN_STATUS_DELETE_REQUEST",ADMIN_STATUS_DELETE_SUCCESS="ADMIN_STATUS_DELETE_SUCCESS",ADMIN_STATUS_DELETE_FAIL="ADMIN_STATUS_DELETE_FAIL",ADMIN_STATUS_TOGGLE_SENSITIVITY_REQUEST="ADMIN_STATUS_TOGGLE_SENSITIVITY_REQUEST",ADMIN_STATUS_TOGGLE_SENSITIVITY_SUCCESS="ADMIN_STATUS_TOGGLE_SENSITIVITY_SUCCESS",ADMIN_STATUS_TOGGLE_SENSITIVITY_FAIL="ADMIN_STATUS_TOGGLE_SENSITIVITY_FAIL",ADMIN_LOG_FETCH_REQUEST="ADMIN_LOG_FETCH_REQUEST",ADMIN_LOG_FETCH_SUCCESS="ADMIN_LOG_FETCH_SUCCESS",ADMIN_LOG_FETCH_FAIL="ADMIN_LOG_FETCH_FAIL",ADMIN_USERS_TAG_REQUEST="ADMIN_USERS_TAG_REQUEST",ADMIN_USERS_TAG_SUCCESS="ADMIN_USERS_TAG_SUCCESS",ADMIN_USERS_TAG_FAIL="ADMIN_USERS_TAG_FAIL",ADMIN_USERS_UNTAG_REQUEST="ADMIN_USERS_UNTAG_REQUEST",ADMIN_USERS_UNTAG_SUCCESS="ADMIN_USERS_UNTAG_SUCCESS",ADMIN_USERS_UNTAG_FAIL="ADMIN_USERS_UNTAG_FAIL",ADMIN_ADD_PERMISSION_GROUP_REQUEST="ADMIN_ADD_PERMISSION_GROUP_REQUEST",ADMIN_ADD_PERMISSION_GROUP_SUCCESS="ADMIN_ADD_PERMISSION_GROUP_SUCCESS",ADMIN_ADD_PERMISSION_GROUP_FAIL="ADMIN_ADD_PERMISSION_GROUP_FAIL",ADMIN_REMOVE_PERMISSION_GROUP_REQUEST="ADMIN_REMOVE_PERMISSION_GROUP_REQUEST",ADMIN_REMOVE_PERMISSION_GROUP_SUCCESS="ADMIN_REMOVE_PERMISSION_GROUP_SUCCESS",ADMIN_REMOVE_PERMISSION_GROUP_FAIL="ADMIN_REMOVE_PERMISSION_GROUP_FAIL",ADMIN_USER_INDEX_EXPAND_FAIL="ADMIN_USER_INDEX_EXPAND_FAIL",ADMIN_USER_INDEX_EXPAND_REQUEST="ADMIN_USER_INDEX_EXPAND_REQUEST",ADMIN_USER_INDEX_EXPAND_SUCCESS="ADMIN_USER_INDEX_EXPAND_SUCCESS",ADMIN_USER_INDEX_FETCH_FAIL="ADMIN_USER_INDEX_FETCH_FAIL",ADMIN_USER_INDEX_FETCH_REQUEST="ADMIN_USER_INDEX_FETCH_REQUEST",ADMIN_USER_INDEX_FETCH_SUCCESS="ADMIN_USER_INDEX_FETCH_SUCCESS",ADMIN_USER_INDEX_QUERY_SET="ADMIN_USER_INDEX_QUERY_SET",ADMIN_ANNOUNCEMENTS_FETCH_FAIL="ADMIN_ANNOUNCEMENTS_FETCH_FAILS",ADMIN_ANNOUNCEMENTS_FETCH_REQUEST="ADMIN_ANNOUNCEMENTS_FETCH_REQUEST",ADMIN_ANNOUNCEMENTS_FETCH_SUCCESS="ADMIN_ANNOUNCEMENTS_FETCH_SUCCESS",ADMIN_ANNOUNCEMENT_CHANGE_CONTENT="ADMIN_ANNOUNCEMENT_CHANGE_CONTENT",ADMIN_ANNOUNCEMENT_CHANGE_START_TIME="ADMIN_ANNOUNCEMENT_CHANGE_START_TIME",ADMIN_ANNOUNCEMENT_CHANGE_END_TIME="ADMIN_ANNOUNCEMENT_CHANGE_END_TIME",ADMIN_ANNOUNCEMENT_CHANGE_ALL_DAY="ADMIN_ANNOUNCEMENT_CHANGE_ALL_DAY",ADMIN_ANNOUNCEMENT_CREATE_REQUEST="ADMIN_ANNOUNCEMENT_CREATE_REQUEST",ADMIN_ANNOUNCEMENT_CREATE_SUCCESS="ADMIN_ANNOUNCEMENT_CREATE_REQUEST",ADMIN_ANNOUNCEMENT_CREATE_FAIL="ADMIN_ANNOUNCEMENT_CREATE_FAIL",ADMIN_ANNOUNCEMENT_DELETE_REQUEST="ADMIN_ANNOUNCEMENT_DELETE_REQUEST",ADMIN_ANNOUNCEMENT_DELETE_SUCCESS="ADMIN_ANNOUNCEMENT_DELETE_REQUEST",ADMIN_ANNOUNCEMENT_DELETE_FAIL="ADMIN_ANNOUNCEMENT_DELETE_FAIL",ADMIN_ANNOUNCEMENT_MODAL_INIT="ADMIN_ANNOUNCEMENT_MODAL_INIT",messages$z={announcementCreateSuccess:{id:"admin.edit_announcement.created",defaultMessage:"Announcement created"},announcementDeleteSuccess:{id:"admin.edit_announcement.deleted",defaultMessage:"Announcement deleted"},announcementUpdateSuccess:{id:"admin.edit_announcement.updated",defaultMessage:"Announcement edited"}},fetchConfig=()=>(_e,et)=>(_e({type:ADMIN_CONFIG_FETCH_REQUEST}),api(et).get("/api/v1/pleroma/admin/config").then(({data:tt})=>{_e({type:ADMIN_CONFIG_FETCH_SUCCESS,configs:tt.configs,needsReboot:tt.need_reboot})}).catch(tt=>{_e({type:ADMIN_CONFIG_FETCH_FAIL,error:tt})})),updateConfig=_e=>(et,tt)=>(et({type:ADMIN_CONFIG_UPDATE_REQUEST,configs:_e}),api(tt).post("/api/v1/pleroma/admin/config",{configs:_e}).then(({data:nt})=>{et({type:ADMIN_CONFIG_UPDATE_SUCCESS,configs:nt.configs,needsReboot:nt.need_reboot})}).catch(nt=>{et({type:ADMIN_CONFIG_UPDATE_FAIL,error:nt,configs:_e})})),updateSoapboxConfig=_e=>(et,tt)=>{const nt=[{group:":pleroma",key:":frontend_configurations",value:[tuple(":soapbox_fe",_e)]}];return et(updateConfig(nt))},fetchMastodonReports=_e=>(et,tt)=>api(tt).get("/api/v1/admin/reports",{params:_e}).then(({data:nt})=>{nt.forEach(rt=>{var at,it;et(importFetchedAccount$1((at=rt.account)==null?void 0:at.account)),et(importFetchedAccount$1((it=rt.target_account)==null?void 0:it.account)),et(importFetchedStatuses(rt.statuses))}),et({type:ADMIN_REPORTS_FETCH_SUCCESS,reports:nt,params:_e})}).catch(nt=>{et({type:ADMIN_REPORTS_FETCH_FAIL,error:nt,params:_e})}),fetchPleromaReports=_e=>(et,tt)=>api(tt).get("/api/v1/pleroma/admin/reports",{params:_e}).then(({data:{reports:nt}})=>{nt.forEach(rt=>{et(importFetchedAccount$1(rt.account)),et(importFetchedAccount$1(rt.actor)),et(importFetchedStatuses(rt.statuses))}),et({type:ADMIN_REPORTS_FETCH_SUCCESS,reports:nt,params:_e})}).catch(nt=>{et({type:ADMIN_REPORTS_FETCH_FAIL,error:nt,params:_e})}),fetchReports=(_e={})=>(et,tt)=>{const rt=tt().instance,at=getFeatures(rt);if(et({type:ADMIN_REPORTS_FETCH_REQUEST,params:_e}),at.mastodonAdmin)return et(fetchMastodonReports(_e));{const{resolved:it}=_e;return et(fetchPleromaReports({state:it===!1?"open":it?"resolved":null}))}},patchMastodonReports=_e=>(et,tt)=>Promise.all(_e.map(({id:nt,state:rt})=>api(tt).post(`/api/v1/admin/reports/${nt}/${rt==="resolved"?"reopen":"resolve"}`).then(()=>{et({type:ADMIN_REPORTS_PATCH_SUCCESS,reports:_e})}).catch(at=>{et({type:ADMIN_REPORTS_PATCH_FAIL,error:at,reports:_e})}))),patchPleromaReports=_e=>(et,tt)=>api(tt).patch("/api/v1/pleroma/admin/reports",{reports:_e}).then(()=>{et({type:ADMIN_REPORTS_PATCH_SUCCESS,reports:_e})}).catch(nt=>{et({type:ADMIN_REPORTS_PATCH_FAIL,error:nt,reports:_e})}),patchReports=(_e,et)=>(tt,nt)=>{const at=nt().instance,it=getFeatures(at),ot=_e.map(st=>({id:st,state:et}));return tt({type:ADMIN_REPORTS_PATCH_REQUEST,reports:ot}),it.mastodonAdmin?tt(patchMastodonReports(ot)):tt(patchPleromaReports(ot))},closeReports=_e=>patchReports(_e,"closed"),fetchMastodonUsers=(_e,et,tt,nt,rt)=>(at,it)=>{const ot={username:tt};return _e.includes("local")&&(ot.local=!0),_e.includes("active")&&(ot.active=!0),_e.includes("need_approval")&&(ot.pending=!0),api(it).get(rt||"/api/v1/admin/accounts",{params:ot}).then(({data:st,...ct})=>{const ut=getLinks(ct).refs.find(ft=>ft.rel==="next"),dt=ut?et*nt+1:(et-1)*nt+st.length;return at(importFetchedAccounts(st.map(({account:ft})=>ft))),at(fetchRelationships(st.map(ft=>ft.id))),at({type:ADMIN_USERS_FETCH_SUCCESS,users:st,count:dt,pageSize:nt,filters:_e,page:et,next:(ut==null?void 0:ut.uri)||!1}),{users:st,count:dt,pageSize:nt,next:(ut==null?void 0:ut.uri)||!1}}).catch(st=>at({type:ADMIN_USERS_FETCH_FAIL,error:st,filters:_e,page:et,pageSize:nt}))},fetchPleromaUsers=(_e,et,tt,nt)=>(rt,at)=>{const it={filters:_e.join(),page:et,page_size:nt};return tt&&(it.query=tt),api(at).get("/api/v1/pleroma/admin/users",{params:it}).then(({data:{users:ot,count:st,page_size:ct}})=>(rt(fetchRelationships(ot.map(ut=>ut.id))),rt({type:ADMIN_USERS_FETCH_SUCCESS,users:ot,count:st,pageSize:ct,filters:_e,page:et}),{users:ot,count:st,pageSize:ct})).catch(ot=>rt({type:ADMIN_USERS_FETCH_FAIL,error:ot,filters:_e,page:et,pageSize:nt}))},fetchUsers=(_e=[],et=1,tt,nt=50,rt)=>(at,it)=>{const st=it().instance,ct=getFeatures(st);return at({type:ADMIN_USERS_FETCH_REQUEST,filters:_e,page:et,pageSize:nt}),ct.mastodonAdmin?at(fetchMastodonUsers(_e,et,tt,nt,rt)):at(fetchPleromaUsers(_e,et,tt,nt))},deactivateMastodonUsers=(_e,et)=>(tt,nt)=>Promise.all(_e.map(rt=>{api(nt).post(`/api/v1/admin/accounts/${rt}/action`,{type:"disable",report_id:et}).then(()=>{tt({type:ADMIN_USERS_DEACTIVATE_SUCCESS,accountIds:[rt]})}).catch(at=>{tt({type:ADMIN_USERS_DEACTIVATE_FAIL,error:at,accountIds:[rt]})})})),deactivatePleromaUsers=_e=>(et,tt)=>{const nt=accountIdsToAccts(tt(),_e);return api(tt).patch("/api/v1/pleroma/admin/users/deactivate",{nicknames:nt}).then(({data:{users:rt}})=>{et({type:ADMIN_USERS_DEACTIVATE_SUCCESS,users:rt,accountIds:_e})}).catch(rt=>{et({type:ADMIN_USERS_DEACTIVATE_FAIL,error:rt,accountIds:_e})})},deactivateUsers=(_e,et)=>(tt,nt)=>{const at=nt().instance,it=getFeatures(at);return tt({type:ADMIN_USERS_DEACTIVATE_REQUEST,accountIds:_e}),it.mastodonAdmin?tt(deactivateMastodonUsers(_e,et)):tt(deactivatePleromaUsers(_e))},deleteUsers$1=_e=>(et,tt)=>{const nt=accountIdsToAccts(tt(),_e);return et({type:ADMIN_USERS_DELETE_REQUEST,accountIds:_e}),api(tt).delete("/api/v1/pleroma/admin/users",{data:{nicknames:nt}}).then(({data:rt})=>{et({type:ADMIN_USERS_DELETE_SUCCESS,nicknames:rt,accountIds:_e})}).catch(rt=>{et({type:ADMIN_USERS_DELETE_FAIL,error:rt,accountIds:_e})})},approveMastodonUsers=_e=>(et,tt)=>Promise.all(_e.map(nt=>{api(tt).post(`/api/v1/admin/accounts/${nt}/approve`).then(({data:rt})=>{et({type:ADMIN_USERS_APPROVE_SUCCESS,users:[rt],accountIds:[nt]})}).catch(rt=>{et({type:ADMIN_USERS_APPROVE_FAIL,error:rt,accountIds:[nt]})})})),approvePleromaUsers=_e=>(et,tt)=>{const nt=accountIdsToAccts(tt(),_e);return api(tt).patch("/api/v1/pleroma/admin/users/approve",{nicknames:nt}).then(({data:{users:rt}})=>{et({type:ADMIN_USERS_APPROVE_SUCCESS,users:rt,accountIds:_e})}).catch(rt=>{et({type:ADMIN_USERS_APPROVE_FAIL,error:rt,accountIds:_e})})},approveUsers$1=_e=>(et,tt)=>{const rt=tt().instance,at=getFeatures(rt);return et({type:ADMIN_USERS_APPROVE_REQUEST,accountIds:_e}),at.mastodonAdmin?et(approveMastodonUsers(_e)):et(approvePleromaUsers(_e))},deleteStatus$5=_e=>(et,tt)=>(et({type:ADMIN_STATUS_DELETE_REQUEST,id:_e}),api(tt).delete(`/api/v1/pleroma/admin/statuses/${_e}`).then(()=>{et({type:ADMIN_STATUS_DELETE_SUCCESS,id:_e})}).catch(nt=>{et({type:ADMIN_STATUS_DELETE_FAIL,error:nt,id:_e})})),toggleStatusSensitivity=(_e,et)=>(tt,nt)=>(tt({type:ADMIN_STATUS_TOGGLE_SENSITIVITY_REQUEST,id:_e}),api(nt).put(`/api/v1/pleroma/admin/statuses/${_e}`,{sensitive:!et}).then(()=>{tt({type:ADMIN_STATUS_TOGGLE_SENSITIVITY_SUCCESS,id:_e})}).catch(rt=>{tt({type:ADMIN_STATUS_TOGGLE_SENSITIVITY_FAIL,error:rt,id:_e})})),fetchModerationLog=_e=>(et,tt)=>(et({type:ADMIN_LOG_FETCH_REQUEST}),api(tt).get("/api/v1/pleroma/admin/moderation_log",{params:_e}).then(({data:nt})=>(et({type:ADMIN_LOG_FETCH_SUCCESS,items:nt.items,total:nt.total}),nt)).catch(nt=>{et({type:ADMIN_LOG_FETCH_FAIL,error:nt})})),tagUsers=(_e,et)=>(tt,nt)=>{const rt=accountIdsToAccts(nt(),_e);return tt({type:ADMIN_USERS_TAG_REQUEST,accountIds:_e,tags:et}),api(nt).put("/api/v1/pleroma/admin/users/tag",{nicknames:rt,tags:et}).then(()=>{tt({type:ADMIN_USERS_TAG_SUCCESS,accountIds:_e,tags:et})}).catch(at=>{tt({type:ADMIN_USERS_TAG_FAIL,error:at,accountIds:_e,tags:et})})},untagUsers=(_e,et)=>(tt,nt)=>{const rt=accountIdsToAccts(nt(),_e);return et.includes("badge:donor")&&(et=[...et,"donor"]),tt({type:ADMIN_USERS_UNTAG_REQUEST,accountIds:_e,tags:et}),api(nt).delete("/api/v1/pleroma/admin/users/tag",{data:{nicknames:rt,tags:et}}).then(()=>{tt({type:ADMIN_USERS_UNTAG_SUCCESS,accountIds:_e,tags:et})}).catch(at=>{tt({type:ADMIN_USERS_UNTAG_FAIL,error:at,accountIds:_e,tags:et})})},setTags=(_e,et,tt)=>async nt=>{const rt=getTagDiff(et,tt);await nt(tagUsers([_e],rt.added)),await nt(untagUsers([_e],rt.removed))},setBadges=(_e,et,tt)=>nt=>{const rt=filterBadges(et),at=filterBadges(tt);return nt(setTags(_e,rt,at))},addPermission=(_e,et)=>(tt,nt)=>{const rt=accountIdsToAccts(nt(),_e);return tt({type:ADMIN_ADD_PERMISSION_GROUP_REQUEST,accountIds:_e,permissionGroup:et}),api(nt).post(`/api/v1/pleroma/admin/users/permission_group/${et}`,{nicknames:rt}).then(({data:at})=>{tt({type:ADMIN_ADD_PERMISSION_GROUP_SUCCESS,accountIds:_e,permissionGroup:et,data:at})}).catch(at=>{tt({type:ADMIN_ADD_PERMISSION_GROUP_FAIL,error:at,accountIds:_e,permissionGroup:et})})},removePermission=(_e,et)=>(tt,nt)=>{const rt=accountIdsToAccts(nt(),_e);return tt({type:ADMIN_REMOVE_PERMISSION_GROUP_REQUEST,accountIds:_e,permissionGroup:et}),api(nt).delete(`/api/v1/pleroma/admin/users/permission_group/${et}`,{data:{nicknames:rt}}).then(({data:at})=>{tt({type:ADMIN_REMOVE_PERMISSION_GROUP_SUCCESS,accountIds:_e,permissionGroup:et,data:at})}).catch(at=>{tt({type:ADMIN_REMOVE_PERMISSION_GROUP_FAIL,error:at,accountIds:_e,permissionGroup:et})})},promoteToAdmin=_e=>et=>Promise.all([et(addPermission([_e],"admin")),et(removePermission([_e],"moderator"))]),promoteToModerator=_e=>et=>Promise.all([et(removePermission([_e],"admin")),et(addPermission([_e],"moderator"))]),demoteToUser=_e=>et=>Promise.all([et(removePermission([_e],"admin")),et(removePermission([_e],"moderator"))]),setRole=(_e,et)=>tt=>{switch(et){case"user":return tt(demoteToUser(_e));case"moderator":return tt(promoteToModerator(_e));case"admin":return tt(promoteToAdmin(_e))}},setUserIndexQuery=_e=>({type:ADMIN_USER_INDEX_QUERY_SET,query:_e}),fetchUserIndex=()=>(_e,et)=>{const{filters:tt,page:nt,query:rt,pageSize:at,isLoading:it}=et().admin_user_index;it||(_e({type:ADMIN_USER_INDEX_FETCH_REQUEST}),_e(fetchUsers(tt.toJS(),nt+1,rt,at)).then(ot=>{if(ot.error)_e({type:ADMIN_USER_INDEX_FETCH_FAIL});else{const{users:st,count:ct,next:ut}=ot;_e({type:ADMIN_USER_INDEX_FETCH_SUCCESS,users:st,count:ct,next:ut})}}).catch(()=>{_e({type:ADMIN_USER_INDEX_FETCH_FAIL})}))},expandUserIndex=()=>(_e,et)=>{const{filters:tt,page:nt,query:rt,pageSize:at,isLoading:it,next:ot,loaded:st}=et().admin_user_index;!st||it||(_e({type:ADMIN_USER_INDEX_EXPAND_REQUEST}),_e(fetchUsers(tt.toJS(),nt+1,rt,at,ot)).then(ct=>{if(ct.error)_e({type:ADMIN_USER_INDEX_EXPAND_FAIL});else{const{users:ut,count:dt,next:ft}=ct;_e({type:ADMIN_USER_INDEX_EXPAND_SUCCESS,users:ut,count:dt,next:ft})}}).catch(()=>{_e({type:ADMIN_USER_INDEX_EXPAND_FAIL})}))},fetchAdminAnnouncements=()=>(_e,et)=>(_e({type:ADMIN_ANNOUNCEMENTS_FETCH_REQUEST}),api(et).get("/api/v1/pleroma/admin/announcements",{params:{limit:50}}).then(({data:tt})=>(_e({type:ADMIN_ANNOUNCEMENTS_FETCH_SUCCESS,announcements:tt}),tt)).catch(tt=>{_e({type:ADMIN_ANNOUNCEMENTS_FETCH_FAIL,error:tt})})),changeAnnouncementContent=_e=>({type:ADMIN_ANNOUNCEMENT_CHANGE_CONTENT,value:_e}),changeAnnouncementStartTime=_e=>({type:ADMIN_ANNOUNCEMENT_CHANGE_START_TIME,value:_e}),changeAnnouncementEndTime=_e=>({type:ADMIN_ANNOUNCEMENT_CHANGE_END_TIME,value:_e}),changeAnnouncementAllDay=_e=>({type:ADMIN_ANNOUNCEMENT_CHANGE_ALL_DAY,value:_e}),handleCreateAnnouncement=()=>(_e,et)=>{_e({type:ADMIN_ANNOUNCEMENT_CREATE_REQUEST});const{id:tt,content:nt,starts_at:rt,ends_at:at,all_day:it}=et().admin_announcements.form;return api(et)[tt?"patch":"post"](tt?`/api/v1/pleroma/admin/announcements/${tt}`:"/api/v1/pleroma/admin/announcements",{content:nt,starts_at:rt,ends_at:at,all_day:it}).then(({data:ot})=>(_e({type:ADMIN_ANNOUNCEMENT_CREATE_SUCCESS,announcement:ot}),toast.success(tt?messages$z.announcementUpdateSuccess:messages$z.announcementCreateSuccess),_e(fetchAdminAnnouncements()),ot)).catch(ot=>{_e({type:ADMIN_ANNOUNCEMENT_CREATE_FAIL,error:ot})})},deleteAnnouncement=_e=>(et,tt)=>(et({type:ADMIN_ANNOUNCEMENT_DELETE_REQUEST,id:_e}),api(tt).delete(`/api/v1/pleroma/admin/announcements/${_e}`).then(({data:nt})=>(et({type:ADMIN_ANNOUNCEMENT_DELETE_SUCCESS,id:_e}),toast.success(messages$z.announcementDeleteSuccess),et(fetchAdminAnnouncements()),nt)).catch(nt=>{et({type:ADMIN_ANNOUNCEMENT_DELETE_FAIL,id:_e,error:nt})})),initAnnouncementModal=_e=>et=>{et({type:ADMIN_ANNOUNCEMENT_MODAL_INIT,announcement:_e}),et(openModal("EDIT_ANNOUNCEMENT"))};var messages$y={deactivateUserHeading:{id:"confirmations.admin.deactivate_user.heading",defaultMessage:"Deactivate @{acct}"},deactivateUserPrompt:{id:"confirmations.admin.deactivate_user.message",defaultMessage:"You are about to deactivate @{acct}. Deactivating a user is a reversible action."},deactivateUserConfirm:{id:"confirmations.admin.deactivate_user.confirm",defaultMessage:"Deactivate @{name}"},userDeactivated:{id:"admin.users.user_deactivated_message",defaultMessage:"@{acct} was deactivated"},deleteUserHeading:{id:"confirmations.admin.delete_user.heading",defaultMessage:"Delete @{acct}"},deleteUserPrompt:{id:"confirmations.admin.delete_user.message",defaultMessage:"You are about to delete @{acct}. THIS IS A DESTRUCTIVE ACTION THAT CANNOT BE UNDONE."},deleteUserConfirm:{id:"confirmations.admin.delete_user.confirm",defaultMessage:"Delete @{name}"},deleteLocalUserCheckbox:{id:"confirmations.admin.delete_local_user.checkbox",defaultMessage:"I understand that I am about to delete a local user."},userDeleted:{id:"admin.users.user_deleted_message",defaultMessage:"@{acct} was deleted"},deleteStatusHeading:{id:"confirmations.admin.delete_status.heading",defaultMessage:"Delete post"},deleteStatusPrompt:{id:"confirmations.admin.delete_status.message",defaultMessage:"You are about to delete a post by @{acct}. This action cannot be undone."},deleteStatusConfirm:{id:"confirmations.admin.delete_status.confirm",defaultMessage:"Delete post"},rejectUserHeading:{id:"confirmations.admin.reject_user.heading",defaultMessage:"Reject @{acct}"},rejectUserPrompt:{id:"confirmations.admin.reject_user.message",defaultMessage:"You are about to reject @{acct} registration request. This action cannot be undone."},rejectUserConfirm:{id:"confirmations.admin.reject_user.confirm",defaultMessage:"Reject @{name}"},statusDeleted:{id:"admin.statuses.status_deleted_message",defaultMessage:"Post by @{acct} was deleted"},markStatusSensitiveHeading:{id:"confirmations.admin.mark_status_sensitive.heading",defaultMessage:"Mark post sensitive"},markStatusNotSensitiveHeading:{id:"confirmations.admin.mark_status_not_sensitive.heading",defaultMessage:"Mark post not sensitive."},markStatusSensitivePrompt:{id:"confirmations.admin.mark_status_sensitive.message",defaultMessage:"You are about to mark a post by @{acct} sensitive."},markStatusNotSensitivePrompt:{id:"confirmations.admin.mark_status_not_sensitive.message",defaultMessage:"You are about to mark a post by @{acct} not sensitive."},markStatusSensitiveConfirm:{id:"confirmations.admin.mark_status_sensitive.confirm",defaultMessage:"Mark post sensitive"},markStatusNotSensitiveConfirm:{id:"confirmations.admin.mark_status_not_sensitive.confirm",defaultMessage:"Mark post not sensitive"},statusMarkedSensitive:{id:"admin.statuses.status_marked_message_sensitive",defaultMessage:"Post by @{acct} was marked sensitive"},statusMarkedNotSensitive:{id:"admin.statuses.status_marked_message_not_sensitive",defaultMessage:"Post by @{acct} was marked not sensitive"}},deactivateUserModal=function _e(et,tt){var nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){};return function(rt,at){var it=at(),ot=selectAccount(it,tt).acct,st=selectAccount(it,tt).username,ct=_createRawReactElement(Stack,{space:4},void 0,_createRawReactElement(OutlineBox,{},void 0,_createRawReactElement(AccountContainer,{id:tt,hideActions:!0})),_createRawReactElement(Text$2,{},void 0,et.formatMessage(messages$y.deactivateUserPrompt,{acct:ot})));rt(openModal("CONFIRM",{icon:vitePluginRequire_1697861822040_83037141,heading:et.formatMessage(messages$y.deactivateUserHeading,{acct:ot}),message:ct,confirm:et.formatMessage(messages$y.deactivateUserConfirm,{name:st}),onConfirm:function(){rt(deactivateUsers([tt])).then(function(){var dt=et.formatMessage(messages$y.userDeactivated,{acct:ot});toast.success(dt),nt()}).catch(function(){})}}))}},deleteUserModal=function _e(et,tt){var nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){};return function(rt,at){var it=at(),ot=selectAccount(it,tt),st=ot.acct,ct=ot.username,ut=isLocal(ot),dt=_createRawReactElement(Stack,{space:4},void 0,_createRawReactElement(OutlineBox,{},void 0,_createRawReactElement(AccountContainer,{id:tt,hideActions:!0})),_createRawReactElement(Text$2,{},void 0,et.formatMessage(messages$y.deleteUserPrompt,{acct:st}))),ft=et.formatMessage(messages$y.deleteUserConfirm,{name:ct}),pt=ut?et.formatMessage(messages$y.deleteLocalUserCheckbox):!1;rt(openModal("CONFIRM",{icon:vitePluginRequire_1697861828078_94410874,heading:et.formatMessage(messages$y.deleteUserHeading,{acct:st}),message:dt,confirm:ft,checkbox:pt,onConfirm:function(){rt(deleteUsers$1([tt])).then(function(){var ht=et.formatMessage(messages$y.userDeleted,{acct:st});rt(fetchAccountByUsername(st)),toast.success(ht),nt()}).catch(function(){})}}))}},toggleStatusSensitivityModal=function _e(et,tt,nt){var rt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:function(){};return function(at,it){var ot=it(),st=ot.statuses.get(tt).account.acct;at(openModal("CONFIRM",{icon:vitePluginRequire_1697861810834_37299420,heading:et.formatMessage(nt===!1?messages$y.markStatusSensitiveHeading:messages$y.markStatusNotSensitiveHeading),message:et.formatMessage(nt===!1?messages$y.markStatusSensitivePrompt:messages$y.markStatusNotSensitivePrompt,{acct:st}),confirm:et.formatMessage(nt===!1?messages$y.markStatusSensitiveConfirm:messages$y.markStatusNotSensitiveConfirm),onConfirm:function(){at(toggleStatusSensitivity(tt,nt)).then(function(){var ut=et.formatMessage(nt===!1?messages$y.statusMarkedSensitive:messages$y.statusMarkedNotSensitive,{acct:st});toast.success(ut)}).catch(function(){}),rt()}}))}},deleteStatusModal=function _e(et,tt){var nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){};return function(rt,at){var it=at(),ot=it.statuses.get(tt).account.acct;rt(openModal("CONFIRM",{icon:vitePluginRequire_1697861811799_72054898,heading:et.formatMessage(messages$y.deleteStatusHeading),message:et.formatMessage(messages$y.deleteStatusPrompt,{acct:_createRawReactElement("strong",{className:"break-words"},void 0,ot)}),confirm:et.formatMessage(messages$y.deleteStatusConfirm),onConfirm:function(){rt(deleteStatus$5(tt)).then(function(){var ct=et.formatMessage(messages$y.statusDeleted,{acct:ot});toast.success(ct)}).catch(function(){}),nt()}}))}};const MUTES_INIT_MODAL="MUTES_INIT_MODAL",MUTES_TOGGLE_HIDE_NOTIFICATIONS="MUTES_TOGGLE_HIDE_NOTIFICATIONS",MUTES_CHANGE_DURATION="MUTES_CHANGE_DURATION",initMuteModal=_e=>et=>{et({type:MUTES_INIT_MODAL,account:_e}),et(openModal("MUTE"))},toggleHideNotifications=()=>_e=>{_e({type:MUTES_TOGGLE_HIDE_NOTIFICATIONS})},changeMuteDuration=_e=>et=>{et({type:MUTES_CHANGE_DURATION,duration:_e})},REPORT_INIT="REPORT_INIT",REPORT_CANCEL="REPORT_CANCEL",REPORT_SUBMIT_REQUEST="REPORT_SUBMIT_REQUEST",REPORT_SUBMIT_SUCCESS="REPORT_SUBMIT_SUCCESS",REPORT_SUBMIT_FAIL="REPORT_SUBMIT_FAIL",REPORT_STATUS_TOGGLE="REPORT_STATUS_TOGGLE",REPORT_COMMENT_CHANGE="REPORT_COMMENT_CHANGE",REPORT_FORWARD_CHANGE="REPORT_FORWARD_CHANGE",REPORT_BLOCK_CHANGE="REPORT_BLOCK_CHANGE",REPORT_RULE_CHANGE="REPORT_RULE_CHANGE";var ReportableEntities=(_e=>(_e.ACCOUNT="ACCOUNT",_e.CHAT_MESSAGE="CHAT_MESSAGE",_e.GROUP="GROUP",_e.STATUS="STATUS",_e))(ReportableEntities||{});const initReport=(_e,et,tt)=>nt=>{const{status:rt,chatMessage:at,group:it}=tt||{};return nt({type:REPORT_INIT,entityType:_e,account:et,status:rt,chatMessage:at,group:it}),nt(openModal("REPORT"))},cancelReport=()=>({type:REPORT_CANCEL}),toggleStatusReport=(_e,et)=>({type:REPORT_STATUS_TOGGLE,statusId:_e,checked:et}),submitReport=()=>(_e,et)=>{_e(submitReportRequest());const{reports:tt}=et();return api(et).post("/api/v1/reports",{account_id:tt.getIn(["new","account_id"]),status_ids:tt.getIn(["new","status_ids"]),message_ids:[tt.getIn(["new","chat_message","id"])].filter(Boolean),group_id:tt.getIn(["new","group","id"]),rule_ids:tt.getIn(["new","rule_ids"]),comment:tt.getIn(["new","comment"]),forward:tt.getIn(["new","forward"])})},submitReportRequest=()=>({type:REPORT_SUBMIT_REQUEST}),submitReportSuccess=()=>({type:REPORT_SUBMIT_SUCCESS}),submitReportFail=_e=>({type:REPORT_SUBMIT_FAIL,error:_e}),changeReportComment=_e=>({type:REPORT_COMMENT_CHANGE,comment:_e}),changeReportForward=_e=>({type:REPORT_FORWARD_CHANGE,forward:_e}),changeReportBlock=_e=>({type:REPORT_BLOCK_CHANGE,block:_e}),changeReportRule=_e=>({type:REPORT_RULE_CHANGE,rule_id:_e});function useDeleteGroupStatus(_e,et){const tt=useApi(),{deleteEntity:nt,isSubmitting:rt}=useDeleteEntity(Entities.STATUSES,()=>tt.delete(`/api/v1/groups/${_e.id}/statuses/${et}`));return{mutate:nt,isSubmitting:rt}}var _excluded$5=["icon","className","iconClassName","active","color","filled","count","emoji","text","theme"],COLORS={accent:"accent",success:"success"},StatusActionCounter=function _e(et){var tt=et.count,nt=tt===void 0?0:tt;return _createRawReactElement(Text$2,{size:"xs",weight:"semibold",theme:"inherit"},void 0,shortNumberFormat(nt))},StatusActionButton=React$3.forwardRef(function(_e,et){var tt=_e.icon,nt=_e.className,rt=_e.iconClassName,at=_e.active,it=_e.color,ot=_e.filled,st=ot===void 0?!1:ot,ct=_e.count,ut=ct===void 0?0:ct,dt=_e.emoji,ft=_e.text,pt=_e.theme,mt=pt===void 0?"default":pt,ht=_objectWithoutProperties(_e,_excluded$5),Et=function(){return dt?_createRawReactElement("span",{className:"flex h-6 w-6 items-center justify-center"},void 0,_createRawReactElement(Emoji,{className:"h-full w-full p-0.5",emoji:dt.get("name"),src:dt.get("url")})):_createRawReactElement(Icon$1,{src:tt,className:clsx({"fill-accent-300 text-accent-300 hover:fill-accent-300":at&&st&&it===COLORS.accent},rt)})},yt=function(){if(ft)return _createRawReactElement(Text$2,{tag:"span",theme:"inherit",size:"sm"},void 0,ft);if(ut)return _createRawReactElement(StatusActionCounter,{count:ut})};return React$3.createElement("button",_extends$4({ref:et,type:"button",className:clsx("flex items-center rounded-full p-1 rtl:space-x-reverse","focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:ring-offset-0",{"text-gray-600 hover:text-gray-600 dark:hover:text-white bg-white dark:bg-transparent":mt==="default","text-white/80 hover:text-white bg-transparent dark:bg-transparent":mt==="inverse","text-black dark:text-white":at&&dt,"hover:text-gray-600 dark:hover:text-white":!ht.disabled,"text-accent-300 hover:text-accent-300 dark:hover:text-accent-300":at&&!dt&&it===COLORS.accent,"text-success-600 hover:text-success-600 dark:hover:text-success-600":at&&!dt&&it===COLORS.success,"space-x-1":!ft,"space-x-2":ft},nt)},ht),Et(),yt())});const EMOJI_REACT_REQUEST="EMOJI_REACT_REQUEST",EMOJI_REACT_SUCCESS="EMOJI_REACT_SUCCESS",EMOJI_REACT_FAIL="EMOJI_REACT_FAIL",UNEMOJI_REACT_REQUEST="UNEMOJI_REACT_REQUEST",UNEMOJI_REACT_SUCCESS="UNEMOJI_REACT_SUCCESS",UNEMOJI_REACT_FAIL="UNEMOJI_REACT_FAIL",noOp$3=()=>()=>new Promise(_e=>_e(void 0)),simpleEmojiReact=(_e,et,tt)=>nt=>{const rt=_e.pleroma.get("emoji_reactions")||List$1();return et==="⭐️"&&_e.favourited?nt(unfavourite(_e)):rt.filter(it=>it.get("me")===!0&&it.get("name")===et).count()>0?nt(unEmojiReact(_e,et)):Promise.all([...rt.filter(it=>it.get("me")===!0).map(it=>nt(unEmojiReact(_e,it.get("name")))).toArray(),_e.favourited&&nt(unfavourite(_e))]).then(()=>{nt(et==="⭐️"?favourite(_e):emojiReact(_e,et,tt))}).catch(it=>{console.error(it)})},emojiReact=(_e,et,tt)=>(nt,rt)=>isLoggedIn(rt)?(nt(emojiReactRequest(_e,et,tt)),api(rt).put(`/api/v1/pleroma/statuses/${_e.id}/reactions/${et}`).then(function(at){nt(importFetchedStatus(at.data)),nt(emojiReactSuccess(_e,et))}).catch(function(at){nt(emojiReactFail(_e,et,at))})):nt(noOp$3()),unEmojiReact=(_e,et)=>(tt,nt)=>isLoggedIn(nt)?(tt(unEmojiReactRequest(_e,et)),api(nt).delete(`/api/v1/pleroma/statuses/${_e.id}/reactions/${et}`).then(rt=>{tt(importFetchedStatus(rt.data)),tt(unEmojiReactSuccess(_e,et))}).catch(rt=>{tt(unEmojiReactFail(_e,et,rt))})):tt(noOp$3()),emojiReactRequest=(_e,et,tt)=>({type:EMOJI_REACT_REQUEST,status:_e,emoji:et,custom:tt,skipLoading:!0}),emojiReactSuccess=(_e,et)=>({type:EMOJI_REACT_SUCCESS,status:_e,emoji:et,skipLoading:!0}),emojiReactFail=(_e,et,tt)=>({type:EMOJI_REACT_FAIL,status:_e,emoji:et,error:tt,skipLoading:!0}),unEmojiReactRequest=(_e,et)=>({type:UNEMOJI_REACT_REQUEST,status:_e,emoji:et,skipLoading:!0}),unEmojiReactSuccess=(_e,et)=>({type:UNEMOJI_REACT_SUCCESS,status:_e,emoji:et,skipLoading:!0}),unEmojiReactFail=(_e,et,tt)=>({type:UNEMOJI_REACT_FAIL,status:_e,emoji:et,error:tt,skipLoading:!0}),ALLOWED_EMOJI=List$1(["⭐️","❤️","😆","😮","😢","😩"]),sortEmoji=(_e,et)=>_e.sortBy(tt=>-(tt.get("count")+Number(et.includes(tt.get("name"))))),mergeEmojiFavourites=(_e=List$1(),et,tt)=>{if(!et)return _e;const nt=_e.findIndex(rt=>rt.get("name")==="⭐️");if(nt>-1){const rt=Number(_e.getIn([nt,"count"]));return tt=tt||!!_e.getIn([nt,"me"],!1),_e.setIn([nt,"count"],rt+et).setIn([nt,"me"],tt)}else return _e.push(Map$3({count:et,me:tt,name:"⭐️"}))},reduceEmoji=(_e,et,tt,nt=ALLOWED_EMOJI)=>sortEmoji(mergeEmojiFavourites(_e,et,tt),nt),getReactForStatus=(_e,et=ALLOWED_EMOJI)=>{const tt=reduceEmoji(_e.pleroma.get("emoji_reactions",List$1()),_e.favourites_count||0,_e.favourited,et).filter(nt=>nt.get("me")===!0).get(0);return typeof(tt==null?void 0:tt.get("name"))=="string"?tt:void 0},simulateEmojiReact=(_e,et,tt)=>{const nt=_e.findIndex(at=>at.get("name")===et),rt=_e.get(nt);return nt>-1&&rt?_e.set(nt,rt.merge({count:rt.get("count")+1,me:!0,url:tt})):_e.push(Map$3({count:1,me:!0,name:et,url:tt}))},simulateUnEmojiReact=(_e,et)=>{const tt=_e.findIndex(rt=>rt.get("name")===et&&rt.get("me")===!0),nt=_e.get(tt);return nt?nt.get("count")-1<1?_e.delete(tt):_e.set(tt,nt.merge({count:nt.get("count")-1,me:!1})):_e};var StatusReactionWrapper=function _e(et){var tt=et.statusId,nt=et.children,rt=useAppDispatch(),at=useOwnAccount(),it=at.account,ot=useAppSelector(function(bt){return bt.statuses.get(tt)}),st=useSoapboxConfig(),ct=reactExports.useRef(),ut=reactExports.useState(!1),dt=_slicedToArray$4(ut,2),ft=dt[0],pt=dt[1],mt=reactExports.useState(null),ht=_slicedToArray$4(mt,2),Et=ht[0],yt=ht[1];if(reactExports.useEffect(function(){return function(){ct.current&&clearTimeout(ct.current)}},[]),!ot)return null;var vt=function(){ct.current&&clearTimeout(ct.current),isUserTouching()||pt(!0)},gt=function(){ct.current&&clearTimeout(ct.current),isUserTouching()?pt(!1):ct.current=setTimeout(function(){pt(!1)},500)},St=function(wt,xt){it?rt(simpleEmojiReact(ot,wt,xt)):$t(),pt(!1)},Rt=function(wt){var xt,Tt=((xt=getReactForStatus(ot,st.allowedEmoji))===null||xt===void 0?void 0:xt.get("name"))||"⭐️";isUserTouching()?it?ft?St(Tt):pt(!0):$t():St(Tt),wt.preventDefault(),wt.stopPropagation()},$t=function(){rt(openModal("UNAUTHORIZED",{action:"FAVOURITE",ap_id:ot.url}))};return _createRawReactElement("div",{className:"relative",onMouseEnter:vt,onMouseLeave:gt},void 0,React$3.cloneElement(nt,{onClick:Rt,ref:yt}),ft&&_createRawReactElement(Portal$1,{},void 0,_createRawReactElement(EmojiSelector,{placement:"top-start",referenceElement:Et,onReact:St,visible:ft,onClose:function(){return pt(!1)}})))};const copy=(_e,et)=>{if(navigator.clipboard)navigator.clipboard.writeText(_e),et&&et();else{const tt=document.createElement("textarea");tt.textContent=_e,tt.style.position="fixed",document.body.appendChild(tt);try{tt.select(),document.execCommand("copy")}catch{}finally{document.body.removeChild(tt),et&&et()}}};var GroupMemberCount=function _e(et){var tt=et.group;return _createRawReactElement(Link$2,{to:"/group/".concat(tt.slug,"/members"),className:"hover:underline"},void 0,_createRawReactElement(Text$2,{theme:"inherit",tag:"span",size:"sm",weight:"medium","data-testid":"group-member-count"},void 0,shortNumberFormat(tt.members_count)," ",_createRawReactElement(FormattedMessage$1,{id:"groups.discover.search.results.member_count",defaultMessage:"{members, plural, one {member} other {members}}",values:{members:tt.members_count}})))};const vitePluginRequire_1697861826920_76919417="/packs/assets/world-d0cccfac.svg";var GroupPrivacy=function _e(et){var tt=et.group;return _createRawReactElement(Popover,{referenceElementClassName:"cursor-help",content:_createRawReactElement(Stack,{space:4,alignItems:"center",className:"w-72"},void 0,_createRawReactElement("div",{className:"rounded-full bg-gray-200 p-3 dark:bg-gray-800"},void 0,_createRawReactElement(Icon$1,{src:tt.locked?vitePluginRequire_1697861811805_60977601:vitePluginRequire_1697861826920_76919417,className:"h-6 w-6 text-gray-600 dark:text-gray-600"})),_createRawReactElement(Stack,{space:1,alignItems:"center"},void 0,_createRawReactElement(Text$2,{size:"lg",weight:"bold",align:"center"},void 0,tt.locked?_createRawReactElement(FormattedMessage$1,{id:"group.privacy.locked.full",defaultMessage:"Private Group"}):_createRawReactElement(FormattedMessage$1,{id:"group.privacy.public.full",defaultMessage:"Public Group"})),_createRawReactElement(Text$2,{theme:"muted",align:"center"},void 0,tt.locked?_createRawReactElement(FormattedMessage$1,{id:"group.privacy.locked.info",defaultMessage:"Discoverable. Users can join after their request is approved."}):_createRawReactElement(FormattedMessage$1,{id:"group.privacy.public.info",defaultMessage:"Discoverable. Anyone can join."}))))},void 0,_createRawReactElement(HStack,{space:1,alignItems:"center","data-testid":"group-privacy"},void 0,_createRawReactElement(Icon$1,{className:"h-4 w-4",src:tt.locked?vitePluginRequire_1697861811805_60977601:vitePluginRequire_1697861826920_76919417}),_createRawReactElement(Text$2,{theme:"inherit",tag:"span",size:"sm",weight:"medium"},void 0,tt.locked?_createRawReactElement(FormattedMessage$1,{id:"group.privacy.locked",defaultMessage:"Private"}):_createRawReactElement(FormattedMessage$1,{id:"group.privacy.public",defaultMessage:"Public"}))))},GroupAvatar=function _e(et){var tt,nt=et.group,rt=et.size,at=et.withRing,it=at===void 0?!1:at,ot=((tt=nt.relationship)===null||tt===void 0?void 0:tt.role)===GroupRoles.OWNER;return _createRawReactElement(Avatar,{className:clsx("relative rounded-full",{"shadow-[0_0_0_2px_theme(colors.primary.600),0_0_0_4px_theme(colors.white)]":ot&&it,"dark:shadow-[0_0_0_2px_theme(colors.primary.600),0_0_0_4px_theme(colors.gray.800)]":ot&&it,"shadow-[0_0_0_2px_theme(colors.primary.600)]":ot&&!it,"shadow-[0_0_0_2px_theme(colors.white)] dark:shadow-[0_0_0_2px_theme(colors.gray.800)]":!ot&&it}),src:nt.avatar,size:rt})},messages$x={title:{id:"group.popover.title",defaultMessage:"Membership required"},summary:{id:"group.popover.summary",defaultMessage:"You must be a member of the group in order to reply to this status."},action:{id:"group.popover.action",defaultMessage:"View Group"}},GroupPopover=function _e(et){var tt=et.children,nt=et.group,rt=et.isEnabled,at=useIntl(),it=useHistory(),ot=it.location.pathname,st=matchPath$1(ot,{path:["/group/:groupSlug"],exact:!0});return rt?_createRawReactElement(Popover,{interaction:"click",referenceElementClassName:"cursor-pointer",content:_createRawReactElement(Stack,{space:4,className:"w-80 pb-4"},void 0,_createRawReactElement(Stack,{className:"relative h-60 rounded-lg bg-white dark:border-primary-800 dark:bg-primary-900","data-testid":"group-card"},void 0,_createRawReactElement(Stack,{grow:!0,className:"relative basis-1/2 rounded-t-lg bg-primary-100 dark:bg-gray-800"},void 0,nt.header&&_createRawReactElement("img",{className:"absolute inset-0 h-full w-full rounded-t-lg object-cover",src:nt.header,alt:""})),_createRawReactElement("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"},void 0,_createRawReactElement(GroupAvatar,{group:nt,size:64,withRing:!0})),_createRawReactElement(Stack,{alignItems:"center",justifyContent:"end",grow:!0,className:"basis-1/2 py-4",space:.5},void 0,_createRawReactElement(Text$2,{size:"lg",weight:"bold",dangerouslySetInnerHTML:{__html:nt.display_name_html}}),_createRawReactElement(HStack,{className:"text-gray-700 dark:text-gray-600",space:2,wrap:!0},void 0,_createRawReactElement(GroupPrivacy,{group:nt}),_createRawReactElement(GroupMemberCount,{group:nt})))),_createRawReactElement(Divider,{}),_createRawReactElement(Stack,{space:.5,className:"px-4"},void 0,_createRawReactElement(Text$2,{weight:"semibold"},void 0,at.formatMessage(messages$x.title)),_createRawReactElement(Text$2,{theme:"muted"},void 0,at.formatMessage(messages$x.summary))),!st&&_createRawReactElement("div",{className:"px-4"},void 0,_createRawReactElement(Link$2,{to:"/group/".concat(nt.slug)},void 0,_createRawReactElement(Button,{type:"button",theme:"secondary",block:!0},void 0,at.formatMessage(messages$x.action))))),isFlush:!0,children:_createRawReactElement("div",{className:"inline-block"},void 0,tt)}):tt},messages$w={adminAccount:{id:"status.admin_account",defaultMessage:"Moderate @{name}"},admin_status:{id:"status.admin_status",defaultMessage:"Open this post in the moderation interface"},block:{id:"account.block",defaultMessage:"Block @{name}"},blocked:{id:"group.group_mod_block.success",defaultMessage:"@{name} is banned"},blockAndReport:{id:"confirmations.block.block_and_report",defaultMessage:"Block & Report"},blockConfirm:{id:"confirmations.block.confirm",defaultMessage:"Block"},bookmark:{id:"status.bookmark",defaultMessage:"Bookmark"},cancel_reblog_private:{id:"status.cancel_reblog_private",defaultMessage:"Un-repost"},cannot_reblog:{id:"status.cannot_reblog",defaultMessage:"This post cannot be reposted"},chat:{id:"status.chat",defaultMessage:"Chat with @{name}"},copy:{id:"status.copy",defaultMessage:"Copy link to post"},deactivateUser:{id:"admin.users.actions.deactivate_user",defaultMessage:"Deactivate @{name}"},delete:{id:"status.delete",defaultMessage:"Delete"},deleteConfirm:{id:"confirmations.delete.confirm",defaultMessage:"Delete"},deleteFromGroupMessage:{id:"confirmations.delete_from_group.message",defaultMessage:"Are you sure you want to delete @{name}'s post?"},deleteHeading:{id:"confirmations.delete.heading",defaultMessage:"Delete post"},deleteMessage:{id:"confirmations.delete.message",defaultMessage:"Are you sure you want to delete this post?"},deleteStatus:{id:"admin.statuses.actions.delete_status",defaultMessage:"Delete post"},deleteUser:{id:"admin.users.actions.delete_user",defaultMessage:"Delete @{name}"},direct:{id:"status.direct",defaultMessage:"Direct message @{name}"},disfavourite:{id:"status.disfavourite",defaultMessage:"Disike"},edit:{id:"status.edit",defaultMessage:"Edit"},embed:{id:"status.embed",defaultMessage:"Embed"},external:{id:"status.external",defaultMessage:"View post on {domain}"},favourite:{id:"status.favourite",defaultMessage:"Like"},groupBlockConfirm:{id:"confirmations.block_from_group.confirm",defaultMessage:"Ban"},groupBlockFromGroupHeading:{id:"confirmations.block_from_group.heading",defaultMessage:"Ban From Group"},groupBlockFromGroupMessage:{id:"confirmations.block_from_group.message",defaultMessage:"Are you sure you want to ban @{name} from the group?"},groupModDelete:{id:"status.group_mod_delete",defaultMessage:"Delete post from group"},group_remove_account:{id:"status.remove_account_from_group",defaultMessage:"Remove account from group"},group_remove_post:{id:"status.remove_post_from_group",defaultMessage:"Remove post from group"},markStatusNotSensitive:{id:"admin.statuses.actions.mark_status_not_sensitive",defaultMessage:"Mark post not sensitive"},markStatusSensitive:{id:"admin.statuses.actions.mark_status_sensitive",defaultMessage:"Mark post sensitive"},mention:{id:"status.mention",defaultMessage:"Mention @{name}"},more:{id:"status.more",defaultMessage:"More"},mute:{id:"account.mute",defaultMessage:"Mute @{name}"},muteConfirm:{id:"confirmations.mute_group.confirm",defaultMessage:"Mute"},muteConversation:{id:"status.mute_conversation",defaultMessage:"Mute conversation"},muteGroup:{id:"group.mute.long_label",defaultMessage:"Mute Group"},muteHeading:{id:"confirmations.mute_group.heading",defaultMessage:"Mute Group"},muteMessage:{id:"confirmations.mute_group.message",defaultMessage:"You are about to mute the group. Do you want to continue?"},muteSuccess:{id:"group.mute.success",defaultMessage:"Muted the group"},open:{id:"status.open",defaultMessage:"Expand this post"},pin:{id:"status.pin",defaultMessage:"Pin on profile"},pinToGroup:{id:"status.pin_to_group",defaultMessage:"Pin to Group"},pinToGroupSuccess:{id:"status.pin_to_group.success",defaultMessage:"Pinned to Group!"},quotePost:{id:"status.quote",defaultMessage:"Quote post"},reactionCry:{id:"status.reactions.cry",defaultMessage:"Sad"},reactionHeart:{id:"status.reactions.heart",defaultMessage:"Love"},reactionLaughing:{id:"status.reactions.laughing",defaultMessage:"Haha"},reactionLike:{id:"status.reactions.like",defaultMessage:"Like"},reactionOpenMouth:{id:"status.reactions.open_mouth",defaultMessage:"Wow"},reactionWeary:{id:"status.reactions.weary",defaultMessage:"Weary"},reblog:{id:"status.reblog",defaultMessage:"Repost"},reblog_private:{id:"status.reblog_private",defaultMessage:"Repost to original audience"},redraft:{id:"status.redraft",defaultMessage:"Delete & re-draft"},redraftConfirm:{id:"confirmations.redraft.confirm",defaultMessage:"Delete & redraft"},redraftHeading:{id:"confirmations.redraft.heading",defaultMessage:"Delete & redraft"},redraftMessage:{id:"confirmations.redraft.message",defaultMessage:"Are you sure you want to delete this post and re-draft it? Favorites and reposts will be lost, and replies to the original post will be orphaned."},replies_disabled_group:{id:"status.disabled_replies.group_membership",defaultMessage:"Only group members can reply"},reply:{id:"status.reply",defaultMessage:"Reply"},replyAll:{id:"status.replyAll",defaultMessage:"Reply to thread"},replyConfirm:{id:"confirmations.reply.confirm",defaultMessage:"Reply"},replyMessage:{id:"confirmations.reply.message",defaultMessage:"Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?"},report:{id:"status.report",defaultMessage:"Report @{name}"},share:{id:"status.share",defaultMessage:"Share"},unbookmark:{id:"status.unbookmark",defaultMessage:"Remove bookmark"},unmuteConversation:{id:"status.unmute_conversation",defaultMessage:"Unmute conversation"},unmuteGroup:{id:"group.unmute.long_label",defaultMessage:"Unmute Group"},unmuteSuccess:{id:"group.unmute.success",defaultMessage:"Unmuted the group"},unpin:{id:"status.unpin",defaultMessage:"Unpin from profile"},unpinFromGroup:{id:"status.unpin_to_group",defaultMessage:"Unpin from Group"}},StatusActionBar=function _e(et){var tt,nt,rt,at,it=et.status,ot=et.withLabels,st=ot===void 0?!1:ot,ct=et.expandable,ut=ct===void 0?!0:ct,dt=et.space,ft=dt===void 0?"sm":dt,pt=et.statusActionButtonTheme,mt=pt===void 0?"default":pt,ht=useIntl(),Et=useHistory(),yt=useAppDispatch(),vt=useRouteMatch("/group/:groupSlug"),gt=useGroup((tt=it.group)===null||tt===void 0?void 0:tt.id),St=gt.group,Rt=useMuteGroup(St),$t=useUnmuteGroup(St),bt=!!(St!=null&&(nt=St.relationship)!==null&&nt!==void 0&&nt.muting),wt=useDeleteGroupStatus(St,it.id),xt=useBlockGroupMember(St,it==null?void 0:it.account),Tt=useAppSelector(function(Sn){return Sn.me}),Ct=useGroupRelationship((rt=it.group)===null||rt===void 0?void 0:rt.id),Nt=Ct.groupRelationship,At=useFeatures(),kt=useSettings(),Pt=useSoapboxConfig(),Ft=Pt.allowedEmoji,Dt=useOwnAccount(),Lt=Dt.account,It=Lt?Lt.staff:!1,Ot=Lt?Lt.admin:!1;if(!it)return null;var Ut=function(gn){yt(openModal("UNAUTHORIZED",{action:gn,ap_id:it.url}))},jt=function(gn){Tt?yt(replyCompose(it)):Ut("REPLY")},zt=function(){navigator.share({text:it.search_index,url:it.uri}).catch(function(gn){gn.name!=="AbortError"&&console.error(gn)})},Qt=function(gn){Tt?yt(toggleFavourite(it)):Ut("FAVOURITE")},Xt=function(gn){Tt?yt(toggleDislike(it)):Ut("DISLIKE")},Yt=function(gn){yt(toggleBookmark(it))},Bt=function(){window.open(it.uri,"_blank")},Kt=function(gn){if(Tt){var Nn=function(){return yt(toggleReblog(it))},qn=kt.get("boostModal");gn&&gn.shiftKey||!qn?Nn():yt(openModal("BOOST",{status:it,onReblog:Nn}))}else Ut("REBLOG")},Wt=function(gn){Tt?yt(quoteCompose(it)):Ut("REBLOG")},sn=function(){var gn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;yt(function(Nn,qn){var Wn=kt.get("deleteModal");yt(Wn?openModal("CONFIRM",{icon:gn?vitePluginRequire_1697861809581_59959258:vitePluginRequire_1697861811799_72054898,heading:ht.formatMessage(gn?messages$w.redraftHeading:messages$w.deleteHeading),message:ht.formatMessage(gn?messages$w.redraftMessage:messages$w.deleteMessage),confirm:ht.formatMessage(gn?messages$w.redraftConfirm:messages$w.deleteConfirm),onConfirm:function(){return yt(deleteStatus$6(it.id,gn))}}):deleteStatus$6(it.id,gn))})},pn=function(gn){sn()},mn=function(gn){sn(!0)},hn=function(){it.event?yt(editEvent(it.id)):yt(editStatus(it.id))},_n=function(gn){yt(togglePin(it))},En=function(){var gn=it.group;it.pinned?yt(unpinFromGroup(it,gn)):yt(pinToGroup(it,gn)).then(function(){return toast.success(ht.formatMessage(messages$w.pinToGroupSuccess))}).catch(function(){return null})},On=function(gn){yt(mentionCompose(it.account))},Cn=function(gn){yt(directCompose(it.account))},Tn=function(gn){var Nn=it.account;yt(launchChat(Nn.id,Et))},Mn=function(gn){yt(initMuteModal(it.account))},Fn=function(){return yt(openModal("CONFIRM",{heading:ht.formatMessage(messages$w.muteHeading),message:ht.formatMessage(messages$w.muteMessage),confirm:ht.formatMessage(messages$w.muteConfirm),confirmationTheme:"primary",onConfirm:function(){return Rt.mutate(void 0,{onSuccess:function(){toast.success(ht.formatMessage(messages$w.muteSuccess))}})}}))},zn=function(){$t.mutate(void 0,{onSuccess:function(){toast.success(ht.formatMessage(messages$w.unmuteSuccess))}})},Dn=function(gn){var Nn=it.account;yt(openModal("CONFIRM",{icon:vitePluginRequire_1697861828079_95498444,heading:_createRawReactElement(FormattedMessage$1,{id:"confirmations.block.heading",defaultMessage:"Block @{name}",values:{name:Nn.acct}}),message:_createRawReactElement(FormattedMessage$1,{id:"confirmations.block.message",defaultMessage:"Are you sure you want to block {name}?",values:{name:_createRawReactElement("strong",{className:"break-words"},void 0,"@",Nn.acct)}}),confirm:ht.formatMessage(messages$w.blockConfirm),onConfirm:function(){return yt(blockAccount(Nn.id))},secondary:ht.formatMessage(messages$w.blockAndReport),onSecondary:function(){yt(blockAccount(Nn.id)),yt(initReport(ReportableEntities.STATUS,Nn,{status:it}))}}))},Bn=function(gn){Et.push("/@".concat(it.account.acct,"/posts/").concat(it.id))},Vn=function(){yt(openModal("EMBED",{url:it.url,onError:function(Nn){return toast.showAlertForError(Nn)}}))},Zn=function(gn){yt(initReport(ReportableEntities.STATUS,it.account,{status:it}))},er=function(gn){yt(toggleMuteStatus(it))},Pn=function(gn){var Nn=it.uri;copy(Nn)},$n=function(gn){var Nn=it.account;yt(openModal("ACCOUNT_MODERATION",{accountId:Nn.id}))},Ln=function(gn){yt(deleteStatusModal(ht,it.id))},Gn=function(gn){yt(toggleStatusSensitivityModal(ht,it.id,it.sensitive))},Jn=function(){var gn=it.account;yt(openModal("CONFIRM",{heading:ht.formatMessage(messages$w.deleteHeading),message:ht.formatMessage(messages$w.deleteFromGroupMessage,{name:_createRawReactElement("strong",{className:"break-words"},void 0,gn.username)}),confirm:ht.formatMessage(messages$w.deleteConfirm),onConfirm:function(){wt.mutate(it.id,{onSuccess:function(){yt(deleteFromTimelines(it.id))}})}}))},ir=function(){yt(openModal("CONFIRM",{heading:ht.formatMessage(messages$w.groupBlockFromGroupHeading),message:ht.formatMessage(messages$w.groupBlockFromGroupMessage,{name:it.account.username}),confirm:ht.formatMessage(messages$w.groupBlockConfirm),onConfirm:function(){xt({account_ids:[it.account.id]},{onSuccess:function(){toast.success(ht.formatMessage(messages$w.blocked,{name:Lt==null?void 0:Lt.acct}))}})}}))},or=function(gn){var Nn=it.muted,qn=it.account.id===Tt,Wn=it.account.username,cr=it.account,Tr=cr.fqn.split("@")[1],wn=[];if(ut&&wn.push({text:ht.formatMessage(messages$w.open),action:Bn,icon:vitePluginRequire_1697861817755_14152020}),gn&&(wn.push({text:ht.formatMessage(messages$w.copy),action:Pn,icon:vitePluginRequire_1697861817685_18392263}),At.embeds&&isLocal(cr)&&wn.push({text:ht.formatMessage(messages$w.embed),action:Vn,icon:vitePluginRequire_1697861828130_86868126})),!Tt)return wn;var vr=_typeof$8(it.group)==="object";if(vr&&it.group){var xr=(Nt==null?void 0:Nt.role)===GroupRoles.OWNER;xr&&wn.push({text:ht.formatMessage(it.pinned?messages$w.unpinFromGroup:messages$w.pinToGroup),action:En,icon:it.pinned?vitePluginRequire_1697861810834_40852917:vitePluginRequire_1697861828084_9357167})}if(At.bookmarks&&wn.push({text:ht.formatMessage(it.bookmarked?messages$w.unbookmark:messages$w.bookmark),action:Yt,icon:it.bookmarked?vitePluginRequire_1697861810834_78521829:vitePluginRequire_1697861810834_3571213}),At.federating&&isRemote(cr)&&wn.push({text:ht.formatMessage(messages$w.external,{domain:Tr}),action:Bt,icon:vitePluginRequire_1697861810833_45315206}),wn.push(null),wn.push({text:ht.formatMessage(Nn?messages$w.unmuteConversation:messages$w.muteConversation),action:er,icon:Nn?vitePluginRequire_1697861831311_54316318:vitePluginRequire_1697861817755_10587808}),wn.push(null),qn)gn?wn.push({text:ht.formatMessage(it.pinned?messages$w.unpin:messages$w.pin),action:_n,icon:it.pinned?vitePluginRequire_1697861810834_40852917:vitePluginRequire_1697861828084_9357167}):it.visibility==="private"&&wn.push({text:ht.formatMessage(it.reblogged?messages$w.cancel_reblog_private:messages$w.reblog_private),action:Kt,icon:vitePluginRequire_1697861810834_60823079}),wn.push({text:ht.formatMessage(messages$w.delete),action:pn,icon:vitePluginRequire_1697861811799_72054898,destructive:!0}),At.editStatuses?wn.push({text:ht.formatMessage(messages$w.edit),action:hn,icon:vitePluginRequire_1697861809581_59959258}):wn.push({text:ht.formatMessage(messages$w.redraft),action:mn,icon:vitePluginRequire_1697861809581_59959258,destructive:!0});else{var fr;wn.push({text:ht.formatMessage(messages$w.mention,{name:Wn}),action:On,icon:vitePluginRequire_1697861810834_25410229}),((fr=it.account.pleroma)===null||fr===void 0?void 0:fr.accepts_chat_messages)===!0?wn.push({text:ht.formatMessage(messages$w.chat,{name:Wn}),action:Tn,icon:vitePluginRequire_1697861810834_58630734}):At.privacyScopes&&wn.push({text:ht.formatMessage(messages$w.direct,{name:Wn}),action:Cn,icon:vitePluginRequire_1697861810834_33454440}),wn.push(null),At.groupsMuting&&it.group&&(wn.push({text:bt?ht.formatMessage(messages$w.unmuteGroup):ht.formatMessage(messages$w.muteGroup),icon:vitePluginRequire_1697861806677_81747454,action:bt?zn:Fn}),wn.push(null)),wn.push({text:ht.formatMessage(messages$w.mute,{name:Wn}),action:Mn,icon:vitePluginRequire_1697861806677_81747454}),wn.push({text:ht.formatMessage(messages$w.block,{name:Wn}),action:Dn,icon:vitePluginRequire_1697861828079_95498444}),wn.push({text:ht.formatMessage(messages$w.report,{name:Wn}),action:Zn,icon:vitePluginRequire_1697861810834_83829185})}if(vr&&it.group){var Cr=it.group,Ar=it.account,gr=(Nt==null?void 0:Nt.role)===GroupRoles.OWNER,_r=(Nt==null?void 0:Nt.role)===GroupRoles.ADMIN,yr=Cr.owner.id===Ar.id,Er=(vt==null?void 0:vt.isExact)&&(gr||_r)&&!yr&&!qn,Sr=!qn&&(gr||_r&&!yr);(Er||Sr)&&wn.push(null),Er&&wn.push({text:"Ban from Group",action:ir,icon:vitePluginRequire_1697861828079_95498444,destructive:!0}),Sr&&wn.push({text:ht.formatMessage(messages$w.groupModDelete),action:Jn,icon:vitePluginRequire_1697861811799_72054898,destructive:!0})}return It&&(wn.push(null),wn.push({text:ht.formatMessage(messages$w.adminAccount,{name:Wn}),action:$n,icon:vitePluginRequire_1697861810834_38963235}),Ot&&wn.push({text:ht.formatMessage(messages$w.admin_status),href:"/pleroma/admin/#/statuses/".concat(it.id,"/"),icon:vitePluginRequire_1697861810834_97586508}),wn.push({text:ht.formatMessage(it.sensitive===!1?messages$w.markStatusSensitive:messages$w.markStatusNotSensitive),action:Gn,icon:vitePluginRequire_1697861810834_37299420}),qn||wn.push({text:ht.formatMessage(messages$w.deleteStatus),action:Ln,icon:vitePluginRequire_1697861811799_72054898,destructive:!0})),wn},jn=["public","unlisted","local","group"].includes(it.visibility),rr=it.replies_count,tr=it.reblogs_count,bn=it.favourites_count,yn=reduceEmoji(it.pleroma.get("emoji_reactions")||List$1(),bn,it.favourited,Ft).reduce(function(Sn,gn){return Sn+gn.get("count")},0),xn=getReactForStatus(it,Ft),kn=xn==null?void 0:xn.get("name"),Kn={"⭐️":messages$w.reactionLike,"❤️":messages$w.reactionHeart,"😆":messages$w.reactionLaughing,"😮":messages$w.reactionOpenMouth,"😢":messages$w.reactionCry,"😩":messages$w.reactionWeary,"":messages$w.favourite},Xn=ht.formatMessage(Kn[kn||""]||messages$w.favourite),nr=or(jn),ar=vitePluginRequire_1697861810834_60823079,sr,dr=!1;it.visibility==="direct"?ar=vitePluginRequire_1697861810834_33454440:it.visibility==="private"&&(ar=vitePluginRequire_1697861811805_60977601),(at=it.group)!==null&&at!==void 0&&at.membership_required&&!(Nt!=null&&Nt.member)&&(dr=!0,sr=ht.formatMessage(messages$w.replies_disabled_group));var br=[{text:ht.formatMessage(it.reblogged?messages$w.cancel_reblog_private:messages$w.reblog),action:Kt,icon:vitePluginRequire_1697861810834_60823079},{text:ht.formatMessage(messages$w.quotePost),action:Wt,icon:vitePluginRequire_1697861810834_29007330}],hr=_createRawReactElement(StatusActionButton,{icon:ar,color:"success",disabled:!jn,title:jn?ht.formatMessage(messages$w.reblog):ht.formatMessage(messages$w.cannot_reblog),active:it.reblogged,onClick:Kt,count:tr,text:st?ht.formatMessage(messages$w.reblog):void 0,theme:mt});it.in_reply_to_id?sr=ht.formatMessage(messages$w.replyAll):sr=ht.formatMessage(messages$w.reply);var $r="share"in navigator&&(it.visibility==="public"||it.visibility==="group"),wr={sm:2,md:8,lg:0};return _createRawReactElement(HStack,{"data-testid":"status-action-bar"},void 0,_createRawReactElement(HStack,{justifyContent:ft==="lg"?"between":void 0,space:wr[ft],grow:ft==="lg",onClick:function(gn){return gn.stopPropagation()},alignItems:"center"},void 0,_createRawReactElement(GroupPopover,{group:it.group,isEnabled:dr},void 0,_createRawReactElement(StatusActionButton,{title:sr,icon:vitePluginRequire_1697861817757_28781507,onClick:jt,count:rr,text:st?ht.formatMessage(messages$w.reply):void 0,disabled:dr,theme:mt})),At.quotePosts&&Tt?_createRawReactElement(DropdownMenu,{items:br,disabled:!jn,onShiftClick:Kt},void 0,hr):hr,At.emojiReacts?_createRawReactElement(StatusReactionWrapper,{statusId:it.id},void 0,_createRawReactElement(StatusActionButton,{title:Xn,icon:vitePluginRequire_1697861820192_13017256,filled:!0,color:"accent",active:!!kn,count:yn,emoji:xn,text:st?Xn:void 0,theme:mt})):_createRawReactElement(StatusActionButton,{title:ht.formatMessage(messages$w.favourite),icon:At.dislikes?vitePluginRequire_1697861817757_12600091:vitePluginRequire_1697861820192_13017256,color:"accent",filled:!0,onClick:Qt,active:!!kn,count:bn,text:st?Xn:void 0,theme:mt}),At.dislikes&&_createRawReactElement(StatusActionButton,{title:ht.formatMessage(messages$w.disfavourite),icon:vitePluginRequire_1697861817757_74398257,color:"accent",filled:!0,onClick:Xt,active:it.disliked,count:it.dislikes_count,text:st?ht.formatMessage(messages$w.disfavourite):void 0,theme:mt}),$r&&_createRawReactElement(StatusActionButton,{title:ht.formatMessage(messages$w.share),icon:vitePluginRequire_1697861808850_96938226,onClick:zt,theme:mt}),_createRawReactElement(DropdownMenu,{items:nr,status:it},void 0,_createRawReactElement(StatusActionButton,{title:ht.formatMessage(messages$w.more),icon:vitePluginRequire_1697861810836_81866597,theme:mt}))))};const vitePluginRequire_1697861817878_96196859="/packs/assets/circle-filled-4f8a6c8b.svg",vitePluginRequire_1697861824494_8991836="/packs/assets/home-ceecf982.svg";var messages$v={direct:{id:"privacy.direct.short",defaultMessage:"Direct"},private:{id:"privacy.private.short",defaultMessage:"Followers-only"},public:{id:"privacy.public.short",defaultMessage:"Public"},local:{id:"privacy.local.short",defaultMessage:"Local-only"},unlisted:{id:"privacy.unlisted.short",defaultMessage:"Unlisted"}},StatusInfo=function _e(et){var tt=useIntl(),nt=et.avatarSize,rt=et.icon,at=et.text,it=et.visibility,ot=function(ct){ct.stopPropagation()};return _createRawReactElement("div",{role:"status-info",className:clsx("flex",{"mb-3":nt&&rt&&at}),onClick:ot},void 0,_createRawReactElement(HStack,{space:3,alignItems:"center",className:"grow cursor-default text-xs font-medium text-gray-700 rtl:space-x-reverse dark:text-gray-600"},void 0,nt&&rt&&_createRawReactElement("div",{className:"flex justify-end"},void 0,rt),at&&_createRawReactElement(Text$2,{size:"xs",theme:"muted",weight:"medium"},void 0,at)),it==="public"&&_createRawReactElement(Icon$1,{"aria-hidden":!0,title:tt.formatMessage(messages$v.public),src:vitePluginRequire_1697861826920_76919417,className:"h-5 w-5 shrink-0 text-gray-400 dark:text-gray-600"}),it==="unlisted"&&_createRawReactElement(Icon$1,{"aria-hidden":!0,title:tt.formatMessage(messages$v.unlisted),src:vitePluginRequire_1697861828084_81550747,className:"h-5 w-5 shrink-0 text-gray-400 dark:text-gray-600"}),it==="local"&&_createRawReactElement(Icon$1,{"aria-hidden":!0,title:tt.formatMessage(messages$v.local),src:vitePluginRequire_1697861824494_8991836,className:"h-5 w-5 shrink-0 text-gray-400 dark:text-gray-600"}),it==="private"&&_createRawReactElement(Icon$1,{"aria-hidden":!0,title:tt.formatMessage(messages$v.private),src:vitePluginRequire_1697861811805_60977601,className:"h-5 w-5 shrink-0 text-gray-400 dark:text-gray-600"}),it==="direct"&&_createRawReactElement(Icon$1,{"aria-hidden":!0,title:tt.formatMessage(messages$v.direct),src:vitePluginRequire_1697861810834_33454440,className:"h-5 w-5 shrink-0 text-gray-400 dark:text-gray-600"}),it==="placeholder"&&_createRawReactElement(Icon$1,{"aria-hidden":!0,title:"Placeholder",src:vitePluginRequire_1697861817878_96196859,className:"h-5 w-5 shrink-0 text-primary-50 dark:text-primary-800"}))},messages$u={reblogged_by:{id:"status.reblogged_by",defaultMessage:"{name} reposted"},show:{id:"moderation_overlay.show_content",defaultMessage:"Show content"},hide:{id:"moderation_overlay.hide_content",defaultMessage:"Hide content"}},Status=function _e(et){var tt,nt=et.status,rt=et.accountAction,at=et.avatarSize,it=at===void 0?42:at,ot=et.focusable,st=ot===void 0?!0:ot,ct=et.hoverable,ut=ct===void 0?!0:ct,dt=et.onClick,ft=et.onMoveUp,pt=et.onMoveDown,mt=et.muted,ht=et.hidden,Et=et.featured,yt=et.unread,vt=et.hideActionBar,gt=et.variant,St=gt===void 0?"rounded":gt,Rt=et.showGroup,$t=Rt===void 0?!0:Rt,bt=et.notification,wt=useIntl(),xt=useHistory(),Tt=useAppDispatch(),Ct=useSettings(),Nt=Ct.get("showSensitiveMedia"),At=reactExports.useRef(!1),kt=reactExports.useRef(null),Pt=reactExports.useState(defaultMediaVisibility(nt,Nt)),Ft=_slicedToArray$4(Pt,2),Dt=Ft[0],Lt=Ft[1],It=getActualStatus(nt),Ot=nt.reblog&&_typeof$8(nt.reblog)==="object",Ut="/@".concat(It.account.acct,"/posts/").concat(It.id),jt=It.group,zt=(nt.filtered.size||It.filtered.size)>0;reactExports.useEffect(function(){At.current=!!(!mt&&!ht&&(nt!=null&&nt.card))},[]),reactExports.useEffect(function(){Lt(defaultMediaVisibility(nt,Nt))},[nt.id]);var Qt=function(){Lt(!Dt)},Xt=function(_n){var En;_n==null||_n.stopPropagation(),!((En=getSelection())!==null&&En!==void 0&&En.toString().length)&&(!_n||!(_n.ctrlKey||_n.metaKey)?dt?dt():xt.push(Ut):window.open(Ut,"_blank"))},Yt=function(){return Tt(unfilterStatus(nt.filtered.size?nt.id:It.id))},Bt=function(){return typeof bt<"u"?_createRawReactElement(StatusInfo,{avatarSize:it,icon:bt.icon,text:bt.text,visibility:It.visibility}):Ot&&$t&&jt?_createRawReactElement(StatusInfo,{avatarSize:it,icon:_createRawReactElement(Icon$1,{src:vitePluginRequire_1697861810834_60823079,className:"h-4 w-4 text-green-600"}),text:_createRawReactElement(FormattedMessage$1,{id:"status.reblogged_by_with_group",defaultMessage:"{name} reposted from {group}",values:{name:_createRawReactElement(Link$2,{to:"/@".concat(nt.account.acct),className:"hover:underline"},void 0,_createRawReactElement("bdi",{className:"truncate"},void 0,_createRawReactElement("strong",{className:"text-gray-800 dark:text-gray-200",dangerouslySetInnerHTML:{__html:nt.account.display_name_html}}))),group:_createRawReactElement(Link$2,{to:"/group/".concat(jt.slug),className:"hover:underline"},void 0,_createRawReactElement("strong",{className:"text-gray-800 dark:text-gray-200",dangerouslySetInnerHTML:{__html:jt.display_name_html}}))}}),visibility:It.visibility}):Ot?_createRawReactElement(StatusInfo,{avatarSize:it,icon:_createRawReactElement(Icon$1,{src:vitePluginRequire_1697861810834_60823079,className:"h-4 w-4 text-green-600"}),text:_createRawReactElement(FormattedMessage$1,{id:"status.reblogged_by",defaultMessage:"{name} reposted",values:{name:_createRawReactElement(Link$2,{to:"/@".concat(nt.account.acct),className:"hover:underline"},void 0,_createRawReactElement("bdi",{className:"truncate"},void 0,_createRawReactElement("strong",{className:"text-gray-800 dark:text-gray-200",dangerouslySetInnerHTML:{__html:nt.account.display_name_html}})))}}),visibility:It.visibility}):Et?_createRawReactElement(StatusInfo,{avatarSize:it,icon:_createRawReactElement(Icon$1,{src:vitePluginRequire_1697861802279_81647480,className:"h-4 w-4 text-gray-600 dark:text-gray-400"}),text:_createRawReactElement(FormattedMessage$1,{id:"status.pinned",defaultMessage:"Pinned post"}),visibility:It.visibility}):$t&&jt?_createRawReactElement(StatusInfo,{avatarSize:it,icon:_createRawReactElement(Icon$1,{src:vitePluginRequire_1697861811664_62987830,className:"h-4 w-4 text-primary-600 dark:text-accent-blue"}),text:_createRawReactElement(FormattedMessage$1,{id:"status.group",defaultMessage:"Posted in {group}",values:{group:_createRawReactElement(Link$2,{to:"/group/".concat(jt.slug),className:"hover:underline"},void 0,_createRawReactElement("bdi",{className:"truncate"},void 0,_createRawReactElement("strong",{className:"text-gray-800 dark:text-gray-200"},void 0,_createRawReactElement("span",{dangerouslySetInnerHTML:{__html:jt.display_name_html}}))))}}),visibility:It.visibility}):_createRawReactElement(StatusInfo,{visibility:It.visibility})};if(!nt)return null;if(ht)return React$3.createElement("div",{ref:kt},React$3.createElement(React$3.Fragment,null,It.account.display_name||It.account.username,It.content));if(zt&&nt.showFiltered)return React$3.createElement("div",{className:clsx("status__wrapper text-center",{focusable:st}),tabIndex:st?0:void 0,ref:kt},_createRawReactElement(Text$2,{theme:"muted"},void 0,_createRawReactElement(FormattedMessage$1,{id:"status.filtered",defaultMessage:"Filtered"}),": ",nt.filtered.join(", "),"."," ",_createRawReactElement("button",{className:"text-primary-600 hover:underline dark:text-accent-blue",onClick:Yt},void 0,_createRawReactElement(FormattedMessage$1,{id:"status.show_filter_reason",defaultMessage:"Show anyway"}))));var Kt;nt.reblog&&_typeof$8(nt.reblog)==="object"&&(Kt=wt.formatMessage(messages$u.reblogged_by,{name:nt.account.acct}));var Wt;It.quote&&(It.pleroma.get("quote_visible",!0)===!1?Wt=_createRawReactElement("div",{className:"quoted-status-tombstone"},void 0,_createRawReactElement("p",{},void 0,_createRawReactElement(FormattedMessage$1,{id:"statuses.quote_tombstone",defaultMessage:"Post is unavailable."}))):Wt=_createRawReactElement(QuotedStatusContainer$1,{statusId:It.quote}));var sn=It.visibility==="self",pn=It.sensitive,mn=((tt=nt.tombstone)===null||tt===void 0?void 0:tt.reason)==="deleted";return mn?_createRawReactElement(Tombstone,{id:nt.id,onMoveUp:function(_n){return ft?ft(_n):null},onMoveDown:function(_n){return pt?pt(_n):null}}):React$3.createElement("div",{className:clsx("status cursor-pointer",{focusable:st}),tabIndex:st&&!mt?0:void 0,"data-featured":Et?"true":null,"aria-label":textForScreenReader(wt,It,Kt),ref:kt,onClick:Xt,role:"link"},_createRawReactElement(Card$1,{variant:St,className:clsx("status__wrapper space-y-4","status-".concat(It.visibility),{"py-6 sm:p-5":St==="rounded","status-reply":!!nt.in_reply_to_id,muted:mt,read:yt===!1}),"data-id":nt.id},void 0,_createRawReactElement("div",{},void 0,Bt(),_createRawReactElement(AccountContainer,{id:It.account.id,timestamp:It.created_at,timestampUrl:Ut,action:rt,hideActions:!rt,showEdit:!!It.edited_at,showProfileHoverCard:ut,withLinkToProfile:ut,approvalStatus:It.approval_status,avatarSize:it},It.account.id)),_createRawReactElement("div",{className:"status__content-wrapper"},void 0,_createRawReactElement(StatusReplyMentions,{status:It,hoverable:ut}),_createRawReactElement(StatusContainer,{showMedia:Dt||!1,isSensitive:sn||pn,onToggleMediaVisibility:Qt,quote:Wt,hasMedia:!!(Wt||It.card||It.media_attachments.size>0),contentOption:{status:It,onClick:Xt,collapsable:!0,translatable:!0}}),!vt&&!sn&&_createRawReactElement("div",{className:"pt-4"},void 0,_createRawReactElement(StatusActionBar,{status:It})))))},EmbeddedStatus=function _e(et){var tt=et.params,nt=useAppDispatch(),rt=useHistory(),at=reactExports.useCallback(makeGetStatus(),[]),it=useAppSelector(function(pt){return at(pt,{id:tt.statusId})}),ot=reactExports.useState(!0),st=_slicedToArray$4(ot,2),ct=st[0],ut=st[1];reactExports.useEffect(function(){rt.block(),nt(fetchStatus(tt.statusId)).then(function(){return ut(!1)}).catch(function(){return ut(!1)})},[]),reactExports.useEffect(function(){window.parent.postMessage({type:"setHeight",id:iframeId,height:document.getElementsByTagName("html")[0].scrollHeight},"*")},[it,ct]);var dt=_createRawReactElement("div",{className:"ml-4 flex justify-center align-middle"},void 0,_createRawReactElement(SiteLogo,{className:"max-h-[20px] max-w-[112px]"})),ft=function(){return ct?_createRawReactElement(Spinner,{}):it?_createRawReactElement(Status,{status:it,accountAction:dt,variant:"default"}):_createRawReactElement(MissingIndicator,{nested:!0})};return _createRawReactElement("a",{className:"block bg-white dark:bg-primary-900",href:(it==null?void 0:it.url)||"#",onClick:function(mt){return mt.stopPropagation()},target:"_blank"},void 0,_createRawReactElement("div",{className:"pointer-events-none max-w-3xl p-4 sm:p-6"},void 0,ft()))};const FETCH_ABOUT_PAGE_REQUEST="FETCH_ABOUT_PAGE_REQUEST",FETCH_ABOUT_PAGE_SUCCESS="FETCH_ABOUT_PAGE_SUCCESS",FETCH_ABOUT_PAGE_FAIL="FETCH_ABOUT_PAGE_FAIL",fetchAboutPage=(_e="index",et)=>tt=>{tt({type:FETCH_ABOUT_PAGE_REQUEST,slug:_e,locale:et});const nt=`${_e}${et?`.${et}`:""}.html`;return staticClient.get(`/instance/about/${nt}`).then(({data:rt})=>(tt({type:FETCH_ABOUT_PAGE_SUCCESS,slug:_e,locale:et,html:rt}),rt)).catch(rt=>{throw tt({type:FETCH_ABOUT_PAGE_FAIL,slug:_e,locale:et,error:rt}),rt})};var _excluded4=["label","hint","items"],LabelInputContainer=function _e(et){var tt=et.label,nt=et.hint,rt=et.children,at=reactExports.useState(v4()),it=_slicedToArray$4(at,1),ot=it[0],st=React$3.Children.map(rt,function(ct){return React$3.cloneElement(ct,{id:ot,key:ot})});return _createRawReactElement("div",{className:"label_input"},void 0,_createRawReactElement("label",{htmlFor:ot},void 0,tt),_createRawReactElement("div",{className:"label_input__wrapper"},void 0,st),nt&&_createRawReactElement("span",{className:"hint"},void 0,nt))},SelectDropdown=function _e(et){var tt=et.label,nt=et.hint,rt=et.items,at=_objectWithoutProperties(et,_excluded4),it=Object.keys(rt).map(function(st){return _createRawReactElement("option",{value:st},st,rt[st])}),ot=React$3.createElement(Select,at,it);return tt?_createRawReactElement(LabelInputContainer,{label:tt,hint:nt},void 0,ot):ot},List=function _e(et){var tt=et.children;return _createRawReactElement("div",{className:"space-y-0.5"},void 0,tt)},ListItem=function _e(et){var tt=et.label,nt=et.hint,rt=et.children,at=et.to,it=et.onClick,ot=et.onSelect,st=et.isSelected,ct=v4(),ut="list-group-".concat(ct),dt=function(gt){gt.key==="Enter"&&it()},ft=at||it||ot?"span":"label",pt=React$3.useCallback(function(){return React$3.Children.map(rt,function(vt){if(React$3.isValidElement(vt)){var gt=vt.type===SelectDropdown||vt.type===Select;return React$3.cloneElement(vt,{id:ut,className:clsx({"w-auto":gt},vt.props.className)})}return null})},[rt,ut]),mt=clsx("flex items-center justify-between overflow-hidden bg-gradient-to-r from-gradient-start/20 to-gradient-end/20 px-4 py-2 first:rounded-t-lg last:rounded-b-lg dark:from-gradient-start/10 dark:to-gradient-end/10",{"cursor-pointer hover:from-gradient-start/30 hover:to-gradient-end/30 dark:hover:from-gradient-start/5 dark:hover:to-gradient-end/5":typeof at<"u"||typeof it<"u"||typeof ot<"u"}),ht=React$3.createElement(React$3.Fragment,null,_createRawReactElement("div",{className:"flex flex-col py-1.5 pr-4 rtl:pl-4 rtl:pr-0"},void 0,_createRawReactElement(ft,{className:"text-gray-900 dark:text-gray-100",htmlFor:ut},void 0,tt),nt?_createRawReactElement("span",{className:"text-sm text-gray-700 dark:text-gray-600"},void 0,nt):null),at||it?_createRawReactElement(HStack,{space:1,alignItems:"center",className:"overflow-hidden text-gray-700 dark:text-gray-600"},void 0,rt,_createRawReactElement(Icon$1,{src:vitePluginRequire_1697861828086_76580221,className:"ml-1 rtl:rotate-180"})):null,ot?_createRawReactElement("div",{className:"flex flex-row items-center text-gray-700 dark:text-gray-600"},void 0,rt,_createRawReactElement("div",{className:clsx({"flex h-6 w-6 items-center justify-center rounded-full border-2 border-solid border-primary-500 dark:border-primary-400 transition":!0,"bg-primary-500 dark:bg-primary-400":st,"bg-transparent":!st})},void 0,_createRawReactElement(Icon$1,{src:vitePluginRequire_1697861823905_3845308,className:clsx({"h-4 w-4 text-white dark:text-white transition-all duration-500":!0,"opacity-0 scale-50":!st,"opacity-100 scale-100":st})}))):null,typeof at>"u"&&typeof it>"u"&&typeof ot>"u"?pt():null);if(at)return _createRawReactElement(Link$2,{className:mt,to:at},void 0,ht);var Et=it?"a":"div",yt=it||ot?{onClick:it||ot,onKeyDown:dt,tabIndex:0,role:"link"}:{};return React$3.createElement(Et,_extends$4({className:mt},yt),ht)},SettingToggle=function _e(et){var tt=et.id,nt=et.settings,rt=et.settingPath,at=et.onChange,it=function(st){var ct=st.target;at(rt,ct.checked)};return _createRawReactElement(Toggle,{id:tt,checked:!!nt.getIn(rt),onChange:it})};const vitePluginRequire_1697861823791_34177447="/packs/assets/moon-c47d7627.svg",vitePluginRequire_1697861823791_2668942="/packs/assets/sun-f0c7dc05.svg",vitePluginRequire_1697861823791_92048794="/packs/assets/device-desktop-8182f875.svg";var messages$t={light:{id:"theme_toggle.light",defaultMessage:"Light"},dark:{id:"theme_toggle.dark",defaultMessage:"Dark"},system:{id:"theme_toggle.system",defaultMessage:"System"}},ThemeSelector=function _e(et){var tt=et.value,nt=et.onChange,rt=useIntl(),at=reactExports.useMemo(function(){switch(tt){case"system":return vitePluginRequire_1697861823791_92048794;case"light":return vitePluginRequire_1697861823791_2668942;case"dark":return vitePluginRequire_1697861823791_34177447;default:return null}},[tt]),it=function(st){nt(st.target.value)};return _createRawReactElement("label",{},void 0,_createRawReactElement("div",{className:"relative rounded-md shadow-sm"},void 0,_createRawReactElement("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},void 0,_createRawReactElement(Icon$1,{src:at,className:"h-4 w-4 text-gray-600 dark:text-gray-700"})),_createRawReactElement(Select,{onChange:it,defaultValue:tt,className:"!pl-10"},void 0,_createRawReactElement("option",{value:"system"},void 0,rt.formatMessage(messages$t.system)),_createRawReactElement("option",{value:"light"},void 0,rt.formatMessage(messages$t.light)),_createRawReactElement("option",{value:"dark"},void 0,rt.formatMessage(messages$t.dark))),_createRawReactElement("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3"},void 0,_createRawReactElement(Icon$1,{src:vitePluginRequire_1697861809669_7698334,className:"h-4 w-4 text-gray-600 dark:text-gray-700"}))))},ThemeToggle=function _e(){var et=useAppDispatch(),tt=useSettings().get("themeMode"),nt=function(at){et(changeSetting(["themeMode"],at))};return _createRawReactElement(ThemeSelector,{value:tt,onChange:nt})};function ownKeys$7(_e,et){var tt=Object.keys(_e);if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(_e);et&&(nt=nt.filter(function(rt){return Object.getOwnPropertyDescriptor(_e,rt).enumerable})),tt.push.apply(tt,nt)}return tt}function _objectSpread$6(_e){for(var et=1;etPage not found")})},[ft,nt]);var vt=Et&&_createRawReactElement("div",{},void 0,_createRawReactElement(FormattedMessage$1,{id:"about.also_available",defaultMessage:"Available in:"})," ",_createRawReactElement("ul",{className:"inline list-none p-0"},void 0,_createRawReactElement("li",{className:"inline after:content-['_·_']"},void 0,_createRawReactElement("a",{href:"#",onClick:function(){return pt(Et)}},void 0,languages[Et]||Et)),yt==null?void 0:yt.map(function(gt){return _createRawReactElement("li",{className:"inline after:content-['_·_'] last:after:content-none"},gt,_createRawReactElement("a",{href:"#",onClick:function(){return pt(gt)}},void 0,languages[gt]||gt))})));return _createRawReactElement("div",{className:"prose mx-auto py-20 dark:prose-invert"},void 0,_createRawReactElement("div",{dangerouslySetInnerHTML:{__html:st}}),vt)},LandingPage=function _e(){var et=useAppDispatch(),tt=useFeatures(),nt=useSoapboxConfig(),rt=useRegistrationStatus(),at=rt.pepeEnabled,it=rt.pepeOpen,ot=useInstance(),st=function(){return _createRawReactElement(Stack,{space:3,"data-testid":"registrations-closed"},void 0,_createRawReactElement(Text$2,{size:"xl",weight:"bold",align:"center"},void 0,_createRawReactElement(FormattedMessage$1,{id:"registration.closed_title",defaultMessage:"Registrations Closed"})),_createRawReactElement(Text$2,{theme:"muted",align:"center"},void 0,_createRawReactElement(FormattedMessage$1,{id:"registration.closed_message",defaultMessage:"{instance} is not accepting new members.",values:{instance:ot.title}})))},ct=function(){return _createRawReactElement(RegistrationForm,{})},ut=function(){var mt=nt.authProvider;return _createRawReactElement(Stack,{space:3},void 0,_createRawReactElement(Stack,{},void 0,_createRawReactElement(Text$2,{size:"2xl",weight:"bold",align:"center"},void 0,_createRawReactElement(FormattedMessage$1,{id:"registrations.get_started",defaultMessage:"Let's get started!"}))),_createRawReactElement(Button,{onClick:function(){return et(prepareRequest(mt))},theme:"primary",block:!0},void 0,_createRawReactElement(FormattedMessage$1,{id:"oauth_consumer.tooltip",defaultMessage:"Sign in with {provider}",values:{provider:capitalize$2(mt)}})))},dt=function(){return _createRawReactElement(Stack,{space:3,"data-testid":"registrations-pepe"},void 0,_createRawReactElement(VerificationBadge,{className:"mx-auto h-16 w-16"}),_createRawReactElement(Stack,{},void 0,_createRawReactElement(Text$2,{size:"2xl",weight:"bold",align:"center"},void 0,_createRawReactElement(FormattedMessage$1,{id:"registrations.get_started",defaultMessage:"Let's get started!"})),_createRawReactElement(Text$2,{theme:"muted",align:"center"},void 0,_createRawReactElement(FormattedMessage$1,{id:"registrations.tagline",defaultMessage:"Social Media Without Discrimination"}))),_createRawReactElement(Button,{to:"/verify",theme:"primary",block:!0},void 0,_createRawReactElement(FormattedMessage$1,{id:"registrations.create_account",defaultMessage:"Create an account"})))},ft=function(){return nt.authProvider?ut():at&&it?dt():tt.accountCreation&&ot.registrations?ct():st()};return _createRawReactElement("main",{className:"mt-16 sm:mt-24","data-testid":"homepage"},void 0,_createRawReactElement("div",{className:"mx-auto max-w-7xl"},void 0,_createRawReactElement("div",{className:"grid grid-cols-1 gap-8 py-12 lg:grid-cols-12"},void 0,_createRawReactElement("div",{className:"px-4 sm:px-6 sm:text-center md:mx-auto md:max-w-2xl lg:col-span-6 lg:flex lg:text-start"},void 0,_createRawReactElement("div",{className:"w-full"},void 0,_createRawReactElement(Stack,{space:3},void 0,_createRawReactElement("h1",{className:"overflow-hidden text-ellipsis bg-gradient-to-br from-accent-500 via-primary-500 to-gradient-end bg-clip-text text-5xl font-extrabold text-transparent sm:mt-5 sm:leading-none lg:mt-6 lg:text-6xl xl:text-7xl"},void 0,ot.title),_createRawReactElement(Markup,{size:"lg",dangerouslySetInnerHTML:{__html:ot.short_description||ot.description}})))),_createRawReactElement("div",{className:"self-center sm:mt-24 lg:col-span-6 lg:mt-0"},void 0,_createRawReactElement(Card$1,{size:"xl",variant:"rounded",className:"sm:mx-auto sm:w-full sm:max-w-md"},void 0,_createRawReactElement(CardBody,{},void 0,ft()))))))};const vitePluginRequire_1697861800392_33646738="/packs/assets/help-caf91eb6.svg",vitePluginRequire_1697861803441_69297175="/packs/assets/menu-2-be71a617.svg";var Sonar=function _e(){return _createRawReactElement("div",{className:"relative"},void 0,_createRawReactElement("div",{className:"relative h-48 w-48"},void 0,_createRawReactElement("div",{className:"pointer-events-none absolute left-0 top-0 h-full w-full animate-sonar-scale-4 rounded-full bg-primary-600/25 opacity-0 dark:bg-primary-600/25"}),_createRawReactElement("div",{className:"pointer-events-none absolute left-0 top-0 h-full w-full animate-sonar-scale-3 rounded-full bg-primary-600/25 opacity-0 dark:bg-primary-600/25"}),_createRawReactElement("div",{className:"pointer-events-none absolute left-0 top-0 h-full w-full animate-sonar-scale-2 rounded-full bg-primary-600/25 opacity-0 dark:bg-primary-600/25"}),_createRawReactElement("div",{className:"pointer-events-none absolute left-0 top-0 h-full w-full animate-sonar-scale-1 rounded-full bg-primary-600/25 opacity-0 dark:bg-primary-600/25"}),_createRawReactElement("div",{className:"absolute left-0 top-0 h-48 w-48 rounded-full bg-white dark:bg-primary-900"})))},messages$r={menu:{id:"header.menu.title",defaultMessage:"Open menu"},home:{id:"header.home.label",defaultMessage:"Home"},login:{id:"header.login.label",defaultMessage:"Log in"},register:{id:"header.register.label",defaultMessage:"Register"},username:{id:"header.login.username.placeholder",defaultMessage:"E-mail or username"},email:{id:"header.login.email.placeholder",defaultMessage:"E-mail address"},password:{id:"header.login.password.label",defaultMessage:"Password"},forgotPassword:{id:"header.login.forgot_password",defaultMessage:"Forgot password?"}},Header$1=function _e(){var et=useAppDispatch(),tt=useIntl(),nt=useFeatures(),rt=useOwnAccount(),at=rt.account,it=useSoapboxConfig(),ot=useRegistrationStatus(),st=ot.isOpen,ct=it.links,ut=React$3.useState(!1),dt=_slicedToArray$4(ut,2),ft=dt[0],pt=dt[1],mt=React$3.useState(""),ht=_slicedToArray$4(mt,2),Et=ht[0],yt=ht[1],vt=React$3.useState(""),gt=_slicedToArray$4(vt,2),St=gt[0],Rt=gt[1],$t=React$3.useState(!1),bt=_slicedToArray$4($t,2),wt=bt[0],xt=bt[1],Tt=React$3.useState(!1),Ct=_slicedToArray$4(Tt,2),Nt=Ct[0],At=Ct[1],kt=function(){return et(openModal("LANDING_PAGE"))},Pt=function(Dt){Dt.preventDefault(),pt(!0),et(logIn(Et,St)).then(function(Lt){var It=Lt.access_token;return et(verifyCredentials(It)).then(function(){return et(fetchInstance())}).then(function(){return xt(!0)})}).catch(function(Lt){var It;pt(!1);var Ot=(It=Lt.response)===null||It===void 0?void 0:It.data;(Ot==null?void 0:Ot.error)==="mfa_required"&&At(Ot.mfa_token)})};return at&&wt?_createRawReactElement(Redirect,{to:"/"}):Nt?_createRawReactElement(Redirect,{to:"/login?token=".concat(encodeURIComponent(Nt))}):_createRawReactElement("header",{"data-testid":"public-layout-header"},void 0,_createRawReactElement("nav",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8","aria-label":"Header"},void 0,_createRawReactElement("div",{className:"flex w-full items-center justify-between border-b border-indigo-500 py-6 lg:border-none"},void 0,_createRawReactElement("div",{className:"relative flex w-36 items-center sm:justify-center"},void 0,_createRawReactElement("div",{className:"absolute -left-6 -top-24 z-0 hidden md:block"},void 0,_createRawReactElement(Sonar,{})),_createRawReactElement(IconButton$1,{title:tt.formatMessage(messages$r.menu),src:vitePluginRequire_1697861803441_69297175,onClick:kt,className:"mr-4 bg-transparent text-gray-700 hover:text-gray-600 dark:text-gray-600 md:hidden"}),_createRawReactElement(Link$2,{to:"/",className:"z-10"},void 0,_createRawReactElement(SiteLogo,{alt:"Logo",className:"h-6 w-auto cursor-pointer"}),_createRawReactElement("span",{className:"hidden"},void 0,tt.formatMessage(messages$r.home)))),_createRawReactElement(HStack,{space:6,alignItems:"center",className:"relative z-10 ml-10"},void 0,_createRawReactElement(HStack,{alignItems:"center"},void 0,_createRawReactElement(HStack,{space:6,alignItems:"center",className:"hidden md:mr-6 md:flex"},void 0,ct.get("help")&&_createRawReactElement("a",{href:ct.get("help"),target:"_blank",className:"text-sm font-medium text-gray-700 hover:underline dark:text-gray-600"},void 0,_createRawReactElement(FormattedMessage$1,{id:"landing_page_modal.helpCenter",defaultMessage:"Help Center"}))),_createRawReactElement(HStack,{space:2,className:"shrink-0 xl:hidden"},void 0,_createRawReactElement(Button,{to:"/login",theme:"tertiary"},void 0,tt.formatMessage(messages$r.login)),st&&_createRawReactElement(Button,{to:"/signup",theme:"primary"},void 0,tt.formatMessage(messages$r.register)))),_createRawReactElement(Form,{className:"hidden items-center space-x-2 rtl:space-x-reverse xl:flex",onSubmit:Pt},void 0,_createRawReactElement(Input,{required:!0,value:Et,onChange:function(Dt){return yt(Dt.target.value.trim())},type:"text",placeholder:tt.formatMessage(nt.logInWithUsername?messages$r.username:messages$r.email),className:"max-w-[200px]",autoCorrect:"off",autoCapitalize:"off"}),_createRawReactElement(Input,{required:!0,value:St,onChange:function(Dt){return Rt(Dt.target.value)},type:"password",placeholder:tt.formatMessage(messages$r.password),className:"max-w-[200px]",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"}),_createRawReactElement(Link$2,{to:"/reset-password"},void 0,_createRawReactElement(Tooltip,{text:tt.formatMessage(messages$r.forgotPassword)},void 0,_createRawReactElement(IconButton$1,{src:vitePluginRequire_1697861800392_33646738,className:"cursor-pointer bg-transparent text-gray-700 hover:text-gray-800 dark:text-gray-600 dark:hover:text-gray-500",iconClassName:"h-5 w-5"}))),_createRawReactElement(Button,{theme:"primary",type:"submit",disabled:ft},void 0,tt.formatMessage(messages$r.login)))))))},PublicLayout=function _e(){var et=useAppSelector(function(tt){return isStandalone(tt)});return et?_createRawReactElement(Redirect,{to:"/login/external"}):_createRawReactElement("div",{className:"h-full"},void 0,_createRawReactElement(LandingGradient,{}),_createRawReactElement("div",{className:"flex h-screen flex-col"},void 0,_createRawReactElement("div",{className:"shrink-0"},void 0,_createRawReactElement(Header$1,{}),_createRawReactElement("div",{className:"relative"},void 0,_createRawReactElement(Switch,{},void 0,_createRawReactElement(Route$1,{exact:!0,path:"/",component:LandingPage}),_createRawReactElement(Route$1,{exact:!0,path:"/about/:slug?",component:AboutPage})))),_createRawReactElement(Footer,{})))};function _taggedTemplateLiteral(_e,et){return et||(et=_e.slice(0)),Object.freeze(Object.defineProperties(_e,{raw:{value:Object.freeze(et)}}))}const prefersReducedMotion=(()=>{let _e;return()=>{if(_e===void 0&&typeof window<"u"){const et=matchMedia("(prefers-reduced-motion: reduce)");_e=!et||et.matches}return _e}})();var _templateObject$1,_templateObject2;function ownKeys$6(_e,et){var tt=Object.keys(_e);if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(_e);et&&(nt=nt.filter(function(rt){return Object.getOwnPropertyDescriptor(_e,rt).enumerable})),tt.push.apply(tt,nt)}return tt}function _objectSpread$5(_e){for(var et=1;et=16,ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);function canTextBeChildOfNode$1(_e){return!ELEMENTS_WITH_NO_TEXT_CHILDREN.has(_e.name)}function returnFirstArg(_e){return _e}var utilities$3={PRESERVE_CUSTOM_ATTRIBUTES,ELEMENTS_WITH_NO_TEXT_CHILDREN,invertObject,isCustomComponent,setStyleProp:setStyleProp$1,canTextBeChildOfNode:canTextBeChildOfNode$1,returnFirstArg},reactProperty=lib,utilities$2=utilities$3,UNCONTROLLED_COMPONENT_ATTRIBUTES=["checked","value"],UNCONTROLLED_COMPONENT_NAMES=["input","select","textarea"],VALUE_ONLY_INPUTS={reset:!0,submit:!0},attributesToProps$2=function _e(et,tt){et=et||{};var nt,rt,at,it,ot,st={},ct=et.type&&VALUE_ONLY_INPUTS[et.type];for(nt in et){if(at=et[nt],reactProperty.isCustomAttribute(nt)){st[nt]=at;continue}if(rt=nt.toLowerCase(),it=getPropName(rt),it){switch(ot=reactProperty.getPropertyInfo(it),UNCONTROLLED_COMPONENT_ATTRIBUTES.indexOf(it)!==-1&&UNCONTROLLED_COMPONENT_NAMES.indexOf(tt)!==-1&&!ct&&(it=getPropName("default"+rt)),st[it]=at,ot&&ot.type){case reactProperty.BOOLEAN:st[it]=!0;break;case reactProperty.OVERLOADED_BOOLEAN:at===""&&(st[it]=!0);break}continue}utilities$2.PRESERVE_CUSTOM_ATTRIBUTES&&(st[nt]=at)}return utilities$2.setStyleProp(et.style,st),st};function getPropName(_e){return reactProperty.possibleStandardNames[_e]}var React=reactExports,attributesToProps$1=attributesToProps$2,utilities$1=utilities$3,setStyleProp=utilities$1.setStyleProp,canTextBeChildOfNode=utilities$1.canTextBeChildOfNode;function domToReact$2(_e,et){et=et||{};for(var tt=et.library||React,nt=tt.cloneElement,rt=tt.createElement,at=tt.isValidElement,it=[],ot,st,ct=typeof et.replace=="function",ut=et.transform||utilities$1.returnFirstArg,dt,ft,pt,mt=et.trim,ht=0,Et=_e.length;ht1&&(dt=nt(dt,{key:dt.key||ht})),it.push(ut(dt,ot,ht));continue}if(ot.type==="text"){if(st=!ot.data.trim().length,st&&ot.parent&&!canTextBeChildOfNode(ot.parent)||mt&&st)continue;it.push(ut(ot.data,ot,ht));continue}switch(ft=ot.attribs,skipAttributesToProps(ot)?setStyleProp(ft.style,ft):ft&&(ft=attributesToProps$1(ft,ot.name)),pt=null,ot.type){case"script":case"style":ot.children[0]&&(ft.dangerouslySetInnerHTML={__html:ot.children[0].data});break;case"tag":ot.name==="textarea"&&ot.children[0]?ft.defaultValue=ot.children[0].data:ot.children&&ot.children.length&&(pt=domToReact$2(ot.children,et));break;default:continue}Et>1&&(ft.key=ht),it.push(ut(rt(ot.name,ft,pt),ot,ht))}return it.length===1?it[0]:it}function skipAttributesToProps(_e){return utilities$1.PRESERVE_CUSTOM_ATTRIBUTES&&_e.type==="tag"&&utilities$1.isCustomComponent(_e.name,_e.attribs)}var domToReact_1=domToReact$2,domhandler=lib$2,htmlToDOM=htmlToDom,attributesToProps=attributesToProps$2,domToReact$1=domToReact_1;htmlToDOM=typeof htmlToDOM.default=="function"?htmlToDOM.default:htmlToDOM;var domParserOptions={lowerCaseAttributeNames:!1};function HTMLReactParser(_e,et){if(typeof _e!="string")throw new TypeError("First argument must be a string");return _e===""?[]:(et=et||{},domToReact$1(htmlToDOM(_e,et.htmlparser2||domParserOptions),et))}HTMLReactParser.domToReact=domToReact$1;HTMLReactParser.htmlToDOM=htmlToDOM;HTMLReactParser.attributesToProps=attributesToProps;HTMLReactParser.Comment=domhandler.Comment;HTMLReactParser.Element=domhandler.Element;HTMLReactParser.ProcessingInstruction=domhandler.ProcessingInstruction;HTMLReactParser.Text=domhandler.Text;var htmlReactParser=HTMLReactParser;HTMLReactParser.default=HTMLReactParser;const HTMLReactParser$1=getDefaultExportFromCjs$1(htmlReactParser);var domToReact=HTMLReactParser$1.domToReact;HTMLReactParser$1.htmlToDOM;HTMLReactParser$1.attributesToProps;HTMLReactParser$1.Comment;var Element$1=HTMLReactParser$1.Element;HTMLReactParser$1.ProcessingInstruction;HTMLReactParser$1.Text;const reactText=(_e,et=[])=>{if(!_e||typeof _e=="string"&&et.includes(_e))return"";if(typeof _e=="string")return _e;const tt=_e.props&&_e.props.children;return Array.isArray(tt)?tt.map(nt=>reactText(nt,et)).join(""):reactText(tt,et)},onlyEmoji=(_e,et=1,tt=!0)=>{var nt;if(!_e)return!1;try{if(tt&&(_e=_e.cloneNode(!0),_e.querySelectorAll("a.mention").forEach(it=>{var ot;return(ot=it.parentNode)==null?void 0:ot.removeChild(it)})),((nt=_e.textContent)==null?void 0:nt.replace(new RegExp(" ","g"),""))!=="")return!1;const rt=Array.from(_e.querySelectorAll("img.emojione"));return!(rt.length===0||rt.length>et||Array.from(_e.querySelectorAll("img")).length>rt.length)}catch(rt){return console.error(rt),!1}};var Link=function _e(et){return React$3.createElement(Link$2,_extends$4({},et,{className:"text-primary-600 hover:underline dark:text-accent-blue"}))},getAccount$1=makeGetAccount(),Mention=function _e(et){var tt=et.mention,nt=useAppSelector(function(it){return tt.id!==""?getAccount$1(it,tt.id):null}),rt=20,at="mention inline-block rounded-full bg-primary-200 text-primary-600 dark:bg-primary-800 dark:text-primary-400";return nt?_createRawReactElement(Link$2,{onClick:function(ot){return ot.stopPropagation()},to:"/@".concat(nt.acct),title:"@".concat(nt.fqn),className:clsx(at,"py-1 pl-1 pr-2")},void 0,_createRawReactElement(HoverRefWrapper,{accountId:nt.id,className:"inline-flex items-center align-top"},nt.id,_createRawReactElement(Avatar,{size:rt,src:nt.avatar,className:"mr-1.5 inline-flex items-center align-bottom"}),_createRawReactElement("span",{},void 0,"@",nt.acct))):_createRawReactElement(Link$2,{onClick:function(ot){return ot.stopPropagation()},to:"/@".concat(tt.acct),title:"@".concat(tt.acct),className:clsx(at,"px-2 py-1")},void 0,tt.id!==""?_createRawReactElement(HoverRefWrapper,{accountId:tt.id,className:"inline-flex items-center align-top"},tt.id,"@",tt.acct):React$3.createElement(React$3.Fragment,null,"@",tt.acct))};const POLL_VOTE_REQUEST="POLL_VOTE_REQUEST",POLL_VOTE_SUCCESS="POLL_VOTE_SUCCESS",POLL_VOTE_FAIL="POLL_VOTE_FAIL",POLL_FETCH_REQUEST="POLL_FETCH_REQUEST",POLL_FETCH_SUCCESS="POLL_FETCH_SUCCESS",POLL_FETCH_FAIL="POLL_FETCH_FAIL",vote=(_e,et)=>(tt,nt)=>{tt(voteRequest()),api(nt).post(`/api/v1/polls/${_e}/votes`,{choices:et}).then(({data:rt})=>{tt(importFetchedPoll(rt)),tt(voteSuccess(rt))}).catch(rt=>tt(voteFail(rt)))},fetchPoll=_e=>(et,tt)=>{et(fetchPollRequest()),api(tt).get(`/api/v1/polls/${_e}`).then(({data:nt})=>{et(importFetchedPoll(nt)),et(fetchPollSuccess(nt))}).catch(nt=>et(fetchPollFail(nt)))},voteRequest=()=>({type:POLL_VOTE_REQUEST}),voteSuccess=_e=>({type:POLL_VOTE_SUCCESS,poll:_e}),voteFail=_e=>({type:POLL_VOTE_FAIL,error:_e}),fetchPollRequest=()=>({type:POLL_FETCH_REQUEST}),fetchPollSuccess=_e=>({type:POLL_FETCH_SUCCESS,poll:_e}),fetchPollFail=_e=>({type:POLL_FETCH_FAIL,error:_e});var messages$F={closed:{id:"poll.closed",defaultMessage:"Closed"},nonAnonymous:{id:"poll.non_anonymous.label",defaultMessage:"Other instances may display the options you voted for"}},PollFooter=function _e(et){var tt,nt=et.poll,rt=et.showResults,at=et.selected,it=useAppDispatch(),ot=useIntl(),st=function(){return it(vote(nt.id,Object.keys(at)))},ct=function(pt){it(fetchPoll(nt.id)),pt.stopPropagation(),pt.preventDefault()},ut=null;nt.expires_at!==null&&(ut=nt.expired?ot.formatMessage(messages$F.closed):_createRawReactElement(RelativeTimestamp$1,{weight:"medium",timestamp:nt.expires_at,futureDate:!0}));var dt=_createRawReactElement(FormattedMessage$1,{id:"poll.total_votes",defaultMessage:"{count, plural, one {# vote} other {# votes}}",values:{count:nt.votes_count}});return _createRawReactElement(Stack,{space:4,"data-testid":"poll-footer"},void 0,!rt&&nt.multiple&&_createRawReactElement(Button,{onClick:st,theme:"primary",block:!0},void 0,_createRawReactElement(FormattedMessage$1,{id:"poll.vote",defaultMessage:"Vote"})),_createRawReactElement(HStack,{space:1.5,alignItems:"center",wrap:!0},void 0,((tt=nt.pleroma)===null||tt===void 0?void 0:tt.non_anonymous)&&React$3.createElement(React$3.Fragment,null,_createRawReactElement(Tooltip,{text:ot.formatMessage(messages$F.nonAnonymous)},void 0,_createRawReactElement(Text$2,{theme:"muted",weight:"medium"},void 0,_createRawReactElement(FormattedMessage$1,{id:"poll.non_anonymous",defaultMessage:"Public poll"}))),_createRawReactElement(Text$2,{theme:"muted"},void 0,"·")),rt&&React$3.createElement(React$3.Fragment,null,_createRawReactElement("button",{className:"text-gray-600 underline",onClick:ct,"data-testid":"poll-refresh"},void 0,_createRawReactElement(Text$2,{theme:"muted",weight:"medium"},void 0,_createRawReactElement(FormattedMessage$1,{id:"poll.refresh",defaultMessage:"Refresh"}))),_createRawReactElement(Text$2,{theme:"muted"},void 0,"·")),_createRawReactElement(Text$2,{theme:"muted",weight:"medium"},void 0,dt),ut!==null&&React$3.createElement(React$3.Fragment,null,_createRawReactElement(Text$2,{theme:"muted"},void 0,"·"),_createRawReactElement(Text$2,{weight:"medium",theme:"muted","data-testid":"poll-expiration"},void 0,ut))))};function ownKeys$9(_e,et){var tt=Object.keys(_e);if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(_e);et&&(nt=nt.filter(function(rt){return Object.getOwnPropertyDescriptor(_e,rt).enumerable})),tt.push.apply(tt,nt)}return tt}function _objectSpread$8(_e){for(var et=1;et=pt.votes_count});return _createRawReactElement("div",{},at.title,it?_createRawReactElement("div",{title:ut?dt:void 0},void 0,_createRawReactElement(HStack,{justifyContent:"between",alignItems:"center",className:"relative w-full overflow-hidden rounded-md bg-white p-2 dark:bg-primary-800"},void 0,_createRawReactElement(PollPercentageBar,{percent:ct,leading:ft}),_createRawReactElement("div",{className:"text-primary-600 dark:text-white"},void 0,_createRawReactElement(Text$2,{theme:"inherit",weight:"medium",dangerouslySetInnerHTML:{__html:at.title_emojified},className:"relative"})),_createRawReactElement(HStack,{space:2,alignItems:"center",className:"relative"},void 0,ut?_createRawReactElement(Icon$1,{src:vitePluginRequire_1697864677394_63753172,alt:ot.formatMessage(messages$E.voted),className:"h-4 w-4 text-primary-600 dark:fill-white dark:text-primary-800"}):_createRawReactElement("div",{className:"svg-icon"}),_createRawReactElement("div",{className:"text-primary-600 dark:text-white"},void 0,_createRawReactElement(Text$2,{weight:"medium",theme:"inherit"},void 0,rt.multiple?dt:"".concat(Math.round(ct),"%")))))):React$3.createElement(PollOptionText,_extends$4({percent:ct},et)))};function ownKeys$8(_e,et){var tt=Object.keys(_e);if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(_e);et&&(nt=nt.filter(function(rt){return Object.getOwnPropertyDescriptor(_e,rt).enumerable})),tt.push.apply(tt,nt)}return tt}function _objectSpread$7(_e){for(var et=1;etMAX_HEIGHT&&(dt(!0),ht(!0))},bt=function(){if(St.current){var Lt=onlyEmoji(St.current,BIG_EMOJI_LIMIT,!0);Lt!==vt&>(Lt)}};reactExports.useLayoutEffect(function(){$t()},[]),reactExports.useLayoutEffect(function(){bt()});var wt={replace:function(Lt){if(Lt instanceof Element$1&&["script","iframe"].includes(Lt.name))return null;if(Lt instanceof Element$1&&Lt.name==="a"){var It,Ot=((It=Lt.attribs.class)===null||It===void 0?void 0:It.split(" "))||[];if(Ot.includes("mention")){var Ut=tt.mentions.find(function(Xt){var Yt=Xt.url;return Lt.attribs.href===Yt});if(Ut)return _createRawReactElement(Mention,{mention:Ut});if(Lt.attribs.href){var jt=_toConsumableArray(Lt.attribs.href.matchAll(/^http(?:s)?:\/\/(\S+)\/@(\S+)/gm))[0];if(jt)return _createRawReactElement(Mention,{mention:{acct:"".concat(jt[2],"@").concat(jt[1]),url:Lt.attribs.href,id:"",username:""}})}}if(Ot.includes("hashtag")||Lt.attribs.href.match(/^http(?:s)?:\/\/\S*\/tags/)){var zt=Lt.attribs.dataTag;if(!zt){var Qt=domToReact(Lt.children);Array.isArray(Qt)?zt=Qt.map(function(Xt){return reactText(Xt,["#"])}).join(""):zt=typeof Qt=="string"?Qt.replace("#",""):void 0}if(zt)return _createRawReactElement(Link,{to:"/tags/".concat(zt)},void 0,"#",zt)}return React$3.createElement("a",_extends$4({},Lt.attribs,{onClick:function(Yt){return Yt.stopPropagation()},rel:"nofollow noopener",target:"_blank",title:Lt.attribs.href}),domToReact(Lt.children,wt))}}},xt=reactExports.useMemo(function(){return tt.contentHtml},[tt.contentHtml]);if(tt.content.length===0)return null;var Tt=tt.spoiler_text.length>0,Ct="text-gray-900 dark:text-gray-100 break-words text-ellipsis overflow-x-visible overflow-y-clip relative focus:outline-none",Nt=HTMLReactParser$1(xt,wt),At=isRtl(tt.search_index)?"rtl":"ltr",kt=clsx(Ct,{"cursor-pointer":nt,"whitespace-normal":Tt,"max-h-[300px]":mt,"leading-normal big-emoji":vt}),Pt=tt.poll&&typeof tt.poll=="string",Ft=[React$3.createElement(Markup,{ref:St,tabIndex:0,key:"content",className:kt,direction:At,lang:tt.language||void 0,size:ot},Nt)];return ut&&mt&&Ft.push(_createRawReactElement("div",{className:"flex w-full justify-center pt-2",role:"button",tabIndex:0,onClick:Rt},void 0,_createRawReactElement(Button,{type:"button",theme:"primary",size:"sm",icon:vitePluginRequire_1697864653845_56554064,onClick:Rt},void 0,_createRawReactElement(FormattedMessage$1,{id:"status.show_more",defaultMessage:"Show more"})))),Pt&&!mt&&Ft.push(_createRawReactElement(Poll,{id:tt.poll,status:tt.url},"poll")),ut&&!mt&&Ft.push(_createRawReactElement("div",{className:"flex w-full justify-center pt-2",role:"button",tabIndex:0,onClick:Rt},void 0,_createRawReactElement(Button,{type:"button",theme:"primary",size:"sm",icon:vitePluginRequire_1697864675597_425505,onClick:Rt},void 0,_createRawReactElement(FormattedMessage$1,{id:"status.show_less",defaultMessage:"Show less"})))),nt?_createRawReactElement("div",{className:clsx({"bg-gray-100 dark:bg-primary-800 rounded-md p-4":Pt})},void 0,Ft):React$3.createElement(React$3.Fragment,null,Ft)};const StatusContent$1=React$3.memo(StatusContent);var _excluded$7=["collapsable"],messages$C={cancel:{id:"reply_indicator.cancel",defaultMessage:"Cancel"},show:{id:"moderation_overlay.show_content",defaultMessage:"Show content"},hide:{id:"moderation_overlay.hide_content",defaultMessage:"Hide content"}},StatusContainer=function _e(et){var tt=et.contentOption,nt=et.hasMedia,rt=et.showMedia,at=et.isSensitive,it=et.additionalMediaCondition,ot=it===void 0?!0:it,st=et.quote,ct=et.compose,ut=et.onToggleMediaVisibility,dt=ut===void 0?function(){}:ut,ft=tt.status,pt=tt.translatable,mt=useIntl(),ht=useAppDispatch(),Et=ft.hidden,yt=function(){Et?ht(revealStatus(ft.id)):(ht(hideStatus(ft.id)),rt&&dt())},vt=function(wt){wt.stopPropagation(),yt()},gt=ft.spoiler_text,St=nt&&!gt,Rt=tt.collapsable,$t=_objectWithoutProperties(tt,_excluded$7);return _createRawReactElement("div",{className:"status-container"},void 0,at&>&&_createRawReactElement("div",{className:"pb-4"},void 0,_createRawReactElement(Text$2,{className:"line-clamp-6",size:tt.textSize,theme:"white",weight:"medium"},void 0,_createRawReactElement("span",{dangerouslySetInnerHTML:{__html:ft.spoilerHtml}}))),ft.event?_createRawReactElement(EventPreview,{status:ft,hideAction:!0}):_createRawReactElement("div",{className:"relative"},void 0,!St&&at&&Et&>&&_createRawReactElement("div",{className:"absolute z-[1] flex h-full w-full items-center justify-center",role:"button",tabIndex:0,onClick:vt},void 0,_createRawReactElement(Button,{type:"button",theme:"primary",size:"sm",icon:vitePluginRequire_1697864669798_42893661,onClick:vt},void 0,mt.formatMessage(messages$C.show))),_createRawReactElement(Stack,{className:clsx("relative z-0",{"max-h-24 overflow-x-visible overflow-y-clip blur-sm select-none pointer-events-none":!St&&at&&Et&>})},void 0,_createRawReactElement(Stack,{space:4},void 0,React$3.createElement(StatusContent$1,_extends$4({},$t,{collapsable:Rt&&!(at&>)})),pt&&_createRawReactElement(TranslateButton,{status:ft}),ot&&nt&&_createRawReactElement(StatusMedia,{status:ft,muted:ct,showMedia:rt,onToggleVisibility:dt}),st)),!St&&at&&!Et&>&&_createRawReactElement("div",{className:"flex w-full justify-center pt-2",role:"button",tabIndex:0,onClick:vt},void 0,_createRawReactElement(Button,{type:"button",theme:"primary",size:"sm",icon:vitePluginRequire_1697864669798_43594879,onClick:vt},void 0,mt.formatMessage(messages$C.hide)))))},_excluded$6=["children","className"],OutlineBox=function _e(et){var tt=et.children,nt=et.className,rt=_objectWithoutProperties(et,_excluded$6);return React$3.createElement("div",_extends$4({className:clsx("rounded-lg border border-solid border-gray-300 p-4 dark:border-gray-800",nt)},rt),tt)};const STATUS_HOVER_CARD_OPEN="STATUS_HOVER_CARD_OPEN",STATUS_HOVER_CARD_UPDATE="STATUS_HOVER_CARD_UPDATE",STATUS_HOVER_CARD_CLOSE="STATUS_HOVER_CARD_CLOSE",openStatusHoverCard=(_e,et)=>({type:STATUS_HOVER_CARD_OPEN,ref:_e,statusId:et}),updateStatusHoverCard=()=>({type:STATUS_HOVER_CARD_UPDATE}),closeStatusHoverCard=(_e=!1)=>({type:STATUS_HOVER_CARD_CLOSE,force:_e});var showStatusHoverCard=debounce$2(function(_e,et,tt){_e(openStatusHoverCard(et,tt))},300),HoverStatusWrapper=function _e(et){var tt=et.statusId,nt=et.children,rt=et.inline,at=rt===void 0?!1:rt,it=et.className,ot=useDispatch(),st=reactExports.useRef(null),ct=at?"span":"div",ut=function(){isMobile(window.innerWidth)||showStatusHoverCard(ot,st,tt)},dt=function(){showStatusHoverCard.cancel(),setTimeout(function(){return ot(closeStatusHoverCard())},200)},ft=function(){showStatusHoverCard.cancel(),ot(closeStatusHoverCard(!0))};return React$3.createElement(ct,{ref:st,className:clsx("hover-status-wrapper",it),onMouseEnter:ut,onMouseLeave:dt,onClick:ft},nt)};const isPubkey=_e=>/^[0-9a-f]{64}$/i.test(_e);var StatusReplyMentions=function _e(et){var tt=et.status,nt=et.hoverable,rt=nt===void 0?!0:nt,at=useAppDispatch(),it=function(ut){ut.stopPropagation();var dt=tt.account;at(openModal("MENTIONS",{username:dt.acct,statusId:tt.id}))};if(!tt.in_reply_to_id)return null;var ot=tt.mentions;if(ot.size===0)return _createRawReactElement("div",{className:"reply-mentions"},void 0,_createRawReactElement(FormattedMessage$1,{id:"reply_mentions.reply_empty",defaultMessage:"Replying to post"}));var st=ot.slice(0,2).map(function(ct){var ut=_createRawReactElement(Link$2,{to:"/@".concat(ct.acct),className:"reply-mentions__account max-w-[200px] truncate align-bottom",onClick:function(ft){return ft.stopPropagation()}},ct.id,"@",isPubkey(ct.username)?ct.username.slice(0,8):ct.username);return rt?_createRawReactElement(HoverRefWrapper,{accountId:ct.id,inline:!0},ct.id,ut):ut}).toArray();return ot.size>2&&st.push(_createRawReactElement("span",{className:"cursor-pointer hover:underline",role:"button",onClick:it,tabIndex:0},"more",_createRawReactElement(FormattedMessage$1,{id:"reply_mentions.more",defaultMessage:"{count} more",values:{count:ot.size-2}}))),_createRawReactElement("div",{className:"reply-mentions"},void 0,_createRawReactElement(FormattedMessage$1,{id:"reply_mentions.reply.hoverable",defaultMessage:"Replying to {accounts}",values:{accounts:_createRawReactElement(FormattedList,{type:"conjunction",value:st}),hover:function(ut){return rt?_createRawReactElement(HoverStatusWrapper,{statusId:tt.in_reply_to_id,inline:!0},void 0,_createRawReactElement("span",{className:"cursor-pointer hover:underline",role:"presentation"},"hoverstatus",ut)):ut}}}))},messages$B={cancel:{id:"reply_indicator.cancel",defaultMessage:"Cancel"},show:{id:"moderation_overlay.show_content",defaultMessage:"Show content"},hide:{id:"moderation_overlay.hide_content",defaultMessage:"Hide content"}},QuotedStatus=function _e(et){var tt=et.status,nt=et.onCancel,rt=et.compose,at=useIntl(),it=useHistory(),ot=useSettings(),st=ot.get("showSensitiveMedia"),ct=reactExports.useState(defaultMediaVisibility(tt,st)),ut=_slicedToArray$4(ct,2),dt=ut[0],ft=ut[1],pt=function(gt){if(tt){var St=tt.account;if(!rt&>.button===0){var Rt="/@".concat(St.acct,"/posts/").concat(tt.id);gt.ctrlKey||gt.metaKey?window.open(Rt,"_blank"):it.push(Rt),gt.stopPropagation(),gt.preventDefault()}}},mt=function(){nt&&nt()},ht=function(){ft(!dt)};if(!tt)return null;var Et=tt.account,yt={};return nt&&(yt={onActionClick:mt,actionIcon:vitePluginRequire_1697864655763_93677134,actionAlignment:"top",actionTitle:at.formatMessage(messages$B.cancel)}),_createRawReactElement(OutlineBox,{"data-testid":"quoted-status",className:clsx("cursor-pointer",{"hover:bg-gray-100 dark:hover:bg-gray-800":!rt})},void 0,_createRawReactElement(Stack,{space:2,onClick:pt},void 0,React$3.createElement(AccountContainer,_extends$4({},yt,{id:Et.id,timestamp:tt.created_at,withRelationship:!1,showProfileHoverCard:!rt,withLinkToProfile:!rt})),_createRawReactElement(StatusReplyMentions,{status:tt,hoverable:!1}),_createRawReactElement(StatusContainer,{showMedia:dt,isSensitive:tt.sensitive,onToggleMediaVisibility:ht,hasMedia:tt.media_attachments.size>0,contentOption:{status:tt,collapsable:!0}})))},Tombstone=function _e(et){return et.id,et.onMoveUp,et.onMoveDown,_createRawReactElement("div",{className:"h-16"},void 0,_createRawReactElement("div",{className:"focusable flex h-[42px] items-center justify-center rounded-lg border-2 border-gray-200 text-center dark:border-gray-800"},void 0,_createRawReactElement(Text$2,{theme:"muted"},void 0,_createRawReactElement(FormattedMessage$1,{id:"statuses.tombstone",defaultMessage:"One or more posts are unavailable."}))))},QuotedStatusContainer$1=function _e(et){var tt=et.statusId,nt=reactExports.useCallback(makeGetStatus(),[]),rt=useAppSelector(function(at){return nt(at,{id:tt})});return rt?rt.tombstone?_createRawReactElement(Tombstone,{id:rt.id}):_createRawReactElement(QuotedStatus,{status:rt}):null};const vitePluginRequire_1697864652991_23502217="/packs/assets/upload-78adfb93.svg",vitePluginRequire_1697864662114_95105940="/packs/assets/thumb-down-a65cd7fe.svg",vitePluginRequire_1697864663407_53967501="/packs/assets/star-d5853b0b.svg",vitePluginRequire_1697864662114_99624718="/packs/assets/thumb-up-9f748bd1.svg",vitePluginRequire_1697864662114_58073131="/packs/assets/message-circle-2-46d03d0e.svg",vitePluginRequire_1697864655029_78731624="/packs/assets/quote-98b4789c.svg",vitePluginRequire_1697864655871_30959129="/packs/assets/lock-78f1ab9b.svg",vitePluginRequire_1697864655029_52560061="/packs/assets/mail-6305d0d8.svg",vitePluginRequire_1697864655029_60412658="/packs/assets/alert-triangle-097e7c76.svg",vitePluginRequire_1697864655029_83692644="/packs/assets/gavel-fb282a59.svg",vitePluginRequire_1697864655029_81075629="/packs/assets/flag-246ad051.svg",vitePluginRequire_1697864651438_47563443="/packs/assets/volume-3-258a22f7.svg",vitePluginRequire_1697864655029_28864811="/packs/assets/messages-ab62d88e.svg",vitePluginRequire_1697864653820_86193028="/packs/assets/edit-5e8dc169.svg",vitePluginRequire_1697864669798_95052990="/packs/assets/pin-f98409a9.svg",vitePluginRequire_1697864655029_22990100="/packs/assets/pinned-off-bb83f58a.svg",vitePluginRequire_1697864662112_43053577="/packs/assets/bell-off-e5234858.svg",vitePluginRequire_1697864673476_47296655="/packs/assets/bell-22e4fc2a.svg",vitePluginRequire_1697864655029_20168574="/packs/assets/bookmark-278aca9e.svg",vitePluginRequire_1697864655029_64566499="/packs/assets/bookmark-off-594880a2.svg",vitePluginRequire_1697864669816_57605756="/packs/assets/share-a19db25c.svg",vitePluginRequire_1697864661780_99413139="/packs/assets/clipboard-copy-b7f89476.svg",vitePluginRequire_1697864662112_61530411="/packs/assets/arrows-vertical-2f0457e2.svg";var aCallable=aCallable$b,toObject$1=toObject$e,IndexedObject=indexedObject,lengthOfArrayLike$1=lengthOfArrayLike$b,$TypeError=TypeError,createMethod=function(_e){return function(et,tt,nt,rt){aCallable(tt);var at=toObject$1(et),it=IndexedObject(at),ot=lengthOfArrayLike$1(at),st=_e?ot-1:0,ct=_e?-1:1;if(nt<2)for(;;){if(st in it){rt=it[st],st+=ct;break}if(st+=ct,_e?st<0:ot<=st)throw $TypeError("Reduce of empty array with no initial value")}for(;_e?st>=0:ot>st;st+=ct)st in it&&(rt=tt(rt,it[st],st,at));return rt}},arrayReduce={left:createMethod(!1),right:createMethod(!0)},$$2=_export,$reduce=arrayReduce.left,arrayMethodIsStrict=arrayMethodIsStrict$4,CHROME_VERSION=engineV8Version,IS_NODE=engineIsNode,CHROME_BUG=!IS_NODE&&CHROME_VERSION>79&&CHROME_VERSION<83,FORCED$1=CHROME_BUG||!arrayMethodIsStrict("reduce");$$2({target:"Array",proto:!0,forced:FORCED$1},{reduce:function _e(et){var tt=arguments.length;return $reduce(this,et,tt,tt>1?arguments[1]:void 0)}});const REBLOG_REQUEST="REBLOG_REQUEST",REBLOG_SUCCESS="REBLOG_SUCCESS",REBLOG_FAIL="REBLOG_FAIL",FAVOURITE_REQUEST="FAVOURITE_REQUEST",FAVOURITE_SUCCESS="FAVOURITE_SUCCESS",FAVOURITE_FAIL="FAVOURITE_FAIL",DISLIKE_REQUEST="DISLIKE_REQUEST",DISLIKE_SUCCESS="DISLIKE_SUCCESS",DISLIKE_FAIL="DISLIKE_FAIL",UNREBLOG_REQUEST="UNREBLOG_REQUEST",UNREBLOG_SUCCESS="UNREBLOG_SUCCESS",UNREBLOG_FAIL="UNREBLOG_FAIL",UNFAVOURITE_REQUEST="UNFAVOURITE_REQUEST",UNFAVOURITE_SUCCESS="UNFAVOURITE_SUCCESS",UNFAVOURITE_FAIL="UNFAVOURITE_FAIL",UNDISLIKE_REQUEST="UNDISLIKE_REQUEST",UNDISLIKE_SUCCESS="UNDISLIKE_SUCCESS",UNDISLIKE_FAIL="UNDISLIKE_FAIL",REBLOGS_FETCH_REQUEST="REBLOGS_FETCH_REQUEST",REBLOGS_FETCH_SUCCESS="REBLOGS_FETCH_SUCCESS",REBLOGS_FETCH_FAIL="REBLOGS_FETCH_FAIL",FAVOURITES_FETCH_REQUEST="FAVOURITES_FETCH_REQUEST",FAVOURITES_FETCH_SUCCESS="FAVOURITES_FETCH_SUCCESS",FAVOURITES_FETCH_FAIL="FAVOURITES_FETCH_FAIL",DISLIKES_FETCH_REQUEST="DISLIKES_FETCH_REQUEST",DISLIKES_FETCH_SUCCESS="DISLIKES_FETCH_SUCCESS",DISLIKES_FETCH_FAIL="DISLIKES_FETCH_FAIL",REACTIONS_FETCH_REQUEST="REACTIONS_FETCH_REQUEST",REACTIONS_FETCH_SUCCESS="REACTIONS_FETCH_SUCCESS",REACTIONS_FETCH_FAIL="REACTIONS_FETCH_FAIL",PIN_REQUEST="PIN_REQUEST",PIN_SUCCESS="PIN_SUCCESS",PIN_FAIL="PIN_FAIL",UNPIN_REQUEST="UNPIN_REQUEST",UNPIN_SUCCESS="UNPIN_SUCCESS",UNPIN_FAIL="UNPIN_FAIL",BOOKMARK_REQUEST="BOOKMARK_REQUEST",BOOKMARK_SUCCESS="BOOKMARKED_SUCCESS",BOOKMARK_FAIL="BOOKMARKED_FAIL",UNBOOKMARK_REQUEST="UNBOOKMARKED_REQUEST",UNBOOKMARK_SUCCESS="UNBOOKMARKED_SUCCESS",UNBOOKMARK_FAIL="UNBOOKMARKED_FAIL",REMOTE_INTERACTION_REQUEST="REMOTE_INTERACTION_REQUEST",REMOTE_INTERACTION_SUCCESS="REMOTE_INTERACTION_SUCCESS",REMOTE_INTERACTION_FAIL="REMOTE_INTERACTION_FAIL",FAVOURITES_EXPAND_SUCCESS="FAVOURITES_EXPAND_SUCCESS",FAVOURITES_EXPAND_FAIL="FAVOURITES_EXPAND_FAIL",REBLOGS_EXPAND_SUCCESS="REBLOGS_EXPAND_SUCCESS",REBLOGS_EXPAND_FAIL="REBLOGS_EXPAND_FAIL",messages$A={bookmarkAdded:{id:"status.bookmarked",defaultMessage:"Bookmark added."},bookmarkRemoved:{id:"status.unbookmarked",defaultMessage:"Bookmark removed."},view:{id:"toast.view",defaultMessage:"View"}},reblog=_e=>function(et,tt){isLoggedIn(tt)&&(et(reblogRequest(_e)),api(tt).post(`/api/v1/statuses/${_e.id}/reblog`).then(function(nt){et(importFetchedStatus(nt.data.reblog)),et(reblogSuccess(_e))}).catch(nt=>{et(reblogFail(_e,nt))}))},unreblog=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(unreblogRequest(_e)),api(tt).post(`/api/v1/statuses/${_e.id}/unreblog`).then(()=>{et(unreblogSuccess(_e))}).catch(nt=>{et(unreblogFail(_e,nt))}))},toggleReblog=_e=>et=>{_e.reblogged?et(unreblog(_e)):et(reblog(_e))},reblogRequest=_e=>({type:REBLOG_REQUEST,status:_e,skipLoading:!0}),reblogSuccess=_e=>({type:REBLOG_SUCCESS,status:_e,skipLoading:!0}),reblogFail=(_e,et)=>({type:REBLOG_FAIL,status:_e,error:et,skipLoading:!0}),unreblogRequest=_e=>({type:UNREBLOG_REQUEST,status:_e,skipLoading:!0}),unreblogSuccess=_e=>({type:UNREBLOG_SUCCESS,status:_e,skipLoading:!0}),unreblogFail=(_e,et)=>({type:UNREBLOG_FAIL,status:_e,error:et,skipLoading:!0}),favourite=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(favouriteRequest(_e)),api(tt).post(`/api/v1/statuses/${_e.id}/favourite`).then(function(nt){et(favouriteSuccess(_e))}).catch(function(nt){et(favouriteFail(_e,nt))}))},unfavourite=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(unfavouriteRequest(_e)),api(tt).post(`/api/v1/statuses/${_e.id}/unfavourite`).then(()=>{et(unfavouriteSuccess(_e))}).catch(nt=>{et(unfavouriteFail(_e,nt))}))},toggleFavourite=_e=>et=>{_e.favourited?et(unfavourite(_e)):et(favourite(_e))},favouriteRequest=_e=>({type:FAVOURITE_REQUEST,status:_e,skipLoading:!0}),favouriteSuccess=_e=>({type:FAVOURITE_SUCCESS,status:_e,skipLoading:!0}),favouriteFail=(_e,et)=>({type:FAVOURITE_FAIL,status:_e,error:et,skipLoading:!0}),unfavouriteRequest=_e=>({type:UNFAVOURITE_REQUEST,status:_e,skipLoading:!0}),unfavouriteSuccess=_e=>({type:UNFAVOURITE_SUCCESS,status:_e,skipLoading:!0}),unfavouriteFail=(_e,et)=>({type:UNFAVOURITE_FAIL,status:_e,error:et,skipLoading:!0}),dislike=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(dislikeRequest(_e)),api(tt).post(`/api/friendica/statuses/${_e.id}/dislike`).then(function(){et(dislikeSuccess(_e))}).catch(function(nt){et(dislikeFail(_e,nt))}))},undislike=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(undislikeRequest(_e)),api(tt).post(`/api/friendica/statuses/${_e.id}/undislike`).then(()=>{et(undislikeSuccess(_e))}).catch(nt=>{et(undislikeFail(_e,nt))}))},toggleDislike=_e=>et=>{_e.disliked?et(undislike(_e)):et(dislike(_e))},dislikeRequest=_e=>({type:DISLIKE_REQUEST,status:_e,skipLoading:!0}),dislikeSuccess=_e=>({type:DISLIKE_SUCCESS,status:_e,skipLoading:!0}),dislikeFail=(_e,et)=>({type:DISLIKE_FAIL,status:_e,error:et,skipLoading:!0}),undislikeRequest=_e=>({type:UNDISLIKE_REQUEST,status:_e,skipLoading:!0}),undislikeSuccess=_e=>({type:UNDISLIKE_SUCCESS,status:_e,skipLoading:!0}),undislikeFail=(_e,et)=>({type:UNDISLIKE_FAIL,status:_e,error:et,skipLoading:!0}),bookmark=_e=>(et,tt)=>{et(bookmarkRequest(_e)),api(tt).post(`/api/v1/statuses/${_e.id}/bookmark`).then(function(nt){et(importFetchedStatus(nt.data)),et(bookmarkSuccess(_e,nt.data)),toast.success(messages$A.bookmarkAdded,{actionLabel:messages$A.view,actionLink:"/bookmarks"})}).catch(function(nt){et(bookmarkFail(_e,nt))})},unbookmark=_e=>(et,tt)=>{et(unbookmarkRequest(_e)),api(tt).post(`/api/v1/statuses/${_e.id}/unbookmark`).then(nt=>{et(importFetchedStatus(nt.data)),et(unbookmarkSuccess(_e,nt.data)),toast.success(messages$A.bookmarkRemoved)}).catch(nt=>{et(unbookmarkFail(_e,nt))})},toggleBookmark=_e=>(et,tt)=>{_e.bookmarked?et(unbookmark(_e)):et(bookmark(_e))},bookmarkRequest=_e=>({type:BOOKMARK_REQUEST,status:_e}),bookmarkSuccess=(_e,et)=>({type:BOOKMARK_SUCCESS,status:_e,response:et}),bookmarkFail=(_e,et)=>({type:BOOKMARK_FAIL,status:_e,error:et}),unbookmarkRequest=_e=>({type:UNBOOKMARK_REQUEST,status:_e}),unbookmarkSuccess=(_e,et)=>({type:UNBOOKMARK_SUCCESS,status:_e,response:et}),unbookmarkFail=(_e,et)=>({type:UNBOOKMARK_FAIL,status:_e,error:et}),fetchReblogs=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(fetchReblogsRequest(_e)),api(tt).get(`/api/v1/statuses/${_e}/reblogged_by`).then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");et(importFetchedAccounts(nt.data)),et(fetchRelationships(nt.data.map(at=>at.id))),et(fetchReblogsSuccess(_e,nt.data,rt?rt.uri:null))}).catch(nt=>{et(fetchReblogsFail(_e,nt))}))},fetchReblogsRequest=_e=>({type:REBLOGS_FETCH_REQUEST,id:_e}),fetchReblogsSuccess=(_e,et,tt)=>({type:REBLOGS_FETCH_SUCCESS,id:_e,accounts:et,next:tt}),fetchReblogsFail=(_e,et)=>({type:REBLOGS_FETCH_FAIL,id:_e,error:et}),expandReblogs=(_e,et)=>(tt,nt)=>{api(nt).get(et).then(rt=>{const at=getLinks(rt).refs.find(it=>it.rel==="next");tt(importFetchedAccounts(rt.data)),tt(fetchRelationships(rt.data.map(it=>it.id))),tt(expandReblogsSuccess(_e,rt.data,at?at.uri:null))}).catch(rt=>{tt(expandReblogsFail(_e,rt))})},expandReblogsSuccess=(_e,et,tt)=>({type:REBLOGS_EXPAND_SUCCESS,id:_e,accounts:et,next:tt}),expandReblogsFail=(_e,et)=>({type:REBLOGS_EXPAND_FAIL,id:_e,error:et}),fetchFavourites=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(fetchFavouritesRequest(_e)),api(tt).get(`/api/v1/statuses/${_e}/favourited_by`).then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");et(importFetchedAccounts(nt.data)),et(fetchRelationships(nt.data.map(at=>at.id))),et(fetchFavouritesSuccess(_e,nt.data,rt?rt.uri:null))}).catch(nt=>{et(fetchFavouritesFail(_e,nt))}))},fetchFavouritesRequest=_e=>({type:FAVOURITES_FETCH_REQUEST,id:_e}),fetchFavouritesSuccess=(_e,et,tt)=>({type:FAVOURITES_FETCH_SUCCESS,id:_e,accounts:et,next:tt}),fetchFavouritesFail=(_e,et)=>({type:FAVOURITES_FETCH_FAIL,id:_e,error:et}),expandFavourites=(_e,et)=>(tt,nt)=>{api(nt).get(et).then(rt=>{const at=getLinks(rt).refs.find(it=>it.rel==="next");tt(importFetchedAccounts(rt.data)),tt(fetchRelationships(rt.data.map(it=>it.id))),tt(expandFavouritesSuccess(_e,rt.data,at?at.uri:null))}).catch(rt=>{tt(expandFavouritesFail(_e,rt))})},expandFavouritesSuccess=(_e,et,tt)=>({type:FAVOURITES_EXPAND_SUCCESS,id:_e,accounts:et,next:tt}),expandFavouritesFail=(_e,et)=>({type:FAVOURITES_EXPAND_FAIL,id:_e,error:et}),fetchDislikes=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(fetchDislikesRequest(_e)),api(tt).get(`/api/friendica/statuses/${_e}/disliked_by`).then(nt=>{et(importFetchedAccounts(nt.data)),et(fetchRelationships(nt.data.map(rt=>rt.id))),et(fetchDislikesSuccess(_e,nt.data))}).catch(nt=>{et(fetchDislikesFail(_e,nt))}))},fetchDislikesRequest=_e=>({type:DISLIKES_FETCH_REQUEST,id:_e}),fetchDislikesSuccess=(_e,et)=>({type:DISLIKES_FETCH_SUCCESS,id:_e,accounts:et}),fetchDislikesFail=(_e,et)=>({type:DISLIKES_FETCH_FAIL,id:_e,error:et}),fetchReactions=_e=>(et,tt)=>{et(fetchReactionsRequest(_e)),api(tt).get(`/api/v1/pleroma/statuses/${_e}/reactions`).then(nt=>{et(importFetchedAccounts(nt.data.map(({accounts:rt})=>rt).flat())),et(fetchReactionsSuccess(_e,nt.data))}).catch(nt=>{et(fetchReactionsFail(_e,nt))})},fetchReactionsRequest=_e=>({type:REACTIONS_FETCH_REQUEST,id:_e}),fetchReactionsSuccess=(_e,et)=>({type:REACTIONS_FETCH_SUCCESS,id:_e,reactions:et}),fetchReactionsFail=(_e,et)=>({type:REACTIONS_FETCH_FAIL,id:_e,error:et}),pin=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(pinRequest(_e)),api(tt).post(`/api/v1/statuses/${_e.id}/pin`).then(nt=>{et(importFetchedStatus(nt.data)),et(pinSuccess(_e))}).catch(nt=>{et(pinFail(_e,nt))}))},pinToGroup=(_e,et)=>(tt,nt)=>api(nt).post(`/api/v1/groups/${et.id}/statuses/${_e.id}/pin`).then(()=>tt(expandGroupFeaturedTimeline(et.id))),unpinFromGroup=(_e,et)=>(tt,nt)=>api(nt).post(`/api/v1/groups/${et.id}/statuses/${_e.id}/unpin`).then(()=>tt(expandGroupFeaturedTimeline(et.id))),pinRequest=_e=>({type:PIN_REQUEST,status:_e,skipLoading:!0}),pinSuccess=_e=>({type:PIN_SUCCESS,status:_e,skipLoading:!0}),pinFail=(_e,et)=>({type:PIN_FAIL,status:_e,error:et,skipLoading:!0}),unpin=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(unpinRequest(_e)),api(tt).post(`/api/v1/statuses/${_e.id}/unpin`).then(nt=>{et(importFetchedStatus(nt.data)),et(unpinSuccess(_e))}).catch(nt=>{et(unpinFail(_e,nt))}))},togglePin=_e=>(et,tt)=>{_e.pinned?et(unpin(_e)):et(pin(_e))},unpinRequest=_e=>({type:UNPIN_REQUEST,status:_e,skipLoading:!0}),unpinSuccess=_e=>({type:UNPIN_SUCCESS,status:_e,skipLoading:!0}),unpinFail=(_e,et)=>({type:UNPIN_FAIL,status:_e,error:et,skipLoading:!0}),remoteInteraction=(_e,et)=>(tt,nt)=>(tt(remoteInteractionRequest(_e,et)),api(nt).post("/api/v1/pleroma/remote_interaction",{ap_id:_e,profile:et}).then(({data:rt})=>{if(rt.error)throw new Error(rt.error);return tt(remoteInteractionSuccess(_e,et,rt.url)),rt.url}).catch(rt=>{throw tt(remoteInteractionFail(_e,et,rt)),rt})),remoteInteractionRequest=(_e,et)=>({type:REMOTE_INTERACTION_REQUEST,ap_id:_e,profile:et}),remoteInteractionSuccess=(_e,et,tt)=>({type:REMOTE_INTERACTION_SUCCESS,ap_id:_e,profile:et,url:tt}),remoteInteractionFail=(_e,et,tt)=>({type:REMOTE_INTERACTION_FAIL,ap_id:_e,profile:et,error:tt}),vitePluginRequire_1697864669750_76363491="/packs/assets/user-minus-f6f109c6.svg",vitePluginRequire_1697864664704_86852148="/packs/assets/user-off-f3bc1ad5.svg",tagToBadge=_e=>`badge:${_e}`,badgeToTag=_e=>_e.replace(/^badge:/,""),getTagDiff=(_e,et)=>{const tt=OrderedSet(_e),nt=OrderedSet(et);return{added:nt.subtract(tt).toArray(),removed:tt.subtract(nt).toArray()}},filterBadges=_e=>_e.filter(et=>et.startsWith("badge:")),getBadges=_e=>{var tt;const et=((tt=_e==null?void 0:_e.pleroma)==null?void 0:tt.tags)??[];return filterBadges(et)},ADMIN_CONFIG_FETCH_REQUEST="ADMIN_CONFIG_FETCH_REQUEST",ADMIN_CONFIG_FETCH_SUCCESS="ADMIN_CONFIG_FETCH_SUCCESS",ADMIN_CONFIG_FETCH_FAIL="ADMIN_CONFIG_FETCH_FAIL",ADMIN_CONFIG_UPDATE_REQUEST="ADMIN_CONFIG_UPDATE_REQUEST",ADMIN_CONFIG_UPDATE_SUCCESS="ADMIN_CONFIG_UPDATE_SUCCESS",ADMIN_CONFIG_UPDATE_FAIL="ADMIN_CONFIG_UPDATE_FAIL",ADMIN_REPORTS_FETCH_REQUEST="ADMIN_REPORTS_FETCH_REQUEST",ADMIN_REPORTS_FETCH_SUCCESS="ADMIN_REPORTS_FETCH_SUCCESS",ADMIN_REPORTS_FETCH_FAIL="ADMIN_REPORTS_FETCH_FAIL",ADMIN_REPORTS_PATCH_REQUEST="ADMIN_REPORTS_PATCH_REQUEST",ADMIN_REPORTS_PATCH_SUCCESS="ADMIN_REPORTS_PATCH_SUCCESS",ADMIN_REPORTS_PATCH_FAIL="ADMIN_REPORTS_PATCH_FAIL",ADMIN_USERS_FETCH_REQUEST="ADMIN_USERS_FETCH_REQUEST",ADMIN_USERS_FETCH_SUCCESS="ADMIN_USERS_FETCH_SUCCESS",ADMIN_USERS_FETCH_FAIL="ADMIN_USERS_FETCH_FAIL",ADMIN_USERS_DELETE_REQUEST="ADMIN_USERS_DELETE_REQUEST",ADMIN_USERS_DELETE_SUCCESS="ADMIN_USERS_DELETE_SUCCESS",ADMIN_USERS_DELETE_FAIL="ADMIN_USERS_DELETE_FAIL",ADMIN_USERS_APPROVE_REQUEST="ADMIN_USERS_APPROVE_REQUEST",ADMIN_USERS_APPROVE_SUCCESS="ADMIN_USERS_APPROVE_SUCCESS",ADMIN_USERS_APPROVE_FAIL="ADMIN_USERS_APPROVE_FAIL",ADMIN_USERS_DEACTIVATE_REQUEST="ADMIN_USERS_DEACTIVATE_REQUEST",ADMIN_USERS_DEACTIVATE_SUCCESS="ADMIN_USERS_DEACTIVATE_SUCCESS",ADMIN_USERS_DEACTIVATE_FAIL="ADMIN_USERS_DEACTIVATE_FAIL",ADMIN_STATUS_DELETE_REQUEST="ADMIN_STATUS_DELETE_REQUEST",ADMIN_STATUS_DELETE_SUCCESS="ADMIN_STATUS_DELETE_SUCCESS",ADMIN_STATUS_DELETE_FAIL="ADMIN_STATUS_DELETE_FAIL",ADMIN_STATUS_TOGGLE_SENSITIVITY_REQUEST="ADMIN_STATUS_TOGGLE_SENSITIVITY_REQUEST",ADMIN_STATUS_TOGGLE_SENSITIVITY_SUCCESS="ADMIN_STATUS_TOGGLE_SENSITIVITY_SUCCESS",ADMIN_STATUS_TOGGLE_SENSITIVITY_FAIL="ADMIN_STATUS_TOGGLE_SENSITIVITY_FAIL",ADMIN_LOG_FETCH_REQUEST="ADMIN_LOG_FETCH_REQUEST",ADMIN_LOG_FETCH_SUCCESS="ADMIN_LOG_FETCH_SUCCESS",ADMIN_LOG_FETCH_FAIL="ADMIN_LOG_FETCH_FAIL",ADMIN_USERS_TAG_REQUEST="ADMIN_USERS_TAG_REQUEST",ADMIN_USERS_TAG_SUCCESS="ADMIN_USERS_TAG_SUCCESS",ADMIN_USERS_TAG_FAIL="ADMIN_USERS_TAG_FAIL",ADMIN_USERS_UNTAG_REQUEST="ADMIN_USERS_UNTAG_REQUEST",ADMIN_USERS_UNTAG_SUCCESS="ADMIN_USERS_UNTAG_SUCCESS",ADMIN_USERS_UNTAG_FAIL="ADMIN_USERS_UNTAG_FAIL",ADMIN_ADD_PERMISSION_GROUP_REQUEST="ADMIN_ADD_PERMISSION_GROUP_REQUEST",ADMIN_ADD_PERMISSION_GROUP_SUCCESS="ADMIN_ADD_PERMISSION_GROUP_SUCCESS",ADMIN_ADD_PERMISSION_GROUP_FAIL="ADMIN_ADD_PERMISSION_GROUP_FAIL",ADMIN_REMOVE_PERMISSION_GROUP_REQUEST="ADMIN_REMOVE_PERMISSION_GROUP_REQUEST",ADMIN_REMOVE_PERMISSION_GROUP_SUCCESS="ADMIN_REMOVE_PERMISSION_GROUP_SUCCESS",ADMIN_REMOVE_PERMISSION_GROUP_FAIL="ADMIN_REMOVE_PERMISSION_GROUP_FAIL",ADMIN_USER_INDEX_EXPAND_FAIL="ADMIN_USER_INDEX_EXPAND_FAIL",ADMIN_USER_INDEX_EXPAND_REQUEST="ADMIN_USER_INDEX_EXPAND_REQUEST",ADMIN_USER_INDEX_EXPAND_SUCCESS="ADMIN_USER_INDEX_EXPAND_SUCCESS",ADMIN_USER_INDEX_FETCH_FAIL="ADMIN_USER_INDEX_FETCH_FAIL",ADMIN_USER_INDEX_FETCH_REQUEST="ADMIN_USER_INDEX_FETCH_REQUEST",ADMIN_USER_INDEX_FETCH_SUCCESS="ADMIN_USER_INDEX_FETCH_SUCCESS",ADMIN_USER_INDEX_QUERY_SET="ADMIN_USER_INDEX_QUERY_SET",ADMIN_ANNOUNCEMENTS_FETCH_FAIL="ADMIN_ANNOUNCEMENTS_FETCH_FAILS",ADMIN_ANNOUNCEMENTS_FETCH_REQUEST="ADMIN_ANNOUNCEMENTS_FETCH_REQUEST",ADMIN_ANNOUNCEMENTS_FETCH_SUCCESS="ADMIN_ANNOUNCEMENTS_FETCH_SUCCESS",ADMIN_ANNOUNCEMENT_CHANGE_CONTENT="ADMIN_ANNOUNCEMENT_CHANGE_CONTENT",ADMIN_ANNOUNCEMENT_CHANGE_START_TIME="ADMIN_ANNOUNCEMENT_CHANGE_START_TIME",ADMIN_ANNOUNCEMENT_CHANGE_END_TIME="ADMIN_ANNOUNCEMENT_CHANGE_END_TIME",ADMIN_ANNOUNCEMENT_CHANGE_ALL_DAY="ADMIN_ANNOUNCEMENT_CHANGE_ALL_DAY",ADMIN_ANNOUNCEMENT_CREATE_REQUEST="ADMIN_ANNOUNCEMENT_CREATE_REQUEST",ADMIN_ANNOUNCEMENT_CREATE_SUCCESS="ADMIN_ANNOUNCEMENT_CREATE_REQUEST",ADMIN_ANNOUNCEMENT_CREATE_FAIL="ADMIN_ANNOUNCEMENT_CREATE_FAIL",ADMIN_ANNOUNCEMENT_DELETE_REQUEST="ADMIN_ANNOUNCEMENT_DELETE_REQUEST",ADMIN_ANNOUNCEMENT_DELETE_SUCCESS="ADMIN_ANNOUNCEMENT_DELETE_REQUEST",ADMIN_ANNOUNCEMENT_DELETE_FAIL="ADMIN_ANNOUNCEMENT_DELETE_FAIL",ADMIN_ANNOUNCEMENT_MODAL_INIT="ADMIN_ANNOUNCEMENT_MODAL_INIT",messages$z={announcementCreateSuccess:{id:"admin.edit_announcement.created",defaultMessage:"Announcement created"},announcementDeleteSuccess:{id:"admin.edit_announcement.deleted",defaultMessage:"Announcement deleted"},announcementUpdateSuccess:{id:"admin.edit_announcement.updated",defaultMessage:"Announcement edited"}},fetchConfig=()=>(_e,et)=>(_e({type:ADMIN_CONFIG_FETCH_REQUEST}),api(et).get("/api/v1/pleroma/admin/config").then(({data:tt})=>{_e({type:ADMIN_CONFIG_FETCH_SUCCESS,configs:tt.configs,needsReboot:tt.need_reboot})}).catch(tt=>{_e({type:ADMIN_CONFIG_FETCH_FAIL,error:tt})})),updateConfig=_e=>(et,tt)=>(et({type:ADMIN_CONFIG_UPDATE_REQUEST,configs:_e}),api(tt).post("/api/v1/pleroma/admin/config",{configs:_e}).then(({data:nt})=>{et({type:ADMIN_CONFIG_UPDATE_SUCCESS,configs:nt.configs,needsReboot:nt.need_reboot})}).catch(nt=>{et({type:ADMIN_CONFIG_UPDATE_FAIL,error:nt,configs:_e})})),updateSoapboxConfig=_e=>(et,tt)=>{const nt=[{group:":pleroma",key:":frontend_configurations",value:[tuple(":soapbox_fe",_e)]}];return et(updateConfig(nt))},fetchMastodonReports=_e=>(et,tt)=>api(tt).get("/api/v1/admin/reports",{params:_e}).then(({data:nt})=>{nt.forEach(rt=>{var at,it;et(importFetchedAccount$1((at=rt.account)==null?void 0:at.account)),et(importFetchedAccount$1((it=rt.target_account)==null?void 0:it.account)),et(importFetchedStatuses(rt.statuses))}),et({type:ADMIN_REPORTS_FETCH_SUCCESS,reports:nt,params:_e})}).catch(nt=>{et({type:ADMIN_REPORTS_FETCH_FAIL,error:nt,params:_e})}),fetchPleromaReports=_e=>(et,tt)=>api(tt).get("/api/v1/pleroma/admin/reports",{params:_e}).then(({data:{reports:nt}})=>{nt.forEach(rt=>{et(importFetchedAccount$1(rt.account)),et(importFetchedAccount$1(rt.actor)),et(importFetchedStatuses(rt.statuses))}),et({type:ADMIN_REPORTS_FETCH_SUCCESS,reports:nt,params:_e})}).catch(nt=>{et({type:ADMIN_REPORTS_FETCH_FAIL,error:nt,params:_e})}),fetchReports=(_e={})=>(et,tt)=>{const rt=tt().instance,at=getFeatures(rt);if(et({type:ADMIN_REPORTS_FETCH_REQUEST,params:_e}),at.mastodonAdmin)return et(fetchMastodonReports(_e));{const{resolved:it}=_e;return et(fetchPleromaReports({state:it===!1?"open":it?"resolved":null}))}},patchMastodonReports=_e=>(et,tt)=>Promise.all(_e.map(({id:nt,state:rt})=>api(tt).post(`/api/v1/admin/reports/${nt}/${rt==="resolved"?"reopen":"resolve"}`).then(()=>{et({type:ADMIN_REPORTS_PATCH_SUCCESS,reports:_e})}).catch(at=>{et({type:ADMIN_REPORTS_PATCH_FAIL,error:at,reports:_e})}))),patchPleromaReports=_e=>(et,tt)=>api(tt).patch("/api/v1/pleroma/admin/reports",{reports:_e}).then(()=>{et({type:ADMIN_REPORTS_PATCH_SUCCESS,reports:_e})}).catch(nt=>{et({type:ADMIN_REPORTS_PATCH_FAIL,error:nt,reports:_e})}),patchReports=(_e,et)=>(tt,nt)=>{const at=nt().instance,it=getFeatures(at),ot=_e.map(st=>({id:st,state:et}));return tt({type:ADMIN_REPORTS_PATCH_REQUEST,reports:ot}),it.mastodonAdmin?tt(patchMastodonReports(ot)):tt(patchPleromaReports(ot))},closeReports=_e=>patchReports(_e,"closed"),fetchMastodonUsers=(_e,et,tt,nt,rt)=>(at,it)=>{const ot={username:tt};return _e.includes("local")&&(ot.local=!0),_e.includes("active")&&(ot.active=!0),_e.includes("need_approval")&&(ot.pending=!0),api(it).get(rt||"/api/v1/admin/accounts",{params:ot}).then(({data:st,...ct})=>{const ut=getLinks(ct).refs.find(ft=>ft.rel==="next"),dt=ut?et*nt+1:(et-1)*nt+st.length;return at(importFetchedAccounts(st.map(({account:ft})=>ft))),at(fetchRelationships(st.map(ft=>ft.id))),at({type:ADMIN_USERS_FETCH_SUCCESS,users:st,count:dt,pageSize:nt,filters:_e,page:et,next:(ut==null?void 0:ut.uri)||!1}),{users:st,count:dt,pageSize:nt,next:(ut==null?void 0:ut.uri)||!1}}).catch(st=>at({type:ADMIN_USERS_FETCH_FAIL,error:st,filters:_e,page:et,pageSize:nt}))},fetchPleromaUsers=(_e,et,tt,nt)=>(rt,at)=>{const it={filters:_e.join(),page:et,page_size:nt};return tt&&(it.query=tt),api(at).get("/api/v1/pleroma/admin/users",{params:it}).then(({data:{users:ot,count:st,page_size:ct}})=>(rt(fetchRelationships(ot.map(ut=>ut.id))),rt({type:ADMIN_USERS_FETCH_SUCCESS,users:ot,count:st,pageSize:ct,filters:_e,page:et}),{users:ot,count:st,pageSize:ct})).catch(ot=>rt({type:ADMIN_USERS_FETCH_FAIL,error:ot,filters:_e,page:et,pageSize:nt}))},fetchUsers=(_e=[],et=1,tt,nt=50,rt)=>(at,it)=>{const st=it().instance,ct=getFeatures(st);return at({type:ADMIN_USERS_FETCH_REQUEST,filters:_e,page:et,pageSize:nt}),ct.mastodonAdmin?at(fetchMastodonUsers(_e,et,tt,nt,rt)):at(fetchPleromaUsers(_e,et,tt,nt))},deactivateMastodonUsers=(_e,et)=>(tt,nt)=>Promise.all(_e.map(rt=>{api(nt).post(`/api/v1/admin/accounts/${rt}/action`,{type:"disable",report_id:et}).then(()=>{tt({type:ADMIN_USERS_DEACTIVATE_SUCCESS,accountIds:[rt]})}).catch(at=>{tt({type:ADMIN_USERS_DEACTIVATE_FAIL,error:at,accountIds:[rt]})})})),deactivatePleromaUsers=_e=>(et,tt)=>{const nt=accountIdsToAccts(tt(),_e);return api(tt).patch("/api/v1/pleroma/admin/users/deactivate",{nicknames:nt}).then(({data:{users:rt}})=>{et({type:ADMIN_USERS_DEACTIVATE_SUCCESS,users:rt,accountIds:_e})}).catch(rt=>{et({type:ADMIN_USERS_DEACTIVATE_FAIL,error:rt,accountIds:_e})})},deactivateUsers=(_e,et)=>(tt,nt)=>{const at=nt().instance,it=getFeatures(at);return tt({type:ADMIN_USERS_DEACTIVATE_REQUEST,accountIds:_e}),it.mastodonAdmin?tt(deactivateMastodonUsers(_e,et)):tt(deactivatePleromaUsers(_e))},deleteUsers$1=_e=>(et,tt)=>{const nt=accountIdsToAccts(tt(),_e);return et({type:ADMIN_USERS_DELETE_REQUEST,accountIds:_e}),api(tt).delete("/api/v1/pleroma/admin/users",{data:{nicknames:nt}}).then(({data:rt})=>{et({type:ADMIN_USERS_DELETE_SUCCESS,nicknames:rt,accountIds:_e})}).catch(rt=>{et({type:ADMIN_USERS_DELETE_FAIL,error:rt,accountIds:_e})})},approveMastodonUsers=_e=>(et,tt)=>Promise.all(_e.map(nt=>{api(tt).post(`/api/v1/admin/accounts/${nt}/approve`).then(({data:rt})=>{et({type:ADMIN_USERS_APPROVE_SUCCESS,users:[rt],accountIds:[nt]})}).catch(rt=>{et({type:ADMIN_USERS_APPROVE_FAIL,error:rt,accountIds:[nt]})})})),approvePleromaUsers=_e=>(et,tt)=>{const nt=accountIdsToAccts(tt(),_e);return api(tt).patch("/api/v1/pleroma/admin/users/approve",{nicknames:nt}).then(({data:{users:rt}})=>{et({type:ADMIN_USERS_APPROVE_SUCCESS,users:rt,accountIds:_e})}).catch(rt=>{et({type:ADMIN_USERS_APPROVE_FAIL,error:rt,accountIds:_e})})},approveUsers$1=_e=>(et,tt)=>{const rt=tt().instance,at=getFeatures(rt);return et({type:ADMIN_USERS_APPROVE_REQUEST,accountIds:_e}),at.mastodonAdmin?et(approveMastodonUsers(_e)):et(approvePleromaUsers(_e))},deleteStatus$5=_e=>(et,tt)=>(et({type:ADMIN_STATUS_DELETE_REQUEST,id:_e}),api(tt).delete(`/api/v1/pleroma/admin/statuses/${_e}`).then(()=>{et({type:ADMIN_STATUS_DELETE_SUCCESS,id:_e})}).catch(nt=>{et({type:ADMIN_STATUS_DELETE_FAIL,error:nt,id:_e})})),toggleStatusSensitivity=(_e,et)=>(tt,nt)=>(tt({type:ADMIN_STATUS_TOGGLE_SENSITIVITY_REQUEST,id:_e}),api(nt).put(`/api/v1/pleroma/admin/statuses/${_e}`,{sensitive:!et}).then(()=>{tt({type:ADMIN_STATUS_TOGGLE_SENSITIVITY_SUCCESS,id:_e})}).catch(rt=>{tt({type:ADMIN_STATUS_TOGGLE_SENSITIVITY_FAIL,error:rt,id:_e})})),fetchModerationLog=_e=>(et,tt)=>(et({type:ADMIN_LOG_FETCH_REQUEST}),api(tt).get("/api/v1/pleroma/admin/moderation_log",{params:_e}).then(({data:nt})=>(et({type:ADMIN_LOG_FETCH_SUCCESS,items:nt.items,total:nt.total}),nt)).catch(nt=>{et({type:ADMIN_LOG_FETCH_FAIL,error:nt})})),tagUsers=(_e,et)=>(tt,nt)=>{const rt=accountIdsToAccts(nt(),_e);return tt({type:ADMIN_USERS_TAG_REQUEST,accountIds:_e,tags:et}),api(nt).put("/api/v1/pleroma/admin/users/tag",{nicknames:rt,tags:et}).then(()=>{tt({type:ADMIN_USERS_TAG_SUCCESS,accountIds:_e,tags:et})}).catch(at=>{tt({type:ADMIN_USERS_TAG_FAIL,error:at,accountIds:_e,tags:et})})},untagUsers=(_e,et)=>(tt,nt)=>{const rt=accountIdsToAccts(nt(),_e);return et.includes("badge:donor")&&(et=[...et,"donor"]),tt({type:ADMIN_USERS_UNTAG_REQUEST,accountIds:_e,tags:et}),api(nt).delete("/api/v1/pleroma/admin/users/tag",{data:{nicknames:rt,tags:et}}).then(()=>{tt({type:ADMIN_USERS_UNTAG_SUCCESS,accountIds:_e,tags:et})}).catch(at=>{tt({type:ADMIN_USERS_UNTAG_FAIL,error:at,accountIds:_e,tags:et})})},setTags=(_e,et,tt)=>async nt=>{const rt=getTagDiff(et,tt);await nt(tagUsers([_e],rt.added)),await nt(untagUsers([_e],rt.removed))},setBadges=(_e,et,tt)=>nt=>{const rt=filterBadges(et),at=filterBadges(tt);return nt(setTags(_e,rt,at))},addPermission=(_e,et)=>(tt,nt)=>{const rt=accountIdsToAccts(nt(),_e);return tt({type:ADMIN_ADD_PERMISSION_GROUP_REQUEST,accountIds:_e,permissionGroup:et}),api(nt).post(`/api/v1/pleroma/admin/users/permission_group/${et}`,{nicknames:rt}).then(({data:at})=>{tt({type:ADMIN_ADD_PERMISSION_GROUP_SUCCESS,accountIds:_e,permissionGroup:et,data:at})}).catch(at=>{tt({type:ADMIN_ADD_PERMISSION_GROUP_FAIL,error:at,accountIds:_e,permissionGroup:et})})},removePermission=(_e,et)=>(tt,nt)=>{const rt=accountIdsToAccts(nt(),_e);return tt({type:ADMIN_REMOVE_PERMISSION_GROUP_REQUEST,accountIds:_e,permissionGroup:et}),api(nt).delete(`/api/v1/pleroma/admin/users/permission_group/${et}`,{data:{nicknames:rt}}).then(({data:at})=>{tt({type:ADMIN_REMOVE_PERMISSION_GROUP_SUCCESS,accountIds:_e,permissionGroup:et,data:at})}).catch(at=>{tt({type:ADMIN_REMOVE_PERMISSION_GROUP_FAIL,error:at,accountIds:_e,permissionGroup:et})})},promoteToAdmin=_e=>et=>Promise.all([et(addPermission([_e],"admin")),et(removePermission([_e],"moderator"))]),promoteToModerator=_e=>et=>Promise.all([et(removePermission([_e],"admin")),et(addPermission([_e],"moderator"))]),demoteToUser=_e=>et=>Promise.all([et(removePermission([_e],"admin")),et(removePermission([_e],"moderator"))]),setRole=(_e,et)=>tt=>{switch(et){case"user":return tt(demoteToUser(_e));case"moderator":return tt(promoteToModerator(_e));case"admin":return tt(promoteToAdmin(_e))}},setUserIndexQuery=_e=>({type:ADMIN_USER_INDEX_QUERY_SET,query:_e}),fetchUserIndex=()=>(_e,et)=>{const{filters:tt,page:nt,query:rt,pageSize:at,isLoading:it}=et().admin_user_index;it||(_e({type:ADMIN_USER_INDEX_FETCH_REQUEST}),_e(fetchUsers(tt.toJS(),nt+1,rt,at)).then(ot=>{if(ot.error)_e({type:ADMIN_USER_INDEX_FETCH_FAIL});else{const{users:st,count:ct,next:ut}=ot;_e({type:ADMIN_USER_INDEX_FETCH_SUCCESS,users:st,count:ct,next:ut})}}).catch(()=>{_e({type:ADMIN_USER_INDEX_FETCH_FAIL})}))},expandUserIndex=()=>(_e,et)=>{const{filters:tt,page:nt,query:rt,pageSize:at,isLoading:it,next:ot,loaded:st}=et().admin_user_index;!st||it||(_e({type:ADMIN_USER_INDEX_EXPAND_REQUEST}),_e(fetchUsers(tt.toJS(),nt+1,rt,at,ot)).then(ct=>{if(ct.error)_e({type:ADMIN_USER_INDEX_EXPAND_FAIL});else{const{users:ut,count:dt,next:ft}=ct;_e({type:ADMIN_USER_INDEX_EXPAND_SUCCESS,users:ut,count:dt,next:ft})}}).catch(()=>{_e({type:ADMIN_USER_INDEX_EXPAND_FAIL})}))},fetchAdminAnnouncements=()=>(_e,et)=>(_e({type:ADMIN_ANNOUNCEMENTS_FETCH_REQUEST}),api(et).get("/api/v1/pleroma/admin/announcements",{params:{limit:50}}).then(({data:tt})=>(_e({type:ADMIN_ANNOUNCEMENTS_FETCH_SUCCESS,announcements:tt}),tt)).catch(tt=>{_e({type:ADMIN_ANNOUNCEMENTS_FETCH_FAIL,error:tt})})),changeAnnouncementContent=_e=>({type:ADMIN_ANNOUNCEMENT_CHANGE_CONTENT,value:_e}),changeAnnouncementStartTime=_e=>({type:ADMIN_ANNOUNCEMENT_CHANGE_START_TIME,value:_e}),changeAnnouncementEndTime=_e=>({type:ADMIN_ANNOUNCEMENT_CHANGE_END_TIME,value:_e}),changeAnnouncementAllDay=_e=>({type:ADMIN_ANNOUNCEMENT_CHANGE_ALL_DAY,value:_e}),handleCreateAnnouncement=()=>(_e,et)=>{_e({type:ADMIN_ANNOUNCEMENT_CREATE_REQUEST});const{id:tt,content:nt,starts_at:rt,ends_at:at,all_day:it}=et().admin_announcements.form;return api(et)[tt?"patch":"post"](tt?`/api/v1/pleroma/admin/announcements/${tt}`:"/api/v1/pleroma/admin/announcements",{content:nt,starts_at:rt,ends_at:at,all_day:it}).then(({data:ot})=>(_e({type:ADMIN_ANNOUNCEMENT_CREATE_SUCCESS,announcement:ot}),toast.success(tt?messages$z.announcementUpdateSuccess:messages$z.announcementCreateSuccess),_e(fetchAdminAnnouncements()),ot)).catch(ot=>{_e({type:ADMIN_ANNOUNCEMENT_CREATE_FAIL,error:ot})})},deleteAnnouncement=_e=>(et,tt)=>(et({type:ADMIN_ANNOUNCEMENT_DELETE_REQUEST,id:_e}),api(tt).delete(`/api/v1/pleroma/admin/announcements/${_e}`).then(({data:nt})=>(et({type:ADMIN_ANNOUNCEMENT_DELETE_SUCCESS,id:_e}),toast.success(messages$z.announcementDeleteSuccess),et(fetchAdminAnnouncements()),nt)).catch(nt=>{et({type:ADMIN_ANNOUNCEMENT_DELETE_FAIL,id:_e,error:nt})})),initAnnouncementModal=_e=>et=>{et({type:ADMIN_ANNOUNCEMENT_MODAL_INIT,announcement:_e}),et(openModal("EDIT_ANNOUNCEMENT"))};var messages$y={deactivateUserHeading:{id:"confirmations.admin.deactivate_user.heading",defaultMessage:"Deactivate @{acct}"},deactivateUserPrompt:{id:"confirmations.admin.deactivate_user.message",defaultMessage:"You are about to deactivate @{acct}. Deactivating a user is a reversible action."},deactivateUserConfirm:{id:"confirmations.admin.deactivate_user.confirm",defaultMessage:"Deactivate @{name}"},userDeactivated:{id:"admin.users.user_deactivated_message",defaultMessage:"@{acct} was deactivated"},deleteUserHeading:{id:"confirmations.admin.delete_user.heading",defaultMessage:"Delete @{acct}"},deleteUserPrompt:{id:"confirmations.admin.delete_user.message",defaultMessage:"You are about to delete @{acct}. THIS IS A DESTRUCTIVE ACTION THAT CANNOT BE UNDONE."},deleteUserConfirm:{id:"confirmations.admin.delete_user.confirm",defaultMessage:"Delete @{name}"},deleteLocalUserCheckbox:{id:"confirmations.admin.delete_local_user.checkbox",defaultMessage:"I understand that I am about to delete a local user."},userDeleted:{id:"admin.users.user_deleted_message",defaultMessage:"@{acct} was deleted"},deleteStatusHeading:{id:"confirmations.admin.delete_status.heading",defaultMessage:"Delete post"},deleteStatusPrompt:{id:"confirmations.admin.delete_status.message",defaultMessage:"You are about to delete a post by @{acct}. This action cannot be undone."},deleteStatusConfirm:{id:"confirmations.admin.delete_status.confirm",defaultMessage:"Delete post"},rejectUserHeading:{id:"confirmations.admin.reject_user.heading",defaultMessage:"Reject @{acct}"},rejectUserPrompt:{id:"confirmations.admin.reject_user.message",defaultMessage:"You are about to reject @{acct} registration request. This action cannot be undone."},rejectUserConfirm:{id:"confirmations.admin.reject_user.confirm",defaultMessage:"Reject @{name}"},statusDeleted:{id:"admin.statuses.status_deleted_message",defaultMessage:"Post by @{acct} was deleted"},markStatusSensitiveHeading:{id:"confirmations.admin.mark_status_sensitive.heading",defaultMessage:"Mark post sensitive"},markStatusNotSensitiveHeading:{id:"confirmations.admin.mark_status_not_sensitive.heading",defaultMessage:"Mark post not sensitive."},markStatusSensitivePrompt:{id:"confirmations.admin.mark_status_sensitive.message",defaultMessage:"You are about to mark a post by @{acct} sensitive."},markStatusNotSensitivePrompt:{id:"confirmations.admin.mark_status_not_sensitive.message",defaultMessage:"You are about to mark a post by @{acct} not sensitive."},markStatusSensitiveConfirm:{id:"confirmations.admin.mark_status_sensitive.confirm",defaultMessage:"Mark post sensitive"},markStatusNotSensitiveConfirm:{id:"confirmations.admin.mark_status_not_sensitive.confirm",defaultMessage:"Mark post not sensitive"},statusMarkedSensitive:{id:"admin.statuses.status_marked_message_sensitive",defaultMessage:"Post by @{acct} was marked sensitive"},statusMarkedNotSensitive:{id:"admin.statuses.status_marked_message_not_sensitive",defaultMessage:"Post by @{acct} was marked not sensitive"}},deactivateUserModal=function _e(et,tt){var nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){};return function(rt,at){var it=at(),ot=selectAccount(it,tt).acct,st=selectAccount(it,tt).username,ct=_createRawReactElement(Stack,{space:4},void 0,_createRawReactElement(OutlineBox,{},void 0,_createRawReactElement(AccountContainer,{id:tt,hideActions:!0})),_createRawReactElement(Text$2,{},void 0,et.formatMessage(messages$y.deactivateUserPrompt,{acct:ot})));rt(openModal("CONFIRM",{icon:vitePluginRequire_1697864664704_86852148,heading:et.formatMessage(messages$y.deactivateUserHeading,{acct:ot}),message:ct,confirm:et.formatMessage(messages$y.deactivateUserConfirm,{name:st}),onConfirm:function(){rt(deactivateUsers([tt])).then(function(){var dt=et.formatMessage(messages$y.userDeactivated,{acct:ot});toast.success(dt),nt()}).catch(function(){})}}))}},deleteUserModal=function _e(et,tt){var nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){};return function(rt,at){var it=at(),ot=selectAccount(it,tt),st=ot.acct,ct=ot.username,ut=isLocal(ot),dt=_createRawReactElement(Stack,{space:4},void 0,_createRawReactElement(OutlineBox,{},void 0,_createRawReactElement(AccountContainer,{id:tt,hideActions:!0})),_createRawReactElement(Text$2,{},void 0,et.formatMessage(messages$y.deleteUserPrompt,{acct:st}))),ft=et.formatMessage(messages$y.deleteUserConfirm,{name:ct}),pt=ut?et.formatMessage(messages$y.deleteLocalUserCheckbox):!1;rt(openModal("CONFIRM",{icon:vitePluginRequire_1697864669750_76363491,heading:et.formatMessage(messages$y.deleteUserHeading,{acct:st}),message:dt,confirm:ft,checkbox:pt,onConfirm:function(){rt(deleteUsers$1([tt])).then(function(){var ht=et.formatMessage(messages$y.userDeleted,{acct:st});rt(fetchAccountByUsername(st)),toast.success(ht),nt()}).catch(function(){})}}))}},toggleStatusSensitivityModal=function _e(et,tt,nt){var rt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:function(){};return function(at,it){var ot=it(),st=ot.statuses.get(tt).account.acct;at(openModal("CONFIRM",{icon:vitePluginRequire_1697864655029_60412658,heading:et.formatMessage(nt===!1?messages$y.markStatusSensitiveHeading:messages$y.markStatusNotSensitiveHeading),message:et.formatMessage(nt===!1?messages$y.markStatusSensitivePrompt:messages$y.markStatusNotSensitivePrompt,{acct:st}),confirm:et.formatMessage(nt===!1?messages$y.markStatusSensitiveConfirm:messages$y.markStatusNotSensitiveConfirm),onConfirm:function(){at(toggleStatusSensitivity(tt,nt)).then(function(){var ut=et.formatMessage(nt===!1?messages$y.statusMarkedSensitive:messages$y.statusMarkedNotSensitive,{acct:st});toast.success(ut)}).catch(function(){}),rt()}}))}},deleteStatusModal=function _e(et,tt){var nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){};return function(rt,at){var it=at(),ot=it.statuses.get(tt).account.acct;rt(openModal("CONFIRM",{icon:vitePluginRequire_1697864655833_97692366,heading:et.formatMessage(messages$y.deleteStatusHeading),message:et.formatMessage(messages$y.deleteStatusPrompt,{acct:_createRawReactElement("strong",{className:"break-words"},void 0,ot)}),confirm:et.formatMessage(messages$y.deleteStatusConfirm),onConfirm:function(){rt(deleteStatus$5(tt)).then(function(){var ct=et.formatMessage(messages$y.statusDeleted,{acct:ot});toast.success(ct)}).catch(function(){}),nt()}}))}};const MUTES_INIT_MODAL="MUTES_INIT_MODAL",MUTES_TOGGLE_HIDE_NOTIFICATIONS="MUTES_TOGGLE_HIDE_NOTIFICATIONS",MUTES_CHANGE_DURATION="MUTES_CHANGE_DURATION",initMuteModal=_e=>et=>{et({type:MUTES_INIT_MODAL,account:_e}),et(openModal("MUTE"))},toggleHideNotifications=()=>_e=>{_e({type:MUTES_TOGGLE_HIDE_NOTIFICATIONS})},changeMuteDuration=_e=>et=>{et({type:MUTES_CHANGE_DURATION,duration:_e})},REPORT_INIT="REPORT_INIT",REPORT_CANCEL="REPORT_CANCEL",REPORT_SUBMIT_REQUEST="REPORT_SUBMIT_REQUEST",REPORT_SUBMIT_SUCCESS="REPORT_SUBMIT_SUCCESS",REPORT_SUBMIT_FAIL="REPORT_SUBMIT_FAIL",REPORT_STATUS_TOGGLE="REPORT_STATUS_TOGGLE",REPORT_COMMENT_CHANGE="REPORT_COMMENT_CHANGE",REPORT_FORWARD_CHANGE="REPORT_FORWARD_CHANGE",REPORT_BLOCK_CHANGE="REPORT_BLOCK_CHANGE",REPORT_RULE_CHANGE="REPORT_RULE_CHANGE";var ReportableEntities=(_e=>(_e.ACCOUNT="ACCOUNT",_e.CHAT_MESSAGE="CHAT_MESSAGE",_e.GROUP="GROUP",_e.STATUS="STATUS",_e))(ReportableEntities||{});const initReport=(_e,et,tt)=>nt=>{const{status:rt,chatMessage:at,group:it}=tt||{};return nt({type:REPORT_INIT,entityType:_e,account:et,status:rt,chatMessage:at,group:it}),nt(openModal("REPORT"))},cancelReport=()=>({type:REPORT_CANCEL}),toggleStatusReport=(_e,et)=>({type:REPORT_STATUS_TOGGLE,statusId:_e,checked:et}),submitReport=()=>(_e,et)=>{_e(submitReportRequest());const{reports:tt}=et();return api(et).post("/api/v1/reports",{account_id:tt.getIn(["new","account_id"]),status_ids:tt.getIn(["new","status_ids"]),message_ids:[tt.getIn(["new","chat_message","id"])].filter(Boolean),group_id:tt.getIn(["new","group","id"]),rule_ids:tt.getIn(["new","rule_ids"]),comment:tt.getIn(["new","comment"]),forward:tt.getIn(["new","forward"])})},submitReportRequest=()=>({type:REPORT_SUBMIT_REQUEST}),submitReportSuccess=()=>({type:REPORT_SUBMIT_SUCCESS}),submitReportFail=_e=>({type:REPORT_SUBMIT_FAIL,error:_e}),changeReportComment=_e=>({type:REPORT_COMMENT_CHANGE,comment:_e}),changeReportForward=_e=>({type:REPORT_FORWARD_CHANGE,forward:_e}),changeReportBlock=_e=>({type:REPORT_BLOCK_CHANGE,block:_e}),changeReportRule=_e=>({type:REPORT_RULE_CHANGE,rule_id:_e});function useDeleteGroupStatus(_e,et){const tt=useApi(),{deleteEntity:nt,isSubmitting:rt}=useDeleteEntity(Entities.STATUSES,()=>tt.delete(`/api/v1/groups/${_e.id}/statuses/${et}`));return{mutate:nt,isSubmitting:rt}}var _excluded$5=["icon","className","iconClassName","active","color","filled","count","emoji","text","theme"],COLORS={accent:"accent",success:"success"},StatusActionCounter=function _e(et){var tt=et.count,nt=tt===void 0?0:tt;return _createRawReactElement(Text$2,{size:"xs",weight:"semibold",theme:"inherit"},void 0,shortNumberFormat(nt))},StatusActionButton=React$3.forwardRef(function(_e,et){var tt=_e.icon,nt=_e.className,rt=_e.iconClassName,at=_e.active,it=_e.color,ot=_e.filled,st=ot===void 0?!1:ot,ct=_e.count,ut=ct===void 0?0:ct,dt=_e.emoji,ft=_e.text,pt=_e.theme,mt=pt===void 0?"default":pt,ht=_objectWithoutProperties(_e,_excluded$5),Et=function(){return dt?_createRawReactElement("span",{className:"flex h-6 w-6 items-center justify-center"},void 0,_createRawReactElement(Emoji,{className:"h-full w-full p-0.5",emoji:dt.get("name"),src:dt.get("url")})):_createRawReactElement(Icon$1,{src:tt,className:clsx({"fill-accent-300 text-accent-300 hover:fill-accent-300":at&&st&&it===COLORS.accent},rt)})},yt=function(){if(ft)return _createRawReactElement(Text$2,{tag:"span",theme:"inherit",size:"sm"},void 0,ft);if(ut)return _createRawReactElement(StatusActionCounter,{count:ut})};return React$3.createElement("button",_extends$4({ref:et,type:"button",className:clsx("flex items-center rounded-full p-1 rtl:space-x-reverse","focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:ring-offset-0",{"text-gray-600 hover:text-gray-600 dark:hover:text-white bg-white dark:bg-transparent":mt==="default","text-white/80 hover:text-white bg-transparent dark:bg-transparent":mt==="inverse","text-black dark:text-white":at&&dt,"hover:text-gray-600 dark:hover:text-white":!ht.disabled,"text-accent-300 hover:text-accent-300 dark:hover:text-accent-300":at&&!dt&&it===COLORS.accent,"text-success-600 hover:text-success-600 dark:hover:text-success-600":at&&!dt&&it===COLORS.success,"space-x-1":!ft,"space-x-2":ft},nt)},ht),Et(),yt())});const EMOJI_REACT_REQUEST="EMOJI_REACT_REQUEST",EMOJI_REACT_SUCCESS="EMOJI_REACT_SUCCESS",EMOJI_REACT_FAIL="EMOJI_REACT_FAIL",UNEMOJI_REACT_REQUEST="UNEMOJI_REACT_REQUEST",UNEMOJI_REACT_SUCCESS="UNEMOJI_REACT_SUCCESS",UNEMOJI_REACT_FAIL="UNEMOJI_REACT_FAIL",noOp$3=()=>()=>new Promise(_e=>_e(void 0)),simpleEmojiReact=(_e,et,tt)=>nt=>{const rt=_e.pleroma.get("emoji_reactions")||List$1();return et==="⭐️"&&_e.favourited?nt(unfavourite(_e)):rt.filter(it=>it.get("me")===!0&&it.get("name")===et).count()>0?nt(unEmojiReact(_e,et)):Promise.all([...rt.filter(it=>it.get("me")===!0).map(it=>nt(unEmojiReact(_e,it.get("name")))).toArray(),_e.favourited&&nt(unfavourite(_e))]).then(()=>{nt(et==="⭐️"?favourite(_e):emojiReact(_e,et,tt))}).catch(it=>{console.error(it)})},emojiReact=(_e,et,tt)=>(nt,rt)=>isLoggedIn(rt)?(nt(emojiReactRequest(_e,et,tt)),api(rt).put(`/api/v1/pleroma/statuses/${_e.id}/reactions/${et}`).then(function(at){nt(importFetchedStatus(at.data)),nt(emojiReactSuccess(_e,et))}).catch(function(at){nt(emojiReactFail(_e,et,at))})):nt(noOp$3()),unEmojiReact=(_e,et)=>(tt,nt)=>isLoggedIn(nt)?(tt(unEmojiReactRequest(_e,et)),api(nt).delete(`/api/v1/pleroma/statuses/${_e.id}/reactions/${et}`).then(rt=>{tt(importFetchedStatus(rt.data)),tt(unEmojiReactSuccess(_e,et))}).catch(rt=>{tt(unEmojiReactFail(_e,et,rt))})):tt(noOp$3()),emojiReactRequest=(_e,et,tt)=>({type:EMOJI_REACT_REQUEST,status:_e,emoji:et,custom:tt,skipLoading:!0}),emojiReactSuccess=(_e,et)=>({type:EMOJI_REACT_SUCCESS,status:_e,emoji:et,skipLoading:!0}),emojiReactFail=(_e,et,tt)=>({type:EMOJI_REACT_FAIL,status:_e,emoji:et,error:tt,skipLoading:!0}),unEmojiReactRequest=(_e,et)=>({type:UNEMOJI_REACT_REQUEST,status:_e,emoji:et,skipLoading:!0}),unEmojiReactSuccess=(_e,et)=>({type:UNEMOJI_REACT_SUCCESS,status:_e,emoji:et,skipLoading:!0}),unEmojiReactFail=(_e,et,tt)=>({type:UNEMOJI_REACT_FAIL,status:_e,emoji:et,error:tt,skipLoading:!0}),ALLOWED_EMOJI=List$1(["⭐️","❤️","😆","😮","😢","😩"]),sortEmoji=(_e,et)=>_e.sortBy(tt=>-(tt.get("count")+Number(et.includes(tt.get("name"))))),mergeEmojiFavourites=(_e=List$1(),et,tt)=>{if(!et)return _e;const nt=_e.findIndex(rt=>rt.get("name")==="⭐️");if(nt>-1){const rt=Number(_e.getIn([nt,"count"]));return tt=tt||!!_e.getIn([nt,"me"],!1),_e.setIn([nt,"count"],rt+et).setIn([nt,"me"],tt)}else return _e.push(Map$3({count:et,me:tt,name:"⭐️"}))},reduceEmoji=(_e,et,tt,nt=ALLOWED_EMOJI)=>sortEmoji(mergeEmojiFavourites(_e,et,tt),nt),getReactForStatus=(_e,et=ALLOWED_EMOJI)=>{const tt=reduceEmoji(_e.pleroma.get("emoji_reactions",List$1()),_e.favourites_count||0,_e.favourited,et).filter(nt=>nt.get("me")===!0).get(0);return typeof(tt==null?void 0:tt.get("name"))=="string"?tt:void 0},simulateEmojiReact=(_e,et,tt)=>{const nt=_e.findIndex(at=>at.get("name")===et),rt=_e.get(nt);return nt>-1&&rt?_e.set(nt,rt.merge({count:rt.get("count")+1,me:!0,url:tt})):_e.push(Map$3({count:1,me:!0,name:et,url:tt}))},simulateUnEmojiReact=(_e,et)=>{const tt=_e.findIndex(rt=>rt.get("name")===et&&rt.get("me")===!0),nt=_e.get(tt);return nt?nt.get("count")-1<1?_e.delete(tt):_e.set(tt,nt.merge({count:nt.get("count")-1,me:!1})):_e};var StatusReactionWrapper=function _e(et){var tt=et.statusId,nt=et.children,rt=useAppDispatch(),at=useOwnAccount(),it=at.account,ot=useAppSelector(function(bt){return bt.statuses.get(tt)}),st=useSoapboxConfig(),ct=reactExports.useRef(),ut=reactExports.useState(!1),dt=_slicedToArray$4(ut,2),ft=dt[0],pt=dt[1],mt=reactExports.useState(null),ht=_slicedToArray$4(mt,2),Et=ht[0],yt=ht[1];if(reactExports.useEffect(function(){return function(){ct.current&&clearTimeout(ct.current)}},[]),!ot)return null;var vt=function(){ct.current&&clearTimeout(ct.current),isUserTouching()||pt(!0)},gt=function(){ct.current&&clearTimeout(ct.current),isUserTouching()?pt(!1):ct.current=setTimeout(function(){pt(!1)},500)},St=function(wt,xt){it?rt(simpleEmojiReact(ot,wt,xt)):$t(),pt(!1)},Rt=function(wt){var xt,Tt=((xt=getReactForStatus(ot,st.allowedEmoji))===null||xt===void 0?void 0:xt.get("name"))||"⭐️";isUserTouching()?it?ft?St(Tt):pt(!0):$t():St(Tt),wt.preventDefault(),wt.stopPropagation()},$t=function(){rt(openModal("UNAUTHORIZED",{action:"FAVOURITE",ap_id:ot.url}))};return _createRawReactElement("div",{className:"relative",onMouseEnter:vt,onMouseLeave:gt},void 0,React$3.cloneElement(nt,{onClick:Rt,ref:yt}),ft&&_createRawReactElement(Portal$1,{},void 0,_createRawReactElement(EmojiSelector,{placement:"top-start",referenceElement:Et,onReact:St,visible:ft,onClose:function(){return pt(!1)}})))};const copy=(_e,et)=>{if(navigator.clipboard)navigator.clipboard.writeText(_e),et&&et();else{const tt=document.createElement("textarea");tt.textContent=_e,tt.style.position="fixed",document.body.appendChild(tt);try{tt.select(),document.execCommand("copy")}catch{}finally{document.body.removeChild(tt),et&&et()}}};var GroupMemberCount=function _e(et){var tt=et.group;return _createRawReactElement(Link$2,{to:"/group/".concat(tt.slug,"/members"),className:"hover:underline"},void 0,_createRawReactElement(Text$2,{theme:"inherit",tag:"span",size:"sm",weight:"medium","data-testid":"group-member-count"},void 0,shortNumberFormat(tt.members_count)," ",_createRawReactElement(FormattedMessage$1,{id:"groups.discover.search.results.member_count",defaultMessage:"{members, plural, one {member} other {members}}",values:{members:tt.members_count}})))};const vitePluginRequire_1697864669741_76284640="/packs/assets/world-d0cccfac.svg";var GroupPrivacy=function _e(et){var tt=et.group;return _createRawReactElement(Popover,{referenceElementClassName:"cursor-help",content:_createRawReactElement(Stack,{space:4,alignItems:"center",className:"w-72"},void 0,_createRawReactElement("div",{className:"rounded-full bg-gray-200 p-3 dark:bg-gray-800"},void 0,_createRawReactElement(Icon$1,{src:tt.locked?vitePluginRequire_1697864655871_30959129:vitePluginRequire_1697864669741_76284640,className:"h-6 w-6 text-gray-600 dark:text-gray-600"})),_createRawReactElement(Stack,{space:1,alignItems:"center"},void 0,_createRawReactElement(Text$2,{size:"lg",weight:"bold",align:"center"},void 0,tt.locked?_createRawReactElement(FormattedMessage$1,{id:"group.privacy.locked.full",defaultMessage:"Private Group"}):_createRawReactElement(FormattedMessage$1,{id:"group.privacy.public.full",defaultMessage:"Public Group"})),_createRawReactElement(Text$2,{theme:"muted",align:"center"},void 0,tt.locked?_createRawReactElement(FormattedMessage$1,{id:"group.privacy.locked.info",defaultMessage:"Discoverable. Users can join after their request is approved."}):_createRawReactElement(FormattedMessage$1,{id:"group.privacy.public.info",defaultMessage:"Discoverable. Anyone can join."}))))},void 0,_createRawReactElement(HStack,{space:1,alignItems:"center","data-testid":"group-privacy"},void 0,_createRawReactElement(Icon$1,{className:"h-4 w-4",src:tt.locked?vitePluginRequire_1697864655871_30959129:vitePluginRequire_1697864669741_76284640}),_createRawReactElement(Text$2,{theme:"inherit",tag:"span",size:"sm",weight:"medium"},void 0,tt.locked?_createRawReactElement(FormattedMessage$1,{id:"group.privacy.locked",defaultMessage:"Private"}):_createRawReactElement(FormattedMessage$1,{id:"group.privacy.public",defaultMessage:"Public"}))))},GroupAvatar=function _e(et){var tt,nt=et.group,rt=et.size,at=et.withRing,it=at===void 0?!1:at,ot=((tt=nt.relationship)===null||tt===void 0?void 0:tt.role)===GroupRoles.OWNER;return _createRawReactElement(Avatar,{className:clsx("relative rounded-full",{"shadow-[0_0_0_2px_theme(colors.primary.600),0_0_0_4px_theme(colors.white)]":ot&&it,"dark:shadow-[0_0_0_2px_theme(colors.primary.600),0_0_0_4px_theme(colors.gray.800)]":ot&&it,"shadow-[0_0_0_2px_theme(colors.primary.600)]":ot&&!it,"shadow-[0_0_0_2px_theme(colors.white)] dark:shadow-[0_0_0_2px_theme(colors.gray.800)]":!ot&&it}),src:nt.avatar,size:rt})},messages$x={title:{id:"group.popover.title",defaultMessage:"Membership required"},summary:{id:"group.popover.summary",defaultMessage:"You must be a member of the group in order to reply to this status."},action:{id:"group.popover.action",defaultMessage:"View Group"}},GroupPopover=function _e(et){var tt=et.children,nt=et.group,rt=et.isEnabled,at=useIntl(),it=useHistory(),ot=it.location.pathname,st=matchPath$1(ot,{path:["/group/:groupSlug"],exact:!0});return rt?_createRawReactElement(Popover,{interaction:"click",referenceElementClassName:"cursor-pointer",content:_createRawReactElement(Stack,{space:4,className:"w-80 pb-4"},void 0,_createRawReactElement(Stack,{className:"relative h-60 rounded-lg bg-white dark:border-primary-800 dark:bg-primary-900","data-testid":"group-card"},void 0,_createRawReactElement(Stack,{grow:!0,className:"relative basis-1/2 rounded-t-lg bg-primary-100 dark:bg-gray-800"},void 0,nt.header&&_createRawReactElement("img",{className:"absolute inset-0 h-full w-full rounded-t-lg object-cover",src:nt.header,alt:""})),_createRawReactElement("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"},void 0,_createRawReactElement(GroupAvatar,{group:nt,size:64,withRing:!0})),_createRawReactElement(Stack,{alignItems:"center",justifyContent:"end",grow:!0,className:"basis-1/2 py-4",space:.5},void 0,_createRawReactElement(Text$2,{size:"lg",weight:"bold",dangerouslySetInnerHTML:{__html:nt.display_name_html}}),_createRawReactElement(HStack,{className:"text-gray-700 dark:text-gray-600",space:2,wrap:!0},void 0,_createRawReactElement(GroupPrivacy,{group:nt}),_createRawReactElement(GroupMemberCount,{group:nt})))),_createRawReactElement(Divider,{}),_createRawReactElement(Stack,{space:.5,className:"px-4"},void 0,_createRawReactElement(Text$2,{weight:"semibold"},void 0,at.formatMessage(messages$x.title)),_createRawReactElement(Text$2,{theme:"muted"},void 0,at.formatMessage(messages$x.summary))),!st&&_createRawReactElement("div",{className:"px-4"},void 0,_createRawReactElement(Link$2,{to:"/group/".concat(nt.slug)},void 0,_createRawReactElement(Button,{type:"button",theme:"secondary",block:!0},void 0,at.formatMessage(messages$x.action))))),isFlush:!0,children:_createRawReactElement("div",{className:"inline-block"},void 0,tt)}):tt},messages$w={adminAccount:{id:"status.admin_account",defaultMessage:"Moderate @{name}"},admin_status:{id:"status.admin_status",defaultMessage:"Open this post in the moderation interface"},block:{id:"account.block",defaultMessage:"Block @{name}"},blocked:{id:"group.group_mod_block.success",defaultMessage:"@{name} is banned"},blockAndReport:{id:"confirmations.block.block_and_report",defaultMessage:"Block & Report"},blockConfirm:{id:"confirmations.block.confirm",defaultMessage:"Block"},bookmark:{id:"status.bookmark",defaultMessage:"Bookmark"},cancel_reblog_private:{id:"status.cancel_reblog_private",defaultMessage:"Un-repost"},cannot_reblog:{id:"status.cannot_reblog",defaultMessage:"This post cannot be reposted"},chat:{id:"status.chat",defaultMessage:"Chat with @{name}"},copy:{id:"status.copy",defaultMessage:"Copy link to post"},deactivateUser:{id:"admin.users.actions.deactivate_user",defaultMessage:"Deactivate @{name}"},delete:{id:"status.delete",defaultMessage:"Delete"},deleteConfirm:{id:"confirmations.delete.confirm",defaultMessage:"Delete"},deleteFromGroupMessage:{id:"confirmations.delete_from_group.message",defaultMessage:"Are you sure you want to delete @{name}'s post?"},deleteHeading:{id:"confirmations.delete.heading",defaultMessage:"Delete post"},deleteMessage:{id:"confirmations.delete.message",defaultMessage:"Are you sure you want to delete this post?"},deleteStatus:{id:"admin.statuses.actions.delete_status",defaultMessage:"Delete post"},deleteUser:{id:"admin.users.actions.delete_user",defaultMessage:"Delete @{name}"},direct:{id:"status.direct",defaultMessage:"Direct message @{name}"},disfavourite:{id:"status.disfavourite",defaultMessage:"Disike"},edit:{id:"status.edit",defaultMessage:"Edit"},embed:{id:"status.embed",defaultMessage:"Embed"},external:{id:"status.external",defaultMessage:"View post on {domain}"},favourite:{id:"status.favourite",defaultMessage:"Like"},groupBlockConfirm:{id:"confirmations.block_from_group.confirm",defaultMessage:"Ban"},groupBlockFromGroupHeading:{id:"confirmations.block_from_group.heading",defaultMessage:"Ban From Group"},groupBlockFromGroupMessage:{id:"confirmations.block_from_group.message",defaultMessage:"Are you sure you want to ban @{name} from the group?"},groupModDelete:{id:"status.group_mod_delete",defaultMessage:"Delete post from group"},group_remove_account:{id:"status.remove_account_from_group",defaultMessage:"Remove account from group"},group_remove_post:{id:"status.remove_post_from_group",defaultMessage:"Remove post from group"},markStatusNotSensitive:{id:"admin.statuses.actions.mark_status_not_sensitive",defaultMessage:"Mark post not sensitive"},markStatusSensitive:{id:"admin.statuses.actions.mark_status_sensitive",defaultMessage:"Mark post sensitive"},mention:{id:"status.mention",defaultMessage:"Mention @{name}"},more:{id:"status.more",defaultMessage:"More"},mute:{id:"account.mute",defaultMessage:"Mute @{name}"},muteConfirm:{id:"confirmations.mute_group.confirm",defaultMessage:"Mute"},muteConversation:{id:"status.mute_conversation",defaultMessage:"Mute conversation"},muteGroup:{id:"group.mute.long_label",defaultMessage:"Mute Group"},muteHeading:{id:"confirmations.mute_group.heading",defaultMessage:"Mute Group"},muteMessage:{id:"confirmations.mute_group.message",defaultMessage:"You are about to mute the group. Do you want to continue?"},muteSuccess:{id:"group.mute.success",defaultMessage:"Muted the group"},open:{id:"status.open",defaultMessage:"Expand this post"},pin:{id:"status.pin",defaultMessage:"Pin on profile"},pinToGroup:{id:"status.pin_to_group",defaultMessage:"Pin to Group"},pinToGroupSuccess:{id:"status.pin_to_group.success",defaultMessage:"Pinned to Group!"},quotePost:{id:"status.quote",defaultMessage:"Quote post"},reactionCry:{id:"status.reactions.cry",defaultMessage:"Sad"},reactionHeart:{id:"status.reactions.heart",defaultMessage:"Love"},reactionLaughing:{id:"status.reactions.laughing",defaultMessage:"Haha"},reactionLike:{id:"status.reactions.like",defaultMessage:"Like"},reactionOpenMouth:{id:"status.reactions.open_mouth",defaultMessage:"Wow"},reactionWeary:{id:"status.reactions.weary",defaultMessage:"Weary"},reblog:{id:"status.reblog",defaultMessage:"Repost"},reblog_private:{id:"status.reblog_private",defaultMessage:"Repost to original audience"},redraft:{id:"status.redraft",defaultMessage:"Delete & re-draft"},redraftConfirm:{id:"confirmations.redraft.confirm",defaultMessage:"Delete & redraft"},redraftHeading:{id:"confirmations.redraft.heading",defaultMessage:"Delete & redraft"},redraftMessage:{id:"confirmations.redraft.message",defaultMessage:"Are you sure you want to delete this post and re-draft it? Favorites and reposts will be lost, and replies to the original post will be orphaned."},replies_disabled_group:{id:"status.disabled_replies.group_membership",defaultMessage:"Only group members can reply"},reply:{id:"status.reply",defaultMessage:"Reply"},replyAll:{id:"status.replyAll",defaultMessage:"Reply to thread"},replyConfirm:{id:"confirmations.reply.confirm",defaultMessage:"Reply"},replyMessage:{id:"confirmations.reply.message",defaultMessage:"Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?"},report:{id:"status.report",defaultMessage:"Report @{name}"},share:{id:"status.share",defaultMessage:"Share"},unbookmark:{id:"status.unbookmark",defaultMessage:"Remove bookmark"},unmuteConversation:{id:"status.unmute_conversation",defaultMessage:"Unmute conversation"},unmuteGroup:{id:"group.unmute.long_label",defaultMessage:"Unmute Group"},unmuteSuccess:{id:"group.unmute.success",defaultMessage:"Unmuted the group"},unpin:{id:"status.unpin",defaultMessage:"Unpin from profile"},unpinFromGroup:{id:"status.unpin_to_group",defaultMessage:"Unpin from Group"}},StatusActionBar=function _e(et){var tt,nt,rt,at,it=et.status,ot=et.withLabels,st=ot===void 0?!1:ot,ct=et.expandable,ut=ct===void 0?!0:ct,dt=et.space,ft=dt===void 0?"sm":dt,pt=et.statusActionButtonTheme,mt=pt===void 0?"default":pt,ht=useIntl(),Et=useHistory(),yt=useAppDispatch(),vt=useRouteMatch("/group/:groupSlug"),gt=useGroup((tt=it.group)===null||tt===void 0?void 0:tt.id),St=gt.group,Rt=useMuteGroup(St),$t=useUnmuteGroup(St),bt=!!(St!=null&&(nt=St.relationship)!==null&&nt!==void 0&&nt.muting),wt=useDeleteGroupStatus(St,it.id),xt=useBlockGroupMember(St,it==null?void 0:it.account),Tt=useAppSelector(function(Sn){return Sn.me}),Ct=useGroupRelationship((rt=it.group)===null||rt===void 0?void 0:rt.id),Nt=Ct.groupRelationship,At=useFeatures(),kt=useSettings(),Pt=useSoapboxConfig(),Ft=Pt.allowedEmoji,Dt=useOwnAccount(),Lt=Dt.account,It=Lt?Lt.staff:!1,Ot=Lt?Lt.admin:!1;if(!it)return null;var Ut=function(gn){yt(openModal("UNAUTHORIZED",{action:gn,ap_id:it.url}))},jt=function(gn){Tt?yt(replyCompose(it)):Ut("REPLY")},zt=function(){navigator.share({text:it.search_index,url:it.uri}).catch(function(gn){gn.name!=="AbortError"&&console.error(gn)})},Qt=function(gn){Tt?yt(toggleFavourite(it)):Ut("FAVOURITE")},Xt=function(gn){Tt?yt(toggleDislike(it)):Ut("DISLIKE")},Yt=function(gn){yt(toggleBookmark(it))},Bt=function(){window.open(it.uri,"_blank")},Kt=function(gn){if(Tt){var Nn=function(){return yt(toggleReblog(it))},qn=kt.get("boostModal");gn&&gn.shiftKey||!qn?Nn():yt(openModal("BOOST",{status:it,onReblog:Nn}))}else Ut("REBLOG")},Wt=function(gn){Tt?yt(quoteCompose(it)):Ut("REBLOG")},sn=function(){var gn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;yt(function(Nn,qn){var Wn=kt.get("deleteModal");yt(Wn?openModal("CONFIRM",{icon:gn?vitePluginRequire_1697864653820_86193028:vitePluginRequire_1697864655833_97692366,heading:ht.formatMessage(gn?messages$w.redraftHeading:messages$w.deleteHeading),message:ht.formatMessage(gn?messages$w.redraftMessage:messages$w.deleteMessage),confirm:ht.formatMessage(gn?messages$w.redraftConfirm:messages$w.deleteConfirm),onConfirm:function(){return yt(deleteStatus$6(it.id,gn))}}):deleteStatus$6(it.id,gn))})},pn=function(gn){sn()},mn=function(gn){sn(!0)},hn=function(){it.event?yt(editEvent(it.id)):yt(editStatus(it.id))},_n=function(gn){yt(togglePin(it))},En=function(){var gn=it.group;it.pinned?yt(unpinFromGroup(it,gn)):yt(pinToGroup(it,gn)).then(function(){return toast.success(ht.formatMessage(messages$w.pinToGroupSuccess))}).catch(function(){return null})},On=function(gn){yt(mentionCompose(it.account))},Cn=function(gn){yt(directCompose(it.account))},Tn=function(gn){var Nn=it.account;yt(launchChat(Nn.id,Et))},Mn=function(gn){yt(initMuteModal(it.account))},Fn=function(){return yt(openModal("CONFIRM",{heading:ht.formatMessage(messages$w.muteHeading),message:ht.formatMessage(messages$w.muteMessage),confirm:ht.formatMessage(messages$w.muteConfirm),confirmationTheme:"primary",onConfirm:function(){return Rt.mutate(void 0,{onSuccess:function(){toast.success(ht.formatMessage(messages$w.muteSuccess))}})}}))},zn=function(){$t.mutate(void 0,{onSuccess:function(){toast.success(ht.formatMessage(messages$w.unmuteSuccess))}})},Dn=function(gn){var Nn=it.account;yt(openModal("CONFIRM",{icon:vitePluginRequire_1697864669750_71014420,heading:_createRawReactElement(FormattedMessage$1,{id:"confirmations.block.heading",defaultMessage:"Block @{name}",values:{name:Nn.acct}}),message:_createRawReactElement(FormattedMessage$1,{id:"confirmations.block.message",defaultMessage:"Are you sure you want to block {name}?",values:{name:_createRawReactElement("strong",{className:"break-words"},void 0,"@",Nn.acct)}}),confirm:ht.formatMessage(messages$w.blockConfirm),onConfirm:function(){return yt(blockAccount(Nn.id))},secondary:ht.formatMessage(messages$w.blockAndReport),onSecondary:function(){yt(blockAccount(Nn.id)),yt(initReport(ReportableEntities.STATUS,Nn,{status:it}))}}))},Bn=function(gn){Et.push("/@".concat(it.account.acct,"/posts/").concat(it.id))},Vn=function(){yt(openModal("EMBED",{url:it.url,onError:function(Nn){return toast.showAlertForError(Nn)}}))},Zn=function(gn){yt(initReport(ReportableEntities.STATUS,it.account,{status:it}))},er=function(gn){yt(toggleMuteStatus(it))},Pn=function(gn){var Nn=it.uri;copy(Nn)},$n=function(gn){var Nn=it.account;yt(openModal("ACCOUNT_MODERATION",{accountId:Nn.id}))},Ln=function(gn){yt(deleteStatusModal(ht,it.id))},Gn=function(gn){yt(toggleStatusSensitivityModal(ht,it.id,it.sensitive))},Jn=function(){var gn=it.account;yt(openModal("CONFIRM",{heading:ht.formatMessage(messages$w.deleteHeading),message:ht.formatMessage(messages$w.deleteFromGroupMessage,{name:_createRawReactElement("strong",{className:"break-words"},void 0,gn.username)}),confirm:ht.formatMessage(messages$w.deleteConfirm),onConfirm:function(){wt.mutate(it.id,{onSuccess:function(){yt(deleteFromTimelines(it.id))}})}}))},ir=function(){yt(openModal("CONFIRM",{heading:ht.formatMessage(messages$w.groupBlockFromGroupHeading),message:ht.formatMessage(messages$w.groupBlockFromGroupMessage,{name:it.account.username}),confirm:ht.formatMessage(messages$w.groupBlockConfirm),onConfirm:function(){xt({account_ids:[it.account.id]},{onSuccess:function(){toast.success(ht.formatMessage(messages$w.blocked,{name:Lt==null?void 0:Lt.acct}))}})}}))},or=function(gn){var Nn=it.muted,qn=it.account.id===Tt,Wn=it.account.username,cr=it.account,Tr=cr.fqn.split("@")[1],wn=[];if(ut&&wn.push({text:ht.formatMessage(messages$w.open),action:Bn,icon:vitePluginRequire_1697864662112_61530411}),gn&&(wn.push({text:ht.formatMessage(messages$w.copy),action:Pn,icon:vitePluginRequire_1697864661780_99413139}),At.embeds&&isLocal(cr)&&wn.push({text:ht.formatMessage(messages$w.embed),action:Vn,icon:vitePluginRequire_1697864669816_57605756})),!Tt)return wn;var vr=_typeof$8(it.group)==="object";if(vr&&it.group){var xr=(Nt==null?void 0:Nt.role)===GroupRoles.OWNER;xr&&wn.push({text:ht.formatMessage(it.pinned?messages$w.unpinFromGroup:messages$w.pinToGroup),action:En,icon:it.pinned?vitePluginRequire_1697864655029_22990100:vitePluginRequire_1697864669798_95052990})}if(At.bookmarks&&wn.push({text:ht.formatMessage(it.bookmarked?messages$w.unbookmark:messages$w.bookmark),action:Yt,icon:it.bookmarked?vitePluginRequire_1697864655029_64566499:vitePluginRequire_1697864655029_20168574}),At.federating&&isRemote(cr)&&wn.push({text:ht.formatMessage(messages$w.external,{domain:Tr}),action:Bt,icon:vitePluginRequire_1697864655028_67397852}),wn.push(null),wn.push({text:ht.formatMessage(Nn?messages$w.unmuteConversation:messages$w.muteConversation),action:er,icon:Nn?vitePluginRequire_1697864673476_47296655:vitePluginRequire_1697864662112_43053577}),wn.push(null),qn)gn?wn.push({text:ht.formatMessage(it.pinned?messages$w.unpin:messages$w.pin),action:_n,icon:it.pinned?vitePluginRequire_1697864655029_22990100:vitePluginRequire_1697864669798_95052990}):it.visibility==="private"&&wn.push({text:ht.formatMessage(it.reblogged?messages$w.cancel_reblog_private:messages$w.reblog_private),action:Kt,icon:vitePluginRequire_1697864655029_5178546}),wn.push({text:ht.formatMessage(messages$w.delete),action:pn,icon:vitePluginRequire_1697864655833_97692366,destructive:!0}),At.editStatuses?wn.push({text:ht.formatMessage(messages$w.edit),action:hn,icon:vitePluginRequire_1697864653820_86193028}):wn.push({text:ht.formatMessage(messages$w.redraft),action:mn,icon:vitePluginRequire_1697864653820_86193028,destructive:!0});else{var fr;wn.push({text:ht.formatMessage(messages$w.mention,{name:Wn}),action:On,icon:vitePluginRequire_1697864655029_83209601}),((fr=it.account.pleroma)===null||fr===void 0?void 0:fr.accepts_chat_messages)===!0?wn.push({text:ht.formatMessage(messages$w.chat,{name:Wn}),action:Tn,icon:vitePluginRequire_1697864655029_28864811}):At.privacyScopes&&wn.push({text:ht.formatMessage(messages$w.direct,{name:Wn}),action:Cn,icon:vitePluginRequire_1697864655029_52560061}),wn.push(null),At.groupsMuting&&it.group&&(wn.push({text:bt?ht.formatMessage(messages$w.unmuteGroup):ht.formatMessage(messages$w.muteGroup),icon:vitePluginRequire_1697864651438_47563443,action:bt?zn:Fn}),wn.push(null)),wn.push({text:ht.formatMessage(messages$w.mute,{name:Wn}),action:Mn,icon:vitePluginRequire_1697864651438_47563443}),wn.push({text:ht.formatMessage(messages$w.block,{name:Wn}),action:Dn,icon:vitePluginRequire_1697864669750_71014420}),wn.push({text:ht.formatMessage(messages$w.report,{name:Wn}),action:Zn,icon:vitePluginRequire_1697864655029_81075629})}if(vr&&it.group){var Cr=it.group,Ar=it.account,gr=(Nt==null?void 0:Nt.role)===GroupRoles.OWNER,_r=(Nt==null?void 0:Nt.role)===GroupRoles.ADMIN,yr=Cr.owner.id===Ar.id,Er=(vt==null?void 0:vt.isExact)&&(gr||_r)&&!yr&&!qn,Sr=!qn&&(gr||_r&&!yr);(Er||Sr)&&wn.push(null),Er&&wn.push({text:"Ban from Group",action:ir,icon:vitePluginRequire_1697864669750_71014420,destructive:!0}),Sr&&wn.push({text:ht.formatMessage(messages$w.groupModDelete),action:Jn,icon:vitePluginRequire_1697864655833_97692366,destructive:!0})}return It&&(wn.push(null),wn.push({text:ht.formatMessage(messages$w.adminAccount,{name:Wn}),action:$n,icon:vitePluginRequire_1697864655029_83692644}),Ot&&wn.push({text:ht.formatMessage(messages$w.admin_status),href:"/pleroma/admin/#/statuses/".concat(it.id,"/"),icon:vitePluginRequire_1697864655029_99320522}),wn.push({text:ht.formatMessage(it.sensitive===!1?messages$w.markStatusSensitive:messages$w.markStatusNotSensitive),action:Gn,icon:vitePluginRequire_1697864655029_60412658}),qn||wn.push({text:ht.formatMessage(messages$w.deleteStatus),action:Ln,icon:vitePluginRequire_1697864655833_97692366,destructive:!0})),wn},jn=["public","unlisted","local","group"].includes(it.visibility),rr=it.replies_count,tr=it.reblogs_count,bn=it.favourites_count,yn=reduceEmoji(it.pleroma.get("emoji_reactions")||List$1(),bn,it.favourited,Ft).reduce(function(Sn,gn){return Sn+gn.get("count")},0),xn=getReactForStatus(it,Ft),kn=xn==null?void 0:xn.get("name"),Kn={"⭐️":messages$w.reactionLike,"❤️":messages$w.reactionHeart,"😆":messages$w.reactionLaughing,"😮":messages$w.reactionOpenMouth,"😢":messages$w.reactionCry,"😩":messages$w.reactionWeary,"":messages$w.favourite},Xn=ht.formatMessage(Kn[kn||""]||messages$w.favourite),nr=or(jn),ar=vitePluginRequire_1697864655029_5178546,sr,dr=!1;it.visibility==="direct"?ar=vitePluginRequire_1697864655029_52560061:it.visibility==="private"&&(ar=vitePluginRequire_1697864655871_30959129),(at=it.group)!==null&&at!==void 0&&at.membership_required&&!(Nt!=null&&Nt.member)&&(dr=!0,sr=ht.formatMessage(messages$w.replies_disabled_group));var br=[{text:ht.formatMessage(it.reblogged?messages$w.cancel_reblog_private:messages$w.reblog),action:Kt,icon:vitePluginRequire_1697864655029_5178546},{text:ht.formatMessage(messages$w.quotePost),action:Wt,icon:vitePluginRequire_1697864655029_78731624}],hr=_createRawReactElement(StatusActionButton,{icon:ar,color:"success",disabled:!jn,title:jn?ht.formatMessage(messages$w.reblog):ht.formatMessage(messages$w.cannot_reblog),active:it.reblogged,onClick:Kt,count:tr,text:st?ht.formatMessage(messages$w.reblog):void 0,theme:mt});it.in_reply_to_id?sr=ht.formatMessage(messages$w.replyAll):sr=ht.formatMessage(messages$w.reply);var $r="share"in navigator&&(it.visibility==="public"||it.visibility==="group"),wr={sm:2,md:8,lg:0};return _createRawReactElement(HStack,{"data-testid":"status-action-bar"},void 0,_createRawReactElement(HStack,{justifyContent:ft==="lg"?"between":void 0,space:wr[ft],grow:ft==="lg",onClick:function(gn){return gn.stopPropagation()},alignItems:"center"},void 0,_createRawReactElement(GroupPopover,{group:it.group,isEnabled:dr},void 0,_createRawReactElement(StatusActionButton,{title:sr,icon:vitePluginRequire_1697864662114_58073131,onClick:jt,count:rr,text:st?ht.formatMessage(messages$w.reply):void 0,disabled:dr,theme:mt})),At.quotePosts&&Tt?_createRawReactElement(DropdownMenu,{items:br,disabled:!jn,onShiftClick:Kt},void 0,hr):hr,At.emojiReacts?_createRawReactElement(StatusReactionWrapper,{statusId:it.id},void 0,_createRawReactElement(StatusActionButton,{title:Xn,icon:vitePluginRequire_1697864663407_53967501,filled:!0,color:"accent",active:!!kn,count:yn,emoji:xn,text:st?Xn:void 0,theme:mt})):_createRawReactElement(StatusActionButton,{title:ht.formatMessage(messages$w.favourite),icon:At.dislikes?vitePluginRequire_1697864662114_99624718:vitePluginRequire_1697864663407_53967501,color:"accent",filled:!0,onClick:Qt,active:!!kn,count:bn,text:st?Xn:void 0,theme:mt}),At.dislikes&&_createRawReactElement(StatusActionButton,{title:ht.formatMessage(messages$w.disfavourite),icon:vitePluginRequire_1697864662114_95105940,color:"accent",filled:!0,onClick:Xt,active:it.disliked,count:it.dislikes_count,text:st?ht.formatMessage(messages$w.disfavourite):void 0,theme:mt}),$r&&_createRawReactElement(StatusActionButton,{title:ht.formatMessage(messages$w.share),icon:vitePluginRequire_1697864652991_23502217,onClick:zt,theme:mt}),_createRawReactElement(DropdownMenu,{items:nr,status:it},void 0,_createRawReactElement(StatusActionButton,{title:ht.formatMessage(messages$w.more),icon:vitePluginRequire_1697864655029_75763737,theme:mt}))))};const vitePluginRequire_1697864662122_42675277="/packs/assets/circle-filled-4f8a6c8b.svg",vitePluginRequire_1697864667738_85292214="/packs/assets/home-ceecf982.svg";var messages$v={direct:{id:"privacy.direct.short",defaultMessage:"Direct"},private:{id:"privacy.private.short",defaultMessage:"Followers-only"},public:{id:"privacy.public.short",defaultMessage:"Public"},local:{id:"privacy.local.short",defaultMessage:"Local-only"},unlisted:{id:"privacy.unlisted.short",defaultMessage:"Unlisted"}},StatusInfo=function _e(et){var tt=useIntl(),nt=et.avatarSize,rt=et.icon,at=et.text,it=et.visibility,ot=function(ct){ct.stopPropagation()};return _createRawReactElement("div",{role:"status-info",className:clsx("flex",{"mb-3":nt&&rt&&at}),onClick:ot},void 0,_createRawReactElement(HStack,{space:3,alignItems:"center",className:"grow cursor-default text-xs font-medium text-gray-700 rtl:space-x-reverse dark:text-gray-600"},void 0,nt&&rt&&_createRawReactElement("div",{className:"flex justify-end"},void 0,rt),at&&_createRawReactElement(Text$2,{size:"xs",theme:"muted",weight:"medium"},void 0,at)),it==="public"&&_createRawReactElement(Icon$1,{"aria-hidden":!0,title:tt.formatMessage(messages$v.public),src:vitePluginRequire_1697864669741_76284640,className:"h-5 w-5 shrink-0 text-gray-400 dark:text-gray-600"}),it==="unlisted"&&_createRawReactElement(Icon$1,{"aria-hidden":!0,title:tt.formatMessage(messages$v.unlisted),src:vitePluginRequire_1697864669798_43594879,className:"h-5 w-5 shrink-0 text-gray-400 dark:text-gray-600"}),it==="local"&&_createRawReactElement(Icon$1,{"aria-hidden":!0,title:tt.formatMessage(messages$v.local),src:vitePluginRequire_1697864667738_85292214,className:"h-5 w-5 shrink-0 text-gray-400 dark:text-gray-600"}),it==="private"&&_createRawReactElement(Icon$1,{"aria-hidden":!0,title:tt.formatMessage(messages$v.private),src:vitePluginRequire_1697864655871_30959129,className:"h-5 w-5 shrink-0 text-gray-400 dark:text-gray-600"}),it==="direct"&&_createRawReactElement(Icon$1,{"aria-hidden":!0,title:tt.formatMessage(messages$v.direct),src:vitePluginRequire_1697864655029_52560061,className:"h-5 w-5 shrink-0 text-gray-400 dark:text-gray-600"}),it==="placeholder"&&_createRawReactElement(Icon$1,{"aria-hidden":!0,title:"Placeholder",src:vitePluginRequire_1697864662122_42675277,className:"h-5 w-5 shrink-0 text-primary-50 dark:text-primary-800"}))},messages$u={reblogged_by:{id:"status.reblogged_by",defaultMessage:"{name} reposted"},show:{id:"moderation_overlay.show_content",defaultMessage:"Show content"},hide:{id:"moderation_overlay.hide_content",defaultMessage:"Hide content"}},Status=function _e(et){var tt,nt=et.status,rt=et.accountAction,at=et.avatarSize,it=at===void 0?42:at,ot=et.focusable,st=ot===void 0?!0:ot,ct=et.hoverable,ut=ct===void 0?!0:ct,dt=et.onClick,ft=et.onMoveUp,pt=et.onMoveDown,mt=et.muted,ht=et.hidden,Et=et.featured,yt=et.unread,vt=et.hideActionBar,gt=et.variant,St=gt===void 0?"rounded":gt,Rt=et.showGroup,$t=Rt===void 0?!0:Rt,bt=et.notification,wt=useIntl(),xt=useHistory(),Tt=useAppDispatch(),Ct=useSettings(),Nt=Ct.get("showSensitiveMedia"),At=reactExports.useRef(!1),kt=reactExports.useRef(null),Pt=reactExports.useState(defaultMediaVisibility(nt,Nt)),Ft=_slicedToArray$4(Pt,2),Dt=Ft[0],Lt=Ft[1],It=getActualStatus(nt),Ot=nt.reblog&&_typeof$8(nt.reblog)==="object",Ut="/@".concat(It.account.acct,"/posts/").concat(It.id),jt=It.group,zt=(nt.filtered.size||It.filtered.size)>0;reactExports.useEffect(function(){At.current=!!(!mt&&!ht&&(nt!=null&&nt.card))},[]),reactExports.useEffect(function(){Lt(defaultMediaVisibility(nt,Nt))},[nt.id]);var Qt=function(){Lt(!Dt)},Xt=function(_n){var En;_n==null||_n.stopPropagation(),!((En=getSelection())!==null&&En!==void 0&&En.toString().length)&&(!_n||!(_n.ctrlKey||_n.metaKey)?dt?dt():xt.push(Ut):window.open(Ut,"_blank"))},Yt=function(){return Tt(unfilterStatus(nt.filtered.size?nt.id:It.id))},Bt=function(){return typeof bt<"u"?_createRawReactElement(StatusInfo,{avatarSize:it,icon:bt.icon,text:bt.text,visibility:It.visibility}):Ot&&$t&&jt?_createRawReactElement(StatusInfo,{avatarSize:it,icon:_createRawReactElement(Icon$1,{src:vitePluginRequire_1697864655029_5178546,className:"h-4 w-4 text-green-600"}),text:_createRawReactElement(FormattedMessage$1,{id:"status.reblogged_by_with_group",defaultMessage:"{name} reposted from {group}",values:{name:_createRawReactElement(Link$2,{to:"/@".concat(nt.account.acct),className:"hover:underline"},void 0,_createRawReactElement("bdi",{className:"truncate"},void 0,_createRawReactElement("strong",{className:"text-gray-800 dark:text-gray-200",dangerouslySetInnerHTML:{__html:nt.account.display_name_html}}))),group:_createRawReactElement(Link$2,{to:"/group/".concat(jt.slug),className:"hover:underline"},void 0,_createRawReactElement("strong",{className:"text-gray-800 dark:text-gray-200",dangerouslySetInnerHTML:{__html:jt.display_name_html}}))}}),visibility:It.visibility}):Ot?_createRawReactElement(StatusInfo,{avatarSize:it,icon:_createRawReactElement(Icon$1,{src:vitePluginRequire_1697864655029_5178546,className:"h-4 w-4 text-green-600"}),text:_createRawReactElement(FormattedMessage$1,{id:"status.reblogged_by",defaultMessage:"{name} reposted",values:{name:_createRawReactElement(Link$2,{to:"/@".concat(nt.account.acct),className:"hover:underline"},void 0,_createRawReactElement("bdi",{className:"truncate"},void 0,_createRawReactElement("strong",{className:"text-gray-800 dark:text-gray-200",dangerouslySetInnerHTML:{__html:nt.account.display_name_html}})))}}),visibility:It.visibility}):Et?_createRawReactElement(StatusInfo,{avatarSize:it,icon:_createRawReactElement(Icon$1,{src:vitePluginRequire_1697864647861_15443515,className:"h-4 w-4 text-gray-600 dark:text-gray-400"}),text:_createRawReactElement(FormattedMessage$1,{id:"status.pinned",defaultMessage:"Pinned post"}),visibility:It.visibility}):$t&&jt?_createRawReactElement(StatusInfo,{avatarSize:it,icon:_createRawReactElement(Icon$1,{src:vitePluginRequire_1697864655760_71578718,className:"h-4 w-4 text-primary-600 dark:text-accent-blue"}),text:_createRawReactElement(FormattedMessage$1,{id:"status.group",defaultMessage:"Posted in {group}",values:{group:_createRawReactElement(Link$2,{to:"/group/".concat(jt.slug),className:"hover:underline"},void 0,_createRawReactElement("bdi",{className:"truncate"},void 0,_createRawReactElement("strong",{className:"text-gray-800 dark:text-gray-200"},void 0,_createRawReactElement("span",{dangerouslySetInnerHTML:{__html:jt.display_name_html}}))))}}),visibility:It.visibility}):_createRawReactElement(StatusInfo,{visibility:It.visibility})};if(!nt)return null;if(ht)return React$3.createElement("div",{ref:kt},React$3.createElement(React$3.Fragment,null,It.account.display_name||It.account.username,It.content));if(zt&&nt.showFiltered)return React$3.createElement("div",{className:clsx("status__wrapper text-center",{focusable:st}),tabIndex:st?0:void 0,ref:kt},_createRawReactElement(Text$2,{theme:"muted"},void 0,_createRawReactElement(FormattedMessage$1,{id:"status.filtered",defaultMessage:"Filtered"}),": ",nt.filtered.join(", "),"."," ",_createRawReactElement("button",{className:"text-primary-600 hover:underline dark:text-accent-blue",onClick:Yt},void 0,_createRawReactElement(FormattedMessage$1,{id:"status.show_filter_reason",defaultMessage:"Show anyway"}))));var Kt;nt.reblog&&_typeof$8(nt.reblog)==="object"&&(Kt=wt.formatMessage(messages$u.reblogged_by,{name:nt.account.acct}));var Wt;It.quote&&(It.pleroma.get("quote_visible",!0)===!1?Wt=_createRawReactElement("div",{className:"quoted-status-tombstone"},void 0,_createRawReactElement("p",{},void 0,_createRawReactElement(FormattedMessage$1,{id:"statuses.quote_tombstone",defaultMessage:"Post is unavailable."}))):Wt=_createRawReactElement(QuotedStatusContainer$1,{statusId:It.quote}));var sn=It.visibility==="self",pn=It.sensitive,mn=((tt=nt.tombstone)===null||tt===void 0?void 0:tt.reason)==="deleted";return mn?_createRawReactElement(Tombstone,{id:nt.id,onMoveUp:function(_n){return ft?ft(_n):null},onMoveDown:function(_n){return pt?pt(_n):null}}):React$3.createElement("div",{className:clsx("status cursor-pointer",{focusable:st}),tabIndex:st&&!mt?0:void 0,"data-featured":Et?"true":null,"aria-label":textForScreenReader(wt,It,Kt),ref:kt,onClick:Xt,role:"link"},_createRawReactElement(Card$1,{variant:St,className:clsx("status__wrapper space-y-4","status-".concat(It.visibility),{"py-6 sm:p-5":St==="rounded","status-reply":!!nt.in_reply_to_id,muted:mt,read:yt===!1}),"data-id":nt.id},void 0,_createRawReactElement("div",{},void 0,Bt(),_createRawReactElement(AccountContainer,{id:It.account.id,timestamp:It.created_at,timestampUrl:Ut,action:rt,hideActions:!rt,showEdit:!!It.edited_at,showProfileHoverCard:ut,withLinkToProfile:ut,approvalStatus:It.approval_status,avatarSize:it},It.account.id)),_createRawReactElement("div",{className:"status__content-wrapper"},void 0,_createRawReactElement(StatusReplyMentions,{status:It,hoverable:ut}),_createRawReactElement(StatusContainer,{showMedia:Dt||!1,isSensitive:sn||pn,onToggleMediaVisibility:Qt,quote:Wt,hasMedia:!!(Wt||It.card||It.media_attachments.size>0),contentOption:{status:It,onClick:Xt,collapsable:!0,translatable:!0}}),!vt&&!sn&&_createRawReactElement("div",{className:"pt-4"},void 0,_createRawReactElement(StatusActionBar,{status:It})))))},EmbeddedStatus=function _e(et){var tt=et.params,nt=useAppDispatch(),rt=useHistory(),at=reactExports.useCallback(makeGetStatus(),[]),it=useAppSelector(function(pt){return at(pt,{id:tt.statusId})}),ot=reactExports.useState(!0),st=_slicedToArray$4(ot,2),ct=st[0],ut=st[1];reactExports.useEffect(function(){rt.block(),nt(fetchStatus(tt.statusId)).then(function(){return ut(!1)}).catch(function(){return ut(!1)})},[]),reactExports.useEffect(function(){window.parent.postMessage({type:"setHeight",id:iframeId,height:document.getElementsByTagName("html")[0].scrollHeight},"*")},[it,ct]);var dt=_createRawReactElement("div",{className:"ml-4 flex justify-center align-middle"},void 0,_createRawReactElement(SiteLogo,{className:"max-h-[20px] max-w-[112px]"})),ft=function(){return ct?_createRawReactElement(Spinner,{}):it?_createRawReactElement(Status,{status:it,accountAction:dt,variant:"default"}):_createRawReactElement(MissingIndicator,{nested:!0})};return _createRawReactElement("a",{className:"block bg-white dark:bg-primary-900",href:(it==null?void 0:it.url)||"#",onClick:function(mt){return mt.stopPropagation()},target:"_blank"},void 0,_createRawReactElement("div",{className:"pointer-events-none max-w-3xl p-4 sm:p-6"},void 0,ft()))};const FETCH_ABOUT_PAGE_REQUEST="FETCH_ABOUT_PAGE_REQUEST",FETCH_ABOUT_PAGE_SUCCESS="FETCH_ABOUT_PAGE_SUCCESS",FETCH_ABOUT_PAGE_FAIL="FETCH_ABOUT_PAGE_FAIL",fetchAboutPage=(_e="index",et)=>tt=>{tt({type:FETCH_ABOUT_PAGE_REQUEST,slug:_e,locale:et});const nt=`${_e}${et?`.${et}`:""}.html`;return staticClient.get(`/instance/about/${nt}`).then(({data:rt})=>(tt({type:FETCH_ABOUT_PAGE_SUCCESS,slug:_e,locale:et,html:rt}),rt)).catch(rt=>{throw tt({type:FETCH_ABOUT_PAGE_FAIL,slug:_e,locale:et,error:rt}),rt})};var _excluded4=["label","hint","items"],LabelInputContainer=function _e(et){var tt=et.label,nt=et.hint,rt=et.children,at=reactExports.useState(v4()),it=_slicedToArray$4(at,1),ot=it[0],st=React$3.Children.map(rt,function(ct){return React$3.cloneElement(ct,{id:ot,key:ot})});return _createRawReactElement("div",{className:"label_input"},void 0,_createRawReactElement("label",{htmlFor:ot},void 0,tt),_createRawReactElement("div",{className:"label_input__wrapper"},void 0,st),nt&&_createRawReactElement("span",{className:"hint"},void 0,nt))},SelectDropdown=function _e(et){var tt=et.label,nt=et.hint,rt=et.items,at=_objectWithoutProperties(et,_excluded4),it=Object.keys(rt).map(function(st){return _createRawReactElement("option",{value:st},st,rt[st])}),ot=React$3.createElement(Select,at,it);return tt?_createRawReactElement(LabelInputContainer,{label:tt,hint:nt},void 0,ot):ot},List=function _e(et){var tt=et.children;return _createRawReactElement("div",{className:"space-y-0.5"},void 0,tt)},ListItem=function _e(et){var tt=et.label,nt=et.hint,rt=et.children,at=et.to,it=et.onClick,ot=et.onSelect,st=et.isSelected,ct=v4(),ut="list-group-".concat(ct),dt=function(gt){gt.key==="Enter"&&it()},ft=at||it||ot?"span":"label",pt=React$3.useCallback(function(){return React$3.Children.map(rt,function(vt){if(React$3.isValidElement(vt)){var gt=vt.type===SelectDropdown||vt.type===Select;return React$3.cloneElement(vt,{id:ut,className:clsx({"w-auto":gt},vt.props.className)})}return null})},[rt,ut]),mt=clsx("flex items-center justify-between overflow-hidden bg-gradient-to-r from-gradient-start/20 to-gradient-end/20 px-4 py-2 first:rounded-t-lg last:rounded-b-lg dark:from-gradient-start/10 dark:to-gradient-end/10",{"cursor-pointer hover:from-gradient-start/30 hover:to-gradient-end/30 dark:hover:from-gradient-start/5 dark:hover:to-gradient-end/5":typeof at<"u"||typeof it<"u"||typeof ot<"u"}),ht=React$3.createElement(React$3.Fragment,null,_createRawReactElement("div",{className:"flex flex-col py-1.5 pr-4 rtl:pl-4 rtl:pr-0"},void 0,_createRawReactElement(ft,{className:"text-gray-900 dark:text-gray-100",htmlFor:ut},void 0,tt),nt?_createRawReactElement("span",{className:"text-sm text-gray-700 dark:text-gray-600"},void 0,nt):null),at||it?_createRawReactElement(HStack,{space:1,alignItems:"center",className:"overflow-hidden text-gray-700 dark:text-gray-600"},void 0,rt,_createRawReactElement(Icon$1,{src:vitePluginRequire_1697864669800_65455099,className:"ml-1 rtl:rotate-180"})):null,ot?_createRawReactElement("div",{className:"flex flex-row items-center text-gray-700 dark:text-gray-600"},void 0,rt,_createRawReactElement("div",{className:clsx({"flex h-6 w-6 items-center justify-center rounded-full border-2 border-solid border-primary-500 dark:border-primary-400 transition":!0,"bg-primary-500 dark:bg-primary-400":st,"bg-transparent":!st})},void 0,_createRawReactElement(Icon$1,{src:vitePluginRequire_1697864666744_94924775,className:clsx({"h-4 w-4 text-white dark:text-white transition-all duration-500":!0,"opacity-0 scale-50":!st,"opacity-100 scale-100":st})}))):null,typeof at>"u"&&typeof it>"u"&&typeof ot>"u"?pt():null);if(at)return _createRawReactElement(Link$2,{className:mt,to:at},void 0,ht);var Et=it?"a":"div",yt=it||ot?{onClick:it||ot,onKeyDown:dt,tabIndex:0,role:"link"}:{};return React$3.createElement(Et,_extends$4({className:mt},yt),ht)},SettingToggle=function _e(et){var tt=et.id,nt=et.settings,rt=et.settingPath,at=et.onChange,it=function(st){var ct=st.target;at(rt,ct.checked)};return _createRawReactElement(Toggle,{id:tt,checked:!!nt.getIn(rt),onChange:it})};const vitePluginRequire_1697864666347_85583308="/packs/assets/moon-c47d7627.svg",vitePluginRequire_1697864666347_17733866="/packs/assets/sun-f0c7dc05.svg",vitePluginRequire_1697864666347_18124651="/packs/assets/device-desktop-8182f875.svg";var messages$t={light:{id:"theme_toggle.light",defaultMessage:"Light"},dark:{id:"theme_toggle.dark",defaultMessage:"Dark"},system:{id:"theme_toggle.system",defaultMessage:"System"}},ThemeSelector=function _e(et){var tt=et.value,nt=et.onChange,rt=useIntl(),at=reactExports.useMemo(function(){switch(tt){case"system":return vitePluginRequire_1697864666347_18124651;case"light":return vitePluginRequire_1697864666347_17733866;case"dark":return vitePluginRequire_1697864666347_85583308;default:return null}},[tt]),it=function(st){nt(st.target.value)};return _createRawReactElement("label",{},void 0,_createRawReactElement("div",{className:"relative rounded-md shadow-sm"},void 0,_createRawReactElement("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},void 0,_createRawReactElement(Icon$1,{src:at,className:"h-4 w-4 text-gray-600 dark:text-gray-700"})),_createRawReactElement(Select,{onChange:it,defaultValue:tt,className:"!pl-10"},void 0,_createRawReactElement("option",{value:"system"},void 0,rt.formatMessage(messages$t.system)),_createRawReactElement("option",{value:"light"},void 0,rt.formatMessage(messages$t.light)),_createRawReactElement("option",{value:"dark"},void 0,rt.formatMessage(messages$t.dark))),_createRawReactElement("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3"},void 0,_createRawReactElement(Icon$1,{src:vitePluginRequire_1697864653845_56554064,className:"h-4 w-4 text-gray-600 dark:text-gray-700"}))))},ThemeToggle=function _e(){var et=useAppDispatch(),tt=useSettings().get("themeMode"),nt=function(at){et(changeSetting(["themeMode"],at))};return _createRawReactElement(ThemeSelector,{value:tt,onChange:nt})};function ownKeys$7(_e,et){var tt=Object.keys(_e);if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(_e);et&&(nt=nt.filter(function(rt){return Object.getOwnPropertyDescriptor(_e,rt).enumerable})),tt.push.apply(tt,nt)}return tt}function _objectSpread$6(_e){for(var et=1;etPage not found")})},[ft,nt]);var vt=Et&&_createRawReactElement("div",{},void 0,_createRawReactElement(FormattedMessage$1,{id:"about.also_available",defaultMessage:"Available in:"})," ",_createRawReactElement("ul",{className:"inline list-none p-0"},void 0,_createRawReactElement("li",{className:"inline after:content-['_·_']"},void 0,_createRawReactElement("a",{href:"#",onClick:function(){return pt(Et)}},void 0,languages[Et]||Et)),yt==null?void 0:yt.map(function(gt){return _createRawReactElement("li",{className:"inline after:content-['_·_'] last:after:content-none"},gt,_createRawReactElement("a",{href:"#",onClick:function(){return pt(gt)}},void 0,languages[gt]||gt))})));return _createRawReactElement("div",{className:"prose mx-auto py-20 dark:prose-invert"},void 0,_createRawReactElement("div",{dangerouslySetInnerHTML:{__html:st}}),vt)},LandingPage=function _e(){var et=useAppDispatch(),tt=useFeatures(),nt=useSoapboxConfig(),rt=useRegistrationStatus(),at=rt.pepeEnabled,it=rt.pepeOpen,ot=useInstance(),st=function(){return _createRawReactElement(Stack,{space:3,"data-testid":"registrations-closed"},void 0,_createRawReactElement(Text$2,{size:"xl",weight:"bold",align:"center"},void 0,_createRawReactElement(FormattedMessage$1,{id:"registration.closed_title",defaultMessage:"Registrations Closed"})),_createRawReactElement(Text$2,{theme:"muted",align:"center"},void 0,_createRawReactElement(FormattedMessage$1,{id:"registration.closed_message",defaultMessage:"{instance} is not accepting new members.",values:{instance:ot.title}})))},ct=function(){return _createRawReactElement(RegistrationForm,{})},ut=function(){var mt=nt.authProvider;return _createRawReactElement(Stack,{space:3},void 0,_createRawReactElement(Stack,{},void 0,_createRawReactElement(Text$2,{size:"2xl",weight:"bold",align:"center"},void 0,_createRawReactElement(FormattedMessage$1,{id:"registrations.get_started",defaultMessage:"Let's get started!"}))),_createRawReactElement(Button,{onClick:function(){return et(prepareRequest(mt))},theme:"primary",block:!0},void 0,_createRawReactElement(FormattedMessage$1,{id:"oauth_consumer.tooltip",defaultMessage:"Sign in with {provider}",values:{provider:capitalize$2(mt)}})))},dt=function(){return _createRawReactElement(Stack,{space:3,"data-testid":"registrations-pepe"},void 0,_createRawReactElement(VerificationBadge,{className:"mx-auto h-16 w-16"}),_createRawReactElement(Stack,{},void 0,_createRawReactElement(Text$2,{size:"2xl",weight:"bold",align:"center"},void 0,_createRawReactElement(FormattedMessage$1,{id:"registrations.get_started",defaultMessage:"Let's get started!"})),_createRawReactElement(Text$2,{theme:"muted",align:"center"},void 0,_createRawReactElement(FormattedMessage$1,{id:"registrations.tagline",defaultMessage:"Social Media Without Discrimination"}))),_createRawReactElement(Button,{to:"/verify",theme:"primary",block:!0},void 0,_createRawReactElement(FormattedMessage$1,{id:"registrations.create_account",defaultMessage:"Create an account"})))},ft=function(){return nt.authProvider?ut():at&&it?dt():tt.accountCreation&&ot.registrations?ct():st()};return _createRawReactElement("main",{className:"mt-16 sm:mt-24","data-testid":"homepage"},void 0,_createRawReactElement("div",{className:"mx-auto max-w-7xl"},void 0,_createRawReactElement("div",{className:"grid grid-cols-1 gap-8 py-12 lg:grid-cols-12"},void 0,_createRawReactElement("div",{className:"px-4 sm:px-6 sm:text-center md:mx-auto md:max-w-2xl lg:col-span-6 lg:flex lg:text-start"},void 0,_createRawReactElement("div",{className:"w-full"},void 0,_createRawReactElement(Stack,{space:3},void 0,_createRawReactElement("h1",{className:"overflow-hidden text-ellipsis bg-gradient-to-br from-accent-500 via-primary-500 to-gradient-end bg-clip-text text-5xl font-extrabold text-transparent sm:mt-5 sm:leading-none lg:mt-6 lg:text-6xl xl:text-7xl"},void 0,ot.title),_createRawReactElement(Markup,{size:"lg",dangerouslySetInnerHTML:{__html:ot.short_description||ot.description}})))),_createRawReactElement("div",{className:"self-center sm:mt-24 lg:col-span-6 lg:mt-0"},void 0,_createRawReactElement(Card$1,{size:"xl",variant:"rounded",className:"sm:mx-auto sm:w-full sm:max-w-md"},void 0,_createRawReactElement(CardBody,{},void 0,ft()))))))};const vitePluginRequire_1697864645807_43713269="/packs/assets/help-caf91eb6.svg",vitePluginRequire_1697864648800_96550775="/packs/assets/menu-2-be71a617.svg";var Sonar=function _e(){return _createRawReactElement("div",{className:"relative"},void 0,_createRawReactElement("div",{className:"relative h-48 w-48"},void 0,_createRawReactElement("div",{className:"pointer-events-none absolute left-0 top-0 h-full w-full animate-sonar-scale-4 rounded-full bg-primary-600/25 opacity-0 dark:bg-primary-600/25"}),_createRawReactElement("div",{className:"pointer-events-none absolute left-0 top-0 h-full w-full animate-sonar-scale-3 rounded-full bg-primary-600/25 opacity-0 dark:bg-primary-600/25"}),_createRawReactElement("div",{className:"pointer-events-none absolute left-0 top-0 h-full w-full animate-sonar-scale-2 rounded-full bg-primary-600/25 opacity-0 dark:bg-primary-600/25"}),_createRawReactElement("div",{className:"pointer-events-none absolute left-0 top-0 h-full w-full animate-sonar-scale-1 rounded-full bg-primary-600/25 opacity-0 dark:bg-primary-600/25"}),_createRawReactElement("div",{className:"absolute left-0 top-0 h-48 w-48 rounded-full bg-white dark:bg-primary-900"})))},messages$r={menu:{id:"header.menu.title",defaultMessage:"Open menu"},home:{id:"header.home.label",defaultMessage:"Home"},login:{id:"header.login.label",defaultMessage:"Log in"},register:{id:"header.register.label",defaultMessage:"Register"},username:{id:"header.login.username.placeholder",defaultMessage:"E-mail or username"},email:{id:"header.login.email.placeholder",defaultMessage:"E-mail address"},password:{id:"header.login.password.label",defaultMessage:"Password"},forgotPassword:{id:"header.login.forgot_password",defaultMessage:"Forgot password?"}},Header$1=function _e(){var et=useAppDispatch(),tt=useIntl(),nt=useFeatures(),rt=useOwnAccount(),at=rt.account,it=useSoapboxConfig(),ot=useRegistrationStatus(),st=ot.isOpen,ct=it.links,ut=React$3.useState(!1),dt=_slicedToArray$4(ut,2),ft=dt[0],pt=dt[1],mt=React$3.useState(""),ht=_slicedToArray$4(mt,2),Et=ht[0],yt=ht[1],vt=React$3.useState(""),gt=_slicedToArray$4(vt,2),St=gt[0],Rt=gt[1],$t=React$3.useState(!1),bt=_slicedToArray$4($t,2),wt=bt[0],xt=bt[1],Tt=React$3.useState(!1),Ct=_slicedToArray$4(Tt,2),Nt=Ct[0],At=Ct[1],kt=function(){return et(openModal("LANDING_PAGE"))},Pt=function(Dt){Dt.preventDefault(),pt(!0),et(logIn(Et,St)).then(function(Lt){var It=Lt.access_token;return et(verifyCredentials(It)).then(function(){return et(fetchInstance())}).then(function(){return xt(!0)})}).catch(function(Lt){var It;pt(!1);var Ot=(It=Lt.response)===null||It===void 0?void 0:It.data;(Ot==null?void 0:Ot.error)==="mfa_required"&&At(Ot.mfa_token)})};return at&&wt?_createRawReactElement(Redirect,{to:"/"}):Nt?_createRawReactElement(Redirect,{to:"/login?token=".concat(encodeURIComponent(Nt))}):_createRawReactElement("header",{"data-testid":"public-layout-header"},void 0,_createRawReactElement("nav",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8","aria-label":"Header"},void 0,_createRawReactElement("div",{className:"flex w-full items-center justify-between border-b border-indigo-500 py-6 lg:border-none"},void 0,_createRawReactElement("div",{className:"relative flex w-36 items-center sm:justify-center"},void 0,_createRawReactElement("div",{className:"absolute -left-6 -top-24 z-0 hidden md:block"},void 0,_createRawReactElement(Sonar,{})),_createRawReactElement(IconButton$1,{title:tt.formatMessage(messages$r.menu),src:vitePluginRequire_1697864648800_96550775,onClick:kt,className:"mr-4 bg-transparent text-gray-700 hover:text-gray-600 dark:text-gray-600 md:hidden"}),_createRawReactElement(Link$2,{to:"/",className:"z-10"},void 0,_createRawReactElement(SiteLogo,{alt:"Logo",className:"h-6 w-auto cursor-pointer"}),_createRawReactElement("span",{className:"hidden"},void 0,tt.formatMessage(messages$r.home)))),_createRawReactElement(HStack,{space:6,alignItems:"center",className:"relative z-10 ml-10"},void 0,_createRawReactElement(HStack,{alignItems:"center"},void 0,_createRawReactElement(HStack,{space:6,alignItems:"center",className:"hidden md:mr-6 md:flex"},void 0,ct.get("help")&&_createRawReactElement("a",{href:ct.get("help"),target:"_blank",className:"text-sm font-medium text-gray-700 hover:underline dark:text-gray-600"},void 0,_createRawReactElement(FormattedMessage$1,{id:"landing_page_modal.helpCenter",defaultMessage:"Help Center"}))),_createRawReactElement(HStack,{space:2,className:"shrink-0 xl:hidden"},void 0,_createRawReactElement(Button,{to:"/login",theme:"tertiary"},void 0,tt.formatMessage(messages$r.login)),st&&_createRawReactElement(Button,{to:"/signup",theme:"primary"},void 0,tt.formatMessage(messages$r.register)))),_createRawReactElement(Form,{className:"hidden items-center space-x-2 rtl:space-x-reverse xl:flex",onSubmit:Pt},void 0,_createRawReactElement(Input,{required:!0,value:Et,onChange:function(Dt){return yt(Dt.target.value.trim())},type:"text",placeholder:tt.formatMessage(nt.logInWithUsername?messages$r.username:messages$r.email),className:"max-w-[200px]",autoCorrect:"off",autoCapitalize:"off"}),_createRawReactElement(Input,{required:!0,value:St,onChange:function(Dt){return Rt(Dt.target.value)},type:"password",placeholder:tt.formatMessage(messages$r.password),className:"max-w-[200px]",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"}),_createRawReactElement(Link$2,{to:"/reset-password"},void 0,_createRawReactElement(Tooltip,{text:tt.formatMessage(messages$r.forgotPassword)},void 0,_createRawReactElement(IconButton$1,{src:vitePluginRequire_1697864645807_43713269,className:"cursor-pointer bg-transparent text-gray-700 hover:text-gray-800 dark:text-gray-600 dark:hover:text-gray-500",iconClassName:"h-5 w-5"}))),_createRawReactElement(Button,{theme:"primary",type:"submit",disabled:ft},void 0,tt.formatMessage(messages$r.login)))))))},PublicLayout=function _e(){var et=useAppSelector(function(tt){return isStandalone(tt)});return et?_createRawReactElement(Redirect,{to:"/login/external"}):_createRawReactElement("div",{className:"h-full"},void 0,_createRawReactElement(LandingGradient,{}),_createRawReactElement("div",{className:"flex h-screen flex-col"},void 0,_createRawReactElement("div",{className:"shrink-0"},void 0,_createRawReactElement(Header$1,{}),_createRawReactElement("div",{className:"relative"},void 0,_createRawReactElement(Switch,{},void 0,_createRawReactElement(Route$1,{exact:!0,path:"/",component:LandingPage}),_createRawReactElement(Route$1,{exact:!0,path:"/about/:slug?",component:AboutPage})))),_createRawReactElement(Footer,{})))};function _taggedTemplateLiteral(_e,et){return et||(et=_e.slice(0)),Object.freeze(Object.defineProperties(_e,{raw:{value:Object.freeze(et)}}))}const prefersReducedMotion=(()=>{let _e;return()=>{if(_e===void 0&&typeof window<"u"){const et=matchMedia("(prefers-reduced-motion: reduce)");_e=!et||et.matches}return _e}})();var _templateObject$1,_templateObject2;function ownKeys$6(_e,et){var tt=Object.keys(_e);if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(_e);et&&(nt=nt.filter(function(rt){return Object.getOwnPropertyDescriptor(_e,rt).enumerable})),tt.push.apply(tt,nt)}return tt}function _objectSpread$5(_e){for(var et=1;et * { pointer-events: auto; } -`]))),DEFAULT_OFFSET="16px",Toaster=function _e(et){var tt=et.reverseOrder,nt=et.position,rt=nt===void 0?"top-center":nt,at=et.toastOptions,it=et.gutter,ot=et.children,st=et.containerStyle,ct=et.containerClassName,ut=D(at),dt=ut.toasts,ft=ut.handlers,pt=u$1(_objectSpread$4({position:"fixed",zIndex:9999,top:DEFAULT_OFFSET,left:DEFAULT_OFFSET,right:DEFAULT_OFFSET,bottom:DEFAULT_OFFSET,pointerEvents:"none"},st));return _createRawReactElement("div",{className:clsx(ct,pt),onMouseEnter:ft.startPause,onMouseLeave:ft.endPause},void 0,dt.map(function(mt){var ht=mt.position||rt,Et=ft.calculateOffset(mt,{reverseOrder:tt,gutter:it,defaultPosition:rt}),yt=getPositionClassName(ht,Et);return _createRawReactElement(ToastWrapper,{id:mt.id,onHeightUpdate:ft.updateHeight,className:clsx(mt.visible?activeClass:"",yt)},mt.id,mt.type==="custom"?T(mt.message,mt):ot?ot(mt):_createRawReactElement(ToastBar,{toast:mt,position:ht}))}))};const createGlobals=_e=>{const et={isDeveloper:(tt=!0)=>{if(![!0,!1].includes(tt))throw`Invalid option ${tt}. Must be true or false.`;return _e.dispatch(changeSettingImmediate(["isDeveloper"],tt)),tt}};window.Soapbox=et};var getNative=_getNative,defineProperty$1=function(){try{var _e=getNative(Object,"defineProperty");return _e({},"",{}),_e}catch{}}(),_defineProperty$1=defineProperty$1,defineProperty=_defineProperty$1;function baseAssignValue$1(_e,et,tt){et=="__proto__"&&defineProperty?defineProperty(_e,et,{configurable:!0,enumerable:!0,value:tt,writable:!0}):_e[et]=tt}var _baseAssignValue=baseAssignValue$1;function createBaseFor$1(_e){return function(et,tt,nt){for(var rt=-1,at=Object(et),it=nt(et),ot=it.length;ot--;){var st=it[_e?ot:++rt];if(tt(at[st],st,at)===!1)break}return et}}var _createBaseFor=createBaseFor$1,createBaseFor=_createBaseFor,baseFor$1=createBaseFor(),_baseFor=baseFor$1,baseFor=_baseFor,keys$1=keys_1;function baseForOwn$1(_e,et){return _e&&baseFor(_e,et,keys$1)}var _baseForOwn=baseForOwn$1,baseAssignValue=_baseAssignValue,baseForOwn=_baseForOwn,baseIteratee=_baseIteratee;function mapValues(_e,et){var tt={};return et=baseIteratee(et),baseForOwn(_e,function(nt,rt,at){baseAssignValue(tt,rt,et(nt,rt,at))}),tt}var mapValues_1=mapValues;const mapValues$1=getDefaultExportFromCjs$1(mapValues_1),PLEROMA_PRELOAD_IMPORT="PLEROMA_PRELOAD_IMPORT",MASTODON_PRELOAD_IMPORT="MASTODON_PRELOAD_IMPORT",decodeUTF8Base64=_e=>{const et=atob(_e),tt=Uint8Array.from(et.split("").map(rt=>rt.charCodeAt(0)));return new TextDecoder().decode(tt)},decodePleromaData=_e=>mapValues$1(_e,et=>JSON.parse(decodeUTF8Base64(et))),pleromaDecoder=_e=>decodePleromaData(JSON.parse(_e)),decodeFromMarkup=(_e,et)=>{const{textContent:tt}=document.getElementById(_e);return et(tt)},preloadFromMarkup=(_e,et,tt)=>nt=>{try{const rt=decodeFromMarkup(_e,et);nt(tt(rt))}catch{}},preload=()=>_e=>{_e(preloadFromMarkup("initial-results",pleromaDecoder,preloadPleroma)),_e(preloadFromMarkup("initial-state",JSON.parse,preloadMastodon))},preloadPleroma=_e=>({type:PLEROMA_PRELOAD_IMPORT,data:_e}),preloadMastodon=_e=>et=>{const{me:tt,access_token:nt}=_e.meta,{url:rt}=_e.accounts[tt];et(importFetchedAccounts(Object.values(_e.accounts))),et(verifyCredentials(nt,rt)),et({type:MASTODON_PRELOAD_IMPORT,data:_e})},start=()=>{Promise.all([__vitePreload(()=>import("./js/index-8f3060b3.js"),["packs/js/index-8f3060b3.js","packs/js/browsertracing-7f035310.js"]),__vitePreload(()=>import("./js/index-e9273806.js"),["packs/js/index-e9273806.js","packs/js/browsertracing-7f035310.js"])]).then(([_e,{Integrations:et}])=>{_e.init({dsn:SENTRY_DSN,environment:NODE_ENV,debug:!1,integrations:[new et.BrowserTracing],ignoreErrors:["AxiosError","Failed to update a ServiceWorker for scope","AbortError","No available storage method found"],denyUrls:[/extensions\//i,/^chrome:\/\//i,/^moz-extension:\/\//i],tracesSampleRate:1})}).catch(console.error)},captureException=(_e,et)=>{__vitePreload(()=>import("./js/index-8f3060b3.js"),["packs/js/index-8f3060b3.js","packs/js/browsertracing-7f035310.js"]).then(tt=>{tt.captureException(_e,et)}).catch(console.error)},registerSw=_e=>{"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register(_e,{scope:"/"})})},unregisterSw=async()=>{if(navigator.serviceWorker){const et=(await navigator.serviceWorker.getRegistrations()).map(tt=>tt.unregister());await Promise.all(et)}};function _createSuper$2(_e){var et=_isNativeReflectConstruct$2();return function(){var nt=_getPrototypeOf$1(_e),rt;if(et){var at=_getPrototypeOf$1(this).constructor;rt=Reflect.construct(nt,arguments,at)}else rt=nt.apply(this,arguments);return _possibleConstructorReturn$1(this,rt)}}function _isNativeReflectConstruct$2(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var goHome=function _e(){return location.href="/"},mapStateToProps$1=function _e(et){var tt=getSoapboxConfig(et),nt=tt.links,rt=tt.logo;return{siteTitle:et.instance.title,logo:rt,links:nt}},ErrorBoundary=function(_e){_inherits$1(tt,_e);var et=_createSuper$2(tt);function tt(){var nt;_classCallCheck$1(this,tt);for(var rt=arguments.length,at=new Array(rt),it=0;itimport("./js/bowser-1e7dda30.js"),[]).then(function(ot){var st=ot.default;it.setState({browser:st.getParser(window.navigator.userAgent)})}).catch(function(){})}},{key:"render",value:function(){var rt=this.state,at=rt.browser,it=rt.hasError,ot=this.props,st=ot.children,ct=ot.links;if(!it)return st;var ut=NODE_ENV==="production",dt=this.getErrorText();return _createRawReactElement("div",{className:"flex h-screen flex-col bg-white pb-12 pt-16 dark:bg-primary-900"},void 0,_createRawReactElement("main",{className:"mx-auto flex w-full max-w-7xl grow flex-col justify-center px-4 sm:px-6 lg:px-8"},void 0,_createRawReactElement("div",{className:"flex shrink-0 justify-center"},void 0,_createRawReactElement("a",{href:"/",className:"inline-flex"},void 0,_createRawReactElement(SiteLogo,{alt:"Logo",className:"h-12 w-auto cursor-pointer"}))),_createRawReactElement("div",{className:"py-8"},void 0,_createRawReactElement("div",{className:"mx-auto max-w-xl space-y-2 text-center"},void 0,_createRawReactElement("h1",{className:"text-3xl font-extrabold tracking-tight text-gray-900 dark:text-gray-500 sm:text-4xl"},void 0,_createRawReactElement(FormattedMessage$1,{id:"alert.unexpected.message",defaultMessage:"Something went wrong."})),_createRawReactElement("p",{className:"text-lg text-gray-700 dark:text-gray-600"},void 0,_createRawReactElement(FormattedMessage$1,{id:"alert.unexpected.body",defaultMessage:"We're sorry for the interruption. If the problem persists, please reach out to our support team. You may also try to {clearCookies} (this will log you out).",values:{clearCookies:_createRawReactElement("a",{href:"/",onClick:this.clearCookies,className:"text-primary-600 hover:underline dark:text-accent-blue"},void 0,_createRawReactElement(FormattedMessage$1,{id:"alert.unexpected.clear_cookies",defaultMessage:"clear cookies and browser data"}))}})),_createRawReactElement(Text$2,{theme:"muted"},void 0,_createRawReactElement(Text$2,{weight:"medium",tag:"span",theme:"muted"},void 0,sourceCode.displayName,":")," ",sourceCode.version),_createRawReactElement("div",{className:"mt-10"},void 0,_createRawReactElement("a",{href:"/",className:"text-base font-medium text-primary-600 hover:underline dark:text-accent-blue"},void 0,_createRawReactElement(FormattedMessage$1,{id:"alert.unexpected.return_home",defaultMessage:"Return Home"}),_createRawReactElement("span",{"aria-hidden":"true"},void 0," →")))),!ut&&_createRawReactElement("div",{className:"mx-auto max-w-lg space-y-4 py-16"},void 0,dt&&React$3.createElement("textarea",{ref:this.setTextareaRef,className:"block h-48 w-full rounded-md border-gray-300 bg-gray-100 p-4 font-mono text-gray-900 shadow-sm focus:border-primary-500 focus:ring-2 focus:ring-primary-500 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-100 sm:text-sm",value:dt,onClick:this.handleCopy,readOnly:!0}),at&&_createRawReactElement(Stack,{},void 0,_createRawReactElement(Text$2,{weight:"semibold"},void 0,_createRawReactElement(FormattedMessage$1,{id:"alert.unexpected.browser",defaultMessage:"Browser"})),_createRawReactElement(Text$2,{theme:"muted"},void 0,at.getBrowserName()," ",at.getBrowserVersion()))))),_createRawReactElement("footer",{className:"mx-auto w-full max-w-7xl shrink-0 px-4 sm:px-6 lg:px-8"},void 0,_createRawReactElement(HStack,{justifyContent:"center",space:4,element:"nav"},void 0,ct.get("status")&&React$3.createElement(React$3.Fragment,null,_createRawReactElement("a",{href:ct.get("status"),className:"text-sm font-medium text-gray-700 hover:underline dark:text-gray-600"},void 0,_createRawReactElement(FormattedMessage$1,{id:"alert.unexpected.links.status",defaultMessage:"Status"}))),ct.get("help")&&React$3.createElement(React$3.Fragment,null,_createRawReactElement("span",{className:"inline-block border-l border-gray-300","aria-hidden":"true"}),_createRawReactElement("a",{href:ct.get("help"),className:"text-sm font-medium text-gray-700 hover:underline dark:text-gray-600"},void 0,_createRawReactElement(FormattedMessage$1,{id:"alert.unexpected.links.help",defaultMessage:"Help Center"}))),ct.get("support")&&React$3.createElement(React$3.Fragment,null,_createRawReactElement("span",{className:"inline-block border-l border-gray-300","aria-hidden":"true"}),_createRawReactElement("a",{href:ct.get("support"),className:"text-sm font-medium text-gray-700 hover:underline dark:text-gray-600"},void 0,_createRawReactElement(FormattedMessage$1,{id:"alert.unexpected.links.support",defaultMessage:"Support"}))))))}}]),tt}(React$3.PureComponent);const ErrorBoundary$1=connect(mapStateToProps$1)(ErrorBoundary),CUSTOM_EMOJIS_FETCH_REQUEST="CUSTOM_EMOJIS_FETCH_REQUEST",CUSTOM_EMOJIS_FETCH_SUCCESS="CUSTOM_EMOJIS_FETCH_SUCCESS",CUSTOM_EMOJIS_FETCH_FAIL="CUSTOM_EMOJIS_FETCH_FAIL",fetchCustomEmojis=()=>(_e,et)=>{et().me&&(_e(fetchCustomEmojisRequest()),api(et).get("/api/v1/custom_emojis").then(nt=>{_e(fetchCustomEmojisSuccess(nt.data))}).catch(nt=>{_e(fetchCustomEmojisFail(nt))}))},fetchCustomEmojisRequest=()=>({type:CUSTOM_EMOJIS_FETCH_REQUEST,skipLoading:!0}),fetchCustomEmojisSuccess=_e=>({type:CUSTOM_EMOJIS_FETCH_SUCCESS,custom_emojis:_e,skipLoading:!0}),fetchCustomEmojisFail=_e=>({type:CUSTOM_EMOJIS_FETCH_FAIL,error:_e,skipLoading:!0}),PUSH_SUBSCRIPTION_CREATE_REQUEST="PUSH_SUBSCRIPTION_CREATE_REQUEST",PUSH_SUBSCRIPTION_CREATE_SUCCESS="PUSH_SUBSCRIPTION_CREATE_SUCCESS",PUSH_SUBSCRIPTION_CREATE_FAIL="PUSH_SUBSCRIPTION_CREATE_FAIL",createPushSubscription=_e=>(et,tt)=>(et({type:PUSH_SUBSCRIPTION_CREATE_REQUEST,params:_e}),api(tt).post("/api/v1/push/subscription",_e).then(({data:nt})=>et({type:PUSH_SUBSCRIPTION_CREATE_SUCCESS,params:_e,subscription:nt})).catch(nt=>et({type:PUSH_SUBSCRIPTION_CREATE_FAIL,params:_e,error:nt}))),decode=_e=>{const et=window.atob(_e),tt=new Uint8Array(et.length);for(let nt=0;nt({type:SET_BROWSER_SUPPORT,value:_e}),setSubscription=_e=>({type:SET_SUBSCRIPTION,subscription:_e}),clearSubscription=()=>({type:CLEAR_SUBSCRIPTION}),urlBase64ToUint8Array=_e=>{const et="=".repeat((4-_e.length%4)%4),tt=(_e+et).replace(/-/g,"+").replace(/_/g,"/");return decode(tt)},getRegistration=()=>{if(navigator.serviceWorker)return navigator.serviceWorker.ready;throw"Your browser does not support Service Workers."},getPushSubscription=_e=>_e.pushManager.getSubscription().then(et=>({registration:_e,subscription:et})),subscribe=(_e,et)=>_e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:urlBase64ToUint8Array(getVapidKey(et()))}),unsubscribe=({registration:_e,subscription:et})=>et?et.unsubscribe().then(()=>_e):new Promise(tt=>tt(_e)),sendSubscriptionToBackend=(_e,et)=>(tt,nt)=>{const rt=nt().push_notifications.alerts.toJS(),at={subscription:_e,data:{alerts:rt}};if(et){const it=pushNotificationsSetting.get(et);it&&(at.data=it)}return tt(createPushSubscription(at))},supportsPushNotifications="serviceWorker"in navigator&&"PushManager"in window&&"getKey"in PushSubscription.prototype,register=()=>(_e,et)=>{const tt=et().me,nt=getVapidKey(et());if(_e(setBrowserSupport(supportsPushNotifications)),!supportsPushNotifications){console.warn("Your browser does not support Web Push Notifications.");return}if(!nt){console.error("The VAPID public key is not set. You will not be able to receive Web Push Notifications.");return}getRegistration().then(getPushSubscription).then(({registration:rt,subscription:at})=>{var it;if(at!==null){const ot=new Uint8Array(at.options.applicationServerKey).toString(),st=urlBase64ToUint8Array(nt).toString(),ct=(it=et().push_notifications.subscription)==null?void 0:it.endpoint;return st===ot&&at.endpoint===ct?{subscription:at}:unsubscribe({registration:rt,subscription:at}).then(ut=>subscribe(ut,et)).then(ut=>_e(sendSubscriptionToBackend(ut,tt)))}return subscribe(rt,et).then(ot=>_e(sendSubscriptionToBackend(ot,tt)))}).then(({subscription:rt})=>{rt instanceof PushSubscription||(_e(setSubscription(rt)),tt&&pushNotificationsSetting.set(tt,{alerts:rt.alerts}))}).catch(rt=>(rt.code===20&&rt.name==="AbortError"?console.warn("Your browser supports Web Push Notifications, but does not seem to implement the VAPID protocol."):rt.code===5&&rt.name==="InvalidCharacterError"&&console.error("The VAPID public key seems to be invalid:",nt),_e(clearSubscription()),tt&&pushNotificationsSetting.remove(tt),getRegistration().then(getPushSubscription).then(unsubscribe))).catch(console.warn)},SCHEDULED_STATUSES_FETCH_REQUEST="SCHEDULED_STATUSES_FETCH_REQUEST",SCHEDULED_STATUSES_FETCH_SUCCESS="SCHEDULED_STATUSES_FETCH_SUCCESS",SCHEDULED_STATUSES_FETCH_FAIL="SCHEDULED_STATUSES_FETCH_FAIL",SCHEDULED_STATUSES_EXPAND_REQUEST="SCHEDULED_STATUSES_EXPAND_REQUEST",SCHEDULED_STATUSES_EXPAND_SUCCESS="SCHEDULED_STATUSES_EXPAND_SUCCESS",SCHEDULED_STATUSES_EXPAND_FAIL="SCHEDULED_STATUSES_EXPAND_FAIL",SCHEDULED_STATUS_CANCEL_REQUEST="SCHEDULED_STATUS_CANCEL_REQUEST",SCHEDULED_STATUS_CANCEL_SUCCESS="SCHEDULED_STATUS_CANCEL_SUCCESS",SCHEDULED_STATUS_CANCEL_FAIL="SCHEDULED_STATUS_CANCEL_FAIL",fetchScheduledStatuses=()=>(_e,et)=>{var at;const tt=et();if((at=tt.status_lists.get("scheduled_statuses"))!=null&&at.isLoading)return;const nt=tt.instance;getFeatures(nt).scheduledStatuses&&(_e(fetchScheduledStatusesRequest()),api(et).get("/api/v1/scheduled_statuses").then(it=>{const ot=getLinks(it).refs.find(st=>st.rel==="next");_e(fetchScheduledStatusesSuccess(it.data,ot?ot.uri:null))}).catch(it=>{_e(fetchScheduledStatusesFail(it))}))},cancelScheduledStatus=_e=>(et,tt)=>{et({type:SCHEDULED_STATUS_CANCEL_REQUEST,id:_e}),api(tt).delete(`/api/v1/scheduled_statuses/${_e}`).then(({data:nt})=>{et({type:SCHEDULED_STATUS_CANCEL_SUCCESS,id:_e,data:nt})}).catch(nt=>{et({type:SCHEDULED_STATUS_CANCEL_FAIL,id:_e,error:nt})})},fetchScheduledStatusesRequest=()=>({type:SCHEDULED_STATUSES_FETCH_REQUEST}),fetchScheduledStatusesSuccess=(_e,et)=>({type:SCHEDULED_STATUSES_FETCH_SUCCESS,statuses:_e,next:et}),fetchScheduledStatusesFail=_e=>({type:SCHEDULED_STATUSES_FETCH_FAIL,error:_e}),expandScheduledStatuses=()=>(_e,et)=>{var nt,rt;const tt=((nt=et().status_lists.get("scheduled_statuses"))==null?void 0:nt.next)||null;tt===null||(rt=et().status_lists.get("scheduled_statuses"))!=null&&rt.isLoading||(_e(expandScheduledStatusesRequest()),api(et).get(tt).then(at=>{const it=getLinks(at).refs.find(ot=>ot.rel==="next");_e(expandScheduledStatusesSuccess(at.data,it?it.uri:null))}).catch(at=>{_e(expandScheduledStatusesFail(at))}))},expandScheduledStatusesRequest=()=>({type:SCHEDULED_STATUSES_EXPAND_REQUEST}),expandScheduledStatusesSuccess=(_e,et)=>({type:SCHEDULED_STATUSES_EXPAND_SUCCESS,statuses:_e,next:et}),expandScheduledStatusesFail=_e=>({type:SCHEDULED_STATUSES_EXPAND_FAIL,error:_e}),SUGGESTIONS_FETCH_REQUEST="SUGGESTIONS_FETCH_REQUEST",SUGGESTIONS_FETCH_SUCCESS="SUGGESTIONS_FETCH_SUCCESS",SUGGESTIONS_FETCH_FAIL="SUGGESTIONS_FETCH_FAIL",SUGGESTIONS_DISMISS="SUGGESTIONS_DISMISS",SUGGESTIONS_V2_FETCH_REQUEST="SUGGESTIONS_V2_FETCH_REQUEST",SUGGESTIONS_V2_FETCH_SUCCESS="SUGGESTIONS_V2_FETCH_SUCCESS",SUGGESTIONS_V2_FETCH_FAIL="SUGGESTIONS_V2_FETCH_FAIL",SUGGESTIONS_TRUTH_FETCH_SUCCESS="SUGGESTIONS_TRUTH_FETCH_SUCCESS",fetchSuggestionsV1=(_e={})=>(et,tt)=>(et({type:SUGGESTIONS_FETCH_REQUEST,skipLoading:!0}),api(tt).get("/api/v1/suggestions",{params:_e}).then(({data:nt})=>(et(importFetchedAccounts(nt)),et({type:SUGGESTIONS_FETCH_SUCCESS,accounts:nt,skipLoading:!0}),nt)).catch(nt=>{throw et({type:SUGGESTIONS_FETCH_FAIL,error:nt,skipLoading:!0,skipAlert:!0}),nt})),fetchSuggestionsV2=(_e={})=>(et,tt)=>{const nt=tt().suggestions.next;return et({type:SUGGESTIONS_V2_FETCH_REQUEST,skipLoading:!0}),api(tt).get(nt||"/api/v2/suggestions",nt?{}:{params:_e}).then(rt=>{var st;const at=rt.data,it=at.map(({account:ct})=>ct),ot=(st=getLinks(rt).refs.find(ct=>ct.rel==="next"))==null?void 0:st.uri;return et(importFetchedAccounts(it)),et({type:SUGGESTIONS_V2_FETCH_SUCCESS,suggestions:at,next:ot,skipLoading:!0}),at}).catch(rt=>{throw et({type:SUGGESTIONS_V2_FETCH_FAIL,error:rt,skipLoading:!0,skipAlert:!0}),rt})},mapSuggestedProfileToAccount=_e=>({id:_e.account_id,avatar:_e.account_avatar,avatar_static:_e.account_avatar,acct:_e.acct,display_name:_e.display_name,note:_e.note,verified:_e.verified}),fetchTruthSuggestions=(_e={})=>(et,tt)=>{const nt=tt().suggestions.next;return et({type:SUGGESTIONS_V2_FETCH_REQUEST,skipLoading:!0}),api(tt).get(nt||"/api/v1/truth/carousels/suggestions",nt?{}:{params:_e}).then(rt=>{var st;const at=rt.data,it=(st=getLinks(rt).refs.find(ct=>ct.rel==="next"))==null?void 0:st.uri,ot=at.map(mapSuggestedProfileToAccount);return et(importFetchedAccounts(ot,{should_refetch:!0})),et({type:SUGGESTIONS_TRUTH_FETCH_SUCCESS,suggestions:at,next:it,skipLoading:!0}),at}).catch(rt=>{throw et({type:SUGGESTIONS_V2_FETCH_FAIL,error:rt,skipLoading:!0,skipAlert:!0}),rt})},fetchSuggestions=(_e={limit:50})=>(et,tt)=>{const nt=tt(),rt=nt.me,at=nt.instance,it=getFeatures(at);return rt?it.truthSuggestions?et(fetchTruthSuggestions(_e)).then(ot=>{const st=ot.map(ct=>ct.account_id);et(fetchRelationships(st))}).catch(()=>{}):it.suggestionsV2?et(fetchSuggestionsV2(_e)).then(ot=>{const st=ot.map(({account:ct})=>ct.id);et(fetchRelationships(st))}).catch(()=>{}):it.suggestions?et(fetchSuggestionsV1(_e)).then(ot=>{const st=ot.map(({id:ct})=>ct);et(fetchRelationships(st))}).catch(()=>{}):null:null},fetchSuggestionsForTimeline=()=>(_e,et)=>{var tt;(tt=_e(fetchSuggestions({limit:20})))==null||tt.then(()=>_e(insertSuggestionsIntoTimeline()))};var ColumnLoading=function _e(){return _createRawReactElement(Card$1,{variant:"rounded"},void 0,_createRawReactElement(CardBody,{},void 0,_createRawReactElement(Spinner,{})))};function ownKeys$4(_e,et){var tt=Object.keys(_e);if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(_e);et&&(nt=nt.filter(function(rt){return Object.getOwnPropertyDescriptor(_e,rt).enumerable})),tt.push.apply(tt,nt)}return tt}function _objectSpread$3(_e){for(var et=1;et0)&&Et.push({to:"/follow_requests",text:et.formatMessage(messages$q.follow_requests),icon:vitePluginRequire_1697861809668_78443957,count:ut}),rt.bookmarks&&Et.push({to:"/bookmarks",text:et.formatMessage(messages$q.bookmarks),icon:vitePluginRequire_1697861810834_3571213}),rt.lists&&Et.push({to:"/lists",text:et.formatMessage(messages$q.lists),icon:vitePluginRequire_1697861809668_56661171}),rt.events&&Et.push({to:"/events",text:et.formatMessage(messages$q.events),icon:vitePluginRequire_1697861812355_68809854}),at.get("isDeveloper")&&Et.push({to:"/developers",icon:vitePluginRequire_1697861809669_92946826,text:et.formatMessage(messages$q.developers)}),ot.staff&&Et.push({to:"/ghostbox/admin",icon:vitePluginRequire_1697861801656_16167777,text:et.formatMessage(messages$q.dashboard)}),Et.push({to:"/settings",icon:vitePluginRequire_1697861809669_39550187,text:et.formatMessage(messages$q.settings)})),Et},pt=ft(),mt=function(){return rt.chats?_createRawReactElement(SidebarNavigationLink,{to:"/chats",icon:vitePluginRequire_1697861810834_58630734,count:nt,countMax:9,text:_createRawReactElement(FormattedMessage$1,{id:"navigation.chats",defaultMessage:"Chats"})}):rt.directTimeline||rt.conversations?_createRawReactElement(SidebarNavigationLink,{to:"/messages",icon:vitePluginRequire_1697861810834_33454440,text:_createRawReactElement(FormattedMessage$1,{id:"navigation.direct_messages",defaultMessage:"Messages"})}):null};return _createRawReactElement(Stack,{space:4},void 0,_createRawReactElement(Stack,{space:2},void 0,React$3.createElement(SidebarNavigationLink,{to:"/",icon:vitePluginRequire_1697861824494_8991836,text:_createRawReactElement(FormattedMessage$1,{id:"tabs_bar.home",defaultMessage:"Home"}),ref:useHotkey("g h")}),_createRawReactElement(SidebarNavigationLink,{to:"/search",icon:vitePluginRequire_1697861811668_22999030,text:_createRawReactElement(FormattedMessage$1,{id:"tabs_bar.search",defaultMessage:"Search"})}),rt.publicTimeline&&React$3.createElement(React$3.Fragment,null,_createRawReactElement(SidebarNavigationLink,{to:"/timeline/local",icon:rt.federating?vitePluginRequire_1697861825077_25405513:vitePluginRequire_1697861826920_76919417,text:rt.federating?_createRawReactElement(FormattedMessage$1,{id:"tabs_bar.local",defaultMessage:"Local"}):_createRawReactElement(FormattedMessage$1,{id:"tabs_bar.all",defaultMessage:"All"})}),rt.federating&&_createRawReactElement(SidebarNavigationLink,{to:"/timeline/fediverse",icon:vitePluginRequire_1697861809669_87134921,text:_createRawReactElement(FormattedMessage$1,{id:"tabs_bar.fediverse",defaultMessage:"Fediverse"})})),ot&&React$3.createElement(React$3.Fragment,null,React$3.createElement(SidebarNavigationLink,{to:"/notifications",icon:vitePluginRequire_1697861831311_54316318,count:ct,text:_createRawReactElement(FormattedMessage$1,{id:"tabs_bar.notifications",defaultMessage:"Notifications"}),ref:useHotkey("g n")}),mt(),rt.groups&&_createRawReactElement(SidebarNavigationLink,{to:st,icon:vitePluginRequire_1697861811664_62987830,text:_createRawReactElement(FormattedMessage$1,{id:"tabs_bar.groups",defaultMessage:"Groups"})}),React$3.createElement(SidebarNavigationLink,{to:"/@".concat(ot.acct),icon:vitePluginRequire_1697861809668_3303363,text:_createRawReactElement(FormattedMessage$1,{id:"tabs_bar.profile",defaultMessage:"Profile"}),ref:useHotkey("g u")})),pt.length>0&&_createRawReactElement(DropdownMenu,{items:pt,placement:"top"},void 0,_createRawReactElement(SidebarNavigationLink,{icon:vitePluginRequire_1697861801643_24209196,count:ot!=null&&ot.staff?dt:void 0,text:_createRawReactElement(FormattedMessage$1,{id:"tabs_bar.more",defaultMessage:"More"})}))),ot&&_createRawReactElement(ComposeButton,{}))},_excluded$4=["icon","count","countMax"],IconWithCounter=function _e(et){var tt=et.icon,nt=et.count,rt=et.countMax,at=_objectWithoutProperties(et,_excluded$4);return _createRawReactElement("div",{className:"relative"},void 0,React$3.createElement(Icon,_extends$4({id:tt},at)),nt>0&&_createRawReactElement("span",{className:"absolute -right-3 -top-2"},void 0,_createRawReactElement(Counter,{count:nt,countMax:rt})))},ThumbNavigationLink=function _e(et){var tt=et.count,nt=et.countMax,rt=et.src,at=et.text,it=at===void 0?void 0:at,ot=et.to,st=et.exact,ct=et.paths,ut=useLocation$1(),dt=ut.pathname,ft=function(){return ct?ct.some(function(Et){return dt.startsWith(Et)}):st?dt===ot:dt.startsWith(ot)},pt=ft(),mt=clsx({"h-5 w-5":it!==void 0,"h-6 w-6":it===void 0,"text-gray-600":!pt,"text-primary-500":pt});return _createRawReactElement(NavLink,{to:ot,exact:st,className:"thumb-navigation__link"},void 0,tt!==void 0?_createRawReactElement(IconWithCounter,{src:rt,className:mt,count:tt,countMax:nt}):_createRawReactElement(Icon$1,{src:rt,className:mt}),it!==void 0&&_createRawReactElement(Text$2,{tag:"span",size:"xs",weight:"medium",className:clsx({"text-gray-600":!pt,"text-primary-500":pt})},void 0,it))},ThumbNavigation=function _e(){var et=useOwnAccount(),tt=et.account,nt=useFeatures(),rt=useGroupsPath(),at=useStatContext(),it=at.unreadChatsCount,ot=useAppSelector(function(ut){return ut.notifications.unread}),st=useAppSelector(function(ut){return ut.admin.openReports.count()+ut.admin.awaitingApproval.count()}),ct=[];return ct.push({src:vitePluginRequire_1697861824494_8991836,text:_createRawReactElement(FormattedMessage$1,{id:"navigation.home",defaultMessage:"Home"}),to:"/",exact:!0}),nt.groups&&ct.push({src:vitePluginRequire_1697861811664_62987830,text:_createRawReactElement(FormattedMessage$1,{id:"tabs_bar.groups",defaultMessage:"Groups"}),to:rt,exact:!0}),ct.push({src:vitePluginRequire_1697861811668_22999030,text:_createRawReactElement(FormattedMessage$1,{id:"navigation.search",defaultMessage:"Search"}),to:"/search",exact:!0}),tt&&ct.push({src:vitePluginRequire_1697861831311_54316318,text:_createRawReactElement(FormattedMessage$1,{id:"navigation.notifications",defaultMessage:"Alerts"}),to:"/notifications",exact:!0,count:ot}),nt.chats?ct.push({src:vitePluginRequire_1697861810834_58630734,text:_createRawReactElement(FormattedMessage$1,{id:"navigation.chats",defaultMessage:"Chats"}),to:"/chats",exact:!0,count:it,countMax:9}):(nt.directTimeline||nt.conversations)&&ct.push({src:vitePluginRequire_1697861810834_33454440,text:_createRawReactElement(FormattedMessage$1,{id:"navigation.direct_messages",defaultMessage:"Messages"}),to:"/messages",paths:["/messages","/conversations"]}),tt&&tt.staff&&ct.push({src:vitePluginRequire_1697861801656_16167777,text:_createRawReactElement(FormattedMessage$1,{id:"navigation.dashboard",defaultMessage:"Dashboard"}),to:"/ghostbox/admin",count:st}),_createRawReactElement("div",{className:"thumb-navigation"},void 0,ct.map(function(ut,dt){return ct.length>=5&&(ut.text=void 0),React$3.createElement(ThumbNavigationLink,_extends$4({key:dt},ut))}))},_excluded$3=["children","className"],FooterLink=function _e(et){var tt=et.children,nt=et.className,rt=_objectWithoutProperties(et,_excluded$3);return _createRawReactElement("div",{},void 0,React$3.createElement(Link$2,_extends$4({className:clsx("text-gray-700 hover:text-gray-800 hover:underline dark:text-gray-600 dark:hover:text-gray-500",nt)},rt),tt))},LinkFooter=function _e(){var et=useOwnAccount(),tt=et.account,nt=useFeatures(),rt=useSoapboxConfig(),at=useBackend(),it=useAppDispatch(),ot=function(ct){it(logOut$1()),ct.preventDefault()};return _createRawReactElement("div",{className:"space-y-2"},void 0,_createRawReactElement("div",{className:"divide-x-dot flex flex-wrap items-center text-gray-600"},void 0,tt&&React$3.createElement(React$3.Fragment,null,nt.profileDirectory&&_createRawReactElement(FooterLink,{to:"/directory"},void 0,_createRawReactElement(FormattedMessage$1,{id:"navigation_bar.profile_directory",defaultMessage:"Profile directory"})),_createRawReactElement(FooterLink,{to:"/blocks"},void 0,_createRawReactElement(FormattedMessage$1,{id:"navigation_bar.blocks",defaultMessage:"Blocks"})),_createRawReactElement(FooterLink,{to:"/mutes"},void 0,_createRawReactElement(FormattedMessage$1,{id:"navigation_bar.mutes",defaultMessage:"Mutes"})),(nt.filters||nt.filtersV2)&&_createRawReactElement(FooterLink,{to:"/filters"},void 0,_createRawReactElement(FormattedMessage$1,{id:"navigation_bar.filters",defaultMessage:"Filters"})),nt.followedHashtagsList&&_createRawReactElement(FooterLink,{to:"/followed_tags"},void 0,_createRawReactElement(FormattedMessage$1,{id:"navigation_bar.followed_tags",defaultMessage:"Followed hashtags"})),nt.federating&&_createRawReactElement(FooterLink,{to:"/domain_blocks"},void 0,_createRawReactElement(FormattedMessage$1,{id:"navigation_bar.domain_blocks",defaultMessage:"Domain blocks"})),tt.admin&&_createRawReactElement(FooterLink,{to:"/ghostbox/admin/config"},void 0,_createRawReactElement(FormattedMessage$1,{id:"navigation_bar.soapbox_config",defaultMessage:"Soapbox config"})),tt.locked&&_createRawReactElement(FooterLink,{to:"/follow_requests"},void 0,_createRawReactElement(FormattedMessage$1,{id:"navigation_bar.follow_requests",defaultMessage:"Follow requests"})),_createRawReactElement(FooterLink,{to:"/logout",onClick:ot},void 0,_createRawReactElement(FormattedMessage$1,{id:"navigation_bar.logout",defaultMessage:"Logout"})))),_createRawReactElement(Text$2,{theme:"muted",size:"sm"},void 0,rt.linkFooterMessage?_createRawReactElement("span",{className:"inline-block align-middle",dangerouslySetInnerHTML:{__html:emojify(rt.linkFooterMessage)}}):_createRawReactElement(FormattedMessage$1,{id:"getting_started.open_source_notice",defaultMessage:"{code_name} is open source software. You can contribute or report issues at {code_link} (v{code_version}). Powered by {backend_name} v{backend_version}.",values:{code_name:sourceCode.displayName,code_link:_createRawReactElement(Text$2,{theme:"subtle",tag:"span"},void 0,_createRawReactElement("a",{className:"underline",href:sourceCode.url,rel:"noopener",target:"_blank"},void 0,sourceCode.repository)),code_version:sourceCode.version,backend_name:at.software+(at.build?"+".concat(at.build):""),backend_version:at.version}})))},AdminPage=function _e(et){var tt=et.children;return React$3.createElement(React$3.Fragment,null,_createRawReactElement(Layout.Main,{},void 0,tt),_createRawReactElement(Layout.Aside,{},void 0,_createRawReactElement(BundleContainer,{fetchComponent:LatestAccountsPanel},void 0,function(nt){return _createRawReactElement(nt,{limit:5})}),_createRawReactElement(LinkFooter,{})))},ChatsPage=function _e(et){var tt=et.children;return _createRawReactElement("div",{className:"md:col-span-12 lg:col-span-9"},void 0,tt)},DefaultPage=function _e(et){var tt=et.children,nt=useAppSelector(function(at){return at.me}),rt=useFeatures();return React$3.createElement(React$3.Fragment,null,_createRawReactElement(Layout.Main,{},void 0,tt,!nt&&_createRawReactElement(BundleContainer,{fetchComponent:CtaBanner},void 0,function(at){return _createRawReactElement(at,{},"cta-banner")})),_createRawReactElement(Layout.Aside,{},void 0,!nt&&_createRawReactElement(BundleContainer,{fetchComponent:SignUpPanel},void 0,function(at){return _createRawReactElement(at,{},"sign-up-panel")}),rt.trends&&_createRawReactElement(BundleContainer,{fetchComponent:TrendsPanel},void 0,function(at){return _createRawReactElement(at,{limit:5},"trends-panel")}),nt&&rt.suggestions&&_createRawReactElement(BundleContainer,{fetchComponent:WhoToFollowPanel},void 0,function(at){return _createRawReactElement(at,{limit:3},"wtf-panel")}),_createRawReactElement(LinkFooter,{},"link-footer")))},PlaceholderAvatar=function _e(et){var tt=et.size,nt=et.withText,rt=nt===void 0?!1:nt,at=et.className,it=React$3.useMemo(function(){return tt?{width:"".concat(tt,"px"),height:"".concat(tt,"px")}:{}},[tt]);return _createRawReactElement(Stack,{space:2,className:clsx("animate-pulse text-center",at)},void 0,_createRawReactElement("div",{className:"mx-auto block rounded-full bg-primary-50 dark:bg-primary-800",style:it}),rt&&_createRawReactElement("div",{style:{width:tt,height:15},className:"mx-auto rounded-full bg-primary-50 dark:bg-primary-800"}))},PlaceholderDisplayName=function _e(et){var tt=et.minLength,nt=et.maxLength,rt=et.withSuffix,at=rt===void 0?!0:rt,it=randomIntFromInterval(nt,tt),ot=randomIntFromInterval(nt,tt);return _createRawReactElement("div",{className:"flex flex-col text-primary-50 dark:text-primary-800"},void 0,_createRawReactElement("p",{},void 0,generateText(it)),at&&_createRawReactElement("p",{},void 0,generateText(ot)))};const PlaceholderDisplayName$1=React$3.memo(PlaceholderDisplayName);var PlaceholderStatusContent=function _e(et){var tt=et.minLength,nt=et.maxLength,rt=randomIntFromInterval(nt,tt);return _createRawReactElement("div",{className:"flex flex-col text-primary-50 dark:text-primary-800"},void 0,_createRawReactElement("p",{className:"break-words"},void 0,generateText(rt)))},PlaceholderStatus=function _e(et){var tt=et.showPrivacyIndicator,nt=tt===void 0?!1:tt,rt=et.variant,at=function(){return nt?_createRawReactElement(StatusInfo,{visibility:"placeholder"}):null};return _createRawReactElement("div",{className:clsx({"status-placeholder bg-white dark:bg-primary-900 select-none":!0,"shadow-xl dark:shadow-none sm:rounded-xl px-4 py-6 sm:p-5":rt==="rounded","py-4":rt==="slim"})},void 0,_createRawReactElement("div",{className:"w-full animate-pulse overflow-hidden"},void 0,_createRawReactElement("div",{},void 0,at(),_createRawReactElement(HStack,{space:3,alignItems:"center"},void 0,_createRawReactElement("div",{className:"shrink-0"},void 0,_createRawReactElement(PlaceholderAvatar,{size:42})),_createRawReactElement("div",{className:"min-w-0 flex-1"},void 0,_createRawReactElement(PlaceholderDisplayName$1,{minLength:3,maxLength:25})))),_createRawReactElement("div",{className:"status__content-wrapper mt-4"},void 0,_createRawReactElement(PlaceholderStatusContent,{minLength:5,maxLength:120}))))};const PlaceholderStatus$1=React$3.memo(PlaceholderStatus);var getStatus=makeGetStatus(),EventPage=function _e(et){var tt=et.params,nt=et.children,rt=useAppSelector(function(mt){return mt.me}),at=useFeatures(),it=useHistory(),ot=tt==null?void 0:tt.statusId,st=useAppSelector(function(mt){return getStatus(mt,{id:ot})}),ct=st==null?void 0:st.event;if(st&&!ct)return it.push("/@".concat(st.getIn(["account","acct"]),"/posts/").concat(st.id)),_createRawReactElement(PlaceholderStatus$1,{});var ut=it.location.pathname,dt=ut.endsWith("/discussion")?"discussion":"info",ft=st?[{text:"Information",to:"/@".concat(st.getIn(["account","acct"]),"/events/").concat(st.id),name:"info"},{text:"Discussion",to:"/@".concat(st.getIn(["account","acct"]),"/events/").concat(st.id,"/discussion"),name:"discussion"}]:[],pt=!["/participations","participation_requests"].some(function(mt){return ut.endsWith(mt)});return React$3.createElement(React$3.Fragment,null,_createRawReactElement(Layout.Main,{},void 0,_createRawReactElement(Column,{label:ct==null?void 0:ct.name,withHeader:!1},void 0,_createRawReactElement("div",{className:"space-y-4"},void 0,_createRawReactElement(BundleContainer,{fetchComponent:EventHeader},void 0,function(mt){return _createRawReactElement(mt,{status:st})}),st&&pt&&_createRawReactElement(Tabs,{items:ft,activeItem:dt},"event-tabs-".concat(st.id)),nt)),!rt&&_createRawReactElement(BundleContainer,{fetchComponent:CtaBanner},void 0,function(mt){return _createRawReactElement(mt,{},"cta-banner")})),_createRawReactElement(Layout.Aside,{},void 0,!rt&&_createRawReactElement(BundleContainer,{fetchComponent:SignUpPanel},void 0,function(mt){return _createRawReactElement(mt,{},"sign-up-panel")}),at.trends&&_createRawReactElement(BundleContainer,{fetchComponent:TrendsPanel},void 0,function(mt){return _createRawReactElement(mt,{limit:5},"trends-panel")}),at.suggestions&&_createRawReactElement(BundleContainer,{fetchComponent:WhoToFollowPanel},void 0,function(mt){return _createRawReactElement(mt,{limit:3},"wtf-panel")}),_createRawReactElement(LinkFooter,{},"link-footer")))},EventsPage=function _e(et){var tt=et.children,nt=useFeatures();return React$3.createElement(React$3.Fragment,null,_createRawReactElement(Layout.Main,{},void 0,tt),_createRawReactElement(Layout.Aside,{},void 0,_createRawReactElement(BundleContainer,{fetchComponent:NewEventPanel},void 0,function(rt){return _createRawReactElement(rt,{},"new-event-panel")}),nt.trends&&_createRawReactElement(BundleContainer,{fetchComponent:TrendsPanel},void 0,function(rt){return _createRawReactElement(rt,{limit:5},"trends-panel")}),nt.suggestions&&_createRawReactElement(BundleContainer,{fetchComponent:WhoToFollowPanel},void 0,function(rt){return _createRawReactElement(rt,{limit:3},"wtf-panel")}),_createRawReactElement(LinkFooter,{},"link-footer")))};function ownKeys$3(_e,et){var tt=Object.keys(_e);if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(_e);et&&(nt=nt.filter(function(rt){return Object.getOwnPropertyDescriptor(_e,rt).enumerable})),tt.push.apply(tt,nt)}return tt}function _objectSpread$2(_e){for(var et=1;et1?arguments[1]:void 0,nt),it=rt>2?arguments[2]:void 0,ot=it===void 0?nt:toAbsoluteIndex(it,nt);ot>at;)tt[at++]=et;return tt},$$1=_export,fill=arrayFill,addToUnscopables=addToUnscopables$5;$$1({target:"Array",proto:!0},{fill});addToUnscopables("fill");const CarouselKeys={avatars:["carouselAvatars"]};function useCarouselAvatars(){const _e=useApi(),et=async()=>{const{data:rt}=await _e.get("/api/v1/truth/carousels/avatars");return rt},tt=useQuery(CarouselKeys.avatars,et,{placeholderData:[],keepPreviousData:!0}),nt=tt.data;return{...tt,data:nt||[]}}function useMarkAsSeen(){const _e=useApi(),et=useFeatures();return useMutation(async tt=>{et.carouselSeen&&await void _e.post("/api/v1/truth/carousels/avatars/seen",{account_id:tt})})}var CarouselItem=React$3.forwardRef(function(_e,et){var tt=_e.avatar,nt=_e.seen,rt=_e.onViewed,at=_e.onPinned,it=useAppDispatch(),ot=useMarkAsSeen(),st=useAppSelector(function(ht){return ht.timelines.getIn(["home","feedAccountId"])}),ct=tt.account_id===st,ut=reactExports.useState(!1),dt=_slicedToArray$4(ut,2),ft=dt[0],pt=dt[1],mt=function(){ft||(pt(!0),ct?(it(replaceHomeTimeline(void 0,{maxId:null},function(){return pt(!1)})),at&&at(null)):(at&&at(tt),nt||(rt(tt.account_id),ot.mutate(tt.account_id)),it(replaceHomeTimeline(tt.account_id,{maxId:null},function(){return pt(!1)}))))};return React$3.createElement("div",{ref:et,"aria-disabled":ft,onClick:mt,className:"cursor-pointer py-4",role:"filter-feed-by-user","data-testid":"carousel-item"},_createRawReactElement(Stack,{className:"h-auto w-14",space:3},void 0,_createRawReactElement("div",{className:"relative mx-auto block h-12 w-12 rounded-full"},void 0,ct&&_createRawReactElement("div",{className:"absolute inset-0 flex items-center justify-center rounded-full bg-primary-600/50"},void 0,_createRawReactElement(Icon$1,{src:vitePluginRequire_1697861823905_3845308,className:"h-6 w-6 text-white"})),_createRawReactElement("img",{src:tt.account_avatar,className:clsx({"w-12 h-12 min-w-[48px] rounded-full ring-2 ring-offset-4 dark:ring-offset-primary-900":!0,"ring-transparent":!ct&&nt,"ring-primary-600":ct,"ring-accent-500":!nt&&!ct}),alt:tt.acct,"data-testid":"carousel-item-avatar"})),_createRawReactElement(Text$2,{theme:"muted",size:"sm",truncate:!0,align:"center",className:"pb-0.5 leading-3"},void 0,tt.acct)))}),FeedCarousel=function _e(){var et=useCarouselAvatars(),tt=et.data,nt=et.isFetching,rt=et.isFetched,at=et.isError,it=useDimensions(),ot=_slicedToArray$4(it,3);ot[0];var st=ot[1],ct=ot[2].width,ut=reactExports.useRef(null),dt=reactExports.useState([]),ft=_slicedToArray$4(dt,2),pt=ft[0],mt=ft[1],ht=reactExports.useState(0),Et=_slicedToArray$4(ht,2),yt=Et[0],vt=Et[1],gt=reactExports.useState(1),St=_slicedToArray$4(gt,2),Rt=St[0],$t=St[1],bt=reactExports.useState(null),wt=_slicedToArray$4(bt,2),xt=wt[0],Tt=wt[1],Ct=reactExports.useMemo(function(){var It=tt.filter(function(Ut){return Ut.account_id!==(xt==null?void 0:xt.account_id)});if(xt){var Ot=(Rt-1)*yt;It=[].concat(_toConsumableArray(It.slice(0,Ot)),[null],_toConsumableArray(It.slice(Ot)))}return It},[tt,xt,Rt,yt]),Nt=Math.ceil(tt.length/yt),At=ct/Math.floor(ct/80),kt=Rt1,Pt=Rt>1&&Nt>1,Ft=function(){return $t(function(Ot){return Ot+1})},Dt=function(){return $t(function(Ot){return Ot-1})},Lt=function(Ot){mt(function(Ut){return[].concat(_toConsumableArray(Ut),[Ot])})};return reactExports.useEffect(function(){tt.length>0&&mt(tt.filter(function(It){return It.seen!==!1}).map(function(It){return It.account_id}))},[tt]),reactExports.useEffect(function(){ct&&vt(Math.round(ct/At))},[ct,At]),at?_createRawReactElement(Card$1,{variant:"rounded",size:"lg","data-testid":"feed-carousel-error"},void 0,_createRawReactElement(Text$2,{align:"center"},void 0,_createRawReactElement(FormattedMessage$1,{id:"common.error",defaultMessage:"Something isn't right. Try reloading the page."}))):rt&&tt.length===0?null:_createRawReactElement("div",{className:"overflow-hidden rounded-xl bg-white shadow-lg dark:bg-primary-900 dark:shadow-none","data-testid":"feed-carousel"},void 0,_createRawReactElement(HStack,{alignItems:"stretch"},void 0,_createRawReactElement("div",{className:"z-10 flex w-8 items-center justify-center self-stretch rounded-l-xl bg-white dark:bg-primary-900"},void 0,_createRawReactElement("button",{"data-testid":"prev-page",onClick:Dt,className:"flex h-full w-7 items-center justify-center transition-opacity duration-500 disabled:opacity-25",disabled:!Pt},void 0,_createRawReactElement(Icon$1,{src:vitePluginRequire_1697861826697_12112271,className:"h-5 w-5 text-black dark:text-white"}))),_createRawReactElement("div",{className:"relative w-full overflow-hidden"},void 0,xt?_createRawReactElement("div",{className:"absolute inset-y-0 left-0 z-10 flex items-center justify-center bg-white dark:bg-primary-900",style:{width:At||"auto"}},void 0,React$3.createElement(CarouselItem,{avatar:xt,seen:pt==null?void 0:pt.includes(xt.account_id),onViewed:Lt,onPinned:function(Ot){return Tt(Ot)},ref:ut})):null,React$3.createElement(HStack,{alignItems:"center",style:{transform:"translateX(-".concat((Rt-1)*100,"%)")},className:"transition-all duration-500 ease-out",ref:st},nt?new Array(20).fill(0).map(function(It,Ot){return _createRawReactElement("div",{className:"flex shrink-0 justify-center",style:{width:At||"auto"}},Ot,_createRawReactElement(PlaceholderAvatar,{size:56,withText:!0,className:"py-3"}))}):Ct.map(function(It,Ot){var Ut;return _createRawReactElement("div",{className:"flex shrink-0 justify-center",style:{width:At||"auto"}},(It==null?void 0:It.account_id)||Ot,It===null?_createRawReactElement(Stack,{className:"h-auto w-14 py-4",space:3,style:{height:(Ut=ut.current)===null||Ut===void 0?void 0:Ut.clientHeight}},void 0,_createRawReactElement("div",{className:"relative mx-auto block h-16 w-16 rounded-full"},void 0,_createRawReactElement("div",{className:"h-16 w-16"}))):_createRawReactElement(CarouselItem,{avatar:It,seen:pt==null?void 0:pt.includes(It.account_id),onPinned:function(zt){Tt(null),setTimeout(function(){Tt(zt)},1)},onViewed:Lt}))}))),_createRawReactElement("div",{className:"z-10 flex w-8 items-center justify-center self-stretch rounded-r-xl bg-white dark:bg-primary-900"},void 0,_createRawReactElement("button",{"data-testid":"next-page",onClick:Ft,className:"flex h-full w-7 items-center justify-center transition-opacity duration-500 disabled:opacity-25",disabled:!kt},void 0,_createRawReactElement(Icon$1,{src:vitePluginRequire_1697861828086_76580221,className:"h-5 w-5 text-black dark:text-white"})))))},defineWellKnownSymbol=wellKnownSymbolDefine;defineWellKnownSymbol("iterator");var toString$1=toString$t,normalizeStringArgument$1=function(_e,et){return _e===void 0?arguments.length<2?"":et:toString$1(_e)},isObject=isObject$u,createNonEnumerableProperty$2=createNonEnumerableProperty$a,installErrorCause$1=function(_e,et){isObject(et)&&"cause"in et&&createNonEnumerableProperty$2(_e,"cause",et.cause)},uncurryThis=functionUncurryThis,$Error=Error,replace=uncurryThis("".replace),TEST=function(_e){return String($Error(_e).stack)}("zxcasd"),V8_OR_CHAKRA_STACK_ENTRY=/\n\s*at [^:]*:[^\n]*/,IS_V8_OR_CHAKRA_STACK=V8_OR_CHAKRA_STACK_ENTRY.test(TEST),errorStackClear=function(_e,et){if(IS_V8_OR_CHAKRA_STACK&&typeof _e=="string"&&!$Error.prepareStackTrace)for(;et--;)_e=replace(_e,V8_OR_CHAKRA_STACK_ENTRY,"");return _e},fails=fails$F,createPropertyDescriptor=createPropertyDescriptor$7,errorStackInstallable=!fails(function(){var _e=Error("a");return"stack"in _e?(Object.defineProperty(_e,"stack",createPropertyDescriptor(1,7)),_e.stack!==7):!0}),createNonEnumerableProperty$1=createNonEnumerableProperty$a,clearErrorStack=errorStackClear,ERROR_STACK_INSTALLABLE=errorStackInstallable,captureStackTrace=Error.captureStackTrace,errorStackInstall=function(_e,et,tt,nt){ERROR_STACK_INSTALLABLE&&(captureStackTrace?captureStackTrace(_e,et):createNonEnumerableProperty$1(_e,"stack",clearErrorStack(tt,nt)))},getBuiltIn=getBuiltIn$c,hasOwn=hasOwnProperty_1,createNonEnumerableProperty=createNonEnumerableProperty$a,isPrototypeOf=objectIsPrototypeOf,setPrototypeOf=objectSetPrototypeOf,copyConstructorProperties=copyConstructorProperties$4,proxyAccessor=proxyAccessor$2,inheritIfRequired=inheritIfRequired$4,normalizeStringArgument=normalizeStringArgument$1,installErrorCause=installErrorCause$1,installErrorStack=errorStackInstall,DESCRIPTORS=descriptors$1,wrapErrorConstructorWithCause$1=function(_e,et,tt,nt){var rt="stackTraceLimit",at=nt?2:1,it=_e.split("."),ot=it[it.length-1],st=getBuiltIn.apply(null,it);if(st){var ct=st.prototype;if(hasOwn(ct,"cause")&&delete ct.cause,!tt)return st;var ut=getBuiltIn("Error"),dt=et(function(ft,pt){var mt=normalizeStringArgument(nt?pt:ft,void 0),ht=nt?new st(ft):new st;return mt!==void 0&&createNonEnumerableProperty(ht,"message",mt),installErrorStack(ht,dt,ht.stack,2),this&&isPrototypeOf(ct,this)&&inheritIfRequired(ht,this,dt),arguments.length>at&&installErrorCause(ht,arguments[at]),ht});dt.prototype=ct,ot!=="Error"?setPrototypeOf?setPrototypeOf(dt,ut):copyConstructorProperties(dt,ut,{name:!0}):DESCRIPTORS&&rt in st&&(proxyAccessor(dt,st,rt),proxyAccessor(dt,st,"prepareStackTrace")),copyConstructorProperties(dt,st);try{ct.name!==ot&&createNonEnumerableProperty(ct,"name",ot),ct.constructor=dt}catch{}return dt}},$=_export,global$1=global$w,apply=functionApply,wrapErrorConstructorWithCause=wrapErrorConstructorWithCause$1,WEB_ASSEMBLY="WebAssembly",WebAssembly=global$1[WEB_ASSEMBLY],FORCED=Error("e",{cause:7}).cause!==7,exportGlobalErrorCauseWrapper=function(_e,et){var tt={};tt[_e]=wrapErrorConstructorWithCause(_e,et,FORCED),$({global:!0,constructor:!0,arity:1,forced:FORCED},tt)},exportWebAssemblyErrorCauseWrapper=function(_e,et){if(WebAssembly&&WebAssembly[_e]){var tt={};tt[_e]=wrapErrorConstructorWithCause(WEB_ASSEMBLY+"."+_e,et,FORCED),$({target:WEB_ASSEMBLY,stat:!0,constructor:!0,arity:1,forced:FORCED},tt)}};exportGlobalErrorCauseWrapper("Error",function(_e){return function(tt){return apply(_e,this,arguments)}});exportGlobalErrorCauseWrapper("EvalError",function(_e){return function(tt){return apply(_e,this,arguments)}});exportGlobalErrorCauseWrapper("RangeError",function(_e){return function(tt){return apply(_e,this,arguments)}});exportGlobalErrorCauseWrapper("ReferenceError",function(_e){return function(tt){return apply(_e,this,arguments)}});exportGlobalErrorCauseWrapper("SyntaxError",function(_e){return function(tt){return apply(_e,this,arguments)}});exportGlobalErrorCauseWrapper("TypeError",function(_e){return function(tt){return apply(_e,this,arguments)}});exportGlobalErrorCauseWrapper("URIError",function(_e){return function(tt){return apply(_e,this,arguments)}});exportWebAssemblyErrorCauseWrapper("CompileError",function(_e){return function(tt){return apply(_e,this,arguments)}});exportWebAssemblyErrorCauseWrapper("LinkError",function(_e){return function(tt){return apply(_e,this,arguments)}});exportWebAssemblyErrorCauseWrapper("RuntimeError",function(_e){return function(tt){return apply(_e,this,arguments)}});var dist$1={},charRegex=()=>{const _e="\\ud800-\\udfff",et="\\u0300-\\u036f",tt="\\ufe20-\\ufe2f",nt="\\u20d0-\\u20ff",rt="\\u1ab0-\\u1aff",at="\\u1dc0-\\u1dff",it=et+tt+nt+rt+at,ot="\\ufe0e\\ufe0f",st="\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83C\\uDF93",ct=`[${_e}]`,ut=`[${it}]`,dt="\\ud83c[\\udffb-\\udfff]",ft=`(?:${ut}|${dt})`,pt=`[^${_e}]`,mt="(?:\\uD83C[\\uDDE6-\\uDDFF]){2}",ht="[\\ud800-\\udbff][\\udc00-\\udfff]",Et="\\u200d",yt="(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40(?:\\udc65|\\udc73|\\udc77)\\udb40(?:\\udc6e|\\udc63|\\udc6c)\\udb40(?:\\udc67|\\udc74|\\udc73)\\udb40\\udc7f)",vt=`[${st}]`,gt=`${ft}?`,St=`[${ot}]?`,Rt=`(?:${Et}(?:${[pt,mt,ht].join("|")})${St+gt})*`,$t=St+gt+Rt,wt=`(?:${[`${pt}${ut}?`,ut,mt,ht,ct,vt].join("|")})`;return new RegExp(`${yt}|${dt}(?=${dt})|${wt+$t}`,"g")},__importDefault=commonjsGlobal$2&&commonjsGlobal$2.__importDefault||function(_e){return _e&&_e.__esModule?_e:{default:_e}};Object.defineProperty(dist$1,"__esModule",{value:!0});var char_regex_1=__importDefault(charRegex);function toArray(_e){if(typeof _e!="string")throw new Error("A string is expected as input");return _e.match(char_regex_1.default())||[]}dist$1.toArray=toArray;function length(_e){if(typeof _e!="string")throw new Error("Input must be a string");var et=_e.match(char_regex_1.default());return et===null?0:et.length}var length_1=dist$1.length=length;function substring(_e,et,tt){if(et===void 0&&(et=0),typeof _e!="string")throw new Error("Input must be a string");(typeof et!="number"||et<0)&&(et=0),typeof tt=="number"&&tt<0&&(tt=0);var nt=_e.match(char_regex_1.default());return nt?nt.slice(et,tt).join(""):""}dist$1.substring=substring;function substr(_e,et,tt){if(et===void 0&&(et=0),typeof _e!="string")throw new Error("Input must be a string");var nt=length(_e);if(typeof et!="number"&&(et=parseInt(et,10)),et>=nt)return"";et<0&&(et+=nt);var rt;typeof tt>"u"?rt=nt:(typeof tt!="number"&&(tt=parseInt(tt,10)),rt=tt>=0?tt+et:et);var at=_e.match(char_regex_1.default());return at?at.slice(et,rt).join(""):""}dist$1.substr=substr;function limit(_e,et,tt,nt){if(et===void 0&&(et=16),tt===void 0&&(tt="#"),nt===void 0&&(nt="right"),typeof _e!="string"||typeof et!="number")throw new Error("Invalid arguments specified");if(["left","right"].indexOf(nt)===-1)throw new Error("Pad position should be either left or right");typeof tt!="string"&&(tt=String(tt));var rt=length(_e);if(rt>et)return substring(_e,0,et);if(rt=nt.length)return et===""?nt.length:-1;if(et==="")return tt;var rt=toArray(et),at=!1,it;for(it=tt;it1&&arguments[1]!==void 0?arguments[1]:{},tt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},nt=createChecker(et,tt),rt=_e||Object.keys(_objectSpread2({},tt,{},et));return rt.every(nt)}function createChecker(_e,et){return function(tt){if(typeof tt=="string")return is$2(et[tt],_e[tt]);if(Array.isArray(tt))return is$2(getIn(et,tt),getIn(_e,tt));throw new TypeError("Invalid key: expected Array or string: "+tt)}}var ImmutablePureComponent=function(_e){_inherits(et,_e);function et(){return _classCallCheck(this,et),_possibleConstructorReturn(this,_getPrototypeOf(et).apply(this,arguments))}return _createClass(et,[{key:"shouldComponentUpdate",value:function(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return!check(this.updateOnProps,this.props,nt,"updateOnProps")||!check(this.updateOnStates,this.state,rt,"updateOnStates")}}]),et}(React$3.Component),index$1=reactExports.useLayoutEffect,useLatest=function _e(et){var tt=reactExports.useRef(et);return index$1(function(){tt.current=et}),tt},updateRef=function _e(et,tt){if(typeof et=="function"){et(tt);return}et.current=tt},useComposedRef=function _e(et,tt){var nt=reactExports.useRef();return reactExports.useCallback(function(rt){et.current=rt,nt.current&&updateRef(nt.current,null),nt.current=tt,tt&&updateRef(tt,rt)},[tt])},HIDDEN_TEXTAREA_STYLE={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},forceHiddenStyles=function _e(et){Object.keys(HIDDEN_TEXTAREA_STYLE).forEach(function(tt){et.style.setProperty(tt,HIDDEN_TEXTAREA_STYLE[tt],"important")})},forceHiddenStyles$1=forceHiddenStyles,hiddenTextarea=null,getHeight=function _e(et,tt){var nt=et.scrollHeight;return tt.sizingStyle.boxSizing==="border-box"?nt+tt.borderSize:nt-tt.paddingSize};function calculateNodeHeight(_e,et,tt,nt){tt===void 0&&(tt=1),nt===void 0&&(nt=1/0),hiddenTextarea||(hiddenTextarea=document.createElement("textarea"),hiddenTextarea.setAttribute("tabindex","-1"),hiddenTextarea.setAttribute("aria-hidden","true"),forceHiddenStyles$1(hiddenTextarea)),hiddenTextarea.parentNode===null&&document.body.appendChild(hiddenTextarea);var rt=_e.paddingSize,at=_e.borderSize,it=_e.sizingStyle,ot=it.boxSizing;Object.keys(it).forEach(function(ft){var pt=ft;hiddenTextarea.style[pt]=it[pt]}),forceHiddenStyles$1(hiddenTextarea),hiddenTextarea.value=et;var st=getHeight(hiddenTextarea,_e);hiddenTextarea.value=et,st=getHeight(hiddenTextarea,_e),hiddenTextarea.value="x";var ct=hiddenTextarea.scrollHeight-rt,ut=ct*tt;ot==="border-box"&&(ut=ut+rt+at),st=Math.max(ut,st);var dt=ct*nt;return ot==="border-box"&&(dt=dt+rt+at),st=Math.min(dt,st),[st,ct]}var noop=function _e(){},pick=function _e(et,tt){return et.reduce(function(nt,rt){return nt[rt]=tt[rt],nt},{})},SIZING_STYLE=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],isIE=!!document.documentElement.currentStyle,getSizingData=function _e(et){var tt=window.getComputedStyle(et);if(tt===null)return null;var nt=pick(SIZING_STYLE,tt),rt=nt.boxSizing;if(rt==="")return null;isIE&&rt==="border-box"&&(nt.width=parseFloat(nt.width)+parseFloat(nt.borderRightWidth)+parseFloat(nt.borderLeftWidth)+parseFloat(nt.paddingRight)+parseFloat(nt.paddingLeft)+"px");var at=parseFloat(nt.paddingBottom)+parseFloat(nt.paddingTop),it=parseFloat(nt.borderBottomWidth)+parseFloat(nt.borderTopWidth);return{sizingStyle:nt,paddingSize:at,borderSize:it}},getSizingData$1=getSizingData;function useListener(_e,et,tt){var nt=useLatest(tt);reactExports.useLayoutEffect(function(){var rt=function(it){return nt.current(it)};if(_e)return _e.addEventListener(et,rt),function(){return _e.removeEventListener(et,rt)}},[])}var useWindowResizeListener=function _e(et){useListener(window,"resize",et)},useFontsLoadedListener=function _e(et){useListener(document.fonts,"loadingdone",et)},_excluded$2=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],TextareaAutosize=function _e(et,tt){var nt=et.cacheMeasurements,rt=et.maxRows,at=et.minRows,it=et.onChange,ot=it===void 0?noop:it,st=et.onHeightChange,ct=st===void 0?noop:st,ut=_objectWithoutPropertiesLoose(et,_excluded$2),dt=ut.value!==void 0,ft=reactExports.useRef(null),pt=useComposedRef(ft,tt),mt=reactExports.useRef(0),ht=reactExports.useRef(),Et=function(){var gt=ft.current,St=nt&&ht.current?ht.current:getSizingData$1(gt);if(St){ht.current=St;var Rt=calculateNodeHeight(St,gt.value||gt.placeholder||"x",at,rt),$t=Rt[0],bt=Rt[1];mt.current!==$t&&(mt.current=$t,gt.style.setProperty("height",$t+"px","important"),ct($t,{rowHeight:bt}))}},yt=function(gt){dt||Et(),ot(gt)};return reactExports.useLayoutEffect(Et),useWindowResizeListener(Et),useFontsLoadedListener(Et),reactExports.createElement("textarea",_extends$4({},ut,{onChange:yt,ref:pt}))},index=reactExports.forwardRef(TextareaAutosize),AutosuggestAccount=function _e(et){var tt=et.id,nt=useAccount(tt),rt=nt.account;return rt?_createRawReactElement(Account,{account:rt,hideActions:!0,showProfileHoverCard:!1}):null};const textAtCursorMatchesToken=(_e,et,tt)=>{let nt;const rt=_e.slice(0,et).search(/\S+$/),at=_e.slice(et).search(/\s/);return at<0?nt=_e.slice(rt):nt=_e.slice(rt,at+et),!nt||nt.trim().length<3||!tt.includes(nt[0])?[null,null]:(nt=nt.trim().toLowerCase(),nt.length>0?[rt+1,nt]:[null,null])};var AutosuggestEmoji=function _e(et){var tt=et.emoji,nt,rt;if(isCustomEmoji(tt))nt=tt.imageUrl,rt=tt.colons;else{var at=unicodeMapping[tt.native]||unicodeMapping[tt.native.replace(/\uFE0F$/,"")];if(!at)return null;nt=joinPublicPath("packs/emoji/".concat(at.unified,".svg")),rt=tt.native}return _createRawReactElement("div",{className:"autosuggest-emoji","data-testid":"emoji"},void 0,_createRawReactElement("img",{className:"emojione",src:nt,alt:rt}),tt.colons)};function _createSuper$1(_e){var et=_isNativeReflectConstruct$1();return function(){var nt=_getPrototypeOf$1(_e),rt;if(et){var at=_getPrototypeOf$1(this).constructor;rt=Reflect.construct(nt,arguments,at)}else rt=nt.apply(this,arguments);return _possibleConstructorReturn$1(this,rt)}}function _isNativeReflectConstruct$1(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var AutosuggestTextarea=function(_e){_inherits$1(tt,_e);var et=_createSuper$1(tt);function tt(){var nt;_classCallCheck$1(this,tt);for(var rt=arguments.length,at=new Array(rt),it=0;it0&&!pt&&(ot.preventDefault(),nt.setState({selectedSuggestion:Math.min(ft+1,ct.size-1)}));break;case"ArrowUp":ct.size>0&&!pt&&(ot.preventDefault(),nt.setState({selectedSuggestion:Math.max(ft-1,0)}));break;case"Enter":case"Tab":nt.state.lastToken!==null&&ct.size>0&&!pt&&(ot.preventDefault(),ot.stopPropagation(),nt.props.onSuggestionSelected(nt.state.tokenStart,nt.state.lastToken,ct.get(ft)));break}ot.defaultPrevented||!nt.props.onKeyDown||nt.props.onKeyDown(ot)}}),_defineProperty$7(_assertThisInitialized$1(nt),"onBlur",function(){nt.setState({suggestionsHidden:!0,focused:!1}),nt.props.onBlur&&nt.props.onBlur()}),_defineProperty$7(_assertThisInitialized$1(nt),"onFocus",function(){nt.setState({focused:!0}),nt.props.onFocus&&nt.props.onFocus()}),_defineProperty$7(_assertThisInitialized$1(nt),"onSuggestionClick",function(ot){var st,ct=nt.props.suggestions.get(ot.currentTarget.getAttribute("data-index"));ot.preventDefault(),nt.props.onSuggestionSelected(nt.state.tokenStart,nt.state.lastToken,ct),(st=nt.textarea)===null||st===void 0||st.focus()}),_defineProperty$7(_assertThisInitialized$1(nt),"setTextarea",function(ot){nt.textarea=ot,nt.textarea&&nt.keymap&&install(nt.textarea,nt.keymap)}),_defineProperty$7(_assertThisInitialized$1(nt),"onPaste",function(ot){ot.clipboardData&&ot.clipboardData.files.length===1&&(nt.props.onPaste(ot.clipboardData.files),ot.preventDefault())}),_defineProperty$7(_assertThisInitialized$1(nt),"renderSuggestion",function(ot,st){var ct=nt.state.selectedSuggestion,ut,dt;return _typeof$8(ot)==="object"?(ut=_createRawReactElement(AutosuggestEmoji,{emoji:ot}),dt=ot.id):ot[0]==="#"?(ut=ot,dt=ot):(ut=_createRawReactElement(AutosuggestAccount,{id:ot}),dt=ot),_createRawReactElement("div",{role:"button",tabIndex:0,"data-index":st,className:clsx({"px-4 py-2.5 text-sm text-gray-700 dark:text-gray-500 hover:bg-gray-100 dark:hover:bg-gray-800 focus:bg-gray-100 dark:focus:bg-primary-800 group":!0,"bg-gray-100 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-800":st===ct}),onMouseDown:nt.onSuggestionClick},dt,ut)}),nt}return _createClass$1(tt,[{key:"shouldComponentUpdate",value:function(rt,at){var it=this.state.lastToken!==at.lastToken,ot=this.props.value!==rt.value;return it&&!ot?!1:_get(_getPrototypeOf$1(tt.prototype),"shouldComponentUpdate",this).bind(this)(rt,at,void 0)}},{key:"componentDidUpdate",value:function(rt,at){var it=this.props.suggestions;it!==rt.suggestions&&it.size>0&&at.suggestionsHidden&&at.focused&&this.setState({suggestionsHidden:!1})}},{key:"componentWillUnmount",value:function(){this.textarea&&this.keymap&&uninstall(this.textarea)}},{key:"setPortalPosition",value:function(){if(!this.textarea)return{};var rt=this.textarea.getBoundingClientRect(),at=rt.top,it=rt.height,ot=rt.left,st=rt.width;return{top:at+it,left:ot,width:st}}},{key:"render",value:function(){var rt=this.props,at=rt.value,it=rt.suggestions,ot=rt.disabled,st=rt.placeholder,ct=rt.onKeyUp,ut=rt.autoFocus,dt=rt.children,ft=rt.condensed,pt=rt.id,mt=rt.keymap;mt&&(this.keymap=mt);var ht=this.state.suggestionsHidden,Et={direction:"ltr",minRows:10};return(isRtl(at)||!at&&st&&isRtl(st))&&(Et.direction="rtl"),[_createRawReactElement("div",{},"textarea",_createRawReactElement("div",{className:"relative"},void 0,_createRawReactElement("label",{},void 0,_createRawReactElement("span",{style:{display:"none"}},void 0,st),React$3.createElement(index,{ref:this.setTextarea,className:clsx("w-full resize-none border-0 px-0 text-gray-800 transition-[min-height] placeholder:text-gray-600 focus:border-0 focus:shadow-none focus:ring-0 motion-reduce:transition-none dark:bg-transparent dark:text-white dark:placeholder:text-gray-600",{"min-h-[40px]":ft,"min-h-[100px]":!ft}),id:pt,disabled:ot,placeholder:st,autoFocus:ut,value:at,onChange:this.onChange,onKeyDown:this.onKeyDown,onKeyUp:ct,onFocus:this.onFocus,onBlur:this.onBlur,onPaste:this.onPaste,style:Et,"aria-autocomplete":"list"}))),dt),_createRawReactElement(Portal$1,{},"portal",_createRawReactElement("div",{style:this.setPortalPosition(),className:clsx({"fixed z-1000 shadow bg-white dark:bg-gray-900 rounded-lg py-1 space-y-0 dark:ring-2 dark:ring-primary-700 focus:outline-none":!0,hidden:ht||it.isEmpty(),block:!ht&&!it.isEmpty()})},void 0,it.map(this.renderSuggestion)))]}}]),tt}(ImmutablePureComponent);_defineProperty$7(AutosuggestTextarea,"defaultProps",{autoFocus:!0});const vitePluginRequire_1697861820197_45123345="/packs/assets/mood-happy-48f2a7ec.svg";var messages$l={emoji:{id:"emoji_button.label",defaultMessage:"Insert emoji"}},EmojiPickerDropdownContainer=function _e(et){var tt=useAppDispatch(),nt=useIntl(),rt=nt.formatMessage(messages$l.emoji),at=isUserTouching(),it=reactExports.useState(!1),ot=_slicedToArray$4(it,2),st=ot[0],ct=ot[1],ut=useFloating({placement:"bottom",middleware:[flip({fallbackPlacements:["top"]}),shift$1({crossAxis:!0})]}),dt=ut.x,ft=ut.y,pt=ut.strategy,mt=ut.refs,ht=ut.update;useClickOutside(mt,function(){at||ct(!1)});var Et=function(vt){vt.stopPropagation(),at?tt(openModal("EMOJI_PICKER",{onPickEmoji:et.onPickEmoji})):ct(!st)};return _createRawReactElement("div",{className:"relative"},void 0,React$3.createElement(IconButton$1,{className:clsx({"text-gray-600 hover:text-gray-700 dark:hover:text-gray-500":!0}),ref:mt.setReference,src:vitePluginRequire_1697861820197_45123345,title:rt,"aria-label":rt,"aria-expanded":st,role:"button",onClick:Et,onKeyDown:Et,tabIndex:0}),reactDomExports.createPortal(React$3.createElement("div",{className:"z-[101]",ref:mt.setFloating,style:{position:pt,top:ft??0,left:dt??0,width:"max-content"}},React$3.createElement(EmojiPickerDropdown,_extends$4({visible:st,setVisible:ct,update:ht},et))),document.body))},QuotedStatusContainer=function _e(et){var tt=et.composeId,nt=useAppDispatch(),rt=reactExports.useCallback(makeGetStatus(),[]),at=useAppSelector(function(ot){var st;return rt(ot,{id:(st=ot.compose.get(tt))===null||st===void 0?void 0:st.quote})}),it=function(){nt(cancelQuoteCompose())};return at?_createRawReactElement("div",{className:"mb-2"},void 0,_createRawReactElement(QuotedStatus,{status:at,onCancel:it,compose:!0})):null},ReplyIndicator=function _e(et){var tt=et.className,nt=et.status,rt=et.hideActions,at=et.onCancel,it=function(){at()};if(!nt)return null;var ot={};return!rt&&at&&(ot={onActionClick:it,actionIcon:vitePluginRequire_1697861811668_44144977,actionAlignment:"top",actionTitle:"Dismiss"}),_createRawReactElement(Stack,{space:2,className:clsx("rounded-lg bg-gray-100 p-4 dark:bg-gray-800",tt)},void 0,React$3.createElement(AccountContainer,_extends$4({},ot,{id:nt.getIn(["account","id"]),timestamp:nt.created_at,showProfileHoverCard:!1,withLinkToProfile:!1,hideActions:rt})),_createRawReactElement(Markup,{className:"break-words",size:"sm",dangerouslySetInnerHTML:{__html:nt.contentHtml},direction:isRtl(nt.search_index)?"rtl":"ltr"}),nt.media_attachments.size>0&&_createRawReactElement(AttachmentThumbs,{media:nt.media_attachments,sensitive:nt.sensitive}))};const makeMapStateToProps=()=>{const _e=makeGetStatus();return(tt,{composeId:nt})=>{var it,ot;const rt=(it=tt.compose.get(nt))==null?void 0:it.in_reply_to,at=!!((ot=tt.compose.get(nt))!=null&&ot.id);return{status:_e(tt,{id:rt}),hideActions:at}}},mapDispatchToProps$1=_e=>({onCancel(){_e(cancelReplyCompose())}}),ReplyIndicatorContainer=connect(makeMapStateToProps,mapDispatchToProps$1)(ReplyIndicator);var ScheduleFormContainer=function _e(et){return _createRawReactElement(BundleContainer,{fetchComponent:ScheduleForm},void 0,function(tt){return React$3.createElement(tt,et)})};const vitePluginRequire_1697861837850_7280158="/packs/assets/paperclip-ec4de300.svg",vitePluginRequire_1697861834624_40550629="/packs/assets/photo-b3e9cc6c.svg";var messages$k={upload:{id:"upload_button.label",defaultMessage:"Add media attachment"}},onlyImages=function _e(et){return!!(et&&et.every(function(tt){return tt.startsWith("image/")}))},UploadButton=function _e(et){var tt=et.disabled,nt=tt===void 0?!1:tt,rt=et.unavailable,at=rt===void 0?!1:rt,it=et.onSelectFile,ot=et.resetFileKey,st=et.className,ct=st===void 0?"text-gray-600 hover:text-gray-700 dark:hover:text-gray-500":st,ut=et.iconClassName,dt=et.icon,ft=useIntl(),pt=useInstance(),mt=pt.configuration,ht=reactExports.useRef(null),Et=mt.media_attachments.supported_mime_types,yt=function(Rt){var $t;($t=Rt.target.files)!==null&&$t!==void 0&&$t.length&&it(Rt.target.files,ft)},vt=function(){var Rt;(Rt=ht.current)===null||Rt===void 0||Rt.click()};if(at)return null;var gt=dt||(onlyImages(Et)?vitePluginRequire_1697861834624_40550629:vitePluginRequire_1697861837850_7280158);return _createRawReactElement("div",{},void 0,_createRawReactElement(IconButton$1,{src:gt,className:ct,iconClassName:ut,title:ft.formatMessage(messages$k.upload),disabled:nt,onClick:vt}),_createRawReactElement("label",{},void 0,_createRawReactElement("span",{className:"sr-only"},void 0,ft.formatMessage(messages$k.upload)),React$3.createElement("input",{key:ot,ref:ht,type:"file",multiple:!0,accept:Et&&Et.join(","),onChange:yt,disabled:nt,className:"hidden"})))};const mapStateToProps=(_e,{composeId:et})=>{var tt,nt;return{disabled:(tt=_e.compose.get(et))==null?void 0:tt.is_uploading,resetFileKey:(nt=_e.compose.get(et))==null?void 0:nt.resetFileKey}},mapDispatchToProps=(_e,{composeId:et})=>({onSelectFile(tt,nt){_e(uploadCompose(et,tt,nt))}}),UploadButtonContainer=connect(mapStateToProps,mapDispatchToProps)(UploadButton);var Warning=function _e(et){var tt=et.message;return _createRawReactElement(OptionalMotion,{defaultStyle:{opacity:0,scaleX:.85,scaleY:.75},style:{opacity:spring(1,{damping:35,stiffness:400}),scaleX:spring(1,{damping:35,stiffness:400}),scaleY:spring(1,{damping:35,stiffness:400})}},void 0,function(nt){var rt=nt.opacity,at=nt.scaleX,it=nt.scaleY;return _createRawReactElement("div",{className:"compose-form__warning",style:{opacity:rt,transform:"scale(".concat(at,", ").concat(it,")")}},void 0,tt)})},APPROX_HASHTAG_RE=/(?:^|[^/)\w])#(\w*[a-zA-Z·]\w*)/i,WarningWrapper=function _e(et){var tt=et.composeId,nt=useCompose(tt),rt=useAppSelector(function(st){return nt.privacy==="private"&&!selectOwnAccount(st).locked}),at=nt.privacy!=="public"&&nt.privacy!=="group"&&APPROX_HASHTAG_RE.test(nt.text),it=nt.privacy==="direct";if(rt)return _createRawReactElement(Warning,{message:_createRawReactElement(FormattedMessage$1,{id:"compose_form.lock_disclaimer",defaultMessage:"Your account is not {locked}. Anyone can follow you to view your follower-only posts.",values:{locked:_createRawReactElement(Link$2,{to:"/settings/profile"},void 0,_createRawReactElement(FormattedMessage$1,{id:"compose_form.lock_disclaimer.lock",defaultMessage:"locked"}))}})});if(at)return _createRawReactElement(Warning,{message:_createRawReactElement(FormattedMessage$1,{id:"compose_form.hashtag_warning",defaultMessage:"This post won't be listed under any hashtag as it is unlisted. Only public posts can be searched by hashtag."})});if(it){var ot=_createRawReactElement("span",{},void 0,_createRawReactElement(FormattedMessage$1,{id:"compose_form.direct_message_warning",defaultMessage:"This post will only be sent to the mentioned users."}));return _createRawReactElement(Warning,{message:ot})}return null};const regexen={},regexSupplant=function(_e,et=""){return typeof _e!="string"&&(_e.global&&et.indexOf("g")<0&&(et+="g"),_e.ignoreCase&&et.indexOf("i")<0&&(et+="i"),_e.multiline&&et.indexOf("m")<0&&(et+="m"),_e=_e.source),new RegExp(_e.replace(/#\{(\w+)\}/g,function(tt,nt){let rt=regexen[nt]||"";return typeof rt!="string"&&(rt=rt.source),rt}),et)},stringSupplant=function(_e,et){return _e.replace(/#\{(\w+)\}/g,function(tt,nt){return et[nt]||""})},urlRegex=function(){return regexen.spaces_group=/\x09-\x0D\x20\x85\xA0\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000/,regexen.invalid_chars_group=/\uFFFE\uFEFF\uFFFF\u202A-\u202E/,regexen.punct=/!'#%&@,:;<=>_~{}\$\?\^\*\+\-\.\(\)\[\]\|\/\\/,regexen.validUrlPrecedingChars=regexSupplant(/(?:[^A-Za-z0-9@@$###{invalid_chars_group}]|^)/),regexen.invalidDomainChars=stringSupplant("#{punct}#{spaces_group}#{invalid_chars_group}",regexen),regexen.validDomainChars=regexSupplant(/[^#{invalidDomainChars}]/),regexen.validSubdomain=regexSupplant(/(?:(?:#{validDomainChars}(?:[_-]|#{validDomainChars})*)?#{validDomainChars}\.)/),regexen.validDomainName=regexSupplant(/(?:(?:#{validDomainChars}(?:-|#{validDomainChars})*)?#{validDomainChars}\.)/),regexen.validGTLD=regexSupplant(RegExp("(?:(?:삼성|닷컴|닷넷|香格里拉|餐厅|食品|飞利浦|電訊盈科|集团|通販|购物|谷歌|诺基亚|联通|网络|网站|网店|网址|组织机构|移动|珠宝|点看|游戏|淡马锡|机构|書籍|时尚|新闻|政府|政务|手表|手机|我爱你|慈善|微博|广东|工行|家電|娱乐|天主教|大拿|大众汽车|在线|嘉里大酒店|嘉里|商标|商店|商城|公益|公司|八卦|健康|信息|佛山|企业|中文网|中信|世界|ポイント|ファッション|セール|ストア|コム|グーグル|クラウド|みんな|คอม|संगठन|नेट|कॉम|همراه|موقع|موبايلي|كوم|كاثوليك|عرب|شبكة|بيتك|بازار|العليان|ارامكو|اتصالات|ابوظبي|קום|сайт|рус|орг|онлайн|москва|ком|католик|дети|zuerich|zone|zippo|zip|zero|zara|zappos|yun|youtube|you|yokohama|yoga|yodobashi|yandex|yamaxun|yahoo|yachts|xyz|xxx|xperia|xin|xihuan|xfinity|xerox|xbox|wtf|wtc|wow|world|works|work|woodside|wolterskluwer|wme|winners|wine|windows|win|williamhill|wiki|wien|whoswho|weir|weibo|wedding|wed|website|weber|webcam|weatherchannel|weather|watches|watch|warman|wanggou|wang|walter|walmart|wales|vuelos|voyage|voto|voting|vote|volvo|volkswagen|vodka|vlaanderen|vivo|viva|vistaprint|vista|vision|visa|virgin|vip|vin|villas|viking|vig|video|viajes|vet|versicherung|vermögensberatung|vermögensberater|verisign|ventures|vegas|vanguard|vana|vacations|ups|uol|uno|university|unicom|uconnect|ubs|ubank|tvs|tushu|tunes|tui|tube|trv|trust|travelersinsurance|travelers|travelchannel|travel|training|trading|trade|toys|toyota|town|tours|total|toshiba|toray|top|tools|tokyo|today|tmall|tkmaxx|tjx|tjmaxx|tirol|tires|tips|tiffany|tienda|tickets|tiaa|theatre|theater|thd|teva|tennis|temasek|telefonica|telecity|tel|technology|tech|team|tdk|tci|taxi|tax|tattoo|tatar|tatamotors|target|taobao|talk|taipei|tab|systems|symantec|sydney|swiss|swiftcover|swatch|suzuki|surgery|surf|support|supply|supplies|sucks|style|study|studio|stream|store|storage|stockholm|stcgroup|stc|statoil|statefarm|statebank|starhub|star|staples|stada|srt|srl|spreadbetting|spot|spiegel|space|soy|sony|song|solutions|solar|sohu|software|softbank|social|soccer|sncf|smile|smart|sling|skype|sky|skin|ski|site|singles|sina|silk|shriram|showtime|show|shouji|shopping|shop|shoes|shiksha|shia|shell|shaw|sharp|shangrila|sfr|sexy|sex|sew|seven|ses|services|sener|select|seek|security|secure|seat|search|scot|scor|scjohnson|science|schwarz|schule|school|scholarships|schmidt|schaeffler|scb|sca|sbs|sbi|saxo|save|sas|sarl|sapo|sap|sanofi|sandvikcoromant|sandvik|samsung|samsclub|salon|sale|sakura|safety|safe|saarland|ryukyu|rwe|run|ruhr|rugby|rsvp|room|rogers|rodeo|rocks|rocher|rmit|rip|rio|ril|rightathome|ricoh|richardli|rich|rexroth|reviews|review|restaurant|rest|republican|report|repair|rentals|rent|ren|reliance|reit|reisen|reise|rehab|redumbrella|redstone|red|recipes|realty|realtor|realestate|read|raid|radio|racing|qvc|quest|quebec|qpon|pwc|pub|prudential|pru|protection|property|properties|promo|progressive|prof|productions|prod|pro|prime|press|praxi|pramerica|post|porn|politie|poker|pohl|pnc|plus|plumbing|playstation|play|place|pizza|pioneer|pink|ping|pin|pid|pictures|pictet|pics|piaget|physio|photos|photography|photo|phone|philips|phd|pharmacy|pfizer|pet|pccw|pay|passagens|party|parts|partners|pars|paris|panerai|panasonic|pamperedchef|page|ovh|ott|otsuka|osaka|origins|orientexpress|organic|org|orange|oracle|open|ooo|onyourside|online|onl|ong|one|omega|ollo|oldnavy|olayangroup|olayan|okinawa|office|off|observer|obi|nyc|ntt|nrw|nra|nowtv|nowruz|now|norton|northwesternmutual|nokia|nissay|nissan|ninja|nikon|nike|nico|nhk|ngo|nfl|nexus|nextdirect|next|news|newholland|new|neustar|network|netflix|netbank|net|nec|nba|navy|natura|nationwide|name|nagoya|nadex|nab|mutuelle|mutual|museum|mtr|mtpc|mtn|msd|movistar|movie|mov|motorcycles|moto|moscow|mortgage|mormon|mopar|montblanc|monster|money|monash|mom|moi|moe|moda|mobily|mobile|mobi|mma|mls|mlb|mitsubishi|mit|mint|mini|mil|microsoft|miami|metlife|merckmsd|meo|menu|men|memorial|meme|melbourne|meet|media|med|mckinsey|mcdonalds|mcd|mba|mattel|maserati|marshalls|marriott|markets|marketing|market|map|mango|management|man|makeup|maison|maif|madrid|macys|luxury|luxe|lupin|lundbeck|ltda|ltd|lplfinancial|lpl|love|lotto|lotte|london|lol|loft|locus|locker|loans|loan|lixil|living|live|lipsy|link|linde|lincoln|limo|limited|lilly|like|lighting|lifestyle|lifeinsurance|life|lidl|liaison|lgbt|lexus|lego|legal|lefrak|leclerc|lease|lds|lawyer|law|latrobe|latino|lat|lasalle|lanxess|landrover|land|lancome|lancia|lancaster|lamer|lamborghini|ladbrokes|lacaixa|kyoto|kuokgroup|kred|krd|kpn|kpmg|kosher|komatsu|koeln|kiwi|kitchen|kindle|kinder|kim|kia|kfh|kerryproperties|kerrylogistics|kerryhotels|kddi|kaufen|juniper|juegos|jprs|jpmorgan|joy|jot|joburg|jobs|jnj|jmp|jll|jlc|jio|jewelry|jetzt|jeep|jcp|jcb|java|jaguar|iwc|iveco|itv|itau|istanbul|ist|ismaili|iselect|irish|ipiranga|investments|intuit|international|intel|int|insure|insurance|institute|ink|ing|info|infiniti|industries|immobilien|immo|imdb|imamat|ikano|iinet|ifm|ieee|icu|ice|icbc|ibm|hyundai|hyatt|hughes|htc|hsbc|how|house|hotmail|hotels|hoteles|hot|hosting|host|hospital|horse|honeywell|honda|homesense|homes|homegoods|homedepot|holiday|holdings|hockey|hkt|hiv|hitachi|hisamitsu|hiphop|hgtv|hermes|here|helsinki|help|healthcare|health|hdfcbank|hdfc|hbo|haus|hangout|hamburg|hair|guru|guitars|guide|guge|gucci|guardian|group|grocery|gripe|green|gratis|graphics|grainger|gov|got|gop|google|goog|goodyear|goodhands|goo|golf|goldpoint|gold|godaddy|gmx|gmo|gmbh|gmail|globo|global|gle|glass|glade|giving|gives|gifts|gift|ggee|george|genting|gent|gea|gdn|gbiz|garden|gap|games|game|gallup|gallo|gallery|gal|fyi|futbol|furniture|fund|fun|fujixerox|fujitsu|ftr|frontier|frontdoor|frogans|frl|fresenius|free|fox|foundation|forum|forsale|forex|ford|football|foodnetwork|food|foo|fly|flsmidth|flowers|florist|flir|flights|flickr|fitness|fit|fishing|fish|firmdale|firestone|fire|financial|finance|final|film|fido|fidelity|fiat|ferrero|ferrari|feedback|fedex|fast|fashion|farmers|farm|fans|fan|family|faith|fairwinds|fail|fage|extraspace|express|exposed|expert|exchange|everbank|events|eus|eurovision|etisalat|esurance|estate|esq|erni|ericsson|equipment|epson|epost|enterprises|engineering|engineer|energy|emerck|email|education|edu|edeka|eco|eat|earth|dvr|dvag|durban|dupont|duns|dunlop|duck|dubai|dtv|drive|download|dot|doosan|domains|doha|dog|dodge|doctor|docs|dnp|diy|dish|discover|discount|directory|direct|digital|diet|diamonds|dhl|dev|design|desi|dentist|dental|democrat|delta|deloitte|dell|delivery|degree|deals|dealer|deal|dds|dclk|day|datsun|dating|date|data|dance|dad|dabur|cyou|cymru|cuisinella|csc|cruises|cruise|crs|crown|cricket|creditunion|creditcard|credit|courses|coupons|coupon|country|corsica|coop|cool|cookingchannel|cooking|contractors|contact|consulting|construction|condos|comsec|computer|compare|company|community|commbank|comcast|com|cologne|college|coffee|codes|coach|clubmed|club|cloud|clothing|clinique|clinic|click|cleaning|claims|cityeats|city|citic|citi|citadel|cisco|circle|cipriani|church|chrysler|chrome|christmas|chloe|chintai|cheap|chat|chase|channel|chanel|cfd|cfa|cern|ceo|center|ceb|cbs|cbre|cbn|cba|catholic|catering|cat|casino|cash|caseih|case|casa|cartier|cars|careers|career|care|cards|caravan|car|capitalone|capital|capetown|canon|cancerresearch|camp|camera|cam|calvinklein|call|cal|cafe|cab|bzh|buzz|buy|business|builders|build|bugatti|budapest|brussels|brother|broker|broadway|bridgestone|bradesco|box|boutique|bot|boston|bostik|bosch|boots|booking|book|boo|bond|bom|bofa|boehringer|boats|bnpparibas|bnl|bmw|bms|blue|bloomberg|blog|blockbuster|blanco|blackfriday|black|biz|bio|bingo|bing|bike|bid|bible|bharti|bet|bestbuy|best|berlin|bentley|beer|beauty|beats|bcn|bcg|bbva|bbt|bbc|bayern|bauhaus|basketball|baseball|bargains|barefoot|barclays|barclaycard|barcelona|bar|bank|band|bananarepublic|banamex|baidu|baby|azure|axa|aws|avianca|autos|auto|author|auspost|audio|audible|audi|auction|attorney|athleta|associates|asia|asda|arte|art|arpa|army|archi|aramco|arab|aquarelle|apple|app|apartments|aol|anz|anquan|android|analytics|amsterdam|amica|amfam|amex|americanfamily|americanexpress|alstom|alsace|ally|allstate|allfinanz|alipay|alibaba|alfaromeo|akdn|airtel|airforce|airbus|aigo|aig|agency|agakhan|africa|afl|afamilycompany|aetna|aero|aeg|adult|ads|adac|actor|active|aco|accountants|accountant|accenture|academy|abudhabi|abogado|able|abc|abbvie|abbott|abb|abarth|aarp|aaa|onion)(?=[^0-9a-zA-Z@]|$))")),regexen.validCCTLD=regexSupplant(RegExp("(?:(?:한국|香港|澳門|新加坡|台灣|台湾|中國|中国|გე|ไทย|ලංකා|ഭാരതം|ಭಾರತ|భారత్|சிங்கப்பூர்|இலங்கை|இந்தியா|ଭାରତ|ભારત|ਭਾਰਤ|ভাৰত|ভারত|বাংলা|भारोत|भारतम्|भारत|ڀارت|پاکستان|مليسيا|مصر|قطر|فلسطين|عمان|عراق|سورية|سودان|تونس|بھارت|بارت|ایران|امارات|المغرب|السعودية|الجزائر|الاردن|հայ|қаз|укр|срб|рф|мон|мкд|ею|бел|бг|ελ|zw|zm|za|yt|ye|ws|wf|vu|vn|vi|vg|ve|vc|va|uz|uy|us|um|uk|ug|ua|tz|tw|tv|tt|tr|tp|to|tn|tm|tl|tk|tj|th|tg|tf|td|tc|sz|sy|sx|sv|su|st|ss|sr|so|sn|sm|sl|sk|sj|si|sh|sg|se|sd|sc|sb|sa|rw|ru|rs|ro|re|qa|py|pw|pt|ps|pr|pn|pm|pl|pk|ph|pg|pf|pe|pa|om|nz|nu|nr|np|no|nl|ni|ng|nf|ne|nc|na|mz|my|mx|mw|mv|mu|mt|ms|mr|mq|mp|mo|mn|mm|ml|mk|mh|mg|mf|me|md|mc|ma|ly|lv|lu|lt|ls|lr|lk|li|lc|lb|la|kz|ky|kw|kr|kp|kn|km|ki|kh|kg|ke|jp|jo|jm|je|it|is|ir|iq|io|in|im|il|ie|id|hu|ht|hr|hn|hm|hk|gy|gw|gu|gt|gs|gr|gq|gp|gn|gm|gl|gi|gh|gg|gf|ge|gd|gb|ga|fr|fo|fm|fk|fj|fi|eu|et|es|er|eh|eg|ee|ec|dz|do|dm|dk|dj|de|cz|cy|cx|cw|cv|cu|cr|co|cn|cm|cl|ck|ci|ch|cg|cf|cd|cc|ca|bz|by|bw|bv|bt|bs|br|bq|bo|bn|bm|bl|bj|bi|bh|bg|bf|be|bd|bb|ba|az|ax|aw|au|at|as|ar|aq|ao|an|am|al|ai|ag|af|ae|ad|ac)(?=[^0-9a-zA-Z@]|$))")),regexen.validPunycode=/(?:xn--[0-9a-z]+)/,regexen.validSpecialCCTLD=/(?:(?:co|tv)(?=[^0-9a-zA-Z@]|$))/,regexen.validDomain=regexSupplant(/(?:#{validSubdomain}*#{validDomainName}(?:#{validGTLD}|#{validCCTLD}|#{validPunycode}))/),regexen.validPortNumber=/[0-9]+/,regexen.pd=/\u002d\u058a\u05be\u1400\u1806\u2010-\u2015\u2e17\u2e1a\u2e3a\u2e40\u301c\u3030\u30a0\ufe31\ufe58\ufe63\uff0d/,regexen.validGeneralUrlPathChars=regexSupplant(/[^#{spaces_group}\(\)\?]/i),regexen.validUrlBalancedParens=regexSupplant("\\((?:#{validGeneralUrlPathChars}+|(?:#{validGeneralUrlPathChars}*\\(#{validGeneralUrlPathChars}+\\)#{validGeneralUrlPathChars}*))\\)","i"),regexen.validUrlPathEndingChars=regexSupplant(/[^#{spaces_group}\(\)\?!\*';:=\,\.\$%\[\]#{pd}~&\|@]|(?:#{validUrlBalancedParens})/i),regexen.validUrlPath=regexSupplant("(?:(?:#{validGeneralUrlPathChars}*(?:#{validUrlBalancedParens}#{validGeneralUrlPathChars}*)*#{validUrlPathEndingChars})|(?:@#{validGeneralUrlPathChars}+/))","i"),regexen.validUrlQueryChars=/[a-z0-9!?\*'@\(\);:&=\+\$\/%#\[\]\-_\.,~|]/i,regexen.validUrlQueryEndingChars=/[a-z0-9_&=#\/]/i,regexen.validUrl=regexSupplant("((https?:\\/\\/)(#{validDomain})(?::(#{validPortNumber}))?(\\/#{validUrlPath}*)?(\\?#{validUrlQueryChars}*#{validUrlQueryEndingChars})?)","gi"),regexen.validUrl}(),urlPlaceholder="xxxxxxxxxxxxxxxxxxxxxxx";function countableText(_e){return _e.replace(urlRegex,urlPlaceholder).replace(/(^|[^\/\w])@(([a-z0-9_]+)@[a-z0-9\.\-]+[a-z0-9]+)/ig,"$1@$3")}const vitePluginRequire_1697861830756_29060547="/packs/assets/square-key-1195e5c6.svg",vitePluginRequire_1697861830756_96964546="/packs/assets/markdown-b9941e2f.svg",vitePluginRequire_1697861822222_12070999="/packs/assets/file-text-432848a4.svg";var Overlay$1={exports:{}},elementType={exports:{}},createChainableTypeChecker={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0}),et.default=tt;function tt(nt){function rt(it,ot,st,ct,ut,dt){var ft=ct||"<>",pt=dt||st;if(ot[st]==null)return it?new Error("Required "+ut+" `"+pt+"` was not specified "+("in `"+ft+"`.")):null;for(var mt=arguments.length,ht=Array(mt>6?mt-6:0),Et=6;Et"u"?"undefined":tt(mt);return rt.default.isValidElement(mt)?new Error("Invalid "+ft+" `"+pt+"` of type ReactElement "+("supplied to `"+dt+"`, expected a ReactComponent or a ")+"DOMElement. You can usually obtain a ReactComponent or DOMElement from a ReactElement by attaching a ref to it."):(ht!=="object"||typeof mt.render!="function")&&mt.nodeType!==1?new Error("Invalid "+ft+" `"+pt+"` of value `"+mt+"` "+("supplied to `"+dt+"`, expected a ReactComponent or a ")+"DOMElement."):null}et.default=(0,it.default)(st),_e.exports=et.default})(componentOrElement,componentOrElement.exports);var componentOrElementExports=componentOrElement.exports,getContainer={exports:{}};(function(_e,et){et.__esModule=!0,et.default=at;var tt=reactDomExports,nt=rt(tt);function rt(it){return it&&it.__esModule?it:{default:it}}function at(it,ot){return it=typeof it=="function"?it():it,nt.default.findDOMNode(it)||ot}_e.exports=et.default})(getContainer,getContainer.exports);var getContainerExports=getContainer.exports,ownerDocument$1={exports:{}},ownerDocument={exports:{}};(function(_e,et){et.__esModule=!0,et.default=tt;function tt(nt){return nt&&nt.ownerDocument||document}_e.exports=et.default})(ownerDocument,ownerDocument.exports);var ownerDocumentExports$1=ownerDocument.exports;(function(_e,et){et.__esModule=!0,et.default=function(ot){return(0,at.default)(nt.default.findDOMNode(ot))};var tt=reactDomExports,nt=it(tt),rt=ownerDocumentExports$1,at=it(rt);function it(ot){return ot&&ot.__esModule?ot:{default:ot}}_e.exports=et.default})(ownerDocument$1,ownerDocument$1.exports);var ownerDocumentExports=ownerDocument$1.exports,LegacyPortal={exports:{}};(function(_e,et){et.__esModule=!0;var tt=propTypesExports,nt=mt(tt),rt=componentOrElementExports,at=mt(rt),it=reactExports,ot=mt(it),st=reactDomExports,ct=mt(st),ut=getContainerExports,dt=mt(ut),ft=ownerDocumentExports,pt=mt(ft);function mt(gt){return gt&>.__esModule?gt:{default:gt}}function ht(gt,St){if(!(gt instanceof St))throw new TypeError("Cannot call a class as a function")}function Et(gt,St){if(!gt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return St&&(typeof St=="object"||typeof St=="function")?St:gt}function yt(gt,St){if(typeof St!="function"&&St!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof St);gt.prototype=Object.create(St&&St.prototype,{constructor:{value:gt,enumerable:!1,writable:!0,configurable:!0}}),St&&(Object.setPrototypeOf?Object.setPrototypeOf(gt,St):gt.__proto__=St)}var vt=function(gt){yt(St,gt);function St(){var Rt,$t,bt;ht(this,St);for(var wt=arguments.length,xt=Array(wt),Tt=0;Tt{const et={isDeveloper:(tt=!0)=>{if(![!0,!1].includes(tt))throw`Invalid option ${tt}. Must be true or false.`;return _e.dispatch(changeSettingImmediate(["isDeveloper"],tt)),tt}};window.Soapbox=et};var getNative=_getNative,defineProperty$1=function(){try{var _e=getNative(Object,"defineProperty");return _e({},"",{}),_e}catch{}}(),_defineProperty$1=defineProperty$1,defineProperty=_defineProperty$1;function baseAssignValue$1(_e,et,tt){et=="__proto__"&&defineProperty?defineProperty(_e,et,{configurable:!0,enumerable:!0,value:tt,writable:!0}):_e[et]=tt}var _baseAssignValue=baseAssignValue$1;function createBaseFor$1(_e){return function(et,tt,nt){for(var rt=-1,at=Object(et),it=nt(et),ot=it.length;ot--;){var st=it[_e?ot:++rt];if(tt(at[st],st,at)===!1)break}return et}}var _createBaseFor=createBaseFor$1,createBaseFor=_createBaseFor,baseFor$1=createBaseFor(),_baseFor=baseFor$1,baseFor=_baseFor,keys$1=keys_1;function baseForOwn$1(_e,et){return _e&&baseFor(_e,et,keys$1)}var _baseForOwn=baseForOwn$1,baseAssignValue=_baseAssignValue,baseForOwn=_baseForOwn,baseIteratee=_baseIteratee;function mapValues(_e,et){var tt={};return et=baseIteratee(et),baseForOwn(_e,function(nt,rt,at){baseAssignValue(tt,rt,et(nt,rt,at))}),tt}var mapValues_1=mapValues;const mapValues$1=getDefaultExportFromCjs$1(mapValues_1),PLEROMA_PRELOAD_IMPORT="PLEROMA_PRELOAD_IMPORT",MASTODON_PRELOAD_IMPORT="MASTODON_PRELOAD_IMPORT",decodeUTF8Base64=_e=>{const et=atob(_e),tt=Uint8Array.from(et.split("").map(rt=>rt.charCodeAt(0)));return new TextDecoder().decode(tt)},decodePleromaData=_e=>mapValues$1(_e,et=>JSON.parse(decodeUTF8Base64(et))),pleromaDecoder=_e=>decodePleromaData(JSON.parse(_e)),decodeFromMarkup=(_e,et)=>{const{textContent:tt}=document.getElementById(_e);return et(tt)},preloadFromMarkup=(_e,et,tt)=>nt=>{try{const rt=decodeFromMarkup(_e,et);nt(tt(rt))}catch{}},preload=()=>_e=>{_e(preloadFromMarkup("initial-results",pleromaDecoder,preloadPleroma)),_e(preloadFromMarkup("initial-state",JSON.parse,preloadMastodon))},preloadPleroma=_e=>({type:PLEROMA_PRELOAD_IMPORT,data:_e}),preloadMastodon=_e=>et=>{const{me:tt,access_token:nt}=_e.meta,{url:rt}=_e.accounts[tt];et(importFetchedAccounts(Object.values(_e.accounts))),et(verifyCredentials(nt,rt)),et({type:MASTODON_PRELOAD_IMPORT,data:_e})},start=()=>{Promise.all([__vitePreload(()=>import("./js/index-d962c00d.js"),["packs/js/index-d962c00d.js","packs/js/browsertracing-7f035310.js"]),__vitePreload(()=>import("./js/index-e9273806.js"),["packs/js/index-e9273806.js","packs/js/browsertracing-7f035310.js"])]).then(([_e,{Integrations:et}])=>{_e.init({dsn:SENTRY_DSN,environment:NODE_ENV,debug:!1,integrations:[new et.BrowserTracing],ignoreErrors:["AxiosError","Failed to update a ServiceWorker for scope","AbortError","No available storage method found"],denyUrls:[/extensions\//i,/^chrome:\/\//i,/^moz-extension:\/\//i],tracesSampleRate:1})}).catch(console.error)},captureException=(_e,et)=>{__vitePreload(()=>import("./js/index-d962c00d.js"),["packs/js/index-d962c00d.js","packs/js/browsertracing-7f035310.js"]).then(tt=>{tt.captureException(_e,et)}).catch(console.error)},registerSw=_e=>{"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register(_e,{scope:"/"})})},unregisterSw=async()=>{if(navigator.serviceWorker){const et=(await navigator.serviceWorker.getRegistrations()).map(tt=>tt.unregister());await Promise.all(et)}};function _createSuper$2(_e){var et=_isNativeReflectConstruct$2();return function(){var nt=_getPrototypeOf$1(_e),rt;if(et){var at=_getPrototypeOf$1(this).constructor;rt=Reflect.construct(nt,arguments,at)}else rt=nt.apply(this,arguments);return _possibleConstructorReturn$1(this,rt)}}function _isNativeReflectConstruct$2(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var goHome=function _e(){return location.href="/"},mapStateToProps$1=function _e(et){var tt=getSoapboxConfig(et),nt=tt.links,rt=tt.logo;return{siteTitle:et.instance.title,logo:rt,links:nt}},ErrorBoundary=function(_e){_inherits$1(tt,_e);var et=_createSuper$2(tt);function tt(){var nt;_classCallCheck$1(this,tt);for(var rt=arguments.length,at=new Array(rt),it=0;itimport("./js/bowser-1e7dda30.js"),[]).then(function(ot){var st=ot.default;it.setState({browser:st.getParser(window.navigator.userAgent)})}).catch(function(){})}},{key:"render",value:function(){var rt=this.state,at=rt.browser,it=rt.hasError,ot=this.props,st=ot.children,ct=ot.links;if(!it)return st;var ut=NODE_ENV==="production",dt=this.getErrorText();return _createRawReactElement("div",{className:"flex h-screen flex-col bg-white pb-12 pt-16 dark:bg-primary-900"},void 0,_createRawReactElement("main",{className:"mx-auto flex w-full max-w-7xl grow flex-col justify-center px-4 sm:px-6 lg:px-8"},void 0,_createRawReactElement("div",{className:"flex shrink-0 justify-center"},void 0,_createRawReactElement("a",{href:"/",className:"inline-flex"},void 0,_createRawReactElement(SiteLogo,{alt:"Logo",className:"h-12 w-auto cursor-pointer"}))),_createRawReactElement("div",{className:"py-8"},void 0,_createRawReactElement("div",{className:"mx-auto max-w-xl space-y-2 text-center"},void 0,_createRawReactElement("h1",{className:"text-3xl font-extrabold tracking-tight text-gray-900 dark:text-gray-500 sm:text-4xl"},void 0,_createRawReactElement(FormattedMessage$1,{id:"alert.unexpected.message",defaultMessage:"Something went wrong."})),_createRawReactElement("p",{className:"text-lg text-gray-700 dark:text-gray-600"},void 0,_createRawReactElement(FormattedMessage$1,{id:"alert.unexpected.body",defaultMessage:"We're sorry for the interruption. If the problem persists, please reach out to our support team. You may also try to {clearCookies} (this will log you out).",values:{clearCookies:_createRawReactElement("a",{href:"/",onClick:this.clearCookies,className:"text-primary-600 hover:underline dark:text-accent-blue"},void 0,_createRawReactElement(FormattedMessage$1,{id:"alert.unexpected.clear_cookies",defaultMessage:"clear cookies and browser data"}))}})),_createRawReactElement(Text$2,{theme:"muted"},void 0,_createRawReactElement(Text$2,{weight:"medium",tag:"span",theme:"muted"},void 0,sourceCode.displayName,":")," ",sourceCode.version),_createRawReactElement("div",{className:"mt-10"},void 0,_createRawReactElement("a",{href:"/",className:"text-base font-medium text-primary-600 hover:underline dark:text-accent-blue"},void 0,_createRawReactElement(FormattedMessage$1,{id:"alert.unexpected.return_home",defaultMessage:"Return Home"}),_createRawReactElement("span",{"aria-hidden":"true"},void 0," →")))),!ut&&_createRawReactElement("div",{className:"mx-auto max-w-lg space-y-4 py-16"},void 0,dt&&React$3.createElement("textarea",{ref:this.setTextareaRef,className:"block h-48 w-full rounded-md border-gray-300 bg-gray-100 p-4 font-mono text-gray-900 shadow-sm focus:border-primary-500 focus:ring-2 focus:ring-primary-500 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-100 sm:text-sm",value:dt,onClick:this.handleCopy,readOnly:!0}),at&&_createRawReactElement(Stack,{},void 0,_createRawReactElement(Text$2,{weight:"semibold"},void 0,_createRawReactElement(FormattedMessage$1,{id:"alert.unexpected.browser",defaultMessage:"Browser"})),_createRawReactElement(Text$2,{theme:"muted"},void 0,at.getBrowserName()," ",at.getBrowserVersion()))))),_createRawReactElement("footer",{className:"mx-auto w-full max-w-7xl shrink-0 px-4 sm:px-6 lg:px-8"},void 0,_createRawReactElement(HStack,{justifyContent:"center",space:4,element:"nav"},void 0,ct.get("status")&&React$3.createElement(React$3.Fragment,null,_createRawReactElement("a",{href:ct.get("status"),className:"text-sm font-medium text-gray-700 hover:underline dark:text-gray-600"},void 0,_createRawReactElement(FormattedMessage$1,{id:"alert.unexpected.links.status",defaultMessage:"Status"}))),ct.get("help")&&React$3.createElement(React$3.Fragment,null,_createRawReactElement("span",{className:"inline-block border-l border-gray-300","aria-hidden":"true"}),_createRawReactElement("a",{href:ct.get("help"),className:"text-sm font-medium text-gray-700 hover:underline dark:text-gray-600"},void 0,_createRawReactElement(FormattedMessage$1,{id:"alert.unexpected.links.help",defaultMessage:"Help Center"}))),ct.get("support")&&React$3.createElement(React$3.Fragment,null,_createRawReactElement("span",{className:"inline-block border-l border-gray-300","aria-hidden":"true"}),_createRawReactElement("a",{href:ct.get("support"),className:"text-sm font-medium text-gray-700 hover:underline dark:text-gray-600"},void 0,_createRawReactElement(FormattedMessage$1,{id:"alert.unexpected.links.support",defaultMessage:"Support"}))))))}}]),tt}(React$3.PureComponent);const ErrorBoundary$1=connect(mapStateToProps$1)(ErrorBoundary),CUSTOM_EMOJIS_FETCH_REQUEST="CUSTOM_EMOJIS_FETCH_REQUEST",CUSTOM_EMOJIS_FETCH_SUCCESS="CUSTOM_EMOJIS_FETCH_SUCCESS",CUSTOM_EMOJIS_FETCH_FAIL="CUSTOM_EMOJIS_FETCH_FAIL",fetchCustomEmojis=()=>(_e,et)=>{et().me&&(_e(fetchCustomEmojisRequest()),api(et).get("/api/v1/custom_emojis").then(nt=>{_e(fetchCustomEmojisSuccess(nt.data))}).catch(nt=>{_e(fetchCustomEmojisFail(nt))}))},fetchCustomEmojisRequest=()=>({type:CUSTOM_EMOJIS_FETCH_REQUEST,skipLoading:!0}),fetchCustomEmojisSuccess=_e=>({type:CUSTOM_EMOJIS_FETCH_SUCCESS,custom_emojis:_e,skipLoading:!0}),fetchCustomEmojisFail=_e=>({type:CUSTOM_EMOJIS_FETCH_FAIL,error:_e,skipLoading:!0}),PUSH_SUBSCRIPTION_CREATE_REQUEST="PUSH_SUBSCRIPTION_CREATE_REQUEST",PUSH_SUBSCRIPTION_CREATE_SUCCESS="PUSH_SUBSCRIPTION_CREATE_SUCCESS",PUSH_SUBSCRIPTION_CREATE_FAIL="PUSH_SUBSCRIPTION_CREATE_FAIL",createPushSubscription=_e=>(et,tt)=>(et({type:PUSH_SUBSCRIPTION_CREATE_REQUEST,params:_e}),api(tt).post("/api/v1/push/subscription",_e).then(({data:nt})=>et({type:PUSH_SUBSCRIPTION_CREATE_SUCCESS,params:_e,subscription:nt})).catch(nt=>et({type:PUSH_SUBSCRIPTION_CREATE_FAIL,params:_e,error:nt}))),decode=_e=>{const et=window.atob(_e),tt=new Uint8Array(et.length);for(let nt=0;nt({type:SET_BROWSER_SUPPORT,value:_e}),setSubscription=_e=>({type:SET_SUBSCRIPTION,subscription:_e}),clearSubscription=()=>({type:CLEAR_SUBSCRIPTION}),urlBase64ToUint8Array=_e=>{const et="=".repeat((4-_e.length%4)%4),tt=(_e+et).replace(/-/g,"+").replace(/_/g,"/");return decode(tt)},getRegistration=()=>{if(navigator.serviceWorker)return navigator.serviceWorker.ready;throw"Your browser does not support Service Workers."},getPushSubscription=_e=>_e.pushManager.getSubscription().then(et=>({registration:_e,subscription:et})),subscribe=(_e,et)=>_e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:urlBase64ToUint8Array(getVapidKey(et()))}),unsubscribe=({registration:_e,subscription:et})=>et?et.unsubscribe().then(()=>_e):new Promise(tt=>tt(_e)),sendSubscriptionToBackend=(_e,et)=>(tt,nt)=>{const rt=nt().push_notifications.alerts.toJS(),at={subscription:_e,data:{alerts:rt}};if(et){const it=pushNotificationsSetting.get(et);it&&(at.data=it)}return tt(createPushSubscription(at))},supportsPushNotifications="serviceWorker"in navigator&&"PushManager"in window&&"getKey"in PushSubscription.prototype,register=()=>(_e,et)=>{const tt=et().me,nt=getVapidKey(et());if(_e(setBrowserSupport(supportsPushNotifications)),!supportsPushNotifications){console.warn("Your browser does not support Web Push Notifications.");return}if(!nt){console.error("The VAPID public key is not set. You will not be able to receive Web Push Notifications.");return}getRegistration().then(getPushSubscription).then(({registration:rt,subscription:at})=>{var it;if(at!==null){const ot=new Uint8Array(at.options.applicationServerKey).toString(),st=urlBase64ToUint8Array(nt).toString(),ct=(it=et().push_notifications.subscription)==null?void 0:it.endpoint;return st===ot&&at.endpoint===ct?{subscription:at}:unsubscribe({registration:rt,subscription:at}).then(ut=>subscribe(ut,et)).then(ut=>_e(sendSubscriptionToBackend(ut,tt)))}return subscribe(rt,et).then(ot=>_e(sendSubscriptionToBackend(ot,tt)))}).then(({subscription:rt})=>{rt instanceof PushSubscription||(_e(setSubscription(rt)),tt&&pushNotificationsSetting.set(tt,{alerts:rt.alerts}))}).catch(rt=>(rt.code===20&&rt.name==="AbortError"?console.warn("Your browser supports Web Push Notifications, but does not seem to implement the VAPID protocol."):rt.code===5&&rt.name==="InvalidCharacterError"&&console.error("The VAPID public key seems to be invalid:",nt),_e(clearSubscription()),tt&&pushNotificationsSetting.remove(tt),getRegistration().then(getPushSubscription).then(unsubscribe))).catch(console.warn)},SCHEDULED_STATUSES_FETCH_REQUEST="SCHEDULED_STATUSES_FETCH_REQUEST",SCHEDULED_STATUSES_FETCH_SUCCESS="SCHEDULED_STATUSES_FETCH_SUCCESS",SCHEDULED_STATUSES_FETCH_FAIL="SCHEDULED_STATUSES_FETCH_FAIL",SCHEDULED_STATUSES_EXPAND_REQUEST="SCHEDULED_STATUSES_EXPAND_REQUEST",SCHEDULED_STATUSES_EXPAND_SUCCESS="SCHEDULED_STATUSES_EXPAND_SUCCESS",SCHEDULED_STATUSES_EXPAND_FAIL="SCHEDULED_STATUSES_EXPAND_FAIL",SCHEDULED_STATUS_CANCEL_REQUEST="SCHEDULED_STATUS_CANCEL_REQUEST",SCHEDULED_STATUS_CANCEL_SUCCESS="SCHEDULED_STATUS_CANCEL_SUCCESS",SCHEDULED_STATUS_CANCEL_FAIL="SCHEDULED_STATUS_CANCEL_FAIL",fetchScheduledStatuses=()=>(_e,et)=>{var at;const tt=et();if((at=tt.status_lists.get("scheduled_statuses"))!=null&&at.isLoading)return;const nt=tt.instance;getFeatures(nt).scheduledStatuses&&(_e(fetchScheduledStatusesRequest()),api(et).get("/api/v1/scheduled_statuses").then(it=>{const ot=getLinks(it).refs.find(st=>st.rel==="next");_e(fetchScheduledStatusesSuccess(it.data,ot?ot.uri:null))}).catch(it=>{_e(fetchScheduledStatusesFail(it))}))},cancelScheduledStatus=_e=>(et,tt)=>{et({type:SCHEDULED_STATUS_CANCEL_REQUEST,id:_e}),api(tt).delete(`/api/v1/scheduled_statuses/${_e}`).then(({data:nt})=>{et({type:SCHEDULED_STATUS_CANCEL_SUCCESS,id:_e,data:nt})}).catch(nt=>{et({type:SCHEDULED_STATUS_CANCEL_FAIL,id:_e,error:nt})})},fetchScheduledStatusesRequest=()=>({type:SCHEDULED_STATUSES_FETCH_REQUEST}),fetchScheduledStatusesSuccess=(_e,et)=>({type:SCHEDULED_STATUSES_FETCH_SUCCESS,statuses:_e,next:et}),fetchScheduledStatusesFail=_e=>({type:SCHEDULED_STATUSES_FETCH_FAIL,error:_e}),expandScheduledStatuses=()=>(_e,et)=>{var nt,rt;const tt=((nt=et().status_lists.get("scheduled_statuses"))==null?void 0:nt.next)||null;tt===null||(rt=et().status_lists.get("scheduled_statuses"))!=null&&rt.isLoading||(_e(expandScheduledStatusesRequest()),api(et).get(tt).then(at=>{const it=getLinks(at).refs.find(ot=>ot.rel==="next");_e(expandScheduledStatusesSuccess(at.data,it?it.uri:null))}).catch(at=>{_e(expandScheduledStatusesFail(at))}))},expandScheduledStatusesRequest=()=>({type:SCHEDULED_STATUSES_EXPAND_REQUEST}),expandScheduledStatusesSuccess=(_e,et)=>({type:SCHEDULED_STATUSES_EXPAND_SUCCESS,statuses:_e,next:et}),expandScheduledStatusesFail=_e=>({type:SCHEDULED_STATUSES_EXPAND_FAIL,error:_e}),SUGGESTIONS_FETCH_REQUEST="SUGGESTIONS_FETCH_REQUEST",SUGGESTIONS_FETCH_SUCCESS="SUGGESTIONS_FETCH_SUCCESS",SUGGESTIONS_FETCH_FAIL="SUGGESTIONS_FETCH_FAIL",SUGGESTIONS_DISMISS="SUGGESTIONS_DISMISS",SUGGESTIONS_V2_FETCH_REQUEST="SUGGESTIONS_V2_FETCH_REQUEST",SUGGESTIONS_V2_FETCH_SUCCESS="SUGGESTIONS_V2_FETCH_SUCCESS",SUGGESTIONS_V2_FETCH_FAIL="SUGGESTIONS_V2_FETCH_FAIL",SUGGESTIONS_TRUTH_FETCH_SUCCESS="SUGGESTIONS_TRUTH_FETCH_SUCCESS",fetchSuggestionsV1=(_e={})=>(et,tt)=>(et({type:SUGGESTIONS_FETCH_REQUEST,skipLoading:!0}),api(tt).get("/api/v1/suggestions",{params:_e}).then(({data:nt})=>(et(importFetchedAccounts(nt)),et({type:SUGGESTIONS_FETCH_SUCCESS,accounts:nt,skipLoading:!0}),nt)).catch(nt=>{throw et({type:SUGGESTIONS_FETCH_FAIL,error:nt,skipLoading:!0,skipAlert:!0}),nt})),fetchSuggestionsV2=(_e={})=>(et,tt)=>{const nt=tt().suggestions.next;return et({type:SUGGESTIONS_V2_FETCH_REQUEST,skipLoading:!0}),api(tt).get(nt||"/api/v2/suggestions",nt?{}:{params:_e}).then(rt=>{var st;const at=rt.data,it=at.map(({account:ct})=>ct),ot=(st=getLinks(rt).refs.find(ct=>ct.rel==="next"))==null?void 0:st.uri;return et(importFetchedAccounts(it)),et({type:SUGGESTIONS_V2_FETCH_SUCCESS,suggestions:at,next:ot,skipLoading:!0}),at}).catch(rt=>{throw et({type:SUGGESTIONS_V2_FETCH_FAIL,error:rt,skipLoading:!0,skipAlert:!0}),rt})},mapSuggestedProfileToAccount=_e=>({id:_e.account_id,avatar:_e.account_avatar,avatar_static:_e.account_avatar,acct:_e.acct,display_name:_e.display_name,note:_e.note,verified:_e.verified}),fetchTruthSuggestions=(_e={})=>(et,tt)=>{const nt=tt().suggestions.next;return et({type:SUGGESTIONS_V2_FETCH_REQUEST,skipLoading:!0}),api(tt).get(nt||"/api/v1/truth/carousels/suggestions",nt?{}:{params:_e}).then(rt=>{var st;const at=rt.data,it=(st=getLinks(rt).refs.find(ct=>ct.rel==="next"))==null?void 0:st.uri,ot=at.map(mapSuggestedProfileToAccount);return et(importFetchedAccounts(ot,{should_refetch:!0})),et({type:SUGGESTIONS_TRUTH_FETCH_SUCCESS,suggestions:at,next:it,skipLoading:!0}),at}).catch(rt=>{throw et({type:SUGGESTIONS_V2_FETCH_FAIL,error:rt,skipLoading:!0,skipAlert:!0}),rt})},fetchSuggestions=(_e={limit:50})=>(et,tt)=>{const nt=tt(),rt=nt.me,at=nt.instance,it=getFeatures(at);return rt?it.truthSuggestions?et(fetchTruthSuggestions(_e)).then(ot=>{const st=ot.map(ct=>ct.account_id);et(fetchRelationships(st))}).catch(()=>{}):it.suggestionsV2?et(fetchSuggestionsV2(_e)).then(ot=>{const st=ot.map(({account:ct})=>ct.id);et(fetchRelationships(st))}).catch(()=>{}):it.suggestions?et(fetchSuggestionsV1(_e)).then(ot=>{const st=ot.map(({id:ct})=>ct);et(fetchRelationships(st))}).catch(()=>{}):null:null},fetchSuggestionsForTimeline=()=>(_e,et)=>{var tt;(tt=_e(fetchSuggestions({limit:20})))==null||tt.then(()=>_e(insertSuggestionsIntoTimeline()))};var ColumnLoading=function _e(){return _createRawReactElement(Card$1,{variant:"rounded"},void 0,_createRawReactElement(CardBody,{},void 0,_createRawReactElement(Spinner,{})))};function ownKeys$4(_e,et){var tt=Object.keys(_e);if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(_e);et&&(nt=nt.filter(function(rt){return Object.getOwnPropertyDescriptor(_e,rt).enumerable})),tt.push.apply(tt,nt)}return tt}function _objectSpread$3(_e){for(var et=1;et0)&&Et.push({to:"/follow_requests",text:et.formatMessage(messages$q.follow_requests),icon:vitePluginRequire_1697864653844_96831868,count:ut}),rt.bookmarks&&Et.push({to:"/bookmarks",text:et.formatMessage(messages$q.bookmarks),icon:vitePluginRequire_1697864655029_20168574}),rt.lists&&Et.push({to:"/lists",text:et.formatMessage(messages$q.lists),icon:vitePluginRequire_1697864653844_20943787}),rt.events&&Et.push({to:"/events",text:et.formatMessage(messages$q.events),icon:vitePluginRequire_1697864656340_67678421}),at.get("isDeveloper")&&Et.push({to:"/developers",icon:vitePluginRequire_1697864653844_12790617,text:et.formatMessage(messages$q.developers)}),ot.staff&&Et.push({to:"/ghostbox/admin",icon:vitePluginRequire_1697864646783_28594800,text:et.formatMessage(messages$q.dashboard)}),Et.push({to:"/settings",icon:vitePluginRequire_1697864653845_68300489,text:et.formatMessage(messages$q.settings)})),Et},pt=ft(),mt=function(){return rt.chats?_createRawReactElement(SidebarNavigationLink,{to:"/chats",icon:vitePluginRequire_1697864655029_28864811,count:nt,countMax:9,text:_createRawReactElement(FormattedMessage$1,{id:"navigation.chats",defaultMessage:"Chats"})}):rt.directTimeline||rt.conversations?_createRawReactElement(SidebarNavigationLink,{to:"/messages",icon:vitePluginRequire_1697864655029_52560061,text:_createRawReactElement(FormattedMessage$1,{id:"navigation.direct_messages",defaultMessage:"Messages"})}):null};return _createRawReactElement(Stack,{space:4},void 0,_createRawReactElement(Stack,{space:2},void 0,React$3.createElement(SidebarNavigationLink,{to:"/",icon:vitePluginRequire_1697864667738_85292214,text:_createRawReactElement(FormattedMessage$1,{id:"tabs_bar.home",defaultMessage:"Home"}),ref:useHotkey("g h")}),_createRawReactElement(SidebarNavigationLink,{to:"/search",icon:vitePluginRequire_1697864655763_96912751,text:_createRawReactElement(FormattedMessage$1,{id:"tabs_bar.search",defaultMessage:"Search"})}),rt.publicTimeline&&React$3.createElement(React$3.Fragment,null,_createRawReactElement(SidebarNavigationLink,{to:"/timeline/local",icon:rt.federating?vitePluginRequire_1697864667784_30050106:vitePluginRequire_1697864669741_76284640,text:rt.federating?_createRawReactElement(FormattedMessage$1,{id:"tabs_bar.local",defaultMessage:"Local"}):_createRawReactElement(FormattedMessage$1,{id:"tabs_bar.all",defaultMessage:"All"})}),rt.federating&&_createRawReactElement(SidebarNavigationLink,{to:"/timeline/fediverse",icon:vitePluginRequire_1697864653844_43623913,text:_createRawReactElement(FormattedMessage$1,{id:"tabs_bar.fediverse",defaultMessage:"Fediverse"})})),ot&&React$3.createElement(React$3.Fragment,null,React$3.createElement(SidebarNavigationLink,{to:"/notifications",icon:vitePluginRequire_1697864673476_47296655,count:ct,text:_createRawReactElement(FormattedMessage$1,{id:"tabs_bar.notifications",defaultMessage:"Notifications"}),ref:useHotkey("g n")}),mt(),rt.groups&&_createRawReactElement(SidebarNavigationLink,{to:st,icon:vitePluginRequire_1697864655760_71578718,text:_createRawReactElement(FormattedMessage$1,{id:"tabs_bar.groups",defaultMessage:"Groups"})}),React$3.createElement(SidebarNavigationLink,{to:"/@".concat(ot.acct),icon:vitePluginRequire_1697864653844_80969986,text:_createRawReactElement(FormattedMessage$1,{id:"tabs_bar.profile",defaultMessage:"Profile"}),ref:useHotkey("g u")})),pt.length>0&&_createRawReactElement(DropdownMenu,{items:pt,placement:"top"},void 0,_createRawReactElement(SidebarNavigationLink,{icon:vitePluginRequire_1697864646776_27677051,count:ot!=null&&ot.staff?dt:void 0,text:_createRawReactElement(FormattedMessage$1,{id:"tabs_bar.more",defaultMessage:"More"})}))),ot&&_createRawReactElement(ComposeButton,{}))},_excluded$4=["icon","count","countMax"],IconWithCounter=function _e(et){var tt=et.icon,nt=et.count,rt=et.countMax,at=_objectWithoutProperties(et,_excluded$4);return _createRawReactElement("div",{className:"relative"},void 0,React$3.createElement(Icon,_extends$4({id:tt},at)),nt>0&&_createRawReactElement("span",{className:"absolute -right-3 -top-2"},void 0,_createRawReactElement(Counter,{count:nt,countMax:rt})))},ThumbNavigationLink=function _e(et){var tt=et.count,nt=et.countMax,rt=et.src,at=et.text,it=at===void 0?void 0:at,ot=et.to,st=et.exact,ct=et.paths,ut=useLocation$1(),dt=ut.pathname,ft=function(){return ct?ct.some(function(Et){return dt.startsWith(Et)}):st?dt===ot:dt.startsWith(ot)},pt=ft(),mt=clsx({"h-5 w-5":it!==void 0,"h-6 w-6":it===void 0,"text-gray-600":!pt,"text-primary-500":pt});return _createRawReactElement(NavLink,{to:ot,exact:st,className:"thumb-navigation__link"},void 0,tt!==void 0?_createRawReactElement(IconWithCounter,{src:rt,className:mt,count:tt,countMax:nt}):_createRawReactElement(Icon$1,{src:rt,className:mt}),it!==void 0&&_createRawReactElement(Text$2,{tag:"span",size:"xs",weight:"medium",className:clsx({"text-gray-600":!pt,"text-primary-500":pt})},void 0,it))},ThumbNavigation=function _e(){var et=useOwnAccount(),tt=et.account,nt=useFeatures(),rt=useGroupsPath(),at=useStatContext(),it=at.unreadChatsCount,ot=useAppSelector(function(ut){return ut.notifications.unread}),st=useAppSelector(function(ut){return ut.admin.openReports.count()+ut.admin.awaitingApproval.count()}),ct=[];return ct.push({src:vitePluginRequire_1697864667738_85292214,text:_createRawReactElement(FormattedMessage$1,{id:"navigation.home",defaultMessage:"Home"}),to:"/",exact:!0}),nt.groups&&ct.push({src:vitePluginRequire_1697864655760_71578718,text:_createRawReactElement(FormattedMessage$1,{id:"tabs_bar.groups",defaultMessage:"Groups"}),to:rt,exact:!0}),ct.push({src:vitePluginRequire_1697864655763_96912751,text:_createRawReactElement(FormattedMessage$1,{id:"navigation.search",defaultMessage:"Search"}),to:"/search",exact:!0}),tt&&ct.push({src:vitePluginRequire_1697864673476_47296655,text:_createRawReactElement(FormattedMessage$1,{id:"navigation.notifications",defaultMessage:"Alerts"}),to:"/notifications",exact:!0,count:ot}),nt.chats?ct.push({src:vitePluginRequire_1697864655029_28864811,text:_createRawReactElement(FormattedMessage$1,{id:"navigation.chats",defaultMessage:"Chats"}),to:"/chats",exact:!0,count:it,countMax:9}):(nt.directTimeline||nt.conversations)&&ct.push({src:vitePluginRequire_1697864655029_52560061,text:_createRawReactElement(FormattedMessage$1,{id:"navigation.direct_messages",defaultMessage:"Messages"}),to:"/messages",paths:["/messages","/conversations"]}),tt&&tt.staff&&ct.push({src:vitePluginRequire_1697864646783_28594800,text:_createRawReactElement(FormattedMessage$1,{id:"navigation.dashboard",defaultMessage:"Dashboard"}),to:"/ghostbox/admin",count:st}),_createRawReactElement("div",{className:"thumb-navigation"},void 0,ct.map(function(ut,dt){return ct.length>=5&&(ut.text=void 0),React$3.createElement(ThumbNavigationLink,_extends$4({key:dt},ut))}))},_excluded$3=["children","className"],FooterLink=function _e(et){var tt=et.children,nt=et.className,rt=_objectWithoutProperties(et,_excluded$3);return _createRawReactElement("div",{},void 0,React$3.createElement(Link$2,_extends$4({className:clsx("text-gray-700 hover:text-gray-800 hover:underline dark:text-gray-600 dark:hover:text-gray-500",nt)},rt),tt))},LinkFooter=function _e(){var et=useOwnAccount(),tt=et.account,nt=useFeatures(),rt=useSoapboxConfig(),at=useBackend(),it=useAppDispatch(),ot=function(ct){it(logOut$1()),ct.preventDefault()};return _createRawReactElement("div",{className:"space-y-2"},void 0,_createRawReactElement("div",{className:"divide-x-dot flex flex-wrap items-center text-gray-600"},void 0,tt&&React$3.createElement(React$3.Fragment,null,nt.profileDirectory&&_createRawReactElement(FooterLink,{to:"/directory"},void 0,_createRawReactElement(FormattedMessage$1,{id:"navigation_bar.profile_directory",defaultMessage:"Profile directory"})),_createRawReactElement(FooterLink,{to:"/blocks"},void 0,_createRawReactElement(FormattedMessage$1,{id:"navigation_bar.blocks",defaultMessage:"Blocks"})),_createRawReactElement(FooterLink,{to:"/mutes"},void 0,_createRawReactElement(FormattedMessage$1,{id:"navigation_bar.mutes",defaultMessage:"Mutes"})),(nt.filters||nt.filtersV2)&&_createRawReactElement(FooterLink,{to:"/filters"},void 0,_createRawReactElement(FormattedMessage$1,{id:"navigation_bar.filters",defaultMessage:"Filters"})),nt.followedHashtagsList&&_createRawReactElement(FooterLink,{to:"/followed_tags"},void 0,_createRawReactElement(FormattedMessage$1,{id:"navigation_bar.followed_tags",defaultMessage:"Followed hashtags"})),nt.federating&&_createRawReactElement(FooterLink,{to:"/domain_blocks"},void 0,_createRawReactElement(FormattedMessage$1,{id:"navigation_bar.domain_blocks",defaultMessage:"Domain blocks"})),tt.admin&&_createRawReactElement(FooterLink,{to:"/ghostbox/admin/config"},void 0,_createRawReactElement(FormattedMessage$1,{id:"navigation_bar.soapbox_config",defaultMessage:"Soapbox config"})),tt.locked&&_createRawReactElement(FooterLink,{to:"/follow_requests"},void 0,_createRawReactElement(FormattedMessage$1,{id:"navigation_bar.follow_requests",defaultMessage:"Follow requests"})),_createRawReactElement(FooterLink,{to:"/logout",onClick:ot},void 0,_createRawReactElement(FormattedMessage$1,{id:"navigation_bar.logout",defaultMessage:"Logout"})))),_createRawReactElement(Text$2,{theme:"muted",size:"sm"},void 0,rt.linkFooterMessage?_createRawReactElement("span",{className:"inline-block align-middle",dangerouslySetInnerHTML:{__html:emojify(rt.linkFooterMessage)}}):_createRawReactElement(FormattedMessage$1,{id:"getting_started.open_source_notice",defaultMessage:"{code_name} is open source software. You can contribute or report issues at {code_link} (v{code_version}). Powered by {backend_name} v{backend_version}.",values:{code_name:sourceCode.displayName,code_link:_createRawReactElement(Text$2,{theme:"subtle",tag:"span"},void 0,_createRawReactElement("a",{className:"underline",href:sourceCode.url,rel:"noopener",target:"_blank"},void 0,sourceCode.repository)),code_version:sourceCode.version,backend_name:at.software+(at.build?"+".concat(at.build):""),backend_version:at.version}})))},AdminPage=function _e(et){var tt=et.children;return React$3.createElement(React$3.Fragment,null,_createRawReactElement(Layout.Main,{},void 0,tt),_createRawReactElement(Layout.Aside,{},void 0,_createRawReactElement(BundleContainer,{fetchComponent:LatestAccountsPanel},void 0,function(nt){return _createRawReactElement(nt,{limit:5})}),_createRawReactElement(LinkFooter,{})))},ChatsPage=function _e(et){var tt=et.children;return _createRawReactElement("div",{className:"md:col-span-12 lg:col-span-9"},void 0,tt)},DefaultPage=function _e(et){var tt=et.children,nt=useAppSelector(function(at){return at.me}),rt=useFeatures();return React$3.createElement(React$3.Fragment,null,_createRawReactElement(Layout.Main,{},void 0,tt,!nt&&_createRawReactElement(BundleContainer,{fetchComponent:CtaBanner},void 0,function(at){return _createRawReactElement(at,{},"cta-banner")})),_createRawReactElement(Layout.Aside,{},void 0,!nt&&_createRawReactElement(BundleContainer,{fetchComponent:SignUpPanel},void 0,function(at){return _createRawReactElement(at,{},"sign-up-panel")}),rt.trends&&_createRawReactElement(BundleContainer,{fetchComponent:TrendsPanel},void 0,function(at){return _createRawReactElement(at,{limit:5},"trends-panel")}),nt&&rt.suggestions&&_createRawReactElement(BundleContainer,{fetchComponent:WhoToFollowPanel},void 0,function(at){return _createRawReactElement(at,{limit:3},"wtf-panel")}),_createRawReactElement(LinkFooter,{},"link-footer")))},PlaceholderAvatar=function _e(et){var tt=et.size,nt=et.withText,rt=nt===void 0?!1:nt,at=et.className,it=React$3.useMemo(function(){return tt?{width:"".concat(tt,"px"),height:"".concat(tt,"px")}:{}},[tt]);return _createRawReactElement(Stack,{space:2,className:clsx("animate-pulse text-center",at)},void 0,_createRawReactElement("div",{className:"mx-auto block rounded-full bg-primary-50 dark:bg-primary-800",style:it}),rt&&_createRawReactElement("div",{style:{width:tt,height:15},className:"mx-auto rounded-full bg-primary-50 dark:bg-primary-800"}))},PlaceholderDisplayName=function _e(et){var tt=et.minLength,nt=et.maxLength,rt=et.withSuffix,at=rt===void 0?!0:rt,it=randomIntFromInterval(nt,tt),ot=randomIntFromInterval(nt,tt);return _createRawReactElement("div",{className:"flex flex-col text-primary-50 dark:text-primary-800"},void 0,_createRawReactElement("p",{},void 0,generateText(it)),at&&_createRawReactElement("p",{},void 0,generateText(ot)))};const PlaceholderDisplayName$1=React$3.memo(PlaceholderDisplayName);var PlaceholderStatusContent=function _e(et){var tt=et.minLength,nt=et.maxLength,rt=randomIntFromInterval(nt,tt);return _createRawReactElement("div",{className:"flex flex-col text-primary-50 dark:text-primary-800"},void 0,_createRawReactElement("p",{className:"break-words"},void 0,generateText(rt)))},PlaceholderStatus=function _e(et){var tt=et.showPrivacyIndicator,nt=tt===void 0?!1:tt,rt=et.variant,at=function(){return nt?_createRawReactElement(StatusInfo,{visibility:"placeholder"}):null};return _createRawReactElement("div",{className:clsx({"status-placeholder bg-white dark:bg-primary-900 select-none":!0,"shadow-xl dark:shadow-none sm:rounded-xl px-4 py-6 sm:p-5":rt==="rounded","py-4":rt==="slim"})},void 0,_createRawReactElement("div",{className:"w-full animate-pulse overflow-hidden"},void 0,_createRawReactElement("div",{},void 0,at(),_createRawReactElement(HStack,{space:3,alignItems:"center"},void 0,_createRawReactElement("div",{className:"shrink-0"},void 0,_createRawReactElement(PlaceholderAvatar,{size:42})),_createRawReactElement("div",{className:"min-w-0 flex-1"},void 0,_createRawReactElement(PlaceholderDisplayName$1,{minLength:3,maxLength:25})))),_createRawReactElement("div",{className:"status__content-wrapper mt-4"},void 0,_createRawReactElement(PlaceholderStatusContent,{minLength:5,maxLength:120}))))};const PlaceholderStatus$1=React$3.memo(PlaceholderStatus);var getStatus=makeGetStatus(),EventPage=function _e(et){var tt=et.params,nt=et.children,rt=useAppSelector(function(mt){return mt.me}),at=useFeatures(),it=useHistory(),ot=tt==null?void 0:tt.statusId,st=useAppSelector(function(mt){return getStatus(mt,{id:ot})}),ct=st==null?void 0:st.event;if(st&&!ct)return it.push("/@".concat(st.getIn(["account","acct"]),"/posts/").concat(st.id)),_createRawReactElement(PlaceholderStatus$1,{});var ut=it.location.pathname,dt=ut.endsWith("/discussion")?"discussion":"info",ft=st?[{text:"Information",to:"/@".concat(st.getIn(["account","acct"]),"/events/").concat(st.id),name:"info"},{text:"Discussion",to:"/@".concat(st.getIn(["account","acct"]),"/events/").concat(st.id,"/discussion"),name:"discussion"}]:[],pt=!["/participations","participation_requests"].some(function(mt){return ut.endsWith(mt)});return React$3.createElement(React$3.Fragment,null,_createRawReactElement(Layout.Main,{},void 0,_createRawReactElement(Column,{label:ct==null?void 0:ct.name,withHeader:!1},void 0,_createRawReactElement("div",{className:"space-y-4"},void 0,_createRawReactElement(BundleContainer,{fetchComponent:EventHeader},void 0,function(mt){return _createRawReactElement(mt,{status:st})}),st&&pt&&_createRawReactElement(Tabs,{items:ft,activeItem:dt},"event-tabs-".concat(st.id)),nt)),!rt&&_createRawReactElement(BundleContainer,{fetchComponent:CtaBanner},void 0,function(mt){return _createRawReactElement(mt,{},"cta-banner")})),_createRawReactElement(Layout.Aside,{},void 0,!rt&&_createRawReactElement(BundleContainer,{fetchComponent:SignUpPanel},void 0,function(mt){return _createRawReactElement(mt,{},"sign-up-panel")}),at.trends&&_createRawReactElement(BundleContainer,{fetchComponent:TrendsPanel},void 0,function(mt){return _createRawReactElement(mt,{limit:5},"trends-panel")}),at.suggestions&&_createRawReactElement(BundleContainer,{fetchComponent:WhoToFollowPanel},void 0,function(mt){return _createRawReactElement(mt,{limit:3},"wtf-panel")}),_createRawReactElement(LinkFooter,{},"link-footer")))},EventsPage=function _e(et){var tt=et.children,nt=useFeatures();return React$3.createElement(React$3.Fragment,null,_createRawReactElement(Layout.Main,{},void 0,tt),_createRawReactElement(Layout.Aside,{},void 0,_createRawReactElement(BundleContainer,{fetchComponent:NewEventPanel},void 0,function(rt){return _createRawReactElement(rt,{},"new-event-panel")}),nt.trends&&_createRawReactElement(BundleContainer,{fetchComponent:TrendsPanel},void 0,function(rt){return _createRawReactElement(rt,{limit:5},"trends-panel")}),nt.suggestions&&_createRawReactElement(BundleContainer,{fetchComponent:WhoToFollowPanel},void 0,function(rt){return _createRawReactElement(rt,{limit:3},"wtf-panel")}),_createRawReactElement(LinkFooter,{},"link-footer")))};function ownKeys$3(_e,et){var tt=Object.keys(_e);if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(_e);et&&(nt=nt.filter(function(rt){return Object.getOwnPropertyDescriptor(_e,rt).enumerable})),tt.push.apply(tt,nt)}return tt}function _objectSpread$2(_e){for(var et=1;et1?arguments[1]:void 0,nt),it=rt>2?arguments[2]:void 0,ot=it===void 0?nt:toAbsoluteIndex(it,nt);ot>at;)tt[at++]=et;return tt},$$1=_export,fill=arrayFill,addToUnscopables=addToUnscopables$5;$$1({target:"Array",proto:!0},{fill});addToUnscopables("fill");const CarouselKeys={avatars:["carouselAvatars"]};function useCarouselAvatars(){const _e=useApi(),et=async()=>{const{data:rt}=await _e.get("/api/v1/truth/carousels/avatars");return rt},tt=useQuery(CarouselKeys.avatars,et,{placeholderData:[],keepPreviousData:!0}),nt=tt.data;return{...tt,data:nt||[]}}function useMarkAsSeen(){const _e=useApi(),et=useFeatures();return useMutation(async tt=>{et.carouselSeen&&await void _e.post("/api/v1/truth/carousels/avatars/seen",{account_id:tt})})}var CarouselItem=React$3.forwardRef(function(_e,et){var tt=_e.avatar,nt=_e.seen,rt=_e.onViewed,at=_e.onPinned,it=useAppDispatch(),ot=useMarkAsSeen(),st=useAppSelector(function(ht){return ht.timelines.getIn(["home","feedAccountId"])}),ct=tt.account_id===st,ut=reactExports.useState(!1),dt=_slicedToArray$4(ut,2),ft=dt[0],pt=dt[1],mt=function(){ft||(pt(!0),ct?(it(replaceHomeTimeline(void 0,{maxId:null},function(){return pt(!1)})),at&&at(null)):(at&&at(tt),nt||(rt(tt.account_id),ot.mutate(tt.account_id)),it(replaceHomeTimeline(tt.account_id,{maxId:null},function(){return pt(!1)}))))};return React$3.createElement("div",{ref:et,"aria-disabled":ft,onClick:mt,className:"cursor-pointer py-4",role:"filter-feed-by-user","data-testid":"carousel-item"},_createRawReactElement(Stack,{className:"h-auto w-14",space:3},void 0,_createRawReactElement("div",{className:"relative mx-auto block h-12 w-12 rounded-full"},void 0,ct&&_createRawReactElement("div",{className:"absolute inset-0 flex items-center justify-center rounded-full bg-primary-600/50"},void 0,_createRawReactElement(Icon$1,{src:vitePluginRequire_1697864666744_94924775,className:"h-6 w-6 text-white"})),_createRawReactElement("img",{src:tt.account_avatar,className:clsx({"w-12 h-12 min-w-[48px] rounded-full ring-2 ring-offset-4 dark:ring-offset-primary-900":!0,"ring-transparent":!ct&&nt,"ring-primary-600":ct,"ring-accent-500":!nt&&!ct}),alt:tt.acct,"data-testid":"carousel-item-avatar"})),_createRawReactElement(Text$2,{theme:"muted",size:"sm",truncate:!0,align:"center",className:"pb-0.5 leading-3"},void 0,tt.acct)))}),FeedCarousel=function _e(){var et=useCarouselAvatars(),tt=et.data,nt=et.isFetching,rt=et.isFetched,at=et.isError,it=useDimensions(),ot=_slicedToArray$4(it,3);ot[0];var st=ot[1],ct=ot[2].width,ut=reactExports.useRef(null),dt=reactExports.useState([]),ft=_slicedToArray$4(dt,2),pt=ft[0],mt=ft[1],ht=reactExports.useState(0),Et=_slicedToArray$4(ht,2),yt=Et[0],vt=Et[1],gt=reactExports.useState(1),St=_slicedToArray$4(gt,2),Rt=St[0],$t=St[1],bt=reactExports.useState(null),wt=_slicedToArray$4(bt,2),xt=wt[0],Tt=wt[1],Ct=reactExports.useMemo(function(){var It=tt.filter(function(Ut){return Ut.account_id!==(xt==null?void 0:xt.account_id)});if(xt){var Ot=(Rt-1)*yt;It=[].concat(_toConsumableArray(It.slice(0,Ot)),[null],_toConsumableArray(It.slice(Ot)))}return It},[tt,xt,Rt,yt]),Nt=Math.ceil(tt.length/yt),At=ct/Math.floor(ct/80),kt=Rt1,Pt=Rt>1&&Nt>1,Ft=function(){return $t(function(Ot){return Ot+1})},Dt=function(){return $t(function(Ot){return Ot-1})},Lt=function(Ot){mt(function(Ut){return[].concat(_toConsumableArray(Ut),[Ot])})};return reactExports.useEffect(function(){tt.length>0&&mt(tt.filter(function(It){return It.seen!==!1}).map(function(It){return It.account_id}))},[tt]),reactExports.useEffect(function(){ct&&vt(Math.round(ct/At))},[ct,At]),at?_createRawReactElement(Card$1,{variant:"rounded",size:"lg","data-testid":"feed-carousel-error"},void 0,_createRawReactElement(Text$2,{align:"center"},void 0,_createRawReactElement(FormattedMessage$1,{id:"common.error",defaultMessage:"Something isn't right. Try reloading the page."}))):rt&&tt.length===0?null:_createRawReactElement("div",{className:"overflow-hidden rounded-xl bg-white shadow-lg dark:bg-primary-900 dark:shadow-none","data-testid":"feed-carousel"},void 0,_createRawReactElement(HStack,{alignItems:"stretch"},void 0,_createRawReactElement("div",{className:"z-10 flex w-8 items-center justify-center self-stretch rounded-l-xl bg-white dark:bg-primary-900"},void 0,_createRawReactElement("button",{"data-testid":"prev-page",onClick:Dt,className:"flex h-full w-7 items-center justify-center transition-opacity duration-500 disabled:opacity-25",disabled:!Pt},void 0,_createRawReactElement(Icon$1,{src:vitePluginRequire_1697864669074_22691868,className:"h-5 w-5 text-black dark:text-white"}))),_createRawReactElement("div",{className:"relative w-full overflow-hidden"},void 0,xt?_createRawReactElement("div",{className:"absolute inset-y-0 left-0 z-10 flex items-center justify-center bg-white dark:bg-primary-900",style:{width:At||"auto"}},void 0,React$3.createElement(CarouselItem,{avatar:xt,seen:pt==null?void 0:pt.includes(xt.account_id),onViewed:Lt,onPinned:function(Ot){return Tt(Ot)},ref:ut})):null,React$3.createElement(HStack,{alignItems:"center",style:{transform:"translateX(-".concat((Rt-1)*100,"%)")},className:"transition-all duration-500 ease-out",ref:st},nt?new Array(20).fill(0).map(function(It,Ot){return _createRawReactElement("div",{className:"flex shrink-0 justify-center",style:{width:At||"auto"}},Ot,_createRawReactElement(PlaceholderAvatar,{size:56,withText:!0,className:"py-3"}))}):Ct.map(function(It,Ot){var Ut;return _createRawReactElement("div",{className:"flex shrink-0 justify-center",style:{width:At||"auto"}},(It==null?void 0:It.account_id)||Ot,It===null?_createRawReactElement(Stack,{className:"h-auto w-14 py-4",space:3,style:{height:(Ut=ut.current)===null||Ut===void 0?void 0:Ut.clientHeight}},void 0,_createRawReactElement("div",{className:"relative mx-auto block h-16 w-16 rounded-full"},void 0,_createRawReactElement("div",{className:"h-16 w-16"}))):_createRawReactElement(CarouselItem,{avatar:It,seen:pt==null?void 0:pt.includes(It.account_id),onPinned:function(zt){Tt(null),setTimeout(function(){Tt(zt)},1)},onViewed:Lt}))}))),_createRawReactElement("div",{className:"z-10 flex w-8 items-center justify-center self-stretch rounded-r-xl bg-white dark:bg-primary-900"},void 0,_createRawReactElement("button",{"data-testid":"next-page",onClick:Ft,className:"flex h-full w-7 items-center justify-center transition-opacity duration-500 disabled:opacity-25",disabled:!kt},void 0,_createRawReactElement(Icon$1,{src:vitePluginRequire_1697864669800_65455099,className:"h-5 w-5 text-black dark:text-white"})))))},defineWellKnownSymbol=wellKnownSymbolDefine;defineWellKnownSymbol("iterator");var toString$1=toString$t,normalizeStringArgument$1=function(_e,et){return _e===void 0?arguments.length<2?"":et:toString$1(_e)},isObject=isObject$u,createNonEnumerableProperty$2=createNonEnumerableProperty$a,installErrorCause$1=function(_e,et){isObject(et)&&"cause"in et&&createNonEnumerableProperty$2(_e,"cause",et.cause)},uncurryThis=functionUncurryThis,$Error=Error,replace=uncurryThis("".replace),TEST=function(_e){return String($Error(_e).stack)}("zxcasd"),V8_OR_CHAKRA_STACK_ENTRY=/\n\s*at [^:]*:[^\n]*/,IS_V8_OR_CHAKRA_STACK=V8_OR_CHAKRA_STACK_ENTRY.test(TEST),errorStackClear=function(_e,et){if(IS_V8_OR_CHAKRA_STACK&&typeof _e=="string"&&!$Error.prepareStackTrace)for(;et--;)_e=replace(_e,V8_OR_CHAKRA_STACK_ENTRY,"");return _e},fails=fails$F,createPropertyDescriptor=createPropertyDescriptor$7,errorStackInstallable=!fails(function(){var _e=Error("a");return"stack"in _e?(Object.defineProperty(_e,"stack",createPropertyDescriptor(1,7)),_e.stack!==7):!0}),createNonEnumerableProperty$1=createNonEnumerableProperty$a,clearErrorStack=errorStackClear,ERROR_STACK_INSTALLABLE=errorStackInstallable,captureStackTrace=Error.captureStackTrace,errorStackInstall=function(_e,et,tt,nt){ERROR_STACK_INSTALLABLE&&(captureStackTrace?captureStackTrace(_e,et):createNonEnumerableProperty$1(_e,"stack",clearErrorStack(tt,nt)))},getBuiltIn=getBuiltIn$c,hasOwn=hasOwnProperty_1,createNonEnumerableProperty=createNonEnumerableProperty$a,isPrototypeOf=objectIsPrototypeOf,setPrototypeOf=objectSetPrototypeOf,copyConstructorProperties=copyConstructorProperties$4,proxyAccessor=proxyAccessor$2,inheritIfRequired=inheritIfRequired$4,normalizeStringArgument=normalizeStringArgument$1,installErrorCause=installErrorCause$1,installErrorStack=errorStackInstall,DESCRIPTORS=descriptors$1,wrapErrorConstructorWithCause$1=function(_e,et,tt,nt){var rt="stackTraceLimit",at=nt?2:1,it=_e.split("."),ot=it[it.length-1],st=getBuiltIn.apply(null,it);if(st){var ct=st.prototype;if(hasOwn(ct,"cause")&&delete ct.cause,!tt)return st;var ut=getBuiltIn("Error"),dt=et(function(ft,pt){var mt=normalizeStringArgument(nt?pt:ft,void 0),ht=nt?new st(ft):new st;return mt!==void 0&&createNonEnumerableProperty(ht,"message",mt),installErrorStack(ht,dt,ht.stack,2),this&&isPrototypeOf(ct,this)&&inheritIfRequired(ht,this,dt),arguments.length>at&&installErrorCause(ht,arguments[at]),ht});dt.prototype=ct,ot!=="Error"?setPrototypeOf?setPrototypeOf(dt,ut):copyConstructorProperties(dt,ut,{name:!0}):DESCRIPTORS&&rt in st&&(proxyAccessor(dt,st,rt),proxyAccessor(dt,st,"prepareStackTrace")),copyConstructorProperties(dt,st);try{ct.name!==ot&&createNonEnumerableProperty(ct,"name",ot),ct.constructor=dt}catch{}return dt}},$=_export,global$1=global$w,apply=functionApply,wrapErrorConstructorWithCause=wrapErrorConstructorWithCause$1,WEB_ASSEMBLY="WebAssembly",WebAssembly=global$1[WEB_ASSEMBLY],FORCED=Error("e",{cause:7}).cause!==7,exportGlobalErrorCauseWrapper=function(_e,et){var tt={};tt[_e]=wrapErrorConstructorWithCause(_e,et,FORCED),$({global:!0,constructor:!0,arity:1,forced:FORCED},tt)},exportWebAssemblyErrorCauseWrapper=function(_e,et){if(WebAssembly&&WebAssembly[_e]){var tt={};tt[_e]=wrapErrorConstructorWithCause(WEB_ASSEMBLY+"."+_e,et,FORCED),$({target:WEB_ASSEMBLY,stat:!0,constructor:!0,arity:1,forced:FORCED},tt)}};exportGlobalErrorCauseWrapper("Error",function(_e){return function(tt){return apply(_e,this,arguments)}});exportGlobalErrorCauseWrapper("EvalError",function(_e){return function(tt){return apply(_e,this,arguments)}});exportGlobalErrorCauseWrapper("RangeError",function(_e){return function(tt){return apply(_e,this,arguments)}});exportGlobalErrorCauseWrapper("ReferenceError",function(_e){return function(tt){return apply(_e,this,arguments)}});exportGlobalErrorCauseWrapper("SyntaxError",function(_e){return function(tt){return apply(_e,this,arguments)}});exportGlobalErrorCauseWrapper("TypeError",function(_e){return function(tt){return apply(_e,this,arguments)}});exportGlobalErrorCauseWrapper("URIError",function(_e){return function(tt){return apply(_e,this,arguments)}});exportWebAssemblyErrorCauseWrapper("CompileError",function(_e){return function(tt){return apply(_e,this,arguments)}});exportWebAssemblyErrorCauseWrapper("LinkError",function(_e){return function(tt){return apply(_e,this,arguments)}});exportWebAssemblyErrorCauseWrapper("RuntimeError",function(_e){return function(tt){return apply(_e,this,arguments)}});var dist$1={},charRegex=()=>{const _e="\\ud800-\\udfff",et="\\u0300-\\u036f",tt="\\ufe20-\\ufe2f",nt="\\u20d0-\\u20ff",rt="\\u1ab0-\\u1aff",at="\\u1dc0-\\u1dff",it=et+tt+nt+rt+at,ot="\\ufe0e\\ufe0f",st="\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83C\\uDF93",ct=`[${_e}]`,ut=`[${it}]`,dt="\\ud83c[\\udffb-\\udfff]",ft=`(?:${ut}|${dt})`,pt=`[^${_e}]`,mt="(?:\\uD83C[\\uDDE6-\\uDDFF]){2}",ht="[\\ud800-\\udbff][\\udc00-\\udfff]",Et="\\u200d",yt="(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40(?:\\udc65|\\udc73|\\udc77)\\udb40(?:\\udc6e|\\udc63|\\udc6c)\\udb40(?:\\udc67|\\udc74|\\udc73)\\udb40\\udc7f)",vt=`[${st}]`,gt=`${ft}?`,St=`[${ot}]?`,Rt=`(?:${Et}(?:${[pt,mt,ht].join("|")})${St+gt})*`,$t=St+gt+Rt,wt=`(?:${[`${pt}${ut}?`,ut,mt,ht,ct,vt].join("|")})`;return new RegExp(`${yt}|${dt}(?=${dt})|${wt+$t}`,"g")},__importDefault=commonjsGlobal$2&&commonjsGlobal$2.__importDefault||function(_e){return _e&&_e.__esModule?_e:{default:_e}};Object.defineProperty(dist$1,"__esModule",{value:!0});var char_regex_1=__importDefault(charRegex);function toArray(_e){if(typeof _e!="string")throw new Error("A string is expected as input");return _e.match(char_regex_1.default())||[]}dist$1.toArray=toArray;function length(_e){if(typeof _e!="string")throw new Error("Input must be a string");var et=_e.match(char_regex_1.default());return et===null?0:et.length}var length_1=dist$1.length=length;function substring(_e,et,tt){if(et===void 0&&(et=0),typeof _e!="string")throw new Error("Input must be a string");(typeof et!="number"||et<0)&&(et=0),typeof tt=="number"&&tt<0&&(tt=0);var nt=_e.match(char_regex_1.default());return nt?nt.slice(et,tt).join(""):""}dist$1.substring=substring;function substr(_e,et,tt){if(et===void 0&&(et=0),typeof _e!="string")throw new Error("Input must be a string");var nt=length(_e);if(typeof et!="number"&&(et=parseInt(et,10)),et>=nt)return"";et<0&&(et+=nt);var rt;typeof tt>"u"?rt=nt:(typeof tt!="number"&&(tt=parseInt(tt,10)),rt=tt>=0?tt+et:et);var at=_e.match(char_regex_1.default());return at?at.slice(et,rt).join(""):""}dist$1.substr=substr;function limit(_e,et,tt,nt){if(et===void 0&&(et=16),tt===void 0&&(tt="#"),nt===void 0&&(nt="right"),typeof _e!="string"||typeof et!="number")throw new Error("Invalid arguments specified");if(["left","right"].indexOf(nt)===-1)throw new Error("Pad position should be either left or right");typeof tt!="string"&&(tt=String(tt));var rt=length(_e);if(rt>et)return substring(_e,0,et);if(rt=nt.length)return et===""?nt.length:-1;if(et==="")return tt;var rt=toArray(et),at=!1,it;for(it=tt;it1&&arguments[1]!==void 0?arguments[1]:{},tt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},nt=createChecker(et,tt),rt=_e||Object.keys(_objectSpread2({},tt,{},et));return rt.every(nt)}function createChecker(_e,et){return function(tt){if(typeof tt=="string")return is$2(et[tt],_e[tt]);if(Array.isArray(tt))return is$2(getIn(et,tt),getIn(_e,tt));throw new TypeError("Invalid key: expected Array or string: "+tt)}}var ImmutablePureComponent=function(_e){_inherits(et,_e);function et(){return _classCallCheck(this,et),_possibleConstructorReturn(this,_getPrototypeOf(et).apply(this,arguments))}return _createClass(et,[{key:"shouldComponentUpdate",value:function(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return!check(this.updateOnProps,this.props,nt,"updateOnProps")||!check(this.updateOnStates,this.state,rt,"updateOnStates")}}]),et}(React$3.Component),index$1=reactExports.useLayoutEffect,useLatest=function _e(et){var tt=reactExports.useRef(et);return index$1(function(){tt.current=et}),tt},updateRef=function _e(et,tt){if(typeof et=="function"){et(tt);return}et.current=tt},useComposedRef=function _e(et,tt){var nt=reactExports.useRef();return reactExports.useCallback(function(rt){et.current=rt,nt.current&&updateRef(nt.current,null),nt.current=tt,tt&&updateRef(tt,rt)},[tt])},HIDDEN_TEXTAREA_STYLE={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},forceHiddenStyles=function _e(et){Object.keys(HIDDEN_TEXTAREA_STYLE).forEach(function(tt){et.style.setProperty(tt,HIDDEN_TEXTAREA_STYLE[tt],"important")})},forceHiddenStyles$1=forceHiddenStyles,hiddenTextarea=null,getHeight=function _e(et,tt){var nt=et.scrollHeight;return tt.sizingStyle.boxSizing==="border-box"?nt+tt.borderSize:nt-tt.paddingSize};function calculateNodeHeight(_e,et,tt,nt){tt===void 0&&(tt=1),nt===void 0&&(nt=1/0),hiddenTextarea||(hiddenTextarea=document.createElement("textarea"),hiddenTextarea.setAttribute("tabindex","-1"),hiddenTextarea.setAttribute("aria-hidden","true"),forceHiddenStyles$1(hiddenTextarea)),hiddenTextarea.parentNode===null&&document.body.appendChild(hiddenTextarea);var rt=_e.paddingSize,at=_e.borderSize,it=_e.sizingStyle,ot=it.boxSizing;Object.keys(it).forEach(function(ft){var pt=ft;hiddenTextarea.style[pt]=it[pt]}),forceHiddenStyles$1(hiddenTextarea),hiddenTextarea.value=et;var st=getHeight(hiddenTextarea,_e);hiddenTextarea.value=et,st=getHeight(hiddenTextarea,_e),hiddenTextarea.value="x";var ct=hiddenTextarea.scrollHeight-rt,ut=ct*tt;ot==="border-box"&&(ut=ut+rt+at),st=Math.max(ut,st);var dt=ct*nt;return ot==="border-box"&&(dt=dt+rt+at),st=Math.min(dt,st),[st,ct]}var noop=function _e(){},pick=function _e(et,tt){return et.reduce(function(nt,rt){return nt[rt]=tt[rt],nt},{})},SIZING_STYLE=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],isIE=!!document.documentElement.currentStyle,getSizingData=function _e(et){var tt=window.getComputedStyle(et);if(tt===null)return null;var nt=pick(SIZING_STYLE,tt),rt=nt.boxSizing;if(rt==="")return null;isIE&&rt==="border-box"&&(nt.width=parseFloat(nt.width)+parseFloat(nt.borderRightWidth)+parseFloat(nt.borderLeftWidth)+parseFloat(nt.paddingRight)+parseFloat(nt.paddingLeft)+"px");var at=parseFloat(nt.paddingBottom)+parseFloat(nt.paddingTop),it=parseFloat(nt.borderBottomWidth)+parseFloat(nt.borderTopWidth);return{sizingStyle:nt,paddingSize:at,borderSize:it}},getSizingData$1=getSizingData;function useListener(_e,et,tt){var nt=useLatest(tt);reactExports.useLayoutEffect(function(){var rt=function(it){return nt.current(it)};if(_e)return _e.addEventListener(et,rt),function(){return _e.removeEventListener(et,rt)}},[])}var useWindowResizeListener=function _e(et){useListener(window,"resize",et)},useFontsLoadedListener=function _e(et){useListener(document.fonts,"loadingdone",et)},_excluded$2=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],TextareaAutosize=function _e(et,tt){var nt=et.cacheMeasurements,rt=et.maxRows,at=et.minRows,it=et.onChange,ot=it===void 0?noop:it,st=et.onHeightChange,ct=st===void 0?noop:st,ut=_objectWithoutPropertiesLoose(et,_excluded$2),dt=ut.value!==void 0,ft=reactExports.useRef(null),pt=useComposedRef(ft,tt),mt=reactExports.useRef(0),ht=reactExports.useRef(),Et=function(){var gt=ft.current,St=nt&&ht.current?ht.current:getSizingData$1(gt);if(St){ht.current=St;var Rt=calculateNodeHeight(St,gt.value||gt.placeholder||"x",at,rt),$t=Rt[0],bt=Rt[1];mt.current!==$t&&(mt.current=$t,gt.style.setProperty("height",$t+"px","important"),ct($t,{rowHeight:bt}))}},yt=function(gt){dt||Et(),ot(gt)};return reactExports.useLayoutEffect(Et),useWindowResizeListener(Et),useFontsLoadedListener(Et),reactExports.createElement("textarea",_extends$4({},ut,{onChange:yt,ref:pt}))},index=reactExports.forwardRef(TextareaAutosize),AutosuggestAccount=function _e(et){var tt=et.id,nt=useAccount(tt),rt=nt.account;return rt?_createRawReactElement(Account,{account:rt,hideActions:!0,showProfileHoverCard:!1}):null};const textAtCursorMatchesToken=(_e,et,tt)=>{let nt;const rt=_e.slice(0,et).search(/\S+$/),at=_e.slice(et).search(/\s/);return at<0?nt=_e.slice(rt):nt=_e.slice(rt,at+et),!nt||nt.trim().length<3||!tt.includes(nt[0])?[null,null]:(nt=nt.trim().toLowerCase(),nt.length>0?[rt+1,nt]:[null,null])};var AutosuggestEmoji=function _e(et){var tt=et.emoji,nt,rt;if(isCustomEmoji(tt))nt=tt.imageUrl,rt=tt.colons;else{var at=unicodeMapping[tt.native]||unicodeMapping[tt.native.replace(/\uFE0F$/,"")];if(!at)return null;nt=joinPublicPath("packs/emoji/".concat(at.unified,".svg")),rt=tt.native}return _createRawReactElement("div",{className:"autosuggest-emoji","data-testid":"emoji"},void 0,_createRawReactElement("img",{className:"emojione",src:nt,alt:rt}),tt.colons)};function _createSuper$1(_e){var et=_isNativeReflectConstruct$1();return function(){var nt=_getPrototypeOf$1(_e),rt;if(et){var at=_getPrototypeOf$1(this).constructor;rt=Reflect.construct(nt,arguments,at)}else rt=nt.apply(this,arguments);return _possibleConstructorReturn$1(this,rt)}}function _isNativeReflectConstruct$1(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var AutosuggestTextarea=function(_e){_inherits$1(tt,_e);var et=_createSuper$1(tt);function tt(){var nt;_classCallCheck$1(this,tt);for(var rt=arguments.length,at=new Array(rt),it=0;it0&&!pt&&(ot.preventDefault(),nt.setState({selectedSuggestion:Math.min(ft+1,ct.size-1)}));break;case"ArrowUp":ct.size>0&&!pt&&(ot.preventDefault(),nt.setState({selectedSuggestion:Math.max(ft-1,0)}));break;case"Enter":case"Tab":nt.state.lastToken!==null&&ct.size>0&&!pt&&(ot.preventDefault(),ot.stopPropagation(),nt.props.onSuggestionSelected(nt.state.tokenStart,nt.state.lastToken,ct.get(ft)));break}ot.defaultPrevented||!nt.props.onKeyDown||nt.props.onKeyDown(ot)}}),_defineProperty$7(_assertThisInitialized$1(nt),"onBlur",function(){nt.setState({suggestionsHidden:!0,focused:!1}),nt.props.onBlur&&nt.props.onBlur()}),_defineProperty$7(_assertThisInitialized$1(nt),"onFocus",function(){nt.setState({focused:!0}),nt.props.onFocus&&nt.props.onFocus()}),_defineProperty$7(_assertThisInitialized$1(nt),"onSuggestionClick",function(ot){var st,ct=nt.props.suggestions.get(ot.currentTarget.getAttribute("data-index"));ot.preventDefault(),nt.props.onSuggestionSelected(nt.state.tokenStart,nt.state.lastToken,ct),(st=nt.textarea)===null||st===void 0||st.focus()}),_defineProperty$7(_assertThisInitialized$1(nt),"setTextarea",function(ot){nt.textarea=ot,nt.textarea&&nt.keymap&&install(nt.textarea,nt.keymap)}),_defineProperty$7(_assertThisInitialized$1(nt),"onPaste",function(ot){ot.clipboardData&&ot.clipboardData.files.length===1&&(nt.props.onPaste(ot.clipboardData.files),ot.preventDefault())}),_defineProperty$7(_assertThisInitialized$1(nt),"renderSuggestion",function(ot,st){var ct=nt.state.selectedSuggestion,ut,dt;return _typeof$8(ot)==="object"?(ut=_createRawReactElement(AutosuggestEmoji,{emoji:ot}),dt=ot.id):ot[0]==="#"?(ut=ot,dt=ot):(ut=_createRawReactElement(AutosuggestAccount,{id:ot}),dt=ot),_createRawReactElement("div",{role:"button",tabIndex:0,"data-index":st,className:clsx({"px-4 py-2.5 text-sm text-gray-700 dark:text-gray-500 hover:bg-gray-100 dark:hover:bg-gray-800 focus:bg-gray-100 dark:focus:bg-primary-800 group":!0,"bg-gray-100 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-800":st===ct}),onMouseDown:nt.onSuggestionClick},dt,ut)}),nt}return _createClass$1(tt,[{key:"shouldComponentUpdate",value:function(rt,at){var it=this.state.lastToken!==at.lastToken,ot=this.props.value!==rt.value;return it&&!ot?!1:_get(_getPrototypeOf$1(tt.prototype),"shouldComponentUpdate",this).bind(this)(rt,at,void 0)}},{key:"componentDidUpdate",value:function(rt,at){var it=this.props.suggestions;it!==rt.suggestions&&it.size>0&&at.suggestionsHidden&&at.focused&&this.setState({suggestionsHidden:!1})}},{key:"componentWillUnmount",value:function(){this.textarea&&this.keymap&&uninstall(this.textarea)}},{key:"setPortalPosition",value:function(){if(!this.textarea)return{};var rt=this.textarea.getBoundingClientRect(),at=rt.top,it=rt.height,ot=rt.left,st=rt.width;return{top:at+it,left:ot,width:st}}},{key:"render",value:function(){var rt=this.props,at=rt.value,it=rt.suggestions,ot=rt.disabled,st=rt.placeholder,ct=rt.onKeyUp,ut=rt.autoFocus,dt=rt.children,ft=rt.condensed,pt=rt.id,mt=rt.keymap;mt&&(this.keymap=mt);var ht=this.state.suggestionsHidden,Et={direction:"ltr",minRows:10};return(isRtl(at)||!at&&st&&isRtl(st))&&(Et.direction="rtl"),[_createRawReactElement("div",{},"textarea",_createRawReactElement("div",{className:"relative"},void 0,_createRawReactElement("label",{},void 0,_createRawReactElement("span",{style:{display:"none"}},void 0,st),React$3.createElement(index,{ref:this.setTextarea,className:clsx("w-full resize-none border-0 px-0 text-gray-800 transition-[min-height] placeholder:text-gray-600 focus:border-0 focus:shadow-none focus:ring-0 motion-reduce:transition-none dark:bg-transparent dark:text-white dark:placeholder:text-gray-600",{"min-h-[40px]":ft,"min-h-[100px]":!ft}),id:pt,disabled:ot,placeholder:st,autoFocus:ut,value:at,onChange:this.onChange,onKeyDown:this.onKeyDown,onKeyUp:ct,onFocus:this.onFocus,onBlur:this.onBlur,onPaste:this.onPaste,style:Et,"aria-autocomplete":"list"}))),dt),_createRawReactElement(Portal$1,{},"portal",_createRawReactElement("div",{style:this.setPortalPosition(),className:clsx({"fixed z-1000 shadow bg-white dark:bg-gray-900 rounded-lg py-1 space-y-0 dark:ring-2 dark:ring-primary-700 focus:outline-none":!0,hidden:ht||it.isEmpty(),block:!ht&&!it.isEmpty()})},void 0,it.map(this.renderSuggestion)))]}}]),tt}(ImmutablePureComponent);_defineProperty$7(AutosuggestTextarea,"defaultProps",{autoFocus:!0});const vitePluginRequire_1697864663407_97583826="/packs/assets/mood-happy-48f2a7ec.svg";var messages$l={emoji:{id:"emoji_button.label",defaultMessage:"Insert emoji"}},EmojiPickerDropdownContainer=function _e(et){var tt=useAppDispatch(),nt=useIntl(),rt=nt.formatMessage(messages$l.emoji),at=isUserTouching(),it=reactExports.useState(!1),ot=_slicedToArray$4(it,2),st=ot[0],ct=ot[1],ut=useFloating({placement:"bottom",middleware:[flip({fallbackPlacements:["top"]}),shift$1({crossAxis:!0})]}),dt=ut.x,ft=ut.y,pt=ut.strategy,mt=ut.refs,ht=ut.update;useClickOutside(mt,function(){at||ct(!1)});var Et=function(vt){vt.stopPropagation(),at?tt(openModal("EMOJI_PICKER",{onPickEmoji:et.onPickEmoji})):ct(!st)};return _createRawReactElement("div",{className:"relative"},void 0,React$3.createElement(IconButton$1,{className:clsx({"text-gray-600 hover:text-gray-700 dark:hover:text-gray-500":!0}),ref:mt.setReference,src:vitePluginRequire_1697864663407_97583826,title:rt,"aria-label":rt,"aria-expanded":st,role:"button",onClick:Et,onKeyDown:Et,tabIndex:0}),reactDomExports.createPortal(React$3.createElement("div",{className:"z-[101]",ref:mt.setFloating,style:{position:pt,top:ft??0,left:dt??0,width:"max-content"}},React$3.createElement(EmojiPickerDropdown,_extends$4({visible:st,setVisible:ct,update:ht},et))),document.body))},QuotedStatusContainer=function _e(et){var tt=et.composeId,nt=useAppDispatch(),rt=reactExports.useCallback(makeGetStatus(),[]),at=useAppSelector(function(ot){var st;return rt(ot,{id:(st=ot.compose.get(tt))===null||st===void 0?void 0:st.quote})}),it=function(){nt(cancelQuoteCompose())};return at?_createRawReactElement("div",{className:"mb-2"},void 0,_createRawReactElement(QuotedStatus,{status:at,onCancel:it,compose:!0})):null},ReplyIndicator=function _e(et){var tt=et.className,nt=et.status,rt=et.hideActions,at=et.onCancel,it=function(){at()};if(!nt)return null;var ot={};return!rt&&at&&(ot={onActionClick:it,actionIcon:vitePluginRequire_1697864655763_93677134,actionAlignment:"top",actionTitle:"Dismiss"}),_createRawReactElement(Stack,{space:2,className:clsx("rounded-lg bg-gray-100 p-4 dark:bg-gray-800",tt)},void 0,React$3.createElement(AccountContainer,_extends$4({},ot,{id:nt.getIn(["account","id"]),timestamp:nt.created_at,showProfileHoverCard:!1,withLinkToProfile:!1,hideActions:rt})),_createRawReactElement(Markup,{className:"break-words",size:"sm",dangerouslySetInnerHTML:{__html:nt.contentHtml},direction:isRtl(nt.search_index)?"rtl":"ltr"}),nt.media_attachments.size>0&&_createRawReactElement(AttachmentThumbs,{media:nt.media_attachments,sensitive:nt.sensitive}))};const makeMapStateToProps=()=>{const _e=makeGetStatus();return(tt,{composeId:nt})=>{var it,ot;const rt=(it=tt.compose.get(nt))==null?void 0:it.in_reply_to,at=!!((ot=tt.compose.get(nt))!=null&&ot.id);return{status:_e(tt,{id:rt}),hideActions:at}}},mapDispatchToProps$1=_e=>({onCancel(){_e(cancelReplyCompose())}}),ReplyIndicatorContainer=connect(makeMapStateToProps,mapDispatchToProps$1)(ReplyIndicator);var ScheduleFormContainer=function _e(et){return _createRawReactElement(BundleContainer,{fetchComponent:ScheduleForm},void 0,function(tt){return React$3.createElement(tt,et)})};const vitePluginRequire_1697864680134_20012237="/packs/assets/paperclip-ec4de300.svg",vitePluginRequire_1697864677031_59757870="/packs/assets/photo-b3e9cc6c.svg";var messages$k={upload:{id:"upload_button.label",defaultMessage:"Add media attachment"}},onlyImages=function _e(et){return!!(et&&et.every(function(tt){return tt.startsWith("image/")}))},UploadButton=function _e(et){var tt=et.disabled,nt=tt===void 0?!1:tt,rt=et.unavailable,at=rt===void 0?!1:rt,it=et.onSelectFile,ot=et.resetFileKey,st=et.className,ct=st===void 0?"text-gray-600 hover:text-gray-700 dark:hover:text-gray-500":st,ut=et.iconClassName,dt=et.icon,ft=useIntl(),pt=useInstance(),mt=pt.configuration,ht=reactExports.useRef(null),Et=mt.media_attachments.supported_mime_types,yt=function(Rt){var $t;($t=Rt.target.files)!==null&&$t!==void 0&&$t.length&&it(Rt.target.files,ft)},vt=function(){var Rt;(Rt=ht.current)===null||Rt===void 0||Rt.click()};if(at)return null;var gt=dt||(onlyImages(Et)?vitePluginRequire_1697864677031_59757870:vitePluginRequire_1697864680134_20012237);return _createRawReactElement("div",{},void 0,_createRawReactElement(IconButton$1,{src:gt,className:ct,iconClassName:ut,title:ft.formatMessage(messages$k.upload),disabled:nt,onClick:vt}),_createRawReactElement("label",{},void 0,_createRawReactElement("span",{className:"sr-only"},void 0,ft.formatMessage(messages$k.upload)),React$3.createElement("input",{key:ot,ref:ht,type:"file",multiple:!0,accept:Et&&Et.join(","),onChange:yt,disabled:nt,className:"hidden"})))};const mapStateToProps=(_e,{composeId:et})=>{var tt,nt;return{disabled:(tt=_e.compose.get(et))==null?void 0:tt.is_uploading,resetFileKey:(nt=_e.compose.get(et))==null?void 0:nt.resetFileKey}},mapDispatchToProps=(_e,{composeId:et})=>({onSelectFile(tt,nt){_e(uploadCompose(et,tt,nt))}}),UploadButtonContainer=connect(mapStateToProps,mapDispatchToProps)(UploadButton);var Warning=function _e(et){var tt=et.message;return _createRawReactElement(OptionalMotion,{defaultStyle:{opacity:0,scaleX:.85,scaleY:.75},style:{opacity:spring(1,{damping:35,stiffness:400}),scaleX:spring(1,{damping:35,stiffness:400}),scaleY:spring(1,{damping:35,stiffness:400})}},void 0,function(nt){var rt=nt.opacity,at=nt.scaleX,it=nt.scaleY;return _createRawReactElement("div",{className:"compose-form__warning",style:{opacity:rt,transform:"scale(".concat(at,", ").concat(it,")")}},void 0,tt)})},APPROX_HASHTAG_RE=/(?:^|[^/)\w])#(\w*[a-zA-Z·]\w*)/i,WarningWrapper=function _e(et){var tt=et.composeId,nt=useCompose(tt),rt=useAppSelector(function(st){return nt.privacy==="private"&&!selectOwnAccount(st).locked}),at=nt.privacy!=="public"&&nt.privacy!=="group"&&APPROX_HASHTAG_RE.test(nt.text),it=nt.privacy==="direct";if(rt)return _createRawReactElement(Warning,{message:_createRawReactElement(FormattedMessage$1,{id:"compose_form.lock_disclaimer",defaultMessage:"Your account is not {locked}. Anyone can follow you to view your follower-only posts.",values:{locked:_createRawReactElement(Link$2,{to:"/settings/profile"},void 0,_createRawReactElement(FormattedMessage$1,{id:"compose_form.lock_disclaimer.lock",defaultMessage:"locked"}))}})});if(at)return _createRawReactElement(Warning,{message:_createRawReactElement(FormattedMessage$1,{id:"compose_form.hashtag_warning",defaultMessage:"This post won't be listed under any hashtag as it is unlisted. Only public posts can be searched by hashtag."})});if(it){var ot=_createRawReactElement("span",{},void 0,_createRawReactElement(FormattedMessage$1,{id:"compose_form.direct_message_warning",defaultMessage:"This post will only be sent to the mentioned users."}));return _createRawReactElement(Warning,{message:ot})}return null};const regexen={},regexSupplant=function(_e,et=""){return typeof _e!="string"&&(_e.global&&et.indexOf("g")<0&&(et+="g"),_e.ignoreCase&&et.indexOf("i")<0&&(et+="i"),_e.multiline&&et.indexOf("m")<0&&(et+="m"),_e=_e.source),new RegExp(_e.replace(/#\{(\w+)\}/g,function(tt,nt){let rt=regexen[nt]||"";return typeof rt!="string"&&(rt=rt.source),rt}),et)},stringSupplant=function(_e,et){return _e.replace(/#\{(\w+)\}/g,function(tt,nt){return et[nt]||""})},urlRegex=function(){return regexen.spaces_group=/\x09-\x0D\x20\x85\xA0\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000/,regexen.invalid_chars_group=/\uFFFE\uFEFF\uFFFF\u202A-\u202E/,regexen.punct=/!'#%&@,:;<=>_~{}\$\?\^\*\+\-\.\(\)\[\]\|\/\\/,regexen.validUrlPrecedingChars=regexSupplant(/(?:[^A-Za-z0-9@@$###{invalid_chars_group}]|^)/),regexen.invalidDomainChars=stringSupplant("#{punct}#{spaces_group}#{invalid_chars_group}",regexen),regexen.validDomainChars=regexSupplant(/[^#{invalidDomainChars}]/),regexen.validSubdomain=regexSupplant(/(?:(?:#{validDomainChars}(?:[_-]|#{validDomainChars})*)?#{validDomainChars}\.)/),regexen.validDomainName=regexSupplant(/(?:(?:#{validDomainChars}(?:-|#{validDomainChars})*)?#{validDomainChars}\.)/),regexen.validGTLD=regexSupplant(RegExp("(?:(?:삼성|닷컴|닷넷|香格里拉|餐厅|食品|飞利浦|電訊盈科|集团|通販|购物|谷歌|诺基亚|联通|网络|网站|网店|网址|组织机构|移动|珠宝|点看|游戏|淡马锡|机构|書籍|时尚|新闻|政府|政务|手表|手机|我爱你|慈善|微博|广东|工行|家電|娱乐|天主教|大拿|大众汽车|在线|嘉里大酒店|嘉里|商标|商店|商城|公益|公司|八卦|健康|信息|佛山|企业|中文网|中信|世界|ポイント|ファッション|セール|ストア|コム|グーグル|クラウド|みんな|คอม|संगठन|नेट|कॉम|همراه|موقع|موبايلي|كوم|كاثوليك|عرب|شبكة|بيتك|بازار|العليان|ارامكو|اتصالات|ابوظبي|קום|сайт|рус|орг|онлайн|москва|ком|католик|дети|zuerich|zone|zippo|zip|zero|zara|zappos|yun|youtube|you|yokohama|yoga|yodobashi|yandex|yamaxun|yahoo|yachts|xyz|xxx|xperia|xin|xihuan|xfinity|xerox|xbox|wtf|wtc|wow|world|works|work|woodside|wolterskluwer|wme|winners|wine|windows|win|williamhill|wiki|wien|whoswho|weir|weibo|wedding|wed|website|weber|webcam|weatherchannel|weather|watches|watch|warman|wanggou|wang|walter|walmart|wales|vuelos|voyage|voto|voting|vote|volvo|volkswagen|vodka|vlaanderen|vivo|viva|vistaprint|vista|vision|visa|virgin|vip|vin|villas|viking|vig|video|viajes|vet|versicherung|vermögensberatung|vermögensberater|verisign|ventures|vegas|vanguard|vana|vacations|ups|uol|uno|university|unicom|uconnect|ubs|ubank|tvs|tushu|tunes|tui|tube|trv|trust|travelersinsurance|travelers|travelchannel|travel|training|trading|trade|toys|toyota|town|tours|total|toshiba|toray|top|tools|tokyo|today|tmall|tkmaxx|tjx|tjmaxx|tirol|tires|tips|tiffany|tienda|tickets|tiaa|theatre|theater|thd|teva|tennis|temasek|telefonica|telecity|tel|technology|tech|team|tdk|tci|taxi|tax|tattoo|tatar|tatamotors|target|taobao|talk|taipei|tab|systems|symantec|sydney|swiss|swiftcover|swatch|suzuki|surgery|surf|support|supply|supplies|sucks|style|study|studio|stream|store|storage|stockholm|stcgroup|stc|statoil|statefarm|statebank|starhub|star|staples|stada|srt|srl|spreadbetting|spot|spiegel|space|soy|sony|song|solutions|solar|sohu|software|softbank|social|soccer|sncf|smile|smart|sling|skype|sky|skin|ski|site|singles|sina|silk|shriram|showtime|show|shouji|shopping|shop|shoes|shiksha|shia|shell|shaw|sharp|shangrila|sfr|sexy|sex|sew|seven|ses|services|sener|select|seek|security|secure|seat|search|scot|scor|scjohnson|science|schwarz|schule|school|scholarships|schmidt|schaeffler|scb|sca|sbs|sbi|saxo|save|sas|sarl|sapo|sap|sanofi|sandvikcoromant|sandvik|samsung|samsclub|salon|sale|sakura|safety|safe|saarland|ryukyu|rwe|run|ruhr|rugby|rsvp|room|rogers|rodeo|rocks|rocher|rmit|rip|rio|ril|rightathome|ricoh|richardli|rich|rexroth|reviews|review|restaurant|rest|republican|report|repair|rentals|rent|ren|reliance|reit|reisen|reise|rehab|redumbrella|redstone|red|recipes|realty|realtor|realestate|read|raid|radio|racing|qvc|quest|quebec|qpon|pwc|pub|prudential|pru|protection|property|properties|promo|progressive|prof|productions|prod|pro|prime|press|praxi|pramerica|post|porn|politie|poker|pohl|pnc|plus|plumbing|playstation|play|place|pizza|pioneer|pink|ping|pin|pid|pictures|pictet|pics|piaget|physio|photos|photography|photo|phone|philips|phd|pharmacy|pfizer|pet|pccw|pay|passagens|party|parts|partners|pars|paris|panerai|panasonic|pamperedchef|page|ovh|ott|otsuka|osaka|origins|orientexpress|organic|org|orange|oracle|open|ooo|onyourside|online|onl|ong|one|omega|ollo|oldnavy|olayangroup|olayan|okinawa|office|off|observer|obi|nyc|ntt|nrw|nra|nowtv|nowruz|now|norton|northwesternmutual|nokia|nissay|nissan|ninja|nikon|nike|nico|nhk|ngo|nfl|nexus|nextdirect|next|news|newholland|new|neustar|network|netflix|netbank|net|nec|nba|navy|natura|nationwide|name|nagoya|nadex|nab|mutuelle|mutual|museum|mtr|mtpc|mtn|msd|movistar|movie|mov|motorcycles|moto|moscow|mortgage|mormon|mopar|montblanc|monster|money|monash|mom|moi|moe|moda|mobily|mobile|mobi|mma|mls|mlb|mitsubishi|mit|mint|mini|mil|microsoft|miami|metlife|merckmsd|meo|menu|men|memorial|meme|melbourne|meet|media|med|mckinsey|mcdonalds|mcd|mba|mattel|maserati|marshalls|marriott|markets|marketing|market|map|mango|management|man|makeup|maison|maif|madrid|macys|luxury|luxe|lupin|lundbeck|ltda|ltd|lplfinancial|lpl|love|lotto|lotte|london|lol|loft|locus|locker|loans|loan|lixil|living|live|lipsy|link|linde|lincoln|limo|limited|lilly|like|lighting|lifestyle|lifeinsurance|life|lidl|liaison|lgbt|lexus|lego|legal|lefrak|leclerc|lease|lds|lawyer|law|latrobe|latino|lat|lasalle|lanxess|landrover|land|lancome|lancia|lancaster|lamer|lamborghini|ladbrokes|lacaixa|kyoto|kuokgroup|kred|krd|kpn|kpmg|kosher|komatsu|koeln|kiwi|kitchen|kindle|kinder|kim|kia|kfh|kerryproperties|kerrylogistics|kerryhotels|kddi|kaufen|juniper|juegos|jprs|jpmorgan|joy|jot|joburg|jobs|jnj|jmp|jll|jlc|jio|jewelry|jetzt|jeep|jcp|jcb|java|jaguar|iwc|iveco|itv|itau|istanbul|ist|ismaili|iselect|irish|ipiranga|investments|intuit|international|intel|int|insure|insurance|institute|ink|ing|info|infiniti|industries|immobilien|immo|imdb|imamat|ikano|iinet|ifm|ieee|icu|ice|icbc|ibm|hyundai|hyatt|hughes|htc|hsbc|how|house|hotmail|hotels|hoteles|hot|hosting|host|hospital|horse|honeywell|honda|homesense|homes|homegoods|homedepot|holiday|holdings|hockey|hkt|hiv|hitachi|hisamitsu|hiphop|hgtv|hermes|here|helsinki|help|healthcare|health|hdfcbank|hdfc|hbo|haus|hangout|hamburg|hair|guru|guitars|guide|guge|gucci|guardian|group|grocery|gripe|green|gratis|graphics|grainger|gov|got|gop|google|goog|goodyear|goodhands|goo|golf|goldpoint|gold|godaddy|gmx|gmo|gmbh|gmail|globo|global|gle|glass|glade|giving|gives|gifts|gift|ggee|george|genting|gent|gea|gdn|gbiz|garden|gap|games|game|gallup|gallo|gallery|gal|fyi|futbol|furniture|fund|fun|fujixerox|fujitsu|ftr|frontier|frontdoor|frogans|frl|fresenius|free|fox|foundation|forum|forsale|forex|ford|football|foodnetwork|food|foo|fly|flsmidth|flowers|florist|flir|flights|flickr|fitness|fit|fishing|fish|firmdale|firestone|fire|financial|finance|final|film|fido|fidelity|fiat|ferrero|ferrari|feedback|fedex|fast|fashion|farmers|farm|fans|fan|family|faith|fairwinds|fail|fage|extraspace|express|exposed|expert|exchange|everbank|events|eus|eurovision|etisalat|esurance|estate|esq|erni|ericsson|equipment|epson|epost|enterprises|engineering|engineer|energy|emerck|email|education|edu|edeka|eco|eat|earth|dvr|dvag|durban|dupont|duns|dunlop|duck|dubai|dtv|drive|download|dot|doosan|domains|doha|dog|dodge|doctor|docs|dnp|diy|dish|discover|discount|directory|direct|digital|diet|diamonds|dhl|dev|design|desi|dentist|dental|democrat|delta|deloitte|dell|delivery|degree|deals|dealer|deal|dds|dclk|day|datsun|dating|date|data|dance|dad|dabur|cyou|cymru|cuisinella|csc|cruises|cruise|crs|crown|cricket|creditunion|creditcard|credit|courses|coupons|coupon|country|corsica|coop|cool|cookingchannel|cooking|contractors|contact|consulting|construction|condos|comsec|computer|compare|company|community|commbank|comcast|com|cologne|college|coffee|codes|coach|clubmed|club|cloud|clothing|clinique|clinic|click|cleaning|claims|cityeats|city|citic|citi|citadel|cisco|circle|cipriani|church|chrysler|chrome|christmas|chloe|chintai|cheap|chat|chase|channel|chanel|cfd|cfa|cern|ceo|center|ceb|cbs|cbre|cbn|cba|catholic|catering|cat|casino|cash|caseih|case|casa|cartier|cars|careers|career|care|cards|caravan|car|capitalone|capital|capetown|canon|cancerresearch|camp|camera|cam|calvinklein|call|cal|cafe|cab|bzh|buzz|buy|business|builders|build|bugatti|budapest|brussels|brother|broker|broadway|bridgestone|bradesco|box|boutique|bot|boston|bostik|bosch|boots|booking|book|boo|bond|bom|bofa|boehringer|boats|bnpparibas|bnl|bmw|bms|blue|bloomberg|blog|blockbuster|blanco|blackfriday|black|biz|bio|bingo|bing|bike|bid|bible|bharti|bet|bestbuy|best|berlin|bentley|beer|beauty|beats|bcn|bcg|bbva|bbt|bbc|bayern|bauhaus|basketball|baseball|bargains|barefoot|barclays|barclaycard|barcelona|bar|bank|band|bananarepublic|banamex|baidu|baby|azure|axa|aws|avianca|autos|auto|author|auspost|audio|audible|audi|auction|attorney|athleta|associates|asia|asda|arte|art|arpa|army|archi|aramco|arab|aquarelle|apple|app|apartments|aol|anz|anquan|android|analytics|amsterdam|amica|amfam|amex|americanfamily|americanexpress|alstom|alsace|ally|allstate|allfinanz|alipay|alibaba|alfaromeo|akdn|airtel|airforce|airbus|aigo|aig|agency|agakhan|africa|afl|afamilycompany|aetna|aero|aeg|adult|ads|adac|actor|active|aco|accountants|accountant|accenture|academy|abudhabi|abogado|able|abc|abbvie|abbott|abb|abarth|aarp|aaa|onion)(?=[^0-9a-zA-Z@]|$))")),regexen.validCCTLD=regexSupplant(RegExp("(?:(?:한국|香港|澳門|新加坡|台灣|台湾|中國|中国|გე|ไทย|ලංකා|ഭാരതം|ಭಾರತ|భారత్|சிங்கப்பூர்|இலங்கை|இந்தியா|ଭାରତ|ભારત|ਭਾਰਤ|ভাৰত|ভারত|বাংলা|भारोत|भारतम्|भारत|ڀارت|پاکستان|مليسيا|مصر|قطر|فلسطين|عمان|عراق|سورية|سودان|تونس|بھارت|بارت|ایران|امارات|المغرب|السعودية|الجزائر|الاردن|հայ|қаз|укр|срб|рф|мон|мкд|ею|бел|бг|ελ|zw|zm|za|yt|ye|ws|wf|vu|vn|vi|vg|ve|vc|va|uz|uy|us|um|uk|ug|ua|tz|tw|tv|tt|tr|tp|to|tn|tm|tl|tk|tj|th|tg|tf|td|tc|sz|sy|sx|sv|su|st|ss|sr|so|sn|sm|sl|sk|sj|si|sh|sg|se|sd|sc|sb|sa|rw|ru|rs|ro|re|qa|py|pw|pt|ps|pr|pn|pm|pl|pk|ph|pg|pf|pe|pa|om|nz|nu|nr|np|no|nl|ni|ng|nf|ne|nc|na|mz|my|mx|mw|mv|mu|mt|ms|mr|mq|mp|mo|mn|mm|ml|mk|mh|mg|mf|me|md|mc|ma|ly|lv|lu|lt|ls|lr|lk|li|lc|lb|la|kz|ky|kw|kr|kp|kn|km|ki|kh|kg|ke|jp|jo|jm|je|it|is|ir|iq|io|in|im|il|ie|id|hu|ht|hr|hn|hm|hk|gy|gw|gu|gt|gs|gr|gq|gp|gn|gm|gl|gi|gh|gg|gf|ge|gd|gb|ga|fr|fo|fm|fk|fj|fi|eu|et|es|er|eh|eg|ee|ec|dz|do|dm|dk|dj|de|cz|cy|cx|cw|cv|cu|cr|co|cn|cm|cl|ck|ci|ch|cg|cf|cd|cc|ca|bz|by|bw|bv|bt|bs|br|bq|bo|bn|bm|bl|bj|bi|bh|bg|bf|be|bd|bb|ba|az|ax|aw|au|at|as|ar|aq|ao|an|am|al|ai|ag|af|ae|ad|ac)(?=[^0-9a-zA-Z@]|$))")),regexen.validPunycode=/(?:xn--[0-9a-z]+)/,regexen.validSpecialCCTLD=/(?:(?:co|tv)(?=[^0-9a-zA-Z@]|$))/,regexen.validDomain=regexSupplant(/(?:#{validSubdomain}*#{validDomainName}(?:#{validGTLD}|#{validCCTLD}|#{validPunycode}))/),regexen.validPortNumber=/[0-9]+/,regexen.pd=/\u002d\u058a\u05be\u1400\u1806\u2010-\u2015\u2e17\u2e1a\u2e3a\u2e40\u301c\u3030\u30a0\ufe31\ufe58\ufe63\uff0d/,regexen.validGeneralUrlPathChars=regexSupplant(/[^#{spaces_group}\(\)\?]/i),regexen.validUrlBalancedParens=regexSupplant("\\((?:#{validGeneralUrlPathChars}+|(?:#{validGeneralUrlPathChars}*\\(#{validGeneralUrlPathChars}+\\)#{validGeneralUrlPathChars}*))\\)","i"),regexen.validUrlPathEndingChars=regexSupplant(/[^#{spaces_group}\(\)\?!\*';:=\,\.\$%\[\]#{pd}~&\|@]|(?:#{validUrlBalancedParens})/i),regexen.validUrlPath=regexSupplant("(?:(?:#{validGeneralUrlPathChars}*(?:#{validUrlBalancedParens}#{validGeneralUrlPathChars}*)*#{validUrlPathEndingChars})|(?:@#{validGeneralUrlPathChars}+/))","i"),regexen.validUrlQueryChars=/[a-z0-9!?\*'@\(\);:&=\+\$\/%#\[\]\-_\.,~|]/i,regexen.validUrlQueryEndingChars=/[a-z0-9_&=#\/]/i,regexen.validUrl=regexSupplant("((https?:\\/\\/)(#{validDomain})(?::(#{validPortNumber}))?(\\/#{validUrlPath}*)?(\\?#{validUrlQueryChars}*#{validUrlQueryEndingChars})?)","gi"),regexen.validUrl}(),urlPlaceholder="xxxxxxxxxxxxxxxxxxxxxxx";function countableText(_e){return _e.replace(urlRegex,urlPlaceholder).replace(/(^|[^\/\w])@(([a-z0-9_]+)@[a-z0-9\.\-]+[a-z0-9]+)/ig,"$1@$3")}const vitePluginRequire_1697864672663_63400978="/packs/assets/square-key-1195e5c6.svg",vitePluginRequire_1697864672663_36687592="/packs/assets/markdown-b9941e2f.svg",vitePluginRequire_1697864664828_71032087="/packs/assets/file-text-432848a4.svg";var Overlay$1={exports:{}},elementType={exports:{}},createChainableTypeChecker={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0}),et.default=tt;function tt(nt){function rt(it,ot,st,ct,ut,dt){var ft=ct||"<>",pt=dt||st;if(ot[st]==null)return it?new Error("Required "+ut+" `"+pt+"` was not specified "+("in `"+ft+"`.")):null;for(var mt=arguments.length,ht=Array(mt>6?mt-6:0),Et=6;Et"u"?"undefined":tt(mt);return rt.default.isValidElement(mt)?new Error("Invalid "+ft+" `"+pt+"` of type ReactElement "+("supplied to `"+dt+"`, expected a ReactComponent or a ")+"DOMElement. You can usually obtain a ReactComponent or DOMElement from a ReactElement by attaching a ref to it."):(ht!=="object"||typeof mt.render!="function")&&mt.nodeType!==1?new Error("Invalid "+ft+" `"+pt+"` of value `"+mt+"` "+("supplied to `"+dt+"`, expected a ReactComponent or a ")+"DOMElement."):null}et.default=(0,it.default)(st),_e.exports=et.default})(componentOrElement,componentOrElement.exports);var componentOrElementExports=componentOrElement.exports,getContainer={exports:{}};(function(_e,et){et.__esModule=!0,et.default=at;var tt=reactDomExports,nt=rt(tt);function rt(it){return it&&it.__esModule?it:{default:it}}function at(it,ot){return it=typeof it=="function"?it():it,nt.default.findDOMNode(it)||ot}_e.exports=et.default})(getContainer,getContainer.exports);var getContainerExports=getContainer.exports,ownerDocument$1={exports:{}},ownerDocument={exports:{}};(function(_e,et){et.__esModule=!0,et.default=tt;function tt(nt){return nt&&nt.ownerDocument||document}_e.exports=et.default})(ownerDocument,ownerDocument.exports);var ownerDocumentExports$1=ownerDocument.exports;(function(_e,et){et.__esModule=!0,et.default=function(ot){return(0,at.default)(nt.default.findDOMNode(ot))};var tt=reactDomExports,nt=it(tt),rt=ownerDocumentExports$1,at=it(rt);function it(ot){return ot&&ot.__esModule?ot:{default:ot}}_e.exports=et.default})(ownerDocument$1,ownerDocument$1.exports);var ownerDocumentExports=ownerDocument$1.exports,LegacyPortal={exports:{}};(function(_e,et){et.__esModule=!0;var tt=propTypesExports,nt=mt(tt),rt=componentOrElementExports,at=mt(rt),it=reactExports,ot=mt(it),st=reactDomExports,ct=mt(st),ut=getContainerExports,dt=mt(ut),ft=ownerDocumentExports,pt=mt(ft);function mt(gt){return gt&>.__esModule?gt:{default:gt}}function ht(gt,St){if(!(gt instanceof St))throw new TypeError("Cannot call a class as a function")}function Et(gt,St){if(!gt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return St&&(typeof St=="object"||typeof St=="function")?St:gt}function yt(gt,St){if(typeof St!="function"&&St!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof St);gt.prototype=Object.create(St&&St.prototype,{constructor:{value:gt,enumerable:!1,writable:!0,configurable:!0}}),St&&(Object.setPrototypeOf?Object.setPrototypeOf(gt,St):gt.__proto__=St)}var vt=function(gt){yt(St,gt);function St(){var Rt,$t,bt;ht(this,St);for(var wt=arguments.length,xt=Array(wt),Tt=0;TtRt?Rt-bt:0}function pt(ht,Et,yt,vt){var gt=dt(yt),St=gt.width,Rt=ht-vt,$t=ht+vt+Et;return Rt<0?-Rt:$t>St?St-$t:0}function mt(ht,Et,yt,vt,gt){var St=vt.tagName==="BODY"?(0,nt.default)(yt):(0,at.default)(yt,vt),Rt=(0,nt.default)(Et),$t=Rt.height,bt=Rt.width,wt=void 0,xt=void 0,Tt=void 0,Ct=void 0;if(ht==="left"||ht==="right"){xt=St.top+(St.height-$t)/2,ht==="left"?wt=St.left-bt:wt=St.left+St.width;var Nt=ft(xt,$t,vt,gt);xt+=Nt,Ct=50*(1-2*Nt/$t)+"%",Tt=void 0}else if(ht==="top"||ht==="bottom"){wt=St.left+(St.width-bt)/2,ht==="top"?xt=St.top-$t:xt=St.top+St.height;var At=pt(wt,bt,vt,gt);wt+=At,Tt=50*(1-2*At/bt)+"%",Ct=void 0}else throw new Error('calcOverlayPosition(): No such placement of "'+ht+'" found.');return{positionLeft:wt,positionTop:xt,arrowOffsetLeft:Tt,arrowOffsetTop:Ct}}_e.exports=et.default})(calculatePosition,calculatePosition.exports);var calculatePositionExports=calculatePosition.exports;(function(_e,et){et.__esModule=!0;var tt=Object.assign||function(xt){for(var Tt=1;Tt=0||Object.prototype.hasOwnProperty.call(xt,Nt)&&(Ct[Nt]=xt[Nt]);return Ct}function Rt(xt,Tt){if(!(xt instanceof Tt))throw new TypeError("Cannot call a class as a function")}function $t(xt,Tt){if(!xt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Tt&&(typeof Tt=="object"||typeof Tt=="function")?Tt:xt}function bt(xt,Tt){if(typeof Tt!="function"&&Tt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Tt);xt.prototype=Object.create(Tt&&Tt.prototype,{constructor:{value:xt,enumerable:!1,writable:!0,configurable:!0}}),Tt&&(Object.setPrototypeOf?Object.setPrototypeOf(xt,Tt):xt.__proto__=Tt)}var wt=function(xt){bt(Tt,xt);function Tt(Ct,Nt){Rt(this,Tt);var At=$t(this,xt.call(this,Ct,Nt));return At.getTarget=function(){var kt=At.props.target,Pt=typeof kt=="function"?kt():kt;return Pt&&ft.default.findDOMNode(Pt)||null},At.maybeUpdatePosition=function(kt){var Pt=At.getTarget();!At.props.shouldUpdatePosition&&Pt===At._lastTarget&&!kt||At.updatePosition(Pt)},At.state={positionLeft:0,positionTop:0,arrowOffsetLeft:null,arrowOffsetTop:null},At._needsFlush=!1,At._lastTarget=null,At}return Tt.prototype.componentDidMount=function(){this.updatePosition(this.getTarget())},Tt.prototype.UNSAFE_componentWillReceiveProps=function(){this._needsFlush=!0},Tt.prototype.componentDidUpdate=function(Nt){this._needsFlush&&(this._needsFlush=!1,this.maybeUpdatePosition(this.props.placement!==Nt.placement))},Tt.prototype.render=function(){var Nt=this.props,At=Nt.children,kt=Nt.className,Pt=St(Nt,["children","className"]),Ft=this.state,Dt=Ft.positionLeft,Lt=Ft.positionTop,It=St(Ft,["positionLeft","positionTop"]);delete Pt.target,delete Pt.container,delete Pt.containerPadding,delete Pt.shouldUpdatePosition;var Ot=ut.default.Children.only(At);return(0,ct.cloneElement)(Ot,tt({},Pt,It,{positionLeft:Dt,positionTop:Lt,className:(0,rt.default)(kt,Ot.props.className),style:tt({},Ot.props.style,{left:Dt,top:Lt})}))},Tt.prototype.updatePosition=function(Nt){if(this._lastTarget=Nt,!Nt){this.setState({positionLeft:0,positionTop:0,arrowOffsetLeft:null,arrowOffsetTop:null});return}var At=ft.default.findDOMNode(this),kt=(0,Et.default)(this.props.container,(0,vt.default)(this).body);this.setState((0,mt.default)(this.props.placement,At,Nt,kt,this.props.containerPadding))},Tt}(ut.default.Component);wt.propTypes={target:it.default.oneOfType([st.default,it.default.func]),container:it.default.oneOfType([st.default,it.default.func]),containerPadding:it.default.number,placement:it.default.oneOf(["top","right","bottom","left"]),shouldUpdatePosition:it.default.bool},wt.displayName="Position",wt.defaultProps={containerPadding:0,placement:"right",shouldUpdatePosition:!1},et.default=wt,_e.exports=et.default})(Position,Position.exports);var PositionExports=Position.exports,RootCloseWrapper={exports:{}},addEventListener={exports:{}};(function(_e,et){et.__esModule=!0,et.default=function(ot,st,ct,ut){return(0,nt.default)(ot,st,ct,ut),{remove:function(){(0,at.default)(ot,st,ct,ut)}}};var tt=onExports,nt=it(tt),rt=offExports,at=it(rt);function it(ot){return ot&&ot.__esModule?ot:{default:ot}}_e.exports=et.default})(addEventListener,addEventListener.exports);var addEventListenerExports=addEventListener.exports;(function(_e,et){et.__esModule=!0;var tt=containsExports,nt=mt(tt),rt=propTypesExports,at=mt(rt),it=reactExports,ot=mt(it),st=reactDomExports,ct=mt(st),ut=addEventListenerExports,dt=mt(ut),ft=ownerDocumentExports,pt=mt(ft);function mt($t){return $t&&$t.__esModule?$t:{default:$t}}function ht($t,bt){if(!($t instanceof bt))throw new TypeError("Cannot call a class as a function")}function Et($t,bt){if(!$t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return bt&&(typeof bt=="object"||typeof bt=="function")?bt:$t}function yt($t,bt){if(typeof bt!="function"&&bt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof bt);$t.prototype=Object.create(bt&&bt.prototype,{constructor:{value:$t,enumerable:!1,writable:!0,configurable:!0}}),bt&&(Object.setPrototypeOf?Object.setPrototypeOf($t,bt):$t.__proto__=bt)}var vt=27;function gt($t){return $t.button===0}function St($t){return!!($t.metaKey||$t.altKey||$t.ctrlKey||$t.shiftKey)}var Rt=function($t){yt(bt,$t);function bt(wt,xt){ht(this,bt);var Tt=Et(this,$t.call(this,wt,xt));return Tt.addEventListeners=function(){Tt.currentEvent=window.event;var Ct=Tt.props.event,Nt=(0,pt.default)(Tt);Tt.documentMouseCaptureListener=(0,dt.default)(Nt,Ct,Tt.handleMouseCapture,!0),Tt.documentMouseListener=(0,dt.default)(Nt,Ct,Tt.handleMouse),Tt.documentKeyupListener=(0,dt.default)(Nt,"keyup",Tt.handleKeyUp)},Tt.removeEventListeners=function(){Tt.documentMouseCaptureListener&&Tt.documentMouseCaptureListener.remove(),Tt.documentMouseListener&&Tt.documentMouseListener.remove(),Tt.documentKeyupListener&&Tt.documentKeyupListener.remove()},Tt.handleMouseCapture=function(Ct){Tt.preventMouseRootClose=St(Ct)||!gt(Ct)||(0,nt.default)(ct.default.findDOMNode(Tt),Ct.target)},Tt.handleMouse=function(Ct){if(Ct===Tt.currentEvent){Tt.currentEvent=void 0;return}!Tt.preventMouseRootClose&&Tt.props.onRootClose&&Tt.props.onRootClose(Ct)},Tt.handleKeyUp=function(Ct){if(Ct===Tt.currentEvent){Tt.currentEvent=void 0;return}Ct.keyCode===vt&&Tt.props.onRootClose&&Tt.props.onRootClose(Ct)},Tt.preventMouseRootClose=!1,Tt}return bt.prototype.componentDidMount=function(){this.props.disabled||this.addEventListeners()},bt.prototype.componentDidUpdate=function(xt){!this.props.disabled&&xt.disabled?this.addEventListeners():this.props.disabled&&!xt.disabled&&this.removeEventListeners()},bt.prototype.componentWillUnmount=function(){this.props.disabled||this.removeEventListeners()},bt.prototype.render=function(){return this.props.children},bt}(ot.default.Component);Rt.displayName="RootCloseWrapper",Rt.propTypes={onRootClose:at.default.func,children:at.default.element,disabled:at.default.bool,event:at.default.oneOf(["click","mousedown"])},Rt.defaultProps={event:"click"},et.default=Rt,_e.exports=et.default})(RootCloseWrapper,RootCloseWrapper.exports);var RootCloseWrapperExports=RootCloseWrapper.exports;(function(_e,et){et.__esModule=!0;var tt=Object.assign||function(Rt){for(var $t=1;$t=0||Object.prototype.hasOwnProperty.call(Rt,wt)&&(bt[wt]=Rt[wt]);return bt}function yt(Rt,$t){if(!(Rt instanceof $t))throw new TypeError("Cannot call a class as a function")}function vt(Rt,$t){if(!Rt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return $t&&(typeof $t=="object"||typeof $t=="function")?$t:Rt}function gt(Rt,$t){if(typeof $t!="function"&&$t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof $t);Rt.prototype=Object.create($t&&$t.prototype,{constructor:{value:Rt,enumerable:!1,writable:!0,configurable:!0}}),$t&&(Object.setPrototypeOf?Object.setPrototypeOf(Rt,$t):Rt.__proto__=$t)}var St=function(Rt){gt($t,Rt);function $t(bt,wt){yt(this,$t);var xt=vt(this,Rt.call(this,bt,wt));return xt.handleHidden=function(){if(xt.setState({exited:!0}),xt.props.onExited){var Tt;(Tt=xt.props).onExited.apply(Tt,arguments)}},xt.state={exited:!bt.show},xt.onHiddenListener=xt.handleHidden.bind(xt),xt}return $t.prototype.UNSAFE_componentWillReceiveProps=function(wt){wt.show?this.setState({exited:!1}):wt.transition||this.setState({exited:!0})},$t.prototype.render=function(){var wt=this.props,xt=wt.container,Tt=wt.containerPadding,Ct=wt.target,Nt=wt.placement,At=wt.shouldUpdatePosition,kt=wt.rootClose,Pt=wt.children,Ft=wt.transition,Dt=Et(wt,["container","containerPadding","target","placement","shouldUpdatePosition","rootClose","children","transition"]),Lt=Dt.show||Ft&&!this.state.exited;if(!Lt)return null;var It=Pt;if(It=st.default.createElement(ft.default,{container:xt,containerPadding:Tt,target:Ct,placement:Nt,shouldUpdatePosition:At},It),Ft){var Ot=Dt.onExit,Ut=Dt.onExiting,jt=Dt.onEnter,zt=Dt.onEntering,Qt=Dt.onEntered;It=st.default.createElement(Ft,{in:Dt.show,appear:!0,onExit:Ot,onExiting:Ut,onExited:this.onHiddenListener,onEnter:jt,onEntering:zt,onEntered:Qt},It)}return kt&&(It=st.default.createElement(mt.default,{onRootClose:Dt.onHide,event:Dt.rootCloseEvent},It)),st.default.createElement(ut.default,{container:xt},It)},$t}(st.default.Component);St.propTypes=tt({},ut.default.propTypes,ft.default.propTypes,{show:rt.default.bool,rootClose:rt.default.bool,rootCloseEvent:mt.default.propTypes.event,onHide:function($t){var bt=rt.default.func;$t.rootClose&&(bt=bt.isRequired);for(var wt=arguments.length,xt=Array(wt>1?wt-1:0),Tt=1;Tt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var AutosuggestInput=function(_e){_inherits$1(tt,_e);var et=_createSuper(tt);function tt(){var nt;_classCallCheck$1(this,tt);for(var rt=arguments.length,at=new Array(rt),it=0;it0||ut)&&(ot.preventDefault(),nt.setState({selectedSuggestion:Math.min(pt+1,Et)}));break;case"ArrowUp":!mt&&(ct.size>0||ut)&&(ot.preventDefault(),nt.setState({selectedSuggestion:Math.max(pt-1,ht)}));break;case"Enter":case"Tab":if(!mt&&pt>-1&&(ct.size>0||ut)){if(ot.preventDefault(),ot.stopPropagation(),nt.setState({selectedSuggestion:ht}),pt0&&at.suggestionsHidden&&at.focused&&this.setState({suggestionsHidden:!1})}},{key:"componentWillUnmount",value:function(){this.input&&uninstall(this.input)}},{key:"setPortalPosition",value:function(){if(!this.input)return{};var rt=this.input.getBoundingClientRect(),at=rt.top,it=rt.height,ot=rt.left,st=rt.width;return{left:ot,width:st,top:at+it}}},{key:"render",value:function(){var rt=this.props,at=rt.value,it=rt.suggestions,ot=rt.disabled,st=rt.placeholder,ct=rt.onKeyUp,ut=rt.autoFocus,dt=rt.className,ft=rt.id,pt=rt.maxLength,mt=rt.menu,ht=rt.theme,Et=rt.hotkey;this.hotkey=Et;var yt=this.state.suggestionsHidden,vt={direction:"ltr"},gt=!yt&&(!it.isEmpty()||mt&&at);return(isRtl(at)||!at&&st&&isRtl(st))&&(vt.direction="rtl"),[_createRawReactElement("div",{className:"relative w-full"},"input",_createRawReactElement("label",{className:"sr-only"},void 0,st),React$3.createElement(Input,{type:"text",className:dt,outerClassName:"mt-0",ref:this.setInput,disabled:ot,placeholder:st,autoFocus:ut,value:at,onChange:this.onChange,onKeyDown:this.onKeyDown,onKeyUp:ct,onFocus:this.onFocus,onBlur:this.onBlur,style:vt,"aria-autocomplete":"list",id:ft,maxLength:pt,"data-testid":"autosuggest-input",theme:ht})),_createRawReactElement(Portal$1,{},"portal",_createRawReactElement("div",{style:this.setPortalPosition(),className:clsx({"fixed w-full z-[1001] shadow bg-white dark:bg-gray-900 rounded-lg py-1 dark:ring-2 dark:ring-primary-700 focus:outline-none":!0,hidden:!gt,block:gt})},void 0,_createRawReactElement("div",{className:"space-y-0.5"},void 0,it.map(this.renderSuggestion)),this.renderMenu()))]}}]),tt}(ImmutablePureComponent);_defineProperty$7(AutosuggestInput,"defaultProps",{autoFocus:!1,autoSelect:!0,searchTokens:List$1(["@",":","#"])});var messages$h={minutes:{id:"intervals.full.minutes",defaultMessage:"{number, plural, one {# minute} other {# minutes}}"},hours:{id:"intervals.full.hours",defaultMessage:"{number, plural, one {# hour} other {# hours}}"},days:{id:"intervals.full.days",defaultMessage:"{number, plural, one {# day} other {# days}}"}},DurationSelector=function _e(et){var tt=et.onDurationChange,nt=useIntl(),rt=reactExports.useState(2),at=_slicedToArray$4(rt,2),it=at[0],ot=at[1],st=reactExports.useState(0),ct=_slicedToArray$4(st,2),ut=ct[0],dt=ct[1],ft=reactExports.useState(0),pt=_slicedToArray$4(ft,2),mt=pt[0],ht=pt[1],Et=it*24*60*60+ut*60*60+mt*60;return reactExports.useEffect(function(){it===7&&(dt(0),ht(0))},[it]),reactExports.useEffect(function(){tt(Et)},[Et]),_createRawReactElement("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-3"},void 0,_createRawReactElement("div",{className:"sm:col-span-1"},void 0,_createRawReactElement(Select,{value:it,onChange:function(vt){return ot(Number(vt.target.value))},"data-testid":"duration-selector-days"},void 0,_toConsumableArray(Array(8).fill(void 0)).map(function(yt,vt){return _createRawReactElement("option",{value:vt},vt,nt.formatMessage(messages$h.days,{number:vt}))}))),_createRawReactElement("div",{className:"sm:col-span-1"},void 0,_createRawReactElement(Select,{value:ut,onChange:function(vt){return dt(Number(vt.target.value))},disabled:it===7,"data-testid":"duration-selector-hours"},void 0,_toConsumableArray(Array(24).fill(void 0)).map(function(yt,vt){return _createRawReactElement("option",{value:vt},vt,nt.formatMessage(messages$h.hours,{number:vt}))}))),_createRawReactElement("div",{className:"sm:col-span-1"},void 0,_createRawReactElement(Select,{value:mt,onChange:function(vt){return ht(Number(vt.target.value))},disabled:it===7,"data-testid":"duration-selector-minutes"},void 0,[0,15,30,45].map(function(yt){return _createRawReactElement("option",{value:yt},yt,nt.formatMessage(messages$h.minutes,{number:yt}))}))))},messages$g={option_placeholder:{id:"compose_form.poll.option_placeholder",defaultMessage:"Answer #{number}"},add_option:{id:"compose_form.poll.add_option",defaultMessage:"Add an answer"},pollDuration:{id:"compose_form.poll.duration",defaultMessage:"Duration"},pollExpiry:{id:"compose_form.poll.expiry",defaultMessage:"Poll expiry"},pollExpiryDetail:{id:"compose_form.poll.expiry_detail",defaultMessage:"Should the poll expires"},removePoll:{id:"compose_form.poll.remove",defaultMessage:"Remove poll"},switchToMultiple:{id:"compose_form.poll.switch_to_multiple",defaultMessage:"Change poll to allow multiple answers"},switchToSingle:{id:"compose_form.poll.switch_to_single",defaultMessage:"Change poll to allow for a single answer"},minutes:{id:"intervals.full.minutes",defaultMessage:"{number, plural, one {# minute} other {# minutes}}"},hours:{id:"intervals.full.hours",defaultMessage:"{number, plural, one {# hour} other {# hours}}"},days:{id:"intervals.full.days",defaultMessage:"{number, plural, one {# day} other {# days}}"},multiSelect:{id:"compose_form.poll.multiselect",defaultMessage:"Multi-Select"},multiSelectDetail:{id:"compose_form.poll.multiselect_detail",defaultMessage:"Allow users to select multiple answers"}},Option=function _e(et){var tt=et.composeId,nt=et.index,rt=et.maxChars,at=et.numOptions,it=et.onChange,ot=et.onRemove,st=et.onRemovePoll,ct=et.title,ut=useAppDispatch(),dt=useIntl(),ft=useCompose(tt).suggestions,pt=function(gt){return it(nt,gt.target.value)},mt=function(){at>2?ot(nt):st()},ht=function(){return ut(clearComposeSuggestions(tt))},Et=function(gt){return ut(fetchComposeSuggestions(tt,gt))},yt=function(gt,St,Rt){St&&typeof St=="string"&&ut(selectComposeSuggestion(tt,gt,St,Rt,["poll","options",nt]))};return _createRawReactElement(HStack,{alignItems:"center",justifyContent:"between",space:4},void 0,_createRawReactElement(HStack,{alignItems:"center",space:2,grow:!0},void 0,_createRawReactElement("div",{className:"w-6"},void 0,_createRawReactElement(Text$2,{weight:"bold"},void 0,nt+1,".")),_createRawReactElement(AutosuggestInput,{className:"rounded-md !bg-transparent dark:!bg-transparent",placeholder:dt.formatMessage(messages$g.option_placeholder,{number:nt+1}),maxLength:rt,value:ct,onChange:pt,suggestions:ft,onSuggestionsFetchRequested:Et,onSuggestionsClearRequested:ht,onSuggestionSelected:yt,searchTokens:[":"],autoFocus:nt===0||nt>=2})),nt>1&&_createRawReactElement("div",{},void 0,_createRawReactElement(Button,{theme:"danger",size:"sm",onClick:mt},void 0,_createRawReactElement(FormattedMessage$1,{id:"compose_form.poll.remove_option",defaultMessage:"Delete"}))))},PollForm=function _e(et){var tt,nt,rt,at=et.composeId,it=useFeatures(),ot=useAppDispatch(),st=useIntl(),ct=useInstance(),ut=ct.configuration,dt=useCompose(at),ft=ut.polls,pt=(tt=dt.poll)===null||tt===void 0?void 0:tt.options,mt=(nt=dt.poll)===null||nt===void 0?void 0:nt.expires_in,ht=(rt=dt.poll)===null||rt===void 0?void 0:rt.multiple,Et=reactExports.useState(mt),yt=_slicedToArray$4(Et,2),vt=yt[0],gt=yt[1],St=ft.max_options,Rt=ft.max_characters_per_option,$t=function(Pt){return ot(removePollOption(at,Pt))},bt=function(Pt,Ft){return ot(changePollOption(at,Pt,Ft))},wt=function(){return ot(addPollOption(at,""))},xt=function(Pt,Ft){typeof Pt=="number"&>(Pt),ot(changePollSettings(at,Pt,Ft))},Tt=function(Pt){return xt(Pt,ht)},Ct=function(){return xt(mt===null?vt:null,ht)},Nt=function(){return xt(mt??null,!ht)},At=function(){return ot(removePoll(at))};return pt?_createRawReactElement(Stack,{space:4},void 0,_createRawReactElement(Stack,{space:2},void 0,pt.map(function(kt,Pt){return _createRawReactElement(Option,{composeId:at,title:kt,index:Pt,onChange:bt,onRemove:$t,maxChars:Rt,numOptions:pt.size,onRemovePoll:At},Pt)}),_createRawReactElement(HStack,{space:2},void 0,_createRawReactElement("div",{className:"w-6"}),pt.sizeMath.floor(Math.random()*65536),PollRecord=Record({options:List$1(["",""]),expires_in:24*3600,multiple:!1}),ReducerCompose=Record({caretPosition:null,content_type:"text/plain",focusDate:null,group_id:null,idempotencyKey:"",id:null,in_reply_to:null,is_changing_upload:!1,is_composing:!1,is_submitting:!1,is_uploading:!1,media_attachments:List$1(),poll:null,privacy:"public",progress:0,quote:null,resetFileKey:null,schedule:null,sensitive:!1,spoiler:!1,spoiler_text:"",suggestions:List$1(),suggestion_token:null,tagHistory:List$1(),text:"",to:OrderedSet(),group_timeline_visible:!1}),statusToTextMentions=(_e,et)=>{var rt;const tt=_e.getIn(["account","acct"]),nt=((rt=_e.get("mentions"))==null?void 0:rt.map(at=>at.acct))||[];return OrderedSet([tt]).concat(nt).delete(et.acct).map(at=>`@${at} `).join("")},statusToMentionsArray=(_e,et)=>{var rt;const tt=_e.getIn(["account","acct"]),nt=((rt=_e.get("mentions"))==null?void 0:rt.map(at=>at.acct))||[];return OrderedSet([tt]).concat(nt).delete(et.acct)},statusToMentionsAccountIdsArray=(_e,et)=>{const tt=_e.mentions.map(nt=>nt.id);return OrderedSet([et.id]).concat(tt).delete(et.id)},appendMedia=(_e,et,tt)=>{const nt=_e.media_attachments.size;return _e.withMutations(rt=>{rt.update("media_attachments",at=>at.push(normalizeAttachment(et))),rt.set("is_uploading",!1),rt.set("resetFileKey",Math.floor(Math.random()*65536)),rt.set("idempotencyKey",v4()),nt===0&&(tt||_e.spoiler)&&rt.set("sensitive",!0)})},removeMedia=(_e,et)=>{const tt=_e.media_attachments.size;return _e.withMutations(nt=>{nt.update("media_attachments",rt=>rt.filterNot(at=>at.id===et)),nt.set("idempotencyKey",v4()),tt===1&&nt.set("sensitive",!1)})},insertSuggestion=(_e,et,tt,nt,rt)=>_e.withMutations(at=>{at.updateIn(rt,it=>`${it.slice(0,et)}${nt} ${it.slice(et+((tt==null?void 0:tt.length)??0))}`),at.set("suggestion_token",null),at.set("suggestions",List$1()),rt.length===1&&rt[0]==="text"&&(at.set("focusDate",new Date),at.set("caretPosition",et+nt.length+1)),at.set("idempotencyKey",v4())}),updateSuggestionTags=(_e,et,tt)=>{const nt=et.slice(1);return _e.merge({suggestions:List$1(tt.filter(rt=>rt.get("name").toLowerCase().startsWith(nt.toLowerCase())).slice(0,4).map(rt=>"#"+rt.name)),suggestion_token:et})},insertEmoji=(_e,et,tt,nt)=>{const rt=_e.text,at=isNativeEmoji(tt)?tt.native:tt.colons,it=nt?" "+at:at;return _e.merge({text:`${rt.slice(0,et)}${it} ${rt.slice(et)}`,focusDate:new Date,caretPosition:et+it.length+1,idempotencyKey:v4()})},privacyPreference=(_e,et)=>{const tt=["public","unlisted","private","direct"];return _e==="group"?_e:tt[Math.max(tt.indexOf(_e),tt.indexOf(et),0)]},domParser$1=new DOMParser,expandMentions=_e=>{const et=domParser$1.parseFromString(_e.get("content"),"text/html").documentElement;return _e.get("mentions").forEach(tt=>{const nt=et.querySelector(`a[href="${tt.get("url")}"]`);nt&&(nt.textContent=`@${tt.get("acct")}`)}),et.innerHTML},getExplicitMentions=(_e,et)=>{const tt=domParser$1.parseFromString(et.content,"text/html").documentElement,nt=et.get("mentions").filter(rt=>!(tt.querySelector(`a[href="${rt.url}"]`)||rt.id===_e)).map(rt=>rt.acct);return OrderedSet(nt)},getAccountSettings=_e=>_e.getIn(["pleroma","settings_store",FE_NAME],Map$3()),importAccount$1=(_e,et)=>{const tt=getAccountSettings(Map$3(fromJS(et))),nt=tt.get("defaultPrivacy"),rt=tt.get("defaultContentType");return _e.withMutations(at=>{nt&&at.set("privacy",nt),rt&&at.set("content_type",rt),at.set("tagHistory",List$1(tagHistory.get(et.id)))})},updateSetting=(_e,et,tt)=>{switch(et.join(",")){case"defaultPrivacy":return _e.set("privacy",tt);case"defaultContentType":return _e.set("content_type",tt);default:return _e}},updateCompose=(_e,et,tt)=>_e.update(et,_e.get("default"),tt),initialState$l=Map$3({default:ReducerCompose({idempotencyKey:v4(),resetFileKey:getResetFileKey()})});function compose(_e=initialState$l,et){switch(et.type){case COMPOSE_TYPE_CHANGE:return updateCompose(_e,et.id,tt=>tt.withMutations(nt=>{nt.set("content_type",et.value),nt.set("idempotencyKey",v4())}));case COMPOSE_SPOILERNESS_CHANGE:return updateCompose(_e,et.id,tt=>tt.withMutations(nt=>{nt.set("spoiler_text",""),nt.set("spoiler",!tt.spoiler),nt.set("sensitive",!tt.spoiler),nt.set("idempotencyKey",v4())}));case COMPOSE_SPOILER_TEXT_CHANGE:return updateCompose(_e,et.id,tt=>tt.set("spoiler_text",et.text).set("idempotencyKey",v4()));case COMPOSE_VISIBILITY_CHANGE:return updateCompose(_e,et.id,tt=>tt.set("privacy",et.value).set("idempotencyKey",v4()));case COMPOSE_CHANGE:return updateCompose(_e,et.id,tt=>tt.set("text",et.text).set("idempotencyKey",v4()));case COMPOSE_REPLY:return updateCompose(_e,et.id,tt=>tt.withMutations(nt=>{const rt=_e.get("default");nt.set("group_id",et.status.getIn(["group","id"])),nt.set("in_reply_to",et.status.get("id")),nt.set("to",et.explicitAddressing?statusToMentionsArray(et.status,et.account):OrderedSet()),nt.set("text",et.explicitAddressing?"":statusToTextMentions(et.status,et.account)),nt.set("privacy",privacyPreference(et.status.visibility,rt.privacy)),nt.set("focusDate",new Date),nt.set("caretPosition",null),nt.set("idempotencyKey",v4()),nt.set("content_type",rt.content_type),et.preserveSpoilers&&et.status.spoiler_text&&(nt.set("spoiler",!0),nt.set("sensitive",!0),nt.set("spoiler_text",et.status.spoiler_text))}));case COMPOSE_EVENT_REPLY:return updateCompose(_e,et.id,tt=>tt.withMutations(nt=>{nt.set("in_reply_to",et.status.get("id")),nt.set("to",statusToMentionsArray(et.status,et.account)),nt.set("idempotencyKey",v4())}));case COMPOSE_QUOTE:return updateCompose(_e,"compose-modal",tt=>tt.withMutations(nt=>{var it,ot;const rt=et.status.getIn(["account","acct"]),at=_e.get("default");nt.set("quote",et.status.get("id")),nt.set("to",OrderedSet([rt])),nt.set("text",""),nt.set("privacy",privacyPreference(et.status.visibility,at.privacy)),nt.set("focusDate",new Date),nt.set("caretPosition",null),nt.set("idempotencyKey",v4()),nt.set("content_type",at.content_type),nt.set("spoiler",!1),nt.set("spoiler_text",""),et.status.visibility==="group"&&(((it=et.status.group)==null?void 0:it.group_visibility)==="everyone"?nt.set("privacy",privacyPreference("public",at.privacy)):((ot=et.status.group)==null?void 0:ot.group_visibility)==="members_only"&&(nt.set("group_id",et.status.getIn(["group","id"])),nt.set("privacy","group")))}));case COMPOSE_SUBMIT_REQUEST:return updateCompose(_e,et.id,tt=>tt.set("is_submitting",!0));case COMPOSE_UPLOAD_CHANGE_REQUEST:return updateCompose(_e,et.id,tt=>tt.set("is_changing_upload",!0));case COMPOSE_REPLY_CANCEL:case COMPOSE_QUOTE_CANCEL:case COMPOSE_RESET:case COMPOSE_SUBMIT_SUCCESS:return updateCompose(_e,et.id,()=>_e.get("default").withMutations(tt=>{tt.set("idempotencyKey",v4()),tt.set("in_reply_to",et.id.startsWith("reply:")?et.id.slice(6):null),et.id.startsWith("group:")&&(tt.set("privacy","group"),tt.set("group_id",et.id.slice(6)))}));case COMPOSE_SUBMIT_FAIL:return updateCompose(_e,et.id,tt=>tt.set("is_submitting",!1));case COMPOSE_UPLOAD_CHANGE_FAIL:return updateCompose(_e,et.composeId,tt=>tt.set("is_changing_upload",!1));case COMPOSE_UPLOAD_REQUEST:return updateCompose(_e,et.id,tt=>tt.set("is_uploading",!0));case COMPOSE_UPLOAD_SUCCESS:return updateCompose(_e,et.id,tt=>appendMedia(tt,fromJS(et.media),_e.get("default").sensitive));case COMPOSE_UPLOAD_FAIL:return updateCompose(_e,et.id,tt=>tt.set("is_uploading",!1));case COMPOSE_UPLOAD_UNDO:return updateCompose(_e,et.id,tt=>removeMedia(tt,et.media_id));case COMPOSE_UPLOAD_PROGRESS:return updateCompose(_e,et.id,tt=>tt.set("progress",Math.round(et.loaded/et.total*100)));case COMPOSE_MENTION:return updateCompose(_e,"compose-modal",tt=>tt.withMutations(nt=>{nt.update("text",rt=>[rt.trim(),`@${et.account.acct} `].filter(at=>at.length!==0).join(" ")),nt.set("focusDate",new Date),nt.set("caretPosition",null),nt.set("idempotencyKey",v4())}));case COMPOSE_DIRECT:return updateCompose(_e,"compose-modal",tt=>tt.withMutations(nt=>{nt.update("text",rt=>[rt.trim(),`@${et.account.acct} `].filter(at=>at.length!==0).join(" ")),nt.set("privacy","direct"),nt.set("focusDate",new Date),nt.set("caretPosition",null),nt.set("idempotencyKey",v4())}));case COMPOSE_GROUP_POST:return updateCompose(_e,et.id,tt=>tt.withMutations(nt=>{nt.set("privacy","group"),nt.set("group_id",et.group_id),nt.set("focusDate",new Date),nt.set("caretPosition",null),nt.set("idempotencyKey",v4())}));case COMPOSE_SUGGESTIONS_CLEAR:return updateCompose(_e,et.id,tt=>tt.update("suggestions",nt=>nt==null?void 0:nt.clear()).set("suggestion_token",null));case COMPOSE_SUGGESTIONS_READY:return updateCompose(_e,et.id,tt=>tt.set("suggestions",List$1(et.accounts?et.accounts.map(nt=>nt.id):et.emojis)).set("suggestion_token",et.token));case COMPOSE_SUGGESTION_SELECT:return updateCompose(_e,et.id,tt=>insertSuggestion(tt,et.position,et.token,et.completion,et.path));case COMPOSE_SUGGESTION_TAGS_UPDATE:return updateCompose(_e,et.id,tt=>updateSuggestionTags(tt,et.token,et.currentTrends));case COMPOSE_TAG_HISTORY_UPDATE:return updateCompose(_e,et.id,tt=>tt.set("tagHistory",List$1(fromJS(et.tags))));case TIMELINE_DELETE:return updateCompose(_e,"compose-modal",tt=>et.id===tt.in_reply_to?tt.set("in_reply_to",null):et.id===tt.quote?tt.set("quote",null):tt);case COMPOSE_EMOJI_INSERT:return updateCompose(_e,et.id,tt=>insertEmoji(tt,et.position,et.emoji,et.needsSpace));case COMPOSE_UPLOAD_CHANGE_SUCCESS:return updateCompose(_e,et.id,tt=>tt.set("is_changing_upload",!1).update("media_attachments",nt=>nt.map(rt=>rt.id===et.media.id?normalizeAttachment(et.media):rt)));case COMPOSE_SET_STATUS:return updateCompose(_e,"compose-modal",tt=>tt.withMutations(nt=>{var at;et.withRedraft||nt.set("id",et.status.id),nt.set("text",et.rawText||unescapeHTML(expandMentions(et.status))),nt.set("to",et.explicitAddressing?getExplicitMentions(et.status.account.id,et.status):OrderedSet()),nt.set("in_reply_to",et.status.get("in_reply_to_id")),nt.set("privacy",et.status.get("visibility")),nt.set("focusDate",new Date),nt.set("caretPosition",null),nt.set("idempotencyKey",v4()),nt.set("content_type",et.contentType||"text/plain"),nt.set("quote",et.status.getIn(["quote","id"])),nt.set("group_id",et.status.getIn(["group","id"]));const rt=(at=et.v)==null?void 0:at.software;(rt===PLEROMA||rt===AKKOMA)&&et.withRedraft&&hasIntegerMediaIds(et.status.toJS())?nt.set("media_attachments",List$1()):nt.set("media_attachments",et.status.media_attachments),et.status.get("spoiler_text").length>0?(nt.set("spoiler",!0),nt.set("spoiler_text",et.status.get("spoiler_text"))):(nt.set("spoiler",!1),nt.set("spoiler_text","")),et.status.poll&&typeof et.status.poll=="object"&&nt.set("poll",PollRecord({options:List$1(et.status.poll.options.map(({title:it})=>it)),multiple:et.status.poll.multiple,expires_in:24*3600}))}));case COMPOSE_POLL_ADD:return updateCompose(_e,et.id,tt=>tt.set("poll",PollRecord()));case COMPOSE_POLL_REMOVE:return updateCompose(_e,et.id,tt=>tt.set("poll",null));case COMPOSE_SCHEDULE_ADD:return updateCompose(_e,et.id,tt=>tt.set("schedule",new Date(Date.now()+10*60*1e3)));case COMPOSE_SCHEDULE_SET:return updateCompose(_e,et.id,tt=>tt.set("schedule",et.date));case COMPOSE_SCHEDULE_REMOVE:return updateCompose(_e,et.id,tt=>tt.set("schedule",null));case COMPOSE_POLL_OPTION_ADD:return updateCompose(_e,et.id,tt=>tt.updateIn(["poll","options"],nt=>nt.push(et.title)));case COMPOSE_POLL_OPTION_CHANGE:return updateCompose(_e,et.id,tt=>tt.setIn(["poll","options",et.index],et.title));case COMPOSE_POLL_OPTION_REMOVE:return updateCompose(_e,et.id,tt=>tt.updateIn(["poll","options"],nt=>nt.delete(et.index)));case COMPOSE_POLL_SETTINGS_CHANGE:return updateCompose(_e,et.id,tt=>tt.update("poll",nt=>nt?nt.withMutations(rt=>{et.expiresIn!==void 0&&rt.set("expires_in",et.expiresIn),typeof et.isMultiple=="boolean"&&rt.set("multiple",et.isMultiple)}):null));case COMPOSE_ADD_TO_MENTIONS:return updateCompose(_e,et.id,tt=>tt.update("to",nt=>nt.add(et.account)));case COMPOSE_REMOVE_FROM_MENTIONS:return updateCompose(_e,et.id,tt=>tt.update("to",nt=>nt.delete(et.account)));case COMPOSE_SET_GROUP_TIMELINE_VISIBLE:return updateCompose(_e,et.id,tt=>tt.set("group_timeline_visible",et.groupTimelineVisible));case ME_FETCH_SUCCESS:case ME_PATCH_SUCCESS:return updateCompose(_e,"default",tt=>importAccount$1(tt,et.me));case SETTING_CHANGE:return updateCompose(_e,"default",tt=>updateSetting(tt,et.path,et.value));default:return _e}}var ReplyMentions=function _e(et){var tt=et.composeId,nt=useAppDispatch(),rt=useFeatures(),at=useCompose(tt),it=reactExports.useCallback(makeGetStatus(),[]),ot=useAppSelector(function(mt){return it(mt,{id:at.in_reply_to})}),st=at.to,ct=useOwnAccount(),ut=ct.account;if(!rt.explicitAddressing||!ot||!st)return null;var dt=ot&&statusToMentionsAccountIdsArray(ot,ut),ft=function(ht){ht.preventDefault(),nt(openModal("REPLY_MENTIONS",{composeId:tt}))};if(!dt||dt.size===0)return null;if(st.size===0)return _createRawReactElement("a",{href:"#",className:"reply-mentions",onClick:ft},void 0,_createRawReactElement(FormattedMessage$1,{id:"reply_mentions.reply_empty",defaultMessage:"Replying to post"}));var pt=st.slice(0,2).map(function(mt){var ht=mt.split("@")[0];return _createRawReactElement("span",{className:"reply-mentions__account"},void 0,"@",isPubkey(ht)?ht.slice(0,8):ht)}).toArray();return st.size>2&&pt.push(_createRawReactElement(FormattedMessage$1,{id:"reply_mentions.more",defaultMessage:"{count} more",values:{count:st.size-2}})),_createRawReactElement("a",{href:"#",className:"reply-mentions",onClick:ft},void 0,_createRawReactElement(FormattedMessage$1,{id:"reply_mentions.reply",defaultMessage:"Replying to {accounts}",values:{accounts:_createRawReactElement(FormattedList,{type:"conjunction",value:pt})}}))};const vitePluginRequire_1697861833511_46927792="/packs/assets/calendar-stats-e1a296c8.svg";var messages$e={add_schedule:{id:"schedule_button.add_schedule",defaultMessage:"Schedule post for later"},remove_schedule:{id:"schedule_button.remove_schedule",defaultMessage:"Post immediately"}},ScheduleButton=function _e(et){var tt=et.composeId,nt=et.disabled,rt=useIntl(),at=useAppDispatch(),it=useCompose(tt),ot=!!it.schedule,st=!!it.id,ct=function(){at(ot?removeSchedule(tt):addSchedule(tt))};return st?null:_createRawReactElement(ComposeFormButton,{icon:vitePluginRequire_1697861833511_46927792,title:rt.formatMessage(ot?messages$e.remove_schedule:messages$e.add_schedule),active:ot,disabled:nt,onClick:ct})},messages$d={marked:{id:"compose_form.spoiler.marked",defaultMessage:"Text is hidden behind warning"},unmarked:{id:"compose_form.spoiler.unmarked",defaultMessage:"Text is not hidden"}},SpoilerButton=function _e(et){var tt=et.composeId,nt=useIntl(),rt=useAppDispatch(),at=useCompose(tt).spoiler,it=function(){return rt(changeComposeSpoilerness(tt))};return _createRawReactElement(ComposeFormButton,{icon:vitePluginRequire_1697861810834_37299420,title:nt.formatMessage(at?messages$d.marked:messages$d.unmarked),active:at,onClick:it})},messages$c={title:{id:"compose_form.spoiler_title",defaultMessage:"Sensitive content"},placeholder:{id:"compose_form.spoiler_placeholder",defaultMessage:"Write your warning here (optional)"},remove:{id:"compose_form.spoiler_remove",defaultMessage:"Remove sensitive"}},SpoilerInput=React$3.forwardRef(function(_e,et){var tt=_e.composeId,nt=_e.onSuggestionsFetchRequested,rt=_e.onSuggestionsClearRequested,at=_e.onSuggestionSelected,it=useIntl(),ot=useAppDispatch(),st=useCompose(tt),ct=function(ft){ot(changeComposeSpoilerText(tt,ft.target.value))},ut=function(){ot(changeComposeSpoilerness(tt))};return _createRawReactElement(Stack,{space:4,className:clsx({"relative transition-height":!0,hidden:!st.spoiler})},void 0,_createRawReactElement(Divider,{}),_createRawReactElement(Stack,{space:2},void 0,_createRawReactElement(Text$2,{weight:"medium"},void 0,it.formatMessage(messages$c.title)),React$3.createElement(AutosuggestInput,{placeholder:it.formatMessage(messages$c.placeholder),value:st.spoiler_text,onChange:ct,disabled:!st.spoiler,suggestions:st.suggestions,onSuggestionsFetchRequested:nt,onSuggestionsClearRequested:rt,onSuggestionSelected:at,searchTokens:[":"],id:"cw-spoiler-input",className:"rounded-md !bg-transparent dark:!bg-transparent",ref:et,autoFocus:!0}),_createRawReactElement("div",{className:"text-center"},void 0,_createRawReactElement("button",{type:"button",className:"text-danger-500",onClick:ut},void 0,it.formatMessage(messages$c.remove)))))}),TextCharacterCounter=function _e(et){var tt=et.text,nt=et.max,rt=function(ot){return _createRawReactElement("span",{className:clsx("text-sm font-medium",{"text-gray-700":ot>=0,"text-secondary-600":ot<0})},void 0,ot)},at=nt-length_1(tt);return rt(at)};const vitePluginRequire_1697861822231_6688464="/packs/assets/presentation-254e2011.svg",vitePluginRequire_1697861822222_93769141="/packs/assets/file-zip-7e7bdaf1.svg",vitePluginRequire_1697861822222_64091980="/packs/assets/file-spreadsheet-10ae293a.svg",vitePluginRequire_1697861822222_80225511="/packs/assets/file-code-371dc68b.svg",vitePluginRequire_1697861822222_98606960="/packs/assets/book-05eef4ba.svg";var bookIcon=vitePluginRequire_1697861822222_98606960,fileCodeIcon=vitePluginRequire_1697861822222_80225511,fileSpreadsheetIcon=vitePluginRequire_1697861822222_64091980,fileTextIcon=vitePluginRequire_1697861822222_12070999,fileZipIcon=vitePluginRequire_1697861822222_93769141,defaultIcon=vitePluginRequire_1697861837850_7280158,presentationIcon=vitePluginRequire_1697861822231_6688464,MIMETYPE_ICONS={"application/x-freearc":fileZipIcon,"application/x-bzip":fileZipIcon,"application/x-bzip2":fileZipIcon,"application/gzip":fileZipIcon,"application/vnd.rar":fileZipIcon,"application/x-tar":fileZipIcon,"application/zip":fileZipIcon,"application/x-7z-compressed":fileZipIcon,"application/x-csh":fileCodeIcon,"application/html":fileCodeIcon,"text/javascript":fileCodeIcon,"application/json":fileCodeIcon,"application/ld+json":fileCodeIcon,"application/x-httpd-php":fileCodeIcon,"application/x-sh":fileCodeIcon,"application/xhtml+xml":fileCodeIcon,"application/xml":fileCodeIcon,"application/epub+zip":bookIcon,"application/vnd.oasis.opendocument.spreadsheet":fileSpreadsheetIcon,"application/vnd.ms-excel":fileSpreadsheetIcon,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":fileSpreadsheetIcon,"application/pdf":fileTextIcon,"application/vnd.oasis.opendocument.presentation":presentationIcon,"application/vnd.ms-powerpoint":presentationIcon,"application/vnd.openxmlformats-officedocument.presentationml.presentation":presentationIcon,"text/plain":fileTextIcon,"application/rtf":fileTextIcon,"application/msword":fileTextIcon,"application/x-abiword":fileTextIcon,"application/vnd.openxmlformats-officedocument.wordprocessingml.document":fileTextIcon,"application/vnd.oasis.opendocument.text":fileTextIcon},messages$b={description:{id:"upload_form.description",defaultMessage:"Describe for the visually impaired"},delete:{id:"upload_form.undo",defaultMessage:"Delete"}},Upload=function _e(et){var tt=et.media,nt=et.onSubmit,rt=et.onDelete,at=et.onDescriptionChange,it=et.descriptionLimit,ot=et.withPreview,st=ot===void 0?!0:ot,ct=useIntl(),ut=useAppDispatch(),dt=reactExports.useState(!1),ft=_slicedToArray$4(dt,2),pt=ft[0],mt=ft[1],ht=reactExports.useState(!1),Et=_slicedToArray$4(ht,2),yt=Et[0],vt=Et[1],gt=reactExports.useState(null),St=_slicedToArray$4(gt,2),Rt=St[0],$t=St[1],bt=function(Yt){nt&&Yt.keyCode===13&&(Yt.ctrlKey||Yt.metaKey)&&(kt(),nt())},wt=function(Yt){rt&&(Yt.stopPropagation(),rt())},xt=function(Yt){$t(Yt.target.value)},Tt=function(){mt(!0)},Ct=function(){mt(!1)},Nt=function(){vt(!0)},At=function(){vt(!0)},kt=function(){vt(!1),$t(null),Rt!==null&&at&&at(Rt)},Pt=function(){ut(openModal("MEDIA",{media:List$1.of(tt),index:0}))},Ft=pt||yt,Dt=Rt||Rt!==""&&tt.description||"",Lt=tt.meta.getIn(["focus","x"]),It=tt.meta.getIn(["focus","y"]),Ot=Lt?(Lt/2+.5)*100:void 0,Ut=It?(It/-2+.5)*100:void 0,jt=tt.type,zt=tt.pleroma.get("mime_type"),Qt=jt==="unknown"&&_createRawReactElement(Icon,{className:"mx-auto my-12 h-16 w-16 text-gray-800 dark:text-gray-200",src:MIMETYPE_ICONS[zt||""]||defaultIcon});return _createRawReactElement("div",{className:"compose-form__upload",tabIndex:0,onMouseEnter:Tt,onMouseLeave:Ct,onClick:At,role:"button"},void 0,_createRawReactElement(Blurhash$1,{hash:tt.blurhash,className:"media-gallery__preview"}),_createRawReactElement(OptionalMotion,{defaultStyle:{scale:.8},style:{scale:spring(1,{stiffness:180,damping:12})}},void 0,function(Xt){var Yt=Xt.scale;return _createRawReactElement("div",{className:clsx("compose-form__upload-thumbnail",jt),style:{transform:"scale(".concat(Yt,")"),backgroundImage:jt==="image"?"url(".concat(tt.preview_url,")"):void 0,backgroundPosition:typeof Ot=="number"&&typeof Ut=="number"?"".concat(Ot,"% ").concat(Ut,"%"):void 0}},void 0,_createRawReactElement("div",{className:clsx("compose-form__upload__actions",{active:Ft})},void 0,rt&&_createRawReactElement(IconButton,{onClick:wt,src:vitePluginRequire_1697861811668_44144977,text:_createRawReactElement(FormattedMessage$1,{id:"upload_form.undo",defaultMessage:"Delete"})}),st&&jt!=="unknown"&&!!tt.url&&_createRawReactElement(IconButton,{onClick:Pt,src:vitePluginRequire_1697861822232_37680774,text:_createRawReactElement(FormattedMessage$1,{id:"upload_form.preview",defaultMessage:"Preview"})})),at&&_createRawReactElement("div",{className:clsx("compose-form__upload-description",{active:Ft})},void 0,_createRawReactElement("label",{},void 0,_createRawReactElement("span",{style:{display:"none"}},void 0,ct.formatMessage(messages$b.description)),_createRawReactElement("textarea",{placeholder:ct.formatMessage(messages$b.description),value:Dt,maxLength:it,onFocus:Nt,onChange:xt,onBlur:kt,onKeyDown:bt}))),_createRawReactElement("div",{className:"compose-form__upload-preview"},void 0,jt==="video"&&_createRawReactElement("video",{autoPlay:!0,playsInline:!0,muted:!0,loop:!0},void 0,_createRawReactElement("source",{src:tt.preview_url})),Qt))}))},UploadCompose=function _e(et){var tt=et.composeId,nt=et.id,rt=useHistory(),at=useAppDispatch(),it=useInstance(),ot=it.description_limit,st=useCompose(tt).media_attachments.find(function(ft){return ft.id===nt}),ct=function(){at(submitCompose(tt,rt))},ut=function(pt){at(changeUploadCompose(tt,st.id,{description:pt}))},dt=function(){at(undoUploadCompose(tt,st.id))};return _createRawReactElement(Upload,{media:st,onDelete:dt,onDescriptionChange:ut,onSubmit:ct,descriptionLimit:ot,withPreview:!0})};const vitePluginRequire_1697861835977_26085262="/packs/assets/cloud-upload-57a6637e.svg";var UploadProgress=function _e(et){var tt=et.progress;return _createRawReactElement(HStack,{alignItems:"center",space:2},void 0,_createRawReactElement(Icon$1,{src:vitePluginRequire_1697861835977_26085262,className:"h-7 w-7 text-gray-500"}),_createRawReactElement(Stack,{space:1},void 0,_createRawReactElement(Text$2,{theme:"muted"},void 0,_createRawReactElement(FormattedMessage$1,{id:"upload_progress.label",defaultMessage:"Uploading…"})),_createRawReactElement(ProgressBar,{progress:tt/100,size:"sm"})))},ComposeUploadProgress=function _e(et){var tt=et.composeId,nt=useCompose(tt),rt=nt.is_uploading,at=nt.progress;return rt?_createRawReactElement(UploadProgress,{progress:at}):null},UploadForm=function _e(et){var tt=et.composeId,nt=useCompose(tt).media_attachments.map(function(at){return at.id}),rt=clsx("compose-form__uploads-wrapper",{"contains-media":nt.size!==0});return _createRawReactElement("div",{className:"compose-form__upload-wrapper"},void 0,_createRawReactElement(ComposeUploadProgress,{composeId:tt}),_createRawReactElement("div",{className:rt},void 0,nt.map(function(at){return _createRawReactElement(UploadCompose,{id:at,composeId:tt},at)})))},ProgressCircle=function _e(et){var tt=et.progress,nt=et.radius,rt=nt===void 0?12:nt,at=et.stroke,it=at===void 0?4:at,ot=et.title,st=it+.5,ct=rt+st,ut=2*Math.PI*rt,dt=ut*(1-Math.min(tt,1));return _createRawReactElement("div",{title:ot},void 0,_createRawReactElement("svg",{width:ct*2,height:ct*2,viewBox:"0 0 ".concat(ct*2," ").concat(ct*2)},void 0,_createRawReactElement("circle",{className:"stroke-gray-500 dark:stroke-white/20",cx:ct,cy:ct,r:rt,fill:"none",strokeWidth:it}),_createRawReactElement("circle",{className:clsx("stroke-primary-500",{"stroke-secondary-500":tt>1}),style:{strokeDashoffset:dt,strokeDasharray:ut},cx:ct,cy:ct,r:rt,fill:"none",strokeWidth:st,strokeLinecap:"round"})))},messages$a={title:{id:"compose.character_counter.title",defaultMessage:"Used {chars} out of {maxChars} {maxChars, plural, one {character} other {characters}}"}},VisualCharacterCounter=function _e(et){var tt=et.text,nt=et.max,rt=useIntl(),at=length_1(tt),it=at/nt;return _createRawReactElement(ProgressCircle,{title:rt.formatMessage(messages$a.title,{chars:at,maxChars:nt}),progress:it,radius:10,stroke:3})};function _createForOfIteratorHelper(_e,et){var tt=typeof Symbol<"u"&&_e[Symbol.iterator]||_e["@@iterator"];if(!tt){if(Array.isArray(_e)||(tt=_unsupportedIterableToArray(_e))||et&&_e&&typeof _e.length=="number"){tt&&(_e=tt);var nt=0,rt=function(){};return{s:rt,n:function(){return nt>=_e.length?{done:!0}:{done:!1,value:_e[nt++]}},e:function(ct){throw ct},f:rt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +*/(function(_e){(function(){var et={}.hasOwnProperty;function tt(){for(var nt=[],rt=0;rtRt?Rt-bt:0}function pt(ht,Et,yt,vt){var gt=dt(yt),St=gt.width,Rt=ht-vt,$t=ht+vt+Et;return Rt<0?-Rt:$t>St?St-$t:0}function mt(ht,Et,yt,vt,gt){var St=vt.tagName==="BODY"?(0,nt.default)(yt):(0,at.default)(yt,vt),Rt=(0,nt.default)(Et),$t=Rt.height,bt=Rt.width,wt=void 0,xt=void 0,Tt=void 0,Ct=void 0;if(ht==="left"||ht==="right"){xt=St.top+(St.height-$t)/2,ht==="left"?wt=St.left-bt:wt=St.left+St.width;var Nt=ft(xt,$t,vt,gt);xt+=Nt,Ct=50*(1-2*Nt/$t)+"%",Tt=void 0}else if(ht==="top"||ht==="bottom"){wt=St.left+(St.width-bt)/2,ht==="top"?xt=St.top-$t:xt=St.top+St.height;var At=pt(wt,bt,vt,gt);wt+=At,Tt=50*(1-2*At/bt)+"%",Ct=void 0}else throw new Error('calcOverlayPosition(): No such placement of "'+ht+'" found.');return{positionLeft:wt,positionTop:xt,arrowOffsetLeft:Tt,arrowOffsetTop:Ct}}_e.exports=et.default})(calculatePosition,calculatePosition.exports);var calculatePositionExports=calculatePosition.exports;(function(_e,et){et.__esModule=!0;var tt=Object.assign||function(xt){for(var Tt=1;Tt=0||Object.prototype.hasOwnProperty.call(xt,Nt)&&(Ct[Nt]=xt[Nt]);return Ct}function Rt(xt,Tt){if(!(xt instanceof Tt))throw new TypeError("Cannot call a class as a function")}function $t(xt,Tt){if(!xt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Tt&&(typeof Tt=="object"||typeof Tt=="function")?Tt:xt}function bt(xt,Tt){if(typeof Tt!="function"&&Tt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Tt);xt.prototype=Object.create(Tt&&Tt.prototype,{constructor:{value:xt,enumerable:!1,writable:!0,configurable:!0}}),Tt&&(Object.setPrototypeOf?Object.setPrototypeOf(xt,Tt):xt.__proto__=Tt)}var wt=function(xt){bt(Tt,xt);function Tt(Ct,Nt){Rt(this,Tt);var At=$t(this,xt.call(this,Ct,Nt));return At.getTarget=function(){var kt=At.props.target,Pt=typeof kt=="function"?kt():kt;return Pt&&ft.default.findDOMNode(Pt)||null},At.maybeUpdatePosition=function(kt){var Pt=At.getTarget();!At.props.shouldUpdatePosition&&Pt===At._lastTarget&&!kt||At.updatePosition(Pt)},At.state={positionLeft:0,positionTop:0,arrowOffsetLeft:null,arrowOffsetTop:null},At._needsFlush=!1,At._lastTarget=null,At}return Tt.prototype.componentDidMount=function(){this.updatePosition(this.getTarget())},Tt.prototype.UNSAFE_componentWillReceiveProps=function(){this._needsFlush=!0},Tt.prototype.componentDidUpdate=function(Nt){this._needsFlush&&(this._needsFlush=!1,this.maybeUpdatePosition(this.props.placement!==Nt.placement))},Tt.prototype.render=function(){var Nt=this.props,At=Nt.children,kt=Nt.className,Pt=St(Nt,["children","className"]),Ft=this.state,Dt=Ft.positionLeft,Lt=Ft.positionTop,It=St(Ft,["positionLeft","positionTop"]);delete Pt.target,delete Pt.container,delete Pt.containerPadding,delete Pt.shouldUpdatePosition;var Ot=ut.default.Children.only(At);return(0,ct.cloneElement)(Ot,tt({},Pt,It,{positionLeft:Dt,positionTop:Lt,className:(0,rt.default)(kt,Ot.props.className),style:tt({},Ot.props.style,{left:Dt,top:Lt})}))},Tt.prototype.updatePosition=function(Nt){if(this._lastTarget=Nt,!Nt){this.setState({positionLeft:0,positionTop:0,arrowOffsetLeft:null,arrowOffsetTop:null});return}var At=ft.default.findDOMNode(this),kt=(0,Et.default)(this.props.container,(0,vt.default)(this).body);this.setState((0,mt.default)(this.props.placement,At,Nt,kt,this.props.containerPadding))},Tt}(ut.default.Component);wt.propTypes={target:it.default.oneOfType([st.default,it.default.func]),container:it.default.oneOfType([st.default,it.default.func]),containerPadding:it.default.number,placement:it.default.oneOf(["top","right","bottom","left"]),shouldUpdatePosition:it.default.bool},wt.displayName="Position",wt.defaultProps={containerPadding:0,placement:"right",shouldUpdatePosition:!1},et.default=wt,_e.exports=et.default})(Position,Position.exports);var PositionExports=Position.exports,RootCloseWrapper={exports:{}},addEventListener={exports:{}};(function(_e,et){et.__esModule=!0,et.default=function(ot,st,ct,ut){return(0,nt.default)(ot,st,ct,ut),{remove:function(){(0,at.default)(ot,st,ct,ut)}}};var tt=onExports,nt=it(tt),rt=offExports,at=it(rt);function it(ot){return ot&&ot.__esModule?ot:{default:ot}}_e.exports=et.default})(addEventListener,addEventListener.exports);var addEventListenerExports=addEventListener.exports;(function(_e,et){et.__esModule=!0;var tt=containsExports,nt=mt(tt),rt=propTypesExports,at=mt(rt),it=reactExports,ot=mt(it),st=reactDomExports,ct=mt(st),ut=addEventListenerExports,dt=mt(ut),ft=ownerDocumentExports,pt=mt(ft);function mt($t){return $t&&$t.__esModule?$t:{default:$t}}function ht($t,bt){if(!($t instanceof bt))throw new TypeError("Cannot call a class as a function")}function Et($t,bt){if(!$t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return bt&&(typeof bt=="object"||typeof bt=="function")?bt:$t}function yt($t,bt){if(typeof bt!="function"&&bt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof bt);$t.prototype=Object.create(bt&&bt.prototype,{constructor:{value:$t,enumerable:!1,writable:!0,configurable:!0}}),bt&&(Object.setPrototypeOf?Object.setPrototypeOf($t,bt):$t.__proto__=bt)}var vt=27;function gt($t){return $t.button===0}function St($t){return!!($t.metaKey||$t.altKey||$t.ctrlKey||$t.shiftKey)}var Rt=function($t){yt(bt,$t);function bt(wt,xt){ht(this,bt);var Tt=Et(this,$t.call(this,wt,xt));return Tt.addEventListeners=function(){Tt.currentEvent=window.event;var Ct=Tt.props.event,Nt=(0,pt.default)(Tt);Tt.documentMouseCaptureListener=(0,dt.default)(Nt,Ct,Tt.handleMouseCapture,!0),Tt.documentMouseListener=(0,dt.default)(Nt,Ct,Tt.handleMouse),Tt.documentKeyupListener=(0,dt.default)(Nt,"keyup",Tt.handleKeyUp)},Tt.removeEventListeners=function(){Tt.documentMouseCaptureListener&&Tt.documentMouseCaptureListener.remove(),Tt.documentMouseListener&&Tt.documentMouseListener.remove(),Tt.documentKeyupListener&&Tt.documentKeyupListener.remove()},Tt.handleMouseCapture=function(Ct){Tt.preventMouseRootClose=St(Ct)||!gt(Ct)||(0,nt.default)(ct.default.findDOMNode(Tt),Ct.target)},Tt.handleMouse=function(Ct){if(Ct===Tt.currentEvent){Tt.currentEvent=void 0;return}!Tt.preventMouseRootClose&&Tt.props.onRootClose&&Tt.props.onRootClose(Ct)},Tt.handleKeyUp=function(Ct){if(Ct===Tt.currentEvent){Tt.currentEvent=void 0;return}Ct.keyCode===vt&&Tt.props.onRootClose&&Tt.props.onRootClose(Ct)},Tt.preventMouseRootClose=!1,Tt}return bt.prototype.componentDidMount=function(){this.props.disabled||this.addEventListeners()},bt.prototype.componentDidUpdate=function(xt){!this.props.disabled&&xt.disabled?this.addEventListeners():this.props.disabled&&!xt.disabled&&this.removeEventListeners()},bt.prototype.componentWillUnmount=function(){this.props.disabled||this.removeEventListeners()},bt.prototype.render=function(){return this.props.children},bt}(ot.default.Component);Rt.displayName="RootCloseWrapper",Rt.propTypes={onRootClose:at.default.func,children:at.default.element,disabled:at.default.bool,event:at.default.oneOf(["click","mousedown"])},Rt.defaultProps={event:"click"},et.default=Rt,_e.exports=et.default})(RootCloseWrapper,RootCloseWrapper.exports);var RootCloseWrapperExports=RootCloseWrapper.exports;(function(_e,et){et.__esModule=!0;var tt=Object.assign||function(Rt){for(var $t=1;$t=0||Object.prototype.hasOwnProperty.call(Rt,wt)&&(bt[wt]=Rt[wt]);return bt}function yt(Rt,$t){if(!(Rt instanceof $t))throw new TypeError("Cannot call a class as a function")}function vt(Rt,$t){if(!Rt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return $t&&(typeof $t=="object"||typeof $t=="function")?$t:Rt}function gt(Rt,$t){if(typeof $t!="function"&&$t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof $t);Rt.prototype=Object.create($t&&$t.prototype,{constructor:{value:Rt,enumerable:!1,writable:!0,configurable:!0}}),$t&&(Object.setPrototypeOf?Object.setPrototypeOf(Rt,$t):Rt.__proto__=$t)}var St=function(Rt){gt($t,Rt);function $t(bt,wt){yt(this,$t);var xt=vt(this,Rt.call(this,bt,wt));return xt.handleHidden=function(){if(xt.setState({exited:!0}),xt.props.onExited){var Tt;(Tt=xt.props).onExited.apply(Tt,arguments)}},xt.state={exited:!bt.show},xt.onHiddenListener=xt.handleHidden.bind(xt),xt}return $t.prototype.UNSAFE_componentWillReceiveProps=function(wt){wt.show?this.setState({exited:!1}):wt.transition||this.setState({exited:!0})},$t.prototype.render=function(){var wt=this.props,xt=wt.container,Tt=wt.containerPadding,Ct=wt.target,Nt=wt.placement,At=wt.shouldUpdatePosition,kt=wt.rootClose,Pt=wt.children,Ft=wt.transition,Dt=Et(wt,["container","containerPadding","target","placement","shouldUpdatePosition","rootClose","children","transition"]),Lt=Dt.show||Ft&&!this.state.exited;if(!Lt)return null;var It=Pt;if(It=st.default.createElement(ft.default,{container:xt,containerPadding:Tt,target:Ct,placement:Nt,shouldUpdatePosition:At},It),Ft){var Ot=Dt.onExit,Ut=Dt.onExiting,jt=Dt.onEnter,zt=Dt.onEntering,Qt=Dt.onEntered;It=st.default.createElement(Ft,{in:Dt.show,appear:!0,onExit:Ot,onExiting:Ut,onExited:this.onHiddenListener,onEnter:jt,onEntering:zt,onEntered:Qt},It)}return kt&&(It=st.default.createElement(mt.default,{onRootClose:Dt.onHide,event:Dt.rootCloseEvent},It)),st.default.createElement(ut.default,{container:xt},It)},$t}(st.default.Component);St.propTypes=tt({},ut.default.propTypes,ft.default.propTypes,{show:rt.default.bool,rootClose:rt.default.bool,rootCloseEvent:mt.default.propTypes.event,onHide:function($t){var bt=rt.default.func;$t.rootClose&&(bt=bt.isRequired);for(var wt=arguments.length,xt=Array(wt>1?wt-1:0),Tt=1;Tt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var AutosuggestInput=function(_e){_inherits$1(tt,_e);var et=_createSuper(tt);function tt(){var nt;_classCallCheck$1(this,tt);for(var rt=arguments.length,at=new Array(rt),it=0;it0||ut)&&(ot.preventDefault(),nt.setState({selectedSuggestion:Math.min(pt+1,Et)}));break;case"ArrowUp":!mt&&(ct.size>0||ut)&&(ot.preventDefault(),nt.setState({selectedSuggestion:Math.max(pt-1,ht)}));break;case"Enter":case"Tab":if(!mt&&pt>-1&&(ct.size>0||ut)){if(ot.preventDefault(),ot.stopPropagation(),nt.setState({selectedSuggestion:ht}),pt0&&at.suggestionsHidden&&at.focused&&this.setState({suggestionsHidden:!1})}},{key:"componentWillUnmount",value:function(){this.input&&uninstall(this.input)}},{key:"setPortalPosition",value:function(){if(!this.input)return{};var rt=this.input.getBoundingClientRect(),at=rt.top,it=rt.height,ot=rt.left,st=rt.width;return{left:ot,width:st,top:at+it}}},{key:"render",value:function(){var rt=this.props,at=rt.value,it=rt.suggestions,ot=rt.disabled,st=rt.placeholder,ct=rt.onKeyUp,ut=rt.autoFocus,dt=rt.className,ft=rt.id,pt=rt.maxLength,mt=rt.menu,ht=rt.theme,Et=rt.hotkey;this.hotkey=Et;var yt=this.state.suggestionsHidden,vt={direction:"ltr"},gt=!yt&&(!it.isEmpty()||mt&&at);return(isRtl(at)||!at&&st&&isRtl(st))&&(vt.direction="rtl"),[_createRawReactElement("div",{className:"relative w-full"},"input",_createRawReactElement("label",{className:"sr-only"},void 0,st),React$3.createElement(Input,{type:"text",className:dt,outerClassName:"mt-0",ref:this.setInput,disabled:ot,placeholder:st,autoFocus:ut,value:at,onChange:this.onChange,onKeyDown:this.onKeyDown,onKeyUp:ct,onFocus:this.onFocus,onBlur:this.onBlur,style:vt,"aria-autocomplete":"list",id:ft,maxLength:pt,"data-testid":"autosuggest-input",theme:ht})),_createRawReactElement(Portal$1,{},"portal",_createRawReactElement("div",{style:this.setPortalPosition(),className:clsx({"fixed w-full z-[1001] shadow bg-white dark:bg-gray-900 rounded-lg py-1 dark:ring-2 dark:ring-primary-700 focus:outline-none":!0,hidden:!gt,block:gt})},void 0,_createRawReactElement("div",{className:"space-y-0.5"},void 0,it.map(this.renderSuggestion)),this.renderMenu()))]}}]),tt}(ImmutablePureComponent);_defineProperty$7(AutosuggestInput,"defaultProps",{autoFocus:!1,autoSelect:!0,searchTokens:List$1(["@",":","#"])});var messages$h={minutes:{id:"intervals.full.minutes",defaultMessage:"{number, plural, one {# minute} other {# minutes}}"},hours:{id:"intervals.full.hours",defaultMessage:"{number, plural, one {# hour} other {# hours}}"},days:{id:"intervals.full.days",defaultMessage:"{number, plural, one {# day} other {# days}}"}},DurationSelector=function _e(et){var tt=et.onDurationChange,nt=useIntl(),rt=reactExports.useState(2),at=_slicedToArray$4(rt,2),it=at[0],ot=at[1],st=reactExports.useState(0),ct=_slicedToArray$4(st,2),ut=ct[0],dt=ct[1],ft=reactExports.useState(0),pt=_slicedToArray$4(ft,2),mt=pt[0],ht=pt[1],Et=it*24*60*60+ut*60*60+mt*60;return reactExports.useEffect(function(){it===7&&(dt(0),ht(0))},[it]),reactExports.useEffect(function(){tt(Et)},[Et]),_createRawReactElement("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-3"},void 0,_createRawReactElement("div",{className:"sm:col-span-1"},void 0,_createRawReactElement(Select,{value:it,onChange:function(vt){return ot(Number(vt.target.value))},"data-testid":"duration-selector-days"},void 0,_toConsumableArray(Array(8).fill(void 0)).map(function(yt,vt){return _createRawReactElement("option",{value:vt},vt,nt.formatMessage(messages$h.days,{number:vt}))}))),_createRawReactElement("div",{className:"sm:col-span-1"},void 0,_createRawReactElement(Select,{value:ut,onChange:function(vt){return dt(Number(vt.target.value))},disabled:it===7,"data-testid":"duration-selector-hours"},void 0,_toConsumableArray(Array(24).fill(void 0)).map(function(yt,vt){return _createRawReactElement("option",{value:vt},vt,nt.formatMessage(messages$h.hours,{number:vt}))}))),_createRawReactElement("div",{className:"sm:col-span-1"},void 0,_createRawReactElement(Select,{value:mt,onChange:function(vt){return ht(Number(vt.target.value))},disabled:it===7,"data-testid":"duration-selector-minutes"},void 0,[0,15,30,45].map(function(yt){return _createRawReactElement("option",{value:yt},yt,nt.formatMessage(messages$h.minutes,{number:yt}))}))))},messages$g={option_placeholder:{id:"compose_form.poll.option_placeholder",defaultMessage:"Answer #{number}"},add_option:{id:"compose_form.poll.add_option",defaultMessage:"Add an answer"},pollDuration:{id:"compose_form.poll.duration",defaultMessage:"Duration"},pollExpiry:{id:"compose_form.poll.expiry",defaultMessage:"Poll expiry"},pollExpiryDetail:{id:"compose_form.poll.expiry_detail",defaultMessage:"Should the poll expires"},removePoll:{id:"compose_form.poll.remove",defaultMessage:"Remove poll"},switchToMultiple:{id:"compose_form.poll.switch_to_multiple",defaultMessage:"Change poll to allow multiple answers"},switchToSingle:{id:"compose_form.poll.switch_to_single",defaultMessage:"Change poll to allow for a single answer"},minutes:{id:"intervals.full.minutes",defaultMessage:"{number, plural, one {# minute} other {# minutes}}"},hours:{id:"intervals.full.hours",defaultMessage:"{number, plural, one {# hour} other {# hours}}"},days:{id:"intervals.full.days",defaultMessage:"{number, plural, one {# day} other {# days}}"},multiSelect:{id:"compose_form.poll.multiselect",defaultMessage:"Multi-Select"},multiSelectDetail:{id:"compose_form.poll.multiselect_detail",defaultMessage:"Allow users to select multiple answers"}},Option=function _e(et){var tt=et.composeId,nt=et.index,rt=et.maxChars,at=et.numOptions,it=et.onChange,ot=et.onRemove,st=et.onRemovePoll,ct=et.title,ut=useAppDispatch(),dt=useIntl(),ft=useCompose(tt).suggestions,pt=function(gt){return it(nt,gt.target.value)},mt=function(){at>2?ot(nt):st()},ht=function(){return ut(clearComposeSuggestions(tt))},Et=function(gt){return ut(fetchComposeSuggestions(tt,gt))},yt=function(gt,St,Rt){St&&typeof St=="string"&&ut(selectComposeSuggestion(tt,gt,St,Rt,["poll","options",nt]))};return _createRawReactElement(HStack,{alignItems:"center",justifyContent:"between",space:4},void 0,_createRawReactElement(HStack,{alignItems:"center",space:2,grow:!0},void 0,_createRawReactElement("div",{className:"w-6"},void 0,_createRawReactElement(Text$2,{weight:"bold"},void 0,nt+1,".")),_createRawReactElement(AutosuggestInput,{className:"rounded-md !bg-transparent dark:!bg-transparent",placeholder:dt.formatMessage(messages$g.option_placeholder,{number:nt+1}),maxLength:rt,value:ct,onChange:pt,suggestions:ft,onSuggestionsFetchRequested:Et,onSuggestionsClearRequested:ht,onSuggestionSelected:yt,searchTokens:[":"],autoFocus:nt===0||nt>=2})),nt>1&&_createRawReactElement("div",{},void 0,_createRawReactElement(Button,{theme:"danger",size:"sm",onClick:mt},void 0,_createRawReactElement(FormattedMessage$1,{id:"compose_form.poll.remove_option",defaultMessage:"Delete"}))))},PollForm=function _e(et){var tt,nt,rt,at=et.composeId,it=useFeatures(),ot=useAppDispatch(),st=useIntl(),ct=useInstance(),ut=ct.configuration,dt=useCompose(at),ft=ut.polls,pt=(tt=dt.poll)===null||tt===void 0?void 0:tt.options,mt=(nt=dt.poll)===null||nt===void 0?void 0:nt.expires_in,ht=(rt=dt.poll)===null||rt===void 0?void 0:rt.multiple,Et=reactExports.useState(mt),yt=_slicedToArray$4(Et,2),vt=yt[0],gt=yt[1],St=ft.max_options,Rt=ft.max_characters_per_option,$t=function(Pt){return ot(removePollOption(at,Pt))},bt=function(Pt,Ft){return ot(changePollOption(at,Pt,Ft))},wt=function(){return ot(addPollOption(at,""))},xt=function(Pt,Ft){typeof Pt=="number"&>(Pt),ot(changePollSettings(at,Pt,Ft))},Tt=function(Pt){return xt(Pt,ht)},Ct=function(){return xt(mt===null?vt:null,ht)},Nt=function(){return xt(mt??null,!ht)},At=function(){return ot(removePoll(at))};return pt?_createRawReactElement(Stack,{space:4},void 0,_createRawReactElement(Stack,{space:2},void 0,pt.map(function(kt,Pt){return _createRawReactElement(Option,{composeId:at,title:kt,index:Pt,onChange:bt,onRemove:$t,maxChars:Rt,numOptions:pt.size,onRemovePoll:At},Pt)}),_createRawReactElement(HStack,{space:2},void 0,_createRawReactElement("div",{className:"w-6"}),pt.sizeMath.floor(Math.random()*65536),PollRecord=Record({options:List$1(["",""]),expires_in:24*3600,multiple:!1}),ReducerCompose=Record({caretPosition:null,content_type:"text/plain",focusDate:null,group_id:null,idempotencyKey:"",id:null,in_reply_to:null,is_changing_upload:!1,is_composing:!1,is_submitting:!1,is_uploading:!1,media_attachments:List$1(),poll:null,privacy:"public",progress:0,quote:null,resetFileKey:null,schedule:null,sensitive:!1,spoiler:!1,spoiler_text:"",suggestions:List$1(),suggestion_token:null,tagHistory:List$1(),text:"",to:OrderedSet(),group_timeline_visible:!1}),statusToTextMentions=(_e,et)=>{var rt;const tt=_e.getIn(["account","acct"]),nt=((rt=_e.get("mentions"))==null?void 0:rt.map(at=>at.acct))||[];return OrderedSet([tt]).concat(nt).delete(et.acct).map(at=>`@${at} `).join("")},statusToMentionsArray=(_e,et)=>{var rt;const tt=_e.getIn(["account","acct"]),nt=((rt=_e.get("mentions"))==null?void 0:rt.map(at=>at.acct))||[];return OrderedSet([tt]).concat(nt).delete(et.acct)},statusToMentionsAccountIdsArray=(_e,et)=>{const tt=_e.mentions.map(nt=>nt.id);return OrderedSet([et.id]).concat(tt).delete(et.id)},appendMedia=(_e,et,tt)=>{const nt=_e.media_attachments.size;return _e.withMutations(rt=>{rt.update("media_attachments",at=>at.push(normalizeAttachment(et))),rt.set("is_uploading",!1),rt.set("resetFileKey",Math.floor(Math.random()*65536)),rt.set("idempotencyKey",v4()),nt===0&&(tt||_e.spoiler)&&rt.set("sensitive",!0)})},removeMedia=(_e,et)=>{const tt=_e.media_attachments.size;return _e.withMutations(nt=>{nt.update("media_attachments",rt=>rt.filterNot(at=>at.id===et)),nt.set("idempotencyKey",v4()),tt===1&&nt.set("sensitive",!1)})},insertSuggestion=(_e,et,tt,nt,rt)=>_e.withMutations(at=>{at.updateIn(rt,it=>`${it.slice(0,et)}${nt} ${it.slice(et+((tt==null?void 0:tt.length)??0))}`),at.set("suggestion_token",null),at.set("suggestions",List$1()),rt.length===1&&rt[0]==="text"&&(at.set("focusDate",new Date),at.set("caretPosition",et+nt.length+1)),at.set("idempotencyKey",v4())}),updateSuggestionTags=(_e,et,tt)=>{const nt=et.slice(1);return _e.merge({suggestions:List$1(tt.filter(rt=>rt.get("name").toLowerCase().startsWith(nt.toLowerCase())).slice(0,4).map(rt=>"#"+rt.name)),suggestion_token:et})},insertEmoji=(_e,et,tt,nt)=>{const rt=_e.text,at=isNativeEmoji(tt)?tt.native:tt.colons,it=nt?" "+at:at;return _e.merge({text:`${rt.slice(0,et)}${it} ${rt.slice(et)}`,focusDate:new Date,caretPosition:et+it.length+1,idempotencyKey:v4()})},privacyPreference=(_e,et)=>{const tt=["public","unlisted","private","direct"];return _e==="group"?_e:tt[Math.max(tt.indexOf(_e),tt.indexOf(et),0)]},domParser$1=new DOMParser,expandMentions=_e=>{const et=domParser$1.parseFromString(_e.get("content"),"text/html").documentElement;return _e.get("mentions").forEach(tt=>{const nt=et.querySelector(`a[href="${tt.get("url")}"]`);nt&&(nt.textContent=`@${tt.get("acct")}`)}),et.innerHTML},getExplicitMentions=(_e,et)=>{const tt=domParser$1.parseFromString(et.content,"text/html").documentElement,nt=et.get("mentions").filter(rt=>!(tt.querySelector(`a[href="${rt.url}"]`)||rt.id===_e)).map(rt=>rt.acct);return OrderedSet(nt)},getAccountSettings=_e=>_e.getIn(["pleroma","settings_store",FE_NAME],Map$3()),importAccount$1=(_e,et)=>{const tt=getAccountSettings(Map$3(fromJS(et))),nt=tt.get("defaultPrivacy"),rt=tt.get("defaultContentType");return _e.withMutations(at=>{nt&&at.set("privacy",nt),rt&&at.set("content_type",rt),at.set("tagHistory",List$1(tagHistory.get(et.id)))})},updateSetting=(_e,et,tt)=>{switch(et.join(",")){case"defaultPrivacy":return _e.set("privacy",tt);case"defaultContentType":return _e.set("content_type",tt);default:return _e}},updateCompose=(_e,et,tt)=>_e.update(et,_e.get("default"),tt),initialState$l=Map$3({default:ReducerCompose({idempotencyKey:v4(),resetFileKey:getResetFileKey()})});function compose(_e=initialState$l,et){switch(et.type){case COMPOSE_TYPE_CHANGE:return updateCompose(_e,et.id,tt=>tt.withMutations(nt=>{nt.set("content_type",et.value),nt.set("idempotencyKey",v4())}));case COMPOSE_SPOILERNESS_CHANGE:return updateCompose(_e,et.id,tt=>tt.withMutations(nt=>{nt.set("spoiler_text",""),nt.set("spoiler",!tt.spoiler),nt.set("sensitive",!tt.spoiler),nt.set("idempotencyKey",v4())}));case COMPOSE_SPOILER_TEXT_CHANGE:return updateCompose(_e,et.id,tt=>tt.set("spoiler_text",et.text).set("idempotencyKey",v4()));case COMPOSE_VISIBILITY_CHANGE:return updateCompose(_e,et.id,tt=>tt.set("privacy",et.value).set("idempotencyKey",v4()));case COMPOSE_CHANGE:return updateCompose(_e,et.id,tt=>tt.set("text",et.text).set("idempotencyKey",v4()));case COMPOSE_REPLY:return updateCompose(_e,et.id,tt=>tt.withMutations(nt=>{const rt=_e.get("default");nt.set("group_id",et.status.getIn(["group","id"])),nt.set("in_reply_to",et.status.get("id")),nt.set("to",et.explicitAddressing?statusToMentionsArray(et.status,et.account):OrderedSet()),nt.set("text",et.explicitAddressing?"":statusToTextMentions(et.status,et.account)),nt.set("privacy",privacyPreference(et.status.visibility,rt.privacy)),nt.set("focusDate",new Date),nt.set("caretPosition",null),nt.set("idempotencyKey",v4()),nt.set("content_type",rt.content_type),et.preserveSpoilers&&et.status.spoiler_text&&(nt.set("spoiler",!0),nt.set("sensitive",!0),nt.set("spoiler_text",et.status.spoiler_text))}));case COMPOSE_EVENT_REPLY:return updateCompose(_e,et.id,tt=>tt.withMutations(nt=>{nt.set("in_reply_to",et.status.get("id")),nt.set("to",statusToMentionsArray(et.status,et.account)),nt.set("idempotencyKey",v4())}));case COMPOSE_QUOTE:return updateCompose(_e,"compose-modal",tt=>tt.withMutations(nt=>{var it,ot;const rt=et.status.getIn(["account","acct"]),at=_e.get("default");nt.set("quote",et.status.get("id")),nt.set("to",OrderedSet([rt])),nt.set("text",""),nt.set("privacy",privacyPreference(et.status.visibility,at.privacy)),nt.set("focusDate",new Date),nt.set("caretPosition",null),nt.set("idempotencyKey",v4()),nt.set("content_type",at.content_type),nt.set("spoiler",!1),nt.set("spoiler_text",""),et.status.visibility==="group"&&(((it=et.status.group)==null?void 0:it.group_visibility)==="everyone"?nt.set("privacy",privacyPreference("public",at.privacy)):((ot=et.status.group)==null?void 0:ot.group_visibility)==="members_only"&&(nt.set("group_id",et.status.getIn(["group","id"])),nt.set("privacy","group")))}));case COMPOSE_SUBMIT_REQUEST:return updateCompose(_e,et.id,tt=>tt.set("is_submitting",!0));case COMPOSE_UPLOAD_CHANGE_REQUEST:return updateCompose(_e,et.id,tt=>tt.set("is_changing_upload",!0));case COMPOSE_REPLY_CANCEL:case COMPOSE_QUOTE_CANCEL:case COMPOSE_RESET:case COMPOSE_SUBMIT_SUCCESS:return updateCompose(_e,et.id,()=>_e.get("default").withMutations(tt=>{tt.set("idempotencyKey",v4()),tt.set("in_reply_to",et.id.startsWith("reply:")?et.id.slice(6):null),et.id.startsWith("group:")&&(tt.set("privacy","group"),tt.set("group_id",et.id.slice(6)))}));case COMPOSE_SUBMIT_FAIL:return updateCompose(_e,et.id,tt=>tt.set("is_submitting",!1));case COMPOSE_UPLOAD_CHANGE_FAIL:return updateCompose(_e,et.composeId,tt=>tt.set("is_changing_upload",!1));case COMPOSE_UPLOAD_REQUEST:return updateCompose(_e,et.id,tt=>tt.set("is_uploading",!0));case COMPOSE_UPLOAD_SUCCESS:return updateCompose(_e,et.id,tt=>appendMedia(tt,fromJS(et.media),_e.get("default").sensitive));case COMPOSE_UPLOAD_FAIL:return updateCompose(_e,et.id,tt=>tt.set("is_uploading",!1));case COMPOSE_UPLOAD_UNDO:return updateCompose(_e,et.id,tt=>removeMedia(tt,et.media_id));case COMPOSE_UPLOAD_PROGRESS:return updateCompose(_e,et.id,tt=>tt.set("progress",Math.round(et.loaded/et.total*100)));case COMPOSE_MENTION:return updateCompose(_e,"compose-modal",tt=>tt.withMutations(nt=>{nt.update("text",rt=>[rt.trim(),`@${et.account.acct} `].filter(at=>at.length!==0).join(" ")),nt.set("focusDate",new Date),nt.set("caretPosition",null),nt.set("idempotencyKey",v4())}));case COMPOSE_DIRECT:return updateCompose(_e,"compose-modal",tt=>tt.withMutations(nt=>{nt.update("text",rt=>[rt.trim(),`@${et.account.acct} `].filter(at=>at.length!==0).join(" ")),nt.set("privacy","direct"),nt.set("focusDate",new Date),nt.set("caretPosition",null),nt.set("idempotencyKey",v4())}));case COMPOSE_GROUP_POST:return updateCompose(_e,et.id,tt=>tt.withMutations(nt=>{nt.set("privacy","group"),nt.set("group_id",et.group_id),nt.set("focusDate",new Date),nt.set("caretPosition",null),nt.set("idempotencyKey",v4())}));case COMPOSE_SUGGESTIONS_CLEAR:return updateCompose(_e,et.id,tt=>tt.update("suggestions",nt=>nt==null?void 0:nt.clear()).set("suggestion_token",null));case COMPOSE_SUGGESTIONS_READY:return updateCompose(_e,et.id,tt=>tt.set("suggestions",List$1(et.accounts?et.accounts.map(nt=>nt.id):et.emojis)).set("suggestion_token",et.token));case COMPOSE_SUGGESTION_SELECT:return updateCompose(_e,et.id,tt=>insertSuggestion(tt,et.position,et.token,et.completion,et.path));case COMPOSE_SUGGESTION_TAGS_UPDATE:return updateCompose(_e,et.id,tt=>updateSuggestionTags(tt,et.token,et.currentTrends));case COMPOSE_TAG_HISTORY_UPDATE:return updateCompose(_e,et.id,tt=>tt.set("tagHistory",List$1(fromJS(et.tags))));case TIMELINE_DELETE:return updateCompose(_e,"compose-modal",tt=>et.id===tt.in_reply_to?tt.set("in_reply_to",null):et.id===tt.quote?tt.set("quote",null):tt);case COMPOSE_EMOJI_INSERT:return updateCompose(_e,et.id,tt=>insertEmoji(tt,et.position,et.emoji,et.needsSpace));case COMPOSE_UPLOAD_CHANGE_SUCCESS:return updateCompose(_e,et.id,tt=>tt.set("is_changing_upload",!1).update("media_attachments",nt=>nt.map(rt=>rt.id===et.media.id?normalizeAttachment(et.media):rt)));case COMPOSE_SET_STATUS:return updateCompose(_e,"compose-modal",tt=>tt.withMutations(nt=>{var at;et.withRedraft||nt.set("id",et.status.id),nt.set("text",et.rawText||unescapeHTML(expandMentions(et.status))),nt.set("to",et.explicitAddressing?getExplicitMentions(et.status.account.id,et.status):OrderedSet()),nt.set("in_reply_to",et.status.get("in_reply_to_id")),nt.set("privacy",et.status.get("visibility")),nt.set("focusDate",new Date),nt.set("caretPosition",null),nt.set("idempotencyKey",v4()),nt.set("content_type",et.contentType||"text/plain"),nt.set("quote",et.status.getIn(["quote","id"])),nt.set("group_id",et.status.getIn(["group","id"]));const rt=(at=et.v)==null?void 0:at.software;(rt===PLEROMA||rt===AKKOMA)&&et.withRedraft&&hasIntegerMediaIds(et.status.toJS())?nt.set("media_attachments",List$1()):nt.set("media_attachments",et.status.media_attachments),et.status.get("spoiler_text").length>0?(nt.set("spoiler",!0),nt.set("spoiler_text",et.status.get("spoiler_text"))):(nt.set("spoiler",!1),nt.set("spoiler_text","")),et.status.poll&&typeof et.status.poll=="object"&&nt.set("poll",PollRecord({options:List$1(et.status.poll.options.map(({title:it})=>it)),multiple:et.status.poll.multiple,expires_in:24*3600}))}));case COMPOSE_POLL_ADD:return updateCompose(_e,et.id,tt=>tt.set("poll",PollRecord()));case COMPOSE_POLL_REMOVE:return updateCompose(_e,et.id,tt=>tt.set("poll",null));case COMPOSE_SCHEDULE_ADD:return updateCompose(_e,et.id,tt=>tt.set("schedule",new Date(Date.now()+10*60*1e3)));case COMPOSE_SCHEDULE_SET:return updateCompose(_e,et.id,tt=>tt.set("schedule",et.date));case COMPOSE_SCHEDULE_REMOVE:return updateCompose(_e,et.id,tt=>tt.set("schedule",null));case COMPOSE_POLL_OPTION_ADD:return updateCompose(_e,et.id,tt=>tt.updateIn(["poll","options"],nt=>nt.push(et.title)));case COMPOSE_POLL_OPTION_CHANGE:return updateCompose(_e,et.id,tt=>tt.setIn(["poll","options",et.index],et.title));case COMPOSE_POLL_OPTION_REMOVE:return updateCompose(_e,et.id,tt=>tt.updateIn(["poll","options"],nt=>nt.delete(et.index)));case COMPOSE_POLL_SETTINGS_CHANGE:return updateCompose(_e,et.id,tt=>tt.update("poll",nt=>nt?nt.withMutations(rt=>{et.expiresIn!==void 0&&rt.set("expires_in",et.expiresIn),typeof et.isMultiple=="boolean"&&rt.set("multiple",et.isMultiple)}):null));case COMPOSE_ADD_TO_MENTIONS:return updateCompose(_e,et.id,tt=>tt.update("to",nt=>nt.add(et.account)));case COMPOSE_REMOVE_FROM_MENTIONS:return updateCompose(_e,et.id,tt=>tt.update("to",nt=>nt.delete(et.account)));case COMPOSE_SET_GROUP_TIMELINE_VISIBLE:return updateCompose(_e,et.id,tt=>tt.set("group_timeline_visible",et.groupTimelineVisible));case ME_FETCH_SUCCESS:case ME_PATCH_SUCCESS:return updateCompose(_e,"default",tt=>importAccount$1(tt,et.me));case SETTING_CHANGE:return updateCompose(_e,"default",tt=>updateSetting(tt,et.path,et.value));default:return _e}}var ReplyMentions=function _e(et){var tt=et.composeId,nt=useAppDispatch(),rt=useFeatures(),at=useCompose(tt),it=reactExports.useCallback(makeGetStatus(),[]),ot=useAppSelector(function(mt){return it(mt,{id:at.in_reply_to})}),st=at.to,ct=useOwnAccount(),ut=ct.account;if(!rt.explicitAddressing||!ot||!st)return null;var dt=ot&&statusToMentionsAccountIdsArray(ot,ut),ft=function(ht){ht.preventDefault(),nt(openModal("REPLY_MENTIONS",{composeId:tt}))};if(!dt||dt.size===0)return null;if(st.size===0)return _createRawReactElement("a",{href:"#",className:"reply-mentions",onClick:ft},void 0,_createRawReactElement(FormattedMessage$1,{id:"reply_mentions.reply_empty",defaultMessage:"Replying to post"}));var pt=st.slice(0,2).map(function(mt){var ht=mt.split("@")[0];return _createRawReactElement("span",{className:"reply-mentions__account"},void 0,"@",isPubkey(ht)?ht.slice(0,8):ht)}).toArray();return st.size>2&&pt.push(_createRawReactElement(FormattedMessage$1,{id:"reply_mentions.more",defaultMessage:"{count} more",values:{count:st.size-2}})),_createRawReactElement("a",{href:"#",className:"reply-mentions",onClick:ft},void 0,_createRawReactElement(FormattedMessage$1,{id:"reply_mentions.reply",defaultMessage:"Replying to {accounts}",values:{accounts:_createRawReactElement(FormattedList,{type:"conjunction",value:pt})}}))};const vitePluginRequire_1697864675942_3397664="/packs/assets/calendar-stats-e1a296c8.svg";var messages$e={add_schedule:{id:"schedule_button.add_schedule",defaultMessage:"Schedule post for later"},remove_schedule:{id:"schedule_button.remove_schedule",defaultMessage:"Post immediately"}},ScheduleButton=function _e(et){var tt=et.composeId,nt=et.disabled,rt=useIntl(),at=useAppDispatch(),it=useCompose(tt),ot=!!it.schedule,st=!!it.id,ct=function(){at(ot?removeSchedule(tt):addSchedule(tt))};return st?null:_createRawReactElement(ComposeFormButton,{icon:vitePluginRequire_1697864675942_3397664,title:rt.formatMessage(ot?messages$e.remove_schedule:messages$e.add_schedule),active:ot,disabled:nt,onClick:ct})},messages$d={marked:{id:"compose_form.spoiler.marked",defaultMessage:"Text is hidden behind warning"},unmarked:{id:"compose_form.spoiler.unmarked",defaultMessage:"Text is not hidden"}},SpoilerButton=function _e(et){var tt=et.composeId,nt=useIntl(),rt=useAppDispatch(),at=useCompose(tt).spoiler,it=function(){return rt(changeComposeSpoilerness(tt))};return _createRawReactElement(ComposeFormButton,{icon:vitePluginRequire_1697864655029_60412658,title:nt.formatMessage(at?messages$d.marked:messages$d.unmarked),active:at,onClick:it})},messages$c={title:{id:"compose_form.spoiler_title",defaultMessage:"Sensitive content"},placeholder:{id:"compose_form.spoiler_placeholder",defaultMessage:"Write your warning here (optional)"},remove:{id:"compose_form.spoiler_remove",defaultMessage:"Remove sensitive"}},SpoilerInput=React$3.forwardRef(function(_e,et){var tt=_e.composeId,nt=_e.onSuggestionsFetchRequested,rt=_e.onSuggestionsClearRequested,at=_e.onSuggestionSelected,it=useIntl(),ot=useAppDispatch(),st=useCompose(tt),ct=function(ft){ot(changeComposeSpoilerText(tt,ft.target.value))},ut=function(){ot(changeComposeSpoilerness(tt))};return _createRawReactElement(Stack,{space:4,className:clsx({"relative transition-height":!0,hidden:!st.spoiler})},void 0,_createRawReactElement(Divider,{}),_createRawReactElement(Stack,{space:2},void 0,_createRawReactElement(Text$2,{weight:"medium"},void 0,it.formatMessage(messages$c.title)),React$3.createElement(AutosuggestInput,{placeholder:it.formatMessage(messages$c.placeholder),value:st.spoiler_text,onChange:ct,disabled:!st.spoiler,suggestions:st.suggestions,onSuggestionsFetchRequested:nt,onSuggestionsClearRequested:rt,onSuggestionSelected:at,searchTokens:[":"],id:"cw-spoiler-input",className:"rounded-md !bg-transparent dark:!bg-transparent",ref:et,autoFocus:!0}),_createRawReactElement("div",{className:"text-center"},void 0,_createRawReactElement("button",{type:"button",className:"text-danger-500",onClick:ut},void 0,it.formatMessage(messages$c.remove)))))}),TextCharacterCounter=function _e(et){var tt=et.text,nt=et.max,rt=function(ot){return _createRawReactElement("span",{className:clsx("text-sm font-medium",{"text-gray-700":ot>=0,"text-secondary-600":ot<0})},void 0,ot)},at=nt-length_1(tt);return rt(at)};const vitePluginRequire_1697864664828_37754289="/packs/assets/presentation-254e2011.svg",vitePluginRequire_1697864664828_14919175="/packs/assets/file-zip-7e7bdaf1.svg",vitePluginRequire_1697864664828_35625859="/packs/assets/file-spreadsheet-10ae293a.svg",vitePluginRequire_1697864664828_7670733="/packs/assets/file-code-371dc68b.svg",vitePluginRequire_1697864664828_2744443="/packs/assets/book-05eef4ba.svg";var bookIcon=vitePluginRequire_1697864664828_2744443,fileCodeIcon=vitePluginRequire_1697864664828_7670733,fileSpreadsheetIcon=vitePluginRequire_1697864664828_35625859,fileTextIcon=vitePluginRequire_1697864664828_71032087,fileZipIcon=vitePluginRequire_1697864664828_14919175,defaultIcon=vitePluginRequire_1697864680134_20012237,presentationIcon=vitePluginRequire_1697864664828_37754289,MIMETYPE_ICONS={"application/x-freearc":fileZipIcon,"application/x-bzip":fileZipIcon,"application/x-bzip2":fileZipIcon,"application/gzip":fileZipIcon,"application/vnd.rar":fileZipIcon,"application/x-tar":fileZipIcon,"application/zip":fileZipIcon,"application/x-7z-compressed":fileZipIcon,"application/x-csh":fileCodeIcon,"application/html":fileCodeIcon,"text/javascript":fileCodeIcon,"application/json":fileCodeIcon,"application/ld+json":fileCodeIcon,"application/x-httpd-php":fileCodeIcon,"application/x-sh":fileCodeIcon,"application/xhtml+xml":fileCodeIcon,"application/xml":fileCodeIcon,"application/epub+zip":bookIcon,"application/vnd.oasis.opendocument.spreadsheet":fileSpreadsheetIcon,"application/vnd.ms-excel":fileSpreadsheetIcon,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":fileSpreadsheetIcon,"application/pdf":fileTextIcon,"application/vnd.oasis.opendocument.presentation":presentationIcon,"application/vnd.ms-powerpoint":presentationIcon,"application/vnd.openxmlformats-officedocument.presentationml.presentation":presentationIcon,"text/plain":fileTextIcon,"application/rtf":fileTextIcon,"application/msword":fileTextIcon,"application/x-abiword":fileTextIcon,"application/vnd.openxmlformats-officedocument.wordprocessingml.document":fileTextIcon,"application/vnd.oasis.opendocument.text":fileTextIcon},messages$b={description:{id:"upload_form.description",defaultMessage:"Describe for the visually impaired"},delete:{id:"upload_form.undo",defaultMessage:"Delete"}},Upload=function _e(et){var tt=et.media,nt=et.onSubmit,rt=et.onDelete,at=et.onDescriptionChange,it=et.descriptionLimit,ot=et.withPreview,st=ot===void 0?!0:ot,ct=useIntl(),ut=useAppDispatch(),dt=reactExports.useState(!1),ft=_slicedToArray$4(dt,2),pt=ft[0],mt=ft[1],ht=reactExports.useState(!1),Et=_slicedToArray$4(ht,2),yt=Et[0],vt=Et[1],gt=reactExports.useState(null),St=_slicedToArray$4(gt,2),Rt=St[0],$t=St[1],bt=function(Yt){nt&&Yt.keyCode===13&&(Yt.ctrlKey||Yt.metaKey)&&(kt(),nt())},wt=function(Yt){rt&&(Yt.stopPropagation(),rt())},xt=function(Yt){$t(Yt.target.value)},Tt=function(){mt(!0)},Ct=function(){mt(!1)},Nt=function(){vt(!0)},At=function(){vt(!0)},kt=function(){vt(!1),$t(null),Rt!==null&&at&&at(Rt)},Pt=function(){ut(openModal("MEDIA",{media:List$1.of(tt),index:0}))},Ft=pt||yt,Dt=Rt||Rt!==""&&tt.description||"",Lt=tt.meta.getIn(["focus","x"]),It=tt.meta.getIn(["focus","y"]),Ot=Lt?(Lt/2+.5)*100:void 0,Ut=It?(It/-2+.5)*100:void 0,jt=tt.type,zt=tt.pleroma.get("mime_type"),Qt=jt==="unknown"&&_createRawReactElement(Icon,{className:"mx-auto my-12 h-16 w-16 text-gray-800 dark:text-gray-200",src:MIMETYPE_ICONS[zt||""]||defaultIcon});return _createRawReactElement("div",{className:"compose-form__upload",tabIndex:0,onMouseEnter:Tt,onMouseLeave:Ct,onClick:At,role:"button"},void 0,_createRawReactElement(Blurhash$1,{hash:tt.blurhash,className:"media-gallery__preview"}),_createRawReactElement(OptionalMotion,{defaultStyle:{scale:.8},style:{scale:spring(1,{stiffness:180,damping:12})}},void 0,function(Xt){var Yt=Xt.scale;return _createRawReactElement("div",{className:clsx("compose-form__upload-thumbnail",jt),style:{transform:"scale(".concat(Yt,")"),backgroundImage:jt==="image"?"url(".concat(tt.preview_url,")"):void 0,backgroundPosition:typeof Ot=="number"&&typeof Ut=="number"?"".concat(Ot,"% ").concat(Ut,"%"):void 0}},void 0,_createRawReactElement("div",{className:clsx("compose-form__upload__actions",{active:Ft})},void 0,rt&&_createRawReactElement(IconButton,{onClick:wt,src:vitePluginRequire_1697864655763_93677134,text:_createRawReactElement(FormattedMessage$1,{id:"upload_form.undo",defaultMessage:"Delete"})}),st&&jt!=="unknown"&&!!tt.url&&_createRawReactElement(IconButton,{onClick:Pt,src:vitePluginRequire_1697864664829_52338194,text:_createRawReactElement(FormattedMessage$1,{id:"upload_form.preview",defaultMessage:"Preview"})})),at&&_createRawReactElement("div",{className:clsx("compose-form__upload-description",{active:Ft})},void 0,_createRawReactElement("label",{},void 0,_createRawReactElement("span",{style:{display:"none"}},void 0,ct.formatMessage(messages$b.description)),_createRawReactElement("textarea",{placeholder:ct.formatMessage(messages$b.description),value:Dt,maxLength:it,onFocus:Nt,onChange:xt,onBlur:kt,onKeyDown:bt}))),_createRawReactElement("div",{className:"compose-form__upload-preview"},void 0,jt==="video"&&_createRawReactElement("video",{autoPlay:!0,playsInline:!0,muted:!0,loop:!0},void 0,_createRawReactElement("source",{src:tt.preview_url})),Qt))}))},UploadCompose=function _e(et){var tt=et.composeId,nt=et.id,rt=useHistory(),at=useAppDispatch(),it=useInstance(),ot=it.description_limit,st=useCompose(tt).media_attachments.find(function(ft){return ft.id===nt}),ct=function(){at(submitCompose(tt,rt))},ut=function(pt){at(changeUploadCompose(tt,st.id,{description:pt}))},dt=function(){at(undoUploadCompose(tt,st.id))};return _createRawReactElement(Upload,{media:st,onDelete:dt,onDescriptionChange:ut,onSubmit:ct,descriptionLimit:ot,withPreview:!0})};const vitePluginRequire_1697864678446_25221165="/packs/assets/cloud-upload-57a6637e.svg";var UploadProgress=function _e(et){var tt=et.progress;return _createRawReactElement(HStack,{alignItems:"center",space:2},void 0,_createRawReactElement(Icon$1,{src:vitePluginRequire_1697864678446_25221165,className:"h-7 w-7 text-gray-500"}),_createRawReactElement(Stack,{space:1},void 0,_createRawReactElement(Text$2,{theme:"muted"},void 0,_createRawReactElement(FormattedMessage$1,{id:"upload_progress.label",defaultMessage:"Uploading…"})),_createRawReactElement(ProgressBar,{progress:tt/100,size:"sm"})))},ComposeUploadProgress=function _e(et){var tt=et.composeId,nt=useCompose(tt),rt=nt.is_uploading,at=nt.progress;return rt?_createRawReactElement(UploadProgress,{progress:at}):null},UploadForm=function _e(et){var tt=et.composeId,nt=useCompose(tt).media_attachments.map(function(at){return at.id}),rt=clsx("compose-form__uploads-wrapper",{"contains-media":nt.size!==0});return _createRawReactElement("div",{className:"compose-form__upload-wrapper"},void 0,_createRawReactElement(ComposeUploadProgress,{composeId:tt}),_createRawReactElement("div",{className:rt},void 0,nt.map(function(at){return _createRawReactElement(UploadCompose,{id:at,composeId:tt},at)})))},ProgressCircle=function _e(et){var tt=et.progress,nt=et.radius,rt=nt===void 0?12:nt,at=et.stroke,it=at===void 0?4:at,ot=et.title,st=it+.5,ct=rt+st,ut=2*Math.PI*rt,dt=ut*(1-Math.min(tt,1));return _createRawReactElement("div",{title:ot},void 0,_createRawReactElement("svg",{width:ct*2,height:ct*2,viewBox:"0 0 ".concat(ct*2," ").concat(ct*2)},void 0,_createRawReactElement("circle",{className:"stroke-gray-500 dark:stroke-white/20",cx:ct,cy:ct,r:rt,fill:"none",strokeWidth:it}),_createRawReactElement("circle",{className:clsx("stroke-primary-500",{"stroke-secondary-500":tt>1}),style:{strokeDashoffset:dt,strokeDasharray:ut},cx:ct,cy:ct,r:rt,fill:"none",strokeWidth:st,strokeLinecap:"round"})))},messages$a={title:{id:"compose.character_counter.title",defaultMessage:"Used {chars} out of {maxChars} {maxChars, plural, one {character} other {characters}}"}},VisualCharacterCounter=function _e(et){var tt=et.text,nt=et.max,rt=useIntl(),at=length_1(tt),it=at/nt;return _createRawReactElement(ProgressCircle,{title:rt.formatMessage(messages$a.title,{chars:at,maxChars:nt}),progress:it,radius:10,stroke:3})};function _createForOfIteratorHelper(_e,et){var tt=typeof Symbol<"u"&&_e[Symbol.iterator]||_e["@@iterator"];if(!tt){if(Array.isArray(_e)||(tt=_unsupportedIterableToArray(_e))||et&&_e&&typeof _e.length=="number"){tt&&(_e=tt);var nt=0,rt=function(){};return{s:rt,n:function(){return nt>=_e.length?{done:!0}:{done:!1,value:_e[nt++]}},e:function(ct){throw ct},f:rt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var at=!0,it=!1,ot;return{s:function(){tt=tt.call(_e)},n:function(){var ct=tt.next();return at=ct.done,ct},e:function(ct){it=!0,ot=ct},f:function(){try{!at&&tt.return!=null&&tt.return()}finally{if(it)throw ot}}}}function _unsupportedIterableToArray(_e,et){if(_e){if(typeof _e=="string")return _arrayLikeToArray(_e,et);var tt=Object.prototype.toString.call(_e).slice(8,-1);if(tt==="Object"&&_e.constructor&&(tt=_e.constructor.name),tt==="Map"||tt==="Set")return Array.from(_e);if(tt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(tt))return _arrayLikeToArray(_e,et)}}function _arrayLikeToArray(_e,et){(et==null||et>_e.length)&&(et=_e.length);for(var tt=0,nt=new Array(et);tt<…                 \u2028\u2029 -\v\f\r`,messages$9={placeholder:{id:"compose_form.placeholder",defaultMessage:"What's on your mind?"},pollPlaceholder:{id:"compose_form.poll_placeholder",defaultMessage:"Add a poll topic…"},eventPlaceholder:{id:"compose_form.event_placeholder",defaultMessage:"Post to this event"},spoiler_placeholder:{id:"compose_form.spoiler_placeholder",defaultMessage:"Write your warning here (optional)"},publish:{id:"compose_form.publish",defaultMessage:"Post"},publishLoud:{id:"compose_form.publish_loud",defaultMessage:"{publish}!"},message:{id:"compose_form.message",defaultMessage:"Message"},schedule:{id:"compose_form.schedule",defaultMessage:"Schedule"},saveChanges:{id:"compose_form.save_changes",defaultMessage:"Save changes"}},ComposeForm=function _e(et){var tt=et.id,nt=et.shouldCondense,rt=et.autoFocus,at=et.clickableAreaRef,it=et.event,ot=et.group,st=et.extra,ct=useHistory(),ut=useIntl(),dt=useAppDispatch(),ft=useInstance(),pt=ft.configuration,mt=useCompose(tt),ht=useAppSelector(function(bn){return bn.search.submitted&&!bn.search.hidden}),Et=useAppSelector(function(bn){return!!(bn.modals.size&&bn.modals.last().modalType==="COMPOSE")}),yt=pt.statuses.max_characters,vt=useAppSelector(function(bn){return bn.scheduled_statuses.size}),gt=useFeatures(),St=mt.text,Rt=mt.suggestions,$t=mt.spoiler,bt=mt.spoiler_text,wt=mt.privacy,xt=mt.focusDate,Tt=mt.caretPosition,Ct=mt.is_submitting,Nt=mt.is_changing_upload,At=mt.is_uploading,kt=mt.schedule,Pt=mt.group_id,Ft=usePrevious$1($t),Dt=!!mt.poll,Lt=mt.id!==null,It=mt.media_attachments.size>0,Ot=reactExports.useState(!1),Ut=_slicedToArray$4(Ot,2),jt=Ut[0],zt=Ut[1],Qt=reactExports.useRef(null),Xt=reactExports.useRef(null),Yt=reactExports.useRef(null),Bt=useDraggedFiles(Qt),Kt=Bt.isDraggedOver,Wt=function(yn){dt(changeCompose(tt,yn.target.value))},sn=function(yn){yn.keyCode===13&&(yn.ctrlKey||yn.metaKey)&&(Tn(),yn.preventDefault())},pn=function(){return at?at.current:Qt.current},mn=function(){return!(St||bt||It)},hn=function(yn){return![pn(),document.querySelector(".privacy-dropdown__dropdown"),document.querySelector("em-emoji-picker"),document.getElementById("modal-overlay"),document.querySelector(".markup-dropdown__dropdown")].some(function(xn){return xn==null?void 0:xn.contains(yn.target)})},_n=reactExports.useCallback(function(bn){mn()&&hn(bn)&&En()},[]),En=function(){zt(!1)},On=function(){zt(!0)},Cn=function(yn){var xn=[],kn={status:!0},Kn=_createForOfIteratorHelper(yn),Xn;try{for(Kn.s();!(Xn=Kn.n()).done;){var nr=Xn.value;if(!nr){kn={status:!1,message:"Empty poll options are not allowed."};break}if(xn.includes(nr)){kn={status:!1,message:"Duplicate poll options are not allowed."};break}xn.push(nr)}}catch(ar){Kn.e(ar)}finally{Kn.f()}return kn},Tn=function(yn){var xn,kn;St!==((xn=Yt.current)===null||xn===void 0||(xn=xn.textarea)===null||xn===void 0?void 0:xn.value)&&dt(changeCompose(tt,Yt.current.textarea.value));var Kn=[bt,countableText(St)].join("");yn&&yn.preventDefault();var Xn=Cn(((kn=mt.poll)===null||kn===void 0?void 0:kn.options.toArray())||[]);if(!Xn.status){toast.error(Xn.message||"Invalid poll options");return}Ct||At||Nt||length_1(Kn)>yt||Kn.length!==0&&Kn.trim().length===0&&!It||dt(submitCompose(tt,ct))},Mn=function(){dt(clearComposeSuggestions(tt))},Fn=function(yn){dt(fetchComposeSuggestions(tt,yn))},zn=function(yn,xn,kn){kn&&dt(selectComposeSuggestion(tt,yn,xn,kn,["text"]))},Dn=function(yn,xn,kn){dt(selectComposeSuggestion(tt,yn,xn,kn,["spoiler_text"]))},Bn=function(yn){var xn,kn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:yn;(xn=Yt.current)!==null&&xn!==void 0&&xn.textarea&&Yt.current.textarea.setSelectionRange(yn,kn)},Vn=function(yn){var xn=Yt.current.textarea.selectionStart,kn=!!yn.custom&&xn>0&&!allowedAroundShortCode.includes(St[xn-1]);dt(insertEmojiCompose(tt,xn,yn,kn))},Zn=function(yn){dt(uploadCompose(tt,yn,ut))},er=function(){var yn;(yn=Xt.current)===null||yn===void 0||(yn=yn.input)===null||yn===void 0||yn.focus()},Pn=function(){var yn;(yn=Yt.current)===null||yn===void 0||(yn=yn.textarea)===null||yn===void 0||yn.focus()};reactExports.useEffect(function(){var bn=St.length;return document.addEventListener("click",_n,!0),bn>0&&Bn(bn),function(){document.removeEventListener("click",_n,!0)}},[]),reactExports.useEffect(function(){$t&&!Ft?er():!$t&&Ft&&Pn()},[$t]),reactExports.useEffect(function(){typeof Tt=="number"&&Bn(Tt)},[xt]);var $n=reactExports.useCallback(function(){return _createRawReactElement(HStack,{alignItems:"center",space:2},void 0,gt.media&&_createRawReactElement(UploadButtonContainer,{composeId:tt}),_createRawReactElement(EmojiPickerDropdownContainer,{onPickEmoji:Vn}),gt.polls&&_createRawReactElement(PollButton,{composeId:tt}),gt.privacyScopes&&!ot&&!Pt&&_createRawReactElement(PrivacyDropdown,{composeId:tt}),gt.scheduledStatuses&&_createRawReactElement(ScheduleButton,{composeId:tt}),gt.spoilers&&_createRawReactElement(SpoilerButton,{composeId:tt}),gt.richText&&_createRawReactElement(MarkupDropdown,{composeId:tt}))},[gt,tt]),Ln=nt&&!Kt&&!jt&&mn()&&!At,Gn=Ct,Jn=[bt,countableText(St)].join(""),ir=Gn||At||Nt||length_1(Jn)>yt||Jn.length!==0&&Jn.trim().length===0&&!It||!Jn,or=rt&&!ht&&!isMobile(window.innerWidth),jn="",rr,tr;return Lt?jn=ut.formatMessage(messages$9.saveChanges):wt==="direct"?(jn=ut.formatMessage(messages$9.message),rr=vitePluginRequire_1697861810834_33454440):wt==="private"?(jn=ut.formatMessage(messages$9.publish),rr=vitePluginRequire_1697861811805_60977601):jn=wt!=="unlisted"?ut.formatMessage(messages$9.publishLoud,{publish:ut.formatMessage(messages$9.publish)}):ut.formatMessage(messages$9.publish),kt&&(jn=ut.formatMessage(messages$9.schedule)),it?tr=messages$9.eventPlaceholder:Dt?tr=messages$9.pollPlaceholder:tr=messages$9.placeholder,React$3.createElement(Stack,{className:"w-full",space:4,ref:Qt,onClick:_n,element:"form",onSubmit:Tn},vt>0&&!it&&!ot&&_createRawReactElement(Warning,{message:_createRawReactElement(FormattedMessage$1,{id:"compose_form.scheduled_statuses.message",defaultMessage:"You have scheduled posts. {click_here} to see them.",values:{click_here:_createRawReactElement(Link$2,{to:"/scheduled_statuses"},void 0,_createRawReactElement(FormattedMessage$1,{id:"compose_form.scheduled_statuses.click_here",defaultMessage:"Click here"}))}})}),_createRawReactElement(WarningWrapper,{composeId:tt}),!nt&&!it&&!ot&&Pt&&_createRawReactElement(ReplyGroupIndicator,{composeId:tt}),!nt&&!it&&!ot&&_createRawReactElement(ReplyIndicatorContainer,{composeId:tt}),!nt&&!it&&!ot&&_createRawReactElement(ReplyMentions,{composeId:tt}),React$3.createElement(AutosuggestTextarea,{ref:Et&&nt?void 0:Yt,placeholder:ut.formatMessage(tr),disabled:Gn,value:St,onChange:Wt,suggestions:Rt,onKeyDown:sn,onFocus:On,onSuggestionsFetchRequested:Fn,onSuggestionsClearRequested:Mn,onSuggestionSelected:zn,onPaste:Zn,autoFocus:or,condensed:Ln,id:"compose-textarea",keymap:"n"},!Ln&&_createRawReactElement(Stack,{space:4,className:"compose-form__modifiers"},void 0,_createRawReactElement(UploadForm,{composeId:tt}),_createRawReactElement(PollForm,{composeId:tt}),React$3.createElement(SpoilerInput,{composeId:tt,onSuggestionsFetchRequested:Fn,onSuggestionsClearRequested:Mn,onSuggestionSelected:Dn,ref:Xt}),_createRawReactElement(ScheduleFormContainer,{composeId:tt}))),_createRawReactElement(QuotedStatusContainer,{composeId:tt}),st&&_createRawReactElement("div",{className:clsx({hidden:Ln})},void 0,st),_createRawReactElement("div",{className:clsx("flex flex-wrap items-center justify-between",{hidden:Ln})},void 0,$n(),_createRawReactElement(HStack,{space:4,alignItems:"center",className:"ml-auto rtl:ml-0 rtl:mr-auto"},void 0,yt&&_createRawReactElement(HStack,{space:1,alignItems:"center"},void 0,_createRawReactElement(TextCharacterCounter,{max:yt,text:St}),_createRawReactElement(VisualCharacterCounter,{max:yt,text:St})),_createRawReactElement(Button,{type:"submit",theme:"primary",text:jn,icon:rr,disabled:ir}))))},HomePage=function _e(et){var tt=et.children,nt=useIntl(),rt=useAppDispatch(),at=useAppSelector(function(vt){return vt.me}),it=useOwnAccount(),ot=it.account,st=useFeatures(),ct=useSoapboxConfig(),ut="home",dt=reactExports.useRef(null),ft=ct.extensions.getIn(["patron","enabled"])===!0,pt=useDraggedFiles(dt,function(vt){rt(uploadCompose(ut,vt,nt))}),mt=pt.isDragging,ht=pt.isDraggedOver,Et=ot?ot.acct:"",yt=ot?ot.avatar:"";return React$3.createElement(React$3.Fragment,null,_createRawReactElement(Layout.Main,{className:"space-y-3 pt-3 dark:divide-gray-800 sm:pt-0"},void 0,at&&React$3.createElement(Card$1,{className:clsx("relative z-[1] transition",{"border-2 border-primary-600 border-dashed z-[99]":mt,"ring-2 ring-offset-2 ring-primary-600":ht}),variant:"rounded",ref:dt},_createRawReactElement(CardBody,{},void 0,_createRawReactElement(HStack,{alignItems:"start",space:4},void 0,_createRawReactElement(Link$2,{to:"/@".concat(Et)},void 0,_createRawReactElement(Avatar,{src:yt,size:46})),_createRawReactElement("div",{className:"w-full translate-y-0.5"},void 0,_createRawReactElement(ComposeForm,{id:ut,shouldCondense:!0,autoFocus:!1,clickableAreaRef:dt}))))),st.carousel&&_createRawReactElement(FeedCarousel,{}),tt,!at&&_createRawReactElement(BundleContainer,{fetchComponent:CtaBanner},void 0,function(vt){return _createRawReactElement(vt,{},"cta-banner")})),_createRawReactElement(Layout.Aside,{},void 0,!at&&_createRawReactElement(BundleContainer,{fetchComponent:SignUpPanel},void 0,function(vt){return _createRawReactElement(vt,{})}),at&&st.announcements&&_createRawReactElement(BundleContainer,{fetchComponent:AnnouncementsPanel},void 0,function(vt){return _createRawReactElement(vt,{},"announcements-panel")}),st.trends&&_createRawReactElement(BundleContainer,{fetchComponent:TrendsPanel},void 0,function(vt){return _createRawReactElement(vt,{limit:5})}),ft&&_createRawReactElement(BundleContainer,{fetchComponent:FundingPanel},void 0,function(vt){return _createRawReactElement(vt,{})}),_createRawReactElement(BundleContainer,{fetchComponent:PromoPanel},void 0,function(vt){return _createRawReactElement(vt,{})}),st.birthdays&&_createRawReactElement(BundleContainer,{fetchComponent:BirthdayPanel},void 0,function(vt){return _createRawReactElement(vt,{limit:10})}),at&&st.suggestions&&_createRawReactElement(BundleContainer,{fetchComponent:WhoToFollowPanel},void 0,function(vt){return _createRawReactElement(vt,{limit:3})}),_createRawReactElement(LinkFooter,{},"link-footer")))},ManageGroupsPage=function _e(et){var tt=et.children;return React$3.createElement(React$3.Fragment,null,_createRawReactElement(Layout.Main,{},void 0,tt),_createRawReactElement(Layout.Aside,{},void 0,_createRawReactElement(BundleContainer,{fetchComponent:NewGroupPanel},void 0,function(nt){return _createRawReactElement(nt,{})}),_createRawReactElement(BundleContainer,{fetchComponent:MyGroupsPanel},void 0,function(nt){return _createRawReactElement(nt,{})}),_createRawReactElement(LinkFooter,{})))};const vitePluginRequire_1697861817686_8499823="/packs/assets/user-x-5766c17b.svg",vitePluginRequire_1697861817686_87168652="/packs/assets/user-check-b58f6cec.svg",vitePluginRequire_1697861817685_19028400="/packs/assets/rss-94d4892d.svg",DOMAIN_BLOCK_REQUEST="DOMAIN_BLOCK_REQUEST",DOMAIN_BLOCK_SUCCESS="DOMAIN_BLOCK_SUCCESS",DOMAIN_BLOCK_FAIL="DOMAIN_BLOCK_FAIL",DOMAIN_UNBLOCK_REQUEST="DOMAIN_UNBLOCK_REQUEST",DOMAIN_UNBLOCK_SUCCESS="DOMAIN_UNBLOCK_SUCCESS",DOMAIN_UNBLOCK_FAIL="DOMAIN_UNBLOCK_FAIL",DOMAIN_BLOCKS_FETCH_REQUEST="DOMAIN_BLOCKS_FETCH_REQUEST",DOMAIN_BLOCKS_FETCH_SUCCESS="DOMAIN_BLOCKS_FETCH_SUCCESS",DOMAIN_BLOCKS_FETCH_FAIL="DOMAIN_BLOCKS_FETCH_FAIL",DOMAIN_BLOCKS_EXPAND_REQUEST="DOMAIN_BLOCKS_EXPAND_REQUEST",DOMAIN_BLOCKS_EXPAND_SUCCESS="DOMAIN_BLOCKS_EXPAND_SUCCESS",DOMAIN_BLOCKS_EXPAND_FAIL="DOMAIN_BLOCKS_EXPAND_FAIL",blockDomain=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(blockDomainRequest(_e)),api(tt).post("/api/v1/domain_blocks",{domain:_e}).then(()=>{const nt=selectAccountsByDomain(tt(),_e);nt&&et(blockDomainSuccess(_e,nt))}).catch(nt=>{et(blockDomainFail(_e,nt))}))},blockDomainRequest=_e=>({type:DOMAIN_BLOCK_REQUEST,domain:_e}),blockDomainSuccess=(_e,et)=>({type:DOMAIN_BLOCK_SUCCESS,domain:_e,accounts:et}),blockDomainFail=(_e,et)=>({type:DOMAIN_BLOCK_FAIL,domain:_e,error:et}),unblockDomain=_e=>(et,tt)=>{if(!isLoggedIn(tt))return;et(unblockDomainRequest(_e));const nt={params:{domain:_e},data:{domain:_e}};api(tt).delete("/api/v1/domain_blocks",nt).then(()=>{const rt=selectAccountsByDomain(tt(),_e);rt&&et(unblockDomainSuccess(_e,rt))}).catch(rt=>{et(unblockDomainFail(_e,rt))})},unblockDomainRequest=_e=>({type:DOMAIN_UNBLOCK_REQUEST,domain:_e}),unblockDomainSuccess=(_e,et)=>({type:DOMAIN_UNBLOCK_SUCCESS,domain:_e,accounts:et}),unblockDomainFail=(_e,et)=>({type:DOMAIN_UNBLOCK_FAIL,domain:_e,error:et}),fetchDomainBlocks=()=>(_e,et)=>{isLoggedIn(et)&&(_e(fetchDomainBlocksRequest()),api(et).get("/api/v1/domain_blocks").then(tt=>{const nt=getLinks(tt).refs.find(rt=>rt.rel==="next");_e(fetchDomainBlocksSuccess(tt.data,nt?nt.uri:null))}).catch(tt=>{_e(fetchDomainBlocksFail(tt))}))},fetchDomainBlocksRequest=()=>({type:DOMAIN_BLOCKS_FETCH_REQUEST}),fetchDomainBlocksSuccess=(_e,et)=>({type:DOMAIN_BLOCKS_FETCH_SUCCESS,domains:_e,next:et}),fetchDomainBlocksFail=_e=>({type:DOMAIN_BLOCKS_FETCH_FAIL,error:_e}),expandDomainBlocks=()=>(_e,et)=>{if(!isLoggedIn(et))return;const tt=et().domain_lists.blocks.next;tt&&(_e(expandDomainBlocksRequest()),api(et).get(tt).then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");_e(expandDomainBlocksSuccess(nt.data,rt?rt.uri:null))}).catch(nt=>{_e(expandDomainBlocksFail(nt))}))};function selectAccountsByDomain(_e,et){var at;const tt=(at=_e.entities[Entities.ACCOUNTS])==null?void 0:at.store,nt=tt?Object.entries(tt):void 0;return(nt==null?void 0:nt.filter(([it,ot])=>ot&&ot.acct.endsWith(`@${et}`)).map(([it,ot])=>ot.id))||[]}const expandDomainBlocksRequest=()=>({type:DOMAIN_BLOCKS_EXPAND_REQUEST}),expandDomainBlocksSuccess=(_e,et)=>({type:DOMAIN_BLOCKS_EXPAND_SUCCESS,domains:_e,next:et}),expandDomainBlocksFail=_e=>({type:DOMAIN_BLOCKS_EXPAND_FAIL,error:_e}),SEARCH_CHANGE="SEARCH_CHANGE",SEARCH_CLEAR="SEARCH_CLEAR",SEARCH_SHOW="SEARCH_SHOW",SEARCH_RESULTS_CLEAR="SEARCH_RESULTS_CLEAR",SEARCH_FETCH_REQUEST="SEARCH_FETCH_REQUEST",SEARCH_FETCH_SUCCESS="SEARCH_FETCH_SUCCESS",SEARCH_FETCH_FAIL="SEARCH_FETCH_FAIL",SEARCH_FILTER_SET="SEARCH_FILTER_SET",SEARCH_EXPAND_REQUEST="SEARCH_EXPAND_REQUEST",SEARCH_EXPAND_SUCCESS="SEARCH_EXPAND_SUCCESS",SEARCH_EXPAND_FAIL="SEARCH_EXPAND_FAIL",SEARCH_ACCOUNT_SET="SEARCH_ACCOUNT_SET",changeSearch=_e=>et=>_e.length===0?(et(clearSearchResults()),et({type:SEARCH_CHANGE,value:_e})):et({type:SEARCH_CHANGE,value:_e}),clearSearch=()=>({type:SEARCH_CLEAR}),clearSearchResults=()=>({type:SEARCH_RESULTS_CLEAR}),submitSearch=_e=>(et,tt)=>{const nt=tt().search.value,rt=_e||tt().search.filter||"accounts",at=tt().search.accountId;if(nt.length===0)return;et(fetchSearchRequest(nt));const it={q:nt,resolve:!0,limit:20,type:rt};at&&(it.account_id=at),api(tt).get("/api/v2/search",{params:it}).then(ot=>{ot.data.accounts&&et(importFetchedAccounts(ot.data.accounts)),ot.data.statuses&&et(importFetchedStatuses(ot.data.statuses));const st=getLinks(ot).refs.find(ct=>ct.rel==="next");et(fetchSearchSuccess(ot.data,nt,rt,st?st.uri:null)),et(fetchRelationships(ot.data.accounts.map(ct=>ct.id)))}).catch(ot=>{et(fetchSearchFail(ot))})},fetchSearchRequest=_e=>({type:SEARCH_FETCH_REQUEST,value:_e}),fetchSearchSuccess=(_e,et,tt,nt)=>({type:SEARCH_FETCH_SUCCESS,results:_e,searchTerm:et,searchType:tt,next:nt}),fetchSearchFail=_e=>({type:SEARCH_FETCH_FAIL,error:_e}),setFilter=_e=>et=>{et(submitSearch(_e)),et({type:SEARCH_FILTER_SET,path:["search","filter"],value:_e})},expandSearch=_e=>(et,tt)=>{const nt=tt().search.value,rt=tt().search.results[_e].size,at=tt().search.accountId;et(expandSearchRequest(_e));let it=tt().search.next,ot={};it||(it="/api/v2/search",ot={q:nt,type:_e,offset:rt},at&&(ot.account_id=at)),api(tt).get(it,{params:ot}).then(st=>{const ct=st.data;ct.accounts&&et(importFetchedAccounts(ct.accounts)),ct.statuses&&et(importFetchedStatuses(ct.statuses));const ut=getLinks(st).refs.find(dt=>dt.rel==="next");et(expandSearchSuccess(ct,nt,_e,ut?ut.uri:null)),et(fetchRelationships(ct.accounts.map(dt=>dt.id)))}).catch(st=>{et(expandSearchFail(st))})},expandSearchRequest=_e=>({type:SEARCH_EXPAND_REQUEST,searchType:_e}),expandSearchSuccess=(_e,et,tt,nt)=>({type:SEARCH_EXPAND_SUCCESS,results:_e,searchTerm:et,searchType:tt,next:nt}),expandSearchFail=_e=>({type:SEARCH_EXPAND_FAIL,error:_e}),showSearch=()=>({type:SEARCH_SHOW}),setSearchAccount=_e=>({type:SEARCH_ACCOUNT_SET,accountId:_e}),vitePluginRequire_1697861828078_74376444="/packs/assets/briefcase-e6658dd7.svg";var MovedNote=function _e(et){var tt=et.from,nt=et.to;return _createRawReactElement("div",{className:"p-4"},void 0,_createRawReactElement(HStack,{className:"mb-2",alignItems:"center",space:1.5},void 0,_createRawReactElement(Icon,{src:vitePluginRequire_1697861828078_74376444,className:"flex-none text-primary-600 dark:text-primary-400"}),_createRawReactElement("div",{className:"truncate"},void 0,_createRawReactElement(Text$2,{theme:"muted",size:"sm",truncate:!0},void 0,_createRawReactElement(FormattedMessage$1,{id:"notification.move",defaultMessage:"{name} moved to {targetName}",values:{name:_createRawReactElement("span",{dangerouslySetInnerHTML:{__html:tt.display_name_html}}),targetName:nt.acct}})))),_createRawReactElement(Account,{account:nt,withRelationship:!1}))};const vitePluginRequire_1697861820197_29830493="/packs/assets/bell-ringing-83705da9.svg";var messages$8={subscribe:{id:"account.subscribe",defaultMessage:"Subscribe to notifications from @{name}"},unsubscribe:{id:"account.unsubscribe",defaultMessage:"Unsubscribe to notifications from @{name}"},subscribeSuccess:{id:"account.subscribe.success",defaultMessage:"You have subscribed to this account."},unsubscribeSuccess:{id:"account.unsubscribe.success",defaultMessage:"You have unsubscribed from this account."},subscribeFailure:{id:"account.subscribe.failure",defaultMessage:"An error occurred trying to subscribe to this account."},unsubscribeFailure:{id:"account.unsubscribe.failure",defaultMessage:"An error occurred trying to unsubscribe to this account."}},SubscriptionButton=function _e(et){var tt,nt,rt,at,it=et.account,ot=useAppDispatch(),st=useFeatures(),ct=useIntl(),ut=useFollow(),dt=ut.follow,ft=(tt=it.relationship)===null||tt===void 0?void 0:tt.following,pt=(nt=it.relationship)===null||nt===void 0?void 0:nt.requested,mt=st.accountNotifies?(rt=it.relationship)===null||rt===void 0?void 0:rt.notifying:(at=it.relationship)===null||at===void 0?void 0:at.subscribing,ht=mt?ct.formatMessage(messages$8.unsubscribe,{name:it.username}):ct.formatMessage(messages$8.subscribe,{name:it.username}),Et=function(){return toast.success(ct.formatMessage(messages$8.subscribeSuccess))},yt=function(){return toast.error(ct.formatMessage(messages$8.subscribeFailure))},vt=function(){return toast.success(ct.formatMessage(messages$8.unsubscribeSuccess))},gt=function(){return toast.error(ct.formatMessage(messages$8.unsubscribeFailure))},St=function(){var wt;if((wt=it.relationship)!==null&&wt!==void 0&&wt.notifying){var xt;(xt=dt(it.id,{notify:!1}))===null||xt===void 0||xt.then(function(){return vt()}).catch(function(){return gt()})}else{var Tt;(Tt=dt(it.id,{notify:!0}))===null||Tt===void 0||Tt.then(function(){return Et()}).catch(function(){return yt()})}},Rt=function(){var wt;if((wt=it.relationship)!==null&&wt!==void 0&&wt.subscribing){var xt;(xt=ot(unsubscribeAccount(it.id)))===null||xt===void 0||xt.then(function(){return vt()}).catch(function(){return gt()})}else{var Tt;(Tt=ot(subscribeAccount(it.id)))===null||Tt===void 0||Tt.then(function(){return Et()}).catch(function(){return yt()})}},$t=function(){st.accountNotifies?St():Rt()};return!st.accountSubscriptions&&!st.accountNotifies?null:pt||ft?_createRawReactElement(IconButton$1,{src:mt?vitePluginRequire_1697861820197_29830493:vitePluginRequire_1697861831311_54316318,onClick:$t,title:ht,theme:"outlined",className:"px-2",iconClassName:"h-4 w-4"}):null},messages$7={edit_profile:{id:"account.edit_profile",defaultMessage:"Edit profile"},linkVerifiedOn:{id:"account.link_verified_on",defaultMessage:"Ownership of this link was checked on {date}"},account_locked:{id:"account.locked_info",defaultMessage:"This account privacy status is set to locked. The owner manually reviews who can follow them."},mention:{id:"account.mention",defaultMessage:"Mention"},chat:{id:"account.chat",defaultMessage:"Chat with @{name}"},direct:{id:"account.direct",defaultMessage:"Direct message @{name}"},unmute:{id:"account.unmute",defaultMessage:"Unmute @{name}"},block:{id:"account.block",defaultMessage:"Block @{name}"},unblock:{id:"account.unblock",defaultMessage:"Unblock @{name}"},mute:{id:"account.mute",defaultMessage:"Mute @{name}"},report:{id:"account.report",defaultMessage:"Report @{name}"},copy:{id:"account.copy",defaultMessage:"Copy link to profile"},share:{id:"account.share",defaultMessage:"Share @{name}'s profile"},media:{id:"account.media",defaultMessage:"Media"},blockDomain:{id:"account.block_domain",defaultMessage:"Hide everything from {domain}"},unblockDomain:{id:"account.unblock_domain",defaultMessage:"Unhide {domain}"},hideReblogs:{id:"account.hide_reblogs",defaultMessage:"Hide reposts from @{name}"},showReblogs:{id:"account.show_reblogs",defaultMessage:"Show reposts from @{name}"},preferences:{id:"navigation_bar.preferences",defaultMessage:"Preferences"},follow_requests:{id:"navigation_bar.follow_requests",defaultMessage:"Follow requests"},blocks:{id:"navigation_bar.blocks",defaultMessage:"Blocked users"},domain_blocks:{id:"navigation_bar.domain_blocks",defaultMessage:"Hidden domains"},mutes:{id:"navigation_bar.mutes",defaultMessage:"Muted users"},endorse:{id:"account.endorse",defaultMessage:"Feature on profile"},unendorse:{id:"account.unendorse",defaultMessage:"Don't feature on profile"},removeFromFollowers:{id:"account.remove_from_followers",defaultMessage:"Remove this follower"},adminAccount:{id:"status.admin_account",defaultMessage:"Moderate @{name}"},add_or_remove_from_list:{id:"account.add_or_remove_from_list",defaultMessage:"Add or Remove from lists"},search:{id:"account.search",defaultMessage:"Search from @{name}"},searchSelf:{id:"account.search_self",defaultMessage:"Search your posts"},unfollowConfirm:{id:"confirmations.unfollow.confirm",defaultMessage:"Unfollow"},blockConfirm:{id:"confirmations.block.confirm",defaultMessage:"Block"},blockDomainConfirm:{id:"confirmations.domain_block.confirm",defaultMessage:"Hide entire domain"},blockAndReport:{id:"confirmations.block.block_and_report",defaultMessage:"Block & Report"},removeFromFollowersConfirm:{id:"confirmations.remove_from_followers.confirm",defaultMessage:"Remove"},userEndorsed:{id:"account.endorse.success",defaultMessage:"You are now featuring @{acct} on your profile"},userUnendorsed:{id:"account.unendorse.success",defaultMessage:"You are no longer featuring @{acct}"},profileExternal:{id:"account.profile_external",defaultMessage:"View profile on {domain}"},header:{id:"account.header.alt",defaultMessage:"Profile header"},subscribeFeed:{id:"account.rss_feed",defaultMessage:"Subscribe to RSS feed"}},Header=function _e(et){var tt=et.account,nt=useIntl(),rt=useHistory(),at=useAppDispatch(),it=useFeatures(),ot=useOwnAccount(),st=ot.account,ct=useFollow(),ut=ct.follow,dt=useAppSelector(function(Kt){return parseVersion(Kt.instance.version)}),ft=dt.software,pt=useChats(),mt=pt.getOrCreateChatByAccountId,ht=useMutation(function(Kt){return mt(Kt)},{onError:function(Wt){var sn,pn=(sn=Wt.response)===null||sn===void 0?void 0:sn.data;toast.error(pn==null?void 0:pn.error)},onSuccess:function(Wt){rt.push("/chats/".concat(Wt.data.id)),queryClient.invalidateQueries(ChatKeys.chatSearch())}});if(!tt)return _createRawReactElement("div",{className:"-mx-4 -mt-4 sm:-mx-6 sm:-mt-6"},void 0,_createRawReactElement("div",{},void 0,_createRawReactElement("div",{className:"relative h-32 w-full bg-gray-200 dark:bg-gray-900/50 md:rounded-t-xl lg:h-48"})),_createRawReactElement("div",{className:"px-4 sm:px-6"},void 0,_createRawReactElement(HStack,{alignItems:"bottom",space:5,className:"-mt-12"},void 0,_createRawReactElement("div",{className:"relative flex"},void 0,_createRawReactElement("div",{className:"h-24 w-24 rounded-full bg-gray-400 ring-4 ring-white dark:ring-gray-800"})))));var Et=function(){var Wt;(Wt=tt.relationship)!==null&&Wt!==void 0&&Wt.blocking?at(unblockAccount(tt.id)):at(openModal("CONFIRM",{icon:vitePluginRequire_1697861828079_95498444,heading:_createRawReactElement(FormattedMessage$1,{id:"confirmations.block.heading",defaultMessage:"Block @{name}",values:{name:tt.acct}}),message:_createRawReactElement(FormattedMessage$1,{id:"confirmations.block.message",defaultMessage:"Are you sure you want to block {name}?",values:{name:_createRawReactElement("strong",{className:"break-words"},void 0,"@",tt.acct)}}),confirm:nt.formatMessage(messages$7.blockConfirm),onConfirm:function(){return at(blockAccount(tt.id))},secondary:nt.formatMessage(messages$7.blockAndReport),onSecondary:function(){at(blockAccount(tt.id)),at(initReport(ReportableEntities.ACCOUNT,tt))}}))},yt=function(){at(mentionCompose(tt))},vt=function(){at(directCompose(tt))},gt=function(){var Wt;(Wt=tt.relationship)!==null&&Wt!==void 0&&Wt.showing_reblogs?ut(tt.id,{reblogs:!1}):ut(tt.id,{reblogs:!0})},St=function(){var Wt;(Wt=tt.relationship)!==null&&Wt!==void 0&&Wt.endorsed?at(unpinAccount(tt.id)).then(function(){return toast.success(nt.formatMessage(messages$7.userUnendorsed,{acct:tt.acct}))}).catch(function(){}):at(pinAccount(tt.id)).then(function(){return toast.success(nt.formatMessage(messages$7.userEndorsed,{acct:tt.acct}))}).catch(function(){})},Rt=function(){at(initReport(ReportableEntities.ACCOUNT,tt))},$t=function(){var Wt;(Wt=tt.relationship)!==null&&Wt!==void 0&&Wt.muting?at(unmuteAccount(tt.id)):at(initMuteModal(tt))},bt=function(Wt){at(openModal("CONFIRM",{icon:vitePluginRequire_1697861828079_95498444,heading:_createRawReactElement(FormattedMessage$1,{id:"confirmations.domain_block.heading",defaultMessage:"Block {domain}",values:{domain:Wt}}),message:_createRawReactElement(FormattedMessage$1,{id:"confirmations.domain_block.message",defaultMessage:"Are you really, really sure you want to block the entire {domain}? In most cases a few targeted blocks or mutes are sufficient and preferable. You will not see content from that domain in any public timelines or your notifications.",values:{domain:_createRawReactElement("strong",{},void 0,Wt)}}),confirm:nt.formatMessage(messages$7.blockDomainConfirm),onConfirm:function(){return at(blockDomain(Wt))}}))},wt=function(Wt){at(unblockDomain(Wt))},xt=function(Wt){window.open(Wt,"_blank")},Tt=function(){at(openModal("LIST_ADDER",{accountId:tt.id}))},Ct=function(){at(openModal("ACCOUNT_MODERATION",{accountId:tt.id}))},Nt=function(){at(function(Wt,sn){var pn=getSettings(sn()).get("unfollowModal");at(pn?openModal("CONFIRM",{message:_createRawReactElement(FormattedMessage$1,{id:"confirmations.remove_from_followers.message",defaultMessage:"Are you sure you want to remove {name} from your followers?",values:{name:_createRawReactElement("strong",{className:"break-words"},void 0,"@",tt.acct)}}),confirm:nt.formatMessage(messages$7.removeFromFollowersConfirm),onConfirm:function(){return at(removeFromFollowers(tt.id))}}):removeFromFollowers(tt.id))})},At=function(){at(setSearchAccount(tt.id)),rt.push("/search")},kt=function(){var Wt=normalizeAttachment({type:"image",url:tt.avatar});at(openModal("MEDIA",{media:List$1.of(Wt),index:0}))},Pt=function(Wt){Wt.button===0&&!(Wt.ctrlKey||Wt.metaKey)&&(Wt.preventDefault(),kt())},Ft=function(){var Wt=normalizeAttachment({type:"image",url:tt.header});at(openModal("MEDIA",{media:List$1.of(Wt),index:0}))},Dt=function(Wt){Wt.button===0&&!(Wt.ctrlKey||Wt.metaKey)&&(Wt.preventDefault(),Ft())},Lt=function(){window.open(ft===MASTODON?"".concat(tt.url,".rss"):"".concat(tt.url,"/feed.rss"),"_blank")},It=function(){navigator.share({text:"@".concat(tt.acct),url:tt.url}).catch(function(Wt){Wt.name!=="AbortError"&&console.error(Wt)})},Ot=function(Wt){copy(tt.url)},Ut=function(){var Wt=[];if(!tt)return[];if(it.rssFeeds&&isLocal(tt)&&Wt.push({text:nt.formatMessage(messages$7.subscribeFeed),action:Lt,icon:vitePluginRequire_1697861817685_19028400}),"share"in navigator&&Wt.push({text:nt.formatMessage(messages$7.share,{name:tt.username}),action:It,icon:vitePluginRequire_1697861808850_96938226}),it.federating&&isRemote(tt)){var sn=tt.fqn.split("@")[1];Wt.push({text:nt.formatMessage(messages$7.profileExternal,{domain:sn}),action:function(){return xt(tt.url)},icon:vitePluginRequire_1697861810833_45315206})}if(Wt.push({text:nt.formatMessage(messages$7.copy),action:Ot,icon:vitePluginRequire_1697861817685_18392263}),!st)return Wt;if(it.searchFromAccount&&Wt.push({text:nt.formatMessage(tt.id===st.id?messages$7.searchSelf:messages$7.search,{name:tt.username}),action:At,icon:vitePluginRequire_1697861811668_22999030}),Wt.length&&Wt.push(null),tt.id===st.id)Wt.push({text:nt.formatMessage(messages$7.edit_profile),to:"/settings/profile",icon:vitePluginRequire_1697861809668_3303363}),Wt.push({text:nt.formatMessage(messages$7.preferences),to:"/settings",icon:vitePluginRequire_1697861809669_39550187}),Wt.push(null),Wt.push({text:nt.formatMessage(messages$7.mutes),to:"/mutes",icon:vitePluginRequire_1697861810834_50970931}),Wt.push({text:nt.formatMessage(messages$7.blocks),to:"/blocks",icon:vitePluginRequire_1697861828079_95498444});else{var pn,mn,hn,_n;if(Wt.push({text:nt.formatMessage(messages$7.mention,{name:tt.username}),action:yt,icon:vitePluginRequire_1697861810834_25410229}),it.privacyScopes&&Wt.push({text:nt.formatMessage(messages$7.direct,{name:tt.username}),action:vt,icon:vitePluginRequire_1697861810834_33454440}),(pn=tt.relationship)!==null&&pn!==void 0&&pn.following){var En;if((En=tt.relationship)!==null&&En!==void 0&&En.showing_reblogs?Wt.push({text:nt.formatMessage(messages$7.hideReblogs,{name:tt.username}),action:gt,icon:vitePluginRequire_1697861810834_60823079}):Wt.push({text:nt.formatMessage(messages$7.showReblogs,{name:tt.username}),action:gt,icon:vitePluginRequire_1697861810834_60823079}),it.lists&&Wt.push({text:nt.formatMessage(messages$7.add_or_remove_from_list),action:Tt,icon:vitePluginRequire_1697861809668_56661171}),it.accountEndorsements){var On;Wt.push({text:nt.formatMessage((On=tt.relationship)!==null&&On!==void 0&&On.endorsed?messages$7.unendorse:messages$7.endorse),action:St,icon:vitePluginRequire_1697861817686_87168652})}}else it.lists&&it.unrestrictedLists&&Wt.push({text:nt.formatMessage(messages$7.add_or_remove_from_list),action:Tt,icon:vitePluginRequire_1697861809668_56661171});Wt.push(null),it.removeFromFollowers&&(mn=tt.relationship)!==null&&mn!==void 0&&mn.followed_by&&Wt.push({text:nt.formatMessage(messages$7.removeFromFollowers),action:Nt,icon:vitePluginRequire_1697861817686_8499823}),(hn=tt.relationship)!==null&&hn!==void 0&&hn.muting?Wt.push({text:nt.formatMessage(messages$7.unmute,{name:tt.username}),action:$t,icon:vitePluginRequire_1697861810834_50970931}):Wt.push({text:nt.formatMessage(messages$7.mute,{name:tt.username}),action:$t,icon:vitePluginRequire_1697861810834_50970931}),(_n=tt.relationship)!==null&&_n!==void 0&&_n.blocking?Wt.push({text:nt.formatMessage(messages$7.unblock,{name:tt.username}),action:Et,icon:vitePluginRequire_1697861828079_95498444}):Wt.push({text:nt.formatMessage(messages$7.block,{name:tt.username}),action:Et,icon:vitePluginRequire_1697861828079_95498444}),Wt.push({text:nt.formatMessage(messages$7.report,{name:tt.username}),action:Rt,icon:vitePluginRequire_1697861810834_83829185})}if(isRemote(tt)){var Cn,Tn=tt.fqn.split("@")[1];Wt.push(null),(Cn=tt.relationship)!==null&&Cn!==void 0&&Cn.domain_blocking?Wt.push({text:nt.formatMessage(messages$7.unblockDomain,{domain:Tn}),action:function(){return wt(Tn)},icon:vitePluginRequire_1697861828079_95498444}):Wt.push({text:nt.formatMessage(messages$7.blockDomain,{domain:Tn}),action:function(){return bt(Tn)},icon:vitePluginRequire_1697861828079_95498444})}return st.staff&&(Wt.push(null),Wt.push({text:nt.formatMessage(messages$7.adminAccount,{name:tt.username}),action:Ct,icon:vitePluginRequire_1697861810834_38963235})),Wt},jt=function(){var Wt,sn,pn,mn,hn=[];return!tt||!st||(st.id!==tt.id&&(Wt=tt.relationship)!==null&&Wt!==void 0&&Wt.followed_by?hn.push(_createRawReactElement(Badge,{slug:"opaque",title:_createRawReactElement(FormattedMessage$1,{id:"account.follows_you",defaultMessage:"Follows you"})},"followed_by")):st.id!==tt.id&&(sn=tt.relationship)!==null&&sn!==void 0&&sn.blocking&&hn.push(_createRawReactElement(Badge,{slug:"opaque",title:_createRawReactElement(FormattedMessage$1,{id:"account.blocked",defaultMessage:"Blocked"})},"blocked")),st.id!==tt.id&&(pn=tt.relationship)!==null&&pn!==void 0&&pn.muting?hn.push(_createRawReactElement(Badge,{slug:"opaque",title:_createRawReactElement(FormattedMessage$1,{id:"account.muted",defaultMessage:"Muted"})},"muted")):st.id!==tt.id&&(mn=tt.relationship)!==null&&mn!==void 0&&mn.domain_blocking&&hn.push(_createRawReactElement(Badge,{slug:"opaque",title:_createRawReactElement(FormattedMessage$1,{id:"account.domain_blocked",defaultMessage:"Domain hidden"})},"domain_blocked"))),hn},zt=function(){var Wt;return tt.header&&(Wt=_createRawReactElement(StillImage,{src:tt.header,alt:nt.formatMessage(messages$7.header)}),isDefaultHeader(tt.header)||(Wt=_createRawReactElement("a",{href:tt.header,onClick:Dt,target:"_blank"},void 0,Wt))),Wt},Qt=function(){var Wt;if(!st||!tt||tt.id===(st==null?void 0:st.id))return null;if(it.chatsWithFollowers){var sn,pn=(sn=tt.relationship)===null||sn===void 0?void 0:sn.followed_by;return pn?_createRawReactElement(IconButton$1,{src:vitePluginRequire_1697861810834_58630734,onClick:function(){return ht.mutate(tt.id)},title:nt.formatMessage(messages$7.chat,{name:tt.username}),theme:"outlined",className:"px-2",iconClassName:"h-4 w-4",disabled:ht.isLoading}):null}else return(Wt=tt.pleroma)!==null&&Wt!==void 0&&Wt.accepts_chat_messages?_createRawReactElement(IconButton$1,{src:vitePluginRequire_1697861810834_58630734,onClick:function(){return ht.mutate(tt.id)},title:nt.formatMessage(messages$7.chat,{name:tt.username}),theme:"outlined",className:"px-2",iconClassName:"h-4 w-4"}):null},Xt=function(){var Wt="share"in navigator;return tt&&st!==null&&st!==void 0&&st.id&&tt.id===(st==null?void 0:st.id)&&Wt?_createRawReactElement(IconButton$1,{src:vitePluginRequire_1697861808850_96938226,onClick:It,title:nt.formatMessage(messages$7.share,{name:tt.username}),theme:"outlined",className:"px-2",iconClassName:"h-4 w-4"}):null},Yt=jt(),Bt=Ut();return _createRawReactElement("div",{className:"-mx-4 -mt-4 sm:-mx-6 sm:-mt-6"},void 0,tt.moved&&_typeof$8(tt.moved)==="object"&&_createRawReactElement(MovedNote,{from:tt,to:tt.moved}),_createRawReactElement("div",{},void 0,_createRawReactElement("div",{className:"relative isolate flex h-32 w-full flex-col justify-center overflow-hidden bg-gray-200 dark:bg-gray-900/50 md:rounded-t-xl lg:h-48"},void 0,zt(),_createRawReactElement("div",{className:"absolute left-2 top-2"},void 0,_createRawReactElement(HStack,{alignItems:"center",space:1},void 0,Yt)))),_createRawReactElement("div",{className:"px-4 sm:px-6"},void 0,_createRawReactElement(HStack,{className:"-mt-12",alignItems:"bottom",space:5},void 0,_createRawReactElement("div",{className:"relative flex"},void 0,_createRawReactElement("a",{href:tt.avatar,onClick:Pt,target:"_blank"},void 0,_createRawReactElement(Avatar,{src:tt.avatar,size:96,className:"relative h-24 w-24 rounded-full bg-white ring-4 ring-white dark:bg-primary-900 dark:ring-primary-900"})),tt.verified&&_createRawReactElement("div",{className:"absolute bottom-0 right-0"},void 0,_createRawReactElement(VerificationBadge,{className:"h-6 w-6 rounded-full bg-white ring-2 ring-white dark:bg-primary-900 dark:ring-primary-900"}))),_createRawReactElement("div",{className:"mt-6 flex w-full justify-end sm:pb-1"},void 0,_createRawReactElement(HStack,{space:2,className:"mt-10"},void 0,_createRawReactElement(SubscriptionButton,{account:tt}),Qt(),Xt(),Bt.length>0&&_createRawReactElement(DropdownMenu,{items:Bt,placement:"bottom-end"},void 0,_createRawReactElement(IconButton$1,{src:vitePluginRequire_1697861810836_81866597,theme:"outlined",className:"px-2",iconClassName:"h-4 w-4",children:null})),_createRawReactElement(ActionButton,{account:tt}))))))},ProfilePage=function _e(et){var tt=et.params,nt=et.children,rt=useHistory(),at=(tt==null?void 0:tt.username)||"",it=useAccountLookup(at,{withRelationship:!0}),ot=it.account,st=useAppSelector(function(vt){return vt.me}),ct=useFeatures(),ut=useSoapboxConfig(),dt=ut.displayFqn;if(ot&&ot.acct!==at)return _createRawReactElement(Redirect,{to:"/@".concat(ot.acct)});var ft=[{text:_createRawReactElement(FormattedMessage$1,{id:"account.posts",defaultMessage:"Posts"}),to:"/@".concat(at),name:"profile"},{text:_createRawReactElement(FormattedMessage$1,{id:"account.posts_with_replies",defaultMessage:"Posts and replies"}),to:"/@".concat(at,"/with_replies"),name:"replies"},{text:_createRawReactElement(FormattedMessage$1,{id:"account.media",defaultMessage:"Media"}),to:"/@".concat(at,"/media"),name:"media"}];if(ot){var pt,mt=ot.id===st;(mt||((pt=ot.pleroma)===null||pt===void 0?void 0:pt.hide_favorites)===!1)&&ft.push({text:_createRawReactElement(FormattedMessage$1,{id:"navigation_bar.favourites",defaultMessage:"Likes"}),to:"/@".concat(ot.acct,"/favorites"),name:"likes"})}var ht,Et=rt.location.pathname.replace("@".concat(at,"/"),"");Et.endsWith("/with_replies")?ht="replies":Et.endsWith("/media")?ht="media":Et.endsWith("/favorites")?ht="likes":ht="profile";var yt=!["/following","/followers","/pins"].some(function(vt){return Et.endsWith(vt)});return React$3.createElement(React$3.Fragment,null,_createRawReactElement(Layout.Main,{},void 0,_createRawReactElement(Column,{size:"lg",label:ot?"".concat(ot.display_name," (@").concat(getAcct(ot,dt),")"):"",withHeader:!1},void 0,_createRawReactElement("div",{className:"space-y-4"},void 0,_createRawReactElement(Header,{account:ot}),_createRawReactElement(BundleContainer,{fetchComponent:ProfileInfoPanel},void 0,function(vt){return _createRawReactElement(vt,{username:at,account:ot})}),ot&&yt&&_createRawReactElement(Tabs,{items:ft,activeItem:ht},"profile-tabs-".concat(ot.id)),nt)),!st&&_createRawReactElement(BundleContainer,{fetchComponent:CtaBanner},void 0,function(vt){return _createRawReactElement(vt,{},"cta-banner")})),_createRawReactElement(Layout.Aside,{},void 0,!st&&_createRawReactElement(BundleContainer,{fetchComponent:SignUpPanel},void 0,function(vt){return _createRawReactElement(vt,{},"sign-up-panel")}),_createRawReactElement(BundleContainer,{fetchComponent:ProfileMediaPanel},void 0,function(vt){return _createRawReactElement(vt,{account:ot})}),ot&&ot.fields.length>0&&_createRawReactElement(BundleContainer,{fetchComponent:ProfileFieldsPanel},void 0,function(vt){return _createRawReactElement(vt,{account:ot})}),ct.accountEndorsements&&ot&&isLocal(ot)?_createRawReactElement(BundleContainer,{fetchComponent:PinnedAccountsPanel},void 0,function(vt){return _createRawReactElement(vt,{account:ot,limit:5},"pinned-accounts-panel")}):st&&ct.suggestions&&_createRawReactElement(BundleContainer,{fetchComponent:WhoToFollowPanel},void 0,function(vt){return _createRawReactElement(vt,{limit:3},"wtf-panel")}),_createRawReactElement(LinkFooter,{},"link-footer")))},RemoteInstancePage=function _e(et){var tt=et.children,nt=et.params,rt=nt==null?void 0:nt.instance,at=useOwnAccount(),it=at.account,ot=useAppSelector(federationRestrictionsDisclosed);return React$3.createElement(React$3.Fragment,null,_createRawReactElement(Layout.Main,{},void 0,tt),_createRawReactElement(Layout.Aside,{},void 0,_createRawReactElement(BundleContainer,{fetchComponent:PromoPanel},void 0,function(st){return _createRawReactElement(st,{},"promo-panel")}),_createRawReactElement(BundleContainer,{fetchComponent:InstanceInfoPanel},void 0,function(st){return _createRawReactElement(st,{host:rt})}),(ot||(it==null?void 0:it.admin))&&_createRawReactElement(BundleContainer,{fetchComponent:InstanceModerationPanel},void 0,function(st){return _createRawReactElement(st,{host:rt})}),_createRawReactElement(LinkFooter,{},"link-footer")))},SearchPage=function _e(et){var tt=et.children,nt=useAppSelector(function(at){return at.me}),rt=useFeatures();return React$3.createElement(React$3.Fragment,null,_createRawReactElement(Layout.Main,{},void 0,tt,!nt&&_createRawReactElement(BundleContainer,{fetchComponent:CtaBanner},void 0,function(at){return _createRawReactElement(at,{},"cta-banner")})),_createRawReactElement(Layout.Aside,{},void 0,!nt&&_createRawReactElement(BundleContainer,{fetchComponent:SignUpPanel},void 0,function(at){return _createRawReactElement(at,{},"sign-up-panel")}),rt.trends&&_createRawReactElement(BundleContainer,{fetchComponent:TrendsPanel},void 0,function(at){return _createRawReactElement(at,{limit:5},"trends-panel")}),nt&&rt.suggestions&&_createRawReactElement(BundleContainer,{fetchComponent:WhoToFollowPanel},void 0,function(at){return _createRawReactElement(at,{limit:3},"wtf-panel")}),rt.groups&&_createRawReactElement(BundleContainer,{fetchComponent:SuggestedGroupsPanel},void 0,function(at){return _createRawReactElement(at,{},"suggested-groups-panel")}),_createRawReactElement(LinkFooter,{},"link-footer")))},StatusPage=function _e(et){var tt=et.children,nt=useAppSelector(function(at){return at.me}),rt=useFeatures();return React$3.createElement(React$3.Fragment,null,_createRawReactElement(Layout.Main,{},void 0,tt,!nt&&_createRawReactElement(BundleContainer,{fetchComponent:CtaBanner},void 0,function(at){return _createRawReactElement(at,{},"cta-banner")})),_createRawReactElement(Layout.Aside,{},void 0,!nt&&_createRawReactElement(BundleContainer,{fetchComponent:SignUpPanel},void 0,function(at){return _createRawReactElement(at,{},"sign-up-panel")}),rt.trends&&_createRawReactElement(BundleContainer,{fetchComponent:TrendsPanel},void 0,function(at){return _createRawReactElement(at,{limit:5},"trends-panel")}),nt&&rt.suggestions&&_createRawReactElement(BundleContainer,{fetchComponent:WhoToFollowPanel},void 0,function(at){return _createRawReactElement(at,{limit:3},"wtf-panel")}),_createRawReactElement(LinkFooter,{},"link-footer")))};const PolicyKeys={policy:["policy"]};function usePendingPolicy(){const _e=useApi(),{account:et}=useOwnAccount(),tt=useFeatures(),nt=async()=>{const{data:rt}=await _e.get("/api/v1/truth/policies/pending");return rt};return useQuery(PolicyKeys.policy,nt,{retry:3,refetchOnWindowFocus:!0,staleTime:6e4,cacheTime:1/0,enabled:!!et&&tt.truthPolicies})}function useAcceptPolicy(){const _e=useApi();return useMutation(({policy_id:et})=>_e.patch(`/api/v1/truth/policies/${et}/accept`),{onSuccess(){queryClient.setQueryData(PolicyKeys.policy,{})}})}var BackgroundShapes=function _e(et){var tt=et.position,nt=tt===void 0?"fixed":tt;return _createRawReactElement("div",{className:clsx(nt,"pointer-events-none inset-x-0 top-0 flex justify-center overflow-hidden")},void 0,_createRawReactElement("div",{className:"bg-gradient-sm lg:bg-gradient-light lg:dark:bg-gradient-dark h-screen w-screen"}))};const vitePluginRequire_1697861800344_40206118="/packs/assets/pencil-plus-de54005f.svg";var messages$6={publish:{id:"compose_form.publish",defaultMessage:"Publish"}},FloatingActionButton=function _e(){var et=useLocation$1();return et.pathname.startsWith("/group/")?_createRawReactElement(GroupFAB,{}):_createRawReactElement(HomeFAB,{})},HomeFAB=function _e(){var et=useIntl(),tt=useAppDispatch(),nt=function(){tt(openModal("COMPOSE"))};return _createRawReactElement("button",{onClick:nt,className:clsx("inline-flex appearance-none items-center rounded-full border p-4 font-medium transition-all focus:outline-none focus:ring-2 focus:ring-offset-2","border-transparent bg-secondary-500 text-gray-100 hover:bg-secondary-400 focus:bg-secondary-500 focus:ring-secondary-300"),"aria-label":et.formatMessage(messages$6.publish)},void 0,_createRawReactElement(Icon$1,{src:vitePluginRequire_1697861800344_40206118,className:"h-6 w-6"}))},GroupFAB=function _e(){var et=useIntl(),tt=useAppDispatch(),nt=useRouteMatch("/group/:groupSlug"),rt=useGroupLookup((nt==null?void 0:nt.params.groupSlug)||""),at=rt.entity;if(!at)return null;var it=function(){tt(groupComposeModal(at))};return _createRawReactElement("button",{onClick:it,className:clsx("inline-flex appearance-none items-center rounded-full border p-4 font-medium transition-all focus:outline-none focus:ring-2 focus:ring-offset-2","border-transparent bg-secondary-500 text-gray-100 hover:bg-secondary-400 focus:bg-secondary-500 focus:ring-secondary-300"),"aria-label":et.formatMessage(messages$6.publish)},void 0,_createRawReactElement(HStack,{space:3,alignItems:"center"},void 0,_createRawReactElement(Avatar,{className:"-my-3 -ml-2 border-white",size:42,src:at.avatar}),_createRawReactElement(Icon$1,{src:vitePluginRequire_1697861800344_40206118,className:"h-6 w-6"})))},DirectMessageUpdates=function _e(){var et=useSoapboxConfig(),tt=et.links;return _createRawReactElement(Stack,{space:3},void 0,_createRawReactElement(Stack,{space:4,className:"rounded-lg border-2 border-solid border-primary-200 p-4 dark:border-primary-800"},void 0,_createRawReactElement(HStack,{alignItems:"center",space:3},void 0,_createRawReactElement("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},void 0,_createRawReactElement("path",{d:"M0 22.5306C0 10.0873 10.0873 0 22.5306 0H26.4828C38.3664 0 48 9.6336 48 21.5172V21.5172C48 36.1433 36.1433 48 21.5172 48H18.4615C8.26551 48 0 39.7345 0 29.5385V22.5306Z",fill:"url(#paint0_linear_2190_131524)",fillOpacity:"0.2"}),_createRawReactElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.0001 19C14.0001 17.3431 15.3433 16 17.0001 16H31.0001C32.657 16 34.0001 17.3431 34.0001 19V19.9845C34.0002 19.9942 34.0002 20.004 34.0001 20.0137V29C34.0001 30.6569 32.657 32 31.0001 32H17.0001C15.3433 32 14.0001 30.6569 14.0001 29V20.0137C14 20.004 14 19.9942 14.0001 19.9845V19ZM16.0001 21.8685V29C16.0001 29.5523 16.4478 30 17.0001 30H31.0001C31.5524 30 32.0001 29.5523 32.0001 29V21.8685L25.6642 26.0925C24.6565 26.7642 23.3437 26.7642 22.336 26.0925L16.0001 21.8685ZM32.0001 19.4648L24.5548 24.4283C24.2189 24.6523 23.7813 24.6523 23.4454 24.4283L16.0001 19.4648V19C16.0001 18.4477 16.4478 18 17.0001 18H31.0001C31.5524 18 32.0001 18.4477 32.0001 19V19.4648Z",fill:"#818CF8"}),_createRawReactElement("defs",{},void 0,_createRawReactElement("linearGradient",{id:"paint0_linear_2190_131524",x1:"0",y1:"0",x2:"43.6184",y2:"-3.69691",gradientUnits:"userSpaceOnUse"},void 0,_createRawReactElement("stop",{stopColor:"#B8A3F9"}),_createRawReactElement("stop",{offset:"1",stopColor:"#9BD5FF"})))),_createRawReactElement(Text$2,{weight:"bold"},void 0,"Direct Messaging")),_createRawReactElement(Text$2,{theme:"muted"},void 0,"Yes, direct messages are finally here!"),_createRawReactElement(Text$2,{theme:"muted"},void 0,"Bring one-on-one conversations from your Feed to your DMs with messages that automatically delete for your privacy.")),_createRawReactElement(Stack,{space:4,className:"rounded-lg border-2 border-solid border-primary-200 p-4 dark:border-primary-800"},void 0,_createRawReactElement(HStack,{alignItems:"center",space:3},void 0,_createRawReactElement("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},void 0,_createRawReactElement("path",{d:"M0 25.7561C0 22.2672 0 20.5228 0.197492 19.0588C1.52172 9.24259 9.24259 1.52172 19.0588 0.197492C20.5228 0 22.2672 0 25.7561 0H30.1176C39.9938 0 48 8.0062 48 17.8824C48 34.5159 34.5159 48 17.8824 48H15.3192C15.0228 48 14.8747 48 14.7494 47.9979C6.66132 47.8627 0.137263 41.3387 0.0020943 33.2506C0 33.1253 0 32.9772 0 32.6808V25.7561Z",fill:"url(#paint0_linear_2190_131532)",fillOpacity:"0.2"}),_createRawReactElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.9999 14C24.5522 14 24.9999 14.4477 24.9999 15V16C24.9999 16.5523 24.5522 17 23.9999 17C23.4477 17 22.9999 16.5523 22.9999 16V15C22.9999 14.4477 23.4477 14 23.9999 14ZM16.9289 16.9289C17.3194 16.5384 17.9526 16.5384 18.3431 16.9289L19.0502 17.636C19.4407 18.0266 19.4407 18.6597 19.0502 19.0503C18.6597 19.4408 18.0265 19.4408 17.636 19.0503L16.9289 18.3431C16.5384 17.9526 16.5384 17.3195 16.9289 16.9289ZM31.071 16.9289C31.4615 17.3195 31.4615 17.9526 31.071 18.3431L30.3639 19.0503C29.9734 19.4408 29.3402 19.4408 28.9497 19.0503C28.5592 18.6597 28.5592 18.0266 28.9497 17.636L29.6568 16.9289C30.0473 16.5384 30.6805 16.5384 31.071 16.9289ZM21.1715 21.1716C19.6094 22.7337 19.6094 25.2664 21.1715 26.8285L21.7186 27.3755C21.9116 27.5686 22.0848 27.7778 22.2367 28H25.7632C25.9151 27.7778 26.0882 27.5686 26.2813 27.3755L26.8284 26.8285C28.3905 25.2664 28.3905 22.7337 26.8284 21.1716C25.2663 19.6095 22.7336 19.6095 21.1715 21.1716ZM27.2448 29.4187C27.3586 29.188 27.5101 28.9751 27.6955 28.7898L28.2426 28.2427C30.5857 25.8995 30.5857 22.1005 28.2426 19.7574C25.8994 17.4142 22.1005 17.4142 19.7573 19.7574C17.4142 22.1005 17.4142 25.8995 19.7573 28.2427L20.3044 28.7898C20.4898 28.9751 20.6413 29.188 20.7551 29.4187C20.7601 29.4295 20.7653 29.4403 20.7706 29.4509C20.9202 29.7661 20.9999 30.1134 20.9999 30.469V31C20.9999 32.6569 22.3431 34 23.9999 34C25.6568 34 26.9999 32.6569 26.9999 31V30.469C26.9999 30.1134 27.0797 29.7661 27.2292 29.4509C27.2346 29.4403 27.2398 29.4295 27.2448 29.4187ZM25.0251 30H22.9748C22.9915 30.155 22.9999 30.3116 22.9999 30.469V31C22.9999 31.5523 23.4477 32 23.9999 32C24.5522 32 24.9999 31.5523 24.9999 31V30.469C24.9999 30.3116 25.0084 30.155 25.0251 30ZM14 23.9999C14 23.4477 14.4477 22.9999 15 22.9999H16C16.5523 22.9999 17 23.4477 17 23.9999C17 24.5522 16.5523 24.9999 16 24.9999H15C14.4477 24.9999 14 24.5522 14 23.9999ZM31 23.9999C31 23.4477 31.4477 22.9999 32 22.9999H33C33.5523 22.9999 34 23.4477 34 23.9999C34 24.5522 33.5523 24.9999 33 24.9999H32C31.4477 24.9999 31 24.5522 31 23.9999Z",fill:"#818CF8"}),_createRawReactElement("defs",{},void 0,_createRawReactElement("linearGradient",{id:"paint0_linear_2190_131532",x1:"0",y1:"0",x2:"43.6184",y2:"-3.69691",gradientUnits:"userSpaceOnUse"},void 0,_createRawReactElement("stop",{stopColor:"#B8A3F9"}),_createRawReactElement("stop",{offset:"1",stopColor:"#9BD5FF"})))),_createRawReactElement(Text$2,{weight:"bold"},void 0,"Privacy Policy Updates")),_createRawReactElement("ul",{className:"space-y-2"},void 0,_createRawReactElement("li",{className:"flex items-center space-x-2"},void 0,_createRawReactElement("span",{className:"flex h-8 w-8 items-center justify-center rounded-full border-2 border-solid border-gray-200 text-sm font-bold text-primary-500 dark:border-gray-800 dark:text-primary-300"},void 0,"1"),_createRawReactElement(Text$2,{theme:"muted"},void 0,"Consolidates previously-separate policies")),_createRawReactElement("li",{className:"flex items-center space-x-2"},void 0,_createRawReactElement("span",{className:"flex h-8 w-8 items-center justify-center rounded-full border-2 border-solid border-gray-200 text-sm font-bold text-primary-500 dark:border-gray-800 dark:text-primary-300"},void 0,"2"),_createRawReactElement(Text$2,{theme:"muted"},void 0,"Reaffirms jurisdiction-specific requirements")),_createRawReactElement("li",{className:"flex items-center space-x-2"},void 0,_createRawReactElement("span",{className:"flex h-8 w-8 items-center justify-center rounded-full border-2 border-solid border-gray-200 text-sm font-bold text-primary-500 dark:border-gray-800 dark:text-primary-300"},void 0,"3"),_createRawReactElement(Text$2,{theme:"muted"},void 0,"Introduces updates regarding ads and direct messages"))),tt.get("privacyPolicy")?_createRawReactElement("a",{className:"text-center font-bold text-primary-600 hover:underline dark:text-accent-blue",href:tt.get("privacyPolicy"),target:"_blank"},void 0,"View Privacy Policy"):null))},supportedPolicyIds=["1"],PolicyModal=function _e(et){var tt=et.onClose,nt=useAcceptPolicy(),rt=useAppSelector(function(ut){return ut.instance}),at=usePendingPolicy(),it=at.data,ot=at.isLoading,st=function(){switch(it==null?void 0:it.pending_policy_id){case"1":return _createRawReactElement(DirectMessageUpdates,{});default:return null}},ct=function(){nt.mutate({policy_id:it==null?void 0:it.pending_policy_id},{onSuccess:function(){tt("POLICY")}})};return ot||!it?null:_createRawReactElement(Modal,{title:"Updates"},void 0,_createRawReactElement(Stack,{space:4},void 0,_createRawReactElement(Text$2,{theme:"muted"},void 0,_createRawReactElement(FormattedMessage$1,{id:"modals.policy.updateTitle",defaultMessage:"You’ve scored the latest version of {siteTitle}! Take a moment to review the exciting new things we’ve been working on.",values:{siteTitle:rt.title}})),st(),_createRawReactElement(Button,{theme:"primary",size:"lg",block:!0,onClick:ct,disabled:nt.isLoading},void 0,_createRawReactElement(FormattedMessage$1,{id:"modals.policy.submit",defaultMessage:"Accept & Continue"}))))};const policyModal=Object.freeze(Object.defineProperty({__proto__:null,default:PolicyModal,supportedPolicyIds},Symbol.toStringTag,{value:"Module"})),SIDEBAR_OPEN="SIDEBAR_OPEN",SIDEBAR_CLOSE="SIDEBAR_CLOSE",openSidebar=()=>({type:SIDEBAR_OPEN}),closeSidebar=()=>({type:SIDEBAR_CLOSE});var _excluded$1=["onChange","onSelected","value","limit"],noOp$2=function _e(){},AutosuggestAccountInput=function _e(et){var tt=et.onChange,nt=et.onSelected,rt=et.value,at=rt===void 0?"":rt,it=et.limit,ot=it===void 0?4:it,st=_objectWithoutProperties(et,_excluded$1),ct=useAppDispatch(),ut=reactExports.useState(OrderedSet()),dt=_slicedToArray$4(ut,2),ft=dt[0],pt=dt[1],mt=reactExports.useRef(new AbortController),ht=function(){mt.current.abort(),mt.current=new AbortController},Et=function(){pt(OrderedSet())},yt=reactExports.useCallback(throttle$1(function(St){var Rt={q:St,limit:ot,resolve:!1};ct(accountSearch(Rt,mt.current.signal)).then(function($t){var bt=$t.map(function(wt){return wt.id});pt(OrderedSet(bt))}).catch(noOp$2)},900,{leading:!0,trailing:!0}),[ot]),vt=function(Rt){ht(),yt(Rt.target.value),tt(Rt)},gt=function(Rt,$t,bt){typeof bt=="string"&&bt[0]!=="#"&&nt(bt)};return reactExports.useEffect(function(){st.autoFocus&&yt("")},[]),reactExports.useEffect(function(){at===""&&Et()},[at]),React$3.createElement(AutosuggestInput,_extends$4({value:at,onChange:vt,suggestions:ft.toList(),onSuggestionsFetchRequested:noOp$2,onSuggestionsClearRequested:noOp$2,onSuggestionSelected:gt,searchTokens:[]},st))},messages$5={placeholder:{id:"search.placeholder",defaultMessage:"Search"},action:{id:"search.action",defaultMessage:"Search for “{query}”"}};function redirectToAccount(_e,et){return function(tt,nt){var rt=selectAccount(nt(),_e).acct;rt&&et&&et.push("/@".concat(rt))}}var Search=function _e(et){var tt=et.autoFocus,nt=tt===void 0?!1:tt,rt=et.autoSubmit,at=rt===void 0?!1:rt,it=et.autosuggest,ot=it===void 0?!1:it,st=et.openInRoute,ct=st===void 0?!1:st,ut=useAppDispatch(),dt=useHistory(),ft=useIntl(),pt=useAppSelector(function(xt){return xt.search.value}),mt=useAppSelector(function(xt){return xt.search.submitted}),ht=reactExports.useCallback(debounce$2(function(){ut(submitSearch())},900),[]),Et=function(Tt){var Ct=Tt.target.value;ut(changeSearch(Ct)),at&&ht()},yt=function(Tt){Tt.preventDefault(),(pt.length>0||mt)&&ut(clearSearchResults())},vt=function(){ct?(ut(setSearchAccount(null)),ut(submitSearch()),dt.push("/search")):ut(submitSearch())},gt=function(Tt){if(Tt.key==="Enter")Tt.preventDefault(),vt();else if(Tt.key==="Escape"){var Ct;(Ct=document.querySelector(".ui"))===null||Ct===void 0||(Ct=Ct.parentElement)===null||Ct===void 0||Ct.focus()}},St=function(){ut(showSearch())},Rt=function(Tt){ut(clearSearch()),ut(redirectToAccount(Tt,dt))},$t=function(){return[{text:ft.formatMessage(messages$5.action,{query:pt}),icon:vitePluginRequire_1697861811668_22999030,action:vt}]},bt=pt.length>0||mt,wt={type:"text",id:"search",placeholder:ft.formatMessage(messages$5.placeholder),value:pt,onChange:Et,onKeyDown:gt,onFocus:St,autoFocus:nt,theme:"search",className:"pr-10 rtl:pl-10 rtl:pr-3"};return ot&&(wt.onSelected=Rt,wt.menu=$t(),wt.autoSelect=!1),reactExports.useEffect(function(){return function(){var xt=dt.location.pathname,Tt=!!xt.match(/@.+\/posts\/[a-zA-Z0-9]+/g)||!!xt.match(/\/tags\/.+/g);Tt||ut(changeSearch(""))}},[]),_createRawReactElement("div",{className:"w-full"},void 0,_createRawReactElement("label",{htmlFor:"search",className:"sr-only"},void 0,ft.formatMessage(messages$5.placeholder)),_createRawReactElement("div",{className:"relative"},void 0,ot?React$3.createElement(AutosuggestAccountInput,_extends$4({hotkey:"s,/"},wt)):React$3.createElement(Input,_extends$4({ref:useHotkey("s,/")},wt)),_createRawReactElement("div",{role:"button",tabIndex:0,className:"absolute inset-y-0 right-0 flex cursor-pointer items-center px-3 rtl:left-0 rtl:right-auto",onClick:yt},void 0,_createRawReactElement(SvgIcon,{src:vitePluginRequire_1697861811668_22999030,className:clsx("h-4 w-4 text-gray-600",{hidden:bt})}),_createRawReactElement(SvgIcon,{src:vitePluginRequire_1697861811668_44144977,className:clsx("h-4 w-4 text-gray-600",{hidden:!bt}),"aria-label":ft.formatMessage(messages$5.placeholder)}))))},messages$4={add:{id:"profile_dropdown.add_account",defaultMessage:"Add an existing account"},theme:{id:"profile_dropdown.theme",defaultMessage:"Theme"},logout:{id:"profile_dropdown.logout",defaultMessage:"Log out @{acct}"}},getAccount=makeGetAccount(),ProfileDropdown=function _e(et){var tt=et.account,nt=et.children,rt=useAppDispatch(),at=useFeatures(),it=useIntl(),ot=reactExports.useState(!1),st=_slicedToArray$4(ot,2),ct=st[0],ut=st[1],dt=useFloating({placement:"bottom-end"}),ft=dt.x,pt=dt.y,mt=dt.strategy,ht=dt.refs,Et=useAppSelector(function(wt){return wt.auth.users}),yt=useAppSelector(function(wt){return Et.map(function(xt){return getAccount(wt,xt.id)})}),vt=function(){rt(logOut$1())},gt=function(xt){return function(){rt(switchAccount(xt.id))}},St=throttle$1(function(){rt(fetchOwnAccounts())},2e3),Rt=function(xt){return _createRawReactElement(Account,{account:xt,showProfileHoverCard:!1,withLinkToProfile:!1,hideActions:!0})},$t=reactExports.useMemo(function(){var wt=[];return wt.push({text:Rt(tt),to:"/@".concat(tt.acct)}),yt.forEach(function(xt){xt&&xt.id!==tt.id&&wt.push({text:Rt(xt),action:gt(xt)})}),wt.push({text:null}),wt.push({text:it.formatMessage(messages$4.theme),toggle:_createRawReactElement(ThemeToggle,{})}),wt.push({text:null}),wt.push({text:it.formatMessage(messages$4.add),to:"/login/add",icon:vitePluginRequire_1697861812358_77020136}),wt.push({text:it.formatMessage(messages$4.logout,{acct:tt.acct}),to:"/logout",action:vt,icon:vitePluginRequire_1697861824494_13661183}),wt},[tt,Et,at]),bt=function(){return ut(!ct)};return reactExports.useEffect(function(){St()},[tt,Et]),useClickOutside(ht,function(){ut(!1)}),React$3.createElement(React$3.Fragment,null,React$3.createElement("button",{className:"rounded-full focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:ring-gray-800 dark:ring-offset-0 dark:focus:ring-primary-500",type:"button",ref:ht.setReference,onClick:bt},nt),ct&&React$3.createElement("div",{ref:ht.setFloating,className:"z-[1003] mt-2 max-w-xs rounded-md bg-white shadow-lg focus:outline-none dark:bg-gray-900 dark:ring-2 dark:ring-primary-700",style:{position:mt,top:pt??0,left:ft??0,width:"max-content"}},$t.map(function(wt,xt){return _createRawReactElement(MenuItem,{menuItem:wt},xt)})))},MenuItem=function _e(et){var tt=et.className,nt=et.menuItem,rt=clsx(tt,"block w-full cursor-pointer truncate px-4 py-2.5 text-left text-sm text-gray-700 hover:bg-gray-100 rtl:text-right dark:text-gray-500 dark:hover:bg-gray-800");if(nt.toggle)return _createRawReactElement("div",{className:"flex flex-row items-center justify-between space-x-4 px-4 py-1 text-sm text-gray-700 dark:text-gray-400"},void 0,_createRawReactElement("span",{},void 0,nt.text),nt.toggle);if(nt.text){if(nt.action)return _createRawReactElement("button",{type:"button",onClick:nt.action,className:rt},void 0,nt.text);if(nt.to)return _createRawReactElement(Link$2,{to:nt.to,className:rt},void 0,nt.text);throw nt}else return _createRawReactElement(MenuDivider,{})},messages$3={login:{id:"navbar.login.action",defaultMessage:"Log in"},username:{id:"navbar.login.username.placeholder",defaultMessage:"E-mail or username"},email:{id:"navbar.login.email.placeholder",defaultMessage:"E-mail address"},password:{id:"navbar.login.password.label",defaultMessage:"Password"},forgotPassword:{id:"navbar.login.forgot_password",defaultMessage:"Forgot password?"}},Navbar=function _e(){var et=useAppDispatch(),tt=useIntl(),nt=useFeatures(),rt=useRegistrationStatus(),at=rt.isOpen,it=useOwnAccount(),ot=it.account,st=reactExports.useRef(null),ct=reactExports.useState(!1),ut=_slicedToArray$4(ct,2),dt=ut[0],ft=ut[1],pt=reactExports.useState(""),mt=_slicedToArray$4(pt,2),ht=mt[0],Et=mt[1],yt=reactExports.useState(""),vt=_slicedToArray$4(yt,2),gt=vt[0],St=vt[1],Rt=reactExports.useState(!1),$t=_slicedToArray$4(Rt,2),bt=$t[0],wt=$t[1],xt=function(){return et(openSidebar())},Tt=function(Nt){Nt.preventDefault(),ft(!0),et(logIn(ht,gt)).then(function(At){var kt=At.access_token;return ft(!1),et(verifyCredentials(kt)).then(function(){return et(fetchInstance())})}).catch(function(At){var kt;ft(!1);var Pt=(kt=At.response)===null||kt===void 0?void 0:kt.data;(Pt==null?void 0:Pt.error)==="mfa_required"&&wt(Pt.mfa_token)})};return bt?_createRawReactElement(Redirect,{to:"/login?token=".concat(encodeURIComponent(bt))}):React$3.createElement("nav",{className:"sticky top-0 z-50 bg-white shadow dark:bg-primary-900",ref:st,"data-testid":"navbar"},_createRawReactElement("div",{className:"mx-auto max-w-7xl px-2 sm:px-6 lg:px-8"},void 0,_createRawReactElement("div",{className:"relative flex h-12 justify-between lg:h-16"},void 0,ot&&_createRawReactElement("div",{className:"absolute inset-y-0 left-0 flex items-center rtl:left-auto rtl:right-0 lg:hidden"},void 0,_createRawReactElement("button",{onClick:xt},void 0,_createRawReactElement(Avatar,{src:ot.avatar,size:34}))),_createRawReactElement(HStack,{space:4,alignItems:"center",className:clsx("enter flex-1 lg:items-stretch",{"justify-center lg:justify-start":ot,"justify-start":!ot})},void 0,_createRawReactElement(Link$2,{to:"/","data-preview-title-id":"column.home",className:"ml-4 flex shrink-0 items-center"},"logo",_createRawReactElement(SiteLogo,{alt:"Logo",className:"h-5 w-auto cursor-pointer"}),_createRawReactElement("span",{className:"hidden"},void 0,_createRawReactElement(FormattedMessage$1,{id:"tabs_bar.home",defaultMessage:"Home"}))),ot&&_createRawReactElement("div",{className:"hidden flex-1 items-center justify-center px-2 lg:ml-6 lg:flex lg:justify-start"},void 0,_createRawReactElement("div",{className:"hidden w-full max-w-xl lg:block lg:max-w-xs"},void 0,_createRawReactElement(Search,{openInRoute:!0,autosuggest:!0})))),_createRawReactElement(HStack,{space:3,alignItems:"center",className:"absolute inset-y-0 right-0 pr-2 lg:static lg:inset-auto lg:ml-6 lg:pr-0"},void 0,ot?_createRawReactElement("div",{className:"relative hidden items-center lg:flex"},void 0,_createRawReactElement(ProfileDropdown,{account:ot},void 0,_createRawReactElement(Avatar,{src:ot.avatar,size:34}))):React$3.createElement(React$3.Fragment,null,_createRawReactElement(Form,{className:"hidden items-center space-x-2 rtl:space-x-reverse lg:flex",onSubmit:Tt},void 0,_createRawReactElement(Input,{required:!0,value:ht,onChange:function(Nt){return Et(Nt.target.value)},type:"text",placeholder:tt.formatMessage(nt.logInWithUsername?messages$3.username:messages$3.email),className:"max-w-[200px]"}),_createRawReactElement(Input,{required:!0,value:gt,onChange:function(Nt){return St(Nt.target.value)},type:"password",placeholder:tt.formatMessage(messages$3.password),className:"max-w-[200px]"}),_createRawReactElement(Link$2,{to:"/reset-password"},void 0,_createRawReactElement(Tooltip,{text:tt.formatMessage(messages$3.forgotPassword)},void 0,_createRawReactElement(IconButton$1,{src:vitePluginRequire_1697861800392_33646738,className:"cursor-pointer bg-transparent text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-gray-200",iconClassName:"h-5 w-5"}))),_createRawReactElement(Button,{theme:"primary",type:"submit",disabled:dt},void 0,tt.formatMessage(messages$3.login))),_createRawReactElement("div",{className:"space-x-1.5 lg:hidden"},void 0,_createRawReactElement(Button,{theme:"tertiary",to:"/login",size:"sm"},void 0,_createRawReactElement(FormattedMessage$1,{id:"account.login",defaultMessage:"Log In"})),at&&_createRawReactElement(Button,{theme:"primary",to:"/signup",size:"sm"},void 0,_createRawReactElement(FormattedMessage$1,{id:"account.register",defaultMessage:"Sign up"}))))))))};const vitePluginRequire_1697861824494_3975291="/packs/assets/refresh-8bff2b6f.svg";var messages$2={title:{id:"bundle_column_error.title",defaultMessage:"Network error"},body:{id:"bundle_column_error.body",defaultMessage:"Something went wrong while loading this page."},retry:{id:"bundle_column_error.retry",defaultMessage:"Try again"}},BundleColumnError=function _e(et){var tt=et.onRetry,nt=useIntl(),rt=function(){tt()};return _createRawReactElement(Column,{label:nt.formatMessage(messages$2.title)},void 0,_createRawReactElement(Stack,{space:4,alignItems:"center",justifyContent:"center",className:"min-h-[160px] rounded-lg p-10"},void 0,_createRawReactElement(IconButton$1,{iconClassName:"h-10 w-10",title:nt.formatMessage(messages$2.retry),src:vitePluginRequire_1697861824494_3975291,onClick:rt}),_createRawReactElement(Text$2,{align:"center",theme:"muted"},void 0,nt.formatMessage(messages$2.body))))},messages$1={title:{id:"column_forbidden.title",defaultMessage:"Forbidden"},body:{id:"column_forbidden.body",defaultMessage:"You do not have permission to access this page."}},ColumnForbidden=function _e(){var et=useIntl();return _createRawReactElement(Column,{label:et.formatMessage(messages$1.title)},void 0,_createRawReactElement("div",{className:"error-column"},void 0,et.formatMessage(messages$1.body)))},ColumnsArea=function _e(et){var tt=et.children,nt=et.layout||{LEFT:null,RIGHT:null};return _createRawReactElement(Layout,{},void 0,_createRawReactElement(Layout.Sidebar,{},void 0,nt.LEFT),_createRawReactElement(Layout.Main,{},void 0,tt),_createRawReactElement(Layout.Aside,{},void 0,nt.RIGHT))},_excluded=["component","page","content","componentParams","layout","publicRoute","staffOnly","adminOnly","developerOnly"],WrappedRoute=function _e(et){var tt=et.component,nt=et.page,rt=et.content,at=et.componentParams,it=at===void 0?{}:at,ot=et.layout,st=et.publicRoute,ct=st===void 0?!1:st,ut=et.staffOnly,dt=ut===void 0?!1:ut,ft=et.adminOnly,pt=ft===void 0?!1:ft,mt=et.developerOnly,ht=mt===void 0?!1:mt,Et=_objectWithoutProperties(et,_excluded),yt=useHistory(),vt=useOwnAccount(),gt=vt.account,St=useSettings(),Rt=function(At){var kt=At.match;return nt?_createRawReactElement(BundleContainer,{fetchComponent:tt,loading:bt,error:xt},void 0,function(Pt){return React$3.createElement(nt,_extends$4({params:kt.params,layout:ot},it),React$3.createElement(Pt,_extends$4({params:kt.params},it),rt))}):_createRawReactElement(BundleContainer,{fetchComponent:tt,loading:bt,error:xt},void 0,function(Pt){return _createRawReactElement(ColumnsArea,{layout:ot},void 0,React$3.createElement(Pt,_extends$4({params:kt.params},it),rt))})},$t=function(At){return React$3.createElement(React$3.Fragment,null,_createRawReactElement(Layout.Main,{},void 0,At),_createRawReactElement(Layout.Aside,{}))},bt=function(){return $t(_createRawReactElement(ColumnLoading,{}))},wt=function(){return $t(_createRawReactElement(ColumnForbidden,{}))},xt=function(At){return $t(React$3.createElement(BundleColumnError,At))},Tt=function(){var At=encodeURIComponent("".concat(yt.location.pathname).concat(yt.location.search));return localStorage.setItem("soapbox:redirect_uri",At),_createRawReactElement(Redirect,{to:"/login"})},Ct=[gt||ct,ht?St.get("isDeveloper"):!0,dt?gt&>.staff:!0,pt?gt&>.admin:!0].every(function(Nt){return Nt});return Ct?React$3.createElement(Route$1,_extends$4({},Et,{render:Rt})):gt?wt():Tt()},GroupTagsSlug=withHoc(GroupTags,GroupLookupHoc),GroupTagTimelineSlug=withHoc(GroupTagTimeline,GroupLookupHoc),GroupTimelineSlug=withHoc(GroupTimeline,GroupLookupHoc),GroupMembersSlug=withHoc(GroupMembers,GroupLookupHoc),GroupGallerySlug=withHoc(GroupGallery,GroupLookupHoc),ManageGroupSlug=withHoc(ManageGroup,GroupLookupHoc),EditGroupSlug=withHoc(EditGroup,GroupLookupHoc),GroupBlockedMembersSlug=withHoc(GroupBlockedMembers,GroupLookupHoc),GroupMembershipRequestsSlug=withHoc(GroupMembershipRequests,GroupLookupHoc),EmptyPage=HomePage,SwitchingColumnsArea=function _e(et){var tt=et.children,nt=useFeatures(),rt=useLocation$1(),at=rt.search,it=useSoapboxConfig(),ot=it.authenticatedProfile;return _createRawReactElement(Switch,{},void 0,_createRawReactElement(WrappedRoute,{path:"/email-confirmation",page:EmptyPage,component:EmailConfirmation,publicRoute:!0,exact:!0}),_createRawReactElement(WrappedRoute,{path:"/logout",page:EmptyPage,component:LogoutPage,publicRoute:!0,exact:!0}),_createRawReactElement(WrappedRoute,{path:"/",exact:!0,page:HomePage,component:HomeTimeline,content:tt}),nt.federating&&_createRawReactElement(WrappedRoute,{path:"/timeline/local",exact:!0,page:HomePage,component:CommunityTimeline,content:tt,publicRoute:!0}),nt.federating&&_createRawReactElement(WrappedRoute,{path:"/timeline/fediverse",exact:!0,page:HomePage,component:PublicTimeline,content:tt,publicRoute:!0}),nt.federating&&_createRawReactElement(WrappedRoute,{path:"/timeline/:instance",exact:!0,page:RemoteInstancePage,component:RemoteTimeline,content:tt}),nt.conversations&&_createRawReactElement(WrappedRoute,{path:"/conversations",page:DefaultPage,component:Conversations,content:tt}),nt.directTimeline&&_createRawReactElement(WrappedRoute,{path:"/messages",page:DefaultPage,component:DirectTimeline,content:tt}),nt.conversations&&!nt.directTimeline&&_createRawReactElement(WrappedRoute,{path:"/messages",page:DefaultPage,component:Conversations,content:tt}),_createRawReactElement(Redirect,{from:"/web/:path1/:path2/:path3",to:"/:path1/:path2/:path3"}),_createRawReactElement(Redirect,{from:"/web/:path1/:path2",to:"/:path1/:path2"}),_createRawReactElement(Redirect,{from:"/web/:path",to:"/:path"}),_createRawReactElement(Redirect,{from:"/timelines/home",to:"/"}),_createRawReactElement(Redirect,{from:"/timelines/public/local",to:"/timeline/local"}),_createRawReactElement(Redirect,{from:"/timelines/public",to:"/timeline/fediverse"}),_createRawReactElement(Redirect,{from:"/timelines/direct",to:"/messages"}),_createRawReactElement(Redirect,{from:"/main/all",to:"/timeline/fediverse"}),_createRawReactElement(Redirect,{from:"/main/public",to:"/timeline/local"}),_createRawReactElement(Redirect,{from:"/main/friends",to:"/"}),_createRawReactElement(Redirect,{from:"/tag/:id",to:"/tags/:id"}),_createRawReactElement(Redirect,{from:"/user-settings",to:"/settings/profile"}),_createRawReactElement(Redirect,{from:"/notice/:statusId",to:"/posts/:statusId"}),_createRawReactElement(Redirect,{from:"/users/:username/statuses/:statusId",to:"/@:username/posts/:statusId"}),_createRawReactElement(Redirect,{from:"/users/:username/chats",to:"/chats"}),_createRawReactElement(Redirect,{from:"/users/:username",to:"/@:username"}),_createRawReactElement(Redirect,{from:"/registration",to:"/",exact:!0}),_createRawReactElement(Redirect,{from:"/home",to:"/"}),_createRawReactElement(Redirect,{from:"/admin",to:"/ghostbox/admin"}),_createRawReactElement(Redirect,{from:"/terms",to:"/about"}),_createRawReactElement(Redirect,{from:"/settings/preferences",to:"/settings"}),_createRawReactElement(Redirect,{from:"/settings/two_factor_authentication_methods",to:"/settings/mfa"}),_createRawReactElement(Redirect,{from:"/settings/otp_authentication",to:"/settings/mfa"}),_createRawReactElement(Redirect,{from:"/settings/applications",to:"/developers"}),_createRawReactElement(Redirect,{from:"/auth/edit",to:"/settings"}),_createRawReactElement(Redirect,{from:"/auth/confirmation",to:"/email-confirmation".concat(at)}),_createRawReactElement(Redirect,{from:"/auth/reset_password",to:"/reset-password"}),_createRawReactElement(Redirect,{from:"/auth/edit_password",to:"/edit-password"}),_createRawReactElement(Redirect,{from:"/auth/sign_in",to:"/login"}),_createRawReactElement(Redirect,{from:"/auth/sign_out",to:"/logout"}),_createRawReactElement(Redirect,{from:"/registration/:token",to:"/invite/:token"}),_createRawReactElement(Redirect,{from:"/canary",to:"/about/canary"}),_createRawReactElement(Redirect,{from:"/canary.txt",to:"/about/canary"}),_createRawReactElement(Redirect,{from:"/auth/external",to:"/login/external"}),_createRawReactElement(Redirect,{from:"/auth/mfa",to:"/settings/mfa"}),_createRawReactElement(Redirect,{from:"/auth/password/new",to:"/reset-password"}),_createRawReactElement(Redirect,{from:"/auth/password/edit",to:"/edit-password".concat(at)}),_createRawReactElement(WrappedRoute,{path:"/tags/:id",publicRoute:!0,page:DefaultPage,component:HashtagTimeline,content:tt}),nt.lists&&_createRawReactElement(WrappedRoute,{path:"/lists",page:DefaultPage,component:Lists,content:tt}),nt.lists&&_createRawReactElement(WrappedRoute,{path:"/list/:id",page:DefaultPage,component:ListTimeline,content:tt}),nt.bookmarks&&_createRawReactElement(WrappedRoute,{path:"/bookmarks",page:DefaultPage,component:Bookmarks,content:tt}),_createRawReactElement(WrappedRoute,{path:"/notifications",page:DefaultPage,component:Notifications,content:tt}),_createRawReactElement(WrappedRoute,{path:"/search",page:SearchPage,component:Search$1,content:tt}),nt.suggestions&&_createRawReactElement(WrappedRoute,{path:"/suggestions",publicRoute:!0,page:DefaultPage,component:FollowRecommendations,content:tt}),nt.profileDirectory&&_createRawReactElement(WrappedRoute,{path:"/directory",publicRoute:!0,page:DefaultPage,component:Directory,content:tt}),nt.events&&_createRawReactElement(WrappedRoute,{path:"/events",page:EventsPage,component:Events,content:tt}),nt.chats&&_createRawReactElement(WrappedRoute,{path:"/chats",exact:!0,page:ChatsPage,component:ChatIndex,content:tt}),nt.chats&&_createRawReactElement(WrappedRoute,{path:"/chats/new",page:ChatsPage,component:ChatIndex,content:tt}),nt.chats&&_createRawReactElement(WrappedRoute,{path:"/chats/settings",page:ChatsPage,component:ChatIndex,content:tt}),nt.chats&&_createRawReactElement(WrappedRoute,{path:"/chats/:chatId",page:ChatsPage,component:ChatIndex,content:tt}),_createRawReactElement(WrappedRoute,{path:"/follow_requests",page:DefaultPage,component:FollowRequests,content:tt}),_createRawReactElement(WrappedRoute,{path:"/blocks",page:DefaultPage,component:Blocks,content:tt}),nt.federating&&_createRawReactElement(WrappedRoute,{path:"/domain_blocks",page:DefaultPage,component:DomainBlocks,content:tt}),_createRawReactElement(WrappedRoute,{path:"/mutes",page:DefaultPage,component:Mutes,content:tt}),(nt.filters||nt.filtersV2)&&_createRawReactElement(WrappedRoute,{path:"/filters/new",page:DefaultPage,component:EditFilter,content:tt}),(nt.filters||nt.filtersV2)&&_createRawReactElement(WrappedRoute,{path:"/filters/:id",page:DefaultPage,component:EditFilter,content:tt}),(nt.filters||nt.filtersV2)&&_createRawReactElement(WrappedRoute,{path:"/filters",page:DefaultPage,component:Filters,content:tt}),nt.followedHashtagsList&&_createRawReactElement(WrappedRoute,{path:"/followed_tags",page:DefaultPage,component:FollowedTags,content:tt}),_createRawReactElement(WrappedRoute,{path:"/@:username",publicRoute:!0,exact:!0,component:AccountTimeline,page:ProfilePage,content:tt}),_createRawReactElement(WrappedRoute,{path:"/@:username/with_replies",publicRoute:!ot,component:AccountTimeline,page:ProfilePage,content:tt,componentParams:{withReplies:!0}}),_createRawReactElement(WrappedRoute,{path:"/@:username/followers",publicRoute:!ot,component:Followers,page:ProfilePage,content:tt}),_createRawReactElement(WrappedRoute,{path:"/@:username/following",publicRoute:!ot,component:Following,page:ProfilePage,content:tt}),_createRawReactElement(WrappedRoute,{path:"/@:username/media",publicRoute:!ot,component:AccountGallery,page:ProfilePage,content:tt}),_createRawReactElement(WrappedRoute,{path:"/@:username/tagged/:tag",exact:!0,component:AccountTimeline,page:ProfilePage,content:tt}),_createRawReactElement(WrappedRoute,{path:"/@:username/favorites",component:FavouritedStatuses,page:ProfilePage,content:tt}),_createRawReactElement(WrappedRoute,{path:"/@:username/pins",component:PinnedStatuses,page:ProfilePage,content:tt}),_createRawReactElement(WrappedRoute,{path:"/@:username/posts/:statusId",publicRoute:!0,exact:!0,page:StatusPage,component:Status$1,content:tt}),_createRawReactElement(WrappedRoute,{path:"/posts/:statusId",publicRoute:!0,exact:!0,page:DefaultPage,component:Status$1,content:tt}),_createRawReactElement(WrappedRoute,{path:"/@:username/posts/:statusId/quotes",publicRoute:!0,page:StatusPage,component:Quotes,content:tt}),nt.events&&_createRawReactElement(WrappedRoute,{path:"/@:username/events/:statusId",publicRoute:!0,exact:!0,page:EventPage,component:EventInformation,content:tt}),nt.events&&_createRawReactElement(WrappedRoute,{path:"/@:username/events/:statusId/discussion",publicRoute:!0,exact:!0,page:EventPage,component:EventDiscussion,content:tt}),_createRawReactElement(Redirect,{from:"/@:username/:statusId",to:"/@:username/posts/:statusId"}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/groups",exact:!0,page:GroupsPage,component:Groups,content:tt}),nt.groupsDiscovery&&_createRawReactElement(WrappedRoute,{path:"/groups/discover",exact:!0,page:GroupsPage,component:GroupsDiscover,content:tt}),nt.groupsDiscovery&&_createRawReactElement(WrappedRoute,{path:"/groups/popular",exact:!0,page:GroupsPendingPage,component:GroupsPopular,content:tt}),nt.groupsDiscovery&&_createRawReactElement(WrappedRoute,{path:"/groups/suggested",exact:!0,page:GroupsPendingPage,component:GroupsSuggested,content:tt}),nt.groupsDiscovery&&_createRawReactElement(WrappedRoute,{path:"/groups/tags",exact:!0,page:GroupsPendingPage,component:GroupsTags,content:tt}),nt.groupsDiscovery&&_createRawReactElement(WrappedRoute,{path:"/groups/discover/tags/:id",exact:!0,page:GroupsPendingPage,component:GroupsTag,content:tt}),nt.groupsPending&&_createRawReactElement(WrappedRoute,{path:"/groups/pending-requests",exact:!0,page:GroupsPendingPage,component:PendingGroupRequests,content:tt}),nt.groupsTags&&_createRawReactElement(WrappedRoute,{path:"/groups/:groupId/tags",exact:!0,page:GroupPage$1,component:GroupTags,content:tt}),nt.groupsTags&&_createRawReactElement(WrappedRoute,{path:"/groups/:groupId/tag/:id",exact:!0,page:GroupsPendingPage,component:GroupTagTimeline,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/groups/:groupId",exact:!0,page:GroupPage$1,component:GroupTimeline,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/groups/:groupId/members",exact:!0,page:GroupPage$1,component:GroupMembers,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/groups/:groupId/media",publicRoute:!ot,component:GroupGallery,page:GroupPage$1,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/groups/:groupId/manage",exact:!0,page:ManageGroupsPage,component:ManageGroup,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/groups/:groupId/manage/edit",exact:!0,page:ManageGroupsPage,component:EditGroup,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/groups/:groupId/manage/blocks",exact:!0,page:ManageGroupsPage,component:GroupBlockedMembers,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/groups/:groupId/manage/requests",exact:!0,page:ManageGroupsPage,component:GroupMembershipRequests,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/groups/:groupId/posts/:statusId",exact:!0,page:StatusPage,component:Status$1,content:tt}),nt.groupsTags&&_createRawReactElement(WrappedRoute,{path:"/group/:groupSlug/tags",exact:!0,page:GroupPage$1,component:GroupTagsSlug,content:tt}),nt.groupsTags&&_createRawReactElement(WrappedRoute,{path:"/group/:groupSlug/tag/:tagId",exact:!0,page:GroupsPendingPage,component:GroupTagTimelineSlug,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/group/:groupSlug",publicRoute:!0,exact:!0,page:GroupPage$1,component:GroupTimelineSlug,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/group/:groupSlug/members",exact:!0,page:GroupPage$1,component:GroupMembersSlug,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/group/:groupSlug/media",publicRoute:!ot,component:GroupGallerySlug,page:GroupPage$1,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/group/:groupSlug/manage",exact:!0,page:ManageGroupsPage,component:ManageGroupSlug,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/group/:groupSlug/manage/edit",exact:!0,page:ManageGroupsPage,component:EditGroupSlug,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/group/:groupSlug/manage/blocks",exact:!0,page:ManageGroupsPage,component:GroupBlockedMembersSlug,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/group/:groupSlug/manage/requests",exact:!0,page:ManageGroupsPage,component:GroupMembershipRequestsSlug,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/group/:groupSlug/posts/:statusId",exact:!0,page:StatusPage,component:Status$1,content:tt}),nt.groups&&_createRawReactElement(Redirect,{from:"/group/:groupSlug/statuses/:statusId",to:"/group/:groupSlug/posts/:statusId"}),_createRawReactElement(WrappedRoute,{path:"/statuses/new",page:DefaultPage,component:NewStatus,content:tt,exact:!0}),_createRawReactElement(WrappedRoute,{path:"/statuses/:statusId",exact:!0,page:StatusPage,component:Status$1,content:tt}),nt.scheduledStatuses&&_createRawReactElement(WrappedRoute,{path:"/scheduled_statuses",page:DefaultPage,component:ScheduledStatuses,content:tt}),_createRawReactElement(WrappedRoute,{path:"/settings/profile",page:DefaultPage,component:EditProfile,content:tt}),nt.exportData&&_createRawReactElement(WrappedRoute,{path:"/settings/export",page:DefaultPage,component:ExportData,content:tt}),nt.importData&&_createRawReactElement(WrappedRoute,{path:"/settings/import",page:DefaultPage,component:ImportData,content:tt}),nt.accountAliases&&_createRawReactElement(WrappedRoute,{path:"/settings/aliases",page:DefaultPage,component:Aliases,content:tt}),nt.accountMoving&&_createRawReactElement(WrappedRoute,{path:"/settings/migration",page:DefaultPage,component:Migration,content:tt}),nt.backups&&_createRawReactElement(WrappedRoute,{path:"/settings/backups",page:DefaultPage,component:Backups,content:tt}),_createRawReactElement(WrappedRoute,{path:"/settings/email",page:DefaultPage,component:EditEmail,content:tt}),_createRawReactElement(WrappedRoute,{path:"/settings/password",page:DefaultPage,component:EditPassword,content:tt}),_createRawReactElement(WrappedRoute,{path:"/settings/account",page:DefaultPage,component:DeleteAccount,content:tt}),_createRawReactElement(WrappedRoute,{path:"/settings/mfa",page:DefaultPage,component:MfaForm,exact:!0}),_createRawReactElement(WrappedRoute,{path:"/settings/tokens",page:DefaultPage,component:AuthTokenList,content:tt}),_createRawReactElement(WrappedRoute,{path:"/settings",page:DefaultPage,component:Settings,content:tt}),_createRawReactElement(WrappedRoute,{path:"/ghostbox/admin/config",adminOnly:!0,page:DefaultPage,component:SoapboxConfig,content:tt}),_createRawReactElement(WrappedRoute,{path:"/ghostbox/admin",staffOnly:!0,page:AdminPage,component:Dashboard,content:tt,exact:!0}),_createRawReactElement(WrappedRoute,{path:"/ghostbox/admin/approval",staffOnly:!0,page:AdminPage,component:Dashboard,content:tt,exact:!0}),_createRawReactElement(WrappedRoute,{path:"/ghostbox/admin/reports",staffOnly:!0,page:AdminPage,component:Dashboard,content:tt,exact:!0}),_createRawReactElement(WrappedRoute,{path:"/ghostbox/admin/log",staffOnly:!0,page:AdminPage,component:ModerationLog,content:tt,exact:!0}),_createRawReactElement(WrappedRoute,{path:"/ghostbox/admin/users",staffOnly:!0,page:AdminPage,component:UserIndex,content:tt,exact:!0}),_createRawReactElement(WrappedRoute,{path:"/ghostbox/admin/theme",staffOnly:!0,page:AdminPage,component:ThemeEditor,content:tt,exact:!0}),_createRawReactElement(WrappedRoute,{path:"/ghostbox/admin/announcements",staffOnly:!0,page:AdminPage,component:Announcements,content:tt,exact:!0}),_createRawReactElement(WrappedRoute,{path:"/info",page:EmptyPage,component:ServerInfo,content:tt}),_createRawReactElement(WrappedRoute,{path:"/developers/apps/create",developerOnly:!0,page:DefaultPage,component:CreateApp,content:tt}),_createRawReactElement(WrappedRoute,{path:"/developers/settings_store",developerOnly:!0,page:DefaultPage,component:SettingsStore,content:tt}),_createRawReactElement(WrappedRoute,{path:"/developers/timeline",developerOnly:!0,page:DefaultPage,component:TestTimeline,content:tt}),_createRawReactElement(WrappedRoute,{path:"/developers/sw",developerOnly:!0,page:DefaultPage,component:ServiceWorkerInfo,content:tt}),_createRawReactElement(WrappedRoute,{path:"/developers",page:DefaultPage,component:Developers,content:tt}),_createRawReactElement(WrappedRoute,{path:"/error/network",developerOnly:!0,page:EmptyPage,component:function(){return new Promise(function(ct,ut){return ut()})},content:tt}),_createRawReactElement(WrappedRoute,{path:"/error",developerOnly:!0,page:EmptyPage,component:IntentionalError,content:tt}),nt.federating&&_createRawReactElement(WrappedRoute,{path:"/federation_restrictions",publicRoute:!0,page:DefaultPage,component:FederationRestrictions,content:tt}),_createRawReactElement(WrappedRoute,{path:"/share",page:DefaultPage,component:Share,content:tt,exact:!0}),_createRawReactElement(WrappedRoute,{page:EmptyPage,component:GenericNotFound,content:tt}))},UI=function _e(et){var tt=et.children,nt=useHistory(),rt=useAppDispatch(),at=usePendingPolicy(),it=at.data,ot=reactExports.useRef(null),st=useAppSelector(function(xt){return xt.me}),ct=useOwnAccount(),ut=ct.account,dt=useFeatures(),ft=useAppSelector(function(xt){return getVapidKey(xt)}),pt=useAppSelector(function(xt){return xt.dropdown_menu.isOpen}),mt=useAppSelector(isStandalone),ht=useDraggedFiles(ot),Et=ht.isDragging,yt=function(Tt){var Ct=Tt.data;Ct.type==="navigate"?nt.push(Ct.path):console.warn("Unknown message type:",Ct.type)},vt=function(Tt){return Tt.preventDefault()},gt=function(Tt){return Tt.preventDefault()},St=function(Tt){return Tt.preventDefault()},Rt=function(Tt){return Tt.preventDefault()},$t=function(){ut&&(rt(expandHomeTimeline({},function(){rt(fetchSuggestionsForTimeline())})),rt(expandNotifications()).then(function(){return rt(fetchMarker(["notifications"]))}).catch(console.error),rt(fetchAnnouncements()),ut.staff&&(rt(fetchReports({resolved:!1})),rt(fetchUsers(["local","need_approval"]))),ut.admin&&rt(fetchConfig()),setTimeout(function(){return rt(fetchFilters())},500),ut.locked&&setTimeout(function(){return rt(fetchFollowRequests())},700),setTimeout(function(){return rt(fetchScheduledStatuses())},900))};reactExports.useEffect(function(){var xt;"serviceWorker"in navigator&&navigator.serviceWorker.addEventListener("message",yt),((xt=window.Notification)===null||xt===void 0?void 0:xt.permission)==="default"&&window.setTimeout(function(){return Notification.requestPermission()},120*1e3)},[]),reactExports.useEffect(function(){return document.addEventListener("dragenter",vt),document.addEventListener("dragleave",gt),document.addEventListener("dragover",St),document.addEventListener("drop",Rt),function(){document.removeEventListener("dragenter",vt),document.removeEventListener("dragleave",gt),document.removeEventListener("dragover",St),document.removeEventListener("drop",Rt)}},[]),useUserStream(),reactExports.useEffect(function(){$t(),rt(fetchCustomEmojis())},[!!ut]),reactExports.useEffect(function(){rt(register())},[ft]),reactExports.useEffect(function(){ut&&it&&supportedPolicyIds.includes(it.pending_policy_id)&&setTimeout(function(){rt(openModal("POLICY"))},500)},[it,!!ut]);var bt=function(){var Tt=location.pathname;return!!Tt.match(/^\/posts\/|^\/search|^\/getting-started|^\/chats/)};if(st===null)return null;var wt={pointerEvents:pt?"none":void 0};return React$3.createElement("div",{ref:ot,style:wt},_createRawReactElement("div",{className:clsx("pointer-events-none fixed z-[90] h-screen w-screen transition",{"backdrop-blur":Et})}),_createRawReactElement(BackgroundShapes,{}),_createRawReactElement("div",{className:"z-10 flex flex-col"},void 0,_createRawReactElement(Navbar,{}),_createRawReactElement(Layout,{},void 0,_createRawReactElement(Layout.Sidebar,{},void 0,!mt&&_createRawReactElement(SidebarNavigation,{})),_createRawReactElement(SwitchingColumnsArea,{},void 0,tt)),st&&!bt()&&_createRawReactElement("div",{className:"fixed bottom-24 right-4 z-40 transition-all rtl:left-4 rtl:right-auto lg:hidden"},void 0,_createRawReactElement(FloatingActionButton,{})),st&&_createRawReactElement(BundleContainer,{fetchComponent:SidebarMenu},void 0,function(xt){return _createRawReactElement(xt,{})}),st&&dt.chats&&_createRawReactElement(BundleContainer,{fetchComponent:ChatWidget},void 0,function(xt){return _createRawReactElement("div",{className:"hidden xl:block"},void 0,_createRawReactElement(xt,{}))}),_createRawReactElement(ThumbNavigation,{}),_createRawReactElement(BundleContainer,{fetchComponent:ProfileHoverCard},void 0,function(xt){return _createRawReactElement(xt,{})}),_createRawReactElement(BundleContainer,{fetchComponent:StatusHoverCard},void 0,function(xt){return _createRawReactElement(xt,{})})))};const isFailType=_e=>_e.endsWith("_FAIL"),isRememberFailType=_e=>_e.endsWith("_REMEMBER_FAIL"),hasResponse=_e=>!!(_e&&_e.response),authorized=_e=>{var et;return((et=_e==null?void 0:_e.response)==null?void 0:et.status)!==401},shouldShowError=({type:_e,skipAlert:et,error:tt})=>!et&&hasResponse(tt)&&authorized(tt)&&isFailType(_e)&&!isRememberFailType(_e),errorsMiddleware=()=>()=>_e=>et=>(shouldShowError(et)&&toast.showAlertForError(et.error),_e(et));function soundsMiddleware(){return()=>_e=>et=>{var tt;return(tt=et.meta)!=null&&tt.sound&&soundCache[et.meta.sound]&&play(soundCache[et.meta.sound]),_e(et)}}var dist={},combineReducers$1={exports:{}};const require$$0=getAugmentedNamespace(immutable_es);var utilities={},getStateName={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0}),et.default=function(tt){return tt&&tt.type==="@@redux/INIT"?"initialState argument passed to createStore":"previous state received by the reducer"},_e.exports=et.default})(getStateName,getStateName.exports);var getStateNameExports=getStateName.exports,getUnexpectedInvocationParameterMessage={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});var tt=require$$0,nt=it(tt),rt=getStateNameExports,at=it(rt);function it(ot){return ot&&ot.__esModule?ot:{default:ot}}et.default=function(ot,st,ct){var ut=Object.keys(st);if(!ut.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";var dt=(0,at.default)(ct);if(nt.default.isImmutable?!nt.default.isImmutable(ot):!nt.default.Iterable.isIterable(ot))return"The "+dt+' is of unexpected type. Expected argument to be an instance of Immutable.Collection or Immutable.Record with the following properties: "'+ut.join('", "')+'".';var ft=ot.toSeq().keySeq().toArray().filter(function(pt){return!st.hasOwnProperty(pt)});return ft.length>0?"Unexpected "+(ft.length===1?"property":"properties")+' "'+ft.join('", "')+'" found in '+dt+'. Expected to find one of the known reducer property names instead: "'+ut.join('", "')+'". Unexpected properties will be ignored.':null},_e.exports=et.default})(getUnexpectedInvocationParameterMessage,getUnexpectedInvocationParameterMessage.exports);var getUnexpectedInvocationParameterMessageExports=getUnexpectedInvocationParameterMessage.exports,validateNextState={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0}),et.default=function(tt,nt,rt){if(tt===void 0)throw new Error('Reducer "'+nt+'" returned undefined when handling "'+rt.type+'" action. To ignore an action, you must explicitly return the previous state.')},_e.exports=et.default})(validateNextState,validateNextState.exports);var validateNextStateExports=validateNextState.exports;Object.defineProperty(utilities,"__esModule",{value:!0});utilities.validateNextState=utilities.getUnexpectedInvocationParameterMessage=utilities.getStateName=void 0;var _getStateName2=getStateNameExports,_getStateName3=_interopRequireDefault$1(_getStateName2),_getUnexpectedInvocationParameterMessage2=getUnexpectedInvocationParameterMessageExports,_getUnexpectedInvocationParameterMessage3=_interopRequireDefault$1(_getUnexpectedInvocationParameterMessage2),_validateNextState2=validateNextStateExports,_validateNextState3=_interopRequireDefault$1(_validateNextState2);function _interopRequireDefault$1(_e){return _e&&_e.__esModule?_e:{default:_e}}utilities.getStateName=_getStateName3.default;utilities.getUnexpectedInvocationParameterMessage=_getUnexpectedInvocationParameterMessage3.default;utilities.validateNextState=_validateNextState3.default;(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});var tt=require$$0,nt=at(tt),rt=utilities;function at(it){return it&&it.__esModule?it:{default:it}}et.default=function(it){var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:nt.default.Map,st=Object.keys(it);return function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ot(),ut=arguments[1];return ct.withMutations(function(dt){st.forEach(function(ft){var pt=it[ft],mt=dt.get(ft),ht=pt(mt,ut);(0,rt.validateNextState)(ht,ft,ut),dt.set(ft,ht)})})}},_e.exports=et.default})(combineReducers$1,combineReducers$1.exports);var combineReducersExports=combineReducers$1.exports;Object.defineProperty(dist,"__esModule",{value:!0});var combineReducers=dist.combineReducers=void 0,_combineReducers2=combineReducersExports,_combineReducers3=_interopRequireDefault(_combineReducers2);function _interopRequireDefault(_e){return _e&&_e.__esModule?_e:{default:_e}}combineReducers=dist.combineReducers=_combineReducers3.default;var NOTHING=Symbol.for("immer-nothing"),DRAFTABLE=Symbol.for("immer-draftable"),DRAFT_STATE=Symbol.for("immer-state");function die(_e,...et){throw new Error(`[Immer] minified error nr: ${_e}. Full error at: https://bit.ly/3cXEKWf`)}var getPrototypeOf=Object.getPrototypeOf;function isDraft(_e){return!!_e&&!!_e[DRAFT_STATE]}function isDraftable(_e){var et;return _e?isPlainObject(_e)||Array.isArray(_e)||!!_e[DRAFTABLE]||!!((et=_e.constructor)!=null&&et[DRAFTABLE])||isMap(_e)||isSet(_e):!1}var objectCtorString=Object.prototype.constructor.toString();function isPlainObject(_e){if(!_e||typeof _e!="object")return!1;const et=getPrototypeOf(_e);if(et===null)return!0;const tt=Object.hasOwnProperty.call(et,"constructor")&&et.constructor;return tt===Object?!0:typeof tt=="function"&&Function.toString.call(tt)===objectCtorString}function each(_e,et){getArchtype(_e)===0?Object.entries(_e).forEach(([tt,nt])=>{et(tt,nt,_e)}):_e.forEach((tt,nt)=>et(nt,tt,_e))}function getArchtype(_e){const et=_e[DRAFT_STATE];return et?et.type_:Array.isArray(_e)?1:isMap(_e)?2:isSet(_e)?3:0}function has(_e,et){return getArchtype(_e)===2?_e.has(et):Object.prototype.hasOwnProperty.call(_e,et)}function set(_e,et,tt){const nt=getArchtype(_e);nt===2?_e.set(et,tt):nt===3?_e.add(tt):_e[et]=tt}function is(_e,et){return _e===et?_e!==0||1/_e===1/et:_e!==_e&&et!==et}function isMap(_e){return _e instanceof Map}function isSet(_e){return _e instanceof Set}function latest(_e){return _e.copy_||_e.base_}function shallowCopy(_e,et){if(isMap(_e))return new Map(_e);if(isSet(_e))return new Set(_e);if(Array.isArray(_e))return Array.prototype.slice.call(_e);if(!et&&isPlainObject(_e))return getPrototypeOf(_e)?{..._e}:Object.assign(Object.create(null),_e);const tt=Object.getOwnPropertyDescriptors(_e);delete tt[DRAFT_STATE];let nt=Reflect.ownKeys(tt);for(let rt=0;rt1&&(_e.set=_e.add=_e.clear=_e.delete=dontMutateFrozenCollections),Object.freeze(_e),et&&each(_e,(tt,nt)=>freeze(nt,!0))),_e}function dontMutateFrozenCollections(){die(2)}function isFrozen(_e){return Object.isFrozen(_e)}var plugins={};function getPlugin(_e){const et=plugins[_e];return et||die(0,_e),et}function loadPlugin(_e,et){plugins[_e]||(plugins[_e]=et)}var currentScope;function getCurrentScope(){return currentScope}function createScope(_e,et){return{drafts_:[],parent_:_e,immer_:et,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function usePatchesInScope(_e,et){et&&(getPlugin("Patches"),_e.patches_=[],_e.inversePatches_=[],_e.patchListener_=et)}function revokeScope(_e){leaveScope(_e),_e.drafts_.forEach(revokeDraft),_e.drafts_=null}function leaveScope(_e){_e===currentScope&&(currentScope=_e.parent_)}function enterScope(_e){return currentScope=createScope(currentScope,_e)}function revokeDraft(_e){const et=_e[DRAFT_STATE];et.type_===0||et.type_===1?et.revoke_():et.revoked_=!0}function processResult(_e,et){et.unfinalizedDrafts_=et.drafts_.length;const tt=et.drafts_[0];return _e!==void 0&&_e!==tt?(tt[DRAFT_STATE].modified_&&(revokeScope(et),die(4)),isDraftable(_e)&&(_e=finalize(et,_e),et.parent_||maybeFreeze(et,_e)),et.patches_&&getPlugin("Patches").generateReplacementPatches_(tt[DRAFT_STATE].base_,_e,et.patches_,et.inversePatches_)):_e=finalize(et,tt,[]),revokeScope(et),et.patches_&&et.patchListener_(et.patches_,et.inversePatches_),_e!==NOTHING?_e:void 0}function finalize(_e,et,tt){if(isFrozen(et))return et;const nt=et[DRAFT_STATE];if(!nt)return each(et,(rt,at)=>finalizeProperty(_e,nt,et,rt,at,tt)),et;if(nt.scope_!==_e)return et;if(!nt.modified_)return maybeFreeze(_e,nt.base_,!0),nt.base_;if(!nt.finalized_){nt.finalized_=!0,nt.scope_.unfinalizedDrafts_--;const rt=nt.copy_;let at=rt,it=!1;nt.type_===3&&(at=new Set(rt),rt.clear(),it=!0),each(at,(ot,st)=>finalizeProperty(_e,nt,rt,ot,st,tt,it)),maybeFreeze(_e,rt,!1),tt&&_e.patches_&&getPlugin("Patches").generatePatches_(nt,tt,_e.patches_,_e.inversePatches_)}return nt.copy_}function finalizeProperty(_e,et,tt,nt,rt,at,it){if(isDraft(rt)){const ot=at&&et&&et.type_!==3&&!has(et.assigned_,nt)?at.concat(nt):void 0,st=finalize(_e,rt,ot);if(set(tt,nt,st),isDraft(st))_e.canAutoFreeze_=!1;else return}else it&&tt.add(rt);if(isDraftable(rt)&&!isFrozen(rt)){if(!_e.immer_.autoFreeze_&&_e.unfinalizedDrafts_<1)return;finalize(_e,rt),(!et||!et.scope_.parent_)&&maybeFreeze(_e,rt)}}function maybeFreeze(_e,et,tt=!1){!_e.parent_&&_e.immer_.autoFreeze_&&_e.canAutoFreeze_&&freeze(et,tt)}function createProxyProxy(_e,et){const tt=Array.isArray(_e),nt={type_:tt?1:0,scope_:et?et.scope_:getCurrentScope(),modified_:!1,finalized_:!1,assigned_:{},parent_:et,base_:_e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let rt=nt,at=objectTraps;tt&&(rt=[nt],at=arrayTraps);const{revoke:it,proxy:ot}=Proxy.revocable(rt,at);return nt.draft_=ot,nt.revoke_=it,ot}var objectTraps={get(_e,et){if(et===DRAFT_STATE)return _e;const tt=latest(_e);if(!has(tt,et))return readPropFromProto(_e,tt,et);const nt=tt[et];return _e.finalized_||!isDraftable(nt)?nt:nt===peek(_e.base_,et)?(prepareCopy(_e),_e.copy_[et]=createProxy(nt,_e)):nt},has(_e,et){return et in latest(_e)},ownKeys(_e){return Reflect.ownKeys(latest(_e))},set(_e,et,tt){const nt=getDescriptorFromProto(latest(_e),et);if(nt!=null&&nt.set)return nt.set.call(_e.draft_,tt),!0;if(!_e.modified_){const rt=peek(latest(_e),et),at=rt==null?void 0:rt[DRAFT_STATE];if(at&&at.base_===tt)return _e.copy_[et]=tt,_e.assigned_[et]=!1,!0;if(is(tt,rt)&&(tt!==void 0||has(_e.base_,et)))return!0;prepareCopy(_e),markChanged(_e)}return _e.copy_[et]===tt&&(tt!==void 0||et in _e.copy_)||Number.isNaN(tt)&&Number.isNaN(_e.copy_[et])||(_e.copy_[et]=tt,_e.assigned_[et]=!0),!0},deleteProperty(_e,et){return peek(_e.base_,et)!==void 0||et in _e.base_?(_e.assigned_[et]=!1,prepareCopy(_e),markChanged(_e)):delete _e.assigned_[et],_e.copy_&&delete _e.copy_[et],!0},getOwnPropertyDescriptor(_e,et){const tt=latest(_e),nt=Reflect.getOwnPropertyDescriptor(tt,et);return nt&&{writable:!0,configurable:_e.type_!==1||et!=="length",enumerable:nt.enumerable,value:tt[et]}},defineProperty(){die(11)},getPrototypeOf(_e){return getPrototypeOf(_e.base_)},setPrototypeOf(){die(12)}},arrayTraps={};each(objectTraps,(_e,et)=>{arrayTraps[_e]=function(){return arguments[0]=arguments[0][0],et.apply(this,arguments)}});arrayTraps.deleteProperty=function(_e,et){return arrayTraps.set.call(this,_e,et,void 0)};arrayTraps.set=function(_e,et,tt){return objectTraps.set.call(this,_e[0],et,tt,_e[0])};function peek(_e,et){const tt=_e[DRAFT_STATE];return(tt?latest(tt):_e)[et]}function readPropFromProto(_e,et,tt){var rt;const nt=getDescriptorFromProto(et,tt);return nt?"value"in nt?nt.value:(rt=nt.get)==null?void 0:rt.call(_e.draft_):void 0}function getDescriptorFromProto(_e,et){if(!(et in _e))return;let tt=getPrototypeOf(_e);for(;tt;){const nt=Object.getOwnPropertyDescriptor(tt,et);if(nt)return nt;tt=getPrototypeOf(tt)}}function markChanged(_e){_e.modified_||(_e.modified_=!0,_e.parent_&&markChanged(_e.parent_))}function prepareCopy(_e){_e.copy_||(_e.copy_=shallowCopy(_e.base_,_e.scope_.immer_.useStrictShallowCopy_))}var Immer2=class{constructor(_e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(et,tt,nt)=>{if(typeof et=="function"&&typeof tt!="function"){const at=tt;tt=et;const it=this;return function(st=at,...ct){return it.produce(st,ut=>tt.call(this,ut,...ct))}}typeof tt!="function"&&die(6),nt!==void 0&&typeof nt!="function"&&die(7);let rt;if(isDraftable(et)){const at=enterScope(this),it=createProxy(et,void 0);let ot=!0;try{rt=tt(it),ot=!1}finally{ot?revokeScope(at):leaveScope(at)}return usePatchesInScope(at,nt),processResult(rt,at)}else if(!et||typeof et!="object"){if(rt=tt(et),rt===void 0&&(rt=et),rt===NOTHING&&(rt=void 0),this.autoFreeze_&&freeze(rt,!0),nt){const at=[],it=[];getPlugin("Patches").generateReplacementPatches_(et,rt,at,it),nt(at,it)}return rt}else die(1,et)},this.produceWithPatches=(et,tt)=>{if(typeof et=="function")return(it,...ot)=>this.produceWithPatches(it,st=>et(st,...ot));let nt,rt;return[this.produce(et,tt,(it,ot)=>{nt=it,rt=ot}),nt,rt]},typeof(_e==null?void 0:_e.autoFreeze)=="boolean"&&this.setAutoFreeze(_e.autoFreeze),typeof(_e==null?void 0:_e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(_e.useStrictShallowCopy)}createDraft(_e){isDraftable(_e)||die(8),isDraft(_e)&&(_e=current(_e));const et=enterScope(this),tt=createProxy(_e,void 0);return tt[DRAFT_STATE].isManual_=!0,leaveScope(et),tt}finishDraft(_e,et){const tt=_e&&_e[DRAFT_STATE];(!tt||!tt.isManual_)&&die(9);const{scope_:nt}=tt;return usePatchesInScope(nt,et),processResult(void 0,nt)}setAutoFreeze(_e){this.autoFreeze_=_e}setUseStrictShallowCopy(_e){this.useStrictShallowCopy_=_e}applyPatches(_e,et){let tt;for(tt=et.length-1;tt>=0;tt--){const rt=et[tt];if(rt.path.length===0&&rt.op==="replace"){_e=rt.value;break}}tt>-1&&(et=et.slice(tt+1));const nt=getPlugin("Patches").applyPatches_;return isDraft(_e)?nt(_e,et):this.produce(_e,rt=>nt(rt,et))}};function createProxy(_e,et){const tt=isMap(_e)?getPlugin("MapSet").proxyMap_(_e,et):isSet(_e)?getPlugin("MapSet").proxySet_(_e,et):createProxyProxy(_e,et);return(et?et.scope_:getCurrentScope()).drafts_.push(tt),tt}function current(_e){return isDraft(_e)||die(10,_e),currentImpl(_e)}function currentImpl(_e){if(!isDraftable(_e)||isFrozen(_e))return _e;const et=_e[DRAFT_STATE];let tt;if(et){if(!et.modified_)return et.base_;et.finalized_=!0,tt=shallowCopy(_e,et.scope_.immer_.useStrictShallowCopy_)}else tt=shallowCopy(_e,!0);return each(tt,(nt,rt)=>{set(tt,nt,currentImpl(rt))}),et&&(et.finalized_=!1),tt}function enableMapSet(){class _e extends Map{constructor(st,ct){super(),this[DRAFT_STATE]={type_:2,parent_:ct,scope_:ct?ct.scope_:getCurrentScope(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:st,draft_:this,isManual_:!1,revoked_:!1}}get size(){return latest(this[DRAFT_STATE]).size}has(st){return latest(this[DRAFT_STATE]).has(st)}set(st,ct){const ut=this[DRAFT_STATE];return it(ut),(!latest(ut).has(st)||latest(ut).get(st)!==ct)&&(tt(ut),markChanged(ut),ut.assigned_.set(st,!0),ut.copy_.set(st,ct),ut.assigned_.set(st,!0)),this}delete(st){if(!this.has(st))return!1;const ct=this[DRAFT_STATE];return it(ct),tt(ct),markChanged(ct),ct.base_.has(st)?ct.assigned_.set(st,!1):ct.assigned_.delete(st),ct.copy_.delete(st),!0}clear(){const st=this[DRAFT_STATE];it(st),latest(st).size&&(tt(st),markChanged(st),st.assigned_=new Map,each(st.base_,ct=>{st.assigned_.set(ct,!1)}),st.copy_.clear())}forEach(st,ct){const ut=this[DRAFT_STATE];latest(ut).forEach((dt,ft,pt)=>{st.call(ct,this.get(ft),ft,this)})}get(st){const ct=this[DRAFT_STATE];it(ct);const ut=latest(ct).get(st);if(ct.finalized_||!isDraftable(ut)||ut!==ct.base_.get(st))return ut;const dt=createProxy(ut,ct);return tt(ct),ct.copy_.set(st,dt),dt}keys(){return latest(this[DRAFT_STATE]).keys()}values(){const st=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const ct=st.next();return ct.done?ct:{done:!1,value:this.get(ct.value)}}}}entries(){const st=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const ct=st.next();if(ct.done)return ct;const ut=this.get(ct.value);return{done:!1,value:[ct.value,ut]}}}}[Symbol.iterator](){return this.entries()}}function et(ot,st){return new _e(ot,st)}function tt(ot){ot.copy_||(ot.assigned_=new Map,ot.copy_=new Map(ot.base_))}class nt extends Set{constructor(st,ct){super(),this[DRAFT_STATE]={type_:3,parent_:ct,scope_:ct?ct.scope_:getCurrentScope(),modified_:!1,finalized_:!1,copy_:void 0,base_:st,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return latest(this[DRAFT_STATE]).size}has(st){const ct=this[DRAFT_STATE];return it(ct),ct.copy_?!!(ct.copy_.has(st)||ct.drafts_.has(st)&&ct.copy_.has(ct.drafts_.get(st))):ct.base_.has(st)}add(st){const ct=this[DRAFT_STATE];return it(ct),this.has(st)||(at(ct),markChanged(ct),ct.copy_.add(st)),this}delete(st){if(!this.has(st))return!1;const ct=this[DRAFT_STATE];return it(ct),at(ct),markChanged(ct),ct.copy_.delete(st)||(ct.drafts_.has(st)?ct.copy_.delete(ct.drafts_.get(st)):!1)}clear(){const st=this[DRAFT_STATE];it(st),latest(st).size&&(at(st),markChanged(st),st.copy_.clear())}values(){const st=this[DRAFT_STATE];return it(st),at(st),st.copy_.values()}entries(){const st=this[DRAFT_STATE];return it(st),at(st),st.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(st,ct){const ut=this.values();let dt=ut.next();for(;!dt.done;)st.call(ct,dt.value,dt.value,this),dt=ut.next()}}function rt(ot,st){return new nt(ot,st)}function at(ot){ot.copy_||(ot.copy_=new Set,ot.base_.forEach(st=>{if(isDraftable(st)){const ct=createProxy(st,ot);ot.drafts_.set(st,ct),ot.copy_.add(ct)}else ot.copy_.add(st)}))}function it(ot){ot.revoked_&&die(3,JSON.stringify(latest(ot)))}loadPlugin("MapSet",{proxyMap_:et,proxySet_:rt})}var immer=new Immer2,produce=immer.produce;immer.produceWithPatches.bind(immer);immer.setAutoFreeze.bind(immer);immer.setUseStrictShallowCopy.bind(immer);immer.applyPatches.bind(immer);immer.createDraft.bind(immer);immer.finishDraft.bind(immer);const updateStore=(_e,et)=>et.reduce((tt,nt)=>(tt[nt.id]=nt,tt),{..._e}),updateList$2=(_e,et,tt="end")=>{const nt=et.map(it=>it.id),rt=Array.from(_e.ids),at=new Set(tt==="start"?[...nt,...rt]:[...rt,...nt]);if(typeof _e.state.totalCount=="number"){const it=at.size-_e.ids.size;_e.state.totalCount+=it}return{..._e,ids:at}},createCache=()=>({store:{},lists:{}}),createList$1=()=>({ids:new Set,state:createListState()}),createListState=()=>({next:void 0,prev:void 0,totalCount:0,error:null,fetched:!1,fetching:!1,lastFetchedAt:void 0,invalid:!1});enableMapSet();const importEntities=(_e,et,tt,nt,rt,at,it=!1)=>produce(_e,ot=>{const st=ot[et]??createCache();if(st.store=updateStore(st.store,tt),typeof nt=="string"){let ct=st.lists[nt]??createList$1();it&&(ct.ids=new Set),ct=updateList$2(ct,tt,rt),at&&(ct.state=at),st.lists[nt]=ct}ot[et]=st}),deleteEntities=(_e,et,tt,nt)=>produce(_e,rt=>{const at=rt[et]??createCache();for(const it of tt)if(delete at.store[it],!(nt!=null&&nt.preserveLists))for(const ot of Object.values(at.lists))ot&&(ot.ids.delete(it),typeof ot.state.totalCount=="number"&&ot.state.totalCount--);rt[et]=at}),dismissEntities=(_e,et,tt,nt)=>produce(_e,rt=>{const at=rt[et]??createCache(),it=at.lists[nt];if(it){for(const ot of tt)it.ids.delete(ot),typeof it.state.totalCount=="number"&&it.state.totalCount--;rt[et]=at}}),incrementEntities=(_e,et,tt,nt)=>produce(_e,rt=>{var ot;const at=rt[et]??createCache(),it=at.lists[tt];typeof((ot=it==null?void 0:it.state)==null?void 0:ot.totalCount)=="number"&&(it.state.totalCount+=nt,rt[et]=at)}),setFetching=(_e,et,tt,nt,rt)=>produce(_e,at=>{const it=at[et]??createCache();if(typeof tt=="string"){const ot=it.lists[tt]??createList$1();ot.state.fetching=nt,ot.state.error=rt,it.lists[tt]=ot}at[et]=it}),invalidateEntityList=(_e,et,tt)=>produce(_e,nt=>{const at=(nt[et]??createCache()).lists[tt]??createList$1();at.state.invalid=!0}),doTransaction=(_e,et)=>produce(_e,tt=>{for(const[nt,rt]of Object.entries(et)){const at=tt[nt]??createCache();for(const[it,ot]of Object.entries(rt)){const st=at.store[it];st&&(at.store[it]=ot(st))}}});function reducer$1(_e={},et){switch(et.type){case ENTITIES_IMPORT:return importEntities(_e,et.entityType,et.entities,et.listKey,et.pos);case ENTITIES_DELETE:return deleteEntities(_e,et.entityType,et.ids,et.opts);case ENTITIES_DISMISS:return dismissEntities(_e,et.entityType,et.ids,et.listKey);case ENTITIES_INCREMENT:return incrementEntities(_e,et.entityType,et.listKey,et.diff);case ENTITIES_FETCH_SUCCESS:return importEntities(_e,et.entityType,et.entities,et.listKey,et.pos,et.newState,et.overwrite);case ENTITIES_FETCH_REQUEST:return setFetching(_e,et.entityType,et.listKey,!0);case ENTITIES_FETCH_FAIL:return setFetching(_e,et.entityType,et.listKey,!1,et.error);case ENTITIES_INVALIDATE_LIST:return invalidateEntityList(_e,et.entityType,et.listKey);case ENTITIES_TRANSACTION:return doTransaction(_e,et.transaction);default:return _e}}const ACCOUNT_NOTE_SUBMIT_REQUEST="ACCOUNT_NOTE_SUBMIT_REQUEST",ACCOUNT_NOTE_SUBMIT_SUCCESS="ACCOUNT_NOTE_SUBMIT_SUCCESS",ACCOUNT_NOTE_SUBMIT_FAIL="ACCOUNT_NOTE_SUBMIT_FAIL",ACCOUNT_NOTE_INIT_MODAL="ACCOUNT_NOTE_INIT_MODAL",ACCOUNT_NOTE_CHANGE_COMMENT="ACCOUNT_NOTE_CHANGE_COMMENT",submitAccountNote=()=>(_e,et)=>{_e(submitAccountNoteRequest());const tt=et().account_notes.edit.account;return api(et).post(`/api/v1/accounts/${tt}/note`,{comment:et().account_notes.edit.comment}).then(nt=>{_e(closeModal()),_e(submitAccountNoteSuccess(nt.data))}).catch(nt=>_e(submitAccountNoteFail(nt)))};function submitAccountNoteRequest(){return{type:ACCOUNT_NOTE_SUBMIT_REQUEST}}function submitAccountNoteSuccess(_e){return{type:ACCOUNT_NOTE_SUBMIT_SUCCESS,relationship:_e}}function submitAccountNoteFail(_e){return{type:ACCOUNT_NOTE_SUBMIT_FAIL,error:_e}}function changeAccountNoteComment(_e){return{type:ACCOUNT_NOTE_CHANGE_COMMENT,comment:_e}}const EditRecord=Record({isSubmitting:!1,account:null,comment:""}),ReducerRecord$x=Record({edit:EditRecord()});function account_notes(_e=ReducerRecord$x(),et){switch(et.type){case ACCOUNT_NOTE_INIT_MODAL:return _e.withMutations(tt=>{tt.setIn(["edit","isSubmitting"],!1),tt.setIn(["edit","account"],et.account.get("id")),tt.setIn(["edit","comment"],et.comment)});case ACCOUNT_NOTE_CHANGE_COMMENT:return _e.setIn(["edit","comment"],et.comment);case ACCOUNT_NOTE_SUBMIT_REQUEST:return _e.setIn(["edit","isSubmitting"],!0);case ACCOUNT_NOTE_SUBMIT_FAIL:case ACCOUNT_NOTE_SUBMIT_SUCCESS:return _e.setIn(["edit","isSubmitting"],!1);default:return _e}}const MetaRecord=Record({pleroma:Map$3(),role:null,source:Map$3()}),importAccount=(_e,et)=>{const tt=et.get("id");return _e.set(tt,MetaRecord({pleroma:et.get("pleroma",Map$3()).delete("settings_store"),role:et.get("role",null),source:et.get("source",Map$3())}))};function accounts_meta(_e=Map$3(),et){switch(et.type){case ME_FETCH_SUCCESS:case ME_PATCH_SUCCESS:return importAccount(_e,Map$3(fromJS(et.me)));case VERIFY_CREDENTIALS_SUCCESS:case AUTH_ACCOUNT_REMEMBER_SUCCESS:return importAccount(_e,Map$3(fromJS(et.account)));default:return _e}}const ReducerRecord$w=Record({reports:Map$3(),openReports:OrderedSet(),users:Map$3(),latestUsers:OrderedSet(),awaitingApproval:OrderedSet(),configs:List$1(),needsReboot:!1}),FILTER_UNAPPROVED=["local","need_approval"],FILTER_LATEST=["local","active"],filtersMatch=(_e,et)=>is$2(Set$3(_e),Set$3(et)),toIds$2=_e=>_e.map(et=>et.id),mergeSet=(_e,et,tt)=>{const nt=toIds$2(tt);return _e.update(et,rt=>rt.union(nt))},replaceSet=(_e,et,tt)=>{const nt=toIds$2(tt);return _e.set(et,OrderedSet(nt))},maybeImportUnapproved=(_e,et,tt)=>filtersMatch(FILTER_UNAPPROVED,tt)?mergeSet(_e,"awaitingApproval",et):_e,maybeImportLatest=(_e,et,tt,nt)=>nt===1&&filtersMatch(FILTER_LATEST,tt)?replaceSet(_e,"latestUsers",et):_e,minifyUser=_e=>_e.mergeWith((et,tt)=>tt||et,{account:normalizeId$1(_e.getIn(["account","id"]))}),fixUser=_e=>normalizeAdminAccount(_e).withMutations(et=>{minifyUser(et)});function importUsers(_e,et,tt,nt){return _e.withMutations(rt=>{maybeImportUnapproved(rt,et,tt),maybeImportLatest(rt,et,tt,nt),et.forEach(at=>{const it=fixUser(at);rt.setIn(["users",at.id],it)})})}function deleteUsers(_e,et){return _e.withMutations(tt=>{et.forEach(nt=>{tt.update("awaitingApproval",rt=>rt.delete(nt)),tt.deleteIn(["users",nt])})})}function approveUsers(_e,et){return _e.withMutations(tt=>{et.forEach(nt=>{const rt=fixUser(nt);tt.update("awaitingApproval",at=>at.delete(nt.id)),tt.setIn(["users",nt.id],rt)})})}const minifyReport=_e=>_e.mergeWith((et,tt)=>tt||et,{account:normalizeId$1(_e.getIn(["account","id"])),target_account:normalizeId$1(_e.getIn(["target_account","id"])),action_taken_by_account:normalizeId$1(_e.getIn(["action_taken_by_account","id"])),assigned_account:normalizeId$1(_e.getIn(["assigned_account","id"])),statuses:_e.get("statuses").map(et=>normalizeId$1(et.get("id")))}),fixReport=_e=>normalizeAdminReport(_e).withMutations(et=>{minifyReport(et)});function importReports(_e,et){return _e.withMutations(tt=>{et.forEach(nt=>{const rt=fixReport(nt);rt.action_taken||tt.update("openReports",at=>at.add(nt.id)),tt.setIn(["reports",nt.id],rt)})})}function handleReportDiffs(_e,et){return _e.withMutations(tt=>{et.forEach(nt=>{switch(nt.state){case"open":tt.update("openReports",rt=>rt.add(nt.id));break;default:tt.update("openReports",rt=>rt.delete(nt.id))}})})}const normalizeConfig=_e=>Map$3(fromJS(_e)),normalizeConfigs=_e=>List$1(fromJS(_e)).map(normalizeConfig),importConfigs$1=(_e,et)=>_e.set("configs",normalizeConfigs(et));function admin(_e=ReducerRecord$w(),et){switch(et.type){case ADMIN_CONFIG_FETCH_SUCCESS:case ADMIN_CONFIG_UPDATE_SUCCESS:return importConfigs$1(_e,et.configs);case ADMIN_REPORTS_FETCH_SUCCESS:return importReports(_e,et.reports);case ADMIN_REPORTS_PATCH_REQUEST:case ADMIN_REPORTS_PATCH_SUCCESS:return handleReportDiffs(_e,et.reports);case ADMIN_USERS_FETCH_SUCCESS:return importUsers(_e,et.users,et.filters,et.page);case ADMIN_USERS_DELETE_REQUEST:case ADMIN_USERS_DELETE_SUCCESS:return deleteUsers(_e,et.accountIds);case ADMIN_USERS_APPROVE_REQUEST:return _e.update("awaitingApproval",tt=>tt.subtract(et.accountIds));case ADMIN_USERS_APPROVE_SUCCESS:return approveUsers(_e,et.users);default:return _e}}const AnnouncementFormRecord=Record({id:null,content:"",starts_at:null,ends_at:null,all_day:!1,is_submitting:!1}),ReducerRecord$v=Record({items:List$1(),isLoading:!1,page:-1,form:AnnouncementFormRecord()});function adminAnnouncementsReducer(_e=ReducerRecord$v(),et){switch(et.type){case ADMIN_ANNOUNCEMENTS_FETCH_REQUEST:return _e.set("isLoading",!0);case ADMIN_ANNOUNCEMENTS_FETCH_SUCCESS:return _e.withMutations(tt=>{const nt=List$1(et.announcements.map(rt=>normalizeAnnouncement(rt)));tt.set("items",nt),tt.set("isLoading",!1)});case ADMIN_ANNOUNCEMENTS_FETCH_FAIL:return _e.set("isLoading",!1);case ADMIN_ANNOUNCEMENT_DELETE_SUCCESS:return _e.update("items",tt=>{const nt=tt.findIndex(rt=>rt.id===et.id);return nt>-1?tt.delete(nt):tt});case ADMIN_ANNOUNCEMENT_CHANGE_CONTENT:return _e.setIn(["form","content"],et.value);case ADMIN_ANNOUNCEMENT_CHANGE_START_TIME:return _e.setIn(["form","starts_at"],et.value);case ADMIN_ANNOUNCEMENT_CHANGE_END_TIME:return _e.setIn(["form","ends_at"],et.value);case ADMIN_ANNOUNCEMENT_CHANGE_ALL_DAY:return _e.setIn(["form","all_day"],et.value);case ADMIN_ANNOUNCEMENT_CREATE_REQUEST:return _e.setIn(["form","is_submitting"],!0);case ADMIN_ANNOUNCEMENT_CREATE_SUCCESS:case ADMIN_ANNOUNCEMENT_CREATE_FAIL:return _e.setIn(["form","is_submitting"],!0);case ADMIN_ANNOUNCEMENT_MODAL_INIT:return _e.set("form",et.announcement?AnnouncementFormRecord({id:et.announcement.id,content:et.announcement.content,starts_at:et.announcement.starts_at?new Date(et.announcement.starts_at):null,ends_at:et.announcement.ends_at?new Date(et.announcement.ends_at):null,all_day:et.announcement.all_day}):AnnouncementFormRecord());default:return _e}}const LogEntryRecord=Record({data:Map$3(),id:0,message:"",time:0}),ReducerRecord$u=Record({items:Map$3(),index:OrderedSet(),total:0}),parseItems=_e=>{const et=[],tt={};return _e.forEach(nt=>{et.push(nt.id),tt[nt.id]=LogEntryRecord(nt)}),{ids:et,map:tt}},importItems=(_e,et,tt)=>{const{ids:nt,map:rt}=parseItems(et);return _e.withMutations(at=>{at.update("index",it=>it.union(nt)),at.update("items",it=>it.merge(rt)),at.set("total",tt)})};function admin_log(_e=ReducerRecord$u(),et){switch(et.type){case ADMIN_LOG_FETCH_SUCCESS:return importItems(_e,et.items,et.total);default:return _e}}const ReducerRecord$t=Record({isLoading:!1,loaded:!1,items:OrderedSet(),filters:Set$3(["local","active"]),total:1/0,pageSize:50,page:-1,query:"",next:null});function admin_user_index(_e=ReducerRecord$t(),et){switch(et.type){case ADMIN_USER_INDEX_QUERY_SET:return _e.set("query",et.query);case ADMIN_USER_INDEX_FETCH_REQUEST:return _e.set("isLoading",!0).set("loaded",!0).set("items",OrderedSet()).set("total",et.count).set("page",0).set("next",null);case ADMIN_USER_INDEX_FETCH_SUCCESS:return _e.set("isLoading",!1).set("loaded",!0).set("items",OrderedSet(et.users.map(tt=>tt.id))).set("total",et.count).set("page",1).set("next",et.next);case ADMIN_USER_INDEX_FETCH_FAIL:case ADMIN_USER_INDEX_EXPAND_FAIL:return _e.set("isLoading",!1);case ADMIN_USER_INDEX_EXPAND_REQUEST:return _e.set("isLoading",!0);case ADMIN_USER_INDEX_EXPAND_SUCCESS:return _e.set("isLoading",!1).set("loaded",!0).set("items",_e.items.union(et.users.map(tt=>tt.id))).set("total",et.count).set("page",1).set("next",et.next);default:return _e}}const ALIASES_FETCH_REQUEST="ALIASES_FETCH_REQUEST",ALIASES_FETCH_SUCCESS="ALIASES_FETCH_SUCCESS",ALIASES_FETCH_FAIL="ALIASES_FETCH_FAIL",ALIASES_SUGGESTIONS_CHANGE="ALIASES_SUGGESTIONS_CHANGE",ALIASES_SUGGESTIONS_READY="ALIASES_SUGGESTIONS_READY",ALIASES_SUGGESTIONS_CLEAR="ALIASES_SUGGESTIONS_CLEAR",ALIASES_ADD_REQUEST="ALIASES_ADD_REQUEST",ALIASES_ADD_SUCCESS="ALIASES_ADD_SUCCESS",ALIASES_ADD_FAIL="ALIASES_ADD_FAIL",ALIASES_REMOVE_REQUEST="ALIASES_REMOVE_REQUEST",ALIASES_REMOVE_SUCCESS="ALIASES_REMOVE_SUCCESS",ALIASES_REMOVE_FAIL="ALIASES_REMOVE_FAIL",messages={createSuccess:{id:"aliases.success.add",defaultMessage:"Account alias created successfully"},removeSuccess:{id:"aliases.success.remove",defaultMessage:"Account alias removed successfully"}},fetchAliases=(_e,et)=>{if(!isLoggedIn(et))return;const nt=et().instance;getFeatures(nt).accountMoving&&(_e(fetchAliasesRequest()),api(et).get("/api/pleroma/aliases").then(at=>{_e(fetchAliasesSuccess(at.data.aliases))}).catch(at=>_e(fetchAliasesFail(at))))},fetchAliasesRequest=()=>({type:ALIASES_FETCH_REQUEST}),fetchAliasesSuccess=_e=>({type:ALIASES_FETCH_SUCCESS,value:_e}),fetchAliasesFail=_e=>({type:ALIASES_FETCH_FAIL,error:_e}),fetchAliasesSuggestions=_e=>(et,tt)=>{if(!isLoggedIn(tt))return;const nt={q:_e,resolve:!0,limit:4};api(tt).get("/api/v1/accounts/search",{params:nt}).then(({data:rt})=>{et(importFetchedAccounts(rt)),et(fetchAliasesSuggestionsReady(_e,rt))}).catch(rt=>toast.showAlertForError(rt))},fetchAliasesSuggestionsReady=(_e,et)=>({type:ALIASES_SUGGESTIONS_READY,query:_e,accounts:et}),clearAliasesSuggestions=()=>({type:ALIASES_SUGGESTIONS_CLEAR}),changeAliasesSuggestions=_e=>({type:ALIASES_SUGGESTIONS_CHANGE,value:_e}),addToAliases=_e=>(et,tt)=>{var it;if(!isLoggedIn(tt))return;const nt=tt(),rt=nt.instance;if(!getFeatures(rt).accountMoving){const ot=nt.me,st=nt.accounts_meta.get(ot).pleroma.get("also_known_as");et(addToAliasesRequest()),api(tt).patch("/api/v1/accounts/update_credentials",{also_known_as:[...st,(it=_e.pleroma)==null?void 0:it.ap_id]}).then(ct=>{toast.success(messages.createSuccess),et(addToAliasesSuccess),et(patchMeSuccess(ct.data))}).catch(ct=>et(addToAliasesFail(ct)));return}et(addToAliasesRequest()),api(tt).put("/api/pleroma/aliases",{alias:_e.acct}).then(()=>{toast.success(messages.createSuccess),et(addToAliasesSuccess),et(fetchAliases)}).catch(ot=>et(fetchAliasesFail(ot)))},addToAliasesRequest=()=>({type:ALIASES_ADD_REQUEST}),addToAliasesSuccess=()=>({type:ALIASES_ADD_SUCCESS}),addToAliasesFail=_e=>({type:ALIASES_ADD_FAIL,error:_e}),removeFromAliases=_e=>(et,tt)=>{if(!isLoggedIn(tt))return;const nt=tt(),rt=nt.instance;if(!getFeatures(rt).accountMoving){const it=nt.me,ot=nt.accounts_meta.get(it).pleroma.get("also_known_as");et(removeFromAliasesRequest()),api(tt).patch("/api/v1/accounts/update_credentials",{also_known_as:ot.filter(st=>st!==_e)}).then(st=>{toast.success(messages.removeSuccess),et(removeFromAliasesSuccess),et(patchMeSuccess(st.data))}).catch(st=>et(removeFromAliasesFail(st)));return}et(addToAliasesRequest()),api(tt).delete("/api/pleroma/aliases",{data:{alias:_e}}).then(it=>{toast.success(messages.removeSuccess),et(removeFromAliasesSuccess),et(fetchAliases)}).catch(it=>et(fetchAliasesFail(it)))},removeFromAliasesRequest=()=>({type:ALIASES_REMOVE_REQUEST}),removeFromAliasesSuccess=()=>({type:ALIASES_REMOVE_SUCCESS}),removeFromAliasesFail=_e=>({type:ALIASES_REMOVE_FAIL,error:_e}),ReducerRecord$s=Record({aliases:Record({items:List$1(),loaded:!1})(),suggestions:Record({items:List$1(),value:"",loaded:!1})()});function aliasesReducer(_e=ReducerRecord$s(),et){switch(et.type){case ALIASES_FETCH_SUCCESS:return _e.setIn(["aliases","items"],et.value);case ALIASES_SUGGESTIONS_CHANGE:return _e.setIn(["suggestions","value"],et.value).setIn(["suggestions","loaded"],!1);case ALIASES_SUGGESTIONS_READY:return _e.setIn(["suggestions","items"],List$1(et.accounts.map(tt=>tt.id))).setIn(["suggestions","loaded"],!0);case ALIASES_SUGGESTIONS_CLEAR:return _e.update("suggestions",tt=>tt.withMutations(nt=>{nt.set("items",List$1()),nt.set("value",""),nt.set("loaded",!1)}));default:return _e}}const ReducerRecord$r=Record({items:List$1(),isLoading:!1,show:!1,unread:Set$3()}),updateReaction=(_e,et,tt,nt)=>_e.update("items",rt=>rt.map(at=>at.id===et?at.update("reactions",it=>{const ot=it.findIndex(st=>st.name===tt);return ot>-1?it.update(ot,st=>nt(st)):it.push(nt(normalizeAnnouncementReaction({name:tt,count:0})))}):at)),updateReactionCount=(_e,et)=>updateReaction(_e,et.announcement_id,et.name,tt=>tt.set("count",et.count)),addReaction=(_e,et,tt)=>updateReaction(_e,et,tt,nt=>nt.set("me",!0).update("count",rt=>rt+1)),removeReaction=(_e,et,tt)=>updateReaction(_e,et,tt,nt=>nt.set("me",!1).update("count",rt=>rt-1)),sortAnnouncements=_e=>_e.sortBy(et=>et.starts_at||et.published_at),updateAnnouncement=(_e,et)=>{const tt=_e.items.findIndex(nt=>nt.id===et.id);return tt>-1?_e.update("items",nt=>sortAnnouncements(nt.update(tt,rt=>rt.mergeDeep(et)))):_e.update("items",nt=>sortAnnouncements(nt.unshift(et)))};function announcementsReducer(_e=ReducerRecord$r(),et){switch(et.type){case ANNOUNCEMENTS_TOGGLE_SHOW:return _e.withMutations(tt=>{tt.set("show",!tt.show)});case ANNOUNCEMENTS_FETCH_REQUEST:return _e.set("isLoading",!0);case ANNOUNCEMENTS_FETCH_SUCCESS:return _e.withMutations(tt=>{const nt=List$1(et.announcements.map(rt=>normalizeAnnouncement(rt)));tt.set("items",nt),tt.set("isLoading",!1)});case ANNOUNCEMENTS_FETCH_FAIL:return _e.set("isLoading",!1);case ANNOUNCEMENTS_UPDATE:return updateAnnouncement(_e,normalizeAnnouncement(et.announcement));case ANNOUNCEMENTS_REACTION_UPDATE:return updateReactionCount(_e,et.reaction);case ANNOUNCEMENTS_REACTION_ADD_REQUEST:case ANNOUNCEMENTS_REACTION_REMOVE_FAIL:return addReaction(_e,et.id,et.name);case ANNOUNCEMENTS_REACTION_REMOVE_REQUEST:case ANNOUNCEMENTS_REACTION_ADD_FAIL:return removeReaction(_e,et.id,et.name);case ANNOUNCEMENTS_DISMISS_SUCCESS:return updateAnnouncement(_e,normalizeAnnouncement({id:et.id,read:!0}));case ANNOUNCEMENTS_DELETE:return _e.update("items",tt=>{const nt=tt.findIndex(rt=>rt.id===et.id);return nt>-1?tt.delete(nt):tt});default:return _e}}var baseIndexOf=_baseIndexOf;function charsEndIndex$1(_e,et){for(var tt=_e.length;tt--&&baseIndexOf(et,_e[tt],0)>-1;);return tt}var _charsEndIndex=charsEndIndex$1,baseToString=_baseToString,baseTrim=_baseTrim,castSlice=_castSlice,charsEndIndex=_charsEndIndex,charsStartIndex=_charsStartIndex,stringToArray=_stringToArray,toString=toString_1;function trim(_e,et,tt){if(_e=toString(_e),_e&&(tt||et===void 0))return baseTrim(_e);if(!_e||!(et=baseToString(et)))return _e;var nt=stringToArray(_e),rt=stringToArray(et),at=charsStartIndex(nt,rt),it=charsEndIndex(nt,rt)+1;return castSlice(nt,at,it).join("")}var trim_1=trim;const trim$1=getDefaultExportFromCjs$1(trim_1),AuthAppRecord=Record({access_token:null,client_id:null,client_secret:null,id:null,name:null,redirect_uri:null,token_type:null,vapid_key:null,website:null}),AuthTokenRecord=Record({access_token:"",account:null,created_at:0,expires_in:null,id:null,me:null,refresh_token:null,scope:"",token_type:""}),AuthUserRecord=Record({access_token:"",id:"",url:""}),ReducerRecord$q=Record({app:AuthAppRecord(),tokens:Map$3(),users:Map$3(),me:null}),buildKey=_e=>_e.join(":"),NAMESPACE=trim$1(FE_SUBDIRECTORY,"/")?`soapbox@${FE_SUBDIRECTORY}`:"soapbox",STORAGE_KEY=buildKey([NAMESPACE,"auth"]),SESSION_KEY=buildKey([NAMESPACE,"auth","me"]),getSessionUser=()=>{const _e=sessionStorage.getItem(SESSION_KEY);return validId(_e)?_e:void 0},getLocalState=()=>{const _e=JSON.parse(localStorage.getItem(STORAGE_KEY));if(_e)return ReducerRecord$q({app:AuthAppRecord(_e.app),tokens:Map$3(Object.entries(_e.tokens).map(([et,tt])=>[et,AuthTokenRecord(tt)])),users:Map$3(Object.entries(_e.users).map(([et,tt])=>[et,AuthUserRecord(tt)])),me:_e.me})},sessionUser=getSessionUser(),localState=getLocalState();fromJS(JSON.parse(localStorage.getItem(STORAGE_KEY)));const validUser=_e=>{try{return!!(_e&&validId(_e.id)&&validId(_e.access_token))}catch{return!1}},firstValidUser=_e=>_e.users.find(validUser),getUrlOrId=_e=>{try{const{id:et,url:tt}=_e.toJS();return tt||et}catch{return null}},maybeShiftMe=_e=>{const et=_e.me,tt=_e.users.get(et);if(validUser(tt))return _e;{const nt=firstValidUser(_e);return _e.set("me",getUrlOrId(nt))}},setSessionUser=_e=>_e.update("me",et=>{const tt=List$1([_e.users.get(sessionUser),_e.users.get(et)]).find(validUser);return getUrlOrId(tt)}),migrateLegacy=_e=>localState?_e:_e.withMutations(et=>{const tt=AuthAppRecord(JSON.parse(localStorage.getItem("soapbox:auth:app"))),nt=fromJS(JSON.parse(localStorage.getItem("soapbox:auth:user")));nt&&(et.set("me","_legacy"),et.set("app",tt),et.set("tokens",Map$3({[nt.get("access_token")]:AuthTokenRecord(nt.set("account","_legacy"))})),et.set("users",Map$3({_legacy:AuthUserRecord({id:"_legacy",access_token:nt.get("access_token")})})))}),isUpgradingUrlId=_e=>{const et=_e.me,tt=_e.users.get(et);return validId(et)&&tt&&!isURL(et)},sanitizeState=_e=>isUpgradingUrlId(_e)?_e:_e.withMutations(et=>{et.update("users",tt=>tt.filter((nt,rt)=>validUser(nt)&&nt.get("url")===rt)),et.update("tokens",tt=>tt.filter((nt,rt)=>validId(rt)&&nt.get("access_token")===rt))}),persistAuth=_e=>localStorage.setItem(STORAGE_KEY,JSON.stringify(_e.toJS())),persistSession=_e=>{const et=_e.me;et&&typeof et=="string"&&sessionStorage.setItem(SESSION_KEY,et)},persistState=_e=>{persistAuth(_e),persistSession(_e)},initialize=_e=>_e.withMutations(et=>{maybeShiftMe(et),setSessionUser(et),migrateLegacy(et),sanitizeState(et),persistState(et)}),initialState$k=initialize(ReducerRecord$q().merge(localState)),importToken=(_e,et)=>_e.setIn(["tokens",et.access_token],AuthTokenRecord(et)),upgradeLegacyId=(_e,et)=>localState?_e:_e.withMutations(tt=>{tt.update("me",nt=>nt==="_legacy"?et.url:nt),tt.deleteIn(["users","_legacy"])}),upgradeNonUrlId=(_e,et)=>{const tt=_e.me;return isURL(tt)?_e:_e.withMutations(nt=>{nt.update("me",rt=>rt===et.id?et.url:rt),nt.deleteIn(["users",et.id])})},userMismatch=(_e,et)=>(tt,nt)=>{const rt=tt.get("access_token")===_e,at=nt!==et.url||tt.get("url")!==et.url,it=tt.get("id")!==et.id;return rt&&(at||it)},importCredentials=(_e,et,tt)=>_e.withMutations(nt=>{nt.setIn(["users",tt.url],AuthUserRecord({id:tt.id,access_token:et,url:tt.url})),nt.setIn(["tokens",et,"account"],tt.id),nt.setIn(["tokens",et,"me"],tt.url),nt.update("users",rt=>rt.filterNot(userMismatch(et,tt))),nt.update("me",rt=>rt||tt.url),upgradeLegacyId(nt,tt),upgradeNonUrlId(nt,tt)}),deleteToken$1=(_e,et)=>_e.withMutations(tt=>{tt.update("tokens",nt=>nt.delete(et)),tt.update("users",nt=>nt.filterNot(rt=>rt.get("access_token")===et)),maybeShiftMe(tt)}),deleteUser=(_e,et)=>{const tt=et.url;return _e.withMutations(nt=>{nt.update("users",rt=>rt.delete(tt)),nt.update("tokens",rt=>rt.filterNot(at=>at.get("me")===tt)),maybeShiftMe(nt)})},importMastodonPreload=(_e,et)=>_e.withMutations(tt=>{const nt=et.getIn(["meta","me"]),rt=et.getIn(["accounts",nt,"url"]),at=et.getIn(["meta","access_token"]);validId(at)&&validId(nt)&&isURL(rt)&&(tt.setIn(["tokens",at],AuthTokenRecord({access_token:at,account:nt,me:rt,scope:"read write follow push",token_type:"Bearer"})),tt.setIn(["users",rt],AuthUserRecord({id:nt,access_token:at,url:rt}))),maybeShiftMe(tt)}),persistAuthAccount=_e=>{if(_e&&_e.url){const et=`authAccount:${_e.url}`;_e.pleroma||(_e.pleroma={}),KVStore.getItem(et).then(tt=>{var rt;const nt=((rt=tt==null?void 0:tt.pleroma)==null?void 0:rt.settings_store)||{};_e.pleroma.settings_store||(_e.pleroma.settings_store=nt),KVStore.setItem(et,_e)}).catch(console.error)}},deleteForbiddenToken=(_e,et,tt)=>{var nt;return[401,403].includes((nt=et.response)==null?void 0:nt.status)?deleteToken$1(_e,tt):_e},reducer=(_e,et)=>{switch(et.type){case AUTH_APP_CREATED:return _e.set("app",AuthAppRecord(et.app));case AUTH_APP_AUTHORIZED:return _e.update("app",tt=>tt.merge(et.token));case AUTH_LOGGED_IN:return importToken(_e,et.token);case AUTH_LOGGED_OUT:return deleteUser(_e,et.account);case VERIFY_CREDENTIALS_SUCCESS:return persistAuthAccount(et.account),importCredentials(_e,et.token,et.account);case VERIFY_CREDENTIALS_FAIL:return deleteForbiddenToken(_e,et.error,et.token);case SWITCH_ACCOUNT:return _e.set("me",et.account.url);case ME_FETCH_SKIP:return _e.set("me",null);case MASTODON_PRELOAD_IMPORT:return importMastodonPreload(_e,fromJS(et.data));default:return _e}},reload=()=>location.replace("/"),validMe=_e=>{const et=_e.me;return typeof et=="string"&&et!=="_legacy"},userSwitched=(_e,et)=>{var ot;const tt=et.me,nt=_e.me,rt=validMe(_e)&&validMe(et),at=nt!==tt,it=((ot=et.users.get(tt))==null?void 0:ot.id)===nt;return rt&&at&&!it},maybeReload=(_e,et,tt)=>{const nt=tt.type===AUTH_LOGGED_OUT&&tt.standalone;(userSwitched(_e,et)||nt)&&reload()};function auth(_e=initialState$k,et){const tt=reducer(_e,et);if(!tt.equals(_e)){if(persistAuth(tt),et.background===!0)return _e;persistSession(tt),maybeReload(_e,tt,et)}return tt}const BACKUPS_FETCH_REQUEST="BACKUPS_FETCH_REQUEST",BACKUPS_FETCH_SUCCESS="BACKUPS_FETCH_SUCCESS",BACKUPS_FETCH_FAIL="BACKUPS_FETCH_FAIL",BACKUPS_CREATE_REQUEST="BACKUPS_CREATE_REQUEST",BACKUPS_CREATE_SUCCESS="BACKUPS_CREATE_SUCCESS",BACKUPS_CREATE_FAIL="BACKUPS_CREATE_FAIL",fetchBackups=()=>(_e,et)=>(_e({type:BACKUPS_FETCH_REQUEST}),api(et).get("/api/v1/pleroma/backups").then(({data:tt})=>_e({type:BACKUPS_FETCH_SUCCESS,backups:tt})).catch(tt=>{_e({type:BACKUPS_FETCH_FAIL,error:tt})})),createBackup=()=>(_e,et)=>(_e({type:BACKUPS_CREATE_REQUEST}),api(et).post("/api/v1/pleroma/backups").then(({data:tt})=>_e({type:BACKUPS_CREATE_SUCCESS,backups:tt})).catch(tt=>{_e({type:BACKUPS_CREATE_FAIL,error:tt})}));var BackupRecord=Record({id:null,content_type:"",url:"",file_size:null,processed:!1,inserted_at:""}),initialState$j=Map$3(),importBackup=function _e(et,tt){return et.set(tt.inserted_at,BackupRecord(tt))},importBackups=function _e(et,tt){return et.withMutations(function(nt){tt.forEach(function(rt){return importBackup(nt,rt)})})};function backups(){var _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:initialState$j,et=arguments.length>1?arguments[1]:void 0;switch(et.type){case BACKUPS_FETCH_SUCCESS:case BACKUPS_CREATE_SUCCESS:return importBackups(_e,et.backups);default:return _e}}const initialState$i=Map$3(),idComparator=(_e,et)=>_eet?1:0,updateList$1=(_e,et,tt)=>{const rt=_e.get(et,OrderedSet()).union(tt).sort(idComparator);return _e.set(et,rt)},importMessage$1=(_e,et)=>updateList$1(_e,et.chat_id,[et.id]),importMessages$1=(_e,et)=>_e.withMutations(tt=>et.forEach(nt=>importMessage$1(tt,nt))),importLastMessages$1=(_e,et)=>_e.withMutations(tt=>et.forEach(nt=>{nt.last_message&&importMessage$1(tt,nt.last_message)})),replaceMessage=(_e,et,tt,nt)=>_e.update(et,rt=>rt.delete(tt).add(nt).sort(idComparator));function chatMessageLists(_e=initialState$i,et){switch(et.type){case CHAT_MESSAGE_SEND_REQUEST:return updateList$1(_e,et.chatId,[et.uuid]);case CHATS_FETCH_SUCCESS:case CHATS_EXPAND_SUCCESS:return importLastMessages$1(_e,et.chats);case STREAMING_CHAT_UPDATE:return et.chat.last_message&&et.chat.last_message.account_id!==et.me?importMessages$1(_e,[et.chat.last_message]):_e;case CHAT_MESSAGES_FETCH_SUCCESS:return updateList$1(_e,et.chatId,et.chatMessages.map(tt=>tt.id));case CHAT_MESSAGE_SEND_SUCCESS:return replaceMessage(_e,et.chatId,et.uuid,et.chatMessage.id);case CHAT_MESSAGE_DELETE_SUCCESS:return _e.update(et.chatId,tt=>tt.delete(et.messageId));default:return _e}}const importMessage=(_e,et)=>_e.set(et.id,normalizeChatMessage(et)),importMessages=(_e,et)=>_e.withMutations(tt=>et.forEach(nt=>importMessage(tt,nt))),importLastMessages=(_e,et)=>_e.withMutations(tt=>et.forEach(nt=>{nt.last_message&&importMessage(tt,nt.last_message)})),initialState$h=Map$3();function chatMessages(_e=initialState$h,et){switch(et.type){case CHAT_MESSAGE_SEND_REQUEST:return importMessage(_e,fromJS({id:et.uuid,chat_id:et.chatId,account_id:et.me,content:et.params.content,created_at:new Date().toISOString(),pending:!0}));case CHATS_FETCH_SUCCESS:case CHATS_EXPAND_SUCCESS:return importLastMessages(_e,et.chats);case CHAT_MESSAGES_FETCH_SUCCESS:return importMessages(_e,et.chatMessages);case CHAT_MESSAGE_SEND_SUCCESS:return importMessage(_e,fromJS(et.chatMessage)).delete(et.uuid);case STREAMING_CHAT_UPDATE:return importLastMessages(_e,[et.chat]);case CHAT_MESSAGE_DELETE_REQUEST:return _e.update(et.messageId,tt=>tt.set("pending",!0).set("deleting",!0));case CHAT_MESSAGE_DELETE_SUCCESS:return _e.delete(et.messageId);default:return _e}}const ReducerRecord$p=Record({next:null,isLoading:!1,items:Map$3({})}),minifyChat=_e=>_e.mergeWith((et,tt)=>tt||et,{last_message:normalizeId$1(_e.getIn(["last_message","id"]))}),fixChat=_e=>normalizeChat(_e).withMutations(et=>{minifyChat(et)}),importChat=(_e,et)=>_e.setIn(["items",et.id],fixChat(et)),importChats=(_e,et,tt)=>_e.withMutations(nt=>{tt!==void 0&&nt.set("next",tt),et.forEach(rt=>importChat(nt,rt)),nt.set("isLoading",!1)});function chats(_e=ReducerRecord$p(),et){switch(et.type){case CHATS_FETCH_REQUEST:case CHATS_EXPAND_REQUEST:return _e.set("isLoading",!0);case CHATS_FETCH_SUCCESS:case CHATS_EXPAND_SUCCESS:return importChats(_e,et.chats,et.next);case STREAMING_CHAT_UPDATE:return importChats(_e,[et.chat]);case CHAT_FETCH_SUCCESS:return importChats(_e,[et.chat]);case CHAT_READ_REQUEST:return _e.setIn([et.chatId,"unread"],0);case CHAT_READ_SUCCESS:return importChats(_e,[et.chat]);default:return _e}}const ReducerRecord$o=Record({name:"",status:"",location:null,start_time:new Date,end_time:null,approval_required:!1,banner:null,progress:0,is_uploading:!1,is_submitting:!1,id:null}),setHasEndTime=_e=>{const et=new Date(_e.start_time);return et.setHours(et.getHours()+2),_e.set("end_time",et)};function compose_event(_e=ReducerRecord$o(),et){switch(et.type){case EDIT_EVENT_NAME_CHANGE:return _e.set("name",et.value);case EDIT_EVENT_DESCRIPTION_CHANGE:return _e.set("status",et.value);case EDIT_EVENT_START_TIME_CHANGE:return _e.set("start_time",et.value);case EDIT_EVENT_END_TIME_CHANGE:return _e.set("end_time",et.value);case EDIT_EVENT_HAS_END_TIME_CHANGE:return et.value?setHasEndTime(_e):_e.set("end_time",null);case EDIT_EVENT_APPROVAL_REQUIRED_CHANGE:return _e.set("approval_required",et.value);case EDIT_EVENT_LOCATION_CHANGE:return _e.set("location",et.value);case EVENT_BANNER_UPLOAD_REQUEST:return _e.set("is_uploading",!0);case EVENT_BANNER_UPLOAD_SUCCESS:return _e.set("banner",normalizeAttachment(fromJS(et.media))).set("is_uploading",!1);case EVENT_BANNER_UPLOAD_FAIL:return _e.set("is_uploading",!1);case EVENT_BANNER_UPLOAD_UNDO:return _e.set("banner",null);case EVENT_BANNER_UPLOAD_PROGRESS:return _e.set("progress",et.loaded*100);case EVENT_SUBMIT_REQUEST:return _e.set("is_submitting",!0);case EVENT_SUBMIT_SUCCESS:case EVENT_SUBMIT_FAIL:return _e.set("is_submitting",!1);case EVENT_COMPOSE_CANCEL:return ReducerRecord$o();case EVENT_FORM_SET:return ReducerRecord$o({name:et.status.event.name,status:et.text,start_time:new Date(et.status.event.start_time),end_time:et.status.event.end_time?new Date(et.status.event.end_time):null,approval_required:et.status.event.join_mode!=="free",banner:et.status.event.banner||null,location:et.location?normalizeLocation(et.location):null,progress:0,is_uploading:!1,is_submitting:!1,id:et.status.id});default:return _e}}const ReducerRecord$n=Record({inReplyTos:Map$3(),replies:Map$3()}),importStatus$4=(_e,et,tt)=>{const{id:nt,in_reply_to_id:rt}=et;return rt?_e.withMutations(at=>{const ot=(at.replies.get(rt)||OrderedSet()).add(nt).sort();at.setIn(["replies",rt],ot),at.setIn(["inReplyTos",nt],rt),tt&&deletePendingStatus(at,et,tt)}):_e},importStatuses$3=(_e,et)=>_e.withMutations(tt=>{et.forEach(nt=>importStatus$4(tt,nt))}),insertTombstone=(_e,et,tt)=>{const nt=`${tt}-tombstone`;return _e.withMutations(rt=>{importStatus$4(rt,{id:nt,in_reply_to_id:et}),importStatus$4(rt,{id:tt,in_reply_to_id:nt})})},getRootNode=(_e,et,tt=et)=>{const nt=_e.inReplyTos.get(et);return nt?nt===tt?nt:getRootNode(_e,nt,tt):et},connectNodes=(_e,et,tt)=>{const nt=getRootNode(_e,et),rt=getRootNode(_e,tt);return nt!==rt?insertTombstone(_e,tt,et):_e},importBranch=(_e,et,tt)=>_e.withMutations(nt=>{et.forEach((rt,at)=>{const it=tt&&at===0?tt:(et[at-1]||{}).id;rt.in_reply_to_id?(importStatus$4(nt,rt),tt&&connectNodes(nt,rt.id,tt)):it&&insertTombstone(nt,it,rt.id)})}),normalizeContext=(_e,et,tt,nt)=>_e.withMutations(rt=>{importBranch(rt,tt),importBranch(rt,nt,et),tt.length>0&&!rt.getIn(["inReplyTos",et])&&insertTombstone(rt,tt[tt.length-1].id,et)}),deleteStatus$4=(_e,et)=>_e.withMutations(tt=>{const nt=tt.inReplyTos.get(et);if(nt){const it=(tt.replies.get(nt)||OrderedSet()).delete(et);tt.setIn(["replies",nt],it)}(tt.replies.get(et)||OrderedSet()).forEach(at=>tt.deleteIn(["inReplyTos",at])),tt.deleteIn(["inReplyTos",et]),tt.deleteIn(["replies",et])}),deleteStatuses=(_e,et)=>_e.withMutations(tt=>{et.forEach(nt=>deleteStatus$4(tt,nt))}),filterContexts=(_e,et,tt)=>{const nt=tt.filter(rt=>rt.account.id===et.id).map(rt=>rt.id).toList().toArray();return deleteStatuses(_e,nt)},importPendingStatus$1=(_e,et,tt)=>{const nt=`末pending-${tt}`,{in_reply_to_id:rt}=et;return importStatus$4(_e,{id:nt,in_reply_to_id:rt})},deletePendingStatus=(_e,et,tt)=>{const nt=`末pending-${tt}`,{in_reply_to_id:rt}=et;return _e.withMutations(at=>{if(at.deleteIn(["inReplyTos",nt]),rt){const ot=(at.replies.get(rt)||OrderedSet()).delete(nt).sort();at.setIn(["replies",rt],ot)}})};function replies(_e=ReducerRecord$n(),et){switch(et.type){case ACCOUNT_BLOCK_SUCCESS:case ACCOUNT_MUTE_SUCCESS:return filterContexts(_e,et.relationship,et.statuses);case CONTEXT_FETCH_SUCCESS:return normalizeContext(_e,et.id,et.ancestors,et.descendants);case TIMELINE_DELETE:return deleteStatuses(_e,[et.id]);case STATUS_CREATE_REQUEST:return importPendingStatus$1(_e,et.params,et.idempotencyKey);case STATUS_CREATE_SUCCESS:return deletePendingStatus(_e,et.status,et.idempotencyKey);case STATUS_IMPORT:return importStatus$4(_e,et.status,et.idempotencyKey);case STATUSES_IMPORT:return importStatuses$3(_e,et.statuses);default:return _e}}const ConversationRecord=Record({id:"",unread:!1,accounts:List$1(),last_status:null,last_status_created_at:null}),ReducerRecord$m=Record({items:List$1(),isLoading:!1,hasMore:!0,mounted:0}),conversationToMap=_e=>ConversationRecord({id:_e.id,unread:_e.unread,accounts:List$1(_e.accounts.map(et=>et.id)),last_status:_e.last_status?_e.last_status.id:null,last_status_created_at:_e.last_status?_e.last_status.created_at:null}),updateConversation=(_e,et)=>_e.update("items",tt=>{const nt=tt.findIndex(at=>at.get("id")===et.id),rt=conversationToMap(et);return nt===-1?tt.unshift(rt):tt.set(nt,rt)}),expandNormalizedConversations=(_e,et,tt,nt)=>{let rt=List$1(et.map(conversationToMap));return _e.withMutations(at=>{rt.isEmpty()||at.update("items",it=>(it=it.map(ot=>{const st=rt.findIndex(ut=>ut.get("id")===ot.get("id"));if(st===-1)return ot;const ct=rt.get(st);return rt=rt.delete(st),ct}),it=it.concat(rt),it.sortBy(ot=>ot.get("last_status_created_at"),(ot,st)=>ot===null||st===null?-1:compareDate(ot,st)))),!tt&&!nt&&at.set("hasMore",!1),at.set("isLoading",!1)})};function conversations(_e=ReducerRecord$m(),et){switch(et.type){case CONVERSATIONS_FETCH_REQUEST:return _e.set("isLoading",!0);case CONVERSATIONS_FETCH_FAIL:return _e.set("isLoading",!1);case CONVERSATIONS_FETCH_SUCCESS:return expandNormalizedConversations(_e,et.conversations,et.next,et.isLoadingRecent);case CONVERSATIONS_UPDATE:return updateConversation(_e,et.conversation);case CONVERSATIONS_MOUNT:return _e.update("mounted",tt=>tt+1);case CONVERSATIONS_UNMOUNT:return _e.update("mounted",tt=>tt-1);case CONVERSATIONS_READ:return _e.update("items",tt=>tt.map(nt=>nt.get("id")===et.id?nt.set("unread",!1):nt));default:return _e}}const initialState$g=List$1(),autosuggestPopulate=_e=>{addCustomToPool(buildCustomEmojis(_e))},importEmojis=_e=>{const et=fromJS(_e).filter(tt=>{const nt=tt.get("shortcode","").toLowerCase();return!emojiData.emojis[nt]});return autosuggestPopulate(et),et};function custom_emojis(_e=initialState$g,et){return et.type===CUSTOM_EMOJIS_FETCH_SUCCESS?importEmojis(et.custom_emojis):_e}const BlocksRecord=Record({items:OrderedSet(),next:null}),ReducerRecord$l=Record({blocks:BlocksRecord()});function domainLists(_e=ReducerRecord$l(),et){switch(et.type){case DOMAIN_BLOCKS_FETCH_SUCCESS:return _e.setIn(["blocks","items"],OrderedSet(et.domains)).setIn(["blocks","next"],et.next);case DOMAIN_BLOCKS_EXPAND_SUCCESS:return _e.updateIn(["blocks","items"],tt=>tt.union(et.domains)).setIn(["blocks","next"],et.next);case DOMAIN_UNBLOCK_SUCCESS:return _e.updateIn(["blocks","items"],tt=>tt.delete(et.domain));default:return _e}}const ReducerRecord$k=Record({isOpen:!1});function dropdownMenu(_e=ReducerRecord$k(),et){switch(et.type){case DROPDOWN_MENU_OPEN:return _e.set("isOpen",!0);case DROPDOWN_MENU_CLOSE:return _e.set("isOpen",!1);default:return _e}}const importFilters=(_e,et)=>List$1(et.map(tt=>normalizeFilter(tt)));function filters(_e=List$1(),et){switch(et.type){case FILTERS_FETCH_SUCCESS:return importFilters(_e,et.filters);default:return _e}}const HASHTAG_FETCH_REQUEST="HASHTAG_FETCH_REQUEST",HASHTAG_FETCH_SUCCESS="HASHTAG_FETCH_SUCCESS",HASHTAG_FETCH_FAIL="HASHTAG_FETCH_FAIL",HASHTAG_FOLLOW_REQUEST="HASHTAG_FOLLOW_REQUEST",HASHTAG_FOLLOW_SUCCESS="HASHTAG_FOLLOW_SUCCESS",HASHTAG_FOLLOW_FAIL="HASHTAG_FOLLOW_FAIL",HASHTAG_UNFOLLOW_REQUEST="HASHTAG_UNFOLLOW_REQUEST",HASHTAG_UNFOLLOW_SUCCESS="HASHTAG_UNFOLLOW_SUCCESS",HASHTAG_UNFOLLOW_FAIL="HASHTAG_UNFOLLOW_FAIL",FOLLOWED_HASHTAGS_FETCH_REQUEST="FOLLOWED_HASHTAGS_FETCH_REQUEST",FOLLOWED_HASHTAGS_FETCH_SUCCESS="FOLLOWED_HASHTAGS_FETCH_SUCCESS",FOLLOWED_HASHTAGS_FETCH_FAIL="FOLLOWED_HASHTAGS_FETCH_FAIL",FOLLOWED_HASHTAGS_EXPAND_REQUEST="FOLLOWED_HASHTAGS_EXPAND_REQUEST",FOLLOWED_HASHTAGS_EXPAND_SUCCESS="FOLLOWED_HASHTAGS_EXPAND_SUCCESS",FOLLOWED_HASHTAGS_EXPAND_FAIL="FOLLOWED_HASHTAGS_EXPAND_FAIL",fetchHashtag=_e=>(et,tt)=>{et(fetchHashtagRequest()),api(tt).get(`/api/v1/tags/${_e}`).then(({data:nt})=>{et(fetchHashtagSuccess(_e,nt))}).catch(nt=>{et(fetchHashtagFail(nt))})},fetchHashtagRequest=()=>({type:HASHTAG_FETCH_REQUEST}),fetchHashtagSuccess=(_e,et)=>({type:HASHTAG_FETCH_SUCCESS,name:_e,tag:et}),fetchHashtagFail=_e=>({type:HASHTAG_FETCH_FAIL,error:_e}),followHashtag=_e=>(et,tt)=>{et(followHashtagRequest(_e)),api(tt).post(`/api/v1/tags/${_e}/follow`).then(({data:nt})=>{et(followHashtagSuccess(_e,nt))}).catch(nt=>{et(followHashtagFail(_e,nt))})},followHashtagRequest=_e=>({type:HASHTAG_FOLLOW_REQUEST,name:_e}),followHashtagSuccess=(_e,et)=>({type:HASHTAG_FOLLOW_SUCCESS,name:_e,tag:et}),followHashtagFail=(_e,et)=>({type:HASHTAG_FOLLOW_FAIL,name:_e,error:et}),unfollowHashtag=_e=>(et,tt)=>{et(unfollowHashtagRequest(_e)),api(tt).post(`/api/v1/tags/${_e}/unfollow`).then(({data:nt})=>{et(unfollowHashtagSuccess(_e,nt))}).catch(nt=>{et(unfollowHashtagFail(_e,nt))})},unfollowHashtagRequest=_e=>({type:HASHTAG_UNFOLLOW_REQUEST,name:_e}),unfollowHashtagSuccess=(_e,et)=>({type:HASHTAG_UNFOLLOW_SUCCESS,name:_e,tag:et}),unfollowHashtagFail=(_e,et)=>({type:HASHTAG_UNFOLLOW_FAIL,name:_e,error:et}),fetchFollowedHashtags=()=>(_e,et)=>{_e(fetchFollowedHashtagsRequest()),api(et).get("/api/v1/followed_tags").then(tt=>{const nt=getLinks(tt).refs.find(rt=>rt.rel==="next");_e(fetchFollowedHashtagsSuccess(tt.data,nt?nt.uri:null))}).catch(tt=>{_e(fetchFollowedHashtagsFail(tt))})},fetchFollowedHashtagsRequest=()=>({type:FOLLOWED_HASHTAGS_FETCH_REQUEST}),fetchFollowedHashtagsSuccess=(_e,et)=>({type:FOLLOWED_HASHTAGS_FETCH_SUCCESS,followed_tags:_e,next:et}),fetchFollowedHashtagsFail=_e=>({type:FOLLOWED_HASHTAGS_FETCH_FAIL,error:_e}),expandFollowedHashtags=()=>(_e,et)=>{const tt=et().followed_tags.next;tt!==null&&(_e(expandFollowedHashtagsRequest()),api(et).get(tt).then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");_e(expandFollowedHashtagsSuccess(nt.data,rt?rt.uri:null))}).catch(nt=>{_e(expandFollowedHashtagsFail(nt))}))},expandFollowedHashtagsRequest=()=>({type:FOLLOWED_HASHTAGS_EXPAND_REQUEST}),expandFollowedHashtagsSuccess=(_e,et)=>({type:FOLLOWED_HASHTAGS_EXPAND_SUCCESS,followed_tags:_e,next:et}),expandFollowedHashtagsFail=_e=>({type:FOLLOWED_HASHTAGS_EXPAND_FAIL,error:_e}),ReducerRecord$j=Record({items:List$1(),isLoading:!1,next:null});function followed_tags(_e=ReducerRecord$j(),et){switch(et.type){case FOLLOWED_HASHTAGS_FETCH_REQUEST:return _e.set("isLoading",!0);case FOLLOWED_HASHTAGS_FETCH_SUCCESS:return _e.withMutations(tt=>{tt.set("items",List$1(et.followed_tags.map(nt=>normalizeTag(nt)))),tt.set("isLoading",!1),tt.set("next",et.next)});case FOLLOWED_HASHTAGS_FETCH_FAIL:return _e.set("isLoading",!1);case FOLLOWED_HASHTAGS_EXPAND_REQUEST:return _e.set("isLoading",!0);case FOLLOWED_HASHTAGS_EXPAND_SUCCESS:return _e.withMutations(tt=>{tt.update("items",nt=>nt.concat(et.followed_tags.map(rt=>normalizeTag(rt)))),tt.set("isLoading",!1),tt.set("next",et.next)});case FOLLOWED_HASHTAGS_EXPAND_FAIL:return _e.set("isLoading",!1);default:return _e}}const ListRecord$1=Record({next:null,isLoading:!1,items:OrderedSet()}),ReducerRecord$i=Record({admin:Map$3({}),moderator:Map$3({}),user:Map$3({})}),normalizeList$2=(_e,et,tt,nt)=>_e.setIn(et,ListRecord$1({next:nt,items:OrderedSet(tt.map(rt=>rt.account.id)),isLoading:!1})),appendToList$2=(_e,et,tt,nt)=>_e.updateIn(et,rt=>rt.set("next",nt).set("isLoading",!1).update("items",at=>at.concat(tt.map(it=>it.account.id)))),updateLists=(_e,et,tt)=>{const nt=(rt,at,it)=>at===it.role?rt.updateIn([at,et],ot=>ot.update("items",st=>st.add(it.account.id))):rt.updateIn([at,et],ot=>ot.update("items",st=>st.delete(it.account.id)));return tt.forEach(rt=>{_e=nt(_e,"admin",rt),_e=nt(_e,"moderator",rt),_e=nt(_e,"user",rt)}),_e},removeFromList$2=(_e,et,tt)=>_e.updateIn(et,nt=>nt.update("items",rt=>rt.delete(tt)));function groupMemberships(_e=ReducerRecord$i(),et){switch(et.type){case GROUP_DELETE_SUCCESS:return _e.deleteIn(["admin",et.id]).deleteIn(["moderator",et.id]).deleteIn(["user",et.id]);case GROUP_MEMBERSHIPS_FETCH_REQUEST:case GROUP_MEMBERSHIPS_EXPAND_REQUEST:return _e.updateIn([et.role,et.id],tt=>(tt||ListRecord$1()).set("isLoading",!0));case GROUP_MEMBERSHIPS_FETCH_FAIL:case GROUP_MEMBERSHIPS_EXPAND_FAIL:return _e.updateIn([et.role,et.id],tt=>(tt||ListRecord$1()).set("isLoading",!1));case GROUP_MEMBERSHIPS_FETCH_SUCCESS:return normalizeList$2(_e,[et.role,et.id],et.memberships,et.next);case GROUP_MEMBERSHIPS_EXPAND_SUCCESS:return appendToList$2(_e,[et.role,et.id],et.memberships,et.next);case GROUP_PROMOTE_SUCCESS:case GROUP_DEMOTE_SUCCESS:return updateLists(_e,et.groupId,et.memberships);case GROUP_KICK_SUCCESS:case GROUP_BLOCK_SUCCESS:return _e=removeFromList$2(_e,["admin",et.groupId],et.accountId),_e=removeFromList$2(_e,["moderator",et.groupId],et.accountId),_e=removeFromList$2(_e,["user",et.groupId],et.accountId),_e;default:return _e}}const normalizeRelationships$1=(_e,et)=>(et.forEach(tt=>{_e=_e.set(tt.id,normalizeGroupRelationship(tt))}),_e);function groupRelationships(_e=Map$3(),et){switch(et.type){case GROUP_CREATE_SUCCESS:case GROUP_UPDATE_SUCCESS:return _e.set(et.group.id,normalizeGroupRelationship({id:et.group.id,member:!0,requested:!1,role:"admin"}));case GROUP_DELETE_SUCCESS:return _e.delete(et.id);case GROUP_RELATIONSHIPS_FETCH_SUCCESS:return normalizeRelationships$1(_e,et.relationships);default:return _e}}const ReducerRecord$h=Record({isLoading:!0,items:Map$3({})}),normalizeGroups=(_e,et)=>_e.update("items",tt=>et.reduce((nt,rt)=>nt.set(rt.id,normalizeGroup(rt)),tt)).set("isLoading",!1);function groups(_e=ReducerRecord$h(),et){switch(et.type){case GROUPS_IMPORT:return normalizeGroups(_e,et.groups);case GROUP_FETCH_REQUEST:return _e.set("isLoading",!0);case GROUP_DELETE_SUCCESS:case GROUP_FETCH_FAIL:return _e.setIn(["items",et.id],!1).set("isLoading",!1);default:return _e}}const HISTORY_FETCH_REQUEST="HISTORY_FETCH_REQUEST",HISTORY_FETCH_SUCCESS="HISTORY_FETCH_SUCCESS",HISTORY_FETCH_FAIL="HISTORY_FETCH_FAIL",fetchHistory=_e=>(et,tt)=>{tt().history.getIn([_e,"loading"])||(et(fetchHistoryRequest(_e)),api(tt).get(`/api/v1/statuses/${_e}/history`).then(({data:rt})=>{et(importFetchedAccounts(rt.map(at=>at.account))),et(fetchHistorySuccess(_e,rt))}).catch(rt=>et(fetchHistoryFail(rt))))},fetchHistoryRequest=_e=>({type:HISTORY_FETCH_REQUEST,statusId:_e}),fetchHistorySuccess=(_e,et)=>({type:HISTORY_FETCH_SUCCESS,statusId:_e,history:et}),fetchHistoryFail=_e=>({type:HISTORY_FETCH_FAIL,error:_e}),HistoryRecord=Record({loading:!1,items:List$1()}),initialState$f=Map$3();function history(_e=initialState$f,et){switch(et.type){case HISTORY_FETCH_REQUEST:return _e.update(et.statusId,HistoryRecord(),tt=>tt.withMutations(nt=>{nt.set("loading",!0),nt.set("items",List$1())}));case HISTORY_FETCH_SUCCESS:return _e.update(et.statusId,HistoryRecord(),tt=>tt.withMutations(nt=>{nt.set("loading",!1),nt.set("items",List$1(et.history.map((rt,at)=>({...rt,account:rt.account.id,original:at===0})).reverse().map(normalizeStatusEdit)))}));case HISTORY_FETCH_FAIL:return _e.update(et.statusId,HistoryRecord(),tt=>tt.set("loading",!1));default:return _e}}const initialState$e=instanceSchema.parse({}),importInstance=(_e,et)=>normalizeInstance(et),preloadImport$1=(_e,et,tt)=>{const nt=et.data[tt];return nt?importInstance(_e,nt):_e},getConfigValue=(_e,et)=>{const tt=_e.find(nt=>nt.getIn(["tuple",0])===et);return tt?tt.getIn(["tuple",1]):void 0},importConfigs=(_e,et)=>{const tt=ConfigDB.find(et,":pleroma",":instance"),nt=ConfigDB.toSimplePolicy(et);return!tt&&!nt?_e:produce(_e,rt=>{if(tt){const at=tt.get("value",List$1()),it=getConfigValue(at,":registrations_open"),ot=getConfigValue(at,":account_approval_required");rt.registrations=it??rt.registrations,rt.approval_required=ot??rt.approval_required}nt&&(rt.pleroma.metadata.federation.mrf_simple=nt)})},handleAuthFetch=_e=>({..._e,title:_e.title||"██████",description:_e.description||"████████████"}),getHost=_e=>{try{return new URL(_e.uri).host}catch{try{return new URL(`https://${_e.uri}`).host}catch{return null}}},persistInstance=_e=>{const et=getHost(_e);et&&KVStore.setItem(`instance:${et}`,_e).catch(console.error)},handleInstanceFetchFail=(_e,et)=>{var tt;return((tt=et.response)==null?void 0:tt.status)===401?handleAuthFetch(_e):_e};function instance(_e=initialState$e,et){switch(et.type){case PLEROMA_PRELOAD_IMPORT:return preloadImport$1(_e,et,"/api/v1/instance");case rememberInstance.fulfilled.type:return importInstance(_e,et.payload);case fetchInstance.fulfilled.type:return persistInstance(et.payload),importInstance(_e,et.payload);case fetchInstance.rejected.type:return handleInstanceFetchFail(_e,et.error);case ADMIN_CONFIG_UPDATE_REQUEST:case ADMIN_CONFIG_UPDATE_SUCCESS:return importConfigs(_e,et.configs);default:return _e}}const LIST_FETCH_REQUEST="LIST_FETCH_REQUEST",LIST_FETCH_SUCCESS="LIST_FETCH_SUCCESS",LIST_FETCH_FAIL="LIST_FETCH_FAIL",LISTS_FETCH_REQUEST="LISTS_FETCH_REQUEST",LISTS_FETCH_SUCCESS="LISTS_FETCH_SUCCESS",LISTS_FETCH_FAIL="LISTS_FETCH_FAIL",LIST_EDITOR_TITLE_CHANGE="LIST_EDITOR_TITLE_CHANGE",LIST_EDITOR_RESET="LIST_EDITOR_RESET",LIST_EDITOR_SETUP="LIST_EDITOR_SETUP",LIST_CREATE_REQUEST="LIST_CREATE_REQUEST",LIST_CREATE_SUCCESS="LIST_CREATE_SUCCESS",LIST_CREATE_FAIL="LIST_CREATE_FAIL",LIST_UPDATE_REQUEST="LIST_UPDATE_REQUEST",LIST_UPDATE_SUCCESS="LIST_UPDATE_SUCCESS",LIST_UPDATE_FAIL="LIST_UPDATE_FAIL",LIST_DELETE_REQUEST="LIST_DELETE_REQUEST",LIST_DELETE_SUCCESS="LIST_DELETE_SUCCESS",LIST_DELETE_FAIL="LIST_DELETE_FAIL",LIST_ACCOUNTS_FETCH_REQUEST="LIST_ACCOUNTS_FETCH_REQUEST",LIST_ACCOUNTS_FETCH_SUCCESS="LIST_ACCOUNTS_FETCH_SUCCESS",LIST_ACCOUNTS_FETCH_FAIL="LIST_ACCOUNTS_FETCH_FAIL",LIST_EDITOR_SUGGESTIONS_CHANGE="LIST_EDITOR_SUGGESTIONS_CHANGE",LIST_EDITOR_SUGGESTIONS_READY="LIST_EDITOR_SUGGESTIONS_READY",LIST_EDITOR_SUGGESTIONS_CLEAR="LIST_EDITOR_SUGGESTIONS_CLEAR",LIST_EDITOR_ADD_REQUEST="LIST_EDITOR_ADD_REQUEST",LIST_EDITOR_ADD_SUCCESS="LIST_EDITOR_ADD_SUCCESS",LIST_EDITOR_ADD_FAIL="LIST_EDITOR_ADD_FAIL",LIST_EDITOR_REMOVE_REQUEST="LIST_EDITOR_REMOVE_REQUEST",LIST_EDITOR_REMOVE_SUCCESS="LIST_EDITOR_REMOVE_SUCCESS",LIST_EDITOR_REMOVE_FAIL="LIST_EDITOR_REMOVE_FAIL",LIST_ADDER_RESET="LIST_ADDER_RESET",LIST_ADDER_SETUP="LIST_ADDER_SETUP",LIST_ADDER_LISTS_FETCH_REQUEST="LIST_ADDER_LISTS_FETCH_REQUEST",LIST_ADDER_LISTS_FETCH_SUCCESS="LIST_ADDER_LISTS_FETCH_SUCCESS",LIST_ADDER_LISTS_FETCH_FAIL="LIST_ADDER_LISTS_FETCH_FAIL",fetchList=_e=>(et,tt)=>{isLoggedIn(tt)&&(tt().lists.get(String(_e))||(et(fetchListRequest(_e)),api(tt).get(`/api/v1/lists/${_e}`).then(({data:nt})=>et(fetchListSuccess(nt))).catch(nt=>et(fetchListFail(_e,nt)))))},fetchListRequest=_e=>({type:LIST_FETCH_REQUEST,id:_e}),fetchListSuccess=_e=>({type:LIST_FETCH_SUCCESS,list:_e}),fetchListFail=(_e,et)=>({type:LIST_FETCH_FAIL,id:_e,error:et}),fetchLists=()=>(_e,et)=>{isLoggedIn(et)&&(_e(fetchListsRequest()),api(et).get("/api/v1/lists").then(({data:tt})=>_e(fetchListsSuccess(tt))).catch(tt=>_e(fetchListsFail(tt))))},fetchListsRequest=()=>({type:LISTS_FETCH_REQUEST}),fetchListsSuccess=_e=>({type:LISTS_FETCH_SUCCESS,lists:_e}),fetchListsFail=_e=>({type:LISTS_FETCH_FAIL,error:_e}),submitListEditor=_e=>(et,tt)=>{const nt=tt().listEditor.listId,rt=tt().listEditor.title;et(nt===null?createList(rt,_e):updateList(nt,rt,_e))},setupListEditor=_e=>(et,tt)=>{et({type:LIST_EDITOR_SETUP,list:tt().lists.get(String(_e))}),et(fetchListAccounts(_e))},changeListEditorTitle=_e=>({type:LIST_EDITOR_TITLE_CHANGE,value:_e}),createList=(_e,et)=>(tt,nt)=>{isLoggedIn(nt)&&(tt(createListRequest()),api(nt).post("/api/v1/lists",{title:_e}).then(({data:rt})=>{tt(createListSuccess(rt)),et&&tt(resetListEditor())}).catch(rt=>tt(createListFail(rt))))},createListRequest=()=>({type:LIST_CREATE_REQUEST}),createListSuccess=_e=>({type:LIST_CREATE_SUCCESS,list:_e}),createListFail=_e=>({type:LIST_CREATE_FAIL,error:_e}),updateList=(_e,et,tt)=>(nt,rt)=>{isLoggedIn(rt)&&(nt(updateListRequest(_e)),api(rt).put(`/api/v1/lists/${_e}`,{title:et}).then(({data:at})=>{nt(updateListSuccess(at)),tt&&nt(resetListEditor())}).catch(at=>nt(updateListFail(_e,at))))},updateListRequest=_e=>({type:LIST_UPDATE_REQUEST,id:_e}),updateListSuccess=_e=>({type:LIST_UPDATE_SUCCESS,list:_e}),updateListFail=(_e,et)=>({type:LIST_UPDATE_FAIL,id:_e,error:et}),resetListEditor=()=>({type:LIST_EDITOR_RESET}),deleteList=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(deleteListRequest(_e)),api(tt).delete(`/api/v1/lists/${_e}`).then(()=>et(deleteListSuccess(_e))).catch(nt=>et(deleteListFail(_e,nt))))},deleteListRequest=_e=>({type:LIST_DELETE_REQUEST,id:_e}),deleteListSuccess=_e=>({type:LIST_DELETE_SUCCESS,id:_e}),deleteListFail=(_e,et)=>({type:LIST_DELETE_FAIL,id:_e,error:et}),fetchListAccounts=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(fetchListAccountsRequest(_e)),api(tt).get(`/api/v1/lists/${_e}/accounts`,{params:{limit:0}}).then(({data:nt})=>{et(importFetchedAccounts(nt)),et(fetchListAccountsSuccess(_e,nt,null))}).catch(nt=>et(fetchListAccountsFail(_e,nt))))},fetchListAccountsRequest=_e=>({type:LIST_ACCOUNTS_FETCH_REQUEST,id:_e}),fetchListAccountsSuccess=(_e,et,tt)=>({type:LIST_ACCOUNTS_FETCH_SUCCESS,id:_e,accounts:et,next:tt}),fetchListAccountsFail=(_e,et)=>({type:LIST_ACCOUNTS_FETCH_FAIL,id:_e,error:et}),fetchListSuggestions=_e=>(et,tt)=>{if(!isLoggedIn(tt))return;const nt={q:_e,resolve:!1,limit:4,following:!0};api(tt).get("/api/v1/accounts/search",{params:nt}).then(({data:rt})=>{et(importFetchedAccounts(rt)),et(fetchListSuggestionsReady(_e,rt))}).catch(rt=>toast.showAlertForError(rt))},fetchListSuggestionsReady=(_e,et)=>({type:LIST_EDITOR_SUGGESTIONS_READY,query:_e,accounts:et}),clearListSuggestions=()=>({type:LIST_EDITOR_SUGGESTIONS_CLEAR}),changeListSuggestions=_e=>({type:LIST_EDITOR_SUGGESTIONS_CHANGE,value:_e}),addToListEditor=_e=>(et,tt)=>{et(addToList(tt().listEditor.listId,_e))},addToList=(_e,et)=>(tt,nt)=>{isLoggedIn(nt)&&(tt(addToListRequest(_e,et)),api(nt).post(`/api/v1/lists/${_e}/accounts`,{account_ids:[et]}).then(()=>tt(addToListSuccess(_e,et))).catch(rt=>tt(addToListFail(_e,et,rt))))},addToListRequest=(_e,et)=>({type:LIST_EDITOR_ADD_REQUEST,listId:_e,accountId:et}),addToListSuccess=(_e,et)=>({type:LIST_EDITOR_ADD_SUCCESS,listId:_e,accountId:et}),addToListFail=(_e,et,tt)=>({type:LIST_EDITOR_ADD_FAIL,listId:_e,accountId:et,error:tt}),removeFromListEditor=_e=>(et,tt)=>{et(removeFromList$1(tt().listEditor.listId,_e))},removeFromList$1=(_e,et)=>(tt,nt)=>{isLoggedIn(nt)&&(tt(removeFromListRequest(_e,et)),api(nt).delete(`/api/v1/lists/${_e}/accounts`,{params:{account_ids:[et]}}).then(()=>tt(removeFromListSuccess(_e,et))).catch(rt=>tt(removeFromListFail(_e,et,rt))))},removeFromListRequest=(_e,et)=>({type:LIST_EDITOR_REMOVE_REQUEST,listId:_e,accountId:et}),removeFromListSuccess=(_e,et)=>({type:LIST_EDITOR_REMOVE_SUCCESS,listId:_e,accountId:et}),removeFromListFail=(_e,et,tt)=>({type:LIST_EDITOR_REMOVE_FAIL,listId:_e,accountId:et,error:tt}),resetListAdder=()=>({type:LIST_ADDER_RESET}),setupListAdder=_e=>(et,tt)=>{et({type:LIST_ADDER_SETUP,account:selectAccount(tt(),_e)}),et(fetchLists()),et(fetchAccountLists(_e))},fetchAccountLists=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(fetchAccountListsRequest(_e)),api(tt).get(`/api/v1/accounts/${_e}/lists`).then(({data:nt})=>et(fetchAccountListsSuccess(_e,nt))).catch(nt=>et(fetchAccountListsFail(_e,nt))))},fetchAccountListsRequest=_e=>({type:LIST_ADDER_LISTS_FETCH_REQUEST,id:_e}),fetchAccountListsSuccess=(_e,et)=>({type:LIST_ADDER_LISTS_FETCH_SUCCESS,id:_e,lists:et}),fetchAccountListsFail=(_e,et)=>({type:LIST_ADDER_LISTS_FETCH_FAIL,id:_e,err:et}),addToListAdder=_e=>(et,tt)=>{et(addToList(_e,tt().listAdder.accountId))},removeFromListAdder=_e=>(et,tt)=>{et(removeFromList$1(_e,tt().listAdder.accountId))},ListsRecord=Record({items:List$1(),loaded:!1,isLoading:!1}),ReducerRecord$g=Record({accountId:null,lists:ListsRecord()});function listAdderReducer(_e=ReducerRecord$g(),et){switch(et.type){case LIST_ADDER_RESET:return ReducerRecord$g();case LIST_ADDER_SETUP:return _e.withMutations(tt=>{tt.set("accountId",et.account.id)});case LIST_ADDER_LISTS_FETCH_REQUEST:return _e.setIn(["lists","isLoading"],!0);case LIST_ADDER_LISTS_FETCH_FAIL:return _e.setIn(["lists","isLoading"],!1);case LIST_ADDER_LISTS_FETCH_SUCCESS:return _e.update("lists",tt=>tt.withMutations(nt=>{nt.set("isLoading",!1),nt.set("loaded",!0),nt.set("items",List$1(et.lists.map(rt=>rt.id)))}));case LIST_EDITOR_ADD_SUCCESS:return _e.updateIn(["lists","items"],tt=>tt.unshift(et.listId));case LIST_EDITOR_REMOVE_SUCCESS:return _e.updateIn(["lists","items"],tt=>tt.filterNot(nt=>nt===et.listId));default:return _e}}const AccountsRecord=Record({items:List$1(),loaded:!1,isLoading:!1}),SuggestionsRecord=Record({value:"",items:List$1()}),ReducerRecord$f=Record({listId:null,isSubmitting:!1,isChanged:!1,title:"",accounts:AccountsRecord(),suggestions:SuggestionsRecord()});function listEditorReducer(_e=ReducerRecord$f(),et){switch(et.type){case LIST_EDITOR_RESET:return ReducerRecord$f();case LIST_EDITOR_SETUP:return _e.withMutations(tt=>{tt.set("listId",et.list.get("id")),tt.set("title",et.list.get("title")),tt.set("isSubmitting",!1)});case LIST_EDITOR_TITLE_CHANGE:return _e.withMutations(tt=>{tt.set("title",et.value),tt.set("isChanged",!0)});case LIST_CREATE_REQUEST:case LIST_UPDATE_REQUEST:return _e.withMutations(tt=>{tt.set("isSubmitting",!0),tt.set("isChanged",!1)});case LIST_CREATE_FAIL:case LIST_UPDATE_FAIL:return _e.set("isSubmitting",!1);case LIST_CREATE_SUCCESS:case LIST_UPDATE_SUCCESS:return _e.withMutations(tt=>{tt.set("isSubmitting",!1),tt.set("listId",et.list.id)});case LIST_ACCOUNTS_FETCH_REQUEST:return _e.setIn(["accounts","isLoading"],!0);case LIST_ACCOUNTS_FETCH_FAIL:return _e.setIn(["accounts","isLoading"],!1);case LIST_ACCOUNTS_FETCH_SUCCESS:return _e.update("accounts",tt=>tt.withMutations(nt=>{nt.set("isLoading",!1),nt.set("loaded",!0),nt.set("items",List$1(et.accounts.map(rt=>rt.id)))}));case LIST_EDITOR_SUGGESTIONS_CHANGE:return _e.setIn(["suggestions","value"],et.value);case LIST_EDITOR_SUGGESTIONS_READY:return _e.setIn(["suggestions","items"],List$1(et.accounts.map(tt=>tt.id)));case LIST_EDITOR_SUGGESTIONS_CLEAR:return _e.update("suggestions",tt=>tt.withMutations(nt=>{nt.set("items",List$1()),nt.set("value","")}));case LIST_EDITOR_ADD_SUCCESS:return _e.updateIn(["accounts","items"],tt=>tt.unshift(et.accountId));case LIST_EDITOR_REMOVE_SUCCESS:return _e.updateIn(["accounts","items"],tt=>tt.filterNot(nt=>nt===et.accountId));default:return _e}}const initialState$d=Map$3(),importList=(_e,et)=>_e.set(et.id,normalizeList$3(et)),importLists=(_e,et)=>(et.forEach(tt=>{_e=importList(_e,tt)}),_e);function lists(_e=initialState$d,et){switch(et.type){case LIST_FETCH_SUCCESS:case LIST_CREATE_SUCCESS:case LIST_UPDATE_SUCCESS:return importList(_e,et.list);case LISTS_FETCH_SUCCESS:return importLists(_e,et.lists);case LIST_DELETE_SUCCESS:case LIST_FETCH_FAIL:return _e.set(et.id,!1);default:return _e}}const initialState$c=Map$3(),normalizeLocations=(_e,et)=>et.reduce((tt,nt)=>tt.set(nt.origin_id,normalizeLocation(nt)),_e);function accounts(_e=initialState$c,et){switch(et.type){case LOCATION_SEARCH_SUCCESS:return normalizeLocations(_e,et.locations);default:return _e}}const initialState$b=null,handleForbidden=(_e,et)=>{var tt;return[401,403].includes((tt=et.response)==null?void 0:tt.status)?!1:_e};function me(_e=initialState$b,et){switch(et.type){case ME_FETCH_SUCCESS:case ME_PATCH_SUCCESS:return et.me.id;case VERIFY_CREDENTIALS_SUCCESS:case AUTH_ACCOUNT_REMEMBER_SUCCESS:return _e||et.account.id;case ME_FETCH_SKIP:case AUTH_LOGGED_OUT:return!1;case ME_FETCH_FAIL:return handleForbidden(_e,et.error);default:return _e}}const SW_UPDATING="SW_UPDATING",ReducerRecord$e=Record({instance_fetch_failed:!1,swUpdating:!1});function meta(_e=ReducerRecord$e(),et){var tt;switch(et.type){case fetchInstance.rejected.type:return((tt=et.payload.response)==null?void 0:tt.status)===404?_e.set("instance_fetch_failed",!0):_e;case SW_UPDATING:return _e.set("swUpdating",et.isUpdating);default:return _e}}const ModalRecord=Record({modalType:"",modalProps:null});function modal(_e=List$1(),et){switch(et.type){case MODAL_OPEN:return _e.push(ModalRecord({modalType:et.modalType,modalProps:et.modalProps}));case MODAL_CLOSE:return _e.size===0?_e:et.modalType===void 0?_e.pop():_e.some(({modalType:tt})=>et.modalType===tt)?_e.slice(0,_e.findLastIndex(({modalType:tt})=>et.modalType===tt)):_e;default:return _e}}const NewMuteRecord=Record({isSubmitting:!1,accountId:null,notifications:!0,duration:0}),ReducerRecord$d=Record({new:NewMuteRecord()});function mutes(_e=ReducerRecord$d(),et){switch(et.type){case MUTES_INIT_MODAL:return _e.withMutations(tt=>{tt.setIn(["new","isSubmitting"],!1),tt.setIn(["new","accountId"],et.account.id),tt.setIn(["new","notifications"],!0)});case MUTES_TOGGLE_HIDE_NOTIFICATIONS:return _e.updateIn(["new","notifications"],tt=>!tt);case MUTES_CHANGE_DURATION:return _e.setIn(["new","duration"],et.duration);default:return _e}}const QueuedNotificationRecord=Record({notification:{},intlMessages:{},intlLocale:""}),ReducerRecord$c=Record({items:OrderedMap(),hasMore:!0,top:!1,unread:0,isLoading:!1,queuedNotifications:OrderedMap(),totalQueuedNotificationsCount:0,lastRead:-1}),parseId=_e=>parseInt(_e,10),comparator=(_e,et)=>{const tt=nt=>parseId(nt.id);return tt(_e)tt(et)?-1:0},minifyNotification=_e=>_e.mergeWith((et,tt)=>tt||et,{account:_e.getIn(["account","id"]),target:_e.getIn(["target","id"]),status:_e.getIn(["status","id"])}),fixNotification=_e=>minifyNotification(normalizeNotification(_e)),isValid=_e=>{try{return!(!validType(_e.type)||!_e.account.get("id")||["mention","reblog","favourite","poll","status"].includes(_e.type)&&!_e.getIn(["status","id"]))}catch{return!1}},countFuture=(_e,et)=>_e.reduce((tt,nt)=>parseId(nt.get("id"))>parseId(et)?tt+1:tt,0),importNotification=(_e,et)=>{const tt=_e.top;return tt||(_e=_e.update("unread",nt=>nt+1)),_e.update("items",nt=>(tt&&nt.size>40&&(nt=nt.take(20)),nt.set(et.id,fixNotification(et)).sort(comparator)))},processRawNotifications=_e=>OrderedMap(_e.map(normalizeNotification).filter(isValid).map(et=>[et.id,fixNotification(et)])),expandNormalizedNotifications=(_e,et,tt)=>{const nt=processRawNotifications(et);return _e.withMutations(rt=>{rt.update("items",at=>at.merge(nt).sort(comparator)),tt||rt.set("hasMore",!1),rt.set("isLoading",!1)})},filterNotifications=(_e,et)=>_e.update("items",tt=>tt.filterNot(nt=>nt!==null&&nt.account===et.id)),filterNotificationIds=(_e,et,tt)=>{const nt=rt=>rt.filterNot(at=>at!==null&&et.includes(at.account)&&(tt===void 0||tt===at.type));return _e.update("items",nt)},updateTop$1=(_e,et)=>(et&&(_e=_e.set("unread",0)),_e.set("top",et)),deleteByStatus=(_e,et)=>_e.update("items",tt=>tt.filterNot(nt=>nt!==null&&nt.status===et)),updateNotificationsQueue=(_e,et,tt,nt)=>{const rt=_e.queuedNotifications,at=_e.items,it=_e.totalQueuedNotificationsCount;if(rt.has(et.id)||at.has(et.id))return _e;const st=rt;return _e.withMutations(ct=>{it<=MAX_QUEUED_NOTIFICATIONS&&ct.set("queuedNotifications",st.set(et.id,QueuedNotificationRecord({notification:et,intlMessages:tt,intlLocale:nt}))),ct.set("totalQueuedNotificationsCount",it+1)})},importMarker=(_e,et)=>{const tt=et.getIn(["notifications","last_read_id"],-1);return tt?_e.withMutations(nt=>{const rt=nt.items,at=countFuture(rt,tt);nt.set("unread",at),nt.set("lastRead",tt)}):_e};function notifications(_e=ReducerRecord$c(),et){switch(et.type){case NOTIFICATIONS_EXPAND_REQUEST:return _e.set("isLoading",!0);case NOTIFICATIONS_EXPAND_FAIL:return _e.set("isLoading",!1);case NOTIFICATIONS_FILTER_SET:return _e.set("items",OrderedMap()).set("hasMore",!0);case NOTIFICATIONS_SCROLL_TOP:return updateTop$1(_e,et.top);case NOTIFICATIONS_UPDATE:return importNotification(_e,et.notification);case NOTIFICATIONS_UPDATE_QUEUE:return updateNotificationsQueue(_e,et.notification,et.intlMessages,et.intlLocale);case NOTIFICATIONS_DEQUEUE:return _e.withMutations(tt=>{tt.delete("queuedNotifications"),tt.set("totalQueuedNotificationsCount",0)});case NOTIFICATIONS_EXPAND_SUCCESS:return expandNormalizedNotifications(_e,et.notifications,et.next);case ACCOUNT_BLOCK_SUCCESS:return filterNotifications(_e,et.relationship);case ACCOUNT_MUTE_SUCCESS:return et.relationship.muting_notifications?filterNotifications(_e,et.relationship):_e;case FOLLOW_REQUEST_AUTHORIZE_SUCCESS:case FOLLOW_REQUEST_REJECT_SUCCESS:return filterNotificationIds(_e,[et.id],"follow_request");case NOTIFICATIONS_CLEAR:return _e.set("items",OrderedMap()).set("hasMore",!1);case NOTIFICATIONS_MARK_READ_REQUEST:return _e.set("lastRead",et.lastRead);case MARKER_FETCH_SUCCESS:case MARKER_SAVE_REQUEST:case MARKER_SAVE_SUCCESS:return importMarker(_e,Map$3(fromJS(et.marker)));case TIMELINE_DELETE:return deleteByStatus(_e,et.id);default:return _e}}const initialState$a={needsOnboarding:!1};function onboarding(_e=initialState$a,et){switch(et.type){case ONBOARDING_START:return{..._e,needsOnboarding:!0};case ONBOARDING_END:return{..._e,needsOnboarding:!1};default:return _e}}const PATRON_INSTANCE_FETCH_REQUEST="PATRON_INSTANCE_FETCH_REQUEST",PATRON_INSTANCE_FETCH_SUCCESS="PATRON_INSTANCE_FETCH_SUCCESS",PATRON_INSTANCE_FETCH_FAIL="PATRON_INSTANCE_FETCH_FAIL",PATRON_ACCOUNT_FETCH_REQUEST="PATRON_ACCOUNT_FETCH_REQUEST",PATRON_ACCOUNT_FETCH_SUCCESS="PATRON_ACCOUNT_FETCH_SUCCESS",PATRON_ACCOUNT_FETCH_FAIL="PATRON_ACCOUNT_FETCH_FAIL",fetchPatronInstance=()=>(_e,et)=>(_e({type:PATRON_INSTANCE_FETCH_REQUEST}),api(et).get("/api/patron/v1/instance").then(tt=>{_e(importFetchedInstance(tt.data))}).catch(tt=>{_e(fetchInstanceFail(tt))})),fetchPatronAccount=_e=>(et,tt)=>{_e=encodeURIComponent(_e),et({type:PATRON_ACCOUNT_FETCH_REQUEST}),api(tt).get(`/api/patron/v1/accounts/${_e}`).then(nt=>{et(importFetchedAccount(nt.data))}).catch(nt=>{et(fetchAccountFail(nt))})},importFetchedInstance=_e=>({type:PATRON_INSTANCE_FETCH_SUCCESS,instance:_e}),fetchInstanceFail=_e=>({type:PATRON_INSTANCE_FETCH_FAIL,error:_e,skipAlert:!0}),importFetchedAccount=_e=>({type:PATRON_ACCOUNT_FETCH_SUCCESS,account:_e}),fetchAccountFail=_e=>({type:PATRON_ACCOUNT_FETCH_FAIL,error:_e,skipAlert:!0}),PatronAccountRecord=Record({is_patron:!1,url:""}),PatronInstanceRecord=Record({funding:Map$3(),goals:List$1(),url:""}),ReducerRecord$b=Record({instance:PatronInstanceRecord(),accounts:Map$3()}),normalizePatronAccount=(_e,et)=>{const tt=PatronAccountRecord(et);return _e.setIn(["accounts",tt.url],tt)};function patron(_e=ReducerRecord$b(),et){switch(et.type){case PATRON_INSTANCE_FETCH_SUCCESS:return _e.set("instance",PatronInstanceRecord(Map$3(fromJS(et.instance))));case PATRON_ACCOUNT_FETCH_SUCCESS:return normalizePatronAccount(_e,et.account);default:return _e}}const PendingStatusRecord=Record({content_type:"",in_reply_to_id:null,media_ids:null,quote_id:null,poll:null,sensitive:!1,spoiler_text:"",status:"",to:null,visibility:"public"}),initialState$9=Map$3(),importStatus$3=(_e,et,tt)=>_e.set(tt,PendingStatusRecord(et)),deleteStatus$3=(_e,et)=>_e.delete(et);function pending_statuses(_e=initialState$9,et){switch(et.type){case STATUS_CREATE_REQUEST:return et.editing?_e:importStatus$3(_e,Map$3(fromJS(et.params)),et.idempotencyKey);case STATUS_CREATE_SUCCESS:return deleteStatus$3(_e,et.idempotencyKey);default:return _e}}const normalizePoll=_e=>normalizeStatus({poll:_e}).poll,importPolls=(_e,et)=>_e.withMutations(tt=>et.forEach(nt=>{const rt=normalizePoll(nt);rt&&typeof rt=="object"&&tt.set(rt.id,rt)})),initialState$8=Map$3();function polls(_e=initialState$8,et){switch(et.type){case POLLS_IMPORT:return importPolls(_e,et.polls);default:return _e}}const ReducerRecord$a=Record({ref:null,accountId:"",hovered:!1});function profileHoverCard(_e=ReducerRecord$a(),et){switch(et.type){case PROFILE_HOVER_CARD_OPEN:return _e.withMutations(tt=>{tt.set("ref",et.ref),tt.set("accountId",et.accountId)});case PROFILE_HOVER_CARD_UPDATE:return _e.set("hovered",!0);case PROFILE_HOVER_CARD_CLOSE:return _e.get("hovered")===!0&&!et.force?_e:ReducerRecord$a();default:return _e}}const SubscriptionRecord=Record({id:"",endpoint:""}),ReducerRecord$9=Record({subscription:null,alerts:Map$3({follow:!0,follow_request:!0,favourite:!0,reblog:!0,mention:!0,poll:!0}),isSubscribed:!1,browserSupport:!1});function push_subscriptions(_e=ReducerRecord$9(),et){switch(et.type){case SET_SUBSCRIPTION:return _e.set("subscription",SubscriptionRecord({id:et.subscription.id,endpoint:et.subscription.endpoint})).set("alerts",Map$3(et.subscription.alerts)).set("isSubscribed",!0);case SET_BROWSER_SUPPORT:return _e.set("browserSupport",et.value);case CLEAR_SUBSCRIPTION:return ReducerRecord$9();case SET_ALERTS:return _e.setIn(et.path,et.value);default:return _e}}const normalizeRelationships=(_e,et)=>(et.forEach(tt=>{try{_e=_e.set(tt.id,relationshipSchema.parse(tt))}catch{}}),_e),setDomainBlocking=(_e,et,tt)=>_e.withMutations(nt=>{et.forEach(rt=>{nt.setIn([rt,"domain_blocking"],tt)})}),importPleromaAccount=(_e,et)=>{const tt=get$4(et,["pleroma","relationship"],{});return tt.id?normalizeRelationships(_e,[tt]):_e},importPleromaAccounts=(_e,et)=>(et.forEach(tt=>{_e=importPleromaAccount(_e,tt)}),_e);function relationships(_e=Map$3(),et){switch(et.type){case ACCOUNT_IMPORT:return importPleromaAccount(_e,et.account);case ACCOUNTS_IMPORT:return importPleromaAccounts(_e,et.accounts);case ACCOUNT_BLOCK_SUCCESS:case ACCOUNT_UNBLOCK_SUCCESS:case ACCOUNT_MUTE_SUCCESS:case ACCOUNT_UNMUTE_SUCCESS:case ACCOUNT_SUBSCRIBE_SUCCESS:case ACCOUNT_UNSUBSCRIBE_SUCCESS:case ACCOUNT_PIN_SUCCESS:case ACCOUNT_UNPIN_SUCCESS:case ACCOUNT_NOTE_SUBMIT_SUCCESS:case ACCOUNT_REMOVE_FROM_FOLLOWERS_SUCCESS:return normalizeRelationships(_e,[et.relationship]);case RELATIONSHIPS_FETCH_SUCCESS:return normalizeRelationships(_e,et.relationships);case DOMAIN_BLOCK_SUCCESS:return setDomainBlocking(_e,et.accounts,!0);case DOMAIN_UNBLOCK_SUCCESS:return setDomainBlocking(_e,et.accounts,!1);default:return _e}}const NewReportRecord=Record({isSubmitting:!1,entityType:"",account_id:null,status_ids:Set$3(),chat_message:null,group:null,comment:"",forward:!1,block:!1,rule_ids:Set$3()}),ReducerRecord$8=Record({new:NewReportRecord()});function reports(_e=ReducerRecord$8(),et){switch(et.type){case REPORT_INIT:return _e.withMutations(tt=>{var nt;tt.setIn(["new","isSubmitting"],!1),tt.setIn(["new","account_id"],et.account.id),tt.setIn(["new","entityType"],et.entityType),et.chatMessage&&tt.setIn(["new","chat_message"],et.chatMessage),et.group&&tt.setIn(["new","group"],et.group),_e.new.account_id!==et.account.id?(tt.setIn(["new","status_ids"],et.status?Set$3([((nt=et.status.reblog)==null?void 0:nt.id)||et.status.id]):Set$3()),tt.setIn(["new","comment"],"")):et.status&&tt.updateIn(["new","status_ids"],rt=>{var at;return rt.add(((at=et.status.reblog)==null?void 0:at.id)||et.status.id)})});case REPORT_STATUS_TOGGLE:return _e.updateIn(["new","status_ids"],tt=>et.checked?tt.add(et.statusId):tt.remove(et.statusId));case REPORT_COMMENT_CHANGE:return _e.setIn(["new","comment"],et.comment);case REPORT_FORWARD_CHANGE:return _e.setIn(["new","forward"],et.forward);case REPORT_BLOCK_CHANGE:return _e.setIn(["new","block"],et.block);case REPORT_RULE_CHANGE:return _e.updateIn(["new","rule_ids"],tt=>tt.includes(et.rule_id)?tt.remove(et.rule_id):tt.add(et.rule_id));case REPORT_SUBMIT_REQUEST:return _e.setIn(["new","isSubmitting"],!0);case REPORT_SUBMIT_FAIL:return _e.setIn(["new","isSubmitting"],!1);case REPORT_CANCEL:case REPORT_SUBMIT_SUCCESS:return _e.withMutations(tt=>{tt.setIn(["new","account_id"],null),tt.setIn(["new","status_ids"],Set$3()),tt.setIn(["new","chat_message"],null),tt.setIn(["new","comment"],""),tt.setIn(["new","isSubmitting"],!1),tt.setIn(["new","rule_ids"],Set$3()),tt.setIn(["new","block"],!1)});default:return _e}}const RULES_FETCH_REQUEST="RULES_FETCH_REQUEST",RULES_FETCH_SUCCESS="RULES_FETCH_SUCCESS",fetchRules=()=>(_e,et)=>(_e({type:RULES_FETCH_REQUEST}),api(et).get("/api/v1/instance/rules").then(tt=>_e({type:RULES_FETCH_SUCCESS,payload:tt.data}))),initialState$7={items:[],isLoading:!1};function rules(_e=initialState$7,et){switch(et.type){case RULES_FETCH_REQUEST:return{..._e,isLoading:!0};case RULES_FETCH_SUCCESS:return{..._e,isLoading:!1,items:et.payload};default:return _e}}const ScheduledStatusRecord=Record({id:"",scheduled_at:new Date,media_attachments:null,text:"",in_reply_to_id:null,media_ids:null,sensitive:!1,spoiler_text:"",visibility:"public",poll:null}),initialState$6=Map$3(),importStatus$2=(_e,{params:et,...tt})=>tt.scheduled_at?_e.set(tt.id,ScheduledStatusRecord(Map$3(fromJS({...tt,...et})))):_e,importStatuses$2=(_e,et)=>_e.withMutations(tt=>et.forEach(nt=>importStatus$2(tt,nt))),deleteStatus$2=(_e,et)=>_e.delete(et);function scheduled_statuses(_e=initialState$6,et){switch(et.type){case STATUS_IMPORT:case STATUS_CREATE_SUCCESS:return importStatus$2(_e,et.status);case STATUSES_IMPORT:case SCHEDULED_STATUSES_FETCH_SUCCESS:return importStatuses$2(_e,et.statuses);case SCHEDULED_STATUS_CANCEL_REQUEST:case SCHEDULED_STATUS_CANCEL_SUCCESS:return deleteStatus$2(_e,et.id);default:return _e}}const ResultsRecord=Record({accounts:OrderedSet(),statuses:OrderedSet(),groups:OrderedSet(),hashtags:OrderedSet(),accountsHasMore:!1,statusesHasMore:!1,groupsHasMore:!1,hashtagsHasMore:!1,accountsLoaded:!1,statusesLoaded:!1,groupsLoaded:!1,hashtagsLoaded:!1}),ReducerRecord$7=Record({value:"",submitted:!1,submittedValue:"",hidden:!1,results:ResultsRecord(),filter:"accounts",accountId:null,next:null}),toIds$1=(_e=[])=>OrderedSet(_e.map(et=>et.id)),importResults=(_e,et,tt,nt,rt)=>_e.withMutations(at=>{var it;at.value===tt&&at.filter===nt&&(at.set("results",ResultsRecord({accounts:toIds$1(et.accounts),statuses:toIds$1(et.statuses),groups:toIds$1(et.groups),hashtags:OrderedSet(et.hashtags.map(normalizeTag)),accountsHasMore:et.accounts.length>=20,statusesHasMore:et.statuses.length>=20,groupsHasMore:((it=et.groups)==null?void 0:it.length)>=20,hashtagsHasMore:et.hashtags.length>=20,accountsLoaded:!0,statusesLoaded:!0,groupsLoaded:!0,hashtagsLoaded:!0})),at.set("submitted",!0),at.set("next",rt))}),paginateResults=(_e,et,tt,nt,rt)=>_e.withMutations(at=>{at.value===nt&&(at.setIn(["results",`${et}HasMore`],tt[et].length>=20),at.setIn(["results",`${et}Loaded`],!0),at.set("next",rt),at.updateIn(["results",et],it=>{const ot=tt[et];return et==="hashtags"?it.concat(fromJS(ot).map(normalizeTag)):it.concat(toIds$1(ot))}))}),handleSubmitted=(_e,et)=>_e.withMutations(tt=>{tt.set("results",ResultsRecord()),tt.set("submitted",!0),tt.set("submittedValue",et)});function search(_e=ReducerRecord$7(),et){switch(et.type){case SEARCH_CHANGE:return _e.set("value",et.value);case SEARCH_CLEAR:return ReducerRecord$7();case SEARCH_RESULTS_CLEAR:return _e.merge({value:"",results:ResultsRecord(),submitted:!1,submittedValue:""});case SEARCH_SHOW:return _e.set("hidden",!1);case COMPOSE_REPLY:case COMPOSE_MENTION:case COMPOSE_DIRECT:case COMPOSE_QUOTE:return _e.set("hidden",!0);case SEARCH_FETCH_REQUEST:return handleSubmitted(_e,et.value);case SEARCH_FETCH_SUCCESS:return importResults(_e,et.results,et.searchTerm,et.searchType,et.next);case SEARCH_FILTER_SET:return _e.set("filter",et.value);case SEARCH_EXPAND_REQUEST:return _e.setIn(["results",`${et.searchType}Loaded`],!1);case SEARCH_EXPAND_SUCCESS:return paginateResults(_e,et.searchType,et.results,et.searchTerm,et.next);case SEARCH_ACCOUNT_SET:return et.accountId?ReducerRecord$7({accountId:et.accountId,filter:"statuses"}):_e.merge({results:ResultsRecord(),submitted:!1,submittedValue:"",filter:"accounts",accountId:null});default:return _e}}const MFA_FETCH_REQUEST="MFA_FETCH_REQUEST",MFA_FETCH_SUCCESS="MFA_FETCH_SUCCESS",MFA_FETCH_FAIL="MFA_FETCH_FAIL",MFA_BACKUP_CODES_FETCH_REQUEST="MFA_BACKUP_CODES_FETCH_REQUEST",MFA_BACKUP_CODES_FETCH_SUCCESS="MFA_BACKUP_CODES_FETCH_SUCCESS",MFA_BACKUP_CODES_FETCH_FAIL="MFA_BACKUP_CODES_FETCH_FAIL",MFA_SETUP_REQUEST="MFA_SETUP_REQUEST",MFA_SETUP_SUCCESS="MFA_SETUP_SUCCESS",MFA_SETUP_FAIL="MFA_SETUP_FAIL",MFA_CONFIRM_REQUEST="MFA_CONFIRM_REQUEST",MFA_CONFIRM_SUCCESS="MFA_CONFIRM_SUCCESS",MFA_CONFIRM_FAIL="MFA_CONFIRM_FAIL",MFA_DISABLE_REQUEST="MFA_DISABLE_REQUEST",MFA_DISABLE_SUCCESS="MFA_DISABLE_SUCCESS",MFA_DISABLE_FAIL="MFA_DISABLE_FAIL",fetchMfa=()=>(_e,et)=>(_e({type:MFA_FETCH_REQUEST}),api(et).get("/api/pleroma/accounts/mfa").then(({data:tt})=>{_e({type:MFA_FETCH_SUCCESS,data:tt})}).catch(()=>{_e({type:MFA_FETCH_FAIL})})),fetchBackupCodes=()=>(_e,et)=>(_e({type:MFA_BACKUP_CODES_FETCH_REQUEST}),api(et).get("/api/pleroma/accounts/mfa/backup_codes").then(({data:tt})=>(_e({type:MFA_BACKUP_CODES_FETCH_SUCCESS,data:tt}),tt)).catch(()=>{_e({type:MFA_BACKUP_CODES_FETCH_FAIL})})),setupMfa=_e=>(et,tt)=>(et({type:MFA_SETUP_REQUEST,method:_e}),api(tt).get(`/api/pleroma/accounts/mfa/setup/${_e}`).then(({data:nt})=>(et({type:MFA_SETUP_SUCCESS,data:nt}),nt)).catch(nt=>{throw et({type:MFA_SETUP_FAIL}),nt})),confirmMfa=(_e,et,tt)=>(nt,rt)=>{const at={code:et,password:tt};return nt({type:MFA_CONFIRM_REQUEST,method:_e,code:et}),api(rt).post(`/api/pleroma/accounts/mfa/confirm/${_e}`,at).then(({data:it})=>(nt({type:MFA_CONFIRM_SUCCESS,method:_e,code:et}),it)).catch(it=>{throw nt({type:MFA_CONFIRM_FAIL,method:_e,code:et,error:it,skipAlert:!0}),it})},disableMfa$1=(_e,et)=>(tt,nt)=>(tt({type:MFA_DISABLE_REQUEST,method:_e}),api(nt).delete(`/api/pleroma/accounts/mfa/${_e}`,{data:{password:et}}).then(({data:rt})=>(tt({type:MFA_DISABLE_SUCCESS,method:_e}),rt)).catch(rt=>{throw tt({type:MFA_DISABLE_FAIL,method:_e,skipAlert:!0}),rt})),TokenRecord=Record({id:0,app_name:"",valid_until:""}),ReducerRecord$6=Record({tokens:List$1(),mfa:Map$3({settings:Map$3({totp:!1})})}),deleteToken=(_e,et)=>_e.update("tokens",tt=>tt.filterNot(nt=>nt.id===et)),importMfa=(_e,et)=>_e.set("mfa",et),enableMfa=(_e,et)=>_e.setIn(["mfa","settings",et],!0),disableMfa=(_e,et)=>_e.setIn(["mfa","settings",et],!1);function security(_e=ReducerRecord$6(),et){switch(et.type){case FETCH_TOKENS_SUCCESS:return _e.set("tokens",List$1(et.tokens.map(TokenRecord)));case REVOKE_TOKEN_SUCCESS:return deleteToken(_e,et.id);case MFA_FETCH_SUCCESS:return importMfa(_e,fromJS(et.data));case MFA_CONFIRM_SUCCESS:return enableMfa(_e,et.method);case MFA_DISABLE_SUCCESS:return disableMfa(_e,et.method);default:return _e}}const updateFrequentEmojis=(_e,et)=>_e.update("frequentlyUsedEmojis",Map$3(),tt=>tt.update(et.id,0,nt=>nt+1)).set("saved",!1),importSettings=(_e,et)=>{et=fromJS(et);const tt=et.getIn(["pleroma","settings_store",FE_NAME],Map$3());return _e.merge(tt)};function settings(_e=Map$3({saved:!0}),et){switch(et.type){case ME_FETCH_SUCCESS:return importSettings(_e,et.me);case NOTIFICATIONS_FILTER_SET:case SEARCH_FILTER_SET:case SETTING_CHANGE:return _e.setIn(et.path,et.value).set("saved",!1);case EMOJI_USE:return updateFrequentEmojis(_e,et.emoji);case SETTING_SAVE:return _e.set("saved",!0);case SETTINGS_UPDATE:return Map$3(fromJS(et.settings));default:return _e}}const initialState$5={sidebarOpen:!1};function sidebar(_e=initialState$5,et){switch(et.type){case SIDEBAR_OPEN:return{sidebarOpen:!0};case SIDEBAR_CLOSE:return{sidebarOpen:!1};default:return _e}}const initialState$4=Map$3(),fallbackState=Map$3({brandColor:"#0482d8"}),updateFromAdmin=(_e,et)=>{try{return ConfigDB.find(et,":pleroma",":frontend_configurations").get("value").find(tt=>tt.getIn(["tuple",0])===":soapbox_fe").getIn(["tuple",1])}catch{return _e}},preloadImport=(_e,et)=>{const tt="/api/pleroma/frontend_configurations",nt=et.data[tt];if(nt){const rt=nt.soapbox_fe;return rt?fallbackState.mergeDeep(fromJS(rt)):fallbackState}else return _e},persistSoapboxConfig=(_e,et)=>{et&&KVStore.setItem(`soapbox_config:${et}`,_e.toJS()).catch(console.error)},importSoapboxConfig=(_e,et,tt)=>(persistSoapboxConfig(et,tt),et);function soapbox(_e=initialState$4,et){switch(et.type){case PLEROMA_PRELOAD_IMPORT:return preloadImport(_e,et);case SOAPBOX_CONFIG_REMEMBER_SUCCESS:return fromJS(et.soapboxConfig);case SOAPBOX_CONFIG_REQUEST_SUCCESS:return importSoapboxConfig(_e,fromJS(et.soapboxConfig),et.host);case SOAPBOX_CONFIG_REQUEST_FAIL:return fallbackState.mergeDeep(_e);case ADMIN_CONFIG_UPDATE_SUCCESS:return updateFromAdmin(_e,fromJS(et.configs));default:return _e}}const ReducerRecord$5=Record({ref:null,statusId:"",hovered:!1});function statusHoverCard(_e=ReducerRecord$5(),et){switch(et.type){case STATUS_HOVER_CARD_OPEN:return _e.withMutations(tt=>{tt.set("ref",et.ref),tt.set("statusId",et.statusId)});case STATUS_HOVER_CARD_UPDATE:return _e.set("hovered",!0);case STATUS_HOVER_CARD_CLOSE:return _e.hovered===!0&&!et.force?_e:ReducerRecord$5();default:return _e}}const STATUS_QUOTES_FETCH_REQUEST="STATUS_QUOTES_FETCH_REQUEST",STATUS_QUOTES_FETCH_SUCCESS="STATUS_QUOTES_FETCH_SUCCESS",STATUS_QUOTES_FETCH_FAIL="STATUS_QUOTES_FETCH_FAIL",STATUS_QUOTES_EXPAND_REQUEST="STATUS_QUOTES_EXPAND_REQUEST",STATUS_QUOTES_EXPAND_SUCCESS="STATUS_QUOTES_EXPAND_SUCCESS",STATUS_QUOTES_EXPAND_FAIL="STATUS_QUOTES_EXPAND_FAIL",noOp$1=()=>new Promise(_e=>_e(null)),fetchStatusQuotes=_e=>(et,tt)=>tt().status_lists.getIn([`quotes:${_e}`,"isLoading"])?et(noOp$1):(et({statusId:_e,type:STATUS_QUOTES_FETCH_REQUEST}),api(tt).get(`/api/v1/pleroma/statuses/${_e}/quotes`).then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");return et(importFetchedStatuses(nt.data)),et({type:STATUS_QUOTES_FETCH_SUCCESS,statusId:_e,statuses:nt.data,next:rt?rt.uri:null})}).catch(nt=>{et({type:STATUS_QUOTES_FETCH_FAIL,statusId:_e,error:nt})})),expandStatusQuotes=_e=>(et,tt)=>{const nt=tt().status_lists.getIn([`quotes:${_e}`,"next"],null);return nt===null||tt().status_lists.getIn([`quotes:${_e}`,"isLoading"])?et(noOp$1):(et({type:STATUS_QUOTES_EXPAND_REQUEST,statusId:_e}),api(tt).get(nt).then(rt=>{const at=getLinks(rt).refs.find(it=>it.rel==="next");et(importFetchedStatuses(rt.data)),et({type:STATUS_QUOTES_EXPAND_SUCCESS,statusId:_e,statuses:rt.data,next:at?at.uri:null})}).catch(rt=>{et({type:STATUS_QUOTES_EXPAND_FAIL,statusId:_e,error:rt})}))},BOOKMARKED_STATUSES_FETCH_REQUEST="BOOKMARKED_STATUSES_FETCH_REQUEST",BOOKMARKED_STATUSES_FETCH_SUCCESS="BOOKMARKED_STATUSES_FETCH_SUCCESS",BOOKMARKED_STATUSES_FETCH_FAIL="BOOKMARKED_STATUSES_FETCH_FAIL",BOOKMARKED_STATUSES_EXPAND_REQUEST="BOOKMARKED_STATUSES_EXPAND_REQUEST",BOOKMARKED_STATUSES_EXPAND_SUCCESS="BOOKMARKED_STATUSES_EXPAND_SUCCESS",BOOKMARKED_STATUSES_EXPAND_FAIL="BOOKMARKED_STATUSES_EXPAND_FAIL",noOp=()=>new Promise(_e=>_e(void 0)),fetchBookmarkedStatuses=()=>(_e,et)=>{var tt;return(tt=et().status_lists.get("bookmarks"))!=null&&tt.isLoading?_e(noOp):(_e(fetchBookmarkedStatusesRequest()),api(et).get("/api/v1/bookmarks").then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");return _e(importFetchedStatuses(nt.data)),_e(fetchBookmarkedStatusesSuccess(nt.data,rt?rt.uri:null))}).catch(nt=>{_e(fetchBookmarkedStatusesFail(nt))}))},fetchBookmarkedStatusesRequest=()=>({type:BOOKMARKED_STATUSES_FETCH_REQUEST}),fetchBookmarkedStatusesSuccess=(_e,et)=>({type:BOOKMARKED_STATUSES_FETCH_SUCCESS,statuses:_e,next:et}),fetchBookmarkedStatusesFail=_e=>({type:BOOKMARKED_STATUSES_FETCH_FAIL,error:_e}),expandBookmarkedStatuses=()=>(_e,et)=>{var nt,rt;const tt=((nt=et().status_lists.get("bookmarks"))==null?void 0:nt.next)||null;return tt===null||(rt=et().status_lists.get("bookmarks"))!=null&&rt.isLoading?_e(noOp):(_e(expandBookmarkedStatusesRequest()),api(et).get(tt).then(at=>{const it=getLinks(at).refs.find(ot=>ot.rel==="next");return _e(importFetchedStatuses(at.data)),_e(expandBookmarkedStatusesSuccess(at.data,it?it.uri:null))}).catch(at=>{_e(expandBookmarkedStatusesFail(at))}))},expandBookmarkedStatusesRequest=()=>({type:BOOKMARKED_STATUSES_EXPAND_REQUEST}),expandBookmarkedStatusesSuccess=(_e,et)=>({type:BOOKMARKED_STATUSES_EXPAND_SUCCESS,statuses:_e,next:et}),expandBookmarkedStatusesFail=_e=>({type:BOOKMARKED_STATUSES_EXPAND_FAIL,error:_e}),FAVOURITED_STATUSES_FETCH_REQUEST="FAVOURITED_STATUSES_FETCH_REQUEST",FAVOURITED_STATUSES_FETCH_SUCCESS="FAVOURITED_STATUSES_FETCH_SUCCESS",FAVOURITED_STATUSES_FETCH_FAIL="FAVOURITED_STATUSES_FETCH_FAIL",FAVOURITED_STATUSES_EXPAND_REQUEST="FAVOURITED_STATUSES_EXPAND_REQUEST",FAVOURITED_STATUSES_EXPAND_SUCCESS="FAVOURITED_STATUSES_EXPAND_SUCCESS",FAVOURITED_STATUSES_EXPAND_FAIL="FAVOURITED_STATUSES_EXPAND_FAIL",ACCOUNT_FAVOURITED_STATUSES_FETCH_REQUEST="ACCOUNT_FAVOURITED_STATUSES_FETCH_REQUEST",ACCOUNT_FAVOURITED_STATUSES_FETCH_SUCCESS="ACCOUNT_FAVOURITED_STATUSES_FETCH_SUCCESS",ACCOUNT_FAVOURITED_STATUSES_FETCH_FAIL="ACCOUNT_FAVOURITED_STATUSES_FETCH_FAIL",ACCOUNT_FAVOURITED_STATUSES_EXPAND_REQUEST="ACCOUNT_FAVOURITED_STATUSES_EXPAND_REQUEST",ACCOUNT_FAVOURITED_STATUSES_EXPAND_SUCCESS="ACCOUNT_FAVOURITED_STATUSES_EXPAND_SUCCESS",ACCOUNT_FAVOURITED_STATUSES_EXPAND_FAIL="ACCOUNT_FAVOURITED_STATUSES_EXPAND_FAIL",fetchFavouritedStatuses=()=>(_e,et)=>{var tt;isLoggedIn(et)&&((tt=et().status_lists.get("favourites"))!=null&&tt.isLoading||(_e(fetchFavouritedStatusesRequest()),api(et).get("/api/v1/favourites").then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");_e(importFetchedStatuses(nt.data)),_e(fetchFavouritedStatusesSuccess(nt.data,rt?rt.uri:null))}).catch(nt=>{_e(fetchFavouritedStatusesFail(nt))})))},fetchFavouritedStatusesRequest=()=>({type:FAVOURITED_STATUSES_FETCH_REQUEST,skipLoading:!0}),fetchFavouritedStatusesSuccess=(_e,et)=>({type:FAVOURITED_STATUSES_FETCH_SUCCESS,statuses:_e,next:et,skipLoading:!0}),fetchFavouritedStatusesFail=_e=>({type:FAVOURITED_STATUSES_FETCH_FAIL,error:_e,skipLoading:!0}),expandFavouritedStatuses=()=>(_e,et)=>{var nt,rt;if(!isLoggedIn(et))return;const tt=((nt=et().status_lists.get("favourites"))==null?void 0:nt.next)||null;tt===null||(rt=et().status_lists.get("favourites"))!=null&&rt.isLoading||(_e(expandFavouritedStatusesRequest()),api(et).get(tt).then(at=>{const it=getLinks(at).refs.find(ot=>ot.rel==="next");_e(importFetchedStatuses(at.data)),_e(expandFavouritedStatusesSuccess(at.data,it?it.uri:null))}).catch(at=>{_e(expandFavouritedStatusesFail(at))}))},expandFavouritedStatusesRequest=()=>({type:FAVOURITED_STATUSES_EXPAND_REQUEST}),expandFavouritedStatusesSuccess=(_e,et)=>({type:FAVOURITED_STATUSES_EXPAND_SUCCESS,statuses:_e,next:et}),expandFavouritedStatusesFail=_e=>({type:FAVOURITED_STATUSES_EXPAND_FAIL,error:_e}),fetchAccountFavouritedStatuses=_e=>(et,tt)=>{var nt;isLoggedIn(tt)&&((nt=tt().status_lists.get(`favourites:${_e}`))!=null&&nt.isLoading||(et(fetchAccountFavouritedStatusesRequest(_e)),api(tt).get(`/api/v1/pleroma/accounts/${_e}/favourites`).then(rt=>{const at=getLinks(rt).refs.find(it=>it.rel==="next");et(importFetchedStatuses(rt.data)),et(fetchAccountFavouritedStatusesSuccess(_e,rt.data,at?at.uri:null))}).catch(rt=>{et(fetchAccountFavouritedStatusesFail(_e,rt))})))},fetchAccountFavouritedStatusesRequest=_e=>({type:ACCOUNT_FAVOURITED_STATUSES_FETCH_REQUEST,accountId:_e,skipLoading:!0}),fetchAccountFavouritedStatusesSuccess=(_e,et,tt)=>({type:ACCOUNT_FAVOURITED_STATUSES_FETCH_SUCCESS,accountId:_e,statuses:et,next:tt,skipLoading:!0}),fetchAccountFavouritedStatusesFail=(_e,et)=>({type:ACCOUNT_FAVOURITED_STATUSES_FETCH_FAIL,accountId:_e,error:et,skipLoading:!0}),expandAccountFavouritedStatuses=_e=>(et,tt)=>{var rt,at;if(!isLoggedIn(tt))return;const nt=((rt=tt().status_lists.get(`favourites:${_e}`))==null?void 0:rt.next)||null;nt===null||(at=tt().status_lists.get(`favourites:${_e}`))!=null&&at.isLoading||(et(expandAccountFavouritedStatusesRequest(_e)),api(tt).get(nt).then(it=>{const ot=getLinks(it).refs.find(st=>st.rel==="next");et(importFetchedStatuses(it.data)),et(expandAccountFavouritedStatusesSuccess(_e,it.data,ot?ot.uri:null))}).catch(it=>{et(expandAccountFavouritedStatusesFail(_e,it))}))},expandAccountFavouritedStatusesRequest=_e=>({type:ACCOUNT_FAVOURITED_STATUSES_EXPAND_REQUEST,accountId:_e}),expandAccountFavouritedStatusesSuccess=(_e,et,tt)=>({type:ACCOUNT_FAVOURITED_STATUSES_EXPAND_SUCCESS,accountId:_e,statuses:et,next:tt}),expandAccountFavouritedStatusesFail=(_e,et)=>({type:ACCOUNT_FAVOURITED_STATUSES_EXPAND_FAIL,accountId:_e,error:et}),PINNED_STATUSES_FETCH_REQUEST="PINNED_STATUSES_FETCH_REQUEST",PINNED_STATUSES_FETCH_SUCCESS="PINNED_STATUSES_FETCH_SUCCESS",PINNED_STATUSES_FETCH_FAIL="PINNED_STATUSES_FETCH_FAIL",fetchPinnedStatuses=()=>(_e,et)=>{if(!isLoggedIn(et))return;const tt=et().me;_e(fetchPinnedStatusesRequest()),api(et).get(`/api/v1/accounts/${tt}/statuses`,{params:{pinned:!0}}).then(nt=>{_e(importFetchedStatuses(nt.data)),_e(fetchPinnedStatusesSuccess(nt.data,null))}).catch(nt=>{_e(fetchPinnedStatusesFail(nt))})},fetchPinnedStatusesRequest=()=>({type:PINNED_STATUSES_FETCH_REQUEST}),fetchPinnedStatusesSuccess=(_e,et)=>({type:PINNED_STATUSES_FETCH_SUCCESS,statuses:_e,next:et}),fetchPinnedStatusesFail=_e=>({type:PINNED_STATUSES_FETCH_FAIL,error:_e}),StatusListRecord=Record({next:null,loaded:!1,isLoading:null,items:OrderedSet()}),initialState$3=Map$3({favourites:StatusListRecord(),bookmarks:StatusListRecord(),pins:StatusListRecord(),scheduled_statuses:StatusListRecord(),recent_events:StatusListRecord(),joined_events:StatusListRecord()}),getStatusId=_e=>typeof _e=="string"?_e:_e.id,getStatusIds$1=(_e=[])=>OrderedSet(_e.map(getStatusId)),setLoading$1=(_e,et,tt)=>_e.setIn([et,"isLoading"],tt),normalizeList$1=(_e,et,tt,nt)=>_e.update(et,StatusListRecord(),rt=>rt.withMutations(at=>{at.set("next",nt),at.set("loaded",!0),at.set("isLoading",!1),at.set("items",getStatusIds$1(tt))})),appendToList$1=(_e,et,tt,nt)=>{const rt=getStatusIds$1(tt);return _e.update(et,StatusListRecord(),at=>at.withMutations(it=>{it.set("next",nt),it.set("isLoading",!1),it.update("items",ot=>ot.union(rt))}))},prependOneToList=(_e,et,tt)=>{const nt=getStatusId(tt);return _e.updateIn([et,"items"],OrderedSet(),rt=>OrderedSet([nt]).union(rt))},removeOneFromList=(_e,et,tt)=>{const nt=getStatusId(tt);return _e.updateIn([et,"items"],OrderedSet(),rt=>rt.delete(nt))},maybeAppendScheduledStatus=(_e,et)=>et.scheduled_at?prependOneToList(_e,"scheduled_statuses",getStatusId(et)):_e;function statusLists(_e=initialState$3,et){switch(et.type){case FAVOURITED_STATUSES_FETCH_REQUEST:case FAVOURITED_STATUSES_EXPAND_REQUEST:return setLoading$1(_e,"favourites",!0);case FAVOURITED_STATUSES_FETCH_FAIL:case FAVOURITED_STATUSES_EXPAND_FAIL:return setLoading$1(_e,"favourites",!1);case FAVOURITED_STATUSES_FETCH_SUCCESS:return normalizeList$1(_e,"favourites",et.statuses,et.next);case FAVOURITED_STATUSES_EXPAND_SUCCESS:return appendToList$1(_e,"favourites",et.statuses,et.next);case ACCOUNT_FAVOURITED_STATUSES_FETCH_REQUEST:case ACCOUNT_FAVOURITED_STATUSES_EXPAND_REQUEST:return setLoading$1(_e,`favourites:${et.accountId}`,!0);case ACCOUNT_FAVOURITED_STATUSES_FETCH_FAIL:case ACCOUNT_FAVOURITED_STATUSES_EXPAND_FAIL:return setLoading$1(_e,`favourites:${et.accountId}`,!1);case ACCOUNT_FAVOURITED_STATUSES_FETCH_SUCCESS:return normalizeList$1(_e,`favourites:${et.accountId}`,et.statuses,et.next);case ACCOUNT_FAVOURITED_STATUSES_EXPAND_SUCCESS:return appendToList$1(_e,`favourites:${et.accountId}`,et.statuses,et.next);case BOOKMARKED_STATUSES_FETCH_REQUEST:case BOOKMARKED_STATUSES_EXPAND_REQUEST:return setLoading$1(_e,"bookmarks",!0);case BOOKMARKED_STATUSES_FETCH_FAIL:case BOOKMARKED_STATUSES_EXPAND_FAIL:return setLoading$1(_e,"bookmarks",!1);case BOOKMARKED_STATUSES_FETCH_SUCCESS:return normalizeList$1(_e,"bookmarks",et.statuses,et.next);case BOOKMARKED_STATUSES_EXPAND_SUCCESS:return appendToList$1(_e,"bookmarks",et.statuses,et.next);case FAVOURITE_SUCCESS:return prependOneToList(_e,"favourites",et.status);case UNFAVOURITE_SUCCESS:return removeOneFromList(_e,"favourites",et.status);case BOOKMARK_SUCCESS:return prependOneToList(_e,"bookmarks",et.status);case UNBOOKMARK_SUCCESS:return removeOneFromList(_e,"bookmarks",et.status);case PINNED_STATUSES_FETCH_SUCCESS:return normalizeList$1(_e,"pins",et.statuses,et.next);case PIN_SUCCESS:return prependOneToList(_e,"pins",et.status);case UNPIN_SUCCESS:return removeOneFromList(_e,"pins",et.status);case SCHEDULED_STATUSES_FETCH_REQUEST:case SCHEDULED_STATUSES_EXPAND_REQUEST:return setLoading$1(_e,"scheduled_statuses",!0);case SCHEDULED_STATUSES_FETCH_FAIL:case SCHEDULED_STATUSES_EXPAND_FAIL:return setLoading$1(_e,"scheduled_statuses",!1);case SCHEDULED_STATUSES_FETCH_SUCCESS:return normalizeList$1(_e,"scheduled_statuses",et.statuses,et.next);case SCHEDULED_STATUSES_EXPAND_SUCCESS:return appendToList$1(_e,"scheduled_statuses",et.statuses,et.next);case SCHEDULED_STATUS_CANCEL_REQUEST:case SCHEDULED_STATUS_CANCEL_SUCCESS:return removeOneFromList(_e,"scheduled_statuses",et.id||et.status.id);case STATUS_QUOTES_FETCH_REQUEST:case STATUS_QUOTES_EXPAND_REQUEST:return setLoading$1(_e,`quotes:${et.statusId}`,!0);case STATUS_QUOTES_FETCH_FAIL:case STATUS_QUOTES_EXPAND_FAIL:return setLoading$1(_e,`quotes:${et.statusId}`,!1);case STATUS_QUOTES_FETCH_SUCCESS:return normalizeList$1(_e,`quotes:${et.statusId}`,et.statuses,et.next);case STATUS_QUOTES_EXPAND_SUCCESS:return appendToList$1(_e,`quotes:${et.statusId}`,et.statuses,et.next);case RECENT_EVENTS_FETCH_REQUEST:return setLoading$1(_e,"recent_events",!0);case RECENT_EVENTS_FETCH_FAIL:return setLoading$1(_e,"recent_events",!1);case RECENT_EVENTS_FETCH_SUCCESS:return normalizeList$1(_e,"recent_events",et.statuses,et.next);case JOINED_EVENTS_FETCH_REQUEST:return setLoading$1(_e,"joined_events",!0);case JOINED_EVENTS_FETCH_FAIL:return setLoading$1(_e,"joined_events",!1);case JOINED_EVENTS_FETCH_SUCCESS:return normalizeList$1(_e,"joined_events",et.statuses,et.next);case STATUS_CREATE_SUCCESS:return maybeAppendScheduledStatus(_e,et.status);default:return _e}}const domParser=new DOMParser,minifyStatus=_e=>_e.mergeWith((et,tt)=>tt||et,{reblog:normalizeId$1(_e.getIn(["reblog","id"])),poll:normalizeId$1(_e.getIn(["poll","id"])),quote:normalizeId$1(_e.getIn(["quote","id"]))}),getPollOptionTitles=({poll:_e})=>_e&&typeof _e=="object"?_e.options.map(({title:et})=>et):[],getMentionedUsernames=_e=>_e.mentions.map(({acct:et})=>`@${et}`),buildSearchContent=_e=>{const et=getPollOptionTitles(_e),tt=getMentionedUsernames(_e),nt=List$1([_e.spoiler_text,_e.content]).concat(et).concat(tt);return unescapeHTML(nt.join(` +\v\f\r`,messages$9={placeholder:{id:"compose_form.placeholder",defaultMessage:"What's on your mind?"},pollPlaceholder:{id:"compose_form.poll_placeholder",defaultMessage:"Add a poll topic…"},eventPlaceholder:{id:"compose_form.event_placeholder",defaultMessage:"Post to this event"},spoiler_placeholder:{id:"compose_form.spoiler_placeholder",defaultMessage:"Write your warning here (optional)"},publish:{id:"compose_form.publish",defaultMessage:"Post"},publishLoud:{id:"compose_form.publish_loud",defaultMessage:"{publish}!"},message:{id:"compose_form.message",defaultMessage:"Message"},schedule:{id:"compose_form.schedule",defaultMessage:"Schedule"},saveChanges:{id:"compose_form.save_changes",defaultMessage:"Save changes"}},ComposeForm=function _e(et){var tt=et.id,nt=et.shouldCondense,rt=et.autoFocus,at=et.clickableAreaRef,it=et.event,ot=et.group,st=et.extra,ct=useHistory(),ut=useIntl(),dt=useAppDispatch(),ft=useInstance(),pt=ft.configuration,mt=useCompose(tt),ht=useAppSelector(function(bn){return bn.search.submitted&&!bn.search.hidden}),Et=useAppSelector(function(bn){return!!(bn.modals.size&&bn.modals.last().modalType==="COMPOSE")}),yt=pt.statuses.max_characters,vt=useAppSelector(function(bn){return bn.scheduled_statuses.size}),gt=useFeatures(),St=mt.text,Rt=mt.suggestions,$t=mt.spoiler,bt=mt.spoiler_text,wt=mt.privacy,xt=mt.focusDate,Tt=mt.caretPosition,Ct=mt.is_submitting,Nt=mt.is_changing_upload,At=mt.is_uploading,kt=mt.schedule,Pt=mt.group_id,Ft=usePrevious$1($t),Dt=!!mt.poll,Lt=mt.id!==null,It=mt.media_attachments.size>0,Ot=reactExports.useState(!1),Ut=_slicedToArray$4(Ot,2),jt=Ut[0],zt=Ut[1],Qt=reactExports.useRef(null),Xt=reactExports.useRef(null),Yt=reactExports.useRef(null),Bt=useDraggedFiles(Qt),Kt=Bt.isDraggedOver,Wt=function(yn){dt(changeCompose(tt,yn.target.value))},sn=function(yn){yn.keyCode===13&&(yn.ctrlKey||yn.metaKey)&&(Tn(),yn.preventDefault())},pn=function(){return at?at.current:Qt.current},mn=function(){return!(St||bt||It)},hn=function(yn){return![pn(),document.querySelector(".privacy-dropdown__dropdown"),document.querySelector("em-emoji-picker"),document.getElementById("modal-overlay"),document.querySelector(".markup-dropdown__dropdown")].some(function(xn){return xn==null?void 0:xn.contains(yn.target)})},_n=reactExports.useCallback(function(bn){mn()&&hn(bn)&&En()},[]),En=function(){zt(!1)},On=function(){zt(!0)},Cn=function(yn){var xn=[],kn={status:!0},Kn=_createForOfIteratorHelper(yn),Xn;try{for(Kn.s();!(Xn=Kn.n()).done;){var nr=Xn.value;if(!nr){kn={status:!1,message:"Empty poll options are not allowed."};break}if(xn.includes(nr)){kn={status:!1,message:"Duplicate poll options are not allowed."};break}xn.push(nr)}}catch(ar){Kn.e(ar)}finally{Kn.f()}return kn},Tn=function(yn){var xn,kn;St!==((xn=Yt.current)===null||xn===void 0||(xn=xn.textarea)===null||xn===void 0?void 0:xn.value)&&dt(changeCompose(tt,Yt.current.textarea.value));var Kn=[bt,countableText(St)].join("");yn&&yn.preventDefault();var Xn=Cn(((kn=mt.poll)===null||kn===void 0?void 0:kn.options.toArray())||[]);if(!Xn.status){toast.error(Xn.message||"Invalid poll options");return}Ct||At||Nt||length_1(Kn)>yt||Kn.length!==0&&Kn.trim().length===0&&!It||dt(submitCompose(tt,ct))},Mn=function(){dt(clearComposeSuggestions(tt))},Fn=function(yn){dt(fetchComposeSuggestions(tt,yn))},zn=function(yn,xn,kn){kn&&dt(selectComposeSuggestion(tt,yn,xn,kn,["text"]))},Dn=function(yn,xn,kn){dt(selectComposeSuggestion(tt,yn,xn,kn,["spoiler_text"]))},Bn=function(yn){var xn,kn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:yn;(xn=Yt.current)!==null&&xn!==void 0&&xn.textarea&&Yt.current.textarea.setSelectionRange(yn,kn)},Vn=function(yn){var xn=Yt.current.textarea.selectionStart,kn=!!yn.custom&&xn>0&&!allowedAroundShortCode.includes(St[xn-1]);dt(insertEmojiCompose(tt,xn,yn,kn))},Zn=function(yn){dt(uploadCompose(tt,yn,ut))},er=function(){var yn;(yn=Xt.current)===null||yn===void 0||(yn=yn.input)===null||yn===void 0||yn.focus()},Pn=function(){var yn;(yn=Yt.current)===null||yn===void 0||(yn=yn.textarea)===null||yn===void 0||yn.focus()};reactExports.useEffect(function(){var bn=St.length;return document.addEventListener("click",_n,!0),bn>0&&Bn(bn),function(){document.removeEventListener("click",_n,!0)}},[]),reactExports.useEffect(function(){$t&&!Ft?er():!$t&&Ft&&Pn()},[$t]),reactExports.useEffect(function(){typeof Tt=="number"&&Bn(Tt)},[xt]);var $n=reactExports.useCallback(function(){return _createRawReactElement(HStack,{alignItems:"center",space:2},void 0,gt.media&&_createRawReactElement(UploadButtonContainer,{composeId:tt}),_createRawReactElement(EmojiPickerDropdownContainer,{onPickEmoji:Vn}),gt.polls&&_createRawReactElement(PollButton,{composeId:tt}),gt.privacyScopes&&!ot&&!Pt&&_createRawReactElement(PrivacyDropdown,{composeId:tt}),gt.scheduledStatuses&&_createRawReactElement(ScheduleButton,{composeId:tt}),gt.spoilers&&_createRawReactElement(SpoilerButton,{composeId:tt}),gt.richText&&_createRawReactElement(MarkupDropdown,{composeId:tt}))},[gt,tt]),Ln=nt&&!Kt&&!jt&&mn()&&!At,Gn=Ct,Jn=[bt,countableText(St)].join(""),ir=Gn||At||Nt||length_1(Jn)>yt||Jn.length!==0&&Jn.trim().length===0&&!It||!Jn,or=rt&&!ht&&!isMobile(window.innerWidth),jn="",rr,tr;return Lt?jn=ut.formatMessage(messages$9.saveChanges):wt==="direct"?(jn=ut.formatMessage(messages$9.message),rr=vitePluginRequire_1697864655029_52560061):wt==="private"?(jn=ut.formatMessage(messages$9.publish),rr=vitePluginRequire_1697864655871_30959129):jn=wt!=="unlisted"?ut.formatMessage(messages$9.publishLoud,{publish:ut.formatMessage(messages$9.publish)}):ut.formatMessage(messages$9.publish),kt&&(jn=ut.formatMessage(messages$9.schedule)),it?tr=messages$9.eventPlaceholder:Dt?tr=messages$9.pollPlaceholder:tr=messages$9.placeholder,React$3.createElement(Stack,{className:"w-full",space:4,ref:Qt,onClick:_n,element:"form",onSubmit:Tn},vt>0&&!it&&!ot&&_createRawReactElement(Warning,{message:_createRawReactElement(FormattedMessage$1,{id:"compose_form.scheduled_statuses.message",defaultMessage:"You have scheduled posts. {click_here} to see them.",values:{click_here:_createRawReactElement(Link$2,{to:"/scheduled_statuses"},void 0,_createRawReactElement(FormattedMessage$1,{id:"compose_form.scheduled_statuses.click_here",defaultMessage:"Click here"}))}})}),_createRawReactElement(WarningWrapper,{composeId:tt}),!nt&&!it&&!ot&&Pt&&_createRawReactElement(ReplyGroupIndicator,{composeId:tt}),!nt&&!it&&!ot&&_createRawReactElement(ReplyIndicatorContainer,{composeId:tt}),!nt&&!it&&!ot&&_createRawReactElement(ReplyMentions,{composeId:tt}),React$3.createElement(AutosuggestTextarea,{ref:Et&&nt?void 0:Yt,placeholder:ut.formatMessage(tr),disabled:Gn,value:St,onChange:Wt,suggestions:Rt,onKeyDown:sn,onFocus:On,onSuggestionsFetchRequested:Fn,onSuggestionsClearRequested:Mn,onSuggestionSelected:zn,onPaste:Zn,autoFocus:or,condensed:Ln,id:"compose-textarea",keymap:"n"},!Ln&&_createRawReactElement(Stack,{space:4,className:"compose-form__modifiers"},void 0,_createRawReactElement(UploadForm,{composeId:tt}),_createRawReactElement(PollForm,{composeId:tt}),React$3.createElement(SpoilerInput,{composeId:tt,onSuggestionsFetchRequested:Fn,onSuggestionsClearRequested:Mn,onSuggestionSelected:Dn,ref:Xt}),_createRawReactElement(ScheduleFormContainer,{composeId:tt}))),_createRawReactElement(QuotedStatusContainer,{composeId:tt}),st&&_createRawReactElement("div",{className:clsx({hidden:Ln})},void 0,st),_createRawReactElement("div",{className:clsx("flex flex-wrap items-center justify-between",{hidden:Ln})},void 0,$n(),_createRawReactElement(HStack,{space:4,alignItems:"center",className:"ml-auto rtl:ml-0 rtl:mr-auto"},void 0,yt&&_createRawReactElement(HStack,{space:1,alignItems:"center"},void 0,_createRawReactElement(TextCharacterCounter,{max:yt,text:St}),_createRawReactElement(VisualCharacterCounter,{max:yt,text:St})),_createRawReactElement(Button,{type:"submit",theme:"primary",text:jn,icon:rr,disabled:ir}))))},HomePage=function _e(et){var tt=et.children,nt=useIntl(),rt=useAppDispatch(),at=useAppSelector(function(vt){return vt.me}),it=useOwnAccount(),ot=it.account,st=useFeatures(),ct=useSoapboxConfig(),ut="home",dt=reactExports.useRef(null),ft=ct.extensions.getIn(["patron","enabled"])===!0,pt=useDraggedFiles(dt,function(vt){rt(uploadCompose(ut,vt,nt))}),mt=pt.isDragging,ht=pt.isDraggedOver,Et=ot?ot.acct:"",yt=ot?ot.avatar:"";return React$3.createElement(React$3.Fragment,null,_createRawReactElement(Layout.Main,{className:"space-y-3 pt-3 dark:divide-gray-800 sm:pt-0"},void 0,at&&React$3.createElement(Card$1,{className:clsx("relative z-[1] transition",{"border-2 border-primary-600 border-dashed z-[99]":mt,"ring-2 ring-offset-2 ring-primary-600":ht}),variant:"rounded",ref:dt},_createRawReactElement(CardBody,{},void 0,_createRawReactElement(HStack,{alignItems:"start",space:4},void 0,_createRawReactElement(Link$2,{to:"/@".concat(Et)},void 0,_createRawReactElement(Avatar,{src:yt,size:46})),_createRawReactElement("div",{className:"w-full translate-y-0.5"},void 0,_createRawReactElement(ComposeForm,{id:ut,shouldCondense:!0,autoFocus:!1,clickableAreaRef:dt}))))),st.carousel&&_createRawReactElement(FeedCarousel,{}),tt,!at&&_createRawReactElement(BundleContainer,{fetchComponent:CtaBanner},void 0,function(vt){return _createRawReactElement(vt,{},"cta-banner")})),_createRawReactElement(Layout.Aside,{},void 0,!at&&_createRawReactElement(BundleContainer,{fetchComponent:SignUpPanel},void 0,function(vt){return _createRawReactElement(vt,{})}),at&&st.announcements&&_createRawReactElement(BundleContainer,{fetchComponent:AnnouncementsPanel},void 0,function(vt){return _createRawReactElement(vt,{},"announcements-panel")}),st.trends&&_createRawReactElement(BundleContainer,{fetchComponent:TrendsPanel},void 0,function(vt){return _createRawReactElement(vt,{limit:5})}),ft&&_createRawReactElement(BundleContainer,{fetchComponent:FundingPanel},void 0,function(vt){return _createRawReactElement(vt,{})}),_createRawReactElement(BundleContainer,{fetchComponent:PromoPanel},void 0,function(vt){return _createRawReactElement(vt,{})}),st.birthdays&&_createRawReactElement(BundleContainer,{fetchComponent:BirthdayPanel},void 0,function(vt){return _createRawReactElement(vt,{limit:10})}),at&&st.suggestions&&_createRawReactElement(BundleContainer,{fetchComponent:WhoToFollowPanel},void 0,function(vt){return _createRawReactElement(vt,{limit:3})}),_createRawReactElement(LinkFooter,{},"link-footer")))},ManageGroupsPage=function _e(et){var tt=et.children;return React$3.createElement(React$3.Fragment,null,_createRawReactElement(Layout.Main,{},void 0,tt),_createRawReactElement(Layout.Aside,{},void 0,_createRawReactElement(BundleContainer,{fetchComponent:NewGroupPanel},void 0,function(nt){return _createRawReactElement(nt,{})}),_createRawReactElement(BundleContainer,{fetchComponent:MyGroupsPanel},void 0,function(nt){return _createRawReactElement(nt,{})}),_createRawReactElement(LinkFooter,{})))};const vitePluginRequire_1697864661781_61988579="/packs/assets/user-x-5766c17b.svg",vitePluginRequire_1697864661781_12178154="/packs/assets/user-check-b58f6cec.svg",vitePluginRequire_1697864661780_95579331="/packs/assets/rss-94d4892d.svg",DOMAIN_BLOCK_REQUEST="DOMAIN_BLOCK_REQUEST",DOMAIN_BLOCK_SUCCESS="DOMAIN_BLOCK_SUCCESS",DOMAIN_BLOCK_FAIL="DOMAIN_BLOCK_FAIL",DOMAIN_UNBLOCK_REQUEST="DOMAIN_UNBLOCK_REQUEST",DOMAIN_UNBLOCK_SUCCESS="DOMAIN_UNBLOCK_SUCCESS",DOMAIN_UNBLOCK_FAIL="DOMAIN_UNBLOCK_FAIL",DOMAIN_BLOCKS_FETCH_REQUEST="DOMAIN_BLOCKS_FETCH_REQUEST",DOMAIN_BLOCKS_FETCH_SUCCESS="DOMAIN_BLOCKS_FETCH_SUCCESS",DOMAIN_BLOCKS_FETCH_FAIL="DOMAIN_BLOCKS_FETCH_FAIL",DOMAIN_BLOCKS_EXPAND_REQUEST="DOMAIN_BLOCKS_EXPAND_REQUEST",DOMAIN_BLOCKS_EXPAND_SUCCESS="DOMAIN_BLOCKS_EXPAND_SUCCESS",DOMAIN_BLOCKS_EXPAND_FAIL="DOMAIN_BLOCKS_EXPAND_FAIL",blockDomain=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(blockDomainRequest(_e)),api(tt).post("/api/v1/domain_blocks",{domain:_e}).then(()=>{const nt=selectAccountsByDomain(tt(),_e);nt&&et(blockDomainSuccess(_e,nt))}).catch(nt=>{et(blockDomainFail(_e,nt))}))},blockDomainRequest=_e=>({type:DOMAIN_BLOCK_REQUEST,domain:_e}),blockDomainSuccess=(_e,et)=>({type:DOMAIN_BLOCK_SUCCESS,domain:_e,accounts:et}),blockDomainFail=(_e,et)=>({type:DOMAIN_BLOCK_FAIL,domain:_e,error:et}),unblockDomain=_e=>(et,tt)=>{if(!isLoggedIn(tt))return;et(unblockDomainRequest(_e));const nt={params:{domain:_e},data:{domain:_e}};api(tt).delete("/api/v1/domain_blocks",nt).then(()=>{const rt=selectAccountsByDomain(tt(),_e);rt&&et(unblockDomainSuccess(_e,rt))}).catch(rt=>{et(unblockDomainFail(_e,rt))})},unblockDomainRequest=_e=>({type:DOMAIN_UNBLOCK_REQUEST,domain:_e}),unblockDomainSuccess=(_e,et)=>({type:DOMAIN_UNBLOCK_SUCCESS,domain:_e,accounts:et}),unblockDomainFail=(_e,et)=>({type:DOMAIN_UNBLOCK_FAIL,domain:_e,error:et}),fetchDomainBlocks=()=>(_e,et)=>{isLoggedIn(et)&&(_e(fetchDomainBlocksRequest()),api(et).get("/api/v1/domain_blocks").then(tt=>{const nt=getLinks(tt).refs.find(rt=>rt.rel==="next");_e(fetchDomainBlocksSuccess(tt.data,nt?nt.uri:null))}).catch(tt=>{_e(fetchDomainBlocksFail(tt))}))},fetchDomainBlocksRequest=()=>({type:DOMAIN_BLOCKS_FETCH_REQUEST}),fetchDomainBlocksSuccess=(_e,et)=>({type:DOMAIN_BLOCKS_FETCH_SUCCESS,domains:_e,next:et}),fetchDomainBlocksFail=_e=>({type:DOMAIN_BLOCKS_FETCH_FAIL,error:_e}),expandDomainBlocks=()=>(_e,et)=>{if(!isLoggedIn(et))return;const tt=et().domain_lists.blocks.next;tt&&(_e(expandDomainBlocksRequest()),api(et).get(tt).then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");_e(expandDomainBlocksSuccess(nt.data,rt?rt.uri:null))}).catch(nt=>{_e(expandDomainBlocksFail(nt))}))};function selectAccountsByDomain(_e,et){var at;const tt=(at=_e.entities[Entities.ACCOUNTS])==null?void 0:at.store,nt=tt?Object.entries(tt):void 0;return(nt==null?void 0:nt.filter(([it,ot])=>ot&&ot.acct.endsWith(`@${et}`)).map(([it,ot])=>ot.id))||[]}const expandDomainBlocksRequest=()=>({type:DOMAIN_BLOCKS_EXPAND_REQUEST}),expandDomainBlocksSuccess=(_e,et)=>({type:DOMAIN_BLOCKS_EXPAND_SUCCESS,domains:_e,next:et}),expandDomainBlocksFail=_e=>({type:DOMAIN_BLOCKS_EXPAND_FAIL,error:_e}),SEARCH_CHANGE="SEARCH_CHANGE",SEARCH_CLEAR="SEARCH_CLEAR",SEARCH_SHOW="SEARCH_SHOW",SEARCH_RESULTS_CLEAR="SEARCH_RESULTS_CLEAR",SEARCH_FETCH_REQUEST="SEARCH_FETCH_REQUEST",SEARCH_FETCH_SUCCESS="SEARCH_FETCH_SUCCESS",SEARCH_FETCH_FAIL="SEARCH_FETCH_FAIL",SEARCH_FILTER_SET="SEARCH_FILTER_SET",SEARCH_EXPAND_REQUEST="SEARCH_EXPAND_REQUEST",SEARCH_EXPAND_SUCCESS="SEARCH_EXPAND_SUCCESS",SEARCH_EXPAND_FAIL="SEARCH_EXPAND_FAIL",SEARCH_ACCOUNT_SET="SEARCH_ACCOUNT_SET",changeSearch=_e=>et=>_e.length===0?(et(clearSearchResults()),et({type:SEARCH_CHANGE,value:_e})):et({type:SEARCH_CHANGE,value:_e}),clearSearch=()=>({type:SEARCH_CLEAR}),clearSearchResults=()=>({type:SEARCH_RESULTS_CLEAR}),submitSearch=_e=>(et,tt)=>{const nt=tt().search.value,rt=_e||tt().search.filter||"accounts",at=tt().search.accountId;if(nt.length===0)return;et(fetchSearchRequest(nt));const it={q:nt,resolve:!0,limit:20,type:rt};at&&(it.account_id=at),api(tt).get("/api/v2/search",{params:it}).then(ot=>{ot.data.accounts&&et(importFetchedAccounts(ot.data.accounts)),ot.data.statuses&&et(importFetchedStatuses(ot.data.statuses));const st=getLinks(ot).refs.find(ct=>ct.rel==="next");et(fetchSearchSuccess(ot.data,nt,rt,st?st.uri:null)),et(fetchRelationships(ot.data.accounts.map(ct=>ct.id)))}).catch(ot=>{et(fetchSearchFail(ot))})},fetchSearchRequest=_e=>({type:SEARCH_FETCH_REQUEST,value:_e}),fetchSearchSuccess=(_e,et,tt,nt)=>({type:SEARCH_FETCH_SUCCESS,results:_e,searchTerm:et,searchType:tt,next:nt}),fetchSearchFail=_e=>({type:SEARCH_FETCH_FAIL,error:_e}),setFilter=_e=>et=>{et(submitSearch(_e)),et({type:SEARCH_FILTER_SET,path:["search","filter"],value:_e})},expandSearch=_e=>(et,tt)=>{const nt=tt().search.value,rt=tt().search.results[_e].size,at=tt().search.accountId;et(expandSearchRequest(_e));let it=tt().search.next,ot={};it||(it="/api/v2/search",ot={q:nt,type:_e,offset:rt},at&&(ot.account_id=at)),api(tt).get(it,{params:ot}).then(st=>{const ct=st.data;ct.accounts&&et(importFetchedAccounts(ct.accounts)),ct.statuses&&et(importFetchedStatuses(ct.statuses));const ut=getLinks(st).refs.find(dt=>dt.rel==="next");et(expandSearchSuccess(ct,nt,_e,ut?ut.uri:null)),et(fetchRelationships(ct.accounts.map(dt=>dt.id)))}).catch(st=>{et(expandSearchFail(st))})},expandSearchRequest=_e=>({type:SEARCH_EXPAND_REQUEST,searchType:_e}),expandSearchSuccess=(_e,et,tt,nt)=>({type:SEARCH_EXPAND_SUCCESS,results:_e,searchTerm:et,searchType:tt,next:nt}),expandSearchFail=_e=>({type:SEARCH_EXPAND_FAIL,error:_e}),showSearch=()=>({type:SEARCH_SHOW}),setSearchAccount=_e=>({type:SEARCH_ACCOUNT_SET,accountId:_e}),vitePluginRequire_1697864669750_16055070="/packs/assets/briefcase-e6658dd7.svg";var MovedNote=function _e(et){var tt=et.from,nt=et.to;return _createRawReactElement("div",{className:"p-4"},void 0,_createRawReactElement(HStack,{className:"mb-2",alignItems:"center",space:1.5},void 0,_createRawReactElement(Icon,{src:vitePluginRequire_1697864669750_16055070,className:"flex-none text-primary-600 dark:text-primary-400"}),_createRawReactElement("div",{className:"truncate"},void 0,_createRawReactElement(Text$2,{theme:"muted",size:"sm",truncate:!0},void 0,_createRawReactElement(FormattedMessage$1,{id:"notification.move",defaultMessage:"{name} moved to {targetName}",values:{name:_createRawReactElement("span",{dangerouslySetInnerHTML:{__html:tt.display_name_html}}),targetName:nt.acct}})))),_createRawReactElement(Account,{account:nt,withRelationship:!1}))};const vitePluginRequire_1697864663407_75597386="/packs/assets/bell-ringing-83705da9.svg";var messages$8={subscribe:{id:"account.subscribe",defaultMessage:"Subscribe to notifications from @{name}"},unsubscribe:{id:"account.unsubscribe",defaultMessage:"Unsubscribe to notifications from @{name}"},subscribeSuccess:{id:"account.subscribe.success",defaultMessage:"You have subscribed to this account."},unsubscribeSuccess:{id:"account.unsubscribe.success",defaultMessage:"You have unsubscribed from this account."},subscribeFailure:{id:"account.subscribe.failure",defaultMessage:"An error occurred trying to subscribe to this account."},unsubscribeFailure:{id:"account.unsubscribe.failure",defaultMessage:"An error occurred trying to unsubscribe to this account."}},SubscriptionButton=function _e(et){var tt,nt,rt,at,it=et.account,ot=useAppDispatch(),st=useFeatures(),ct=useIntl(),ut=useFollow(),dt=ut.follow,ft=(tt=it.relationship)===null||tt===void 0?void 0:tt.following,pt=(nt=it.relationship)===null||nt===void 0?void 0:nt.requested,mt=st.accountNotifies?(rt=it.relationship)===null||rt===void 0?void 0:rt.notifying:(at=it.relationship)===null||at===void 0?void 0:at.subscribing,ht=mt?ct.formatMessage(messages$8.unsubscribe,{name:it.username}):ct.formatMessage(messages$8.subscribe,{name:it.username}),Et=function(){return toast.success(ct.formatMessage(messages$8.subscribeSuccess))},yt=function(){return toast.error(ct.formatMessage(messages$8.subscribeFailure))},vt=function(){return toast.success(ct.formatMessage(messages$8.unsubscribeSuccess))},gt=function(){return toast.error(ct.formatMessage(messages$8.unsubscribeFailure))},St=function(){var wt;if((wt=it.relationship)!==null&&wt!==void 0&&wt.notifying){var xt;(xt=dt(it.id,{notify:!1}))===null||xt===void 0||xt.then(function(){return vt()}).catch(function(){return gt()})}else{var Tt;(Tt=dt(it.id,{notify:!0}))===null||Tt===void 0||Tt.then(function(){return Et()}).catch(function(){return yt()})}},Rt=function(){var wt;if((wt=it.relationship)!==null&&wt!==void 0&&wt.subscribing){var xt;(xt=ot(unsubscribeAccount(it.id)))===null||xt===void 0||xt.then(function(){return vt()}).catch(function(){return gt()})}else{var Tt;(Tt=ot(subscribeAccount(it.id)))===null||Tt===void 0||Tt.then(function(){return Et()}).catch(function(){return yt()})}},$t=function(){st.accountNotifies?St():Rt()};return!st.accountSubscriptions&&!st.accountNotifies?null:pt||ft?_createRawReactElement(IconButton$1,{src:mt?vitePluginRequire_1697864663407_75597386:vitePluginRequire_1697864673476_47296655,onClick:$t,title:ht,theme:"outlined",className:"px-2",iconClassName:"h-4 w-4"}):null},messages$7={edit_profile:{id:"account.edit_profile",defaultMessage:"Edit profile"},linkVerifiedOn:{id:"account.link_verified_on",defaultMessage:"Ownership of this link was checked on {date}"},account_locked:{id:"account.locked_info",defaultMessage:"This account privacy status is set to locked. The owner manually reviews who can follow them."},mention:{id:"account.mention",defaultMessage:"Mention"},chat:{id:"account.chat",defaultMessage:"Chat with @{name}"},direct:{id:"account.direct",defaultMessage:"Direct message @{name}"},unmute:{id:"account.unmute",defaultMessage:"Unmute @{name}"},block:{id:"account.block",defaultMessage:"Block @{name}"},unblock:{id:"account.unblock",defaultMessage:"Unblock @{name}"},mute:{id:"account.mute",defaultMessage:"Mute @{name}"},report:{id:"account.report",defaultMessage:"Report @{name}"},copy:{id:"account.copy",defaultMessage:"Copy link to profile"},share:{id:"account.share",defaultMessage:"Share @{name}'s profile"},media:{id:"account.media",defaultMessage:"Media"},blockDomain:{id:"account.block_domain",defaultMessage:"Hide everything from {domain}"},unblockDomain:{id:"account.unblock_domain",defaultMessage:"Unhide {domain}"},hideReblogs:{id:"account.hide_reblogs",defaultMessage:"Hide reposts from @{name}"},showReblogs:{id:"account.show_reblogs",defaultMessage:"Show reposts from @{name}"},preferences:{id:"navigation_bar.preferences",defaultMessage:"Preferences"},follow_requests:{id:"navigation_bar.follow_requests",defaultMessage:"Follow requests"},blocks:{id:"navigation_bar.blocks",defaultMessage:"Blocked users"},domain_blocks:{id:"navigation_bar.domain_blocks",defaultMessage:"Hidden domains"},mutes:{id:"navigation_bar.mutes",defaultMessage:"Muted users"},endorse:{id:"account.endorse",defaultMessage:"Feature on profile"},unendorse:{id:"account.unendorse",defaultMessage:"Don't feature on profile"},removeFromFollowers:{id:"account.remove_from_followers",defaultMessage:"Remove this follower"},adminAccount:{id:"status.admin_account",defaultMessage:"Moderate @{name}"},add_or_remove_from_list:{id:"account.add_or_remove_from_list",defaultMessage:"Add or Remove from lists"},search:{id:"account.search",defaultMessage:"Search from @{name}"},searchSelf:{id:"account.search_self",defaultMessage:"Search your posts"},unfollowConfirm:{id:"confirmations.unfollow.confirm",defaultMessage:"Unfollow"},blockConfirm:{id:"confirmations.block.confirm",defaultMessage:"Block"},blockDomainConfirm:{id:"confirmations.domain_block.confirm",defaultMessage:"Hide entire domain"},blockAndReport:{id:"confirmations.block.block_and_report",defaultMessage:"Block & Report"},removeFromFollowersConfirm:{id:"confirmations.remove_from_followers.confirm",defaultMessage:"Remove"},userEndorsed:{id:"account.endorse.success",defaultMessage:"You are now featuring @{acct} on your profile"},userUnendorsed:{id:"account.unendorse.success",defaultMessage:"You are no longer featuring @{acct}"},profileExternal:{id:"account.profile_external",defaultMessage:"View profile on {domain}"},header:{id:"account.header.alt",defaultMessage:"Profile header"},subscribeFeed:{id:"account.rss_feed",defaultMessage:"Subscribe to RSS feed"}},Header=function _e(et){var tt=et.account,nt=useIntl(),rt=useHistory(),at=useAppDispatch(),it=useFeatures(),ot=useOwnAccount(),st=ot.account,ct=useFollow(),ut=ct.follow,dt=useAppSelector(function(Kt){return parseVersion(Kt.instance.version)}),ft=dt.software,pt=useChats(),mt=pt.getOrCreateChatByAccountId,ht=useMutation(function(Kt){return mt(Kt)},{onError:function(Wt){var sn,pn=(sn=Wt.response)===null||sn===void 0?void 0:sn.data;toast.error(pn==null?void 0:pn.error)},onSuccess:function(Wt){rt.push("/chats/".concat(Wt.data.id)),queryClient.invalidateQueries(ChatKeys.chatSearch())}});if(!tt)return _createRawReactElement("div",{className:"-mx-4 -mt-4 sm:-mx-6 sm:-mt-6"},void 0,_createRawReactElement("div",{},void 0,_createRawReactElement("div",{className:"relative h-32 w-full bg-gray-200 dark:bg-gray-900/50 md:rounded-t-xl lg:h-48"})),_createRawReactElement("div",{className:"px-4 sm:px-6"},void 0,_createRawReactElement(HStack,{alignItems:"bottom",space:5,className:"-mt-12"},void 0,_createRawReactElement("div",{className:"relative flex"},void 0,_createRawReactElement("div",{className:"h-24 w-24 rounded-full bg-gray-400 ring-4 ring-white dark:ring-gray-800"})))));var Et=function(){var Wt;(Wt=tt.relationship)!==null&&Wt!==void 0&&Wt.blocking?at(unblockAccount(tt.id)):at(openModal("CONFIRM",{icon:vitePluginRequire_1697864669750_71014420,heading:_createRawReactElement(FormattedMessage$1,{id:"confirmations.block.heading",defaultMessage:"Block @{name}",values:{name:tt.acct}}),message:_createRawReactElement(FormattedMessage$1,{id:"confirmations.block.message",defaultMessage:"Are you sure you want to block {name}?",values:{name:_createRawReactElement("strong",{className:"break-words"},void 0,"@",tt.acct)}}),confirm:nt.formatMessage(messages$7.blockConfirm),onConfirm:function(){return at(blockAccount(tt.id))},secondary:nt.formatMessage(messages$7.blockAndReport),onSecondary:function(){at(blockAccount(tt.id)),at(initReport(ReportableEntities.ACCOUNT,tt))}}))},yt=function(){at(mentionCompose(tt))},vt=function(){at(directCompose(tt))},gt=function(){var Wt;(Wt=tt.relationship)!==null&&Wt!==void 0&&Wt.showing_reblogs?ut(tt.id,{reblogs:!1}):ut(tt.id,{reblogs:!0})},St=function(){var Wt;(Wt=tt.relationship)!==null&&Wt!==void 0&&Wt.endorsed?at(unpinAccount(tt.id)).then(function(){return toast.success(nt.formatMessage(messages$7.userUnendorsed,{acct:tt.acct}))}).catch(function(){}):at(pinAccount(tt.id)).then(function(){return toast.success(nt.formatMessage(messages$7.userEndorsed,{acct:tt.acct}))}).catch(function(){})},Rt=function(){at(initReport(ReportableEntities.ACCOUNT,tt))},$t=function(){var Wt;(Wt=tt.relationship)!==null&&Wt!==void 0&&Wt.muting?at(unmuteAccount(tt.id)):at(initMuteModal(tt))},bt=function(Wt){at(openModal("CONFIRM",{icon:vitePluginRequire_1697864669750_71014420,heading:_createRawReactElement(FormattedMessage$1,{id:"confirmations.domain_block.heading",defaultMessage:"Block {domain}",values:{domain:Wt}}),message:_createRawReactElement(FormattedMessage$1,{id:"confirmations.domain_block.message",defaultMessage:"Are you really, really sure you want to block the entire {domain}? In most cases a few targeted blocks or mutes are sufficient and preferable. You will not see content from that domain in any public timelines or your notifications.",values:{domain:_createRawReactElement("strong",{},void 0,Wt)}}),confirm:nt.formatMessage(messages$7.blockDomainConfirm),onConfirm:function(){return at(blockDomain(Wt))}}))},wt=function(Wt){at(unblockDomain(Wt))},xt=function(Wt){window.open(Wt,"_blank")},Tt=function(){at(openModal("LIST_ADDER",{accountId:tt.id}))},Ct=function(){at(openModal("ACCOUNT_MODERATION",{accountId:tt.id}))},Nt=function(){at(function(Wt,sn){var pn=getSettings(sn()).get("unfollowModal");at(pn?openModal("CONFIRM",{message:_createRawReactElement(FormattedMessage$1,{id:"confirmations.remove_from_followers.message",defaultMessage:"Are you sure you want to remove {name} from your followers?",values:{name:_createRawReactElement("strong",{className:"break-words"},void 0,"@",tt.acct)}}),confirm:nt.formatMessage(messages$7.removeFromFollowersConfirm),onConfirm:function(){return at(removeFromFollowers(tt.id))}}):removeFromFollowers(tt.id))})},At=function(){at(setSearchAccount(tt.id)),rt.push("/search")},kt=function(){var Wt=normalizeAttachment({type:"image",url:tt.avatar});at(openModal("MEDIA",{media:List$1.of(Wt),index:0}))},Pt=function(Wt){Wt.button===0&&!(Wt.ctrlKey||Wt.metaKey)&&(Wt.preventDefault(),kt())},Ft=function(){var Wt=normalizeAttachment({type:"image",url:tt.header});at(openModal("MEDIA",{media:List$1.of(Wt),index:0}))},Dt=function(Wt){Wt.button===0&&!(Wt.ctrlKey||Wt.metaKey)&&(Wt.preventDefault(),Ft())},Lt=function(){window.open(ft===MASTODON?"".concat(tt.url,".rss"):"".concat(tt.url,"/feed.rss"),"_blank")},It=function(){navigator.share({text:"@".concat(tt.acct),url:tt.url}).catch(function(Wt){Wt.name!=="AbortError"&&console.error(Wt)})},Ot=function(Wt){copy(tt.url)},Ut=function(){var Wt=[];if(!tt)return[];if(it.rssFeeds&&isLocal(tt)&&Wt.push({text:nt.formatMessage(messages$7.subscribeFeed),action:Lt,icon:vitePluginRequire_1697864661780_95579331}),"share"in navigator&&Wt.push({text:nt.formatMessage(messages$7.share,{name:tt.username}),action:It,icon:vitePluginRequire_1697864652991_23502217}),it.federating&&isRemote(tt)){var sn=tt.fqn.split("@")[1];Wt.push({text:nt.formatMessage(messages$7.profileExternal,{domain:sn}),action:function(){return xt(tt.url)},icon:vitePluginRequire_1697864655028_67397852})}if(Wt.push({text:nt.formatMessage(messages$7.copy),action:Ot,icon:vitePluginRequire_1697864661780_99413139}),!st)return Wt;if(it.searchFromAccount&&Wt.push({text:nt.formatMessage(tt.id===st.id?messages$7.searchSelf:messages$7.search,{name:tt.username}),action:At,icon:vitePluginRequire_1697864655763_96912751}),Wt.length&&Wt.push(null),tt.id===st.id)Wt.push({text:nt.formatMessage(messages$7.edit_profile),to:"/settings/profile",icon:vitePluginRequire_1697864653844_80969986}),Wt.push({text:nt.formatMessage(messages$7.preferences),to:"/settings",icon:vitePluginRequire_1697864653845_68300489}),Wt.push(null),Wt.push({text:nt.formatMessage(messages$7.mutes),to:"/mutes",icon:vitePluginRequire_1697864655029_99715776}),Wt.push({text:nt.formatMessage(messages$7.blocks),to:"/blocks",icon:vitePluginRequire_1697864669750_71014420});else{var pn,mn,hn,_n;if(Wt.push({text:nt.formatMessage(messages$7.mention,{name:tt.username}),action:yt,icon:vitePluginRequire_1697864655029_83209601}),it.privacyScopes&&Wt.push({text:nt.formatMessage(messages$7.direct,{name:tt.username}),action:vt,icon:vitePluginRequire_1697864655029_52560061}),(pn=tt.relationship)!==null&&pn!==void 0&&pn.following){var En;if((En=tt.relationship)!==null&&En!==void 0&&En.showing_reblogs?Wt.push({text:nt.formatMessage(messages$7.hideReblogs,{name:tt.username}),action:gt,icon:vitePluginRequire_1697864655029_5178546}):Wt.push({text:nt.formatMessage(messages$7.showReblogs,{name:tt.username}),action:gt,icon:vitePluginRequire_1697864655029_5178546}),it.lists&&Wt.push({text:nt.formatMessage(messages$7.add_or_remove_from_list),action:Tt,icon:vitePluginRequire_1697864653844_20943787}),it.accountEndorsements){var On;Wt.push({text:nt.formatMessage((On=tt.relationship)!==null&&On!==void 0&&On.endorsed?messages$7.unendorse:messages$7.endorse),action:St,icon:vitePluginRequire_1697864661781_12178154})}}else it.lists&&it.unrestrictedLists&&Wt.push({text:nt.formatMessage(messages$7.add_or_remove_from_list),action:Tt,icon:vitePluginRequire_1697864653844_20943787});Wt.push(null),it.removeFromFollowers&&(mn=tt.relationship)!==null&&mn!==void 0&&mn.followed_by&&Wt.push({text:nt.formatMessage(messages$7.removeFromFollowers),action:Nt,icon:vitePluginRequire_1697864661781_61988579}),(hn=tt.relationship)!==null&&hn!==void 0&&hn.muting?Wt.push({text:nt.formatMessage(messages$7.unmute,{name:tt.username}),action:$t,icon:vitePluginRequire_1697864655029_99715776}):Wt.push({text:nt.formatMessage(messages$7.mute,{name:tt.username}),action:$t,icon:vitePluginRequire_1697864655029_99715776}),(_n=tt.relationship)!==null&&_n!==void 0&&_n.blocking?Wt.push({text:nt.formatMessage(messages$7.unblock,{name:tt.username}),action:Et,icon:vitePluginRequire_1697864669750_71014420}):Wt.push({text:nt.formatMessage(messages$7.block,{name:tt.username}),action:Et,icon:vitePluginRequire_1697864669750_71014420}),Wt.push({text:nt.formatMessage(messages$7.report,{name:tt.username}),action:Rt,icon:vitePluginRequire_1697864655029_81075629})}if(isRemote(tt)){var Cn,Tn=tt.fqn.split("@")[1];Wt.push(null),(Cn=tt.relationship)!==null&&Cn!==void 0&&Cn.domain_blocking?Wt.push({text:nt.formatMessage(messages$7.unblockDomain,{domain:Tn}),action:function(){return wt(Tn)},icon:vitePluginRequire_1697864669750_71014420}):Wt.push({text:nt.formatMessage(messages$7.blockDomain,{domain:Tn}),action:function(){return bt(Tn)},icon:vitePluginRequire_1697864669750_71014420})}return st.staff&&(Wt.push(null),Wt.push({text:nt.formatMessage(messages$7.adminAccount,{name:tt.username}),action:Ct,icon:vitePluginRequire_1697864655029_83692644})),Wt},jt=function(){var Wt,sn,pn,mn,hn=[];return!tt||!st||(st.id!==tt.id&&(Wt=tt.relationship)!==null&&Wt!==void 0&&Wt.followed_by?hn.push(_createRawReactElement(Badge,{slug:"opaque",title:_createRawReactElement(FormattedMessage$1,{id:"account.follows_you",defaultMessage:"Follows you"})},"followed_by")):st.id!==tt.id&&(sn=tt.relationship)!==null&&sn!==void 0&&sn.blocking&&hn.push(_createRawReactElement(Badge,{slug:"opaque",title:_createRawReactElement(FormattedMessage$1,{id:"account.blocked",defaultMessage:"Blocked"})},"blocked")),st.id!==tt.id&&(pn=tt.relationship)!==null&&pn!==void 0&&pn.muting?hn.push(_createRawReactElement(Badge,{slug:"opaque",title:_createRawReactElement(FormattedMessage$1,{id:"account.muted",defaultMessage:"Muted"})},"muted")):st.id!==tt.id&&(mn=tt.relationship)!==null&&mn!==void 0&&mn.domain_blocking&&hn.push(_createRawReactElement(Badge,{slug:"opaque",title:_createRawReactElement(FormattedMessage$1,{id:"account.domain_blocked",defaultMessage:"Domain hidden"})},"domain_blocked"))),hn},zt=function(){var Wt;return tt.header&&(Wt=_createRawReactElement(StillImage,{src:tt.header,alt:nt.formatMessage(messages$7.header)}),isDefaultHeader(tt.header)||(Wt=_createRawReactElement("a",{href:tt.header,onClick:Dt,target:"_blank"},void 0,Wt))),Wt},Qt=function(){var Wt;if(!st||!tt||tt.id===(st==null?void 0:st.id))return null;if(it.chatsWithFollowers){var sn,pn=(sn=tt.relationship)===null||sn===void 0?void 0:sn.followed_by;return pn?_createRawReactElement(IconButton$1,{src:vitePluginRequire_1697864655029_28864811,onClick:function(){return ht.mutate(tt.id)},title:nt.formatMessage(messages$7.chat,{name:tt.username}),theme:"outlined",className:"px-2",iconClassName:"h-4 w-4",disabled:ht.isLoading}):null}else return(Wt=tt.pleroma)!==null&&Wt!==void 0&&Wt.accepts_chat_messages?_createRawReactElement(IconButton$1,{src:vitePluginRequire_1697864655029_28864811,onClick:function(){return ht.mutate(tt.id)},title:nt.formatMessage(messages$7.chat,{name:tt.username}),theme:"outlined",className:"px-2",iconClassName:"h-4 w-4"}):null},Xt=function(){var Wt="share"in navigator;return tt&&st!==null&&st!==void 0&&st.id&&tt.id===(st==null?void 0:st.id)&&Wt?_createRawReactElement(IconButton$1,{src:vitePluginRequire_1697864652991_23502217,onClick:It,title:nt.formatMessage(messages$7.share,{name:tt.username}),theme:"outlined",className:"px-2",iconClassName:"h-4 w-4"}):null},Yt=jt(),Bt=Ut();return _createRawReactElement("div",{className:"-mx-4 -mt-4 sm:-mx-6 sm:-mt-6"},void 0,tt.moved&&_typeof$8(tt.moved)==="object"&&_createRawReactElement(MovedNote,{from:tt,to:tt.moved}),_createRawReactElement("div",{},void 0,_createRawReactElement("div",{className:"relative isolate flex h-32 w-full flex-col justify-center overflow-hidden bg-gray-200 dark:bg-gray-900/50 md:rounded-t-xl lg:h-48"},void 0,zt(),_createRawReactElement("div",{className:"absolute left-2 top-2"},void 0,_createRawReactElement(HStack,{alignItems:"center",space:1},void 0,Yt)))),_createRawReactElement("div",{className:"px-4 sm:px-6"},void 0,_createRawReactElement(HStack,{className:"-mt-12",alignItems:"bottom",space:5},void 0,_createRawReactElement("div",{className:"relative flex"},void 0,_createRawReactElement("a",{href:tt.avatar,onClick:Pt,target:"_blank"},void 0,_createRawReactElement(Avatar,{src:tt.avatar,size:96,className:"relative h-24 w-24 rounded-full bg-white ring-4 ring-white dark:bg-primary-900 dark:ring-primary-900"})),tt.verified&&_createRawReactElement("div",{className:"absolute bottom-0 right-0"},void 0,_createRawReactElement(VerificationBadge,{className:"h-6 w-6 rounded-full bg-white ring-2 ring-white dark:bg-primary-900 dark:ring-primary-900"}))),_createRawReactElement("div",{className:"mt-6 flex w-full justify-end sm:pb-1"},void 0,_createRawReactElement(HStack,{space:2,className:"mt-10"},void 0,_createRawReactElement(SubscriptionButton,{account:tt}),Qt(),Xt(),Bt.length>0&&_createRawReactElement(DropdownMenu,{items:Bt,placement:"bottom-end"},void 0,_createRawReactElement(IconButton$1,{src:vitePluginRequire_1697864655029_75763737,theme:"outlined",className:"px-2",iconClassName:"h-4 w-4",children:null})),_createRawReactElement(ActionButton,{account:tt}))))))},ProfilePage=function _e(et){var tt=et.params,nt=et.children,rt=useHistory(),at=(tt==null?void 0:tt.username)||"",it=useAccountLookup(at,{withRelationship:!0}),ot=it.account,st=useAppSelector(function(vt){return vt.me}),ct=useFeatures(),ut=useSoapboxConfig(),dt=ut.displayFqn;if(ot&&ot.acct!==at)return _createRawReactElement(Redirect,{to:"/@".concat(ot.acct)});var ft=[{text:_createRawReactElement(FormattedMessage$1,{id:"account.posts",defaultMessage:"Posts"}),to:"/@".concat(at),name:"profile"},{text:_createRawReactElement(FormattedMessage$1,{id:"account.posts_with_replies",defaultMessage:"Posts and replies"}),to:"/@".concat(at,"/with_replies"),name:"replies"},{text:_createRawReactElement(FormattedMessage$1,{id:"account.media",defaultMessage:"Media"}),to:"/@".concat(at,"/media"),name:"media"}];if(ot){var pt,mt=ot.id===st;(mt||((pt=ot.pleroma)===null||pt===void 0?void 0:pt.hide_favorites)===!1)&&ft.push({text:_createRawReactElement(FormattedMessage$1,{id:"navigation_bar.favourites",defaultMessage:"Likes"}),to:"/@".concat(ot.acct,"/favorites"),name:"likes"})}var ht,Et=rt.location.pathname.replace("@".concat(at,"/"),"");Et.endsWith("/with_replies")?ht="replies":Et.endsWith("/media")?ht="media":Et.endsWith("/favorites")?ht="likes":ht="profile";var yt=!["/following","/followers","/pins"].some(function(vt){return Et.endsWith(vt)});return React$3.createElement(React$3.Fragment,null,_createRawReactElement(Layout.Main,{},void 0,_createRawReactElement(Column,{size:"lg",label:ot?"".concat(ot.display_name," (@").concat(getAcct(ot,dt),")"):"",withHeader:!1},void 0,_createRawReactElement("div",{className:"space-y-4"},void 0,_createRawReactElement(Header,{account:ot}),_createRawReactElement(BundleContainer,{fetchComponent:ProfileInfoPanel},void 0,function(vt){return _createRawReactElement(vt,{username:at,account:ot})}),ot&&yt&&_createRawReactElement(Tabs,{items:ft,activeItem:ht},"profile-tabs-".concat(ot.id)),nt)),!st&&_createRawReactElement(BundleContainer,{fetchComponent:CtaBanner},void 0,function(vt){return _createRawReactElement(vt,{},"cta-banner")})),_createRawReactElement(Layout.Aside,{},void 0,!st&&_createRawReactElement(BundleContainer,{fetchComponent:SignUpPanel},void 0,function(vt){return _createRawReactElement(vt,{},"sign-up-panel")}),_createRawReactElement(BundleContainer,{fetchComponent:ProfileMediaPanel},void 0,function(vt){return _createRawReactElement(vt,{account:ot})}),ot&&ot.fields.length>0&&_createRawReactElement(BundleContainer,{fetchComponent:ProfileFieldsPanel},void 0,function(vt){return _createRawReactElement(vt,{account:ot})}),ct.accountEndorsements&&ot&&isLocal(ot)?_createRawReactElement(BundleContainer,{fetchComponent:PinnedAccountsPanel},void 0,function(vt){return _createRawReactElement(vt,{account:ot,limit:5},"pinned-accounts-panel")}):st&&ct.suggestions&&_createRawReactElement(BundleContainer,{fetchComponent:WhoToFollowPanel},void 0,function(vt){return _createRawReactElement(vt,{limit:3},"wtf-panel")}),_createRawReactElement(LinkFooter,{},"link-footer")))},RemoteInstancePage=function _e(et){var tt=et.children,nt=et.params,rt=nt==null?void 0:nt.instance,at=useOwnAccount(),it=at.account,ot=useAppSelector(federationRestrictionsDisclosed);return React$3.createElement(React$3.Fragment,null,_createRawReactElement(Layout.Main,{},void 0,tt),_createRawReactElement(Layout.Aside,{},void 0,_createRawReactElement(BundleContainer,{fetchComponent:PromoPanel},void 0,function(st){return _createRawReactElement(st,{},"promo-panel")}),_createRawReactElement(BundleContainer,{fetchComponent:InstanceInfoPanel},void 0,function(st){return _createRawReactElement(st,{host:rt})}),(ot||(it==null?void 0:it.admin))&&_createRawReactElement(BundleContainer,{fetchComponent:InstanceModerationPanel},void 0,function(st){return _createRawReactElement(st,{host:rt})}),_createRawReactElement(LinkFooter,{},"link-footer")))},SearchPage=function _e(et){var tt=et.children,nt=useAppSelector(function(at){return at.me}),rt=useFeatures();return React$3.createElement(React$3.Fragment,null,_createRawReactElement(Layout.Main,{},void 0,tt,!nt&&_createRawReactElement(BundleContainer,{fetchComponent:CtaBanner},void 0,function(at){return _createRawReactElement(at,{},"cta-banner")})),_createRawReactElement(Layout.Aside,{},void 0,!nt&&_createRawReactElement(BundleContainer,{fetchComponent:SignUpPanel},void 0,function(at){return _createRawReactElement(at,{},"sign-up-panel")}),rt.trends&&_createRawReactElement(BundleContainer,{fetchComponent:TrendsPanel},void 0,function(at){return _createRawReactElement(at,{limit:5},"trends-panel")}),nt&&rt.suggestions&&_createRawReactElement(BundleContainer,{fetchComponent:WhoToFollowPanel},void 0,function(at){return _createRawReactElement(at,{limit:3},"wtf-panel")}),rt.groups&&_createRawReactElement(BundleContainer,{fetchComponent:SuggestedGroupsPanel},void 0,function(at){return _createRawReactElement(at,{},"suggested-groups-panel")}),_createRawReactElement(LinkFooter,{},"link-footer")))},StatusPage=function _e(et){var tt=et.children,nt=useAppSelector(function(at){return at.me}),rt=useFeatures();return React$3.createElement(React$3.Fragment,null,_createRawReactElement(Layout.Main,{},void 0,tt,!nt&&_createRawReactElement(BundleContainer,{fetchComponent:CtaBanner},void 0,function(at){return _createRawReactElement(at,{},"cta-banner")})),_createRawReactElement(Layout.Aside,{},void 0,!nt&&_createRawReactElement(BundleContainer,{fetchComponent:SignUpPanel},void 0,function(at){return _createRawReactElement(at,{},"sign-up-panel")}),rt.trends&&_createRawReactElement(BundleContainer,{fetchComponent:TrendsPanel},void 0,function(at){return _createRawReactElement(at,{limit:5},"trends-panel")}),nt&&rt.suggestions&&_createRawReactElement(BundleContainer,{fetchComponent:WhoToFollowPanel},void 0,function(at){return _createRawReactElement(at,{limit:3},"wtf-panel")}),_createRawReactElement(LinkFooter,{},"link-footer")))};const PolicyKeys={policy:["policy"]};function usePendingPolicy(){const _e=useApi(),{account:et}=useOwnAccount(),tt=useFeatures(),nt=async()=>{const{data:rt}=await _e.get("/api/v1/truth/policies/pending");return rt};return useQuery(PolicyKeys.policy,nt,{retry:3,refetchOnWindowFocus:!0,staleTime:6e4,cacheTime:1/0,enabled:!!et&&tt.truthPolicies})}function useAcceptPolicy(){const _e=useApi();return useMutation(({policy_id:et})=>_e.patch(`/api/v1/truth/policies/${et}/accept`),{onSuccess(){queryClient.setQueryData(PolicyKeys.policy,{})}})}var BackgroundShapes=function _e(et){var tt=et.position,nt=tt===void 0?"fixed":tt;return _createRawReactElement("div",{className:clsx(nt,"pointer-events-none inset-x-0 top-0 flex justify-center overflow-hidden")},void 0,_createRawReactElement("div",{className:"bg-gradient-sm lg:bg-gradient-light lg:dark:bg-gradient-dark h-screen w-screen"}))};const vitePluginRequire_1697864645770_81747725="/packs/assets/pencil-plus-de54005f.svg";var messages$6={publish:{id:"compose_form.publish",defaultMessage:"Publish"}},FloatingActionButton=function _e(){var et=useLocation$1();return et.pathname.startsWith("/group/")?_createRawReactElement(GroupFAB,{}):_createRawReactElement(HomeFAB,{})},HomeFAB=function _e(){var et=useIntl(),tt=useAppDispatch(),nt=function(){tt(openModal("COMPOSE"))};return _createRawReactElement("button",{onClick:nt,className:clsx("inline-flex appearance-none items-center rounded-full border p-4 font-medium transition-all focus:outline-none focus:ring-2 focus:ring-offset-2","border-transparent bg-secondary-500 text-gray-100 hover:bg-secondary-400 focus:bg-secondary-500 focus:ring-secondary-300"),"aria-label":et.formatMessage(messages$6.publish)},void 0,_createRawReactElement(Icon$1,{src:vitePluginRequire_1697864645770_81747725,className:"h-6 w-6"}))},GroupFAB=function _e(){var et=useIntl(),tt=useAppDispatch(),nt=useRouteMatch("/group/:groupSlug"),rt=useGroupLookup((nt==null?void 0:nt.params.groupSlug)||""),at=rt.entity;if(!at)return null;var it=function(){tt(groupComposeModal(at))};return _createRawReactElement("button",{onClick:it,className:clsx("inline-flex appearance-none items-center rounded-full border p-4 font-medium transition-all focus:outline-none focus:ring-2 focus:ring-offset-2","border-transparent bg-secondary-500 text-gray-100 hover:bg-secondary-400 focus:bg-secondary-500 focus:ring-secondary-300"),"aria-label":et.formatMessage(messages$6.publish)},void 0,_createRawReactElement(HStack,{space:3,alignItems:"center"},void 0,_createRawReactElement(Avatar,{className:"-my-3 -ml-2 border-white",size:42,src:at.avatar}),_createRawReactElement(Icon$1,{src:vitePluginRequire_1697864645770_81747725,className:"h-6 w-6"})))},DirectMessageUpdates=function _e(){var et=useSoapboxConfig(),tt=et.links;return _createRawReactElement(Stack,{space:3},void 0,_createRawReactElement(Stack,{space:4,className:"rounded-lg border-2 border-solid border-primary-200 p-4 dark:border-primary-800"},void 0,_createRawReactElement(HStack,{alignItems:"center",space:3},void 0,_createRawReactElement("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},void 0,_createRawReactElement("path",{d:"M0 22.5306C0 10.0873 10.0873 0 22.5306 0H26.4828C38.3664 0 48 9.6336 48 21.5172V21.5172C48 36.1433 36.1433 48 21.5172 48H18.4615C8.26551 48 0 39.7345 0 29.5385V22.5306Z",fill:"url(#paint0_linear_2190_131524)",fillOpacity:"0.2"}),_createRawReactElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.0001 19C14.0001 17.3431 15.3433 16 17.0001 16H31.0001C32.657 16 34.0001 17.3431 34.0001 19V19.9845C34.0002 19.9942 34.0002 20.004 34.0001 20.0137V29C34.0001 30.6569 32.657 32 31.0001 32H17.0001C15.3433 32 14.0001 30.6569 14.0001 29V20.0137C14 20.004 14 19.9942 14.0001 19.9845V19ZM16.0001 21.8685V29C16.0001 29.5523 16.4478 30 17.0001 30H31.0001C31.5524 30 32.0001 29.5523 32.0001 29V21.8685L25.6642 26.0925C24.6565 26.7642 23.3437 26.7642 22.336 26.0925L16.0001 21.8685ZM32.0001 19.4648L24.5548 24.4283C24.2189 24.6523 23.7813 24.6523 23.4454 24.4283L16.0001 19.4648V19C16.0001 18.4477 16.4478 18 17.0001 18H31.0001C31.5524 18 32.0001 18.4477 32.0001 19V19.4648Z",fill:"#818CF8"}),_createRawReactElement("defs",{},void 0,_createRawReactElement("linearGradient",{id:"paint0_linear_2190_131524",x1:"0",y1:"0",x2:"43.6184",y2:"-3.69691",gradientUnits:"userSpaceOnUse"},void 0,_createRawReactElement("stop",{stopColor:"#B8A3F9"}),_createRawReactElement("stop",{offset:"1",stopColor:"#9BD5FF"})))),_createRawReactElement(Text$2,{weight:"bold"},void 0,"Direct Messaging")),_createRawReactElement(Text$2,{theme:"muted"},void 0,"Yes, direct messages are finally here!"),_createRawReactElement(Text$2,{theme:"muted"},void 0,"Bring one-on-one conversations from your Feed to your DMs with messages that automatically delete for your privacy.")),_createRawReactElement(Stack,{space:4,className:"rounded-lg border-2 border-solid border-primary-200 p-4 dark:border-primary-800"},void 0,_createRawReactElement(HStack,{alignItems:"center",space:3},void 0,_createRawReactElement("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},void 0,_createRawReactElement("path",{d:"M0 25.7561C0 22.2672 0 20.5228 0.197492 19.0588C1.52172 9.24259 9.24259 1.52172 19.0588 0.197492C20.5228 0 22.2672 0 25.7561 0H30.1176C39.9938 0 48 8.0062 48 17.8824C48 34.5159 34.5159 48 17.8824 48H15.3192C15.0228 48 14.8747 48 14.7494 47.9979C6.66132 47.8627 0.137263 41.3387 0.0020943 33.2506C0 33.1253 0 32.9772 0 32.6808V25.7561Z",fill:"url(#paint0_linear_2190_131532)",fillOpacity:"0.2"}),_createRawReactElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.9999 14C24.5522 14 24.9999 14.4477 24.9999 15V16C24.9999 16.5523 24.5522 17 23.9999 17C23.4477 17 22.9999 16.5523 22.9999 16V15C22.9999 14.4477 23.4477 14 23.9999 14ZM16.9289 16.9289C17.3194 16.5384 17.9526 16.5384 18.3431 16.9289L19.0502 17.636C19.4407 18.0266 19.4407 18.6597 19.0502 19.0503C18.6597 19.4408 18.0265 19.4408 17.636 19.0503L16.9289 18.3431C16.5384 17.9526 16.5384 17.3195 16.9289 16.9289ZM31.071 16.9289C31.4615 17.3195 31.4615 17.9526 31.071 18.3431L30.3639 19.0503C29.9734 19.4408 29.3402 19.4408 28.9497 19.0503C28.5592 18.6597 28.5592 18.0266 28.9497 17.636L29.6568 16.9289C30.0473 16.5384 30.6805 16.5384 31.071 16.9289ZM21.1715 21.1716C19.6094 22.7337 19.6094 25.2664 21.1715 26.8285L21.7186 27.3755C21.9116 27.5686 22.0848 27.7778 22.2367 28H25.7632C25.9151 27.7778 26.0882 27.5686 26.2813 27.3755L26.8284 26.8285C28.3905 25.2664 28.3905 22.7337 26.8284 21.1716C25.2663 19.6095 22.7336 19.6095 21.1715 21.1716ZM27.2448 29.4187C27.3586 29.188 27.5101 28.9751 27.6955 28.7898L28.2426 28.2427C30.5857 25.8995 30.5857 22.1005 28.2426 19.7574C25.8994 17.4142 22.1005 17.4142 19.7573 19.7574C17.4142 22.1005 17.4142 25.8995 19.7573 28.2427L20.3044 28.7898C20.4898 28.9751 20.6413 29.188 20.7551 29.4187C20.7601 29.4295 20.7653 29.4403 20.7706 29.4509C20.9202 29.7661 20.9999 30.1134 20.9999 30.469V31C20.9999 32.6569 22.3431 34 23.9999 34C25.6568 34 26.9999 32.6569 26.9999 31V30.469C26.9999 30.1134 27.0797 29.7661 27.2292 29.4509C27.2346 29.4403 27.2398 29.4295 27.2448 29.4187ZM25.0251 30H22.9748C22.9915 30.155 22.9999 30.3116 22.9999 30.469V31C22.9999 31.5523 23.4477 32 23.9999 32C24.5522 32 24.9999 31.5523 24.9999 31V30.469C24.9999 30.3116 25.0084 30.155 25.0251 30ZM14 23.9999C14 23.4477 14.4477 22.9999 15 22.9999H16C16.5523 22.9999 17 23.4477 17 23.9999C17 24.5522 16.5523 24.9999 16 24.9999H15C14.4477 24.9999 14 24.5522 14 23.9999ZM31 23.9999C31 23.4477 31.4477 22.9999 32 22.9999H33C33.5523 22.9999 34 23.4477 34 23.9999C34 24.5522 33.5523 24.9999 33 24.9999H32C31.4477 24.9999 31 24.5522 31 23.9999Z",fill:"#818CF8"}),_createRawReactElement("defs",{},void 0,_createRawReactElement("linearGradient",{id:"paint0_linear_2190_131532",x1:"0",y1:"0",x2:"43.6184",y2:"-3.69691",gradientUnits:"userSpaceOnUse"},void 0,_createRawReactElement("stop",{stopColor:"#B8A3F9"}),_createRawReactElement("stop",{offset:"1",stopColor:"#9BD5FF"})))),_createRawReactElement(Text$2,{weight:"bold"},void 0,"Privacy Policy Updates")),_createRawReactElement("ul",{className:"space-y-2"},void 0,_createRawReactElement("li",{className:"flex items-center space-x-2"},void 0,_createRawReactElement("span",{className:"flex h-8 w-8 items-center justify-center rounded-full border-2 border-solid border-gray-200 text-sm font-bold text-primary-500 dark:border-gray-800 dark:text-primary-300"},void 0,"1"),_createRawReactElement(Text$2,{theme:"muted"},void 0,"Consolidates previously-separate policies")),_createRawReactElement("li",{className:"flex items-center space-x-2"},void 0,_createRawReactElement("span",{className:"flex h-8 w-8 items-center justify-center rounded-full border-2 border-solid border-gray-200 text-sm font-bold text-primary-500 dark:border-gray-800 dark:text-primary-300"},void 0,"2"),_createRawReactElement(Text$2,{theme:"muted"},void 0,"Reaffirms jurisdiction-specific requirements")),_createRawReactElement("li",{className:"flex items-center space-x-2"},void 0,_createRawReactElement("span",{className:"flex h-8 w-8 items-center justify-center rounded-full border-2 border-solid border-gray-200 text-sm font-bold text-primary-500 dark:border-gray-800 dark:text-primary-300"},void 0,"3"),_createRawReactElement(Text$2,{theme:"muted"},void 0,"Introduces updates regarding ads and direct messages"))),tt.get("privacyPolicy")?_createRawReactElement("a",{className:"text-center font-bold text-primary-600 hover:underline dark:text-accent-blue",href:tt.get("privacyPolicy"),target:"_blank"},void 0,"View Privacy Policy"):null))},supportedPolicyIds=["1"],PolicyModal=function _e(et){var tt=et.onClose,nt=useAcceptPolicy(),rt=useAppSelector(function(ut){return ut.instance}),at=usePendingPolicy(),it=at.data,ot=at.isLoading,st=function(){switch(it==null?void 0:it.pending_policy_id){case"1":return _createRawReactElement(DirectMessageUpdates,{});default:return null}},ct=function(){nt.mutate({policy_id:it==null?void 0:it.pending_policy_id},{onSuccess:function(){tt("POLICY")}})};return ot||!it?null:_createRawReactElement(Modal,{title:"Updates"},void 0,_createRawReactElement(Stack,{space:4},void 0,_createRawReactElement(Text$2,{theme:"muted"},void 0,_createRawReactElement(FormattedMessage$1,{id:"modals.policy.updateTitle",defaultMessage:"You’ve scored the latest version of {siteTitle}! Take a moment to review the exciting new things we’ve been working on.",values:{siteTitle:rt.title}})),st(),_createRawReactElement(Button,{theme:"primary",size:"lg",block:!0,onClick:ct,disabled:nt.isLoading},void 0,_createRawReactElement(FormattedMessage$1,{id:"modals.policy.submit",defaultMessage:"Accept & Continue"}))))};const policyModal=Object.freeze(Object.defineProperty({__proto__:null,default:PolicyModal,supportedPolicyIds},Symbol.toStringTag,{value:"Module"})),SIDEBAR_OPEN="SIDEBAR_OPEN",SIDEBAR_CLOSE="SIDEBAR_CLOSE",openSidebar=()=>({type:SIDEBAR_OPEN}),closeSidebar=()=>({type:SIDEBAR_CLOSE});var _excluded$1=["onChange","onSelected","value","limit"],noOp$2=function _e(){},AutosuggestAccountInput=function _e(et){var tt=et.onChange,nt=et.onSelected,rt=et.value,at=rt===void 0?"":rt,it=et.limit,ot=it===void 0?4:it,st=_objectWithoutProperties(et,_excluded$1),ct=useAppDispatch(),ut=reactExports.useState(OrderedSet()),dt=_slicedToArray$4(ut,2),ft=dt[0],pt=dt[1],mt=reactExports.useRef(new AbortController),ht=function(){mt.current.abort(),mt.current=new AbortController},Et=function(){pt(OrderedSet())},yt=reactExports.useCallback(throttle$1(function(St){var Rt={q:St,limit:ot,resolve:!1};ct(accountSearch(Rt,mt.current.signal)).then(function($t){var bt=$t.map(function(wt){return wt.id});pt(OrderedSet(bt))}).catch(noOp$2)},900,{leading:!0,trailing:!0}),[ot]),vt=function(Rt){ht(),yt(Rt.target.value),tt(Rt)},gt=function(Rt,$t,bt){typeof bt=="string"&&bt[0]!=="#"&&nt(bt)};return reactExports.useEffect(function(){st.autoFocus&&yt("")},[]),reactExports.useEffect(function(){at===""&&Et()},[at]),React$3.createElement(AutosuggestInput,_extends$4({value:at,onChange:vt,suggestions:ft.toList(),onSuggestionsFetchRequested:noOp$2,onSuggestionsClearRequested:noOp$2,onSuggestionSelected:gt,searchTokens:[]},st))},messages$5={placeholder:{id:"search.placeholder",defaultMessage:"Search"},action:{id:"search.action",defaultMessage:"Search for “{query}”"}};function redirectToAccount(_e,et){return function(tt,nt){var rt=selectAccount(nt(),_e).acct;rt&&et&&et.push("/@".concat(rt))}}var Search=function _e(et){var tt=et.autoFocus,nt=tt===void 0?!1:tt,rt=et.autoSubmit,at=rt===void 0?!1:rt,it=et.autosuggest,ot=it===void 0?!1:it,st=et.openInRoute,ct=st===void 0?!1:st,ut=useAppDispatch(),dt=useHistory(),ft=useIntl(),pt=useAppSelector(function(xt){return xt.search.value}),mt=useAppSelector(function(xt){return xt.search.submitted}),ht=reactExports.useCallback(debounce$2(function(){ut(submitSearch())},900),[]),Et=function(Tt){var Ct=Tt.target.value;ut(changeSearch(Ct)),at&&ht()},yt=function(Tt){Tt.preventDefault(),(pt.length>0||mt)&&ut(clearSearchResults())},vt=function(){ct?(ut(setSearchAccount(null)),ut(submitSearch()),dt.push("/search")):ut(submitSearch())},gt=function(Tt){if(Tt.key==="Enter")Tt.preventDefault(),vt();else if(Tt.key==="Escape"){var Ct;(Ct=document.querySelector(".ui"))===null||Ct===void 0||(Ct=Ct.parentElement)===null||Ct===void 0||Ct.focus()}},St=function(){ut(showSearch())},Rt=function(Tt){ut(clearSearch()),ut(redirectToAccount(Tt,dt))},$t=function(){return[{text:ft.formatMessage(messages$5.action,{query:pt}),icon:vitePluginRequire_1697864655763_96912751,action:vt}]},bt=pt.length>0||mt,wt={type:"text",id:"search",placeholder:ft.formatMessage(messages$5.placeholder),value:pt,onChange:Et,onKeyDown:gt,onFocus:St,autoFocus:nt,theme:"search",className:"pr-10 rtl:pl-10 rtl:pr-3"};return ot&&(wt.onSelected=Rt,wt.menu=$t(),wt.autoSelect=!1),reactExports.useEffect(function(){return function(){var xt=dt.location.pathname,Tt=!!xt.match(/@.+\/posts\/[a-zA-Z0-9]+/g)||!!xt.match(/\/tags\/.+/g);Tt||ut(changeSearch(""))}},[]),_createRawReactElement("div",{className:"w-full"},void 0,_createRawReactElement("label",{htmlFor:"search",className:"sr-only"},void 0,ft.formatMessage(messages$5.placeholder)),_createRawReactElement("div",{className:"relative"},void 0,ot?React$3.createElement(AutosuggestAccountInput,_extends$4({hotkey:"s,/"},wt)):React$3.createElement(Input,_extends$4({ref:useHotkey("s,/")},wt)),_createRawReactElement("div",{role:"button",tabIndex:0,className:"absolute inset-y-0 right-0 flex cursor-pointer items-center px-3 rtl:left-0 rtl:right-auto",onClick:yt},void 0,_createRawReactElement(SvgIcon,{src:vitePluginRequire_1697864655763_96912751,className:clsx("h-4 w-4 text-gray-600",{hidden:bt})}),_createRawReactElement(SvgIcon,{src:vitePluginRequire_1697864655763_93677134,className:clsx("h-4 w-4 text-gray-600",{hidden:!bt}),"aria-label":ft.formatMessage(messages$5.placeholder)}))))},messages$4={add:{id:"profile_dropdown.add_account",defaultMessage:"Add an existing account"},theme:{id:"profile_dropdown.theme",defaultMessage:"Theme"},logout:{id:"profile_dropdown.logout",defaultMessage:"Log out @{acct}"}},getAccount=makeGetAccount(),ProfileDropdown=function _e(et){var tt=et.account,nt=et.children,rt=useAppDispatch(),at=useFeatures(),it=useIntl(),ot=reactExports.useState(!1),st=_slicedToArray$4(ot,2),ct=st[0],ut=st[1],dt=useFloating({placement:"bottom-end"}),ft=dt.x,pt=dt.y,mt=dt.strategy,ht=dt.refs,Et=useAppSelector(function(wt){return wt.auth.users}),yt=useAppSelector(function(wt){return Et.map(function(xt){return getAccount(wt,xt.id)})}),vt=function(){rt(logOut$1())},gt=function(xt){return function(){rt(switchAccount(xt.id))}},St=throttle$1(function(){rt(fetchOwnAccounts())},2e3),Rt=function(xt){return _createRawReactElement(Account,{account:xt,showProfileHoverCard:!1,withLinkToProfile:!1,hideActions:!0})},$t=reactExports.useMemo(function(){var wt=[];return wt.push({text:Rt(tt),to:"/@".concat(tt.acct)}),yt.forEach(function(xt){xt&&xt.id!==tt.id&&wt.push({text:Rt(xt),action:gt(xt)})}),wt.push({text:null}),wt.push({text:it.formatMessage(messages$4.theme),toggle:_createRawReactElement(ThemeToggle,{})}),wt.push({text:null}),wt.push({text:it.formatMessage(messages$4.add),to:"/login/add",icon:vitePluginRequire_1697864656348_26092255}),wt.push({text:it.formatMessage(messages$4.logout,{acct:tt.acct}),to:"/logout",action:vt,icon:vitePluginRequire_1697864667738_20054408}),wt},[tt,Et,at]),bt=function(){return ut(!ct)};return reactExports.useEffect(function(){St()},[tt,Et]),useClickOutside(ht,function(){ut(!1)}),React$3.createElement(React$3.Fragment,null,React$3.createElement("button",{className:"rounded-full focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:ring-gray-800 dark:ring-offset-0 dark:focus:ring-primary-500",type:"button",ref:ht.setReference,onClick:bt},nt),ct&&React$3.createElement("div",{ref:ht.setFloating,className:"z-[1003] mt-2 max-w-xs rounded-md bg-white shadow-lg focus:outline-none dark:bg-gray-900 dark:ring-2 dark:ring-primary-700",style:{position:mt,top:pt??0,left:ft??0,width:"max-content"}},$t.map(function(wt,xt){return _createRawReactElement(MenuItem,{menuItem:wt},xt)})))},MenuItem=function _e(et){var tt=et.className,nt=et.menuItem,rt=clsx(tt,"block w-full cursor-pointer truncate px-4 py-2.5 text-left text-sm text-gray-700 hover:bg-gray-100 rtl:text-right dark:text-gray-500 dark:hover:bg-gray-800");if(nt.toggle)return _createRawReactElement("div",{className:"flex flex-row items-center justify-between space-x-4 px-4 py-1 text-sm text-gray-700 dark:text-gray-400"},void 0,_createRawReactElement("span",{},void 0,nt.text),nt.toggle);if(nt.text){if(nt.action)return _createRawReactElement("button",{type:"button",onClick:nt.action,className:rt},void 0,nt.text);if(nt.to)return _createRawReactElement(Link$2,{to:nt.to,className:rt},void 0,nt.text);throw nt}else return _createRawReactElement(MenuDivider,{})},messages$3={login:{id:"navbar.login.action",defaultMessage:"Log in"},username:{id:"navbar.login.username.placeholder",defaultMessage:"E-mail or username"},email:{id:"navbar.login.email.placeholder",defaultMessage:"E-mail address"},password:{id:"navbar.login.password.label",defaultMessage:"Password"},forgotPassword:{id:"navbar.login.forgot_password",defaultMessage:"Forgot password?"}},Navbar=function _e(){var et=useAppDispatch(),tt=useIntl(),nt=useFeatures(),rt=useRegistrationStatus(),at=rt.isOpen,it=useOwnAccount(),ot=it.account,st=reactExports.useRef(null),ct=reactExports.useState(!1),ut=_slicedToArray$4(ct,2),dt=ut[0],ft=ut[1],pt=reactExports.useState(""),mt=_slicedToArray$4(pt,2),ht=mt[0],Et=mt[1],yt=reactExports.useState(""),vt=_slicedToArray$4(yt,2),gt=vt[0],St=vt[1],Rt=reactExports.useState(!1),$t=_slicedToArray$4(Rt,2),bt=$t[0],wt=$t[1],xt=function(){return et(openSidebar())},Tt=function(Nt){Nt.preventDefault(),ft(!0),et(logIn(ht,gt)).then(function(At){var kt=At.access_token;return ft(!1),et(verifyCredentials(kt)).then(function(){return et(fetchInstance())})}).catch(function(At){var kt;ft(!1);var Pt=(kt=At.response)===null||kt===void 0?void 0:kt.data;(Pt==null?void 0:Pt.error)==="mfa_required"&&wt(Pt.mfa_token)})};return bt?_createRawReactElement(Redirect,{to:"/login?token=".concat(encodeURIComponent(bt))}):React$3.createElement("nav",{className:"sticky top-0 z-50 bg-white shadow dark:bg-primary-900",ref:st,"data-testid":"navbar"},_createRawReactElement("div",{className:"mx-auto max-w-7xl px-2 sm:px-6 lg:px-8"},void 0,_createRawReactElement("div",{className:"relative flex h-12 justify-between lg:h-16"},void 0,ot&&_createRawReactElement("div",{className:"absolute inset-y-0 left-0 flex items-center rtl:left-auto rtl:right-0 lg:hidden"},void 0,_createRawReactElement("button",{onClick:xt},void 0,_createRawReactElement(Avatar,{src:ot.avatar,size:34}))),_createRawReactElement(HStack,{space:4,alignItems:"center",className:clsx("enter flex-1 lg:items-stretch",{"justify-center lg:justify-start":ot,"justify-start":!ot})},void 0,_createRawReactElement(Link$2,{to:"/","data-preview-title-id":"column.home",className:"ml-4 flex shrink-0 items-center"},"logo",_createRawReactElement(SiteLogo,{alt:"Logo",className:"h-5 w-auto cursor-pointer"}),_createRawReactElement("span",{className:"hidden"},void 0,_createRawReactElement(FormattedMessage$1,{id:"tabs_bar.home",defaultMessage:"Home"}))),ot&&_createRawReactElement("div",{className:"hidden flex-1 items-center justify-center px-2 lg:ml-6 lg:flex lg:justify-start"},void 0,_createRawReactElement("div",{className:"hidden w-full max-w-xl lg:block lg:max-w-xs"},void 0,_createRawReactElement(Search,{openInRoute:!0,autosuggest:!0})))),_createRawReactElement(HStack,{space:3,alignItems:"center",className:"absolute inset-y-0 right-0 pr-2 lg:static lg:inset-auto lg:ml-6 lg:pr-0"},void 0,ot?_createRawReactElement("div",{className:"relative hidden items-center lg:flex"},void 0,_createRawReactElement(ProfileDropdown,{account:ot},void 0,_createRawReactElement(Avatar,{src:ot.avatar,size:34}))):React$3.createElement(React$3.Fragment,null,_createRawReactElement(Form,{className:"hidden items-center space-x-2 rtl:space-x-reverse lg:flex",onSubmit:Tt},void 0,_createRawReactElement(Input,{required:!0,value:ht,onChange:function(Nt){return Et(Nt.target.value)},type:"text",placeholder:tt.formatMessage(nt.logInWithUsername?messages$3.username:messages$3.email),className:"max-w-[200px]"}),_createRawReactElement(Input,{required:!0,value:gt,onChange:function(Nt){return St(Nt.target.value)},type:"password",placeholder:tt.formatMessage(messages$3.password),className:"max-w-[200px]"}),_createRawReactElement(Link$2,{to:"/reset-password"},void 0,_createRawReactElement(Tooltip,{text:tt.formatMessage(messages$3.forgotPassword)},void 0,_createRawReactElement(IconButton$1,{src:vitePluginRequire_1697864645807_43713269,className:"cursor-pointer bg-transparent text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-gray-200",iconClassName:"h-5 w-5"}))),_createRawReactElement(Button,{theme:"primary",type:"submit",disabled:dt},void 0,tt.formatMessage(messages$3.login))),_createRawReactElement("div",{className:"space-x-1.5 lg:hidden"},void 0,_createRawReactElement(Button,{theme:"tertiary",to:"/login",size:"sm"},void 0,_createRawReactElement(FormattedMessage$1,{id:"account.login",defaultMessage:"Log In"})),at&&_createRawReactElement(Button,{theme:"primary",to:"/signup",size:"sm"},void 0,_createRawReactElement(FormattedMessage$1,{id:"account.register",defaultMessage:"Sign up"}))))))))};const vitePluginRequire_1697864667738_64406343="/packs/assets/refresh-8bff2b6f.svg";var messages$2={title:{id:"bundle_column_error.title",defaultMessage:"Network error"},body:{id:"bundle_column_error.body",defaultMessage:"Something went wrong while loading this page."},retry:{id:"bundle_column_error.retry",defaultMessage:"Try again"}},BundleColumnError=function _e(et){var tt=et.onRetry,nt=useIntl(),rt=function(){tt()};return _createRawReactElement(Column,{label:nt.formatMessage(messages$2.title)},void 0,_createRawReactElement(Stack,{space:4,alignItems:"center",justifyContent:"center",className:"min-h-[160px] rounded-lg p-10"},void 0,_createRawReactElement(IconButton$1,{iconClassName:"h-10 w-10",title:nt.formatMessage(messages$2.retry),src:vitePluginRequire_1697864667738_64406343,onClick:rt}),_createRawReactElement(Text$2,{align:"center",theme:"muted"},void 0,nt.formatMessage(messages$2.body))))},messages$1={title:{id:"column_forbidden.title",defaultMessage:"Forbidden"},body:{id:"column_forbidden.body",defaultMessage:"You do not have permission to access this page."}},ColumnForbidden=function _e(){var et=useIntl();return _createRawReactElement(Column,{label:et.formatMessage(messages$1.title)},void 0,_createRawReactElement("div",{className:"error-column"},void 0,et.formatMessage(messages$1.body)))},ColumnsArea=function _e(et){var tt=et.children,nt=et.layout||{LEFT:null,RIGHT:null};return _createRawReactElement(Layout,{},void 0,_createRawReactElement(Layout.Sidebar,{},void 0,nt.LEFT),_createRawReactElement(Layout.Main,{},void 0,tt),_createRawReactElement(Layout.Aside,{},void 0,nt.RIGHT))},_excluded=["component","page","content","componentParams","layout","publicRoute","staffOnly","adminOnly","developerOnly"],WrappedRoute=function _e(et){var tt=et.component,nt=et.page,rt=et.content,at=et.componentParams,it=at===void 0?{}:at,ot=et.layout,st=et.publicRoute,ct=st===void 0?!1:st,ut=et.staffOnly,dt=ut===void 0?!1:ut,ft=et.adminOnly,pt=ft===void 0?!1:ft,mt=et.developerOnly,ht=mt===void 0?!1:mt,Et=_objectWithoutProperties(et,_excluded),yt=useHistory(),vt=useOwnAccount(),gt=vt.account,St=useSettings(),Rt=function(At){var kt=At.match;return nt?_createRawReactElement(BundleContainer,{fetchComponent:tt,loading:bt,error:xt},void 0,function(Pt){return React$3.createElement(nt,_extends$4({params:kt.params,layout:ot},it),React$3.createElement(Pt,_extends$4({params:kt.params},it),rt))}):_createRawReactElement(BundleContainer,{fetchComponent:tt,loading:bt,error:xt},void 0,function(Pt){return _createRawReactElement(ColumnsArea,{layout:ot},void 0,React$3.createElement(Pt,_extends$4({params:kt.params},it),rt))})},$t=function(At){return React$3.createElement(React$3.Fragment,null,_createRawReactElement(Layout.Main,{},void 0,At),_createRawReactElement(Layout.Aside,{}))},bt=function(){return $t(_createRawReactElement(ColumnLoading,{}))},wt=function(){return $t(_createRawReactElement(ColumnForbidden,{}))},xt=function(At){return $t(React$3.createElement(BundleColumnError,At))},Tt=function(){var At=encodeURIComponent("".concat(yt.location.pathname).concat(yt.location.search));return localStorage.setItem("soapbox:redirect_uri",At),_createRawReactElement(Redirect,{to:"/login"})},Ct=[gt||ct,ht?St.get("isDeveloper"):!0,dt?gt&>.staff:!0,pt?gt&>.admin:!0].every(function(Nt){return Nt});return Ct?React$3.createElement(Route$1,_extends$4({},Et,{render:Rt})):gt?wt():Tt()},GroupTagsSlug=withHoc(GroupTags,GroupLookupHoc),GroupTagTimelineSlug=withHoc(GroupTagTimeline,GroupLookupHoc),GroupTimelineSlug=withHoc(GroupTimeline,GroupLookupHoc),GroupMembersSlug=withHoc(GroupMembers,GroupLookupHoc),GroupGallerySlug=withHoc(GroupGallery,GroupLookupHoc),ManageGroupSlug=withHoc(ManageGroup,GroupLookupHoc),EditGroupSlug=withHoc(EditGroup,GroupLookupHoc),GroupBlockedMembersSlug=withHoc(GroupBlockedMembers,GroupLookupHoc),GroupMembershipRequestsSlug=withHoc(GroupMembershipRequests,GroupLookupHoc),EmptyPage=HomePage,SwitchingColumnsArea=function _e(et){var tt=et.children,nt=useFeatures(),rt=useLocation$1(),at=rt.search,it=useSoapboxConfig(),ot=it.authenticatedProfile;return _createRawReactElement(Switch,{},void 0,_createRawReactElement(WrappedRoute,{path:"/email-confirmation",page:EmptyPage,component:EmailConfirmation,publicRoute:!0,exact:!0}),_createRawReactElement(WrappedRoute,{path:"/logout",page:EmptyPage,component:LogoutPage,publicRoute:!0,exact:!0}),_createRawReactElement(WrappedRoute,{path:"/",exact:!0,page:HomePage,component:HomeTimeline,content:tt}),nt.federating&&_createRawReactElement(WrappedRoute,{path:"/timeline/local",exact:!0,page:HomePage,component:CommunityTimeline,content:tt,publicRoute:!0}),nt.federating&&_createRawReactElement(WrappedRoute,{path:"/timeline/fediverse",exact:!0,page:HomePage,component:PublicTimeline,content:tt,publicRoute:!0}),nt.federating&&_createRawReactElement(WrappedRoute,{path:"/timeline/:instance",exact:!0,page:RemoteInstancePage,component:RemoteTimeline,content:tt}),nt.conversations&&_createRawReactElement(WrappedRoute,{path:"/conversations",page:DefaultPage,component:Conversations,content:tt}),nt.directTimeline&&_createRawReactElement(WrappedRoute,{path:"/messages",page:DefaultPage,component:DirectTimeline,content:tt}),nt.conversations&&!nt.directTimeline&&_createRawReactElement(WrappedRoute,{path:"/messages",page:DefaultPage,component:Conversations,content:tt}),_createRawReactElement(Redirect,{from:"/web/:path1/:path2/:path3",to:"/:path1/:path2/:path3"}),_createRawReactElement(Redirect,{from:"/web/:path1/:path2",to:"/:path1/:path2"}),_createRawReactElement(Redirect,{from:"/web/:path",to:"/:path"}),_createRawReactElement(Redirect,{from:"/timelines/home",to:"/"}),_createRawReactElement(Redirect,{from:"/timelines/public/local",to:"/timeline/local"}),_createRawReactElement(Redirect,{from:"/timelines/public",to:"/timeline/fediverse"}),_createRawReactElement(Redirect,{from:"/timelines/direct",to:"/messages"}),_createRawReactElement(Redirect,{from:"/main/all",to:"/timeline/fediverse"}),_createRawReactElement(Redirect,{from:"/main/public",to:"/timeline/local"}),_createRawReactElement(Redirect,{from:"/main/friends",to:"/"}),_createRawReactElement(Redirect,{from:"/tag/:id",to:"/tags/:id"}),_createRawReactElement(Redirect,{from:"/user-settings",to:"/settings/profile"}),_createRawReactElement(Redirect,{from:"/notice/:statusId",to:"/posts/:statusId"}),_createRawReactElement(Redirect,{from:"/users/:username/statuses/:statusId",to:"/@:username/posts/:statusId"}),_createRawReactElement(Redirect,{from:"/users/:username/chats",to:"/chats"}),_createRawReactElement(Redirect,{from:"/users/:username",to:"/@:username"}),_createRawReactElement(Redirect,{from:"/registration",to:"/",exact:!0}),_createRawReactElement(Redirect,{from:"/home",to:"/"}),_createRawReactElement(Redirect,{from:"/admin",to:"/ghostbox/admin"}),_createRawReactElement(Redirect,{from:"/terms",to:"/about"}),_createRawReactElement(Redirect,{from:"/settings/preferences",to:"/settings"}),_createRawReactElement(Redirect,{from:"/settings/two_factor_authentication_methods",to:"/settings/mfa"}),_createRawReactElement(Redirect,{from:"/settings/otp_authentication",to:"/settings/mfa"}),_createRawReactElement(Redirect,{from:"/settings/applications",to:"/developers"}),_createRawReactElement(Redirect,{from:"/auth/edit",to:"/settings"}),_createRawReactElement(Redirect,{from:"/auth/confirmation",to:"/email-confirmation".concat(at)}),_createRawReactElement(Redirect,{from:"/auth/reset_password",to:"/reset-password"}),_createRawReactElement(Redirect,{from:"/auth/edit_password",to:"/edit-password"}),_createRawReactElement(Redirect,{from:"/auth/sign_in",to:"/login"}),_createRawReactElement(Redirect,{from:"/auth/sign_out",to:"/logout"}),_createRawReactElement(Redirect,{from:"/registration/:token",to:"/invite/:token"}),_createRawReactElement(Redirect,{from:"/canary",to:"/about/canary"}),_createRawReactElement(Redirect,{from:"/canary.txt",to:"/about/canary"}),_createRawReactElement(Redirect,{from:"/auth/external",to:"/login/external"}),_createRawReactElement(Redirect,{from:"/auth/mfa",to:"/settings/mfa"}),_createRawReactElement(Redirect,{from:"/auth/password/new",to:"/reset-password"}),_createRawReactElement(Redirect,{from:"/auth/password/edit",to:"/edit-password".concat(at)}),_createRawReactElement(WrappedRoute,{path:"/tags/:id",publicRoute:!0,page:DefaultPage,component:HashtagTimeline,content:tt}),nt.lists&&_createRawReactElement(WrappedRoute,{path:"/lists",page:DefaultPage,component:Lists,content:tt}),nt.lists&&_createRawReactElement(WrappedRoute,{path:"/list/:id",page:DefaultPage,component:ListTimeline,content:tt}),nt.bookmarks&&_createRawReactElement(WrappedRoute,{path:"/bookmarks",page:DefaultPage,component:Bookmarks,content:tt}),_createRawReactElement(WrappedRoute,{path:"/notifications",page:DefaultPage,component:Notifications,content:tt}),_createRawReactElement(WrappedRoute,{path:"/search",page:SearchPage,component:Search$1,content:tt}),nt.suggestions&&_createRawReactElement(WrappedRoute,{path:"/suggestions",publicRoute:!0,page:DefaultPage,component:FollowRecommendations,content:tt}),nt.profileDirectory&&_createRawReactElement(WrappedRoute,{path:"/directory",publicRoute:!0,page:DefaultPage,component:Directory,content:tt}),nt.events&&_createRawReactElement(WrappedRoute,{path:"/events",page:EventsPage,component:Events,content:tt}),nt.chats&&_createRawReactElement(WrappedRoute,{path:"/chats",exact:!0,page:ChatsPage,component:ChatIndex,content:tt}),nt.chats&&_createRawReactElement(WrappedRoute,{path:"/chats/new",page:ChatsPage,component:ChatIndex,content:tt}),nt.chats&&_createRawReactElement(WrappedRoute,{path:"/chats/settings",page:ChatsPage,component:ChatIndex,content:tt}),nt.chats&&_createRawReactElement(WrappedRoute,{path:"/chats/:chatId",page:ChatsPage,component:ChatIndex,content:tt}),_createRawReactElement(WrappedRoute,{path:"/follow_requests",page:DefaultPage,component:FollowRequests,content:tt}),_createRawReactElement(WrappedRoute,{path:"/blocks",page:DefaultPage,component:Blocks,content:tt}),nt.federating&&_createRawReactElement(WrappedRoute,{path:"/domain_blocks",page:DefaultPage,component:DomainBlocks,content:tt}),_createRawReactElement(WrappedRoute,{path:"/mutes",page:DefaultPage,component:Mutes,content:tt}),(nt.filters||nt.filtersV2)&&_createRawReactElement(WrappedRoute,{path:"/filters/new",page:DefaultPage,component:EditFilter,content:tt}),(nt.filters||nt.filtersV2)&&_createRawReactElement(WrappedRoute,{path:"/filters/:id",page:DefaultPage,component:EditFilter,content:tt}),(nt.filters||nt.filtersV2)&&_createRawReactElement(WrappedRoute,{path:"/filters",page:DefaultPage,component:Filters,content:tt}),nt.followedHashtagsList&&_createRawReactElement(WrappedRoute,{path:"/followed_tags",page:DefaultPage,component:FollowedTags,content:tt}),_createRawReactElement(WrappedRoute,{path:"/@:username",publicRoute:!0,exact:!0,component:AccountTimeline,page:ProfilePage,content:tt}),_createRawReactElement(WrappedRoute,{path:"/@:username/with_replies",publicRoute:!ot,component:AccountTimeline,page:ProfilePage,content:tt,componentParams:{withReplies:!0}}),_createRawReactElement(WrappedRoute,{path:"/@:username/followers",publicRoute:!ot,component:Followers,page:ProfilePage,content:tt}),_createRawReactElement(WrappedRoute,{path:"/@:username/following",publicRoute:!ot,component:Following,page:ProfilePage,content:tt}),_createRawReactElement(WrappedRoute,{path:"/@:username/media",publicRoute:!ot,component:AccountGallery,page:ProfilePage,content:tt}),_createRawReactElement(WrappedRoute,{path:"/@:username/tagged/:tag",exact:!0,component:AccountTimeline,page:ProfilePage,content:tt}),_createRawReactElement(WrappedRoute,{path:"/@:username/favorites",component:FavouritedStatuses,page:ProfilePage,content:tt}),_createRawReactElement(WrappedRoute,{path:"/@:username/pins",component:PinnedStatuses,page:ProfilePage,content:tt}),_createRawReactElement(WrappedRoute,{path:"/@:username/posts/:statusId",publicRoute:!0,exact:!0,page:StatusPage,component:Status$1,content:tt}),_createRawReactElement(WrappedRoute,{path:"/posts/:statusId",publicRoute:!0,exact:!0,page:DefaultPage,component:Status$1,content:tt}),_createRawReactElement(WrappedRoute,{path:"/@:username/posts/:statusId/quotes",publicRoute:!0,page:StatusPage,component:Quotes,content:tt}),nt.events&&_createRawReactElement(WrappedRoute,{path:"/@:username/events/:statusId",publicRoute:!0,exact:!0,page:EventPage,component:EventInformation,content:tt}),nt.events&&_createRawReactElement(WrappedRoute,{path:"/@:username/events/:statusId/discussion",publicRoute:!0,exact:!0,page:EventPage,component:EventDiscussion,content:tt}),_createRawReactElement(Redirect,{from:"/@:username/:statusId",to:"/@:username/posts/:statusId"}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/groups",exact:!0,page:GroupsPage,component:Groups,content:tt}),nt.groupsDiscovery&&_createRawReactElement(WrappedRoute,{path:"/groups/discover",exact:!0,page:GroupsPage,component:GroupsDiscover,content:tt}),nt.groupsDiscovery&&_createRawReactElement(WrappedRoute,{path:"/groups/popular",exact:!0,page:GroupsPendingPage,component:GroupsPopular,content:tt}),nt.groupsDiscovery&&_createRawReactElement(WrappedRoute,{path:"/groups/suggested",exact:!0,page:GroupsPendingPage,component:GroupsSuggested,content:tt}),nt.groupsDiscovery&&_createRawReactElement(WrappedRoute,{path:"/groups/tags",exact:!0,page:GroupsPendingPage,component:GroupsTags,content:tt}),nt.groupsDiscovery&&_createRawReactElement(WrappedRoute,{path:"/groups/discover/tags/:id",exact:!0,page:GroupsPendingPage,component:GroupsTag,content:tt}),nt.groupsPending&&_createRawReactElement(WrappedRoute,{path:"/groups/pending-requests",exact:!0,page:GroupsPendingPage,component:PendingGroupRequests,content:tt}),nt.groupsTags&&_createRawReactElement(WrappedRoute,{path:"/groups/:groupId/tags",exact:!0,page:GroupPage$1,component:GroupTags,content:tt}),nt.groupsTags&&_createRawReactElement(WrappedRoute,{path:"/groups/:groupId/tag/:id",exact:!0,page:GroupsPendingPage,component:GroupTagTimeline,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/groups/:groupId",exact:!0,page:GroupPage$1,component:GroupTimeline,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/groups/:groupId/members",exact:!0,page:GroupPage$1,component:GroupMembers,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/groups/:groupId/media",publicRoute:!ot,component:GroupGallery,page:GroupPage$1,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/groups/:groupId/manage",exact:!0,page:ManageGroupsPage,component:ManageGroup,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/groups/:groupId/manage/edit",exact:!0,page:ManageGroupsPage,component:EditGroup,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/groups/:groupId/manage/blocks",exact:!0,page:ManageGroupsPage,component:GroupBlockedMembers,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/groups/:groupId/manage/requests",exact:!0,page:ManageGroupsPage,component:GroupMembershipRequests,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/groups/:groupId/posts/:statusId",exact:!0,page:StatusPage,component:Status$1,content:tt}),nt.groupsTags&&_createRawReactElement(WrappedRoute,{path:"/group/:groupSlug/tags",exact:!0,page:GroupPage$1,component:GroupTagsSlug,content:tt}),nt.groupsTags&&_createRawReactElement(WrappedRoute,{path:"/group/:groupSlug/tag/:tagId",exact:!0,page:GroupsPendingPage,component:GroupTagTimelineSlug,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/group/:groupSlug",publicRoute:!0,exact:!0,page:GroupPage$1,component:GroupTimelineSlug,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/group/:groupSlug/members",exact:!0,page:GroupPage$1,component:GroupMembersSlug,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/group/:groupSlug/media",publicRoute:!ot,component:GroupGallerySlug,page:GroupPage$1,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/group/:groupSlug/manage",exact:!0,page:ManageGroupsPage,component:ManageGroupSlug,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/group/:groupSlug/manage/edit",exact:!0,page:ManageGroupsPage,component:EditGroupSlug,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/group/:groupSlug/manage/blocks",exact:!0,page:ManageGroupsPage,component:GroupBlockedMembersSlug,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/group/:groupSlug/manage/requests",exact:!0,page:ManageGroupsPage,component:GroupMembershipRequestsSlug,content:tt}),nt.groups&&_createRawReactElement(WrappedRoute,{path:"/group/:groupSlug/posts/:statusId",exact:!0,page:StatusPage,component:Status$1,content:tt}),nt.groups&&_createRawReactElement(Redirect,{from:"/group/:groupSlug/statuses/:statusId",to:"/group/:groupSlug/posts/:statusId"}),_createRawReactElement(WrappedRoute,{path:"/statuses/new",page:DefaultPage,component:NewStatus,content:tt,exact:!0}),_createRawReactElement(WrappedRoute,{path:"/statuses/:statusId",exact:!0,page:StatusPage,component:Status$1,content:tt}),nt.scheduledStatuses&&_createRawReactElement(WrappedRoute,{path:"/scheduled_statuses",page:DefaultPage,component:ScheduledStatuses,content:tt}),_createRawReactElement(WrappedRoute,{path:"/settings/profile",page:DefaultPage,component:EditProfile,content:tt}),nt.exportData&&_createRawReactElement(WrappedRoute,{path:"/settings/export",page:DefaultPage,component:ExportData,content:tt}),nt.importData&&_createRawReactElement(WrappedRoute,{path:"/settings/import",page:DefaultPage,component:ImportData,content:tt}),nt.accountAliases&&_createRawReactElement(WrappedRoute,{path:"/settings/aliases",page:DefaultPage,component:Aliases,content:tt}),nt.accountMoving&&_createRawReactElement(WrappedRoute,{path:"/settings/migration",page:DefaultPage,component:Migration,content:tt}),nt.backups&&_createRawReactElement(WrappedRoute,{path:"/settings/backups",page:DefaultPage,component:Backups,content:tt}),_createRawReactElement(WrappedRoute,{path:"/settings/email",page:DefaultPage,component:EditEmail,content:tt}),_createRawReactElement(WrappedRoute,{path:"/settings/password",page:DefaultPage,component:EditPassword,content:tt}),_createRawReactElement(WrappedRoute,{path:"/settings/account",page:DefaultPage,component:DeleteAccount,content:tt}),_createRawReactElement(WrappedRoute,{path:"/settings/mfa",page:DefaultPage,component:MfaForm,exact:!0}),_createRawReactElement(WrappedRoute,{path:"/settings/tokens",page:DefaultPage,component:AuthTokenList,content:tt}),_createRawReactElement(WrappedRoute,{path:"/settings",page:DefaultPage,component:Settings,content:tt}),_createRawReactElement(WrappedRoute,{path:"/ghostbox/admin/config",adminOnly:!0,page:DefaultPage,component:SoapboxConfig,content:tt}),_createRawReactElement(WrappedRoute,{path:"/ghostbox/admin",staffOnly:!0,page:AdminPage,component:Dashboard,content:tt,exact:!0}),_createRawReactElement(WrappedRoute,{path:"/ghostbox/admin/approval",staffOnly:!0,page:AdminPage,component:Dashboard,content:tt,exact:!0}),_createRawReactElement(WrappedRoute,{path:"/ghostbox/admin/reports",staffOnly:!0,page:AdminPage,component:Dashboard,content:tt,exact:!0}),_createRawReactElement(WrappedRoute,{path:"/ghostbox/admin/log",staffOnly:!0,page:AdminPage,component:ModerationLog,content:tt,exact:!0}),_createRawReactElement(WrappedRoute,{path:"/ghostbox/admin/users",staffOnly:!0,page:AdminPage,component:UserIndex,content:tt,exact:!0}),_createRawReactElement(WrappedRoute,{path:"/ghostbox/admin/theme",staffOnly:!0,page:AdminPage,component:ThemeEditor,content:tt,exact:!0}),_createRawReactElement(WrappedRoute,{path:"/ghostbox/admin/announcements",staffOnly:!0,page:AdminPage,component:Announcements,content:tt,exact:!0}),_createRawReactElement(WrappedRoute,{path:"/info",page:EmptyPage,component:ServerInfo,content:tt}),_createRawReactElement(WrappedRoute,{path:"/developers/apps/create",developerOnly:!0,page:DefaultPage,component:CreateApp,content:tt}),_createRawReactElement(WrappedRoute,{path:"/developers/settings_store",developerOnly:!0,page:DefaultPage,component:SettingsStore,content:tt}),_createRawReactElement(WrappedRoute,{path:"/developers/timeline",developerOnly:!0,page:DefaultPage,component:TestTimeline,content:tt}),_createRawReactElement(WrappedRoute,{path:"/developers/sw",developerOnly:!0,page:DefaultPage,component:ServiceWorkerInfo,content:tt}),_createRawReactElement(WrappedRoute,{path:"/developers",page:DefaultPage,component:Developers,content:tt}),_createRawReactElement(WrappedRoute,{path:"/error/network",developerOnly:!0,page:EmptyPage,component:function(){return new Promise(function(ct,ut){return ut()})},content:tt}),_createRawReactElement(WrappedRoute,{path:"/error",developerOnly:!0,page:EmptyPage,component:IntentionalError,content:tt}),nt.federating&&_createRawReactElement(WrappedRoute,{path:"/federation_restrictions",publicRoute:!0,page:DefaultPage,component:FederationRestrictions,content:tt}),_createRawReactElement(WrappedRoute,{path:"/share",page:DefaultPage,component:Share,content:tt,exact:!0}),_createRawReactElement(WrappedRoute,{page:EmptyPage,component:GenericNotFound,content:tt}))},UI=function _e(et){var tt=et.children,nt=useHistory(),rt=useAppDispatch(),at=usePendingPolicy(),it=at.data,ot=reactExports.useRef(null),st=useAppSelector(function(xt){return xt.me}),ct=useOwnAccount(),ut=ct.account,dt=useFeatures(),ft=useAppSelector(function(xt){return getVapidKey(xt)}),pt=useAppSelector(function(xt){return xt.dropdown_menu.isOpen}),mt=useAppSelector(isStandalone),ht=useDraggedFiles(ot),Et=ht.isDragging,yt=function(Tt){var Ct=Tt.data;Ct.type==="navigate"?nt.push(Ct.path):console.warn("Unknown message type:",Ct.type)},vt=function(Tt){return Tt.preventDefault()},gt=function(Tt){return Tt.preventDefault()},St=function(Tt){return Tt.preventDefault()},Rt=function(Tt){return Tt.preventDefault()},$t=function(){ut&&(rt(expandHomeTimeline({},function(){rt(fetchSuggestionsForTimeline())})),rt(expandNotifications()).then(function(){return rt(fetchMarker(["notifications"]))}).catch(console.error),rt(fetchAnnouncements()),ut.staff&&(rt(fetchReports({resolved:!1})),rt(fetchUsers(["local","need_approval"]))),ut.admin&&rt(fetchConfig()),setTimeout(function(){return rt(fetchFilters())},500),ut.locked&&setTimeout(function(){return rt(fetchFollowRequests())},700),setTimeout(function(){return rt(fetchScheduledStatuses())},900))};reactExports.useEffect(function(){var xt;"serviceWorker"in navigator&&navigator.serviceWorker.addEventListener("message",yt),((xt=window.Notification)===null||xt===void 0?void 0:xt.permission)==="default"&&window.setTimeout(function(){return Notification.requestPermission()},120*1e3)},[]),reactExports.useEffect(function(){return document.addEventListener("dragenter",vt),document.addEventListener("dragleave",gt),document.addEventListener("dragover",St),document.addEventListener("drop",Rt),function(){document.removeEventListener("dragenter",vt),document.removeEventListener("dragleave",gt),document.removeEventListener("dragover",St),document.removeEventListener("drop",Rt)}},[]),useUserStream(),reactExports.useEffect(function(){$t(),rt(fetchCustomEmojis())},[!!ut]),reactExports.useEffect(function(){rt(register())},[ft]),reactExports.useEffect(function(){ut&&it&&supportedPolicyIds.includes(it.pending_policy_id)&&setTimeout(function(){rt(openModal("POLICY"))},500)},[it,!!ut]);var bt=function(){var Tt=location.pathname;return!!Tt.match(/^\/posts\/|^\/search|^\/getting-started|^\/chats/)};if(st===null)return null;var wt={pointerEvents:pt?"none":void 0};return React$3.createElement("div",{ref:ot,style:wt},_createRawReactElement("div",{className:clsx("pointer-events-none fixed z-[90] h-screen w-screen transition",{"backdrop-blur":Et})}),_createRawReactElement(BackgroundShapes,{}),_createRawReactElement("div",{className:"z-10 flex flex-col"},void 0,_createRawReactElement(Navbar,{}),_createRawReactElement(Layout,{},void 0,_createRawReactElement(Layout.Sidebar,{},void 0,!mt&&_createRawReactElement(SidebarNavigation,{})),_createRawReactElement(SwitchingColumnsArea,{},void 0,tt)),st&&!bt()&&_createRawReactElement("div",{className:"fixed bottom-24 right-4 z-40 transition-all rtl:left-4 rtl:right-auto lg:hidden"},void 0,_createRawReactElement(FloatingActionButton,{})),st&&_createRawReactElement(BundleContainer,{fetchComponent:SidebarMenu},void 0,function(xt){return _createRawReactElement(xt,{})}),st&&dt.chats&&_createRawReactElement(BundleContainer,{fetchComponent:ChatWidget},void 0,function(xt){return _createRawReactElement("div",{className:"hidden xl:block"},void 0,_createRawReactElement(xt,{}))}),_createRawReactElement(ThumbNavigation,{}),_createRawReactElement(BundleContainer,{fetchComponent:ProfileHoverCard},void 0,function(xt){return _createRawReactElement(xt,{})}),_createRawReactElement(BundleContainer,{fetchComponent:StatusHoverCard},void 0,function(xt){return _createRawReactElement(xt,{})})))};const isFailType=_e=>_e.endsWith("_FAIL"),isRememberFailType=_e=>_e.endsWith("_REMEMBER_FAIL"),hasResponse=_e=>!!(_e&&_e.response),authorized=_e=>{var et;return((et=_e==null?void 0:_e.response)==null?void 0:et.status)!==401},shouldShowError=({type:_e,skipAlert:et,error:tt})=>!et&&hasResponse(tt)&&authorized(tt)&&isFailType(_e)&&!isRememberFailType(_e),errorsMiddleware=()=>()=>_e=>et=>(shouldShowError(et)&&toast.showAlertForError(et.error),_e(et));function soundsMiddleware(){return()=>_e=>et=>{var tt;return(tt=et.meta)!=null&&tt.sound&&soundCache[et.meta.sound]&&play(soundCache[et.meta.sound]),_e(et)}}var dist={},combineReducers$1={exports:{}};const require$$0=getAugmentedNamespace(immutable_es);var utilities={},getStateName={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0}),et.default=function(tt){return tt&&tt.type==="@@redux/INIT"?"initialState argument passed to createStore":"previous state received by the reducer"},_e.exports=et.default})(getStateName,getStateName.exports);var getStateNameExports=getStateName.exports,getUnexpectedInvocationParameterMessage={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});var tt=require$$0,nt=it(tt),rt=getStateNameExports,at=it(rt);function it(ot){return ot&&ot.__esModule?ot:{default:ot}}et.default=function(ot,st,ct){var ut=Object.keys(st);if(!ut.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";var dt=(0,at.default)(ct);if(nt.default.isImmutable?!nt.default.isImmutable(ot):!nt.default.Iterable.isIterable(ot))return"The "+dt+' is of unexpected type. Expected argument to be an instance of Immutable.Collection or Immutable.Record with the following properties: "'+ut.join('", "')+'".';var ft=ot.toSeq().keySeq().toArray().filter(function(pt){return!st.hasOwnProperty(pt)});return ft.length>0?"Unexpected "+(ft.length===1?"property":"properties")+' "'+ft.join('", "')+'" found in '+dt+'. Expected to find one of the known reducer property names instead: "'+ut.join('", "')+'". Unexpected properties will be ignored.':null},_e.exports=et.default})(getUnexpectedInvocationParameterMessage,getUnexpectedInvocationParameterMessage.exports);var getUnexpectedInvocationParameterMessageExports=getUnexpectedInvocationParameterMessage.exports,validateNextState={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0}),et.default=function(tt,nt,rt){if(tt===void 0)throw new Error('Reducer "'+nt+'" returned undefined when handling "'+rt.type+'" action. To ignore an action, you must explicitly return the previous state.')},_e.exports=et.default})(validateNextState,validateNextState.exports);var validateNextStateExports=validateNextState.exports;Object.defineProperty(utilities,"__esModule",{value:!0});utilities.validateNextState=utilities.getUnexpectedInvocationParameterMessage=utilities.getStateName=void 0;var _getStateName2=getStateNameExports,_getStateName3=_interopRequireDefault$1(_getStateName2),_getUnexpectedInvocationParameterMessage2=getUnexpectedInvocationParameterMessageExports,_getUnexpectedInvocationParameterMessage3=_interopRequireDefault$1(_getUnexpectedInvocationParameterMessage2),_validateNextState2=validateNextStateExports,_validateNextState3=_interopRequireDefault$1(_validateNextState2);function _interopRequireDefault$1(_e){return _e&&_e.__esModule?_e:{default:_e}}utilities.getStateName=_getStateName3.default;utilities.getUnexpectedInvocationParameterMessage=_getUnexpectedInvocationParameterMessage3.default;utilities.validateNextState=_validateNextState3.default;(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});var tt=require$$0,nt=at(tt),rt=utilities;function at(it){return it&&it.__esModule?it:{default:it}}et.default=function(it){var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:nt.default.Map,st=Object.keys(it);return function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ot(),ut=arguments[1];return ct.withMutations(function(dt){st.forEach(function(ft){var pt=it[ft],mt=dt.get(ft),ht=pt(mt,ut);(0,rt.validateNextState)(ht,ft,ut),dt.set(ft,ht)})})}},_e.exports=et.default})(combineReducers$1,combineReducers$1.exports);var combineReducersExports=combineReducers$1.exports;Object.defineProperty(dist,"__esModule",{value:!0});var combineReducers=dist.combineReducers=void 0,_combineReducers2=combineReducersExports,_combineReducers3=_interopRequireDefault(_combineReducers2);function _interopRequireDefault(_e){return _e&&_e.__esModule?_e:{default:_e}}combineReducers=dist.combineReducers=_combineReducers3.default;var NOTHING=Symbol.for("immer-nothing"),DRAFTABLE=Symbol.for("immer-draftable"),DRAFT_STATE=Symbol.for("immer-state");function die(_e,...et){throw new Error(`[Immer] minified error nr: ${_e}. Full error at: https://bit.ly/3cXEKWf`)}var getPrototypeOf=Object.getPrototypeOf;function isDraft(_e){return!!_e&&!!_e[DRAFT_STATE]}function isDraftable(_e){var et;return _e?isPlainObject(_e)||Array.isArray(_e)||!!_e[DRAFTABLE]||!!((et=_e.constructor)!=null&&et[DRAFTABLE])||isMap(_e)||isSet(_e):!1}var objectCtorString=Object.prototype.constructor.toString();function isPlainObject(_e){if(!_e||typeof _e!="object")return!1;const et=getPrototypeOf(_e);if(et===null)return!0;const tt=Object.hasOwnProperty.call(et,"constructor")&&et.constructor;return tt===Object?!0:typeof tt=="function"&&Function.toString.call(tt)===objectCtorString}function each(_e,et){getArchtype(_e)===0?Object.entries(_e).forEach(([tt,nt])=>{et(tt,nt,_e)}):_e.forEach((tt,nt)=>et(nt,tt,_e))}function getArchtype(_e){const et=_e[DRAFT_STATE];return et?et.type_:Array.isArray(_e)?1:isMap(_e)?2:isSet(_e)?3:0}function has(_e,et){return getArchtype(_e)===2?_e.has(et):Object.prototype.hasOwnProperty.call(_e,et)}function set(_e,et,tt){const nt=getArchtype(_e);nt===2?_e.set(et,tt):nt===3?_e.add(tt):_e[et]=tt}function is(_e,et){return _e===et?_e!==0||1/_e===1/et:_e!==_e&&et!==et}function isMap(_e){return _e instanceof Map}function isSet(_e){return _e instanceof Set}function latest(_e){return _e.copy_||_e.base_}function shallowCopy(_e,et){if(isMap(_e))return new Map(_e);if(isSet(_e))return new Set(_e);if(Array.isArray(_e))return Array.prototype.slice.call(_e);if(!et&&isPlainObject(_e))return getPrototypeOf(_e)?{..._e}:Object.assign(Object.create(null),_e);const tt=Object.getOwnPropertyDescriptors(_e);delete tt[DRAFT_STATE];let nt=Reflect.ownKeys(tt);for(let rt=0;rt1&&(_e.set=_e.add=_e.clear=_e.delete=dontMutateFrozenCollections),Object.freeze(_e),et&&each(_e,(tt,nt)=>freeze(nt,!0))),_e}function dontMutateFrozenCollections(){die(2)}function isFrozen(_e){return Object.isFrozen(_e)}var plugins={};function getPlugin(_e){const et=plugins[_e];return et||die(0,_e),et}function loadPlugin(_e,et){plugins[_e]||(plugins[_e]=et)}var currentScope;function getCurrentScope(){return currentScope}function createScope(_e,et){return{drafts_:[],parent_:_e,immer_:et,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function usePatchesInScope(_e,et){et&&(getPlugin("Patches"),_e.patches_=[],_e.inversePatches_=[],_e.patchListener_=et)}function revokeScope(_e){leaveScope(_e),_e.drafts_.forEach(revokeDraft),_e.drafts_=null}function leaveScope(_e){_e===currentScope&&(currentScope=_e.parent_)}function enterScope(_e){return currentScope=createScope(currentScope,_e)}function revokeDraft(_e){const et=_e[DRAFT_STATE];et.type_===0||et.type_===1?et.revoke_():et.revoked_=!0}function processResult(_e,et){et.unfinalizedDrafts_=et.drafts_.length;const tt=et.drafts_[0];return _e!==void 0&&_e!==tt?(tt[DRAFT_STATE].modified_&&(revokeScope(et),die(4)),isDraftable(_e)&&(_e=finalize(et,_e),et.parent_||maybeFreeze(et,_e)),et.patches_&&getPlugin("Patches").generateReplacementPatches_(tt[DRAFT_STATE].base_,_e,et.patches_,et.inversePatches_)):_e=finalize(et,tt,[]),revokeScope(et),et.patches_&&et.patchListener_(et.patches_,et.inversePatches_),_e!==NOTHING?_e:void 0}function finalize(_e,et,tt){if(isFrozen(et))return et;const nt=et[DRAFT_STATE];if(!nt)return each(et,(rt,at)=>finalizeProperty(_e,nt,et,rt,at,tt)),et;if(nt.scope_!==_e)return et;if(!nt.modified_)return maybeFreeze(_e,nt.base_,!0),nt.base_;if(!nt.finalized_){nt.finalized_=!0,nt.scope_.unfinalizedDrafts_--;const rt=nt.copy_;let at=rt,it=!1;nt.type_===3&&(at=new Set(rt),rt.clear(),it=!0),each(at,(ot,st)=>finalizeProperty(_e,nt,rt,ot,st,tt,it)),maybeFreeze(_e,rt,!1),tt&&_e.patches_&&getPlugin("Patches").generatePatches_(nt,tt,_e.patches_,_e.inversePatches_)}return nt.copy_}function finalizeProperty(_e,et,tt,nt,rt,at,it){if(isDraft(rt)){const ot=at&&et&&et.type_!==3&&!has(et.assigned_,nt)?at.concat(nt):void 0,st=finalize(_e,rt,ot);if(set(tt,nt,st),isDraft(st))_e.canAutoFreeze_=!1;else return}else it&&tt.add(rt);if(isDraftable(rt)&&!isFrozen(rt)){if(!_e.immer_.autoFreeze_&&_e.unfinalizedDrafts_<1)return;finalize(_e,rt),(!et||!et.scope_.parent_)&&maybeFreeze(_e,rt)}}function maybeFreeze(_e,et,tt=!1){!_e.parent_&&_e.immer_.autoFreeze_&&_e.canAutoFreeze_&&freeze(et,tt)}function createProxyProxy(_e,et){const tt=Array.isArray(_e),nt={type_:tt?1:0,scope_:et?et.scope_:getCurrentScope(),modified_:!1,finalized_:!1,assigned_:{},parent_:et,base_:_e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let rt=nt,at=objectTraps;tt&&(rt=[nt],at=arrayTraps);const{revoke:it,proxy:ot}=Proxy.revocable(rt,at);return nt.draft_=ot,nt.revoke_=it,ot}var objectTraps={get(_e,et){if(et===DRAFT_STATE)return _e;const tt=latest(_e);if(!has(tt,et))return readPropFromProto(_e,tt,et);const nt=tt[et];return _e.finalized_||!isDraftable(nt)?nt:nt===peek(_e.base_,et)?(prepareCopy(_e),_e.copy_[et]=createProxy(nt,_e)):nt},has(_e,et){return et in latest(_e)},ownKeys(_e){return Reflect.ownKeys(latest(_e))},set(_e,et,tt){const nt=getDescriptorFromProto(latest(_e),et);if(nt!=null&&nt.set)return nt.set.call(_e.draft_,tt),!0;if(!_e.modified_){const rt=peek(latest(_e),et),at=rt==null?void 0:rt[DRAFT_STATE];if(at&&at.base_===tt)return _e.copy_[et]=tt,_e.assigned_[et]=!1,!0;if(is(tt,rt)&&(tt!==void 0||has(_e.base_,et)))return!0;prepareCopy(_e),markChanged(_e)}return _e.copy_[et]===tt&&(tt!==void 0||et in _e.copy_)||Number.isNaN(tt)&&Number.isNaN(_e.copy_[et])||(_e.copy_[et]=tt,_e.assigned_[et]=!0),!0},deleteProperty(_e,et){return peek(_e.base_,et)!==void 0||et in _e.base_?(_e.assigned_[et]=!1,prepareCopy(_e),markChanged(_e)):delete _e.assigned_[et],_e.copy_&&delete _e.copy_[et],!0},getOwnPropertyDescriptor(_e,et){const tt=latest(_e),nt=Reflect.getOwnPropertyDescriptor(tt,et);return nt&&{writable:!0,configurable:_e.type_!==1||et!=="length",enumerable:nt.enumerable,value:tt[et]}},defineProperty(){die(11)},getPrototypeOf(_e){return getPrototypeOf(_e.base_)},setPrototypeOf(){die(12)}},arrayTraps={};each(objectTraps,(_e,et)=>{arrayTraps[_e]=function(){return arguments[0]=arguments[0][0],et.apply(this,arguments)}});arrayTraps.deleteProperty=function(_e,et){return arrayTraps.set.call(this,_e,et,void 0)};arrayTraps.set=function(_e,et,tt){return objectTraps.set.call(this,_e[0],et,tt,_e[0])};function peek(_e,et){const tt=_e[DRAFT_STATE];return(tt?latest(tt):_e)[et]}function readPropFromProto(_e,et,tt){var rt;const nt=getDescriptorFromProto(et,tt);return nt?"value"in nt?nt.value:(rt=nt.get)==null?void 0:rt.call(_e.draft_):void 0}function getDescriptorFromProto(_e,et){if(!(et in _e))return;let tt=getPrototypeOf(_e);for(;tt;){const nt=Object.getOwnPropertyDescriptor(tt,et);if(nt)return nt;tt=getPrototypeOf(tt)}}function markChanged(_e){_e.modified_||(_e.modified_=!0,_e.parent_&&markChanged(_e.parent_))}function prepareCopy(_e){_e.copy_||(_e.copy_=shallowCopy(_e.base_,_e.scope_.immer_.useStrictShallowCopy_))}var Immer2=class{constructor(_e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(et,tt,nt)=>{if(typeof et=="function"&&typeof tt!="function"){const at=tt;tt=et;const it=this;return function(st=at,...ct){return it.produce(st,ut=>tt.call(this,ut,...ct))}}typeof tt!="function"&&die(6),nt!==void 0&&typeof nt!="function"&&die(7);let rt;if(isDraftable(et)){const at=enterScope(this),it=createProxy(et,void 0);let ot=!0;try{rt=tt(it),ot=!1}finally{ot?revokeScope(at):leaveScope(at)}return usePatchesInScope(at,nt),processResult(rt,at)}else if(!et||typeof et!="object"){if(rt=tt(et),rt===void 0&&(rt=et),rt===NOTHING&&(rt=void 0),this.autoFreeze_&&freeze(rt,!0),nt){const at=[],it=[];getPlugin("Patches").generateReplacementPatches_(et,rt,at,it),nt(at,it)}return rt}else die(1,et)},this.produceWithPatches=(et,tt)=>{if(typeof et=="function")return(it,...ot)=>this.produceWithPatches(it,st=>et(st,...ot));let nt,rt;return[this.produce(et,tt,(it,ot)=>{nt=it,rt=ot}),nt,rt]},typeof(_e==null?void 0:_e.autoFreeze)=="boolean"&&this.setAutoFreeze(_e.autoFreeze),typeof(_e==null?void 0:_e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(_e.useStrictShallowCopy)}createDraft(_e){isDraftable(_e)||die(8),isDraft(_e)&&(_e=current(_e));const et=enterScope(this),tt=createProxy(_e,void 0);return tt[DRAFT_STATE].isManual_=!0,leaveScope(et),tt}finishDraft(_e,et){const tt=_e&&_e[DRAFT_STATE];(!tt||!tt.isManual_)&&die(9);const{scope_:nt}=tt;return usePatchesInScope(nt,et),processResult(void 0,nt)}setAutoFreeze(_e){this.autoFreeze_=_e}setUseStrictShallowCopy(_e){this.useStrictShallowCopy_=_e}applyPatches(_e,et){let tt;for(tt=et.length-1;tt>=0;tt--){const rt=et[tt];if(rt.path.length===0&&rt.op==="replace"){_e=rt.value;break}}tt>-1&&(et=et.slice(tt+1));const nt=getPlugin("Patches").applyPatches_;return isDraft(_e)?nt(_e,et):this.produce(_e,rt=>nt(rt,et))}};function createProxy(_e,et){const tt=isMap(_e)?getPlugin("MapSet").proxyMap_(_e,et):isSet(_e)?getPlugin("MapSet").proxySet_(_e,et):createProxyProxy(_e,et);return(et?et.scope_:getCurrentScope()).drafts_.push(tt),tt}function current(_e){return isDraft(_e)||die(10,_e),currentImpl(_e)}function currentImpl(_e){if(!isDraftable(_e)||isFrozen(_e))return _e;const et=_e[DRAFT_STATE];let tt;if(et){if(!et.modified_)return et.base_;et.finalized_=!0,tt=shallowCopy(_e,et.scope_.immer_.useStrictShallowCopy_)}else tt=shallowCopy(_e,!0);return each(tt,(nt,rt)=>{set(tt,nt,currentImpl(rt))}),et&&(et.finalized_=!1),tt}function enableMapSet(){class _e extends Map{constructor(st,ct){super(),this[DRAFT_STATE]={type_:2,parent_:ct,scope_:ct?ct.scope_:getCurrentScope(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:st,draft_:this,isManual_:!1,revoked_:!1}}get size(){return latest(this[DRAFT_STATE]).size}has(st){return latest(this[DRAFT_STATE]).has(st)}set(st,ct){const ut=this[DRAFT_STATE];return it(ut),(!latest(ut).has(st)||latest(ut).get(st)!==ct)&&(tt(ut),markChanged(ut),ut.assigned_.set(st,!0),ut.copy_.set(st,ct),ut.assigned_.set(st,!0)),this}delete(st){if(!this.has(st))return!1;const ct=this[DRAFT_STATE];return it(ct),tt(ct),markChanged(ct),ct.base_.has(st)?ct.assigned_.set(st,!1):ct.assigned_.delete(st),ct.copy_.delete(st),!0}clear(){const st=this[DRAFT_STATE];it(st),latest(st).size&&(tt(st),markChanged(st),st.assigned_=new Map,each(st.base_,ct=>{st.assigned_.set(ct,!1)}),st.copy_.clear())}forEach(st,ct){const ut=this[DRAFT_STATE];latest(ut).forEach((dt,ft,pt)=>{st.call(ct,this.get(ft),ft,this)})}get(st){const ct=this[DRAFT_STATE];it(ct);const ut=latest(ct).get(st);if(ct.finalized_||!isDraftable(ut)||ut!==ct.base_.get(st))return ut;const dt=createProxy(ut,ct);return tt(ct),ct.copy_.set(st,dt),dt}keys(){return latest(this[DRAFT_STATE]).keys()}values(){const st=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const ct=st.next();return ct.done?ct:{done:!1,value:this.get(ct.value)}}}}entries(){const st=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const ct=st.next();if(ct.done)return ct;const ut=this.get(ct.value);return{done:!1,value:[ct.value,ut]}}}}[Symbol.iterator](){return this.entries()}}function et(ot,st){return new _e(ot,st)}function tt(ot){ot.copy_||(ot.assigned_=new Map,ot.copy_=new Map(ot.base_))}class nt extends Set{constructor(st,ct){super(),this[DRAFT_STATE]={type_:3,parent_:ct,scope_:ct?ct.scope_:getCurrentScope(),modified_:!1,finalized_:!1,copy_:void 0,base_:st,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return latest(this[DRAFT_STATE]).size}has(st){const ct=this[DRAFT_STATE];return it(ct),ct.copy_?!!(ct.copy_.has(st)||ct.drafts_.has(st)&&ct.copy_.has(ct.drafts_.get(st))):ct.base_.has(st)}add(st){const ct=this[DRAFT_STATE];return it(ct),this.has(st)||(at(ct),markChanged(ct),ct.copy_.add(st)),this}delete(st){if(!this.has(st))return!1;const ct=this[DRAFT_STATE];return it(ct),at(ct),markChanged(ct),ct.copy_.delete(st)||(ct.drafts_.has(st)?ct.copy_.delete(ct.drafts_.get(st)):!1)}clear(){const st=this[DRAFT_STATE];it(st),latest(st).size&&(at(st),markChanged(st),st.copy_.clear())}values(){const st=this[DRAFT_STATE];return it(st),at(st),st.copy_.values()}entries(){const st=this[DRAFT_STATE];return it(st),at(st),st.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(st,ct){const ut=this.values();let dt=ut.next();for(;!dt.done;)st.call(ct,dt.value,dt.value,this),dt=ut.next()}}function rt(ot,st){return new nt(ot,st)}function at(ot){ot.copy_||(ot.copy_=new Set,ot.base_.forEach(st=>{if(isDraftable(st)){const ct=createProxy(st,ot);ot.drafts_.set(st,ct),ot.copy_.add(ct)}else ot.copy_.add(st)}))}function it(ot){ot.revoked_&&die(3,JSON.stringify(latest(ot)))}loadPlugin("MapSet",{proxyMap_:et,proxySet_:rt})}var immer=new Immer2,produce=immer.produce;immer.produceWithPatches.bind(immer);immer.setAutoFreeze.bind(immer);immer.setUseStrictShallowCopy.bind(immer);immer.applyPatches.bind(immer);immer.createDraft.bind(immer);immer.finishDraft.bind(immer);const updateStore=(_e,et)=>et.reduce((tt,nt)=>(tt[nt.id]=nt,tt),{..._e}),updateList$2=(_e,et,tt="end")=>{const nt=et.map(it=>it.id),rt=Array.from(_e.ids),at=new Set(tt==="start"?[...nt,...rt]:[...rt,...nt]);if(typeof _e.state.totalCount=="number"){const it=at.size-_e.ids.size;_e.state.totalCount+=it}return{..._e,ids:at}},createCache=()=>({store:{},lists:{}}),createList$1=()=>({ids:new Set,state:createListState()}),createListState=()=>({next:void 0,prev:void 0,totalCount:0,error:null,fetched:!1,fetching:!1,lastFetchedAt:void 0,invalid:!1});enableMapSet();const importEntities=(_e,et,tt,nt,rt,at,it=!1)=>produce(_e,ot=>{const st=ot[et]??createCache();if(st.store=updateStore(st.store,tt),typeof nt=="string"){let ct=st.lists[nt]??createList$1();it&&(ct.ids=new Set),ct=updateList$2(ct,tt,rt),at&&(ct.state=at),st.lists[nt]=ct}ot[et]=st}),deleteEntities=(_e,et,tt,nt)=>produce(_e,rt=>{const at=rt[et]??createCache();for(const it of tt)if(delete at.store[it],!(nt!=null&&nt.preserveLists))for(const ot of Object.values(at.lists))ot&&(ot.ids.delete(it),typeof ot.state.totalCount=="number"&&ot.state.totalCount--);rt[et]=at}),dismissEntities=(_e,et,tt,nt)=>produce(_e,rt=>{const at=rt[et]??createCache(),it=at.lists[nt];if(it){for(const ot of tt)it.ids.delete(ot),typeof it.state.totalCount=="number"&&it.state.totalCount--;rt[et]=at}}),incrementEntities=(_e,et,tt,nt)=>produce(_e,rt=>{var ot;const at=rt[et]??createCache(),it=at.lists[tt];typeof((ot=it==null?void 0:it.state)==null?void 0:ot.totalCount)=="number"&&(it.state.totalCount+=nt,rt[et]=at)}),setFetching=(_e,et,tt,nt,rt)=>produce(_e,at=>{const it=at[et]??createCache();if(typeof tt=="string"){const ot=it.lists[tt]??createList$1();ot.state.fetching=nt,ot.state.error=rt,it.lists[tt]=ot}at[et]=it}),invalidateEntityList=(_e,et,tt)=>produce(_e,nt=>{const at=(nt[et]??createCache()).lists[tt]??createList$1();at.state.invalid=!0}),doTransaction=(_e,et)=>produce(_e,tt=>{for(const[nt,rt]of Object.entries(et)){const at=tt[nt]??createCache();for(const[it,ot]of Object.entries(rt)){const st=at.store[it];st&&(at.store[it]=ot(st))}}});function reducer$1(_e={},et){switch(et.type){case ENTITIES_IMPORT:return importEntities(_e,et.entityType,et.entities,et.listKey,et.pos);case ENTITIES_DELETE:return deleteEntities(_e,et.entityType,et.ids,et.opts);case ENTITIES_DISMISS:return dismissEntities(_e,et.entityType,et.ids,et.listKey);case ENTITIES_INCREMENT:return incrementEntities(_e,et.entityType,et.listKey,et.diff);case ENTITIES_FETCH_SUCCESS:return importEntities(_e,et.entityType,et.entities,et.listKey,et.pos,et.newState,et.overwrite);case ENTITIES_FETCH_REQUEST:return setFetching(_e,et.entityType,et.listKey,!0);case ENTITIES_FETCH_FAIL:return setFetching(_e,et.entityType,et.listKey,!1,et.error);case ENTITIES_INVALIDATE_LIST:return invalidateEntityList(_e,et.entityType,et.listKey);case ENTITIES_TRANSACTION:return doTransaction(_e,et.transaction);default:return _e}}const ACCOUNT_NOTE_SUBMIT_REQUEST="ACCOUNT_NOTE_SUBMIT_REQUEST",ACCOUNT_NOTE_SUBMIT_SUCCESS="ACCOUNT_NOTE_SUBMIT_SUCCESS",ACCOUNT_NOTE_SUBMIT_FAIL="ACCOUNT_NOTE_SUBMIT_FAIL",ACCOUNT_NOTE_INIT_MODAL="ACCOUNT_NOTE_INIT_MODAL",ACCOUNT_NOTE_CHANGE_COMMENT="ACCOUNT_NOTE_CHANGE_COMMENT",submitAccountNote=()=>(_e,et)=>{_e(submitAccountNoteRequest());const tt=et().account_notes.edit.account;return api(et).post(`/api/v1/accounts/${tt}/note`,{comment:et().account_notes.edit.comment}).then(nt=>{_e(closeModal()),_e(submitAccountNoteSuccess(nt.data))}).catch(nt=>_e(submitAccountNoteFail(nt)))};function submitAccountNoteRequest(){return{type:ACCOUNT_NOTE_SUBMIT_REQUEST}}function submitAccountNoteSuccess(_e){return{type:ACCOUNT_NOTE_SUBMIT_SUCCESS,relationship:_e}}function submitAccountNoteFail(_e){return{type:ACCOUNT_NOTE_SUBMIT_FAIL,error:_e}}function changeAccountNoteComment(_e){return{type:ACCOUNT_NOTE_CHANGE_COMMENT,comment:_e}}const EditRecord=Record({isSubmitting:!1,account:null,comment:""}),ReducerRecord$x=Record({edit:EditRecord()});function account_notes(_e=ReducerRecord$x(),et){switch(et.type){case ACCOUNT_NOTE_INIT_MODAL:return _e.withMutations(tt=>{tt.setIn(["edit","isSubmitting"],!1),tt.setIn(["edit","account"],et.account.get("id")),tt.setIn(["edit","comment"],et.comment)});case ACCOUNT_NOTE_CHANGE_COMMENT:return _e.setIn(["edit","comment"],et.comment);case ACCOUNT_NOTE_SUBMIT_REQUEST:return _e.setIn(["edit","isSubmitting"],!0);case ACCOUNT_NOTE_SUBMIT_FAIL:case ACCOUNT_NOTE_SUBMIT_SUCCESS:return _e.setIn(["edit","isSubmitting"],!1);default:return _e}}const MetaRecord=Record({pleroma:Map$3(),role:null,source:Map$3()}),importAccount=(_e,et)=>{const tt=et.get("id");return _e.set(tt,MetaRecord({pleroma:et.get("pleroma",Map$3()).delete("settings_store"),role:et.get("role",null),source:et.get("source",Map$3())}))};function accounts_meta(_e=Map$3(),et){switch(et.type){case ME_FETCH_SUCCESS:case ME_PATCH_SUCCESS:return importAccount(_e,Map$3(fromJS(et.me)));case VERIFY_CREDENTIALS_SUCCESS:case AUTH_ACCOUNT_REMEMBER_SUCCESS:return importAccount(_e,Map$3(fromJS(et.account)));default:return _e}}const ReducerRecord$w=Record({reports:Map$3(),openReports:OrderedSet(),users:Map$3(),latestUsers:OrderedSet(),awaitingApproval:OrderedSet(),configs:List$1(),needsReboot:!1}),FILTER_UNAPPROVED=["local","need_approval"],FILTER_LATEST=["local","active"],filtersMatch=(_e,et)=>is$2(Set$3(_e),Set$3(et)),toIds$2=_e=>_e.map(et=>et.id),mergeSet=(_e,et,tt)=>{const nt=toIds$2(tt);return _e.update(et,rt=>rt.union(nt))},replaceSet=(_e,et,tt)=>{const nt=toIds$2(tt);return _e.set(et,OrderedSet(nt))},maybeImportUnapproved=(_e,et,tt)=>filtersMatch(FILTER_UNAPPROVED,tt)?mergeSet(_e,"awaitingApproval",et):_e,maybeImportLatest=(_e,et,tt,nt)=>nt===1&&filtersMatch(FILTER_LATEST,tt)?replaceSet(_e,"latestUsers",et):_e,minifyUser=_e=>_e.mergeWith((et,tt)=>tt||et,{account:normalizeId$1(_e.getIn(["account","id"]))}),fixUser=_e=>normalizeAdminAccount(_e).withMutations(et=>{minifyUser(et)});function importUsers(_e,et,tt,nt){return _e.withMutations(rt=>{maybeImportUnapproved(rt,et,tt),maybeImportLatest(rt,et,tt,nt),et.forEach(at=>{const it=fixUser(at);rt.setIn(["users",at.id],it)})})}function deleteUsers(_e,et){return _e.withMutations(tt=>{et.forEach(nt=>{tt.update("awaitingApproval",rt=>rt.delete(nt)),tt.deleteIn(["users",nt])})})}function approveUsers(_e,et){return _e.withMutations(tt=>{et.forEach(nt=>{const rt=fixUser(nt);tt.update("awaitingApproval",at=>at.delete(nt.id)),tt.setIn(["users",nt.id],rt)})})}const minifyReport=_e=>_e.mergeWith((et,tt)=>tt||et,{account:normalizeId$1(_e.getIn(["account","id"])),target_account:normalizeId$1(_e.getIn(["target_account","id"])),action_taken_by_account:normalizeId$1(_e.getIn(["action_taken_by_account","id"])),assigned_account:normalizeId$1(_e.getIn(["assigned_account","id"])),statuses:_e.get("statuses").map(et=>normalizeId$1(et.get("id")))}),fixReport=_e=>normalizeAdminReport(_e).withMutations(et=>{minifyReport(et)});function importReports(_e,et){return _e.withMutations(tt=>{et.forEach(nt=>{const rt=fixReport(nt);rt.action_taken||tt.update("openReports",at=>at.add(nt.id)),tt.setIn(["reports",nt.id],rt)})})}function handleReportDiffs(_e,et){return _e.withMutations(tt=>{et.forEach(nt=>{switch(nt.state){case"open":tt.update("openReports",rt=>rt.add(nt.id));break;default:tt.update("openReports",rt=>rt.delete(nt.id))}})})}const normalizeConfig=_e=>Map$3(fromJS(_e)),normalizeConfigs=_e=>List$1(fromJS(_e)).map(normalizeConfig),importConfigs$1=(_e,et)=>_e.set("configs",normalizeConfigs(et));function admin(_e=ReducerRecord$w(),et){switch(et.type){case ADMIN_CONFIG_FETCH_SUCCESS:case ADMIN_CONFIG_UPDATE_SUCCESS:return importConfigs$1(_e,et.configs);case ADMIN_REPORTS_FETCH_SUCCESS:return importReports(_e,et.reports);case ADMIN_REPORTS_PATCH_REQUEST:case ADMIN_REPORTS_PATCH_SUCCESS:return handleReportDiffs(_e,et.reports);case ADMIN_USERS_FETCH_SUCCESS:return importUsers(_e,et.users,et.filters,et.page);case ADMIN_USERS_DELETE_REQUEST:case ADMIN_USERS_DELETE_SUCCESS:return deleteUsers(_e,et.accountIds);case ADMIN_USERS_APPROVE_REQUEST:return _e.update("awaitingApproval",tt=>tt.subtract(et.accountIds));case ADMIN_USERS_APPROVE_SUCCESS:return approveUsers(_e,et.users);default:return _e}}const AnnouncementFormRecord=Record({id:null,content:"",starts_at:null,ends_at:null,all_day:!1,is_submitting:!1}),ReducerRecord$v=Record({items:List$1(),isLoading:!1,page:-1,form:AnnouncementFormRecord()});function adminAnnouncementsReducer(_e=ReducerRecord$v(),et){switch(et.type){case ADMIN_ANNOUNCEMENTS_FETCH_REQUEST:return _e.set("isLoading",!0);case ADMIN_ANNOUNCEMENTS_FETCH_SUCCESS:return _e.withMutations(tt=>{const nt=List$1(et.announcements.map(rt=>normalizeAnnouncement(rt)));tt.set("items",nt),tt.set("isLoading",!1)});case ADMIN_ANNOUNCEMENTS_FETCH_FAIL:return _e.set("isLoading",!1);case ADMIN_ANNOUNCEMENT_DELETE_SUCCESS:return _e.update("items",tt=>{const nt=tt.findIndex(rt=>rt.id===et.id);return nt>-1?tt.delete(nt):tt});case ADMIN_ANNOUNCEMENT_CHANGE_CONTENT:return _e.setIn(["form","content"],et.value);case ADMIN_ANNOUNCEMENT_CHANGE_START_TIME:return _e.setIn(["form","starts_at"],et.value);case ADMIN_ANNOUNCEMENT_CHANGE_END_TIME:return _e.setIn(["form","ends_at"],et.value);case ADMIN_ANNOUNCEMENT_CHANGE_ALL_DAY:return _e.setIn(["form","all_day"],et.value);case ADMIN_ANNOUNCEMENT_CREATE_REQUEST:return _e.setIn(["form","is_submitting"],!0);case ADMIN_ANNOUNCEMENT_CREATE_SUCCESS:case ADMIN_ANNOUNCEMENT_CREATE_FAIL:return _e.setIn(["form","is_submitting"],!0);case ADMIN_ANNOUNCEMENT_MODAL_INIT:return _e.set("form",et.announcement?AnnouncementFormRecord({id:et.announcement.id,content:et.announcement.content,starts_at:et.announcement.starts_at?new Date(et.announcement.starts_at):null,ends_at:et.announcement.ends_at?new Date(et.announcement.ends_at):null,all_day:et.announcement.all_day}):AnnouncementFormRecord());default:return _e}}const LogEntryRecord=Record({data:Map$3(),id:0,message:"",time:0}),ReducerRecord$u=Record({items:Map$3(),index:OrderedSet(),total:0}),parseItems=_e=>{const et=[],tt={};return _e.forEach(nt=>{et.push(nt.id),tt[nt.id]=LogEntryRecord(nt)}),{ids:et,map:tt}},importItems=(_e,et,tt)=>{const{ids:nt,map:rt}=parseItems(et);return _e.withMutations(at=>{at.update("index",it=>it.union(nt)),at.update("items",it=>it.merge(rt)),at.set("total",tt)})};function admin_log(_e=ReducerRecord$u(),et){switch(et.type){case ADMIN_LOG_FETCH_SUCCESS:return importItems(_e,et.items,et.total);default:return _e}}const ReducerRecord$t=Record({isLoading:!1,loaded:!1,items:OrderedSet(),filters:Set$3(["local","active"]),total:1/0,pageSize:50,page:-1,query:"",next:null});function admin_user_index(_e=ReducerRecord$t(),et){switch(et.type){case ADMIN_USER_INDEX_QUERY_SET:return _e.set("query",et.query);case ADMIN_USER_INDEX_FETCH_REQUEST:return _e.set("isLoading",!0).set("loaded",!0).set("items",OrderedSet()).set("total",et.count).set("page",0).set("next",null);case ADMIN_USER_INDEX_FETCH_SUCCESS:return _e.set("isLoading",!1).set("loaded",!0).set("items",OrderedSet(et.users.map(tt=>tt.id))).set("total",et.count).set("page",1).set("next",et.next);case ADMIN_USER_INDEX_FETCH_FAIL:case ADMIN_USER_INDEX_EXPAND_FAIL:return _e.set("isLoading",!1);case ADMIN_USER_INDEX_EXPAND_REQUEST:return _e.set("isLoading",!0);case ADMIN_USER_INDEX_EXPAND_SUCCESS:return _e.set("isLoading",!1).set("loaded",!0).set("items",_e.items.union(et.users.map(tt=>tt.id))).set("total",et.count).set("page",1).set("next",et.next);default:return _e}}const ALIASES_FETCH_REQUEST="ALIASES_FETCH_REQUEST",ALIASES_FETCH_SUCCESS="ALIASES_FETCH_SUCCESS",ALIASES_FETCH_FAIL="ALIASES_FETCH_FAIL",ALIASES_SUGGESTIONS_CHANGE="ALIASES_SUGGESTIONS_CHANGE",ALIASES_SUGGESTIONS_READY="ALIASES_SUGGESTIONS_READY",ALIASES_SUGGESTIONS_CLEAR="ALIASES_SUGGESTIONS_CLEAR",ALIASES_ADD_REQUEST="ALIASES_ADD_REQUEST",ALIASES_ADD_SUCCESS="ALIASES_ADD_SUCCESS",ALIASES_ADD_FAIL="ALIASES_ADD_FAIL",ALIASES_REMOVE_REQUEST="ALIASES_REMOVE_REQUEST",ALIASES_REMOVE_SUCCESS="ALIASES_REMOVE_SUCCESS",ALIASES_REMOVE_FAIL="ALIASES_REMOVE_FAIL",messages={createSuccess:{id:"aliases.success.add",defaultMessage:"Account alias created successfully"},removeSuccess:{id:"aliases.success.remove",defaultMessage:"Account alias removed successfully"}},fetchAliases=(_e,et)=>{if(!isLoggedIn(et))return;const nt=et().instance;getFeatures(nt).accountMoving&&(_e(fetchAliasesRequest()),api(et).get("/api/pleroma/aliases").then(at=>{_e(fetchAliasesSuccess(at.data.aliases))}).catch(at=>_e(fetchAliasesFail(at))))},fetchAliasesRequest=()=>({type:ALIASES_FETCH_REQUEST}),fetchAliasesSuccess=_e=>({type:ALIASES_FETCH_SUCCESS,value:_e}),fetchAliasesFail=_e=>({type:ALIASES_FETCH_FAIL,error:_e}),fetchAliasesSuggestions=_e=>(et,tt)=>{if(!isLoggedIn(tt))return;const nt={q:_e,resolve:!0,limit:4};api(tt).get("/api/v1/accounts/search",{params:nt}).then(({data:rt})=>{et(importFetchedAccounts(rt)),et(fetchAliasesSuggestionsReady(_e,rt))}).catch(rt=>toast.showAlertForError(rt))},fetchAliasesSuggestionsReady=(_e,et)=>({type:ALIASES_SUGGESTIONS_READY,query:_e,accounts:et}),clearAliasesSuggestions=()=>({type:ALIASES_SUGGESTIONS_CLEAR}),changeAliasesSuggestions=_e=>({type:ALIASES_SUGGESTIONS_CHANGE,value:_e}),addToAliases=_e=>(et,tt)=>{var it;if(!isLoggedIn(tt))return;const nt=tt(),rt=nt.instance;if(!getFeatures(rt).accountMoving){const ot=nt.me,st=nt.accounts_meta.get(ot).pleroma.get("also_known_as");et(addToAliasesRequest()),api(tt).patch("/api/v1/accounts/update_credentials",{also_known_as:[...st,(it=_e.pleroma)==null?void 0:it.ap_id]}).then(ct=>{toast.success(messages.createSuccess),et(addToAliasesSuccess),et(patchMeSuccess(ct.data))}).catch(ct=>et(addToAliasesFail(ct)));return}et(addToAliasesRequest()),api(tt).put("/api/pleroma/aliases",{alias:_e.acct}).then(()=>{toast.success(messages.createSuccess),et(addToAliasesSuccess),et(fetchAliases)}).catch(ot=>et(fetchAliasesFail(ot)))},addToAliasesRequest=()=>({type:ALIASES_ADD_REQUEST}),addToAliasesSuccess=()=>({type:ALIASES_ADD_SUCCESS}),addToAliasesFail=_e=>({type:ALIASES_ADD_FAIL,error:_e}),removeFromAliases=_e=>(et,tt)=>{if(!isLoggedIn(tt))return;const nt=tt(),rt=nt.instance;if(!getFeatures(rt).accountMoving){const it=nt.me,ot=nt.accounts_meta.get(it).pleroma.get("also_known_as");et(removeFromAliasesRequest()),api(tt).patch("/api/v1/accounts/update_credentials",{also_known_as:ot.filter(st=>st!==_e)}).then(st=>{toast.success(messages.removeSuccess),et(removeFromAliasesSuccess),et(patchMeSuccess(st.data))}).catch(st=>et(removeFromAliasesFail(st)));return}et(addToAliasesRequest()),api(tt).delete("/api/pleroma/aliases",{data:{alias:_e}}).then(it=>{toast.success(messages.removeSuccess),et(removeFromAliasesSuccess),et(fetchAliases)}).catch(it=>et(fetchAliasesFail(it)))},removeFromAliasesRequest=()=>({type:ALIASES_REMOVE_REQUEST}),removeFromAliasesSuccess=()=>({type:ALIASES_REMOVE_SUCCESS}),removeFromAliasesFail=_e=>({type:ALIASES_REMOVE_FAIL,error:_e}),ReducerRecord$s=Record({aliases:Record({items:List$1(),loaded:!1})(),suggestions:Record({items:List$1(),value:"",loaded:!1})()});function aliasesReducer(_e=ReducerRecord$s(),et){switch(et.type){case ALIASES_FETCH_SUCCESS:return _e.setIn(["aliases","items"],et.value);case ALIASES_SUGGESTIONS_CHANGE:return _e.setIn(["suggestions","value"],et.value).setIn(["suggestions","loaded"],!1);case ALIASES_SUGGESTIONS_READY:return _e.setIn(["suggestions","items"],List$1(et.accounts.map(tt=>tt.id))).setIn(["suggestions","loaded"],!0);case ALIASES_SUGGESTIONS_CLEAR:return _e.update("suggestions",tt=>tt.withMutations(nt=>{nt.set("items",List$1()),nt.set("value",""),nt.set("loaded",!1)}));default:return _e}}const ReducerRecord$r=Record({items:List$1(),isLoading:!1,show:!1,unread:Set$3()}),updateReaction=(_e,et,tt,nt)=>_e.update("items",rt=>rt.map(at=>at.id===et?at.update("reactions",it=>{const ot=it.findIndex(st=>st.name===tt);return ot>-1?it.update(ot,st=>nt(st)):it.push(nt(normalizeAnnouncementReaction({name:tt,count:0})))}):at)),updateReactionCount=(_e,et)=>updateReaction(_e,et.announcement_id,et.name,tt=>tt.set("count",et.count)),addReaction=(_e,et,tt)=>updateReaction(_e,et,tt,nt=>nt.set("me",!0).update("count",rt=>rt+1)),removeReaction=(_e,et,tt)=>updateReaction(_e,et,tt,nt=>nt.set("me",!1).update("count",rt=>rt-1)),sortAnnouncements=_e=>_e.sortBy(et=>et.starts_at||et.published_at),updateAnnouncement=(_e,et)=>{const tt=_e.items.findIndex(nt=>nt.id===et.id);return tt>-1?_e.update("items",nt=>sortAnnouncements(nt.update(tt,rt=>rt.mergeDeep(et)))):_e.update("items",nt=>sortAnnouncements(nt.unshift(et)))};function announcementsReducer(_e=ReducerRecord$r(),et){switch(et.type){case ANNOUNCEMENTS_TOGGLE_SHOW:return _e.withMutations(tt=>{tt.set("show",!tt.show)});case ANNOUNCEMENTS_FETCH_REQUEST:return _e.set("isLoading",!0);case ANNOUNCEMENTS_FETCH_SUCCESS:return _e.withMutations(tt=>{const nt=List$1(et.announcements.map(rt=>normalizeAnnouncement(rt)));tt.set("items",nt),tt.set("isLoading",!1)});case ANNOUNCEMENTS_FETCH_FAIL:return _e.set("isLoading",!1);case ANNOUNCEMENTS_UPDATE:return updateAnnouncement(_e,normalizeAnnouncement(et.announcement));case ANNOUNCEMENTS_REACTION_UPDATE:return updateReactionCount(_e,et.reaction);case ANNOUNCEMENTS_REACTION_ADD_REQUEST:case ANNOUNCEMENTS_REACTION_REMOVE_FAIL:return addReaction(_e,et.id,et.name);case ANNOUNCEMENTS_REACTION_REMOVE_REQUEST:case ANNOUNCEMENTS_REACTION_ADD_FAIL:return removeReaction(_e,et.id,et.name);case ANNOUNCEMENTS_DISMISS_SUCCESS:return updateAnnouncement(_e,normalizeAnnouncement({id:et.id,read:!0}));case ANNOUNCEMENTS_DELETE:return _e.update("items",tt=>{const nt=tt.findIndex(rt=>rt.id===et.id);return nt>-1?tt.delete(nt):tt});default:return _e}}var baseIndexOf=_baseIndexOf;function charsEndIndex$1(_e,et){for(var tt=_e.length;tt--&&baseIndexOf(et,_e[tt],0)>-1;);return tt}var _charsEndIndex=charsEndIndex$1,baseToString=_baseToString,baseTrim=_baseTrim,castSlice=_castSlice,charsEndIndex=_charsEndIndex,charsStartIndex=_charsStartIndex,stringToArray=_stringToArray,toString=toString_1;function trim(_e,et,tt){if(_e=toString(_e),_e&&(tt||et===void 0))return baseTrim(_e);if(!_e||!(et=baseToString(et)))return _e;var nt=stringToArray(_e),rt=stringToArray(et),at=charsStartIndex(nt,rt),it=charsEndIndex(nt,rt)+1;return castSlice(nt,at,it).join("")}var trim_1=trim;const trim$1=getDefaultExportFromCjs$1(trim_1),AuthAppRecord=Record({access_token:null,client_id:null,client_secret:null,id:null,name:null,redirect_uri:null,token_type:null,vapid_key:null,website:null}),AuthTokenRecord=Record({access_token:"",account:null,created_at:0,expires_in:null,id:null,me:null,refresh_token:null,scope:"",token_type:""}),AuthUserRecord=Record({access_token:"",id:"",url:""}),ReducerRecord$q=Record({app:AuthAppRecord(),tokens:Map$3(),users:Map$3(),me:null}),buildKey=_e=>_e.join(":"),NAMESPACE=trim$1(FE_SUBDIRECTORY,"/")?`soapbox@${FE_SUBDIRECTORY}`:"soapbox",STORAGE_KEY=buildKey([NAMESPACE,"auth"]),SESSION_KEY=buildKey([NAMESPACE,"auth","me"]),getSessionUser=()=>{const _e=sessionStorage.getItem(SESSION_KEY);return validId(_e)?_e:void 0},getLocalState=()=>{const _e=JSON.parse(localStorage.getItem(STORAGE_KEY));if(_e)return ReducerRecord$q({app:AuthAppRecord(_e.app),tokens:Map$3(Object.entries(_e.tokens).map(([et,tt])=>[et,AuthTokenRecord(tt)])),users:Map$3(Object.entries(_e.users).map(([et,tt])=>[et,AuthUserRecord(tt)])),me:_e.me})},sessionUser=getSessionUser(),localState=getLocalState();fromJS(JSON.parse(localStorage.getItem(STORAGE_KEY)));const validUser=_e=>{try{return!!(_e&&validId(_e.id)&&validId(_e.access_token))}catch{return!1}},firstValidUser=_e=>_e.users.find(validUser),getUrlOrId=_e=>{try{const{id:et,url:tt}=_e.toJS();return tt||et}catch{return null}},maybeShiftMe=_e=>{const et=_e.me,tt=_e.users.get(et);if(validUser(tt))return _e;{const nt=firstValidUser(_e);return _e.set("me",getUrlOrId(nt))}},setSessionUser=_e=>_e.update("me",et=>{const tt=List$1([_e.users.get(sessionUser),_e.users.get(et)]).find(validUser);return getUrlOrId(tt)}),migrateLegacy=_e=>localState?_e:_e.withMutations(et=>{const tt=AuthAppRecord(JSON.parse(localStorage.getItem("soapbox:auth:app"))),nt=fromJS(JSON.parse(localStorage.getItem("soapbox:auth:user")));nt&&(et.set("me","_legacy"),et.set("app",tt),et.set("tokens",Map$3({[nt.get("access_token")]:AuthTokenRecord(nt.set("account","_legacy"))})),et.set("users",Map$3({_legacy:AuthUserRecord({id:"_legacy",access_token:nt.get("access_token")})})))}),isUpgradingUrlId=_e=>{const et=_e.me,tt=_e.users.get(et);return validId(et)&&tt&&!isURL(et)},sanitizeState=_e=>isUpgradingUrlId(_e)?_e:_e.withMutations(et=>{et.update("users",tt=>tt.filter((nt,rt)=>validUser(nt)&&nt.get("url")===rt)),et.update("tokens",tt=>tt.filter((nt,rt)=>validId(rt)&&nt.get("access_token")===rt))}),persistAuth=_e=>localStorage.setItem(STORAGE_KEY,JSON.stringify(_e.toJS())),persistSession=_e=>{const et=_e.me;et&&typeof et=="string"&&sessionStorage.setItem(SESSION_KEY,et)},persistState=_e=>{persistAuth(_e),persistSession(_e)},initialize=_e=>_e.withMutations(et=>{maybeShiftMe(et),setSessionUser(et),migrateLegacy(et),sanitizeState(et),persistState(et)}),initialState$k=initialize(ReducerRecord$q().merge(localState)),importToken=(_e,et)=>_e.setIn(["tokens",et.access_token],AuthTokenRecord(et)),upgradeLegacyId=(_e,et)=>localState?_e:_e.withMutations(tt=>{tt.update("me",nt=>nt==="_legacy"?et.url:nt),tt.deleteIn(["users","_legacy"])}),upgradeNonUrlId=(_e,et)=>{const tt=_e.me;return isURL(tt)?_e:_e.withMutations(nt=>{nt.update("me",rt=>rt===et.id?et.url:rt),nt.deleteIn(["users",et.id])})},userMismatch=(_e,et)=>(tt,nt)=>{const rt=tt.get("access_token")===_e,at=nt!==et.url||tt.get("url")!==et.url,it=tt.get("id")!==et.id;return rt&&(at||it)},importCredentials=(_e,et,tt)=>_e.withMutations(nt=>{nt.setIn(["users",tt.url],AuthUserRecord({id:tt.id,access_token:et,url:tt.url})),nt.setIn(["tokens",et,"account"],tt.id),nt.setIn(["tokens",et,"me"],tt.url),nt.update("users",rt=>rt.filterNot(userMismatch(et,tt))),nt.update("me",rt=>rt||tt.url),upgradeLegacyId(nt,tt),upgradeNonUrlId(nt,tt)}),deleteToken$1=(_e,et)=>_e.withMutations(tt=>{tt.update("tokens",nt=>nt.delete(et)),tt.update("users",nt=>nt.filterNot(rt=>rt.get("access_token")===et)),maybeShiftMe(tt)}),deleteUser=(_e,et)=>{const tt=et.url;return _e.withMutations(nt=>{nt.update("users",rt=>rt.delete(tt)),nt.update("tokens",rt=>rt.filterNot(at=>at.get("me")===tt)),maybeShiftMe(nt)})},importMastodonPreload=(_e,et)=>_e.withMutations(tt=>{const nt=et.getIn(["meta","me"]),rt=et.getIn(["accounts",nt,"url"]),at=et.getIn(["meta","access_token"]);validId(at)&&validId(nt)&&isURL(rt)&&(tt.setIn(["tokens",at],AuthTokenRecord({access_token:at,account:nt,me:rt,scope:"read write follow push",token_type:"Bearer"})),tt.setIn(["users",rt],AuthUserRecord({id:nt,access_token:at,url:rt}))),maybeShiftMe(tt)}),persistAuthAccount=_e=>{if(_e&&_e.url){const et=`authAccount:${_e.url}`;_e.pleroma||(_e.pleroma={}),KVStore.getItem(et).then(tt=>{var rt;const nt=((rt=tt==null?void 0:tt.pleroma)==null?void 0:rt.settings_store)||{};_e.pleroma.settings_store||(_e.pleroma.settings_store=nt),KVStore.setItem(et,_e)}).catch(console.error)}},deleteForbiddenToken=(_e,et,tt)=>{var nt;return[401,403].includes((nt=et.response)==null?void 0:nt.status)?deleteToken$1(_e,tt):_e},reducer=(_e,et)=>{switch(et.type){case AUTH_APP_CREATED:return _e.set("app",AuthAppRecord(et.app));case AUTH_APP_AUTHORIZED:return _e.update("app",tt=>tt.merge(et.token));case AUTH_LOGGED_IN:return importToken(_e,et.token);case AUTH_LOGGED_OUT:return deleteUser(_e,et.account);case VERIFY_CREDENTIALS_SUCCESS:return persistAuthAccount(et.account),importCredentials(_e,et.token,et.account);case VERIFY_CREDENTIALS_FAIL:return deleteForbiddenToken(_e,et.error,et.token);case SWITCH_ACCOUNT:return _e.set("me",et.account.url);case ME_FETCH_SKIP:return _e.set("me",null);case MASTODON_PRELOAD_IMPORT:return importMastodonPreload(_e,fromJS(et.data));default:return _e}},reload=()=>location.replace("/"),validMe=_e=>{const et=_e.me;return typeof et=="string"&&et!=="_legacy"},userSwitched=(_e,et)=>{var ot;const tt=et.me,nt=_e.me,rt=validMe(_e)&&validMe(et),at=nt!==tt,it=((ot=et.users.get(tt))==null?void 0:ot.id)===nt;return rt&&at&&!it},maybeReload=(_e,et,tt)=>{const nt=tt.type===AUTH_LOGGED_OUT&&tt.standalone;(userSwitched(_e,et)||nt)&&reload()};function auth(_e=initialState$k,et){const tt=reducer(_e,et);if(!tt.equals(_e)){if(persistAuth(tt),et.background===!0)return _e;persistSession(tt),maybeReload(_e,tt,et)}return tt}const BACKUPS_FETCH_REQUEST="BACKUPS_FETCH_REQUEST",BACKUPS_FETCH_SUCCESS="BACKUPS_FETCH_SUCCESS",BACKUPS_FETCH_FAIL="BACKUPS_FETCH_FAIL",BACKUPS_CREATE_REQUEST="BACKUPS_CREATE_REQUEST",BACKUPS_CREATE_SUCCESS="BACKUPS_CREATE_SUCCESS",BACKUPS_CREATE_FAIL="BACKUPS_CREATE_FAIL",fetchBackups=()=>(_e,et)=>(_e({type:BACKUPS_FETCH_REQUEST}),api(et).get("/api/v1/pleroma/backups").then(({data:tt})=>_e({type:BACKUPS_FETCH_SUCCESS,backups:tt})).catch(tt=>{_e({type:BACKUPS_FETCH_FAIL,error:tt})})),createBackup=()=>(_e,et)=>(_e({type:BACKUPS_CREATE_REQUEST}),api(et).post("/api/v1/pleroma/backups").then(({data:tt})=>_e({type:BACKUPS_CREATE_SUCCESS,backups:tt})).catch(tt=>{_e({type:BACKUPS_CREATE_FAIL,error:tt})}));var BackupRecord=Record({id:null,content_type:"",url:"",file_size:null,processed:!1,inserted_at:""}),initialState$j=Map$3(),importBackup=function _e(et,tt){return et.set(tt.inserted_at,BackupRecord(tt))},importBackups=function _e(et,tt){return et.withMutations(function(nt){tt.forEach(function(rt){return importBackup(nt,rt)})})};function backups(){var _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:initialState$j,et=arguments.length>1?arguments[1]:void 0;switch(et.type){case BACKUPS_FETCH_SUCCESS:case BACKUPS_CREATE_SUCCESS:return importBackups(_e,et.backups);default:return _e}}const initialState$i=Map$3(),idComparator=(_e,et)=>_eet?1:0,updateList$1=(_e,et,tt)=>{const rt=_e.get(et,OrderedSet()).union(tt).sort(idComparator);return _e.set(et,rt)},importMessage$1=(_e,et)=>updateList$1(_e,et.chat_id,[et.id]),importMessages$1=(_e,et)=>_e.withMutations(tt=>et.forEach(nt=>importMessage$1(tt,nt))),importLastMessages$1=(_e,et)=>_e.withMutations(tt=>et.forEach(nt=>{nt.last_message&&importMessage$1(tt,nt.last_message)})),replaceMessage=(_e,et,tt,nt)=>_e.update(et,rt=>rt.delete(tt).add(nt).sort(idComparator));function chatMessageLists(_e=initialState$i,et){switch(et.type){case CHAT_MESSAGE_SEND_REQUEST:return updateList$1(_e,et.chatId,[et.uuid]);case CHATS_FETCH_SUCCESS:case CHATS_EXPAND_SUCCESS:return importLastMessages$1(_e,et.chats);case STREAMING_CHAT_UPDATE:return et.chat.last_message&&et.chat.last_message.account_id!==et.me?importMessages$1(_e,[et.chat.last_message]):_e;case CHAT_MESSAGES_FETCH_SUCCESS:return updateList$1(_e,et.chatId,et.chatMessages.map(tt=>tt.id));case CHAT_MESSAGE_SEND_SUCCESS:return replaceMessage(_e,et.chatId,et.uuid,et.chatMessage.id);case CHAT_MESSAGE_DELETE_SUCCESS:return _e.update(et.chatId,tt=>tt.delete(et.messageId));default:return _e}}const importMessage=(_e,et)=>_e.set(et.id,normalizeChatMessage(et)),importMessages=(_e,et)=>_e.withMutations(tt=>et.forEach(nt=>importMessage(tt,nt))),importLastMessages=(_e,et)=>_e.withMutations(tt=>et.forEach(nt=>{nt.last_message&&importMessage(tt,nt.last_message)})),initialState$h=Map$3();function chatMessages(_e=initialState$h,et){switch(et.type){case CHAT_MESSAGE_SEND_REQUEST:return importMessage(_e,fromJS({id:et.uuid,chat_id:et.chatId,account_id:et.me,content:et.params.content,created_at:new Date().toISOString(),pending:!0}));case CHATS_FETCH_SUCCESS:case CHATS_EXPAND_SUCCESS:return importLastMessages(_e,et.chats);case CHAT_MESSAGES_FETCH_SUCCESS:return importMessages(_e,et.chatMessages);case CHAT_MESSAGE_SEND_SUCCESS:return importMessage(_e,fromJS(et.chatMessage)).delete(et.uuid);case STREAMING_CHAT_UPDATE:return importLastMessages(_e,[et.chat]);case CHAT_MESSAGE_DELETE_REQUEST:return _e.update(et.messageId,tt=>tt.set("pending",!0).set("deleting",!0));case CHAT_MESSAGE_DELETE_SUCCESS:return _e.delete(et.messageId);default:return _e}}const ReducerRecord$p=Record({next:null,isLoading:!1,items:Map$3({})}),minifyChat=_e=>_e.mergeWith((et,tt)=>tt||et,{last_message:normalizeId$1(_e.getIn(["last_message","id"]))}),fixChat=_e=>normalizeChat(_e).withMutations(et=>{minifyChat(et)}),importChat=(_e,et)=>_e.setIn(["items",et.id],fixChat(et)),importChats=(_e,et,tt)=>_e.withMutations(nt=>{tt!==void 0&&nt.set("next",tt),et.forEach(rt=>importChat(nt,rt)),nt.set("isLoading",!1)});function chats(_e=ReducerRecord$p(),et){switch(et.type){case CHATS_FETCH_REQUEST:case CHATS_EXPAND_REQUEST:return _e.set("isLoading",!0);case CHATS_FETCH_SUCCESS:case CHATS_EXPAND_SUCCESS:return importChats(_e,et.chats,et.next);case STREAMING_CHAT_UPDATE:return importChats(_e,[et.chat]);case CHAT_FETCH_SUCCESS:return importChats(_e,[et.chat]);case CHAT_READ_REQUEST:return _e.setIn([et.chatId,"unread"],0);case CHAT_READ_SUCCESS:return importChats(_e,[et.chat]);default:return _e}}const ReducerRecord$o=Record({name:"",status:"",location:null,start_time:new Date,end_time:null,approval_required:!1,banner:null,progress:0,is_uploading:!1,is_submitting:!1,id:null}),setHasEndTime=_e=>{const et=new Date(_e.start_time);return et.setHours(et.getHours()+2),_e.set("end_time",et)};function compose_event(_e=ReducerRecord$o(),et){switch(et.type){case EDIT_EVENT_NAME_CHANGE:return _e.set("name",et.value);case EDIT_EVENT_DESCRIPTION_CHANGE:return _e.set("status",et.value);case EDIT_EVENT_START_TIME_CHANGE:return _e.set("start_time",et.value);case EDIT_EVENT_END_TIME_CHANGE:return _e.set("end_time",et.value);case EDIT_EVENT_HAS_END_TIME_CHANGE:return et.value?setHasEndTime(_e):_e.set("end_time",null);case EDIT_EVENT_APPROVAL_REQUIRED_CHANGE:return _e.set("approval_required",et.value);case EDIT_EVENT_LOCATION_CHANGE:return _e.set("location",et.value);case EVENT_BANNER_UPLOAD_REQUEST:return _e.set("is_uploading",!0);case EVENT_BANNER_UPLOAD_SUCCESS:return _e.set("banner",normalizeAttachment(fromJS(et.media))).set("is_uploading",!1);case EVENT_BANNER_UPLOAD_FAIL:return _e.set("is_uploading",!1);case EVENT_BANNER_UPLOAD_UNDO:return _e.set("banner",null);case EVENT_BANNER_UPLOAD_PROGRESS:return _e.set("progress",et.loaded*100);case EVENT_SUBMIT_REQUEST:return _e.set("is_submitting",!0);case EVENT_SUBMIT_SUCCESS:case EVENT_SUBMIT_FAIL:return _e.set("is_submitting",!1);case EVENT_COMPOSE_CANCEL:return ReducerRecord$o();case EVENT_FORM_SET:return ReducerRecord$o({name:et.status.event.name,status:et.text,start_time:new Date(et.status.event.start_time),end_time:et.status.event.end_time?new Date(et.status.event.end_time):null,approval_required:et.status.event.join_mode!=="free",banner:et.status.event.banner||null,location:et.location?normalizeLocation(et.location):null,progress:0,is_uploading:!1,is_submitting:!1,id:et.status.id});default:return _e}}const ReducerRecord$n=Record({inReplyTos:Map$3(),replies:Map$3()}),importStatus$4=(_e,et,tt)=>{const{id:nt,in_reply_to_id:rt}=et;return rt?_e.withMutations(at=>{const ot=(at.replies.get(rt)||OrderedSet()).add(nt).sort();at.setIn(["replies",rt],ot),at.setIn(["inReplyTos",nt],rt),tt&&deletePendingStatus(at,et,tt)}):_e},importStatuses$3=(_e,et)=>_e.withMutations(tt=>{et.forEach(nt=>importStatus$4(tt,nt))}),insertTombstone=(_e,et,tt)=>{const nt=`${tt}-tombstone`;return _e.withMutations(rt=>{importStatus$4(rt,{id:nt,in_reply_to_id:et}),importStatus$4(rt,{id:tt,in_reply_to_id:nt})})},getRootNode=(_e,et,tt=et)=>{const nt=_e.inReplyTos.get(et);return nt?nt===tt?nt:getRootNode(_e,nt,tt):et},connectNodes=(_e,et,tt)=>{const nt=getRootNode(_e,et),rt=getRootNode(_e,tt);return nt!==rt?insertTombstone(_e,tt,et):_e},importBranch=(_e,et,tt)=>_e.withMutations(nt=>{et.forEach((rt,at)=>{const it=tt&&at===0?tt:(et[at-1]||{}).id;rt.in_reply_to_id?(importStatus$4(nt,rt),tt&&connectNodes(nt,rt.id,tt)):it&&insertTombstone(nt,it,rt.id)})}),normalizeContext=(_e,et,tt,nt)=>_e.withMutations(rt=>{importBranch(rt,tt),importBranch(rt,nt,et),tt.length>0&&!rt.getIn(["inReplyTos",et])&&insertTombstone(rt,tt[tt.length-1].id,et)}),deleteStatus$4=(_e,et)=>_e.withMutations(tt=>{const nt=tt.inReplyTos.get(et);if(nt){const it=(tt.replies.get(nt)||OrderedSet()).delete(et);tt.setIn(["replies",nt],it)}(tt.replies.get(et)||OrderedSet()).forEach(at=>tt.deleteIn(["inReplyTos",at])),tt.deleteIn(["inReplyTos",et]),tt.deleteIn(["replies",et])}),deleteStatuses=(_e,et)=>_e.withMutations(tt=>{et.forEach(nt=>deleteStatus$4(tt,nt))}),filterContexts=(_e,et,tt)=>{const nt=tt.filter(rt=>rt.account.id===et.id).map(rt=>rt.id).toList().toArray();return deleteStatuses(_e,nt)},importPendingStatus$1=(_e,et,tt)=>{const nt=`末pending-${tt}`,{in_reply_to_id:rt}=et;return importStatus$4(_e,{id:nt,in_reply_to_id:rt})},deletePendingStatus=(_e,et,tt)=>{const nt=`末pending-${tt}`,{in_reply_to_id:rt}=et;return _e.withMutations(at=>{if(at.deleteIn(["inReplyTos",nt]),rt){const ot=(at.replies.get(rt)||OrderedSet()).delete(nt).sort();at.setIn(["replies",rt],ot)}})};function replies(_e=ReducerRecord$n(),et){switch(et.type){case ACCOUNT_BLOCK_SUCCESS:case ACCOUNT_MUTE_SUCCESS:return filterContexts(_e,et.relationship,et.statuses);case CONTEXT_FETCH_SUCCESS:return normalizeContext(_e,et.id,et.ancestors,et.descendants);case TIMELINE_DELETE:return deleteStatuses(_e,[et.id]);case STATUS_CREATE_REQUEST:return importPendingStatus$1(_e,et.params,et.idempotencyKey);case STATUS_CREATE_SUCCESS:return deletePendingStatus(_e,et.status,et.idempotencyKey);case STATUS_IMPORT:return importStatus$4(_e,et.status,et.idempotencyKey);case STATUSES_IMPORT:return importStatuses$3(_e,et.statuses);default:return _e}}const ConversationRecord=Record({id:"",unread:!1,accounts:List$1(),last_status:null,last_status_created_at:null}),ReducerRecord$m=Record({items:List$1(),isLoading:!1,hasMore:!0,mounted:0}),conversationToMap=_e=>ConversationRecord({id:_e.id,unread:_e.unread,accounts:List$1(_e.accounts.map(et=>et.id)),last_status:_e.last_status?_e.last_status.id:null,last_status_created_at:_e.last_status?_e.last_status.created_at:null}),updateConversation=(_e,et)=>_e.update("items",tt=>{const nt=tt.findIndex(at=>at.get("id")===et.id),rt=conversationToMap(et);return nt===-1?tt.unshift(rt):tt.set(nt,rt)}),expandNormalizedConversations=(_e,et,tt,nt)=>{let rt=List$1(et.map(conversationToMap));return _e.withMutations(at=>{rt.isEmpty()||at.update("items",it=>(it=it.map(ot=>{const st=rt.findIndex(ut=>ut.get("id")===ot.get("id"));if(st===-1)return ot;const ct=rt.get(st);return rt=rt.delete(st),ct}),it=it.concat(rt),it.sortBy(ot=>ot.get("last_status_created_at"),(ot,st)=>ot===null||st===null?-1:compareDate(ot,st)))),!tt&&!nt&&at.set("hasMore",!1),at.set("isLoading",!1)})};function conversations(_e=ReducerRecord$m(),et){switch(et.type){case CONVERSATIONS_FETCH_REQUEST:return _e.set("isLoading",!0);case CONVERSATIONS_FETCH_FAIL:return _e.set("isLoading",!1);case CONVERSATIONS_FETCH_SUCCESS:return expandNormalizedConversations(_e,et.conversations,et.next,et.isLoadingRecent);case CONVERSATIONS_UPDATE:return updateConversation(_e,et.conversation);case CONVERSATIONS_MOUNT:return _e.update("mounted",tt=>tt+1);case CONVERSATIONS_UNMOUNT:return _e.update("mounted",tt=>tt-1);case CONVERSATIONS_READ:return _e.update("items",tt=>tt.map(nt=>nt.get("id")===et.id?nt.set("unread",!1):nt));default:return _e}}const initialState$g=List$1(),autosuggestPopulate=_e=>{addCustomToPool(buildCustomEmojis(_e))},importEmojis=_e=>{const et=fromJS(_e).filter(tt=>{const nt=tt.get("shortcode","").toLowerCase();return!emojiData.emojis[nt]});return autosuggestPopulate(et),et};function custom_emojis(_e=initialState$g,et){return et.type===CUSTOM_EMOJIS_FETCH_SUCCESS?importEmojis(et.custom_emojis):_e}const BlocksRecord=Record({items:OrderedSet(),next:null}),ReducerRecord$l=Record({blocks:BlocksRecord()});function domainLists(_e=ReducerRecord$l(),et){switch(et.type){case DOMAIN_BLOCKS_FETCH_SUCCESS:return _e.setIn(["blocks","items"],OrderedSet(et.domains)).setIn(["blocks","next"],et.next);case DOMAIN_BLOCKS_EXPAND_SUCCESS:return _e.updateIn(["blocks","items"],tt=>tt.union(et.domains)).setIn(["blocks","next"],et.next);case DOMAIN_UNBLOCK_SUCCESS:return _e.updateIn(["blocks","items"],tt=>tt.delete(et.domain));default:return _e}}const ReducerRecord$k=Record({isOpen:!1});function dropdownMenu(_e=ReducerRecord$k(),et){switch(et.type){case DROPDOWN_MENU_OPEN:return _e.set("isOpen",!0);case DROPDOWN_MENU_CLOSE:return _e.set("isOpen",!1);default:return _e}}const importFilters=(_e,et)=>List$1(et.map(tt=>normalizeFilter(tt)));function filters(_e=List$1(),et){switch(et.type){case FILTERS_FETCH_SUCCESS:return importFilters(_e,et.filters);default:return _e}}const HASHTAG_FETCH_REQUEST="HASHTAG_FETCH_REQUEST",HASHTAG_FETCH_SUCCESS="HASHTAG_FETCH_SUCCESS",HASHTAG_FETCH_FAIL="HASHTAG_FETCH_FAIL",HASHTAG_FOLLOW_REQUEST="HASHTAG_FOLLOW_REQUEST",HASHTAG_FOLLOW_SUCCESS="HASHTAG_FOLLOW_SUCCESS",HASHTAG_FOLLOW_FAIL="HASHTAG_FOLLOW_FAIL",HASHTAG_UNFOLLOW_REQUEST="HASHTAG_UNFOLLOW_REQUEST",HASHTAG_UNFOLLOW_SUCCESS="HASHTAG_UNFOLLOW_SUCCESS",HASHTAG_UNFOLLOW_FAIL="HASHTAG_UNFOLLOW_FAIL",FOLLOWED_HASHTAGS_FETCH_REQUEST="FOLLOWED_HASHTAGS_FETCH_REQUEST",FOLLOWED_HASHTAGS_FETCH_SUCCESS="FOLLOWED_HASHTAGS_FETCH_SUCCESS",FOLLOWED_HASHTAGS_FETCH_FAIL="FOLLOWED_HASHTAGS_FETCH_FAIL",FOLLOWED_HASHTAGS_EXPAND_REQUEST="FOLLOWED_HASHTAGS_EXPAND_REQUEST",FOLLOWED_HASHTAGS_EXPAND_SUCCESS="FOLLOWED_HASHTAGS_EXPAND_SUCCESS",FOLLOWED_HASHTAGS_EXPAND_FAIL="FOLLOWED_HASHTAGS_EXPAND_FAIL",fetchHashtag=_e=>(et,tt)=>{et(fetchHashtagRequest()),api(tt).get(`/api/v1/tags/${_e}`).then(({data:nt})=>{et(fetchHashtagSuccess(_e,nt))}).catch(nt=>{et(fetchHashtagFail(nt))})},fetchHashtagRequest=()=>({type:HASHTAG_FETCH_REQUEST}),fetchHashtagSuccess=(_e,et)=>({type:HASHTAG_FETCH_SUCCESS,name:_e,tag:et}),fetchHashtagFail=_e=>({type:HASHTAG_FETCH_FAIL,error:_e}),followHashtag=_e=>(et,tt)=>{et(followHashtagRequest(_e)),api(tt).post(`/api/v1/tags/${_e}/follow`).then(({data:nt})=>{et(followHashtagSuccess(_e,nt))}).catch(nt=>{et(followHashtagFail(_e,nt))})},followHashtagRequest=_e=>({type:HASHTAG_FOLLOW_REQUEST,name:_e}),followHashtagSuccess=(_e,et)=>({type:HASHTAG_FOLLOW_SUCCESS,name:_e,tag:et}),followHashtagFail=(_e,et)=>({type:HASHTAG_FOLLOW_FAIL,name:_e,error:et}),unfollowHashtag=_e=>(et,tt)=>{et(unfollowHashtagRequest(_e)),api(tt).post(`/api/v1/tags/${_e}/unfollow`).then(({data:nt})=>{et(unfollowHashtagSuccess(_e,nt))}).catch(nt=>{et(unfollowHashtagFail(_e,nt))})},unfollowHashtagRequest=_e=>({type:HASHTAG_UNFOLLOW_REQUEST,name:_e}),unfollowHashtagSuccess=(_e,et)=>({type:HASHTAG_UNFOLLOW_SUCCESS,name:_e,tag:et}),unfollowHashtagFail=(_e,et)=>({type:HASHTAG_UNFOLLOW_FAIL,name:_e,error:et}),fetchFollowedHashtags=()=>(_e,et)=>{_e(fetchFollowedHashtagsRequest()),api(et).get("/api/v1/followed_tags").then(tt=>{const nt=getLinks(tt).refs.find(rt=>rt.rel==="next");_e(fetchFollowedHashtagsSuccess(tt.data,nt?nt.uri:null))}).catch(tt=>{_e(fetchFollowedHashtagsFail(tt))})},fetchFollowedHashtagsRequest=()=>({type:FOLLOWED_HASHTAGS_FETCH_REQUEST}),fetchFollowedHashtagsSuccess=(_e,et)=>({type:FOLLOWED_HASHTAGS_FETCH_SUCCESS,followed_tags:_e,next:et}),fetchFollowedHashtagsFail=_e=>({type:FOLLOWED_HASHTAGS_FETCH_FAIL,error:_e}),expandFollowedHashtags=()=>(_e,et)=>{const tt=et().followed_tags.next;tt!==null&&(_e(expandFollowedHashtagsRequest()),api(et).get(tt).then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");_e(expandFollowedHashtagsSuccess(nt.data,rt?rt.uri:null))}).catch(nt=>{_e(expandFollowedHashtagsFail(nt))}))},expandFollowedHashtagsRequest=()=>({type:FOLLOWED_HASHTAGS_EXPAND_REQUEST}),expandFollowedHashtagsSuccess=(_e,et)=>({type:FOLLOWED_HASHTAGS_EXPAND_SUCCESS,followed_tags:_e,next:et}),expandFollowedHashtagsFail=_e=>({type:FOLLOWED_HASHTAGS_EXPAND_FAIL,error:_e}),ReducerRecord$j=Record({items:List$1(),isLoading:!1,next:null});function followed_tags(_e=ReducerRecord$j(),et){switch(et.type){case FOLLOWED_HASHTAGS_FETCH_REQUEST:return _e.set("isLoading",!0);case FOLLOWED_HASHTAGS_FETCH_SUCCESS:return _e.withMutations(tt=>{tt.set("items",List$1(et.followed_tags.map(nt=>normalizeTag(nt)))),tt.set("isLoading",!1),tt.set("next",et.next)});case FOLLOWED_HASHTAGS_FETCH_FAIL:return _e.set("isLoading",!1);case FOLLOWED_HASHTAGS_EXPAND_REQUEST:return _e.set("isLoading",!0);case FOLLOWED_HASHTAGS_EXPAND_SUCCESS:return _e.withMutations(tt=>{tt.update("items",nt=>nt.concat(et.followed_tags.map(rt=>normalizeTag(rt)))),tt.set("isLoading",!1),tt.set("next",et.next)});case FOLLOWED_HASHTAGS_EXPAND_FAIL:return _e.set("isLoading",!1);default:return _e}}const ListRecord$1=Record({next:null,isLoading:!1,items:OrderedSet()}),ReducerRecord$i=Record({admin:Map$3({}),moderator:Map$3({}),user:Map$3({})}),normalizeList$2=(_e,et,tt,nt)=>_e.setIn(et,ListRecord$1({next:nt,items:OrderedSet(tt.map(rt=>rt.account.id)),isLoading:!1})),appendToList$2=(_e,et,tt,nt)=>_e.updateIn(et,rt=>rt.set("next",nt).set("isLoading",!1).update("items",at=>at.concat(tt.map(it=>it.account.id)))),updateLists=(_e,et,tt)=>{const nt=(rt,at,it)=>at===it.role?rt.updateIn([at,et],ot=>ot.update("items",st=>st.add(it.account.id))):rt.updateIn([at,et],ot=>ot.update("items",st=>st.delete(it.account.id)));return tt.forEach(rt=>{_e=nt(_e,"admin",rt),_e=nt(_e,"moderator",rt),_e=nt(_e,"user",rt)}),_e},removeFromList$2=(_e,et,tt)=>_e.updateIn(et,nt=>nt.update("items",rt=>rt.delete(tt)));function groupMemberships(_e=ReducerRecord$i(),et){switch(et.type){case GROUP_DELETE_SUCCESS:return _e.deleteIn(["admin",et.id]).deleteIn(["moderator",et.id]).deleteIn(["user",et.id]);case GROUP_MEMBERSHIPS_FETCH_REQUEST:case GROUP_MEMBERSHIPS_EXPAND_REQUEST:return _e.updateIn([et.role,et.id],tt=>(tt||ListRecord$1()).set("isLoading",!0));case GROUP_MEMBERSHIPS_FETCH_FAIL:case GROUP_MEMBERSHIPS_EXPAND_FAIL:return _e.updateIn([et.role,et.id],tt=>(tt||ListRecord$1()).set("isLoading",!1));case GROUP_MEMBERSHIPS_FETCH_SUCCESS:return normalizeList$2(_e,[et.role,et.id],et.memberships,et.next);case GROUP_MEMBERSHIPS_EXPAND_SUCCESS:return appendToList$2(_e,[et.role,et.id],et.memberships,et.next);case GROUP_PROMOTE_SUCCESS:case GROUP_DEMOTE_SUCCESS:return updateLists(_e,et.groupId,et.memberships);case GROUP_KICK_SUCCESS:case GROUP_BLOCK_SUCCESS:return _e=removeFromList$2(_e,["admin",et.groupId],et.accountId),_e=removeFromList$2(_e,["moderator",et.groupId],et.accountId),_e=removeFromList$2(_e,["user",et.groupId],et.accountId),_e;default:return _e}}const normalizeRelationships$1=(_e,et)=>(et.forEach(tt=>{_e=_e.set(tt.id,normalizeGroupRelationship(tt))}),_e);function groupRelationships(_e=Map$3(),et){switch(et.type){case GROUP_CREATE_SUCCESS:case GROUP_UPDATE_SUCCESS:return _e.set(et.group.id,normalizeGroupRelationship({id:et.group.id,member:!0,requested:!1,role:"admin"}));case GROUP_DELETE_SUCCESS:return _e.delete(et.id);case GROUP_RELATIONSHIPS_FETCH_SUCCESS:return normalizeRelationships$1(_e,et.relationships);default:return _e}}const ReducerRecord$h=Record({isLoading:!0,items:Map$3({})}),normalizeGroups=(_e,et)=>_e.update("items",tt=>et.reduce((nt,rt)=>nt.set(rt.id,normalizeGroup(rt)),tt)).set("isLoading",!1);function groups(_e=ReducerRecord$h(),et){switch(et.type){case GROUPS_IMPORT:return normalizeGroups(_e,et.groups);case GROUP_FETCH_REQUEST:return _e.set("isLoading",!0);case GROUP_DELETE_SUCCESS:case GROUP_FETCH_FAIL:return _e.setIn(["items",et.id],!1).set("isLoading",!1);default:return _e}}const HISTORY_FETCH_REQUEST="HISTORY_FETCH_REQUEST",HISTORY_FETCH_SUCCESS="HISTORY_FETCH_SUCCESS",HISTORY_FETCH_FAIL="HISTORY_FETCH_FAIL",fetchHistory=_e=>(et,tt)=>{tt().history.getIn([_e,"loading"])||(et(fetchHistoryRequest(_e)),api(tt).get(`/api/v1/statuses/${_e}/history`).then(({data:rt})=>{et(importFetchedAccounts(rt.map(at=>at.account))),et(fetchHistorySuccess(_e,rt))}).catch(rt=>et(fetchHistoryFail(rt))))},fetchHistoryRequest=_e=>({type:HISTORY_FETCH_REQUEST,statusId:_e}),fetchHistorySuccess=(_e,et)=>({type:HISTORY_FETCH_SUCCESS,statusId:_e,history:et}),fetchHistoryFail=_e=>({type:HISTORY_FETCH_FAIL,error:_e}),HistoryRecord=Record({loading:!1,items:List$1()}),initialState$f=Map$3();function history(_e=initialState$f,et){switch(et.type){case HISTORY_FETCH_REQUEST:return _e.update(et.statusId,HistoryRecord(),tt=>tt.withMutations(nt=>{nt.set("loading",!0),nt.set("items",List$1())}));case HISTORY_FETCH_SUCCESS:return _e.update(et.statusId,HistoryRecord(),tt=>tt.withMutations(nt=>{nt.set("loading",!1),nt.set("items",List$1(et.history.map((rt,at)=>({...rt,account:rt.account.id,original:at===0})).reverse().map(normalizeStatusEdit)))}));case HISTORY_FETCH_FAIL:return _e.update(et.statusId,HistoryRecord(),tt=>tt.set("loading",!1));default:return _e}}const initialState$e=instanceSchema.parse({}),importInstance=(_e,et)=>normalizeInstance(et),preloadImport$1=(_e,et,tt)=>{const nt=et.data[tt];return nt?importInstance(_e,nt):_e},getConfigValue=(_e,et)=>{const tt=_e.find(nt=>nt.getIn(["tuple",0])===et);return tt?tt.getIn(["tuple",1]):void 0},importConfigs=(_e,et)=>{const tt=ConfigDB.find(et,":pleroma",":instance"),nt=ConfigDB.toSimplePolicy(et);return!tt&&!nt?_e:produce(_e,rt=>{if(tt){const at=tt.get("value",List$1()),it=getConfigValue(at,":registrations_open"),ot=getConfigValue(at,":account_approval_required");rt.registrations=it??rt.registrations,rt.approval_required=ot??rt.approval_required}nt&&(rt.pleroma.metadata.federation.mrf_simple=nt)})},handleAuthFetch=_e=>({..._e,title:_e.title||"██████",description:_e.description||"████████████"}),getHost=_e=>{try{return new URL(_e.uri).host}catch{try{return new URL(`https://${_e.uri}`).host}catch{return null}}},persistInstance=_e=>{const et=getHost(_e);et&&KVStore.setItem(`instance:${et}`,_e).catch(console.error)},handleInstanceFetchFail=(_e,et)=>{var tt;return((tt=et.response)==null?void 0:tt.status)===401?handleAuthFetch(_e):_e};function instance(_e=initialState$e,et){switch(et.type){case PLEROMA_PRELOAD_IMPORT:return preloadImport$1(_e,et,"/api/v1/instance");case rememberInstance.fulfilled.type:return importInstance(_e,et.payload);case fetchInstance.fulfilled.type:return persistInstance(et.payload),importInstance(_e,et.payload);case fetchInstance.rejected.type:return handleInstanceFetchFail(_e,et.error);case ADMIN_CONFIG_UPDATE_REQUEST:case ADMIN_CONFIG_UPDATE_SUCCESS:return importConfigs(_e,et.configs);default:return _e}}const LIST_FETCH_REQUEST="LIST_FETCH_REQUEST",LIST_FETCH_SUCCESS="LIST_FETCH_SUCCESS",LIST_FETCH_FAIL="LIST_FETCH_FAIL",LISTS_FETCH_REQUEST="LISTS_FETCH_REQUEST",LISTS_FETCH_SUCCESS="LISTS_FETCH_SUCCESS",LISTS_FETCH_FAIL="LISTS_FETCH_FAIL",LIST_EDITOR_TITLE_CHANGE="LIST_EDITOR_TITLE_CHANGE",LIST_EDITOR_RESET="LIST_EDITOR_RESET",LIST_EDITOR_SETUP="LIST_EDITOR_SETUP",LIST_CREATE_REQUEST="LIST_CREATE_REQUEST",LIST_CREATE_SUCCESS="LIST_CREATE_SUCCESS",LIST_CREATE_FAIL="LIST_CREATE_FAIL",LIST_UPDATE_REQUEST="LIST_UPDATE_REQUEST",LIST_UPDATE_SUCCESS="LIST_UPDATE_SUCCESS",LIST_UPDATE_FAIL="LIST_UPDATE_FAIL",LIST_DELETE_REQUEST="LIST_DELETE_REQUEST",LIST_DELETE_SUCCESS="LIST_DELETE_SUCCESS",LIST_DELETE_FAIL="LIST_DELETE_FAIL",LIST_ACCOUNTS_FETCH_REQUEST="LIST_ACCOUNTS_FETCH_REQUEST",LIST_ACCOUNTS_FETCH_SUCCESS="LIST_ACCOUNTS_FETCH_SUCCESS",LIST_ACCOUNTS_FETCH_FAIL="LIST_ACCOUNTS_FETCH_FAIL",LIST_EDITOR_SUGGESTIONS_CHANGE="LIST_EDITOR_SUGGESTIONS_CHANGE",LIST_EDITOR_SUGGESTIONS_READY="LIST_EDITOR_SUGGESTIONS_READY",LIST_EDITOR_SUGGESTIONS_CLEAR="LIST_EDITOR_SUGGESTIONS_CLEAR",LIST_EDITOR_ADD_REQUEST="LIST_EDITOR_ADD_REQUEST",LIST_EDITOR_ADD_SUCCESS="LIST_EDITOR_ADD_SUCCESS",LIST_EDITOR_ADD_FAIL="LIST_EDITOR_ADD_FAIL",LIST_EDITOR_REMOVE_REQUEST="LIST_EDITOR_REMOVE_REQUEST",LIST_EDITOR_REMOVE_SUCCESS="LIST_EDITOR_REMOVE_SUCCESS",LIST_EDITOR_REMOVE_FAIL="LIST_EDITOR_REMOVE_FAIL",LIST_ADDER_RESET="LIST_ADDER_RESET",LIST_ADDER_SETUP="LIST_ADDER_SETUP",LIST_ADDER_LISTS_FETCH_REQUEST="LIST_ADDER_LISTS_FETCH_REQUEST",LIST_ADDER_LISTS_FETCH_SUCCESS="LIST_ADDER_LISTS_FETCH_SUCCESS",LIST_ADDER_LISTS_FETCH_FAIL="LIST_ADDER_LISTS_FETCH_FAIL",fetchList=_e=>(et,tt)=>{isLoggedIn(tt)&&(tt().lists.get(String(_e))||(et(fetchListRequest(_e)),api(tt).get(`/api/v1/lists/${_e}`).then(({data:nt})=>et(fetchListSuccess(nt))).catch(nt=>et(fetchListFail(_e,nt)))))},fetchListRequest=_e=>({type:LIST_FETCH_REQUEST,id:_e}),fetchListSuccess=_e=>({type:LIST_FETCH_SUCCESS,list:_e}),fetchListFail=(_e,et)=>({type:LIST_FETCH_FAIL,id:_e,error:et}),fetchLists=()=>(_e,et)=>{isLoggedIn(et)&&(_e(fetchListsRequest()),api(et).get("/api/v1/lists").then(({data:tt})=>_e(fetchListsSuccess(tt))).catch(tt=>_e(fetchListsFail(tt))))},fetchListsRequest=()=>({type:LISTS_FETCH_REQUEST}),fetchListsSuccess=_e=>({type:LISTS_FETCH_SUCCESS,lists:_e}),fetchListsFail=_e=>({type:LISTS_FETCH_FAIL,error:_e}),submitListEditor=_e=>(et,tt)=>{const nt=tt().listEditor.listId,rt=tt().listEditor.title;et(nt===null?createList(rt,_e):updateList(nt,rt,_e))},setupListEditor=_e=>(et,tt)=>{et({type:LIST_EDITOR_SETUP,list:tt().lists.get(String(_e))}),et(fetchListAccounts(_e))},changeListEditorTitle=_e=>({type:LIST_EDITOR_TITLE_CHANGE,value:_e}),createList=(_e,et)=>(tt,nt)=>{isLoggedIn(nt)&&(tt(createListRequest()),api(nt).post("/api/v1/lists",{title:_e}).then(({data:rt})=>{tt(createListSuccess(rt)),et&&tt(resetListEditor())}).catch(rt=>tt(createListFail(rt))))},createListRequest=()=>({type:LIST_CREATE_REQUEST}),createListSuccess=_e=>({type:LIST_CREATE_SUCCESS,list:_e}),createListFail=_e=>({type:LIST_CREATE_FAIL,error:_e}),updateList=(_e,et,tt)=>(nt,rt)=>{isLoggedIn(rt)&&(nt(updateListRequest(_e)),api(rt).put(`/api/v1/lists/${_e}`,{title:et}).then(({data:at})=>{nt(updateListSuccess(at)),tt&&nt(resetListEditor())}).catch(at=>nt(updateListFail(_e,at))))},updateListRequest=_e=>({type:LIST_UPDATE_REQUEST,id:_e}),updateListSuccess=_e=>({type:LIST_UPDATE_SUCCESS,list:_e}),updateListFail=(_e,et)=>({type:LIST_UPDATE_FAIL,id:_e,error:et}),resetListEditor=()=>({type:LIST_EDITOR_RESET}),deleteList=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(deleteListRequest(_e)),api(tt).delete(`/api/v1/lists/${_e}`).then(()=>et(deleteListSuccess(_e))).catch(nt=>et(deleteListFail(_e,nt))))},deleteListRequest=_e=>({type:LIST_DELETE_REQUEST,id:_e}),deleteListSuccess=_e=>({type:LIST_DELETE_SUCCESS,id:_e}),deleteListFail=(_e,et)=>({type:LIST_DELETE_FAIL,id:_e,error:et}),fetchListAccounts=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(fetchListAccountsRequest(_e)),api(tt).get(`/api/v1/lists/${_e}/accounts`,{params:{limit:0}}).then(({data:nt})=>{et(importFetchedAccounts(nt)),et(fetchListAccountsSuccess(_e,nt,null))}).catch(nt=>et(fetchListAccountsFail(_e,nt))))},fetchListAccountsRequest=_e=>({type:LIST_ACCOUNTS_FETCH_REQUEST,id:_e}),fetchListAccountsSuccess=(_e,et,tt)=>({type:LIST_ACCOUNTS_FETCH_SUCCESS,id:_e,accounts:et,next:tt}),fetchListAccountsFail=(_e,et)=>({type:LIST_ACCOUNTS_FETCH_FAIL,id:_e,error:et}),fetchListSuggestions=_e=>(et,tt)=>{if(!isLoggedIn(tt))return;const nt={q:_e,resolve:!1,limit:4,following:!0};api(tt).get("/api/v1/accounts/search",{params:nt}).then(({data:rt})=>{et(importFetchedAccounts(rt)),et(fetchListSuggestionsReady(_e,rt))}).catch(rt=>toast.showAlertForError(rt))},fetchListSuggestionsReady=(_e,et)=>({type:LIST_EDITOR_SUGGESTIONS_READY,query:_e,accounts:et}),clearListSuggestions=()=>({type:LIST_EDITOR_SUGGESTIONS_CLEAR}),changeListSuggestions=_e=>({type:LIST_EDITOR_SUGGESTIONS_CHANGE,value:_e}),addToListEditor=_e=>(et,tt)=>{et(addToList(tt().listEditor.listId,_e))},addToList=(_e,et)=>(tt,nt)=>{isLoggedIn(nt)&&(tt(addToListRequest(_e,et)),api(nt).post(`/api/v1/lists/${_e}/accounts`,{account_ids:[et]}).then(()=>tt(addToListSuccess(_e,et))).catch(rt=>tt(addToListFail(_e,et,rt))))},addToListRequest=(_e,et)=>({type:LIST_EDITOR_ADD_REQUEST,listId:_e,accountId:et}),addToListSuccess=(_e,et)=>({type:LIST_EDITOR_ADD_SUCCESS,listId:_e,accountId:et}),addToListFail=(_e,et,tt)=>({type:LIST_EDITOR_ADD_FAIL,listId:_e,accountId:et,error:tt}),removeFromListEditor=_e=>(et,tt)=>{et(removeFromList$1(tt().listEditor.listId,_e))},removeFromList$1=(_e,et)=>(tt,nt)=>{isLoggedIn(nt)&&(tt(removeFromListRequest(_e,et)),api(nt).delete(`/api/v1/lists/${_e}/accounts`,{params:{account_ids:[et]}}).then(()=>tt(removeFromListSuccess(_e,et))).catch(rt=>tt(removeFromListFail(_e,et,rt))))},removeFromListRequest=(_e,et)=>({type:LIST_EDITOR_REMOVE_REQUEST,listId:_e,accountId:et}),removeFromListSuccess=(_e,et)=>({type:LIST_EDITOR_REMOVE_SUCCESS,listId:_e,accountId:et}),removeFromListFail=(_e,et,tt)=>({type:LIST_EDITOR_REMOVE_FAIL,listId:_e,accountId:et,error:tt}),resetListAdder=()=>({type:LIST_ADDER_RESET}),setupListAdder=_e=>(et,tt)=>{et({type:LIST_ADDER_SETUP,account:selectAccount(tt(),_e)}),et(fetchLists()),et(fetchAccountLists(_e))},fetchAccountLists=_e=>(et,tt)=>{isLoggedIn(tt)&&(et(fetchAccountListsRequest(_e)),api(tt).get(`/api/v1/accounts/${_e}/lists`).then(({data:nt})=>et(fetchAccountListsSuccess(_e,nt))).catch(nt=>et(fetchAccountListsFail(_e,nt))))},fetchAccountListsRequest=_e=>({type:LIST_ADDER_LISTS_FETCH_REQUEST,id:_e}),fetchAccountListsSuccess=(_e,et)=>({type:LIST_ADDER_LISTS_FETCH_SUCCESS,id:_e,lists:et}),fetchAccountListsFail=(_e,et)=>({type:LIST_ADDER_LISTS_FETCH_FAIL,id:_e,err:et}),addToListAdder=_e=>(et,tt)=>{et(addToList(_e,tt().listAdder.accountId))},removeFromListAdder=_e=>(et,tt)=>{et(removeFromList$1(_e,tt().listAdder.accountId))},ListsRecord=Record({items:List$1(),loaded:!1,isLoading:!1}),ReducerRecord$g=Record({accountId:null,lists:ListsRecord()});function listAdderReducer(_e=ReducerRecord$g(),et){switch(et.type){case LIST_ADDER_RESET:return ReducerRecord$g();case LIST_ADDER_SETUP:return _e.withMutations(tt=>{tt.set("accountId",et.account.id)});case LIST_ADDER_LISTS_FETCH_REQUEST:return _e.setIn(["lists","isLoading"],!0);case LIST_ADDER_LISTS_FETCH_FAIL:return _e.setIn(["lists","isLoading"],!1);case LIST_ADDER_LISTS_FETCH_SUCCESS:return _e.update("lists",tt=>tt.withMutations(nt=>{nt.set("isLoading",!1),nt.set("loaded",!0),nt.set("items",List$1(et.lists.map(rt=>rt.id)))}));case LIST_EDITOR_ADD_SUCCESS:return _e.updateIn(["lists","items"],tt=>tt.unshift(et.listId));case LIST_EDITOR_REMOVE_SUCCESS:return _e.updateIn(["lists","items"],tt=>tt.filterNot(nt=>nt===et.listId));default:return _e}}const AccountsRecord=Record({items:List$1(),loaded:!1,isLoading:!1}),SuggestionsRecord=Record({value:"",items:List$1()}),ReducerRecord$f=Record({listId:null,isSubmitting:!1,isChanged:!1,title:"",accounts:AccountsRecord(),suggestions:SuggestionsRecord()});function listEditorReducer(_e=ReducerRecord$f(),et){switch(et.type){case LIST_EDITOR_RESET:return ReducerRecord$f();case LIST_EDITOR_SETUP:return _e.withMutations(tt=>{tt.set("listId",et.list.get("id")),tt.set("title",et.list.get("title")),tt.set("isSubmitting",!1)});case LIST_EDITOR_TITLE_CHANGE:return _e.withMutations(tt=>{tt.set("title",et.value),tt.set("isChanged",!0)});case LIST_CREATE_REQUEST:case LIST_UPDATE_REQUEST:return _e.withMutations(tt=>{tt.set("isSubmitting",!0),tt.set("isChanged",!1)});case LIST_CREATE_FAIL:case LIST_UPDATE_FAIL:return _e.set("isSubmitting",!1);case LIST_CREATE_SUCCESS:case LIST_UPDATE_SUCCESS:return _e.withMutations(tt=>{tt.set("isSubmitting",!1),tt.set("listId",et.list.id)});case LIST_ACCOUNTS_FETCH_REQUEST:return _e.setIn(["accounts","isLoading"],!0);case LIST_ACCOUNTS_FETCH_FAIL:return _e.setIn(["accounts","isLoading"],!1);case LIST_ACCOUNTS_FETCH_SUCCESS:return _e.update("accounts",tt=>tt.withMutations(nt=>{nt.set("isLoading",!1),nt.set("loaded",!0),nt.set("items",List$1(et.accounts.map(rt=>rt.id)))}));case LIST_EDITOR_SUGGESTIONS_CHANGE:return _e.setIn(["suggestions","value"],et.value);case LIST_EDITOR_SUGGESTIONS_READY:return _e.setIn(["suggestions","items"],List$1(et.accounts.map(tt=>tt.id)));case LIST_EDITOR_SUGGESTIONS_CLEAR:return _e.update("suggestions",tt=>tt.withMutations(nt=>{nt.set("items",List$1()),nt.set("value","")}));case LIST_EDITOR_ADD_SUCCESS:return _e.updateIn(["accounts","items"],tt=>tt.unshift(et.accountId));case LIST_EDITOR_REMOVE_SUCCESS:return _e.updateIn(["accounts","items"],tt=>tt.filterNot(nt=>nt===et.accountId));default:return _e}}const initialState$d=Map$3(),importList=(_e,et)=>_e.set(et.id,normalizeList$3(et)),importLists=(_e,et)=>(et.forEach(tt=>{_e=importList(_e,tt)}),_e);function lists(_e=initialState$d,et){switch(et.type){case LIST_FETCH_SUCCESS:case LIST_CREATE_SUCCESS:case LIST_UPDATE_SUCCESS:return importList(_e,et.list);case LISTS_FETCH_SUCCESS:return importLists(_e,et.lists);case LIST_DELETE_SUCCESS:case LIST_FETCH_FAIL:return _e.set(et.id,!1);default:return _e}}const initialState$c=Map$3(),normalizeLocations=(_e,et)=>et.reduce((tt,nt)=>tt.set(nt.origin_id,normalizeLocation(nt)),_e);function accounts(_e=initialState$c,et){switch(et.type){case LOCATION_SEARCH_SUCCESS:return normalizeLocations(_e,et.locations);default:return _e}}const initialState$b=null,handleForbidden=(_e,et)=>{var tt;return[401,403].includes((tt=et.response)==null?void 0:tt.status)?!1:_e};function me(_e=initialState$b,et){switch(et.type){case ME_FETCH_SUCCESS:case ME_PATCH_SUCCESS:return et.me.id;case VERIFY_CREDENTIALS_SUCCESS:case AUTH_ACCOUNT_REMEMBER_SUCCESS:return _e||et.account.id;case ME_FETCH_SKIP:case AUTH_LOGGED_OUT:return!1;case ME_FETCH_FAIL:return handleForbidden(_e,et.error);default:return _e}}const SW_UPDATING="SW_UPDATING",ReducerRecord$e=Record({instance_fetch_failed:!1,swUpdating:!1});function meta(_e=ReducerRecord$e(),et){var tt;switch(et.type){case fetchInstance.rejected.type:return((tt=et.payload.response)==null?void 0:tt.status)===404?_e.set("instance_fetch_failed",!0):_e;case SW_UPDATING:return _e.set("swUpdating",et.isUpdating);default:return _e}}const ModalRecord=Record({modalType:"",modalProps:null});function modal(_e=List$1(),et){switch(et.type){case MODAL_OPEN:return _e.push(ModalRecord({modalType:et.modalType,modalProps:et.modalProps}));case MODAL_CLOSE:return _e.size===0?_e:et.modalType===void 0?_e.pop():_e.some(({modalType:tt})=>et.modalType===tt)?_e.slice(0,_e.findLastIndex(({modalType:tt})=>et.modalType===tt)):_e;default:return _e}}const NewMuteRecord=Record({isSubmitting:!1,accountId:null,notifications:!0,duration:0}),ReducerRecord$d=Record({new:NewMuteRecord()});function mutes(_e=ReducerRecord$d(),et){switch(et.type){case MUTES_INIT_MODAL:return _e.withMutations(tt=>{tt.setIn(["new","isSubmitting"],!1),tt.setIn(["new","accountId"],et.account.id),tt.setIn(["new","notifications"],!0)});case MUTES_TOGGLE_HIDE_NOTIFICATIONS:return _e.updateIn(["new","notifications"],tt=>!tt);case MUTES_CHANGE_DURATION:return _e.setIn(["new","duration"],et.duration);default:return _e}}const QueuedNotificationRecord=Record({notification:{},intlMessages:{},intlLocale:""}),ReducerRecord$c=Record({items:OrderedMap(),hasMore:!0,top:!1,unread:0,isLoading:!1,queuedNotifications:OrderedMap(),totalQueuedNotificationsCount:0,lastRead:-1}),parseId=_e=>parseInt(_e,10),comparator=(_e,et)=>{const tt=nt=>parseId(nt.id);return tt(_e)tt(et)?-1:0},minifyNotification=_e=>_e.mergeWith((et,tt)=>tt||et,{account:_e.getIn(["account","id"]),target:_e.getIn(["target","id"]),status:_e.getIn(["status","id"])}),fixNotification=_e=>minifyNotification(normalizeNotification(_e)),isValid=_e=>{try{return!(!validType(_e.type)||!_e.account.get("id")||["mention","reblog","favourite","poll","status"].includes(_e.type)&&!_e.getIn(["status","id"]))}catch{return!1}},countFuture=(_e,et)=>_e.reduce((tt,nt)=>parseId(nt.get("id"))>parseId(et)?tt+1:tt,0),importNotification=(_e,et)=>{const tt=_e.top;return tt||(_e=_e.update("unread",nt=>nt+1)),_e.update("items",nt=>(tt&&nt.size>40&&(nt=nt.take(20)),nt.set(et.id,fixNotification(et)).sort(comparator)))},processRawNotifications=_e=>OrderedMap(_e.map(normalizeNotification).filter(isValid).map(et=>[et.id,fixNotification(et)])),expandNormalizedNotifications=(_e,et,tt)=>{const nt=processRawNotifications(et);return _e.withMutations(rt=>{rt.update("items",at=>at.merge(nt).sort(comparator)),tt||rt.set("hasMore",!1),rt.set("isLoading",!1)})},filterNotifications=(_e,et)=>_e.update("items",tt=>tt.filterNot(nt=>nt!==null&&nt.account===et.id)),filterNotificationIds=(_e,et,tt)=>{const nt=rt=>rt.filterNot(at=>at!==null&&et.includes(at.account)&&(tt===void 0||tt===at.type));return _e.update("items",nt)},updateTop$1=(_e,et)=>(et&&(_e=_e.set("unread",0)),_e.set("top",et)),deleteByStatus=(_e,et)=>_e.update("items",tt=>tt.filterNot(nt=>nt!==null&&nt.status===et)),updateNotificationsQueue=(_e,et,tt,nt)=>{const rt=_e.queuedNotifications,at=_e.items,it=_e.totalQueuedNotificationsCount;if(rt.has(et.id)||at.has(et.id))return _e;const st=rt;return _e.withMutations(ct=>{it<=MAX_QUEUED_NOTIFICATIONS&&ct.set("queuedNotifications",st.set(et.id,QueuedNotificationRecord({notification:et,intlMessages:tt,intlLocale:nt}))),ct.set("totalQueuedNotificationsCount",it+1)})},importMarker=(_e,et)=>{const tt=et.getIn(["notifications","last_read_id"],-1);return tt?_e.withMutations(nt=>{const rt=nt.items,at=countFuture(rt,tt);nt.set("unread",at),nt.set("lastRead",tt)}):_e};function notifications(_e=ReducerRecord$c(),et){switch(et.type){case NOTIFICATIONS_EXPAND_REQUEST:return _e.set("isLoading",!0);case NOTIFICATIONS_EXPAND_FAIL:return _e.set("isLoading",!1);case NOTIFICATIONS_FILTER_SET:return _e.set("items",OrderedMap()).set("hasMore",!0);case NOTIFICATIONS_SCROLL_TOP:return updateTop$1(_e,et.top);case NOTIFICATIONS_UPDATE:return importNotification(_e,et.notification);case NOTIFICATIONS_UPDATE_QUEUE:return updateNotificationsQueue(_e,et.notification,et.intlMessages,et.intlLocale);case NOTIFICATIONS_DEQUEUE:return _e.withMutations(tt=>{tt.delete("queuedNotifications"),tt.set("totalQueuedNotificationsCount",0)});case NOTIFICATIONS_EXPAND_SUCCESS:return expandNormalizedNotifications(_e,et.notifications,et.next);case ACCOUNT_BLOCK_SUCCESS:return filterNotifications(_e,et.relationship);case ACCOUNT_MUTE_SUCCESS:return et.relationship.muting_notifications?filterNotifications(_e,et.relationship):_e;case FOLLOW_REQUEST_AUTHORIZE_SUCCESS:case FOLLOW_REQUEST_REJECT_SUCCESS:return filterNotificationIds(_e,[et.id],"follow_request");case NOTIFICATIONS_CLEAR:return _e.set("items",OrderedMap()).set("hasMore",!1);case NOTIFICATIONS_MARK_READ_REQUEST:return _e.set("lastRead",et.lastRead);case MARKER_FETCH_SUCCESS:case MARKER_SAVE_REQUEST:case MARKER_SAVE_SUCCESS:return importMarker(_e,Map$3(fromJS(et.marker)));case TIMELINE_DELETE:return deleteByStatus(_e,et.id);default:return _e}}const initialState$a={needsOnboarding:!1};function onboarding(_e=initialState$a,et){switch(et.type){case ONBOARDING_START:return{..._e,needsOnboarding:!0};case ONBOARDING_END:return{..._e,needsOnboarding:!1};default:return _e}}const PATRON_INSTANCE_FETCH_REQUEST="PATRON_INSTANCE_FETCH_REQUEST",PATRON_INSTANCE_FETCH_SUCCESS="PATRON_INSTANCE_FETCH_SUCCESS",PATRON_INSTANCE_FETCH_FAIL="PATRON_INSTANCE_FETCH_FAIL",PATRON_ACCOUNT_FETCH_REQUEST="PATRON_ACCOUNT_FETCH_REQUEST",PATRON_ACCOUNT_FETCH_SUCCESS="PATRON_ACCOUNT_FETCH_SUCCESS",PATRON_ACCOUNT_FETCH_FAIL="PATRON_ACCOUNT_FETCH_FAIL",fetchPatronInstance=()=>(_e,et)=>(_e({type:PATRON_INSTANCE_FETCH_REQUEST}),api(et).get("/api/patron/v1/instance").then(tt=>{_e(importFetchedInstance(tt.data))}).catch(tt=>{_e(fetchInstanceFail(tt))})),fetchPatronAccount=_e=>(et,tt)=>{_e=encodeURIComponent(_e),et({type:PATRON_ACCOUNT_FETCH_REQUEST}),api(tt).get(`/api/patron/v1/accounts/${_e}`).then(nt=>{et(importFetchedAccount(nt.data))}).catch(nt=>{et(fetchAccountFail(nt))})},importFetchedInstance=_e=>({type:PATRON_INSTANCE_FETCH_SUCCESS,instance:_e}),fetchInstanceFail=_e=>({type:PATRON_INSTANCE_FETCH_FAIL,error:_e,skipAlert:!0}),importFetchedAccount=_e=>({type:PATRON_ACCOUNT_FETCH_SUCCESS,account:_e}),fetchAccountFail=_e=>({type:PATRON_ACCOUNT_FETCH_FAIL,error:_e,skipAlert:!0}),PatronAccountRecord=Record({is_patron:!1,url:""}),PatronInstanceRecord=Record({funding:Map$3(),goals:List$1(),url:""}),ReducerRecord$b=Record({instance:PatronInstanceRecord(),accounts:Map$3()}),normalizePatronAccount=(_e,et)=>{const tt=PatronAccountRecord(et);return _e.setIn(["accounts",tt.url],tt)};function patron(_e=ReducerRecord$b(),et){switch(et.type){case PATRON_INSTANCE_FETCH_SUCCESS:return _e.set("instance",PatronInstanceRecord(Map$3(fromJS(et.instance))));case PATRON_ACCOUNT_FETCH_SUCCESS:return normalizePatronAccount(_e,et.account);default:return _e}}const PendingStatusRecord=Record({content_type:"",in_reply_to_id:null,media_ids:null,quote_id:null,poll:null,sensitive:!1,spoiler_text:"",status:"",to:null,visibility:"public"}),initialState$9=Map$3(),importStatus$3=(_e,et,tt)=>_e.set(tt,PendingStatusRecord(et)),deleteStatus$3=(_e,et)=>_e.delete(et);function pending_statuses(_e=initialState$9,et){switch(et.type){case STATUS_CREATE_REQUEST:return et.editing?_e:importStatus$3(_e,Map$3(fromJS(et.params)),et.idempotencyKey);case STATUS_CREATE_SUCCESS:return deleteStatus$3(_e,et.idempotencyKey);default:return _e}}const normalizePoll=_e=>normalizeStatus({poll:_e}).poll,importPolls=(_e,et)=>_e.withMutations(tt=>et.forEach(nt=>{const rt=normalizePoll(nt);rt&&typeof rt=="object"&&tt.set(rt.id,rt)})),initialState$8=Map$3();function polls(_e=initialState$8,et){switch(et.type){case POLLS_IMPORT:return importPolls(_e,et.polls);default:return _e}}const ReducerRecord$a=Record({ref:null,accountId:"",hovered:!1});function profileHoverCard(_e=ReducerRecord$a(),et){switch(et.type){case PROFILE_HOVER_CARD_OPEN:return _e.withMutations(tt=>{tt.set("ref",et.ref),tt.set("accountId",et.accountId)});case PROFILE_HOVER_CARD_UPDATE:return _e.set("hovered",!0);case PROFILE_HOVER_CARD_CLOSE:return _e.get("hovered")===!0&&!et.force?_e:ReducerRecord$a();default:return _e}}const SubscriptionRecord=Record({id:"",endpoint:""}),ReducerRecord$9=Record({subscription:null,alerts:Map$3({follow:!0,follow_request:!0,favourite:!0,reblog:!0,mention:!0,poll:!0}),isSubscribed:!1,browserSupport:!1});function push_subscriptions(_e=ReducerRecord$9(),et){switch(et.type){case SET_SUBSCRIPTION:return _e.set("subscription",SubscriptionRecord({id:et.subscription.id,endpoint:et.subscription.endpoint})).set("alerts",Map$3(et.subscription.alerts)).set("isSubscribed",!0);case SET_BROWSER_SUPPORT:return _e.set("browserSupport",et.value);case CLEAR_SUBSCRIPTION:return ReducerRecord$9();case SET_ALERTS:return _e.setIn(et.path,et.value);default:return _e}}const normalizeRelationships=(_e,et)=>(et.forEach(tt=>{try{_e=_e.set(tt.id,relationshipSchema.parse(tt))}catch{}}),_e),setDomainBlocking=(_e,et,tt)=>_e.withMutations(nt=>{et.forEach(rt=>{nt.setIn([rt,"domain_blocking"],tt)})}),importPleromaAccount=(_e,et)=>{const tt=get$4(et,["pleroma","relationship"],{});return tt.id?normalizeRelationships(_e,[tt]):_e},importPleromaAccounts=(_e,et)=>(et.forEach(tt=>{_e=importPleromaAccount(_e,tt)}),_e);function relationships(_e=Map$3(),et){switch(et.type){case ACCOUNT_IMPORT:return importPleromaAccount(_e,et.account);case ACCOUNTS_IMPORT:return importPleromaAccounts(_e,et.accounts);case ACCOUNT_BLOCK_SUCCESS:case ACCOUNT_UNBLOCK_SUCCESS:case ACCOUNT_MUTE_SUCCESS:case ACCOUNT_UNMUTE_SUCCESS:case ACCOUNT_SUBSCRIBE_SUCCESS:case ACCOUNT_UNSUBSCRIBE_SUCCESS:case ACCOUNT_PIN_SUCCESS:case ACCOUNT_UNPIN_SUCCESS:case ACCOUNT_NOTE_SUBMIT_SUCCESS:case ACCOUNT_REMOVE_FROM_FOLLOWERS_SUCCESS:return normalizeRelationships(_e,[et.relationship]);case RELATIONSHIPS_FETCH_SUCCESS:return normalizeRelationships(_e,et.relationships);case DOMAIN_BLOCK_SUCCESS:return setDomainBlocking(_e,et.accounts,!0);case DOMAIN_UNBLOCK_SUCCESS:return setDomainBlocking(_e,et.accounts,!1);default:return _e}}const NewReportRecord=Record({isSubmitting:!1,entityType:"",account_id:null,status_ids:Set$3(),chat_message:null,group:null,comment:"",forward:!1,block:!1,rule_ids:Set$3()}),ReducerRecord$8=Record({new:NewReportRecord()});function reports(_e=ReducerRecord$8(),et){switch(et.type){case REPORT_INIT:return _e.withMutations(tt=>{var nt;tt.setIn(["new","isSubmitting"],!1),tt.setIn(["new","account_id"],et.account.id),tt.setIn(["new","entityType"],et.entityType),et.chatMessage&&tt.setIn(["new","chat_message"],et.chatMessage),et.group&&tt.setIn(["new","group"],et.group),_e.new.account_id!==et.account.id?(tt.setIn(["new","status_ids"],et.status?Set$3([((nt=et.status.reblog)==null?void 0:nt.id)||et.status.id]):Set$3()),tt.setIn(["new","comment"],"")):et.status&&tt.updateIn(["new","status_ids"],rt=>{var at;return rt.add(((at=et.status.reblog)==null?void 0:at.id)||et.status.id)})});case REPORT_STATUS_TOGGLE:return _e.updateIn(["new","status_ids"],tt=>et.checked?tt.add(et.statusId):tt.remove(et.statusId));case REPORT_COMMENT_CHANGE:return _e.setIn(["new","comment"],et.comment);case REPORT_FORWARD_CHANGE:return _e.setIn(["new","forward"],et.forward);case REPORT_BLOCK_CHANGE:return _e.setIn(["new","block"],et.block);case REPORT_RULE_CHANGE:return _e.updateIn(["new","rule_ids"],tt=>tt.includes(et.rule_id)?tt.remove(et.rule_id):tt.add(et.rule_id));case REPORT_SUBMIT_REQUEST:return _e.setIn(["new","isSubmitting"],!0);case REPORT_SUBMIT_FAIL:return _e.setIn(["new","isSubmitting"],!1);case REPORT_CANCEL:case REPORT_SUBMIT_SUCCESS:return _e.withMutations(tt=>{tt.setIn(["new","account_id"],null),tt.setIn(["new","status_ids"],Set$3()),tt.setIn(["new","chat_message"],null),tt.setIn(["new","comment"],""),tt.setIn(["new","isSubmitting"],!1),tt.setIn(["new","rule_ids"],Set$3()),tt.setIn(["new","block"],!1)});default:return _e}}const RULES_FETCH_REQUEST="RULES_FETCH_REQUEST",RULES_FETCH_SUCCESS="RULES_FETCH_SUCCESS",fetchRules=()=>(_e,et)=>(_e({type:RULES_FETCH_REQUEST}),api(et).get("/api/v1/instance/rules").then(tt=>_e({type:RULES_FETCH_SUCCESS,payload:tt.data}))),initialState$7={items:[],isLoading:!1};function rules(_e=initialState$7,et){switch(et.type){case RULES_FETCH_REQUEST:return{..._e,isLoading:!0};case RULES_FETCH_SUCCESS:return{..._e,isLoading:!1,items:et.payload};default:return _e}}const ScheduledStatusRecord=Record({id:"",scheduled_at:new Date,media_attachments:null,text:"",in_reply_to_id:null,media_ids:null,sensitive:!1,spoiler_text:"",visibility:"public",poll:null}),initialState$6=Map$3(),importStatus$2=(_e,{params:et,...tt})=>tt.scheduled_at?_e.set(tt.id,ScheduledStatusRecord(Map$3(fromJS({...tt,...et})))):_e,importStatuses$2=(_e,et)=>_e.withMutations(tt=>et.forEach(nt=>importStatus$2(tt,nt))),deleteStatus$2=(_e,et)=>_e.delete(et);function scheduled_statuses(_e=initialState$6,et){switch(et.type){case STATUS_IMPORT:case STATUS_CREATE_SUCCESS:return importStatus$2(_e,et.status);case STATUSES_IMPORT:case SCHEDULED_STATUSES_FETCH_SUCCESS:return importStatuses$2(_e,et.statuses);case SCHEDULED_STATUS_CANCEL_REQUEST:case SCHEDULED_STATUS_CANCEL_SUCCESS:return deleteStatus$2(_e,et.id);default:return _e}}const ResultsRecord=Record({accounts:OrderedSet(),statuses:OrderedSet(),groups:OrderedSet(),hashtags:OrderedSet(),accountsHasMore:!1,statusesHasMore:!1,groupsHasMore:!1,hashtagsHasMore:!1,accountsLoaded:!1,statusesLoaded:!1,groupsLoaded:!1,hashtagsLoaded:!1}),ReducerRecord$7=Record({value:"",submitted:!1,submittedValue:"",hidden:!1,results:ResultsRecord(),filter:"accounts",accountId:null,next:null}),toIds$1=(_e=[])=>OrderedSet(_e.map(et=>et.id)),importResults=(_e,et,tt,nt,rt)=>_e.withMutations(at=>{var it;at.value===tt&&at.filter===nt&&(at.set("results",ResultsRecord({accounts:toIds$1(et.accounts),statuses:toIds$1(et.statuses),groups:toIds$1(et.groups),hashtags:OrderedSet(et.hashtags.map(normalizeTag)),accountsHasMore:et.accounts.length>=20,statusesHasMore:et.statuses.length>=20,groupsHasMore:((it=et.groups)==null?void 0:it.length)>=20,hashtagsHasMore:et.hashtags.length>=20,accountsLoaded:!0,statusesLoaded:!0,groupsLoaded:!0,hashtagsLoaded:!0})),at.set("submitted",!0),at.set("next",rt))}),paginateResults=(_e,et,tt,nt,rt)=>_e.withMutations(at=>{at.value===nt&&(at.setIn(["results",`${et}HasMore`],tt[et].length>=20),at.setIn(["results",`${et}Loaded`],!0),at.set("next",rt),at.updateIn(["results",et],it=>{const ot=tt[et];return et==="hashtags"?it.concat(fromJS(ot).map(normalizeTag)):it.concat(toIds$1(ot))}))}),handleSubmitted=(_e,et)=>_e.withMutations(tt=>{tt.set("results",ResultsRecord()),tt.set("submitted",!0),tt.set("submittedValue",et)});function search(_e=ReducerRecord$7(),et){switch(et.type){case SEARCH_CHANGE:return _e.set("value",et.value);case SEARCH_CLEAR:return ReducerRecord$7();case SEARCH_RESULTS_CLEAR:return _e.merge({value:"",results:ResultsRecord(),submitted:!1,submittedValue:""});case SEARCH_SHOW:return _e.set("hidden",!1);case COMPOSE_REPLY:case COMPOSE_MENTION:case COMPOSE_DIRECT:case COMPOSE_QUOTE:return _e.set("hidden",!0);case SEARCH_FETCH_REQUEST:return handleSubmitted(_e,et.value);case SEARCH_FETCH_SUCCESS:return importResults(_e,et.results,et.searchTerm,et.searchType,et.next);case SEARCH_FILTER_SET:return _e.set("filter",et.value);case SEARCH_EXPAND_REQUEST:return _e.setIn(["results",`${et.searchType}Loaded`],!1);case SEARCH_EXPAND_SUCCESS:return paginateResults(_e,et.searchType,et.results,et.searchTerm,et.next);case SEARCH_ACCOUNT_SET:return et.accountId?ReducerRecord$7({accountId:et.accountId,filter:"statuses"}):_e.merge({results:ResultsRecord(),submitted:!1,submittedValue:"",filter:"accounts",accountId:null});default:return _e}}const MFA_FETCH_REQUEST="MFA_FETCH_REQUEST",MFA_FETCH_SUCCESS="MFA_FETCH_SUCCESS",MFA_FETCH_FAIL="MFA_FETCH_FAIL",MFA_BACKUP_CODES_FETCH_REQUEST="MFA_BACKUP_CODES_FETCH_REQUEST",MFA_BACKUP_CODES_FETCH_SUCCESS="MFA_BACKUP_CODES_FETCH_SUCCESS",MFA_BACKUP_CODES_FETCH_FAIL="MFA_BACKUP_CODES_FETCH_FAIL",MFA_SETUP_REQUEST="MFA_SETUP_REQUEST",MFA_SETUP_SUCCESS="MFA_SETUP_SUCCESS",MFA_SETUP_FAIL="MFA_SETUP_FAIL",MFA_CONFIRM_REQUEST="MFA_CONFIRM_REQUEST",MFA_CONFIRM_SUCCESS="MFA_CONFIRM_SUCCESS",MFA_CONFIRM_FAIL="MFA_CONFIRM_FAIL",MFA_DISABLE_REQUEST="MFA_DISABLE_REQUEST",MFA_DISABLE_SUCCESS="MFA_DISABLE_SUCCESS",MFA_DISABLE_FAIL="MFA_DISABLE_FAIL",fetchMfa=()=>(_e,et)=>(_e({type:MFA_FETCH_REQUEST}),api(et).get("/api/pleroma/accounts/mfa").then(({data:tt})=>{_e({type:MFA_FETCH_SUCCESS,data:tt})}).catch(()=>{_e({type:MFA_FETCH_FAIL})})),fetchBackupCodes=()=>(_e,et)=>(_e({type:MFA_BACKUP_CODES_FETCH_REQUEST}),api(et).get("/api/pleroma/accounts/mfa/backup_codes").then(({data:tt})=>(_e({type:MFA_BACKUP_CODES_FETCH_SUCCESS,data:tt}),tt)).catch(()=>{_e({type:MFA_BACKUP_CODES_FETCH_FAIL})})),setupMfa=_e=>(et,tt)=>(et({type:MFA_SETUP_REQUEST,method:_e}),api(tt).get(`/api/pleroma/accounts/mfa/setup/${_e}`).then(({data:nt})=>(et({type:MFA_SETUP_SUCCESS,data:nt}),nt)).catch(nt=>{throw et({type:MFA_SETUP_FAIL}),nt})),confirmMfa=(_e,et,tt)=>(nt,rt)=>{const at={code:et,password:tt};return nt({type:MFA_CONFIRM_REQUEST,method:_e,code:et}),api(rt).post(`/api/pleroma/accounts/mfa/confirm/${_e}`,at).then(({data:it})=>(nt({type:MFA_CONFIRM_SUCCESS,method:_e,code:et}),it)).catch(it=>{throw nt({type:MFA_CONFIRM_FAIL,method:_e,code:et,error:it,skipAlert:!0}),it})},disableMfa$1=(_e,et)=>(tt,nt)=>(tt({type:MFA_DISABLE_REQUEST,method:_e}),api(nt).delete(`/api/pleroma/accounts/mfa/${_e}`,{data:{password:et}}).then(({data:rt})=>(tt({type:MFA_DISABLE_SUCCESS,method:_e}),rt)).catch(rt=>{throw tt({type:MFA_DISABLE_FAIL,method:_e,skipAlert:!0}),rt})),TokenRecord=Record({id:0,app_name:"",valid_until:""}),ReducerRecord$6=Record({tokens:List$1(),mfa:Map$3({settings:Map$3({totp:!1})})}),deleteToken=(_e,et)=>_e.update("tokens",tt=>tt.filterNot(nt=>nt.id===et)),importMfa=(_e,et)=>_e.set("mfa",et),enableMfa=(_e,et)=>_e.setIn(["mfa","settings",et],!0),disableMfa=(_e,et)=>_e.setIn(["mfa","settings",et],!1);function security(_e=ReducerRecord$6(),et){switch(et.type){case FETCH_TOKENS_SUCCESS:return _e.set("tokens",List$1(et.tokens.map(TokenRecord)));case REVOKE_TOKEN_SUCCESS:return deleteToken(_e,et.id);case MFA_FETCH_SUCCESS:return importMfa(_e,fromJS(et.data));case MFA_CONFIRM_SUCCESS:return enableMfa(_e,et.method);case MFA_DISABLE_SUCCESS:return disableMfa(_e,et.method);default:return _e}}const updateFrequentEmojis=(_e,et)=>_e.update("frequentlyUsedEmojis",Map$3(),tt=>tt.update(et.id,0,nt=>nt+1)).set("saved",!1),importSettings=(_e,et)=>{et=fromJS(et);const tt=et.getIn(["pleroma","settings_store",FE_NAME],Map$3());return _e.merge(tt)};function settings(_e=Map$3({saved:!0}),et){switch(et.type){case ME_FETCH_SUCCESS:return importSettings(_e,et.me);case NOTIFICATIONS_FILTER_SET:case SEARCH_FILTER_SET:case SETTING_CHANGE:return _e.setIn(et.path,et.value).set("saved",!1);case EMOJI_USE:return updateFrequentEmojis(_e,et.emoji);case SETTING_SAVE:return _e.set("saved",!0);case SETTINGS_UPDATE:return Map$3(fromJS(et.settings));default:return _e}}const initialState$5={sidebarOpen:!1};function sidebar(_e=initialState$5,et){switch(et.type){case SIDEBAR_OPEN:return{sidebarOpen:!0};case SIDEBAR_CLOSE:return{sidebarOpen:!1};default:return _e}}const initialState$4=Map$3(),fallbackState=Map$3({brandColor:"#0482d8"}),updateFromAdmin=(_e,et)=>{try{return ConfigDB.find(et,":pleroma",":frontend_configurations").get("value").find(tt=>tt.getIn(["tuple",0])===":soapbox_fe").getIn(["tuple",1])}catch{return _e}},preloadImport=(_e,et)=>{const tt="/api/pleroma/frontend_configurations",nt=et.data[tt];if(nt){const rt=nt.soapbox_fe;return rt?fallbackState.mergeDeep(fromJS(rt)):fallbackState}else return _e},persistSoapboxConfig=(_e,et)=>{et&&KVStore.setItem(`soapbox_config:${et}`,_e.toJS()).catch(console.error)},importSoapboxConfig=(_e,et,tt)=>(persistSoapboxConfig(et,tt),et);function soapbox(_e=initialState$4,et){switch(et.type){case PLEROMA_PRELOAD_IMPORT:return preloadImport(_e,et);case SOAPBOX_CONFIG_REMEMBER_SUCCESS:return fromJS(et.soapboxConfig);case SOAPBOX_CONFIG_REQUEST_SUCCESS:return importSoapboxConfig(_e,fromJS(et.soapboxConfig),et.host);case SOAPBOX_CONFIG_REQUEST_FAIL:return fallbackState.mergeDeep(_e);case ADMIN_CONFIG_UPDATE_SUCCESS:return updateFromAdmin(_e,fromJS(et.configs));default:return _e}}const ReducerRecord$5=Record({ref:null,statusId:"",hovered:!1});function statusHoverCard(_e=ReducerRecord$5(),et){switch(et.type){case STATUS_HOVER_CARD_OPEN:return _e.withMutations(tt=>{tt.set("ref",et.ref),tt.set("statusId",et.statusId)});case STATUS_HOVER_CARD_UPDATE:return _e.set("hovered",!0);case STATUS_HOVER_CARD_CLOSE:return _e.hovered===!0&&!et.force?_e:ReducerRecord$5();default:return _e}}const STATUS_QUOTES_FETCH_REQUEST="STATUS_QUOTES_FETCH_REQUEST",STATUS_QUOTES_FETCH_SUCCESS="STATUS_QUOTES_FETCH_SUCCESS",STATUS_QUOTES_FETCH_FAIL="STATUS_QUOTES_FETCH_FAIL",STATUS_QUOTES_EXPAND_REQUEST="STATUS_QUOTES_EXPAND_REQUEST",STATUS_QUOTES_EXPAND_SUCCESS="STATUS_QUOTES_EXPAND_SUCCESS",STATUS_QUOTES_EXPAND_FAIL="STATUS_QUOTES_EXPAND_FAIL",noOp$1=()=>new Promise(_e=>_e(null)),fetchStatusQuotes=_e=>(et,tt)=>tt().status_lists.getIn([`quotes:${_e}`,"isLoading"])?et(noOp$1):(et({statusId:_e,type:STATUS_QUOTES_FETCH_REQUEST}),api(tt).get(`/api/v1/pleroma/statuses/${_e}/quotes`).then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");return et(importFetchedStatuses(nt.data)),et({type:STATUS_QUOTES_FETCH_SUCCESS,statusId:_e,statuses:nt.data,next:rt?rt.uri:null})}).catch(nt=>{et({type:STATUS_QUOTES_FETCH_FAIL,statusId:_e,error:nt})})),expandStatusQuotes=_e=>(et,tt)=>{const nt=tt().status_lists.getIn([`quotes:${_e}`,"next"],null);return nt===null||tt().status_lists.getIn([`quotes:${_e}`,"isLoading"])?et(noOp$1):(et({type:STATUS_QUOTES_EXPAND_REQUEST,statusId:_e}),api(tt).get(nt).then(rt=>{const at=getLinks(rt).refs.find(it=>it.rel==="next");et(importFetchedStatuses(rt.data)),et({type:STATUS_QUOTES_EXPAND_SUCCESS,statusId:_e,statuses:rt.data,next:at?at.uri:null})}).catch(rt=>{et({type:STATUS_QUOTES_EXPAND_FAIL,statusId:_e,error:rt})}))},BOOKMARKED_STATUSES_FETCH_REQUEST="BOOKMARKED_STATUSES_FETCH_REQUEST",BOOKMARKED_STATUSES_FETCH_SUCCESS="BOOKMARKED_STATUSES_FETCH_SUCCESS",BOOKMARKED_STATUSES_FETCH_FAIL="BOOKMARKED_STATUSES_FETCH_FAIL",BOOKMARKED_STATUSES_EXPAND_REQUEST="BOOKMARKED_STATUSES_EXPAND_REQUEST",BOOKMARKED_STATUSES_EXPAND_SUCCESS="BOOKMARKED_STATUSES_EXPAND_SUCCESS",BOOKMARKED_STATUSES_EXPAND_FAIL="BOOKMARKED_STATUSES_EXPAND_FAIL",noOp=()=>new Promise(_e=>_e(void 0)),fetchBookmarkedStatuses=()=>(_e,et)=>{var tt;return(tt=et().status_lists.get("bookmarks"))!=null&&tt.isLoading?_e(noOp):(_e(fetchBookmarkedStatusesRequest()),api(et).get("/api/v1/bookmarks").then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");return _e(importFetchedStatuses(nt.data)),_e(fetchBookmarkedStatusesSuccess(nt.data,rt?rt.uri:null))}).catch(nt=>{_e(fetchBookmarkedStatusesFail(nt))}))},fetchBookmarkedStatusesRequest=()=>({type:BOOKMARKED_STATUSES_FETCH_REQUEST}),fetchBookmarkedStatusesSuccess=(_e,et)=>({type:BOOKMARKED_STATUSES_FETCH_SUCCESS,statuses:_e,next:et}),fetchBookmarkedStatusesFail=_e=>({type:BOOKMARKED_STATUSES_FETCH_FAIL,error:_e}),expandBookmarkedStatuses=()=>(_e,et)=>{var nt,rt;const tt=((nt=et().status_lists.get("bookmarks"))==null?void 0:nt.next)||null;return tt===null||(rt=et().status_lists.get("bookmarks"))!=null&&rt.isLoading?_e(noOp):(_e(expandBookmarkedStatusesRequest()),api(et).get(tt).then(at=>{const it=getLinks(at).refs.find(ot=>ot.rel==="next");return _e(importFetchedStatuses(at.data)),_e(expandBookmarkedStatusesSuccess(at.data,it?it.uri:null))}).catch(at=>{_e(expandBookmarkedStatusesFail(at))}))},expandBookmarkedStatusesRequest=()=>({type:BOOKMARKED_STATUSES_EXPAND_REQUEST}),expandBookmarkedStatusesSuccess=(_e,et)=>({type:BOOKMARKED_STATUSES_EXPAND_SUCCESS,statuses:_e,next:et}),expandBookmarkedStatusesFail=_e=>({type:BOOKMARKED_STATUSES_EXPAND_FAIL,error:_e}),FAVOURITED_STATUSES_FETCH_REQUEST="FAVOURITED_STATUSES_FETCH_REQUEST",FAVOURITED_STATUSES_FETCH_SUCCESS="FAVOURITED_STATUSES_FETCH_SUCCESS",FAVOURITED_STATUSES_FETCH_FAIL="FAVOURITED_STATUSES_FETCH_FAIL",FAVOURITED_STATUSES_EXPAND_REQUEST="FAVOURITED_STATUSES_EXPAND_REQUEST",FAVOURITED_STATUSES_EXPAND_SUCCESS="FAVOURITED_STATUSES_EXPAND_SUCCESS",FAVOURITED_STATUSES_EXPAND_FAIL="FAVOURITED_STATUSES_EXPAND_FAIL",ACCOUNT_FAVOURITED_STATUSES_FETCH_REQUEST="ACCOUNT_FAVOURITED_STATUSES_FETCH_REQUEST",ACCOUNT_FAVOURITED_STATUSES_FETCH_SUCCESS="ACCOUNT_FAVOURITED_STATUSES_FETCH_SUCCESS",ACCOUNT_FAVOURITED_STATUSES_FETCH_FAIL="ACCOUNT_FAVOURITED_STATUSES_FETCH_FAIL",ACCOUNT_FAVOURITED_STATUSES_EXPAND_REQUEST="ACCOUNT_FAVOURITED_STATUSES_EXPAND_REQUEST",ACCOUNT_FAVOURITED_STATUSES_EXPAND_SUCCESS="ACCOUNT_FAVOURITED_STATUSES_EXPAND_SUCCESS",ACCOUNT_FAVOURITED_STATUSES_EXPAND_FAIL="ACCOUNT_FAVOURITED_STATUSES_EXPAND_FAIL",fetchFavouritedStatuses=()=>(_e,et)=>{var tt;isLoggedIn(et)&&((tt=et().status_lists.get("favourites"))!=null&&tt.isLoading||(_e(fetchFavouritedStatusesRequest()),api(et).get("/api/v1/favourites").then(nt=>{const rt=getLinks(nt).refs.find(at=>at.rel==="next");_e(importFetchedStatuses(nt.data)),_e(fetchFavouritedStatusesSuccess(nt.data,rt?rt.uri:null))}).catch(nt=>{_e(fetchFavouritedStatusesFail(nt))})))},fetchFavouritedStatusesRequest=()=>({type:FAVOURITED_STATUSES_FETCH_REQUEST,skipLoading:!0}),fetchFavouritedStatusesSuccess=(_e,et)=>({type:FAVOURITED_STATUSES_FETCH_SUCCESS,statuses:_e,next:et,skipLoading:!0}),fetchFavouritedStatusesFail=_e=>({type:FAVOURITED_STATUSES_FETCH_FAIL,error:_e,skipLoading:!0}),expandFavouritedStatuses=()=>(_e,et)=>{var nt,rt;if(!isLoggedIn(et))return;const tt=((nt=et().status_lists.get("favourites"))==null?void 0:nt.next)||null;tt===null||(rt=et().status_lists.get("favourites"))!=null&&rt.isLoading||(_e(expandFavouritedStatusesRequest()),api(et).get(tt).then(at=>{const it=getLinks(at).refs.find(ot=>ot.rel==="next");_e(importFetchedStatuses(at.data)),_e(expandFavouritedStatusesSuccess(at.data,it?it.uri:null))}).catch(at=>{_e(expandFavouritedStatusesFail(at))}))},expandFavouritedStatusesRequest=()=>({type:FAVOURITED_STATUSES_EXPAND_REQUEST}),expandFavouritedStatusesSuccess=(_e,et)=>({type:FAVOURITED_STATUSES_EXPAND_SUCCESS,statuses:_e,next:et}),expandFavouritedStatusesFail=_e=>({type:FAVOURITED_STATUSES_EXPAND_FAIL,error:_e}),fetchAccountFavouritedStatuses=_e=>(et,tt)=>{var nt;isLoggedIn(tt)&&((nt=tt().status_lists.get(`favourites:${_e}`))!=null&&nt.isLoading||(et(fetchAccountFavouritedStatusesRequest(_e)),api(tt).get(`/api/v1/pleroma/accounts/${_e}/favourites`).then(rt=>{const at=getLinks(rt).refs.find(it=>it.rel==="next");et(importFetchedStatuses(rt.data)),et(fetchAccountFavouritedStatusesSuccess(_e,rt.data,at?at.uri:null))}).catch(rt=>{et(fetchAccountFavouritedStatusesFail(_e,rt))})))},fetchAccountFavouritedStatusesRequest=_e=>({type:ACCOUNT_FAVOURITED_STATUSES_FETCH_REQUEST,accountId:_e,skipLoading:!0}),fetchAccountFavouritedStatusesSuccess=(_e,et,tt)=>({type:ACCOUNT_FAVOURITED_STATUSES_FETCH_SUCCESS,accountId:_e,statuses:et,next:tt,skipLoading:!0}),fetchAccountFavouritedStatusesFail=(_e,et)=>({type:ACCOUNT_FAVOURITED_STATUSES_FETCH_FAIL,accountId:_e,error:et,skipLoading:!0}),expandAccountFavouritedStatuses=_e=>(et,tt)=>{var rt,at;if(!isLoggedIn(tt))return;const nt=((rt=tt().status_lists.get(`favourites:${_e}`))==null?void 0:rt.next)||null;nt===null||(at=tt().status_lists.get(`favourites:${_e}`))!=null&&at.isLoading||(et(expandAccountFavouritedStatusesRequest(_e)),api(tt).get(nt).then(it=>{const ot=getLinks(it).refs.find(st=>st.rel==="next");et(importFetchedStatuses(it.data)),et(expandAccountFavouritedStatusesSuccess(_e,it.data,ot?ot.uri:null))}).catch(it=>{et(expandAccountFavouritedStatusesFail(_e,it))}))},expandAccountFavouritedStatusesRequest=_e=>({type:ACCOUNT_FAVOURITED_STATUSES_EXPAND_REQUEST,accountId:_e}),expandAccountFavouritedStatusesSuccess=(_e,et,tt)=>({type:ACCOUNT_FAVOURITED_STATUSES_EXPAND_SUCCESS,accountId:_e,statuses:et,next:tt}),expandAccountFavouritedStatusesFail=(_e,et)=>({type:ACCOUNT_FAVOURITED_STATUSES_EXPAND_FAIL,accountId:_e,error:et}),PINNED_STATUSES_FETCH_REQUEST="PINNED_STATUSES_FETCH_REQUEST",PINNED_STATUSES_FETCH_SUCCESS="PINNED_STATUSES_FETCH_SUCCESS",PINNED_STATUSES_FETCH_FAIL="PINNED_STATUSES_FETCH_FAIL",fetchPinnedStatuses=()=>(_e,et)=>{if(!isLoggedIn(et))return;const tt=et().me;_e(fetchPinnedStatusesRequest()),api(et).get(`/api/v1/accounts/${tt}/statuses`,{params:{pinned:!0}}).then(nt=>{_e(importFetchedStatuses(nt.data)),_e(fetchPinnedStatusesSuccess(nt.data,null))}).catch(nt=>{_e(fetchPinnedStatusesFail(nt))})},fetchPinnedStatusesRequest=()=>({type:PINNED_STATUSES_FETCH_REQUEST}),fetchPinnedStatusesSuccess=(_e,et)=>({type:PINNED_STATUSES_FETCH_SUCCESS,statuses:_e,next:et}),fetchPinnedStatusesFail=_e=>({type:PINNED_STATUSES_FETCH_FAIL,error:_e}),StatusListRecord=Record({next:null,loaded:!1,isLoading:null,items:OrderedSet()}),initialState$3=Map$3({favourites:StatusListRecord(),bookmarks:StatusListRecord(),pins:StatusListRecord(),scheduled_statuses:StatusListRecord(),recent_events:StatusListRecord(),joined_events:StatusListRecord()}),getStatusId=_e=>typeof _e=="string"?_e:_e.id,getStatusIds$1=(_e=[])=>OrderedSet(_e.map(getStatusId)),setLoading$1=(_e,et,tt)=>_e.setIn([et,"isLoading"],tt),normalizeList$1=(_e,et,tt,nt)=>_e.update(et,StatusListRecord(),rt=>rt.withMutations(at=>{at.set("next",nt),at.set("loaded",!0),at.set("isLoading",!1),at.set("items",getStatusIds$1(tt))})),appendToList$1=(_e,et,tt,nt)=>{const rt=getStatusIds$1(tt);return _e.update(et,StatusListRecord(),at=>at.withMutations(it=>{it.set("next",nt),it.set("isLoading",!1),it.update("items",ot=>ot.union(rt))}))},prependOneToList=(_e,et,tt)=>{const nt=getStatusId(tt);return _e.updateIn([et,"items"],OrderedSet(),rt=>OrderedSet([nt]).union(rt))},removeOneFromList=(_e,et,tt)=>{const nt=getStatusId(tt);return _e.updateIn([et,"items"],OrderedSet(),rt=>rt.delete(nt))},maybeAppendScheduledStatus=(_e,et)=>et.scheduled_at?prependOneToList(_e,"scheduled_statuses",getStatusId(et)):_e;function statusLists(_e=initialState$3,et){switch(et.type){case FAVOURITED_STATUSES_FETCH_REQUEST:case FAVOURITED_STATUSES_EXPAND_REQUEST:return setLoading$1(_e,"favourites",!0);case FAVOURITED_STATUSES_FETCH_FAIL:case FAVOURITED_STATUSES_EXPAND_FAIL:return setLoading$1(_e,"favourites",!1);case FAVOURITED_STATUSES_FETCH_SUCCESS:return normalizeList$1(_e,"favourites",et.statuses,et.next);case FAVOURITED_STATUSES_EXPAND_SUCCESS:return appendToList$1(_e,"favourites",et.statuses,et.next);case ACCOUNT_FAVOURITED_STATUSES_FETCH_REQUEST:case ACCOUNT_FAVOURITED_STATUSES_EXPAND_REQUEST:return setLoading$1(_e,`favourites:${et.accountId}`,!0);case ACCOUNT_FAVOURITED_STATUSES_FETCH_FAIL:case ACCOUNT_FAVOURITED_STATUSES_EXPAND_FAIL:return setLoading$1(_e,`favourites:${et.accountId}`,!1);case ACCOUNT_FAVOURITED_STATUSES_FETCH_SUCCESS:return normalizeList$1(_e,`favourites:${et.accountId}`,et.statuses,et.next);case ACCOUNT_FAVOURITED_STATUSES_EXPAND_SUCCESS:return appendToList$1(_e,`favourites:${et.accountId}`,et.statuses,et.next);case BOOKMARKED_STATUSES_FETCH_REQUEST:case BOOKMARKED_STATUSES_EXPAND_REQUEST:return setLoading$1(_e,"bookmarks",!0);case BOOKMARKED_STATUSES_FETCH_FAIL:case BOOKMARKED_STATUSES_EXPAND_FAIL:return setLoading$1(_e,"bookmarks",!1);case BOOKMARKED_STATUSES_FETCH_SUCCESS:return normalizeList$1(_e,"bookmarks",et.statuses,et.next);case BOOKMARKED_STATUSES_EXPAND_SUCCESS:return appendToList$1(_e,"bookmarks",et.statuses,et.next);case FAVOURITE_SUCCESS:return prependOneToList(_e,"favourites",et.status);case UNFAVOURITE_SUCCESS:return removeOneFromList(_e,"favourites",et.status);case BOOKMARK_SUCCESS:return prependOneToList(_e,"bookmarks",et.status);case UNBOOKMARK_SUCCESS:return removeOneFromList(_e,"bookmarks",et.status);case PINNED_STATUSES_FETCH_SUCCESS:return normalizeList$1(_e,"pins",et.statuses,et.next);case PIN_SUCCESS:return prependOneToList(_e,"pins",et.status);case UNPIN_SUCCESS:return removeOneFromList(_e,"pins",et.status);case SCHEDULED_STATUSES_FETCH_REQUEST:case SCHEDULED_STATUSES_EXPAND_REQUEST:return setLoading$1(_e,"scheduled_statuses",!0);case SCHEDULED_STATUSES_FETCH_FAIL:case SCHEDULED_STATUSES_EXPAND_FAIL:return setLoading$1(_e,"scheduled_statuses",!1);case SCHEDULED_STATUSES_FETCH_SUCCESS:return normalizeList$1(_e,"scheduled_statuses",et.statuses,et.next);case SCHEDULED_STATUSES_EXPAND_SUCCESS:return appendToList$1(_e,"scheduled_statuses",et.statuses,et.next);case SCHEDULED_STATUS_CANCEL_REQUEST:case SCHEDULED_STATUS_CANCEL_SUCCESS:return removeOneFromList(_e,"scheduled_statuses",et.id||et.status.id);case STATUS_QUOTES_FETCH_REQUEST:case STATUS_QUOTES_EXPAND_REQUEST:return setLoading$1(_e,`quotes:${et.statusId}`,!0);case STATUS_QUOTES_FETCH_FAIL:case STATUS_QUOTES_EXPAND_FAIL:return setLoading$1(_e,`quotes:${et.statusId}`,!1);case STATUS_QUOTES_FETCH_SUCCESS:return normalizeList$1(_e,`quotes:${et.statusId}`,et.statuses,et.next);case STATUS_QUOTES_EXPAND_SUCCESS:return appendToList$1(_e,`quotes:${et.statusId}`,et.statuses,et.next);case RECENT_EVENTS_FETCH_REQUEST:return setLoading$1(_e,"recent_events",!0);case RECENT_EVENTS_FETCH_FAIL:return setLoading$1(_e,"recent_events",!1);case RECENT_EVENTS_FETCH_SUCCESS:return normalizeList$1(_e,"recent_events",et.statuses,et.next);case JOINED_EVENTS_FETCH_REQUEST:return setLoading$1(_e,"joined_events",!0);case JOINED_EVENTS_FETCH_FAIL:return setLoading$1(_e,"joined_events",!1);case JOINED_EVENTS_FETCH_SUCCESS:return normalizeList$1(_e,"joined_events",et.statuses,et.next);case STATUS_CREATE_SUCCESS:return maybeAppendScheduledStatus(_e,et.status);default:return _e}}const domParser=new DOMParser,minifyStatus=_e=>_e.mergeWith((et,tt)=>tt||et,{reblog:normalizeId$1(_e.getIn(["reblog","id"])),poll:normalizeId$1(_e.getIn(["poll","id"])),quote:normalizeId$1(_e.getIn(["quote","id"]))}),getPollOptionTitles=({poll:_e})=>_e&&typeof _e=="object"?_e.options.map(({title:et})=>et):[],getMentionedUsernames=_e=>_e.mentions.map(({acct:et})=>`@${et}`),buildSearchContent=_e=>{const et=getPollOptionTitles(_e),tt=getMentionedUsernames(_e),nt=List$1([_e.spoiler_text,_e.content]).concat(et).concat(tt);return unescapeHTML(nt.join(` -`))||""},calculateStatus=(_e,et,tt=!1)=>{if(et&&et.content===_e.content&&et.spoiler_text===_e.spoiler_text)return _e.merge({search_index:et.search_index,contentHtml:et.contentHtml,spoilerHtml:et.spoilerHtml,hidden:et.hidden});{const nt=_e.spoiler_text,rt=buildSearchContent(_e),at=makeEmojiMap(_e.emojis);return _e.merge({search_index:domParser.parseFromString(rt,"text/html").documentElement.textContent||"",contentHtml:stripCompatibilityFeatures(emojify(_e.content,at)),spoilerHtml:emojify(escapeTextContentForBrowser(nt),at),hidden:tt?!1:nt.length>0||_e.sensitive})}},isQuote=_e=>!!_e.pleroma.get("quote_url"),fixQuote=(_e,et)=>et&&!_e.quote&&isQuote(_e)?_e.set("quote",et.quote).updateIn(["pleroma","quote_visible"],tt=>tt||et.pleroma.get("quote_visible")):_e,fixStatus=(_e,et,tt)=>{const nt=_e.get(et.id);return normalizeStatus(et).withMutations(rt=>{fixQuote(rt,nt),calculateStatus(rt,nt,tt),minifyStatus(rt)})},importStatus$1=(_e,et,tt)=>_e.set(et.id,fixStatus(_e,et,tt)),importStatuses$1=(_e,et,tt)=>_e.withMutations(nt=>et.forEach(rt=>importStatus$1(nt,rt,tt))),deleteStatus$1=(_e,et,tt)=>(tt.forEach(nt=>{_e=deleteStatus$1(_e,nt[0],[])}),_e.delete(et)),incrementReplyCount=(_e,{in_reply_to_id:et})=>et?_e.updateIn([et,"replies_count"],0,tt=>typeof tt=="number"?tt+1:0):_e,decrementReplyCount=(_e,{in_reply_to_id:et})=>et?_e.updateIn([et,"replies_count"],0,tt=>typeof tt=="number"?Math.max(0,tt-1):0):_e,simulateFavourite=(_e,et,tt)=>{const nt=_e.get(et);if(!nt)return _e;const rt=tt?1:-1,at=nt.merge({favourited:tt,favourites_count:Math.max(0,nt.favourites_count+rt)});return _e.set(et,at)},simulateDislike=(_e,et,tt)=>{const nt=_e.get(et);if(!nt)return _e;const rt=tt?1:-1,at=nt.merge({disliked:tt,dislikes_count:Math.max(0,nt.dislikes_count+rt)});return _e.set(et,at)},importTranslation=(_e,et,tt)=>{const nt=Map$3(tt),rt=nt.set("content",stripCompatibilityFeatures(nt.get("content","")));return _e.setIn([et,"translation"],rt)},showTranslation=(_e,et)=>_e.setIn([et,"translation","status"],"visible"),hideTranslation=(_e,et)=>_e.setIn([et,"translation","status"],"hidden"),initialState$2=Map$3();function statuses(_e=initialState$2,et){switch(et.type){case STATUS_IMPORT:return importStatus$1(_e,et.status,et.expandSpoilers);case STATUSES_IMPORT:return importStatuses$1(_e,et.statuses,et.expandSpoilers);case STATUS_CREATE_REQUEST:return et.editing?_e:incrementReplyCount(_e,et.params);case STATUS_CREATE_FAIL:return et.editing?_e:decrementReplyCount(_e,et.params);case FAVOURITE_REQUEST:return simulateFavourite(_e,et.status.id,!0);case UNFAVOURITE_REQUEST:return simulateFavourite(_e,et.status.id,!1);case DISLIKE_REQUEST:return simulateDislike(_e,et.status.id,!0);case UNDISLIKE_REQUEST:return simulateDislike(_e,et.status.id,!1);case EMOJI_REACT_REQUEST:return _e.updateIn([et.status.id,"pleroma","emoji_reactions"],tt=>simulateEmojiReact(tt,et.emoji,et.custom));case UNEMOJI_REACT_REQUEST:return _e.updateIn([et.status.id,"pleroma","emoji_reactions"],tt=>simulateUnEmojiReact(tt,et.emoji));case FAVOURITE_FAIL:return _e.get(et.status.id)===void 0?_e:_e.setIn([et.status.id,"favourited"],!1);case DISLIKE_FAIL:return _e.get(et.status.id)===void 0?_e:_e.setIn([et.status.id,"disliked"],!1);case REBLOG_REQUEST:return _e.setIn([et.status.id,"reblogged"],!0);case REBLOG_FAIL:return _e.get(et.status.id)===void 0?_e:_e.setIn([et.status.id,"reblogged"],!1);case UNREBLOG_REQUEST:return _e.setIn([et.status.id,"reblogged"],!1);case UNREBLOG_FAIL:return _e.get(et.status.id)===void 0?_e:_e.setIn([et.status.id,"reblogged"],!0);case STATUS_MUTE_SUCCESS:return _e.setIn([et.id,"muted"],!0);case STATUS_UNMUTE_SUCCESS:return _e.setIn([et.id,"muted"],!1);case STATUS_REVEAL:return _e.withMutations(tt=>{et.ids.forEach(nt=>{_e.get(nt)!==void 0&&tt.setIn([nt,"hidden"],!1)})});case STATUS_HIDE:return _e.withMutations(tt=>{et.ids.forEach(nt=>{_e.get(nt)!==void 0&&tt.setIn([nt,"hidden"],!0)})});case STATUS_DELETE_REQUEST:return decrementReplyCount(_e,et.params);case STATUS_DELETE_FAIL:return incrementReplyCount(_e,et.params);case STATUS_TRANSLATE_SUCCESS:return importTranslation(_e,et.id,et.translation);case STATUS_TRANSLATE_REDO:return showTranslation(_e,et.id);case STATUS_TRANSLATE_UNDO:return hideTranslation(_e,et.id);case STATUS_UNFILTER:return _e.setIn([et.id,"showFiltered"],!1);case TIMELINE_DELETE:return deleteStatus$1(_e,et.id,et.references);case EVENT_JOIN_REQUEST:return _e.setIn([et.id,"event","join_state"],"pending");case EVENT_JOIN_FAIL:case EVENT_LEAVE_REQUEST:return _e.setIn([et.id,"event","join_state"],null);case EVENT_LEAVE_FAIL:return _e.setIn([et.id,"event","join_state"],et.previousState);default:return _e}}const SuggestionRecord=Record({source:"",account:""}),ReducerRecord$4=Record({items:OrderedSet(),next:null,isLoading:!1}),accountToSuggestion=_e=>({source:"past_interactions",account:_e.id}),importAccounts=(_e,et)=>_e.withMutations(tt=>{tt.set("items",OrderedSet(et.map(accountToSuggestion).map(nt=>SuggestionRecord(nt)))),tt.set("isLoading",!1)}),importSuggestions=(_e,et,tt)=>_e.withMutations(nt=>{nt.update("items",rt=>rt.concat(et.map(at=>({...at,account:at.account.id})).map(at=>SuggestionRecord(at)))),nt.set("isLoading",!1),nt.set("next",tt)}),importTruthSuggestions=(_e,et,tt)=>_e.withMutations(nt=>{nt.update("items",rt=>rt.concat(et.map(at=>({...at,account:at.account_id})).map(at=>SuggestionRecord(at)))),nt.set("isLoading",!1),nt.set("next",tt)}),dismissAccount=(_e,et)=>_e.update("items",tt=>tt.filterNot(nt=>nt.account===et)),dismissAccounts=(_e,et)=>_e.update("items",tt=>tt.filterNot(nt=>et.includes(nt.account)));function suggestionsReducer(_e=ReducerRecord$4(),et){switch(et.type){case SUGGESTIONS_FETCH_REQUEST:case SUGGESTIONS_V2_FETCH_REQUEST:return _e.set("isLoading",!0);case SUGGESTIONS_FETCH_SUCCESS:return importAccounts(_e,et.accounts);case SUGGESTIONS_V2_FETCH_SUCCESS:return importSuggestions(_e,et.suggestions,et.next);case SUGGESTIONS_TRUTH_FETCH_SUCCESS:return importTruthSuggestions(_e,et.suggestions,et.next);case SUGGESTIONS_FETCH_FAIL:case SUGGESTIONS_V2_FETCH_FAIL:return _e.set("isLoading",!1);case SUGGESTIONS_DISMISS:return dismissAccount(_e,et.id);case ACCOUNT_BLOCK_SUCCESS:case ACCOUNT_MUTE_SUCCESS:return dismissAccount(_e,et.relationship.id);case DOMAIN_BLOCK_SUCCESS:return dismissAccounts(_e,et.accounts);default:return _e}}const initialState$1=Map$3();function tags(_e=initialState$1,et){switch(et.type){case HASHTAG_FETCH_SUCCESS:return _e.set(et.name,normalizeTag(et.tag));case HASHTAG_FOLLOW_REQUEST:case HASHTAG_UNFOLLOW_FAIL:return _e.setIn([et.name,"following"],!0);case HASHTAG_FOLLOW_FAIL:case HASHTAG_UNFOLLOW_REQUEST:return _e.setIn([et.name,"following"],!1);default:return _e}}var nativeFloor=Math.floor,nativeRandom=Math.random;function baseRandom$1(_e,et){return _e+nativeFloor(nativeRandom()*(et-_e+1))}var _baseRandom=baseRandom$1,baseRandom=_baseRandom;function arraySample$2(_e){var et=_e.length;return et?_e[baseRandom(0,et-1)]:void 0}var _arraySample=arraySample$2,arrayMap=_arrayMap;function baseValues$1(_e,et){return arrayMap(et,function(tt){return _e[tt]})}var _baseValues=baseValues$1,baseValues=_baseValues,keys=keys_1;function values$1(_e){return _e==null?[]:baseValues(_e,keys(_e))}var values_1=values$1,arraySample$1=_arraySample,values=values_1;function baseSample$1(_e){return arraySample$1(values(_e))}var _baseSample=baseSample$1,arraySample=_arraySample,baseSample=_baseSample,isArray=isArray_1;function sample(_e){var et=isArray(_e)?arraySample:baseSample;return et(_e)}var sample_1=sample;const sample$1=getDefaultExportFromCjs$1(sample_1),TRUNCATE_LIMIT=40,TRUNCATE_SIZE=20,TimelineRecord=Record({unread:0,online:!1,top:!0,isLoading:!1,hasMore:!0,next:void 0,prev:void 0,items:OrderedSet(),queuedItems:OrderedSet(),feedAccountId:null,totalQueuedItemsCount:0,loadingFailed:!1,isPartial:!1}),initialState=Map$3(),getStatusIds=(_e=List$1())=>_e.map(et=>et.get("id")).toOrderedSet(),mergeStatusIds=(_e=OrderedSet(),et=OrderedSet())=>et.union(_e),addStatusId=(_e=OrderedSet(),et)=>mergeStatusIds(_e,OrderedSet([et])),truncate=(_e,et,tt)=>_e.size>et?_e.take(tt):_e,truncateIds=_e=>truncate(_e,TRUNCATE_LIMIT,TRUNCATE_SIZE),setLoading=(_e,et,tt)=>_e.update(et,TimelineRecord(),nt=>nt.set("isLoading",tt)),setFailed=(_e,et,tt)=>_e.update(et,TimelineRecord(),nt=>nt.set("loadingFailed",tt)),expandNormalizedTimeline=(_e,et,tt,nt,rt,at,it,ot)=>{let st=getStatusIds(tt),ct=OrderedSet();return _e.withMutations(ut=>{ut.update(et,TimelineRecord(),dt=>dt.withMutations(ft=>{if(ft.set("isLoading",!1),ft.set("loadingFailed",!1),ft.set("isPartial",at),!nt&&!it&&ft.set("hasMore",!1),et.endsWith(":pinned")){ft.set("items",st);return}st.isEmpty()||(ct=OrderedSet(),!ot&&ft.items.count()>0&&st.first()>ft.items.first()&&(ct=st.subtract(ft.items)),st=st.subtract(ct),ft.update("items",pt=>st.first()>pt.first()?mergeStatusIds(pt,st):mergeStatusIds(st,pt)))})),ct.forEach(dt=>ut.set(et,updateTimelineQueue(ut,et,dt).get(et)))})},updateTimeline=(_e,et,tt)=>{var ot,st,ct;const nt=(ot=_e.get(et))==null?void 0:ot.top,rt=((st=_e.get(et))==null?void 0:st.items)||OrderedSet(),at=((ct=_e.get(et))==null?void 0:ct.unread)||0;if(rt.includes(tt))return _e;const it=addStatusId(rt,tt);return _e.update(et,TimelineRecord(),ut=>ut.withMutations(dt=>{nt?dt.set("items",truncateIds(it)):(dt.set("unread",at+1),dt.set("items",it))}))},updateTimelineQueue=(_e,et,tt)=>{var it,ot,st;const nt=((it=_e.get(et))==null?void 0:it.queuedItems)||OrderedSet(),rt=((ot=_e.get(et))==null?void 0:ot.items)||OrderedSet(),at=((st=_e.get(et))==null?void 0:st.totalQueuedItemsCount)||0;return nt.includes(tt)||rt.includes(tt)?_e:_e.update(et,TimelineRecord(),ct=>ct.withMutations(ut=>{ut.set("totalQueuedItemsCount",at+1),ut.set("queuedItems",addStatusId(nt,tt).take(MAX_QUEUED_ITEMS))}))},shouldDelete=(_e,et)=>et?!(_e===`account:${et}`||_e.startsWith(`account:${et}:`)):!0,deleteStatus=(_e,et,tt,nt,rt)=>_e.withMutations(at=>{at.keySeq().forEach(it=>{shouldDelete(it,rt)&&(at.updateIn([it,"items"],ot=>ot.delete(et)),at.updateIn([it,"queuedItems"],ot=>ot.delete(et)))}),nt.forEach(it=>{deleteStatus(at,it[0],it[1],[],rt)})}),clearTimeline=(_e,et)=>_e.set(et,TimelineRecord()),updateTop=(_e,et,tt)=>_e.update(et,TimelineRecord(),nt=>nt.withMutations(rt=>{tt&&rt.set("unread",0),rt.set("top",tt)})),isReblogOf=(_e,et)=>_e.reblog===et.id,statusToReference=_e=>[_e.id,_e.account],buildReferencesTo=(_e,et)=>_e.filter(tt=>isReblogOf(tt,et)).map(statusToReference),filterTimelines=(_e,et,tt)=>_e.withMutations(nt=>{tt.forEach(rt=>{if(rt.account!==et.id)return;const at=buildReferencesTo(tt,rt);deleteStatus(nt,rt.id,rt.account.id,at,et.id)})}),timelineDequeue=(_e,et)=>{const tt=_e.getIn([et,"top"]);return _e.update(et,TimelineRecord(),nt=>nt.withMutations(rt=>{const at=rt.queuedItems;rt.update("items",it=>{const ot=mergeStatusIds(it,at);return tt?truncateIds(ot):ot}),rt.set("queuedItems",OrderedSet()),rt.set("totalQueuedItemsCount",0)}))},timelineConnect=(_e,et)=>_e.update(et,TimelineRecord(),tt=>tt.set("online",!0)),timelineDisconnect=(_e,et)=>_e.update(et,TimelineRecord(),tt=>tt.withMutations(nt=>{nt.set("online",!1),nt.get("items",OrderedSet()).isEmpty()})),getTimelinesForStatus=_e=>{var et;switch(_e.visibility){case"group":return[`group:${((et=_e.group)==null?void 0:et.id)||_e.group_id}`];case"direct":return["direct"];case"public":return["home","community","public"];default:return["home"]}},replaceId=(_e,et,tt)=>{const nt=List$1(_e),rt=nt.indexOf(et);return rt>-1?OrderedSet(nt.set(rt,tt)):_e},importPendingStatus=(_e,et,tt)=>{const nt=`末pending-${tt}`;return _e.withMutations(rt=>{getTimelinesForStatus(et).forEach(it=>{updateTimelineQueue(rt,it,nt)})})},replacePendingStatus=(_e,et,tt)=>{const nt=`末pending-${et}`;return _e.withMutations(rt=>{rt.keySeq().forEach(at=>{rt.updateIn([at,"items"],it=>replaceId(it,nt,tt)),rt.updateIn([at,"queuedItems"],it=>replaceId(it,nt,tt))})})},importStatus=(_e,et,tt)=>_e.withMutations(nt=>{replacePendingStatus(nt,tt,et.id),getTimelinesForStatus(et).forEach(at=>{updateTimeline(nt,at,et.id)})}),handleExpandFail=(_e,et)=>_e.withMutations(tt=>{setLoading(tt,et,!1),setFailed(tt,et,!0)});function timelines(_e=initialState,et){switch(et.type){case STATUS_CREATE_REQUEST:return et.params.scheduled_at?_e:importPendingStatus(_e,et.params,et.idempotencyKey);case STATUS_CREATE_SUCCESS:return et.status.scheduled_at||et.editing?_e:importStatus(_e,et.status,et.idempotencyKey);case TIMELINE_EXPAND_REQUEST:return setLoading(_e,et.timeline,!0);case TIMELINE_EXPAND_FAIL:return handleExpandFail(_e,et.timeline);case TIMELINE_EXPAND_SUCCESS:return expandNormalizedTimeline(_e,et.timeline,fromJS(et.statuses),et.next,et.prev,et.partial,et.isLoadingRecent,et.isLoadingMore);case TIMELINE_UPDATE:return updateTimeline(_e,et.timeline,et.statusId);case TIMELINE_UPDATE_QUEUE:return updateTimelineQueue(_e,et.timeline,et.statusId);case TIMELINE_DEQUEUE:return timelineDequeue(_e,et.timeline);case TIMELINE_DELETE:return deleteStatus(_e,et.id,et.accountId,et.references,et.reblogOf);case TIMELINE_CLEAR:return clearTimeline(_e,et.timeline);case ACCOUNT_BLOCK_SUCCESS:case ACCOUNT_MUTE_SUCCESS:return filterTimelines(_e,et.relationship,et.statuses);case TIMELINE_SCROLL_TOP:return updateTop(_e,et.timeline,et.top);case TIMELINE_CONNECT:return timelineConnect(_e,et.timeline);case TIMELINE_DISCONNECT:return timelineDisconnect(_e,et.timeline);case TIMELINE_REPLACE:return _e.update("home",TimelineRecord(),tt=>tt.withMutations(nt=>{nt.set("items",OrderedSet([]))})).update("home",TimelineRecord(),tt=>tt.set("feedAccountId",et.accountId));case TIMELINE_INSERT:return _e.update(et.timeline,TimelineRecord(),tt=>tt.withMutations(nt=>{nt.update("items",rt=>{let at=rt.toArray();at.find(st=>st.includes("末suggestions"))&&(at=at.slice(1));const ot=sample$1([5,6,7,8,9]);return rt.last()&&at.splice(ot,0,`末suggestions-${rt.last()}`),OrderedSet(at)})}));case TIMELINE_CLEAR_FEED_ACCOUNT_ID:return _e.update("home",TimelineRecord(),tt=>tt.set("feedAccountId",null));default:return _e}}const TRENDING_STATUSES_FETCH_REQUEST="TRENDING_STATUSES_FETCH_REQUEST",TRENDING_STATUSES_FETCH_SUCCESS="TRENDING_STATUSES_FETCH_SUCCESS",TRENDING_STATUSES_FETCH_FAIL="TRENDING_STATUSES_FETCH_FAIL",fetchTrendingStatuses=()=>(_e,et)=>{const nt=et().instance,rt=getFeatures(nt);if(!(!rt.trendingStatuses&&!rt.trendingTruths))return _e({type:TRENDING_STATUSES_FETCH_REQUEST}),api(et).get(rt.trendingTruths?"/api/v1/truth/trending/truths":"/api/v1/trends/statuses").then(({data:at})=>(_e(importFetchedStatuses(at)),_e({type:TRENDING_STATUSES_FETCH_SUCCESS,statuses:at}),at)).catch(at=>{_e({type:TRENDING_STATUSES_FETCH_FAIL,error:at})})},ReducerRecord$3=Record({items:OrderedSet(),isLoading:!1}),toIds=_e=>OrderedSet(_e.map(et=>et.id)),importStatuses=(_e,et)=>_e.withMutations(tt=>{tt.set("items",toIds(et)),tt.set("isLoading",!1)});function trending_statuses(_e=ReducerRecord$3(),et){switch(et.type){case TRENDING_STATUSES_FETCH_REQUEST:return _e.set("isLoading",!0);case TRENDING_STATUSES_FETCH_SUCCESS:return importStatuses(_e,et.statuses);default:return _e}}const TRENDS_FETCH_REQUEST="TRENDS_FETCH_REQUEST",TRENDS_FETCH_SUCCESS="TRENDS_FETCH_SUCCESS",TRENDS_FETCH_FAIL="TRENDS_FETCH_FAIL",fetchTrendsSuccess=_e=>({type:TRENDS_FETCH_SUCCESS,tags:_e,skipLoading:!0}),ReducerRecord$2=Record({items:List$1(),isLoading:!1});function trendsReducer(_e=ReducerRecord$2(),et){switch(et.type){case TRENDS_FETCH_REQUEST:return _e.set("isLoading",!0);case TRENDS_FETCH_SUCCESS:return _e.withMutations(tt=>{tt.set("items",List$1(et.tags.map(nt=>normalizeTag(nt)))),tt.set("isLoading",!1)});case TRENDS_FETCH_FAIL:return _e.set("isLoading",!1);default:return _e}}const BLOCKS_FETCH_SUCCESS="BLOCKS_FETCH_SUCCESS",BLOCKS_EXPAND_SUCCESS="BLOCKS_EXPAND_SUCCESS",DIRECTORY_FETCH_REQUEST="DIRECTORY_FETCH_REQUEST",DIRECTORY_FETCH_SUCCESS="DIRECTORY_FETCH_SUCCESS",DIRECTORY_FETCH_FAIL="DIRECTORY_FETCH_FAIL",DIRECTORY_EXPAND_REQUEST="DIRECTORY_EXPAND_REQUEST",DIRECTORY_EXPAND_SUCCESS="DIRECTORY_EXPAND_SUCCESS",DIRECTORY_EXPAND_FAIL="DIRECTORY_EXPAND_FAIL",fetchDirectory=_e=>(et,tt)=>{et(fetchDirectoryRequest()),api(tt).get("/api/v1/directory",{params:{..._e,limit:20}}).then(({data:nt})=>{et(importFetchedAccounts(nt)),et(fetchDirectorySuccess(nt)),et(fetchRelationships(nt.map(rt=>rt.id)))}).catch(nt=>et(fetchDirectoryFail(nt)))},fetchDirectoryRequest=()=>({type:DIRECTORY_FETCH_REQUEST}),fetchDirectorySuccess=_e=>({type:DIRECTORY_FETCH_SUCCESS,accounts:_e}),fetchDirectoryFail=_e=>({type:DIRECTORY_FETCH_FAIL,error:_e}),expandDirectory=_e=>(et,tt)=>{et(expandDirectoryRequest());const nt=tt().user_lists.directory.items.size;api(tt).get("/api/v1/directory",{params:{..._e,offset:nt,limit:20}}).then(({data:rt})=>{et(importFetchedAccounts(rt)),et(expandDirectorySuccess(rt)),et(fetchRelationships(rt.map(at=>at.id)))}).catch(rt=>et(expandDirectoryFail(rt)))},expandDirectoryRequest=()=>({type:DIRECTORY_EXPAND_REQUEST}),expandDirectorySuccess=_e=>({type:DIRECTORY_EXPAND_SUCCESS,accounts:_e}),expandDirectoryFail=_e=>({type:DIRECTORY_EXPAND_FAIL,error:_e}),FAMILIAR_FOLLOWERS_FETCH_REQUEST="FAMILIAR_FOLLOWERS_FETCH_REQUEST",FAMILIAR_FOLLOWERS_FETCH_SUCCESS="FAMILIAR_FOLLOWERS_FETCH_SUCCESS",FAMILIAR_FOLLOWERS_FETCH_FAIL="FAMILIAR_FOLLOWERS_FETCH_FAIL",fetchAccountFamiliarFollowers=_e=>(et,tt)=>{et({type:FAMILIAR_FOLLOWERS_FETCH_REQUEST,id:_e}),api(tt).get(`/api/v1/accounts/familiar_followers?id=${_e}`).then(({data:nt})=>{const rt=nt.find(({id:at})=>at===_e).accounts;et(importFetchedAccounts(rt)),et(fetchRelationships(rt.map(at=>at.id))),et({type:FAMILIAR_FOLLOWERS_FETCH_SUCCESS,id:_e,accounts:rt})}).catch(nt=>et({type:FAMILIAR_FOLLOWERS_FETCH_FAIL,id:_e,error:nt,skipAlert:!0}))},ListRecord=Record({next:null,items:OrderedSet(),isLoading:!1}),ReactionRecord=Record({accounts:OrderedSet(),count:0,name:"",url:null}),ReactionListRecord=Record({next:null,items:OrderedSet(),isLoading:!1}),ParticipationRequestRecord=Record({account:"",participation_message:null}),ParticipationRequestListRecord=Record({next:null,items:OrderedSet(),isLoading:!1}),ReducerRecord$1=Record({followers:Map$3(),following:Map$3(),reblogged_by:Map$3(),favourited_by:Map$3(),disliked_by:Map$3(),reactions:Map$3(),follow_requests:ListRecord(),blocks:ListRecord(),mutes:ListRecord(),directory:ListRecord({isLoading:!0}),pinned:Map$3(),birthday_reminders:Map$3(),familiar_followers:Map$3(),event_participations:Map$3(),event_participation_requests:Map$3(),membership_requests:Map$3(),group_blocks:Map$3()}),normalizeList=(_e,et,tt,nt)=>_e.setIn(et,ListRecord({next:nt,items:OrderedSet(tt.map(rt=>rt.id))})),appendToList=(_e,et,tt,nt)=>_e.updateIn(et,rt=>rt.set("next",nt).set("isLoading",!1).update("items",at=>at.concat(tt.map(it=>it.id)))),removeFromList=(_e,et,tt)=>_e.updateIn(et,nt=>nt.update("items",rt=>rt.filterNot(at=>at===tt))),normalizeFollowRequest=(_e,et)=>_e.updateIn(["follow_requests","items"],tt=>OrderedSet([et.account.id]).union(tt));function userLists(_e=ReducerRecord$1(),et){switch(et.type){case FOLLOWERS_FETCH_SUCCESS:return normalizeList(_e,["followers",et.id],et.accounts,et.next);case FOLLOWERS_EXPAND_SUCCESS:return appendToList(_e,["followers",et.id],et.accounts,et.next);case FOLLOWING_FETCH_SUCCESS:return normalizeList(_e,["following",et.id],et.accounts,et.next);case FOLLOWING_EXPAND_SUCCESS:return appendToList(_e,["following",et.id],et.accounts,et.next);case REBLOGS_FETCH_SUCCESS:return normalizeList(_e,["reblogged_by",et.id],et.accounts,et.next);case REBLOGS_EXPAND_SUCCESS:return appendToList(_e,["reblogged_by",et.id],et.accounts,et.next);case FAVOURITES_FETCH_SUCCESS:return normalizeList(_e,["favourited_by",et.id],et.accounts,et.next);case FAVOURITES_EXPAND_SUCCESS:return appendToList(_e,["favourited_by",et.id],et.accounts,et.next);case DISLIKES_FETCH_SUCCESS:return normalizeList(_e,["disliked_by",et.id],et.accounts);case REACTIONS_FETCH_SUCCESS:return _e.setIn(["reactions",et.id],ReactionListRecord({items:OrderedSet(et.reactions.map(({accounts:tt,...nt})=>ReactionRecord({...nt,accounts:OrderedSet(tt.map(rt=>rt.id))})))}));case NOTIFICATIONS_UPDATE:return et.notification.type==="follow_request"?normalizeFollowRequest(_e,et.notification):_e;case FOLLOW_REQUESTS_FETCH_SUCCESS:return normalizeList(_e,["follow_requests"],et.accounts,et.next);case FOLLOW_REQUESTS_EXPAND_SUCCESS:return appendToList(_e,["follow_requests"],et.accounts,et.next);case FOLLOW_REQUEST_AUTHORIZE_SUCCESS:case FOLLOW_REQUEST_REJECT_SUCCESS:return removeFromList(_e,["follow_requests"],et.id);case BLOCKS_FETCH_SUCCESS:return normalizeList(_e,["blocks"],et.accounts,et.next);case BLOCKS_EXPAND_SUCCESS:return appendToList(_e,["blocks"],et.accounts,et.next);case DIRECTORY_FETCH_SUCCESS:return normalizeList(_e,["directory"],et.accounts,et.next);case DIRECTORY_EXPAND_SUCCESS:return appendToList(_e,["directory"],et.accounts,et.next);case DIRECTORY_FETCH_REQUEST:case DIRECTORY_EXPAND_REQUEST:return _e.setIn(["directory","isLoading"],!0);case DIRECTORY_FETCH_FAIL:case DIRECTORY_EXPAND_FAIL:return _e.setIn(["directory","isLoading"],!1);case PINNED_ACCOUNTS_FETCH_SUCCESS:return normalizeList(_e,["pinned",et.id],et.accounts,et.next);case BIRTHDAY_REMINDERS_FETCH_SUCCESS:return normalizeList(_e,["birthday_reminders",et.id],et.accounts,et.next);case FAMILIAR_FOLLOWERS_FETCH_SUCCESS:return normalizeList(_e,["familiar_followers",et.id],et.accounts,et.next);case EVENT_PARTICIPATIONS_FETCH_SUCCESS:return normalizeList(_e,["event_participations",et.id],et.accounts,et.next);case EVENT_PARTICIPATIONS_EXPAND_SUCCESS:return appendToList(_e,["event_participations",et.id],et.accounts,et.next);case EVENT_PARTICIPATION_REQUESTS_FETCH_SUCCESS:return _e.setIn(["event_participation_requests",et.id],ParticipationRequestListRecord({next:et.next,items:OrderedSet(et.participations.map(({account:tt,participation_message:nt})=>ParticipationRequestRecord({account:tt.id,participation_message:nt})))}));case EVENT_PARTICIPATION_REQUESTS_EXPAND_SUCCESS:return _e.updateIn(["event_participation_requests",et.id,"items"],tt=>tt.union(et.participations.map(({account:nt,participation_message:rt})=>ParticipationRequestRecord({account:nt.id,participation_message:rt}))));case EVENT_PARTICIPATION_REQUEST_AUTHORIZE_SUCCESS:case EVENT_PARTICIPATION_REQUEST_REJECT_SUCCESS:return _e.updateIn(["event_participation_requests",et.id,"items"],tt=>tt.filter(({account:nt})=>nt!==et.accountId));case GROUP_MEMBERSHIP_REQUESTS_FETCH_SUCCESS:return normalizeList(_e,["membership_requests",et.id],et.accounts,et.next);case GROUP_MEMBERSHIP_REQUESTS_EXPAND_SUCCESS:return appendToList(_e,["membership_requests",et.id],et.accounts,et.next);case GROUP_MEMBERSHIP_REQUESTS_FETCH_REQUEST:case GROUP_MEMBERSHIP_REQUESTS_EXPAND_REQUEST:return _e.setIn(["membership_requests",et.id,"isLoading"],!0);case GROUP_MEMBERSHIP_REQUESTS_FETCH_FAIL:case GROUP_MEMBERSHIP_REQUESTS_EXPAND_FAIL:return _e.setIn(["membership_requests",et.id,"isLoading"],!1);case GROUP_MEMBERSHIP_REQUEST_AUTHORIZE_SUCCESS:case GROUP_MEMBERSHIP_REQUEST_REJECT_SUCCESS:return _e.updateIn(["membership_requests",et.groupId,"items"],tt=>tt.filterNot(nt=>nt===et.accountId));case GROUP_BLOCKS_FETCH_SUCCESS:return normalizeList(_e,["group_blocks",et.id],et.accounts,et.next);case GROUP_BLOCKS_EXPAND_SUCCESS:return appendToList(_e,["group_blocks",et.id],et.accounts,et.next);case GROUP_BLOCKS_FETCH_REQUEST:case GROUP_BLOCKS_EXPAND_REQUEST:return _e.setIn(["group_blocks",et.id,"isLoading"],!0);case GROUP_BLOCKS_FETCH_FAIL:case GROUP_BLOCKS_EXPAND_FAIL:return _e.setIn(["group_blocks",et.id,"isLoading"],!1);case GROUP_UNBLOCK_SUCCESS:return _e.updateIn(["group_blocks",et.groupId,"items"],tt=>tt.filterNot(nt=>nt===et.accountId));default:return _e}}const ReducerRecord=Record({ageMinimum:null,currentChallenge:null,isLoading:!1,isComplete:!1,token:null,instance:Map$3()});function verification(_e=ReducerRecord(),et){switch(et.type){case PEPE_FETCH_INSTANCE_SUCCESS:return _e.set("instance",Map$3(fromJS(et.instance)));case FETCH_CHALLENGES_SUCCESS:return _e.set("ageMinimum",et.ageMinimum).set("currentChallenge",et.currentChallenge).set("isLoading",!1).set("isComplete",et.isComplete);case FETCH_TOKEN_SUCCESS:return _e.set("isLoading",!1).set("token",et.value);case SET_CHALLENGES_COMPLETE:return _e.set("isLoading",!1).set("isComplete",!0);case SET_NEXT_CHALLENGE:return _e.set("currentChallenge",et.challenge).set("isLoading",!1);case SET_LOADING:return _e.set("isLoading",typeof et.value=="boolean"?et.value:!0);default:return _e}}const reducers={account_notes,accounts_meta,admin,admin_announcements:adminAnnouncementsReducer,admin_log,admin_user_index,aliases:aliasesReducer,announcements:announcementsReducer,auth,backups,chat_message_lists:chatMessageLists,chat_messages:chatMessages,chats,compose,compose_event,contexts:replies,conversations,custom_emojis,domain_lists:domainLists,dropdown_menu:dropdownMenu,entities:reducer$1,filters,followed_tags,group_memberships:groupMemberships,group_relationships:groupRelationships,groups,history,instance,listAdder:listAdderReducer,listEditor:listEditorReducer,lists,locations:accounts,me,meta,modals:modal,mutes,notifications,onboarding,patron,pending_statuses,polls,profile_hover_card:profileHoverCard,push_notifications:push_subscriptions,relationships,reports,rules,scheduled_statuses,search,security,settings,sidebar,soapbox,status_hover_card:statusHoverCard,status_lists:statusLists,statuses,suggestions:suggestionsReducer,tags,timelines,trending_statuses,trends:trendsReducer,user_lists:userLists,verification},StateRecord=Record(Object.keys(reducers).reduce((_e,et)=>(_e[et]=void 0,_e),{})),appReducer=combineReducers(reducers,StateRecord),logOut=(_e=StateRecord())=>(NODE_ENV==="production"&&(location.href="/login"),StateRecord(["instance","soapbox","custom_emojis","auth"].reduce((tt,nt)=>(tt[nt]=_e.get(nt),tt),{}))),rootReducer=(_e,et)=>{switch(et.type){case AUTH_LOGGED_OUT:return appReducer(logOut(_e),et);default:return appReducer(_e,et)}},store=configureStore({reducer:rootReducer,middleware:[thunk$1,errorsMiddleware(),soundsMiddleware()],devTools:!0});createGlobals(store);store.dispatch(preload());store.dispatch(checkOnboardingStatus());var loadInitial=function _e(){return function(){var et=_asyncToGenerator(regeneratorRuntime.mark(function tt(nt,rt){var at,it,ot;return regeneratorRuntime.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:return ct.next=2,nt(fetchMe());case 2:return ct.next=4,nt(loadInstance());case 4:return ct.next=6,nt(loadSoapboxConfig());case 6:if(at=rt(),it=getSoapboxConfig(at),ot=it.getIn(["extensions","pepe","enabled"])===!0,!(ot&&!at.me)){ct.next=12;break}return ct.next=12,nt(fetchVerificationConfig());case 12:case"end":return ct.stop()}},tt)}));return function(tt,nt){return et.apply(this,arguments)}}()},SoapboxMount=function _e(){var et;useCachedLocationHandler();var tt=useAppSelector(function(vt){return vt.me}),nt=useInstance(),rt=useOwnAccount(),at=rt.account,it=useSoapboxConfig(),ot=useFeatures(),st=useRegistrationStatus(),ct=st.pepeEnabled,ut=at&&((et=at.source)===null||et===void 0?void 0:et.approved)===!1,dt=useAppSelector(function(vt){return vt.onboarding.needsOnboarding}),ft=at&&!ut&&dt,pt=it.redirectRootNoLogin,mt=function(gt,St){var Rt,$t,bt,wt=St.location;return!((Rt=wt.state)!==null&&Rt!==void 0&&Rt.soapboxModalKey&&(($t=wt.state)===null||$t===void 0?void 0:$t.soapboxModalKey)!==(gt==null||(bt=gt.location)===null||bt===void 0||(bt=bt.state)===null||bt===void 0?void 0:bt.soapboxModalKey))},ht=function(){return _createRawReactElement(BundleContainer,{fetchComponent:OnboardingWizard,loading:LoadingScreen},void 0,function(gt){return _createRawReactElement(gt,{})})},Et=function(){return _createRawReactElement(Switch,{},void 0,_createRawReactElement(Redirect,{from:"/v1/verify_email/:token",to:"/verify/email/:token"}),ct?_createRawReactElement(Redirect,{from:"/signup",to:"/verify"}):_createRawReactElement(Redirect,{from:"/verify",to:"/signup"}),ut&&_createRawReactElement(Route$1,{render:function(St){return _createRawReactElement(BundleContainer,{fetchComponent:WaitlistPage,loading:LoadingScreen},void 0,function(Rt){return React$3.createElement(Rt,_extends$4({},St,{account:at}))})}}),!tt&&(pt?_createRawReactElement(Redirect,{exact:!0,from:"/",to:pt}):_createRawReactElement(Route$1,{exact:!0,path:"/",component:PublicLayout})),!tt&&_createRawReactElement(Route$1,{exact:!0,path:"/",component:PublicLayout}),_createRawReactElement(Route$1,{exact:!0,path:"/about/:slug?",component:PublicLayout}),_createRawReactElement(Route$1,{path:"/login",component:AuthLayout}),ot.accountCreation&&nt.registrations&&_createRawReactElement(Route$1,{exact:!0,path:"/signup",component:AuthLayout}),ct&&_createRawReactElement(Route$1,{path:"/verify",component:AuthLayout}),_createRawReactElement(Route$1,{path:"/reset-password",component:AuthLayout}),_createRawReactElement(Route$1,{path:"/edit-password",component:AuthLayout}),_createRawReactElement(Route$1,{path:"/invite/:token",component:AuthLayout}),_createRawReactElement(Route$1,{path:"/",component:UI}))},yt=function(){return ft?ht():Et()};return _createRawReactElement(ErrorBoundary$1,{},void 0,_createRawReactElement(BrowserRouter,{basename:FE_SUBDIRECTORY},void 0,_createRawReactElement(CompatRouter,{},void 0,_createRawReactElement(ScrollBehaviorContext,{shouldUpdateScroll:mt},void 0,_createRawReactElement(Switch,{},void 0,_createRawReactElement(Route$1,{path:"/embed/:statusId",render:function(gt){return _createRawReactElement(EmbeddedStatus,{params:gt.match.params})}}),_createRawReactElement(Redirect,{from:"/@:username/:statusId/embed",to:"/embed/:statusId"}),_createRawReactElement(Route$1,{},void 0,yt(),_createRawReactElement(BundleContainer,{fetchComponent:ModalContainer},void 0,function(vt){return _createRawReactElement(vt,{})}),_createRawReactElement(GdprBanner,{}),_createRawReactElement("div",{id:"toaster"},void 0,_createRawReactElement(Toaster,{position:"top-right",containerClassName:"top-10",containerStyle:{top:75}}))))))))},SoapboxLoad=function _e(et){var tt=et.children,nt=useAppDispatch(),rt=useAppSelector(function(bt){return bt.me}),at=useOwnAccount(),it=at.account,ot=useAppSelector(function(bt){return bt.meta.swUpdating}),st=useLocale(),ct=st.locale,ut=reactExports.useState({}),dt=_slicedToArray$4(ut,2),ft=dt[0],pt=dt[1],mt=reactExports.useState(!0),ht=_slicedToArray$4(mt,2),Et=ht[0],yt=ht[1],vt=reactExports.useState(!1),gt=_slicedToArray$4(vt,2),St=gt[0],Rt=gt[1],$t=[rt===null,rt&&!it,!St,Et,ot].some(Boolean);return reactExports.useEffect(function(){messages$1a[ct]().then(function(bt){pt(bt),yt(!1)}).catch(function(){})},[ct]),reactExports.useEffect(function(){nt(loadInitial()).then(function(){Rt(!0)}).catch(function(){Rt(!0)})},[]),$t?_createRawReactElement(LoadingScreen,{}):_createRawReactElement(IntlProvider$1,{locale:ct,messages:ft},void 0,tt)},SoapboxHead=function _e(et){var tt=et.children,nt=useLocale(),rt=nt.locale,at=nt.direction,it=useSettings(),ot=useSoapboxConfig(),st=!!it.get("demo"),ct=useTheme()==="dark",ut=generateThemeCss(st?normalizeSoapboxConfig({brandColor:"#0482d8"}):ot),dt=clsx("h-full bg-white text-base dark:bg-gray-800",{"no-reduce-motion":!it.get("reduceMotion"),"underline-links":it.get("underlineLinks"),demetricator:it.get("demetricator")});return React$3.createElement(React$3.Fragment,null,_createRawReactElement(Helmet,{},void 0,_createRawReactElement("html",{lang:rt,className:clsx("h-full",{dark:ct})}),_createRawReactElement("body",{className:dt,dir:at}),ut&&_createRawReactElement("style",{id:"theme",type:"text/css",nonce:window.__webpack_nonce__},void 0,":root{".concat(ut,"}")),ct&&_createRawReactElement("style",{type:"text/css",nonce:window.__webpack_nonce__},void 0,":root { color-scheme: dark; }"),_createRawReactElement("meta",{name:"theme-color",content:ot.brandColor})),tt)},Soapbox=function _e(){return _createRawReactElement(Provider,{store},void 0,_createRawReactElement(QueryClientProvider,{client:queryClient},void 0,_createRawReactElement(StatProvider,{},void 0,_createRawReactElement(SoapboxHead,{},void 0,_createRawReactElement(SoapboxLoad,{},void 0,_createRawReactElement(SoapboxMount,{}))))))};function ready(_e){["interactive","complete"].includes(document.readyState)?_e():document.addEventListener("DOMContentLoaded",_e)}try{window.__webpack_nonce__=window._akkomaNonce}catch(_e){window.__webpack_nonce__=""}start();NODE_ENV==="production"&&(printConsoleWarning(),registerSw("/sw.js"));ready(function(){NODE_ENV!=="production"&&(window.__webpack_nonce__=window.__webpack_nonce__||"NONCE_PLACEHOLDER");var _e=document.querySelector("#_goober");_e instanceof HTMLStyleElement&&(_e.nonce=window.__webpack_nonce__);var et=document.getElementById("soapbox"),tt=createRoot(et);tt.render(_createRawReactElement(Soapbox,{}))});export{clearFeedAccountId as $,Icon$1 as A,AccountContainer as B,vitePluginRequire_1697861828078_74376444 as C,vitePluginRequire_1697861810834_58630734 as D,Emoji as E,FormattedMessage$1 as F,vitePluginRequire_1697861820197_45123345 as G,HStack as H,Icon as I,vitePluginRequire_1697861810834_97586508 as J,vitePluginRequire_1697861812355_68809854 as K,Link$2 as L,createSelector as M,getSettings as N,List$1 as O,PlaceholderStatusContent as P,debounce$2 as Q,React$3 as R,Status as S,Tabs as T,expandNotifications as U,scrollTopNotifications as V,clsx as W,Column as X,dequeueNotifications as Y,fetchRelationships as Z,_defineProperty$7 as _,_createRawReactElement as a,Card$1 as a$,expandHomeTimeline as a0,fetchSuggestionsForTimeline as a1,Stack as a2,useTimelineStream as a3,expandPublicTimeline as a4,vitePluginRequire_1697861811668_44144977 as a5,changeSetting as a6,useHistory as a7,expandRemoteTimeline as a8,IconButton as a9,expandListTimeline as aA,Spinner as aB,MissingIndicator as aC,openModal as aD,fetchLists as aE,vitePluginRequire_1697861809668_56661171 as aF,IconButton$1 as aG,vitePluginRequire_1697861811799_72054898 as aH,deleteList as aI,expandBookmarkedStatuses as aJ,fetchBookmarkedStatuses as aK,makeGetStatus as aL,fetchNext as aM,Redirect as aN,PlaceholderStatus$1 as aO,_asyncToGenerator as aP,fetchStatusWithContext as aQ,selectOwnAccount as aR,fetchPinnedStatuses as aS,makeGetStatusIds as aT,useSoapboxConfig as aU,useAccountLookup as aV,fetchAccountByUsername as aW,expandAccountFeaturedTimeline as aX,fetchPatronAccount as aY,expandAccountTimeline as aZ,CardBody as a_,Button as aa,expandCommunityTimeline as ab,expandHashtagTimeline as ac,fetchHashtag as ad,clearTimeline$1 as ae,List as af,ListItem as ag,Toggle as ah,unfollowHashtag as ai,followHashtag as aj,expandDirectTimeline as ak,directComposeById as al,selectAccount as am,markConversationRead as an,expandConversations as ao,mountConversations as ap,unmountConversations as aq,useLoggedIn as ar,_objectWithoutProperties as as,_slicedToArray$4 as at,AutosuggestAccountInput as au,_extends$4 as av,SvgIcon as aw,vitePluginRequire_1697861811668_22999030 as ax,useParams as ay,fetchList as az,PlaceholderAvatar as b,changeReportComment as b$,getAccountGallery as b0,expandAccountMediaTimeline as b1,Account as b2,useAccount as b3,authorizeFollowRequest as b4,rejectFollowRequest as b5,expandFollowRequests as b6,fetchFollowRequests as b7,useOwnAccount as b8,OrderedSet as b9,RelativeTimestamp$1 as bA,deleteFilter as bB,fetchFilter as bC,normalizeFilter as bD,Form as bE,FormGroup as bF,Input as bG,SelectDropdown as bH,FormActions as bI,updateFilter as bJ,createFilter as bK,_toConsumableArray as bL,getSoapboxConfig as bM,ReportableEntities as bN,Video as bO,Audio$1 as bP,MediaGallery as bQ,StatusContent$1 as bR,toggleStatusReport as bS,isRemote as bT,fetchRules as bU,getDomain as bV,vitePluginRequire_1697861812358_77020136 as bW,changeReportBlock as bX,changeReportForward as bY,Textarea as bZ,changeReportRule as b_,expandFavouritedStatuses as ba,expandAccountFavouritedStatuses as bb,fetchFavouritedStatuses as bc,fetchAccount as bd,fetchAccountFavouritedStatuses as be,vitePluginRequire_1697861824033_95555301 as bf,unblockDomain as bg,expandDomainBlocks as bh,fetchDomainBlocks as bi,useApi as bj,useEntities as bk,groupSchema as bl,Entities as bm,useUnmuteGroup as bn,GroupAvatar as bo,toast as bp,useBatchedEntities as bq,relationshipSchema as br,accountSchema as bs,DurationSelector as bt,Modal as bu,closeModal as bv,muteAccount as bw,toggleHideNotifications as bx,changeMuteDuration as by,fetchFilters as bz,PlaceholderDisplayName$1 as c,engineUserAgent as c$,ProgressBar as c0,AttachmentThumbs as c1,submitReportSuccess as c2,submitReport as c3,submitReportFail as c4,blockAccount as c5,vitePluginRequire_1697861833288_32864874 as c6,Avatar as c7,useGetState as c8,useTransaction as c9,ActionButton as cA,commonjsGlobal$2 as cB,require$$0$1 as cC,getDefaultExportFromCjs$1 as cD,Map$3 as cE,v4 as cF,Record as cG,makeGetAccount as cH,calculateStatus as cI,normalizeStatus as cJ,StatusReplyMentions as cK,QuotedStatusContainer$1 as cL,PlaceholderCard$1 as cM,PollOption as cN,DropdownMenu as cO,vitePluginRequire_1697861833285_7157681 as cP,vitePluginRequire_1697861809669_7698334 as cQ,changeListEditorTitle as cR,submitListEditor as cS,_export as cT,toObject$e as cU,lengthOfArrayLike$b as cV,arraySetLength as cW,deletePropertyOrThrow$1 as cX,doesNotExceedSafeInteger$2 as cY,task$1 as cZ,global$w as c_,accountIdsToAccts as ca,badgeToTag as cb,tagToBadge as cc,setRole as cd,getBadges as ce,OutlineBox as cf,isLocal as cg,vitePluginRequire_1697861810833_45315206 as ch,deactivateUserModal as ci,deleteUserModal as cj,setBadges as ck,throttle$1 as cl,ae as cm,scrollTopTimeline as cn,Portal$1 as co,dequeueTimeline as cp,vitePluginRequire_1697861810836_81866597 as cq,__vitePreload as cr,useQuery as cs,filteredArray as ct,adSchema as cu,useQueryClient as cv,axios$1 as cw,Card as cx,CardTitle as cy,VerificationBadge as cz,useAppDispatch as d,vitePluginRequire_1697861811668_43235124 as d$,isCallable$t as d0,arraySlice$4 as d1,validateArgumentsLength$2 as d2,functionApply as d3,shortNumberFormat as d4,reduceEmoji as d5,getActualStatus as d6,StatusContainer as d7,FormattedDate as d8,StatusInfo as d9,stringMultibyte as dA,descriptors$1 as dB,functionBindContext as dC,defineBuiltIn$f as dD,defineBuiltInAccessor$8 as dE,setToStringTag$7 as dF,web_urlSearchParams_constructor as dG,internalState as dH,anInstance$4 as dI,urlConstructorDetection as dJ,hasOwnProperty_1 as dK,arrayFrom as dL,arraySliceSimple as dM,toString$t as dN,functionCall as dO,fails$F as dP,objectKeys$2 as dQ,indexedObject as dR,objectGetOwnPropertySymbols as dS,objectPropertyIsEnumerable as dT,_inherits$1 as dU,_classCallCheck$1 as dV,_assertThisInitialized$1 as dW,_createClass$1 as dX,_getPrototypeOf$1 as dY,_possibleConstructorReturn$1 as dZ,useHotkey as d_,vitePluginRequire_1697861811664_62987830 as da,vitePluginRequire_1697861810834_33454440 as db,vitePluginRequire_1697861811805_60977601 as dc,defaultMediaVisibility as dd,textForScreenReader as de,StatusActionBar as df,Tombstone as dg,StillImage as dh,isIOS as di,Blurhash$1 as dj,vitePluginRequire_1697861828084_81550747 as dk,arrayMethodIsStrict$4 as dl,toIndexedObject$a as dm,toIntegerOrInfinity$4 as dn,vitePluginRequire_1697861823905_3845308 as dp,GroupRelationship as dq,GroupPrivacy as dr,GroupMemberCount as ds,vitePluginRequire_1697861824033_64069345 as dt,truncateFilename as du,MIMETYPE_ICONS as dv,vitePluginRequire_1697861837850_7280158 as dw,vitePluginRequire_1697861806677_55396631 as dx,vitePluginRequire_1697861806677_81747454 as dy,functionUncurryThis as dz,emojiData as e,useMutation as e$,isUserTouching as e0,propTypesExports as e1,ReplyIndicator as e2,injectIntl as e3,spring as e4,OptionalMotion as e5,useCompose as e6,useDraggedFiles as e7,ComposeForm as e8,useGroup as e9,SiteLogo as eA,fetchBirthdayReminders as eB,changeAccountNoteComment as eC,submitAccountNote as eD,removeFromListEditor as eE,addToListEditor as eF,changeListSuggestions as eG,fetchListSuggestions as eH,clearListSuggestions as eI,setupListEditor as eJ,resetListEditor as eK,CardHeader as eL,removeFromListAdder as eM,addToListAdder as eN,setupListAdder as eO,resetListAdder as eP,fetchTrendingStatuses as eQ,expandSearch as eR,setSearchAccount as eS,setFilter as eT,Search as eU,generateText as eV,randomIntFromInterval as eW,useDispatch as eX,logOut$1 as eY,fetchMfa as eZ,Preferences as e_,uploadCompose as ea,cancelReplyCompose as eb,setGroupTimelineVisible as ec,usePrevious$1 as ed,cancelEventCompose as ee,queryClient as ef,PolicyKeys as eg,removeFromMentions as eh,addToMentions as ei,statusToMentionsAccountIdsArray as ej,useRegistrationStatus as ek,remoteInteraction as el,fetchConfig as em,ConfigDB as en,updateConfig as eo,Set$3 as ep,makeGetRemoteInstance as eq,Divider as er,fetchReblogs as es,fetchStatus as et,expandReblogs as eu,fetchFavourites as ev,expandFavourites as ew,fetchDislikes as ex,ReactionRecord as ey,fetchReactions as ez,useSettings as f,Route$1 as f$,patchMeSuccess as f0,BirthdayInput as f1,isDefaultAvatar as f2,isDefaultHeader as f3,patchMe as f4,updateNotificationSettings as f5,arraySpeciesCreate$2 as f6,createProperty$6 as f7,arrayMethodHasSpeciesSupport$4 as f8,toAbsoluteIndex$4 as f9,getLinks as fA,normalizeAccount as fB,fetchBackups as fC,createBackup as fD,disableMfa$1 as fE,fetchBackupCodes as fF,setupMfa as fG,confirmMfa as fH,useChat as fI,useChatContext as fJ,useChats as fK,useChatActions as fL,Tooltip as fM,secondsToDays as fN,Menu as fO,MenuButton as fP,MenuList as fQ,MessageExpirationValues as fR,MenuItem$1 as fS,vitePluginRequire_1697861828079_95498444 as fT,vitePluginRequire_1697861824494_13661183 as fU,unblockAccount as fV,SettingToggle as fW,vitePluginRequire_1697861809669_39550187 as fX,vitePluginRequire_1697861809581_59959258 as fY,matchPath$1 as fZ,Switch as f_,resizeImage$1 as fa,changeEmail as fb,promiseNativeConstructor as fc,getBuiltIn$c as fd,speciesConstructor$2 as fe,promiseResolve$1 as ff,confirmChangedEmail as fg,buildErrorMessage as fh,changePassword as fi,PasswordIndicator as fj,deleteAccount as fk,isArray$b as fl,addToUnscopables$5 as fm,supportsPassiveEvents as fn,Overlay as fo,normalizeSoapboxConfig as fp,defaultSettings as fq,useSystemTheme as fr,BackgroundShapes as fs,generateThemeCss as ft,fromJS as fu,ThemeSelector as fv,updateSoapboxConfig as fw,uploadMedia as fx,objectGetPrototypeOf as fy,api as fz,useFeatures as g,isArrayLike_1 as g$,ChatProvider as g0,createDescendantContext as g1,createNamedContext as g2,useDescendantsInit as g3,useId as g4,makeId as g5,DescendantProvider as g6,isFunction as g7,useUpdateEffect as g8,useComposedRefs as g9,fetchChats as gA,Select as gB,messageExpirationOptions as gC,useStatContext as gD,LinkFooter as gE,useRouteMatch as gF,approveUsers$1 as gG,deleteUsers$1 as gH,fetchUsers as gI,isNumber as gJ,FormattedNumber as gK,tuple as gL,parseVersion as gM,sourceCode as gN,StatusMedia as gO,deleteStatusModal as gP,makeGetReport as gQ,HoverRefWrapper as gR,closeReports as gS,fetchReports as gT,fetchModerationLog as gU,_baseGetTag as gV,isArray_1 as gW,isObjectLike_1 as gX,identity_1 as gY,_baseForOwn as gZ,_overArg as g_,useIsomorphicLayoutEffect as ga,composeEventHandlers as gb,Popover$1 as gc,positionMatchWidth as gd,useStatefulRefValue as ge,useDescendant as gf,useDescendants as gg,noop$2 as gh,UploadButton as gi,vitePluginRequire_1697861836348_79858855 as gj,textAtCursorMatchesToken as gk,search$1 as gl,emojify as gm,EmojiSelector as gn,ChatKeys as go,onlyEmoji as gp,initReport as gq,vitePluginRequire_1697861810834_83829185 as gr,stripHTML as gs,Link as gt,useChatMessages as gu,normalizeAttachment as gv,useInfiniteQuery as gw,flattenPages as gx,getNextLink as gy,ChatWidgetScreens as gz,hoistNonReactStatics$1 as h,switchAccount as h$,_baseIteratee as h0,_arrayMap as h1,_baseAssignValue as h2,eq_1 as h3,keys_1 as h4,isObject_1 as h5,_isPrototype as h6,_arrayLikeKeys as h7,_root as h8,_getSymbols as h9,FormattedList as hA,Badge as hB,Markup as hC,vitePluginRequire_1697861810877_74518360 as hD,vitePluginRequire_1697861810877_40645275 as hE,vitePluginRequire_1697861828130_67878877 as hF,capitalize$2 as hG,useEntity as hH,patronUserSchema as hI,NavLink as hJ,fetchPinnedAccounts as hK,WhoToFollowPanel as hL,BundleContainer as hM,vitePluginRequire_1697861810834_40852917 as hN,vitePluginRequire_1697861828084_9357167 as hO,is$2 as hP,makeGetOtherAccounts as hQ,useGroupsPath as hR,fetchOwnAccounts as hS,vitePluginRequire_1697861809668_3303363 as hT,vitePluginRequire_1697861810834_3571213 as hU,vitePluginRequire_1697861809669_92946826 as hV,vitePluginRequire_1697861825077_25405513 as hW,vitePluginRequire_1697861826920_76919417 as hX,vitePluginRequire_1697861809669_87134921 as hY,vitePluginRequire_1697861810834_50970931 as hZ,closeSidebar as h_,_arrayPush as ha,stubArray_1 as hb,_baseGetAllKeys as hc,_Uint8Array as hd,_Symbol as he,_getTag as hf,_nodeUtilExports as hg,_baseUnary as hh,_Stack as hi,isBufferExports as hj,_getAllKeys as hk,PropTypes as hl,isMobile as hm,compareId as hn,hueShift as ho,getHost$1 as hp,vitePluginRequire_1697861824494_3975291 as hq,vitePluginRequire_1697861808850_96938226 as hr,fetchSoapboxConfig as hs,displayFqn as ht,getAcct as hu,Banner as hv,fetchPatronInstance as hw,fetchTrendsSuccess as hx,normalizeTag as hy,fetchAccountFamiliarFollowers as hz,vitePluginRequire_1697861820192_13017256 as i,fetchAliases as i$,AccountModerationModal as i0,AccountNoteModal as i1,ActionsModal as i2,BirthdaysModal as i3,BoostModal as i4,CompareHistoryModal as i5,ComponentModal as i6,ComposeModal as i7,ComposeEventModal as i8,ConfirmationModal as i9,UnauthorizedModal as iA,VerifySmsModal as iB,VideoModal as iC,connect as iD,cancelReport as iE,showProfileHoverCard as iF,closeProfileHoverCard as iG,UserPanel as iH,updateProfileHoverCard as iI,reactDomExports as iJ,isEqual as iK,showStatusHoverCard as iL,closeStatusHoverCard as iM,updateStatusHoverCard as iN,cancelScheduledStatus as iO,vitePluginRequire_1697861833511_46927792 as iP,expandScheduledStatuses as iQ,fetchScheduledStatuses as iR,fetchUserIndex as iS,expandUserIndex as iT,setUserIndexQuery as iU,makeGetHosts as iV,federationRestrictionsDisclosed as iW,addToAliases as iX,changeAliasesSuggestions as iY,fetchAliasesSuggestions as iZ,clearAliasesSuggestions as i_,CreateGroupModal as ia,DislikesModal as ib,EditAnnouncementModal as ic,EditFederationModal as id,EmbedModal as ie,EmojiPickerModal as ig,EventMapModal as ih,EventParticipantsModal as ii,FamiliarFollowersModal as ij,FavouritesModal as ik,HotkeysModal as il,JoinEventModal as im,LandingPageModal as io,ListAdder as ip,ListEditor as iq,MediaModal as ir,MentionsModal as is,MissingDescriptionModal as it,MuteModal as iu,PolicyModal$1 as iv,ReactionsModal as iw,ReblogsModal as ix,ReplyMentionsModal as iy,ReportModal as iz,joinPublicPath as j,EventActionButton as j$,removeFromAliases as j0,moveAccount as j1,DatePicker as j2,setSchedule as j3,removeSchedule as j4,removePageItem as j5,importFetchedAccounts as j6,fetchSuggestions as j7,useLocation$1 as j8,fetchDirectory as j9,TransitionMotion as jA,unicodeMapping as jB,EmojiPickerDropdownContainer as jC,addReaction$1 as jD,removeReaction$1 as jE,expandStatusQuotes as jF,fetchStatusQuotes as jG,locationSearch as jH,AutosuggestInput as jI,fetchEventParticipationRequests as jJ,changeEditEventName as jK,changeEditEventDescription as jL,changeEditEventStartTime as jM,changeEditEventEndTime as jN,changeEditEventHasEndTime as jO,changeEditEventApprovalRequired as jP,changeEditEventLocation as jQ,uploadEventBanner as jR,undoUploadEventBanner as jS,submitEvent as jT,authorizeEventParticipationRequest as jU,rejectEventParticipationRequest as jV,joinEvent as jW,vitePluginRequire_1697861810837_42328573 as jX,EventDate as jY,MenuDivider as jZ,MenuLink as j_,expandDirectory as ja,openComposeWithText as jb,changeSettingImmediate as jc,vitePluginRequire_1697861824494_8991836 as jd,getBaseURL as je,createApp as jf,obtainOAuthToken as jg,FE_NAME as jh,SETTINGS_UPDATE as ji,importFetchedStatuses as jj,expandTimelineSuccess as jk,unregisterSw as jl,_unsupportedIterableToArray$e as jm,r as jn,LandingGradient as jo,endOnboarding as jp,fetchHistory as jq,fetchOAuthTokens as jr,vitePluginRequire_1697861810834_37299420 as js,revokeOAuthTokenById as jt,getAccessToken as ju,OtpInput as jv,PhoneInput as jw,reConfirmPhoneVerification as jx,verifyCredentials as jy,reRequestPhoneVerification as jz,vitePluginRequire_1697861810834_60823079 as k,changeAnnouncementAllDay as k$,vitePluginRequire_1697861810834_78521829 as k0,vitePluginRequire_1697861810834_29007330 as k1,vitePluginRequire_1697861810834_38963235 as k2,editEvent as k3,fetchEventIcs as k4,copy as k5,toggleBookmark as k6,quoteCompose as k7,togglePin as k8,deleteStatus$6 as k9,vitePluginRequire_1697861828078_94410874 as kA,groupKick as kB,deleteEntities$1 as kC,useGroupMembershipRequests as kD,vitePluginRequire_1697861828084_10716620 as kE,importEntities$1 as kF,expandGroupTimelineFromTag as kG,expandGroupTimeline as kH,expandGroupFeaturedTimeline as kI,groupCompose as kJ,useBackend as kK,ColumnForbidden as kL,TRUTHSOCIAL as kM,useCreateEntity as kN,fetchGroupBlocks as kO,groupUnblock as kP,useGroupMedia as kQ,vitePluginRequire_1697861828130_86868126 as kR,AxiosError as kS,getGroupGallery as kT,expandGroupMediaTimeline as kU,fetchAdminAnnouncements as kV,initAnnouncementModal as kW,deleteAnnouncement as kX,changeAnnouncementContent as kY,changeAnnouncementStartTime as kZ,changeAnnouncementEndTime as k_,mentionCompose as ka,launchChat as kb,directCompose as kc,initMuteModal as kd,toggleStatusSensitivityModal as ke,toggleReblog as kf,TranslateButton as kg,eventDiscussionCompose as kh,fetchEventParticipations as ki,vitePluginRequire_1697861828086_76580221 as kj,vitePluginRequire_1697861826697_12112271 as kk,EventPreview as kl,fetchRecentEvents as km,fetchJoinedEvents as kn,usePendingGroups as ko,useGroups as kp,useGroupRelationships as kq,useDimensions as kr,groupSearchHistory as ks,GroupActionButton as kt,groupTagSchema as ku,useEntityActions as kv,z$1 as kw,groupMemberSchema as kx,useBlockGroupMember as ky,GroupRoles as kz,vitePluginRequire_1697861820197_13487325 as l,handleCreateAnnouncement as l0,expandFollowedHashtags as l1,fetchFollowedHashtags as l2,EmojiPickerDropdown as l3,cardSchema as l4,vitePluginRequire_1697861820197_29830493 as m,vitePluginRequire_1697861809668_78443957 as n,defineMessages as o,makeGetNotification as p,useAppSelector as q,reactExports as r,setFilter$1 as s,useInstance as t,useIntl as u,vitePluginRequire_1697861810834_25410229 as v,_typeof$8 as w,validType as x,Text$2 as y,defineMessage as z}; +`))||""},calculateStatus=(_e,et,tt=!1)=>{if(et&&et.content===_e.content&&et.spoiler_text===_e.spoiler_text)return _e.merge({search_index:et.search_index,contentHtml:et.contentHtml,spoilerHtml:et.spoilerHtml,hidden:et.hidden});{const nt=_e.spoiler_text,rt=buildSearchContent(_e),at=makeEmojiMap(_e.emojis);return _e.merge({search_index:domParser.parseFromString(rt,"text/html").documentElement.textContent||"",contentHtml:stripCompatibilityFeatures(emojify(_e.content,at)),spoilerHtml:emojify(escapeTextContentForBrowser(nt),at),hidden:tt?!1:nt.length>0||_e.sensitive})}},isQuote=_e=>!!_e.pleroma.get("quote_url"),fixQuote=(_e,et)=>et&&!_e.quote&&isQuote(_e)?_e.set("quote",et.quote).updateIn(["pleroma","quote_visible"],tt=>tt||et.pleroma.get("quote_visible")):_e,fixStatus=(_e,et,tt)=>{const nt=_e.get(et.id);return normalizeStatus(et).withMutations(rt=>{fixQuote(rt,nt),calculateStatus(rt,nt,tt),minifyStatus(rt)})},importStatus$1=(_e,et,tt)=>_e.set(et.id,fixStatus(_e,et,tt)),importStatuses$1=(_e,et,tt)=>_e.withMutations(nt=>et.forEach(rt=>importStatus$1(nt,rt,tt))),deleteStatus$1=(_e,et,tt)=>(tt.forEach(nt=>{_e=deleteStatus$1(_e,nt[0],[])}),_e.delete(et)),incrementReplyCount=(_e,{in_reply_to_id:et})=>et?_e.updateIn([et,"replies_count"],0,tt=>typeof tt=="number"?tt+1:0):_e,decrementReplyCount=(_e,{in_reply_to_id:et})=>et?_e.updateIn([et,"replies_count"],0,tt=>typeof tt=="number"?Math.max(0,tt-1):0):_e,simulateFavourite=(_e,et,tt)=>{const nt=_e.get(et);if(!nt)return _e;const rt=tt?1:-1,at=nt.merge({favourited:tt,favourites_count:Math.max(0,nt.favourites_count+rt)});return _e.set(et,at)},simulateDislike=(_e,et,tt)=>{const nt=_e.get(et);if(!nt)return _e;const rt=tt?1:-1,at=nt.merge({disliked:tt,dislikes_count:Math.max(0,nt.dislikes_count+rt)});return _e.set(et,at)},importTranslation=(_e,et,tt)=>{const nt=Map$3(tt),rt=nt.set("content",stripCompatibilityFeatures(nt.get("content","")));return _e.setIn([et,"translation"],rt)},showTranslation=(_e,et)=>_e.setIn([et,"translation","status"],"visible"),hideTranslation=(_e,et)=>_e.setIn([et,"translation","status"],"hidden"),initialState$2=Map$3();function statuses(_e=initialState$2,et){switch(et.type){case STATUS_IMPORT:return importStatus$1(_e,et.status,et.expandSpoilers);case STATUSES_IMPORT:return importStatuses$1(_e,et.statuses,et.expandSpoilers);case STATUS_CREATE_REQUEST:return et.editing?_e:incrementReplyCount(_e,et.params);case STATUS_CREATE_FAIL:return et.editing?_e:decrementReplyCount(_e,et.params);case FAVOURITE_REQUEST:return simulateFavourite(_e,et.status.id,!0);case UNFAVOURITE_REQUEST:return simulateFavourite(_e,et.status.id,!1);case DISLIKE_REQUEST:return simulateDislike(_e,et.status.id,!0);case UNDISLIKE_REQUEST:return simulateDislike(_e,et.status.id,!1);case EMOJI_REACT_REQUEST:return _e.updateIn([et.status.id,"pleroma","emoji_reactions"],tt=>simulateEmojiReact(tt,et.emoji,et.custom));case UNEMOJI_REACT_REQUEST:return _e.updateIn([et.status.id,"pleroma","emoji_reactions"],tt=>simulateUnEmojiReact(tt,et.emoji));case FAVOURITE_FAIL:return _e.get(et.status.id)===void 0?_e:_e.setIn([et.status.id,"favourited"],!1);case DISLIKE_FAIL:return _e.get(et.status.id)===void 0?_e:_e.setIn([et.status.id,"disliked"],!1);case REBLOG_REQUEST:return _e.setIn([et.status.id,"reblogged"],!0);case REBLOG_FAIL:return _e.get(et.status.id)===void 0?_e:_e.setIn([et.status.id,"reblogged"],!1);case UNREBLOG_REQUEST:return _e.setIn([et.status.id,"reblogged"],!1);case UNREBLOG_FAIL:return _e.get(et.status.id)===void 0?_e:_e.setIn([et.status.id,"reblogged"],!0);case STATUS_MUTE_SUCCESS:return _e.setIn([et.id,"muted"],!0);case STATUS_UNMUTE_SUCCESS:return _e.setIn([et.id,"muted"],!1);case STATUS_REVEAL:return _e.withMutations(tt=>{et.ids.forEach(nt=>{_e.get(nt)!==void 0&&tt.setIn([nt,"hidden"],!1)})});case STATUS_HIDE:return _e.withMutations(tt=>{et.ids.forEach(nt=>{_e.get(nt)!==void 0&&tt.setIn([nt,"hidden"],!0)})});case STATUS_DELETE_REQUEST:return decrementReplyCount(_e,et.params);case STATUS_DELETE_FAIL:return incrementReplyCount(_e,et.params);case STATUS_TRANSLATE_SUCCESS:return importTranslation(_e,et.id,et.translation);case STATUS_TRANSLATE_REDO:return showTranslation(_e,et.id);case STATUS_TRANSLATE_UNDO:return hideTranslation(_e,et.id);case STATUS_UNFILTER:return _e.setIn([et.id,"showFiltered"],!1);case TIMELINE_DELETE:return deleteStatus$1(_e,et.id,et.references);case EVENT_JOIN_REQUEST:return _e.setIn([et.id,"event","join_state"],"pending");case EVENT_JOIN_FAIL:case EVENT_LEAVE_REQUEST:return _e.setIn([et.id,"event","join_state"],null);case EVENT_LEAVE_FAIL:return _e.setIn([et.id,"event","join_state"],et.previousState);default:return _e}}const SuggestionRecord=Record({source:"",account:""}),ReducerRecord$4=Record({items:OrderedSet(),next:null,isLoading:!1}),accountToSuggestion=_e=>({source:"past_interactions",account:_e.id}),importAccounts=(_e,et)=>_e.withMutations(tt=>{tt.set("items",OrderedSet(et.map(accountToSuggestion).map(nt=>SuggestionRecord(nt)))),tt.set("isLoading",!1)}),importSuggestions=(_e,et,tt)=>_e.withMutations(nt=>{nt.update("items",rt=>rt.concat(et.map(at=>({...at,account:at.account.id})).map(at=>SuggestionRecord(at)))),nt.set("isLoading",!1),nt.set("next",tt)}),importTruthSuggestions=(_e,et,tt)=>_e.withMutations(nt=>{nt.update("items",rt=>rt.concat(et.map(at=>({...at,account:at.account_id})).map(at=>SuggestionRecord(at)))),nt.set("isLoading",!1),nt.set("next",tt)}),dismissAccount=(_e,et)=>_e.update("items",tt=>tt.filterNot(nt=>nt.account===et)),dismissAccounts=(_e,et)=>_e.update("items",tt=>tt.filterNot(nt=>et.includes(nt.account)));function suggestionsReducer(_e=ReducerRecord$4(),et){switch(et.type){case SUGGESTIONS_FETCH_REQUEST:case SUGGESTIONS_V2_FETCH_REQUEST:return _e.set("isLoading",!0);case SUGGESTIONS_FETCH_SUCCESS:return importAccounts(_e,et.accounts);case SUGGESTIONS_V2_FETCH_SUCCESS:return importSuggestions(_e,et.suggestions,et.next);case SUGGESTIONS_TRUTH_FETCH_SUCCESS:return importTruthSuggestions(_e,et.suggestions,et.next);case SUGGESTIONS_FETCH_FAIL:case SUGGESTIONS_V2_FETCH_FAIL:return _e.set("isLoading",!1);case SUGGESTIONS_DISMISS:return dismissAccount(_e,et.id);case ACCOUNT_BLOCK_SUCCESS:case ACCOUNT_MUTE_SUCCESS:return dismissAccount(_e,et.relationship.id);case DOMAIN_BLOCK_SUCCESS:return dismissAccounts(_e,et.accounts);default:return _e}}const initialState$1=Map$3();function tags(_e=initialState$1,et){switch(et.type){case HASHTAG_FETCH_SUCCESS:return _e.set(et.name,normalizeTag(et.tag));case HASHTAG_FOLLOW_REQUEST:case HASHTAG_UNFOLLOW_FAIL:return _e.setIn([et.name,"following"],!0);case HASHTAG_FOLLOW_FAIL:case HASHTAG_UNFOLLOW_REQUEST:return _e.setIn([et.name,"following"],!1);default:return _e}}var nativeFloor=Math.floor,nativeRandom=Math.random;function baseRandom$1(_e,et){return _e+nativeFloor(nativeRandom()*(et-_e+1))}var _baseRandom=baseRandom$1,baseRandom=_baseRandom;function arraySample$2(_e){var et=_e.length;return et?_e[baseRandom(0,et-1)]:void 0}var _arraySample=arraySample$2,arrayMap=_arrayMap;function baseValues$1(_e,et){return arrayMap(et,function(tt){return _e[tt]})}var _baseValues=baseValues$1,baseValues=_baseValues,keys=keys_1;function values$1(_e){return _e==null?[]:baseValues(_e,keys(_e))}var values_1=values$1,arraySample$1=_arraySample,values=values_1;function baseSample$1(_e){return arraySample$1(values(_e))}var _baseSample=baseSample$1,arraySample=_arraySample,baseSample=_baseSample,isArray=isArray_1;function sample(_e){var et=isArray(_e)?arraySample:baseSample;return et(_e)}var sample_1=sample;const sample$1=getDefaultExportFromCjs$1(sample_1),TRUNCATE_LIMIT=40,TRUNCATE_SIZE=20,TimelineRecord=Record({unread:0,online:!1,top:!0,isLoading:!1,hasMore:!0,next:void 0,prev:void 0,items:OrderedSet(),queuedItems:OrderedSet(),feedAccountId:null,totalQueuedItemsCount:0,loadingFailed:!1,isPartial:!1}),initialState=Map$3(),getStatusIds=(_e=List$1())=>_e.map(et=>et.get("id")).toOrderedSet(),mergeStatusIds=(_e=OrderedSet(),et=OrderedSet())=>et.union(_e),addStatusId=(_e=OrderedSet(),et)=>mergeStatusIds(_e,OrderedSet([et])),truncate=(_e,et,tt)=>_e.size>et?_e.take(tt):_e,truncateIds=_e=>truncate(_e,TRUNCATE_LIMIT,TRUNCATE_SIZE),setLoading=(_e,et,tt)=>_e.update(et,TimelineRecord(),nt=>nt.set("isLoading",tt)),setFailed=(_e,et,tt)=>_e.update(et,TimelineRecord(),nt=>nt.set("loadingFailed",tt)),expandNormalizedTimeline=(_e,et,tt,nt,rt,at,it,ot)=>{let st=getStatusIds(tt),ct=OrderedSet();return _e.withMutations(ut=>{ut.update(et,TimelineRecord(),dt=>dt.withMutations(ft=>{if(ft.set("isLoading",!1),ft.set("loadingFailed",!1),ft.set("isPartial",at),!nt&&!it&&ft.set("hasMore",!1),et.endsWith(":pinned")){ft.set("items",st);return}st.isEmpty()||(ct=OrderedSet(),!ot&&ft.items.count()>0&&st.first()>ft.items.first()&&(ct=st.subtract(ft.items)),st=st.subtract(ct),ft.update("items",pt=>st.first()>pt.first()?mergeStatusIds(pt,st):mergeStatusIds(st,pt)))})),ct.forEach(dt=>ut.set(et,updateTimelineQueue(ut,et,dt).get(et)))})},updateTimeline=(_e,et,tt)=>{var ot,st,ct;const nt=(ot=_e.get(et))==null?void 0:ot.top,rt=((st=_e.get(et))==null?void 0:st.items)||OrderedSet(),at=((ct=_e.get(et))==null?void 0:ct.unread)||0;if(rt.includes(tt))return _e;const it=addStatusId(rt,tt);return _e.update(et,TimelineRecord(),ut=>ut.withMutations(dt=>{nt?dt.set("items",truncateIds(it)):(dt.set("unread",at+1),dt.set("items",it))}))},updateTimelineQueue=(_e,et,tt)=>{var it,ot,st;const nt=((it=_e.get(et))==null?void 0:it.queuedItems)||OrderedSet(),rt=((ot=_e.get(et))==null?void 0:ot.items)||OrderedSet(),at=((st=_e.get(et))==null?void 0:st.totalQueuedItemsCount)||0;return nt.includes(tt)||rt.includes(tt)?_e:_e.update(et,TimelineRecord(),ct=>ct.withMutations(ut=>{ut.set("totalQueuedItemsCount",at+1),ut.set("queuedItems",addStatusId(nt,tt).take(MAX_QUEUED_ITEMS))}))},shouldDelete=(_e,et)=>et?!(_e===`account:${et}`||_e.startsWith(`account:${et}:`)):!0,deleteStatus=(_e,et,tt,nt,rt)=>_e.withMutations(at=>{at.keySeq().forEach(it=>{shouldDelete(it,rt)&&(at.updateIn([it,"items"],ot=>ot.delete(et)),at.updateIn([it,"queuedItems"],ot=>ot.delete(et)))}),nt.forEach(it=>{deleteStatus(at,it[0],it[1],[],rt)})}),clearTimeline=(_e,et)=>_e.set(et,TimelineRecord()),updateTop=(_e,et,tt)=>_e.update(et,TimelineRecord(),nt=>nt.withMutations(rt=>{tt&&rt.set("unread",0),rt.set("top",tt)})),isReblogOf=(_e,et)=>_e.reblog===et.id,statusToReference=_e=>[_e.id,_e.account],buildReferencesTo=(_e,et)=>_e.filter(tt=>isReblogOf(tt,et)).map(statusToReference),filterTimelines=(_e,et,tt)=>_e.withMutations(nt=>{tt.forEach(rt=>{if(rt.account!==et.id)return;const at=buildReferencesTo(tt,rt);deleteStatus(nt,rt.id,rt.account.id,at,et.id)})}),timelineDequeue=(_e,et)=>{const tt=_e.getIn([et,"top"]);return _e.update(et,TimelineRecord(),nt=>nt.withMutations(rt=>{const at=rt.queuedItems;rt.update("items",it=>{const ot=mergeStatusIds(it,at);return tt?truncateIds(ot):ot}),rt.set("queuedItems",OrderedSet()),rt.set("totalQueuedItemsCount",0)}))},timelineConnect=(_e,et)=>_e.update(et,TimelineRecord(),tt=>tt.set("online",!0)),timelineDisconnect=(_e,et)=>_e.update(et,TimelineRecord(),tt=>tt.withMutations(nt=>{nt.set("online",!1),nt.get("items",OrderedSet()).isEmpty()})),getTimelinesForStatus=_e=>{var et;switch(_e.visibility){case"group":return[`group:${((et=_e.group)==null?void 0:et.id)||_e.group_id}`];case"direct":return["direct"];case"public":return["home","community","public"];default:return["home"]}},replaceId=(_e,et,tt)=>{const nt=List$1(_e),rt=nt.indexOf(et);return rt>-1?OrderedSet(nt.set(rt,tt)):_e},importPendingStatus=(_e,et,tt)=>{const nt=`末pending-${tt}`;return _e.withMutations(rt=>{getTimelinesForStatus(et).forEach(it=>{updateTimelineQueue(rt,it,nt)})})},replacePendingStatus=(_e,et,tt)=>{const nt=`末pending-${et}`;return _e.withMutations(rt=>{rt.keySeq().forEach(at=>{rt.updateIn([at,"items"],it=>replaceId(it,nt,tt)),rt.updateIn([at,"queuedItems"],it=>replaceId(it,nt,tt))})})},importStatus=(_e,et,tt)=>_e.withMutations(nt=>{replacePendingStatus(nt,tt,et.id),getTimelinesForStatus(et).forEach(at=>{updateTimeline(nt,at,et.id)})}),handleExpandFail=(_e,et)=>_e.withMutations(tt=>{setLoading(tt,et,!1),setFailed(tt,et,!0)});function timelines(_e=initialState,et){switch(et.type){case STATUS_CREATE_REQUEST:return et.params.scheduled_at?_e:importPendingStatus(_e,et.params,et.idempotencyKey);case STATUS_CREATE_SUCCESS:return et.status.scheduled_at||et.editing?_e:importStatus(_e,et.status,et.idempotencyKey);case TIMELINE_EXPAND_REQUEST:return setLoading(_e,et.timeline,!0);case TIMELINE_EXPAND_FAIL:return handleExpandFail(_e,et.timeline);case TIMELINE_EXPAND_SUCCESS:return expandNormalizedTimeline(_e,et.timeline,fromJS(et.statuses),et.next,et.prev,et.partial,et.isLoadingRecent,et.isLoadingMore);case TIMELINE_UPDATE:return updateTimeline(_e,et.timeline,et.statusId);case TIMELINE_UPDATE_QUEUE:return updateTimelineQueue(_e,et.timeline,et.statusId);case TIMELINE_DEQUEUE:return timelineDequeue(_e,et.timeline);case TIMELINE_DELETE:return deleteStatus(_e,et.id,et.accountId,et.references,et.reblogOf);case TIMELINE_CLEAR:return clearTimeline(_e,et.timeline);case ACCOUNT_BLOCK_SUCCESS:case ACCOUNT_MUTE_SUCCESS:return filterTimelines(_e,et.relationship,et.statuses);case TIMELINE_SCROLL_TOP:return updateTop(_e,et.timeline,et.top);case TIMELINE_CONNECT:return timelineConnect(_e,et.timeline);case TIMELINE_DISCONNECT:return timelineDisconnect(_e,et.timeline);case TIMELINE_REPLACE:return _e.update("home",TimelineRecord(),tt=>tt.withMutations(nt=>{nt.set("items",OrderedSet([]))})).update("home",TimelineRecord(),tt=>tt.set("feedAccountId",et.accountId));case TIMELINE_INSERT:return _e.update(et.timeline,TimelineRecord(),tt=>tt.withMutations(nt=>{nt.update("items",rt=>{let at=rt.toArray();at.find(st=>st.includes("末suggestions"))&&(at=at.slice(1));const ot=sample$1([5,6,7,8,9]);return rt.last()&&at.splice(ot,0,`末suggestions-${rt.last()}`),OrderedSet(at)})}));case TIMELINE_CLEAR_FEED_ACCOUNT_ID:return _e.update("home",TimelineRecord(),tt=>tt.set("feedAccountId",null));default:return _e}}const TRENDING_STATUSES_FETCH_REQUEST="TRENDING_STATUSES_FETCH_REQUEST",TRENDING_STATUSES_FETCH_SUCCESS="TRENDING_STATUSES_FETCH_SUCCESS",TRENDING_STATUSES_FETCH_FAIL="TRENDING_STATUSES_FETCH_FAIL",fetchTrendingStatuses=()=>(_e,et)=>{const nt=et().instance,rt=getFeatures(nt);if(!(!rt.trendingStatuses&&!rt.trendingTruths))return _e({type:TRENDING_STATUSES_FETCH_REQUEST}),api(et).get(rt.trendingTruths?"/api/v1/truth/trending/truths":"/api/v1/trends/statuses").then(({data:at})=>(_e(importFetchedStatuses(at)),_e({type:TRENDING_STATUSES_FETCH_SUCCESS,statuses:at}),at)).catch(at=>{_e({type:TRENDING_STATUSES_FETCH_FAIL,error:at})})},ReducerRecord$3=Record({items:OrderedSet(),isLoading:!1}),toIds=_e=>OrderedSet(_e.map(et=>et.id)),importStatuses=(_e,et)=>_e.withMutations(tt=>{tt.set("items",toIds(et)),tt.set("isLoading",!1)});function trending_statuses(_e=ReducerRecord$3(),et){switch(et.type){case TRENDING_STATUSES_FETCH_REQUEST:return _e.set("isLoading",!0);case TRENDING_STATUSES_FETCH_SUCCESS:return importStatuses(_e,et.statuses);default:return _e}}const TRENDS_FETCH_REQUEST="TRENDS_FETCH_REQUEST",TRENDS_FETCH_SUCCESS="TRENDS_FETCH_SUCCESS",TRENDS_FETCH_FAIL="TRENDS_FETCH_FAIL",fetchTrendsSuccess=_e=>({type:TRENDS_FETCH_SUCCESS,tags:_e,skipLoading:!0}),ReducerRecord$2=Record({items:List$1(),isLoading:!1});function trendsReducer(_e=ReducerRecord$2(),et){switch(et.type){case TRENDS_FETCH_REQUEST:return _e.set("isLoading",!0);case TRENDS_FETCH_SUCCESS:return _e.withMutations(tt=>{tt.set("items",List$1(et.tags.map(nt=>normalizeTag(nt)))),tt.set("isLoading",!1)});case TRENDS_FETCH_FAIL:return _e.set("isLoading",!1);default:return _e}}const BLOCKS_FETCH_SUCCESS="BLOCKS_FETCH_SUCCESS",BLOCKS_EXPAND_SUCCESS="BLOCKS_EXPAND_SUCCESS",DIRECTORY_FETCH_REQUEST="DIRECTORY_FETCH_REQUEST",DIRECTORY_FETCH_SUCCESS="DIRECTORY_FETCH_SUCCESS",DIRECTORY_FETCH_FAIL="DIRECTORY_FETCH_FAIL",DIRECTORY_EXPAND_REQUEST="DIRECTORY_EXPAND_REQUEST",DIRECTORY_EXPAND_SUCCESS="DIRECTORY_EXPAND_SUCCESS",DIRECTORY_EXPAND_FAIL="DIRECTORY_EXPAND_FAIL",fetchDirectory=_e=>(et,tt)=>{et(fetchDirectoryRequest()),api(tt).get("/api/v1/directory",{params:{..._e,limit:20}}).then(({data:nt})=>{et(importFetchedAccounts(nt)),et(fetchDirectorySuccess(nt)),et(fetchRelationships(nt.map(rt=>rt.id)))}).catch(nt=>et(fetchDirectoryFail(nt)))},fetchDirectoryRequest=()=>({type:DIRECTORY_FETCH_REQUEST}),fetchDirectorySuccess=_e=>({type:DIRECTORY_FETCH_SUCCESS,accounts:_e}),fetchDirectoryFail=_e=>({type:DIRECTORY_FETCH_FAIL,error:_e}),expandDirectory=_e=>(et,tt)=>{et(expandDirectoryRequest());const nt=tt().user_lists.directory.items.size;api(tt).get("/api/v1/directory",{params:{..._e,offset:nt,limit:20}}).then(({data:rt})=>{et(importFetchedAccounts(rt)),et(expandDirectorySuccess(rt)),et(fetchRelationships(rt.map(at=>at.id)))}).catch(rt=>et(expandDirectoryFail(rt)))},expandDirectoryRequest=()=>({type:DIRECTORY_EXPAND_REQUEST}),expandDirectorySuccess=_e=>({type:DIRECTORY_EXPAND_SUCCESS,accounts:_e}),expandDirectoryFail=_e=>({type:DIRECTORY_EXPAND_FAIL,error:_e}),FAMILIAR_FOLLOWERS_FETCH_REQUEST="FAMILIAR_FOLLOWERS_FETCH_REQUEST",FAMILIAR_FOLLOWERS_FETCH_SUCCESS="FAMILIAR_FOLLOWERS_FETCH_SUCCESS",FAMILIAR_FOLLOWERS_FETCH_FAIL="FAMILIAR_FOLLOWERS_FETCH_FAIL",fetchAccountFamiliarFollowers=_e=>(et,tt)=>{et({type:FAMILIAR_FOLLOWERS_FETCH_REQUEST,id:_e}),api(tt).get(`/api/v1/accounts/familiar_followers?id=${_e}`).then(({data:nt})=>{const rt=nt.find(({id:at})=>at===_e).accounts;et(importFetchedAccounts(rt)),et(fetchRelationships(rt.map(at=>at.id))),et({type:FAMILIAR_FOLLOWERS_FETCH_SUCCESS,id:_e,accounts:rt})}).catch(nt=>et({type:FAMILIAR_FOLLOWERS_FETCH_FAIL,id:_e,error:nt,skipAlert:!0}))},ListRecord=Record({next:null,items:OrderedSet(),isLoading:!1}),ReactionRecord=Record({accounts:OrderedSet(),count:0,name:"",url:null}),ReactionListRecord=Record({next:null,items:OrderedSet(),isLoading:!1}),ParticipationRequestRecord=Record({account:"",participation_message:null}),ParticipationRequestListRecord=Record({next:null,items:OrderedSet(),isLoading:!1}),ReducerRecord$1=Record({followers:Map$3(),following:Map$3(),reblogged_by:Map$3(),favourited_by:Map$3(),disliked_by:Map$3(),reactions:Map$3(),follow_requests:ListRecord(),blocks:ListRecord(),mutes:ListRecord(),directory:ListRecord({isLoading:!0}),pinned:Map$3(),birthday_reminders:Map$3(),familiar_followers:Map$3(),event_participations:Map$3(),event_participation_requests:Map$3(),membership_requests:Map$3(),group_blocks:Map$3()}),normalizeList=(_e,et,tt,nt)=>_e.setIn(et,ListRecord({next:nt,items:OrderedSet(tt.map(rt=>rt.id))})),appendToList=(_e,et,tt,nt)=>_e.updateIn(et,rt=>rt.set("next",nt).set("isLoading",!1).update("items",at=>at.concat(tt.map(it=>it.id)))),removeFromList=(_e,et,tt)=>_e.updateIn(et,nt=>nt.update("items",rt=>rt.filterNot(at=>at===tt))),normalizeFollowRequest=(_e,et)=>_e.updateIn(["follow_requests","items"],tt=>OrderedSet([et.account.id]).union(tt));function userLists(_e=ReducerRecord$1(),et){switch(et.type){case FOLLOWERS_FETCH_SUCCESS:return normalizeList(_e,["followers",et.id],et.accounts,et.next);case FOLLOWERS_EXPAND_SUCCESS:return appendToList(_e,["followers",et.id],et.accounts,et.next);case FOLLOWING_FETCH_SUCCESS:return normalizeList(_e,["following",et.id],et.accounts,et.next);case FOLLOWING_EXPAND_SUCCESS:return appendToList(_e,["following",et.id],et.accounts,et.next);case REBLOGS_FETCH_SUCCESS:return normalizeList(_e,["reblogged_by",et.id],et.accounts,et.next);case REBLOGS_EXPAND_SUCCESS:return appendToList(_e,["reblogged_by",et.id],et.accounts,et.next);case FAVOURITES_FETCH_SUCCESS:return normalizeList(_e,["favourited_by",et.id],et.accounts,et.next);case FAVOURITES_EXPAND_SUCCESS:return appendToList(_e,["favourited_by",et.id],et.accounts,et.next);case DISLIKES_FETCH_SUCCESS:return normalizeList(_e,["disliked_by",et.id],et.accounts);case REACTIONS_FETCH_SUCCESS:return _e.setIn(["reactions",et.id],ReactionListRecord({items:OrderedSet(et.reactions.map(({accounts:tt,...nt})=>ReactionRecord({...nt,accounts:OrderedSet(tt.map(rt=>rt.id))})))}));case NOTIFICATIONS_UPDATE:return et.notification.type==="follow_request"?normalizeFollowRequest(_e,et.notification):_e;case FOLLOW_REQUESTS_FETCH_SUCCESS:return normalizeList(_e,["follow_requests"],et.accounts,et.next);case FOLLOW_REQUESTS_EXPAND_SUCCESS:return appendToList(_e,["follow_requests"],et.accounts,et.next);case FOLLOW_REQUEST_AUTHORIZE_SUCCESS:case FOLLOW_REQUEST_REJECT_SUCCESS:return removeFromList(_e,["follow_requests"],et.id);case BLOCKS_FETCH_SUCCESS:return normalizeList(_e,["blocks"],et.accounts,et.next);case BLOCKS_EXPAND_SUCCESS:return appendToList(_e,["blocks"],et.accounts,et.next);case DIRECTORY_FETCH_SUCCESS:return normalizeList(_e,["directory"],et.accounts,et.next);case DIRECTORY_EXPAND_SUCCESS:return appendToList(_e,["directory"],et.accounts,et.next);case DIRECTORY_FETCH_REQUEST:case DIRECTORY_EXPAND_REQUEST:return _e.setIn(["directory","isLoading"],!0);case DIRECTORY_FETCH_FAIL:case DIRECTORY_EXPAND_FAIL:return _e.setIn(["directory","isLoading"],!1);case PINNED_ACCOUNTS_FETCH_SUCCESS:return normalizeList(_e,["pinned",et.id],et.accounts,et.next);case BIRTHDAY_REMINDERS_FETCH_SUCCESS:return normalizeList(_e,["birthday_reminders",et.id],et.accounts,et.next);case FAMILIAR_FOLLOWERS_FETCH_SUCCESS:return normalizeList(_e,["familiar_followers",et.id],et.accounts,et.next);case EVENT_PARTICIPATIONS_FETCH_SUCCESS:return normalizeList(_e,["event_participations",et.id],et.accounts,et.next);case EVENT_PARTICIPATIONS_EXPAND_SUCCESS:return appendToList(_e,["event_participations",et.id],et.accounts,et.next);case EVENT_PARTICIPATION_REQUESTS_FETCH_SUCCESS:return _e.setIn(["event_participation_requests",et.id],ParticipationRequestListRecord({next:et.next,items:OrderedSet(et.participations.map(({account:tt,participation_message:nt})=>ParticipationRequestRecord({account:tt.id,participation_message:nt})))}));case EVENT_PARTICIPATION_REQUESTS_EXPAND_SUCCESS:return _e.updateIn(["event_participation_requests",et.id,"items"],tt=>tt.union(et.participations.map(({account:nt,participation_message:rt})=>ParticipationRequestRecord({account:nt.id,participation_message:rt}))));case EVENT_PARTICIPATION_REQUEST_AUTHORIZE_SUCCESS:case EVENT_PARTICIPATION_REQUEST_REJECT_SUCCESS:return _e.updateIn(["event_participation_requests",et.id,"items"],tt=>tt.filter(({account:nt})=>nt!==et.accountId));case GROUP_MEMBERSHIP_REQUESTS_FETCH_SUCCESS:return normalizeList(_e,["membership_requests",et.id],et.accounts,et.next);case GROUP_MEMBERSHIP_REQUESTS_EXPAND_SUCCESS:return appendToList(_e,["membership_requests",et.id],et.accounts,et.next);case GROUP_MEMBERSHIP_REQUESTS_FETCH_REQUEST:case GROUP_MEMBERSHIP_REQUESTS_EXPAND_REQUEST:return _e.setIn(["membership_requests",et.id,"isLoading"],!0);case GROUP_MEMBERSHIP_REQUESTS_FETCH_FAIL:case GROUP_MEMBERSHIP_REQUESTS_EXPAND_FAIL:return _e.setIn(["membership_requests",et.id,"isLoading"],!1);case GROUP_MEMBERSHIP_REQUEST_AUTHORIZE_SUCCESS:case GROUP_MEMBERSHIP_REQUEST_REJECT_SUCCESS:return _e.updateIn(["membership_requests",et.groupId,"items"],tt=>tt.filterNot(nt=>nt===et.accountId));case GROUP_BLOCKS_FETCH_SUCCESS:return normalizeList(_e,["group_blocks",et.id],et.accounts,et.next);case GROUP_BLOCKS_EXPAND_SUCCESS:return appendToList(_e,["group_blocks",et.id],et.accounts,et.next);case GROUP_BLOCKS_FETCH_REQUEST:case GROUP_BLOCKS_EXPAND_REQUEST:return _e.setIn(["group_blocks",et.id,"isLoading"],!0);case GROUP_BLOCKS_FETCH_FAIL:case GROUP_BLOCKS_EXPAND_FAIL:return _e.setIn(["group_blocks",et.id,"isLoading"],!1);case GROUP_UNBLOCK_SUCCESS:return _e.updateIn(["group_blocks",et.groupId,"items"],tt=>tt.filterNot(nt=>nt===et.accountId));default:return _e}}const ReducerRecord=Record({ageMinimum:null,currentChallenge:null,isLoading:!1,isComplete:!1,token:null,instance:Map$3()});function verification(_e=ReducerRecord(),et){switch(et.type){case PEPE_FETCH_INSTANCE_SUCCESS:return _e.set("instance",Map$3(fromJS(et.instance)));case FETCH_CHALLENGES_SUCCESS:return _e.set("ageMinimum",et.ageMinimum).set("currentChallenge",et.currentChallenge).set("isLoading",!1).set("isComplete",et.isComplete);case FETCH_TOKEN_SUCCESS:return _e.set("isLoading",!1).set("token",et.value);case SET_CHALLENGES_COMPLETE:return _e.set("isLoading",!1).set("isComplete",!0);case SET_NEXT_CHALLENGE:return _e.set("currentChallenge",et.challenge).set("isLoading",!1);case SET_LOADING:return _e.set("isLoading",typeof et.value=="boolean"?et.value:!0);default:return _e}}const reducers={account_notes,accounts_meta,admin,admin_announcements:adminAnnouncementsReducer,admin_log,admin_user_index,aliases:aliasesReducer,announcements:announcementsReducer,auth,backups,chat_message_lists:chatMessageLists,chat_messages:chatMessages,chats,compose,compose_event,contexts:replies,conversations,custom_emojis,domain_lists:domainLists,dropdown_menu:dropdownMenu,entities:reducer$1,filters,followed_tags,group_memberships:groupMemberships,group_relationships:groupRelationships,groups,history,instance,listAdder:listAdderReducer,listEditor:listEditorReducer,lists,locations:accounts,me,meta,modals:modal,mutes,notifications,onboarding,patron,pending_statuses,polls,profile_hover_card:profileHoverCard,push_notifications:push_subscriptions,relationships,reports,rules,scheduled_statuses,search,security,settings,sidebar,soapbox,status_hover_card:statusHoverCard,status_lists:statusLists,statuses,suggestions:suggestionsReducer,tags,timelines,trending_statuses,trends:trendsReducer,user_lists:userLists,verification},StateRecord=Record(Object.keys(reducers).reduce((_e,et)=>(_e[et]=void 0,_e),{})),appReducer=combineReducers(reducers,StateRecord),logOut=(_e=StateRecord())=>(NODE_ENV==="production"&&(location.href="/login"),StateRecord(["instance","soapbox","custom_emojis","auth"].reduce((tt,nt)=>(tt[nt]=_e.get(nt),tt),{}))),rootReducer=(_e,et)=>{switch(et.type){case AUTH_LOGGED_OUT:return appReducer(logOut(_e),et);default:return appReducer(_e,et)}},store=configureStore({reducer:rootReducer,middleware:[thunk$1,errorsMiddleware(),soundsMiddleware()],devTools:!0});createGlobals(store);store.dispatch(preload());store.dispatch(checkOnboardingStatus());var loadInitial=function _e(){return function(){var et=_asyncToGenerator(regeneratorRuntime.mark(function tt(nt,rt){var at,it,ot;return regeneratorRuntime.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:return ct.next=2,nt(fetchMe());case 2:return ct.next=4,nt(loadInstance());case 4:return ct.next=6,nt(loadSoapboxConfig());case 6:if(at=rt(),it=getSoapboxConfig(at),ot=it.getIn(["extensions","pepe","enabled"])===!0,!(ot&&!at.me)){ct.next=12;break}return ct.next=12,nt(fetchVerificationConfig());case 12:case"end":return ct.stop()}},tt)}));return function(tt,nt){return et.apply(this,arguments)}}()},SoapboxMount=function _e(){var et;useCachedLocationHandler();var tt=useAppSelector(function(vt){return vt.me}),nt=useInstance(),rt=useOwnAccount(),at=rt.account,it=useSoapboxConfig(),ot=useFeatures(),st=useRegistrationStatus(),ct=st.pepeEnabled,ut=at&&((et=at.source)===null||et===void 0?void 0:et.approved)===!1,dt=useAppSelector(function(vt){return vt.onboarding.needsOnboarding}),ft=at&&!ut&&dt,pt=it.redirectRootNoLogin,mt=function(gt,St){var Rt,$t,bt,wt=St.location;return!((Rt=wt.state)!==null&&Rt!==void 0&&Rt.soapboxModalKey&&(($t=wt.state)===null||$t===void 0?void 0:$t.soapboxModalKey)!==(gt==null||(bt=gt.location)===null||bt===void 0||(bt=bt.state)===null||bt===void 0?void 0:bt.soapboxModalKey))},ht=function(){return _createRawReactElement(BundleContainer,{fetchComponent:OnboardingWizard,loading:LoadingScreen},void 0,function(gt){return _createRawReactElement(gt,{})})},Et=function(){return _createRawReactElement(Switch,{},void 0,_createRawReactElement(Redirect,{from:"/v1/verify_email/:token",to:"/verify/email/:token"}),ct?_createRawReactElement(Redirect,{from:"/signup",to:"/verify"}):_createRawReactElement(Redirect,{from:"/verify",to:"/signup"}),ut&&_createRawReactElement(Route$1,{render:function(St){return _createRawReactElement(BundleContainer,{fetchComponent:WaitlistPage,loading:LoadingScreen},void 0,function(Rt){return React$3.createElement(Rt,_extends$4({},St,{account:at}))})}}),!tt&&(pt?_createRawReactElement(Redirect,{exact:!0,from:"/",to:pt}):_createRawReactElement(Route$1,{exact:!0,path:"/",component:PublicLayout})),!tt&&_createRawReactElement(Route$1,{exact:!0,path:"/",component:PublicLayout}),_createRawReactElement(Route$1,{exact:!0,path:"/about/:slug?",component:PublicLayout}),_createRawReactElement(Route$1,{path:"/login",component:AuthLayout}),ot.accountCreation&&nt.registrations&&_createRawReactElement(Route$1,{exact:!0,path:"/signup",component:AuthLayout}),ct&&_createRawReactElement(Route$1,{path:"/verify",component:AuthLayout}),_createRawReactElement(Route$1,{path:"/reset-password",component:AuthLayout}),_createRawReactElement(Route$1,{path:"/edit-password",component:AuthLayout}),_createRawReactElement(Route$1,{path:"/invite/:token",component:AuthLayout}),_createRawReactElement(Route$1,{path:"/",component:UI}))},yt=function(){return ft?ht():Et()};return _createRawReactElement(ErrorBoundary$1,{},void 0,_createRawReactElement(BrowserRouter,{basename:FE_SUBDIRECTORY},void 0,_createRawReactElement(CompatRouter,{},void 0,_createRawReactElement(ScrollBehaviorContext,{shouldUpdateScroll:mt},void 0,_createRawReactElement(Switch,{},void 0,_createRawReactElement(Route$1,{path:"/embed/:statusId",render:function(gt){return _createRawReactElement(EmbeddedStatus,{params:gt.match.params})}}),_createRawReactElement(Redirect,{from:"/@:username/:statusId/embed",to:"/embed/:statusId"}),_createRawReactElement(Route$1,{},void 0,yt(),_createRawReactElement(BundleContainer,{fetchComponent:ModalContainer},void 0,function(vt){return _createRawReactElement(vt,{})}),_createRawReactElement(GdprBanner,{}),_createRawReactElement("div",{id:"toaster"},void 0,_createRawReactElement(Toaster,{position:"top-right",containerClassName:"top-10",containerStyle:{top:75}}))))))))},SoapboxLoad=function _e(et){var tt=et.children,nt=useAppDispatch(),rt=useAppSelector(function(bt){return bt.me}),at=useOwnAccount(),it=at.account,ot=useAppSelector(function(bt){return bt.meta.swUpdating}),st=useLocale(),ct=st.locale,ut=reactExports.useState({}),dt=_slicedToArray$4(ut,2),ft=dt[0],pt=dt[1],mt=reactExports.useState(!0),ht=_slicedToArray$4(mt,2),Et=ht[0],yt=ht[1],vt=reactExports.useState(!1),gt=_slicedToArray$4(vt,2),St=gt[0],Rt=gt[1],$t=[rt===null,rt&&!it,!St,Et,ot].some(Boolean);return reactExports.useEffect(function(){messages$1a[ct]().then(function(bt){pt(bt),yt(!1)}).catch(function(){})},[ct]),reactExports.useEffect(function(){nt(loadInitial()).then(function(){Rt(!0)}).catch(function(){Rt(!0)})},[]),$t?_createRawReactElement(LoadingScreen,{}):_createRawReactElement(IntlProvider$1,{locale:ct,messages:ft},void 0,tt)},SoapboxHead=function _e(et){var tt=et.children,nt=useLocale(),rt=nt.locale,at=nt.direction,it=useSettings(),ot=useSoapboxConfig(),st=!!it.get("demo"),ct=useTheme()==="dark",ut=generateThemeCss(st?normalizeSoapboxConfig({brandColor:"#0482d8"}):ot),dt=clsx("h-full bg-white text-base dark:bg-gray-800",{"no-reduce-motion":!it.get("reduceMotion"),"underline-links":it.get("underlineLinks"),demetricator:it.get("demetricator")});return React$3.createElement(React$3.Fragment,null,_createRawReactElement(Helmet,{},void 0,_createRawReactElement("html",{lang:rt,className:clsx("h-full",{dark:ct})}),_createRawReactElement("body",{className:dt,dir:at}),ut&&_createRawReactElement("style",{id:"theme",type:"text/css",nonce:window.__webpack_nonce__},void 0,":root{".concat(ut,"}")),ct&&_createRawReactElement("style",{type:"text/css",nonce:window.__webpack_nonce__},void 0,":root { color-scheme: dark; }"),_createRawReactElement("meta",{name:"theme-color",content:ot.brandColor})),tt)},Soapbox=function _e(){return _createRawReactElement(Provider,{store},void 0,_createRawReactElement(QueryClientProvider,{client:queryClient},void 0,_createRawReactElement(StatProvider,{},void 0,_createRawReactElement(SoapboxHead,{},void 0,_createRawReactElement(SoapboxLoad,{},void 0,_createRawReactElement(SoapboxMount,{}))))))};function ready(_e){["interactive","complete"].includes(document.readyState)?_e():document.addEventListener("DOMContentLoaded",_e)}try{window.__webpack_nonce__=window._akkomaNonce}catch(_e){window.__webpack_nonce__=""}start();NODE_ENV==="production"&&(printConsoleWarning(),registerSw("/sw.js"));ready(function(){NODE_ENV!=="production"&&(window.__webpack_nonce__=window.__webpack_nonce__||"NONCE_PLACEHOLDER");var _e=document.querySelector("#_goober");_e instanceof HTMLStyleElement&&(_e.nonce=window.__webpack_nonce__);var et=document.getElementById("soapbox"),tt=createRoot(et);tt.render(_createRawReactElement(Soapbox,{}))});export{clearFeedAccountId as $,Icon$1 as A,AccountContainer as B,vitePluginRequire_1697864669750_16055070 as C,vitePluginRequire_1697864655029_28864811 as D,Emoji as E,FormattedMessage$1 as F,vitePluginRequire_1697864663407_97583826 as G,HStack as H,Icon as I,vitePluginRequire_1697864655029_99320522 as J,vitePluginRequire_1697864656340_67678421 as K,Link$2 as L,createSelector as M,getSettings as N,List$1 as O,PlaceholderStatusContent as P,debounce$2 as Q,React$3 as R,Status as S,Tabs as T,expandNotifications as U,scrollTopNotifications as V,clsx as W,Column as X,dequeueNotifications as Y,fetchRelationships as Z,_defineProperty$7 as _,_createRawReactElement as a,Card$1 as a$,expandHomeTimeline as a0,fetchSuggestionsForTimeline as a1,Stack as a2,useTimelineStream as a3,expandPublicTimeline as a4,vitePluginRequire_1697864655763_93677134 as a5,changeSetting as a6,useHistory as a7,expandRemoteTimeline as a8,IconButton as a9,expandListTimeline as aA,Spinner as aB,MissingIndicator as aC,openModal as aD,fetchLists as aE,vitePluginRequire_1697864653844_20943787 as aF,IconButton$1 as aG,vitePluginRequire_1697864655833_97692366 as aH,deleteList as aI,expandBookmarkedStatuses as aJ,fetchBookmarkedStatuses as aK,makeGetStatus as aL,fetchNext as aM,Redirect as aN,PlaceholderStatus$1 as aO,_asyncToGenerator as aP,fetchStatusWithContext as aQ,selectOwnAccount as aR,fetchPinnedStatuses as aS,makeGetStatusIds as aT,useSoapboxConfig as aU,useAccountLookup as aV,fetchAccountByUsername as aW,expandAccountFeaturedTimeline as aX,fetchPatronAccount as aY,expandAccountTimeline as aZ,CardBody as a_,Button as aa,expandCommunityTimeline as ab,expandHashtagTimeline as ac,fetchHashtag as ad,clearTimeline$1 as ae,List as af,ListItem as ag,Toggle as ah,unfollowHashtag as ai,followHashtag as aj,expandDirectTimeline as ak,directComposeById as al,selectAccount as am,markConversationRead as an,expandConversations as ao,mountConversations as ap,unmountConversations as aq,useLoggedIn as ar,_objectWithoutProperties as as,_slicedToArray$4 as at,AutosuggestAccountInput as au,_extends$4 as av,SvgIcon as aw,vitePluginRequire_1697864655763_96912751 as ax,useParams as ay,fetchList as az,PlaceholderAvatar as b,changeReportComment as b$,getAccountGallery as b0,expandAccountMediaTimeline as b1,Account as b2,useAccount as b3,authorizeFollowRequest as b4,rejectFollowRequest as b5,expandFollowRequests as b6,fetchFollowRequests as b7,useOwnAccount as b8,OrderedSet as b9,RelativeTimestamp$1 as bA,deleteFilter as bB,fetchFilter as bC,normalizeFilter as bD,Form as bE,FormGroup as bF,Input as bG,SelectDropdown as bH,FormActions as bI,updateFilter as bJ,createFilter as bK,_toConsumableArray as bL,getSoapboxConfig as bM,ReportableEntities as bN,Video as bO,Audio$1 as bP,MediaGallery as bQ,StatusContent$1 as bR,toggleStatusReport as bS,isRemote as bT,fetchRules as bU,getDomain as bV,vitePluginRequire_1697864656348_26092255 as bW,changeReportBlock as bX,changeReportForward as bY,Textarea as bZ,changeReportRule as b_,expandFavouritedStatuses as ba,expandAccountFavouritedStatuses as bb,fetchFavouritedStatuses as bc,fetchAccount as bd,fetchAccountFavouritedStatuses as be,vitePluginRequire_1697864667038_65461677 as bf,unblockDomain as bg,expandDomainBlocks as bh,fetchDomainBlocks as bi,useApi as bj,useEntities as bk,groupSchema as bl,Entities as bm,useUnmuteGroup as bn,GroupAvatar as bo,toast as bp,useBatchedEntities as bq,relationshipSchema as br,accountSchema as bs,DurationSelector as bt,Modal as bu,closeModal as bv,muteAccount as bw,toggleHideNotifications as bx,changeMuteDuration as by,fetchFilters as bz,PlaceholderDisplayName$1 as c,engineUserAgent as c$,ProgressBar as c0,AttachmentThumbs as c1,submitReportSuccess as c2,submitReport as c3,submitReportFail as c4,blockAccount as c5,vitePluginRequire_1697864675600_92410087 as c6,Avatar as c7,useGetState as c8,useTransaction as c9,ActionButton as cA,commonjsGlobal$2 as cB,require$$0$1 as cC,getDefaultExportFromCjs$1 as cD,Map$3 as cE,v4 as cF,Record as cG,makeGetAccount as cH,calculateStatus as cI,normalizeStatus as cJ,StatusReplyMentions as cK,QuotedStatusContainer$1 as cL,PlaceholderCard$1 as cM,PollOption as cN,DropdownMenu as cO,vitePluginRequire_1697864675597_425505 as cP,vitePluginRequire_1697864653845_56554064 as cQ,changeListEditorTitle as cR,submitListEditor as cS,_export as cT,toObject$e as cU,lengthOfArrayLike$b as cV,arraySetLength as cW,deletePropertyOrThrow$1 as cX,doesNotExceedSafeInteger$2 as cY,task$1 as cZ,global$w as c_,accountIdsToAccts as ca,badgeToTag as cb,tagToBadge as cc,setRole as cd,getBadges as ce,OutlineBox as cf,isLocal as cg,vitePluginRequire_1697864655028_67397852 as ch,deactivateUserModal as ci,deleteUserModal as cj,setBadges as ck,throttle$1 as cl,ae as cm,scrollTopTimeline as cn,Portal$1 as co,dequeueTimeline as cp,vitePluginRequire_1697864655029_75763737 as cq,__vitePreload as cr,useQuery as cs,filteredArray as ct,adSchema as cu,useQueryClient as cv,axios$1 as cw,Card as cx,CardTitle as cy,VerificationBadge as cz,useAppDispatch as d,vitePluginRequire_1697864655763_40111002 as d$,isCallable$t as d0,arraySlice$4 as d1,validateArgumentsLength$2 as d2,functionApply as d3,shortNumberFormat as d4,reduceEmoji as d5,getActualStatus as d6,StatusContainer as d7,FormattedDate as d8,StatusInfo as d9,stringMultibyte as dA,descriptors$1 as dB,functionBindContext as dC,defineBuiltIn$f as dD,defineBuiltInAccessor$8 as dE,setToStringTag$7 as dF,web_urlSearchParams_constructor as dG,internalState as dH,anInstance$4 as dI,urlConstructorDetection as dJ,hasOwnProperty_1 as dK,arrayFrom as dL,arraySliceSimple as dM,toString$t as dN,functionCall as dO,fails$F as dP,objectKeys$2 as dQ,indexedObject as dR,objectGetOwnPropertySymbols as dS,objectPropertyIsEnumerable as dT,_inherits$1 as dU,_classCallCheck$1 as dV,_assertThisInitialized$1 as dW,_createClass$1 as dX,_getPrototypeOf$1 as dY,_possibleConstructorReturn$1 as dZ,useHotkey as d_,vitePluginRequire_1697864655760_71578718 as da,vitePluginRequire_1697864655029_52560061 as db,vitePluginRequire_1697864655871_30959129 as dc,defaultMediaVisibility as dd,textForScreenReader as de,StatusActionBar as df,Tombstone as dg,StillImage as dh,isIOS as di,Blurhash$1 as dj,vitePluginRequire_1697864669798_43594879 as dk,arrayMethodIsStrict$4 as dl,toIndexedObject$a as dm,toIntegerOrInfinity$4 as dn,vitePluginRequire_1697864666744_94924775 as dp,GroupRelationship as dq,GroupPrivacy as dr,GroupMemberCount as ds,vitePluginRequire_1697864667038_72002981 as dt,truncateFilename as du,MIMETYPE_ICONS as dv,vitePluginRequire_1697864680134_20012237 as dw,vitePluginRequire_1697864651438_21676720 as dx,vitePluginRequire_1697864651438_47563443 as dy,functionUncurryThis as dz,emojiData as e,useMutation as e$,isUserTouching as e0,propTypesExports as e1,ReplyIndicator as e2,injectIntl as e3,spring as e4,OptionalMotion as e5,useCompose as e6,useDraggedFiles as e7,ComposeForm as e8,useGroup as e9,SiteLogo as eA,fetchBirthdayReminders as eB,changeAccountNoteComment as eC,submitAccountNote as eD,removeFromListEditor as eE,addToListEditor as eF,changeListSuggestions as eG,fetchListSuggestions as eH,clearListSuggestions as eI,setupListEditor as eJ,resetListEditor as eK,CardHeader as eL,removeFromListAdder as eM,addToListAdder as eN,setupListAdder as eO,resetListAdder as eP,fetchTrendingStatuses as eQ,expandSearch as eR,setSearchAccount as eS,setFilter as eT,Search as eU,generateText as eV,randomIntFromInterval as eW,useDispatch as eX,logOut$1 as eY,fetchMfa as eZ,Preferences as e_,uploadCompose as ea,cancelReplyCompose as eb,setGroupTimelineVisible as ec,usePrevious$1 as ed,cancelEventCompose as ee,queryClient as ef,PolicyKeys as eg,removeFromMentions as eh,addToMentions as ei,statusToMentionsAccountIdsArray as ej,useRegistrationStatus as ek,remoteInteraction as el,fetchConfig as em,ConfigDB as en,updateConfig as eo,Set$3 as ep,makeGetRemoteInstance as eq,Divider as er,fetchReblogs as es,fetchStatus as et,expandReblogs as eu,fetchFavourites as ev,expandFavourites as ew,fetchDislikes as ex,ReactionRecord as ey,fetchReactions as ez,useSettings as f,Route$1 as f$,patchMeSuccess as f0,BirthdayInput as f1,isDefaultAvatar as f2,isDefaultHeader as f3,patchMe as f4,updateNotificationSettings as f5,arraySpeciesCreate$2 as f6,createProperty$6 as f7,arrayMethodHasSpeciesSupport$4 as f8,toAbsoluteIndex$4 as f9,getLinks as fA,normalizeAccount as fB,fetchBackups as fC,createBackup as fD,disableMfa$1 as fE,fetchBackupCodes as fF,setupMfa as fG,confirmMfa as fH,useChat as fI,useChatContext as fJ,useChats as fK,useChatActions as fL,Tooltip as fM,secondsToDays as fN,Menu as fO,MenuButton as fP,MenuList as fQ,MessageExpirationValues as fR,MenuItem$1 as fS,vitePluginRequire_1697864669750_71014420 as fT,vitePluginRequire_1697864667738_20054408 as fU,unblockAccount as fV,SettingToggle as fW,vitePluginRequire_1697864653845_68300489 as fX,vitePluginRequire_1697864653820_86193028 as fY,matchPath$1 as fZ,Switch as f_,resizeImage$1 as fa,changeEmail as fb,promiseNativeConstructor as fc,getBuiltIn$c as fd,speciesConstructor$2 as fe,promiseResolve$1 as ff,confirmChangedEmail as fg,buildErrorMessage as fh,changePassword as fi,PasswordIndicator as fj,deleteAccount as fk,isArray$b as fl,addToUnscopables$5 as fm,supportsPassiveEvents as fn,Overlay as fo,normalizeSoapboxConfig as fp,defaultSettings as fq,useSystemTheme as fr,BackgroundShapes as fs,generateThemeCss as ft,fromJS as fu,ThemeSelector as fv,updateSoapboxConfig as fw,uploadMedia as fx,objectGetPrototypeOf as fy,api as fz,useFeatures as g,isArrayLike_1 as g$,ChatProvider as g0,createDescendantContext as g1,createNamedContext as g2,useDescendantsInit as g3,useId as g4,makeId as g5,DescendantProvider as g6,isFunction as g7,useUpdateEffect as g8,useComposedRefs as g9,fetchChats as gA,Select as gB,messageExpirationOptions as gC,useStatContext as gD,LinkFooter as gE,useRouteMatch as gF,approveUsers$1 as gG,deleteUsers$1 as gH,fetchUsers as gI,isNumber as gJ,FormattedNumber as gK,tuple as gL,parseVersion as gM,sourceCode as gN,StatusMedia as gO,deleteStatusModal as gP,makeGetReport as gQ,HoverRefWrapper as gR,closeReports as gS,fetchReports as gT,fetchModerationLog as gU,_baseGetTag as gV,isArray_1 as gW,isObjectLike_1 as gX,identity_1 as gY,_baseForOwn as gZ,_overArg as g_,useIsomorphicLayoutEffect as ga,composeEventHandlers as gb,Popover$1 as gc,positionMatchWidth as gd,useStatefulRefValue as ge,useDescendant as gf,useDescendants as gg,noop$2 as gh,UploadButton as gi,vitePluginRequire_1697864678697_19654994 as gj,textAtCursorMatchesToken as gk,search$1 as gl,emojify as gm,EmojiSelector as gn,ChatKeys as go,onlyEmoji as gp,initReport as gq,vitePluginRequire_1697864655029_81075629 as gr,stripHTML as gs,Link as gt,useChatMessages as gu,normalizeAttachment as gv,useInfiniteQuery as gw,flattenPages as gx,getNextLink as gy,ChatWidgetScreens as gz,hoistNonReactStatics$1 as h,switchAccount as h$,_baseIteratee as h0,_arrayMap as h1,_baseAssignValue as h2,eq_1 as h3,keys_1 as h4,isObject_1 as h5,_isPrototype as h6,_arrayLikeKeys as h7,_root as h8,_getSymbols as h9,FormattedList as hA,Badge as hB,Markup as hC,vitePluginRequire_1697864655059_97688881 as hD,vitePluginRequire_1697864655059_86873773 as hE,vitePluginRequire_1697864669816_30572675 as hF,capitalize$2 as hG,useEntity as hH,patronUserSchema as hI,NavLink as hJ,fetchPinnedAccounts as hK,WhoToFollowPanel as hL,BundleContainer as hM,vitePluginRequire_1697864655029_22990100 as hN,vitePluginRequire_1697864669798_95052990 as hO,is$2 as hP,makeGetOtherAccounts as hQ,useGroupsPath as hR,fetchOwnAccounts as hS,vitePluginRequire_1697864653844_80969986 as hT,vitePluginRequire_1697864655029_20168574 as hU,vitePluginRequire_1697864653844_12790617 as hV,vitePluginRequire_1697864667784_30050106 as hW,vitePluginRequire_1697864669741_76284640 as hX,vitePluginRequire_1697864653844_43623913 as hY,vitePluginRequire_1697864655029_99715776 as hZ,closeSidebar as h_,_arrayPush as ha,stubArray_1 as hb,_baseGetAllKeys as hc,_Uint8Array as hd,_Symbol as he,_getTag as hf,_nodeUtilExports as hg,_baseUnary as hh,_Stack as hi,isBufferExports as hj,_getAllKeys as hk,PropTypes as hl,isMobile as hm,compareId as hn,hueShift as ho,getHost$1 as hp,vitePluginRequire_1697864667738_64406343 as hq,vitePluginRequire_1697864652991_23502217 as hr,fetchSoapboxConfig as hs,displayFqn as ht,getAcct as hu,Banner as hv,fetchPatronInstance as hw,fetchTrendsSuccess as hx,normalizeTag as hy,fetchAccountFamiliarFollowers as hz,vitePluginRequire_1697864663407_53967501 as i,fetchAliases as i$,AccountModerationModal as i0,AccountNoteModal as i1,ActionsModal as i2,BirthdaysModal as i3,BoostModal as i4,CompareHistoryModal as i5,ComponentModal as i6,ComposeModal as i7,ComposeEventModal as i8,ConfirmationModal as i9,UnauthorizedModal as iA,VerifySmsModal as iB,VideoModal as iC,connect as iD,cancelReport as iE,showProfileHoverCard as iF,closeProfileHoverCard as iG,UserPanel as iH,updateProfileHoverCard as iI,reactDomExports as iJ,isEqual as iK,showStatusHoverCard as iL,closeStatusHoverCard as iM,updateStatusHoverCard as iN,cancelScheduledStatus as iO,vitePluginRequire_1697864675942_3397664 as iP,expandScheduledStatuses as iQ,fetchScheduledStatuses as iR,fetchUserIndex as iS,expandUserIndex as iT,setUserIndexQuery as iU,makeGetHosts as iV,federationRestrictionsDisclosed as iW,addToAliases as iX,changeAliasesSuggestions as iY,fetchAliasesSuggestions as iZ,clearAliasesSuggestions as i_,CreateGroupModal as ia,DislikesModal as ib,EditAnnouncementModal as ic,EditFederationModal as id,EmbedModal as ie,EmojiPickerModal as ig,EventMapModal as ih,EventParticipantsModal as ii,FamiliarFollowersModal as ij,FavouritesModal as ik,HotkeysModal as il,JoinEventModal as im,LandingPageModal as io,ListAdder as ip,ListEditor as iq,MediaModal as ir,MentionsModal as is,MissingDescriptionModal as it,MuteModal as iu,PolicyModal$1 as iv,ReactionsModal as iw,ReblogsModal as ix,ReplyMentionsModal as iy,ReportModal as iz,joinPublicPath as j,EventActionButton as j$,removeFromAliases as j0,moveAccount as j1,DatePicker as j2,setSchedule as j3,removeSchedule as j4,removePageItem as j5,importFetchedAccounts as j6,fetchSuggestions as j7,useLocation$1 as j8,fetchDirectory as j9,TransitionMotion as jA,unicodeMapping as jB,EmojiPickerDropdownContainer as jC,addReaction$1 as jD,removeReaction$1 as jE,expandStatusQuotes as jF,fetchStatusQuotes as jG,locationSearch as jH,AutosuggestInput as jI,fetchEventParticipationRequests as jJ,changeEditEventName as jK,changeEditEventDescription as jL,changeEditEventStartTime as jM,changeEditEventEndTime as jN,changeEditEventHasEndTime as jO,changeEditEventApprovalRequired as jP,changeEditEventLocation as jQ,uploadEventBanner as jR,undoUploadEventBanner as jS,submitEvent as jT,authorizeEventParticipationRequest as jU,rejectEventParticipationRequest as jV,joinEvent as jW,vitePluginRequire_1697864655030_99736168 as jX,EventDate as jY,MenuDivider as jZ,MenuLink as j_,expandDirectory as ja,openComposeWithText as jb,changeSettingImmediate as jc,vitePluginRequire_1697864667738_85292214 as jd,getBaseURL as je,createApp as jf,obtainOAuthToken as jg,FE_NAME as jh,SETTINGS_UPDATE as ji,importFetchedStatuses as jj,expandTimelineSuccess as jk,unregisterSw as jl,_unsupportedIterableToArray$e as jm,r as jn,LandingGradient as jo,endOnboarding as jp,fetchHistory as jq,fetchOAuthTokens as jr,vitePluginRequire_1697864655029_60412658 as js,revokeOAuthTokenById as jt,getAccessToken as ju,OtpInput as jv,PhoneInput as jw,reConfirmPhoneVerification as jx,verifyCredentials as jy,reRequestPhoneVerification as jz,vitePluginRequire_1697864655029_5178546 as k,changeAnnouncementAllDay as k$,vitePluginRequire_1697864655029_64566499 as k0,vitePluginRequire_1697864655029_78731624 as k1,vitePluginRequire_1697864655029_83692644 as k2,editEvent as k3,fetchEventIcs as k4,copy as k5,toggleBookmark as k6,quoteCompose as k7,togglePin as k8,deleteStatus$6 as k9,vitePluginRequire_1697864669750_76363491 as kA,groupKick as kB,deleteEntities$1 as kC,useGroupMembershipRequests as kD,vitePluginRequire_1697864669798_42893661 as kE,importEntities$1 as kF,expandGroupTimelineFromTag as kG,expandGroupTimeline as kH,expandGroupFeaturedTimeline as kI,groupCompose as kJ,useBackend as kK,ColumnForbidden as kL,TRUTHSOCIAL as kM,useCreateEntity as kN,fetchGroupBlocks as kO,groupUnblock as kP,useGroupMedia as kQ,vitePluginRequire_1697864669816_57605756 as kR,AxiosError as kS,getGroupGallery as kT,expandGroupMediaTimeline as kU,fetchAdminAnnouncements as kV,initAnnouncementModal as kW,deleteAnnouncement as kX,changeAnnouncementContent as kY,changeAnnouncementStartTime as kZ,changeAnnouncementEndTime as k_,mentionCompose as ka,launchChat as kb,directCompose as kc,initMuteModal as kd,toggleStatusSensitivityModal as ke,toggleReblog as kf,TranslateButton as kg,eventDiscussionCompose as kh,fetchEventParticipations as ki,vitePluginRequire_1697864669800_65455099 as kj,vitePluginRequire_1697864669074_22691868 as kk,EventPreview as kl,fetchRecentEvents as km,fetchJoinedEvents as kn,usePendingGroups as ko,useGroups as kp,useGroupRelationships as kq,useDimensions as kr,groupSearchHistory as ks,GroupActionButton as kt,groupTagSchema as ku,useEntityActions as kv,z$1 as kw,groupMemberSchema as kx,useBlockGroupMember as ky,GroupRoles as kz,vitePluginRequire_1697864663407_54715943 as l,handleCreateAnnouncement as l0,expandFollowedHashtags as l1,fetchFollowedHashtags as l2,EmojiPickerDropdown as l3,cardSchema as l4,vitePluginRequire_1697864663407_75597386 as m,vitePluginRequire_1697864653844_96831868 as n,defineMessages as o,makeGetNotification as p,useAppSelector as q,reactExports as r,setFilter$1 as s,useInstance as t,useIntl as u,vitePluginRequire_1697864655029_83209601 as v,_typeof$8 as w,validType as x,Text$2 as y,defineMessage as z}; diff --git a/packs/js/accordion-9597afee.js b/packs/js/accordion-0fbf6d28.js similarity index 95% rename from packs/js/accordion-9597afee.js rename to packs/js/accordion-0fbf6d28.js index 911ff533f..3afb4a4db 100644 --- a/packs/js/accordion-9597afee.js +++ b/packs/js/accordion-0fbf6d28.js @@ -1 +1 @@ -import{u as f,a as e,W as y,y as k,H as w,cO as A,A as l,cP as T,cQ as I,o as M}from"../index-7380452a.js";import{v as N}from"./dots-vertical-68cbc8e2.js";var c=M({collapse:{id:"accordion.collapse",defaultMessage:"Collapse"},expand:{id:"accordion.expand",defaultMessage:"Expand"}}),C=function(a){var g=a.headline,u=a.children,i=a.menu,d=a.expanded,n=d===void 0?!1:d,r=a.onToggle,p=r===void 0?function(){}:r,o=a.action,s=a.actionIcon,v=a.actionLabel,m=f(),x=function(t){p(!n),t.preventDefault()},h=function(t){o&&(o(),t.preventDefault())};return e("div",{className:"rounded-lg bg-white text-gray-900 shadow dark:bg-primary-800 dark:text-gray-100 dark:shadow-none"},void 0,e("button",{type:"button",onClick:x,title:m.formatMessage(n?c.collapse:c.expand),"aria-expanded":n,className:"flex w-full items-center justify-between px-4 py-3 font-semibold"},void 0,e("span",{},void 0,g),e(w,{alignItems:"center",space:2},void 0,i&&e(A,{items:i,src:N}),o&&s&&e("button",{onClick:h,title:v},void 0,e(l,{src:s,className:"h-5 w-5 text-gray-700 dark:text-gray-600"})),e(l,{src:n?T:I,className:"h-5 w-5 text-gray-700 dark:text-gray-600"}))),e("div",{className:y({"p-4 rounded-b-lg border-t border-solid border-gray-100 dark:border-primary-900":!0,"h-0 hidden":!n})},void 0,e(k,{},void 0,u)))};export{C as A}; +import{u as f,a as e,W as y,y as k,H as w,cO as A,A as l,cP as T,cQ as I,o as M}from"../index-be605fd2.js";import{v as N}from"./dots-vertical-68cbc8e2.js";var c=M({collapse:{id:"accordion.collapse",defaultMessage:"Collapse"},expand:{id:"accordion.expand",defaultMessage:"Expand"}}),C=function(a){var g=a.headline,u=a.children,i=a.menu,d=a.expanded,n=d===void 0?!1:d,r=a.onToggle,p=r===void 0?function(){}:r,o=a.action,s=a.actionIcon,v=a.actionLabel,m=f(),x=function(t){p(!n),t.preventDefault()},h=function(t){o&&(o(),t.preventDefault())};return e("div",{className:"rounded-lg bg-white text-gray-900 shadow dark:bg-primary-800 dark:text-gray-100 dark:shadow-none"},void 0,e("button",{type:"button",onClick:x,title:m.formatMessage(n?c.collapse:c.expand),"aria-expanded":n,className:"flex w-full items-center justify-between px-4 py-3 font-semibold"},void 0,e("span",{},void 0,g),e(w,{alignItems:"center",space:2},void 0,i&&e(A,{items:i,src:N}),o&&s&&e("button",{onClick:h,title:v},void 0,e(l,{src:s,className:"h-5 w-5 text-gray-700 dark:text-gray-600"})),e(l,{src:n?T:I,className:"h-5 w-5 text-gray-700 dark:text-gray-600"}))),e("div",{className:y({"p-4 rounded-b-lg border-t border-solid border-gray-100 dark:border-primary-900":!0,"h-0 hidden":!n})},void 0,e(k,{},void 0,u)))};export{C as A}; diff --git a/packs/js/account-moderation-modal-bc2704fb.js b/packs/js/account-moderation-modal-e488ae8f.js similarity index 99% rename from packs/js/account-moderation-modal-bc2704fb.js rename to packs/js/account-moderation-modal-e488ae8f.js index 25dec6eec..4287bec9a 100644 --- a/packs/js/account-moderation-modal-bc2704fb.js +++ b/packs/js/account-moderation-modal-e488ae8f.js @@ -1 +1 @@ -import{a,y as K,aG as oe,a5 as re,r as U,at as q,H as R,bL as P,bj as z,c8 as G,c9 as J,ca as A,u as x,cb as ne,o as N,cc as de,d as Q,bH as ie,cd as ue,bp as T,b8 as ge,g as me,b3 as ce,ce as fe,aC as ve,bu as L,a2 as le,cf as pe,b2 as he,af as H,cg as _e,ag as w,F as l,ah as $,aa as j,ch as Me,ci as we,cj as ye,ck as Ce}from"../index-7380452a.js";var Se=function(d){var r=d.tag,n=d.onDelete;return a("div",{className:"inline-flex items-center whitespace-nowrap rounded bg-primary-500 p-1"},void 0,a(K,{theme:"white"},void 0,r),a(oe,{iconClassName:"h-4 w-4",src:re,onClick:function(){return n(r)}}))},Te=function(d){var r=d.tags,n=d.onChange,c=d.placeholder,m=U.useState(""),s=q(m,2),e=s[0],u=s[1],t=function(v){n(r.filter(function(p){return p!==v}))},o=function(v){var p=v.key,_=e.trim();if(p==="Tab"&&v.preventDefault(),[",","Tab","Enter"].includes(p)&&_.length&&!r.includes(_)&&(v.preventDefault(),n([].concat(P(r),[_])),u("")),p==="Backspace"&&!e.length&&r.length){v.preventDefault();var y=P(r);y.pop(),n(y)}};return a("div",{className:"relative mt-1 grow shadow-sm"},void 0,a(R,{className:"block w-full rounded-md border-gray-400 bg-white p-2 pb-0 text-gray-900 placeholder:text-gray-600 focus:border-primary-500 focus:ring-primary-500 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-100 dark:ring-1 dark:ring-gray-800 dark:placeholder:text-gray-600 dark:focus:border-primary-500 dark:focus:ring-primary-500 sm:text-sm",space:2,wrap:!0},void 0,r.map(function(i,v){return a("div",{className:"mb-2"},void 0,a(Se,{tag:i,onDelete:t}))}),a("input",{className:"mb-2 h-8 w-32 grow bg-transparent p-1 outline-none",value:e,placeholder:c,onChange:function(v){return u(v.target.value)},onKeyDown:o})))};function Ae(){const f=z(),d=G(),{transaction:r}=J();function n(s,e){const u=t=>(t.pleroma&&(t.pleroma.is_suggested=e),t);r({Accounts:s.reduce((t,o)=>({...t,[o]:u}),{})})}async function c(s,e){var t,o;const u=A(d(),s);n(s,!0);try{await f.patch("/api/v1/pleroma/admin/users/suggest",{nicknames:u}),(t=e==null?void 0:e.onSuccess)==null||t.call(e)}catch(i){(o=e==null?void 0:e.onError)==null||o.call(e,i),n(s,!1)}}async function m(s,e){var t,o;const u=A(d(),s);n(s,!1);try{await f.patch("/api/v1/pleroma/admin/users/unsuggest",{nicknames:u}),(t=e==null?void 0:e.onSuccess)==null||t.call(e)}catch(i){(o=e==null?void 0:e.onError)==null||o.call(e,i),n(s,!0)}}return{suggest:c,unsuggest:m}}function De(){const f=z(),d=G(),{transaction:r}=J();function n(s,e){const u=t=>{if(t.pleroma){const o=t.pleroma.tags.filter(i=>i!=="verified");e&&o.push("verified"),t.pleroma.tags=o}return t.verified=e,t};r({Accounts:s.reduce((t,o)=>({...t,[o]:u}),{})})}async function c(s,e){var t,o;const u=A(d(),s);n(s,!0);try{await f.put("/api/v1/pleroma/admin/users/tag",{nicknames:u,tags:["verified"]}),(t=e==null?void 0:e.onSuccess)==null||t.call(e)}catch(i){(o=e==null?void 0:e.onError)==null||o.call(e,i),n(s,!1)}}async function m(s,e){var t,o;const u=A(d(),s);n(s,!1);try{await f.delete("/api/v1/pleroma/admin/users/tag",{data:{nicknames:u,tags:["verified"]}}),(t=e==null?void 0:e.onSuccess)==null||t.call(e)}catch(i){(o=e==null?void 0:e.onError)==null||o.call(e,i),n(s,!0)}}return{verify:c,unverify:m}}var Ee=N({placeholder:{id:"badge_input.placeholder",defaultMessage:"Enter a badge…"}}),Be=function(d){var r=d.badges,n=d.onChange,c=x(),m=r.map(ne),s=function(u){var t=u.map(de);n(t)};return a(Te,{tags:m,onChange:s,placeholder:c.formatMessage(Ee.placeholder)})},Re=function(d){return d.admin?"admin":d.moderator?"moderator":"user"},h=N({roleUser:{id:"account_moderation_modal.roles.user",defaultMessage:"User"},roleModerator:{id:"account_moderation_modal.roles.moderator",defaultMessage:"Moderator"},roleAdmin:{id:"account_moderation_modal.roles.admin",defaultMessage:"Admin"},promotedToAdmin:{id:"admin.users.actions.promote_to_admin_message",defaultMessage:"@{acct} was promoted to an admin"},promotedToModerator:{id:"admin.users.actions.promote_to_moderator_message",defaultMessage:"@{acct} was promoted to a moderator"},demotedToModerator:{id:"admin.users.actions.demote_to_moderator_message",defaultMessage:"@{acct} was demoted to a moderator"},demotedToUser:{id:"admin.users.actions.demote_to_user_message",defaultMessage:"@{acct} was demoted to a regular user"}}),Ue=function(d){var r=d.account,n=x(),c=Q(),m=U.useMemo(function(){return{user:n.formatMessage(h.roleUser),moderator:n.formatMessage(h.roleModerator),admin:n.formatMessage(h.roleAdmin)}},[]),s=function(t){var o=t.target.value;c(ue(r.id,o)).then(function(){var i;o==="admin"?i=h.promotedToAdmin:o==="moderator"&&r.admin?i=h.demotedToModerator:o==="moderator"?i=h.promotedToModerator:o==="user"&&(i=h.demotedToUser),i&&T.success(n.formatMessage(i,{acct:r.acct}))}).catch(function(){})},e=Re(r);return a(ie,{items:m,defaultValue:e,onChange:s})},S=N({userVerified:{id:"admin.users.user_verified_message",defaultMessage:"@{acct} was verified"},userUnverified:{id:"admin.users.user_unverified_message",defaultMessage:"@{acct} was unverified"},setDonorSuccess:{id:"admin.users.set_donor_message",defaultMessage:"@{acct} was set as a donor"},removeDonorSuccess:{id:"admin.users.remove_donor_message",defaultMessage:"@{acct} was removed as a donor"},userSuggested:{id:"admin.users.user_suggested_message",defaultMessage:"@{acct} was suggested"},userUnsuggested:{id:"admin.users.user_unsuggested_message",defaultMessage:"@{acct} was unsuggested"},badgesSaved:{id:"admin.users.badges_saved_message",defaultMessage:"Custom badges updated."}}),Ne=function(d){var r,n=d.onClose,c=d.accountId,m=x(),s=Q(),e=Ae(),u=e.suggest,t=e.unsuggest,o=De(),i=o.verify,v=o.unverify,p=ge(),_=p.account,y=me(),W=ce(c),g=W.account,V=g?fe(g):[],X=U.useState(V),I=q(X,2),F=I[0],Y=I[1],O=function(){return n("ACCOUNT_MODERATION")};if(!g||!_)return a(L,{onClose:O},void 0,a(ve,{}));var Z=function(){window.open("/pleroma/admin/#/users/".concat(g.id,"/"),"_blank")},b=function(D){var C=D.target.checked,E=C?S.userVerified:S.userUnverified,B=C?i:v;B([g.id],{onSuccess:function(){return T.success(m.formatMessage(E,{acct:g.acct}))}})},k=function(D){var C=D.target.checked,E=C?S.userSuggested:S.userUnsuggested,B=C?u:t;B([g.id],{onSuccess:function(){return T.success(m.formatMessage(E,{acct:g.acct}))}})},ee=function(){s(we(m,g.id))},ae=function(){s(ye(m,g.id))},te=function(){s(Ce(g.id,V,F)).then(function(){return T.success(m.formatMessage(S.badgesSaved))}).catch(function(){})};return a(L,{title:a(l,{id:"account_moderation_modal.title",defaultMessage:"Moderate @{acct}",values:{acct:g.acct}}),onClose:O},void 0,a(le,{space:4},void 0,a(pe,{},void 0,a(he,{account:g,showProfileHoverCard:!1,withLinkToProfile:!1,hideActions:!0})),a(H,{},void 0,_.admin&&_e(g)&&a(w,{label:a(l,{id:"account_moderation_modal.fields.account_role",defaultMessage:"Staff level"})},void 0,a("div",{className:"w-auto"},void 0,a(Ue,{account:g}))),a(w,{label:a(l,{id:"account_moderation_modal.fields.verified",defaultMessage:"Verified account"})},void 0,a($,{checked:g.verified,onChange:b})),y.suggestionsV2&&a(w,{label:a(l,{id:"account_moderation_modal.fields.suggested",defaultMessage:"Suggested in people to follow"})},void 0,a($,{checked:((r=g.pleroma)===null||r===void 0?void 0:r.is_suggested)===!0,onChange:k})),a(w,{label:a(l,{id:"account_moderation_modal.fields.badges",defaultMessage:"Custom badges"})},void 0,a("div",{className:"grow"},void 0,a(R,{className:"w-full",alignItems:"center",space:2},void 0,a(Be,{badges:F,onChange:Y}),a(j,{onClick:te},void 0,a(l,{id:"save",defaultMessage:"Save"})))))),a(H,{},void 0,a(w,{label:a(l,{id:"account_moderation_modal.fields.deactivate",defaultMessage:"Deactivate account"}),onClick:ee}),a(w,{label:a(l,{id:"account_moderation_modal.fields.delete",defaultMessage:"Delete account"}),onClick:ae})),a(K,{theme:"subtle",size:"xs"},void 0,a(l,{id:"account_moderation_modal.info.id",defaultMessage:"ID: {id}",values:{id:g.id}})),y.adminFE&&a(R,{justifyContent:"center"},void 0,a(j,{icon:Me,size:"sm",theme:"secondary",onClick:Z},void 0,a(l,{id:"account_moderation_modal.admin_fe",defaultMessage:"Open in AdminFE"})))))};export{Ne as default}; +import{a,y as K,aG as oe,a5 as re,r as U,at as q,H as R,bL as P,bj as z,c8 as G,c9 as J,ca as A,u as x,cb as ne,o as N,cc as de,d as Q,bH as ie,cd as ue,bp as T,b8 as ge,g as me,b3 as ce,ce as fe,aC as ve,bu as L,a2 as le,cf as pe,b2 as he,af as H,cg as _e,ag as w,F as l,ah as $,aa as j,ch as Me,ci as we,cj as ye,ck as Ce}from"../index-be605fd2.js";var Se=function(d){var r=d.tag,n=d.onDelete;return a("div",{className:"inline-flex items-center whitespace-nowrap rounded bg-primary-500 p-1"},void 0,a(K,{theme:"white"},void 0,r),a(oe,{iconClassName:"h-4 w-4",src:re,onClick:function(){return n(r)}}))},Te=function(d){var r=d.tags,n=d.onChange,c=d.placeholder,m=U.useState(""),s=q(m,2),e=s[0],u=s[1],t=function(v){n(r.filter(function(p){return p!==v}))},o=function(v){var p=v.key,_=e.trim();if(p==="Tab"&&v.preventDefault(),[",","Tab","Enter"].includes(p)&&_.length&&!r.includes(_)&&(v.preventDefault(),n([].concat(P(r),[_])),u("")),p==="Backspace"&&!e.length&&r.length){v.preventDefault();var y=P(r);y.pop(),n(y)}};return a("div",{className:"relative mt-1 grow shadow-sm"},void 0,a(R,{className:"block w-full rounded-md border-gray-400 bg-white p-2 pb-0 text-gray-900 placeholder:text-gray-600 focus:border-primary-500 focus:ring-primary-500 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-100 dark:ring-1 dark:ring-gray-800 dark:placeholder:text-gray-600 dark:focus:border-primary-500 dark:focus:ring-primary-500 sm:text-sm",space:2,wrap:!0},void 0,r.map(function(i,v){return a("div",{className:"mb-2"},void 0,a(Se,{tag:i,onDelete:t}))}),a("input",{className:"mb-2 h-8 w-32 grow bg-transparent p-1 outline-none",value:e,placeholder:c,onChange:function(v){return u(v.target.value)},onKeyDown:o})))};function Ae(){const f=z(),d=G(),{transaction:r}=J();function n(s,e){const u=t=>(t.pleroma&&(t.pleroma.is_suggested=e),t);r({Accounts:s.reduce((t,o)=>({...t,[o]:u}),{})})}async function c(s,e){var t,o;const u=A(d(),s);n(s,!0);try{await f.patch("/api/v1/pleroma/admin/users/suggest",{nicknames:u}),(t=e==null?void 0:e.onSuccess)==null||t.call(e)}catch(i){(o=e==null?void 0:e.onError)==null||o.call(e,i),n(s,!1)}}async function m(s,e){var t,o;const u=A(d(),s);n(s,!1);try{await f.patch("/api/v1/pleroma/admin/users/unsuggest",{nicknames:u}),(t=e==null?void 0:e.onSuccess)==null||t.call(e)}catch(i){(o=e==null?void 0:e.onError)==null||o.call(e,i),n(s,!0)}}return{suggest:c,unsuggest:m}}function De(){const f=z(),d=G(),{transaction:r}=J();function n(s,e){const u=t=>{if(t.pleroma){const o=t.pleroma.tags.filter(i=>i!=="verified");e&&o.push("verified"),t.pleroma.tags=o}return t.verified=e,t};r({Accounts:s.reduce((t,o)=>({...t,[o]:u}),{})})}async function c(s,e){var t,o;const u=A(d(),s);n(s,!0);try{await f.put("/api/v1/pleroma/admin/users/tag",{nicknames:u,tags:["verified"]}),(t=e==null?void 0:e.onSuccess)==null||t.call(e)}catch(i){(o=e==null?void 0:e.onError)==null||o.call(e,i),n(s,!1)}}async function m(s,e){var t,o;const u=A(d(),s);n(s,!1);try{await f.delete("/api/v1/pleroma/admin/users/tag",{data:{nicknames:u,tags:["verified"]}}),(t=e==null?void 0:e.onSuccess)==null||t.call(e)}catch(i){(o=e==null?void 0:e.onError)==null||o.call(e,i),n(s,!0)}}return{verify:c,unverify:m}}var Ee=N({placeholder:{id:"badge_input.placeholder",defaultMessage:"Enter a badge…"}}),Be=function(d){var r=d.badges,n=d.onChange,c=x(),m=r.map(ne),s=function(u){var t=u.map(de);n(t)};return a(Te,{tags:m,onChange:s,placeholder:c.formatMessage(Ee.placeholder)})},Re=function(d){return d.admin?"admin":d.moderator?"moderator":"user"},h=N({roleUser:{id:"account_moderation_modal.roles.user",defaultMessage:"User"},roleModerator:{id:"account_moderation_modal.roles.moderator",defaultMessage:"Moderator"},roleAdmin:{id:"account_moderation_modal.roles.admin",defaultMessage:"Admin"},promotedToAdmin:{id:"admin.users.actions.promote_to_admin_message",defaultMessage:"@{acct} was promoted to an admin"},promotedToModerator:{id:"admin.users.actions.promote_to_moderator_message",defaultMessage:"@{acct} was promoted to a moderator"},demotedToModerator:{id:"admin.users.actions.demote_to_moderator_message",defaultMessage:"@{acct} was demoted to a moderator"},demotedToUser:{id:"admin.users.actions.demote_to_user_message",defaultMessage:"@{acct} was demoted to a regular user"}}),Ue=function(d){var r=d.account,n=x(),c=Q(),m=U.useMemo(function(){return{user:n.formatMessage(h.roleUser),moderator:n.formatMessage(h.roleModerator),admin:n.formatMessage(h.roleAdmin)}},[]),s=function(t){var o=t.target.value;c(ue(r.id,o)).then(function(){var i;o==="admin"?i=h.promotedToAdmin:o==="moderator"&&r.admin?i=h.demotedToModerator:o==="moderator"?i=h.promotedToModerator:o==="user"&&(i=h.demotedToUser),i&&T.success(n.formatMessage(i,{acct:r.acct}))}).catch(function(){})},e=Re(r);return a(ie,{items:m,defaultValue:e,onChange:s})},S=N({userVerified:{id:"admin.users.user_verified_message",defaultMessage:"@{acct} was verified"},userUnverified:{id:"admin.users.user_unverified_message",defaultMessage:"@{acct} was unverified"},setDonorSuccess:{id:"admin.users.set_donor_message",defaultMessage:"@{acct} was set as a donor"},removeDonorSuccess:{id:"admin.users.remove_donor_message",defaultMessage:"@{acct} was removed as a donor"},userSuggested:{id:"admin.users.user_suggested_message",defaultMessage:"@{acct} was suggested"},userUnsuggested:{id:"admin.users.user_unsuggested_message",defaultMessage:"@{acct} was unsuggested"},badgesSaved:{id:"admin.users.badges_saved_message",defaultMessage:"Custom badges updated."}}),Ne=function(d){var r,n=d.onClose,c=d.accountId,m=x(),s=Q(),e=Ae(),u=e.suggest,t=e.unsuggest,o=De(),i=o.verify,v=o.unverify,p=ge(),_=p.account,y=me(),W=ce(c),g=W.account,V=g?fe(g):[],X=U.useState(V),I=q(X,2),F=I[0],Y=I[1],O=function(){return n("ACCOUNT_MODERATION")};if(!g||!_)return a(L,{onClose:O},void 0,a(ve,{}));var Z=function(){window.open("/pleroma/admin/#/users/".concat(g.id,"/"),"_blank")},b=function(D){var C=D.target.checked,E=C?S.userVerified:S.userUnverified,B=C?i:v;B([g.id],{onSuccess:function(){return T.success(m.formatMessage(E,{acct:g.acct}))}})},k=function(D){var C=D.target.checked,E=C?S.userSuggested:S.userUnsuggested,B=C?u:t;B([g.id],{onSuccess:function(){return T.success(m.formatMessage(E,{acct:g.acct}))}})},ee=function(){s(we(m,g.id))},ae=function(){s(ye(m,g.id))},te=function(){s(Ce(g.id,V,F)).then(function(){return T.success(m.formatMessage(S.badgesSaved))}).catch(function(){})};return a(L,{title:a(l,{id:"account_moderation_modal.title",defaultMessage:"Moderate @{acct}",values:{acct:g.acct}}),onClose:O},void 0,a(le,{space:4},void 0,a(pe,{},void 0,a(he,{account:g,showProfileHoverCard:!1,withLinkToProfile:!1,hideActions:!0})),a(H,{},void 0,_.admin&&_e(g)&&a(w,{label:a(l,{id:"account_moderation_modal.fields.account_role",defaultMessage:"Staff level"})},void 0,a("div",{className:"w-auto"},void 0,a(Ue,{account:g}))),a(w,{label:a(l,{id:"account_moderation_modal.fields.verified",defaultMessage:"Verified account"})},void 0,a($,{checked:g.verified,onChange:b})),y.suggestionsV2&&a(w,{label:a(l,{id:"account_moderation_modal.fields.suggested",defaultMessage:"Suggested in people to follow"})},void 0,a($,{checked:((r=g.pleroma)===null||r===void 0?void 0:r.is_suggested)===!0,onChange:k})),a(w,{label:a(l,{id:"account_moderation_modal.fields.badges",defaultMessage:"Custom badges"})},void 0,a("div",{className:"grow"},void 0,a(R,{className:"w-full",alignItems:"center",space:2},void 0,a(Be,{badges:F,onChange:Y}),a(j,{onClick:te},void 0,a(l,{id:"save",defaultMessage:"Save"})))))),a(H,{},void 0,a(w,{label:a(l,{id:"account_moderation_modal.fields.deactivate",defaultMessage:"Deactivate account"}),onClick:ee}),a(w,{label:a(l,{id:"account_moderation_modal.fields.delete",defaultMessage:"Delete account"}),onClick:ae})),a(K,{theme:"subtle",size:"xs"},void 0,a(l,{id:"account_moderation_modal.info.id",defaultMessage:"ID: {id}",values:{id:g.id}})),y.adminFE&&a(R,{justifyContent:"center"},void 0,a(j,{icon:Me,size:"sm",theme:"secondary",onClick:Z},void 0,a(l,{id:"account_moderation_modal.admin_fe",defaultMessage:"Open in AdminFE"})))))};export{Ne as default}; diff --git a/packs/js/account-note-modal-9be786e2.js b/packs/js/account-note-modal-61325a84.js similarity index 94% rename from packs/js/account-note-modal-9be786e2.js rename to packs/js/account-note-modal-61325a84.js index df0d299c7..242034a10 100644 --- a/packs/js/account-note-modal-9be786e2.js +++ b/packs/js/account-note-modal-61325a84.js @@ -1 +1 @@ -import{u as p,d as b,q as n,b3 as C,a,y as M,F as i,bu as A,o as _,bv as N,eC as y,eD as w}from"../index-7380452a.js";var r=_({placeholder:{id:"account_note.placeholder",defaultMessage:"No comment provided"},save:{id:"account_note.save",defaultMessage:"Save"}}),x=function(){var c=p(),o=b(),s=n(function(e){return e.account_notes.edit.isSubmitting}),d=n(function(e){return e.account_notes.edit.account}),l=C(d||void 0),m=l.account,f=n(function(e){return e.account_notes.edit.comment}),h=function(){o(N("ACCOUNT_NOTE"))},v=function(t){o(y(t.target.value))},u=function(){o(w())},g=function(t){t.keyCode===13&&(t.ctrlKey||t.metaKey)&&u()};return a(A,{title:a(i,{id:"account_note.target",defaultMessage:"Note for @{target}",values:{target:m.acct}}),onClose:h,confirmationAction:u,confirmationText:c.formatMessage(r.save),confirmationDisabled:s},void 0,a(M,{theme:"muted"},void 0,a(i,{id:"account_note.hint",defaultMessage:"You can keep notes about this user for yourself (this will not be shared with them):"})),a("textarea",{className:"setting-text light",placeholder:c.formatMessage(r.placeholder),value:f,onChange:v,onKeyDown:g,disabled:s,autoFocus:!0}))};export{x as default}; +import{u as p,d as b,q as n,b3 as C,a,y as M,F as i,bu as A,o as _,bv as N,eC as y,eD as w}from"../index-be605fd2.js";var r=_({placeholder:{id:"account_note.placeholder",defaultMessage:"No comment provided"},save:{id:"account_note.save",defaultMessage:"Save"}}),x=function(){var c=p(),o=b(),s=n(function(e){return e.account_notes.edit.isSubmitting}),d=n(function(e){return e.account_notes.edit.account}),l=C(d||void 0),m=l.account,f=n(function(e){return e.account_notes.edit.comment}),h=function(){o(N("ACCOUNT_NOTE"))},v=function(t){o(y(t.target.value))},u=function(){o(w())},g=function(t){t.keyCode===13&&(t.ctrlKey||t.metaKey)&&u()};return a(A,{title:a(i,{id:"account_note.target",defaultMessage:"Note for @{target}",values:{target:m.acct}}),onClose:h,confirmationAction:u,confirmationText:c.formatMessage(r.save),confirmationDisabled:s},void 0,a(M,{theme:"muted"},void 0,a(i,{id:"account_note.hint",defaultMessage:"You can keep notes about this user for yourself (this will not be shared with them):"})),a("textarea",{className:"setting-text light",placeholder:c.formatMessage(r.placeholder),value:f,onChange:v,onKeyDown:g,disabled:s,autoFocus:!0}))};export{x as default}; diff --git a/packs/js/account-search-61b68090.js b/packs/js/account-search-46dd7dbb.js similarity index 95% rename from packs/js/account-search-61b68090.js rename to packs/js/account-search-46dd7dbb.js index ddffb7485..b7ddde297 100644 --- a/packs/js/account-search-61b68090.js +++ b/packs/js/account-search-46dd7dbb.js @@ -1 +1 @@ -import{ar as b,a3 as E,as as N,u as A,r as C,at as I,a as t,R,au as _,av as D,aw as v,ax as M,W as h,a5 as k,o as K}from"../index-7380452a.js";function T(){const{isLoggedIn:c}=b();return E("direct","direct",null,null,{enabled:c})}var P=["onSelected"],o=K({placeholder:{id:"account_search.placeholder",defaultMessage:"Search for an account"}}),W=function(i){var g=i.onSelected,f=N(i,P),n=A(),m=C.useState(""),d=I(m,2),u=d[0],l=d[1],r=function(){return!(u.length>0)},p=function(){l("")},S=function(a){var e=a.target;l(e.value)},x=function(a){p(),g(a)},w=function(a){a.preventDefault(),r()||l("")},y=function(a){if(a.key==="Escape"){var e;(e=document.querySelector(".ui"))===null||e===void 0||(e=e.parentElement)===null||e===void 0||e.focus()}};return t("div",{className:"w-full"},void 0,t("label",{className:"sr-only"},void 0,n.formatMessage(o.placeholder)),t("div",{className:"relative"},void 0,R.createElement(_,D({className:"rounded-full",placeholder:n.formatMessage(o.placeholder),value:u,onChange:S,onSelected:x,onKeyDown:y,hotkey:"/"},f)),t("div",{role:"button",tabIndex:0,className:"absolute inset-y-0 right-0 flex cursor-pointer items-center px-3",onClick:w},void 0,t(v,{src:M,className:h("h-4 w-4 text-gray-400",{hidden:!r()})}),t(v,{src:k,className:h("h-4 w-4 text-gray-400",{hidden:r()}),"aria-label":n.formatMessage(o.placeholder)}))))};export{W as A,T as u}; +import{ar as b,a3 as E,as as N,u as A,r as C,at as I,a as t,R,au as _,av as D,aw as v,ax as M,W as h,a5 as k,o as K}from"../index-be605fd2.js";function T(){const{isLoggedIn:c}=b();return E("direct","direct",null,null,{enabled:c})}var P=["onSelected"],o=K({placeholder:{id:"account_search.placeholder",defaultMessage:"Search for an account"}}),W=function(i){var g=i.onSelected,f=N(i,P),n=A(),m=C.useState(""),d=I(m,2),u=d[0],l=d[1],r=function(){return!(u.length>0)},p=function(){l("")},S=function(a){var e=a.target;l(e.value)},x=function(a){p(),g(a)},w=function(a){a.preventDefault(),r()||l("")},y=function(a){if(a.key==="Escape"){var e;(e=document.querySelector(".ui"))===null||e===void 0||(e=e.parentElement)===null||e===void 0||e.focus()}};return t("div",{className:"w-full"},void 0,t("label",{className:"sr-only"},void 0,n.formatMessage(o.placeholder)),t("div",{className:"relative"},void 0,R.createElement(_,D({className:"rounded-full",placeholder:n.formatMessage(o.placeholder),value:u,onChange:S,onSelected:x,onKeyDown:y,hotkey:"/"},f)),t("div",{role:"button",tabIndex:0,className:"absolute inset-y-0 right-0 flex cursor-pointer items-center px-3",onClick:w},void 0,t(v,{src:M,className:h("h-4 w-4 text-gray-400",{hidden:!r()})}),t(v,{src:k,className:h("h-4 w-4 text-gray-400",{hidden:r()}),"aria-label":n.formatMessage(o.placeholder)}))))};export{W as A,T as u}; diff --git a/packs/js/accounts-1cafdbcf.js b/packs/js/accounts-2089f869.js similarity index 69% rename from packs/js/accounts-1cafdbcf.js rename to packs/js/accounts-2089f869.js index d47462589..5faf3ddd1 100644 --- a/packs/js/accounts-1cafdbcf.js +++ b/packs/js/accounts-2089f869.js @@ -1 +1 @@ -import{b8 as r,bj as p,d,e$ as i,f0 as a,bp as u}from"../index-7380452a.js";const l=()=>{const{account:c}=r(),o=p(),s=d();return i(t=>o.patch("/api/v1/accounts/update_credentials",t),{onMutate(t){const e=c;return s(a({...c,...t})),{cachedAccount:e}},onSuccess(t){s(a(t.data)),u.success("Chat Settings updated successfully")},onError(t,e,n){u.error("Chat Settings failed to update."),s(a(n.cachedAccount))}})};export{l as u}; +import{b8 as r,bj as p,d,e$ as i,f0 as a,bp as u}from"../index-be605fd2.js";const l=()=>{const{account:c}=r(),o=p(),s=d();return i(t=>o.patch("/api/v1/accounts/update_credentials",t),{onMutate(t){const e=c;return s(a({...c,...t})),{cachedAccount:e}},onSuccess(t){s(a(t.data)),u.success("Chat Settings updated successfully")},onError(t,e,n){u.error("Chat Settings failed to update."),s(a(n.cachedAccount))}})};export{l as u}; diff --git a/packs/js/actions-modal-70064cbb.js b/packs/js/actions-modal-50b0f682.js similarity index 95% rename from packs/js/actions-modal-70064cbb.js rename to packs/js/actions-modal-50b0f682.js index a315ed06b..ad859e68d 100644 --- a/packs/js/actions-modal-70064cbb.js +++ b/packs/js/actions-modal-50b0f682.js @@ -1 +1 @@ -import{a as t,e2 as y,W as l,F as A,e4 as M,e5 as R,R as g,H as k,av as I,I as $}from"../index-7380452a.js";var H=function(e){var o=e.status,c=e.actions,f=e.onClick,x=e.onClose,b=function(a,s){if(a===null)return t("li",{className:"dropdown-menu__separator"},"sep-".concat(s));var r=a.icon,v=r===void 0?null:r,n=a.text,u=a.meta,m=u===void 0?null:u,p=a.active,C=p===void 0?!1:p,_=a.href,i=_===void 0?"#":_,N=a.destructive,h=i==="#"?"button":"a",w=i==="#"?{onClick:f}:{href:i,rel:"noopener"};return t("li",{},"".concat(n,"-").concat(s),g.createElement(k,I({},w,{space:2.5,"data-index":s,className:l("w-full",{active:C,destructive:N}),element:h}),v&&t($,{title:n,src:v,role:"presentation",tabIndex:-1}),t("div",{},void 0,t("div",{className:l({"actions-modal__item-label":!!m})},void 0,n),t("div",{},void 0,m))))};return t(R,{defaultStyle:{top:100},style:{top:M(0)}},void 0,function(d){var a=d.top;return t("div",{className:"modal-root__modal actions-modal",style:{top:"".concat(a,"%")}},void 0,o&&t(y,{className:"actions-modal__status rounded-b-none",status:o,hideActions:!0}),t("ul",{className:l({"with-status":!!o})},void 0,c&&c.map(b),t("li",{className:"dropdown-menu__separator"}),t("li",{},void 0,t("button",{type:"button",onClick:x},void 0,t(A,{id:"lightbox.close",defaultMessage:"Cancel"})))))})};export{H as default}; +import{a as t,e2 as y,W as l,F as A,e4 as M,e5 as R,R as g,H as k,av as I,I as $}from"../index-be605fd2.js";var H=function(e){var o=e.status,c=e.actions,f=e.onClick,x=e.onClose,b=function(a,s){if(a===null)return t("li",{className:"dropdown-menu__separator"},"sep-".concat(s));var r=a.icon,v=r===void 0?null:r,n=a.text,u=a.meta,m=u===void 0?null:u,p=a.active,C=p===void 0?!1:p,_=a.href,i=_===void 0?"#":_,N=a.destructive,h=i==="#"?"button":"a",w=i==="#"?{onClick:f}:{href:i,rel:"noopener"};return t("li",{},"".concat(n,"-").concat(s),g.createElement(k,I({},w,{space:2.5,"data-index":s,className:l("w-full",{active:C,destructive:N}),element:h}),v&&t($,{title:n,src:v,role:"presentation",tabIndex:-1}),t("div",{},void 0,t("div",{className:l({"actions-modal__item-label":!!m})},void 0,n),t("div",{},void 0,m))))};return t(R,{defaultStyle:{top:100},style:{top:M(0)}},void 0,function(d){var a=d.top;return t("div",{className:"modal-root__modal actions-modal",style:{top:"".concat(a,"%")}},void 0,o&&t(y,{className:"actions-modal__status rounded-b-none",status:o,hideActions:!0}),t("ul",{className:l({"with-status":!!o})},void 0,c&&c.map(b),t("li",{className:"dropdown-menu__separator"}),t("li",{},void 0,t("button",{type:"button",onClick:x},void 0,t(A,{id:"lightbox.close",defaultMessage:"Cancel"})))))})};export{H as default}; diff --git a/packs/js/announcements-d5697a45.js b/packs/js/announcements-7255f0c7.js similarity index 93% rename from packs/js/announcements-d5697a45.js rename to packs/js/announcements-7255f0c7.js index 49277d886..e8ebdcdbd 100644 --- a/packs/js/announcements-d5697a45.js +++ b/packs/js/announcements-7255f0c7.js @@ -1 +1 @@ -import{u as p,d as h,q as g,r as A,kV as C,a as e,a2 as y,aa as l,bW as k,F as t,X as w,o as D,y as o,H as f,d8 as v,kW as M,aD as b,kX as E}from"../index-7380452a.js";import{S}from"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var d=D({heading:{id:"column.admin.announcements",defaultMessage:"Announcements"},deleteConfirm:{id:"confirmations.admin.delete_announcement.confirm",defaultMessage:"Delete"},deleteHeading:{id:"confirmations.admin.delete_announcement.heading",defaultMessage:"Delete announcement"},deleteMessage:{id:"confirmations.admin.delete_announcement.message",defaultMessage:"Are you sure you want to delete the announcement?"}}),H=function(m){var n=m.announcement,s=p(),i=h(),r=function(c){return function(){i(M(c))}},u=function(c){return function(){i(b("CONFIRM",{heading:s.formatMessage(d.deleteHeading),message:s.formatMessage(d.deleteMessage),confirm:s.formatMessage(d.deleteConfirm),onConfirm:function(){return i(E(c))}}))}};return e("div",{className:"rounded-lg bg-gray-100 p-4 dark:bg-primary-800"},n.id,e(y,{space:2},void 0,e(o,{dangerouslySetInnerHTML:{__html:n.contentHtml}}),(n.starts_at||n.ends_at||n.all_day)&&e(f,{space:2,wrap:!0},void 0,n.starts_at&&e(o,{size:"sm"},void 0,e(o,{tag:"span",size:"sm",weight:"medium"},void 0,e(t,{id:"admin.announcements.starts_at",defaultMessage:"Starts at:"}))," ",e(v,{value:n.starts_at,year:"2-digit",month:"short",day:"2-digit",weekday:"short"})),n.ends_at&&e(o,{size:"sm"},void 0,e(o,{tag:"span",size:"sm",weight:"medium"},void 0,e(t,{id:"admin.announcements.ends_at",defaultMessage:"Ends at:"}))," ",e(v,{value:n.ends_at,year:"2-digit",month:"short",day:"2-digit",weekday:"short"})),n.all_day&&e(o,{weight:"medium",size:"sm"},void 0,e(t,{id:"admin.announcements.all_day",defaultMessage:"All day"}))),e(f,{justifyContent:"end",space:2},void 0,e(l,{theme:"primary",onClick:r(n)},void 0,e(t,{id:"admin.announcements.edit",defaultMessage:"Edit"})),e(l,{theme:"primary",onClick:u(n.id)},void 0,e(t,{id:"admin.announcements.delete",defaultMessage:"Delete"})))))},x=function(){var m=p(),n=h(),s=g(function(a){return a.admin_announcements.items}),i=g(function(a){return a.admin_announcements.isLoading});A.useEffect(function(){n(C())},[]);var r=function(){n(M())},u=e(t,{id:"empty_column.admin.announcements",defaultMessage:"There are no announcements yet."});return e(w,{label:m.formatMessage(d.heading)},void 0,e(y,{className:"gap-4"},void 0,e(l,{className:"sm:w-fit sm:self-end",icon:k,onClick:r,theme:"secondary",block:!0},void 0,e(t,{id:"admin.announcements.action",defaultMessage:"Create announcement"})),e(S,{scrollKey:"announcements",emptyMessage:u,itemClassName:"py-3 first:pt-0 last:pb-0",isLoading:i,showLoading:i&&!s.count()},void 0,s.map(function(a){return e(H,{announcement:a},a.id)}))))};export{x as default}; +import{u as p,d as h,q as g,r as A,kV as C,a as e,a2 as y,aa as l,bW as k,F as t,X as w,o as D,y as o,H as f,d8 as v,kW as M,aD as b,kX as E}from"../index-be605fd2.js";import{S}from"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var d=D({heading:{id:"column.admin.announcements",defaultMessage:"Announcements"},deleteConfirm:{id:"confirmations.admin.delete_announcement.confirm",defaultMessage:"Delete"},deleteHeading:{id:"confirmations.admin.delete_announcement.heading",defaultMessage:"Delete announcement"},deleteMessage:{id:"confirmations.admin.delete_announcement.message",defaultMessage:"Are you sure you want to delete the announcement?"}}),H=function(m){var n=m.announcement,s=p(),i=h(),r=function(c){return function(){i(M(c))}},u=function(c){return function(){i(b("CONFIRM",{heading:s.formatMessage(d.deleteHeading),message:s.formatMessage(d.deleteMessage),confirm:s.formatMessage(d.deleteConfirm),onConfirm:function(){return i(E(c))}}))}};return e("div",{className:"rounded-lg bg-gray-100 p-4 dark:bg-primary-800"},n.id,e(y,{space:2},void 0,e(o,{dangerouslySetInnerHTML:{__html:n.contentHtml}}),(n.starts_at||n.ends_at||n.all_day)&&e(f,{space:2,wrap:!0},void 0,n.starts_at&&e(o,{size:"sm"},void 0,e(o,{tag:"span",size:"sm",weight:"medium"},void 0,e(t,{id:"admin.announcements.starts_at",defaultMessage:"Starts at:"}))," ",e(v,{value:n.starts_at,year:"2-digit",month:"short",day:"2-digit",weekday:"short"})),n.ends_at&&e(o,{size:"sm"},void 0,e(o,{tag:"span",size:"sm",weight:"medium"},void 0,e(t,{id:"admin.announcements.ends_at",defaultMessage:"Ends at:"}))," ",e(v,{value:n.ends_at,year:"2-digit",month:"short",day:"2-digit",weekday:"short"})),n.all_day&&e(o,{weight:"medium",size:"sm"},void 0,e(t,{id:"admin.announcements.all_day",defaultMessage:"All day"}))),e(f,{justifyContent:"end",space:2},void 0,e(l,{theme:"primary",onClick:r(n)},void 0,e(t,{id:"admin.announcements.edit",defaultMessage:"Edit"})),e(l,{theme:"primary",onClick:u(n.id)},void 0,e(t,{id:"admin.announcements.delete",defaultMessage:"Delete"})))))},x=function(){var m=p(),n=h(),s=g(function(a){return a.admin_announcements.items}),i=g(function(a){return a.admin_announcements.isLoading});A.useEffect(function(){n(C())},[]);var r=function(){n(M())},u=e(t,{id:"empty_column.admin.announcements",defaultMessage:"There are no announcements yet."});return e(w,{label:m.formatMessage(d.heading)},void 0,e(y,{className:"gap-4"},void 0,e(l,{className:"sm:w-fit sm:self-end",icon:k,onClick:r,theme:"secondary",block:!0},void 0,e(t,{id:"admin.announcements.action",defaultMessage:"Create announcement"})),e(S,{scrollKey:"announcements",emptyMessage:u,itemClassName:"py-3 first:pt-0 last:pb-0",isLoading:i,showLoading:i&&!s.count()},void 0,s.map(function(a){return e(H,{announcement:a},a.id)}))))};export{x as default}; diff --git a/packs/js/announcements-panel-452327e5.js b/packs/js/announcements-panel-4de5dd74.js similarity index 98% rename from packs/js/announcements-panel-452327e5.js rename to packs/js/announcements-panel-4de5dd74.js index d6427b4de..33d4b47d1 100644 --- a/packs/js/announcements-panel-452327e5.js +++ b/packs/js/announcements-panel-4de5dd74.js @@ -1 +1 @@ -import{a7 as I,r as h,R as j,f as x,at as R,a as r,gK as S,e4 as k,jA as D,jB as M,j as P,W as C,jC as Y,g as H,y as K,d8 as A,a2 as T,M as z,cE as $,d as B,q as L,a$ as V,H as W,F as _,jD as q,jE as G}from"../index-7380452a.js";import{R as J}from"./index-571dd45e.js";import{W as O}from"./widget-2ac720e4.js";import"./warning-07d0fac9.js";import"./arrow-right-b75290c7.js";var Q=void 0,U=function(a){var t=a.announcement,s=I(),d=h.useRef(null);h.useEffect(function(){c()});var v=function(i,e){e.button===0&&!(e.ctrlKey||e.metaKey)&&(e.preventDefault(),e.stopPropagation(),s.push("/@".concat(i.acct)))},m=function(i,e){i=i.replace(/^#/,"").toLowerCase(),e.button===0&&!(e.ctrlKey||e.metaKey)&&(e.preventDefault(),e.stopPropagation(),s.push("/tags/".concat(i)))},o=function(i,e){e.button===0&&!(e.ctrlKey||e.metaKey)&&(e.preventDefault(),s.push(i))},c=function(){if(d.current){var i=d.current.querySelectorAll("a");i.forEach(function(e){var u,n;if(!e.classList.contains("status-link")){e.classList.add("status-link"),e.setAttribute("rel","nofollow noopener"),e.setAttribute("target","_blank");var f=t.mentions.find(function(y){return e.href==="".concat(y.url)});if(f)e.addEventListener("click",v.bind(e,f),!1),e.setAttribute("title",f.acct);else if(((u=e.textContent)===null||u===void 0?void 0:u.charAt(0))==="#"||((n=e.previousSibling)===null||n===void 0||(n=n.textContent)===null||n===void 0?void 0:n.charAt(e.previousSibling.textContent.length-1))==="#")e.addEventListener("click",m.bind(e,e.text),!1);else{var g=t.statuses.get(e.href);g&&e.addEventListener("click",o.bind(Q,g),!1),e.setAttribute("title",e.href),e.classList.add("unhandled-link")}}})}};return j.createElement("div",{className:"translate text-sm",ref:d,dangerouslySetInnerHTML:{__html:t.contentHtml}})},F=function(a){return a<0?0:a<=1?a:"1+"},X=function(a){var t=a.value,s=a.obfuscate,d=x().get("reduceMotion"),v=h.useState(1),m=R(v,2),o=m[0],c=m[1],l=h.useState(t),i=R(l,2),e=i[0],u=i[1];h.useEffect(function(){e!==void 0&&(t>e?c(1):t0?"absolute":"static",transform:"translateY(".concat(w.y*100,"%)")}},N,s?F(E):r(S,{value:E}))}))})},Z=function(a){var t=a.emoji,s=a.emojiMap,d=a.hovered,v=x().get("autoPlayGif");if(M[t]){var m=M[t],o=m.filename,c=m.shortCode,l=c?":".concat(c,":"):"";return r("img",{draggable:"false",className:"emojione m-0 block",alt:t,title:l,src:P("packs/emoji/".concat(o,".svg"))})}else if(s.get(t)){var i=v||d?s.getIn([t,"url"]):s.getIn([t,"static_url"]),e=":".concat(t,":");return r("img",{draggable:"false",className:"emojione m-0 block",alt:e,title:e,src:i})}else return null},ee=function(a){var t=a.announcementId,s=a.reaction,d=a.addReaction,v=a.removeReaction,m=a.emojiMap,o=a.style,c=h.useState(!1),l=R(c,2),i=l[0],e=l[1],u=function(){s.me?v(t,s.name):d(t,s.name)},n=function(){return e(!0)},f=function(){return e(!1)},g=s.name;return M[g]&&(g=M[g].shortCode),r("button",{className:C("flex shrink-0 items-center gap-1.5 rounded-sm bg-gray-100 px-1.5 py-1 transition-colors dark:bg-primary-900",{"bg-gray-200 dark:bg-primary-800":i,"bg-primary-200 dark:bg-primary-500":s.me}),onClick:u,onMouseEnter:n,onMouseLeave:f,title:":".concat(g,":"),style:o},void 0,r("span",{className:"block h-4 w-4"},void 0,r(Z,{hovered:i,emoji:s.name,emojiMap:m})),r("span",{className:"block min-w-[9px] text-center text-xs font-medium text-primary-600 dark:text-white"},void 0,r(X,{value:s.count})))},te=function(a){var t=a.announcementId,s=a.reactions,d=a.addReaction,v=a.removeReaction,m=a.emojiMap,o=x().get("reduceMotion"),c=function(f){d(t,f.native.replace(/:/g,""))},l=function(){return{scale:o?1:0}},i=function(){return{scale:o?0:k(0,{stiffness:170,damping:26})}},e=s.filter(function(n){return n.count>0}),u=e.map(function(n){return{key:n.name,data:n,style:{scale:o?1:k(1,{stiffness:150,damping:13})}}}).toArray();return r(D,{styles:u,willEnter:l,willLeave:i},void 0,function(n){return r("div",{className:C("flex flex-wrap items-center gap-1",{"reactions-bar--empty":e.isEmpty()})},void 0,n.map(function(f){var g=f.key,y=f.data,b=f.style;return r(ee,{reaction:y,style:{transform:"scale(".concat(b.scale,")"),position:b.scale<.5?"absolute":"static"},announcementId:t,addReaction:d,removeReaction:v,emojiMap:m},g)}),e.size<8&&r(Y,{onPickEmoji:c}))})},ae=function(a){var t=a.announcement,s=a.addReaction,d=a.removeReaction,v=a.emojiMap,m=H(),o=t.starts_at&&new Date(t.starts_at),c=t.ends_at&&new Date(t.ends_at),l=new Date,i=o&&c,e=i&&o.getFullYear()===c.getFullYear()&&c.getFullYear()===l.getFullYear(),u=i&&o.getDate()===c.getDate()&&o.getMonth()===c.getMonth()&&o.getFullYear()===c.getFullYear(),n=t.all_day;return r(T,{className:"w-full",space:2},void 0,i&&r(K,{theme:"muted"},void 0,r(A,{value:o,hour12:!0,year:e||o.getFullYear()===l.getFullYear()?void 0:"numeric",month:"short",day:"2-digit",hour:n?void 0:"numeric",minute:n?void 0:"2-digit"})," ","-"," ",r(A,{value:c,hour12:!0,year:e||c.getFullYear()===l.getFullYear()?void 0:"numeric",month:u?void 0:"short",day:u?void 0:"2-digit",hour:n?void 0:"numeric",minute:n?void 0:"2-digit"})),r(U,{announcement:t}),m.announcementsReactions&&r(te,{reactions:t.reactions,announcementId:t.id,addReaction:s,removeReaction:d,emojiMap:v}))},ne=z([function(p){return p.custom_emojis}],function(p){return p.reduce(function(a,t){return a.set(t.get("shortcode"),t)},$())}),ce=function(){var a=B(),t=L(function(e){return ne(e)}),s=h.useState(0),d=R(s,2),v=d[0],m=d[1],o=L(function(e){return e.announcements.items}),c=function(u,n){return a(q(u,n))},l=function(u,n){return a(G(u,n))};if(o.size===0)return null;var i=function(u){m(u%o.size)};return r(O,{title:r(_,{id:"announcements.title",defaultMessage:"Announcements"})},void 0,r(V,{className:"relative",size:"md",variant:"rounded"},void 0,r(J,{animateHeight:!0,index:v,onChangeIndex:i},void 0,o.map(function(e){return r(ae,{announcement:e,emojiMap:t,addReaction:c,removeReaction:l},e.id)}).reverse()),o.size>1&&r(W,{space:2,alignItems:"center",justifyContent:"center",className:"relative"},void 0,o.map(function(e,u){return r("button",{tabIndex:0,onClick:function(){return m(u)},className:C({"w-2 h-2 rounded-full focus:ring-primary-600 focus:ring-2 focus:ring-offset-2":!0,"bg-gray-200 hover:bg-gray-300":u!==v,"bg-primary-600":u===v})},u)}))))};export{ce as default}; +import{a7 as I,r as h,R as j,f as x,at as R,a as r,gK as S,e4 as k,jA as D,jB as M,j as P,W as C,jC as Y,g as H,y as K,d8 as A,a2 as T,M as z,cE as $,d as B,q as L,a$ as V,H as W,F as _,jD as q,jE as G}from"../index-be605fd2.js";import{R as J}from"./index-3399e540.js";import{W as O}from"./widget-84f84d09.js";import"./warning-07d0fac9.js";import"./arrow-right-b75290c7.js";var Q=void 0,U=function(a){var t=a.announcement,s=I(),d=h.useRef(null);h.useEffect(function(){c()});var v=function(i,e){e.button===0&&!(e.ctrlKey||e.metaKey)&&(e.preventDefault(),e.stopPropagation(),s.push("/@".concat(i.acct)))},m=function(i,e){i=i.replace(/^#/,"").toLowerCase(),e.button===0&&!(e.ctrlKey||e.metaKey)&&(e.preventDefault(),e.stopPropagation(),s.push("/tags/".concat(i)))},o=function(i,e){e.button===0&&!(e.ctrlKey||e.metaKey)&&(e.preventDefault(),s.push(i))},c=function(){if(d.current){var i=d.current.querySelectorAll("a");i.forEach(function(e){var u,n;if(!e.classList.contains("status-link")){e.classList.add("status-link"),e.setAttribute("rel","nofollow noopener"),e.setAttribute("target","_blank");var f=t.mentions.find(function(y){return e.href==="".concat(y.url)});if(f)e.addEventListener("click",v.bind(e,f),!1),e.setAttribute("title",f.acct);else if(((u=e.textContent)===null||u===void 0?void 0:u.charAt(0))==="#"||((n=e.previousSibling)===null||n===void 0||(n=n.textContent)===null||n===void 0?void 0:n.charAt(e.previousSibling.textContent.length-1))==="#")e.addEventListener("click",m.bind(e,e.text),!1);else{var g=t.statuses.get(e.href);g&&e.addEventListener("click",o.bind(Q,g),!1),e.setAttribute("title",e.href),e.classList.add("unhandled-link")}}})}};return j.createElement("div",{className:"translate text-sm",ref:d,dangerouslySetInnerHTML:{__html:t.contentHtml}})},F=function(a){return a<0?0:a<=1?a:"1+"},X=function(a){var t=a.value,s=a.obfuscate,d=x().get("reduceMotion"),v=h.useState(1),m=R(v,2),o=m[0],c=m[1],l=h.useState(t),i=R(l,2),e=i[0],u=i[1];h.useEffect(function(){e!==void 0&&(t>e?c(1):t0?"absolute":"static",transform:"translateY(".concat(w.y*100,"%)")}},N,s?F(E):r(S,{value:E}))}))})},Z=function(a){var t=a.emoji,s=a.emojiMap,d=a.hovered,v=x().get("autoPlayGif");if(M[t]){var m=M[t],o=m.filename,c=m.shortCode,l=c?":".concat(c,":"):"";return r("img",{draggable:"false",className:"emojione m-0 block",alt:t,title:l,src:P("packs/emoji/".concat(o,".svg"))})}else if(s.get(t)){var i=v||d?s.getIn([t,"url"]):s.getIn([t,"static_url"]),e=":".concat(t,":");return r("img",{draggable:"false",className:"emojione m-0 block",alt:e,title:e,src:i})}else return null},ee=function(a){var t=a.announcementId,s=a.reaction,d=a.addReaction,v=a.removeReaction,m=a.emojiMap,o=a.style,c=h.useState(!1),l=R(c,2),i=l[0],e=l[1],u=function(){s.me?v(t,s.name):d(t,s.name)},n=function(){return e(!0)},f=function(){return e(!1)},g=s.name;return M[g]&&(g=M[g].shortCode),r("button",{className:C("flex shrink-0 items-center gap-1.5 rounded-sm bg-gray-100 px-1.5 py-1 transition-colors dark:bg-primary-900",{"bg-gray-200 dark:bg-primary-800":i,"bg-primary-200 dark:bg-primary-500":s.me}),onClick:u,onMouseEnter:n,onMouseLeave:f,title:":".concat(g,":"),style:o},void 0,r("span",{className:"block h-4 w-4"},void 0,r(Z,{hovered:i,emoji:s.name,emojiMap:m})),r("span",{className:"block min-w-[9px] text-center text-xs font-medium text-primary-600 dark:text-white"},void 0,r(X,{value:s.count})))},te=function(a){var t=a.announcementId,s=a.reactions,d=a.addReaction,v=a.removeReaction,m=a.emojiMap,o=x().get("reduceMotion"),c=function(f){d(t,f.native.replace(/:/g,""))},l=function(){return{scale:o?1:0}},i=function(){return{scale:o?0:k(0,{stiffness:170,damping:26})}},e=s.filter(function(n){return n.count>0}),u=e.map(function(n){return{key:n.name,data:n,style:{scale:o?1:k(1,{stiffness:150,damping:13})}}}).toArray();return r(D,{styles:u,willEnter:l,willLeave:i},void 0,function(n){return r("div",{className:C("flex flex-wrap items-center gap-1",{"reactions-bar--empty":e.isEmpty()})},void 0,n.map(function(f){var g=f.key,y=f.data,b=f.style;return r(ee,{reaction:y,style:{transform:"scale(".concat(b.scale,")"),position:b.scale<.5?"absolute":"static"},announcementId:t,addReaction:d,removeReaction:v,emojiMap:m},g)}),e.size<8&&r(Y,{onPickEmoji:c}))})},ae=function(a){var t=a.announcement,s=a.addReaction,d=a.removeReaction,v=a.emojiMap,m=H(),o=t.starts_at&&new Date(t.starts_at),c=t.ends_at&&new Date(t.ends_at),l=new Date,i=o&&c,e=i&&o.getFullYear()===c.getFullYear()&&c.getFullYear()===l.getFullYear(),u=i&&o.getDate()===c.getDate()&&o.getMonth()===c.getMonth()&&o.getFullYear()===c.getFullYear(),n=t.all_day;return r(T,{className:"w-full",space:2},void 0,i&&r(K,{theme:"muted"},void 0,r(A,{value:o,hour12:!0,year:e||o.getFullYear()===l.getFullYear()?void 0:"numeric",month:"short",day:"2-digit",hour:n?void 0:"numeric",minute:n?void 0:"2-digit"})," ","-"," ",r(A,{value:c,hour12:!0,year:e||c.getFullYear()===l.getFullYear()?void 0:"numeric",month:u?void 0:"short",day:u?void 0:"2-digit",hour:n?void 0:"numeric",minute:n?void 0:"2-digit"})),r(U,{announcement:t}),m.announcementsReactions&&r(te,{reactions:t.reactions,announcementId:t.id,addReaction:s,removeReaction:d,emojiMap:v}))},ne=z([function(p){return p.custom_emojis}],function(p){return p.reduce(function(a,t){return a.set(t.get("shortcode"),t)},$())}),ce=function(){var a=B(),t=L(function(e){return ne(e)}),s=h.useState(0),d=R(s,2),v=d[0],m=d[1],o=L(function(e){return e.announcements.items}),c=function(u,n){return a(q(u,n))},l=function(u,n){return a(G(u,n))};if(o.size===0)return null;var i=function(u){m(u%o.size)};return r(O,{title:r(_,{id:"announcements.title",defaultMessage:"Announcements"})},void 0,r(V,{className:"relative",size:"md",variant:"rounded"},void 0,r(J,{animateHeight:!0,index:v,onChangeIndex:i},void 0,o.map(function(e){return r(ae,{announcement:e,emojiMap:t,addReaction:c,removeReaction:l},e.id)}).reverse()),o.size>1&&r(W,{space:2,alignItems:"center",justifyContent:"center",className:"relative"},void 0,o.map(function(e,u){return r("button",{tabIndex:0,onClick:function(){return m(u)},className:C({"w-2 h-2 rounded-full focus:ring-primary-600 focus:ring-2 focus:ring-offset-2":!0,"bg-gray-200 hover:bg-gray-300":u!==v,"bg-primary-600":u===v})},u)}))))};export{ce as default}; diff --git a/packs/js/authorize-reject-buttons-f28a0539.js b/packs/js/authorize-reject-buttons-1aaf0a6a.js similarity index 98% rename from packs/js/authorize-reject-buttons-f28a0539.js rename to packs/js/authorize-reject-buttons-1aaf0a6a.js index bb7f672e2..d09ee6e46 100644 --- a/packs/js/authorize-reject-buttons-f28a0539.js +++ b/packs/js/authorize-reject-buttons-1aaf0a6a.js @@ -1 +1 @@ -import{r as g,at as k,a,a5 as M,H as $,dp as C,F as S,y as F,W as I,aG as G,aP as p}from"../index-7380452a.js";const H="/packs/assets/player-stop-filled-f2e06734.svg";var W=function(r){var u=r.onAuthorize,m=r.onReject,l=r.countdown,f=g.useState("pending"),v=k(f,2),i=v[0],h=v[1],d=g.useRef(),c=g.useRef(),B=g.useState(0),b=k(B,2),R=b[0],j=b[1],E=function(){var e=1;c.current=setInterval(function(){e++;var o=e*3.6;j(o),o>=360&&(clearInterval(c.current),j(0))},l/100)};function w(s,e,o){if(i===s)c.current&&clearInterval(c.current),d.current&&clearTimeout(d.current),h("pending");else{var t=function(){var q=p(regeneratorRuntime.mark(function A(){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,o();case 3:h(e),n.next=9;break;case 6:n.prev=6,n.t0=n.catch(0),n.t0&&console.error(n.t0);case 9:case"end":return n.stop()}},A,null,[[0,6]])}));return function(){return q.apply(this,arguments)}}();typeof l=="number"?(h(s),d.current=setTimeout(t,l),E()):t()}}var N=function(){var s=p(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",w("authorizing","authorized",u));case 1:case"end":return t.stop()}},e)}));return function(){return s.apply(this,arguments)}}(),L=function(){var s=p(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",w("rejecting","rejected",m));case 1:case"end":return t.stop()}},e)}));return function(){return s.apply(this,arguments)}}(),z=function(e){return i==="authorizing"&&e==="authorizing"?{background:"conic-gradient(rgb(var(--color-primary-500)) ".concat(R,"deg, rgb(var(--color-primary-500) / 0.1) 0deg)")}:i==="rejecting"&&e==="rejecting"?{background:"conic-gradient(rgb(var(--color-danger-600)) ".concat(R,"deg, rgb(var(--color-danger-600) / 0.1) 0deg)")}:{}};switch(g.useEffect(function(){return function(){d.current&&clearTimeout(d.current),c.current&&clearInterval(c.current)}},[]),i){case"authorized":return a(P,{text:a(S,{id:"authorize.success",defaultMessage:"Approved"})});case"rejected":return a(P,{text:a(S,{id:"reject.success",defaultMessage:"Rejected"})});default:return a($,{space:3,alignItems:"center"},void 0,a(T,{theme:"danger",icon:M,action:L,isLoading:i==="rejecting",disabled:i==="authorizing",style:z("rejecting")}),a(T,{theme:"primary",icon:C,action:N,isLoading:i==="authorizing",disabled:i==="rejecting",style:z("authorizing")}))}},P=function(r){var u=r.text;return a("div",{className:"rounded-full bg-gray-100 px-4 py-2 dark:bg-gray-800"},void 0,a(F,{theme:"muted",size:"sm"},void 0,u))},T=function(r){var u=r.theme,m=r.icon,l=r.action,f=r.isLoading,v=r.style,i=r.disabled;return a("div",{className:"relative"},void 0,a("div",{style:v,className:I({"flex h-11 w-11 items-center justify-center rounded-full":!0,"bg-danger-600/10":u==="danger","bg-primary-500/10":u==="primary"})},void 0,a(G,{src:f?H:m,onClick:l,theme:"seamless",className:"h-10 w-10 items-center justify-center bg-white focus:!ring-0 dark:!bg-gray-900",iconClassName:I("h-6 w-6",{"text-primary-500":u==="primary","text-danger-600":u==="danger"}),disabled:i})))};export{W as A}; +import{r as g,at as k,a,a5 as M,H as $,dp as C,F as S,y as F,W as I,aG as G,aP as p}from"../index-be605fd2.js";const H="/packs/assets/player-stop-filled-f2e06734.svg";var W=function(r){var u=r.onAuthorize,m=r.onReject,l=r.countdown,f=g.useState("pending"),v=k(f,2),i=v[0],h=v[1],d=g.useRef(),c=g.useRef(),B=g.useState(0),b=k(B,2),R=b[0],j=b[1],E=function(){var e=1;c.current=setInterval(function(){e++;var o=e*3.6;j(o),o>=360&&(clearInterval(c.current),j(0))},l/100)};function w(s,e,o){if(i===s)c.current&&clearInterval(c.current),d.current&&clearTimeout(d.current),h("pending");else{var t=function(){var q=p(regeneratorRuntime.mark(function A(){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,o();case 3:h(e),n.next=9;break;case 6:n.prev=6,n.t0=n.catch(0),n.t0&&console.error(n.t0);case 9:case"end":return n.stop()}},A,null,[[0,6]])}));return function(){return q.apply(this,arguments)}}();typeof l=="number"?(h(s),d.current=setTimeout(t,l),E()):t()}}var N=function(){var s=p(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",w("authorizing","authorized",u));case 1:case"end":return t.stop()}},e)}));return function(){return s.apply(this,arguments)}}(),L=function(){var s=p(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",w("rejecting","rejected",m));case 1:case"end":return t.stop()}},e)}));return function(){return s.apply(this,arguments)}}(),z=function(e){return i==="authorizing"&&e==="authorizing"?{background:"conic-gradient(rgb(var(--color-primary-500)) ".concat(R,"deg, rgb(var(--color-primary-500) / 0.1) 0deg)")}:i==="rejecting"&&e==="rejecting"?{background:"conic-gradient(rgb(var(--color-danger-600)) ".concat(R,"deg, rgb(var(--color-danger-600) / 0.1) 0deg)")}:{}};switch(g.useEffect(function(){return function(){d.current&&clearTimeout(d.current),c.current&&clearInterval(c.current)}},[]),i){case"authorized":return a(P,{text:a(S,{id:"authorize.success",defaultMessage:"Approved"})});case"rejected":return a(P,{text:a(S,{id:"reject.success",defaultMessage:"Rejected"})});default:return a($,{space:3,alignItems:"center"},void 0,a(T,{theme:"danger",icon:M,action:L,isLoading:i==="rejecting",disabled:i==="authorizing",style:z("rejecting")}),a(T,{theme:"primary",icon:C,action:N,isLoading:i==="authorizing",disabled:i==="rejecting",style:z("authorizing")}))}},P=function(r){var u=r.text;return a("div",{className:"rounded-full bg-gray-100 px-4 py-2 dark:bg-gray-800"},void 0,a(F,{theme:"muted",size:"sm"},void 0,u))},T=function(r){var u=r.theme,m=r.icon,l=r.action,f=r.isLoading,v=r.style,i=r.disabled;return a("div",{className:"relative"},void 0,a("div",{style:v,className:I({"flex h-11 w-11 items-center justify-center rounded-full":!0,"bg-danger-600/10":u==="danger","bg-primary-500/10":u==="primary"})},void 0,a(G,{src:f?H:m,onClick:l,theme:"seamless",className:"h-10 w-10 items-center justify-center bg-white focus:!ring-0 dark:!bg-gray-900",iconClassName:I("h-6 w-6",{"text-primary-500":u==="primary","text-danger-600":u==="danger"}),disabled:i})))};export{W as A}; diff --git a/packs/js/birthday-panel-63d3155f.js b/packs/js/birthday-panel-af5c7f67.js similarity index 86% rename from packs/js/birthday-panel-63d3155f.js rename to packs/js/birthday-panel-af5c7f67.js index 76da853f1..6588fe99b 100644 --- a/packs/js/birthday-panel-63d3155f.js +++ b/packs/js/birthday-panel-af5c7f67.js @@ -1 +1 @@ -import{d as f,q as v,b9 as p,r as g,R as y,a as n,B as R,F as B,eB as T}from"../index-7380452a.js";import{W as _}from"./widget-2ac720e4.js";import"./arrow-right-b75290c7.js";var b=function(){var r=new Date,a=new Date(r.getFullYear(),r.getMonth(),r.getDate()+1,0,0,0);return a.getTime()-r.getTime()},F=function(r){var a=r.limit,u=f(),h=v(function(e){var t;return((t=e.user_lists.birthday_reminders.get(e.me))===null||t===void 0?void 0:t.items)||p()}),s=h.slice(0,a),i=g.useRef(),l=function e(){var t,d=new Date,c=d.getDate(),m=d.getMonth()+1;(t=u(T(m,c)))===null||t===void 0||t.then(function(){i.current=setTimeout(function(){return e()},b())})};return y.useEffect(function(){return l(),function(){i.current&&clearTimeout(i.current)}},[]),s.isEmpty()?null:n(_,{title:n(B,{id:"birthday_panel.title",defaultMessage:"Birthdays"})},void 0,s.map(function(e){return n(R,{id:e,withRelationship:!1},e)}))};export{F as default}; +import{d as f,q as v,b9 as p,r as g,R as y,a as n,B as R,F as B,eB as T}from"../index-be605fd2.js";import{W as _}from"./widget-84f84d09.js";import"./arrow-right-b75290c7.js";var b=function(){var r=new Date,a=new Date(r.getFullYear(),r.getMonth(),r.getDate()+1,0,0,0);return a.getTime()-r.getTime()},F=function(r){var a=r.limit,u=f(),h=v(function(e){var t;return((t=e.user_lists.birthday_reminders.get(e.me))===null||t===void 0?void 0:t.items)||p()}),s=h.slice(0,a),i=g.useRef(),l=function e(){var t,d=new Date,c=d.getDate(),m=d.getMonth()+1;(t=u(T(m,c)))===null||t===void 0||t.then(function(){i.current=setTimeout(function(){return e()},b())})};return y.useEffect(function(){return l(),function(){i.current&&clearTimeout(i.current)}},[]),s.isEmpty()?null:n(_,{title:n(B,{id:"birthday_panel.title",defaultMessage:"Birthdays"})},void 0,s.map(function(e){return n(R,{id:e,withRelationship:!1},e)}))};export{F as default}; diff --git a/packs/js/birthdays-modal-39b60060.js b/packs/js/birthdays-modal-6fbebf50.js similarity index 86% rename from packs/js/birthdays-modal-39b60060.js rename to packs/js/birthdays-modal-6fbebf50.js index 54d84593b..b89846c2a 100644 --- a/packs/js/birthdays-modal-39b60060.js +++ b/packs/js/birthdays-modal-6fbebf50.js @@ -1 +1 @@ -import{u,b3 as m,a,I as v,b2 as f,H as y,o as h,q as b,F as c,bu as p,aB as g}from"../index-7380452a.js";import{S as _}from"./scrollable-list-df58e451.js";import{v as C}from"./balloon-551f6642.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var I=h({birthday:{id:"account.birthday",defaultMessage:"Born {date}"}}),M=function(l){var r,i=l.accountId,n=u(),s=m(i),o=s.account;if(!o)return null;var e=(r=o.pleroma)===null||r===void 0?void 0:r.birthday;if(!e)return null;var t=n.formatDate(e,{day:"numeric",month:"short",year:"numeric"});return a(y,{space:1,alignItems:"center",justifyContent:"between",className:"p-2.5"},void 0,a("div",{className:"w-full"},void 0,a(f,{account:o,withRelationship:!1})),a("div",{className:"flex items-center gap-0.5",title:n.formatMessage(I.birthday,{date:t})},void 0,a(v,{src:C}),t))},R=function(l){var r=l.onClose,i=b(function(e){var t;return(t=e.user_lists.birthday_reminders.get(e.me))===null||t===void 0?void 0:t.items}),n=function(){r("BIRTHDAYS")},s;if(!i)s=a(g,{});else{var o=a(c,{id:"birthdays_modal.empty",defaultMessage:"None of your friends have birthday today."});s=a(_,{scrollKey:"birthdays",emptyMessage:o,className:"max-w-full",itemClassName:"pb-3"},void 0,i.map(function(e){return a(M,{accountId:e},e)}))}return a(p,{title:a(c,{id:"column.birthdays",defaultMessage:"Birthdays"}),onClose:n},void 0,s)};export{R as default}; +import{u,b3 as m,a,I as v,b2 as f,H as y,o as h,q as b,F as c,bu as p,aB as g}from"../index-be605fd2.js";import{S as _}from"./scrollable-list-1e43c72d.js";import{v as C}from"./balloon-551f6642.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var I=h({birthday:{id:"account.birthday",defaultMessage:"Born {date}"}}),M=function(l){var r,i=l.accountId,n=u(),s=m(i),o=s.account;if(!o)return null;var e=(r=o.pleroma)===null||r===void 0?void 0:r.birthday;if(!e)return null;var t=n.formatDate(e,{day:"numeric",month:"short",year:"numeric"});return a(y,{space:1,alignItems:"center",justifyContent:"between",className:"p-2.5"},void 0,a("div",{className:"w-full"},void 0,a(f,{account:o,withRelationship:!1})),a("div",{className:"flex items-center gap-0.5",title:n.formatMessage(I.birthday,{date:t})},void 0,a(v,{src:C}),t))},R=function(l){var r=l.onClose,i=b(function(e){var t;return(t=e.user_lists.birthday_reminders.get(e.me))===null||t===void 0?void 0:t.items}),n=function(){r("BIRTHDAYS")},s;if(!i)s=a(g,{});else{var o=a(c,{id:"birthdays_modal.empty",defaultMessage:"None of your friends have birthday today."});s=a(_,{scrollKey:"birthdays",emptyMessage:o,className:"max-w-full",itemClassName:"pb-3"},void 0,i.map(function(e){return a(M,{accountId:e},e)}))}return a(p,{title:a(c,{id:"column.birthdays",defaultMessage:"Birthdays"}),onClose:n},void 0,s)};export{R as default}; diff --git a/packs/js/boost-modal-f29bf243.js b/packs/js/boost-modal-acdb3394.js similarity index 91% rename from packs/js/boost-modal-f29bf243.js rename to packs/js/boost-modal-acdb3394.js index 08270dedc..af668a3a4 100644 --- a/packs/js/boost-modal-f29bf243.js +++ b/packs/js/boost-modal-acdb3394.js @@ -1 +1 @@ -import{u as c,a as e,a2 as g,e2 as u,y as b,F as s,I as m,k as v,bu as f,o as p}from"../index-7380452a.js";var t=p({cancel_reblog:{id:"status.cancel_reblog_private",defaultMessage:"Un-repost"},reblog:{id:"status.reblog",defaultMessage:"Repost"}}),h=function(a){var o=a.status,l=a.onReblog,i=a.onClose,n=c(),r=function(){l(o),i()},d=o.reblogged?t.cancel_reblog:t.reblog;return e(f,{title:e(s,{id:"boost_modal.title",defaultMessage:"Repost?"}),confirmationAction:r,confirmationText:n.formatMessage(d)},void 0,e(g,{space:4},void 0,e(u,{status:o,hideActions:!0}),e(b,{},void 0,e(s,{id:"boost_modal.combo",defaultMessage:"You can press {combo} to skip this next time",values:{combo:e("span",{},void 0,"Shift + ",e(m,{className:"inline-block align-middle",src:v}))}}))))};export{h as default}; +import{u as c,a as e,a2 as g,e2 as u,y as b,F as s,I as m,k as v,bu as f,o as p}from"../index-be605fd2.js";var t=p({cancel_reblog:{id:"status.cancel_reblog_private",defaultMessage:"Un-repost"},reblog:{id:"status.reblog",defaultMessage:"Repost"}}),h=function(a){var o=a.status,l=a.onReblog,i=a.onClose,n=c(),r=function(){l(o),i()},d=o.reblogged?t.cancel_reblog:t.reblog;return e(f,{title:e(s,{id:"boost_modal.title",defaultMessage:"Repost?"}),confirmationAction:r,confirmationText:n.formatMessage(d)},void 0,e(g,{space:4},void 0,e(u,{status:o,hideActions:!0}),e(b,{},void 0,e(s,{id:"boost_modal.combo",defaultMessage:"You can press {combo} to skip this next time",values:{combo:e("span",{},void 0,"Shift + ",e(m,{className:"inline-block align-middle",src:v}))}}))))};export{h as default}; diff --git a/packs/js/chat-search-input-88ce0ef4.js b/packs/js/chat-search-input-ec7e67b1.js similarity index 99% rename from packs/js/chat-search-input-88ce0ef4.js rename to packs/js/chat-search-input-ec7e67b1.js index fa6b7fc2c..474080975 100644 --- a/packs/js/chat-search-input-88ce0ef4.js +++ b/packs/js/chat-search-input-ec7e67b1.js @@ -1,4 +1,4 @@ -import{g1 as Qt,g2 as Ct,r as l,g3 as Jt,g4 as Xt,g5 as Zt,g6 as ea,g7 as xt,g8 as ta,g9 as Ke,ga as _t,gb as te,gc as aa,gd as na,ge as ra,gf as sa,gg as oa,gh as ia,a as e,c0 as la,A as re,dv as ca,dw as ua,d as he,W as D,dj as da,a5 as Xe,aD as Te,O as wt,R as N,as as Ze,bZ as ma,av as ze,H as W,u as ae,g as Ve,fJ as He,q as se,at as z,a2 as B,y as T,aa as Ue,gi as ga,aG as Mt,gj as fa,o as ne,gk as va,gl as ha,fV as pa,b as kt,eW as ba,gm as St,co as ya,gn as Ca,fL as Ae,e$ as Nt,ef as Rt,go as It,gp as xa,aH as ut,gq as _a,bN as wa,gr as Ma,dp as dt,cO as Et,cq as Pt,bQ as ka,gs as Sa,cE as Na,a7 as et,fN as Ra,gt as mt,c7 as Ge,b8 as Ia,gu as Ea,aB as Dt,er as Pa,_ as Da,bL as Qe,bp as Tt,aP as Ta,gv as Aa,fx as Oa,bj as La,gw as Fa,gx as ja,gy as Ba,cz as At,fK as Ot,gz as Ua,bG as Lt,ax as Ft,c as $a,fU as Ka,bA as za,gA as Va}from"../index-7380452a.js";import"./es.array.splice-d733542e.js";import{V as tt}from"./index-75eb026b.js";import{v as Ha}from"./mood-smile-6a052395.js";import{l as Ga}from"./lodash-787b41ad.js";import{u as Wa}from"./useDebounce-0d4ed135.js";import{P as qa}from"./pull-to-refresh-b8beecbe.js";function Ya({autoEscape:r,caseSensitive:a=!1,findChunks:t=Bt,sanitize:n,searchWords:o,textToHighlight:s}){return Ut({chunksToHighlight:jt({chunks:t({autoEscape:r,caseSensitive:a,sanitize:n,searchWords:o,textToHighlight:s})}),totalLength:s?s.length:0})}function jt({chunks:r}){return r.sort((a,t)=>a.start-t.start).reduce((a,t)=>{if(a.length===0)return[t];{const n=a.pop();if(t.start<=n.end){const o=Math.max(n.end,t.end);a.push({highlight:!1,start:n.start,end:o})}else a.push(n,t);return a}},[])}function Bt({autoEscape:r,caseSensitive:a,sanitize:t=Qa,searchWords:n,textToHighlight:o}){return o=t(o||""),n.filter(s=>s).reduce((s,c)=>{c=t(c),r&&(c=Ja(c));const u=new RegExp(c,a?"g":"gi");let i;for(;i=u.exec(o||"");){let g=i.index,d=u.lastIndex;d>g&&s.push({highlight:!1,start:g,end:d}),i.index===u.lastIndex&&u.lastIndex++}return s},[])}function Ut({chunksToHighlight:r,totalLength:a}){const t=[];if(r.length===0)n(0,a,!1);else{let o=0;r.forEach(s=>{n(o,s.start,!1),n(s.start,s.end,!0),o=s.end}),n(o,a,!1)}return t;function n(o,s,c){s-o>0&&t.push({start:o,end:s,highlight:c})}}function Qa(r){return r}function Ja(r){return r.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var Xa={combineChunks:jt,fillInChunks:Ut,findAll:Ya,findChunks:Bt},P="IDLE",Z="SUGGESTING",de="NAVIGATING",Me="INTERACTING",fe="CLEAR",xe="CHANGE",at="INITIAL_CHANGE",q="NAVIGATE",nt="SELECT_WITH_KEYBOARD",ve="SELECT_WITH_CLICK",ke="ESCAPE",_e="BLUR",$e="INTERACT",we="FOCUS",We="OPEN_WITH_BUTTON",rt="OPEN_WITH_INPUT_CLICK",De="CLOSE_WITH_BUTTON",Za={initial:P,states:{[P]:{on:{[_e]:P,[fe]:P,[xe]:Z,[at]:P,[we]:Z,[q]:de,[We]:Z,[rt]:Z}},[Z]:{on:{[xe]:Z,[we]:Z,[q]:de,[fe]:P,[ke]:P,[_e]:P,[ve]:P,[$e]:Me,[De]:P}},[de]:{on:{[xe]:Z,[we]:Z,[fe]:P,[_e]:P,[ke]:P,[q]:de,[ve]:P,[nt]:P,[De]:P,[$e]:Me}},[Me]:{on:{[fe]:P,[xe]:Z,[we]:Z,[_e]:P,[ke]:P,[q]:de,[De]:P,[ve]:P}}}},en=(r,a)=>{let t={...r,lastEventType:a.type};switch(a.type){case xe:case at:return{...t,navigationValue:null,value:a.value};case q:case We:case rt:return{...t,navigationValue:gt(t,a)};case fe:return{...t,value:"",navigationValue:null};case _e:case ke:return{...t,navigationValue:null};case ve:return{...t,value:a.isControlled?r.value:a.value,navigationValue:null};case nt:return{...t,value:a.isControlled?r.value:r.navigationValue,navigationValue:null};case De:return{...t,navigationValue:null};case $e:return t;case we:return{...t,navigationValue:gt(t,a)};default:return t}};function tn(r){return[Z,de,Me].includes(r)}function gt(r,a){return a.value?a.value:a.persistSelection?r.value:null}var st=Qt("ComboboxDescendantContext"),oe=Ct("ComboboxContext",{}),$t=Ct("OptionContext",{}),Kt=l.forwardRef(({onSelect:r,openOnFocus:a=!1,children:t,as:n="div","aria-label":o,"aria-labelledby":s,...c},u)=>{let[i,g]=Jt(),d=l.useRef(),m=l.useRef(),f=l.useRef(),w=l.useRef(!1),C=l.useRef(!1),x={value:"",navigationValue:null},[y,v,h]=rn(Za,en,x);nn(v.lastEventType,d);let _=Xt(c.id),k=_?Zt("listbox",_):"listbox",A=l.useRef(!1),R=tn(y),F={ariaLabel:o,ariaLabelledby:s,autocompletePropRef:w,buttonRef:f,comboboxId:_,data:v,inputRef:d,isExpanded:R,listboxId:k,onSelect:r||ia,openOnFocus:a,persistSelectionRef:C,popoverRef:m,state:y,transition:h,isControlledRef:A};return l.createElement(ea,{context:st,items:i,set:g},l.createElement(oe.Provider,{value:F},l.createElement(n,{...c,"data-reach-combobox":"","data-state":it(y),"data-expanded":R||void 0,ref:u},xt(t)?t({id:_,isExpanded:R,navigationValue:v.navigationValue??null,state:y}):t)))});Kt.displayName="Combobox";var zt=l.forwardRef(({as:r="input",selectOnClick:a=!1,autocomplete:t=!0,onClick:n,onChange:o,onKeyDown:s,onBlur:c,onFocus:u,value:i,...g},d)=>{let{current:m}=l.useRef(i),f=l.useRef(!1);ta(()=>{f.current=!0},[i]);let{data:{navigationValue:w,value:C,lastEventType:x},inputRef:y,state:v,transition:h,listboxId:_,autocompletePropRef:k,openOnFocus:A,isExpanded:R,ariaLabel:F,ariaLabelledby:S,persistSelectionRef:E,isControlledRef:p}=l.useContext(oe),V=Ke(y,d),X=l.useRef(!1),Y=ot(),ee=qt(),j=typeof i<"u",Q=typeof m<"u";!j&&Q&&console.warn("ComboboxInput is changing from controlled to uncontrolled. ComboboxInput should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled ComboboxInput for the lifetime of the component. Check the `value` prop being passed in."),j&&!Q&&console.warn("ComboboxInput is changing from uncontrolled to controlled. ComboboxInput should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled ComboboxInput for the lifetime of the component. Check the `value` prop being passed in."),l.useEffect(()=>{p.current=j},[j]),_t(()=>{k.current=t},[t,k]);let O=l.useCallback(M=>{M.trim()===""?h(fe,{isControlled:j}):M===m&&!f.current?h(at,{value:M}):h(xe,{value:M})},[m,h,j]);l.useEffect(()=>{j&&i!==C&&(i.trim()!==""||(C||"").trim()!=="")&&O(i)},[i,O,j,C]),l.useEffect(()=>{var ie;let M=(ie=y.current)==null?void 0:ie.form;if(!M)return;function H(le){h(fe,{isControlled:j})}return M.addEventListener("reset",H),()=>{M==null||M.removeEventListener("reset",H)}},[y,j,h]);function G(M){let{value:H}=M.target;j||O(H)}function $(){a&&(X.current=!0),A&&x!==ve&&h(we,{persistSelection:E.current})}function b(){var M;X.current&&(X.current=!1,(M=y.current)==null||M.select()),A&&v===P&&h(rt)}let I=t&&(v===de||v===Me)?w||i||C:i||C;return l.createElement(r,{"aria-activedescendant":w?String(Yt(w)):void 0,"aria-autocomplete":"both","aria-controls":_,"aria-expanded":R,"aria-haspopup":"listbox","aria-label":F,"aria-labelledby":F?void 0:S,role:"combobox",...g,"data-reach-combobox-input":"","data-state":it(v),ref:V,onBlur:te(c,ee),onChange:te(o,G),onClick:te(n,b),onFocus:te(u,$),onKeyDown:te(s,Y),value:I||""})});zt.displayName="ComboboxInput";var Vt=l.forwardRef(({as:r="div",children:a,portal:t=!0,onKeyDown:n,onBlur:o,position:s=na,...c},u)=>{let{popoverRef:i,inputRef:g,isExpanded:d,state:m}=l.useContext(oe),f=Ke(i,u),w=ot(),C=qt(),x={"data-reach-combobox-popover":"","data-state":it(m),onKeyDown:te(n,w),onBlur:te(o,C),hidden:!d,tabIndex:-1,children:a};return t?l.createElement(aa,{as:r,...c,ref:f,"data-expanded":d||void 0,position:s,targetRef:g,unstable_skipInitialPortalRender:!0,...x}):l.createElement(r,{ref:f,...c,...x})});Vt.displayName="ComboboxPopover";var Ht=l.forwardRef(({persistSelection:r=!1,as:a="ul",...t},n)=>{let{persistSelectionRef:o,listboxId:s}=l.useContext(oe);return r&&(o.current=!0),l.createElement(a,{role:"listbox",...t,ref:n,"data-reach-combobox-list":"",id:s})});Ht.displayName="ComboboxList";var Gt=l.forwardRef(({as:r="li",children:a,index:t,value:n,onClick:o,...s},c)=>{let{onSelect:u,data:{navigationValue:i},transition:g,isControlledRef:d}=l.useContext(oe),m=l.useRef(null),[f,w]=ra(m,null),C=l.useMemo(()=>({element:f,value:n}),[n,f]),x=sa(C,st,t),y=Ke(c,w),v=i===n,h=()=>{u&&u(n),g(ve,{value:n,isControlled:d.current})};return l.createElement($t.Provider,{value:{value:n,index:x}},l.createElement(r,{"aria-selected":v,role:"option",...s,"data-reach-combobox-option":"",ref:y,id:String(Yt(n)),"data-highlighted":v?"":void 0,tabIndex:-1,onClick:te(o,h)},a?xt(a)?a({value:n,index:x}):a:l.createElement(Wt,null)))});Gt.displayName="ComboboxOption";function Wt(){let{value:r}=l.useContext($t),{data:{value:a}}=l.useContext(oe),t=l.useMemo(()=>Xa.findAll({searchWords:sn(a||"").split(/\s+/),textToHighlight:r}),[a,r]);return l.createElement(l.Fragment,null,t.length?t.map((n,o)=>{let s=r.slice(n.start,n.end);return l.createElement("span",{key:o,"data-reach-combobox-option-text":"","data-user-value":n.highlight?!0:void 0,"data-suggested-value":n.highlight?void 0:!0},s)}):r)}Wt.displayName="ComboboxOptionText";var an=l.forwardRef(({as:r="button",onClick:a,onKeyDown:t,...n},o)=>{let{transition:s,state:c,buttonRef:u,listboxId:i,isExpanded:g}=l.useContext(oe),d=Ke(u,o),m=ot(),f=()=>{s(c===P?We:De)};return l.createElement(r,{"aria-controls":i,"aria-haspopup":"listbox","aria-expanded":g,...n,"data-reach-combobox-button":"",ref:d,onClick:te(a,f),onKeyDown:te(t,m)})});an.displayName="ComboboxButton";function nn(r,a){_t(()=>{var t;(r===q||r===ke||r===ve||r===We)&&((t=a.current)==null||t.focus())},[a,r])}function ot(){let{data:{navigationValue:r},onSelect:a,state:t,transition:n,autocompletePropRef:o,persistSelectionRef:s,inputRef:c,isControlledRef:u}=l.useContext(oe),i=oa(st);return function(d){var v;let m=i.findIndex(({value:h})=>h===r);function f(){return m===i.length-1?o.current?null:C():i[(m+1)%i.length]}function w(){return m===0?o.current?null:x():m===-1?x():i[(m-1+i.length)%i.length]}function C(){return i[0]}function x(){return i[i.length-1]}let y=((v=c.current)==null?void 0:v.tagName.toUpperCase())==="TEXTAREA"&&c.current.value.includes(` +import{g1 as Qt,g2 as Ct,r as l,g3 as Jt,g4 as Xt,g5 as Zt,g6 as ea,g7 as xt,g8 as ta,g9 as Ke,ga as _t,gb as te,gc as aa,gd as na,ge as ra,gf as sa,gg as oa,gh as ia,a as e,c0 as la,A as re,dv as ca,dw as ua,d as he,W as D,dj as da,a5 as Xe,aD as Te,O as wt,R as N,as as Ze,bZ as ma,av as ze,H as W,u as ae,g as Ve,fJ as He,q as se,at as z,a2 as B,y as T,aa as Ue,gi as ga,aG as Mt,gj as fa,o as ne,gk as va,gl as ha,fV as pa,b as kt,eW as ba,gm as St,co as ya,gn as Ca,fL as Ae,e$ as Nt,ef as Rt,go as It,gp as xa,aH as ut,gq as _a,bN as wa,gr as Ma,dp as dt,cO as Et,cq as Pt,bQ as ka,gs as Sa,cE as Na,a7 as et,fN as Ra,gt as mt,c7 as Ge,b8 as Ia,gu as Ea,aB as Dt,er as Pa,_ as Da,bL as Qe,bp as Tt,aP as Ta,gv as Aa,fx as Oa,bj as La,gw as Fa,gx as ja,gy as Ba,cz as At,fK as Ot,gz as Ua,bG as Lt,ax as Ft,c as $a,fU as Ka,bA as za,gA as Va}from"../index-be605fd2.js";import"./es.array.splice-adb98933.js";import{V as tt}from"./index-85a17314.js";import{v as Ha}from"./mood-smile-6a052395.js";import{l as Ga}from"./lodash-e014fe55.js";import{u as Wa}from"./useDebounce-93e74587.js";import{P as qa}from"./pull-to-refresh-a7e092ab.js";function Ya({autoEscape:r,caseSensitive:a=!1,findChunks:t=Bt,sanitize:n,searchWords:o,textToHighlight:s}){return Ut({chunksToHighlight:jt({chunks:t({autoEscape:r,caseSensitive:a,sanitize:n,searchWords:o,textToHighlight:s})}),totalLength:s?s.length:0})}function jt({chunks:r}){return r.sort((a,t)=>a.start-t.start).reduce((a,t)=>{if(a.length===0)return[t];{const n=a.pop();if(t.start<=n.end){const o=Math.max(n.end,t.end);a.push({highlight:!1,start:n.start,end:o})}else a.push(n,t);return a}},[])}function Bt({autoEscape:r,caseSensitive:a,sanitize:t=Qa,searchWords:n,textToHighlight:o}){return o=t(o||""),n.filter(s=>s).reduce((s,c)=>{c=t(c),r&&(c=Ja(c));const u=new RegExp(c,a?"g":"gi");let i;for(;i=u.exec(o||"");){let g=i.index,d=u.lastIndex;d>g&&s.push({highlight:!1,start:g,end:d}),i.index===u.lastIndex&&u.lastIndex++}return s},[])}function Ut({chunksToHighlight:r,totalLength:a}){const t=[];if(r.length===0)n(0,a,!1);else{let o=0;r.forEach(s=>{n(o,s.start,!1),n(s.start,s.end,!0),o=s.end}),n(o,a,!1)}return t;function n(o,s,c){s-o>0&&t.push({start:o,end:s,highlight:c})}}function Qa(r){return r}function Ja(r){return r.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var Xa={combineChunks:jt,fillInChunks:Ut,findAll:Ya,findChunks:Bt},P="IDLE",Z="SUGGESTING",de="NAVIGATING",Me="INTERACTING",fe="CLEAR",xe="CHANGE",at="INITIAL_CHANGE",q="NAVIGATE",nt="SELECT_WITH_KEYBOARD",ve="SELECT_WITH_CLICK",ke="ESCAPE",_e="BLUR",$e="INTERACT",we="FOCUS",We="OPEN_WITH_BUTTON",rt="OPEN_WITH_INPUT_CLICK",De="CLOSE_WITH_BUTTON",Za={initial:P,states:{[P]:{on:{[_e]:P,[fe]:P,[xe]:Z,[at]:P,[we]:Z,[q]:de,[We]:Z,[rt]:Z}},[Z]:{on:{[xe]:Z,[we]:Z,[q]:de,[fe]:P,[ke]:P,[_e]:P,[ve]:P,[$e]:Me,[De]:P}},[de]:{on:{[xe]:Z,[we]:Z,[fe]:P,[_e]:P,[ke]:P,[q]:de,[ve]:P,[nt]:P,[De]:P,[$e]:Me}},[Me]:{on:{[fe]:P,[xe]:Z,[we]:Z,[_e]:P,[ke]:P,[q]:de,[De]:P,[ve]:P}}}},en=(r,a)=>{let t={...r,lastEventType:a.type};switch(a.type){case xe:case at:return{...t,navigationValue:null,value:a.value};case q:case We:case rt:return{...t,navigationValue:gt(t,a)};case fe:return{...t,value:"",navigationValue:null};case _e:case ke:return{...t,navigationValue:null};case ve:return{...t,value:a.isControlled?r.value:a.value,navigationValue:null};case nt:return{...t,value:a.isControlled?r.value:r.navigationValue,navigationValue:null};case De:return{...t,navigationValue:null};case $e:return t;case we:return{...t,navigationValue:gt(t,a)};default:return t}};function tn(r){return[Z,de,Me].includes(r)}function gt(r,a){return a.value?a.value:a.persistSelection?r.value:null}var st=Qt("ComboboxDescendantContext"),oe=Ct("ComboboxContext",{}),$t=Ct("OptionContext",{}),Kt=l.forwardRef(({onSelect:r,openOnFocus:a=!1,children:t,as:n="div","aria-label":o,"aria-labelledby":s,...c},u)=>{let[i,g]=Jt(),d=l.useRef(),m=l.useRef(),f=l.useRef(),w=l.useRef(!1),C=l.useRef(!1),x={value:"",navigationValue:null},[y,v,h]=rn(Za,en,x);nn(v.lastEventType,d);let _=Xt(c.id),k=_?Zt("listbox",_):"listbox",A=l.useRef(!1),R=tn(y),F={ariaLabel:o,ariaLabelledby:s,autocompletePropRef:w,buttonRef:f,comboboxId:_,data:v,inputRef:d,isExpanded:R,listboxId:k,onSelect:r||ia,openOnFocus:a,persistSelectionRef:C,popoverRef:m,state:y,transition:h,isControlledRef:A};return l.createElement(ea,{context:st,items:i,set:g},l.createElement(oe.Provider,{value:F},l.createElement(n,{...c,"data-reach-combobox":"","data-state":it(y),"data-expanded":R||void 0,ref:u},xt(t)?t({id:_,isExpanded:R,navigationValue:v.navigationValue??null,state:y}):t)))});Kt.displayName="Combobox";var zt=l.forwardRef(({as:r="input",selectOnClick:a=!1,autocomplete:t=!0,onClick:n,onChange:o,onKeyDown:s,onBlur:c,onFocus:u,value:i,...g},d)=>{let{current:m}=l.useRef(i),f=l.useRef(!1);ta(()=>{f.current=!0},[i]);let{data:{navigationValue:w,value:C,lastEventType:x},inputRef:y,state:v,transition:h,listboxId:_,autocompletePropRef:k,openOnFocus:A,isExpanded:R,ariaLabel:F,ariaLabelledby:S,persistSelectionRef:E,isControlledRef:p}=l.useContext(oe),V=Ke(y,d),X=l.useRef(!1),Y=ot(),ee=qt(),j=typeof i<"u",Q=typeof m<"u";!j&&Q&&console.warn("ComboboxInput is changing from controlled to uncontrolled. ComboboxInput should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled ComboboxInput for the lifetime of the component. Check the `value` prop being passed in."),j&&!Q&&console.warn("ComboboxInput is changing from uncontrolled to controlled. ComboboxInput should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled ComboboxInput for the lifetime of the component. Check the `value` prop being passed in."),l.useEffect(()=>{p.current=j},[j]),_t(()=>{k.current=t},[t,k]);let O=l.useCallback(M=>{M.trim()===""?h(fe,{isControlled:j}):M===m&&!f.current?h(at,{value:M}):h(xe,{value:M})},[m,h,j]);l.useEffect(()=>{j&&i!==C&&(i.trim()!==""||(C||"").trim()!=="")&&O(i)},[i,O,j,C]),l.useEffect(()=>{var ie;let M=(ie=y.current)==null?void 0:ie.form;if(!M)return;function H(le){h(fe,{isControlled:j})}return M.addEventListener("reset",H),()=>{M==null||M.removeEventListener("reset",H)}},[y,j,h]);function G(M){let{value:H}=M.target;j||O(H)}function $(){a&&(X.current=!0),A&&x!==ve&&h(we,{persistSelection:E.current})}function b(){var M;X.current&&(X.current=!1,(M=y.current)==null||M.select()),A&&v===P&&h(rt)}let I=t&&(v===de||v===Me)?w||i||C:i||C;return l.createElement(r,{"aria-activedescendant":w?String(Yt(w)):void 0,"aria-autocomplete":"both","aria-controls":_,"aria-expanded":R,"aria-haspopup":"listbox","aria-label":F,"aria-labelledby":F?void 0:S,role:"combobox",...g,"data-reach-combobox-input":"","data-state":it(v),ref:V,onBlur:te(c,ee),onChange:te(o,G),onClick:te(n,b),onFocus:te(u,$),onKeyDown:te(s,Y),value:I||""})});zt.displayName="ComboboxInput";var Vt=l.forwardRef(({as:r="div",children:a,portal:t=!0,onKeyDown:n,onBlur:o,position:s=na,...c},u)=>{let{popoverRef:i,inputRef:g,isExpanded:d,state:m}=l.useContext(oe),f=Ke(i,u),w=ot(),C=qt(),x={"data-reach-combobox-popover":"","data-state":it(m),onKeyDown:te(n,w),onBlur:te(o,C),hidden:!d,tabIndex:-1,children:a};return t?l.createElement(aa,{as:r,...c,ref:f,"data-expanded":d||void 0,position:s,targetRef:g,unstable_skipInitialPortalRender:!0,...x}):l.createElement(r,{ref:f,...c,...x})});Vt.displayName="ComboboxPopover";var Ht=l.forwardRef(({persistSelection:r=!1,as:a="ul",...t},n)=>{let{persistSelectionRef:o,listboxId:s}=l.useContext(oe);return r&&(o.current=!0),l.createElement(a,{role:"listbox",...t,ref:n,"data-reach-combobox-list":"",id:s})});Ht.displayName="ComboboxList";var Gt=l.forwardRef(({as:r="li",children:a,index:t,value:n,onClick:o,...s},c)=>{let{onSelect:u,data:{navigationValue:i},transition:g,isControlledRef:d}=l.useContext(oe),m=l.useRef(null),[f,w]=ra(m,null),C=l.useMemo(()=>({element:f,value:n}),[n,f]),x=sa(C,st,t),y=Ke(c,w),v=i===n,h=()=>{u&&u(n),g(ve,{value:n,isControlled:d.current})};return l.createElement($t.Provider,{value:{value:n,index:x}},l.createElement(r,{"aria-selected":v,role:"option",...s,"data-reach-combobox-option":"",ref:y,id:String(Yt(n)),"data-highlighted":v?"":void 0,tabIndex:-1,onClick:te(o,h)},a?xt(a)?a({value:n,index:x}):a:l.createElement(Wt,null)))});Gt.displayName="ComboboxOption";function Wt(){let{value:r}=l.useContext($t),{data:{value:a}}=l.useContext(oe),t=l.useMemo(()=>Xa.findAll({searchWords:sn(a||"").split(/\s+/),textToHighlight:r}),[a,r]);return l.createElement(l.Fragment,null,t.length?t.map((n,o)=>{let s=r.slice(n.start,n.end);return l.createElement("span",{key:o,"data-reach-combobox-option-text":"","data-user-value":n.highlight?!0:void 0,"data-suggested-value":n.highlight?void 0:!0},s)}):r)}Wt.displayName="ComboboxOptionText";var an=l.forwardRef(({as:r="button",onClick:a,onKeyDown:t,...n},o)=>{let{transition:s,state:c,buttonRef:u,listboxId:i,isExpanded:g}=l.useContext(oe),d=Ke(u,o),m=ot(),f=()=>{s(c===P?We:De)};return l.createElement(r,{"aria-controls":i,"aria-haspopup":"listbox","aria-expanded":g,...n,"data-reach-combobox-button":"",ref:d,onClick:te(a,f),onKeyDown:te(t,m)})});an.displayName="ComboboxButton";function nn(r,a){_t(()=>{var t;(r===q||r===ke||r===ve||r===We)&&((t=a.current)==null||t.focus())},[a,r])}function ot(){let{data:{navigationValue:r},onSelect:a,state:t,transition:n,autocompletePropRef:o,persistSelectionRef:s,inputRef:c,isControlledRef:u}=l.useContext(oe),i=oa(st);return function(d){var v;let m=i.findIndex(({value:h})=>h===r);function f(){return m===i.length-1?o.current?null:C():i[(m+1)%i.length]}function w(){return m===0?o.current?null:x():m===-1?x():i[(m-1+i.length)%i.length]}function C(){return i[0]}function x(){return i[i.length-1]}let y=((v=c.current)==null?void 0:v.tagName.toUpperCase())==="TEXTAREA"&&c.current.value.includes(` `);switch(d.key){case"ArrowDown":if(!i||!i.length)return;if(t===P){if(y)return;d.preventDefault(),n(q,{persistSelection:s.current})}else{d.preventDefault();let h=f();n(q,{value:h?h.value:null})}break;case"ArrowUp":if(!i||!i.length)return;if(t===P){if(y)return;d.preventDefault(),n(q,{persistSelection:s.current})}else{d.preventDefault();let h=w();n(q,{value:h?h.value:null})}break;case"Home":case"PageUp":if(d.preventDefault(),!i||i.length===0)return;t===P?n(q):n(q,{value:C().value});break;case"End":case"PageDown":if(d.preventDefault(),!i||i.length===0)return;t===P?n(q):n(q,{value:x().value});break;case"Escape":t!==P&&n(ke);break;case"Enter":t===de&&r!==null&&(d.preventDefault(),a&&a(r),n(nt,{isControlled:u.current}));break}}}function qt(){let{state:r,transition:a,popoverRef:t,inputRef:n,buttonRef:o}=l.useContext(oe);return function(c){let u=t.current,i=n.current,g=o.current,d=c.relatedTarget;d!==i&&d!==g&&u&&(u.contains(d)?r!==Me&&a($e):a(_e))}}function rn(r,a,t){let[n,o]=l.useState(r.initial),[s,c]=l.useReducer(a,t);return[n,s,(i,g={})=>{let d=r.states[n],m=d&&d.on[i];if(m){c({type:i,state:n,nextState:n,...g}),o(m);return}}]}function Yt(r){let a=0;if(r.length===0)return a;for(let t=0;t0,d=function(f){return function(){n&&n(f)}};return e("div",{className:` block w-full diff --git a/packs/js/chat-widget-c0fe4d5a.js b/packs/js/chat-widget-a6429f4e.js similarity index 96% rename from packs/js/chat-widget-c0fe4d5a.js rename to packs/js/chat-widget-a6429f4e.js index e93ec136c..6a8c06142 100644 --- a/packs/js/chat-widget-c0fe4d5a.js +++ b/packs/js/chat-widget-a6429f4e.js @@ -1 +1 @@ -import{as as K,R as C,H as x,av as z,a as e,y as b,aG as $,cQ as Z,cP as ee,d as ae,u as N,g as V,fJ as T,fL as te,q as ne,d_ as L,A as S,d$ as U,a2 as y,fT as se,fU as oe,af as ie,ag as ce,gB as re,gC as le,c7 as W,o as I,gz as v,aD as O,c5 as ue,fV as de,fN as D,r as q,L as G,cz as ge,fM as he,c6 as ve,fY as j,W as me,aa as fe,gD as Ce,at as pe,fK as be,F as _e,b8 as ye,a7 as ke,g0 as xe}from"../index-7380452a.js";import{u as Me}from"./useDebounce-0d4ed135.js";import{C as we,a as Se,c as Ae,E as Ne,b as Te}from"./chat-search-input-88ce0ef4.js";import"./es.array.splice-d733542e.js";import"./index-75eb026b.js";import"./mood-smile-6a052395.js";import"./lodash-787b41ad.js";import"./pull-to-refresh-b8beecbe.js";var Ie=["isOpen","isToggleable","onToggle","secondaryAction","secondaryActionIcon","title","unreadCount"],P=function(n){var a=n.isOpen,s=n.isToggleable,o=s===void 0?!0:s,t=n.onToggle,i=n.secondaryAction,c=n.secondaryActionIcon,g=n.title,d=n.unreadCount,p=K(n,Ie),_=o?"button":"div",m={};return o&&(m.onClick=t),C.createElement(x,z({},p,{alignItems:"center",justifyContent:"between",className:"h-16 rounded-t-xl px-4 py-3"}),C.createElement(_,z({className:"flex h-16 grow flex-row items-center space-x-1","data-testid":"title"},m),e(b,{weight:"semibold",tag:"div"},void 0,g),typeof d<"u"&&d>0&&e(x,{alignItems:"center",space:2},void 0,e(b,{weight:"semibold","data-testid":"unread-count"},void 0,"(",d,")"),e("div",{className:"h-2.5 w-2.5 rounded-full bg-accent-300"}))),e(x,{space:2,alignItems:"center"},void 0,i?e($,{onClick:i,src:c,iconClassName:"h-5 w-5 text-gray-600"}):null,e($,{onClick:t,src:a?Z:ee,iconClassName:"h-5 w-5 text-gray-600"})))},u=I({blockMessage:{id:"chat_settings.block.message",defaultMessage:"Blocking will prevent this profile from direct messaging you and viewing your content. You can unblock later."},blockHeading:{id:"chat_settings.block.heading",defaultMessage:"Block @{acct}"},blockConfirm:{id:"chat_settings.block.confirm",defaultMessage:"Block"},unblockMessage:{id:"chat_settings.unblock.message",defaultMessage:"Unblocking will allow this profile to direct message you and view your content."},unblockHeading:{id:"chat_settings.unblock.heading",defaultMessage:"Unblock @{acct}"},unblockConfirm:{id:"chat_settings.unblock.confirm",defaultMessage:"Unblock"},leaveMessage:{id:"chat_settings.leave.message",defaultMessage:"Are you sure you want to leave this chat? Messages will be deleted for you and this chat will be removed from your inbox."},leaveHeading:{id:"chat_settings.leave.heading",defaultMessage:"Leave Chat"},leaveConfirm:{id:"chat_settings.leave.confirm",defaultMessage:"Leave Chat"},title:{id:"chat_settings.title",defaultMessage:"Chat Details"},blockUser:{id:"chat_settings.options.block_user",defaultMessage:"Block @{acct}"},unblockUser:{id:"chat_settings.options.unblock_user",defaultMessage:"Unblock @{acct}"},leaveChat:{id:"chat_settings.options.leave_chat",defaultMessage:"Leave Chat"},autoDeleteLabel:{id:"chat_settings.auto_delete.label",defaultMessage:"Auto-delete messages"},autoDeleteDays:{id:"chat_settings.auto_delete.days",defaultMessage:"{day, plural, one {# day} other {# days}}"}}),Pe=function(){var n=ae(),a=N(),s=V(),o=T(),t=o.chat,i=o.changeScreen,c=o.toggleChatPane,g=te(t==null?void 0:t.id),d=g.deleteChat,p=g.updateChat,_=function(l){return p.mutate({message_expiration:l})},m=ne(function(r){var l;return r.getIn(["relationships",t==null||(l=t.account)===null||l===void 0?void 0:l.id,"blocking"])}),h=function(){i(v.CHAT,t==null?void 0:t.id)},w=function(){h(),c()},M=function(){n(O("CONFIRM",{heading:a.formatMessage(u.blockHeading,{acct:t==null?void 0:t.account.acct}),message:a.formatMessage(u.blockMessage),confirm:a.formatMessage(u.blockConfirm),confirmationTheme:"primary",onConfirm:function(){return n(ue(t==null?void 0:t.account.id))}}))},A=function(){n(O("CONFIRM",{heading:a.formatMessage(u.unblockHeading,{acct:t==null?void 0:t.account.acct}),message:a.formatMessage(u.unblockMessage),confirm:a.formatMessage(u.unblockConfirm),confirmationTheme:"primary",onConfirm:function(){return n(de(t==null?void 0:t.account.id))}}))},f=function(){n(O("CONFIRM",{heading:a.formatMessage(u.leaveHeading),message:a.formatMessage(u.leaveMessage),confirm:a.formatMessage(u.leaveConfirm),confirmationTheme:"primary",onConfirm:function(){return d.mutate()}}))};return t?C.createElement(C.Fragment,null,e(P,{isOpen:!0,isToggleable:!1,onToggle:w,title:e(x,{alignItems:"center",space:2},void 0,C.createElement("button",{onClick:h,ref:L("Backspace")},e(S,{src:U,className:"h-6 w-6 text-gray-600 dark:text-gray-400"})),e(b,{weight:"semibold"},void 0,a.formatMessage(u.title)))}),e(y,{space:4,className:"mx-auto w-5/6"},void 0,e(x,{alignItems:"center",space:3},void 0,e(W,{src:t.account.avatar_static,size:50}),e(y,{},void 0,e(b,{weight:"semibold"},void 0,t.account.display_name),e(b,{size:"sm",theme:"primary"},void 0,"@",t.account.acct))),s.chatsExpiration&&e(ie,{},void 0,e(ce,{label:a.formatMessage(u.autoDeleteLabel)},void 0,e(re,{defaultValue:t.message_expiration,onChange:function(l){return _(Number(l.target.value))}},void 0,le.map(function(r){var l=D(r);return e("option",{value:r},r,a.formatMessage(u.autoDeleteDays,{day:l}))})))),e(y,{space:5},void 0,e("button",{onClick:m?A:M,className:"flex w-full items-center space-x-2 text-sm font-bold text-primary-600 dark:text-accent-blue"},void 0,e(S,{src:se,className:"h-5 w-5"}),e("span",{},void 0,a.formatMessage(m?u.unblockUser:u.blockUser,{acct:t.account.acct}))),s.chatsDelete&&e("button",{onClick:f,className:"flex w-full items-center space-x-2 text-sm font-bold text-danger-600"},void 0,e(S,{src:oe,className:"h-5 w-5"}),e("span",{},void 0,a.formatMessage(u.leaveChat)))))):null},F=I({autoDeleteMessage:{id:"chat_window.auto_delete_label",defaultMessage:"Auto-delete after {day, plural, one {# day} other {# days}}"},autoDeleteMessageTooltip:{id:"chat_window.auto_delete_tooltip",defaultMessage:"Chat messages are set to auto-delete after {day, plural, one {# day} other {# days}} upon sending."}}),He=function(n){var a=n.enabled,s=n.to,o=n.children;return a?e(G,{to:s},void 0,o):C.createElement(C.Fragment,null,o)},Be=function(){var n=N(),a=T(),s=a.chat,o=a.currentChatId,t=a.screen,i=a.changeScreen,c=a.isOpen,g=a.needsAcceptance,d=a.toggleChatPane,p=q.useRef(null),_=function(){i(v.INBOX)},m=function(){d(),i(v.SEARCH)},h=function(){i(v.CHAT_SETTINGS,o)},w=function(){if(!g)return c?h:m};return s?t===v.CHAT_SETTINGS?e(Pe,{}):C.createElement(C.Fragment,null,e(P,{title:e(x,{alignItems:"center",space:2},void 0,c&&C.createElement("button",{onClick:_,ref:L("Backspace")},e(S,{src:U,className:"h-6 w-6 text-gray-600 dark:text-gray-400"})),e(x,{alignItems:"center",space:3},void 0,c&&e(G,{to:"/@".concat(s.account.acct)},void 0,e(W,{src:s.account.avatar,size:40})),e(y,{alignItems:"start"},void 0,e(He,{enabled:c,to:"/@".concat(s.account.acct)},void 0,e("div",{className:"flex grow items-center space-x-1"},void 0,e(b,{size:"sm",weight:"bold",truncate:!0},void 0,s.account.display_name||"@".concat(s.account.acct)),s.account.verified&&e(ge,{}))),s.message_expiration&&e(he,{text:n.formatMessage(F.autoDeleteMessageTooltip,{day:D(s.message_expiration)})},void 0,e(b,{size:"sm",weight:"medium",theme:"primary",truncate:!0,className:"cursor-help"},void 0,n.formatMessage(F.autoDeleteMessage,{day:D(s.message_expiration)})))))),secondaryAction:w(),secondaryActionIcon:c?ve:j,isToggleable:!c,isOpen:c,onToggle:d}),e(y,{className:"h-full grow overflow-hidden",space:2},void 0,e(we,{chat:s,inputRef:p}))):null},Oe=I({title:{id:"chat_search.title",defaultMessage:"Messages"}}),Ee=function(){var n=N(),a=T(),s=a.changeScreen,o=a.isOpen,t=a.toggleChatPane;return e(P,{"data-testid":"pane-header",title:e(x,{alignItems:"center",space:2},void 0,C.createElement("button",{onClick:function(){s(v.INBOX)},ref:L("Backspace")},e(S,{src:U,className:"h-6 w-6 text-gray-600 dark:text-gray-400"})),e(b,{size:"sm",weight:"bold",truncate:!0},void 0,n.formatMessage(Oe.title))),isOpen:o,isToggleable:!1,onToggle:t})},E=function(n){var a=n.isOpen,s=a===void 0?!1:a,o=n.index,t=n.children;n.main;var i=404*o+20;return e("div",{className:me("fixed bottom-0 right-1 z-[99] flex w-96 flex-col rounded-t-lg bg-white shadow-3xl dark:bg-gray-900",{"h-[550px] max-h-[100vh]":s,"h-16":!s}),style:{right:"".concat(i,"px")},"data-testid":"pane"},void 0,t)},R=I({title:{id:"chat_search.empty_results_blankslate.title",defaultMessage:"No messages yet"},body:{id:"chat_search.empty_results_blankslate.body",defaultMessage:"Search for someone to chat with."},action:{id:"chat_search.empty_results_blankslate.action",defaultMessage:"Message someone"}}),Re=function(n){var a=n.onSearch,s=N();return e(y,{alignItems:"center",justifyContent:"center",className:"h-full grow","data-testid":"chat-pane-blankslate"},void 0,e(y,{space:4},void 0,e(y,{space:1,className:"mx-auto max-w-[80%]"},void 0,e(b,{size:"lg",weight:"bold",align:"center"},void 0,s.formatMessage(R.title)),e(b,{theme:"muted",align:"center"},void 0,s.formatMessage(R.body))),e("div",{className:"mx-auto"},void 0,e(fe,{theme:"primary",onClick:a},void 0,s.formatMessage(R.action)))))},De=function(){var n=V(),a=Me,s=Ce(),o=s.unreadChatsCount,t=q.useState(),i=pe(t,2),c=i[0],g=i[1],d=a(c,300),p=T(),_=p.screen,m=p.changeScreen,h=p.isOpen,w=p.toggleChatPane,M=be(d),A=M.chatsQuery,f=A.data,r=A.isLoading,l=Number(d==null?void 0:d.length)>0,Q=function(B){m(v.CHAT,B.id),g(void 0)},X=function(){l&&g("")},Y=function(){if(l||Number(f==null?void 0:f.length)>0||r)return e(y,{space:4,className:"h-full grow"},void 0,n.chatsSearch&&e("div",{className:"px-4"},void 0,e(Te,{value:c||"",onChange:function(J){return g(J.target.value)},onClear:X})),Number(f==null?void 0:f.length)>0||r?e(Ae,{searchValue:d,onClickChat:Q}):e(Ne,{}));if((f==null?void 0:f.length)===0)return e(Re,{onSearch:function(){m(v.SEARCH)}})};return _===v.CHAT||_===v.CHAT_SETTINGS?e(E,{isOpen:h,index:0,main:!0},void 0,e(Be,{})):_===v.SEARCH?e(E,{isOpen:h,index:0,main:!0},void 0,e(Ee,{}),h?e(Se,{}):null):e(E,{isOpen:h,index:0,main:!0},void 0,e(P,{title:e(_e,{id:"column.chats",defaultMessage:"Chats"}),unreadCount:o,isOpen:h,onToggle:w,secondaryAction:function(){m(v.SEARCH),g(void 0),h||w()},secondaryActionIcon:j}),h?Y():null)},Ge=function(){var n,a,s=ye(),o=s.account,t=ke(),i=t.location.pathname,c=!!i.match(/^\/chats/),g=(n=o==null||(a=o.source)===null||a===void 0?void 0:a.chats_onboarded)!==null&&n!==void 0?n:!0;return!g||c?null:e(xe,{},void 0,e(De,{}))};export{Ge as default}; +import{as as K,R as C,H as x,av as z,a as e,y as b,aG as $,cQ as Z,cP as ee,d as ae,u as N,g as V,fJ as T,fL as te,q as ne,d_ as L,A as S,d$ as U,a2 as y,fT as se,fU as oe,af as ie,ag as ce,gB as re,gC as le,c7 as W,o as I,gz as v,aD as O,c5 as ue,fV as de,fN as D,r as q,L as G,cz as ge,fM as he,c6 as ve,fY as j,W as me,aa as fe,gD as Ce,at as pe,fK as be,F as _e,b8 as ye,a7 as ke,g0 as xe}from"../index-be605fd2.js";import{u as Me}from"./useDebounce-93e74587.js";import{C as we,a as Se,c as Ae,E as Ne,b as Te}from"./chat-search-input-ec7e67b1.js";import"./es.array.splice-adb98933.js";import"./index-85a17314.js";import"./mood-smile-6a052395.js";import"./lodash-e014fe55.js";import"./pull-to-refresh-a7e092ab.js";var Ie=["isOpen","isToggleable","onToggle","secondaryAction","secondaryActionIcon","title","unreadCount"],P=function(n){var a=n.isOpen,s=n.isToggleable,o=s===void 0?!0:s,t=n.onToggle,i=n.secondaryAction,c=n.secondaryActionIcon,g=n.title,d=n.unreadCount,p=K(n,Ie),_=o?"button":"div",m={};return o&&(m.onClick=t),C.createElement(x,z({},p,{alignItems:"center",justifyContent:"between",className:"h-16 rounded-t-xl px-4 py-3"}),C.createElement(_,z({className:"flex h-16 grow flex-row items-center space-x-1","data-testid":"title"},m),e(b,{weight:"semibold",tag:"div"},void 0,g),typeof d<"u"&&d>0&&e(x,{alignItems:"center",space:2},void 0,e(b,{weight:"semibold","data-testid":"unread-count"},void 0,"(",d,")"),e("div",{className:"h-2.5 w-2.5 rounded-full bg-accent-300"}))),e(x,{space:2,alignItems:"center"},void 0,i?e($,{onClick:i,src:c,iconClassName:"h-5 w-5 text-gray-600"}):null,e($,{onClick:t,src:a?Z:ee,iconClassName:"h-5 w-5 text-gray-600"})))},u=I({blockMessage:{id:"chat_settings.block.message",defaultMessage:"Blocking will prevent this profile from direct messaging you and viewing your content. You can unblock later."},blockHeading:{id:"chat_settings.block.heading",defaultMessage:"Block @{acct}"},blockConfirm:{id:"chat_settings.block.confirm",defaultMessage:"Block"},unblockMessage:{id:"chat_settings.unblock.message",defaultMessage:"Unblocking will allow this profile to direct message you and view your content."},unblockHeading:{id:"chat_settings.unblock.heading",defaultMessage:"Unblock @{acct}"},unblockConfirm:{id:"chat_settings.unblock.confirm",defaultMessage:"Unblock"},leaveMessage:{id:"chat_settings.leave.message",defaultMessage:"Are you sure you want to leave this chat? Messages will be deleted for you and this chat will be removed from your inbox."},leaveHeading:{id:"chat_settings.leave.heading",defaultMessage:"Leave Chat"},leaveConfirm:{id:"chat_settings.leave.confirm",defaultMessage:"Leave Chat"},title:{id:"chat_settings.title",defaultMessage:"Chat Details"},blockUser:{id:"chat_settings.options.block_user",defaultMessage:"Block @{acct}"},unblockUser:{id:"chat_settings.options.unblock_user",defaultMessage:"Unblock @{acct}"},leaveChat:{id:"chat_settings.options.leave_chat",defaultMessage:"Leave Chat"},autoDeleteLabel:{id:"chat_settings.auto_delete.label",defaultMessage:"Auto-delete messages"},autoDeleteDays:{id:"chat_settings.auto_delete.days",defaultMessage:"{day, plural, one {# day} other {# days}}"}}),Pe=function(){var n=ae(),a=N(),s=V(),o=T(),t=o.chat,i=o.changeScreen,c=o.toggleChatPane,g=te(t==null?void 0:t.id),d=g.deleteChat,p=g.updateChat,_=function(l){return p.mutate({message_expiration:l})},m=ne(function(r){var l;return r.getIn(["relationships",t==null||(l=t.account)===null||l===void 0?void 0:l.id,"blocking"])}),h=function(){i(v.CHAT,t==null?void 0:t.id)},w=function(){h(),c()},M=function(){n(O("CONFIRM",{heading:a.formatMessage(u.blockHeading,{acct:t==null?void 0:t.account.acct}),message:a.formatMessage(u.blockMessage),confirm:a.formatMessage(u.blockConfirm),confirmationTheme:"primary",onConfirm:function(){return n(ue(t==null?void 0:t.account.id))}}))},A=function(){n(O("CONFIRM",{heading:a.formatMessage(u.unblockHeading,{acct:t==null?void 0:t.account.acct}),message:a.formatMessage(u.unblockMessage),confirm:a.formatMessage(u.unblockConfirm),confirmationTheme:"primary",onConfirm:function(){return n(de(t==null?void 0:t.account.id))}}))},f=function(){n(O("CONFIRM",{heading:a.formatMessage(u.leaveHeading),message:a.formatMessage(u.leaveMessage),confirm:a.formatMessage(u.leaveConfirm),confirmationTheme:"primary",onConfirm:function(){return d.mutate()}}))};return t?C.createElement(C.Fragment,null,e(P,{isOpen:!0,isToggleable:!1,onToggle:w,title:e(x,{alignItems:"center",space:2},void 0,C.createElement("button",{onClick:h,ref:L("Backspace")},e(S,{src:U,className:"h-6 w-6 text-gray-600 dark:text-gray-400"})),e(b,{weight:"semibold"},void 0,a.formatMessage(u.title)))}),e(y,{space:4,className:"mx-auto w-5/6"},void 0,e(x,{alignItems:"center",space:3},void 0,e(W,{src:t.account.avatar_static,size:50}),e(y,{},void 0,e(b,{weight:"semibold"},void 0,t.account.display_name),e(b,{size:"sm",theme:"primary"},void 0,"@",t.account.acct))),s.chatsExpiration&&e(ie,{},void 0,e(ce,{label:a.formatMessage(u.autoDeleteLabel)},void 0,e(re,{defaultValue:t.message_expiration,onChange:function(l){return _(Number(l.target.value))}},void 0,le.map(function(r){var l=D(r);return e("option",{value:r},r,a.formatMessage(u.autoDeleteDays,{day:l}))})))),e(y,{space:5},void 0,e("button",{onClick:m?A:M,className:"flex w-full items-center space-x-2 text-sm font-bold text-primary-600 dark:text-accent-blue"},void 0,e(S,{src:se,className:"h-5 w-5"}),e("span",{},void 0,a.formatMessage(m?u.unblockUser:u.blockUser,{acct:t.account.acct}))),s.chatsDelete&&e("button",{onClick:f,className:"flex w-full items-center space-x-2 text-sm font-bold text-danger-600"},void 0,e(S,{src:oe,className:"h-5 w-5"}),e("span",{},void 0,a.formatMessage(u.leaveChat)))))):null},F=I({autoDeleteMessage:{id:"chat_window.auto_delete_label",defaultMessage:"Auto-delete after {day, plural, one {# day} other {# days}}"},autoDeleteMessageTooltip:{id:"chat_window.auto_delete_tooltip",defaultMessage:"Chat messages are set to auto-delete after {day, plural, one {# day} other {# days}} upon sending."}}),He=function(n){var a=n.enabled,s=n.to,o=n.children;return a?e(G,{to:s},void 0,o):C.createElement(C.Fragment,null,o)},Be=function(){var n=N(),a=T(),s=a.chat,o=a.currentChatId,t=a.screen,i=a.changeScreen,c=a.isOpen,g=a.needsAcceptance,d=a.toggleChatPane,p=q.useRef(null),_=function(){i(v.INBOX)},m=function(){d(),i(v.SEARCH)},h=function(){i(v.CHAT_SETTINGS,o)},w=function(){if(!g)return c?h:m};return s?t===v.CHAT_SETTINGS?e(Pe,{}):C.createElement(C.Fragment,null,e(P,{title:e(x,{alignItems:"center",space:2},void 0,c&&C.createElement("button",{onClick:_,ref:L("Backspace")},e(S,{src:U,className:"h-6 w-6 text-gray-600 dark:text-gray-400"})),e(x,{alignItems:"center",space:3},void 0,c&&e(G,{to:"/@".concat(s.account.acct)},void 0,e(W,{src:s.account.avatar,size:40})),e(y,{alignItems:"start"},void 0,e(He,{enabled:c,to:"/@".concat(s.account.acct)},void 0,e("div",{className:"flex grow items-center space-x-1"},void 0,e(b,{size:"sm",weight:"bold",truncate:!0},void 0,s.account.display_name||"@".concat(s.account.acct)),s.account.verified&&e(ge,{}))),s.message_expiration&&e(he,{text:n.formatMessage(F.autoDeleteMessageTooltip,{day:D(s.message_expiration)})},void 0,e(b,{size:"sm",weight:"medium",theme:"primary",truncate:!0,className:"cursor-help"},void 0,n.formatMessage(F.autoDeleteMessage,{day:D(s.message_expiration)})))))),secondaryAction:w(),secondaryActionIcon:c?ve:j,isToggleable:!c,isOpen:c,onToggle:d}),e(y,{className:"h-full grow overflow-hidden",space:2},void 0,e(we,{chat:s,inputRef:p}))):null},Oe=I({title:{id:"chat_search.title",defaultMessage:"Messages"}}),Ee=function(){var n=N(),a=T(),s=a.changeScreen,o=a.isOpen,t=a.toggleChatPane;return e(P,{"data-testid":"pane-header",title:e(x,{alignItems:"center",space:2},void 0,C.createElement("button",{onClick:function(){s(v.INBOX)},ref:L("Backspace")},e(S,{src:U,className:"h-6 w-6 text-gray-600 dark:text-gray-400"})),e(b,{size:"sm",weight:"bold",truncate:!0},void 0,n.formatMessage(Oe.title))),isOpen:o,isToggleable:!1,onToggle:t})},E=function(n){var a=n.isOpen,s=a===void 0?!1:a,o=n.index,t=n.children;n.main;var i=404*o+20;return e("div",{className:me("fixed bottom-0 right-1 z-[99] flex w-96 flex-col rounded-t-lg bg-white shadow-3xl dark:bg-gray-900",{"h-[550px] max-h-[100vh]":s,"h-16":!s}),style:{right:"".concat(i,"px")},"data-testid":"pane"},void 0,t)},R=I({title:{id:"chat_search.empty_results_blankslate.title",defaultMessage:"No messages yet"},body:{id:"chat_search.empty_results_blankslate.body",defaultMessage:"Search for someone to chat with."},action:{id:"chat_search.empty_results_blankslate.action",defaultMessage:"Message someone"}}),Re=function(n){var a=n.onSearch,s=N();return e(y,{alignItems:"center",justifyContent:"center",className:"h-full grow","data-testid":"chat-pane-blankslate"},void 0,e(y,{space:4},void 0,e(y,{space:1,className:"mx-auto max-w-[80%]"},void 0,e(b,{size:"lg",weight:"bold",align:"center"},void 0,s.formatMessage(R.title)),e(b,{theme:"muted",align:"center"},void 0,s.formatMessage(R.body))),e("div",{className:"mx-auto"},void 0,e(fe,{theme:"primary",onClick:a},void 0,s.formatMessage(R.action)))))},De=function(){var n=V(),a=Me,s=Ce(),o=s.unreadChatsCount,t=q.useState(),i=pe(t,2),c=i[0],g=i[1],d=a(c,300),p=T(),_=p.screen,m=p.changeScreen,h=p.isOpen,w=p.toggleChatPane,M=be(d),A=M.chatsQuery,f=A.data,r=A.isLoading,l=Number(d==null?void 0:d.length)>0,Q=function(B){m(v.CHAT,B.id),g(void 0)},X=function(){l&&g("")},Y=function(){if(l||Number(f==null?void 0:f.length)>0||r)return e(y,{space:4,className:"h-full grow"},void 0,n.chatsSearch&&e("div",{className:"px-4"},void 0,e(Te,{value:c||"",onChange:function(J){return g(J.target.value)},onClear:X})),Number(f==null?void 0:f.length)>0||r?e(Ae,{searchValue:d,onClickChat:Q}):e(Ne,{}));if((f==null?void 0:f.length)===0)return e(Re,{onSearch:function(){m(v.SEARCH)}})};return _===v.CHAT||_===v.CHAT_SETTINGS?e(E,{isOpen:h,index:0,main:!0},void 0,e(Be,{})):_===v.SEARCH?e(E,{isOpen:h,index:0,main:!0},void 0,e(Ee,{}),h?e(Se,{}):null):e(E,{isOpen:h,index:0,main:!0},void 0,e(P,{title:e(_e,{id:"column.chats",defaultMessage:"Chats"}),unreadCount:o,isOpen:h,onToggle:w,secondaryAction:function(){m(v.SEARCH),g(void 0),h||w()},secondaryActionIcon:j}),h?Y():null)},Ge=function(){var n,a,s=ye(),o=s.account,t=ke(),i=t.location.pathname,c=!!i.match(/^\/chats/),g=(n=o==null||(a=o.source)===null||a===void 0?void 0:a.chats_onboarded)!==null&&n!==void 0?n:!0;return!g||c?null:e(xe,{},void 0,e(De,{}))};export{Ge as default}; diff --git a/packs/js/compare-history-modal-c59be2bc.js b/packs/js/compare-history-modal-03ca0264.js similarity index 96% rename from packs/js/compare-history-modal-c59be2bc.js rename to packs/js/compare-history-modal-03ca0264.js index ce20df381..24b10a4aa 100644 --- a/packs/js/compare-history-modal-c59be2bc.js +++ b/packs/js/compare-history-modal-03ca0264.js @@ -1 +1 @@ -import{d as y,q as n,r as f,jq as _,a as e,R as d,a2 as x,H as C,W as H,c1 as b,y as I,d8 as M,F as k,bu as S,aB as E}from"../index-7380452a.js";var T=function(l){var m=l.onClose,a=l.statusId,c=y(),u=n(function(t){return t.history.getIn([a,"loading"])}),o=n(function(t){return t.history.getIn([a,"items"])}),p=function(){m("COMPARE_HISTORY")};f.useEffect(function(){c(_(a))},[a]);var r;return u?r=e(E,{}):r=e("div",{className:"divide-y divide-solid divide-gray-200 dark:divide-gray-800"},void 0,o==null?void 0:o.map(function(t){var s,h={__html:t.contentHtml},v={__html:t.spoilerHtml},i=typeof t.poll!="string"&&t.poll;return e("div",{className:"flex flex-col py-2 first:pt-0 last:pb-0"},void 0,((s=t.spoiler_text)===null||s===void 0?void 0:s.length)>0&&d.createElement(d.Fragment,null,e("span",{dangerouslySetInnerHTML:v}),e("hr",{})),e("div",{className:"status__content",dangerouslySetInnerHTML:h}),i&&e("div",{className:"poll"},void 0,e(x,{},void 0,t.poll.options.map(function(g){return e(C,{alignItems:"center",className:"p-1 text-gray-900 dark:text-gray-300"},void 0,e("span",{className:H("mr-2.5 inline-block h-4 w-4 flex-none rounded-full border border-solid border-primary-600",{rounded:i.multiple}),tabIndex:0,role:i.multiple?"checkbox":"radio"}),e("span",{dangerouslySetInnerHTML:{__html:g.title_emojified}}))}))),t.media_attachments.size>0&&e(b,{media:t.media_attachments}),e(I,{align:"right",tag:"span",theme:"muted",size:"sm"},void 0,e(M,{value:new Date(t.created_at),hour12:!0,year:"numeric",month:"short",day:"2-digit",hour:"numeric",minute:"2-digit"})))})),e(S,{title:e(k,{id:"compare_history_modal.header",defaultMessage:"Edit history"}),onClose:p},void 0,r)};export{T as default}; +import{d as y,q as n,r as f,jq as _,a as e,R as d,a2 as x,H as C,W as H,c1 as b,y as I,d8 as M,F as k,bu as S,aB as E}from"../index-be605fd2.js";var T=function(l){var m=l.onClose,a=l.statusId,c=y(),u=n(function(t){return t.history.getIn([a,"loading"])}),o=n(function(t){return t.history.getIn([a,"items"])}),p=function(){m("COMPARE_HISTORY")};f.useEffect(function(){c(_(a))},[a]);var r;return u?r=e(E,{}):r=e("div",{className:"divide-y divide-solid divide-gray-200 dark:divide-gray-800"},void 0,o==null?void 0:o.map(function(t){var s,h={__html:t.contentHtml},v={__html:t.spoilerHtml},i=typeof t.poll!="string"&&t.poll;return e("div",{className:"flex flex-col py-2 first:pt-0 last:pb-0"},void 0,((s=t.spoiler_text)===null||s===void 0?void 0:s.length)>0&&d.createElement(d.Fragment,null,e("span",{dangerouslySetInnerHTML:v}),e("hr",{})),e("div",{className:"status__content",dangerouslySetInnerHTML:h}),i&&e("div",{className:"poll"},void 0,e(x,{},void 0,t.poll.options.map(function(g){return e(C,{alignItems:"center",className:"p-1 text-gray-900 dark:text-gray-300"},void 0,e("span",{className:H("mr-2.5 inline-block h-4 w-4 flex-none rounded-full border border-solid border-primary-600",{rounded:i.multiple}),tabIndex:0,role:i.multiple?"checkbox":"radio"}),e("span",{dangerouslySetInnerHTML:{__html:g.title_emojified}}))}))),t.media_attachments.size>0&&e(b,{media:t.media_attachments}),e(I,{align:"right",tag:"span",theme:"muted",size:"sm"},void 0,e(M,{value:new Date(t.created_at),hour12:!0,year:"numeric",month:"short",day:"2-digit",hour:"numeric",minute:"2-digit"})))})),e(S,{title:e(k,{id:"compare_history_modal.header",defaultMessage:"Edit history"}),onClose:p},void 0,r)};export{T as default}; diff --git a/packs/js/component-modal-cfb69ccb.js b/packs/js/component-modal-db8b465c.js similarity index 74% rename from packs/js/component-modal-cfb69ccb.js rename to packs/js/component-modal-db8b465c.js index 5f6faba62..7d9941401 100644 --- a/packs/js/component-modal-cfb69ccb.js +++ b/packs/js/component-modal-db8b465c.js @@ -1 +1 @@ -import{a as p,R as m,av as r,bu as s}from"../index-7380452a.js";var d=function(o){var e=o.onClose,t=o.component,n=o.componentProps,a=n===void 0?{}:n;return p(s,{onClose:e,title:""},void 0,m.createElement(t,r({onClose:e},a)))};export{d as default}; +import{a as p,R as m,av as r,bu as s}from"../index-be605fd2.js";var d=function(o){var e=o.onClose,t=o.component,n=o.componentProps,a=n===void 0?{}:n;return p(s,{onClose:e,title:""},void 0,m.createElement(t,r({onClose:e},a)))};export{d as default}; diff --git a/packs/js/compose-event-modal-35589ff5.js b/packs/js/compose-event-modal-d79d7a70.js similarity index 98% rename from packs/js/compose-event-modal-35589ff5.js rename to packs/js/compose-event-modal-d79d7a70.js index 27b9fd5da..b7e28c79f 100644 --- a/packs/js/compose-event-modal-35589ff5.js +++ b/packs/js/compose-event-modal-d79d7a70.js @@ -1 +1 @@ -import{q as l,a as e,a2 as N,y as k,A as ie,H as I,hE as oe,u as G,d as W,r as T,b9 as B,at as U,cl as pe,jH as ge,I as K,ax as fe,W as $,jI as he,o as se,R as V,F as o,jJ as _e,bF as R,bZ as Ce,bG as Me,aG as J,a5 as Q,bE as be,hM as Z,j2 as X,ah as Y,aB as Ee,bu as Te,aa as ee,B as ye,jK as Se,jL as ke,jM as xe,jN as Re,jO as Ie,jP as je,jQ as we,aD as Ne,aH as Pe,bv as qe,ee as Ae,jR as De,jS as Fe,jT as Le,T as ze,jU as Be,jV as Oe}from"../index-7380452a.js";import{v as He}from"./backspace-c284aa0a.js";import{a as Ue}from"./modal-root-dfddfde1.js";import{isCurrentOrFutureDate as te}from"./schedule-form-ae47b3a7.js";import{v as Ke}from"./photo-plus-14444f2c.js";const Ve="/packs/assets/road-3636cb68.svg",Ge="/packs/assets/home-2-1de3a8c6.svg",We="/packs/assets/building-community-2a262560.svg";var O=We,$e=Ge,Je=oe,ae=Ve,re={house:$e,street:ae,secondary:ae,zone:O,city:O,administrative:O},Qe=function(d){var u=d.id,n=l(function(i){return i.locations.get(u)});return n?e(I,{alignItems:"center",space:2},void 0,e(ie,{src:re[n.type]||Je}),e(N,{},void 0,e(k,{},void 0,n.description),e(k,{size:"xs",theme:"muted"},void 0,[n.street,n.locality,n.country].filter(function(i){return i==null?void 0:i.trim()}).join(" · ")))):null},H=function(){},ne=se({placeholder:{id:"location_search.placeholder",defaultMessage:"Find an address"}}),Ze=function(d){var u=d.onSelected,n=G(),i=W(),_=T.useState(B()),m=U(_,2),C=m[0],M=m[1],s=T.useRef(new AbortController),p=T.useState(""),E=U(p,2),x=E[0],w=E[1],y=function(){return!(x.length>0)},P=function(f){var r=f.target;A(),F(r.value),w(r.value)},b=function(f,r,S){typeof S=="string"&&u(S)},v=function(f){f.preventDefault(),y()||w("")},q=function(f){if(f.key==="Escape"){var r;(r=document.querySelector(".ui"))===null||r===void 0||(r=r.parentElement)===null||r===void 0||r.focus()}},A=function(){s.current.abort(),s.current=new AbortController},D=function(){M(B())},F=T.useCallback(pe(function(g){i(ge(g,s.current.signal)).then(function(f){var r=f.map(function(S){return S.origin_id});M(B(r))}).catch(H)},900,{leading:!0,trailing:!0}),[]);return T.useEffect(function(){x===""&&D()},[x]),e("div",{className:"search"},void 0,e(he,{className:"rounded-full",placeholder:n.formatMessage(ne.placeholder),value:x,onChange:P,suggestions:C.toList(),onSuggestionsFetchRequested:H,onSuggestionsClearRequested:H,onSuggestionSelected:b,searchTokens:[],onKeyDown:q,renderSuggestion:Qe}),e("div",{role:"button",tabIndex:0,className:"search__icon",onClick:v},void 0,e(K,{src:fe,className:$("svg-icon--search",{active:y()})}),e(K,{src:He,className:$("svg-icon--backspace",{active:!y()}),"aria-label":n.formatMessage(ne.placeholder)})))},Xe=function(d){var u,n=d.disabled,i=d.onSelectFile,_=T.useRef(null),m=(u=l(function(s){return s.instance.configuration.media_attachments.supported_mime_types}))===null||u===void 0?void 0:u.filter(function(s){return s.startsWith("image/")}),C=function(p){var E;(E=p.target.files)!==null&&E!==void 0&&E.length&&i(p.target.files)},M=function(){var p;(p=_.current)===null||p===void 0||p.click()};return e(I,{className:"h-full w-full cursor-pointer text-primary-500 dark:text-accent-blue",space:3,alignItems:"center",justifyContent:"center",element:"label"},void 0,e(K,{src:Ke,className:"h-7 w-7",onClick:M}),e(k,{size:"sm",theme:"primary",weight:"semibold",transform:"uppercase",tabIndex:0},void 0,e(o,{id:"compose_event.upload_banner",defaultMessage:"Upload photo"})),V.createElement("input",{ref:_,type:"file",accept:m&&m.join(","),onChange:C,disabled:n,className:"hidden"}))},h=se({eventNamePlaceholder:{id:"compose_event.fields.name_placeholder",defaultMessage:"Name"},eventDescriptionPlaceholder:{id:"compose_event.fields.description_placeholder",defaultMessage:"Description"},eventStartTimePlaceholder:{id:"compose_event.fields.start_time_placeholder",defaultMessage:"Event begins on…"},eventEndTimePlaceholder:{id:"compose_event.fields.end_time_placeholder",defaultMessage:"Event ends on…"},resetLocation:{id:"compose_event.reset_location",defaultMessage:"Reset location"},edit:{id:"compose_event.tabs.edit",defaultMessage:"Edit details"},pending:{id:"compose_event.tabs.pending",defaultMessage:"Manage requests"},authorize:{id:"compose_event.participation_requests.authorize",defaultMessage:"Authorize"},reject:{id:"compose_event.participation_requests.reject",defaultMessage:"Reject"},confirm:{id:"confirmations.delete.confirm",defaultMessage:"Delete"},cancelEditing:{id:"confirmations.cancel_editing.confirm",defaultMessage:"Cancel editing"}}),Ye=function(d){var u=d.eventId,n=d.id,i=d.participationMessage,_=G(),m=W(),C=function(){m(Be(u,n))},M=function(){m(Oe(u,n))};return e(ye,{id:n,note:i||void 0,action:e(I,{space:2},void 0,e(ee,{theme:"secondary",size:"sm",text:_.formatMessage(h.authorize),onClick:C}),e(ee,{theme:"danger",size:"sm",text:_.formatMessage(h.reject),onClick:M}))})},st=function(d){var u=d.onClose,n=G(),i=W(),_=T.useState("edit"),m=U(_,2),C=m[0],M=m[1],s=l(function(t){return t.compose_event.banner}),p=l(function(t){return t.compose_event.is_uploading}),E=l(function(t){return t.compose_event.name}),x=l(function(t){return t.compose_event.status}),w=l(function(t){return t.compose_event.start_time}),y=l(function(t){return t.compose_event.end_time}),P=l(function(t){return t.compose_event.approval_required}),b=l(function(t){return t.compose_event.location}),v=l(function(t){return t.compose_event.id}),q=l(function(t){return t.compose_event.is_submitting}),A=function(a){var c=a.target;i(Se(c.value))},D=function(a){var c=a.target;i(ke(c.value))},F=function(a){i(xe(a))},g=function(a){i(Re(a))},f=function(a){var c=a.target;i(Ie(c.checked))},r=function(a){var c=a.target;i(je(c.checked))},S=function(a){i(we(a))},ce=function(){i(function(a,c){Ue(c().compose_event)?a(Ne("CONFIRM",{icon:Pe,heading:v?e(o,{id:"confirmations.cancel_event_editing.heading",defaultMessage:"Cancel event editing"}):e(o,{id:"confirmations.delete_event.heading",defaultMessage:"Delete event"}),message:v?e(o,{id:"confirmations.cancel_event_editing.message",defaultMessage:"Are you sure you want to cancel editing this event? All changes will be lost."}):e(o,{id:"confirmations.delete_event.message",defaultMessage:"Are you sure you want to delete this event?"}),confirm:n.formatMessage(h.confirm),onConfirm:function(){a(qe("COMPOSE_EVENT")),a(Ae())}})):u("COMPOSE_EVENT")})},le=function(a){i(De(a[0],n))},de=function(){i(Fe())},ue=function(){i(Le())},L=l(function(t){var a;return(a=t.user_lists.event_participation_requests.get(v))===null||a===void 0?void 0:a.items});T.useEffect(function(){v&&i(_e(v))},[]);var ve=function(){return b&&e(I,{className:"h-[38px] text-gray-700 dark:text-gray-500",alignItems:"center",space:2},void 0,e(ie,{src:re[b.type]||oe}),e(N,{className:"grow"},void 0,e(k,{},void 0,b.description),e(k,{theme:"muted",size:"xs"},void 0,[b.street,b.locality,b.country].filter(function(a){return a==null?void 0:a.trim()}).join(" · "))),e(J,{title:n.formatMessage(h.resetLocation),src:Q,onClick:function(){return S(null)}}))},me=function(){var a=[{text:n.formatMessage(h.edit),action:function(){return M("edit")},name:"edit"},{text:n.formatMessage(h.pending),action:function(){return M("pending")},name:"pending"}];return e(ze,{items:a,activeItem:C})},z;return C==="edit"?z=e(be,{},void 0,e(R,{labelText:e(o,{id:"compose_event.fields.banner_label",defaultMessage:"Event banner"})},void 0,e("div",{className:"dark:sm:shadow-inset relative flex h-24 items-center justify-center overflow-hidden rounded-lg bg-primary-100 text-primary-500 dark:bg-gray-800 dark:text-white sm:h-32 sm:shadow"},void 0,s?V.createElement(V.Fragment,null,e("img",{className:"h-full w-full object-cover",src:s.url,alt:""}),e(J,{className:"absolute right-2 top-2",src:Q,onClick:de})):e(Xe,{disabled:p,onSelectFile:le}))),e(R,{labelText:e(o,{id:"compose_event.fields.name_label",defaultMessage:"Event name"})},void 0,e(Me,{type:"text",placeholder:n.formatMessage(h.eventNamePlaceholder),value:E,onChange:A})),e(R,{labelText:e(o,{id:"compose_event.fields.description_label",defaultMessage:"Event description"}),hintText:e(o,{id:"compose_event.fields.description_hint",defaultMessage:"Markdown syntax is supported"})},void 0,e(Ce,{autoComplete:"off",placeholder:n.formatMessage(h.eventDescriptionPlaceholder),value:x,onChange:D})),e(R,{labelText:e(o,{id:"compose_event.fields.location_label",defaultMessage:"Event location"})},void 0,b?ve():e(Ze,{onSelected:S})),e(R,{labelText:e(o,{id:"compose_event.fields.start_time_label",defaultMessage:"Event start date"})},void 0,e(Z,{fetchComponent:X},void 0,function(t){return e(t,{showTimeSelect:!0,dateFormat:"MMMM d, yyyy h:mm aa",timeIntervals:15,wrapperClassName:"react-datepicker-wrapper",placeholderText:n.formatMessage(h.eventStartTimePlaceholder),filterDate:te,selected:w,onChange:F})})),e(I,{alignItems:"center",space:2},void 0,e(Y,{checked:!!y,onChange:f}),e(k,{tag:"span",theme:"muted"},void 0,e(o,{id:"compose_event.fields.has_end_time",defaultMessage:"The event has end date"}))),y&&e(R,{labelText:e(o,{id:"compose_event.fields.end_time_label",defaultMessage:"Event end date"})},void 0,e(Z,{fetchComponent:X},void 0,function(t){return e(t,{showTimeSelect:!0,dateFormat:"MMMM d, yyyy h:mm aa",timeIntervals:15,wrapperClassName:"react-datepicker-wrapper",placeholderText:n.formatMessage(h.eventEndTimePlaceholder),filterDate:te,selected:y,onChange:g})})),!v&&e(I,{alignItems:"center",space:2},void 0,e(Y,{checked:P,onChange:r}),e(k,{tag:"span",theme:"muted"},void 0,e(o,{id:"compose_event.fields.approval_required",defaultMessage:"I want to approve participation requests manually"})))):z=L?e(N,{space:3},void 0,L.size>0?L.map(function(t){var a=t.account,c=t.participation_message;return e(Ye,{eventId:v,id:a,participationMessage:c},a)}):e(o,{id:"empty_column.event_participant_requests",defaultMessage:"There are no pending event participation requests."})):e(Ee,{}),e(Te,{title:v?e(o,{id:"navigation_bar.compose_event",defaultMessage:"Manage event"}):e(o,{id:"navigation_bar.create_event",defaultMessage:"Create new event"}),confirmationAction:C==="edit"?ue:void 0,confirmationText:v?e(o,{id:"compose_event.update",defaultMessage:"Update"}):e(o,{id:"compose_event.create",defaultMessage:"Create"}),confirmationDisabled:q,onClose:ce},void 0,e(N,{space:2},void 0,v&&me(),z))};export{st as default}; +import{q as l,a as e,a2 as N,y as k,A as ie,H as I,hE as oe,u as G,d as W,r as T,b9 as B,at as U,cl as pe,jH as ge,I as K,ax as fe,W as $,jI as he,o as se,R as V,F as o,jJ as _e,bF as R,bZ as Ce,bG as Me,aG as J,a5 as Q,bE as be,hM as Z,j2 as X,ah as Y,aB as Ee,bu as Te,aa as ee,B as ye,jK as Se,jL as ke,jM as xe,jN as Re,jO as Ie,jP as je,jQ as we,aD as Ne,aH as Pe,bv as qe,ee as Ae,jR as De,jS as Fe,jT as Le,T as ze,jU as Be,jV as Oe}from"../index-be605fd2.js";import{v as He}from"./backspace-c284aa0a.js";import{a as Ue}from"./modal-root-3073c8e6.js";import{isCurrentOrFutureDate as te}from"./schedule-form-89b40965.js";import{v as Ke}from"./photo-plus-14444f2c.js";const Ve="/packs/assets/road-3636cb68.svg",Ge="/packs/assets/home-2-1de3a8c6.svg",We="/packs/assets/building-community-2a262560.svg";var O=We,$e=Ge,Je=oe,ae=Ve,re={house:$e,street:ae,secondary:ae,zone:O,city:O,administrative:O},Qe=function(d){var u=d.id,n=l(function(i){return i.locations.get(u)});return n?e(I,{alignItems:"center",space:2},void 0,e(ie,{src:re[n.type]||Je}),e(N,{},void 0,e(k,{},void 0,n.description),e(k,{size:"xs",theme:"muted"},void 0,[n.street,n.locality,n.country].filter(function(i){return i==null?void 0:i.trim()}).join(" · ")))):null},H=function(){},ne=se({placeholder:{id:"location_search.placeholder",defaultMessage:"Find an address"}}),Ze=function(d){var u=d.onSelected,n=G(),i=W(),_=T.useState(B()),m=U(_,2),C=m[0],M=m[1],s=T.useRef(new AbortController),p=T.useState(""),E=U(p,2),x=E[0],w=E[1],y=function(){return!(x.length>0)},P=function(f){var r=f.target;A(),F(r.value),w(r.value)},b=function(f,r,S){typeof S=="string"&&u(S)},v=function(f){f.preventDefault(),y()||w("")},q=function(f){if(f.key==="Escape"){var r;(r=document.querySelector(".ui"))===null||r===void 0||(r=r.parentElement)===null||r===void 0||r.focus()}},A=function(){s.current.abort(),s.current=new AbortController},D=function(){M(B())},F=T.useCallback(pe(function(g){i(ge(g,s.current.signal)).then(function(f){var r=f.map(function(S){return S.origin_id});M(B(r))}).catch(H)},900,{leading:!0,trailing:!0}),[]);return T.useEffect(function(){x===""&&D()},[x]),e("div",{className:"search"},void 0,e(he,{className:"rounded-full",placeholder:n.formatMessage(ne.placeholder),value:x,onChange:P,suggestions:C.toList(),onSuggestionsFetchRequested:H,onSuggestionsClearRequested:H,onSuggestionSelected:b,searchTokens:[],onKeyDown:q,renderSuggestion:Qe}),e("div",{role:"button",tabIndex:0,className:"search__icon",onClick:v},void 0,e(K,{src:fe,className:$("svg-icon--search",{active:y()})}),e(K,{src:He,className:$("svg-icon--backspace",{active:!y()}),"aria-label":n.formatMessage(ne.placeholder)})))},Xe=function(d){var u,n=d.disabled,i=d.onSelectFile,_=T.useRef(null),m=(u=l(function(s){return s.instance.configuration.media_attachments.supported_mime_types}))===null||u===void 0?void 0:u.filter(function(s){return s.startsWith("image/")}),C=function(p){var E;(E=p.target.files)!==null&&E!==void 0&&E.length&&i(p.target.files)},M=function(){var p;(p=_.current)===null||p===void 0||p.click()};return e(I,{className:"h-full w-full cursor-pointer text-primary-500 dark:text-accent-blue",space:3,alignItems:"center",justifyContent:"center",element:"label"},void 0,e(K,{src:Ke,className:"h-7 w-7",onClick:M}),e(k,{size:"sm",theme:"primary",weight:"semibold",transform:"uppercase",tabIndex:0},void 0,e(o,{id:"compose_event.upload_banner",defaultMessage:"Upload photo"})),V.createElement("input",{ref:_,type:"file",accept:m&&m.join(","),onChange:C,disabled:n,className:"hidden"}))},h=se({eventNamePlaceholder:{id:"compose_event.fields.name_placeholder",defaultMessage:"Name"},eventDescriptionPlaceholder:{id:"compose_event.fields.description_placeholder",defaultMessage:"Description"},eventStartTimePlaceholder:{id:"compose_event.fields.start_time_placeholder",defaultMessage:"Event begins on…"},eventEndTimePlaceholder:{id:"compose_event.fields.end_time_placeholder",defaultMessage:"Event ends on…"},resetLocation:{id:"compose_event.reset_location",defaultMessage:"Reset location"},edit:{id:"compose_event.tabs.edit",defaultMessage:"Edit details"},pending:{id:"compose_event.tabs.pending",defaultMessage:"Manage requests"},authorize:{id:"compose_event.participation_requests.authorize",defaultMessage:"Authorize"},reject:{id:"compose_event.participation_requests.reject",defaultMessage:"Reject"},confirm:{id:"confirmations.delete.confirm",defaultMessage:"Delete"},cancelEditing:{id:"confirmations.cancel_editing.confirm",defaultMessage:"Cancel editing"}}),Ye=function(d){var u=d.eventId,n=d.id,i=d.participationMessage,_=G(),m=W(),C=function(){m(Be(u,n))},M=function(){m(Oe(u,n))};return e(ye,{id:n,note:i||void 0,action:e(I,{space:2},void 0,e(ee,{theme:"secondary",size:"sm",text:_.formatMessage(h.authorize),onClick:C}),e(ee,{theme:"danger",size:"sm",text:_.formatMessage(h.reject),onClick:M}))})},st=function(d){var u=d.onClose,n=G(),i=W(),_=T.useState("edit"),m=U(_,2),C=m[0],M=m[1],s=l(function(t){return t.compose_event.banner}),p=l(function(t){return t.compose_event.is_uploading}),E=l(function(t){return t.compose_event.name}),x=l(function(t){return t.compose_event.status}),w=l(function(t){return t.compose_event.start_time}),y=l(function(t){return t.compose_event.end_time}),P=l(function(t){return t.compose_event.approval_required}),b=l(function(t){return t.compose_event.location}),v=l(function(t){return t.compose_event.id}),q=l(function(t){return t.compose_event.is_submitting}),A=function(a){var c=a.target;i(Se(c.value))},D=function(a){var c=a.target;i(ke(c.value))},F=function(a){i(xe(a))},g=function(a){i(Re(a))},f=function(a){var c=a.target;i(Ie(c.checked))},r=function(a){var c=a.target;i(je(c.checked))},S=function(a){i(we(a))},ce=function(){i(function(a,c){Ue(c().compose_event)?a(Ne("CONFIRM",{icon:Pe,heading:v?e(o,{id:"confirmations.cancel_event_editing.heading",defaultMessage:"Cancel event editing"}):e(o,{id:"confirmations.delete_event.heading",defaultMessage:"Delete event"}),message:v?e(o,{id:"confirmations.cancel_event_editing.message",defaultMessage:"Are you sure you want to cancel editing this event? All changes will be lost."}):e(o,{id:"confirmations.delete_event.message",defaultMessage:"Are you sure you want to delete this event?"}),confirm:n.formatMessage(h.confirm),onConfirm:function(){a(qe("COMPOSE_EVENT")),a(Ae())}})):u("COMPOSE_EVENT")})},le=function(a){i(De(a[0],n))},de=function(){i(Fe())},ue=function(){i(Le())},L=l(function(t){var a;return(a=t.user_lists.event_participation_requests.get(v))===null||a===void 0?void 0:a.items});T.useEffect(function(){v&&i(_e(v))},[]);var ve=function(){return b&&e(I,{className:"h-[38px] text-gray-700 dark:text-gray-500",alignItems:"center",space:2},void 0,e(ie,{src:re[b.type]||oe}),e(N,{className:"grow"},void 0,e(k,{},void 0,b.description),e(k,{theme:"muted",size:"xs"},void 0,[b.street,b.locality,b.country].filter(function(a){return a==null?void 0:a.trim()}).join(" · "))),e(J,{title:n.formatMessage(h.resetLocation),src:Q,onClick:function(){return S(null)}}))},me=function(){var a=[{text:n.formatMessage(h.edit),action:function(){return M("edit")},name:"edit"},{text:n.formatMessage(h.pending),action:function(){return M("pending")},name:"pending"}];return e(ze,{items:a,activeItem:C})},z;return C==="edit"?z=e(be,{},void 0,e(R,{labelText:e(o,{id:"compose_event.fields.banner_label",defaultMessage:"Event banner"})},void 0,e("div",{className:"dark:sm:shadow-inset relative flex h-24 items-center justify-center overflow-hidden rounded-lg bg-primary-100 text-primary-500 dark:bg-gray-800 dark:text-white sm:h-32 sm:shadow"},void 0,s?V.createElement(V.Fragment,null,e("img",{className:"h-full w-full object-cover",src:s.url,alt:""}),e(J,{className:"absolute right-2 top-2",src:Q,onClick:de})):e(Xe,{disabled:p,onSelectFile:le}))),e(R,{labelText:e(o,{id:"compose_event.fields.name_label",defaultMessage:"Event name"})},void 0,e(Me,{type:"text",placeholder:n.formatMessage(h.eventNamePlaceholder),value:E,onChange:A})),e(R,{labelText:e(o,{id:"compose_event.fields.description_label",defaultMessage:"Event description"}),hintText:e(o,{id:"compose_event.fields.description_hint",defaultMessage:"Markdown syntax is supported"})},void 0,e(Ce,{autoComplete:"off",placeholder:n.formatMessage(h.eventDescriptionPlaceholder),value:x,onChange:D})),e(R,{labelText:e(o,{id:"compose_event.fields.location_label",defaultMessage:"Event location"})},void 0,b?ve():e(Ze,{onSelected:S})),e(R,{labelText:e(o,{id:"compose_event.fields.start_time_label",defaultMessage:"Event start date"})},void 0,e(Z,{fetchComponent:X},void 0,function(t){return e(t,{showTimeSelect:!0,dateFormat:"MMMM d, yyyy h:mm aa",timeIntervals:15,wrapperClassName:"react-datepicker-wrapper",placeholderText:n.formatMessage(h.eventStartTimePlaceholder),filterDate:te,selected:w,onChange:F})})),e(I,{alignItems:"center",space:2},void 0,e(Y,{checked:!!y,onChange:f}),e(k,{tag:"span",theme:"muted"},void 0,e(o,{id:"compose_event.fields.has_end_time",defaultMessage:"The event has end date"}))),y&&e(R,{labelText:e(o,{id:"compose_event.fields.end_time_label",defaultMessage:"Event end date"})},void 0,e(Z,{fetchComponent:X},void 0,function(t){return e(t,{showTimeSelect:!0,dateFormat:"MMMM d, yyyy h:mm aa",timeIntervals:15,wrapperClassName:"react-datepicker-wrapper",placeholderText:n.formatMessage(h.eventEndTimePlaceholder),filterDate:te,selected:y,onChange:g})})),!v&&e(I,{alignItems:"center",space:2},void 0,e(Y,{checked:P,onChange:r}),e(k,{tag:"span",theme:"muted"},void 0,e(o,{id:"compose_event.fields.approval_required",defaultMessage:"I want to approve participation requests manually"})))):z=L?e(N,{space:3},void 0,L.size>0?L.map(function(t){var a=t.account,c=t.participation_message;return e(Ye,{eventId:v,id:a,participationMessage:c},a)}):e(o,{id:"empty_column.event_participant_requests",defaultMessage:"There are no pending event participation requests."})):e(Ee,{}),e(Te,{title:v?e(o,{id:"navigation_bar.compose_event",defaultMessage:"Manage event"}):e(o,{id:"navigation_bar.create_event",defaultMessage:"Create new event"}),confirmationAction:C==="edit"?ue:void 0,confirmationText:v?e(o,{id:"compose_event.update",defaultMessage:"Update"}):e(o,{id:"compose_event.create",defaultMessage:"Create"}),confirmationDisabled:q,onClose:ce},void 0,e(N,{space:2},void 0,v&&me(),z))};export{st as default}; diff --git a/packs/js/compose-modal-2eac5d18.js b/packs/js/compose-modal-4c08c001.js similarity index 97% rename from packs/js/compose-modal-2eac5d18.js rename to packs/js/compose-modal-4c08c001.js index 20a78a51f..2d452671c 100644 --- a/packs/js/compose-modal-2eac5d18.js +++ b/packs/js/compose-modal-4c08c001.js @@ -1 +1 @@ -import{u as R,d as C,r as T,e6 as F,e7 as w,R as E,bu as O,W as k,a as e,e8 as x,e9 as q,q as A,y as G,F as o,H as S,ah as H,ea as N,aD as P,aH as $,bv as z,eb as V,ec as Q,o as W}from"../index-7380452a.js";import{c as j}from"./modal-root-dfddfde1.js";var _=W({close:{id:"lightbox.close",defaultMessage:"Close"},confirm:{id:"confirmations.cancel.confirm",defaultMessage:"Discard"},cancelEditing:{id:"confirmations.cancel_editing.confirm",defaultMessage:"Cancel editing"}}),U=function(t){var n=t.onClose,d=t.composeId,r=d===void 0?"compose-modal":d,g=R(),s=C(),l=T.useRef(null),u=F(r),a=u,i=a.id,c=a.privacy,f=a.in_reply_to,h=a.quote,p=a.group_id,v=w(l,function(m){s(N(r,m,g))}),b=v.isDragging,y=v.isDraggedOver,I=function(){j(u)?s(P("CONFIRM",{icon:$,heading:i?e(o,{id:"confirmations.cancel_editing.heading",defaultMessage:"Cancel post editing"}):e(o,{id:"confirmations.cancel.heading",defaultMessage:"Discard post"}),message:i?e(o,{id:"confirmations.cancel_editing.message",defaultMessage:"Are you sure you want to cancel editing this post? All changes will be lost."}):e(o,{id:"confirmations.cancel.message",defaultMessage:"Are you sure you want to cancel creating this post?"}),confirm:g.formatMessage(i?_.cancelEditing:_.confirm),onConfirm:function(){s(z("COMPOSE")),s(V())}})):n("COMPOSE")},D=function(){return i?e(o,{id:"navigation_bar.compose_edit",defaultMessage:"Edit post"}):c==="direct"?e(o,{id:"navigation_bar.compose_direct",defaultMessage:"Direct message"}):f&&p?e(o,{id:"navigation_bar.compose_group_reply",defaultMessage:"Reply to group post"}):p?e(o,{id:"navigation_bar.compose_group",defaultMessage:"Compose to group"}):f?e(o,{id:"navigation_bar.compose_reply",defaultMessage:"Reply to post"}):h?e(o,{id:"navigation_bar.compose_quote",defaultMessage:"Quote post"}):e(o,{id:"navigation_bar.compose",defaultMessage:"Compose new post"})};return E.createElement(O,{ref:l,title:D(),onClose:I,className:k({"border-2 border-primary-600 border-dashed !z-[99]":b,"ring-2 ring-offset-2 ring-primary-600":y})},e(x,{id:r,extra:e(B,{composeId:r,groupId:p})}))},B=function(t){var n=t.composeId,d=t.groupId,r=C(),g=q(d||"",!1),s=g.group,l=A(function(i){var c;return!!((c=i.compose.get(n))!==null&&c!==void 0&&c.group_timeline_visible)}),u=function(){r(Q(n,!l))},a="group-timeline-visible+".concat(n);return!s||s.locked?null:e(S,{alignItems:"center",space:4},void 0,e("label",{className:"ml-auto cursor-pointer",htmlFor:a},void 0,e(G,{theme:"muted"},void 0,e(o,{id:"compose_group.share_to_followers",defaultMessage:"Share with my followers"}))),e(H,{id:a,checked:l,onChange:u,size:"sm"}))};export{U as default}; +import{u as R,d as C,r as T,e6 as F,e7 as w,R as E,bu as O,W as k,a as e,e8 as x,e9 as q,q as A,y as G,F as o,H as S,ah as H,ea as N,aD as P,aH as $,bv as z,eb as V,ec as Q,o as W}from"../index-be605fd2.js";import{c as j}from"./modal-root-3073c8e6.js";var _=W({close:{id:"lightbox.close",defaultMessage:"Close"},confirm:{id:"confirmations.cancel.confirm",defaultMessage:"Discard"},cancelEditing:{id:"confirmations.cancel_editing.confirm",defaultMessage:"Cancel editing"}}),U=function(t){var n=t.onClose,d=t.composeId,r=d===void 0?"compose-modal":d,g=R(),s=C(),l=T.useRef(null),u=F(r),a=u,i=a.id,c=a.privacy,f=a.in_reply_to,h=a.quote,p=a.group_id,v=w(l,function(m){s(N(r,m,g))}),b=v.isDragging,y=v.isDraggedOver,I=function(){j(u)?s(P("CONFIRM",{icon:$,heading:i?e(o,{id:"confirmations.cancel_editing.heading",defaultMessage:"Cancel post editing"}):e(o,{id:"confirmations.cancel.heading",defaultMessage:"Discard post"}),message:i?e(o,{id:"confirmations.cancel_editing.message",defaultMessage:"Are you sure you want to cancel editing this post? All changes will be lost."}):e(o,{id:"confirmations.cancel.message",defaultMessage:"Are you sure you want to cancel creating this post?"}),confirm:g.formatMessage(i?_.cancelEditing:_.confirm),onConfirm:function(){s(z("COMPOSE")),s(V())}})):n("COMPOSE")},D=function(){return i?e(o,{id:"navigation_bar.compose_edit",defaultMessage:"Edit post"}):c==="direct"?e(o,{id:"navigation_bar.compose_direct",defaultMessage:"Direct message"}):f&&p?e(o,{id:"navigation_bar.compose_group_reply",defaultMessage:"Reply to group post"}):p?e(o,{id:"navigation_bar.compose_group",defaultMessage:"Compose to group"}):f?e(o,{id:"navigation_bar.compose_reply",defaultMessage:"Reply to post"}):h?e(o,{id:"navigation_bar.compose_quote",defaultMessage:"Quote post"}):e(o,{id:"navigation_bar.compose",defaultMessage:"Compose new post"})};return E.createElement(O,{ref:l,title:D(),onClose:I,className:k({"border-2 border-primary-600 border-dashed !z-[99]":b,"ring-2 ring-offset-2 ring-primary-600":y})},e(x,{id:r,extra:e(B,{composeId:r,groupId:p})}))},B=function(t){var n=t.composeId,d=t.groupId,r=C(),g=q(d||"",!1),s=g.group,l=A(function(i){var c;return!!((c=i.compose.get(n))!==null&&c!==void 0&&c.group_timeline_visible)}),u=function(){r(Q(n,!l))},a="group-timeline-visible+".concat(n);return!s||s.locked?null:e(S,{alignItems:"center",space:4},void 0,e("label",{className:"ml-auto cursor-pointer",htmlFor:a},void 0,e(G,{theme:"muted"},void 0,e(o,{id:"compose_group.share_to_followers",defaultMessage:"Share with my followers"}))),e(H,{id:a,checked:l,onChange:u,size:"sm"}))};export{U as default}; diff --git a/packs/js/confirmation-modal-548edfc8.js b/packs/js/confirmation-modal-fb803cce.js similarity index 92% rename from packs/js/confirmation-modal-548edfc8.js rename to packs/js/confirmation-modal-fb803cce.js index cc95bd37b..c97ef4f98 100644 --- a/packs/js/confirmation-modal-548edfc8.js +++ b/packs/js/confirmation-modal-fb803cce.js @@ -1 +1 @@ -import{r as S,at as b,a as e,a2 as F,y as R,af as p,ag as A,ah as I,F as N,bu as O}from"../index-7380452a.js";var q=function(a){var l=a.heading,h=a.message,m=a.confirm,n=a.onClose,C=a.onConfirm,f=a.secondary,t=a.onSecondary,i=a.onCancel,o=a.checkbox,d=a.confirmationTheme,g=d===void 0?"danger":d,u=S.useState(!1),r=b(u,2),s=r[0],v=r[1],k=function(){n("CONFIRM"),C()},x=function(){n("CONFIRM"),t()},y=function(){n("CONFIRM"),i&&i()},T=function(M){v(M.target.checked)};return e(O,{title:l,confirmationAction:k,confirmationText:m,confirmationDisabled:o&&!s,confirmationTheme:g,cancelText:e(N,{id:"confirmation_modal.cancel",defaultMessage:"Cancel"}),cancelAction:y,secondaryText:f,secondaryAction:t&&x},void 0,e(F,{space:4},void 0,e(R,{},void 0,h),o&&e(p,{},void 0,e(A,{label:o},void 0,e(I,{checked:s,onChange:T,required:!0})))))};export{q as default}; +import{r as S,at as b,a as e,a2 as F,y as R,af as p,ag as A,ah as I,F as N,bu as O}from"../index-be605fd2.js";var q=function(a){var l=a.heading,h=a.message,m=a.confirm,n=a.onClose,C=a.onConfirm,f=a.secondary,t=a.onSecondary,i=a.onCancel,o=a.checkbox,d=a.confirmationTheme,g=d===void 0?"danger":d,u=S.useState(!1),r=b(u,2),s=r[0],v=r[1],k=function(){n("CONFIRM"),C()},x=function(){n("CONFIRM"),t()},y=function(){n("CONFIRM"),i&&i()},T=function(M){v(M.target.checked)};return e(O,{title:l,confirmationAction:k,confirmationText:m,confirmationDisabled:o&&!s,confirmationTheme:g,cancelText:e(N,{id:"confirmation_modal.cancel",defaultMessage:"Cancel"}),cancelAction:y,secondaryText:f,secondaryAction:t&&x},void 0,e(F,{space:4},void 0,e(R,{},void 0,h),o&&e(p,{},void 0,e(A,{label:o},void 0,e(I,{checked:s,onChange:T,required:!0})))))};export{q as default}; diff --git a/packs/js/create-aa354598.js b/packs/js/create-990cc91d.js similarity index 96% rename from packs/js/create-aa354598.js rename to packs/js/create-990cc91d.js index c7a9d8502..768abffc1 100644 --- a/packs/js/create-aa354598.js +++ b/packs/js/create-990cc91d.js @@ -1 +1 @@ -import{u as V,d as $,b8 as ee,r as b,at as g,a as e,bE as C,bF as c,F as n,bG as h,bI as T,aa as j,X as k,o as te,a2 as ae,y as R,bZ as E,je as F,jf as re,jg as se,_ as U}from"../index-7380452a.js";function L(o,t){var a=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);t&&(r=r.filter(function(p){return Object.getOwnPropertyDescriptor(o,p).enumerable})),a.push.apply(a,r)}return a}function D(o){for(var t=1;tt.post("/api/v1/groups",r,{headers:{"Content-Type":"multipart/form-data"}}),{schema:he});return{createGroup:n,...a}}const Le={validation:t=>["group","validation",t]};function ge(t=""){var s;const n=ue(),a=be(),r=async()=>{const{data:l}=await n.get("/api/v1/groups/validate",{params:{name:t}}).catch(c=>{if(c.response.status===422)return{data:c.response.data};throw c});return l},i=ye(Le.validation(t),r,{enabled:a.groupsValidation&&!!t});return{...i,data:{...i.data,isValid:!((s=i.data)!=null&&s.error)}}}var Ve=Q({copied:{id:"copy.success",defaultMessage:"Copied to clipboard!"}}),He=function(n){var a=n.group,r=B(),i=function(){Ce(a==null?void 0:a.url,function(){le.success(r.formatMessage(Ve.copied))})},s=function(){navigator.share({text:a==null?void 0:a.display_name,url:a==null?void 0:a.uri}).catch(function(c){c.name!=="AbortError"&&console.error(c)})};return a?e(b,{space:9},void 0,e(b,{space:3},void 0,e(b,{},void 0,e("label",{className:"dark:sm:shadow-inset relative h-24 w-full cursor-pointer overflow-hidden rounded-lg bg-primary-100 text-primary-500 dark:bg-gray-800 dark:text-accent-blue sm:h-36 sm:shadow"},void 0,a.header&&e("img",{className:"h-full w-full object-cover",src:a.header,alt:""})),e("label",{className:"mx-auto -mt-10 cursor-pointer rounded-full bg-primary-500 ring-2 ring-white dark:ring-primary-900"},void 0,a.avatar&&e(_e,{src:a.avatar,size:80}))),e(b,{},void 0,e(p,{size:"2xl",weight:"bold",align:"center"},void 0,a.display_name),e(p,{size:"md",className:"mx-auto max-w-sm [&_a]:text-primary-600 [&_a]:hover:underline [&_a]:dark:text-accent-blue",dangerouslySetInnerHTML:{__html:a.note_emojified}}))),e(Oe,{}),e(b,{space:4},void 0,e(p,{size:"3xl",weight:"bold",align:"center"},void 0,e(o,{id:"manage_group.confirmation.title",defaultMessage:"You’re all set!"})),e(b,{space:5},void 0,e(q,{number:1},void 0,e(p,{theme:"muted"},void 0,e(o,{id:"manage_group.confirmation.info_1",defaultMessage:"As the owner of this group, you can assign staff, delete posts and much more."}))),e(q,{number:2},void 0,e(p,{theme:"muted"},void 0,e(o,{id:"manage_group.confirmation.info_2",defaultMessage:"Post the group's first post and get the conversation started."}))),e(q,{number:3},void 0,e(p,{theme:"muted"},void 0,e(o,{id:"manage_group.confirmation.info_3",defaultMessage:"Share your new group with friends, family and followers to grow its membership."}))))),e(de,{space:2,justifyContent:"center"},void 0,"share"in navigator&&e(J,{onClick:s,theme:"transparent",icon:Se,className:"text-primary-600"},void 0,e(o,{id:"manage_group.confirmation.share",defaultMessage:"Share this group"})),e(J,{onClick:i,theme:"transparent",icon:we,className:"text-primary-600"},void 0,e(o,{id:"manage_group.confirmation.copy",defaultMessage:"Copy link"})))):null},ze=function(n){var a=n.number;return e("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full border border-gray-200 dark:border-gray-800"},void 0,e(p,{theme:"primary",size:"sm",weight:"bold"},void 0,a))},q=function(n){var a=n.number,r=n.children;return e(de,{alignItems:"top",space:3},void 0,e(ze,{number:a}),e("div",{className:"mt-0.5"},void 0,r))};function ne(t,n){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),a.push.apply(a,r)}return a}function v(t){for(var n=1;nt.post("/api/v1/groups",r,{headers:{"Content-Type":"multipart/form-data"}}),{schema:he});return{createGroup:n,...a}}const Le={validation:t=>["group","validation",t]};function ge(t=""){var s;const n=ue(),a=be(),r=async()=>{const{data:l}=await n.get("/api/v1/groups/validate",{params:{name:t}}).catch(c=>{if(c.response.status===422)return{data:c.response.data};throw c});return l},i=ye(Le.validation(t),r,{enabled:a.groupsValidation&&!!t});return{...i,data:{...i.data,isValid:!((s=i.data)!=null&&s.error)}}}var Ve=Q({copied:{id:"copy.success",defaultMessage:"Copied to clipboard!"}}),He=function(n){var a=n.group,r=B(),i=function(){Ce(a==null?void 0:a.url,function(){le.success(r.formatMessage(Ve.copied))})},s=function(){navigator.share({text:a==null?void 0:a.display_name,url:a==null?void 0:a.uri}).catch(function(c){c.name!=="AbortError"&&console.error(c)})};return a?e(b,{space:9},void 0,e(b,{space:3},void 0,e(b,{},void 0,e("label",{className:"dark:sm:shadow-inset relative h-24 w-full cursor-pointer overflow-hidden rounded-lg bg-primary-100 text-primary-500 dark:bg-gray-800 dark:text-accent-blue sm:h-36 sm:shadow"},void 0,a.header&&e("img",{className:"h-full w-full object-cover",src:a.header,alt:""})),e("label",{className:"mx-auto -mt-10 cursor-pointer rounded-full bg-primary-500 ring-2 ring-white dark:ring-primary-900"},void 0,a.avatar&&e(_e,{src:a.avatar,size:80}))),e(b,{},void 0,e(p,{size:"2xl",weight:"bold",align:"center"},void 0,a.display_name),e(p,{size:"md",className:"mx-auto max-w-sm [&_a]:text-primary-600 [&_a]:hover:underline [&_a]:dark:text-accent-blue",dangerouslySetInnerHTML:{__html:a.note_emojified}}))),e(Oe,{}),e(b,{space:4},void 0,e(p,{size:"3xl",weight:"bold",align:"center"},void 0,e(o,{id:"manage_group.confirmation.title",defaultMessage:"You’re all set!"})),e(b,{space:5},void 0,e(q,{number:1},void 0,e(p,{theme:"muted"},void 0,e(o,{id:"manage_group.confirmation.info_1",defaultMessage:"As the owner of this group, you can assign staff, delete posts and much more."}))),e(q,{number:2},void 0,e(p,{theme:"muted"},void 0,e(o,{id:"manage_group.confirmation.info_2",defaultMessage:"Post the group's first post and get the conversation started."}))),e(q,{number:3},void 0,e(p,{theme:"muted"},void 0,e(o,{id:"manage_group.confirmation.info_3",defaultMessage:"Share your new group with friends, family and followers to grow its membership."}))))),e(de,{space:2,justifyContent:"center"},void 0,"share"in navigator&&e(J,{onClick:s,theme:"transparent",icon:Se,className:"text-primary-600"},void 0,e(o,{id:"manage_group.confirmation.share",defaultMessage:"Share this group"})),e(J,{onClick:i,theme:"transparent",icon:we,className:"text-primary-600"},void 0,e(o,{id:"manage_group.confirmation.copy",defaultMessage:"Copy link"})))):null},ze=function(n){var a=n.number;return e("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full border border-gray-200 dark:border-gray-800"},void 0,e(p,{theme:"primary",size:"sm",weight:"bold"},void 0,a))},q=function(n){var a=n.number,r=n.children;return e(de,{alignItems:"top",space:3},void 0,e(ze,{number:a}),e("div",{className:"mt-0.5"},void 0,r))};function ne(t,n){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),a.push.apply(a,r)}return a}function v(t){for(var n=1;n1?"s":"")+" required, but only "+a.length+" present")}function yt(i){return w(1,arguments),i instanceof Date||Fe(i)==="object"&&Object.prototype.toString.call(i)==="[object Date]"}function C(i){w(1,arguments);var a=Object.prototype.toString.call(i);return i instanceof Date||Fe(i)==="object"&&a==="[object Date]"?new Date(i.getTime()):typeof i=="number"||a==="[object Number]"?new Date(i):((typeof i=="string"||a==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Ve(i){if(w(1,arguments),!yt(i)&&typeof i!="number")return!1;var a=C(i);return!isNaN(Number(a))}function T(i){if(i===null||i===!0||i===!1)return NaN;var a=Number(i);return isNaN(a)?a:a<0?Math.ceil(a):Math.floor(a)}function Kt(i,a){w(2,arguments);var r=C(i).getTime(),t=T(a);return new Date(r+t)}function Br(i,a){w(2,arguments);var r=T(a);return Kt(i,-r)}var Fn=864e5;function An(i){w(1,arguments);var a=C(i),r=a.getTime();a.setUTCMonth(0,1),a.setUTCHours(0,0,0,0);var t=a.getTime(),e=r-t;return Math.floor(e/Fn)+1}function Ie(i){w(1,arguments);var a=1,r=C(i),t=r.getUTCDay(),e=(t=e.getTime()?r+1:a.getTime()>=o.getTime()?r:r-1}function Un(i){w(1,arguments);var a=qr(i),r=new Date(0);r.setUTCFullYear(a,0,4),r.setUTCHours(0,0,0,0);var t=Ie(r);return t}var Wn=6048e5;function $r(i){w(1,arguments);var a=C(i),r=Ie(a).getTime()-Un(a).getTime();return Math.round(r/Wn)+1}var Hn={};function Oe(){return Hn}function Pe(i,a){var r,t,e,n,o,s,u,c;w(1,arguments);var l=Oe(),f=T((r=(t=(e=(n=a==null?void 0:a.weekStartsOn)!==null&&n!==void 0?n:a==null||(o=a.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&e!==void 0?e:l.weekStartsOn)!==null&&t!==void 0?t:(u=l.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=C(i),g=m.getUTCDay(),v=(g=1&&g<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(f+1,0,g),v.setUTCHours(0,0,0,0);var y=Pe(v,a),b=new Date(0);b.setUTCFullYear(f,0,g),b.setUTCHours(0,0,0,0);var O=Pe(b,a);return l.getTime()>=y.getTime()?f+1:l.getTime()>=O.getTime()?f:f-1}function Qn(i,a){var r,t,e,n,o,s,u,c;w(1,arguments);var l=Oe(),f=T((r=(t=(e=(n=a==null?void 0:a.firstWeekContainsDate)!==null&&n!==void 0?n:a==null||(o=a.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&e!==void 0?e:l.firstWeekContainsDate)!==null&&t!==void 0?t:(u=l.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&r!==void 0?r:1),m=Vt(i,a),g=new Date(0);g.setUTCFullYear(m,0,f),g.setUTCHours(0,0,0,0);var v=Pe(g,a);return v}var Bn=6048e5;function jr(i,a){w(1,arguments);var r=C(i),t=Pe(r,a).getTime()-Qn(r,a).getTime();return Math.round(t/Bn)+1}function R(i,a){for(var r=i<0?"-":"",t=Math.abs(i).toString();t.length0?t:1-t;return R(r==="yy"?e%100:e,r.length)},M:function(a,r){var t=a.getUTCMonth();return r==="M"?String(t+1):R(t+1,2)},d:function(a,r){return R(a.getUTCDate(),r.length)},a:function(a,r){var t=a.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h:function(a,r){return R(a.getUTCHours()%12||12,r.length)},H:function(a,r){return R(a.getUTCHours(),r.length)},m:function(a,r){return R(a.getUTCMinutes(),r.length)},s:function(a,r){return R(a.getUTCSeconds(),r.length)},S:function(a,r){var t=r.length,e=a.getUTCMilliseconds(),n=Math.floor(e*Math.pow(10,t-3));return R(n,r.length)}};const ge=qn;var xe={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},$n={G:function(a,r,t){var e=a.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return t.era(e,{width:"abbreviated"});case"GGGGG":return t.era(e,{width:"narrow"});case"GGGG":default:return t.era(e,{width:"wide"})}},y:function(a,r,t){if(r==="yo"){var e=a.getUTCFullYear(),n=e>0?e:1-e;return t.ordinalNumber(n,{unit:"year"})}return ge.y(a,r)},Y:function(a,r,t,e){var n=Vt(a,e),o=n>0?n:1-n;if(r==="YY"){var s=o%100;return R(s,2)}return r==="Yo"?t.ordinalNumber(o,{unit:"year"}):R(o,r.length)},R:function(a,r){var t=qr(a);return R(t,r.length)},u:function(a,r){var t=a.getUTCFullYear();return R(t,r.length)},Q:function(a,r,t){var e=Math.ceil((a.getUTCMonth()+1)/3);switch(r){case"Q":return String(e);case"QQ":return R(e,2);case"Qo":return t.ordinalNumber(e,{unit:"quarter"});case"QQQ":return t.quarter(e,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(e,{width:"wide",context:"formatting"})}},q:function(a,r,t){var e=Math.ceil((a.getUTCMonth()+1)/3);switch(r){case"q":return String(e);case"qq":return R(e,2);case"qo":return t.ordinalNumber(e,{unit:"quarter"});case"qqq":return t.quarter(e,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(e,{width:"wide",context:"standalone"})}},M:function(a,r,t){var e=a.getUTCMonth();switch(r){case"M":case"MM":return ge.M(a,r);case"Mo":return t.ordinalNumber(e+1,{unit:"month"});case"MMM":return t.month(e,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(e,{width:"wide",context:"formatting"})}},L:function(a,r,t){var e=a.getUTCMonth();switch(r){case"L":return String(e+1);case"LL":return R(e+1,2);case"Lo":return t.ordinalNumber(e+1,{unit:"month"});case"LLL":return t.month(e,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(e,{width:"wide",context:"standalone"})}},w:function(a,r,t,e){var n=jr(a,e);return r==="wo"?t.ordinalNumber(n,{unit:"week"}):R(n,r.length)},I:function(a,r,t){var e=$r(a);return r==="Io"?t.ordinalNumber(e,{unit:"week"}):R(e,r.length)},d:function(a,r,t){return r==="do"?t.ordinalNumber(a.getUTCDate(),{unit:"date"}):ge.d(a,r)},D:function(a,r,t){var e=An(a);return r==="Do"?t.ordinalNumber(e,{unit:"dayOfYear"}):R(e,r.length)},E:function(a,r,t){var e=a.getUTCDay();switch(r){case"E":case"EE":case"EEE":return t.day(e,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(e,{width:"short",context:"formatting"});case"EEEE":default:return t.day(e,{width:"wide",context:"formatting"})}},e:function(a,r,t,e){var n=a.getUTCDay(),o=(n-e.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return R(o,2);case"eo":return t.ordinalNumber(o,{unit:"day"});case"eee":return t.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(n,{width:"short",context:"formatting"});case"eeee":default:return t.day(n,{width:"wide",context:"formatting"})}},c:function(a,r,t,e){var n=a.getUTCDay(),o=(n-e.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return R(o,r.length);case"co":return t.ordinalNumber(o,{unit:"day"});case"ccc":return t.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(n,{width:"narrow",context:"standalone"});case"cccccc":return t.day(n,{width:"short",context:"standalone"});case"cccc":default:return t.day(n,{width:"wide",context:"standalone"})}},i:function(a,r,t){var e=a.getUTCDay(),n=e===0?7:e;switch(r){case"i":return String(n);case"ii":return R(n,r.length);case"io":return t.ordinalNumber(n,{unit:"day"});case"iii":return t.day(e,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(e,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(e,{width:"short",context:"formatting"});case"iiii":default:return t.day(e,{width:"wide",context:"formatting"})}},a:function(a,r,t){var e=a.getUTCHours(),n=e/12>=1?"pm":"am";switch(r){case"a":case"aa":return t.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(a,r,t){var e=a.getUTCHours(),n;switch(e===12?n=xe.noon:e===0?n=xe.midnight:n=e/12>=1?"pm":"am",r){case"b":case"bb":return t.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(a,r,t){var e=a.getUTCHours(),n;switch(e>=17?n=xe.evening:e>=12?n=xe.afternoon:e>=4?n=xe.morning:n=xe.night,r){case"B":case"BB":case"BBB":return t.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(a,r,t){if(r==="ho"){var e=a.getUTCHours()%12;return e===0&&(e=12),t.ordinalNumber(e,{unit:"hour"})}return ge.h(a,r)},H:function(a,r,t){return r==="Ho"?t.ordinalNumber(a.getUTCHours(),{unit:"hour"}):ge.H(a,r)},K:function(a,r,t){var e=a.getUTCHours()%12;return r==="Ko"?t.ordinalNumber(e,{unit:"hour"}):R(e,r.length)},k:function(a,r,t){var e=a.getUTCHours();return e===0&&(e=24),r==="ko"?t.ordinalNumber(e,{unit:"hour"}):R(e,r.length)},m:function(a,r,t){return r==="mo"?t.ordinalNumber(a.getUTCMinutes(),{unit:"minute"}):ge.m(a,r)},s:function(a,r,t){return r==="so"?t.ordinalNumber(a.getUTCSeconds(),{unit:"second"}):ge.s(a,r)},S:function(a,r){return ge.S(a,r)},X:function(a,r,t,e){var n=e._originalDate||a,o=n.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return dr(o);case"XXXX":case"XX":return Te(o);case"XXXXX":case"XXX":default:return Te(o,":")}},x:function(a,r,t,e){var n=e._originalDate||a,o=n.getTimezoneOffset();switch(r){case"x":return dr(o);case"xxxx":case"xx":return Te(o);case"xxxxx":case"xxx":default:return Te(o,":")}},O:function(a,r,t,e){var n=e._originalDate||a,o=n.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+pr(o,":");case"OOOO":default:return"GMT"+Te(o,":")}},z:function(a,r,t,e){var n=e._originalDate||a,o=n.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+pr(o,":");case"zzzz":default:return"GMT"+Te(o,":")}},t:function(a,r,t,e){var n=e._originalDate||a,o=Math.floor(n.getTime()/1e3);return R(o,r.length)},T:function(a,r,t,e){var n=e._originalDate||a,o=n.getTime();return R(o,r.length)}};function pr(i,a){var r=i>0?"-":"+",t=Math.abs(i),e=Math.floor(t/60),n=t%60;if(n===0)return r+String(e);var o=a||"";return r+String(e)+o+R(n,2)}function dr(i,a){if(i%60===0){var r=i>0?"-":"+";return r+R(Math.abs(i)/60,2)}return Te(i,a)}function Te(i,a){var r=a||"",t=i>0?"-":"+",e=Math.abs(i),n=R(Math.floor(e/60),2),o=R(e%60,2);return t+n+r+o}const jn=$n;var fr=function(a,r){switch(a){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},Kr=function(a,r){switch(a){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},Kn=function(a,r){var t=a.match(/(P+)(p+)?/)||[],e=t[1],n=t[2];if(!n)return fr(a,r);var o;switch(e){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",fr(e,r)).replace("{{time}}",Kr(n,r))},Vn={p:Kr,P:Kn};const At=Vn;function ut(i){var a=new Date(Date.UTC(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()));return a.setUTCFullYear(i.getFullYear()),i.getTime()-a.getTime()}var Xn=["D","DD"],Gn=["YY","YYYY"];function Vr(i){return Xn.indexOf(i)!==-1}function Xr(i){return Gn.indexOf(i)!==-1}function ct(i,a,r){if(i==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(a,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(i==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(a,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(i==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(a,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(i==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(a,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var zn={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Zn=function(a,r,t){var e,n=zn[a];return typeof n=="string"?e=n:r===1?e=n.one:e=n.other.replace("{{count}}",r.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+e:e+" ago":e};const Jn=Zn;function Tt(i){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=a.width?String(a.width):i.defaultWidth,t=i.formats[r]||i.formats[i.defaultWidth];return t}}var ea={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ta={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ra={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},na={date:Tt({formats:ea,defaultWidth:"full"}),time:Tt({formats:ta,defaultWidth:"full"}),dateTime:Tt({formats:ra,defaultWidth:"full"})};const aa=na;var oa={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ia=function(a,r,t,e){return oa[a]};const sa=ia;function Be(i){return function(a,r){var t=r!=null&&r.context?String(r.context):"standalone",e;if(t==="formatting"&&i.formattingValues){var n=i.defaultFormattingWidth||i.defaultWidth,o=r!=null&&r.width?String(r.width):n;e=i.formattingValues[o]||i.formattingValues[n]}else{var s=i.defaultWidth,u=r!=null&&r.width?String(r.width):i.defaultWidth;e=i.values[u]||i.values[s]}var c=i.argumentCallback?i.argumentCallback(a):a;return e[c]}}var ua={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ca={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},la={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},pa={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},da={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},fa={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ha=function(a,r){var t=Number(a),e=t%100;if(e>20||e<10)switch(e%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},ma={ordinalNumber:ha,era:Be({values:ua,defaultWidth:"wide"}),quarter:Be({values:ca,defaultWidth:"wide",argumentCallback:function(a){return a-1}}),month:Be({values:la,defaultWidth:"wide"}),day:Be({values:pa,defaultWidth:"wide"}),dayPeriod:Be({values:da,defaultWidth:"wide",formattingValues:fa,defaultFormattingWidth:"wide"})};const va=ma;function qe(i){return function(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=r.width,e=t&&i.matchPatterns[t]||i.matchPatterns[i.defaultMatchWidth],n=a.match(e);if(!n)return null;var o=n[0],s=t&&i.parsePatterns[t]||i.parsePatterns[i.defaultParseWidth],u=Array.isArray(s)?ya(s,function(f){return f.test(o)}):ga(s,function(f){return f.test(o)}),c;c=i.valueCallback?i.valueCallback(u):u,c=r.valueCallback?r.valueCallback(c):c;var l=a.slice(o.length);return{value:c,rest:l}}}function ga(i,a){for(var r in i)if(i.hasOwnProperty(r)&&a(i[r]))return r}function ya(i,a){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},t=a.match(i.matchPattern);if(!t)return null;var e=t[0],n=a.match(i.parsePattern);if(!n)return null;var o=i.valueCallback?i.valueCallback(n[0]):n[0];o=r.valueCallback?r.valueCallback(o):o;var s=a.slice(e.length);return{value:o,rest:s}}}var Da=/^(\d+)(th|st|nd|rd)?/i,ba=/\d+/i,ka={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ca={any:[/^b/i,/^(a|c)/i]},Ma={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ta={any:[/1/i,/2/i,/3/i,/4/i]},Sa={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},_a={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Pa={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Oa={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},xa={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ea={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Na={ordinalNumber:wa({matchPattern:Da,parsePattern:ba,valueCallback:function(a){return parseInt(a,10)}}),era:qe({matchPatterns:ka,defaultMatchWidth:"wide",parsePatterns:Ca,defaultParseWidth:"any"}),quarter:qe({matchPatterns:Ma,defaultMatchWidth:"wide",parsePatterns:Ta,defaultParseWidth:"any",valueCallback:function(a){return a+1}}),month:qe({matchPatterns:Sa,defaultMatchWidth:"wide",parsePatterns:_a,defaultParseWidth:"any"}),day:qe({matchPatterns:Pa,defaultMatchWidth:"wide",parsePatterns:Oa,defaultParseWidth:"any"}),dayPeriod:qe({matchPatterns:xa,defaultMatchWidth:"any",parsePatterns:Ea,defaultParseWidth:"any"})};const Ya=Na;var Ia={code:"en-US",formatDistance:Jn,formatLong:aa,formatRelative:sa,localize:va,match:Ya,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Gr=Ia;var Ra=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,La=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Fa=/^'([^]*?)'?$/,Aa=/''/g,Ua=/[a-zA-Z]/;function hr(i,a,r){var t,e,n,o,s,u,c,l,f,m,g,v,y,b,O,S,M,_;w(2,arguments);var U=String(a),W=Oe(),B=(t=(e=r==null?void 0:r.locale)!==null&&e!==void 0?e:W.locale)!==null&&t!==void 0?t:Gr,oe=T((n=(o=(s=(u=r==null?void 0:r.firstWeekContainsDate)!==null&&u!==void 0?u:r==null||(c=r.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&s!==void 0?s:W.firstWeekContainsDate)!==null&&o!==void 0?o:(f=W.locale)===null||f===void 0||(m=f.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(oe>=1&&oe<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var me=T((g=(v=(y=(b=r==null?void 0:r.weekStartsOn)!==null&&b!==void 0?b:r==null||(O=r.locale)===null||O===void 0||(S=O.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&y!==void 0?y:W.weekStartsOn)!==null&&v!==void 0?v:(M=W.locale)===null||M===void 0||(_=M.options)===null||_===void 0?void 0:_.weekStartsOn)!==null&&g!==void 0?g:0);if(!(me>=0&&me<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!B.localize)throw new RangeError("locale must contain localize property");if(!B.formatLong)throw new RangeError("locale must contain formatLong property");var ve=C(i);if(!Ve(ve))throw new RangeError("Invalid time value");var Ue=ut(ve),We=Br(ve,Ue),He={firstWeekContainsDate:oe,weekStartsOn:me,locale:B,_originalDate:ve},kt=U.match(La).map(function(Z){var ne=Z[0];if(ne==="p"||ne==="P"){var Me=At[ne];return Me(Z,B.formatLong)}return Z}).join("").match(Ra).map(function(Z){if(Z==="''")return"'";var ne=Z[0];if(ne==="'")return Wa(Z);var Me=jn[ne];if(Me)return!(r!=null&&r.useAdditionalWeekYearTokens)&&Xr(Z)&&ct(Z,a,String(i)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&Vr(Z)&&ct(Z,a,String(i)),Me(We,Z,B.localize,He);if(ne.match(Ua))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ne+"`");return Z}).join("");return kt}function Wa(i){var a=i.match(Fa);return a?a[1].replace(Aa,"'"):i}var Ha=6e4;function Ut(i,a){w(2,arguments);var r=T(a);return Kt(i,r*Ha)}var Qa=36e5;function Ba(i,a){w(2,arguments);var r=T(a);return Kt(i,r*Qa)}function Ae(i,a){w(2,arguments);var r=C(i),t=T(a);return isNaN(t)?new Date(NaN):(t&&r.setDate(r.getDate()+t),r)}function Xt(i,a){w(2,arguments);var r=T(a),t=r*7;return Ae(i,t)}function ce(i,a){w(2,arguments);var r=C(i),t=T(a);if(isNaN(t))return new Date(NaN);if(!t)return r;var e=r.getDate(),n=new Date(r.getTime());n.setMonth(r.getMonth()+t+1,0);var o=n.getDate();return e>=o?n:(r.setFullYear(n.getFullYear(),n.getMonth(),e),r)}function zr(i,a){w(2,arguments);var r=T(a),t=r*3;return ce(i,t)}function Re(i,a){w(2,arguments);var r=T(a);return ce(i,r*12)}function qa(i,a){w(2,arguments);var r=T(a);return Ae(i,-r)}function $a(i,a){w(2,arguments);var r=T(a);return Xt(i,-r)}function Le(i,a){w(2,arguments);var r=T(a);return ce(i,-r)}function ja(i,a){w(2,arguments);var r=T(a);return zr(i,-r)}function Xe(i,a){w(2,arguments);var r=T(a);return Re(i,-r)}function St(i){w(1,arguments);var a=C(i),r=a.getSeconds();return r}function se(i){w(1,arguments);var a=C(i),r=a.getMinutes();return r}function ue(i){w(1,arguments);var a=C(i),r=a.getHours();return r}function Ka(i){w(1,arguments);var a=C(i),r=a.getDay();return r}function mr(i){w(1,arguments);var a=C(i),r=a.getDate();return r}function Zr(i,a){var r,t,e,n,o,s,u,c;w(1,arguments);var l=Oe(),f=T((r=(t=(e=(n=a==null?void 0:a.weekStartsOn)!==null&&n!==void 0?n:a==null||(o=a.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&e!==void 0?e:l.weekStartsOn)!==null&&t!==void 0?t:(u=l.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=C(i),g=m.getDay(),v=(g=e.getTime()?r+1:a.getTime()>=o.getTime()?r:r-1}function Xa(i){w(1,arguments);var a=Va(i),r=new Date(0);r.setFullYear(a,0,4),r.setHours(0,0,0,0);var t=lt(r);return t}var Ga=6048e5;function za(i){w(1,arguments);var a=C(i),r=lt(a).getTime()-Xa(a).getTime();return Math.round(r/Ga)+1}function J(i){w(1,arguments);var a=C(i),r=a.getMonth();return r}function Ne(i){w(1,arguments);var a=C(i),r=Math.floor(a.getMonth()/3)+1;return r}function P(i){return w(1,arguments),C(i).getFullYear()}function Wt(i){w(1,arguments);var a=C(i),r=a.getTime();return r}function Za(i,a){w(2,arguments);var r=C(i),t=T(a);return r.setSeconds(t),r}function ot(i,a){w(2,arguments);var r=C(i),t=T(a);return r.setMinutes(t),r}function it(i,a){w(2,arguments);var r=C(i),t=T(a);return r.setHours(t),r}function Ja(i){w(1,arguments);var a=C(i),r=a.getFullYear(),t=a.getMonth(),e=new Date(0);return e.setFullYear(r,t+1,0),e.setHours(0,0,0,0),e.getDate()}function ee(i,a){w(2,arguments);var r=C(i),t=T(a),e=r.getFullYear(),n=r.getDate(),o=new Date(0);o.setFullYear(e,t,15),o.setHours(0,0,0,0);var s=Ja(o);return r.setMonth(t,Math.min(n,s)),r}function Ee(i,a){w(2,arguments);var r=C(i),t=T(a),e=Math.floor(r.getMonth()/3)+1,n=t-e;return ee(r,r.getMonth()+n*3)}function he(i,a){w(2,arguments);var r=C(i),t=T(a);return isNaN(r.getTime())?new Date(NaN):(r.setFullYear(t),r)}function vr(i){w(1,arguments);var a;if(i&&typeof i.forEach=="function")a=i;else if(Fe(i)==="object"&&i!==null)a=Array.prototype.slice.call(i);else return new Date(NaN);var r;return a.forEach(function(t){var e=C(t);(r===void 0||r>e||isNaN(e.getDate()))&&(r=e)}),r||new Date(NaN)}function gr(i){w(1,arguments);var a;if(i&&typeof i.forEach=="function")a=i;else if(Fe(i)==="object"&&i!==null)a=Array.prototype.slice.call(i);else return new Date(NaN);var r;return a.forEach(function(t){var e=C(t);(r===void 0||rt.getTime()}function we(i,a){w(2,arguments);var r=C(i),t=C(a);return r.getTime()=t&&r<=e}function yr(i,a){var r=typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(!r){if(Array.isArray(i)||(r=kn(i))||a&&i&&typeof i.length=="number"){r&&(i=r);var t=0,e=function(){};return{s:e,n:function(){return t>=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(c){throw c},f:e}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +import{r as q,cD as bn,w as Fe,jm as kn,dY as lr,dZ as Cn,dU as N,dV as x,_ as D,dW as k,dX as E,iJ as Mn,R as h,jn as re,cm as Tn}from"../index-be605fd2.js";import{s as Ft,u as Sn,a as Wr,b as _n}from"./usePopper-4a92d7ef.js";import{r as Pn}from"./warning-07d0fac9.js";var Hr=q.createContext(),Qr=q.createContext();function On(i){var a=i.children,r=q.useState(null),t=r[0],e=r[1],n=q.useRef(!1);q.useEffect(function(){return function(){n.current=!0}},[]);var o=q.useCallback(function(s){n.current||e(s)},[]);return q.createElement(Hr.Provider,{value:t},q.createElement(Qr.Provider,{value:o},a))}var xn=function(){},En=function(){return Promise.resolve(null)},Nn=[];function Yn(i){var a=i.placement,r=a===void 0?"bottom":a,t=i.strategy,e=t===void 0?"absolute":t,n=i.modifiers,o=n===void 0?Nn:n,s=i.referenceElement,u=i.onFirstUpdate,c=i.innerRef,l=i.children,f=q.useContext(Hr),m=q.useState(null),g=m[0],v=m[1],y=q.useState(null),b=y[0],O=y[1];q.useEffect(function(){Ft(c,g)},[c,g]);var S=q.useMemo(function(){return{placement:r,strategy:e,onFirstUpdate:u,modifiers:[].concat(o,[{name:"arrow",enabled:b!=null,options:{element:b}}])}},[r,e,u,o,b]),M=Sn(s||f,g,S),_=M.state,U=M.styles,W=M.forceUpdate,B=M.update,oe=q.useMemo(function(){return{ref:v,style:U.popper,placement:_?_.placement:r,hasPopperEscaped:_&&_.modifiersData.hide?_.modifiersData.hide.hasPopperEscaped:null,isReferenceHidden:_&&_.modifiersData.hide?_.modifiersData.hide.isReferenceHidden:null,arrowProps:{style:U.arrow,ref:O},forceUpdate:W||xn,update:B||En}},[v,O,r,_,U,B,W]);return Wr(l)(oe)}var In=Pn();const Rn=bn(In);function Ln(i){var a=i.children,r=i.innerRef,t=q.useContext(Qr),e=q.useCallback(function(n){Ft(r,n),_n(t,n)},[r,t]);return q.useEffect(function(){return function(){return Ft(r,null)}},[]),q.useEffect(function(){Rn(!!t,"`Reference` should not be used outside of a `Manager` component.")},[t]),Wr(a)({ref:e})}function w(i,a){if(a.length1?"s":"")+" required, but only "+a.length+" present")}function yt(i){return w(1,arguments),i instanceof Date||Fe(i)==="object"&&Object.prototype.toString.call(i)==="[object Date]"}function C(i){w(1,arguments);var a=Object.prototype.toString.call(i);return i instanceof Date||Fe(i)==="object"&&a==="[object Date]"?new Date(i.getTime()):typeof i=="number"||a==="[object Number]"?new Date(i):((typeof i=="string"||a==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Ve(i){if(w(1,arguments),!yt(i)&&typeof i!="number")return!1;var a=C(i);return!isNaN(Number(a))}function T(i){if(i===null||i===!0||i===!1)return NaN;var a=Number(i);return isNaN(a)?a:a<0?Math.ceil(a):Math.floor(a)}function Kt(i,a){w(2,arguments);var r=C(i).getTime(),t=T(a);return new Date(r+t)}function Br(i,a){w(2,arguments);var r=T(a);return Kt(i,-r)}var Fn=864e5;function An(i){w(1,arguments);var a=C(i),r=a.getTime();a.setUTCMonth(0,1),a.setUTCHours(0,0,0,0);var t=a.getTime(),e=r-t;return Math.floor(e/Fn)+1}function Ie(i){w(1,arguments);var a=1,r=C(i),t=r.getUTCDay(),e=(t=e.getTime()?r+1:a.getTime()>=o.getTime()?r:r-1}function Un(i){w(1,arguments);var a=qr(i),r=new Date(0);r.setUTCFullYear(a,0,4),r.setUTCHours(0,0,0,0);var t=Ie(r);return t}var Wn=6048e5;function $r(i){w(1,arguments);var a=C(i),r=Ie(a).getTime()-Un(a).getTime();return Math.round(r/Wn)+1}var Hn={};function Oe(){return Hn}function Pe(i,a){var r,t,e,n,o,s,u,c;w(1,arguments);var l=Oe(),f=T((r=(t=(e=(n=a==null?void 0:a.weekStartsOn)!==null&&n!==void 0?n:a==null||(o=a.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&e!==void 0?e:l.weekStartsOn)!==null&&t!==void 0?t:(u=l.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=C(i),g=m.getUTCDay(),v=(g=1&&g<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(f+1,0,g),v.setUTCHours(0,0,0,0);var y=Pe(v,a),b=new Date(0);b.setUTCFullYear(f,0,g),b.setUTCHours(0,0,0,0);var O=Pe(b,a);return l.getTime()>=y.getTime()?f+1:l.getTime()>=O.getTime()?f:f-1}function Qn(i,a){var r,t,e,n,o,s,u,c;w(1,arguments);var l=Oe(),f=T((r=(t=(e=(n=a==null?void 0:a.firstWeekContainsDate)!==null&&n!==void 0?n:a==null||(o=a.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&e!==void 0?e:l.firstWeekContainsDate)!==null&&t!==void 0?t:(u=l.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&r!==void 0?r:1),m=Vt(i,a),g=new Date(0);g.setUTCFullYear(m,0,f),g.setUTCHours(0,0,0,0);var v=Pe(g,a);return v}var Bn=6048e5;function jr(i,a){w(1,arguments);var r=C(i),t=Pe(r,a).getTime()-Qn(r,a).getTime();return Math.round(t/Bn)+1}function R(i,a){for(var r=i<0?"-":"",t=Math.abs(i).toString();t.length0?t:1-t;return R(r==="yy"?e%100:e,r.length)},M:function(a,r){var t=a.getUTCMonth();return r==="M"?String(t+1):R(t+1,2)},d:function(a,r){return R(a.getUTCDate(),r.length)},a:function(a,r){var t=a.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h:function(a,r){return R(a.getUTCHours()%12||12,r.length)},H:function(a,r){return R(a.getUTCHours(),r.length)},m:function(a,r){return R(a.getUTCMinutes(),r.length)},s:function(a,r){return R(a.getUTCSeconds(),r.length)},S:function(a,r){var t=r.length,e=a.getUTCMilliseconds(),n=Math.floor(e*Math.pow(10,t-3));return R(n,r.length)}};const ge=qn;var xe={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},$n={G:function(a,r,t){var e=a.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return t.era(e,{width:"abbreviated"});case"GGGGG":return t.era(e,{width:"narrow"});case"GGGG":default:return t.era(e,{width:"wide"})}},y:function(a,r,t){if(r==="yo"){var e=a.getUTCFullYear(),n=e>0?e:1-e;return t.ordinalNumber(n,{unit:"year"})}return ge.y(a,r)},Y:function(a,r,t,e){var n=Vt(a,e),o=n>0?n:1-n;if(r==="YY"){var s=o%100;return R(s,2)}return r==="Yo"?t.ordinalNumber(o,{unit:"year"}):R(o,r.length)},R:function(a,r){var t=qr(a);return R(t,r.length)},u:function(a,r){var t=a.getUTCFullYear();return R(t,r.length)},Q:function(a,r,t){var e=Math.ceil((a.getUTCMonth()+1)/3);switch(r){case"Q":return String(e);case"QQ":return R(e,2);case"Qo":return t.ordinalNumber(e,{unit:"quarter"});case"QQQ":return t.quarter(e,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(e,{width:"wide",context:"formatting"})}},q:function(a,r,t){var e=Math.ceil((a.getUTCMonth()+1)/3);switch(r){case"q":return String(e);case"qq":return R(e,2);case"qo":return t.ordinalNumber(e,{unit:"quarter"});case"qqq":return t.quarter(e,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(e,{width:"wide",context:"standalone"})}},M:function(a,r,t){var e=a.getUTCMonth();switch(r){case"M":case"MM":return ge.M(a,r);case"Mo":return t.ordinalNumber(e+1,{unit:"month"});case"MMM":return t.month(e,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(e,{width:"wide",context:"formatting"})}},L:function(a,r,t){var e=a.getUTCMonth();switch(r){case"L":return String(e+1);case"LL":return R(e+1,2);case"Lo":return t.ordinalNumber(e+1,{unit:"month"});case"LLL":return t.month(e,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(e,{width:"wide",context:"standalone"})}},w:function(a,r,t,e){var n=jr(a,e);return r==="wo"?t.ordinalNumber(n,{unit:"week"}):R(n,r.length)},I:function(a,r,t){var e=$r(a);return r==="Io"?t.ordinalNumber(e,{unit:"week"}):R(e,r.length)},d:function(a,r,t){return r==="do"?t.ordinalNumber(a.getUTCDate(),{unit:"date"}):ge.d(a,r)},D:function(a,r,t){var e=An(a);return r==="Do"?t.ordinalNumber(e,{unit:"dayOfYear"}):R(e,r.length)},E:function(a,r,t){var e=a.getUTCDay();switch(r){case"E":case"EE":case"EEE":return t.day(e,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(e,{width:"short",context:"formatting"});case"EEEE":default:return t.day(e,{width:"wide",context:"formatting"})}},e:function(a,r,t,e){var n=a.getUTCDay(),o=(n-e.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return R(o,2);case"eo":return t.ordinalNumber(o,{unit:"day"});case"eee":return t.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(n,{width:"short",context:"formatting"});case"eeee":default:return t.day(n,{width:"wide",context:"formatting"})}},c:function(a,r,t,e){var n=a.getUTCDay(),o=(n-e.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return R(o,r.length);case"co":return t.ordinalNumber(o,{unit:"day"});case"ccc":return t.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(n,{width:"narrow",context:"standalone"});case"cccccc":return t.day(n,{width:"short",context:"standalone"});case"cccc":default:return t.day(n,{width:"wide",context:"standalone"})}},i:function(a,r,t){var e=a.getUTCDay(),n=e===0?7:e;switch(r){case"i":return String(n);case"ii":return R(n,r.length);case"io":return t.ordinalNumber(n,{unit:"day"});case"iii":return t.day(e,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(e,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(e,{width:"short",context:"formatting"});case"iiii":default:return t.day(e,{width:"wide",context:"formatting"})}},a:function(a,r,t){var e=a.getUTCHours(),n=e/12>=1?"pm":"am";switch(r){case"a":case"aa":return t.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(a,r,t){var e=a.getUTCHours(),n;switch(e===12?n=xe.noon:e===0?n=xe.midnight:n=e/12>=1?"pm":"am",r){case"b":case"bb":return t.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(a,r,t){var e=a.getUTCHours(),n;switch(e>=17?n=xe.evening:e>=12?n=xe.afternoon:e>=4?n=xe.morning:n=xe.night,r){case"B":case"BB":case"BBB":return t.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(a,r,t){if(r==="ho"){var e=a.getUTCHours()%12;return e===0&&(e=12),t.ordinalNumber(e,{unit:"hour"})}return ge.h(a,r)},H:function(a,r,t){return r==="Ho"?t.ordinalNumber(a.getUTCHours(),{unit:"hour"}):ge.H(a,r)},K:function(a,r,t){var e=a.getUTCHours()%12;return r==="Ko"?t.ordinalNumber(e,{unit:"hour"}):R(e,r.length)},k:function(a,r,t){var e=a.getUTCHours();return e===0&&(e=24),r==="ko"?t.ordinalNumber(e,{unit:"hour"}):R(e,r.length)},m:function(a,r,t){return r==="mo"?t.ordinalNumber(a.getUTCMinutes(),{unit:"minute"}):ge.m(a,r)},s:function(a,r,t){return r==="so"?t.ordinalNumber(a.getUTCSeconds(),{unit:"second"}):ge.s(a,r)},S:function(a,r){return ge.S(a,r)},X:function(a,r,t,e){var n=e._originalDate||a,o=n.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return dr(o);case"XXXX":case"XX":return Te(o);case"XXXXX":case"XXX":default:return Te(o,":")}},x:function(a,r,t,e){var n=e._originalDate||a,o=n.getTimezoneOffset();switch(r){case"x":return dr(o);case"xxxx":case"xx":return Te(o);case"xxxxx":case"xxx":default:return Te(o,":")}},O:function(a,r,t,e){var n=e._originalDate||a,o=n.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+pr(o,":");case"OOOO":default:return"GMT"+Te(o,":")}},z:function(a,r,t,e){var n=e._originalDate||a,o=n.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+pr(o,":");case"zzzz":default:return"GMT"+Te(o,":")}},t:function(a,r,t,e){var n=e._originalDate||a,o=Math.floor(n.getTime()/1e3);return R(o,r.length)},T:function(a,r,t,e){var n=e._originalDate||a,o=n.getTime();return R(o,r.length)}};function pr(i,a){var r=i>0?"-":"+",t=Math.abs(i),e=Math.floor(t/60),n=t%60;if(n===0)return r+String(e);var o=a||"";return r+String(e)+o+R(n,2)}function dr(i,a){if(i%60===0){var r=i>0?"-":"+";return r+R(Math.abs(i)/60,2)}return Te(i,a)}function Te(i,a){var r=a||"",t=i>0?"-":"+",e=Math.abs(i),n=R(Math.floor(e/60),2),o=R(e%60,2);return t+n+r+o}const jn=$n;var fr=function(a,r){switch(a){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},Kr=function(a,r){switch(a){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},Kn=function(a,r){var t=a.match(/(P+)(p+)?/)||[],e=t[1],n=t[2];if(!n)return fr(a,r);var o;switch(e){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",fr(e,r)).replace("{{time}}",Kr(n,r))},Vn={p:Kr,P:Kn};const At=Vn;function ut(i){var a=new Date(Date.UTC(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()));return a.setUTCFullYear(i.getFullYear()),i.getTime()-a.getTime()}var Xn=["D","DD"],Gn=["YY","YYYY"];function Vr(i){return Xn.indexOf(i)!==-1}function Xr(i){return Gn.indexOf(i)!==-1}function ct(i,a,r){if(i==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(a,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(i==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(a,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(i==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(a,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(i==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(a,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var zn={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Zn=function(a,r,t){var e,n=zn[a];return typeof n=="string"?e=n:r===1?e=n.one:e=n.other.replace("{{count}}",r.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+e:e+" ago":e};const Jn=Zn;function Tt(i){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=a.width?String(a.width):i.defaultWidth,t=i.formats[r]||i.formats[i.defaultWidth];return t}}var ea={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ta={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ra={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},na={date:Tt({formats:ea,defaultWidth:"full"}),time:Tt({formats:ta,defaultWidth:"full"}),dateTime:Tt({formats:ra,defaultWidth:"full"})};const aa=na;var oa={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ia=function(a,r,t,e){return oa[a]};const sa=ia;function Be(i){return function(a,r){var t=r!=null&&r.context?String(r.context):"standalone",e;if(t==="formatting"&&i.formattingValues){var n=i.defaultFormattingWidth||i.defaultWidth,o=r!=null&&r.width?String(r.width):n;e=i.formattingValues[o]||i.formattingValues[n]}else{var s=i.defaultWidth,u=r!=null&&r.width?String(r.width):i.defaultWidth;e=i.values[u]||i.values[s]}var c=i.argumentCallback?i.argumentCallback(a):a;return e[c]}}var ua={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ca={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},la={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},pa={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},da={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},fa={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ha=function(a,r){var t=Number(a),e=t%100;if(e>20||e<10)switch(e%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},ma={ordinalNumber:ha,era:Be({values:ua,defaultWidth:"wide"}),quarter:Be({values:ca,defaultWidth:"wide",argumentCallback:function(a){return a-1}}),month:Be({values:la,defaultWidth:"wide"}),day:Be({values:pa,defaultWidth:"wide"}),dayPeriod:Be({values:da,defaultWidth:"wide",formattingValues:fa,defaultFormattingWidth:"wide"})};const va=ma;function qe(i){return function(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=r.width,e=t&&i.matchPatterns[t]||i.matchPatterns[i.defaultMatchWidth],n=a.match(e);if(!n)return null;var o=n[0],s=t&&i.parsePatterns[t]||i.parsePatterns[i.defaultParseWidth],u=Array.isArray(s)?ya(s,function(f){return f.test(o)}):ga(s,function(f){return f.test(o)}),c;c=i.valueCallback?i.valueCallback(u):u,c=r.valueCallback?r.valueCallback(c):c;var l=a.slice(o.length);return{value:c,rest:l}}}function ga(i,a){for(var r in i)if(i.hasOwnProperty(r)&&a(i[r]))return r}function ya(i,a){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},t=a.match(i.matchPattern);if(!t)return null;var e=t[0],n=a.match(i.parsePattern);if(!n)return null;var o=i.valueCallback?i.valueCallback(n[0]):n[0];o=r.valueCallback?r.valueCallback(o):o;var s=a.slice(e.length);return{value:o,rest:s}}}var Da=/^(\d+)(th|st|nd|rd)?/i,ba=/\d+/i,ka={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ca={any:[/^b/i,/^(a|c)/i]},Ma={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ta={any:[/1/i,/2/i,/3/i,/4/i]},Sa={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},_a={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Pa={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Oa={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},xa={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ea={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Na={ordinalNumber:wa({matchPattern:Da,parsePattern:ba,valueCallback:function(a){return parseInt(a,10)}}),era:qe({matchPatterns:ka,defaultMatchWidth:"wide",parsePatterns:Ca,defaultParseWidth:"any"}),quarter:qe({matchPatterns:Ma,defaultMatchWidth:"wide",parsePatterns:Ta,defaultParseWidth:"any",valueCallback:function(a){return a+1}}),month:qe({matchPatterns:Sa,defaultMatchWidth:"wide",parsePatterns:_a,defaultParseWidth:"any"}),day:qe({matchPatterns:Pa,defaultMatchWidth:"wide",parsePatterns:Oa,defaultParseWidth:"any"}),dayPeriod:qe({matchPatterns:xa,defaultMatchWidth:"any",parsePatterns:Ea,defaultParseWidth:"any"})};const Ya=Na;var Ia={code:"en-US",formatDistance:Jn,formatLong:aa,formatRelative:sa,localize:va,match:Ya,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Gr=Ia;var Ra=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,La=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Fa=/^'([^]*?)'?$/,Aa=/''/g,Ua=/[a-zA-Z]/;function hr(i,a,r){var t,e,n,o,s,u,c,l,f,m,g,v,y,b,O,S,M,_;w(2,arguments);var U=String(a),W=Oe(),B=(t=(e=r==null?void 0:r.locale)!==null&&e!==void 0?e:W.locale)!==null&&t!==void 0?t:Gr,oe=T((n=(o=(s=(u=r==null?void 0:r.firstWeekContainsDate)!==null&&u!==void 0?u:r==null||(c=r.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&s!==void 0?s:W.firstWeekContainsDate)!==null&&o!==void 0?o:(f=W.locale)===null||f===void 0||(m=f.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(oe>=1&&oe<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var me=T((g=(v=(y=(b=r==null?void 0:r.weekStartsOn)!==null&&b!==void 0?b:r==null||(O=r.locale)===null||O===void 0||(S=O.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&y!==void 0?y:W.weekStartsOn)!==null&&v!==void 0?v:(M=W.locale)===null||M===void 0||(_=M.options)===null||_===void 0?void 0:_.weekStartsOn)!==null&&g!==void 0?g:0);if(!(me>=0&&me<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!B.localize)throw new RangeError("locale must contain localize property");if(!B.formatLong)throw new RangeError("locale must contain formatLong property");var ve=C(i);if(!Ve(ve))throw new RangeError("Invalid time value");var Ue=ut(ve),We=Br(ve,Ue),He={firstWeekContainsDate:oe,weekStartsOn:me,locale:B,_originalDate:ve},kt=U.match(La).map(function(Z){var ne=Z[0];if(ne==="p"||ne==="P"){var Me=At[ne];return Me(Z,B.formatLong)}return Z}).join("").match(Ra).map(function(Z){if(Z==="''")return"'";var ne=Z[0];if(ne==="'")return Wa(Z);var Me=jn[ne];if(Me)return!(r!=null&&r.useAdditionalWeekYearTokens)&&Xr(Z)&&ct(Z,a,String(i)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&Vr(Z)&&ct(Z,a,String(i)),Me(We,Z,B.localize,He);if(ne.match(Ua))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ne+"`");return Z}).join("");return kt}function Wa(i){var a=i.match(Fa);return a?a[1].replace(Aa,"'"):i}var Ha=6e4;function Ut(i,a){w(2,arguments);var r=T(a);return Kt(i,r*Ha)}var Qa=36e5;function Ba(i,a){w(2,arguments);var r=T(a);return Kt(i,r*Qa)}function Ae(i,a){w(2,arguments);var r=C(i),t=T(a);return isNaN(t)?new Date(NaN):(t&&r.setDate(r.getDate()+t),r)}function Xt(i,a){w(2,arguments);var r=T(a),t=r*7;return Ae(i,t)}function ce(i,a){w(2,arguments);var r=C(i),t=T(a);if(isNaN(t))return new Date(NaN);if(!t)return r;var e=r.getDate(),n=new Date(r.getTime());n.setMonth(r.getMonth()+t+1,0);var o=n.getDate();return e>=o?n:(r.setFullYear(n.getFullYear(),n.getMonth(),e),r)}function zr(i,a){w(2,arguments);var r=T(a),t=r*3;return ce(i,t)}function Re(i,a){w(2,arguments);var r=T(a);return ce(i,r*12)}function qa(i,a){w(2,arguments);var r=T(a);return Ae(i,-r)}function $a(i,a){w(2,arguments);var r=T(a);return Xt(i,-r)}function Le(i,a){w(2,arguments);var r=T(a);return ce(i,-r)}function ja(i,a){w(2,arguments);var r=T(a);return zr(i,-r)}function Xe(i,a){w(2,arguments);var r=T(a);return Re(i,-r)}function St(i){w(1,arguments);var a=C(i),r=a.getSeconds();return r}function se(i){w(1,arguments);var a=C(i),r=a.getMinutes();return r}function ue(i){w(1,arguments);var a=C(i),r=a.getHours();return r}function Ka(i){w(1,arguments);var a=C(i),r=a.getDay();return r}function mr(i){w(1,arguments);var a=C(i),r=a.getDate();return r}function Zr(i,a){var r,t,e,n,o,s,u,c;w(1,arguments);var l=Oe(),f=T((r=(t=(e=(n=a==null?void 0:a.weekStartsOn)!==null&&n!==void 0?n:a==null||(o=a.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&e!==void 0?e:l.weekStartsOn)!==null&&t!==void 0?t:(u=l.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=C(i),g=m.getDay(),v=(g=e.getTime()?r+1:a.getTime()>=o.getTime()?r:r-1}function Xa(i){w(1,arguments);var a=Va(i),r=new Date(0);r.setFullYear(a,0,4),r.setHours(0,0,0,0);var t=lt(r);return t}var Ga=6048e5;function za(i){w(1,arguments);var a=C(i),r=lt(a).getTime()-Xa(a).getTime();return Math.round(r/Ga)+1}function J(i){w(1,arguments);var a=C(i),r=a.getMonth();return r}function Ne(i){w(1,arguments);var a=C(i),r=Math.floor(a.getMonth()/3)+1;return r}function P(i){return w(1,arguments),C(i).getFullYear()}function Wt(i){w(1,arguments);var a=C(i),r=a.getTime();return r}function Za(i,a){w(2,arguments);var r=C(i),t=T(a);return r.setSeconds(t),r}function ot(i,a){w(2,arguments);var r=C(i),t=T(a);return r.setMinutes(t),r}function it(i,a){w(2,arguments);var r=C(i),t=T(a);return r.setHours(t),r}function Ja(i){w(1,arguments);var a=C(i),r=a.getFullYear(),t=a.getMonth(),e=new Date(0);return e.setFullYear(r,t+1,0),e.setHours(0,0,0,0),e.getDate()}function ee(i,a){w(2,arguments);var r=C(i),t=T(a),e=r.getFullYear(),n=r.getDate(),o=new Date(0);o.setFullYear(e,t,15),o.setHours(0,0,0,0);var s=Ja(o);return r.setMonth(t,Math.min(n,s)),r}function Ee(i,a){w(2,arguments);var r=C(i),t=T(a),e=Math.floor(r.getMonth()/3)+1,n=t-e;return ee(r,r.getMonth()+n*3)}function he(i,a){w(2,arguments);var r=C(i),t=T(a);return isNaN(r.getTime())?new Date(NaN):(r.setFullYear(t),r)}function vr(i){w(1,arguments);var a;if(i&&typeof i.forEach=="function")a=i;else if(Fe(i)==="object"&&i!==null)a=Array.prototype.slice.call(i);else return new Date(NaN);var r;return a.forEach(function(t){var e=C(t);(r===void 0||r>e||isNaN(e.getDate()))&&(r=e)}),r||new Date(NaN)}function gr(i){w(1,arguments);var a;if(i&&typeof i.forEach=="function")a=i;else if(Fe(i)==="object"&&i!==null)a=Array.prototype.slice.call(i);else return new Date(NaN);var r;return a.forEach(function(t){var e=C(t);(r===void 0||rt.getTime()}function we(i,a){w(2,arguments);var r=C(i),t=C(a);return r.getTime()=t&&r<=e}function yr(i,a){var r=typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(!r){if(Array.isArray(i)||(r=kn(i))||a&&i&&typeof i.length=="number"){r&&(i=r);var t=0,e=function(){};return{s:e,n:function(){return t>=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(c){throw c},f:e}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n=!0,o=!1,s;return{s:function(){r=r.call(i)},n:function(){var c=r.next();return n=c.done,c},e:function(c){o=!0,s=c},f:function(){try{!n&&r.return!=null&&r.return()}finally{if(o)throw s}}}}function uo(i,a){if(i==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(i[r]=a[r]);return i}function co(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Y(i){var a=co();return function(){var t=lr(i),e;if(a){var n=lr(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Cn(this,e)}}var lo=10,tn=function(){function i(){x(this,i),D(this,"priority",void 0),D(this,"subPriority",0)}return E(i,[{key:"validate",value:function(r,t){return!0}}]),i}(),po=function(i){N(r,i);var a=Y(r);function r(t,e,n,o,s){var u;return x(this,r),u=a.call(this),u.value=t,u.validateValue=e,u.setValue=n,u.priority=o,s&&(u.subPriority=s),u}return E(r,[{key:"validate",value:function(e,n){return this.validateValue(e,this.value,n)}},{key:"set",value:function(e,n,o){return this.setValue(e,n,this.value,o)}}]),r}(tn),fo=function(i){N(r,i);var a=Y(r);function r(){var t;x(this,r);for(var e=arguments.length,n=new Array(e),o=0;o0,t=r?a:1-a,e;if(t<=50)e=i||100;else{var n=t+50,o=Math.floor(n/100)*100,s=i>=n%100;e=i+o-(s?100:0)}return r?e:1-e}function an(i){return i%400===0||i%4===0&&i%100!==0}var vo=function(i){N(r,i);var a=Y(r);function r(){var t;x(this,r);for(var e=arguments.length,n=new Array(e),o=0;o0}},{key:"set",value:function(e,n,o){var s=e.getUTCFullYear();if(o.isTwoDigitYear){var u=nn(o.year,s);return e.setUTCFullYear(u,0,1),e.setUTCHours(0,0,0,0),e}var c=!("era"in n)||n.era===1?o.year:1-o.year;return e.setUTCFullYear(c,0,1),e.setUTCHours(0,0,0,0),e}}]),r}(I),go=function(i){N(r,i);var a=Y(r);function r(){var t;x(this,r);for(var e=arguments.length,n=new Array(e),o=0;o0}},{key:"set",value:function(e,n,o,s){var u=Vt(e,s);if(o.isTwoDigitYear){var c=nn(o.year,u);return e.setUTCFullYear(c,0,s.firstWeekContainsDate),e.setUTCHours(0,0,0,0),Pe(e,s)}var l=!("era"in n)||n.era===1?o.year:1-o.year;return e.setUTCFullYear(l,0,s.firstWeekContainsDate),e.setUTCHours(0,0,0,0),Pe(e,s)}}]),r}(I),yo=function(i){N(r,i);var a=Y(r);function r(){var t;x(this,r);for(var e=arguments.length,n=new Array(e),o=0;o=1&&n<=4}},{key:"set",value:function(e,n,o){return e.setUTCMonth((o-1)*3,1),e.setUTCHours(0,0,0,0),e}}]),r}(I),bo=function(i){N(r,i);var a=Y(r);function r(){var t;x(this,r);for(var e=arguments.length,n=new Array(e),o=0;o=1&&n<=4}},{key:"set",value:function(e,n,o){return e.setUTCMonth((o-1)*3,1),e.setUTCHours(0,0,0,0),e}}]),r}(I),ko=function(i){N(r,i);var a=Y(r);function r(){var t;x(this,r);for(var e=arguments.length,n=new Array(e),o=0;o=0&&n<=11}},{key:"set",value:function(e,n,o){return e.setUTCMonth(o,1),e.setUTCHours(0,0,0,0),e}}]),r}(I),Co=function(i){N(r,i);var a=Y(r);function r(){var t;x(this,r);for(var e=arguments.length,n=new Array(e),o=0;o=0&&n<=11}},{key:"set",value:function(e,n,o){return e.setUTCMonth(o,1),e.setUTCHours(0,0,0,0),e}}]),r}(I);function Mo(i,a,r){w(2,arguments);var t=C(i),e=T(a),n=jr(t,r)-e;return t.setUTCDate(t.getUTCDate()-n*7),t}var To=function(i){N(r,i);var a=Y(r);function r(){var t;x(this,r);for(var e=arguments.length,n=new Array(e),o=0;o=1&&n<=53}},{key:"set",value:function(e,n,o,s){return Pe(Mo(e,o,s),s)}}]),r}(I);function So(i,a){w(2,arguments);var r=C(i),t=T(a),e=$r(r)-t;return r.setUTCDate(r.getUTCDate()-e*7),r}var _o=function(i){N(r,i);var a=Y(r);function r(){var t;x(this,r);for(var e=arguments.length,n=new Array(e),o=0;o=1&&n<=53}},{key:"set",value:function(e,n,o){return Ie(So(e,o))}}]),r}(I),Po=[31,28,31,30,31,30,31,31,30,31,30,31],Oo=[31,29,31,30,31,30,31,31,30,31,30,31],xo=function(i){N(r,i);var a=Y(r);function r(){var t;x(this,r);for(var e=arguments.length,n=new Array(e),o=0;o=1&&n<=Oo[u]:n>=1&&n<=Po[u]}},{key:"set",value:function(e,n,o){return e.setUTCDate(o),e.setUTCHours(0,0,0,0),e}}]),r}(I),Eo=function(i){N(r,i);var a=Y(r);function r(){var t;x(this,r);for(var e=arguments.length,n=new Array(e),o=0;o=1&&n<=366:n>=1&&n<=365}},{key:"set",value:function(e,n,o){return e.setUTCMonth(0,o),e.setUTCHours(0,0,0,0),e}}]),r}(I);function Jt(i,a,r){var t,e,n,o,s,u,c,l;w(2,arguments);var f=Oe(),m=T((t=(e=(n=(o=r==null?void 0:r.weekStartsOn)!==null&&o!==void 0?o:r==null||(s=r.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:f.weekStartsOn)!==null&&e!==void 0?e:(c=f.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&t!==void 0?t:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=C(i),v=T(a),y=g.getUTCDay(),b=v%7,O=(b+7)%7,S=(O=0&&n<=6}},{key:"set",value:function(e,n,o,s){return e=Jt(e,o,s),e.setUTCHours(0,0,0,0),e}}]),r}(I),Yo=function(i){N(r,i);var a=Y(r);function r(){var t;x(this,r);for(var e=arguments.length,n=new Array(e),o=0;o=0&&n<=6}},{key:"set",value:function(e,n,o,s){return e=Jt(e,o,s),e.setUTCHours(0,0,0,0),e}}]),r}(I),Io=function(i){N(r,i);var a=Y(r);function r(){var t;x(this,r);for(var e=arguments.length,n=new Array(e),o=0;o=0&&n<=6}},{key:"set",value:function(e,n,o,s){return e=Jt(e,o,s),e.setUTCHours(0,0,0,0),e}}]),r}(I);function Ro(i,a){w(2,arguments);var r=T(a);r%7===0&&(r=r-7);var t=1,e=C(i),n=e.getUTCDay(),o=r%7,s=(o+7)%7,u=(s=1&&n<=7}},{key:"set",value:function(e,n,o){return e=Ro(e,o),e.setUTCHours(0,0,0,0),e}}]),r}(I),Fo=function(i){N(r,i);var a=Y(r);function r(){var t;x(this,r);for(var e=arguments.length,n=new Array(e),o=0;o=1&&n<=12}},{key:"set",value:function(e,n,o){var s=e.getUTCHours()>=12;return s&&o<12?e.setUTCHours(o+12,0,0,0):!s&&o===12?e.setUTCHours(0,0,0,0):e.setUTCHours(o,0,0,0),e}}]),r}(I),Ho=function(i){N(r,i);var a=Y(r);function r(){var t;x(this,r);for(var e=arguments.length,n=new Array(e),o=0;o=0&&n<=23}},{key:"set",value:function(e,n,o){return e.setUTCHours(o,0,0,0),e}}]),r}(I),Qo=function(i){N(r,i);var a=Y(r);function r(){var t;x(this,r);for(var e=arguments.length,n=new Array(e),o=0;o=0&&n<=11}},{key:"set",value:function(e,n,o){var s=e.getUTCHours()>=12;return s&&o<12?e.setUTCHours(o+12,0,0,0):e.setUTCHours(o,0,0,0),e}}]),r}(I),Bo=function(i){N(r,i);var a=Y(r);function r(){var t;x(this,r);for(var e=arguments.length,n=new Array(e),o=0;o=1&&n<=24}},{key:"set",value:function(e,n,o){var s=o<=24?o%24:o;return e.setUTCHours(s,0,0,0),e}}]),r}(I),qo=function(i){N(r,i);var a=Y(r);function r(){var t;x(this,r);for(var e=arguments.length,n=new Array(e),o=0;o=0&&n<=59}},{key:"set",value:function(e,n,o){return e.setUTCMinutes(o,0,0),e}}]),r}(I),$o=function(i){N(r,i);var a=Y(r);function r(){var t;x(this,r);for(var e=arguments.length,n=new Array(e),o=0;o=0&&n<=59}},{key:"set",value:function(e,n,o){return e.setUTCSeconds(o,0),e}}]),r}(I),jo=function(i){N(r,i);var a=Y(r);function r(){var t;x(this,r);for(var e=arguments.length,n=new Array(e),o=0;o=1&&ve<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Ue=T((v=(y=(b=(O=t==null?void 0:t.weekStartsOn)!==null&&O!==void 0?O:t==null||(S=t.locale)===null||S===void 0||(M=S.options)===null||M===void 0?void 0:M.weekStartsOn)!==null&&b!==void 0?b:oe.weekStartsOn)!==null&&y!==void 0?y:(_=oe.locale)===null||_===void 0||(U=_.options)===null||U===void 0?void 0:U.weekStartsOn)!==null&&v!==void 0?v:0);if(!(Ue>=0&&Ue<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(B==="")return W===""?C(r):new Date(NaN);var We={firstWeekContainsDate:ve,weekStartsOn:Ue,locale:me},He=[new fo],kt=B.match(Jo).map(function(K){var F=K[0];if(F in At){var ae=At[F];return ae(K,me.formatLong)}return K}).join("").match(Zo),Z=[],ne=yr(kt),Me;try{var wn=function(){var F=Me.value;!(t!=null&&t.useAdditionalWeekYearTokens)&&Xr(F)&&ct(F,B,i),!(t!=null&&t.useAdditionalDayOfYearTokens)&&Vr(F)&&ct(F,B,i);var ae=F[0],tt=zo[ae];if(tt){var sr=tt.incompatibleTokens;if(Array.isArray(sr)){var ur=Z.find(function(cr){return sr.includes(cr.token)||cr.token===ae});if(ur)throw new RangeError("The format string mustn't contain `".concat(ur.fullToken,"` and `").concat(F,"` at the same time"))}else if(tt.incompatibleTokens==="*"&&Z.length>0)throw new RangeError("The format string mustn't contain `".concat(F,"` and any other token at the same time"));Z.push({token:ae,fullToken:F});var Mt=tt.run(W,F,me.match,We);if(!Mt)return{v:new Date(NaN)};He.push(Mt.setter),W=Mt.rest}else{if(ae.match(ni))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ae+"`");if(F==="''"?F="'":ae==="'"&&(F=ai(F)),W.indexOf(F)===0)W=W.slice(F.length);else return{v:new Date(NaN)}}};for(ne.s();!(Me=ne.n()).done;){var nr=wn();if(Fe(nr)==="object")return nr.v}}catch(K){ne.e(K)}finally{ne.f()}if(W.length>0&&ri.test(W))return new Date(NaN);var Dn=He.map(function(K){return K.priority}).sort(function(K,F){return F-K}).filter(function(K,F,ae){return ae.indexOf(K)===F}).map(function(K){return He.filter(function(F){return F.priority===K}).sort(function(F,ae){return ae.subPriority-F.subPriority})}).map(function(K){return K[0]}),Ct=C(r);if(isNaN(Ct.getTime()))return new Date(NaN);var Qe=Br(Ct,ut(Ct)),ar={},Je=yr(Dn),or;try{for(Je.s();!(or=Je.n()).done;){var ir=or.value;if(!ir.validate(Qe,We))return new Date(NaN);var et=ir.set(Qe,ar,We);Array.isArray(et)?(Qe=et[0],uo(ar,et[1])):Qe=et}}catch(K){Je.e(K)}finally{Je.f()}return Qe}function ai(i){return i.match(ei)[1].replace(ti,"'")}function oi(i,a){var r;w(1,arguments);var t=T((r=a==null?void 0:a.additionalDigits)!==null&&r!==void 0?r:2);if(t!==2&&t!==1&&t!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof i=="string"||Object.prototype.toString.call(i)==="[object String]"))return new Date(NaN);var e=ci(i),n;if(e.date){var o=li(e.date,t);n=pi(o.restDateString,o.year)}if(!n||isNaN(n.getTime()))return new Date(NaN);var s=n.getTime(),u=0,c;if(e.time&&(u=di(e.time),isNaN(u)))return new Date(NaN);if(e.timezone){if(c=fi(e.timezone),isNaN(c))return new Date(NaN)}else{var l=new Date(s+u),f=new Date(0);return f.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),f.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),f}return new Date(s+u+c)}var rt={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},ii=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,si=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ui=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ci(i){var a={},r=i.split(rt.dateTimeDelimiter),t;if(r.length>2)return a;if(/:/.test(r[0])?t=r[0]:(a.date=r[0],t=r[1],rt.timeZoneDelimiter.test(a.date)&&(a.date=i.split(rt.timeZoneDelimiter)[0],t=i.substr(a.date.length,i.length))),t){var e=rt.timezone.exec(t);e?(a.time=t.replace(e[1],""),a.timezone=e[1]):a.time=t}return a}function li(i,a){var r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+a)+"})|(\\d{2}|[+-]\\d{"+(2+a)+"})$)"),t=i.match(r);if(!t)return{year:NaN,restDateString:""};var e=t[1]?parseInt(t[1]):null,n=t[2]?parseInt(t[2]):null;return{year:n===null?e:n*100,restDateString:i.slice((t[1]||t[2]).length)}}function pi(i,a){if(a===null)return new Date(NaN);var r=i.match(ii);if(!r)return new Date(NaN);var t=!!r[4],e=$e(r[1]),n=$e(r[2])-1,o=$e(r[3]),s=$e(r[4]),u=$e(r[5])-1;if(t)return yi(a,s,u)?hi(a,s,u):new Date(NaN);var c=new Date(0);return!vi(a,n,o)||!gi(a,e)?new Date(NaN):(c.setUTCFullYear(a,n,Math.max(e,o)),c)}function $e(i){return i?parseInt(i):1}function di(i){var a=i.match(si);if(!a)return NaN;var r=Pt(a[1]),t=Pt(a[2]),e=Pt(a[3]);return wi(r,t,e)?r*zt+t*Gt+e*1e3:NaN}function Pt(i){return i&&parseFloat(i.replace(",","."))||0}function fi(i){if(i==="Z")return 0;var a=i.match(ui);if(!a)return 0;var r=a[1]==="+"?-1:1,t=parseInt(a[2]),e=a[3]&&parseInt(a[3])||0;return Di(t,e)?r*(t*zt+e*Gt):NaN}function hi(i,a,r){var t=new Date(0);t.setUTCFullYear(i,0,4);var e=t.getUTCDay()||7,n=(a-1)*7+r+1-e;return t.setUTCDate(t.getUTCDate()+n),t}var mi=[31,null,31,30,31,30,31,31,30,31,30,31];function on(i){return i%400===0||i%4===0&&i%100!==0}function vi(i,a,r){return a>=0&&a<=11&&r>=1&&r<=(mi[a]||(on(i)?29:28))}function gi(i,a){return a>=1&&a<=(on(i)?366:365)}function yi(i,a,r){return a>=1&&a<=53&&r>=0&&r<=6}function wi(i,a,r){return i===24?a===0&&r===0:r>=0&&r<60&&a>=0&&a<60&&i>=0&&i<25}function Di(i,a){return a>=0&&a<=59}function bi(i,a){i.prototype=Object.create(a.prototype),i.prototype.constructor=i,Bt(i,a)}function Bt(i,a){return Bt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Bt(i,a)}function ki(i,a){if(i==null)return{};var r={},t=Object.keys(i),e,n;for(n=0;n=0)&&(r[e]=i[e]);return r}function wr(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Ci(i,a,r){return i===a?!0:i.correspondingElement?i.correspondingElement.classList.contains(r):i.classList.contains(r)}function Mi(i,a,r){if(i===a)return!0;for(;i.parentNode||i.host;){if(i.parentNode&&Ci(i,a,r))return!0;i=i.parentNode||i.host}return i}function Ti(i){return document.documentElement.clientWidth<=i.clientX||document.documentElement.clientHeight<=i.clientY}var Si=function(){if(!(typeof window>"u"||typeof window.addEventListener!="function")){var a=!1,r=Object.defineProperty({},"passive",{get:function(){a=!0}}),t=function(){};return window.addEventListener("testPassiveEventSupport",t,r),window.removeEventListener("testPassiveEventSupport",t,r),a}};function _i(i){return i===void 0&&(i=0),function(){return++i}}var Pi=_i(),qt,nt={},Ot={},Oi=["touchstart","touchmove"],xi="ignore-react-onclickoutside";function Dr(i,a){var r={},t=Oi.indexOf(a)!==-1;return t&&qt&&(r.passive=!i.props.preventDefault),r}function wt(i,a){var r,t,e=i.displayName||i.name||"Component";return t=r=function(n){bi(o,n);function o(u){var c;return c=n.call(this,u)||this,c.__outsideClickHandler=function(l){if(typeof c.__clickOutsideHandlerProp=="function"){c.__clickOutsideHandlerProp(l);return}var f=c.getInstance();if(typeof f.props.handleClickOutside=="function"){f.props.handleClickOutside(l);return}if(typeof f.handleClickOutside=="function"){f.handleClickOutside(l);return}throw new Error("WrappedComponent: "+e+" lacks a handleClickOutside(event) function for processing outside click events.")},c.__getComponentNode=function(){var l=c.getInstance();return a&&typeof a.setClickOutsideRef=="function"?a.setClickOutsideRef()(l):typeof l.setClickOutsideRef=="function"?l.setClickOutsideRef():Mn.findDOMNode(l)},c.enableOnClickOutside=function(){if(!(typeof document>"u"||Ot[c._uid])){typeof qt>"u"&&(qt=Si()),Ot[c._uid]=!0;var l=c.props.eventTypes;l.forEach||(l=[l]),nt[c._uid]=function(f){if(c.componentNode!==null&&(c.props.preventDefault&&f.preventDefault(),c.props.stopPropagation&&f.stopPropagation(),!(c.props.excludeScrollbar&&Ti(f)))){var m=f.composed&&f.composedPath&&f.composedPath().shift()||f.target;Mi(m,c.componentNode,c.props.outsideClickIgnoreClass)===document&&c.__outsideClickHandler(f)}},l.forEach(function(f){document.addEventListener(f,nt[c._uid],Dr(wr(c),f))})}},c.disableOnClickOutside=function(){delete Ot[c._uid];var l=nt[c._uid];if(l&&typeof document<"u"){var f=c.props.eventTypes;f.forEach||(f=[f]),f.forEach(function(m){return document.removeEventListener(m,l,Dr(wr(c),m))}),delete nt[c._uid]}},c.getRef=function(l){return c.instanceRef=l},c._uid=Pi(),c}var s=o.prototype;return s.getInstance=function(){if(i.prototype&&!i.prototype.isReactComponent)return this;var c=this.instanceRef;return c.getInstance?c.getInstance():c},s.componentDidMount=function(){if(!(typeof document>"u"||!document.createElement)){var c=this.getInstance();if(a&&typeof a.handleClickOutside=="function"&&(this.__clickOutsideHandlerProp=a.handleClickOutside(c),typeof this.__clickOutsideHandlerProp!="function"))throw new Error("WrappedComponent: "+e+" lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=this.__getComponentNode(),!this.props.disableOnClickOutside&&this.enableOnClickOutside()}},s.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},s.componentWillUnmount=function(){this.disableOnClickOutside()},s.render=function(){var c=this.props;c.excludeScrollbar;var l=ki(c,["excludeScrollbar"]);return i.prototype&&i.prototype.isReactComponent?l.ref=this.getRef:l.wrappedRef=this.getRef,l.disableOnClickOutside=this.disableOnClickOutside,l.enableOnClickOutside=this.enableOnClickOutside,q.createElement(i,l)},o}(q.Component),r.displayName="OnClickOutside("+e+")",r.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:a&&a.excludeScrollbar||!1,outsideClickIgnoreClass:xi,preventDefault:!1,stopPropagation:!1},r.getClass=function(){return i.getClass?i.getClass():i},t}function Ei(i,a){if(w(2,arguments),Fe(a)!=="object"||a===null)throw new RangeError("values parameter must be an object");var r=C(i);return isNaN(r.getTime())?new Date(NaN):(a.year!=null&&r.setFullYear(a.year),a.month!=null&&(r=ee(r,a.month)),a.date!=null&&r.setDate(T(a.date)),a.hours!=null&&r.setHours(T(a.hours)),a.minutes!=null&&r.setMinutes(T(a.minutes)),a.seconds!=null&&r.setSeconds(T(a.seconds)),a.milliseconds!=null&&r.setMilliseconds(T(a.milliseconds)),r)}function br(i,a){var r=Object.keys(i);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(i);a&&(t=t.filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable})),r.push.apply(r,t)}return r}function mt(i){for(var a=1;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var r,t=vt(i);if(a){var e=vt(this).constructor;r=Reflect.construct(t,arguments,e)}else r=t.apply(this,arguments);return function(n,o){if(o&&(typeof o=="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return d(n)}(this,r)}}function Ze(i){return function(a){if(Array.isArray(a))return xt(a)}(i)||function(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}(i)||function(a,r){if(a){if(typeof a=="string")return xt(a,r);var t=Object.prototype.toString.call(a).slice(8,-1);if(t==="Object"&&a.constructor&&(t=a.constructor.name),t==="Map"||t==="Set")return Array.from(a);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return xt(a,r)}}(i)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function xt(i,a){(a==null||a>i.length)&&(a=i.length);for(var r=0,t=new Array(a);r1&&arguments[1]!==void 0?arguments[1]:{},r=a.minDate,t=a.maxDate,e=a.excludeDates,n=a.excludeDateIntervals,o=a.includeDates,s=a.includeDateIntervals,u=a.filterDate;return bt(i,{minDate:r,maxDate:t})||e&&e.some(function(c){return te(i,c)})||n&&n.some(function(c){var l=c.start,f=c.end;return Ge(i,{start:l,end:f})})||o&&!o.some(function(c){return te(i,c)})||s&&!s.some(function(c){var l=c.start,f=c.end;return Ge(i,{start:l,end:f})})||u&&!u(L(i))||!1}function rr(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=a.excludeDates,t=a.excludeDateIntervals;return t&&t.length>0?t.some(function(e){var n=e.start,o=e.end;return Ge(i,{start:n,end:o})}):r&&r.some(function(e){return te(i,e)})||!1}function cn(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=a.minDate,t=a.maxDate,e=a.excludeDates,n=a.includeDates,o=a.filterDate;return bt(i,{minDate:Jr(r),maxDate:to(t)})||e&&e.some(function(s){return ie(i,s)})||n&&!n.some(function(s){return ie(i,s)})||o&&!o(L(i))||!1}function Et(i,a,r,t){var e=P(i),n=J(i),o=P(a),s=J(a),u=P(t);return e===o&&e===u?n<=r&&r<=s:e=r||ue:void 0}function Ii(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=a.minDate,t=a.maxDate,e=a.excludeDates,n=a.includeDates,o=a.filterDate;return bt(i,{minDate:r,maxDate:t})||e&&e.some(function(s){return gt(i,s)})||n&&!n.some(function(s){return gt(i,s)})||o&&!o(L(i))||!1}function Nt(i,a,r){if(!Ve(a)||!Ve(r))return!1;var t=P(a),e=P(r);return t<=i&&e>=i}function ln(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=a.minDate,t=a.maxDate,e=a.excludeDates,n=a.includeDates,o=a.filterDate,s=new Date(i,0,1);return bt(s,{minDate:en(r),maxDate:ro(t)})||e&&e.some(function(u){return De(s,u)})||n&&!n.some(function(u){return De(s,u)})||o&&!o(L(s))||!1}function Yt(i,a,r,t){var e=P(i),n=Ne(i),o=P(a),s=Ne(a),u=P(t);return e===o&&e===u?n<=r&&r<=s:e=r||ue:void 0}function bt(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=a.minDate,t=a.maxDate;return r&&pt(i,r)<0||t&&pt(i,t)>0}function Pr(i,a){return a.some(function(r){return ue(r)===ue(i)&&se(r)===se(i)})}function Or(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=a.excludeTimes,t=a.includeTimes,e=a.filterTime;return r&&Pr(i,r)||t&&!Pr(i,t)||e&&!e(i)||!1}function xr(i,a){var r=a.minTime,t=a.maxTime;if(!r||!t)throw new Error("Both minTime and maxTime props required");var e,n=L(),o=it(ot(n,se(i)),ue(i)),s=it(ot(n,se(r)),ue(r)),u=it(ot(n,se(t)),ue(t));try{e=!Ge(o,{start:s,end:u})}catch{e=!1}return e}function Er(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=a.minDate,t=a.includeDates,e=Le(i,1);return r&&dt(r,e)>0||t&&t.every(function(n){return dt(n,e)>0})||!1}function Nr(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=a.maxDate,t=a.includeDates,e=ce(i,1);return r&&dt(e,r)>0||t&&t.every(function(n){return dt(e,n)>0})||!1}function Yr(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=a.minDate,t=a.includeDates,e=Xe(i,1);return r&&ft(r,e)>0||t&&t.every(function(n){return ft(n,e)>0})||!1}function Ir(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=a.maxDate,t=a.includeDates,e=Re(i,1);return r&&ft(e,r)>0||t&&t.every(function(n){return ft(e,n)>0})||!1}function pn(i){var a=i.minDate,r=i.includeDates;if(r&&a){var t=r.filter(function(e){return pt(e,a)>=0});return vr(t)}return r?vr(r):a}function dn(i){var a=i.maxDate,r=i.includeDates;if(r&&a){var t=r.filter(function(e){return pt(e,a)<=0});return gr(t)}return r?gr(r):a}function Rr(){for(var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"react-datepicker__day--highlighted",r=new Map,t=0,e=i.length;t0&&arguments[0]!==void 0?arguments[0]:[],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"react-datepicker__day--holidays",r=new Map;return i.forEach(function(t){var e=t.date,n=t.holidayName;if(yt(e)){var o=A(e,"MM.dd.yyyy"),s=r.get(o)||{};if(!("className"in s)||s.className!==a||(u=s.holidayNames,c=[n],u.length!==c.length||!u.every(function(f,m){return f===c[m]}))){var u,c;s.className=a;var l=s.holidayNames;s.holidayNames=l?[].concat(Ze(l),[n]):[n],r.set(o,s)}}}),r}function Li(i,a,r,t,e){for(var n=e.length,o=[],s=0;s1&&arguments[1]!==void 0?arguments[1]:Ke,r=Math.ceil(P(i)/a)*a;return{startPeriod:r-(a-1),endPeriod:r}}function Fr(i){var a=i.getSeconds(),r=i.getMilliseconds();return C(i.getTime()-1e3*a-r)}function Fi(i,a,r,t){for(var e=[],n=0;n<2*a+1;n++){var o=i+a-n,s=!0;r&&(s=P(r)<=o),t&&s&&(s=P(t)>=o),s&&e.push(o)}return e}var Ai=wt(function(i){G(r,h.Component);var a=z(r);function r(t){var e;V(this,r),p(d(e=a.call(this,t)),"renderOptions",function(){var u=e.props.year,c=e.state.yearsList.map(function(m){return h.createElement("div",{className:u===m?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:m,onClick:e.onChange.bind(d(e),m),"aria-selected":u===m?"true":void 0},u===m?h.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",m)}),l=e.props.minDate?P(e.props.minDate):null,f=e.props.maxDate?P(e.props.maxDate):null;return f&&e.state.yearsList.find(function(m){return m===f})||c.unshift(h.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:e.incrementYears},h.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),l&&e.state.yearsList.find(function(m){return m===l})||c.push(h.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:e.decrementYears},h.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),c}),p(d(e),"onChange",function(u){e.props.onChange(u)}),p(d(e),"handleClickOutside",function(){e.props.onCancel()}),p(d(e),"shiftYears",function(u){var c=e.state.yearsList.map(function(l){return l+u});e.setState({yearsList:c})}),p(d(e),"incrementYears",function(){return e.shiftYears(1)}),p(d(e),"decrementYears",function(){return e.shiftYears(-1)});var n=t.yearDropdownItemNumber,o=t.scrollableYearDropdown,s=n||(o?10:5);return e.state={yearsList:Fi(e.props.year,s,e.props.minDate,e.props.maxDate)},e.dropdownRef=q.createRef(),e}return X(r,[{key:"componentDidMount",value:function(){var t=this.dropdownRef.current;if(t){var e=t.children?Array.from(t.children):null,n=e?e.find(function(o){return o.ariaSelected}):null;t.scrollTop=n?n.offsetTop+(n.clientHeight-t.clientHeight)/2:(t.scrollHeight-t.clientHeight)/2}}},{key:"render",value:function(){var t=re({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return h.createElement("div",{className:t,ref:this.dropdownRef},this.renderOptions())}}]),r}()),Ui=function(i){G(r,h.Component);var a=z(r);function r(){var t;V(this,r);for(var e=arguments.length,n=new Array(e),o=0;o0?l.get(f).holidayNames.join(", "):""}),p(d(t),"getTabIndex",function(s,u){var c=s||t.props.selected,l=u||t.props.preSelection;return t.isKeyboardSelected()||t.isSameDay(c)&&te(l,c)?0:-1}),p(d(t),"handleFocusDay",function(){var s,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=!1;t.getTabIndex()===0&&!u.isInputFocused&&t.isSameDay(t.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||(c=!0),t.props.inline&&!t.props.shouldFocusDayInline&&(c=!1),t.props.containerRef&&t.props.containerRef.current&&t.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains("react-datepicker__day")&&(c=!0),t.props.monthShowsDuplicateDaysEnd&&t.isAfterMonth()&&(c=!1),t.props.monthShowsDuplicateDaysStart&&t.isBeforeMonth()&&(c=!1)),c&&((s=t.dayEl.current)===null||s===void 0||s.focus({preventScroll:!0}))}),p(d(t),"renderDayContents",function(){return t.props.monthShowsDuplicateDaysEnd&&t.isAfterMonth()||t.props.monthShowsDuplicateDaysStart&&t.isBeforeMonth()?null:t.props.renderDayContents?t.props.renderDayContents(mr(t.props.day),t.props.day):mr(t.props.day)}),p(d(t),"render",function(){return h.createElement("div",{ref:t.dayEl,className:t.getClassNames(t.props.day),onKeyDown:t.handleOnKeyDown,onClick:t.handleClick,onMouseEnter:t.handleMouseEnter,tabIndex:t.getTabIndex(),"aria-label":t.getAriaLabel(),role:"option",title:t.getTitle(),"aria-disabled":t.isDisabled(),"aria-current":t.isCurrentDay()?"date":void 0,"aria-selected":t.isSelected()||t.isInRange()},t.renderDayContents(),t.getTitle()!==""&&h.createElement("span",{className:"holiday-overlay"},t.getTitle()))}),t}return X(r,[{key:"componentDidMount",value:function(){this.handleFocusDay()}},{key:"componentDidUpdate",value:function(t){this.handleFocusDay(t)}}]),r}(),ji=function(i){G(r,h.Component);var a=z(r);function r(){var t;V(this,r);for(var e=arguments.length,n=new Array(e),o=0;o=6,g=!u&&!t.isWeekInMonth(f);if(m||g){if(!t.props.peekNextMonth)break;l=!0}}return s}),p(d(t),"onMonthClick",function(s,u){t.handleDayClick(be(ee(t.props.day,u)),s)}),p(d(t),"onMonthMouseEnter",function(s){t.handleDayMouseEnter(be(ee(t.props.day,s)))}),p(d(t),"handleMonthNavigation",function(s,u){t.isDisabled(u)||t.isExcluded(u)||(t.props.setPreSelection(u),t.MONTH_REFS[s].current&&t.MONTH_REFS[s].current.focus())}),p(d(t),"onMonthKeyDown",function(s,u){var c=t.props,l=c.selected,f=c.preSelection,m=c.disabledKeyboardNavigation,g=c.showTwoColumnMonthYearPicker,v=c.showFourColumnMonthYearPicker,y=c.setPreSelection,b=s.key;if(b!=="Tab"&&s.preventDefault(),!m){var O=Ar(v,g),S=It[O].verticalNavigationOffset,M=It[O].grid;switch(b){case"Enter":t.onMonthClick(s,u),y(l);break;case"ArrowRight":t.handleMonthNavigation(u===11?0:u+1,ce(f,1));break;case"ArrowLeft":t.handleMonthNavigation(u===0?11:u-1,Le(f,1));break;case"ArrowUp":t.handleMonthNavigation(M[0].includes(u)?u+12-S:u-S,Le(f,S));break;case"ArrowDown":t.handleMonthNavigation(M[M.length-1].includes(u)?u-12+S:u+S,ce(f,S))}}}),p(d(t),"onQuarterClick",function(s,u){t.handleDayClick(Sr(Ee(t.props.day,u)),s)}),p(d(t),"onQuarterMouseEnter",function(s){t.handleDayMouseEnter(Sr(Ee(t.props.day,s)))}),p(d(t),"handleQuarterNavigation",function(s,u){t.isDisabled(u)||t.isExcluded(u)||(t.props.setPreSelection(u),t.QUARTER_REFS[s-1].current&&t.QUARTER_REFS[s-1].current.focus())}),p(d(t),"onQuarterKeyDown",function(s,u){var c=s.key;if(!t.props.disabledKeyboardNavigation)switch(c){case"Enter":t.onQuarterClick(s,u),t.props.setPreSelection(t.props.selected);break;case"ArrowRight":t.handleQuarterNavigation(u===4?1:u+1,zr(t.props.preSelection,1));break;case"ArrowLeft":t.handleQuarterNavigation(u===1?4:u-1,ja(t.props.preSelection,1))}}),p(d(t),"getMonthClassNames",function(s){var u=t.props,c=u.day,l=u.startDate,f=u.endDate,m=u.selected,g=u.minDate,v=u.maxDate,y=u.preSelection,b=u.monthClassName,O=u.excludeDates,S=u.includeDates,M=b?b(ee(c,s)):void 0,_=ee(c,s);return re("react-datepicker__month-text","react-datepicker__month-".concat(s),M,{"react-datepicker__month-text--disabled":(g||v||O||S)&&cn(_,t.props),"react-datepicker__month-text--selected":t.isSelectedMonth(c,s,m),"react-datepicker__month-text--keyboard-selected":!t.props.disabledKeyboardNavigation&&J(y)===s,"react-datepicker__month-text--in-selecting-range":t.isInSelectingRangeMonth(s),"react-datepicker__month-text--in-range":Et(l,f,s,c),"react-datepicker__month-text--range-start":t.isRangeStartMonth(s),"react-datepicker__month-text--range-end":t.isRangeEndMonth(s),"react-datepicker__month-text--selecting-range-start":t.isSelectingMonthRangeStart(s),"react-datepicker__month-text--selecting-range-end":t.isSelectingMonthRangeEnd(s),"react-datepicker__month-text--today":t.isCurrentMonth(c,s)})}),p(d(t),"getTabIndex",function(s){var u=J(t.props.preSelection);return t.props.disabledKeyboardNavigation||s!==u?"-1":"0"}),p(d(t),"getQuarterTabIndex",function(s){var u=Ne(t.props.preSelection);return t.props.disabledKeyboardNavigation||s!==u?"-1":"0"}),p(d(t),"getAriaLabel",function(s){var u=t.props,c=u.chooseDayAriaLabelPrefix,l=c===void 0?"Choose":c,f=u.disabledDayAriaLabelPrefix,m=f===void 0?"Not available":f,g=u.day,v=ee(g,s),y=t.isDisabled(v)||t.isExcluded(v)?m:l;return"".concat(y," ").concat(A(v,"MMMM yyyy"))}),p(d(t),"getQuarterClassNames",function(s){var u=t.props,c=u.day,l=u.startDate,f=u.endDate,m=u.selected,g=u.minDate,v=u.maxDate,y=u.preSelection;return re("react-datepicker__quarter-text","react-datepicker__quarter-".concat(s),{"react-datepicker__quarter-text--disabled":(g||v)&&Ii(Ee(c,s),t.props),"react-datepicker__quarter-text--selected":t.isSelectedQuarter(c,s,m),"react-datepicker__quarter-text--keyboard-selected":Ne(y)===s,"react-datepicker__quarter-text--in-selecting-range":t.isInSelectingRangeQuarter(s),"react-datepicker__quarter-text--in-range":Yt(l,f,s,c),"react-datepicker__quarter-text--range-start":t.isRangeStartQuarter(s),"react-datepicker__quarter-text--range-end":t.isRangeEndQuarter(s)})}),p(d(t),"getMonthContent",function(s){var u=t.props,c=u.showFullMonthYearPicker,l=u.renderMonthContent,f=u.locale,m=un(s,f),g=tr(s,f);return l?l(s,m,g):c?g:m}),p(d(t),"getQuarterContent",function(s){var u=t.props,c=u.renderQuarterContent,l=function(f,m){return A(Ee(L(),f),"QQQ",m)}(s,u.locale);return c?c(s,l):l}),p(d(t),"renderMonths",function(){var s=t.props,u=s.showTwoColumnMonthYearPicker,c=s.showFourColumnMonthYearPicker,l=s.day,f=s.selected;return It[Ar(c,u)].grid.map(function(m,g){return h.createElement("div",{className:"react-datepicker__month-wrapper",key:g},m.map(function(v,y){return h.createElement("div",{ref:t.MONTH_REFS[v],key:y,onClick:function(b){t.onMonthClick(b,v)},onKeyDown:function(b){t.onMonthKeyDown(b,v)},onMouseEnter:function(){return t.onMonthMouseEnter(v)},tabIndex:t.getTabIndex(v),className:t.getMonthClassNames(v),role:"option","aria-label":t.getAriaLabel(v),"aria-current":t.isCurrentMonth(l,v)?"date":void 0,"aria-selected":t.isSelectedMonth(l,v,f)},t.getMonthContent(v))}))})}),p(d(t),"renderQuarters",function(){var s=t.props,u=s.day,c=s.selected;return h.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map(function(l,f){return h.createElement("div",{key:f,ref:t.QUARTER_REFS[f],role:"option",onClick:function(m){t.onQuarterClick(m,l)},onKeyDown:function(m){t.onQuarterKeyDown(m,l)},onMouseEnter:function(){return t.onQuarterMouseEnter(l)},className:t.getQuarterClassNames(l),"aria-selected":t.isSelectedQuarter(u,l,c),tabIndex:t.getQuarterTabIndex(l),"aria-current":t.isCurrentQuarter(u,l)?"date":void 0},t.getQuarterContent(l))}))}),p(d(t),"getClassNames",function(){var s=t.props,u=s.selectingDate,c=s.selectsStart,l=s.selectsEnd,f=s.showMonthYearPicker,m=s.showQuarterYearPicker;return re("react-datepicker__month",{"react-datepicker__month--selecting-range":u&&(c||l)},{"react-datepicker__monthPicker":f},{"react-datepicker__quarterPicker":m})}),t}return X(r,[{key:"render",value:function(){var t=this.props,e=t.showMonthYearPicker,n=t.showQuarterYearPicker,o=t.day,s=t.ariaLabelPrefix,u=s===void 0?"month ":s;return h.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,"aria-label":"".concat(u," ").concat(A(o,"yyyy-MM")),role:"listbox"},e?this.renderMonths():n?this.renderQuarters():this.renderWeeks())}}]),r}(),vn=function(i){G(r,h.Component);var a=z(r);function r(){var t;V(this,r);for(var e=arguments.length,n=new Array(e),o=0;o0&&arguments[0]!==void 0?arguments[0]:{}).className||"").split(/\s+/);return Zi.some(function(s){return o.indexOf(s)>=0})})(n.target)&&e.props.onDropdownFocus()}),p(d(e),"getDateInView",function(){var n=e.props,o=n.preSelection,s=n.selected,u=n.openToDate,c=pn(e.props),l=dn(e.props),f=L(),m=u||s||o;return m||(c&&we(f,c)?c:l&&Ce(f,l)?l:f)}),p(d(e),"increaseMonth",function(){e.setState(function(n){var o=n.date;return{date:ce(o,1)}},function(){return e.handleMonthChange(e.state.date)})}),p(d(e),"decreaseMonth",function(){e.setState(function(n){var o=n.date;return{date:Le(o,1)}},function(){return e.handleMonthChange(e.state.date)})}),p(d(e),"handleDayClick",function(n,o,s){e.props.onSelect(n,o,s),e.props.setPreSelection&&e.props.setPreSelection(n)}),p(d(e),"handleDayMouseEnter",function(n){e.setState({selectingDate:n}),e.props.onDayMouseEnter&&e.props.onDayMouseEnter(n)}),p(d(e),"handleMonthMouseLeave",function(){e.setState({selectingDate:null}),e.props.onMonthMouseLeave&&e.props.onMonthMouseLeave()}),p(d(e),"handleYearMouseEnter",function(n,o){e.setState({selectingDate:he(L(),o)}),e.props.onYearMouseEnter&&e.props.onYearMouseEnter(n,o)}),p(d(e),"handleYearMouseLeave",function(n,o){e.props.onYearMouseLeave&&e.props.onYearMouseLeave(n,o)}),p(d(e),"handleYearChange",function(n){e.props.onYearChange&&(e.props.onYearChange(n),e.setState({isRenderAriaLiveMessage:!0})),e.props.adjustDateOnChange&&(e.props.onSelect&&e.props.onSelect(n),e.props.setOpen&&e.props.setOpen(!0)),e.props.setPreSelection&&e.props.setPreSelection(n)}),p(d(e),"handleMonthChange",function(n){e.handleCustomMonthChange(n),e.props.adjustDateOnChange&&(e.props.onSelect&&e.props.onSelect(n),e.props.setOpen&&e.props.setOpen(!0)),e.props.setPreSelection&&e.props.setPreSelection(n)}),p(d(e),"handleCustomMonthChange",function(n){e.props.onMonthChange&&(e.props.onMonthChange(n),e.setState({isRenderAriaLiveMessage:!0}))}),p(d(e),"handleMonthYearChange",function(n){e.handleYearChange(n),e.handleMonthChange(n)}),p(d(e),"changeYear",function(n){e.setState(function(o){var s=o.date;return{date:he(s,n)}},function(){return e.handleYearChange(e.state.date)})}),p(d(e),"changeMonth",function(n){e.setState(function(o){var s=o.date;return{date:ee(s,n)}},function(){return e.handleMonthChange(e.state.date)})}),p(d(e),"changeMonthYear",function(n){e.setState(function(o){var s=o.date;return{date:he(ee(s,J(n)),P(n))}},function(){return e.handleMonthYearChange(e.state.date)})}),p(d(e),"header",function(){var n=er(arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.state.date,e.props.locale,e.props.calendarStartDay),o=[];return e.props.showWeekNumbers&&o.push(h.createElement("div",{key:"W",className:"react-datepicker__day-name"},e.props.weekLabel||"#")),o.concat([0,1,2,3,4,5,6].map(function(s){var u=Ae(n,s),c=e.formatWeekday(u,e.props.locale),l=e.props.weekDayClassName?e.props.weekDayClassName(u):void 0;return h.createElement("div",{key:s,className:re("react-datepicker__day-name",l)},c)}))}),p(d(e),"formatWeekday",function(n,o){return e.props.formatWeekDay?function(s,u,c){return u(A(s,"EEEE",c))}(n,e.props.formatWeekDay,o):e.props.useWeekdaysShort?function(s,u){return A(s,"EEE",u)}(n,o):function(s,u){return A(s,"EEEEEE",u)}(n,o)}),p(d(e),"decreaseYear",function(){e.setState(function(n){var o=n.date;return{date:Xe(o,e.props.showYearPicker?e.props.yearItemNumber:1)}},function(){return e.handleYearChange(e.state.date)})}),p(d(e),"clearSelectingDate",function(){e.setState({selectingDate:null})}),p(d(e),"renderPreviousButton",function(){if(!e.props.renderCustomHeader){var n;switch(!0){case e.props.showMonthYearPicker:n=Yr(e.state.date,e.props);break;case e.props.showYearPicker:n=function(O){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},M=S.minDate,_=S.yearItemNumber,U=_===void 0?Ke:_,W=Ye(je(Xe(O,U)),U).endPeriod,B=M&&P(M);return B&&B>W||!1}(e.state.date,e.props);break;default:n=Er(e.state.date,e.props)}if((e.props.forceShowMonthNavigation||e.props.showDisabledMonthNavigation||!n)&&!e.props.showTimeSelectOnly){var o=["react-datepicker__navigation","react-datepicker__navigation--previous"],s=e.decreaseMonth;(e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker)&&(s=e.decreaseYear),n&&e.props.showDisabledMonthNavigation&&(o.push("react-datepicker__navigation--previous--disabled"),s=null);var u=e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker,c=e.props,l=c.previousMonthButtonLabel,f=c.previousYearButtonLabel,m=e.props,g=m.previousMonthAriaLabel,v=g===void 0?typeof l=="string"?l:"Previous Month":g,y=m.previousYearAriaLabel,b=y===void 0?typeof f=="string"?f:"Previous Year":y;return h.createElement("button",{type:"button",className:o.join(" "),onClick:s,onKeyDown:e.props.handleOnKeyDown,"aria-label":u?b:v},h.createElement("span",{className:["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"].join(" ")},u?e.props.previousYearButtonLabel:e.props.previousMonthButtonLabel))}}}),p(d(e),"increaseYear",function(){e.setState(function(n){var o=n.date;return{date:Re(o,e.props.showYearPicker?e.props.yearItemNumber:1)}},function(){return e.handleYearChange(e.state.date)})}),p(d(e),"renderNextButton",function(){if(!e.props.renderCustomHeader){var n;switch(!0){case e.props.showMonthYearPicker:n=Ir(e.state.date,e.props);break;case e.props.showYearPicker:n=function(O){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},M=S.maxDate,_=S.yearItemNumber,U=_===void 0?Ke:_,W=Ye(Re(O,U),U).startPeriod,B=M&&P(M);return B&&B0&&arguments[0]!==void 0?arguments[0]:e.state.date,o=["react-datepicker__current-month"];return e.props.showYearDropdown&&o.push("react-datepicker__current-month--hasYearDropdown"),e.props.showMonthDropdown&&o.push("react-datepicker__current-month--hasMonthDropdown"),e.props.showMonthYearDropdown&&o.push("react-datepicker__current-month--hasMonthYearDropdown"),h.createElement("div",{className:o.join(" ")},A(n,e.props.dateFormat,e.props.locale))}),p(d(e),"renderYearDropdown",function(){var n=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(e.props.showYearDropdown&&!n)return h.createElement(Ui,{adjustDateOnChange:e.props.adjustDateOnChange,date:e.state.date,onSelect:e.props.onSelect,setOpen:e.props.setOpen,dropdownMode:e.props.dropdownMode,onChange:e.changeYear,minDate:e.props.minDate,maxDate:e.props.maxDate,year:P(e.state.date),scrollableYearDropdown:e.props.scrollableYearDropdown,yearDropdownItemNumber:e.props.yearDropdownItemNumber})}),p(d(e),"renderMonthDropdown",function(){var n=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(e.props.showMonthDropdown&&!n)return h.createElement(Hi,{dropdownMode:e.props.dropdownMode,locale:e.props.locale,onChange:e.changeMonth,month:J(e.state.date),useShortMonthInDropdown:e.props.useShortMonthInDropdown})}),p(d(e),"renderMonthYearDropdown",function(){var n=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(e.props.showMonthYearDropdown&&!n)return h.createElement(qi,{dropdownMode:e.props.dropdownMode,locale:e.props.locale,dateFormat:e.props.dateFormat,onChange:e.changeMonthYear,minDate:e.props.minDate,maxDate:e.props.maxDate,date:e.state.date,scrollableMonthYearDropdown:e.props.scrollableMonthYearDropdown})}),p(d(e),"handleTodayButtonClick",function(n){e.props.onSelect(_r(),n),e.props.setPreSelection&&e.props.setPreSelection(_r())}),p(d(e),"renderTodayButton",function(){if(e.props.todayButton&&!e.props.showTimeSelectOnly)return h.createElement("div",{className:"react-datepicker__today-button",onClick:function(n){return e.handleTodayButtonClick(n)}},e.props.todayButton)}),p(d(e),"renderDefaultHeader",function(n){var o=n.monthDate,s=n.i;return h.createElement("div",{className:"react-datepicker__header ".concat(e.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},e.renderCurrentMonth(o),h.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(e.props.dropdownMode),onFocus:e.handleDropdownFocus},e.renderMonthDropdown(s!==0),e.renderMonthYearDropdown(s!==0),e.renderYearDropdown(s!==0)),h.createElement("div",{className:"react-datepicker__day-names"},e.header(o)))}),p(d(e),"renderCustomHeader",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=n.monthDate,s=n.i;if(e.props.showTimeSelect&&!e.state.monthContainer||e.props.showTimeSelectOnly)return null;var u=Er(e.state.date,e.props),c=Nr(e.state.date,e.props),l=Yr(e.state.date,e.props),f=Ir(e.state.date,e.props),m=!e.props.showMonthYearPicker&&!e.props.showQuarterYearPicker&&!e.props.showYearPicker;return h.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:e.props.onDropdownFocus},e.props.renderCustomHeader(mt(mt({},e.state),{},{customHeaderCount:s,monthDate:o,changeMonth:e.changeMonth,changeYear:e.changeYear,decreaseMonth:e.decreaseMonth,increaseMonth:e.increaseMonth,decreaseYear:e.decreaseYear,increaseYear:e.increaseYear,prevMonthButtonDisabled:u,nextMonthButtonDisabled:c,prevYearButtonDisabled:l,nextYearButtonDisabled:f})),m&&h.createElement("div",{className:"react-datepicker__day-names"},e.header(o)))}),p(d(e),"renderYearHeader",function(){var n=e.state.date,o=e.props,s=o.showYearPicker,u=Ye(n,o.yearItemNumber),c=u.startPeriod,l=u.endPeriod;return h.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(c," - ").concat(l):P(n))}),p(d(e),"renderHeader",function(n){switch(!0){case e.props.renderCustomHeader!==void 0:return e.renderCustomHeader(n);case(e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker):return e.renderYearHeader(n);default:return e.renderDefaultHeader(n)}}),p(d(e),"renderMonths",function(){var n;if(!e.props.showTimeSelectOnly&&!e.props.showYearPicker){for(var o=[],s=e.props.showPreviousMonths?e.props.monthsShown-1:0,u=Le(e.state.date,s),c=(n=e.props.monthSelectedIn)!==null&&n!==void 0?n:s,l=0;l0;o.push(h.createElement("div",{key:m,ref:function(y){e.monthContainer=y},className:"react-datepicker__month-container"},e.renderHeader({monthDate:f,i:l}),h.createElement(Vi,{chooseDayAriaLabelPrefix:e.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:e.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:e.props.weekAriaLabelPrefix,ariaLabelPrefix:e.props.monthAriaLabelPrefix,onChange:e.changeMonthYear,day:f,dayClassName:e.props.dayClassName,calendarStartDay:e.props.calendarStartDay,monthClassName:e.props.monthClassName,onDayClick:e.handleDayClick,handleOnKeyDown:e.props.handleOnDayKeyDown,onDayMouseEnter:e.handleDayMouseEnter,onMouseLeave:e.handleMonthMouseLeave,onWeekSelect:e.props.onWeekSelect,orderInDisplay:l,formatWeekNumber:e.props.formatWeekNumber,locale:e.props.locale,minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,highlightDates:e.props.highlightDates,holidays:e.props.holidays,selectingDate:e.state.selectingDate,includeDates:e.props.includeDates,includeDateIntervals:e.props.includeDateIntervals,inline:e.props.inline,shouldFocusDayInline:e.props.shouldFocusDayInline,fixedHeight:e.props.fixedHeight,filterDate:e.props.filterDate,preSelection:e.props.preSelection,setPreSelection:e.props.setPreSelection,selected:e.props.selected,selectsStart:e.props.selectsStart,selectsEnd:e.props.selectsEnd,selectsRange:e.props.selectsRange,selectsDisabledDaysInRange:e.props.selectsDisabledDaysInRange,showWeekNumbers:e.props.showWeekNumbers,startDate:e.props.startDate,endDate:e.props.endDate,peekNextMonth:e.props.peekNextMonth,setOpen:e.props.setOpen,shouldCloseOnSelect:e.props.shouldCloseOnSelect,renderDayContents:e.props.renderDayContents,renderMonthContent:e.props.renderMonthContent,renderQuarterContent:e.props.renderQuarterContent,renderYearContent:e.props.renderYearContent,disabledKeyboardNavigation:e.props.disabledKeyboardNavigation,showMonthYearPicker:e.props.showMonthYearPicker,showFullMonthYearPicker:e.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:e.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:e.props.showFourColumnMonthYearPicker,showYearPicker:e.props.showYearPicker,showQuarterYearPicker:e.props.showQuarterYearPicker,isInputFocused:e.props.isInputFocused,containerRef:e.containerRef,monthShowsDuplicateDaysEnd:g,monthShowsDuplicateDaysStart:v})))}return o}}),p(d(e),"renderYears",function(){if(!e.props.showTimeSelectOnly)return e.props.showYearPicker?h.createElement("div",{className:"react-datepicker__year--container"},e.renderHeader(),h.createElement(Xi,ze({onDayClick:e.handleDayClick,selectingDate:e.state.selectingDate,clearSelectingDate:e.clearSelectingDate,date:e.state.date},e.props,{onYearMouseEnter:e.handleYearMouseEnter,onYearMouseLeave:e.handleYearMouseLeave}))):void 0}),p(d(e),"renderTimeSection",function(){if(e.props.showTimeSelect&&(e.state.monthContainer||e.props.showTimeSelectOnly))return h.createElement(vn,{selected:e.props.selected,openToDate:e.props.openToDate,onChange:e.props.onTimeChange,timeClassName:e.props.timeClassName,format:e.props.timeFormat,includeTimes:e.props.includeTimes,intervals:e.props.timeIntervals,minTime:e.props.minTime,maxTime:e.props.maxTime,excludeTimes:e.props.excludeTimes,filterTime:e.props.filterTime,timeCaption:e.props.timeCaption,todayButton:e.props.todayButton,showMonthDropdown:e.props.showMonthDropdown,showMonthYearDropdown:e.props.showMonthYearDropdown,showYearDropdown:e.props.showYearDropdown,withPortal:e.props.withPortal,monthRef:e.state.monthContainer,injectTimes:e.props.injectTimes,locale:e.props.locale,handleOnKeyDown:e.props.handleOnKeyDown,showTimeSelectOnly:e.props.showTimeSelectOnly})}),p(d(e),"renderInputTimeSection",function(){var n=new Date(e.props.selected),o=ye(n)&&e.props.selected?"".concat(Lr(n.getHours()),":").concat(Lr(n.getMinutes())):"";if(e.props.showTimeInput)return h.createElement(Gi,{date:n,timeString:o,timeInputLabel:e.props.timeInputLabel,onChange:e.props.onTimeChange,customTimeInput:e.props.customTimeInput})}),p(d(e),"renderAriaLiveRegion",function(){var n,o=Ye(e.state.date,e.props.yearItemNumber),s=o.startPeriod,u=o.endPeriod;return n=e.props.showYearPicker?"".concat(s," - ").concat(u):e.props.showMonthYearPicker||e.props.showQuarterYearPicker?P(e.state.date):"".concat(tr(J(e.state.date),e.props.locale)," ").concat(P(e.state.date)),h.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},e.state.isRenderAriaLiveMessage&&n)}),p(d(e),"renderChildren",function(){if(e.props.children)return h.createElement("div",{className:"react-datepicker__children-container"},e.props.children)}),e.containerRef=h.createRef(),e.state={date:e.getDateInView(),selectingDate:null,monthContainer:null,isRenderAriaLiveMessage:!1},e}return X(r,[{key:"componentDidMount",value:function(){var t=this;this.props.showTimeSelect&&(this.assignMonthContainer=void t.setState({monthContainer:t.monthContainer}))}},{key:"componentDidUpdate",value:function(t){var e=this;if(!this.props.preSelection||te(this.props.preSelection,t.preSelection)&&this.props.monthSelectedIn===t.monthSelectedIn)this.props.openToDate&&!te(this.props.openToDate,t.openToDate)&&this.setState({date:this.props.openToDate});else{var n=!ie(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return n&&e.handleCustomMonthChange(e.state.date)})}}},{key:"render",value:function(){var t=this.props.container||zi;return h.createElement("div",{ref:this.containerRef},h.createElement(t,{className:re("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren()))}}],[{key:"defaultProps",get:function(){return{onDropdownFocus:function(){},monthsShown:1,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",customTimeInput:null,yearItemNumber:Ke}}}]),r}(),gn=function(i){G(r,h.Component);var a=z(r);function r(t){var e;return V(this,r),(e=a.call(this,t)).el=document.createElement("div"),e}return X(r,[{key:"componentDidMount",value:function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.portalRoot.removeChild(this.el)}},{key:"render",value:function(){return Tn.createPortal(this.props.children,this.el)}}]),r}(),es=function(i){return!i.disabled&&i.tabIndex!==-1},yn=function(i){G(r,h.Component);var a=z(r);function r(t){var e;return V(this,r),p(d(e=a.call(this,t)),"getTabChildren",function(){return Array.prototype.slice.call(e.tabLoopRef.current.querySelectorAll("[tabindex], a, button, input, select, textarea"),1,-1).filter(es)}),p(d(e),"handleFocusStart",function(){var n=e.getTabChildren();n&&n.length>1&&n[n.length-1].focus()}),p(d(e),"handleFocusEnd",function(){var n=e.getTabChildren();n&&n.length>1&&n[0].focus()}),e.tabLoopRef=h.createRef(),e}return X(r,[{key:"render",value:function(){return this.props.enableTabLoop?h.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},h.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:"0",onFocus:this.handleFocusStart}),this.props.children,h.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:"0",onFocus:this.handleFocusEnd})):this.props.children}}],[{key:"defaultProps",get:function(){return{enableTabLoop:!0}}}]),r}(),ts=function(i){G(r,h.Component);var a=z(r);function r(){return V(this,r),a.apply(this,arguments)}return X(r,[{key:"render",value:function(){var t,e=this.props,n=e.className,o=e.wrapperClassName,s=e.hidePopper,u=e.popperComponent,c=e.popperModifiers,l=e.popperPlacement,f=e.popperProps,m=e.targetComponent,g=e.enableTabLoop,v=e.popperOnKeyDown,y=e.portalId,b=e.portalHost;if(!s){var O=re("react-datepicker-popper",n);t=h.createElement(Yn,ze({modifiers:c,placement:l},f),function(M){var _=M.ref,U=M.style,W=M.placement,B=M.arrowProps;return h.createElement(yn,{enableTabLoop:g},h.createElement("div",{ref:_,style:U,className:O,"data-placement":W,onKeyDown:v},h.cloneElement(u,{arrowProps:B})))})}this.props.popperContainer&&(t=h.createElement(this.props.popperContainer,{},t)),y&&!s&&(t=h.createElement(gn,{portalId:y,portalHost:b},t));var S=re("react-datepicker-wrapper",o);return h.createElement(On,{className:"react-datepicker-manager"},h.createElement(Ln,null,function(M){var _=M.ref;return h.createElement("div",{ref:_,className:S},m)}),t)}}],[{key:"defaultProps",get:function(){return{hidePopper:!0,popperModifiers:[],popperProps:{},popperPlacement:"bottom-start"}}}]),r}(),Ur="react-datepicker-ignore-onclickoutside",rs=wt(Ji),Rt="Date input not valid.",ss=function(i){G(r,h.Component);var a=z(r);function r(t){var e;return V(this,r),p(d(e=a.call(this,t)),"getPreSelection",function(){return e.props.openToDate?e.props.openToDate:e.props.selectsEnd&&e.props.startDate?e.props.startDate:e.props.selectsStart&&e.props.endDate?e.props.endDate:L()}),p(d(e),"calcInitialState",function(){var n,o,s=(n=e.props.holidays)===null||n===void 0?void 0:n.reduce(function(m,g){var v=new Date(g.date);return Ve(v)?[].concat(Ze(m),[mt(mt({},g),{},{date:v})]):m},[]),u=e.getPreSelection(),c=pn(e.props),l=dn(e.props),f=c&&we(u,fe(c))?c:l&&Ce(u,Qt(l))?l:u;return{open:e.props.startOpen||!1,preventFocus:!1,preSelection:(o=e.props.selectsRange?e.props.startDate:e.props.selected)!==null&&o!==void 0?o:f,highlightDates:Rr(e.props.highlightDates),holidays:Ri(s),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1}}),p(d(e),"clearPreventFocusTimeout",function(){e.preventFocusTimeout&&clearTimeout(e.preventFocusTimeout)}),p(d(e),"setFocus",function(){e.input&&e.input.focus&&e.input.focus({preventScroll:!0})}),p(d(e),"setBlur",function(){e.input&&e.input.blur&&e.input.blur(),e.cancelFocusInput()}),p(d(e),"setOpen",function(n){var o=arguments.length>1&&arguments[1]!==void 0&&arguments[1];e.setState({open:n,preSelection:n&&e.state.open?e.state.preSelection:e.calcInitialState().preSelection,lastPreSelectChange:Lt},function(){n||e.setState(function(s){return{focused:!!o&&s.focused}},function(){!o&&e.setBlur(),e.setState({inputValue:null})})})}),p(d(e),"inputOk",function(){return yt(e.state.preSelection)}),p(d(e),"isCalendarOpen",function(){return e.props.open===void 0?e.state.open&&!e.props.disabled&&!e.props.readOnly:e.props.open}),p(d(e),"handleFocus",function(n){e.state.preventFocus||(e.props.onFocus(n),e.props.preventOpenOnFocus||e.props.readOnly||e.setOpen(!0)),e.setState({focused:!0})}),p(d(e),"cancelFocusInput",function(){clearTimeout(e.inputFocusTimeout),e.inputFocusTimeout=null}),p(d(e),"deferFocusInput",function(){e.cancelFocusInput(),e.inputFocusTimeout=setTimeout(function(){return e.setFocus()},1)}),p(d(e),"handleDropdownFocus",function(){e.cancelFocusInput()}),p(d(e),"handleBlur",function(n){(!e.state.open||e.props.withPortal||e.props.showTimeInput)&&e.props.onBlur(n),e.setState({focused:!1})}),p(d(e),"handleCalendarClickOutside",function(n){e.props.inline||e.setOpen(!1),e.props.onClickOutside(n),e.props.withPortal&&n.preventDefault()}),p(d(e),"handleChange",function(){for(var n=arguments.length,o=new Array(n),s=0;s0&&(v=_t(c,l.slice(0,c.length),new Date)),ye(v)||(v=new Date(c))),ye(v)&&b?v:null));e.props.showTimeSelectOnly&&e.props.selected&&!te(O,e.props.selected)&&(O=Ei(e.props.selected,O==null?{hours:ue(e.props.selected),minutes:se(e.props.selected),seconds:St(e.props.selected)}:{hours:ue(O),minutes:se(O),seconds:St(O)})),!O&&u.target.value||e.setSelected(O,u,!0)}}),p(d(e),"handleSelect",function(n,o,s){if(e.setState({preventFocus:!0},function(){return e.preventFocusTimeout=setTimeout(function(){return e.setState({preventFocus:!1})},50),e.preventFocusTimeout}),e.props.onChangeRaw&&e.props.onChangeRaw(o),e.setSelected(n,o,!1,s),e.props.showDateSelect&&e.setState({isRenderAriaLiveMessage:!0}),!e.props.shouldCloseOnSelect||e.props.showTimeSelect)e.setPreSelection(n);else if(!e.props.inline){e.props.selectsRange||e.setOpen(!1);var u=e.props,c=u.startDate,l=u.endDate;!c||l||we(n,c)||e.setOpen(!1)}}),p(d(e),"setSelected",function(n,o,s,u){var c=n;if(e.props.showYearPicker){if(c!==null&&ln(P(c),e.props))return}else if(e.props.showMonthYearPicker){if(c!==null&&cn(c,e.props))return}else if(c!==null&&Dt(c,e.props))return;var l=e.props,f=l.onChange,m=l.selectsRange,g=l.startDate,v=l.endDate;if(!Se(e.props.selected,c)||e.props.allowSameDay||m)if(c!==null&&(!e.props.selected||s&&(e.props.showTimeSelect||e.props.showTimeSelectOnly||e.props.showTimeInput)||(c=Tr(c,{hour:ue(e.props.selected),minute:se(e.props.selected),second:St(e.props.selected)})),e.props.inline||e.setState({preSelection:c}),e.props.focusSelectedMonth||e.setState({monthSelectedIn:u})),m){var y=g&&!v,b=g&&v;!g&&!v?f([c,null],o):y&&(we(c,g)?f([c,null],o):f([g,c],o)),b&&f([c,null],o)}else f(c,o);s||(e.props.onSelect(c,o),e.setState({inputValue:null}))}),p(d(e),"setPreSelection",function(n){var o=e.props.minDate!==void 0,s=e.props.maxDate!==void 0,u=!0;if(n){var c=fe(n);if(o&&s)u=st(n,e.props.minDate,e.props.maxDate);else if(o){var l=fe(e.props.minDate);u=Ce(n,l)||Se(c,l)}else if(s){var f=Qt(e.props.maxDate);u=we(n,f)||Se(c,f)}}u&&e.setState({preSelection:n})}),p(d(e),"handleTimeChange",function(n){var o=e.props.selected?e.props.selected:e.getPreSelection(),s=e.props.selected?n:Tr(o,{hour:ue(n),minute:se(n)});e.setState({preSelection:s}),e.props.onChange(s),e.props.shouldCloseOnSelect&&e.setOpen(!1),e.props.showTimeInput&&e.setOpen(!0),(e.props.showTimeSelectOnly||e.props.showTimeSelect)&&e.setState({isRenderAriaLiveMessage:!0}),e.setState({inputValue:null})}),p(d(e),"onInputClick",function(){e.props.disabled||e.props.readOnly||e.setOpen(!0),e.props.onInputClick()}),p(d(e),"onInputKeyDown",function(n){e.props.onKeyDown(n);var o=n.key;if(e.state.open||e.props.inline||e.props.preventOpenOnFocus){if(e.state.open){if(o==="ArrowDown"||o==="ArrowUp"){n.preventDefault();var s=e.calendar.componentNode&&e.calendar.componentNode.querySelector('.react-datepicker__day[tabindex="0"]');return void(s&&s.focus({preventScroll:!0}))}var u=L(e.state.preSelection);o==="Enter"?(n.preventDefault(),e.inputOk()&&e.state.lastPreSelectChange===Lt?(e.handleSelect(u,n),!e.props.shouldCloseOnSelect&&e.setPreSelection(u)):e.setOpen(!1)):o==="Escape"?(n.preventDefault(),e.setOpen(!1)):o==="Tab"&&e.setOpen(!1),e.inputOk()||e.props.onInputError({code:1,msg:Rt})}}else o!=="ArrowDown"&&o!=="ArrowUp"&&o!=="Enter"||e.onInputClick()}),p(d(e),"onPortalKeyDown",function(n){n.key==="Escape"&&(n.preventDefault(),e.setState({preventFocus:!0},function(){e.setOpen(!1),setTimeout(function(){e.setFocus(),e.setState({preventFocus:!1})})}))}),p(d(e),"onDayKeyDown",function(n){e.props.onKeyDown(n);var o=n.key,s=L(e.state.preSelection);if(o==="Enter")n.preventDefault(),e.handleSelect(s,n),!e.props.shouldCloseOnSelect&&e.setPreSelection(s);else if(o==="Escape")n.preventDefault(),e.setOpen(!1),e.inputOk()||e.props.onInputError({code:1,msg:Rt});else if(!e.props.disabledKeyboardNavigation){var u;switch(o){case"ArrowLeft":u=qa(s,1);break;case"ArrowRight":u=Ae(s,1);break;case"ArrowUp":u=$a(s,1);break;case"ArrowDown":u=Xt(s,1);break;case"PageUp":u=Le(s,1);break;case"PageDown":u=ce(s,1);break;case"Home":u=Xe(s,1);break;case"End":u=Re(s,1)}if(!u)return void(e.props.onInputError&&e.props.onInputError({code:1,msg:Rt}));if(n.preventDefault(),e.setState({lastPreSelectChange:Lt}),e.props.adjustDateOnChange&&e.setSelected(u),e.setPreSelection(u),e.props.inline){var c=J(s),l=J(u),f=P(s),m=P(u);c!==l||f!==m?e.setState({shouldFocusDayInline:!0}):e.setState({shouldFocusDayInline:!1})}}}),p(d(e),"onPopperKeyDown",function(n){n.key==="Escape"&&(n.preventDefault(),e.setState({preventFocus:!0},function(){e.setOpen(!1),setTimeout(function(){e.setFocus(),e.setState({preventFocus:!1})})}))}),p(d(e),"onClearClick",function(n){n&&n.preventDefault&&n.preventDefault(),e.props.selectsRange?e.props.onChange([null,null],n):e.props.onChange(null,n),e.setState({inputValue:null})}),p(d(e),"clear",function(){e.onClearClick()}),p(d(e),"onScroll",function(n){typeof e.props.closeOnScroll=="boolean"&&e.props.closeOnScroll?n.target!==document&&n.target!==document.documentElement&&n.target!==document.body||e.setOpen(!1):typeof e.props.closeOnScroll=="function"&&e.props.closeOnScroll(n)&&e.setOpen(!1)}),p(d(e),"renderCalendar",function(){return e.props.inline||e.isCalendarOpen()?h.createElement(rs,{ref:function(n){e.calendar=n},locale:e.props.locale,calendarStartDay:e.props.calendarStartDay,chooseDayAriaLabelPrefix:e.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:e.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:e.props.weekAriaLabelPrefix,monthAriaLabelPrefix:e.props.monthAriaLabelPrefix,adjustDateOnChange:e.props.adjustDateOnChange,setOpen:e.setOpen,shouldCloseOnSelect:e.props.shouldCloseOnSelect,dateFormat:e.props.dateFormatCalendar,useWeekdaysShort:e.props.useWeekdaysShort,formatWeekDay:e.props.formatWeekDay,dropdownMode:e.props.dropdownMode,selected:e.props.selected,preSelection:e.state.preSelection,onSelect:e.handleSelect,onWeekSelect:e.props.onWeekSelect,openToDate:e.props.openToDate,minDate:e.props.minDate,maxDate:e.props.maxDate,selectsStart:e.props.selectsStart,selectsEnd:e.props.selectsEnd,selectsRange:e.props.selectsRange,startDate:e.props.startDate,endDate:e.props.endDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,filterDate:e.props.filterDate,onClickOutside:e.handleCalendarClickOutside,formatWeekNumber:e.props.formatWeekNumber,highlightDates:e.state.highlightDates,holidays:e.state.holidays,includeDates:e.props.includeDates,includeDateIntervals:e.props.includeDateIntervals,includeTimes:e.props.includeTimes,injectTimes:e.props.injectTimes,inline:e.props.inline,shouldFocusDayInline:e.state.shouldFocusDayInline,peekNextMonth:e.props.peekNextMonth,showMonthDropdown:e.props.showMonthDropdown,showPreviousMonths:e.props.showPreviousMonths,useShortMonthInDropdown:e.props.useShortMonthInDropdown,showMonthYearDropdown:e.props.showMonthYearDropdown,showWeekNumbers:e.props.showWeekNumbers,showYearDropdown:e.props.showYearDropdown,withPortal:e.props.withPortal,forceShowMonthNavigation:e.props.forceShowMonthNavigation,showDisabledMonthNavigation:e.props.showDisabledMonthNavigation,scrollableYearDropdown:e.props.scrollableYearDropdown,scrollableMonthYearDropdown:e.props.scrollableMonthYearDropdown,todayButton:e.props.todayButton,weekLabel:e.props.weekLabel,outsideClickIgnoreClass:Ur,fixedHeight:e.props.fixedHeight,monthsShown:e.props.monthsShown,monthSelectedIn:e.state.monthSelectedIn,onDropdownFocus:e.handleDropdownFocus,onMonthChange:e.props.onMonthChange,onYearChange:e.props.onYearChange,dayClassName:e.props.dayClassName,weekDayClassName:e.props.weekDayClassName,monthClassName:e.props.monthClassName,timeClassName:e.props.timeClassName,showDateSelect:e.props.showDateSelect,showTimeSelect:e.props.showTimeSelect,showTimeSelectOnly:e.props.showTimeSelectOnly,onTimeChange:e.handleTimeChange,timeFormat:e.props.timeFormat,timeIntervals:e.props.timeIntervals,minTime:e.props.minTime,maxTime:e.props.maxTime,excludeTimes:e.props.excludeTimes,filterTime:e.props.filterTime,timeCaption:e.props.timeCaption,className:e.props.calendarClassName,container:e.props.calendarContainer,yearItemNumber:e.props.yearItemNumber,yearDropdownItemNumber:e.props.yearDropdownItemNumber,previousMonthAriaLabel:e.props.previousMonthAriaLabel,previousMonthButtonLabel:e.props.previousMonthButtonLabel,nextMonthAriaLabel:e.props.nextMonthAriaLabel,nextMonthButtonLabel:e.props.nextMonthButtonLabel,previousYearAriaLabel:e.props.previousYearAriaLabel,previousYearButtonLabel:e.props.previousYearButtonLabel,nextYearAriaLabel:e.props.nextYearAriaLabel,nextYearButtonLabel:e.props.nextYearButtonLabel,timeInputLabel:e.props.timeInputLabel,disabledKeyboardNavigation:e.props.disabledKeyboardNavigation,renderCustomHeader:e.props.renderCustomHeader,popperProps:e.props.popperProps,renderDayContents:e.props.renderDayContents,renderMonthContent:e.props.renderMonthContent,renderQuarterContent:e.props.renderQuarterContent,renderYearContent:e.props.renderYearContent,onDayMouseEnter:e.props.onDayMouseEnter,onMonthMouseLeave:e.props.onMonthMouseLeave,onYearMouseEnter:e.props.onYearMouseEnter,onYearMouseLeave:e.props.onYearMouseLeave,selectsDisabledDaysInRange:e.props.selectsDisabledDaysInRange,showTimeInput:e.props.showTimeInput,showMonthYearPicker:e.props.showMonthYearPicker,showFullMonthYearPicker:e.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:e.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:e.props.showFourColumnMonthYearPicker,showYearPicker:e.props.showYearPicker,showQuarterYearPicker:e.props.showQuarterYearPicker,showPopperArrow:e.props.showPopperArrow,excludeScrollbar:e.props.excludeScrollbar,handleOnKeyDown:e.props.onKeyDown,handleOnDayKeyDown:e.onDayKeyDown,isInputFocused:e.state.focused,customTimeInput:e.props.customTimeInput,setPreSelection:e.setPreSelection},e.props.children):null}),p(d(e),"renderAriaLiveRegion",function(){var n,o=e.props,s=o.dateFormat,u=o.locale,c=e.props.showTimeInput||e.props.showTimeSelect?"PPPPp":"PPPP";return n=e.props.selectsRange?"Selected start date: ".concat(le(e.props.startDate,{dateFormat:c,locale:u}),". ").concat(e.props.endDate?"End date: "+le(e.props.endDate,{dateFormat:c,locale:u}):""):e.props.showTimeSelectOnly?"Selected time: ".concat(le(e.props.selected,{dateFormat:s,locale:u})):e.props.showYearPicker?"Selected year: ".concat(le(e.props.selected,{dateFormat:"yyyy",locale:u})):e.props.showMonthYearPicker?"Selected month: ".concat(le(e.props.selected,{dateFormat:"MMMM yyyy",locale:u})):e.props.showQuarterYearPicker?"Selected quarter: ".concat(le(e.props.selected,{dateFormat:"yyyy, QQQ",locale:u})):"Selected date: ".concat(le(e.props.selected,{dateFormat:c,locale:u})),h.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},n)}),p(d(e),"renderDateInput",function(){var n,o=re(e.props.className,p({},Ur,e.state.open)),s=e.props.customInput||h.createElement("input",{type:"text"}),u=e.props.customInputRef||"ref",c=typeof e.props.value=="string"?e.props.value:typeof e.state.inputValue=="string"?e.state.inputValue:e.props.selectsRange?function(l,f,m){if(!l)return"";var g=le(l,m),v=f?le(f,m):"";return"".concat(g," - ").concat(v)}(e.props.startDate,e.props.endDate,e.props):le(e.props.selected,e.props);return h.cloneElement(s,(p(n={},u,function(l){e.input=l}),p(n,"value",c),p(n,"onBlur",e.handleBlur),p(n,"onChange",e.handleChange),p(n,"onClick",e.onInputClick),p(n,"onFocus",e.handleFocus),p(n,"onKeyDown",e.onInputKeyDown),p(n,"id",e.props.id),p(n,"name",e.props.name),p(n,"form",e.props.form),p(n,"autoFocus",e.props.autoFocus),p(n,"placeholder",e.props.placeholderText),p(n,"disabled",e.props.disabled),p(n,"autoComplete",e.props.autoComplete),p(n,"className",re(s.props.className,o)),p(n,"title",e.props.title),p(n,"readOnly",e.props.readOnly),p(n,"required",e.props.required),p(n,"tabIndex",e.props.tabIndex),p(n,"aria-describedby",e.props.ariaDescribedBy),p(n,"aria-invalid",e.props.ariaInvalid),p(n,"aria-labelledby",e.props.ariaLabelledBy),p(n,"aria-required",e.props.ariaRequired),n))}),p(d(e),"renderClearButton",function(){var n=e.props,o=n.isClearable,s=n.selected,u=n.startDate,c=n.endDate,l=n.clearButtonTitle,f=n.clearButtonClassName,m=f===void 0?"":f,g=n.ariaLabelClose,v=g===void 0?"Close":g;return!o||s==null&&u==null&&c==null?null:h.createElement("button",{type:"button",className:"react-datepicker__close-icon ".concat(m).trim(),"aria-label":v,onClick:e.onClearClick,title:l,tabIndex:-1})}),e.state=e.calcInitialState(),e}return X(r,[{key:"componentDidMount",value:function(){window.addEventListener("scroll",this.onScroll,!0)}},{key:"componentDidUpdate",value:function(t,e){var n,o;t.inline&&(n=t.selected,o=this.props.selected,n&&o?J(n)!==J(o)||P(n)!==P(o):n!==o)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&t.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),t.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:Rr(this.props.highlightDates)}),e.focused||Se(t.selected,this.props.selected)||this.setState({inputValue:null}),e.open!==this.state.open&&(e.open===!1&&this.state.open===!0&&this.props.onCalendarOpen(),e.open===!0&&this.state.open===!1&&this.props.onCalendarClose())}},{key:"componentWillUnmount",value:function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0)}},{key:"renderInputContainer",value:function(){var t=this.props.showIcon;return h.createElement("div",{className:"react-datepicker__input-container".concat(t?" react-datepicker__view-calendar-icon":"")},t&&h.createElement("svg",{className:"react-datepicker__calendar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},h.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"})),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())}},{key:"render",value:function(){var t=this.renderCalendar();if(this.props.inline)return t;if(this.props.withPortal){var e=this.state.open?h.createElement(yn,{enableTabLoop:this.props.enableTabLoop},h.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},t)):null;return this.state.open&&this.props.portalId&&(e=h.createElement(gn,{portalId:this.props.portalId,portalHost:this.props.portalHost},e)),h.createElement("div",null,this.renderInputContainer(),e)}return h.createElement(ts,{className:this.props.popperClassName,wrapperClassName:this.props.wrapperClassName,hidePopper:!this.isCalendarOpen(),portalId:this.props.portalId,portalHost:this.props.portalHost,popperModifiers:this.props.popperModifiers,targetComponent:this.renderInputContainer(),popperContainer:this.props.popperContainer,popperComponent:t,popperPlacement:this.props.popperPlacement,popperProps:this.props.popperProps,popperOnKeyDown:this.onPopperKeyDown,enableTabLoop:this.props.enableTabLoop})}}],[{key:"defaultProps",get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",onChange:function(){},disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",onFocus:function(){},onBlur:function(){},onKeyDown:function(){},onInputClick:function(){},onSelect:function(){},onClickOutside:function(){},onMonthChange:function(){},onCalendarOpen:function(){},onCalendarClose:function(){},preventOpenOnFocus:!1,onYearChange:function(){},onInputError:function(){},monthsShown:1,readOnly:!1,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,strictParsing:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:Ke,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0}}}]),r}(),ns="input",Lt="navigate";export{ss as default}; diff --git a/packs/js/discover-9143ae25.js b/packs/js/discover-2d5870bd.js similarity index 94% rename from packs/js/discover-9143ae25.js rename to packs/js/discover-2d5870bd.js index 092d658ff..00a28d392 100644 --- a/packs/js/discover-9143ae25.js +++ b/packs/js/discover-2d5870bd.js @@ -1 +1 @@ -import{bj as Q,g as Z,bk as ee,bl as te,bm as ae,kq as re,kr as se,at as x,r as y,a as e,R as b,H as w,A as C,kk as ie,kj as oe,a2 as f,y as h,eV as M,eW as ne,F as p,gt as F,ks as k,b8 as V,ax as W,W as ue,av as A,as as le,u as ce,aG as de,d$ as ge,d_ as he,bG as ve,a5 as pe,o as me}from"../index-7380452a.js";import{u as fe}from"./usePopularGroups-953a6f15.js";import{G as I}from"./layout-list-fe4f62ad.js";import{u as be,T as Se}from"./tag-list-item-16aa64ec.js";import{u as ye}from"./useDebounce-0d4ed135.js";import{P as R}from"./placeholder-group-search-5e3066d6.js";import{V as H,a as we}from"./index-75eb026b.js";import{G as xe}from"./group-list-item-c21d0638.js";import{G as j,L as _e}from"./layout-buttons-5e2bb51b.js";import{u as ke}from"./useSuggestedGroups-ad7e5c64.js";import{T as Ce,a as Ne}from"./tab-bar-b3f08956.js";import"./group-header-image-e076498c.js";function Pe(s){const t=Q(),a=Z(),{entities:r,...i}=ee([ae.GROUPS,"discover","search",s],()=>t.get("/api/v1/groups/search",{params:{q:s}}),{enabled:a.groupsDiscovery&&!!s,schema:te}),{relationships:d}=re(["discover","search",s],r.map(u=>u.id)),g=r.map(u=>({...u,relationship:d[u.id]||null}));return{...i,groups:g}}var O=function(t){var a=t.children,r=t.controlsHeight,i=t.isDisabled,d=t.itemCount,g=t.itemWidth,u=se(),n=x(u,3),l=n[0],S=n[1],m=n[2].width,v=m||(l==null?void 0:l.clientWidth),o=y.useState(0),c=x(o,2),_=c[0],B=c[1],U=y.useState(1),T=x(U,2),N=T[0],L=T[1],P=Math.ceil(d/_),G=v/Math.floor(v/g),J=N1,Y=N>1&&P>1,K=function(){return L(function(E){return E+1})},X=function(){return L(function(E){return E-1})},$=function(){return typeof a=="function"?a({width:G||"auto"}):a};return y.useEffect(function(){v&&B(Math.round(v/G))},[v,G]),e(w,{alignItems:"stretch"},void 0,e("div",{className:"z-10 flex w-5 items-center justify-center self-stretch rounded-l-xl bg-white dark:bg-primary-900",style:{height:r||"auto"}},void 0,e("button",{"data-testid":"prev-page",onClick:X,className:"flex h-full w-7 items-center justify-center transition-opacity duration-500 disabled:opacity-25",disabled:!Y||i},void 0,e(C,{src:ie,className:"h-5 w-5 text-black dark:text-white"}))),e("div",{className:"relative w-full overflow-hidden"},void 0,b.createElement(w,{alignItems:"center",style:{transform:"translateX(-".concat((N-1)*100,"%)")},className:"transition-all duration-500 ease-out",ref:S},$())),e("div",{className:"z-10 flex w-5 items-center justify-center self-stretch rounded-r-xl bg-white dark:bg-primary-900",style:{height:r||"auto"}},void 0,e("button",{"data-testid":"next-page",onClick:K,className:"flex h-full w-7 items-center justify-center transition-opacity duration-500 disabled:opacity-25",disabled:!J||i},void 0,e(C,{src:oe,className:"h-5 w-5 text-black dark:text-white"}))))},q=function(){var t=ne(12,20);return e(f,{space:2,className:"animate-pulse"},void 0,e(f,{className:"aspect-h-7 aspect-w-10 h-full w-full overflow-hidden rounded-lg"},void 0,e("div",{className:"absolute inset-0 rounded-t-lg bg-gray-300 object-cover dark:bg-gray-800"}),e(f,{justifyContent:"end",className:"z-10 p-4 text-gray-900 dark:text-gray-100",space:3},void 0,e("div",{className:"h-11 w-11 rounded-full bg-gray-500 dark:bg-gray-700 dark:ring-primary-900"}),e(f,{space:1,className:"text-gray-500 dark:text-gray-700"},void 0,e(h,{theme:"inherit",weight:"bold",truncate:!0},void 0,M(t)),e(w,{space:3,wrap:!0},void 0,e(h,{tag:"span",theme:"inherit"},void 0,M(6)),e(h,{tag:"span",theme:"inherit"},void 0,M(6)))))),e("div",{className:"h-10 w-full rounded-full bg-gray-300 dark:bg-gray-800"}))},Ge=function(){var t=fe(),a=t.groups,r=t.isFetching,i=t.isFetched,d=t.isError,g=i&&a.length===0||d,u=y.useState(null),n=x(u,2),l=n[0],S=n[1];return e(f,{space:4,"data-testid":"popular-groups"},void 0,e(w,{alignItems:"center",justifyContent:"between"},void 0,e(h,{size:"xl",weight:"bold"},void 0,e(p,{id:"groups.discover.popular.title",defaultMessage:"Popular Groups"})),e(F,{to:"/groups/popular"},void 0,e(h,{tag:"span",weight:"medium",size:"sm",theme:"inherit"},void 0,e(p,{id:"groups.discover.popular.show_more",defaultMessage:"Show More"})))),g?e(h,{theme:"muted"},void 0,e(p,{id:"groups.discover.popular.empty",defaultMessage:"Unable to fetch popular groups at this time. Please check back later."})):e(O,{itemWidth:250,itemCount:a.length,controlsHeight:l==null?void 0:l.clientHeight,isDisabled:r},void 0,function(m){var v=m.width;return b.createElement(b.Fragment,null,r?new Array(4).fill(0).map(function(o,c){return e("div",{className:"relative flex shrink-0 flex-col space-y-2 px-1",style:{width:v||"auto"}},c,e(q,{}))}):a.map(function(o){return b.createElement(I,{key:o.id,group:o,width:v,ref:S})}))}))},Ee=function(){var t=be(),a=t.tags,r=t.isFetched,i=t.isError,d=r&&a.length===0||i;return e(f,{space:4,"data-testid":"popular-tags"},void 0,e(w,{alignItems:"center",justifyContent:"between"},void 0,e(h,{size:"xl",weight:"bold"},void 0,e(p,{id:"groups.discover.tags.title",defaultMessage:"Browse Topics"})),e(F,{to:"/groups/tags"},void 0,e(h,{tag:"span",weight:"medium",size:"sm",theme:"inherit"},void 0,e(p,{id:"groups.discover.tags.show_more",defaultMessage:"Show More"})))),d?e(h,{theme:"muted"},void 0,e(p,{id:"groups.discover.tags.empty",defaultMessage:"Unable to fetch popular topics at this time. Please check back later."})):e(f,{space:4},void 0,a.slice(0,10).map(function(g){return e(Se,{tag:g},g.id)})))};const Me="soapbox:recent-group-searches",Re=s=>k.remove(s),Fe=(s,t)=>{let a=[];if(k.get(s)&&(a=k.get(s)),a.indexOf(t)===-1)return a.unshift(t),a.length>10&&a.pop(),k.set(s,a),a;{const r=a.indexOf(t),i=[...a];return i.splice(0,0,...i.splice(r,1)),localStorage.setItem(Me,JSON.stringify(i)),i}},D=function(s){var t=s.title,a=s.subtitle;return e(f,{space:2,className:"px-4 py-2","data-testid":"no-results"},void 0,e(h,{weight:"bold",size:"lg"},void 0,t),e(h,{theme:"muted"},void 0,a))},Ie=function(s){var t=s.onSelect,a=V(),r=a.account,i=y.useState(k.get(r==null?void 0:r.id)||[]),d=x(i,2),g=d[0],u=d[1],n=function(){Re(r==null?void 0:r.id),u([])};return e(f,{space:2,"data-testid":"recent-searches"},void 0,g.length>0?b.createElement(b.Fragment,null,e(w,{alignItems:"center",justifyContent:"between",className:"bg-white dark:bg-gray-900"},void 0,e(h,{theme:"muted",weight:"semibold",size:"sm"},void 0,e(p,{id:"groups.discover.search.recent_searches.title",defaultMessage:"Recent searches"})),e("button",{onClick:n,"data-testid":"clear-recent-searches"},void 0,e(h,{theme:"primary",size:"sm",className:"hover:underline"},void 0,e(p,{id:"groups.discover.search.recent_searches.clear_all",defaultMessage:"Clear all"})))),e(H,{useWindowScroll:!0,data:g,itemContent:function(S,m){return e("div",{"data-testid":"recent-search"},m,e("button",{onClick:function(){return t(m)},className:"group flex w-full flex-col rounded-lg p-2 hover:bg-gray-100 dark:hover:bg-gray-800","data-testid":"recent-search-result"},void 0,e(w,{alignItems:"center",space:2},void 0,e("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-gray-200 p-2 dark:bg-gray-800 dark:group-hover:bg-gray-700/20"},void 0,e(C,{src:W,className:"h-5 w-5 text-gray-600"})),e(h,{weight:"bold",size:"sm",align:"left"},void 0,m))))}})):e(f,{space:2,"data-testid":"recent-searches-blankslate"},void 0,e(h,{weight:"bold",size:"lg"},void 0,e(p,{id:"groups.discover.search.recent_searches.blankslate.title",defaultMessage:"No recent searches"})),e(h,{theme:"muted"},void 0,e(p,{id:"groups.discover.search.recent_searches.blankslate.subtitle",defaultMessage:"Search group names, topics or keywords"}))))};var Te=["context"],Le=b.forwardRef(function(s,t){s.context;var a=le(s,Te);return b.createElement("div",A({ref:t},a,{className:"flex flex-wrap"}))});const ze=function(s){var t=s.groupSearchResult,a=y.useState(j.LIST),r=x(a,2),i=r[0],d=r[1],g=t.groups,u=t.hasNextPage,n=t.isFetching,l=t.fetchNextPage,S=function(){u&&!n&&l()},m=y.useCallback(function(o,c){return e("div",{className:ue({"pt-4":c!==0})},void 0,e(xe,{group:o,withJoinAction:!0}))},[]),v=y.useCallback(function(o){return e(I,{group:o})},[]);return e(f,{space:4,"data-testid":"results"},void 0,e(w,{alignItems:"center",justifyContent:"between"},void 0,e(h,{weight:"semibold"},void 0,e(p,{id:"groups.discover.search.results.groups",defaultMessage:"Groups"})),e(_e,{layout:i,onSelect:function(c){return d(c)}})),i===j.LIST?e(H,{useWindowScroll:!0,data:g,itemContent:function(c,_){return m(_,c)},endReached:S}):e(we,{useWindowScroll:!0,data:g,itemContent:function(c,_){return v(_)},components:{Item:function(c){return b.createElement("div",A({},c,{className:"w-1/2 flex-none pb-4 [&:nth-last-of-type(-n+2)]:pb-0"}))},List:Le},endReached:S}))},je=function(s){var t=s.onSelect,a=s.searchValue,r=V(),i=r.account,d=ye,g=d(a,300),u=d(a,1e3),n=Pe(g),l=n.groups,S=n.isLoading,m=n.isFetched,v=n.isError,o=m&&l.length>0,c=m&&l.length===0;return y.useEffect(function(){u&&u.length>=0&&Fe(i==null?void 0:i.id,u)},[u]),S?e(f,{space:4},void 0,e(R,{}),e(R,{}),e(R,{})):v?e(D,{title:e(p,{id:"groups.discover.search.error.title",defaultMessage:"An error occurred"}),subtitle:e(p,{id:"groups.discover.search.error.subtitle",defaultMessage:"Please try again later."})}):c?e(D,{title:e(p,{id:"groups.discover.search.no_results.title",defaultMessage:"No matches found"}),subtitle:e(p,{id:"groups.discover.search.no_results.subtitle",defaultMessage:"Try searching for another group."})}):o?e(ze,{groupSearchResult:n}):e(Ie,{onSelect:t})};var De=function(){var t=ke(),a=t.groups,r=t.isFetching,i=t.isFetched,d=t.isError,g=i&&a.length===0||d,u=y.useState(null),n=x(u,2),l=n[0],S=n[1];return e(f,{space:4,"data-testid":"suggested-groups"},void 0,e(w,{alignItems:"center",justifyContent:"between"},void 0,e(h,{size:"xl",weight:"bold"},void 0,e(p,{id:"groups.discover.suggested.title",defaultMessage:"Suggested For You"})),e(F,{to:"/groups/suggested"},void 0,e(h,{tag:"span",weight:"medium",size:"sm",theme:"inherit"},void 0,e(p,{id:"groups.discover.suggested.show_more",defaultMessage:"Show More"})))),g?e(h,{theme:"muted"},void 0,e(p,{id:"groups.discover.suggested.empty",defaultMessage:"Unable to fetch suggested groups at this time. Please check back later."})):e(O,{itemWidth:250,itemCount:a.length,controlsHeight:l==null?void 0:l.clientHeight,isDisabled:r},void 0,function(m){var v=m.width;return b.createElement(b.Fragment,null,r?new Array(20).fill(0).map(function(o,c){return e("div",{className:"relative flex shrink-0 flex-col space-y-2 px-0.5",style:{width:v||"auto"}},c,e(q,{}))}):a.map(function(o){return b.createElement(I,{key:o.id,group:o,width:v,ref:S})}))}))},Ve=me({placeholder:{id:"groups.discover.search.placeholder",defaultMessage:"Search"}}),Qe=function(){var t=ce(),a=y.useState(!1),r=x(a,2),i=r[0],d=r[1],g=y.useState(""),u=x(g,2),n=u[0],l=u[1],S=n&&n.length>0,m=function(){v(),d(!1)},v=function(){return l("")};return e(f,{space:4},void 0,e(Ce,{activeTab:Ne.FIND_GROUPS}),e(f,{space:6},void 0,e(w,{alignItems:"center"},void 0,i?b.createElement(de,{src:ge,iconClassName:"mr-2 h-5 w-5 fill-current text-gray-600",ref:he("Backspace"),onClick:m,"data-testid":"group-search-icon"}):null,e(ve,{"data-testid":"search",type:"text",placeholder:t.formatMessage(Ve.placeholder),value:n,onChange:function(c){return l(c.target.value)},onFocus:function(){return d(!0)},outerClassName:"mt-0 w-full",theme:"search",append:e("button",{onClick:v},void 0,e(C,{src:S?pe:W,className:"h-4 w-4 text-gray-700 dark:text-gray-600","aria-hidden":"true"}))})),i?e(je,{searchValue:n,onSelect:function(c){return l(c)}}):b.createElement(b.Fragment,null,e(Ge,{}),e(De,{}),e(Ee,{}))))};export{Qe as default}; +import{bj as Q,g as Z,bk as ee,bl as te,bm as ae,kq as re,kr as se,at as x,r as y,a as e,R as b,H as w,A as C,kk as ie,kj as oe,a2 as f,y as h,eV as M,eW as ne,F as p,gt as F,ks as k,b8 as V,ax as W,W as ue,av as A,as as le,u as ce,aG as de,d$ as ge,d_ as he,bG as ve,a5 as pe,o as me}from"../index-be605fd2.js";import{u as fe}from"./usePopularGroups-d12a3589.js";import{G as I}from"./layout-list-e34f9942.js";import{u as be,T as Se}from"./tag-list-item-bf8ca941.js";import{u as ye}from"./useDebounce-93e74587.js";import{P as R}from"./placeholder-group-search-1a309751.js";import{V as H,a as we}from"./index-85a17314.js";import{G as xe}from"./group-list-item-d71c8a2e.js";import{G as j,L as _e}from"./layout-buttons-127c2f5f.js";import{u as ke}from"./useSuggestedGroups-a15d5e07.js";import{T as Ce,a as Ne}from"./tab-bar-777df18a.js";import"./group-header-image-068adc6d.js";function Pe(s){const t=Q(),a=Z(),{entities:r,...i}=ee([ae.GROUPS,"discover","search",s],()=>t.get("/api/v1/groups/search",{params:{q:s}}),{enabled:a.groupsDiscovery&&!!s,schema:te}),{relationships:d}=re(["discover","search",s],r.map(u=>u.id)),g=r.map(u=>({...u,relationship:d[u.id]||null}));return{...i,groups:g}}var O=function(t){var a=t.children,r=t.controlsHeight,i=t.isDisabled,d=t.itemCount,g=t.itemWidth,u=se(),n=x(u,3),l=n[0],S=n[1],m=n[2].width,v=m||(l==null?void 0:l.clientWidth),o=y.useState(0),c=x(o,2),_=c[0],B=c[1],U=y.useState(1),T=x(U,2),N=T[0],L=T[1],P=Math.ceil(d/_),G=v/Math.floor(v/g),J=N1,Y=N>1&&P>1,K=function(){return L(function(E){return E+1})},X=function(){return L(function(E){return E-1})},$=function(){return typeof a=="function"?a({width:G||"auto"}):a};return y.useEffect(function(){v&&B(Math.round(v/G))},[v,G]),e(w,{alignItems:"stretch"},void 0,e("div",{className:"z-10 flex w-5 items-center justify-center self-stretch rounded-l-xl bg-white dark:bg-primary-900",style:{height:r||"auto"}},void 0,e("button",{"data-testid":"prev-page",onClick:X,className:"flex h-full w-7 items-center justify-center transition-opacity duration-500 disabled:opacity-25",disabled:!Y||i},void 0,e(C,{src:ie,className:"h-5 w-5 text-black dark:text-white"}))),e("div",{className:"relative w-full overflow-hidden"},void 0,b.createElement(w,{alignItems:"center",style:{transform:"translateX(-".concat((N-1)*100,"%)")},className:"transition-all duration-500 ease-out",ref:S},$())),e("div",{className:"z-10 flex w-5 items-center justify-center self-stretch rounded-r-xl bg-white dark:bg-primary-900",style:{height:r||"auto"}},void 0,e("button",{"data-testid":"next-page",onClick:K,className:"flex h-full w-7 items-center justify-center transition-opacity duration-500 disabled:opacity-25",disabled:!J||i},void 0,e(C,{src:oe,className:"h-5 w-5 text-black dark:text-white"}))))},q=function(){var t=ne(12,20);return e(f,{space:2,className:"animate-pulse"},void 0,e(f,{className:"aspect-h-7 aspect-w-10 h-full w-full overflow-hidden rounded-lg"},void 0,e("div",{className:"absolute inset-0 rounded-t-lg bg-gray-300 object-cover dark:bg-gray-800"}),e(f,{justifyContent:"end",className:"z-10 p-4 text-gray-900 dark:text-gray-100",space:3},void 0,e("div",{className:"h-11 w-11 rounded-full bg-gray-500 dark:bg-gray-700 dark:ring-primary-900"}),e(f,{space:1,className:"text-gray-500 dark:text-gray-700"},void 0,e(h,{theme:"inherit",weight:"bold",truncate:!0},void 0,M(t)),e(w,{space:3,wrap:!0},void 0,e(h,{tag:"span",theme:"inherit"},void 0,M(6)),e(h,{tag:"span",theme:"inherit"},void 0,M(6)))))),e("div",{className:"h-10 w-full rounded-full bg-gray-300 dark:bg-gray-800"}))},Ge=function(){var t=fe(),a=t.groups,r=t.isFetching,i=t.isFetched,d=t.isError,g=i&&a.length===0||d,u=y.useState(null),n=x(u,2),l=n[0],S=n[1];return e(f,{space:4,"data-testid":"popular-groups"},void 0,e(w,{alignItems:"center",justifyContent:"between"},void 0,e(h,{size:"xl",weight:"bold"},void 0,e(p,{id:"groups.discover.popular.title",defaultMessage:"Popular Groups"})),e(F,{to:"/groups/popular"},void 0,e(h,{tag:"span",weight:"medium",size:"sm",theme:"inherit"},void 0,e(p,{id:"groups.discover.popular.show_more",defaultMessage:"Show More"})))),g?e(h,{theme:"muted"},void 0,e(p,{id:"groups.discover.popular.empty",defaultMessage:"Unable to fetch popular groups at this time. Please check back later."})):e(O,{itemWidth:250,itemCount:a.length,controlsHeight:l==null?void 0:l.clientHeight,isDisabled:r},void 0,function(m){var v=m.width;return b.createElement(b.Fragment,null,r?new Array(4).fill(0).map(function(o,c){return e("div",{className:"relative flex shrink-0 flex-col space-y-2 px-1",style:{width:v||"auto"}},c,e(q,{}))}):a.map(function(o){return b.createElement(I,{key:o.id,group:o,width:v,ref:S})}))}))},Ee=function(){var t=be(),a=t.tags,r=t.isFetched,i=t.isError,d=r&&a.length===0||i;return e(f,{space:4,"data-testid":"popular-tags"},void 0,e(w,{alignItems:"center",justifyContent:"between"},void 0,e(h,{size:"xl",weight:"bold"},void 0,e(p,{id:"groups.discover.tags.title",defaultMessage:"Browse Topics"})),e(F,{to:"/groups/tags"},void 0,e(h,{tag:"span",weight:"medium",size:"sm",theme:"inherit"},void 0,e(p,{id:"groups.discover.tags.show_more",defaultMessage:"Show More"})))),d?e(h,{theme:"muted"},void 0,e(p,{id:"groups.discover.tags.empty",defaultMessage:"Unable to fetch popular topics at this time. Please check back later."})):e(f,{space:4},void 0,a.slice(0,10).map(function(g){return e(Se,{tag:g},g.id)})))};const Me="soapbox:recent-group-searches",Re=s=>k.remove(s),Fe=(s,t)=>{let a=[];if(k.get(s)&&(a=k.get(s)),a.indexOf(t)===-1)return a.unshift(t),a.length>10&&a.pop(),k.set(s,a),a;{const r=a.indexOf(t),i=[...a];return i.splice(0,0,...i.splice(r,1)),localStorage.setItem(Me,JSON.stringify(i)),i}},D=function(s){var t=s.title,a=s.subtitle;return e(f,{space:2,className:"px-4 py-2","data-testid":"no-results"},void 0,e(h,{weight:"bold",size:"lg"},void 0,t),e(h,{theme:"muted"},void 0,a))},Ie=function(s){var t=s.onSelect,a=V(),r=a.account,i=y.useState(k.get(r==null?void 0:r.id)||[]),d=x(i,2),g=d[0],u=d[1],n=function(){Re(r==null?void 0:r.id),u([])};return e(f,{space:2,"data-testid":"recent-searches"},void 0,g.length>0?b.createElement(b.Fragment,null,e(w,{alignItems:"center",justifyContent:"between",className:"bg-white dark:bg-gray-900"},void 0,e(h,{theme:"muted",weight:"semibold",size:"sm"},void 0,e(p,{id:"groups.discover.search.recent_searches.title",defaultMessage:"Recent searches"})),e("button",{onClick:n,"data-testid":"clear-recent-searches"},void 0,e(h,{theme:"primary",size:"sm",className:"hover:underline"},void 0,e(p,{id:"groups.discover.search.recent_searches.clear_all",defaultMessage:"Clear all"})))),e(H,{useWindowScroll:!0,data:g,itemContent:function(S,m){return e("div",{"data-testid":"recent-search"},m,e("button",{onClick:function(){return t(m)},className:"group flex w-full flex-col rounded-lg p-2 hover:bg-gray-100 dark:hover:bg-gray-800","data-testid":"recent-search-result"},void 0,e(w,{alignItems:"center",space:2},void 0,e("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-gray-200 p-2 dark:bg-gray-800 dark:group-hover:bg-gray-700/20"},void 0,e(C,{src:W,className:"h-5 w-5 text-gray-600"})),e(h,{weight:"bold",size:"sm",align:"left"},void 0,m))))}})):e(f,{space:2,"data-testid":"recent-searches-blankslate"},void 0,e(h,{weight:"bold",size:"lg"},void 0,e(p,{id:"groups.discover.search.recent_searches.blankslate.title",defaultMessage:"No recent searches"})),e(h,{theme:"muted"},void 0,e(p,{id:"groups.discover.search.recent_searches.blankslate.subtitle",defaultMessage:"Search group names, topics or keywords"}))))};var Te=["context"],Le=b.forwardRef(function(s,t){s.context;var a=le(s,Te);return b.createElement("div",A({ref:t},a,{className:"flex flex-wrap"}))});const ze=function(s){var t=s.groupSearchResult,a=y.useState(j.LIST),r=x(a,2),i=r[0],d=r[1],g=t.groups,u=t.hasNextPage,n=t.isFetching,l=t.fetchNextPage,S=function(){u&&!n&&l()},m=y.useCallback(function(o,c){return e("div",{className:ue({"pt-4":c!==0})},void 0,e(xe,{group:o,withJoinAction:!0}))},[]),v=y.useCallback(function(o){return e(I,{group:o})},[]);return e(f,{space:4,"data-testid":"results"},void 0,e(w,{alignItems:"center",justifyContent:"between"},void 0,e(h,{weight:"semibold"},void 0,e(p,{id:"groups.discover.search.results.groups",defaultMessage:"Groups"})),e(_e,{layout:i,onSelect:function(c){return d(c)}})),i===j.LIST?e(H,{useWindowScroll:!0,data:g,itemContent:function(c,_){return m(_,c)},endReached:S}):e(we,{useWindowScroll:!0,data:g,itemContent:function(c,_){return v(_)},components:{Item:function(c){return b.createElement("div",A({},c,{className:"w-1/2 flex-none pb-4 [&:nth-last-of-type(-n+2)]:pb-0"}))},List:Le},endReached:S}))},je=function(s){var t=s.onSelect,a=s.searchValue,r=V(),i=r.account,d=ye,g=d(a,300),u=d(a,1e3),n=Pe(g),l=n.groups,S=n.isLoading,m=n.isFetched,v=n.isError,o=m&&l.length>0,c=m&&l.length===0;return y.useEffect(function(){u&&u.length>=0&&Fe(i==null?void 0:i.id,u)},[u]),S?e(f,{space:4},void 0,e(R,{}),e(R,{}),e(R,{})):v?e(D,{title:e(p,{id:"groups.discover.search.error.title",defaultMessage:"An error occurred"}),subtitle:e(p,{id:"groups.discover.search.error.subtitle",defaultMessage:"Please try again later."})}):c?e(D,{title:e(p,{id:"groups.discover.search.no_results.title",defaultMessage:"No matches found"}),subtitle:e(p,{id:"groups.discover.search.no_results.subtitle",defaultMessage:"Try searching for another group."})}):o?e(ze,{groupSearchResult:n}):e(Ie,{onSelect:t})};var De=function(){var t=ke(),a=t.groups,r=t.isFetching,i=t.isFetched,d=t.isError,g=i&&a.length===0||d,u=y.useState(null),n=x(u,2),l=n[0],S=n[1];return e(f,{space:4,"data-testid":"suggested-groups"},void 0,e(w,{alignItems:"center",justifyContent:"between"},void 0,e(h,{size:"xl",weight:"bold"},void 0,e(p,{id:"groups.discover.suggested.title",defaultMessage:"Suggested For You"})),e(F,{to:"/groups/suggested"},void 0,e(h,{tag:"span",weight:"medium",size:"sm",theme:"inherit"},void 0,e(p,{id:"groups.discover.suggested.show_more",defaultMessage:"Show More"})))),g?e(h,{theme:"muted"},void 0,e(p,{id:"groups.discover.suggested.empty",defaultMessage:"Unable to fetch suggested groups at this time. Please check back later."})):e(O,{itemWidth:250,itemCount:a.length,controlsHeight:l==null?void 0:l.clientHeight,isDisabled:r},void 0,function(m){var v=m.width;return b.createElement(b.Fragment,null,r?new Array(20).fill(0).map(function(o,c){return e("div",{className:"relative flex shrink-0 flex-col space-y-2 px-0.5",style:{width:v||"auto"}},c,e(q,{}))}):a.map(function(o){return b.createElement(I,{key:o.id,group:o,width:v,ref:S})}))}))},Ve=me({placeholder:{id:"groups.discover.search.placeholder",defaultMessage:"Search"}}),Qe=function(){var t=ce(),a=y.useState(!1),r=x(a,2),i=r[0],d=r[1],g=y.useState(""),u=x(g,2),n=u[0],l=u[1],S=n&&n.length>0,m=function(){v(),d(!1)},v=function(){return l("")};return e(f,{space:4},void 0,e(Ce,{activeTab:Ne.FIND_GROUPS}),e(f,{space:6},void 0,e(w,{alignItems:"center"},void 0,i?b.createElement(de,{src:ge,iconClassName:"mr-2 h-5 w-5 fill-current text-gray-600",ref:he("Backspace"),onClick:m,"data-testid":"group-search-icon"}):null,e(ve,{"data-testid":"search",type:"text",placeholder:t.formatMessage(Ve.placeholder),value:n,onChange:function(c){return l(c.target.value)},onFocus:function(){return d(!0)},outerClassName:"mt-0 w-full",theme:"search",append:e("button",{onClick:v},void 0,e(C,{src:S?pe:W,className:"h-4 w-4 text-gray-700 dark:text-gray-600","aria-hidden":"true"}))})),i?e(je,{searchValue:n,onSelect:function(c){return l(c)}}):b.createElement(b.Fragment,null,e(Ge,{}),e(De,{}),e(Ee,{}))))};export{Qe as default}; diff --git a/packs/js/dislikes-modal-35340864.js b/packs/js/dislikes-modal-1a832d05.js similarity index 77% rename from packs/js/dislikes-modal-35340864.js rename to packs/js/dislikes-modal-1a832d05.js index b3bd1bb2b..d6528cbc0 100644 --- a/packs/js/dislikes-modal-35340864.js +++ b/packs/js/dislikes-modal-1a832d05.js @@ -1 +1 @@ -import{d as p,q as f,r as v,a as e,B as h,F as r,bu as k,ex as C,aB as D}from"../index-7380452a.js";import{S as y}from"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var g=function(i){var n=i.onClose,o=i.statusId,c=p(),l=f(function(s){var t;return(t=s.user_lists.disliked_by.get(o))===null||t===void 0?void 0:t.items}),d=function(){c(C(o))};v.useEffect(function(){d()},[]);var u=function(){n("DISLIKES")},a;if(!l)a=e(D,{});else{var m=e(r,{id:"empty_column.dislikes",defaultMessage:"No one has disliked this post yet. When someone does, they will show up here."});a=e(y,{scrollKey:"dislikes",emptyMessage:m,className:"max-w-full",itemClassName:"pb-3"},void 0,l.map(function(s){return e(h,{id:s},s)}))}return e(k,{title:e(r,{id:"column.dislikes",defaultMessage:"Dislikes"}),onClose:u},void 0,a)};export{g as default}; +import{d as p,q as f,r as v,a as e,B as h,F as r,bu as k,ex as C,aB as D}from"../index-be605fd2.js";import{S as y}from"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var g=function(i){var n=i.onClose,o=i.statusId,c=p(),l=f(function(s){var t;return(t=s.user_lists.disliked_by.get(o))===null||t===void 0?void 0:t.items}),d=function(){c(C(o))};v.useEffect(function(){d()},[]);var u=function(){n("DISLIKES")},a;if(!l)a=e(D,{});else{var m=e(r,{id:"empty_column.dislikes",defaultMessage:"No one has disliked this post yet. When someone does, they will show up here."});a=e(y,{scrollKey:"dislikes",emptyMessage:m,className:"max-w-full",itemClassName:"pb-3"},void 0,l.map(function(s){return e(h,{id:s},s)}))}return e(k,{title:e(r,{id:"column.dislikes",defaultMessage:"Dislikes"}),onClose:u},void 0,a)};export{g as default}; diff --git a/packs/js/edit-announcement-modal-5d4f1578.js b/packs/js/edit-announcement-modal-7321cc37.js similarity index 95% rename from packs/js/edit-announcement-modal-5d4f1578.js rename to packs/js/edit-announcement-modal-7321cc37.js index 4cd33827e..96dd76ead 100644 --- a/packs/js/edit-announcement-modal-5d4f1578.js +++ b/packs/js/edit-announcement-modal-7321cc37.js @@ -1 +1 @@ -import{d as k,u as S,q as d,a as e,bE as x,bF as s,F as t,bZ as N,hM as m,j2 as c,H as w,ah as D,a2 as F,y as u,bu as P,o as I,kY as H,kZ as O,k_ as R,k$ as U,l0 as Z,bv as j}from"../index-7380452a.js";var r=I({save:{id:"admin.edit_announcement.save",defaultMessage:"Save"},announcementContentPlaceholder:{id:"admin.edit_announcement.fields.content_placeholder",defaultMessage:"Announcement content"},announcementStartTimePlaceholder:{id:"admin.edit_announcement.fields.start_time_placeholder",defaultMessage:"Announcement starts on…"},announcementEndTimePlaceholder:{id:"admin.edit_announcement.fields.end_time_placeholder",defaultMessage:"Announcement ends on…"}}),B=function(f){var h=f.onClose,o=k(),i=S(),g=d(function(n){return n.admin_announcements.form.id}),v=d(function(n){return n.admin_announcements.form.content}),C=d(function(n){return n.admin_announcements.form.starts_at}),_=d(function(n){return n.admin_announcements.form.ends_at}),p=d(function(n){return n.admin_announcements.form.all_day}),M=function(a){var l=a.target;return o(H(l.value))},T=function(a){return o(O(a))},y=function(a){return o(R(a))},A=function(a){var l=a.target;return o(U(l.checked))},b=function(){h("EDIT_ANNOUNCEMENT")},E=function(){return o(Z()).then(function(){return o(j("EDIT_ANNOUNCEMENT"))})};return e(P,{onClose:b,title:g?e(t,{id:"column.admin.edit_announcement",defaultMessage:"Edit announcement"}):e(t,{id:"column.admin.create_announcement",defaultMessage:"Create announcement"}),confirmationAction:E,confirmationText:i.formatMessage(r.save)},void 0,e(x,{},void 0,e(s,{labelText:e(t,{id:"admin.edit_announcement.fields.content_label",defaultMessage:"Content"})},void 0,e(N,{autoComplete:"off",placeholder:i.formatMessage(r.announcementContentPlaceholder),value:v,onChange:M})),e(s,{labelText:e(t,{id:"admin.edit_announcement.fields.start_time_label",defaultMessage:"Start date"})},void 0,e(m,{fetchComponent:c},void 0,function(n){return e(n,{showTimeSelect:!0,dateFormat:"MMMM d, yyyy h:mm aa",timeIntervals:15,wrapperClassName:"react-datepicker-wrapper",placeholderText:i.formatMessage(r.announcementStartTimePlaceholder),selected:C,onChange:T,isClearable:!0})})),e(s,{labelText:e(t,{id:"admin.edit_announcement.fields.end_time_label",defaultMessage:"End date"})},void 0,e(m,{fetchComponent:c},void 0,function(n){return e(n,{showTimeSelect:!0,dateFormat:"MMMM d, yyyy h:mm aa",timeIntervals:15,wrapperClassName:"react-datepicker-wrapper",placeholderText:i.formatMessage(r.announcementEndTimePlaceholder),selected:_,onChange:y,isClearable:!0})})),e(w,{alignItems:"center",space:2},void 0,e(D,{checked:p,onChange:A}),e(F,{},void 0,e(u,{tag:"span",theme:"muted"},void 0,e(t,{id:"admin.edit_announcement.fields.all_day_label",defaultMessage:"All-day event"})),e(u,{size:"xs",tag:"span",theme:"muted"},void 0,e(t,{id:"admin.edit_announcement.fields.all_day_hint",defaultMessage:"When checked, only the dates of the time range will be displayed"}))))))};export{B as default}; +import{d as k,u as S,q as d,a as e,bE as x,bF as s,F as t,bZ as N,hM as m,j2 as c,H as w,ah as D,a2 as F,y as u,bu as P,o as I,kY as H,kZ as O,k_ as R,k$ as U,l0 as Z,bv as j}from"../index-be605fd2.js";var r=I({save:{id:"admin.edit_announcement.save",defaultMessage:"Save"},announcementContentPlaceholder:{id:"admin.edit_announcement.fields.content_placeholder",defaultMessage:"Announcement content"},announcementStartTimePlaceholder:{id:"admin.edit_announcement.fields.start_time_placeholder",defaultMessage:"Announcement starts on…"},announcementEndTimePlaceholder:{id:"admin.edit_announcement.fields.end_time_placeholder",defaultMessage:"Announcement ends on…"}}),B=function(f){var h=f.onClose,o=k(),i=S(),g=d(function(n){return n.admin_announcements.form.id}),v=d(function(n){return n.admin_announcements.form.content}),C=d(function(n){return n.admin_announcements.form.starts_at}),_=d(function(n){return n.admin_announcements.form.ends_at}),p=d(function(n){return n.admin_announcements.form.all_day}),M=function(a){var l=a.target;return o(H(l.value))},T=function(a){return o(O(a))},y=function(a){return o(R(a))},A=function(a){var l=a.target;return o(U(l.checked))},b=function(){h("EDIT_ANNOUNCEMENT")},E=function(){return o(Z()).then(function(){return o(j("EDIT_ANNOUNCEMENT"))})};return e(P,{onClose:b,title:g?e(t,{id:"column.admin.edit_announcement",defaultMessage:"Edit announcement"}):e(t,{id:"column.admin.create_announcement",defaultMessage:"Create announcement"}),confirmationAction:E,confirmationText:i.formatMessage(r.save)},void 0,e(x,{},void 0,e(s,{labelText:e(t,{id:"admin.edit_announcement.fields.content_label",defaultMessage:"Content"})},void 0,e(N,{autoComplete:"off",placeholder:i.formatMessage(r.announcementContentPlaceholder),value:v,onChange:M})),e(s,{labelText:e(t,{id:"admin.edit_announcement.fields.start_time_label",defaultMessage:"Start date"})},void 0,e(m,{fetchComponent:c},void 0,function(n){return e(n,{showTimeSelect:!0,dateFormat:"MMMM d, yyyy h:mm aa",timeIntervals:15,wrapperClassName:"react-datepicker-wrapper",placeholderText:i.formatMessage(r.announcementStartTimePlaceholder),selected:C,onChange:T,isClearable:!0})})),e(s,{labelText:e(t,{id:"admin.edit_announcement.fields.end_time_label",defaultMessage:"End date"})},void 0,e(m,{fetchComponent:c},void 0,function(n){return e(n,{showTimeSelect:!0,dateFormat:"MMMM d, yyyy h:mm aa",timeIntervals:15,wrapperClassName:"react-datepicker-wrapper",placeholderText:i.formatMessage(r.announcementEndTimePlaceholder),selected:_,onChange:y,isClearable:!0})})),e(w,{alignItems:"center",space:2},void 0,e(D,{checked:p,onChange:A}),e(F,{},void 0,e(u,{tag:"span",theme:"muted"},void 0,e(t,{id:"admin.edit_announcement.fields.all_day_label",defaultMessage:"All-day event"})),e(u,{size:"xs",tag:"span",theme:"muted"},void 0,e(t,{id:"admin.edit_announcement.fields.all_day_hint",defaultMessage:"When checked, only the dates of the time range will be displayed"}))))))};export{B as default}; diff --git a/packs/js/edit-federation-modal-e453cf1b.js b/packs/js/edit-federation-modal-75e12d59.js similarity index 97% rename from packs/js/edit-federation-modal-e453cf1b.js rename to packs/js/edit-federation-modal-75e12d59.js index 2702b38e5..28d6b4e35 100644 --- a/packs/js/edit-federation-modal-e453cf1b.js +++ b/packs/js/edit-federation-modal-75e12d59.js @@ -1 +1 @@ -import{em as O,en as k,eo as T,ep as S,u as q,d as H,r as C,eq as L,q as N,cE as B,at as G,a as e,af as z,ag as f,F as m,ah as u,bu as K,o as Q,bp as U}from"../index-7380452a.js";const V=(v,s,o)=>{const i=Object.entries(v).map(([a,t])=>{const r=o.get(a);if(typeof t=="boolean")return[a,t];if(r)return[a,S(t).add([s,"No reason"]).toJS()];{const d=S(t).find(p=>p[0]===s);return d?[a,S(t).delete(d).toJS()]:[a,t]}});return Object.fromEntries(i)},W=(v,s)=>(o,i)=>o(O()).then(()=>{const a=i().admin.get("configs"),t=k.toSimplePolicy(a),r=V(t,v,s),d=k.fromSimplePolicy(r,i);return o(T(d.toJS()))});var F=Q({mediaRemoval:{id:"edit_federation.media_removal",defaultMessage:"Strip media"},forceNsfw:{id:"edit_federation.force_nsfw",defaultMessage:"Force attachments to be marked sensitive"},unlisted:{id:"edit_federation.unlisted",defaultMessage:"Force posts unlisted"},followersOnly:{id:"edit_federation.followers_only",defaultMessage:"Hide posts except to followers"},save:{id:"edit_federation.save",defaultMessage:"Save"},success:{id:"edit_federation.success",defaultMessage:"{host} federation was updated"}}),Y=function(s){var o=s.host,i=s.onClose,a=q(),t=H(),r=C.useCallback(L(),[]),d=N(function(h){return r(h,o)}),p=C.useState(B()),R=G(p,2),_=R[0],M=R[1];C.useEffect(function(){M(d.get("federation"))},[d]);var g=function(b){return function(c){var w=c.target;M(_.set(b,w.checked))}},E=function(b){var c=b.target.checked,w=_.merge({avatar_removal:c,banner_removal:c,media_removal:c});M(w)},D=function(){t(W(o,_)).then(function(){return U.success(a.formatMessage(F.success,{host:o}))}).catch(function(){}),i()},n=_.toJS(),x=n.avatar_removal,I=n.banner_removal,A=n.federated_timeline_removal,y=n.followers_only,J=n.media_nsfw,j=n.media_removal,l=n.reject,P=x&&I&&j;return e(K,{onClose:i,title:o,confirmationAction:D,confirmationText:a.formatMessage(F.save)},void 0,e(z,{},void 0,e(f,{label:e(m,{id:"edit_federation.reject",defaultMessage:"Reject all activities"})},void 0,e(u,{checked:l,onChange:g("reject"),id:"reject"})),e(f,{label:e(m,{id:"edit_federation.media_removal",defaultMessage:"Strip media"})},void 0,e(u,{checked:P,onChange:E,id:"media_removal",disabled:l})),e(f,{label:e(m,{id:"edit_federation.force_nsfw",defaultMessage:"Force attachments to be marked sensitive"})},void 0,e(u,{checked:J,onChange:g("media_nsfw"),id:"media_nsfw",disabled:l||j})),e(f,{label:e(m,{id:"edit_federation.followers_only",defaultMessage:"Hide posts except to followers"})},void 0,e(u,{checked:y,onChange:g("followers_only"),id:"followers_only",disabled:l})),e(f,{label:e(m,{id:"edit_federation.unlisted",defaultMessage:"Force posts unlisted"})},void 0,e(u,{checked:A,onChange:g("federated_timeline_removal"),id:"federated_timeline_removal",disabled:l||y}))))};export{Y as default}; +import{em as O,en as k,eo as T,ep as S,u as q,d as H,r as C,eq as L,q as N,cE as B,at as G,a as e,af as z,ag as f,F as m,ah as u,bu as K,o as Q,bp as U}from"../index-be605fd2.js";const V=(v,s,o)=>{const i=Object.entries(v).map(([a,t])=>{const r=o.get(a);if(typeof t=="boolean")return[a,t];if(r)return[a,S(t).add([s,"No reason"]).toJS()];{const d=S(t).find(p=>p[0]===s);return d?[a,S(t).delete(d).toJS()]:[a,t]}});return Object.fromEntries(i)},W=(v,s)=>(o,i)=>o(O()).then(()=>{const a=i().admin.get("configs"),t=k.toSimplePolicy(a),r=V(t,v,s),d=k.fromSimplePolicy(r,i);return o(T(d.toJS()))});var F=Q({mediaRemoval:{id:"edit_federation.media_removal",defaultMessage:"Strip media"},forceNsfw:{id:"edit_federation.force_nsfw",defaultMessage:"Force attachments to be marked sensitive"},unlisted:{id:"edit_federation.unlisted",defaultMessage:"Force posts unlisted"},followersOnly:{id:"edit_federation.followers_only",defaultMessage:"Hide posts except to followers"},save:{id:"edit_federation.save",defaultMessage:"Save"},success:{id:"edit_federation.success",defaultMessage:"{host} federation was updated"}}),Y=function(s){var o=s.host,i=s.onClose,a=q(),t=H(),r=C.useCallback(L(),[]),d=N(function(h){return r(h,o)}),p=C.useState(B()),R=G(p,2),_=R[0],M=R[1];C.useEffect(function(){M(d.get("federation"))},[d]);var g=function(b){return function(c){var w=c.target;M(_.set(b,w.checked))}},E=function(b){var c=b.target.checked,w=_.merge({avatar_removal:c,banner_removal:c,media_removal:c});M(w)},D=function(){t(W(o,_)).then(function(){return U.success(a.formatMessage(F.success,{host:o}))}).catch(function(){}),i()},n=_.toJS(),x=n.avatar_removal,I=n.banner_removal,A=n.federated_timeline_removal,y=n.followers_only,J=n.media_nsfw,j=n.media_removal,l=n.reject,P=x&&I&&j;return e(K,{onClose:i,title:o,confirmationAction:D,confirmationText:a.formatMessage(F.save)},void 0,e(z,{},void 0,e(f,{label:e(m,{id:"edit_federation.reject",defaultMessage:"Reject all activities"})},void 0,e(u,{checked:l,onChange:g("reject"),id:"reject"})),e(f,{label:e(m,{id:"edit_federation.media_removal",defaultMessage:"Strip media"})},void 0,e(u,{checked:P,onChange:E,id:"media_removal",disabled:l})),e(f,{label:e(m,{id:"edit_federation.force_nsfw",defaultMessage:"Force attachments to be marked sensitive"})},void 0,e(u,{checked:J,onChange:g("media_nsfw"),id:"media_nsfw",disabled:l||j})),e(f,{label:e(m,{id:"edit_federation.followers_only",defaultMessage:"Hide posts except to followers"})},void 0,e(u,{checked:y,onChange:g("followers_only"),id:"followers_only",disabled:l})),e(f,{label:e(m,{id:"edit_federation.unlisted",defaultMessage:"Force posts unlisted"})},void 0,e(u,{checked:A,onChange:g("federated_timeline_removal"),id:"federated_timeline_removal",disabled:l||y}))))};export{Y as default}; diff --git a/packs/js/edit-filter-a7163632.js b/packs/js/edit-filter-eb79beb3.js similarity index 98% rename from packs/js/edit-filter-a7163632.js rename to packs/js/edit-filter-eb79beb3.js index 6ee325fd0..046f0e0c3 100644 --- a/packs/js/edit-filter-a7163632.js +++ b/packs/js/edit-filter-eb79beb3.js @@ -1 +1 @@ -import{u as te,a7 as Se,d as Ce,g as ke,r as o,at as d,bC as Fe,bD as Oe,a as e,aC as Ae,bE as Ee,bF as Y,bG as ae,bH as Ie,a2 as Te,y as C,F as k,af as Z,ag as h,ah as c,bI as je,aa as Ke,X as Pe,o as Ne,H as $,bJ as De,bK as He,bp as Re,bL as Ve,_ as re}from"../index-7380452a.js";import{S as Le}from"./streamfield-757f31b8.js";function ee(u,l){var s=Object.keys(u);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(u);l&&(a=a.filter(function(g){return Object.getOwnPropertyDescriptor(u,g).enumerable})),s.push.apply(s,a)}return s}function _(u){for(var l=1;lt.put(`/api/v1/groups/${s}`,i,{headers:{"Content-Type":"multipart/form-data"}}),{schema:ae});return{updateGroup:o,...n}}function $(s){const[t,o]=p.useState(s),n=typeof s=="string",i=d=>{o(d.target.value)};return p.useEffect(()=>{n&&o(s)},[n]),{value:t||"",onChange:i}}var Ee=function(t){return t&&fe(t)?void 0:t},Ae=function(t){return t&&he(t)?void 0:t},h=_e({heading:{id:"navigation_bar.edit_group",defaultMessage:"Edit Group"},groupNamePlaceholder:{id:"manage_group.fields.name_placeholder",defaultMessage:"Group Name"},groupDescriptionPlaceholder:{id:"manage_group.fields.description_placeholder",defaultMessage:"Description"},groupSaved:{id:"group.update.success",defaultMessage:"Group successfully saved"}}),Ce=function(t){var o,n,i=t.params.groupId,d=re(),y=se(),T=oe(i),e=T.group,U=T.isLoading,j=Te(i),q=j.updateGroup,B=Se(i),O=B.invalidate,W=p.useState(!1),E=w(W,2),_=E[0],A=E[1],X=p.useState([""]),M=w(X,2),c=M[0],m=M[1],b=L({maxPixels:400*400,preview:Ee(e==null?void 0:e.avatar)}),S=L({maxPixels:1920*1080,preview:Ae(e==null?void 0:e.header)}),I=$(e==null?void 0:e.display_name),N=$(e==null?void 0:e.note_plain),Z=Number(y.configuration.groups.max_characters_name),z=Number(y.configuration.groups.max_characters_description),P=(o=(n=ne(function(r){return r.instance.configuration.media_attachments.supported_mime_types}))===null||n===void 0?void 0:n.filter(function(r){return r.startsWith("image/")}).join(","))!==null&&o!==void 0?o:"";function J(){return G.apply(this,arguments)}function G(){return G=be(regeneratorRuntime.mark(function r(){return regeneratorRuntime.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return A(!0),u.next=3,q({display_name:I.value,note:N.value,avatar:b.file===null?"":b.file,header:S.file===null?"":S.file,tags:c},{onSuccess:function(){O(),k.success(d.formatMessage(h.groupSaved))},onError:function(D){var l,x,F=(l=D.response)===null||l===void 0||(l=l.data)===null||l===void 0?void 0:l.error;((x=D.response)===null||x===void 0?void 0:x.status)===422&&typeof F<"u"&&k.error(F)}});case 3:A(!1);case 4:case"end":return u.stop()}},r)})),G.apply(this,arguments)}var K=function(){m([].concat(H(c),[""]))},Q=function(R){var u=H(c);u.splice(R,1),m(u)};return p.useEffect(function(){e&&m(e.tags.map(function(r){return r.name}))},[e==null?void 0:e.id]),U?a(ie,{}):a(ge,{label:d.formatMessage(h.heading)},void 0,a(ue,{onSubmit:J},void 0,a("div",{className:"relative mb-12 flex"},void 0,v.createElement(Ge,g({accept:P,disabled:_},S)),v.createElement(xe,g({accept:P,disabled:_},b))),a(C,{labelText:a(f,{id:"manage_group.fields.name_label_optional",defaultMessage:"Group name"}),hintText:a(f,{id:"manage_group.fields.cannot_change_hint",defaultMessage:"This cannot be changed after the group is created."})},void 0,v.createElement(de,g({type:"text",placeholder:d.formatMessage(h.groupNamePlaceholder),maxLength:Z},I,{append:a(le,{className:"h-5 w-5 text-gray-600",src:pe}),disabled:!0}))),a(C,{labelText:a(f,{id:"manage_group.fields.description_label",defaultMessage:"Description"})},void 0,v.createElement(ce,g({autoComplete:"off",placeholder:d.formatMessage(h.groupDescriptionPlaceholder),maxLength:z},N))),a("div",{className:"pb-6"},void 0,a(ye,{tags:c,onChange:m,onAddItem:K,onRemoveItem:Q})),a(me,{},void 0,a(ve,{theme:"primary",type:"submit",disabled:_,block:!0},void 0,a(f,{id:"edit_profile.save",defaultMessage:"Save"})))))};export{Ce as default}; +import{bj as Y,kN as ee,bl as ae,bm as te,r as p,u as re,t as se,e9 as oe,at as w,q as ne,a,aB as ie,bE as ue,R as v,av as g,bF as C,F as f,bG as de,A as le,dc as pe,bZ as ce,bI as me,aa as ve,X as ge,f2 as fe,f3 as he,o as _e,aP as be,bp as k,bL as H}from"../index-be605fd2.js";import"./es.array.splice-adb98933.js";import{u as Se}from"./useGroupTags-a5aa31b5.js";import{u as L}from"./useImageField-712debc5.js";import{H as Ge,A as xe}from"./header-picker-cd9089b7.js";import{G as ye}from"./group-tags-field-13c248c9.js";import"./photo-plus-14444f2c.js";import"./streamfield-6197ce03.js";function Te(s){const t=Y(),{createEntity:o,...n}=ee([te.GROUPS],i=>t.put(`/api/v1/groups/${s}`,i,{headers:{"Content-Type":"multipart/form-data"}}),{schema:ae});return{updateGroup:o,...n}}function $(s){const[t,o]=p.useState(s),n=typeof s=="string",i=d=>{o(d.target.value)};return p.useEffect(()=>{n&&o(s)},[n]),{value:t||"",onChange:i}}var Ee=function(t){return t&&fe(t)?void 0:t},Ae=function(t){return t&&he(t)?void 0:t},h=_e({heading:{id:"navigation_bar.edit_group",defaultMessage:"Edit Group"},groupNamePlaceholder:{id:"manage_group.fields.name_placeholder",defaultMessage:"Group Name"},groupDescriptionPlaceholder:{id:"manage_group.fields.description_placeholder",defaultMessage:"Description"},groupSaved:{id:"group.update.success",defaultMessage:"Group successfully saved"}}),Ce=function(t){var o,n,i=t.params.groupId,d=re(),y=se(),T=oe(i),e=T.group,U=T.isLoading,j=Te(i),q=j.updateGroup,B=Se(i),O=B.invalidate,W=p.useState(!1),E=w(W,2),_=E[0],A=E[1],X=p.useState([""]),M=w(X,2),c=M[0],m=M[1],b=L({maxPixels:400*400,preview:Ee(e==null?void 0:e.avatar)}),S=L({maxPixels:1920*1080,preview:Ae(e==null?void 0:e.header)}),I=$(e==null?void 0:e.display_name),N=$(e==null?void 0:e.note_plain),Z=Number(y.configuration.groups.max_characters_name),z=Number(y.configuration.groups.max_characters_description),P=(o=(n=ne(function(r){return r.instance.configuration.media_attachments.supported_mime_types}))===null||n===void 0?void 0:n.filter(function(r){return r.startsWith("image/")}).join(","))!==null&&o!==void 0?o:"";function J(){return G.apply(this,arguments)}function G(){return G=be(regeneratorRuntime.mark(function r(){return regeneratorRuntime.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return A(!0),u.next=3,q({display_name:I.value,note:N.value,avatar:b.file===null?"":b.file,header:S.file===null?"":S.file,tags:c},{onSuccess:function(){O(),k.success(d.formatMessage(h.groupSaved))},onError:function(D){var l,x,F=(l=D.response)===null||l===void 0||(l=l.data)===null||l===void 0?void 0:l.error;((x=D.response)===null||x===void 0?void 0:x.status)===422&&typeof F<"u"&&k.error(F)}});case 3:A(!1);case 4:case"end":return u.stop()}},r)})),G.apply(this,arguments)}var K=function(){m([].concat(H(c),[""]))},Q=function(R){var u=H(c);u.splice(R,1),m(u)};return p.useEffect(function(){e&&m(e.tags.map(function(r){return r.name}))},[e==null?void 0:e.id]),U?a(ie,{}):a(ge,{label:d.formatMessage(h.heading)},void 0,a(ue,{onSubmit:J},void 0,a("div",{className:"relative mb-12 flex"},void 0,v.createElement(Ge,g({accept:P,disabled:_},S)),v.createElement(xe,g({accept:P,disabled:_},b))),a(C,{labelText:a(f,{id:"manage_group.fields.name_label_optional",defaultMessage:"Group name"}),hintText:a(f,{id:"manage_group.fields.cannot_change_hint",defaultMessage:"This cannot be changed after the group is created."})},void 0,v.createElement(de,g({type:"text",placeholder:d.formatMessage(h.groupNamePlaceholder),maxLength:Z},I,{append:a(le,{className:"h-5 w-5 text-gray-600",src:pe}),disabled:!0}))),a(C,{labelText:a(f,{id:"manage_group.fields.description_label",defaultMessage:"Description"})},void 0,v.createElement(ce,g({autoComplete:"off",placeholder:d.formatMessage(h.groupDescriptionPlaceholder),maxLength:z},N))),a("div",{className:"pb-6"},void 0,a(ye,{tags:c,onChange:m,onAddItem:K,onRemoveItem:Q})),a(me,{},void 0,a(ve,{theme:"primary",type:"submit",disabled:_,block:!0},void 0,a(f,{id:"edit_profile.save",defaultMessage:"Save"})))))};export{Ce as default}; diff --git a/packs/js/embed-modal-2c187d85.js b/packs/js/embed-modal-5ddfa846.js similarity index 97% rename from packs/js/embed-modal-2c187d85.js rename to packs/js/embed-modal-5ddfa846.js index d8fa0088b..5fcc192d6 100644 --- a/packs/js/embed-modal-2c187d85.js +++ b/packs/js/embed-modal-5ddfa846.js @@ -1 +1 @@ -import{r as c,a as t,R as y,bG as w,H as C,aa as x,F as f,at as M,bj as S,cs as N,d as I,er as R,a2 as k,y as D,bu as H,bv as A}from"../index-7380452a.js";var T=function(a){var d=a.value,l=c.useRef(null),i=function(){var e;(e=l.current)===null||e===void 0||e.select(),navigator.clipboard?navigator.clipboard.writeText(d):document.execCommand("copy")};return t(C,{alignItems:"center"},void 0,y.createElement(w,{ref:l,type:"text",value:d,className:"rounded-r-none rtl:rounded-l-none rtl:rounded-r-lg",outerClassName:"grow",onClick:i,readOnly:!0}),t(x,{theme:"primary",className:"mt-1 h-full rounded-l-none rounded-r-lg rtl:rounded-l-lg rtl:rounded-r-none",onClick:i},void 0,t(f,{id:"input.copy",defaultMessage:"Copy"})))},W=function(a){var d=a.className,l=a.sandbox,i=a.title,s=a.html,e=c.useRef(null),p=c.useState(void 0),m=M(p,2),b=m[0],g=m[1],E=c.useCallback(function(r){var o;if(((o=r.data)===null||o===void 0?void 0:o.type)==="setHeight"){var n;g((n=r.data)===null||n===void 0?void 0:n.height)}},[]);return c.useEffect(function(){var r,o=(r=e.current)===null||r===void 0||(r=r.contentWindow)===null||r===void 0?void 0:r.document;if(o&&s){var n;o.open(),o.write(s),o.close(),o.body.style.margin="0",(n=e.current)===null||n===void 0||(n=n.contentWindow)===null||n===void 0||n.addEventListener("message",E);var h=o.querySelector("iframe");h&&(h.width="100%")}return function(){var u;(u=e.current)===null||u===void 0||(u=u.contentWindow)===null||u===void 0||u.removeEventListener("message",E)}},[e.current,s]),y.createElement("iframe",{ref:e,className:d,sandbox:l,height:b,title:i})};function B(v){const a=S();return N(["embed",v],async()=>{const{data:l}=await a.get("/api/oembed",{params:{url:v}});return l})}var j=function(a){var d=a.url,l=a.onError,i=I(),s=B(d),e=s.data,p=s.error,m=s.isError;c.useEffect(function(){p&&m&&l(p)},[m]);var b=function(){i(A("EMBED"))};return t(H,{title:t(f,{id:"status.embed",defaultMessage:"Embed post"}),onClose:b},void 0,t(k,{space:4},void 0,t(D,{theme:"muted"},void 0,t(f,{id:"embed.instructions",defaultMessage:"Embed this post on your website by copying the code below."})),t(T,{value:(e==null?void 0:e.html)||""})),t("div",{className:"py-9"},void 0,t(R,{})),t(W,{className:"w-full overflow-hidden rounded-xl",sandbox:"allow-same-origin allow-scripts",title:"embedded-status",html:e==null?void 0:e.html}))};export{j as default}; +import{r as c,a as t,R as y,bG as w,H as C,aa as x,F as f,at as M,bj as S,cs as N,d as I,er as R,a2 as k,y as D,bu as H,bv as A}from"../index-be605fd2.js";var T=function(a){var d=a.value,l=c.useRef(null),i=function(){var e;(e=l.current)===null||e===void 0||e.select(),navigator.clipboard?navigator.clipboard.writeText(d):document.execCommand("copy")};return t(C,{alignItems:"center"},void 0,y.createElement(w,{ref:l,type:"text",value:d,className:"rounded-r-none rtl:rounded-l-none rtl:rounded-r-lg",outerClassName:"grow",onClick:i,readOnly:!0}),t(x,{theme:"primary",className:"mt-1 h-full rounded-l-none rounded-r-lg rtl:rounded-l-lg rtl:rounded-r-none",onClick:i},void 0,t(f,{id:"input.copy",defaultMessage:"Copy"})))},W=function(a){var d=a.className,l=a.sandbox,i=a.title,s=a.html,e=c.useRef(null),p=c.useState(void 0),m=M(p,2),b=m[0],g=m[1],E=c.useCallback(function(r){var o;if(((o=r.data)===null||o===void 0?void 0:o.type)==="setHeight"){var n;g((n=r.data)===null||n===void 0?void 0:n.height)}},[]);return c.useEffect(function(){var r,o=(r=e.current)===null||r===void 0||(r=r.contentWindow)===null||r===void 0?void 0:r.document;if(o&&s){var n;o.open(),o.write(s),o.close(),o.body.style.margin="0",(n=e.current)===null||n===void 0||(n=n.contentWindow)===null||n===void 0||n.addEventListener("message",E);var h=o.querySelector("iframe");h&&(h.width="100%")}return function(){var u;(u=e.current)===null||u===void 0||(u=u.contentWindow)===null||u===void 0||u.removeEventListener("message",E)}},[e.current,s]),y.createElement("iframe",{ref:e,className:d,sandbox:l,height:b,title:i})};function B(v){const a=S();return N(["embed",v],async()=>{const{data:l}=await a.get("/api/oembed",{params:{url:v}});return l})}var j=function(a){var d=a.url,l=a.onError,i=I(),s=B(d),e=s.data,p=s.error,m=s.isError;c.useEffect(function(){p&&m&&l(p)},[m]);var b=function(){i(A("EMBED"))};return t(H,{title:t(f,{id:"status.embed",defaultMessage:"Embed post"}),onClose:b},void 0,t(k,{space:4},void 0,t(D,{theme:"muted"},void 0,t(f,{id:"embed.instructions",defaultMessage:"Embed this post on your website by copying the code below."})),t(T,{value:(e==null?void 0:e.html)||""})),t("div",{className:"py-9"},void 0,t(R,{})),t(W,{className:"w-full overflow-hidden rounded-xl",sandbox:"allow-same-origin allow-scripts",title:"embedded-status",html:e==null?void 0:e.html}))};export{j as default}; diff --git a/packs/js/emoji-picker-2ef1c775.js b/packs/js/emoji-picker-7d9d02c1.js similarity index 99% rename from packs/js/emoji-picker-2ef1c775.js rename to packs/js/emoji-picker-7d9d02c1.js index 6e131472a..b89bf691f 100644 --- a/packs/js/emoji-picker-2ef1c775.js +++ b/packs/js/emoji-picker-7d9d02c1.js @@ -1,4 +1,4 @@ -import{r as ae,R as rt,_ as it,e as ot,j as st}from"../index-7380452a.js";const at="/packs/assets/32-2c0f5493.png";function Re(t){return t&&t.__esModule?t.default:t}function x(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var K,v,Pe,D,De,ce,V={},Be=[],ct=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function M(t,e){for(var n in e)t[n]=e[n];return t}function He(t){var e=t.parentNode;e&&e.removeChild(t)}function Q(t,e,n){var r,o,i,s={};for(i in e)i=="key"?r=e[i]:i=="ref"?o=e[i]:s[i]=e[i];if(arguments.length>2&&(s.children=arguments.length>3?K.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)s[i]===void 0&&(s[i]=t.defaultProps[i]);return A(t,s,r,o,null)}function A(t,e,n,r,o){var i={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o??++Pe};return o==null&&v.vnode!=null&&v.vnode(i),i}function j(){return{current:null}}function R(t){return t.children}function S(t,e){this.props=t,this.context=e}function P(t,e){if(e==null)return t.__?P(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e0?A(f.type,f.props,f.key,null,f.__v):f)!=null){if(f.__=n,f.__b=n.__b+1,(h=$[a])===null||h&&f.key==h.key&&f.type===h.type)$[a]=void 0;else for(p=0;p{let t=null;try{navigator.userAgent.includes("jsdom")||(t=document.createElement("canvas").getContext("2d",{willReadFrequently:!0}))}catch{}if(!t)return()=>!1;const e=25,n=20,r=Math.floor(e/2);return t.font=r+"px Arial, Sans-Serif",t.textBaseline="top",t.canvas.width=n*2,t.canvas.height=e,o=>{t.clearRect(0,0,n*2,e),t.fillStyle="#FF0000",t.fillText(o,0,22),t.fillStyle="#0000FF",t.fillText(o,n,22);const i=t.getImageData(0,0,n,e).data,s=i.length;let l=0;for(;l=s)return!1;const c=n+l/4%n,u=Math.floor(l/4/n),a=t.getImageData(c,u,1,1).data;return!(i[l]!==a[0]||i[l+2]!==a[2]||t.measureText(o).width>=n)}})();var fe={latestVersion:gt,noCountryFlags:_t};const ee=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart"];let k=null;function mt(t){k||(k=L.get("frequently")||{});const e=t.id||t;e&&(k[e]||(k[e]=0),k[e]+=1,L.set("last",e),L.set("frequently",k))}function $t({maxFrequentRows:t,perLine:e}){if(!t)return[];k||(k=L.get("frequently"));let n=[];if(!k){k={};for(let i in ee.slice(0,e)){const s=ee[i];k[s]=e-i,n.push(s)}return n}const r=t*e,o=L.get("last");for(let i in k)n.push(i);if(n.sort((i,s)=>{const l=k[s],c=k[i];return l==c?i.localeCompare(s):l-c}),n.length>r){const i=n.slice(r);n=n.slice(0,r);for(let s of i)s!=o&&delete k[s];o&&n.indexOf(o)==-1&&(delete k[n[n.length-1]],n.splice(-1,1,o)),L.set("frequently",k)}return n}var qe={add:mt,get:$t,DEFAULTS:ee},Ke={};Ke=JSON.parse('{"search":"Search","search_no_results_1":"Oh no!","search_no_results_2":"That emoji couldn’t be found","pick":"Pick an emoji…","add_custom":"Add custom emoji","categories":{"activity":"Activity","custom":"Custom","flags":"Flags","foods":"Food & Drink","frequent":"Frequently used","nature":"Animals & Nature","objects":"Objects","people":"Smileys & People","places":"Travel & Places","search":"Search Results","symbols":"Symbols"},"skins":{"1":"Default","2":"Light","3":"Medium-Light","4":"Medium","5":"Medium-Dark","6":"Dark","choose":"Choose default skin tone"}}');var z={autoFocus:{value:!1},dynamicWidth:{value:!1},emojiButtonColors:{value:null},emojiButtonRadius:{value:"100%"},emojiButtonSize:{value:36},emojiSize:{value:24},emojiVersion:{value:14,choices:[1,2,3,4,5,11,12,12.1,13,13.1,14]},exceptEmojis:{value:[]},icons:{value:"auto",choices:["auto","outline","solid"]},locale:{value:"en",choices:["en","ar","be","cs","de","es","fa","fi","fr","hi","it","ja","kr","nl","pl","pt","ru","sa","tr","uk","vi","zh"]},maxFrequentRows:{value:4},navPosition:{value:"top",choices:["top","bottom","none"]},noCountryFlags:{value:!1},noResultsEmoji:{value:null},perLine:{value:9},previewEmoji:{value:null},previewPosition:{value:"bottom",choices:["top","bottom","none"]},searchPosition:{value:"sticky",choices:["sticky","static","none"]},set:{value:"native",choices:["native","apple","facebook","google","twitter"]},skin:{value:1,choices:[1,2,3,4,5,6]},skinTonePosition:{value:"preview",choices:["preview","search","none"]},theme:{value:"auto",choices:["auto","light","dark"]},categories:null,categoryIcons:null,custom:null,data:null,i18n:null,getImageURL:null,getSpritesheetURL:null,onAddCustomEmoji:null,onClickOutside:null,onEmojiSelect:null,stickySearch:{deprecated:!0,value:!0}};let w=null,_=null;const J={};async function pe(t){if(J[t])return J[t];const n=await(await fetch(t)).json();return J[t]=n,n}let Y=null,Ge=null,Xe=!1;function G(t,{caller:e}={}){return Y||(Y=new Promise(n=>{Ge=n})),t?kt(t):e&&!Xe&&console.warn(`\`${e}\` requires data to be initialized first. Promise will be pending until \`init\` is called.`),Y}async function kt(t){Xe=!0;let{emojiVersion:e,set:n,locale:r}=t;if(e||(e=z.emojiVersion.value),n||(n=z.set.value),r||(r=z.locale.value),_)_.categories=_.categories.filter(c=>!c.name);else{_=(typeof t.data=="function"?await t.data():t.data)||await pe(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${e}/${n}.json`),_.emoticons={},_.natives={},_.categories.unshift({id:"frequent",emojis:[]});for(const c in _.aliases){const u=_.aliases[c],a=_.emojis[u];a&&(a.aliases||(a.aliases=[]),a.aliases.push(c))}_.originalCategories=_.categories}if(w=(typeof t.i18n=="function"?await t.i18n():t.i18n)||(r=="en"?Re(Ke):await pe(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${r}.json`)),t.custom)for(let c in t.custom){c=parseInt(c);const u=t.custom[c],a=t.custom[c-1];if(!(!u.emojis||!u.emojis.length)){u.id||(u.id=`custom_${c+1}`),u.name||(u.name=w.categories.custom),a&&!u.icon&&(u.target=a.target||a),_.categories.push(u);for(const p of u.emojis)_.emojis[p.id]=p}}t.categories&&(_.categories=_.originalCategories.filter(c=>t.categories.indexOf(c.id)!=-1).sort((c,u)=>{const a=t.categories.indexOf(c.id),p=t.categories.indexOf(u.id);return a-p}));let o=null,i=null;n=="native"&&(o=fe.latestVersion(),i=t.noCountryFlags||fe.noCountryFlags());let s=_.categories.length,l=!1;for(;s--;){const c=_.categories[s];if(c.id=="frequent"){let{maxFrequentRows:p,perLine:h}=t;p=p>=0?p:z.maxFrequentRows.value,h||(h=z.perLine.value),c.emojis=qe.get({maxFrequentRows:p,perLine:h})}if(!c.emojis||!c.emojis.length){_.categories.splice(s,1);continue}const{categoryIcons:u}=t;if(u){const p=u[c.id];p&&!c.icon&&(c.icon=p)}let a=c.emojis.length;for(;a--;){const p=c.emojis[a],h=p.id?p:_.emojis[p],f=()=>{c.emojis.splice(a,1)};if(!h||t.exceptEmojis&&t.exceptEmojis.includes(h.id)){f();continue}if(o&&h.version>o){f();continue}if(i&&c.id=="flags"&&!St.includes(h.id)){f();continue}if(!h.search){if(l=!0,h.search=","+[[h.id,!1],[h.name,!0],[h.keywords,!1],[h.emoticons,!1]].map(([m,b])=>{if(m)return(Array.isArray(m)?m:[m]).map($=>(b?$.split(/[-|_|\s]+/):[$]).map(y=>y.toLowerCase())).flat()}).flat().filter(m=>m&&m.trim()).join(","),h.emoticons)for(const m of h.emoticons)_.emoticons[m]||(_.emoticons[m]=h.id);let g=0;for(const m of h.skins){if(!m)continue;g++;const{native:b}=m;b&&(_.natives[b]=h.id,h.search+=`,${b}`);const $=g==1?"":`:skin-tone-${g}:`;m.shortcodes=`:${h.id}:${$}`}}}}l&&E.reset(),Ge()}function Je(t,e,n){t||(t={});const r={};for(let o in e)r[o]=Ye(o,t,e,n);return r}function Ye(t,e,n,r){const o=n[t];let i=r&&r.getAttribute(t)||(e[t]!=null&&e[t]!=null?e[t]:null);return o&&(i!=null&&o.value&&typeof o.value!=typeof i&&(typeof o.value=="boolean"?i=i!="false":i=o.value.constructor(i)),o.transform&&i&&(i=o.transform(i)),(i==null||o.choices&&o.choices.indexOf(i)==-1)&&(i=o.value)),i}const wt=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/;let te=null;function yt(t){return t.id?t:_.emojis[t]||_.emojis[_.aliases[t]]||_.emojis[_.natives[t]]}function xt(){te=null}async function Ct(t,{maxResults:e,caller:n}={}){if(!t||!t.trim().length)return null;e||(e=90),await G(null,{caller:n||"SearchIndex.search"});const r=t.toLowerCase().replace(/(\w)-/,"$1 ").split(/[\s|,]+/).filter((l,c,u)=>l.trim()&&u.indexOf(l)==c);if(!r.length)return;let o=te||(te=Object.values(_.emojis)),i,s;for(const l of r){if(!o.length)break;i=[],s={};for(const c of o){if(!c.search)continue;const u=c.search.indexOf(`,${l}`);u!=-1&&(i.push(c),s[c.id]||(s[c.id]=0),s[c.id]+=c.id==l?0:u+1)}o=i}return i.length<2||(i.sort((l,c)=>{const u=s[l.id],a=s[c.id];return u==a?l.id.localeCompare(c.id):u-a}),i.length>e&&(i=i.slice(0,e))),i}var E={search:Ct,get:yt,reset:xt,SHORTCODES_REGEX:wt};const St=["checkered_flag","crossed_flags","pirate_flag","rainbow-flag","transgender_flag","triangular_flag_on_post","waving_black_flag","waving_white_flag"];function jt(t,e){return Array.isArray(t)&&Array.isArray(e)&&t.length===e.length&&t.every((n,r)=>n==e[r])}async function zt(t=1){for(let e in[...Array(t).keys()])await new Promise(requestAnimationFrame)}function Mt(t,{skinIndex:e=0}={}){const n=t.skins[e]||(()=>(e=0,t.skins[e]))(),r={id:t.id,name:t.name,native:n.native,unified:n.unified,keywords:t.keywords,shortcodes:n.shortcodes||t.shortcodes};return t.skins.length>1&&(r.skin=e+1),n.src&&(r.src=n.src),t.aliases&&t.aliases.length&&(r.aliases=t.aliases),t.emoticons&&t.emoticons.length&&(r.emoticons=t.emoticons),r}const Lt={activity:{outline:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:d("path",{d:"M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"})}),solid:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:d("path",{d:"M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z"})})},custom:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:d("path",{d:"M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z"})}),flags:{outline:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:d("path",{d:"M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"})}),solid:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:d("path",{d:"M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"})})},foods:{outline:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:d("path",{d:"M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"})}),solid:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:d("path",{d:"M481.9 270.1C490.9 279.1 496 291.3 496 304C496 316.7 490.9 328.9 481.9 337.9C472.9 346.9 460.7 352 448 352H64C51.27 352 39.06 346.9 30.06 337.9C21.06 328.9 16 316.7 16 304C16 291.3 21.06 279.1 30.06 270.1C39.06 261.1 51.27 256 64 256H448C460.7 256 472.9 261.1 481.9 270.1zM475.3 388.7C478.3 391.7 480 395.8 480 400V416C480 432.1 473.3 449.3 461.3 461.3C449.3 473.3 432.1 480 416 480H96C79.03 480 62.75 473.3 50.75 461.3C38.74 449.3 32 432.1 32 416V400C32 395.8 33.69 391.7 36.69 388.7C39.69 385.7 43.76 384 48 384H464C468.2 384 472.3 385.7 475.3 388.7zM50.39 220.8C45.93 218.6 42.03 215.5 38.97 211.6C35.91 207.7 33.79 203.2 32.75 198.4C31.71 193.5 31.8 188.5 32.99 183.7C54.98 97.02 146.5 32 256 32C365.5 32 457 97.02 479 183.7C480.2 188.5 480.3 193.5 479.2 198.4C478.2 203.2 476.1 207.7 473 211.6C469.1 215.5 466.1 218.6 461.6 220.8C457.2 222.9 452.3 224 447.3 224H64.67C59.73 224 54.84 222.9 50.39 220.8zM372.7 116.7C369.7 119.7 368 123.8 368 128C368 131.2 368.9 134.3 370.7 136.9C372.5 139.5 374.1 141.6 377.9 142.8C380.8 143.1 384 144.3 387.1 143.7C390.2 143.1 393.1 141.6 395.3 139.3C397.6 137.1 399.1 134.2 399.7 131.1C400.3 128 399.1 124.8 398.8 121.9C397.6 118.1 395.5 116.5 392.9 114.7C390.3 112.9 387.2 111.1 384 111.1C379.8 111.1 375.7 113.7 372.7 116.7V116.7zM244.7 84.69C241.7 87.69 240 91.76 240 96C240 99.16 240.9 102.3 242.7 104.9C244.5 107.5 246.1 109.6 249.9 110.8C252.8 111.1 256 112.3 259.1 111.7C262.2 111.1 265.1 109.6 267.3 107.3C269.6 105.1 271.1 102.2 271.7 99.12C272.3 96.02 271.1 92.8 270.8 89.88C269.6 86.95 267.5 84.45 264.9 82.7C262.3 80.94 259.2 79.1 256 79.1C251.8 79.1 247.7 81.69 244.7 84.69V84.69zM116.7 116.7C113.7 119.7 112 123.8 112 128C112 131.2 112.9 134.3 114.7 136.9C116.5 139.5 118.1 141.6 121.9 142.8C124.8 143.1 128 144.3 131.1 143.7C134.2 143.1 137.1 141.6 139.3 139.3C141.6 137.1 143.1 134.2 143.7 131.1C144.3 128 143.1 124.8 142.8 121.9C141.6 118.1 139.5 116.5 136.9 114.7C134.3 112.9 131.2 111.1 128 111.1C123.8 111.1 119.7 113.7 116.7 116.7L116.7 116.7z"})})},frequent:{outline:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[d("path",{d:"M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"}),d("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"})]}),solid:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:d("path",{d:"M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"})})},nature:{outline:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[d("path",{d:"M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"}),d("path",{d:"M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"})]}),solid:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:d("path",{d:"M332.7 19.85C334.6 8.395 344.5 0 356.1 0C363.6 0 370.6 3.52 375.1 9.502L392 32H444.1C456.8 32 469.1 37.06 478.1 46.06L496 64H552C565.3 64 576 74.75 576 88V112C576 156.2 540.2 192 496 192H426.7L421.6 222.5L309.6 158.5L332.7 19.85zM448 64C439.2 64 432 71.16 432 80C432 88.84 439.2 96 448 96C456.8 96 464 88.84 464 80C464 71.16 456.8 64 448 64zM416 256.1V480C416 497.7 401.7 512 384 512H352C334.3 512 320 497.7 320 480V364.8C295.1 377.1 268.8 384 240 384C211.2 384 184 377.1 160 364.8V480C160 497.7 145.7 512 128 512H96C78.33 512 64 497.7 64 480V249.8C35.23 238.9 12.64 214.5 4.836 183.3L.9558 167.8C-3.331 150.6 7.094 133.2 24.24 128.1C41.38 124.7 58.76 135.1 63.05 152.2L66.93 167.8C70.49 182 83.29 191.1 97.97 191.1H303.8L416 256.1z"})})},objects:{outline:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[d("path",{d:"M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"}),d("path",{d:"M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"})]}),solid:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:d("path",{d:"M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"})})},people:{outline:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[d("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"}),d("path",{d:"M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"})]}),solid:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:d("path",{d:"M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256 432C332.1 432 396.2 382 415.2 314.1C419.1 300.4 407.8 288 393.6 288H118.4C104.2 288 92.92 300.4 96.76 314.1C115.8 382 179.9 432 256 432V432zM176.4 160C158.7 160 144.4 174.3 144.4 192C144.4 209.7 158.7 224 176.4 224C194 224 208.4 209.7 208.4 192C208.4 174.3 194 160 176.4 160zM336.4 224C354 224 368.4 209.7 368.4 192C368.4 174.3 354 160 336.4 160C318.7 160 304.4 174.3 304.4 192C304.4 209.7 318.7 224 336.4 224z"})})},places:{outline:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[d("path",{d:"M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"}),d("path",{d:"M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"})]}),solid:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:d("path",{d:"M39.61 196.8L74.8 96.29C88.27 57.78 124.6 32 165.4 32H346.6C387.4 32 423.7 57.78 437.2 96.29L472.4 196.8C495.6 206.4 512 229.3 512 256V448C512 465.7 497.7 480 480 480H448C430.3 480 416 465.7 416 448V400H96V448C96 465.7 81.67 480 64 480H32C14.33 480 0 465.7 0 448V256C0 229.3 16.36 206.4 39.61 196.8V196.8zM109.1 192H402.9L376.8 117.4C372.3 104.6 360.2 96 346.6 96H165.4C151.8 96 139.7 104.6 135.2 117.4L109.1 192zM96 256C78.33 256 64 270.3 64 288C64 305.7 78.33 320 96 320C113.7 320 128 305.7 128 288C128 270.3 113.7 256 96 256zM416 320C433.7 320 448 305.7 448 288C448 270.3 433.7 256 416 256C398.3 256 384 270.3 384 288C384 305.7 398.3 320 416 320z"})})},symbols:{outline:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:d("path",{d:"M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"})}),solid:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:d("path",{d:"M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"})})}},Et={loupe:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:d("path",{d:"M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"})}),delete:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:d("path",{d:"M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"})})};var W={categories:Lt,search:Et};function ne(t){let{id:e,skin:n,emoji:r}=t;if(t.shortcodes){const l=t.shortcodes.match(E.SHORTCODES_REGEX);l&&(e=l[1],l[2]&&(n=l[2]))}if(r||(r=E.get(e||t.native)),!r)return t.fallback;const o=r.skins[n-1]||r.skins[0],i=o.src||(t.set!="native"&&!t.spritesheet?typeof t.getImageURL=="function"?t.getImageURL(t.set,o.unified):`https://cdn.jsdelivr.net/npm/emoji-datasource-${t.set}@14.0.0/img/${t.set}/64/${o.unified}.png`:void 0),s=typeof t.getSpritesheetURL=="function"?t.getSpritesheetURL(t.set):`https://cdn.jsdelivr.net/npm/emoji-datasource-${t.set}@14.0.0/img/${t.set}/sheets-256/64.png`;return d("span",{class:"emoji-mart-emoji","data-emoji-set":t.set,children:i?d("img",{style:{maxWidth:t.size||"1em",maxHeight:t.size||"1em",display:"inline-block"},alt:o.native||o.shortcodes,src:i}):t.set=="native"?d("span",{style:{fontSize:t.size,fontFamily:'"EmojiMart", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"'},children:o.native}):d("span",{style:{display:"block",width:t.size,height:t.size,backgroundImage:`url(${s})`,backgroundSize:`${100*_.sheet.cols}% ${100*_.sheet.rows}%`,backgroundPosition:`${100/(_.sheet.cols-1)*o.x}% ${100/(_.sheet.rows-1)*o.y}%`}})})}const Rt=typeof window<"u"&&window.HTMLElement?window.HTMLElement:Object;class Ze extends Rt{static get observedAttributes(){return Object.keys(this.Props)}update(e={}){for(let n in e)this.attributeChangedCallback(n,null,e[n])}attributeChangedCallback(e,n,r){if(!this.component)return;const o=Ye(e,{[e]:r},this.constructor.Props,this);this.component.componentWillReceiveProps?this.component.componentWillReceiveProps({[e]:o}):(this.component.props[e]=o,this.component.forceUpdate())}disconnectedCallback(){this.disconnected=!0,this.component&&this.component.unregister&&this.component.unregister()}constructor(e={}){if(super(),this.props=e,e.parent||e.ref){let n=null;const r=e.parent||(n=e.ref&&e.ref.current);n&&(n.innerHTML=""),r&&r.appendChild(this)}}}class Pt extends Ze{setShadow(){this.attachShadow({mode:"open"})}injectStyles(e){if(!e)return;const n=document.createElement("style");n.textContent=e,n.nonce=window.__webpack_nonce__,this.shadowRoot.insertBefore(n,this.shadowRoot.firstChild)}constructor(e,{styles:n}={}){super(e),this.setShadow(),this.injectStyles(n)}}var Qe={fallback:"",id:"",native:"",shortcodes:"",size:{value:"",transform:t=>/\D/.test(t)?t:`${t}px`},set:z.set,skin:z.skin};class et extends Ze{async connectedCallback(){const e=Je(this.props,Qe,this);e.element=this,e.ref=n=>{this.component=n},await G(),!this.disconnected&&Ne(d(ne,{...e}),this)}constructor(e){super(e)}}x(et,"Props",Qe);typeof customElements<"u"&&!customElements.get("em-emoji")&&customElements.define("em-emoji",et);var ve,re=[],ge=v.__b,_e=v.__r,be=v.diffed,me=v.__c,$e=v.unmount;function Dt(){var t;for(re.sort(function(e,n){return e.__v.__b-n.__v.__b});t=re.pop();)if(t.__P)try{t.__H.__h.forEach(I),t.__H.__h.forEach(ie),t.__H.__h=[]}catch(e){t.__H.__h=[],v.__e(e,t.__v)}}v.__b=function(t){ge&&ge(t)},v.__r=function(t){_e&&_e(t);var e=t.__c.__H;e&&(e.__h.forEach(I),e.__h.forEach(ie),e.__h=[])},v.diffed=function(t){be&&be(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(re.push(e)!==1&&ve===v.requestAnimationFrame||((ve=v.requestAnimationFrame)||function(n){var r,o=function(){clearTimeout(i),ke&&cancelAnimationFrame(r),setTimeout(n)},i=setTimeout(o,100);ke&&(r=requestAnimationFrame(o))})(Dt))},v.__c=function(t,e){e.some(function(n){try{n.__h.forEach(I),n.__h=n.__h.filter(function(r){return!r.__||ie(r)})}catch(r){e.some(function(o){o.__h&&(o.__h=[])}),e=[],v.__e(r,n.__v)}}),me&&me(t,e)},v.unmount=function(t){$e&&$e(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{I(r)}catch(o){e=o}}),e&&v.__e(e,n.__v))};var ke=typeof requestAnimationFrame=="function";function I(t){var e=t.__c;typeof e=="function"&&(t.__c=void 0,e())}function ie(t){t.__c=t.__()}function Bt(t,e){for(var n in e)t[n]=e[n];return t}function we(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function q(t){this.props=t}(q.prototype=new S).isPureReactComponent=!0,q.prototype.shouldComponentUpdate=function(t,e){return we(this.props,t)||we(this.state,e)};var ye=v.__b;v.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),ye&&ye(t)};var Ht=v.__e;v.__e=function(t,e,n){if(t.then){for(var r,o=e;o=o.__;)if((r=o.__c)&&r.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),r.__c(t,e)}Ht(t,e,n)};var xe=v.unmount;function Z(){this.__u=0,this.t=null,this.__b=null}function tt(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function T(){this.u=null,this.o=null}v.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&t.__h===!0&&(t.type=null),xe&&xe(t)},(Z.prototype=new S).__c=function(t,e){var n=e.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=tt(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(l):l())};n.__R=s;var l=function(){if(!--r.__u){if(r.state.__e){var u=r.state.__e;r.__v.__k[0]=function p(h,f,g){return h&&(h.__v=null,h.__k=h.__k&&h.__k.map(function(m){return p(m,f,g)}),h.__c&&h.__c.__P===f&&(h.__e&&g.insertBefore(h.__e,h.__d),h.__c.__e=!0,h.__c.__P=g)),h}(u,u.__c.__P,u.__c.__O)}var a;for(r.setState({__e:r.__b=null});a=r.t.pop();)a.forceUpdate()}},c=e.__h===!0;r.__u++||c||r.setState({__e:r.__b=r.__v.__k[0]}),t.then(s,s)},Z.prototype.componentWillUnmount=function(){this.t=[]},Z.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function i(s,l,c){return s&&(s.__c&&s.__c.__H&&(s.__c.__H.__.forEach(function(u){typeof u.__c=="function"&&u.__c()}),s.__c.__H=null),(s=Bt({},s)).__c!=null&&(s.__c.__P===c&&(s.__c.__P=l),s.__c=null),s.__k=s.__k&&s.__k.map(function(u){return i(u,l,c)})),s}(this.__b,n,r.__O=r.__P)}this.__b=null}var o=e.__e&&Q(R,null,t.fallback);return o&&(o.__h=null),[Q(R,null,e.__e?null:t.children),o]};var Ce=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]{const o=n.name||w.categories[n.id],i=!this.props.unfocused&&n.id==this.state.categoryId;return i&&(e=r),d("button",{"aria-label":o,"aria-selected":i||void 0,title:o,type:"button",class:"flex flex-grow flex-center",onMouseDown:s=>s.preventDefault(),onClick:()=>{this.props.onClick({category:n,i:r})},children:this.renderIcon(n)})}),d("div",{class:"bar",style:{width:`${100/this.categories.length}%`,opacity:e==null?0:1,transform:this.props.dir==="rtl"?`scaleX(-1) translateX(${e*100}%)`:`translateX(${e*100}%)`}})]})})}constructor(){super(),this.categories=_.categories.filter(e=>!e.target),this.state={categoryId:this.categories[0].id}}}class qt extends q{shouldComponentUpdate(e){for(let n in e)if(n!="children"&&e[n]!=this.props[n])return!0;return!1}render(){return this.props.children}}const O={rowsPerRender:10};class Kt extends S{getInitialState(e=this.props){return{skin:L.get("skin")||e.skin,theme:this.initTheme(e.theme)}}componentWillMount(){this.dir=w.rtl?"rtl":"ltr",this.refs={menu:j(),navigation:j(),scroll:j(),search:j(),searchInput:j(),skinToneButton:j(),skinToneRadio:j()},this.initGrid(),this.props.stickySearch==!1&&this.props.searchPosition=="sticky"&&(console.warn("[EmojiMart] Deprecation warning: `stickySearch` has been renamed `searchPosition`."),this.props.searchPosition="static")}componentDidMount(){if(this.register(),this.shadowRoot=this.base.parentNode,this.props.autoFocus){const{searchInput:e}=this.refs;e.current&&e.current.focus()}}componentWillReceiveProps(e){this.nextState||(this.nextState={});for(const n in e)this.nextState[n]=e[n];clearTimeout(this.nextStateTimer),this.nextStateTimer=setTimeout(()=>{let n=!1;for(const o in this.nextState)this.props[o]=this.nextState[o],(o==="custom"||o==="categories")&&(n=!0);delete this.nextState;const r=this.getInitialState();if(n)return this.reset(r);this.setState(r)})}componentWillUnmount(){this.unregister()}async reset(e={}){await G(this.props),this.initGrid(),this.unobserve(),this.setState(e,()=>{this.observeCategories(),this.observeRows()})}register(){document.addEventListener("click",this.handleClickOutside),this.observe()}unregister(){document.removeEventListener("click",this.handleClickOutside),this.unobserve()}observe(){this.observeCategories(),this.observeRows()}unobserve({except:e=[]}={}){Array.isArray(e)||(e=[e]);for(const n of this.observers)e.includes(n)||n.disconnect();this.observers=[].concat(e)}initGrid(){const{categories:e}=_;this.refs.categories=new Map;const n=_.categories.map(o=>o.id).join(",");this.navKey&&this.navKey!=n&&this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0),this.navKey=n,this.grid=[],this.grid.setsize=0;const r=(o,i)=>{const s=[];s.__categoryId=i.id,s.__index=o.length,this.grid.push(s);const l=this.grid.length-1,c=l%O.rowsPerRender?{}:j();return c.index=l,c.posinset=this.grid.setsize+1,o.push(c),s};for(let o of e){const i=[];let s=r(i,o);for(let l of o.emojis)s.length==this.getPerLine()&&(s=r(i,o)),this.grid.setsize+=1,s.push(l);this.refs.categories.set(o.id,{root:j(),rows:i})}}initTheme(e){if(e!="auto")return e;if(!this.darkMedia){if(this.darkMedia=matchMedia("(prefers-color-scheme: dark)"),this.darkMedia.media.match(/^not/))return"light";this.darkMedia.addListener(()=>{this.props.theme=="auto"&&this.setState({theme:this.darkMedia.matches?"dark":"light"})})}return this.darkMedia.matches?"dark":"light"}initDynamicPerLine(e=this.props){if(!e.dynamicWidth)return;const{element:n,emojiButtonSize:r}=e,o=()=>{const{width:s}=n.getBoundingClientRect();return Math.floor(s/r)},i=new ResizeObserver(()=>{this.unobserve({except:i}),this.setState({perLine:o()},()=>{this.initGrid(),this.forceUpdate(()=>{this.observeCategories(),this.observeRows()})})});return i.observe(n),this.observers.push(i),o()}getPerLine(){return this.state.perLine||this.props.perLine}getEmojiByPos([e,n]){const r=this.state.searchResults||this.grid,o=r[e]&&r[e][n];if(o)return E.get(o)}observeCategories(){const e=this.refs.navigation.current;if(!e)return;const n=new Map,r=s=>{s!=e.state.categoryId&&e.setState({categoryId:s})},o={root:this.refs.scroll.current,threshold:[0,1]},i=new IntersectionObserver(s=>{for(const c of s){const u=c.target.dataset.id;n.set(u,c.intersectionRatio)}const l=[...n];for(const[c,u]of l)if(u){r(c);break}},o);for(const{root:s}of this.refs.categories.values())i.observe(s.current);this.observers.push(i)}observeRows(){const e={...this.state.visibleRows},n=new IntersectionObserver(r=>{for(const o of r){const i=parseInt(o.target.dataset.index);o.isIntersecting?e[i]=!0:delete e[i]}this.setState({visibleRows:e})},{root:this.refs.scroll.current,rootMargin:`${this.props.emojiButtonSize*(O.rowsPerRender+5)}px 0px ${this.props.emojiButtonSize*O.rowsPerRender}px`});for(const{rows:r}of this.refs.categories.values())for(const o of r)o.current&&n.observe(o.current);this.observers.push(n)}preventDefault(e){e.preventDefault()}unfocusSearch(){const e=this.refs.searchInput.current;e&&e.blur()}navigate({e,input:n,left:r,right:o,up:i,down:s}){const l=this.state.searchResults||this.grid;if(!l.length)return;let[c,u]=this.state.pos;const a=(()=>{if(c==0&&u==0&&!e.repeat&&(r||i))return null;if(c==-1)return!e.repeat&&(o||s)&&n.selectionStart==n.value.length?[0,0]:null;if(r||o){let p=l[c];const h=r?-1:1;if(u+=h,!p[u]){if(c+=h,p=l[c],!p)return c=r?0:l.length-1,u=r?0:l[c].length-1,[c,u];u=r?p.length-1:0}return[c,u]}if(i||s){c+=i?-1:1;const p=l[c];return p?(p[u]||(u=p.length-1),[c,u]):(c=i?0:l.length-1,u=i?0:l[c].length-1,[c,u])}})();if(a)e.preventDefault();else{this.state.pos[0]>-1&&this.setState({pos:[-1,-1]});return}this.setState({pos:a,keyboard:!0},()=>{this.scrollTo({row:a[0]})})}scrollTo({categoryId:e,row:n}){const r=this.state.searchResults||this.grid;if(!r.length)return;const o=this.refs.scroll.current,i=o.getBoundingClientRect();let s=0;if(n>=0&&(e=r[n].__categoryId),e&&(s=(this.refs[e]||this.refs.categories.get(e).root).current.getBoundingClientRect().top-(i.top-o.scrollTop)+1),n>=0)if(!n)s=0;else{const l=r[n].__index,c=s+l*this.props.emojiButtonSize,u=c+this.props.emojiButtonSize+this.props.emojiButtonSize*.88;if(co.scrollTop+i.height)s=u-i.height;else return}this.ignoreMouse(),o.scrollTop=s}ignoreMouse(){this.mouseIsIgnored=!0,clearTimeout(this.ignoreMouseTimer),this.ignoreMouseTimer=setTimeout(()=>{delete this.mouseIsIgnored},100)}handleEmojiOver(e){this.mouseIsIgnored||this.state.showSkins||this.setState({pos:e||[-1,-1],keyboard:!1})}handleEmojiClick({e,emoji:n,pos:r}){if(this.props.onEmojiSelect&&(!n&&r&&(n=this.getEmojiByPos(r)),n)){const o=Mt(n,{skinIndex:this.state.skin-1});this.props.maxFrequentRows&&qe.add(o,this.props),this.props.onEmojiSelect(o,e)}}closeSkins(){this.state.showSkins&&(this.setState({showSkins:null,tempSkin:null}),this.base.removeEventListener("click",this.handleBaseClick),this.base.removeEventListener("keydown",this.handleBaseKeydown))}handleSkinMouseOver(e){this.setState({tempSkin:e})}handleSkinClick(e){this.ignoreMouse(),this.closeSkins(),this.setState({skin:e,tempSkin:null}),L.set("skin",e)}renderNav(){return d(Wt,{ref:this.refs.navigation,icons:this.props.icons,theme:this.state.theme,dir:this.dir,unfocused:!!this.state.searchResults,position:this.props.navPosition,onClick:this.handleCategoryClick},this.navKey)}renderPreview(){const e=this.getEmojiByPos(this.state.pos),n=this.state.searchResults&&!this.state.searchResults.length;return d("div",{id:"preview",class:"flex flex-middle",dir:this.dir,"data-position":this.props.previewPosition,children:[d("div",{class:"flex flex-middle flex-grow",children:[d("div",{class:"flex flex-auto flex-middle flex-center",style:{height:this.props.emojiButtonSize,fontSize:this.props.emojiButtonSize},children:d(ne,{emoji:e,id:n?this.props.noResultsEmoji||"cry":this.props.previewEmoji||(this.props.previewPosition=="top"?"point_down":"point_up"),set:this.props.set,size:this.props.emojiButtonSize,skin:this.state.tempSkin||this.state.skin,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})}),d("div",{class:`margin-${this.dir[0]}`,children:e||n?d("div",{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[d("div",{class:"preview-title ellipsis",children:e?e.name:w.search_no_results_1}),d("div",{class:"preview-subtitle ellipsis color-c",children:e?e.skins[0].shortcodes:w.search_no_results_2})]}):d("div",{class:"preview-placeholder color-c",children:w.pick})})]}),!e&&this.props.skinTonePosition=="preview"&&this.renderSkinToneButton()]})}renderEmojiButton(e,{pos:n,posinset:r,grid:o}){const i=this.props.emojiButtonSize,s=this.state.tempSkin||this.state.skin,c=(e.skins[s-1]||e.skins[0]).native,u=jt(this.state.pos,n),a=n.concat(e.id).join("");return d(qt,{selected:u,skin:s,size:i,children:d("button",{"aria-label":c,"aria-selected":u||void 0,"aria-posinset":r,"aria-setsize":o.setsize,"data-keyboard":this.state.keyboard,title:this.props.previewPosition=="none"?e.name:void 0,type:"button",class:"flex flex-center flex-middle",tabindex:"-1",onClick:p=>this.handleEmojiClick({e:p,emoji:e}),onMouseEnter:()=>this.handleEmojiOver(n),onMouseLeave:()=>this.handleEmojiOver(),style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize,fontSize:this.props.emojiSize,lineHeight:0},children:[d("div",{"aria-hidden":"true",class:"background",style:{borderRadius:this.props.emojiButtonRadius,backgroundColor:this.props.emojiButtonColors?this.props.emojiButtonColors[(r-1)%this.props.emojiButtonColors.length]:void 0}}),d(ne,{emoji:e,set:this.props.set,size:this.props.emojiSize,skin:s,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})]})},a)}renderSearch(){const e=this.props.previewPosition=="none"||this.props.skinTonePosition=="search";return d("div",{children:[d("div",{class:"spacer"}),d("div",{class:"flex flex-middle",children:[d("div",{class:"search relative flex-grow",children:[d("input",{type:"search",ref:this.refs.searchInput,placeholder:w.search,onClick:this.handleSearchClick,onInput:this.handleSearchInput,onKeyDown:this.handleSearchKeyDown,autoComplete:"off"}),d("span",{class:"icon loupe flex",children:W.search.loupe}),this.state.searchResults&&d("button",{title:"Clear","aria-label":"Clear",type:"button",class:"icon delete flex",onClick:this.clearSearch,onMouseDown:this.preventDefault,children:W.search.delete})]}),e&&this.renderSkinToneButton()]})]})}renderSearchResults(){const{searchResults:e}=this.state;return e?d("div",{class:"category",ref:this.refs.search,children:[d("div",{class:`sticky padding-small align-${this.dir[0]}`,children:w.categories.search}),d("div",{children:e.length?e.map((n,r)=>d("div",{class:"flex",children:n.map((o,i)=>this.renderEmojiButton(o,{pos:[r,i],posinset:r*this.props.perLine+i+1,grid:e}))})):d("div",{class:`padding-small align-${this.dir[0]}`,children:this.props.onAddCustomEmoji&&d("a",{onClick:this.props.onAddCustomEmoji,children:w.add_custom})})})]}):null}renderCategories(){const{categories:e}=_,n=!!this.state.searchResults,r=this.getPerLine();return d("div",{style:{visibility:n?"hidden":void 0,display:n?"none":void 0,height:"100%"},children:e.map(o=>{const{root:i,rows:s}=this.refs.categories.get(o.id);return d("div",{"data-id":o.target?o.target.id:o.id,class:"category",ref:i,children:[d("div",{class:`sticky padding-small align-${this.dir[0]}`,children:o.name||w.categories[o.id]}),d("div",{class:"relative",style:{height:s.length*this.props.emojiButtonSize},children:s.map((l,c)=>{const u=l.index-l.index%O.rowsPerRender,a=this.state.visibleRows[u],p="current"in l?l:void 0;if(!a&&!p)return null;const h=c*r,f=h+r,g=o.emojis.slice(h,f);return g.length{if(!m)return d("div",{style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize}});const $=E.get(m);return this.renderEmojiButton($,{pos:[l.index,b],posinset:l.posinset+b,grid:this.grid})})},l.index)})})]})})})}renderSkinToneButton(){return this.props.skinTonePosition=="none"?null:d("div",{class:"flex flex-auto flex-center flex-middle",style:{position:"relative",width:this.props.emojiButtonSize,height:this.props.emojiButtonSize},children:d("button",{type:"button",ref:this.refs.skinToneButton,class:"skin-tone-button flex flex-auto flex-center flex-middle","aria-selected":this.state.showSkins?"":void 0,"aria-label":w.skins.choose,title:w.skins.choose,onClick:this.openSkins,style:{width:this.props.emojiSize,height:this.props.emojiSize},children:d("span",{class:`skin-tone skin-tone-${this.state.skin}`})})})}renderLiveRegion(){const e=this.getEmojiByPos(this.state.pos),n=e?e.name:"";return d("div",{"aria-live":"polite",class:"sr-only",children:n})}renderSkins(){const n=this.refs.skinToneButton.current.getBoundingClientRect(),r=this.base.getBoundingClientRect(),o={};return this.dir=="ltr"?o.right=r.right-n.right-3:o.left=n.left-r.left-3,this.props.previewPosition=="bottom"&&this.props.skinTonePosition=="preview"?o.bottom=r.bottom-n.top+6:(o.top=n.bottom-r.top+3,o.bottom="auto"),d("div",{ref:this.refs.menu,role:"radiogroup",dir:this.dir,"aria-label":w.skins.choose,class:"menu hidden","data-position":o.top?"top":"bottom",style:o,children:[...Array(6).keys()].map(i=>{const s=i+1,l=this.state.skin==s;return d("div",{children:[d("input",{type:"radio",name:"skin-tone",value:s,"aria-label":w.skins[s],ref:l?this.refs.skinToneRadio:null,defaultChecked:l,onChange:()=>this.handleSkinMouseOver(s),onKeyDown:c=>{(c.code=="Enter"||c.code=="Space"||c.code=="Tab")&&(c.preventDefault(),this.handleSkinClick(s))}}),d("button",{"aria-hidden":"true",tabindex:"-1",onClick:()=>this.handleSkinClick(s),onMouseEnter:()=>this.handleSkinMouseOver(s),onMouseLeave:()=>this.handleSkinMouseOver(),class:"option flex flex-grow flex-middle",children:[d("span",{class:`skin-tone skin-tone-${s}`}),d("span",{class:"margin-small-lr",children:w.skins[s]})]})]})})})}render(){const e=this.props.perLine*this.props.emojiButtonSize;return d("section",{id:"root",class:"flex flex-column",dir:this.dir,style:{width:this.props.dynamicWidth?"100%":`calc(${e}px + (var(--padding) + var(--sidebar-width)))`},"data-emoji-set":this.props.set,"data-theme":this.state.theme,"data-menu":this.state.showSkins?"":void 0,children:[this.props.previewPosition=="top"&&this.renderPreview(),this.props.navPosition=="top"&&this.renderNav(),this.props.searchPosition=="sticky"&&d("div",{part:"padding-lr",class:"padding-lr",children:this.renderSearch()}),d("div",{ref:this.refs.scroll,part:"padding-lr",class:"scroll flex-grow padding-lr",children:d("div",{style:{width:this.props.dynamicWidth?"100%":e,height:"100%"},children:[this.props.searchPosition=="static"&&this.renderSearch(),this.renderSearchResults(),this.renderCategories()]})}),this.props.navPosition=="bottom"&&this.renderNav(),this.props.previewPosition=="bottom"&&this.renderPreview(),this.state.showSkins&&this.renderSkins(),this.renderLiveRegion()]})}constructor(e){super(),x(this,"handleClickOutside",n=>{const{element:r}=this.props;n.target!=r&&(this.state.showSkins&&this.closeSkins(),this.props.onClickOutside&&this.props.onClickOutside(n))}),x(this,"handleBaseClick",n=>{this.state.showSkins&&(n.target.closest(".menu")||(n.preventDefault(),n.stopImmediatePropagation(),this.closeSkins()))}),x(this,"handleBaseKeydown",n=>{this.state.showSkins&&n.key=="Escape"&&(n.preventDefault(),n.stopImmediatePropagation(),this.closeSkins())}),x(this,"handleSearchClick",()=>{this.getEmojiByPos(this.state.pos)&&this.setState({pos:[-1,-1]})}),x(this,"handleSearchInput",async()=>{const n=this.refs.searchInput.current;if(!n)return;const{value:r}=n,o=await E.search(r),i=()=>{this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0)};if(!o)return this.setState({searchResults:o,pos:[-1,-1]},i);const s=n.selectionStart==n.value.length?[0,0]:[-1,-1],l=[];l.setsize=o.length;let c=null;for(let u of o)(!l.length||c.length==this.getPerLine())&&(c=[],c.__categoryId="search",c.__index=l.length,l.push(c)),c.push(u);this.ignoreMouse(),this.setState({searchResults:l,pos:s},i)}),x(this,"handleSearchKeyDown",n=>{const r=n.currentTarget;switch(n.stopImmediatePropagation(),n.key){case"ArrowLeft":this.navigate({e:n,input:r,left:!0});break;case"ArrowRight":this.navigate({e:n,input:r,right:!0});break;case"ArrowUp":this.navigate({e:n,input:r,up:!0});break;case"ArrowDown":this.navigate({e:n,input:r,down:!0});break;case"Enter":n.preventDefault(),this.handleEmojiClick({e:n,pos:this.state.pos});break;case"Escape":n.preventDefault(),this.state.searchResults?this.clearSearch():this.unfocusSearch();break}}),x(this,"clearSearch",()=>{const n=this.refs.searchInput.current;n&&(n.value="",n.focus(),this.handleSearchInput())}),x(this,"handleCategoryClick",({category:n,i:r})=>{this.scrollTo(r==0?{row:-1}:{categoryId:n.id})}),x(this,"openSkins",n=>{const{currentTarget:r}=n,o=r.getBoundingClientRect();this.setState({showSkins:o},async()=>{await zt(2);const i=this.refs.menu.current;i&&(i.classList.remove("hidden"),this.refs.skinToneRadio.current.focus(),this.base.addEventListener("click",this.handleBaseClick,!0),this.base.addEventListener("keydown",this.handleBaseKeydown,!0))})}),this.observers=[],this.state={pos:[-1,-1],perLine:this.initDynamicPerLine(e),visibleRows:{0:!0},...this.getInitialState(e)}}}class se extends Pt{async connectedCallback(){const e=Je(this.props,z,this);e.element=this,e.ref=n=>{this.component=n},await G(e),!this.disconnected&&Ne(d(Kt,{...e}),this.shadowRoot)}constructor(e){super(e,{styles:Re(nt)})}}x(se,"Props",z);typeof customElements<"u"&&!customElements.get("em-emoji-picker")&&customElements.define("em-emoji-picker",se);var nt={};nt=`:host { +import{r as ae,R as rt,_ as it,e as ot,j as st}from"../index-be605fd2.js";const at="/packs/assets/32-2c0f5493.png";function Re(t){return t&&t.__esModule?t.default:t}function x(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var K,v,Pe,D,De,ce,V={},Be=[],ct=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function M(t,e){for(var n in e)t[n]=e[n];return t}function He(t){var e=t.parentNode;e&&e.removeChild(t)}function Q(t,e,n){var r,o,i,s={};for(i in e)i=="key"?r=e[i]:i=="ref"?o=e[i]:s[i]=e[i];if(arguments.length>2&&(s.children=arguments.length>3?K.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)s[i]===void 0&&(s[i]=t.defaultProps[i]);return A(t,s,r,o,null)}function A(t,e,n,r,o){var i={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o??++Pe};return o==null&&v.vnode!=null&&v.vnode(i),i}function j(){return{current:null}}function R(t){return t.children}function S(t,e){this.props=t,this.context=e}function P(t,e){if(e==null)return t.__?P(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e0?A(f.type,f.props,f.key,null,f.__v):f)!=null){if(f.__=n,f.__b=n.__b+1,(h=$[a])===null||h&&f.key==h.key&&f.type===h.type)$[a]=void 0;else for(p=0;p{let t=null;try{navigator.userAgent.includes("jsdom")||(t=document.createElement("canvas").getContext("2d",{willReadFrequently:!0}))}catch{}if(!t)return()=>!1;const e=25,n=20,r=Math.floor(e/2);return t.font=r+"px Arial, Sans-Serif",t.textBaseline="top",t.canvas.width=n*2,t.canvas.height=e,o=>{t.clearRect(0,0,n*2,e),t.fillStyle="#FF0000",t.fillText(o,0,22),t.fillStyle="#0000FF",t.fillText(o,n,22);const i=t.getImageData(0,0,n,e).data,s=i.length;let l=0;for(;l=s)return!1;const c=n+l/4%n,u=Math.floor(l/4/n),a=t.getImageData(c,u,1,1).data;return!(i[l]!==a[0]||i[l+2]!==a[2]||t.measureText(o).width>=n)}})();var fe={latestVersion:gt,noCountryFlags:_t};const ee=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart"];let k=null;function mt(t){k||(k=L.get("frequently")||{});const e=t.id||t;e&&(k[e]||(k[e]=0),k[e]+=1,L.set("last",e),L.set("frequently",k))}function $t({maxFrequentRows:t,perLine:e}){if(!t)return[];k||(k=L.get("frequently"));let n=[];if(!k){k={};for(let i in ee.slice(0,e)){const s=ee[i];k[s]=e-i,n.push(s)}return n}const r=t*e,o=L.get("last");for(let i in k)n.push(i);if(n.sort((i,s)=>{const l=k[s],c=k[i];return l==c?i.localeCompare(s):l-c}),n.length>r){const i=n.slice(r);n=n.slice(0,r);for(let s of i)s!=o&&delete k[s];o&&n.indexOf(o)==-1&&(delete k[n[n.length-1]],n.splice(-1,1,o)),L.set("frequently",k)}return n}var qe={add:mt,get:$t,DEFAULTS:ee},Ke={};Ke=JSON.parse('{"search":"Search","search_no_results_1":"Oh no!","search_no_results_2":"That emoji couldn’t be found","pick":"Pick an emoji…","add_custom":"Add custom emoji","categories":{"activity":"Activity","custom":"Custom","flags":"Flags","foods":"Food & Drink","frequent":"Frequently used","nature":"Animals & Nature","objects":"Objects","people":"Smileys & People","places":"Travel & Places","search":"Search Results","symbols":"Symbols"},"skins":{"1":"Default","2":"Light","3":"Medium-Light","4":"Medium","5":"Medium-Dark","6":"Dark","choose":"Choose default skin tone"}}');var z={autoFocus:{value:!1},dynamicWidth:{value:!1},emojiButtonColors:{value:null},emojiButtonRadius:{value:"100%"},emojiButtonSize:{value:36},emojiSize:{value:24},emojiVersion:{value:14,choices:[1,2,3,4,5,11,12,12.1,13,13.1,14]},exceptEmojis:{value:[]},icons:{value:"auto",choices:["auto","outline","solid"]},locale:{value:"en",choices:["en","ar","be","cs","de","es","fa","fi","fr","hi","it","ja","kr","nl","pl","pt","ru","sa","tr","uk","vi","zh"]},maxFrequentRows:{value:4},navPosition:{value:"top",choices:["top","bottom","none"]},noCountryFlags:{value:!1},noResultsEmoji:{value:null},perLine:{value:9},previewEmoji:{value:null},previewPosition:{value:"bottom",choices:["top","bottom","none"]},searchPosition:{value:"sticky",choices:["sticky","static","none"]},set:{value:"native",choices:["native","apple","facebook","google","twitter"]},skin:{value:1,choices:[1,2,3,4,5,6]},skinTonePosition:{value:"preview",choices:["preview","search","none"]},theme:{value:"auto",choices:["auto","light","dark"]},categories:null,categoryIcons:null,custom:null,data:null,i18n:null,getImageURL:null,getSpritesheetURL:null,onAddCustomEmoji:null,onClickOutside:null,onEmojiSelect:null,stickySearch:{deprecated:!0,value:!0}};let w=null,_=null;const J={};async function pe(t){if(J[t])return J[t];const n=await(await fetch(t)).json();return J[t]=n,n}let Y=null,Ge=null,Xe=!1;function G(t,{caller:e}={}){return Y||(Y=new Promise(n=>{Ge=n})),t?kt(t):e&&!Xe&&console.warn(`\`${e}\` requires data to be initialized first. Promise will be pending until \`init\` is called.`),Y}async function kt(t){Xe=!0;let{emojiVersion:e,set:n,locale:r}=t;if(e||(e=z.emojiVersion.value),n||(n=z.set.value),r||(r=z.locale.value),_)_.categories=_.categories.filter(c=>!c.name);else{_=(typeof t.data=="function"?await t.data():t.data)||await pe(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${e}/${n}.json`),_.emoticons={},_.natives={},_.categories.unshift({id:"frequent",emojis:[]});for(const c in _.aliases){const u=_.aliases[c],a=_.emojis[u];a&&(a.aliases||(a.aliases=[]),a.aliases.push(c))}_.originalCategories=_.categories}if(w=(typeof t.i18n=="function"?await t.i18n():t.i18n)||(r=="en"?Re(Ke):await pe(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${r}.json`)),t.custom)for(let c in t.custom){c=parseInt(c);const u=t.custom[c],a=t.custom[c-1];if(!(!u.emojis||!u.emojis.length)){u.id||(u.id=`custom_${c+1}`),u.name||(u.name=w.categories.custom),a&&!u.icon&&(u.target=a.target||a),_.categories.push(u);for(const p of u.emojis)_.emojis[p.id]=p}}t.categories&&(_.categories=_.originalCategories.filter(c=>t.categories.indexOf(c.id)!=-1).sort((c,u)=>{const a=t.categories.indexOf(c.id),p=t.categories.indexOf(u.id);return a-p}));let o=null,i=null;n=="native"&&(o=fe.latestVersion(),i=t.noCountryFlags||fe.noCountryFlags());let s=_.categories.length,l=!1;for(;s--;){const c=_.categories[s];if(c.id=="frequent"){let{maxFrequentRows:p,perLine:h}=t;p=p>=0?p:z.maxFrequentRows.value,h||(h=z.perLine.value),c.emojis=qe.get({maxFrequentRows:p,perLine:h})}if(!c.emojis||!c.emojis.length){_.categories.splice(s,1);continue}const{categoryIcons:u}=t;if(u){const p=u[c.id];p&&!c.icon&&(c.icon=p)}let a=c.emojis.length;for(;a--;){const p=c.emojis[a],h=p.id?p:_.emojis[p],f=()=>{c.emojis.splice(a,1)};if(!h||t.exceptEmojis&&t.exceptEmojis.includes(h.id)){f();continue}if(o&&h.version>o){f();continue}if(i&&c.id=="flags"&&!St.includes(h.id)){f();continue}if(!h.search){if(l=!0,h.search=","+[[h.id,!1],[h.name,!0],[h.keywords,!1],[h.emoticons,!1]].map(([m,b])=>{if(m)return(Array.isArray(m)?m:[m]).map($=>(b?$.split(/[-|_|\s]+/):[$]).map(y=>y.toLowerCase())).flat()}).flat().filter(m=>m&&m.trim()).join(","),h.emoticons)for(const m of h.emoticons)_.emoticons[m]||(_.emoticons[m]=h.id);let g=0;for(const m of h.skins){if(!m)continue;g++;const{native:b}=m;b&&(_.natives[b]=h.id,h.search+=`,${b}`);const $=g==1?"":`:skin-tone-${g}:`;m.shortcodes=`:${h.id}:${$}`}}}}l&&E.reset(),Ge()}function Je(t,e,n){t||(t={});const r={};for(let o in e)r[o]=Ye(o,t,e,n);return r}function Ye(t,e,n,r){const o=n[t];let i=r&&r.getAttribute(t)||(e[t]!=null&&e[t]!=null?e[t]:null);return o&&(i!=null&&o.value&&typeof o.value!=typeof i&&(typeof o.value=="boolean"?i=i!="false":i=o.value.constructor(i)),o.transform&&i&&(i=o.transform(i)),(i==null||o.choices&&o.choices.indexOf(i)==-1)&&(i=o.value)),i}const wt=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/;let te=null;function yt(t){return t.id?t:_.emojis[t]||_.emojis[_.aliases[t]]||_.emojis[_.natives[t]]}function xt(){te=null}async function Ct(t,{maxResults:e,caller:n}={}){if(!t||!t.trim().length)return null;e||(e=90),await G(null,{caller:n||"SearchIndex.search"});const r=t.toLowerCase().replace(/(\w)-/,"$1 ").split(/[\s|,]+/).filter((l,c,u)=>l.trim()&&u.indexOf(l)==c);if(!r.length)return;let o=te||(te=Object.values(_.emojis)),i,s;for(const l of r){if(!o.length)break;i=[],s={};for(const c of o){if(!c.search)continue;const u=c.search.indexOf(`,${l}`);u!=-1&&(i.push(c),s[c.id]||(s[c.id]=0),s[c.id]+=c.id==l?0:u+1)}o=i}return i.length<2||(i.sort((l,c)=>{const u=s[l.id],a=s[c.id];return u==a?l.id.localeCompare(c.id):u-a}),i.length>e&&(i=i.slice(0,e))),i}var E={search:Ct,get:yt,reset:xt,SHORTCODES_REGEX:wt};const St=["checkered_flag","crossed_flags","pirate_flag","rainbow-flag","transgender_flag","triangular_flag_on_post","waving_black_flag","waving_white_flag"];function jt(t,e){return Array.isArray(t)&&Array.isArray(e)&&t.length===e.length&&t.every((n,r)=>n==e[r])}async function zt(t=1){for(let e in[...Array(t).keys()])await new Promise(requestAnimationFrame)}function Mt(t,{skinIndex:e=0}={}){const n=t.skins[e]||(()=>(e=0,t.skins[e]))(),r={id:t.id,name:t.name,native:n.native,unified:n.unified,keywords:t.keywords,shortcodes:n.shortcodes||t.shortcodes};return t.skins.length>1&&(r.skin=e+1),n.src&&(r.src=n.src),t.aliases&&t.aliases.length&&(r.aliases=t.aliases),t.emoticons&&t.emoticons.length&&(r.emoticons=t.emoticons),r}const Lt={activity:{outline:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:d("path",{d:"M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"})}),solid:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:d("path",{d:"M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z"})})},custom:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:d("path",{d:"M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z"})}),flags:{outline:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:d("path",{d:"M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"})}),solid:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:d("path",{d:"M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"})})},foods:{outline:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:d("path",{d:"M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"})}),solid:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:d("path",{d:"M481.9 270.1C490.9 279.1 496 291.3 496 304C496 316.7 490.9 328.9 481.9 337.9C472.9 346.9 460.7 352 448 352H64C51.27 352 39.06 346.9 30.06 337.9C21.06 328.9 16 316.7 16 304C16 291.3 21.06 279.1 30.06 270.1C39.06 261.1 51.27 256 64 256H448C460.7 256 472.9 261.1 481.9 270.1zM475.3 388.7C478.3 391.7 480 395.8 480 400V416C480 432.1 473.3 449.3 461.3 461.3C449.3 473.3 432.1 480 416 480H96C79.03 480 62.75 473.3 50.75 461.3C38.74 449.3 32 432.1 32 416V400C32 395.8 33.69 391.7 36.69 388.7C39.69 385.7 43.76 384 48 384H464C468.2 384 472.3 385.7 475.3 388.7zM50.39 220.8C45.93 218.6 42.03 215.5 38.97 211.6C35.91 207.7 33.79 203.2 32.75 198.4C31.71 193.5 31.8 188.5 32.99 183.7C54.98 97.02 146.5 32 256 32C365.5 32 457 97.02 479 183.7C480.2 188.5 480.3 193.5 479.2 198.4C478.2 203.2 476.1 207.7 473 211.6C469.1 215.5 466.1 218.6 461.6 220.8C457.2 222.9 452.3 224 447.3 224H64.67C59.73 224 54.84 222.9 50.39 220.8zM372.7 116.7C369.7 119.7 368 123.8 368 128C368 131.2 368.9 134.3 370.7 136.9C372.5 139.5 374.1 141.6 377.9 142.8C380.8 143.1 384 144.3 387.1 143.7C390.2 143.1 393.1 141.6 395.3 139.3C397.6 137.1 399.1 134.2 399.7 131.1C400.3 128 399.1 124.8 398.8 121.9C397.6 118.1 395.5 116.5 392.9 114.7C390.3 112.9 387.2 111.1 384 111.1C379.8 111.1 375.7 113.7 372.7 116.7V116.7zM244.7 84.69C241.7 87.69 240 91.76 240 96C240 99.16 240.9 102.3 242.7 104.9C244.5 107.5 246.1 109.6 249.9 110.8C252.8 111.1 256 112.3 259.1 111.7C262.2 111.1 265.1 109.6 267.3 107.3C269.6 105.1 271.1 102.2 271.7 99.12C272.3 96.02 271.1 92.8 270.8 89.88C269.6 86.95 267.5 84.45 264.9 82.7C262.3 80.94 259.2 79.1 256 79.1C251.8 79.1 247.7 81.69 244.7 84.69V84.69zM116.7 116.7C113.7 119.7 112 123.8 112 128C112 131.2 112.9 134.3 114.7 136.9C116.5 139.5 118.1 141.6 121.9 142.8C124.8 143.1 128 144.3 131.1 143.7C134.2 143.1 137.1 141.6 139.3 139.3C141.6 137.1 143.1 134.2 143.7 131.1C144.3 128 143.1 124.8 142.8 121.9C141.6 118.1 139.5 116.5 136.9 114.7C134.3 112.9 131.2 111.1 128 111.1C123.8 111.1 119.7 113.7 116.7 116.7L116.7 116.7z"})})},frequent:{outline:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[d("path",{d:"M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"}),d("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"})]}),solid:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:d("path",{d:"M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"})})},nature:{outline:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[d("path",{d:"M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"}),d("path",{d:"M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"})]}),solid:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:d("path",{d:"M332.7 19.85C334.6 8.395 344.5 0 356.1 0C363.6 0 370.6 3.52 375.1 9.502L392 32H444.1C456.8 32 469.1 37.06 478.1 46.06L496 64H552C565.3 64 576 74.75 576 88V112C576 156.2 540.2 192 496 192H426.7L421.6 222.5L309.6 158.5L332.7 19.85zM448 64C439.2 64 432 71.16 432 80C432 88.84 439.2 96 448 96C456.8 96 464 88.84 464 80C464 71.16 456.8 64 448 64zM416 256.1V480C416 497.7 401.7 512 384 512H352C334.3 512 320 497.7 320 480V364.8C295.1 377.1 268.8 384 240 384C211.2 384 184 377.1 160 364.8V480C160 497.7 145.7 512 128 512H96C78.33 512 64 497.7 64 480V249.8C35.23 238.9 12.64 214.5 4.836 183.3L.9558 167.8C-3.331 150.6 7.094 133.2 24.24 128.1C41.38 124.7 58.76 135.1 63.05 152.2L66.93 167.8C70.49 182 83.29 191.1 97.97 191.1H303.8L416 256.1z"})})},objects:{outline:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[d("path",{d:"M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"}),d("path",{d:"M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"})]}),solid:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:d("path",{d:"M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"})})},people:{outline:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[d("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"}),d("path",{d:"M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"})]}),solid:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:d("path",{d:"M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256 432C332.1 432 396.2 382 415.2 314.1C419.1 300.4 407.8 288 393.6 288H118.4C104.2 288 92.92 300.4 96.76 314.1C115.8 382 179.9 432 256 432V432zM176.4 160C158.7 160 144.4 174.3 144.4 192C144.4 209.7 158.7 224 176.4 224C194 224 208.4 209.7 208.4 192C208.4 174.3 194 160 176.4 160zM336.4 224C354 224 368.4 209.7 368.4 192C368.4 174.3 354 160 336.4 160C318.7 160 304.4 174.3 304.4 192C304.4 209.7 318.7 224 336.4 224z"})})},places:{outline:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[d("path",{d:"M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"}),d("path",{d:"M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"})]}),solid:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:d("path",{d:"M39.61 196.8L74.8 96.29C88.27 57.78 124.6 32 165.4 32H346.6C387.4 32 423.7 57.78 437.2 96.29L472.4 196.8C495.6 206.4 512 229.3 512 256V448C512 465.7 497.7 480 480 480H448C430.3 480 416 465.7 416 448V400H96V448C96 465.7 81.67 480 64 480H32C14.33 480 0 465.7 0 448V256C0 229.3 16.36 206.4 39.61 196.8V196.8zM109.1 192H402.9L376.8 117.4C372.3 104.6 360.2 96 346.6 96H165.4C151.8 96 139.7 104.6 135.2 117.4L109.1 192zM96 256C78.33 256 64 270.3 64 288C64 305.7 78.33 320 96 320C113.7 320 128 305.7 128 288C128 270.3 113.7 256 96 256zM416 320C433.7 320 448 305.7 448 288C448 270.3 433.7 256 416 256C398.3 256 384 270.3 384 288C384 305.7 398.3 320 416 320z"})})},symbols:{outline:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:d("path",{d:"M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"})}),solid:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:d("path",{d:"M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"})})}},Et={loupe:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:d("path",{d:"M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"})}),delete:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:d("path",{d:"M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"})})};var W={categories:Lt,search:Et};function ne(t){let{id:e,skin:n,emoji:r}=t;if(t.shortcodes){const l=t.shortcodes.match(E.SHORTCODES_REGEX);l&&(e=l[1],l[2]&&(n=l[2]))}if(r||(r=E.get(e||t.native)),!r)return t.fallback;const o=r.skins[n-1]||r.skins[0],i=o.src||(t.set!="native"&&!t.spritesheet?typeof t.getImageURL=="function"?t.getImageURL(t.set,o.unified):`https://cdn.jsdelivr.net/npm/emoji-datasource-${t.set}@14.0.0/img/${t.set}/64/${o.unified}.png`:void 0),s=typeof t.getSpritesheetURL=="function"?t.getSpritesheetURL(t.set):`https://cdn.jsdelivr.net/npm/emoji-datasource-${t.set}@14.0.0/img/${t.set}/sheets-256/64.png`;return d("span",{class:"emoji-mart-emoji","data-emoji-set":t.set,children:i?d("img",{style:{maxWidth:t.size||"1em",maxHeight:t.size||"1em",display:"inline-block"},alt:o.native||o.shortcodes,src:i}):t.set=="native"?d("span",{style:{fontSize:t.size,fontFamily:'"EmojiMart", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"'},children:o.native}):d("span",{style:{display:"block",width:t.size,height:t.size,backgroundImage:`url(${s})`,backgroundSize:`${100*_.sheet.cols}% ${100*_.sheet.rows}%`,backgroundPosition:`${100/(_.sheet.cols-1)*o.x}% ${100/(_.sheet.rows-1)*o.y}%`}})})}const Rt=typeof window<"u"&&window.HTMLElement?window.HTMLElement:Object;class Ze extends Rt{static get observedAttributes(){return Object.keys(this.Props)}update(e={}){for(let n in e)this.attributeChangedCallback(n,null,e[n])}attributeChangedCallback(e,n,r){if(!this.component)return;const o=Ye(e,{[e]:r},this.constructor.Props,this);this.component.componentWillReceiveProps?this.component.componentWillReceiveProps({[e]:o}):(this.component.props[e]=o,this.component.forceUpdate())}disconnectedCallback(){this.disconnected=!0,this.component&&this.component.unregister&&this.component.unregister()}constructor(e={}){if(super(),this.props=e,e.parent||e.ref){let n=null;const r=e.parent||(n=e.ref&&e.ref.current);n&&(n.innerHTML=""),r&&r.appendChild(this)}}}class Pt extends Ze{setShadow(){this.attachShadow({mode:"open"})}injectStyles(e){if(!e)return;const n=document.createElement("style");n.textContent=e,n.nonce=window.__webpack_nonce__,this.shadowRoot.insertBefore(n,this.shadowRoot.firstChild)}constructor(e,{styles:n}={}){super(e),this.setShadow(),this.injectStyles(n)}}var Qe={fallback:"",id:"",native:"",shortcodes:"",size:{value:"",transform:t=>/\D/.test(t)?t:`${t}px`},set:z.set,skin:z.skin};class et extends Ze{async connectedCallback(){const e=Je(this.props,Qe,this);e.element=this,e.ref=n=>{this.component=n},await G(),!this.disconnected&&Ne(d(ne,{...e}),this)}constructor(e){super(e)}}x(et,"Props",Qe);typeof customElements<"u"&&!customElements.get("em-emoji")&&customElements.define("em-emoji",et);var ve,re=[],ge=v.__b,_e=v.__r,be=v.diffed,me=v.__c,$e=v.unmount;function Dt(){var t;for(re.sort(function(e,n){return e.__v.__b-n.__v.__b});t=re.pop();)if(t.__P)try{t.__H.__h.forEach(I),t.__H.__h.forEach(ie),t.__H.__h=[]}catch(e){t.__H.__h=[],v.__e(e,t.__v)}}v.__b=function(t){ge&&ge(t)},v.__r=function(t){_e&&_e(t);var e=t.__c.__H;e&&(e.__h.forEach(I),e.__h.forEach(ie),e.__h=[])},v.diffed=function(t){be&&be(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(re.push(e)!==1&&ve===v.requestAnimationFrame||((ve=v.requestAnimationFrame)||function(n){var r,o=function(){clearTimeout(i),ke&&cancelAnimationFrame(r),setTimeout(n)},i=setTimeout(o,100);ke&&(r=requestAnimationFrame(o))})(Dt))},v.__c=function(t,e){e.some(function(n){try{n.__h.forEach(I),n.__h=n.__h.filter(function(r){return!r.__||ie(r)})}catch(r){e.some(function(o){o.__h&&(o.__h=[])}),e=[],v.__e(r,n.__v)}}),me&&me(t,e)},v.unmount=function(t){$e&&$e(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{I(r)}catch(o){e=o}}),e&&v.__e(e,n.__v))};var ke=typeof requestAnimationFrame=="function";function I(t){var e=t.__c;typeof e=="function"&&(t.__c=void 0,e())}function ie(t){t.__c=t.__()}function Bt(t,e){for(var n in e)t[n]=e[n];return t}function we(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function q(t){this.props=t}(q.prototype=new S).isPureReactComponent=!0,q.prototype.shouldComponentUpdate=function(t,e){return we(this.props,t)||we(this.state,e)};var ye=v.__b;v.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),ye&&ye(t)};var Ht=v.__e;v.__e=function(t,e,n){if(t.then){for(var r,o=e;o=o.__;)if((r=o.__c)&&r.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),r.__c(t,e)}Ht(t,e,n)};var xe=v.unmount;function Z(){this.__u=0,this.t=null,this.__b=null}function tt(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function T(){this.u=null,this.o=null}v.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&t.__h===!0&&(t.type=null),xe&&xe(t)},(Z.prototype=new S).__c=function(t,e){var n=e.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=tt(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(l):l())};n.__R=s;var l=function(){if(!--r.__u){if(r.state.__e){var u=r.state.__e;r.__v.__k[0]=function p(h,f,g){return h&&(h.__v=null,h.__k=h.__k&&h.__k.map(function(m){return p(m,f,g)}),h.__c&&h.__c.__P===f&&(h.__e&&g.insertBefore(h.__e,h.__d),h.__c.__e=!0,h.__c.__P=g)),h}(u,u.__c.__P,u.__c.__O)}var a;for(r.setState({__e:r.__b=null});a=r.t.pop();)a.forceUpdate()}},c=e.__h===!0;r.__u++||c||r.setState({__e:r.__b=r.__v.__k[0]}),t.then(s,s)},Z.prototype.componentWillUnmount=function(){this.t=[]},Z.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function i(s,l,c){return s&&(s.__c&&s.__c.__H&&(s.__c.__H.__.forEach(function(u){typeof u.__c=="function"&&u.__c()}),s.__c.__H=null),(s=Bt({},s)).__c!=null&&(s.__c.__P===c&&(s.__c.__P=l),s.__c=null),s.__k=s.__k&&s.__k.map(function(u){return i(u,l,c)})),s}(this.__b,n,r.__O=r.__P)}this.__b=null}var o=e.__e&&Q(R,null,t.fallback);return o&&(o.__h=null),[Q(R,null,e.__e?null:t.children),o]};var Ce=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]{const o=n.name||w.categories[n.id],i=!this.props.unfocused&&n.id==this.state.categoryId;return i&&(e=r),d("button",{"aria-label":o,"aria-selected":i||void 0,title:o,type:"button",class:"flex flex-grow flex-center",onMouseDown:s=>s.preventDefault(),onClick:()=>{this.props.onClick({category:n,i:r})},children:this.renderIcon(n)})}),d("div",{class:"bar",style:{width:`${100/this.categories.length}%`,opacity:e==null?0:1,transform:this.props.dir==="rtl"?`scaleX(-1) translateX(${e*100}%)`:`translateX(${e*100}%)`}})]})})}constructor(){super(),this.categories=_.categories.filter(e=>!e.target),this.state={categoryId:this.categories[0].id}}}class qt extends q{shouldComponentUpdate(e){for(let n in e)if(n!="children"&&e[n]!=this.props[n])return!0;return!1}render(){return this.props.children}}const O={rowsPerRender:10};class Kt extends S{getInitialState(e=this.props){return{skin:L.get("skin")||e.skin,theme:this.initTheme(e.theme)}}componentWillMount(){this.dir=w.rtl?"rtl":"ltr",this.refs={menu:j(),navigation:j(),scroll:j(),search:j(),searchInput:j(),skinToneButton:j(),skinToneRadio:j()},this.initGrid(),this.props.stickySearch==!1&&this.props.searchPosition=="sticky"&&(console.warn("[EmojiMart] Deprecation warning: `stickySearch` has been renamed `searchPosition`."),this.props.searchPosition="static")}componentDidMount(){if(this.register(),this.shadowRoot=this.base.parentNode,this.props.autoFocus){const{searchInput:e}=this.refs;e.current&&e.current.focus()}}componentWillReceiveProps(e){this.nextState||(this.nextState={});for(const n in e)this.nextState[n]=e[n];clearTimeout(this.nextStateTimer),this.nextStateTimer=setTimeout(()=>{let n=!1;for(const o in this.nextState)this.props[o]=this.nextState[o],(o==="custom"||o==="categories")&&(n=!0);delete this.nextState;const r=this.getInitialState();if(n)return this.reset(r);this.setState(r)})}componentWillUnmount(){this.unregister()}async reset(e={}){await G(this.props),this.initGrid(),this.unobserve(),this.setState(e,()=>{this.observeCategories(),this.observeRows()})}register(){document.addEventListener("click",this.handleClickOutside),this.observe()}unregister(){document.removeEventListener("click",this.handleClickOutside),this.unobserve()}observe(){this.observeCategories(),this.observeRows()}unobserve({except:e=[]}={}){Array.isArray(e)||(e=[e]);for(const n of this.observers)e.includes(n)||n.disconnect();this.observers=[].concat(e)}initGrid(){const{categories:e}=_;this.refs.categories=new Map;const n=_.categories.map(o=>o.id).join(",");this.navKey&&this.navKey!=n&&this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0),this.navKey=n,this.grid=[],this.grid.setsize=0;const r=(o,i)=>{const s=[];s.__categoryId=i.id,s.__index=o.length,this.grid.push(s);const l=this.grid.length-1,c=l%O.rowsPerRender?{}:j();return c.index=l,c.posinset=this.grid.setsize+1,o.push(c),s};for(let o of e){const i=[];let s=r(i,o);for(let l of o.emojis)s.length==this.getPerLine()&&(s=r(i,o)),this.grid.setsize+=1,s.push(l);this.refs.categories.set(o.id,{root:j(),rows:i})}}initTheme(e){if(e!="auto")return e;if(!this.darkMedia){if(this.darkMedia=matchMedia("(prefers-color-scheme: dark)"),this.darkMedia.media.match(/^not/))return"light";this.darkMedia.addListener(()=>{this.props.theme=="auto"&&this.setState({theme:this.darkMedia.matches?"dark":"light"})})}return this.darkMedia.matches?"dark":"light"}initDynamicPerLine(e=this.props){if(!e.dynamicWidth)return;const{element:n,emojiButtonSize:r}=e,o=()=>{const{width:s}=n.getBoundingClientRect();return Math.floor(s/r)},i=new ResizeObserver(()=>{this.unobserve({except:i}),this.setState({perLine:o()},()=>{this.initGrid(),this.forceUpdate(()=>{this.observeCategories(),this.observeRows()})})});return i.observe(n),this.observers.push(i),o()}getPerLine(){return this.state.perLine||this.props.perLine}getEmojiByPos([e,n]){const r=this.state.searchResults||this.grid,o=r[e]&&r[e][n];if(o)return E.get(o)}observeCategories(){const e=this.refs.navigation.current;if(!e)return;const n=new Map,r=s=>{s!=e.state.categoryId&&e.setState({categoryId:s})},o={root:this.refs.scroll.current,threshold:[0,1]},i=new IntersectionObserver(s=>{for(const c of s){const u=c.target.dataset.id;n.set(u,c.intersectionRatio)}const l=[...n];for(const[c,u]of l)if(u){r(c);break}},o);for(const{root:s}of this.refs.categories.values())i.observe(s.current);this.observers.push(i)}observeRows(){const e={...this.state.visibleRows},n=new IntersectionObserver(r=>{for(const o of r){const i=parseInt(o.target.dataset.index);o.isIntersecting?e[i]=!0:delete e[i]}this.setState({visibleRows:e})},{root:this.refs.scroll.current,rootMargin:`${this.props.emojiButtonSize*(O.rowsPerRender+5)}px 0px ${this.props.emojiButtonSize*O.rowsPerRender}px`});for(const{rows:r}of this.refs.categories.values())for(const o of r)o.current&&n.observe(o.current);this.observers.push(n)}preventDefault(e){e.preventDefault()}unfocusSearch(){const e=this.refs.searchInput.current;e&&e.blur()}navigate({e,input:n,left:r,right:o,up:i,down:s}){const l=this.state.searchResults||this.grid;if(!l.length)return;let[c,u]=this.state.pos;const a=(()=>{if(c==0&&u==0&&!e.repeat&&(r||i))return null;if(c==-1)return!e.repeat&&(o||s)&&n.selectionStart==n.value.length?[0,0]:null;if(r||o){let p=l[c];const h=r?-1:1;if(u+=h,!p[u]){if(c+=h,p=l[c],!p)return c=r?0:l.length-1,u=r?0:l[c].length-1,[c,u];u=r?p.length-1:0}return[c,u]}if(i||s){c+=i?-1:1;const p=l[c];return p?(p[u]||(u=p.length-1),[c,u]):(c=i?0:l.length-1,u=i?0:l[c].length-1,[c,u])}})();if(a)e.preventDefault();else{this.state.pos[0]>-1&&this.setState({pos:[-1,-1]});return}this.setState({pos:a,keyboard:!0},()=>{this.scrollTo({row:a[0]})})}scrollTo({categoryId:e,row:n}){const r=this.state.searchResults||this.grid;if(!r.length)return;const o=this.refs.scroll.current,i=o.getBoundingClientRect();let s=0;if(n>=0&&(e=r[n].__categoryId),e&&(s=(this.refs[e]||this.refs.categories.get(e).root).current.getBoundingClientRect().top-(i.top-o.scrollTop)+1),n>=0)if(!n)s=0;else{const l=r[n].__index,c=s+l*this.props.emojiButtonSize,u=c+this.props.emojiButtonSize+this.props.emojiButtonSize*.88;if(co.scrollTop+i.height)s=u-i.height;else return}this.ignoreMouse(),o.scrollTop=s}ignoreMouse(){this.mouseIsIgnored=!0,clearTimeout(this.ignoreMouseTimer),this.ignoreMouseTimer=setTimeout(()=>{delete this.mouseIsIgnored},100)}handleEmojiOver(e){this.mouseIsIgnored||this.state.showSkins||this.setState({pos:e||[-1,-1],keyboard:!1})}handleEmojiClick({e,emoji:n,pos:r}){if(this.props.onEmojiSelect&&(!n&&r&&(n=this.getEmojiByPos(r)),n)){const o=Mt(n,{skinIndex:this.state.skin-1});this.props.maxFrequentRows&&qe.add(o,this.props),this.props.onEmojiSelect(o,e)}}closeSkins(){this.state.showSkins&&(this.setState({showSkins:null,tempSkin:null}),this.base.removeEventListener("click",this.handleBaseClick),this.base.removeEventListener("keydown",this.handleBaseKeydown))}handleSkinMouseOver(e){this.setState({tempSkin:e})}handleSkinClick(e){this.ignoreMouse(),this.closeSkins(),this.setState({skin:e,tempSkin:null}),L.set("skin",e)}renderNav(){return d(Wt,{ref:this.refs.navigation,icons:this.props.icons,theme:this.state.theme,dir:this.dir,unfocused:!!this.state.searchResults,position:this.props.navPosition,onClick:this.handleCategoryClick},this.navKey)}renderPreview(){const e=this.getEmojiByPos(this.state.pos),n=this.state.searchResults&&!this.state.searchResults.length;return d("div",{id:"preview",class:"flex flex-middle",dir:this.dir,"data-position":this.props.previewPosition,children:[d("div",{class:"flex flex-middle flex-grow",children:[d("div",{class:"flex flex-auto flex-middle flex-center",style:{height:this.props.emojiButtonSize,fontSize:this.props.emojiButtonSize},children:d(ne,{emoji:e,id:n?this.props.noResultsEmoji||"cry":this.props.previewEmoji||(this.props.previewPosition=="top"?"point_down":"point_up"),set:this.props.set,size:this.props.emojiButtonSize,skin:this.state.tempSkin||this.state.skin,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})}),d("div",{class:`margin-${this.dir[0]}`,children:e||n?d("div",{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[d("div",{class:"preview-title ellipsis",children:e?e.name:w.search_no_results_1}),d("div",{class:"preview-subtitle ellipsis color-c",children:e?e.skins[0].shortcodes:w.search_no_results_2})]}):d("div",{class:"preview-placeholder color-c",children:w.pick})})]}),!e&&this.props.skinTonePosition=="preview"&&this.renderSkinToneButton()]})}renderEmojiButton(e,{pos:n,posinset:r,grid:o}){const i=this.props.emojiButtonSize,s=this.state.tempSkin||this.state.skin,c=(e.skins[s-1]||e.skins[0]).native,u=jt(this.state.pos,n),a=n.concat(e.id).join("");return d(qt,{selected:u,skin:s,size:i,children:d("button",{"aria-label":c,"aria-selected":u||void 0,"aria-posinset":r,"aria-setsize":o.setsize,"data-keyboard":this.state.keyboard,title:this.props.previewPosition=="none"?e.name:void 0,type:"button",class:"flex flex-center flex-middle",tabindex:"-1",onClick:p=>this.handleEmojiClick({e:p,emoji:e}),onMouseEnter:()=>this.handleEmojiOver(n),onMouseLeave:()=>this.handleEmojiOver(),style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize,fontSize:this.props.emojiSize,lineHeight:0},children:[d("div",{"aria-hidden":"true",class:"background",style:{borderRadius:this.props.emojiButtonRadius,backgroundColor:this.props.emojiButtonColors?this.props.emojiButtonColors[(r-1)%this.props.emojiButtonColors.length]:void 0}}),d(ne,{emoji:e,set:this.props.set,size:this.props.emojiSize,skin:s,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})]})},a)}renderSearch(){const e=this.props.previewPosition=="none"||this.props.skinTonePosition=="search";return d("div",{children:[d("div",{class:"spacer"}),d("div",{class:"flex flex-middle",children:[d("div",{class:"search relative flex-grow",children:[d("input",{type:"search",ref:this.refs.searchInput,placeholder:w.search,onClick:this.handleSearchClick,onInput:this.handleSearchInput,onKeyDown:this.handleSearchKeyDown,autoComplete:"off"}),d("span",{class:"icon loupe flex",children:W.search.loupe}),this.state.searchResults&&d("button",{title:"Clear","aria-label":"Clear",type:"button",class:"icon delete flex",onClick:this.clearSearch,onMouseDown:this.preventDefault,children:W.search.delete})]}),e&&this.renderSkinToneButton()]})]})}renderSearchResults(){const{searchResults:e}=this.state;return e?d("div",{class:"category",ref:this.refs.search,children:[d("div",{class:`sticky padding-small align-${this.dir[0]}`,children:w.categories.search}),d("div",{children:e.length?e.map((n,r)=>d("div",{class:"flex",children:n.map((o,i)=>this.renderEmojiButton(o,{pos:[r,i],posinset:r*this.props.perLine+i+1,grid:e}))})):d("div",{class:`padding-small align-${this.dir[0]}`,children:this.props.onAddCustomEmoji&&d("a",{onClick:this.props.onAddCustomEmoji,children:w.add_custom})})})]}):null}renderCategories(){const{categories:e}=_,n=!!this.state.searchResults,r=this.getPerLine();return d("div",{style:{visibility:n?"hidden":void 0,display:n?"none":void 0,height:"100%"},children:e.map(o=>{const{root:i,rows:s}=this.refs.categories.get(o.id);return d("div",{"data-id":o.target?o.target.id:o.id,class:"category",ref:i,children:[d("div",{class:`sticky padding-small align-${this.dir[0]}`,children:o.name||w.categories[o.id]}),d("div",{class:"relative",style:{height:s.length*this.props.emojiButtonSize},children:s.map((l,c)=>{const u=l.index-l.index%O.rowsPerRender,a=this.state.visibleRows[u],p="current"in l?l:void 0;if(!a&&!p)return null;const h=c*r,f=h+r,g=o.emojis.slice(h,f);return g.length{if(!m)return d("div",{style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize}});const $=E.get(m);return this.renderEmojiButton($,{pos:[l.index,b],posinset:l.posinset+b,grid:this.grid})})},l.index)})})]})})})}renderSkinToneButton(){return this.props.skinTonePosition=="none"?null:d("div",{class:"flex flex-auto flex-center flex-middle",style:{position:"relative",width:this.props.emojiButtonSize,height:this.props.emojiButtonSize},children:d("button",{type:"button",ref:this.refs.skinToneButton,class:"skin-tone-button flex flex-auto flex-center flex-middle","aria-selected":this.state.showSkins?"":void 0,"aria-label":w.skins.choose,title:w.skins.choose,onClick:this.openSkins,style:{width:this.props.emojiSize,height:this.props.emojiSize},children:d("span",{class:`skin-tone skin-tone-${this.state.skin}`})})})}renderLiveRegion(){const e=this.getEmojiByPos(this.state.pos),n=e?e.name:"";return d("div",{"aria-live":"polite",class:"sr-only",children:n})}renderSkins(){const n=this.refs.skinToneButton.current.getBoundingClientRect(),r=this.base.getBoundingClientRect(),o={};return this.dir=="ltr"?o.right=r.right-n.right-3:o.left=n.left-r.left-3,this.props.previewPosition=="bottom"&&this.props.skinTonePosition=="preview"?o.bottom=r.bottom-n.top+6:(o.top=n.bottom-r.top+3,o.bottom="auto"),d("div",{ref:this.refs.menu,role:"radiogroup",dir:this.dir,"aria-label":w.skins.choose,class:"menu hidden","data-position":o.top?"top":"bottom",style:o,children:[...Array(6).keys()].map(i=>{const s=i+1,l=this.state.skin==s;return d("div",{children:[d("input",{type:"radio",name:"skin-tone",value:s,"aria-label":w.skins[s],ref:l?this.refs.skinToneRadio:null,defaultChecked:l,onChange:()=>this.handleSkinMouseOver(s),onKeyDown:c=>{(c.code=="Enter"||c.code=="Space"||c.code=="Tab")&&(c.preventDefault(),this.handleSkinClick(s))}}),d("button",{"aria-hidden":"true",tabindex:"-1",onClick:()=>this.handleSkinClick(s),onMouseEnter:()=>this.handleSkinMouseOver(s),onMouseLeave:()=>this.handleSkinMouseOver(),class:"option flex flex-grow flex-middle",children:[d("span",{class:`skin-tone skin-tone-${s}`}),d("span",{class:"margin-small-lr",children:w.skins[s]})]})]})})})}render(){const e=this.props.perLine*this.props.emojiButtonSize;return d("section",{id:"root",class:"flex flex-column",dir:this.dir,style:{width:this.props.dynamicWidth?"100%":`calc(${e}px + (var(--padding) + var(--sidebar-width)))`},"data-emoji-set":this.props.set,"data-theme":this.state.theme,"data-menu":this.state.showSkins?"":void 0,children:[this.props.previewPosition=="top"&&this.renderPreview(),this.props.navPosition=="top"&&this.renderNav(),this.props.searchPosition=="sticky"&&d("div",{part:"padding-lr",class:"padding-lr",children:this.renderSearch()}),d("div",{ref:this.refs.scroll,part:"padding-lr",class:"scroll flex-grow padding-lr",children:d("div",{style:{width:this.props.dynamicWidth?"100%":e,height:"100%"},children:[this.props.searchPosition=="static"&&this.renderSearch(),this.renderSearchResults(),this.renderCategories()]})}),this.props.navPosition=="bottom"&&this.renderNav(),this.props.previewPosition=="bottom"&&this.renderPreview(),this.state.showSkins&&this.renderSkins(),this.renderLiveRegion()]})}constructor(e){super(),x(this,"handleClickOutside",n=>{const{element:r}=this.props;n.target!=r&&(this.state.showSkins&&this.closeSkins(),this.props.onClickOutside&&this.props.onClickOutside(n))}),x(this,"handleBaseClick",n=>{this.state.showSkins&&(n.target.closest(".menu")||(n.preventDefault(),n.stopImmediatePropagation(),this.closeSkins()))}),x(this,"handleBaseKeydown",n=>{this.state.showSkins&&n.key=="Escape"&&(n.preventDefault(),n.stopImmediatePropagation(),this.closeSkins())}),x(this,"handleSearchClick",()=>{this.getEmojiByPos(this.state.pos)&&this.setState({pos:[-1,-1]})}),x(this,"handleSearchInput",async()=>{const n=this.refs.searchInput.current;if(!n)return;const{value:r}=n,o=await E.search(r),i=()=>{this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0)};if(!o)return this.setState({searchResults:o,pos:[-1,-1]},i);const s=n.selectionStart==n.value.length?[0,0]:[-1,-1],l=[];l.setsize=o.length;let c=null;for(let u of o)(!l.length||c.length==this.getPerLine())&&(c=[],c.__categoryId="search",c.__index=l.length,l.push(c)),c.push(u);this.ignoreMouse(),this.setState({searchResults:l,pos:s},i)}),x(this,"handleSearchKeyDown",n=>{const r=n.currentTarget;switch(n.stopImmediatePropagation(),n.key){case"ArrowLeft":this.navigate({e:n,input:r,left:!0});break;case"ArrowRight":this.navigate({e:n,input:r,right:!0});break;case"ArrowUp":this.navigate({e:n,input:r,up:!0});break;case"ArrowDown":this.navigate({e:n,input:r,down:!0});break;case"Enter":n.preventDefault(),this.handleEmojiClick({e:n,pos:this.state.pos});break;case"Escape":n.preventDefault(),this.state.searchResults?this.clearSearch():this.unfocusSearch();break}}),x(this,"clearSearch",()=>{const n=this.refs.searchInput.current;n&&(n.value="",n.focus(),this.handleSearchInput())}),x(this,"handleCategoryClick",({category:n,i:r})=>{this.scrollTo(r==0?{row:-1}:{categoryId:n.id})}),x(this,"openSkins",n=>{const{currentTarget:r}=n,o=r.getBoundingClientRect();this.setState({showSkins:o},async()=>{await zt(2);const i=this.refs.menu.current;i&&(i.classList.remove("hidden"),this.refs.skinToneRadio.current.focus(),this.base.addEventListener("click",this.handleBaseClick,!0),this.base.addEventListener("keydown",this.handleBaseKeydown,!0))})}),this.observers=[],this.state={pos:[-1,-1],perLine:this.initDynamicPerLine(e),visibleRows:{0:!0},...this.getInitialState(e)}}}class se extends Pt{async connectedCallback(){const e=Je(this.props,z,this);e.element=this,e.ref=n=>{this.component=n},await G(e),!this.disconnected&&Ne(d(Kt,{...e}),this.shadowRoot)}constructor(e){super(e,{styles:Re(nt)})}}x(se,"Props",z);typeof customElements<"u"&&!customElements.get("em-emoji-picker")&&customElements.define("em-emoji-picker",se);var nt={};nt=`:host { width: min-content; height: 435px; min-height: 230px; diff --git a/packs/js/emoji-picker-modal-3d0b0818.js b/packs/js/emoji-picker-modal-a3e23f07.js similarity index 81% rename from packs/js/emoji-picker-modal-3d0b0818.js rename to packs/js/emoji-picker-modal-a3e23f07.js index fbbd87ee3..95144d3ee 100644 --- a/packs/js/emoji-picker-modal-3d0b0818.js +++ b/packs/js/emoji-picker-modal-a3e23f07.js @@ -1 +1 @@ -import{a as o,l3 as d,F as c,e4 as r,e5 as m}from"../index-7380452a.js";var v=function(e){var n=e.onPickEmoji,t=e.onClose,l=function(i){n(i),t()};return o(m,{defaultStyle:{top:100},style:{top:r(0)}},void 0,function(a){var i=a.top;return o("div",{className:"modal-root__modal actions-modal",style:{top:"".concat(i,"%")}},void 0,o("ul",{},void 0,o("li",{},void 0,o(d,{onPickEmoji:l,visible:!0,setVisible:function(){},update:function(){},dynamicWidth:!0,emojiSize:{size:34,buttonSize:46}})),o("li",{className:"dropdown-menu__separator"}),o("li",{},void 0,o("button",{type:"button",onClick:t},void 0,o(c,{id:"lightbox.close",defaultMessage:"Cancel"})))))})};export{v as default}; +import{a as o,l3 as d,F as c,e4 as r,e5 as m}from"../index-be605fd2.js";var v=function(e){var n=e.onPickEmoji,t=e.onClose,l=function(i){n(i),t()};return o(m,{defaultStyle:{top:100},style:{top:r(0)}},void 0,function(a){var i=a.top;return o("div",{className:"modal-root__modal actions-modal",style:{top:"".concat(i,"%")}},void 0,o("ul",{},void 0,o("li",{},void 0,o(d,{onPickEmoji:l,visible:!0,setVisible:function(){},update:function(){},dynamicWidth:!0,emojiSize:{size:34,buttonSize:46}})),o("li",{className:"dropdown-menu__separator"}),o("li",{},void 0,o("button",{type:"button",onClick:t},void 0,o(c,{id:"lightbox.close",defaultMessage:"Cancel"})))))})};export{v as default}; diff --git a/packs/js/es.array.last-index-of-ca8fdd84.js b/packs/js/es.array.last-index-of-d76ad0ed.js similarity index 86% rename from packs/js/es.array.last-index-of-ca8fdd84.js rename to packs/js/es.array.last-index-of-d76ad0ed.js index 79a0431bd..25b14ab35 100644 --- a/packs/js/es.array.last-index-of-ca8fdd84.js +++ b/packs/js/es.array.last-index-of-d76ad0ed.js @@ -1 +1 @@ -import{dl as d,d3 as i,dm as I,cV as O,dn as v,cT as l}from"../index-7380452a.js";var o=i,x=I,g=v,y=O,c=d,h=Math.min,t=[].lastIndexOf,f=!!t&&1/[1].lastIndexOf(1,-0)<0,u=c("lastIndexOf"),m=f||!u,p=m?function(s){if(f)return o(t,this,arguments)||0;var a=x(this),e=y(a),r=e-1;for(arguments.length>1&&(r=h(r,g(arguments[1]))),r<0&&(r=e+r);r>=0;r--)if(r in a&&a[r]===s)return r||0;return-1}:t,$=l,n=p;$({target:"Array",proto:!0,forced:n!==[].lastIndexOf},{lastIndexOf:n}); +import{dl as d,d3 as i,dm as I,cV as O,dn as v,cT as l}from"../index-be605fd2.js";var o=i,x=I,g=v,y=O,c=d,h=Math.min,t=[].lastIndexOf,f=!!t&&1/[1].lastIndexOf(1,-0)<0,u=c("lastIndexOf"),m=f||!u,p=m?function(s){if(f)return o(t,this,arguments)||0;var a=x(this),e=y(a),r=e-1;for(arguments.length>1&&(r=h(r,g(arguments[1]))),r<0&&(r=e+r);r>=0;r--)if(r in a&&a[r]===s)return r||0;return-1}:t,$=l,n=p;$({target:"Array",proto:!0,forced:n!==[].lastIndexOf},{lastIndexOf:n}); diff --git a/packs/js/es.array.splice-d733542e.js b/packs/js/es.array.splice-adb98933.js similarity index 90% rename from packs/js/es.array.splice-d733542e.js rename to packs/js/es.array.splice-adb98933.js index 0466076bd..84598cb92 100644 --- a/packs/js/es.array.splice-d733542e.js +++ b/packs/js/es.array.splice-adb98933.js @@ -1 +1 @@ -import{cT as g,cU as y,cV as h,cW as u,cY as S,f6 as d,f7 as m,cX as O,f8 as $,f9 as I,dn as A}from"../index-7380452a.js";var x=g,P=y,C=I,L=A,b=h,E=u,M=S,T=d,k=m,l=O,H=$,_=H("splice"),j=Math.max,w=Math.min;x({target:"Array",proto:!0,forced:!_},{splice:function(v,p){var r=P(this),o=b(r),n=C(v,o),c=arguments.length,t,a,f,e,s,i;for(c===0?t=a=0:c===1?(t=0,a=o-n):(t=c-2,a=w(j(L(p),0),o-n)),M(o+t-a),f=T(r,a),e=0;eo-a+t;e--)l(r,e-1)}else if(t>a)for(e=o-a;e>n;e--)s=e+a-1,i=e+t-1,s in r?r[i]=r[s]:l(r,i);for(e=0;eo-a+t;e--)l(r,e-1)}else if(t>a)for(e=o-a;e>n;e--)s=e+a-1,i=e+t-1,s in r?r[i]=r[s]:l(r,i);for(e=0;e0;if(!r&&v)return n(j,{});if(!r)return n(_,{showPrivacyIndicator:!0});var m=[];return $&&m.push.apply(m,B(U(d).toArray())),n(J,{space:2},void 0,f&&n("div",{className:"border-b border-solid border-gray-200 p-2 pt-0 dark:border-gray-800"},void 0,n(H,{id:"reply:".concat(r.id),autoFocus:!1,event:r.id})),E.createElement("div",{ref:T,className:"thread p-0 shadow-none sm:p-2"},E.createElement(te,{id:"thread",ref:M,hasMore:!!c,onLoadMore:W,placeholderComponent:function(){return n(_,{showPrivacyIndicator:!0,variant:"slim"})},initialTopMostItemIndex:0,emptyMessage:n(X,{id:"event.discussion.empty",defaultMessage:"No one has commented this event yet. When someone does, they will appear here."})},m)))};export{he as default}; +import{d as q,r as s,aL as G,q as h,b9 as Q,at as D,kh as z,Q as K,aM as V,a as n,aC as j,aO as _,bL as B,e8 as H,a2 as J,R as E,F as X,aP as Y,aQ as Z,dg as ee,O as L}from"../index-be605fd2.js";import{S as te}from"./scrollable-list-1e43c72d.js";import{P as ae}from"./pending-status-959f7aeb.js";import{g as re,a as ne}from"./thread-f9f548a4.js";import"./index-85a17314.js";import"./load-more-55559f32.js";import"./poll-preview-ddaf662b.js";import"./noop-3f99ae3e.js";import"./status-container-e53698d2.js";var he=function(u){var l=q(),P=s.useCallback(G(),[]),r=h(function(a){return P(a,{id:u.params.statusId})}),f=h(function(a){return a.me}),d=h(function(a){var e=Q();if(r){var t=r.id;e=re(a,t),e=e.delete(t)}return e}),R=s.useState(!!r),S=D(R,2),v=S[0],y=S[1],k=s.useState(),b=D(k,2),c=b[0],g=b[1],T=s.useRef(null),M=s.useRef(null),N=function(){var a=Y(regeneratorRuntime.mark(function e(){var t,p,o,C;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return t=u.params,p=t.statusId,i.next=4,l(Z(p));case 4:o=i.sent,C=o.next,g(C);case 7:case"end":return i.stop()}},e)}));return function(){return a.apply(this,arguments)}}();s.useEffect(function(){N().then(function(){y(!0)}).catch(function(){y(!0)})},[u.params.statusId]),s.useEffect(function(){v&&f&&l(z("reply:".concat(u.params.statusId),r))},[v,f]);var I=function(e){var t=L(d).indexOf(e);x(t-1)},w=function(e){var t=L(d).indexOf(e);x(t+1)},x=function(e){var t;(t=M.current)===null||t===void 0||t.scrollIntoView({index:e,behavior:"smooth",done:function(){var o=document.querySelector('#thread [data-index="'.concat(e,'"] .focusable'));o&&o.focus()}})},A=function(e){return n("div",{className:"py-4 pb-8"},void 0,n(ee,{id:e,onMoveUp:I,onMoveDown:w},e))},O=function(e){return n(ne,{id:e,focusedStatusId:r.id,onMoveUp:I,onMoveDown:w},e)},F=function(e){var t=e.replace(/^末pending-/,"");return n(ae,{idempotencyKey:t,thread:!0},e)},U=function(e){return e.map(function(t){return t.endsWith("-tombstone")?A(t):t.startsWith("末pending-")?F(t):O(t)})},W=s.useCallback(K(function(){c&&r&&l(V(r.id,c)).then(function(a){var e=a.next;g(e)}).catch(function(){})},300,{leading:!0}),[c,r]),$=d.size>0;if(!r&&v)return n(j,{});if(!r)return n(_,{showPrivacyIndicator:!0});var m=[];return $&&m.push.apply(m,B(U(d).toArray())),n(J,{space:2},void 0,f&&n("div",{className:"border-b border-solid border-gray-200 p-2 pt-0 dark:border-gray-800"},void 0,n(H,{id:"reply:".concat(r.id),autoFocus:!1,event:r.id})),E.createElement("div",{ref:T,className:"thread p-0 shadow-none sm:p-2"},E.createElement(te,{id:"thread",ref:M,hasMore:!!c,onLoadMore:W,placeholderComponent:function(){return n(_,{showPrivacyIndicator:!0,variant:"slim"})},initialTopMostItemIndex:0,emptyMessage:n(X,{id:"event.discussion.empty",defaultMessage:"No one has commented this event yet. When someone does, they will appear here."})},m)))};export{he as default}; diff --git a/packs/js/event-header-163e2ab5.js b/packs/js/event-header-55d43bbc.js similarity index 99% rename from packs/js/event-header-163e2ab5.js rename to packs/js/event-header-55d43bbc.js index 1a8b4ba09..b4f43a124 100644 --- a/packs/js/event-header-163e2ab5.js +++ b/packs/js/event-header-55d43bbc.js @@ -1 +1 @@ -import{a as e,a2 as M,eV as k,eW as h,u as ie,d as se,a7 as oe,g as re,f as le,b8 as ce,R as v,dh as de,H as m,I as C,F as f,L as S,cz as ue,jX as ge,d4 as ve,jY as me,hE as fe,y as pe,fO as ke,fP as he,aG as Me,cq as _e,fQ as be,jZ as Ce,fS as Re,j_ as xe,av as Se,aw as Pe,aa as ye,j$ as qe,o as Ne,aD as u,O as Ee,hF as we,bT as Ae,ch as De,k0 as Ie,hU as Te,k as Be,k1 as He,hN as Oe,hO as Fe,aH as R,v as Le,D as Ue,db as je,hZ as ze,fT as P,gr as Qe,k2 as Ve,J as Ze,js as Ge,k3 as Je,k4 as We,k5 as Xe,k6 as Ye,k7 as $e,k8 as Ke,k9 as ea,ka as aa,kb as ta,kc as na,kd as ia,c5 as y,gq as q,bN as N,ke as sa,gP as oa,kf as ra}from"../index-7380452a.js";import{d as la}from"./download-2e3dfb39.js";const ca="/packs/assets/flag-3-9139db0c.svg",da="/packs/assets/calendar-plus-57e48219.svg";var ua=function(){var _=h(5,25),a=h(5,30),n=h(5,30),o=h(5,30);return e(M,{className:"animate-pulse text-primary-50 dark:text-primary-800",space:2},void 0,e("p",{className:"text-lg"},void 0,k(_)),e(M,{space:1},void 0,e("p",{},void 0,k(a)),e("p",{},void 0,k(n)),e("p",{},void 0,k(o))))},i=Ne({bannerHeader:{id:"event.banner",defaultMessage:"Event banner"},exportIcs:{id:"event.export_ics",defaultMessage:"Export to your calendar"},copy:{id:"event.copy",defaultMessage:"Copy link to event"},external:{id:"event.external",defaultMessage:"View event on {domain}"},bookmark:{id:"status.bookmark",defaultMessage:"Bookmark"},unbookmark:{id:"status.unbookmark",defaultMessage:"Remove bookmark"},quotePost:{id:"event.quote",defaultMessage:"Quote event"},reblog:{id:"event.reblog",defaultMessage:"Repost event"},unreblog:{id:"event.unreblog",defaultMessage:"Un-repost event"},pin:{id:"status.pin",defaultMessage:"Pin on profile"},unpin:{id:"status.unpin",defaultMessage:"Unpin from profile"},delete:{id:"status.delete",defaultMessage:"Delete"},mention:{id:"status.mention",defaultMessage:"Mention @{name}"},chat:{id:"status.chat",defaultMessage:"Chat with @{name}"},direct:{id:"status.direct",defaultMessage:"Direct message @{name}"},mute:{id:"account.mute",defaultMessage:"Mute @{name}"},block:{id:"account.block",defaultMessage:"Block @{name}"},report:{id:"status.report",defaultMessage:"Report @{name}"},adminAccount:{id:"status.admin_account",defaultMessage:"Moderate @{name}"},adminStatus:{id:"status.admin_status",defaultMessage:"Open this post in the moderation interface"},markStatusSensitive:{id:"admin.statuses.actions.mark_status_sensitive",defaultMessage:"Mark post sensitive"},markStatusNotSensitive:{id:"admin.statuses.actions.mark_status_not_sensitive",defaultMessage:"Mark post not sensitive"},deleteStatus:{id:"admin.statuses.actions.delete_status",defaultMessage:"Delete post"},blockConfirm:{id:"confirmations.block.confirm",defaultMessage:"Block"},blockAndReport:{id:"confirmations.block.block_and_report",defaultMessage:"Block & Report"},deleteConfirm:{id:"confirmations.delete_event.confirm",defaultMessage:"Delete"},deleteHeading:{id:"confirmations.delete_event.heading",defaultMessage:"Delete event"},deleteMessage:{id:"confirmations.delete_event.message",defaultMessage:"Are you sure you want to delete this event?"}}),ma=function(_){var a=_.status,n=ie(),o=se(),w=oe(),p=re(),A=le(),D=ce(),c=D.account,I=c?c.staff:!1,T=c?c.admin:!1;if(!a||!a.event)return v.createElement(v.Fragment,null,e("div",{className:"-mx-4 -mt-4"},void 0,e("div",{className:"relative h-32 w-full bg-gray-200 dark:bg-gray-900/50 md:rounded-t-xl lg:h-48"})),e(ua,{}));var l=a.account,d=a.event,b=d.banner,g=l.username,B=function(r){r.preventDefault(),r.stopPropagation(),o(u("MEDIA",{media:Ee([d.banner])}))},H=function(){o(We(a.id)).then(function(r){var s=r.data;la(s,"calendar.ics")}).catch(function(){})},O=function(){var r=a.uri;Xe(r)},F=function(){window.open(a.uri,"_blank")},L=function(){o(Ye(a))},U=function(){var r=function(){return o(ra(a))},s=A.get("boostModal");s?o(u("BOOST",{status:a,onReblog:r})):r()},j=function(){o($e(a))},z=function(){o(Ke(a))},Q=function(){o(u("CONFIRM",{icon:R,heading:n.formatMessage(i.deleteHeading),message:n.formatMessage(i.deleteMessage),confirm:n.formatMessage(i.deleteConfirm),onConfirm:function(){return o(ea(a.id))}}))},V=function(){o(aa(l))},Z=function(){o(ta(l.id,w))},G=function(){o(na(l))},J=function(){o(ia(l))},W=function(){o(u("CONFIRM",{icon:P,heading:e(f,{id:"confirmations.block.heading",defaultMessage:"Block @{name}",values:{name:l.acct}}),message:e(f,{id:"confirmations.block.message",defaultMessage:"Are you sure you want to block {name}?",values:{name:e("strong",{},void 0,"@",l.acct)}}),confirm:n.formatMessage(i.blockConfirm),onConfirm:function(){return o(y(l.id))},secondary:n.formatMessage(i.blockAndReport),onSecondary:function(){o(y(l.id)),o(q(N.STATUS,l,{status:a}))}}))},X=function(){o(q(N.STATUS,l,{status:a}))},Y=function(){o(u("ACCOUNT_MODERATION",{accountId:l.id}))},$=function(){window.open("/pleroma/admin/#/statuses/".concat(a.id,"/"),"_blank")},K=function(){o(sa(n,a.id,a.sensitive))},ee=function(){o(oa(n,a.id))},ae=function(){var r=l.fqn.split("@")[1],s=[{text:n.formatMessage(i.exportIcs),action:H,icon:da},{text:n.formatMessage(i.copy),action:O,icon:we}];return p.federating&&Ae(l)&&s.push({text:n.formatMessage(i.external,{domain:r}),action:F,icon:De}),c&&(p.bookmarks&&s.push({text:n.formatMessage(a.bookmarked?i.unbookmark:i.bookmark),action:L,icon:a.bookmarked?Ie:Te}),["public","unlisted"].includes(a.visibility)&&(s.push({text:n.formatMessage(a.reblogged?i.unreblog:i.reblog),action:U,icon:Be}),p.quotePosts&&s.push({text:n.formatMessage(i.quotePost),action:j,icon:He})),s.push(null),c.id===l.id?(["public","unlisted"].includes(a.visibility)&&s.push({text:n.formatMessage(a.pinned?i.unpin:i.pin),action:z,icon:a.pinned?Oe:Fe}),s.push({text:n.formatMessage(i.delete),action:Q,icon:R,destructive:!0})):(s.push({text:n.formatMessage(i.mention,{name:g}),action:V,icon:Le}),a.getIn(["account","pleroma","accepts_chat_messages"])===!0?s.push({text:n.formatMessage(i.chat,{name:g}),action:Z,icon:Ue}):p.privacyScopes&&s.push({text:n.formatMessage(i.direct,{name:g}),action:G,icon:je}),s.push(null),s.push({text:n.formatMessage(i.mute,{name:g}),action:J,icon:ze}),s.push({text:n.formatMessage(i.block,{name:g}),action:W,icon:P}),s.push({text:n.formatMessage(i.report,{name:g}),action:X,icon:Qe})),I&&(s.push(null),s.push({text:n.formatMessage(i.adminAccount,{name:l.username}),action:Y,icon:Ve}),T&&s.push({text:n.formatMessage(i.adminStatus),action:$,icon:Ze}),s.push({text:n.formatMessage(a.sensitive===!1?i.markStatusSensitive:i.markStatusNotSensitive),action:K,icon:Ge}),l.id!==(c==null?void 0:c.id)&&s.push({text:n.formatMessage(i.deleteStatus),action:ee,icon:R,destructive:!0}))),s},te=function(r){r.stopPropagation(),o(Je(a.id))},ne=function(r){r.preventDefault(),r.stopPropagation(),o(c?u("EVENT_PARTICIPANTS",{statusId:a.id}):u("UNAUTHORIZED"))};return v.createElement(v.Fragment,null,e("div",{className:"-mx-4 -mt-4"},void 0,e("div",{className:"relative h-32 w-full bg-gray-200 dark:bg-gray-900/50 md:rounded-t-xl lg:h-48"},void 0,b&&e("a",{href:b.url,onClick:B,target:"_blank"},void 0,e(de,{src:b.url,alt:n.formatMessage(i.bannerHeader),className:"absolute inset-0 h-full object-cover md:rounded-t-xl"})))),e(M,{space:2},void 0,e(m,{className:"w-full",alignItems:"start",space:2},void 0,e(pe,{className:"grow",size:"lg",weight:"bold"},void 0,d.name),e(ke,{},void 0,e(he,{as:Me,src:_e,theme:"outlined",className:"h-[30px] px-2",iconClassName:"h-4 w-4",children:null}),e(be,{},void 0,ae().map(function(t,r){if(typeof(t==null?void 0:t.text)>"u")return e(Ce,{},r);var s=t.action?Re:xe,x=t.action?{onSelect:t.action}:{to:t.to,as:S,target:t.target||"_self"};return v.createElement(s,Se({key:r},x,{className:"group"}),e("div",{className:"flex items-center"},void 0,t.icon&&e(Pe,{src:t.icon,className:"mr-3 h-5 w-5 flex-none text-gray-400 group-hover:text-gray-500"}),e("div",{className:"truncate"},void 0,t.text)))}))),l.id===(c==null?void 0:c.id)?e(ye,{size:"sm",theme:"secondary",onClick:te},void 0,e(f,{id:"event.manage",defaultMessage:"Manage"})):e(qe,{status:a})),e(M,{space:1},void 0,e(m,{alignItems:"center",space:2},void 0,e(C,{src:ca}),e("span",{},void 0,e(f,{id:"event.organized_by",defaultMessage:"Organized by {name}",values:{name:e(S,{className:"mention inline-block",to:"/@".concat(l.acct)},void 0,e(m,{space:1,alignItems:"center",grow:!0},void 0,e("span",{dangerouslySetInnerHTML:{__html:l.display_name_html}}),l.verified&&e(ue,{})))}}))),e(m,{alignItems:"center",space:2},void 0,e(C,{src:ge}),e("a",{href:"#",className:"hover:underline",onClick:ne},void 0,e("span",{},void 0,e(f,{id:"event.participants",defaultMessage:"{count} {rawCount, plural, one {person} other {people}} going",values:{rawCount:d.participants_count||0,count:ve(d.participants_count||0)}})))),e(me,{status:a}),d.location&&e(m,{alignItems:"center",space:2},void 0,e(C,{src:fe}),e("span",{},void 0,d.location.get("name"))))))};export{ma as default}; +import{a as e,a2 as M,eV as k,eW as h,u as ie,d as se,a7 as oe,g as re,f as le,b8 as ce,R as v,dh as de,H as m,I as C,F as f,L as S,cz as ue,jX as ge,d4 as ve,jY as me,hE as fe,y as pe,fO as ke,fP as he,aG as Me,cq as _e,fQ as be,jZ as Ce,fS as Re,j_ as xe,av as Se,aw as Pe,aa as ye,j$ as qe,o as Ne,aD as u,O as Ee,hF as we,bT as Ae,ch as De,k0 as Ie,hU as Te,k as Be,k1 as He,hN as Oe,hO as Fe,aH as R,v as Le,D as Ue,db as je,hZ as ze,fT as P,gr as Qe,k2 as Ve,J as Ze,js as Ge,k3 as Je,k4 as We,k5 as Xe,k6 as Ye,k7 as $e,k8 as Ke,k9 as ea,ka as aa,kb as ta,kc as na,kd as ia,c5 as y,gq as q,bN as N,ke as sa,gP as oa,kf as ra}from"../index-be605fd2.js";import{d as la}from"./download-2e3dfb39.js";const ca="/packs/assets/flag-3-9139db0c.svg",da="/packs/assets/calendar-plus-57e48219.svg";var ua=function(){var _=h(5,25),a=h(5,30),n=h(5,30),o=h(5,30);return e(M,{className:"animate-pulse text-primary-50 dark:text-primary-800",space:2},void 0,e("p",{className:"text-lg"},void 0,k(_)),e(M,{space:1},void 0,e("p",{},void 0,k(a)),e("p",{},void 0,k(n)),e("p",{},void 0,k(o))))},i=Ne({bannerHeader:{id:"event.banner",defaultMessage:"Event banner"},exportIcs:{id:"event.export_ics",defaultMessage:"Export to your calendar"},copy:{id:"event.copy",defaultMessage:"Copy link to event"},external:{id:"event.external",defaultMessage:"View event on {domain}"},bookmark:{id:"status.bookmark",defaultMessage:"Bookmark"},unbookmark:{id:"status.unbookmark",defaultMessage:"Remove bookmark"},quotePost:{id:"event.quote",defaultMessage:"Quote event"},reblog:{id:"event.reblog",defaultMessage:"Repost event"},unreblog:{id:"event.unreblog",defaultMessage:"Un-repost event"},pin:{id:"status.pin",defaultMessage:"Pin on profile"},unpin:{id:"status.unpin",defaultMessage:"Unpin from profile"},delete:{id:"status.delete",defaultMessage:"Delete"},mention:{id:"status.mention",defaultMessage:"Mention @{name}"},chat:{id:"status.chat",defaultMessage:"Chat with @{name}"},direct:{id:"status.direct",defaultMessage:"Direct message @{name}"},mute:{id:"account.mute",defaultMessage:"Mute @{name}"},block:{id:"account.block",defaultMessage:"Block @{name}"},report:{id:"status.report",defaultMessage:"Report @{name}"},adminAccount:{id:"status.admin_account",defaultMessage:"Moderate @{name}"},adminStatus:{id:"status.admin_status",defaultMessage:"Open this post in the moderation interface"},markStatusSensitive:{id:"admin.statuses.actions.mark_status_sensitive",defaultMessage:"Mark post sensitive"},markStatusNotSensitive:{id:"admin.statuses.actions.mark_status_not_sensitive",defaultMessage:"Mark post not sensitive"},deleteStatus:{id:"admin.statuses.actions.delete_status",defaultMessage:"Delete post"},blockConfirm:{id:"confirmations.block.confirm",defaultMessage:"Block"},blockAndReport:{id:"confirmations.block.block_and_report",defaultMessage:"Block & Report"},deleteConfirm:{id:"confirmations.delete_event.confirm",defaultMessage:"Delete"},deleteHeading:{id:"confirmations.delete_event.heading",defaultMessage:"Delete event"},deleteMessage:{id:"confirmations.delete_event.message",defaultMessage:"Are you sure you want to delete this event?"}}),ma=function(_){var a=_.status,n=ie(),o=se(),w=oe(),p=re(),A=le(),D=ce(),c=D.account,I=c?c.staff:!1,T=c?c.admin:!1;if(!a||!a.event)return v.createElement(v.Fragment,null,e("div",{className:"-mx-4 -mt-4"},void 0,e("div",{className:"relative h-32 w-full bg-gray-200 dark:bg-gray-900/50 md:rounded-t-xl lg:h-48"})),e(ua,{}));var l=a.account,d=a.event,b=d.banner,g=l.username,B=function(r){r.preventDefault(),r.stopPropagation(),o(u("MEDIA",{media:Ee([d.banner])}))},H=function(){o(We(a.id)).then(function(r){var s=r.data;la(s,"calendar.ics")}).catch(function(){})},O=function(){var r=a.uri;Xe(r)},F=function(){window.open(a.uri,"_blank")},L=function(){o(Ye(a))},U=function(){var r=function(){return o(ra(a))},s=A.get("boostModal");s?o(u("BOOST",{status:a,onReblog:r})):r()},j=function(){o($e(a))},z=function(){o(Ke(a))},Q=function(){o(u("CONFIRM",{icon:R,heading:n.formatMessage(i.deleteHeading),message:n.formatMessage(i.deleteMessage),confirm:n.formatMessage(i.deleteConfirm),onConfirm:function(){return o(ea(a.id))}}))},V=function(){o(aa(l))},Z=function(){o(ta(l.id,w))},G=function(){o(na(l))},J=function(){o(ia(l))},W=function(){o(u("CONFIRM",{icon:P,heading:e(f,{id:"confirmations.block.heading",defaultMessage:"Block @{name}",values:{name:l.acct}}),message:e(f,{id:"confirmations.block.message",defaultMessage:"Are you sure you want to block {name}?",values:{name:e("strong",{},void 0,"@",l.acct)}}),confirm:n.formatMessage(i.blockConfirm),onConfirm:function(){return o(y(l.id))},secondary:n.formatMessage(i.blockAndReport),onSecondary:function(){o(y(l.id)),o(q(N.STATUS,l,{status:a}))}}))},X=function(){o(q(N.STATUS,l,{status:a}))},Y=function(){o(u("ACCOUNT_MODERATION",{accountId:l.id}))},$=function(){window.open("/pleroma/admin/#/statuses/".concat(a.id,"/"),"_blank")},K=function(){o(sa(n,a.id,a.sensitive))},ee=function(){o(oa(n,a.id))},ae=function(){var r=l.fqn.split("@")[1],s=[{text:n.formatMessage(i.exportIcs),action:H,icon:da},{text:n.formatMessage(i.copy),action:O,icon:we}];return p.federating&&Ae(l)&&s.push({text:n.formatMessage(i.external,{domain:r}),action:F,icon:De}),c&&(p.bookmarks&&s.push({text:n.formatMessage(a.bookmarked?i.unbookmark:i.bookmark),action:L,icon:a.bookmarked?Ie:Te}),["public","unlisted"].includes(a.visibility)&&(s.push({text:n.formatMessage(a.reblogged?i.unreblog:i.reblog),action:U,icon:Be}),p.quotePosts&&s.push({text:n.formatMessage(i.quotePost),action:j,icon:He})),s.push(null),c.id===l.id?(["public","unlisted"].includes(a.visibility)&&s.push({text:n.formatMessage(a.pinned?i.unpin:i.pin),action:z,icon:a.pinned?Oe:Fe}),s.push({text:n.formatMessage(i.delete),action:Q,icon:R,destructive:!0})):(s.push({text:n.formatMessage(i.mention,{name:g}),action:V,icon:Le}),a.getIn(["account","pleroma","accepts_chat_messages"])===!0?s.push({text:n.formatMessage(i.chat,{name:g}),action:Z,icon:Ue}):p.privacyScopes&&s.push({text:n.formatMessage(i.direct,{name:g}),action:G,icon:je}),s.push(null),s.push({text:n.formatMessage(i.mute,{name:g}),action:J,icon:ze}),s.push({text:n.formatMessage(i.block,{name:g}),action:W,icon:P}),s.push({text:n.formatMessage(i.report,{name:g}),action:X,icon:Qe})),I&&(s.push(null),s.push({text:n.formatMessage(i.adminAccount,{name:l.username}),action:Y,icon:Ve}),T&&s.push({text:n.formatMessage(i.adminStatus),action:$,icon:Ze}),s.push({text:n.formatMessage(a.sensitive===!1?i.markStatusSensitive:i.markStatusNotSensitive),action:K,icon:Ge}),l.id!==(c==null?void 0:c.id)&&s.push({text:n.formatMessage(i.deleteStatus),action:ee,icon:R,destructive:!0}))),s},te=function(r){r.stopPropagation(),o(Je(a.id))},ne=function(r){r.preventDefault(),r.stopPropagation(),o(c?u("EVENT_PARTICIPANTS",{statusId:a.id}):u("UNAUTHORIZED"))};return v.createElement(v.Fragment,null,e("div",{className:"-mx-4 -mt-4"},void 0,e("div",{className:"relative h-32 w-full bg-gray-200 dark:bg-gray-900/50 md:rounded-t-xl lg:h-48"},void 0,b&&e("a",{href:b.url,onClick:B,target:"_blank"},void 0,e(de,{src:b.url,alt:n.formatMessage(i.bannerHeader),className:"absolute inset-0 h-full object-cover md:rounded-t-xl"})))),e(M,{space:2},void 0,e(m,{className:"w-full",alignItems:"start",space:2},void 0,e(pe,{className:"grow",size:"lg",weight:"bold"},void 0,d.name),e(ke,{},void 0,e(he,{as:Me,src:_e,theme:"outlined",className:"h-[30px] px-2",iconClassName:"h-4 w-4",children:null}),e(be,{},void 0,ae().map(function(t,r){if(typeof(t==null?void 0:t.text)>"u")return e(Ce,{},r);var s=t.action?Re:xe,x=t.action?{onSelect:t.action}:{to:t.to,as:S,target:t.target||"_self"};return v.createElement(s,Se({key:r},x,{className:"group"}),e("div",{className:"flex items-center"},void 0,t.icon&&e(Pe,{src:t.icon,className:"mr-3 h-5 w-5 flex-none text-gray-400 group-hover:text-gray-500"}),e("div",{className:"truncate"},void 0,t.text)))}))),l.id===(c==null?void 0:c.id)?e(ye,{size:"sm",theme:"secondary",onClick:te},void 0,e(f,{id:"event.manage",defaultMessage:"Manage"})):e(qe,{status:a})),e(M,{space:1},void 0,e(m,{alignItems:"center",space:2},void 0,e(C,{src:ca}),e("span",{},void 0,e(f,{id:"event.organized_by",defaultMessage:"Organized by {name}",values:{name:e(S,{className:"mention inline-block",to:"/@".concat(l.acct)},void 0,e(m,{space:1,alignItems:"center",grow:!0},void 0,e("span",{dangerouslySetInnerHTML:{__html:l.display_name_html}}),l.verified&&e(ue,{})))}}))),e(m,{alignItems:"center",space:2},void 0,e(C,{src:ge}),e("a",{href:"#",className:"hover:underline",onClick:ne},void 0,e("span",{},void 0,e(f,{id:"event.participants",defaultMessage:"{count} {rawCount, plural, one {person} other {people}} going",values:{rawCount:d.participants_count||0,count:ve(d.participants_count||0)}})))),e(me,{status:a}),d.location&&e(m,{alignItems:"center",space:2},void 0,e(C,{src:fe}),e("span",{},void 0,d.location.get("name"))))))};export{ma as default}; diff --git a/packs/js/event-information-31e23e20.js b/packs/js/event-information-8646cc5b.js similarity index 98% rename from packs/js/event-information-31e23e20.js rename to packs/js/event-information-8646cc5b.js index 97b3d7377..87c7b5613 100644 --- a/packs/js/event-information-31e23e20.js +++ b/packs/js/event-information-8646cc5b.js @@ -1 +1 @@ -import{d as N,r,aL as P,q as H,aU as $,f as Y,at as M,dd as w,et as j,a as e,R as o,F as u,y as l,a2 as d,H as c,A as g,hE as B,hD as G,d8 as y,hF as O,aC as Q,cL as U,gO as J,bR as K,kg as W,aD as X}from"../index-7380452a.js";var te=function(k){var v=k.params,m=N(),x=r.useCallback(P(),[]),a=H(function(i){return x(i,{id:v.statusId})}),D=$(),I=D.tileServer,E=Y(),p=E.get("showSensitiveMedia"),C=r.useState(!!a),f=M(C,2),F=f[0],h=f[1],R=r.useState(w(a,p)),S=M(R,2),_=S[0],b=S[1];r.useEffect(function(){m(j(v.statusId)).then(function(){h(!0)}).catch(function(){h(!0)}),b(w(a,p))},[v.statusId]);var q=function(){b(!_)},L=function(t){t.preventDefault(),m(X("EVENT_MAP",{statusId:a.id}))},T=r.useCallback(function(){var i,t=a.event;if(!t.location)return null;var n=[e(o.Fragment,{},"event-name",t.location.get("name"))];(i=t.location.get("street"))!==null&&i!==void 0&&i.trim()&&n.push(e(o.Fragment,{},"event-street",e("br",{}),t.location.get("street")));var s=[t.location.get("postalCode"),t.location.get("locality"),t.location.get("country")].filter(function(V){return V}).join(", ");return s&&n.push(e(o.Fragment,{},"event-address",e("br",{}),s)),I&&t.location.get("latitude")&&n.push(e(o.Fragment,{},"event-map",e("br",{}),e("a",{href:"#",className:"text-primary-600 hover:underline dark:text-accent-blue",onClick:L},void 0,e(u,{id:"event.show_on_map",defaultMessage:"Show on map"})))),t.location&&e(d,{space:1},void 0,e(l,{size:"xl",weight:"bold"},void 0,e(u,{id:"event.location",defaultMessage:"Location"})),e(c,{space:2,alignItems:"center"},void 0,e(g,{src:B}),e(l,{},void 0,n)))},[a]),z=r.useCallback(function(){var i=a.event;if(!i.start_time)return null;var t=new Date(i.start_time),n=i.end_time&&new Date(i.end_time),s=n&&t.getDate()===n.getDate()&&t.getMonth()===n.getMonth()&&t.getFullYear()===n.getFullYear();return e(d,{space:1},void 0,e(l,{size:"xl",weight:"bold"},void 0,e(u,{id:"event.date",defaultMessage:"Date"})),e(c,{space:2,alignItems:"center"},void 0,e(g,{src:G}),e(l,{},void 0,e(y,{value:t,year:"numeric",month:"long",day:"2-digit",weekday:"long",hour:"2-digit",minute:"2-digit"}),n&&o.createElement(o.Fragment,null," - ",e(y,{value:n,year:s?void 0:"numeric",month:s?void 0:"long",day:s?void 0:"2-digit",weekday:s?void 0:"long",hour:"2-digit",minute:"2-digit"})))))},[a]),A=r.useCallback(function(){var i;return(i=a.event)!==null&&i!==void 0&&i.links.size?e(d,{space:1},void 0,e(l,{size:"xl",weight:"bold"},void 0,e(u,{id:"event.website",defaultMessage:"External links"})),a.event.links.map(function(t){return e(c,{space:2,alignItems:"center"},void 0,e(g,{src:O}),e("a",{href:t.remote_url||t.url,className:"text-primary-600 hover:underline dark:text-accent-blue",target:"_blank"},void 0,(t.remote_url||t.url).replace(/^https?:\/\//,"")))})):null},[a]);return!a&&F?e(Q,{}):a?e(d,{className:"mt-4 sm:p-2",space:2},void 0,!!a.contentHtml.trim()&&e(d,{space:1},void 0,e(l,{size:"xl",weight:"bold"},void 0,e(u,{id:"event.description",defaultMessage:"Description"})),e(K,{status:a,collapsable:!1,translatable:!0}),e(W,{status:a})),e(J,{status:a,showMedia:_,onToggleVisibility:q}),a.quote&&a.pleroma.get("quote_visible",!0)&&e(U,{statusId:a.quote}),T(),z(),A()):null};export{te as default}; +import{d as N,r,aL as P,q as H,aU as $,f as Y,at as M,dd as w,et as j,a as e,R as o,F as u,y as l,a2 as d,H as c,A as g,hE as B,hD as G,d8 as y,hF as O,aC as Q,cL as U,gO as J,bR as K,kg as W,aD as X}from"../index-be605fd2.js";var te=function(k){var v=k.params,m=N(),x=r.useCallback(P(),[]),a=H(function(i){return x(i,{id:v.statusId})}),D=$(),I=D.tileServer,E=Y(),p=E.get("showSensitiveMedia"),C=r.useState(!!a),f=M(C,2),F=f[0],h=f[1],R=r.useState(w(a,p)),S=M(R,2),_=S[0],b=S[1];r.useEffect(function(){m(j(v.statusId)).then(function(){h(!0)}).catch(function(){h(!0)}),b(w(a,p))},[v.statusId]);var q=function(){b(!_)},L=function(t){t.preventDefault(),m(X("EVENT_MAP",{statusId:a.id}))},T=r.useCallback(function(){var i,t=a.event;if(!t.location)return null;var n=[e(o.Fragment,{},"event-name",t.location.get("name"))];(i=t.location.get("street"))!==null&&i!==void 0&&i.trim()&&n.push(e(o.Fragment,{},"event-street",e("br",{}),t.location.get("street")));var s=[t.location.get("postalCode"),t.location.get("locality"),t.location.get("country")].filter(function(V){return V}).join(", ");return s&&n.push(e(o.Fragment,{},"event-address",e("br",{}),s)),I&&t.location.get("latitude")&&n.push(e(o.Fragment,{},"event-map",e("br",{}),e("a",{href:"#",className:"text-primary-600 hover:underline dark:text-accent-blue",onClick:L},void 0,e(u,{id:"event.show_on_map",defaultMessage:"Show on map"})))),t.location&&e(d,{space:1},void 0,e(l,{size:"xl",weight:"bold"},void 0,e(u,{id:"event.location",defaultMessage:"Location"})),e(c,{space:2,alignItems:"center"},void 0,e(g,{src:B}),e(l,{},void 0,n)))},[a]),z=r.useCallback(function(){var i=a.event;if(!i.start_time)return null;var t=new Date(i.start_time),n=i.end_time&&new Date(i.end_time),s=n&&t.getDate()===n.getDate()&&t.getMonth()===n.getMonth()&&t.getFullYear()===n.getFullYear();return e(d,{space:1},void 0,e(l,{size:"xl",weight:"bold"},void 0,e(u,{id:"event.date",defaultMessage:"Date"})),e(c,{space:2,alignItems:"center"},void 0,e(g,{src:G}),e(l,{},void 0,e(y,{value:t,year:"numeric",month:"long",day:"2-digit",weekday:"long",hour:"2-digit",minute:"2-digit"}),n&&o.createElement(o.Fragment,null," - ",e(y,{value:n,year:s?void 0:"numeric",month:s?void 0:"long",day:s?void 0:"2-digit",weekday:s?void 0:"long",hour:"2-digit",minute:"2-digit"})))))},[a]),A=r.useCallback(function(){var i;return(i=a.event)!==null&&i!==void 0&&i.links.size?e(d,{space:1},void 0,e(l,{size:"xl",weight:"bold"},void 0,e(u,{id:"event.website",defaultMessage:"External links"})),a.event.links.map(function(t){return e(c,{space:2,alignItems:"center"},void 0,e(g,{src:O}),e("a",{href:t.remote_url||t.url,className:"text-primary-600 hover:underline dark:text-accent-blue",target:"_blank"},void 0,(t.remote_url||t.url).replace(/^https?:\/\//,"")))})):null},[a]);return!a&&F?e(Q,{}):a?e(d,{className:"mt-4 sm:p-2",space:2},void 0,!!a.contentHtml.trim()&&e(d,{space:1},void 0,e(l,{size:"xl",weight:"bold"},void 0,e(u,{id:"event.description",defaultMessage:"Description"})),e(K,{status:a,collapsable:!1,translatable:!0}),e(W,{status:a})),e(J,{status:a,showMedia:_,onToggleVisibility:q}),a.quote&&a.pleroma.get("quote_visible",!0)&&e(U,{statusId:a.quote}),T(),z(),A()):null};export{te as default}; diff --git a/packs/js/event-map-modal-ae05b221.js b/packs/js/event-map-modal-4a83ec56.js similarity index 99% rename from packs/js/event-map-modal-ae05b221.js rename to packs/js/event-map-modal-4a83ec56.js index fc89dbb8f..eba6b31c9 100644 --- a/packs/js/event-map-modal-ae05b221.js +++ b/packs/js/event-map-modal-4a83ec56.js @@ -1,4 +1,4 @@ -import{cB as Ko,cD as Yo,aU as Xo,r as Qe,aL as Jo,q as $o,a as kt,a2 as Qo,aa as ts,F as gn,bu as es}from"../index-7380452a.js";const is="/packs/assets/gps-ed74badc.svg",ns="/packs/assets/marker-shadow-264f5c64.png",os="/packs/assets/marker-icon-574c3a5c.png",ss="/packs/assets/marker-icon-2x-00179c4c.png";var ti={exports:{}};/* @preserve +import{cB as Ko,cD as Yo,aU as Xo,r as Qe,aL as Jo,q as $o,a as kt,a2 as Qo,aa as ts,F as gn,bu as es}from"../index-be605fd2.js";const is="/packs/assets/gps-ed74badc.svg",ns="/packs/assets/marker-shadow-264f5c64.png",os="/packs/assets/marker-icon-574c3a5c.png",ss="/packs/assets/marker-icon-2x-00179c4c.png";var ti={exports:{}};/* @preserve * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade */(function(yn,jt){(function(l,Et){Et(jt)})(Ko,function(l){var Et="1.9.4";function T(t){var e,i,n,o;for(i=1,n=arguments.length;i"u"||!L||!L.Mixin)){t=X(t)?t:[t];for(var e=0;e0?Math.floor(t):Math.ceil(t)};m.prototype={clone:function(){return new m(this.x,this.y)},add:function(t){return this.clone()._add(_(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(_(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new m(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new m(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=ri(this.x),this.y=ri(this.y),this},distanceTo:function(t){t=_(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=_(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=_(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+G(this.x)+", "+G(this.y)+")"}};function _(t,e,i){return t instanceof m?t:X(t)?new m(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new m(t.x,t.y):new m(t,e,i)}function k(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=F(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>=e.x&&n.x<=i.x,r=o.y>=e.y&&n.y<=i.y;return s&&r},overlaps:function(t){t=F(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>e.x&&n.xe.y&&n.y=e.lat&&o.lat<=i.lat&&n.lng>=e.lng&&o.lng<=i.lng},intersects:function(t){t=O(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&n.lat<=i.lat,r=o.lng>=e.lng&&n.lng<=i.lng;return s&&r},overlaps:function(t){t=O(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>e.lat&&n.late.lng&&n.lng1,Bn=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",z,e),window.removeEventListener("testPassiveEventSupport",z,e)}catch{}return t}(),Nn=function(){return!!document.createElement("canvas").getContext}(),Me=!!(document.createElementNS&&hi("svg").createSVGRect),Rn=!!Me&&function(){var t=document.createElement("div");return t.innerHTML="",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),Dn=!Me&&function(){try{var t=document.createElement("div");t.innerHTML='';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&typeof e.adj=="object"}catch{return!1}}(),Fn=navigator.platform.indexOf("Mac")===0,Hn=navigator.platform.indexOf("Linux")===0;function it(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var f={ie:Xt,ielt9:Tn,edge:li,webkit:Le,android:ci,android23:fi,androidStock:Mn,opera:Te,chrome:di,gecko:_i,safari:Cn,phantom:mi,opera12:pi,win:Sn,ie3d:vi,webkit3d:be,gecko3d:gi,any3d:zn,mobile:It,mobileWebkit:kn,mobileWebkit3d:En,msPointer:yi,pointer:wi,touch:Zn,touchNative:xi,mobileOpera:On,mobileGecko:In,retina:An,passiveEvents:Bn,canvas:Nn,svg:Me,vml:Dn,inlineSvg:Rn,mac:Fn,linux:Hn},Pi=f.msPointer?"MSPointerDown":"pointerdown",Li=f.msPointer?"MSPointerMove":"pointermove",Ti=f.msPointer?"MSPointerUp":"pointerup",bi=f.msPointer?"MSPointerCancel":"pointercancel",Ce={touchstart:Pi,touchmove:Li,touchend:Ti,touchcancel:bi},Mi={touchstart:jn,touchmove:Jt,touchend:Jt,touchcancel:Jt},xt={},Ci=!1;function Wn(t,e,i){return e==="touchstart"&&Vn(),Mi[e]?(i=Mi[e].bind(this,i),t.addEventListener(Ce[e],i,!1),i):(console.warn("wrong event specified:",e),z)}function Un(t,e,i){if(!Ce[e]){console.warn("wrong event specified:",e);return}t.removeEventListener(Ce[e],i,!1)}function Gn(t){xt[t.pointerId]=t}function qn(t){xt[t.pointerId]&&(xt[t.pointerId]=t)}function Si(t){delete xt[t.pointerId]}function Vn(){Ci||(document.addEventListener(Pi,Gn,!0),document.addEventListener(Li,qn,!0),document.addEventListener(Ti,Si,!0),document.addEventListener(bi,Si,!0),Ci=!0)}function Jt(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){e.touches=[];for(var i in xt)e.touches.push(xt[i]);e.changedTouches=[e],t(e)}}function jn(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&N(e),Jt(t,e)}function Kn(t){var e={},i,n;for(n in t)i=t[n],e[n]=i&&i.bind?i.bind(t):i;return t=e,e.type="dblclick",e.detail=2,e.isTrusted=!1,e._simulated=!0,e}var Yn=200;function Xn(t,e){t.addEventListener("dblclick",e);var i=0,n;function o(s){if(s.detail!==1){n=s.detail;return}if(!(s.pointerType==="mouse"||s.sourceCapabilities&&!s.sourceCapabilities.firesTouchEvents)){var r=Oi(s);if(!(r.some(function(h){return h instanceof HTMLLabelElement&&h.attributes.for})&&!r.some(function(h){return h instanceof HTMLInputElement||h instanceof HTMLSelectElement}))){var a=Date.now();a-i<=Yn?(n++,n===2&&e(Kn(s))):n=1,i=a}}}return t.addEventListener("click",o),{dblclick:e,simDblclick:o}}function Jn(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var Se=te(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),At=te(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),zi=At==="webkitTransition"||At==="OTransition"?At+"End":"transitionend";function ki(t){return typeof t=="string"?document.getElementById(t):t}function Bt(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||i==="auto")&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return i==="auto"?null:i}function P(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function E(t){var e=t.parentNode;e&&e.removeChild(t)}function $t(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Pt(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function Lt(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ze(t,e){if(t.classList!==void 0)return t.classList.contains(e);var i=Qt(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function v(t,e){if(t.classList!==void 0)for(var i=Y(e),n=0,o=i.length;n0?2*window.devicePixelRatio:1;function Ai(t){return f.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/to:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}function He(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch{return!1}return i!==t}var eo={__proto__:null,on:p,off:C,stopPropagation:vt,disableScrollPropagation:Fe,disableClickPropagation:Ft,preventDefault:N,stop:gt,getPropagationPath:Oi,getMousePosition:Ii,getWheelDelta:Ai,isExternalTarget:He,addListener:p,removeListener:C},Bi=Zt.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=pt(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=D(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=this._duration*1e3;ethis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,O(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){e=e||{};var i=_(e.paddingTopLeft||e.padding||[0,0]),n=_(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),s=this.project(t),r=this.getPixelBounds(),a=F([r.min.add(i),r.max.subtract(n)]),h=a.getSize();if(!a.contains(s)){this._enforcingBounds=!0;var u=s.subtract(a.getCenter()),c=a.extend(s).getSize().subtract(h);o.x+=u.x<0?-c.x:c.x,o.y+=u.y<0?-c.y:c.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=T({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),o=i.divideBy(2).round(),s=n.subtract(o);return!s.x&&!s.y?this:(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(M(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=T({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=M(this._handleGeolocationResponse,this),i=M(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,i=t.message||(e===1?"permission denied":e===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=t.coords.latitude,i=t.coords.longitude,n=new b(e,i),o=n.toBounds(t.coords.accuracy*2),s=this._locateOptions;if(s.setView){var r=this.getBoundsZoom(o);this.setView(n,s.maxZoom?Math.min(r,s.maxZoom):r)}var a={latlng:n,bounds:o,timestamp:t.timestamp};for(var h in t.coords)typeof t.coords[h]=="number"&&(a[h]=t.coords[h]);this.fire("locationfound",a)}},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),E(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(q(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)E(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),n=P("div",i,e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new H(e,i)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=O(t),i=_(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),h=this.getSize().subtract(i),u=F(this.project(a,n),this.project(r,n)).getSize(),c=f.any3d?this.options.zoomSnap:1,d=h.x/u.x,g=h.y/u.y,R=e?Math.max(d,g):Math.min(d,g);return n=this.getScaleZoom(R,n),c&&(n=Math.round(n/(c/100))*(c/100),n=e?Math.ceil(n/c)*c:Math.floor(n/c)*c),Math.max(o,Math.min(s,n))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new m(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new k(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=e===void 0?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=e===void 0?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.latLngToPoint(w(t),e)},unproject:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.pointToLatLng(_(t),e)},layerPointToLatLng:function(t){var e=_(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(w(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(w(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(O(t))},distance:function(t,e){return this.options.crs.distance(w(t),w(e))},containerPointToLayerPoint:function(t){return _(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return _(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(_(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(w(t)))},mouseEventToContainerPoint:function(t){return Ii(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=ki(t);if(e){if(e._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");p(e,"scroll",this._onScroll,this),this._containerId=y(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&f.any3d,v(t,"leaflet-container"+(f.touch?" leaflet-touch":"")+(f.retina?" leaflet-retina":"")+(f.ielt9?" leaflet-oldie":"")+(f.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=Bt(t,"position");e!=="absolute"&&e!=="relative"&&e!=="fixed"&&e!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),I(this._mapPane,new m(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(v(t.markerPane,"leaflet-zoom-hide"),v(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){I(this._mapPane,new m(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var o=this._zoom!==e;this._moveStart(o,i)._move(t,e)._moveEnd(o),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){e===void 0&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((o||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return q(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){I(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[y(this._container)]=this;var e=t?C:p;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),f.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){q(this._resizeRequest),this._resizeRequest=D(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i=[],n,o=e==="mouseout"||e==="mouseover",s=t.target||t.srcElement,r=!1;s;){if(n=this._targets[y(s)],n&&(e==="click"||e==="preclick")&&this._draggableMoved(n)){r=!0;break}if(n&&n.listens(e,!0)&&(o&&!He(s,t)||(i.push(n),o))||s===this._container)break;s=s.parentNode}return!i.length&&!r&&!o&&this.listens(e,!0)&&(i=[this]),i},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||t.type==="click"&&this._isClickDisabled(e))){var i=t.type;i==="mousedown"&&Ae(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if(t.type==="click"){var n=T({},t);n.type="preclick",this._fireDOMEvent(n,n.type,i)}var o=this._findEventTargets(t,e);if(i){for(var s=[],r=0;r0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=f.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Z(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return(e&&e.animate)!==!0&&!this.getSize().contains(i)?!1:(this.panBy(i,e),!0)},_createAnimProxy:function(){var t=this._proxy=P("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(e){var i=Se,n=this._proxy.style[i];mt(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){E(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();mt(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n);return i.animate!==!0&&!this.getSize().contains(o)?!1:(D(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,v(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(M(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Z(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function io(t,e){return new x(t,e)}var J=rt.extend({options:{position:"topright"},initialize:function(t){S(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return v(e,"leaflet-control"),i.indexOf("bottom")!==-1?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(E(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Ht=function(t){return new J(t)};x.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=P("div",e+"control-container",this._container);function n(o,s){var r=e+o+" "+e+s;t[o+s]=P("div",r,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)E(this._controlCorners[t]);E(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ni=J.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(y(t.target)),i=e.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e=document.createElement("label"),i=this._map.hasLayer(t.layer),n;t.overlay?(n=document.createElement("input"),n.type="checkbox",n.className="leaflet-control-layers-selector",n.defaultChecked=i):n=this._createRadioElement("leaflet-base-layers_"+y(this),i),this._layerControlInputs.push(n),n.layerId=y(t.layer),p(n,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("span");e.appendChild(s),s.appendChild(n),s.appendChild(o);var r=t.overlay?this._overlaysList:this._baseLayersList;return r.appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,e,i,n=[],o=[];this._handlingClick=!0;for(var s=t.length-1;s>=0;s--)e=t[s],i=this._getLayer(e.layerId).layer,e.checked?n.push(i):e.checked||o.push(i);for(s=0;s=0;o--)e=t[o],i=this._getLayer(e.layerId).layer,e.disabled=i.options.minZoom!==void 0&&ni.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,p(t,"click",N),this.expand();var e=this;setTimeout(function(){C(t,"click",N),e._preventClick=!1})}}),no=function(t,e,i){return new Ni(t,e,i)},We=J.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=P("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){var s=P("a",i,n);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),Ft(s),p(s,"click",gt),p(s,"click",o,this),p(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";Z(this._zoomInButton,e),Z(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(v(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(v(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});x.mergeOptions({zoomControl:!0}),x.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new We,this.addControl(this.zoomControl))});var oo=function(t){return new We(t)},Ri=J.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=P("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=P("div",e,i)),t.imperial&&(this._iScale=P("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e=t*3.2808399,i,n,o;e>5280?(i=e/5280,n=this._getRoundNum(i),this._updateScale(this._iScale,n+" mi",n/i)):(o=this._getRoundNum(e),this._updateScale(this._iScale,o+" ft",o/e))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),so=function(t){return new Ri(t)},ro='',Ue=J.extend({options:{position:"bottomright",prefix:''+(f.inlineSvg?ro+" ":"")+"Leaflet"},initialize:function(t){S(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=P("div","leaflet-control-attribution"),Ft(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(' ')}}});x.mergeOptions({attributionControl:!0}),x.addInitHook(function(){this.options.attributionControl&&new Ue().addTo(this)});var ao=function(t){return new Ue(t)};J.Layers=Ni,J.Zoom=We,J.Scale=Ri,J.Attribution=Ue,Ht.layers=no,Ht.zoom=oo,Ht.scale=so,Ht.attribution=ao;var ot=rt.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});ot.addTo=function(t,e){return t.addHandler(e,this),this};var ho={Events:U},Di=f.touch?"touchstart mousedown":"mousedown",dt=Zt.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){S(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(p(this._dragStartTarget,Di,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(dt._dragging===this&&this.finishDrag(!0),C(this._dragStartTarget,Di,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!ze(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){dt._dragging===this&&this.finishDrag();return}if(!(dt._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(dt._dragging=this,this._preventOutline&&Ae(this._element),Ze(),Nt(),!this._moving)){this.fire("down");var e=t.touches?t.touches[0]:t,i=Ei(this._element);this._startPoint=new m(e.clientX,e.clientY),this._startPos=pt(this._element),this._parentScale=Be(i);var n=t.type==="mousedown";p(document,n?"mousemove":"touchmove",this._onMove,this),p(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var e=t.touches&&t.touches.length===1?t.touches[0]:t,i=new m(e.clientX,e.clientY)._subtract(this._startPoint);!i.x&&!i.y||Math.abs(i.x)+Math.abs(i.y)s&&(r=a,s=h);s>i&&(e[r]=1,qe(t,e,i,n,r),qe(t,e,i,r,o))}function fo(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;ne&&(i.push(t[n]),o=n);return oe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i}function _o(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function Wt(t,e,i,n){var o=e.x,s=e.y,r=i.x-o,a=i.y-s,h=r*r+a*a,u;return h>0&&(u=((t.x-o)*r+(t.y-s)*a)/h,u>1?(o=i.x,s=i.y):u>0&&(o+=r*u,s+=a*u)),r=t.x-o,a=t.y-s,n?r*r+a*a:new m(o,s)}function j(t){return!X(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]<"u"}function Vi(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),j(t)}function ji(t,e){var i,n,o,s,r,a,h,u;if(!t||t.length===0)throw new Error("latlngs not passed");j(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var c=w([0,0]),d=O(t),g=d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest());g<1700&&(c=Ge(t));var R=t.length,B=[];for(i=0;in){h=(s-n)/o,u=[a.x-h*(a.x-r.x),a.y-h*(a.y-r.y)];break}var W=e.unproject(_(u));return w([W.lat+c.lat,W.lng+c.lng])}var mo={__proto__:null,simplify:Wi,pointToSegmentDistance:Ui,closestPointOnSegment:lo,clipSegment:qi,_getEdgeIntersection:ne,_getBitCode:yt,_sqClosestPointOnSegment:Wt,isFlat:j,_flat:Vi,polylineCenter:ji},Ve={project:function(t){return new m(t.lng,t.lat)},unproject:function(t){return new b(t.y,t.x)},bounds:new k([-180,-90],[180,90])},je={R:6378137,R_MINOR:6356752314245179e-9,bounds:new k([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,o=this.R_MINOR/i,s=Math.sqrt(1-o*o),r=s*Math.sin(n),a=Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),s/2);return n=-i*Math.log(Math.max(a,1e-10)),new m(t.lng*e*i,n)},unproject:function(t){for(var e=180/Math.PI,i=this.R,n=this.R_MINOR/i,o=Math.sqrt(1-n*n),s=Math.exp(-t.y/i),r=Math.PI/2-2*Math.atan(s),a=0,h=.1,u;a<15&&Math.abs(h)>1e-7;a++)u=o*Math.sin(r),u=Math.pow((1-u)/(1+u),o/2),h=Math.PI/2-2*Math.atan(s*u)-r,r+=h;return new b(r*e,t.x*e/i)}},po={__proto__:null,LonLat:Ve,Mercator:je,SphericalMercator:ye},vo=T({},ft,{code:"EPSG:3395",projection:je,transformation:function(){var t=.5/(Math.PI*je.R);return Ot(t,.5,-t,.5)}()}),Ki=T({},ft,{code:"EPSG:4326",projection:Ve,transformation:Ot(1/180,1,-1/180,.5)}),go=T({},at,{projection:Ve,transformation:Ot(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});at.Earth=ft,at.EPSG3395=vo,at.EPSG3857=xe,at.EPSG900913=Ln,at.EPSG4326=Ki,at.Simple=go;var $=Zt.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[y(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[y(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});x.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=y(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=y(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return y(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){t=t?X(t)?t:[t]:[];for(var e=0,i=t.length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&e[0]instanceof b&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){ut.prototype._setLatLngs.call(this,t),j(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return j(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new m(e,e);if(t=new k(t.min.subtract(i),t.max.add(i)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(var n=0,o=this._rings.length,s;nt.y!=o.y>t.y&&t.x<(o.x-n.x)*(t.y-n.y)/(o.y-n.y)+n.x&&(e=!e);return e||ut.prototype._containsPoint.call(this,t,!0)}});function Mo(t,e){return new Mt(t,e)}var lt=ht.extend({initialize:function(t,e){S(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e=X(t)?t:t.features,i,n,o;if(e){for(i=0,n=e.length;i0&&o.push(o[0].slice()),o}function Ct(t,e){return t.feature?T({},t.feature,{geometry:e}):ue(e)}function ue(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var Je={toGeoJSON:function(t){return Ct(this,{type:"Point",coordinates:Xe(this.getLatLng(),t)})}};oe.include(Je),Ke.include(Je),se.include(Je),ut.include({toGeoJSON:function(t){var e=!j(this._latlngs),i=he(this._latlngs,e?1:0,!1,t);return Ct(this,{type:(e?"Multi":"")+"LineString",coordinates:i})}}),Mt.include({toGeoJSON:function(t){var e=!j(this._latlngs),i=e&&!j(this._latlngs[0]),n=he(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),Ct(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),Tt.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),Ct(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(e==="MultiPoint")return this.toMultiPoint(t);var i=e==="GeometryCollection",n=[];return this.eachLayer(function(o){if(o.toGeoJSON){var s=o.toGeoJSON(t);if(i)n.push(s.geometry);else{var r=ue(s);r.type==="FeatureCollection"?n.push.apply(n,r.features):n.push(r)}}}),i?Ct(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});function Ji(t,e){return new lt(t,e)}var Co=Ji,le=$.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=O(e),S(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(v(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){E(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&Pt(this._image),this},bringToBack:function(){return this._map&&Lt(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=O(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._url.tagName==="IMG",e=this._image=t?this._url:P("img");if(v(e,"leaflet-image-layer"),this._zoomAnimated&&v(e,"leaflet-zoom-animated"),this.options.className&&v(e,this.options.className),e.onselectstart=z,e.onmousemove=z,e.onload=M(this.fire,this,"load"),e.onerror=M(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(e.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t){this._url=e.src;return}e.src=this._url,e.alt=this.options.alt},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;mt(this._image,i,e)},_reset:function(){var t=this._image,e=new k(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();I(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){V(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),So=function(t,e,i){return new le(t,e,i)},$i=le.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t=this._url.tagName==="VIDEO",e=this._image=t?this._url:P("video");if(v(e,"leaflet-image-layer"),this._zoomAnimated&&v(e,"leaflet-zoom-animated"),this.options.className&&v(e,this.options.className),e.onselectstart=z,e.onmousemove=z,e.onloadeddata=M(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],o=0;o0?n:[e.src];return}X(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var s=0;so?(e.height=o+"px",v(t,s)):Z(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();I(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,e=parseInt(Bt(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,o=new m(this._containerLeft,-i-this._containerBottom);o._add(pt(this._container));var s=t.layerPointToContainerPoint(o),r=_(this.options.autoPanPadding),a=_(this.options.autoPanPaddingTopLeft||r),h=_(this.options.autoPanPaddingBottomRight||r),u=t.getSize(),c=0,d=0;s.x+n+h.x>u.x&&(c=s.x+n-u.x+h.x),s.x-c-a.x<0&&(c=s.x-a.x),s.y+i+h.y>u.y&&(d=s.y+i-u.y+h.y),s.y-d-a.y<0&&(d=s.y-a.y),(c||d)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,d]))}},_getAnchor:function(){return _(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Eo=function(t,e){return new ce(t,e)};x.mergeOptions({closePopupOnClick:!0}),x.include({openPopup:function(t,e,i){return this._initOverlay(ce,t,e,i).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),$.include({bindPopup:function(t,e){return this._popup=this._initOverlay(ce,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof ht||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(!(!this._popup||!this._map)){gt(t);var e=t.layer||t.target;if(this._popup._source===e&&!(e instanceof _t)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng);return}this._popup._source=e,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}});var fe=st.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){st.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){st.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=st.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip",e=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=P("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+y(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,o=this._container,s=n.latLngToContainerPoint(n.getCenter()),r=n.layerPointToContainerPoint(t),a=this.options.direction,h=o.offsetWidth,u=o.offsetHeight,c=_(this.options.offset),d=this._getAnchor();a==="top"?(e=h/2,i=u):a==="bottom"?(e=h/2,i=0):a==="center"?(e=h/2,i=u/2):a==="right"?(e=0,i=u/2):a==="left"?(e=h,i=u/2):r.xthis.options.maxZoom||in?this._retainParent(o,s,r,n):!1)},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=new m(o,s);r.z=i+1;var a=this._tileCoordsToKey(r),h=this._tiles[a];if(h&&h.active){h.retain=!0;continue}else h&&h.loaded&&(h.retain=!0);i+1this.options.maxZoom||this.options.minZoom!==void 0&&o1){this._setView(t,i);return}for(var d=o.min.y;d<=o.max.y;d++)for(var g=o.min.x;g<=o.max.x;g++){var R=new m(g,d);if(R.z=this._tileZoom,!!this._isValidTile(R)){var B=this._tiles[this._tileCoordsToKey(R)];B?B.current=!0:r.push(R)}}if(r.sort(function(W,zt){return W.distanceTo(s)-zt.distanceTo(s)}),r.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var K=document.createDocumentFragment();for(g=0;gi.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return O(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),o=n.add(i),s=e.unproject(n,t.z),r=e.unproject(o,t.z);return[s,r]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new H(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new m(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(E(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){v(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=z,t.onmousemove=z,f.ielt9&&this.options.opacity<1&&V(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),M(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&D(M(this._tileReady,this,t,null,o)),I(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);i=this._tiles[n],i&&(i.loaded=+new Date,this._map._fadeAnimated?(V(i.el,0),q(this._fadeFrame),this._fadeFrame=D(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(v(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),f.ielt9||!this._map._fadeAnimated?D(this._pruneTiles,this):setTimeout(M(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new m(this._wrapX?tt(t.x,this._wrapX):t.x,this._wrapY?tt(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new k(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Io(t){return new Gt(t)}var St=Gt.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,e=S(this,e),e.detectRetina&&f.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),typeof e.subdomains=="string"&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&e===void 0&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return p(i,"load",M(this._tileOnLoad,this,e,i)),p(i,"error",M(this._tileOnError,this,e,i)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(i.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:f.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return ii(this._url,T(e,this.options))},_tileOnLoad:function(t,e){f.ielt9?setTimeout(M(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset;return i&&(t=e-t),t+n},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=z,e.onerror=z,!e.complete)){e.src=Yt;var i=this._tiles[t].coords;E(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",Yt),Gt.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(!(!this._map||i&&i.getAttribute("src")===Yt))return Gt.prototype._tileReady.call(this,t,e,i)}});function en(t,e){return new St(t,e)}var nn=St.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=T({},this.defaultWmsParams);for(var n in e)n in this.options||(i[n]=e[n]);e=S(this,e);var o=e.detectRetina&&f.retina?2:1,s=this.getTileSize();i.width=s.x*o,i.height=s.y*o,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,St.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=F(i.project(e[0]),i.project(e[1])),o=n.min,s=n.max,r=(this._wmsVersion>=1.3&&this._crs===Ki?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=St.prototype.getTileUrl.call(this,t);return a+ei(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return T(this.wmsParams,t),e||this.redraw(),this}});function Ao(t,e){return new nn(t,e)}St.WMS=nn,en.wms=Ao;var ct=$.extend({options:{padding:.1},initialize:function(t){S(this,t),y(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),v(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),s=n.multiplyBy(-i).add(o).subtract(this._map._getNewPixelOrigin(t,e));f.any3d?mt(this._container,s,i):I(this._container,s)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new k(i,i.add(e.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),on=ct.extend({options:{tolerance:0},getEvents:function(){var t=ct.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ct.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");p(t,"mousemove",this._onMouseMove,this),p(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),p(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){q(this._redrawRequest),delete this._ctx,E(this._container),C(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var e in this._layers)t=this._layers[e],t._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ct.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=f.retina?2:1;I(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",f.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){ct.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[y(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[y(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){var e=t.options.dashArray.split(/[, ]+/),i=[],n,o;for(o=0;o')}}catch{}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Bo={_initContainer:function(){this._container=P("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ct.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=qt("shape");v(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=qt("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[y(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;E(e),t.removeInteractiveTarget(e),delete this._layers[y(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e||(e=t._stroke=qt("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=X(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=qt("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,"+65535*360)},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){Pt(t._container)},_bringToBack:function(t){Lt(t._container)}},de=f.vml?qt:hi,Vt=ct.extend({_initContainer:function(){this._container=de("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=de("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){E(this._container),C(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ct.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;(!this._svgSize||!this._svgSize.equals(e))&&(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),I(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=de("path");t.options.className&&v(e,t.options.className),t.options.interactive&&v(e,"leaflet-interactive"),this._updateStyle(t),this._layers[y(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){E(t._path),t.removeInteractiveTarget(t._path),delete this._layers[y(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,ui(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n=Math.max(Math.round(t._radiusY),1)||i,o="a"+i+","+n+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+o+i*2+",0 "+o+-i*2+",0 ";this._setPath(t,s)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){Pt(t._path)},_bringToBack:function(t){Lt(t._path)}});f.vml&&Vt.include(Bo);function rn(t){return f.svg||f.vml?new Vt(t):null}x.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if(t==="overlayPane"||t===void 0)return!1;var e=this._paneRenderers[t];return e===void 0&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&sn(t)||rn(t)}});var an=Mt.extend({initialize:function(t,e){Mt.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=O(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function No(t,e){return new an(t,e)}Vt.create=de,Vt.pointsToPath=ui,lt.geometryToLayer=re,lt.coordsToLatLng=Ye,lt.coordsToLatLngs=ae,lt.latLngToCoords=Xe,lt.latLngsToCoords=he,lt.getFeature=Ct,lt.asFeature=ue,x.mergeOptions({boxZoom:!0});var hn=ot.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){p(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){C(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){E(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Nt(),Ze(),this._startPoint=this._map.mouseEventToContainerPoint(t),p(document,{contextmenu:gt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=P("div","leaflet-zoom-box",this._container),v(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new k(this._point,this._startPoint),i=e.getSize();I(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(E(this._box),Z(this._container,"leaflet-crosshair")),Rt(),Oe(),C(document,{contextmenu:gt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(!(t.which!==1&&t.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(M(this._resetState,this),0);var e=new H(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){t.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});x.addInitHook("addHandler","boxZoom",hn),x.mergeOptions({doubleClickZoom:!0});var un=ot.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-n:i+n;e.options.doubleClickZoom==="center"?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});x.addInitHook("addHandler","doubleClickZoom",un),x.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ln=ot.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new dt(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}v(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Z(this._map._container,"leaflet-grab"),Z(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=O(this._map.options.maxBounds);this._offsetLimit=F(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.xe.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,r=Math.abs(o+i)0?s:-s))-e;this._delta=0,this._startTime=null,r&&(t.options.scrollWheelZoom==="center"?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});x.addInitHook("addHandler","scrollWheelZoom",fn);var Ro=600;x.mergeOptions({tapHold:f.touchNative&&f.safari&&f.mobile,tapTolerance:15});var dn=ot.extend({addHooks:function(){p(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){C(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),t.touches.length===1){var e=t.touches[0];this._startPos=this._newPos=new m(e.clientX,e.clientY),this._holdTimeout=setTimeout(M(function(){this._cancel(),this._isTapValid()&&(p(document,"touchend",N),p(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),Ro),p(document,"touchend touchcancel contextmenu",this._cancel,this),p(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){C(document,"touchend",N),C(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),C(document,"touchend touchcancel contextmenu",this._cancel,this),C(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new m(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)}});x.addInitHook("addHandler","tapHold",dn),x.mergeOptions({touchZoom:f.touch,bounceAtZoomLimits:!0});var _n=ot.extend({addHooks:function(){v(this._map._container,"leaflet-touch-zoom"),p(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Z(this._map._container,"leaflet-touch-zoom"),C(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(!(!t.touches||t.touches.length!==2||e._animatingZoom||this._zooming)){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),e.options.touchZoom!=="center"&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),p(document,"touchmove",this._onTouchMove,this),p(document,"touchend touchcancel",this._onTouchEnd,this),N(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),o=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),e.options.touchZoom==="center"){if(this._center=this._startLatLng,o===1)return}else{var s=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(o===1&&s.x===0&&s.y===0)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),q(this._animRequest);var r=M(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=D(r,this,!0),N(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,q(this._animRequest),C(document,"touchmove",this._onTouchMove,this),C(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});x.addInitHook("addHandler","touchZoom",_n),x.BoxZoom=hn,x.DoubleClickZoom=un,x.Drag=ln,x.Keyboard=cn,x.ScrollWheelZoom=fn,x.TapHold=dn,x.TouchZoom=_n,l.Bounds=k,l.Browser=f,l.CRS=at,l.Canvas=on,l.Circle=Ke,l.CircleMarker=se,l.Class=rt,l.Control=J,l.DivIcon=tn,l.DivOverlay=st,l.DomEvent=eo,l.DomUtil=Qn,l.Draggable=dt,l.Evented=Zt,l.FeatureGroup=ht,l.GeoJSON=lt,l.GridLayer=Gt,l.Handler=ot,l.Icon=bt,l.ImageOverlay=le,l.LatLng=b,l.LatLngBounds=H,l.Layer=$,l.LayerGroup=Tt,l.LineUtil=mo,l.Map=x,l.Marker=oe,l.Mixin=ho,l.Path=_t,l.Point=m,l.PolyUtil=uo,l.Polygon=Mt,l.Polyline=ut,l.Popup=ce,l.PosAnimation=Bi,l.Projection=po,l.Rectangle=an,l.Renderer=ct,l.SVG=Vt,l.SVGOverlay=Qi,l.TileLayer=St,l.Tooltip=fe,l.Transformation=we,l.Util=xn,l.VideoOverlay=$i,l.bind=M,l.bounds=F,l.canvas=sn,l.circle=To,l.circleMarker=Lo,l.control=Ht,l.divIcon=Oo,l.extend=T,l.featureGroup=wo,l.geoJSON=Ji,l.geoJson=Co,l.gridLayer=Io,l.icon=xo,l.imageOverlay=So,l.latLng=w,l.latLngBounds=O,l.layerGroup=yo,l.map=io,l.marker=Po,l.point=_,l.polygon=Mo,l.polyline=bo,l.popup=Eo,l.rectangle=No,l.setOptions=S,l.stamp=y,l.svg=rn,l.svgOverlay=ko,l.tileLayer=en,l.tooltip=Zo,l.transformation=Ot,l.version=Et,l.videoOverlay=zo;var Do=window.L;l.noConflict=function(){return window.L=Do,this},window.L=l})})(ti,ti.exports);var rs=ti.exports;const me=Yo(rs);me.Icon.Default.mergeOptions({iconRetinaUrl:ss,iconUrl:os,shadowUrl:ns});var hs=function(jt){var l=jt.onClose,Et=jt.statusId,T=Xo(),wt=T.tileServer,M=T.tileServerAttribution,Kt=Qe.useCallback(Jo(),[]),y=$o(function(et){return Kt(et,{id:Et})}),Q=y.event.location,tt=Qe.useRef();Qe.useEffect(function(){var et=[+Q.get("latitude"),+Q.get("longitude")];return tt.current=me.map("event-map").setView(et,15),me.marker(et,{title:Q.get("name")}).addTo(tt.current),me.tileLayer(wt,{attribution:M}).addTo(tt.current),function(){var Y;(Y=tt.current)===null||Y===void 0||Y.remove()}},[]);var z=function(){l("EVENT_MAP")},G=function(){window.open("https://www.openstreetmap.org/directions?from=&to=".concat(Q.get("latitude"),",").concat(Q.get("longitude"),"#map=14/").concat(Q.get("latitude"),"/").concat(Q.get("longitude")),"_blank")};return kt(es,{title:kt(gn,{id:"column.event_map",defaultMessage:"Event location"}),onClose:z,width:"2xl"},void 0,kt(Qo,{alignItems:"center",space:6},void 0,kt("div",{className:"h-96 w-full",id:"event-map"}),kt(ts,{onClick:G,icon:is},void 0,kt(gn,{id:"event_map.navigate",defaultMessage:"Navigate"}))))};export{hs as default}; diff --git a/packs/js/event-participants-modal-6e79025e.js b/packs/js/event-participants-modal-c140b263.js similarity index 78% rename from packs/js/event-participants-modal-6e79025e.js rename to packs/js/event-participants-modal-c140b263.js index f4e6ebf0a..7d4d1a674 100644 --- a/packs/js/event-participants-modal-6e79025e.js +++ b/packs/js/event-participants-modal-c140b263.js @@ -1 +1 @@ -import{d,q as m,r as f,a as e,B as h,F as r,bu as C,ki as E,aB as _}from"../index-7380452a.js";import{S as M}from"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var S=function(i){var c=i.onClose,n=i.statusId,l=d(),o=m(function(t){var s;return(s=t.user_lists.event_participations.get(n))===null||s===void 0?void 0:s.items}),p=function(){l(E(n))};f.useEffect(function(){p()},[]);var u=function(){c("EVENT_PARTICIPANTS")},a;if(!o)a=e(_,{});else{var v=e(r,{id:"empty_column.event_participants",defaultMessage:"No one joined this event yet. When someone does, they will show up here."});a=e(M,{scrollKey:"event_participations",emptyMessage:v,className:"max-w-full",itemClassName:"pb-3"},void 0,o.map(function(t){return e(h,{id:t},t)}))}return e(C,{title:e(r,{id:"column.event_participants",defaultMessage:"Event participants"}),onClose:u},void 0,a)};export{S as default}; +import{d,q as m,r as f,a as e,B as h,F as r,bu as C,ki as E,aB as _}from"../index-be605fd2.js";import{S as M}from"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var S=function(i){var c=i.onClose,n=i.statusId,l=d(),o=m(function(t){var s;return(s=t.user_lists.event_participations.get(n))===null||s===void 0?void 0:s.items}),p=function(){l(E(n))};f.useEffect(function(){p()},[]);var u=function(){c("EVENT_PARTICIPANTS")},a;if(!o)a=e(_,{});else{var v=e(r,{id:"empty_column.event_participants",defaultMessage:"No one joined this event yet. When someone does, they will show up here."});a=e(M,{scrollKey:"event_participations",emptyMessage:v,className:"max-w-full",itemClassName:"pb-3"},void 0,o.map(function(t){return e(h,{id:t},t)}))}return e(C,{title:e(r,{id:"column.event_participants",defaultMessage:"Event participants"}),onClose:u},void 0,a)};export{S as default}; diff --git a/packs/js/exif-ab0e667c.js b/packs/js/exif-05f4a801.js similarity index 99% rename from packs/js/exif-ab0e667c.js rename to packs/js/exif-05f4a801.js index 06d0f2179..111c9f2f1 100644 --- a/packs/js/exif-ab0e667c.js +++ b/packs/js/exif-05f4a801.js @@ -1,4 +1,4 @@ -import{cD as J,cB as Y}from"../index-7380452a.js";function H(p,P){for(var F=0;Ff[g]})}}}return Object.freeze(Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}))}var A={exports:{}};(function(p,P){(function(){var F=!1,f=function(e){if(e instanceof f)return e;if(!(this instanceof f))return new f(e);this.EXIFwrapped=e};p.exports&&(P=p.exports=f),P.EXIF=f;var g=f.Tags={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID"},v=f.TiffTags={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},G=f.GPSTags={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential"},b=f.IFD1Tags={256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",273:"StripOffsets",274:"Orientation",277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",296:"ResolutionUnit",513:"JpegIFOffset",514:"JpegIFByteCount",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:"YCbCrPositioning",532:"ReferenceBlackWhite"},D=f.StringValues={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}};function h(e){return!!e.exifdata}function R(e,t){t=t||e.match(/^data\:([^\;]+)\;base64,/mi)[1]||"",e=e.replace(/^data\:([^\;]+)\;base64,/gmi,"");for(var a=atob(e),s=a.length,r=new ArrayBuffer(s),i=new Uint8Array(r),o=0;o4?u:t+8,l=[],c=0;c4?u:t+8,C(e,x,o-1);case 3:if(o==1)return e.getUint16(t+8,!r);for(x=o>2?u:t+8,l=[],c=0;ce.byteLength)return{}}else return{};var i=y(e,t,t+r,b,s);if(i.Compression)switch(i.Compression){case 6:if(i.JpegIFOffset&&i.JpegIFByteCount){var o=t+i.JpegIFOffset,u=i.JpegIFByteCount;i.blob=new Blob([new Uint8Array(e.buffer,o,u)],{type:"image/jpeg"})}break;case 1:console.log("Thumbnail image format is TIFF, which is not implemented.");break;default:console.log("Unknown thumbnail image format '%s'",i.Compression)}else i.PhotometricInterpretation==2&&console.log("Thumbnail image format is RGB, which is not implemented.");return i}function C(e,t,a){var s="";for(n=t;n")+8;u=u.substring(u.indexOf("0){t["@attributes"]={};for(var a=0;a0)for(var a=0;a"u")t[l]=I(s);else{if(typeof t[l].push>"u"){var d=t[l];t[l]=[],t[l].push(d)}t[l].push(I(s))}}else t=e.textContent;return t}catch(c){console.log(c.message)}}f.enableXmp=function(){f.isXmpEnabled=!0},f.disableXmp=function(){f.isXmpEnabled=!1},f.getData=function(e,t){return(self.Image&&e instanceof self.Image||self.HTMLImageElement&&e instanceof self.HTMLImageElement)&&!e.complete?!1:(h(e)?t&&t.call(e):M(e,t),!0)},f.getTag=function(e,t){if(h(e))return e.exifdata[t]},f.getIptcTag=function(e,t){if(h(e))return e.iptcdata[t]},f.getAllTags=function(e){if(!h(e))return{};var t,a=e.exifdata,s={};for(t in a)a.hasOwnProperty(t)&&(s[t]=a[t]);return s},f.getAllIptcTags=function(e){if(!h(e))return{};var t,a=e.iptcdata,s={};for(t in a)a.hasOwnProperty(t)&&(s[t]=a[t]);return s},f.pretty=function(e){if(!h(e))return"";var t,a=e.exifdata,s="";for(t in a)a.hasOwnProperty(t)&&(typeof a[t]=="object"?a[t]instanceof Number?s+=t+" : "+a[t]+" ["+a[t].numerator+"/"+a[t].denominator+`]\r +import{cD as J,cB as Y}from"../index-be605fd2.js";function H(p,P){for(var F=0;Ff[g]})}}}return Object.freeze(Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}))}var A={exports:{}};(function(p,P){(function(){var F=!1,f=function(e){if(e instanceof f)return e;if(!(this instanceof f))return new f(e);this.EXIFwrapped=e};p.exports&&(P=p.exports=f),P.EXIF=f;var g=f.Tags={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID"},v=f.TiffTags={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},G=f.GPSTags={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential"},b=f.IFD1Tags={256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",273:"StripOffsets",274:"Orientation",277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",296:"ResolutionUnit",513:"JpegIFOffset",514:"JpegIFByteCount",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:"YCbCrPositioning",532:"ReferenceBlackWhite"},D=f.StringValues={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}};function h(e){return!!e.exifdata}function R(e,t){t=t||e.match(/^data\:([^\;]+)\;base64,/mi)[1]||"",e=e.replace(/^data\:([^\;]+)\;base64,/gmi,"");for(var a=atob(e),s=a.length,r=new ArrayBuffer(s),i=new Uint8Array(r),o=0;o4?u:t+8,l=[],c=0;c4?u:t+8,C(e,x,o-1);case 3:if(o==1)return e.getUint16(t+8,!r);for(x=o>2?u:t+8,l=[],c=0;ce.byteLength)return{}}else return{};var i=y(e,t,t+r,b,s);if(i.Compression)switch(i.Compression){case 6:if(i.JpegIFOffset&&i.JpegIFByteCount){var o=t+i.JpegIFOffset,u=i.JpegIFByteCount;i.blob=new Blob([new Uint8Array(e.buffer,o,u)],{type:"image/jpeg"})}break;case 1:console.log("Thumbnail image format is TIFF, which is not implemented.");break;default:console.log("Unknown thumbnail image format '%s'",i.Compression)}else i.PhotometricInterpretation==2&&console.log("Thumbnail image format is RGB, which is not implemented.");return i}function C(e,t,a){var s="";for(n=t;n")+8;u=u.substring(u.indexOf("0){t["@attributes"]={};for(var a=0;a0)for(var a=0;a"u")t[l]=I(s);else{if(typeof t[l].push>"u"){var d=t[l];t[l]=[],t[l].push(d)}t[l].push(I(s))}}else t=e.textContent;return t}catch(c){console.log(c.message)}}f.enableXmp=function(){f.isXmpEnabled=!0},f.disableXmp=function(){f.isXmpEnabled=!1},f.getData=function(e,t){return(self.Image&&e instanceof self.Image||self.HTMLImageElement&&e instanceof self.HTMLImageElement)&&!e.complete?!1:(h(e)?t&&t.call(e):M(e,t),!0)},f.getTag=function(e,t){if(h(e))return e.exifdata[t]},f.getIptcTag=function(e,t){if(h(e))return e.iptcdata[t]},f.getAllTags=function(e){if(!h(e))return{};var t,a=e.exifdata,s={};for(t in a)a.hasOwnProperty(t)&&(s[t]=a[t]);return s},f.getAllIptcTags=function(e){if(!h(e))return{};var t,a=e.iptcdata,s={};for(t in a)a.hasOwnProperty(t)&&(s[t]=a[t]);return s},f.pretty=function(e){if(!h(e))return"";var t,a=e.exifdata,s="";for(t in a)a.hasOwnProperty(t)&&(typeof a[t]=="object"?a[t]instanceof Number?s+=t+" : "+a[t]+" ["+a[t].numerator+"/"+a[t].denominator+`]\r `:s+=t+" : ["+a[t].length+` values]\r `:s+=t+" : "+a[t]+`\r `);return s},f.readFromBinaryFile=function(e){return w(e)}}).call(Y)})(A,A.exports);var U=A.exports;const q=J(U),j=H({__proto__:null,default:q},[U]);export{j as e}; diff --git a/packs/js/familiar-followers-modal-0c091b6c.js b/packs/js/familiar-followers-modal-6deccc90.js similarity index 81% rename from packs/js/familiar-followers-modal-0c091b6c.js rename to packs/js/familiar-followers-modal-6deccc90.js index c8606c2e9..fc69db423 100644 --- a/packs/js/familiar-followers-modal-0c091b6c.js +++ b/packs/js/familiar-followers-modal-6deccc90.js @@ -1 +1 @@ -import{cH as f,q as i,b9 as v,a as e,F as m,B as p,bu as _,aB as w}from"../index-7380452a.js";import{S as y}from"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var g=f(),I=function(n){var r=n.accountId,u=n.onClose,o=i(function(a){return g(a,r)}),t=i(function(a){var s;return((s=a.user_lists.familiar_followers.get(r))===null||s===void 0?void 0:s.items)||v()}),c=function(){u("FAMILIAR_FOLLOWERS")},l;if(!o||!t)l=e(w,{});else{var d=e(m,{id:"account.familiar_followers.empty",defaultMessage:"No one you know follows {name}.",values:{name:e("span",{dangerouslySetInnerHTML:{__html:o.display_name_html}})}});l=e(y,{scrollKey:"familiar_followers",emptyMessage:d,itemClassName:"pb-3",style:{height:"80vh"},useWindowScroll:!1},void 0,t.map(function(a){return e(p,{id:a},a)}))}return e(_,{title:e(m,{id:"column.familiar_followers",defaultMessage:"People you know following {name}",values:{name:e("span",{dangerouslySetInnerHTML:{__html:(o==null?void 0:o.display_name_html)||""}})}}),onClose:c},void 0,l)};export{I as default}; +import{cH as f,q as i,b9 as v,a as e,F as m,B as p,bu as _,aB as w}from"../index-be605fd2.js";import{S as y}from"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var g=f(),I=function(n){var r=n.accountId,u=n.onClose,o=i(function(a){return g(a,r)}),t=i(function(a){var s;return((s=a.user_lists.familiar_followers.get(r))===null||s===void 0?void 0:s.items)||v()}),c=function(){u("FAMILIAR_FOLLOWERS")},l;if(!o||!t)l=e(w,{});else{var d=e(m,{id:"account.familiar_followers.empty",defaultMessage:"No one you know follows {name}.",values:{name:e("span",{dangerouslySetInnerHTML:{__html:o.display_name_html}})}});l=e(y,{scrollKey:"familiar_followers",emptyMessage:d,itemClassName:"pb-3",style:{height:"80vh"},useWindowScroll:!1},void 0,t.map(function(a){return e(p,{id:a},a)}))}return e(_,{title:e(m,{id:"column.familiar_followers",defaultMessage:"People you know following {name}",values:{name:e("span",{dangerouslySetInnerHTML:{__html:(o==null?void 0:o.display_name_html)||""}})}}),onClose:c},void 0,l)};export{I as default}; diff --git a/packs/js/favourites-modal-7d9dd035.js b/packs/js/favourites-modal-4f88d92b.js similarity index 81% rename from packs/js/favourites-modal-7d9dd035.js rename to packs/js/favourites-modal-4f88d92b.js index 27e05ea49..37e9fbcdb 100644 --- a/packs/js/favourites-modal-7d9dd035.js +++ b/packs/js/favourites-modal-4f88d92b.js @@ -1 +1 @@ -import{d as h,q as u,r as M,a as t,B as C,F as d,bu as _,ev as y,ew as F,aB as b}from"../index-7380452a.js";import{S as g}from"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var A=function(i){var v=i.onClose,s=i.statusId,n=h(),l=u(function(e){var a;return(a=e.user_lists.favourited_by.get(s))===null||a===void 0?void 0:a.items}),o=u(function(e){var a;return(a=e.user_lists.favourited_by.get(s))===null||a===void 0?void 0:a.next}),c=function(){n(y(s))};M.useEffect(function(){c()},[]);var f=function(){v("FAVOURITES")},p=function(){o&&n(F(s,o))},r;if(!l)r=t(b,{});else{var m=t(d,{id:"empty_column.favourites",defaultMessage:"No one has liked this post yet. When someone does, they will show up here."});r=t(g,{scrollKey:"favourites",emptyMessage:m,className:"max-w-full",itemClassName:"pb-3",style:{height:"80vh"},useWindowScroll:!1,onLoadMore:p,hasMore:!!o},void 0,l.map(function(e){return t(C,{id:e},e)}))}return t(_,{title:t(d,{id:"column.favourites",defaultMessage:"Likes"}),onClose:f},void 0,r)};export{A as default}; +import{d as h,q as u,r as M,a as t,B as C,F as d,bu as _,ev as y,ew as F,aB as b}from"../index-be605fd2.js";import{S as g}from"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var A=function(i){var v=i.onClose,s=i.statusId,n=h(),l=u(function(e){var a;return(a=e.user_lists.favourited_by.get(s))===null||a===void 0?void 0:a.items}),o=u(function(e){var a;return(a=e.user_lists.favourited_by.get(s))===null||a===void 0?void 0:a.next}),c=function(){n(y(s))};M.useEffect(function(){c()},[]);var f=function(){v("FAVOURITES")},p=function(){o&&n(F(s,o))},r;if(!l)r=t(b,{});else{var m=t(d,{id:"empty_column.favourites",defaultMessage:"No one has liked this post yet. When someone does, they will show up here."});r=t(g,{scrollKey:"favourites",emptyMessage:m,className:"max-w-full",itemClassName:"pb-3",style:{height:"80vh"},useWindowScroll:!1,onLoadMore:p,hasMore:!!o},void 0,l.map(function(e){return t(C,{id:e},e)}))}return t(_,{title:t(d,{id:"column.favourites",defaultMessage:"Likes"}),onClose:f},void 0,r)};export{A as default}; diff --git a/packs/js/file-input-e3eba176.js b/packs/js/file-input-c35dcc9b.js similarity index 88% rename from packs/js/file-input-e3eba176.js rename to packs/js/file-input-c35dcc9b.js index b745b7c48..ef1e73af9 100644 --- a/packs/js/file-input-e3eba176.js +++ b/packs/js/file-input-c35dcc9b.js @@ -1 +1 @@ -import{r as l,R as i,av as t}from"../index-7380452a.js";var f=l.forwardRef(function(e,r){return i.createElement("input",t({},e,{ref:r,type:"file",className:"block w-full text-sm text-gray-800 file:mr-2 file:cursor-pointer file:rounded-full file:border file:border-solid file:border-gray-200 file:bg-white file:px-3 file:py-1.5 file:text-xs file:font-medium file:leading-4 file:text-gray-700 hover:file:bg-gray-100 dark:text-gray-200 dark:file:border-gray-800 dark:file:bg-gray-900 dark:file:text-gray-500 dark:file:hover:bg-gray-800"}))});export{f as F}; +import{r as l,R as i,av as t}from"../index-be605fd2.js";var f=l.forwardRef(function(e,r){return i.createElement("input",t({},e,{ref:r,type:"file",className:"block w-full text-sm text-gray-800 file:mr-2 file:cursor-pointer file:rounded-full file:border file:border-solid file:border-gray-200 file:bg-white file:px-3 file:py-1.5 file:text-xs file:font-medium file:leading-4 file:text-gray-700 hover:file:bg-gray-100 dark:text-gray-200 dark:file:border-gray-800 dark:file:bg-gray-900 dark:file:text-gray-500 dark:file:hover:bg-gray-800"}))});export{f as F}; diff --git a/packs/js/fork-awesome-icon-170511cf.js b/packs/js/fork-awesome-icon-42a9fa19.js similarity index 76% rename from packs/js/fork-awesome-icon-170511cf.js rename to packs/js/fork-awesome-icon-42a9fa19.js index c346cba5f..6c9eae264 100644 --- a/packs/js/fork-awesome-icon-170511cf.js +++ b/packs/js/fork-awesome-icon-42a9fa19.js @@ -1 +1 @@ -import{as as o,R as c,av as d,W as r}from"../index-7380452a.js";var m=["id","className","fixedWidth"],x=function(a){var e=a.id,s=a.className,t=a.fixedWidth,i=o(a,m);return c.createElement("i",d({role:"img",className:r("fa","fa-".concat(e),s,{"fa-fw":t})},i))};export{x as F}; +import{as as o,R as c,av as d,W as r}from"../index-be605fd2.js";var m=["id","className","fixedWidth"],x=function(a){var e=a.id,s=a.className,t=a.fixedWidth,i=o(a,m);return c.createElement("i",d({role:"img",className:r("fa","fa-".concat(e),s,{"fa-fw":t})},i))};export{x as F}; diff --git a/packs/js/funding-panel-905e05e2.js b/packs/js/funding-panel-d69ca9fb.js similarity index 86% rename from packs/js/funding-panel-905e05e2.js rename to packs/js/funding-panel-d69ca9fb.js index ca9af7dd2..372b244bc 100644 --- a/packs/js/funding-panel-905e05e2.js +++ b/packs/js/funding-panel-d69ca9fb.js @@ -1 +1 @@ -import{cT as h,d as y,q as F,r as b,hw as k,R as o,a as t,a2 as i,y as d,c0 as E,aa as x,F as g}from"../index-7380452a.js";import{o as I}from"./object-assign-7ac9a0a3.js";import{W as T}from"./widget-2ac720e4.js";import"./arrow-right-b75290c7.js";var w=h,p=I;w({target:"Object",stat:!0,arity:2,forced:Object.assign!==p},{assign:p});var R=function(e){Object.assign(document.createElement("a"),{target:"_blank",href:e}).click()},c=function(e){return new Intl.NumberFormat("en-US",{style:"currency",currency:"usd",notation:"compact"}).format(e/100)},P=function(){var e=y(),a=F(function(m){return m.patron.instance});if(b.useEffect(function(){e(k())},[]),a.funding.isEmpty()||a.goals.isEmpty())return null;var r=a.getIn(["funding","amount"]),n=a.getIn(["goals","0","amount"]),v=a.getIn(["goals","0","text"]),f=r>=n,s;f?s=o.createElement(o.Fragment,null,t("strong",{},void 0,c(n))," per month ",t("span",{},void 0,"— reached!")):s=o.createElement(o.Fragment,null,t("strong",{},void 0,c(r)," out of ",c(n))," per month");var u=function(){R(a.url)};return t(T,{title:t(g,{id:"patron.title",defaultMessage:"Funding Goal"}),onActionClick:u},void 0,t(i,{space:4},void 0,t(i,{space:2},void 0,t(d,{},void 0,s),t(E,{progress:r/n})),t(i,{space:2},void 0,t(d,{theme:"muted"},void 0,v),t(x,{block:!0,theme:"primary",onClick:u},void 0,t(g,{id:"patron.donate",defaultMessage:"Donate"})))))};export{P as default}; +import{cT as h,d as y,q as F,r as b,hw as k,R as o,a as t,a2 as i,y as d,c0 as E,aa as x,F as g}from"../index-be605fd2.js";import{o as I}from"./object-assign-35b0699c.js";import{W as T}from"./widget-84f84d09.js";import"./arrow-right-b75290c7.js";var w=h,p=I;w({target:"Object",stat:!0,arity:2,forced:Object.assign!==p},{assign:p});var R=function(e){Object.assign(document.createElement("a"),{target:"_blank",href:e}).click()},c=function(e){return new Intl.NumberFormat("en-US",{style:"currency",currency:"usd",notation:"compact"}).format(e/100)},P=function(){var e=y(),a=F(function(m){return m.patron.instance});if(b.useEffect(function(){e(k())},[]),a.funding.isEmpty()||a.goals.isEmpty())return null;var r=a.getIn(["funding","amount"]),n=a.getIn(["goals","0","amount"]),v=a.getIn(["goals","0","text"]),f=r>=n,s;f?s=o.createElement(o.Fragment,null,t("strong",{},void 0,c(n))," per month ",t("span",{},void 0,"— reached!")):s=o.createElement(o.Fragment,null,t("strong",{},void 0,c(r)," out of ",c(n))," per month");var u=function(){R(a.url)};return t(T,{title:t(g,{id:"patron.title",defaultMessage:"Funding Goal"}),onActionClick:u},void 0,t(i,{space:4},void 0,t(i,{space:2},void 0,t(d,{},void 0,s),t(E,{progress:r/n})),t(i,{space:2},void 0,t(d,{theme:"muted"},void 0,v),t(x,{block:!0,theme:"primary",onClick:u},void 0,t(g,{id:"patron.donate",defaultMessage:"Donate"})))))};export{P as default}; diff --git a/packs/js/group-blocked-members-35abae37.js b/packs/js/group-blocked-members-92a06c91.js similarity index 88% rename from packs/js/group-blocked-members-35abae37.js rename to packs/js/group-blocked-members-92a06c91.js index 8808491aa..9c92d12fd 100644 --- a/packs/js/group-blocked-members-35abae37.js +++ b/packs/js/group-blocked-members-92a06c91.js @@ -1 +1 @@ -import{u as g,d as b,e9 as v,q as k,r as h,kO as M,a as e,aB as _,X as m,kL as y,o as B,b3 as I,aa as w,b2 as A,H as C,F as G,kP as S,bp as U}from"../index-7380452a.js";import{S as x}from"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var l=B({heading:{id:"column.group_blocked_members",defaultMessage:"Banned Members"},unblock:{id:"group.group_mod_unblock",defaultMessage:"Unban"},unblocked:{id:"group.group_mod_unblock.success",defaultMessage:"Unbanned @{name} from group"}}),E=function(r){var o=r.accountId,n=r.groupId,t=g(),s=b(),i=I(o),a=i.account;if(!a)return null;var u=function(){return s(S(n,o)).then(function(){return U.success(t.formatMessage(l.unblocked,{name:a.acct}))})};return e(C,{space:1,alignItems:"center",justifyContent:"between",className:"p-2.5"},void 0,e("div",{className:"w-full"},void 0,e(A,{account:a,withRelationship:!1})),e(w,{theme:"secondary",text:t.formatMessage(l.unblock),onClick:u}))},N=function(r){var o=r.params,n=g(),t=b(),s=o==null?void 0:o.groupId,i=v(s),a=i.group,u=k(function(c){var d;return(d=c.user_lists.group_blocks.get(s))===null||d===void 0?void 0:d.items});if(h.useEffect(function(){t(M(s))},[s]),!a||!a.relationship||!u)return e(m,{label:n.formatMessage(l.heading)},void 0,e(_,{}));if(!a.relationship.role||!["owner","admin","moderator"].includes(a.relationship.role))return e(y,{});var p=e(G,{id:"empty_column.group_blocks",defaultMessage:"The group hasn't banned any users yet."});return e(m,{label:n.formatMessage(l.heading),backHref:"/group/".concat(a.slug,"/manage")},void 0,e(x,{scrollKey:"group_blocks",emptyMessage:p,emptyMessageCard:!1},void 0,u.map(function(c){return e(E,{accountId:c,groupId:s},c)})))};export{N as default}; +import{u as g,d as b,e9 as v,q as k,r as h,kO as M,a as e,aB as _,X as m,kL as y,o as B,b3 as I,aa as w,b2 as A,H as C,F as G,kP as S,bp as U}from"../index-be605fd2.js";import{S as x}from"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var l=B({heading:{id:"column.group_blocked_members",defaultMessage:"Banned Members"},unblock:{id:"group.group_mod_unblock",defaultMessage:"Unban"},unblocked:{id:"group.group_mod_unblock.success",defaultMessage:"Unbanned @{name} from group"}}),E=function(r){var o=r.accountId,n=r.groupId,t=g(),s=b(),i=I(o),a=i.account;if(!a)return null;var u=function(){return s(S(n,o)).then(function(){return U.success(t.formatMessage(l.unblocked,{name:a.acct}))})};return e(C,{space:1,alignItems:"center",justifyContent:"between",className:"p-2.5"},void 0,e("div",{className:"w-full"},void 0,e(A,{account:a,withRelationship:!1})),e(w,{theme:"secondary",text:t.formatMessage(l.unblock),onClick:u}))},N=function(r){var o=r.params,n=g(),t=b(),s=o==null?void 0:o.groupId,i=v(s),a=i.group,u=k(function(c){var d;return(d=c.user_lists.group_blocks.get(s))===null||d===void 0?void 0:d.items});if(h.useEffect(function(){t(M(s))},[s]),!a||!a.relationship||!u)return e(m,{label:n.formatMessage(l.heading)},void 0,e(_,{}));if(!a.relationship.role||!["owner","admin","moderator"].includes(a.relationship.role))return e(y,{});var p=e(G,{id:"empty_column.group_blocks",defaultMessage:"The group hasn't banned any users yet."});return e(m,{label:n.formatMessage(l.heading),backHref:"/group/".concat(a.slug,"/manage")},void 0,e(x,{scrollKey:"group_blocks",emptyMessage:p,emptyMessageCard:!1},void 0,u.map(function(c){return e(E,{accountId:c,groupId:s},c)})))};export{N as default}; diff --git a/packs/js/group-card-c9aa3023.js b/packs/js/group-card-e8bab249.js similarity index 88% rename from packs/js/group-card-c9aa3023.js rename to packs/js/group-card-e8bab249.js index 68c021cec..71abfcf57 100644 --- a/packs/js/group-card-c9aa3023.js +++ b/packs/js/group-card-e8bab249.js @@ -1 +1 @@ -import{a,a2 as t,H as s,y as d,dq as i,dr as l,ds as n,bo as u}from"../index-7380452a.js";import{G as p}from"./group-header-image-e076498c.js";var v=function(o){var e,r=o.group;return a(t,{className:"relative h-[240px] rounded-lg border border-solid border-gray-300 bg-white dark:border-primary-800 dark:bg-primary-900","data-testid":"group-card"},void 0,a(t,{grow:!0,className:"relative basis-1/2 rounded-t-lg bg-primary-100 dark:bg-gray-800"},void 0,a(p,{group:r,className:"absolute inset-0 h-full w-full rounded-t-lg object-cover"})),a("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"},void 0,a(u,{group:r,size:64,withRing:!0})),a(t,{alignItems:"center",justifyContent:"end",grow:!0,className:"basis-1/2 py-4",space:.5},void 0,a(s,{alignItems:"center",space:1.5},void 0,a(d,{size:"lg",weight:"bold",dangerouslySetInnerHTML:{__html:r.display_name_html}}),((e=r.relationship)===null||e===void 0?void 0:e.pending_requests)&&a("div",{className:"h-2 w-2 rounded-full bg-secondary-500"})),a(s,{className:"text-gray-700 dark:text-gray-600",space:2,wrap:!0},void 0,a(i,{group:r}),a(l,{group:r}),a(n,{group:r}))))};export{v as G}; +import{a,a2 as t,H as s,y as d,dq as i,dr as l,ds as n,bo as u}from"../index-be605fd2.js";import{G as p}from"./group-header-image-068adc6d.js";var v=function(o){var e,r=o.group;return a(t,{className:"relative h-[240px] rounded-lg border border-solid border-gray-300 bg-white dark:border-primary-800 dark:bg-primary-900","data-testid":"group-card"},void 0,a(t,{grow:!0,className:"relative basis-1/2 rounded-t-lg bg-primary-100 dark:bg-gray-800"},void 0,a(p,{group:r,className:"absolute inset-0 h-full w-full rounded-t-lg object-cover"})),a("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"},void 0,a(u,{group:r,size:64,withRing:!0})),a(t,{alignItems:"center",justifyContent:"end",grow:!0,className:"basis-1/2 py-4",space:.5},void 0,a(s,{alignItems:"center",space:1.5},void 0,a(d,{size:"lg",weight:"bold",dangerouslySetInnerHTML:{__html:r.display_name_html}}),((e=r.relationship)===null||e===void 0?void 0:e.pending_requests)&&a("div",{className:"h-2 w-2 rounded-full bg-secondary-500"})),a(s,{className:"text-gray-700 dark:text-gray-600",space:2,wrap:!0},void 0,a(i,{group:r}),a(l,{group:r}),a(n,{group:r}))))};export{v as G}; diff --git a/packs/js/group-gallery-643efd4a.js b/packs/js/group-gallery-df350fcd.js similarity index 81% rename from packs/js/group-gallery-643efd4a.js rename to packs/js/group-gallery-df350fcd.js index 2441b7b4b..3564578ae 100644 --- a/packs/js/group-gallery-643efd4a.js +++ b/packs/js/group-gallery-df350fcd.js @@ -1 +1 @@ -import{d as I,e9 as _,kQ as L,bL as x,a,aB as b,X as c,aC as w,F as C,aD as l}from"../index-7380452a.js";import{L as D}from"./load-more-b53b8d88.js";import{M as F}from"./media-item-9b67131c.js";import"./volume-08f8a8f1.js";import"./es.array.last-index-of-ca8fdd84.js";var R=function(m){var o=m.params.groupId,t=I(),n=_(o),d=n.group,g=n.isLoading,i=L(o),f=i.entities,v=i.fetchNextPage,u=i.isLoading,M=i.isFetching,h=i.hasNextPage,p=f.reduce(function(s,e){return s.push.apply(s,x(e.media_attachments.map(function(r){return r.set("status",e)}))),s},[]),N=function(e){if(e.type==="video")t(l("VIDEO",{media:e,status:e.status,account:e.account}));else{var r=e.status.media_attachments,y=r.findIndex(function(G){return G.id===e.id});t(l("MEDIA",{media:r,index:y,status:e.status}))}};return u||g?a(c,{transparent:!0,withHeader:!1},void 0,a("div",{className:"pt-6"},void 0,a(b,{}))):d?a(c,{label:d.display_name,transparent:!0,withHeader:!1},void 0,a("div",{role:"feed",className:"mt-4 grid grid-cols-2 gap-2 sm:grid-cols-3"},void 0,p.map(function(s){return a(F,{attachment:s,onOpenMedia:N},"".concat(s.status.id,"+").concat(s.id))}),!u&&p.length===0&&a("div",{className:"empty-column-indicator col-span-2 sm:col-span-3"},void 0,a(C,{id:"account_gallery.none",defaultMessage:"No media to show."}))),h&&a(D,{className:"mt-4",disabled:M,onClick:v})):a("div",{className:"pt-6"},void 0,a(w,{nested:!0}))};export{R as default}; +import{d as I,e9 as _,kQ as L,bL as x,a,aB as b,X as c,aC as w,F as C,aD as l}from"../index-be605fd2.js";import{L as D}from"./load-more-55559f32.js";import{M as F}from"./media-item-f8ffc0fb.js";import"./volume-08f8a8f1.js";import"./es.array.last-index-of-d76ad0ed.js";var R=function(m){var o=m.params.groupId,t=I(),n=_(o),d=n.group,g=n.isLoading,i=L(o),f=i.entities,v=i.fetchNextPage,u=i.isLoading,M=i.isFetching,h=i.hasNextPage,p=f.reduce(function(s,e){return s.push.apply(s,x(e.media_attachments.map(function(r){return r.set("status",e)}))),s},[]),N=function(e){if(e.type==="video")t(l("VIDEO",{media:e,status:e.status,account:e.account}));else{var r=e.status.media_attachments,y=r.findIndex(function(G){return G.id===e.id});t(l("MEDIA",{media:r,index:y,status:e.status}))}};return u||g?a(c,{transparent:!0,withHeader:!1},void 0,a("div",{className:"pt-6"},void 0,a(b,{}))):d?a(c,{label:d.display_name,transparent:!0,withHeader:!1},void 0,a("div",{role:"feed",className:"mt-4 grid grid-cols-2 gap-2 sm:grid-cols-3"},void 0,p.map(function(s){return a(F,{attachment:s,onOpenMedia:N},"".concat(s.status.id,"+").concat(s.id))}),!u&&p.length===0&&a("div",{className:"empty-column-indicator col-span-2 sm:col-span-3"},void 0,a(C,{id:"account_gallery.none",defaultMessage:"No media to show."}))),h&&a(D,{className:"mt-4",disabled:M,onClick:v})):a("div",{className:"pt-6"},void 0,a(w,{nested:!0}))};export{R as default}; diff --git a/packs/js/group-header-image-e076498c.js b/packs/js/group-header-image-068adc6d.js similarity index 88% rename from packs/js/group-header-image-e076498c.js rename to packs/js/group-header-image-068adc6d.js index 063a11273..ac154a02e 100644 --- a/packs/js/group-header-image-e076498c.js +++ b/packs/js/group-header-image-068adc6d.js @@ -1 +1 @@ -import{u as d,r as g,at as l,a,A as c,dt as m,W as f,o as p}from"../index-7380452a.js";var v=p({header:{id:"group.header.alt",defaultMessage:"Group header"}}),I=function(r){var s=r.className,e=r.group,u=d(),i=g.useState(!1),t=l(i,2),n=t[0],o=t[1];return!e||!e.header?null:n?a("div",{className:f(s,"flex items-center justify-center bg-gray-200 dark:bg-gray-800/30")},void 0,a(c,{src:m,className:"h-6 w-6 text-gray-500 dark:text-gray-700"})):a("img",{className:s,src:e.header,alt:u.formatMessage(v.header),onError:function(){return o(!0)}})};export{I as G}; +import{u as d,r as g,at as l,a,A as c,dt as m,W as f,o as p}from"../index-be605fd2.js";var v=p({header:{id:"group.header.alt",defaultMessage:"Group header"}}),I=function(r){var s=r.className,e=r.group,u=d(),i=g.useState(!1),t=l(i,2),n=t[0],o=t[1];return!e||!e.header?null:n?a("div",{className:f(s,"flex items-center justify-center bg-gray-200 dark:bg-gray-800/30")},void 0,a(c,{src:m,className:"h-6 w-6 text-gray-500 dark:text-gray-700"})):a("img",{className:s,src:e.header,alt:u.formatMessage(v.header),onError:function(){return o(!0)}})};export{I as G}; diff --git a/packs/js/group-list-item-c21d0638.js b/packs/js/group-list-item-d71c8a2e.js similarity index 94% rename from packs/js/group-list-item-c21d0638.js rename to packs/js/group-list-item-d71c8a2e.js index 14cdf7ceb..6ccaae315 100644 --- a/packs/js/group-list-item-c21d0638.js +++ b/packs/js/group-list-item-d71c8a2e.js @@ -1 +1 @@ -import{a as e,L as u,H as a,bo as c,a2 as d,y as s,A as l,dc as g,hX as p,F as i,R as n,d4 as v,kt as h}from"../index-7380452a.js";var w=function(r){var t=r.group,o=r.withJoinAction,m=o===void 0?!0:o;return e(a,{alignItems:"center",justifyContent:"between","data-testid":"group-list-item"},void 0,e(u,{to:"/group/".concat(t.slug),className:"overflow-hidden"},t.id,e(a,{alignItems:"center",space:2},void 0,e(c,{group:t,size:44}),e(d,{className:"overflow-hidden"},void 0,e(s,{weight:"bold",dangerouslySetInnerHTML:{__html:t.display_name_html},truncate:!0}),e(a,{className:"text-gray-700 dark:text-gray-600",space:1,alignItems:"center"},void 0,e(l,{className:"h-4.5 w-4.5",src:t.locked?g:p}),e(s,{theme:"inherit",tag:"span",size:"sm",weight:"medium"},void 0,t.locked?e(i,{id:"group.privacy.locked",defaultMessage:"Private"}):e(i,{id:"group.privacy.public",defaultMessage:"Public"})),typeof t.members_count<"u"&&n.createElement(n.Fragment,null,e("span",{},void 0,"•"),e(s,{theme:"inherit",tag:"span",size:"sm",weight:"medium"},void 0,v(t.members_count)," ",e(i,{id:"groups.discover.search.results.member_count",defaultMessage:"{members, plural, one {member} other {members}}",values:{members:t.members_count}}))))))),m&&e(h,{group:t}))};export{w as G}; +import{a as e,L as u,H as a,bo as c,a2 as d,y as s,A as l,dc as g,hX as p,F as i,R as n,d4 as v,kt as h}from"../index-be605fd2.js";var w=function(r){var t=r.group,o=r.withJoinAction,m=o===void 0?!0:o;return e(a,{alignItems:"center",justifyContent:"between","data-testid":"group-list-item"},void 0,e(u,{to:"/group/".concat(t.slug),className:"overflow-hidden"},t.id,e(a,{alignItems:"center",space:2},void 0,e(c,{group:t,size:44}),e(d,{className:"overflow-hidden"},void 0,e(s,{weight:"bold",dangerouslySetInnerHTML:{__html:t.display_name_html},truncate:!0}),e(a,{className:"text-gray-700 dark:text-gray-600",space:1,alignItems:"center"},void 0,e(l,{className:"h-4.5 w-4.5",src:t.locked?g:p}),e(s,{theme:"inherit",tag:"span",size:"sm",weight:"medium"},void 0,t.locked?e(i,{id:"group.privacy.locked",defaultMessage:"Private"}):e(i,{id:"group.privacy.public",defaultMessage:"Public"})),typeof t.members_count<"u"&&n.createElement(n.Fragment,null,e("span",{},void 0,"•"),e(s,{theme:"inherit",tag:"span",size:"sm",weight:"medium"},void 0,v(t.members_count)," ",e(i,{id:"groups.discover.search.results.member_count",defaultMessage:"{members, plural, one {member} other {members}}",values:{members:t.members_count}}))))))),m&&e(h,{group:t}))};export{w as G}; diff --git a/packs/js/group-media-panel-e0279183.js b/packs/js/group-media-panel-8bea6b23.js similarity index 82% rename from packs/js/group-media-panel-e0279183.js rename to packs/js/group-media-panel-8bea6b23.js index 19dd6d0a6..de941fc70 100644 --- a/packs/js/group-media-panel-e0279183.js +++ b/packs/js/group-media-panel-8bea6b23.js @@ -1 +1 @@ -import{d as y,r as v,at as E,q as I,kT as G,O,kU as S,a as i,aB as D,F as c,y as T,aD as m}from"../index-7380452a.js";import{W as k}from"./widget-2ac720e4.js";import{M as N}from"./media-item-9b67131c.js";import"./arrow-right-b75290c7.js";import"./volume-08f8a8f1.js";import"./es.array.last-index-of-ca8fdd84.js";var q=function(f){var r,e=f.group,s=y(),g=v.useState(!0),u=E(g,2),M=u[0],l=u[1],d=!!(e!=null&&(r=e.relationship)!==null&&r!==void 0&&r.member),n=e==null?void 0:e.locked,_=I(function(o){return e?G(o,e==null?void 0:e.id):O()}),A=function(a){if(a.type==="video")s(m("VIDEO",{media:a,status:a.status}));else{var t=a.getIn(["status","media_attachments"]),p=t.findIndex(function(x){return x.id===a.id});s(m("MEDIA",{media:t,index:p,status:a.status,account:a.account}))}};v.useEffect(function(){l(!0),e&&!e.deleted_at&&(d||!n)&&s(S(e.id)).then(function(){return l(!1)}).catch(function(){})},[e==null?void 0:e.id,d,n]);var h=function(){var a=_.slice(0,9);return a.isEmpty()?i(T,{size:"sm",theme:"muted"},void 0,i(c,{id:"media_panel.empty_message",defaultMessage:"No media found."})):i("div",{className:"grid grid-cols-3 gap-1"},void 0,a.map(function(t,p){return i(N,{attachment:t,onOpenMedia:A},"".concat(t.getIn(["status","id"]),"+").concat(t.id))}))};return n&&!d||e!=null&&e.deleted_at?null:i(k,{title:i(c,{id:"media_panel.title",defaultMessage:"Media"})},void 0,e&&i("div",{className:"w-full"},void 0,M?i(D,{}):h()))};export{q as default}; +import{d as y,r as v,at as E,q as I,kT as G,O,kU as S,a as i,aB as D,F as c,y as T,aD as m}from"../index-be605fd2.js";import{W as k}from"./widget-84f84d09.js";import{M as N}from"./media-item-f8ffc0fb.js";import"./arrow-right-b75290c7.js";import"./volume-08f8a8f1.js";import"./es.array.last-index-of-d76ad0ed.js";var q=function(f){var r,e=f.group,s=y(),g=v.useState(!0),u=E(g,2),M=u[0],l=u[1],d=!!(e!=null&&(r=e.relationship)!==null&&r!==void 0&&r.member),n=e==null?void 0:e.locked,_=I(function(o){return e?G(o,e==null?void 0:e.id):O()}),A=function(a){if(a.type==="video")s(m("VIDEO",{media:a,status:a.status}));else{var t=a.getIn(["status","media_attachments"]),p=t.findIndex(function(x){return x.id===a.id});s(m("MEDIA",{media:t,index:p,status:a.status,account:a.account}))}};v.useEffect(function(){l(!0),e&&!e.deleted_at&&(d||!n)&&s(S(e.id)).then(function(){return l(!1)}).catch(function(){})},[e==null?void 0:e.id,d,n]);var h=function(){var a=_.slice(0,9);return a.isEmpty()?i(T,{size:"sm",theme:"muted"},void 0,i(c,{id:"media_panel.empty_message",defaultMessage:"No media found."})):i("div",{className:"grid grid-cols-3 gap-1"},void 0,a.map(function(t,p){return i(N,{attachment:t,onOpenMedia:A},"".concat(t.getIn(["status","id"]),"+").concat(t.id))}))};return n&&!d||e!=null&&e.deleted_at?null:i(k,{title:i(c,{id:"media_panel.title",defaultMessage:"Media"})},void 0,e&&i("div",{className:"w-full"},void 0,M?i(D,{}):h()))};export{q as default}; diff --git a/packs/js/group-members-8d014300.js b/packs/js/group-members-c0d4ea9d.js similarity index 94% rename from packs/js/group-members-8d014300.js rename to packs/js/group-members-c0d4ea9d.js index 188138f24..fc0ed53bb 100644 --- a/packs/js/group-members-8d014300.js +++ b/packs/js/group-members-c0d4ea9d.js @@ -1 +1 @@ -import{kv as O,kw as B,kx as T,bm as w,d as X,g as K,u as Y,ky as J,b3 as Q,kz as i,r as H,C as D,kA as V,fT as Z,a as t,H as U,W as q,cO as ee,b2 as oe,o as re,aD as x,kB as ae,bp as h,kC as se,e9 as ie,kD as ne,bL as S,R as L}from"../index-7380452a.js";import{u as E}from"./useGroupMembers-d353ac79.js";import{P as te}from"./pending-items-row-3c568fd1.js";import{S as me}from"./scrollable-list-df58e451.js";import{P as $}from"./placeholder-account-a1add042.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";function ue(v,u){const{createEntity:s}=O([w.GROUP_MEMBERSHIPS,u.id],{post:`/api/v1/groups/${v.id}/demote`},{schema:B.array(T).transform(d=>d[0])});return s}function de(v,u){const{createEntity:s}=O([w.GROUP_MEMBERSHIPS,u.account.id],{post:`/api/v1/groups/${v.id}/promote`},{schema:B.array(T).transform(d=>d[0])});return s}var a=re({adminLimitTitle:{id:"group.member.admin.limit.title",defaultMessage:"Admin limit reached"},adminLimitSummary:{id:"group.member.admin.limit.summary",defaultMessage:"You can assign up to {count, plural, one {admin} other {admins}} for the group at this time."},blockConfirm:{id:"confirmations.block_from_group.confirm",defaultMessage:"Ban"},blockFromGroupHeading:{id:"confirmations.block_from_group.heading",defaultMessage:"Ban From Group"},blockFromGroupMessage:{id:"confirmations.block_from_group.message",defaultMessage:"Are you sure you want to ban @{name} from the group?"},blocked:{id:"group.group_mod_block.success",defaultMessage:"@{name} is banned"},demotedToUser:{id:"group.demote.user.success",defaultMessage:"@{name} is now a member"},groupModBlock:{id:"group.group_mod_block",defaultMessage:"Ban from group"},groupModDemote:{id:"group.group_mod_demote",defaultMessage:"Remove {role} role"},groupModKick:{id:"group.group_mod_kick",defaultMessage:"Kick @{name} from group"},groupModPromoteMod:{id:"group.group_mod_promote_mod",defaultMessage:"Assign {role} role"},kickConfirm:{id:"confirmations.kick_from_group.confirm",defaultMessage:"Kick"},kickFromGroupMessage:{id:"confirmations.kick_from_group.message",defaultMessage:"Are you sure you want to kick @{name} from this group?"},kicked:{id:"group.group_mod_kick.success",defaultMessage:"Kicked @{name} from group"},promoteConfirm:{id:"group.promote.admin.confirmation.title",defaultMessage:"Assign Admin Role"},promoteConfirmMessage:{id:"group.promote.admin.confirmation.message",defaultMessage:"Are you sure you want to assign the admin role to @{name}?"},promotedToAdmin:{id:"group.promote.admin.success",defaultMessage:"@{name} is now an admin"}}),ce=function(u){var s,d,_=u.canPromoteToAdmin,r=u.member,n=u.group,c=X(),A=K(),o=Y(),y=J(n,r.account),G=de(n,r),F=ue(n,r),g=Q(r.account.id),e=g.account,N=g.isLoading,C=((s=n.relationship)===null||s===void 0?void 0:s.role)===i.OWNER,P=((d=n.relationship)===null||d===void 0?void 0:d.role)===i.ADMIN,k=r.role===i.OWNER,l=r.role===i.ADMIN,b=r.role===i.USER,R=function(){c(x("CONFIRM",{message:o.formatMessage(a.kickFromGroupMessage,{name:e==null?void 0:e.username}),confirm:o.formatMessage(a.kickConfirm),onConfirm:function(){return c(ae(n.id,e==null?void 0:e.id)).then(function(){return h.success(o.formatMessage(a.kicked,{name:e==null?void 0:e.acct}))})}}))},f=function(){c(x("CONFIRM",{heading:o.formatMessage(a.blockFromGroupHeading),message:o.formatMessage(a.blockFromGroupMessage,{name:e==null?void 0:e.username}),confirm:o.formatMessage(a.blockConfirm),onConfirm:function(){y({account_ids:[r.account.id]},{onSuccess:function(){c(se([r.id],w.GROUP_MEMBERSHIPS)),h.success(o.formatMessage(a.blocked,{name:e==null?void 0:e.acct}))}})}}))},I=function(){if(!_){h.error(o.formatMessage(a.adminLimitTitle),{summary:o.formatMessage(a.adminLimitSummary,{count:W})});return}c(x("CONFIRM",{heading:o.formatMessage(a.promoteConfirm),message:o.formatMessage(a.promoteConfirmMessage,{name:e==null?void 0:e.username}),confirm:o.formatMessage(a.promoteConfirm),confirmationTheme:"primary",onConfirm:function(){G({role:i.ADMIN,account_ids:[e==null?void 0:e.id]},{onSuccess:function(){h.success(o.formatMessage(a.promotedToAdmin,{name:e==null?void 0:e.acct}))}})}}))},M=function(){F({role:i.USER,account_ids:[e==null?void 0:e.id]},{onSuccess:function(){h.success(o.formatMessage(a.demotedToUser,{name:e==null?void 0:e.acct}))}})},z=H.useMemo(function(){var p,m=[];return!n||!e||!((p=n.relationship)!==null&&p!==void 0&&p.role)||(C&&(b?m.push({text:o.formatMessage(a.groupModPromoteMod,{role:i.ADMIN}),icon:D,action:I}):l&&m.push({text:o.formatMessage(a.groupModDemote,{role:i.ADMIN,name:e.username}),icon:D,action:M,destructive:!0})),(C||P)&&(l||b)&&r.role!==n.relationship.role&&(A.groupsKick&&m.push({text:o.formatMessage(a.groupModKick,{name:e.username}),icon:V,action:R}),m.push({text:o.formatMessage(a.groupModBlock,{name:e.username}),icon:Z,action:f,destructive:!0}))),m},[n,e==null?void 0:e.id]);return N?t($,{}):t(U,{alignItems:"center",justifyContent:"between","data-testid":"group-member-list-item"},void 0,t("div",{className:"w-full"},void 0,t(oe,{account:r.account,withRelationship:!1})),t(U,{alignItems:"center",space:2},void 0,k||l?t("span",{"data-testid":"role-badge",className:q("inline-flex items-center rounded px-2 py-1 text-xs font-medium capitalize",{"bg-primary-200 text-primary-500 dark:bg-primary-800 dark:text-primary-200":k,"bg-gray-200 text-gray-900 dark:bg-gray-800 dark:text-gray-100":l})},void 0,r.role):null,t(ee,{items:z})))},W=5,be=function(u){var s=u.params.groupId,d=K(),_=ie(s),r=_.group,n=_.isFetching,c=E(s,i.OWNER),A=c.groupMembers,o=c.isFetching,y=E(s,i.ADMIN),G=y.groupMembers,F=y.isFetching,g=E(s,i.USER),e=g.groupMembers,N=g.isFetching,C=g.fetchNextPage,P=g.hasNextPage,k=ne(s),l=k.isFetching,b=k.count,R=n||o||F||N||l,f=H.useMemo(function(){return[].concat(S(A),S(G),S(e))},[A,G,e]),I=d.groupsAdminMax?f.filter(function(M){return M.role===i.ADMIN}).length0&&t("div",{className:q("py-3",{"border-b border-gray-200 dark:border-gray-800":f.length})},void 0,t(te,{to:"/group/".concat(r==null?void 0:r.slug,"/manage/requests"),count:b}))},void 0,f.map(function(M){return t(ce,{group:r,member:M,canPromoteToAdmin:I},M.account.id)})))};export{W as MAX_ADMIN_COUNT,be as default}; +import{kv as O,kw as B,kx as T,bm as w,d as X,g as K,u as Y,ky as J,b3 as Q,kz as i,r as H,C as D,kA as V,fT as Z,a as t,H as U,W as q,cO as ee,b2 as oe,o as re,aD as x,kB as ae,bp as h,kC as se,e9 as ie,kD as ne,bL as S,R as L}from"../index-be605fd2.js";import{u as E}from"./useGroupMembers-4d4508c4.js";import{P as te}from"./pending-items-row-1f87d8f3.js";import{S as me}from"./scrollable-list-1e43c72d.js";import{P as $}from"./placeholder-account-dcc395bb.js";import"./index-85a17314.js";import"./load-more-55559f32.js";function ue(v,u){const{createEntity:s}=O([w.GROUP_MEMBERSHIPS,u.id],{post:`/api/v1/groups/${v.id}/demote`},{schema:B.array(T).transform(d=>d[0])});return s}function de(v,u){const{createEntity:s}=O([w.GROUP_MEMBERSHIPS,u.account.id],{post:`/api/v1/groups/${v.id}/promote`},{schema:B.array(T).transform(d=>d[0])});return s}var a=re({adminLimitTitle:{id:"group.member.admin.limit.title",defaultMessage:"Admin limit reached"},adminLimitSummary:{id:"group.member.admin.limit.summary",defaultMessage:"You can assign up to {count, plural, one {admin} other {admins}} for the group at this time."},blockConfirm:{id:"confirmations.block_from_group.confirm",defaultMessage:"Ban"},blockFromGroupHeading:{id:"confirmations.block_from_group.heading",defaultMessage:"Ban From Group"},blockFromGroupMessage:{id:"confirmations.block_from_group.message",defaultMessage:"Are you sure you want to ban @{name} from the group?"},blocked:{id:"group.group_mod_block.success",defaultMessage:"@{name} is banned"},demotedToUser:{id:"group.demote.user.success",defaultMessage:"@{name} is now a member"},groupModBlock:{id:"group.group_mod_block",defaultMessage:"Ban from group"},groupModDemote:{id:"group.group_mod_demote",defaultMessage:"Remove {role} role"},groupModKick:{id:"group.group_mod_kick",defaultMessage:"Kick @{name} from group"},groupModPromoteMod:{id:"group.group_mod_promote_mod",defaultMessage:"Assign {role} role"},kickConfirm:{id:"confirmations.kick_from_group.confirm",defaultMessage:"Kick"},kickFromGroupMessage:{id:"confirmations.kick_from_group.message",defaultMessage:"Are you sure you want to kick @{name} from this group?"},kicked:{id:"group.group_mod_kick.success",defaultMessage:"Kicked @{name} from group"},promoteConfirm:{id:"group.promote.admin.confirmation.title",defaultMessage:"Assign Admin Role"},promoteConfirmMessage:{id:"group.promote.admin.confirmation.message",defaultMessage:"Are you sure you want to assign the admin role to @{name}?"},promotedToAdmin:{id:"group.promote.admin.success",defaultMessage:"@{name} is now an admin"}}),ce=function(u){var s,d,_=u.canPromoteToAdmin,r=u.member,n=u.group,c=X(),A=K(),o=Y(),y=J(n,r.account),G=de(n,r),F=ue(n,r),g=Q(r.account.id),e=g.account,N=g.isLoading,C=((s=n.relationship)===null||s===void 0?void 0:s.role)===i.OWNER,P=((d=n.relationship)===null||d===void 0?void 0:d.role)===i.ADMIN,k=r.role===i.OWNER,l=r.role===i.ADMIN,b=r.role===i.USER,R=function(){c(x("CONFIRM",{message:o.formatMessage(a.kickFromGroupMessage,{name:e==null?void 0:e.username}),confirm:o.formatMessage(a.kickConfirm),onConfirm:function(){return c(ae(n.id,e==null?void 0:e.id)).then(function(){return h.success(o.formatMessage(a.kicked,{name:e==null?void 0:e.acct}))})}}))},f=function(){c(x("CONFIRM",{heading:o.formatMessage(a.blockFromGroupHeading),message:o.formatMessage(a.blockFromGroupMessage,{name:e==null?void 0:e.username}),confirm:o.formatMessage(a.blockConfirm),onConfirm:function(){y({account_ids:[r.account.id]},{onSuccess:function(){c(se([r.id],w.GROUP_MEMBERSHIPS)),h.success(o.formatMessage(a.blocked,{name:e==null?void 0:e.acct}))}})}}))},I=function(){if(!_){h.error(o.formatMessage(a.adminLimitTitle),{summary:o.formatMessage(a.adminLimitSummary,{count:W})});return}c(x("CONFIRM",{heading:o.formatMessage(a.promoteConfirm),message:o.formatMessage(a.promoteConfirmMessage,{name:e==null?void 0:e.username}),confirm:o.formatMessage(a.promoteConfirm),confirmationTheme:"primary",onConfirm:function(){G({role:i.ADMIN,account_ids:[e==null?void 0:e.id]},{onSuccess:function(){h.success(o.formatMessage(a.promotedToAdmin,{name:e==null?void 0:e.acct}))}})}}))},M=function(){F({role:i.USER,account_ids:[e==null?void 0:e.id]},{onSuccess:function(){h.success(o.formatMessage(a.demotedToUser,{name:e==null?void 0:e.acct}))}})},z=H.useMemo(function(){var p,m=[];return!n||!e||!((p=n.relationship)!==null&&p!==void 0&&p.role)||(C&&(b?m.push({text:o.formatMessage(a.groupModPromoteMod,{role:i.ADMIN}),icon:D,action:I}):l&&m.push({text:o.formatMessage(a.groupModDemote,{role:i.ADMIN,name:e.username}),icon:D,action:M,destructive:!0})),(C||P)&&(l||b)&&r.role!==n.relationship.role&&(A.groupsKick&&m.push({text:o.formatMessage(a.groupModKick,{name:e.username}),icon:V,action:R}),m.push({text:o.formatMessage(a.groupModBlock,{name:e.username}),icon:Z,action:f,destructive:!0}))),m},[n,e==null?void 0:e.id]);return N?t($,{}):t(U,{alignItems:"center",justifyContent:"between","data-testid":"group-member-list-item"},void 0,t("div",{className:"w-full"},void 0,t(oe,{account:r.account,withRelationship:!1})),t(U,{alignItems:"center",space:2},void 0,k||l?t("span",{"data-testid":"role-badge",className:q("inline-flex items-center rounded px-2 py-1 text-xs font-medium capitalize",{"bg-primary-200 text-primary-500 dark:bg-primary-800 dark:text-primary-200":k,"bg-gray-200 text-gray-900 dark:bg-gray-800 dark:text-gray-100":l})},void 0,r.role):null,t(ee,{items:z})))},W=5,be=function(u){var s=u.params.groupId,d=K(),_=ie(s),r=_.group,n=_.isFetching,c=E(s,i.OWNER),A=c.groupMembers,o=c.isFetching,y=E(s,i.ADMIN),G=y.groupMembers,F=y.isFetching,g=E(s,i.USER),e=g.groupMembers,N=g.isFetching,C=g.fetchNextPage,P=g.hasNextPage,k=ne(s),l=k.isFetching,b=k.count,R=n||o||F||N||l,f=H.useMemo(function(){return[].concat(S(A),S(G),S(e))},[A,G,e]),I=d.groupsAdminMax?f.filter(function(M){return M.role===i.ADMIN}).length0&&t("div",{className:q("py-3",{"border-b border-gray-200 dark:border-gray-800":f.length})},void 0,t(te,{to:"/group/".concat(r==null?void 0:r.slug,"/manage/requests"),count:b}))},void 0,f.map(function(M){return t(ce,{group:r,member:M,canPromoteToAdmin:I},M.account.id)})))};export{W as MAX_ADMIN_COUNT,be as default}; diff --git a/packs/js/group-membership-requests-608c55f0.js b/packs/js/group-membership-requests-400e3915.js similarity index 91% rename from packs/js/group-membership-requests-608c55f0.js rename to packs/js/group-membership-requests-400e3915.js index f3fed6ff8..16b679377 100644 --- a/packs/js/group-membership-requests-608c55f0.js +++ b/packs/js/group-membership-requests-400e3915.js @@ -1 +1 @@ -import{u as S,e9 as E,kD as L,kz as C,r as I,a as e,aB as B,X as b,kL as H,F as N,o as T,b2 as D,H as K,aP as M,bp as j}from"../index-7380452a.js";import{u as U}from"./useGroupMembers-d353ac79.js";import{A as X}from"./authorize-reject-buttons-f28a0539.js";import{S as x}from"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var h=T({heading:{id:"column.group_pending_requests",defaultMessage:"Pending requests"},authorizeFail:{id:"group.group_mod_authorize.fail",defaultMessage:"Failed to approve @{name}"},rejectFail:{id:"group.group_mod_reject.fail",defaultMessage:"Failed to reject @{name}"}}),J=function(l){var a=l.account,p=l.onAuthorize,i=l.onReject;if(!a)return null;var f=function(){return p(a)},u=function(){return i(a)};return e(K,{space:1,alignItems:"center",justifyContent:"between",className:"p-2.5"},void 0,e("div",{className:"w-full"},void 0,e(D,{account:a,withRelationship:!1})),e(X,{onAuthorize:f,onReject:u,countdown:3e3}))},$=function(l){var a=l.params,p=a==null?void 0:a.groupId,i=S(),f=E(p),u=f.group,n=L(p),_=n.accounts,w=n.authorize,A=n.reject,R=n.refetch,q=n.isLoading,G=U(p,C.USER),y=G.invalidate;if(I.useEffect(function(){return function(){y()}},[]),!u||!u.relationship||q)return e(b,{label:i.formatMessage(h.heading)},void 0,e(B,{}));if(!u.relationship.role||!["owner","admin","moderator"].includes(u.relationship.role))return e(H,{});function F(t){return g.apply(this,arguments)}function g(){return g=M(regeneratorRuntime.mark(function t(m){return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",w(m.id).then(function(){return Promise.resolve()}).catch(function(c){var s;R();var d=i.formatMessage(h.authorizeFail,{name:m.username});if(((s=c.response)===null||s===void 0?void 0:s.status)===409){var o;d=((o=c.response)===null||o===void 0?void 0:o.data).error}return j.error(d),Promise.reject()}));case 1:case"end":return r.stop()}},t)})),g.apply(this,arguments)}function k(t){return v.apply(this,arguments)}function v(){return v=M(regeneratorRuntime.mark(function t(m){return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",A(m.id).then(function(){return Promise.resolve()}).catch(function(c){var s;R();var d=i.formatMessage(h.rejectFail,{name:m.username});if(((s=c.response)===null||s===void 0?void 0:s.status)===409){var o;d=((o=c.response)===null||o===void 0?void 0:o.data).error}return j.error(d),Promise.reject()}));case 1:case"end":return r.stop()}},t)})),v.apply(this,arguments)}return e(b,{label:i.formatMessage(h.heading)},void 0,e(x,{scrollKey:"group_membership_requests",emptyMessage:e(N,{id:"empty_column.group_membership_requests",defaultMessage:"There are no pending membership requests for this group."})},void 0,_.map(function(t){return e(J,{account:t,onAuthorize:F,onReject:k},t.id)})))};export{$ as default}; +import{u as S,e9 as E,kD as L,kz as C,r as I,a as e,aB as B,X as b,kL as H,F as N,o as T,b2 as D,H as K,aP as M,bp as j}from"../index-be605fd2.js";import{u as U}from"./useGroupMembers-4d4508c4.js";import{A as X}from"./authorize-reject-buttons-1aaf0a6a.js";import{S as x}from"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var h=T({heading:{id:"column.group_pending_requests",defaultMessage:"Pending requests"},authorizeFail:{id:"group.group_mod_authorize.fail",defaultMessage:"Failed to approve @{name}"},rejectFail:{id:"group.group_mod_reject.fail",defaultMessage:"Failed to reject @{name}"}}),J=function(l){var a=l.account,p=l.onAuthorize,i=l.onReject;if(!a)return null;var f=function(){return p(a)},u=function(){return i(a)};return e(K,{space:1,alignItems:"center",justifyContent:"between",className:"p-2.5"},void 0,e("div",{className:"w-full"},void 0,e(D,{account:a,withRelationship:!1})),e(X,{onAuthorize:f,onReject:u,countdown:3e3}))},$=function(l){var a=l.params,p=a==null?void 0:a.groupId,i=S(),f=E(p),u=f.group,n=L(p),_=n.accounts,w=n.authorize,A=n.reject,R=n.refetch,q=n.isLoading,G=U(p,C.USER),y=G.invalidate;if(I.useEffect(function(){return function(){y()}},[]),!u||!u.relationship||q)return e(b,{label:i.formatMessage(h.heading)},void 0,e(B,{}));if(!u.relationship.role||!["owner","admin","moderator"].includes(u.relationship.role))return e(H,{});function F(t){return g.apply(this,arguments)}function g(){return g=M(regeneratorRuntime.mark(function t(m){return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",w(m.id).then(function(){return Promise.resolve()}).catch(function(c){var s;R();var d=i.formatMessage(h.authorizeFail,{name:m.username});if(((s=c.response)===null||s===void 0?void 0:s.status)===409){var o;d=((o=c.response)===null||o===void 0?void 0:o.data).error}return j.error(d),Promise.reject()}));case 1:case"end":return r.stop()}},t)})),g.apply(this,arguments)}function k(t){return v.apply(this,arguments)}function v(){return v=M(regeneratorRuntime.mark(function t(m){return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",A(m.id).then(function(){return Promise.resolve()}).catch(function(c){var s;R();var d=i.formatMessage(h.rejectFail,{name:m.username});if(((s=c.response)===null||s===void 0?void 0:s.status)===409){var o;d=((o=c.response)===null||o===void 0?void 0:o.data).error}return j.error(d),Promise.reject()}));case 1:case"end":return r.stop()}},t)})),v.apply(this,arguments)}return e(b,{label:i.formatMessage(h.heading)},void 0,e(x,{scrollKey:"group_membership_requests",emptyMessage:e(N,{id:"empty_column.group_membership_requests",defaultMessage:"There are no pending membership requests for this group."})},void 0,_.map(function(t){return e(J,{account:t,onAuthorize:F,onReject:k},t.id)})))};export{$ as default}; diff --git a/packs/js/group-tag-timeline-60da9f6d.js b/packs/js/group-tag-timeline-f9340654.js similarity index 67% rename from packs/js/group-tag-timeline-60da9f6d.js rename to packs/js/group-tag-timeline-f9340654.js index 060d4911e..3c15b1dde 100644 --- a/packs/js/group-tag-timeline-60da9f6d.js +++ b/packs/js/group-tag-timeline-f9340654.js @@ -1 +1 @@ -import{v as g}from"./message-2-2f21ce66.js";import{d as c,e9 as v,r as f,kG as s,a as e,a2 as T,A as y,y as h,F as G,X as I}from"../index-7380452a.js";import{u as M}from"./useGroupTag-49646e08.js";import{T as _}from"./timeline-585cfcf0.js";import"./scroll-top-button-95820d24.js";import"./status-list-13fdd81b.js";import"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";import"./status-container-59e57baf.js";import"./pending-status-7f660229.js";import"./poll-preview-66340c9e.js";import"./noop-19c18e1e.js";var P=function(r){var t=c(),o=r.params.groupId,n=r.params.tagId,m=v(o),p=m.group,i=M(n),a=i.tag,u=i.isLoading,d=function(l){t(s(o,a==null?void 0:a.name,{maxId:l}))};return f.useEffect(function(){a!=null&&a.name&&t(s(o,a==null?void 0:a.name))},[o,a]),u||!a||!p?null:e(I,{label:"#".concat(a.name)},void 0,e(_,{scrollKey:"group_timeline",timelineId:"group:tags:".concat(o,":").concat(a.name),onLoadMore:d,divideType:"border",showGroup:!1,emptyMessageCard:!1,emptyMessage:e(T,{space:4,className:"py-6",justifyContent:"center",alignItems:"center"},void 0,e("div",{className:"rounded-full bg-gray-200 p-4 dark:bg-gray-800"},void 0,e(y,{src:g,className:"h-6 w-6 text-gray-600"})),e(h,{theme:"muted"},void 0,e(G,{id:"empty_column.group",defaultMessage:"There are no posts in this group yet."})))}))};export{P as default}; +import{v as g}from"./message-2-2f21ce66.js";import{d as c,e9 as v,r as f,kG as s,a as e,a2 as T,A as y,y as h,F as G,X as I}from"../index-be605fd2.js";import{u as M}from"./useGroupTag-9c7d1cac.js";import{T as _}from"./timeline-456dace7.js";import"./scroll-top-button-73ec9889.js";import"./status-list-c10445e1.js";import"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";import"./status-container-e53698d2.js";import"./pending-status-959f7aeb.js";import"./poll-preview-ddaf662b.js";import"./noop-3f99ae3e.js";var P=function(r){var t=c(),o=r.params.groupId,n=r.params.tagId,m=v(o),p=m.group,i=M(n),a=i.tag,u=i.isLoading,d=function(l){t(s(o,a==null?void 0:a.name,{maxId:l}))};return f.useEffect(function(){a!=null&&a.name&&t(s(o,a==null?void 0:a.name))},[o,a]),u||!a||!p?null:e(I,{label:"#".concat(a.name)},void 0,e(_,{scrollKey:"group_timeline",timelineId:"group:tags:".concat(o,":").concat(a.name),onLoadMore:d,divideType:"border",showGroup:!1,emptyMessageCard:!1,emptyMessage:e(T,{space:4,className:"py-6",justifyContent:"center",alignItems:"center"},void 0,e("div",{className:"rounded-full bg-gray-200 p-4 dark:bg-gray-800"},void 0,e(y,{src:g,className:"h-6 w-6 text-gray-600"})),e(h,{theme:"muted"},void 0,e(G,{id:"empty_column.group",defaultMessage:"There are no posts in this group yet."})))}))};export{P as default}; diff --git a/packs/js/group-tags-537025c4.js b/packs/js/group-tags-42eed4b5.js similarity index 93% rename from packs/js/group-tags-537025c4.js rename to packs/js/group-tags-42eed4b5.js index 838ac95f3..441ecc66a 100644 --- a/packs/js/group-tags-537025c4.js +++ b/packs/js/group-tags-42eed4b5.js @@ -1 +1 @@ -import{v as C}from"./hash-746ab8b6.js";import{kv as R,bm as w,d as I,u as E,kz as L,a as t,H as S,fM as T,aG as M,kE as F,dk as A,L as U,a2 as N,y as f,d4 as q,o as D,kF as G,bp as k,A as j,hO as H,_ as z,e9 as $,F as K}from"../index-7380452a.js";import{u as V}from"./useGroupTags-604f28f5.js";import{S as B}from"./scrollable-list-df58e451.js";import{P as W}from"./placeholder-account-a1add042.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";function J(r,i){const{updateEntity:s,...a}=R([w.GROUP_TAGS,r,i],{patch:`/api/v1/groups/${r}/tags/${i}`});return{updateGroupTag:s,...a}}const _="/packs/assets/pin-filled-c783b6dd.svg";function x(r,i){var s=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);i&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})),s.push.apply(s,a)}return s}function v(r){for(var i=1;i1)for(var y=1;y0&&(U.width=L),A>0&&(U.height=A),s.default.createElement("svg",U,s.default.Children.map(this.props.children,function(X){return s.default.cloneElement(X,{data:z,points:I,width:l,height:h,margin:D})}))}}]),O}(d.PureComponent);Y.propTypes={data:f.default.array,limit:f.default.number,width:f.default.number,height:f.default.number,svgWidth:f.default.number,svgHeight:f.default.number,preserveAspectRatio:f.default.string,margin:f.default.number,style:f.default.object,min:f.default.number,max:f.default.number,onMouseMove:f.default.func},Y.defaultProps={data:[],width:240,height:60,preserveAspectRatio:"none",margin:2},i.Sparklines=Y,i.SparklinesLine=S.default,i.SparklinesCurve=r.default,i.SparklinesBars=p.default,i.SparklinesSpots=t.default,i.SparklinesReferenceLine=y.default,i.SparklinesNormalBand=T.default,i.SparklinesText=b.default},function(m,i,a){(function(c){var u=a(4),f=a(5),d=a(8),s=a(6),v=a(15);m.exports=function(b,w){var S=typeof Symbol=="function"&&Symbol.iterator,_="@@iterator";function r(l){var h=l&&(S&&l[S]||l[_]);if(typeof h=="function")return h}var e="<>",p={array:y("array"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:g(),arrayOf:T,element:x(),instanceOf:H,node:N(),objectOf:$,oneOf:P,oneOfType:F,shape:Y};function n(l,h){return l===h?l!==0||1/l===1/h:l!==l&&h!==h}function t(l){this.message=l,this.stack=""}t.prototype=Error.prototype;function o(l){function h(A,M,D,R,E,B,I){return R=R||e,B=B||D,I!==s&&w&&f(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"),M[D]==null?A?M[D]===null?new t("The "+E+" `"+B+"` is marked as required "+("in `"+R+"`, but its value is `null`.")):new t("The "+E+" `"+B+"` is marked as required in "+("`"+R+"`, but its value is `undefined`.")):null:l(M,D,R,E,B)}var L=h.bind(null,!1);return L.isRequired=h.bind(null,!0),L}function y(l){function h(L,A,M,D,R,E){var B=L[A],I=W(B);if(I!==l){var U=k(B);return new t("Invalid "+D+" `"+R+"` of type "+("`"+U+"` supplied to `"+M+"`, expected ")+("`"+l+"`."))}return null}return o(h)}function g(){return o(u.thatReturnsNull)}function T(l){function h(L,A,M,D,R){if(typeof l!="function")return new t("Property `"+R+"` of component `"+M+"` has invalid PropType notation inside arrayOf.");var E=L[A];if(!Array.isArray(E)){var B=W(E);return new t("Invalid "+D+" `"+R+"` of type "+("`"+B+"` supplied to `"+M+"`, expected an array."))}for(var I=0;I"u"||l===null)return""+l;var h=W(l);if(h==="object"){if(l instanceof Date)return"date";if(l instanceof RegExp)return"regexp"}return h}function z(l){var h=k(l);switch(h){case"array":case"object":return"an "+h;case"boolean":case"date":case"regexp":return"a "+h;default:return h}}function J(l){return!l.constructor||!l.constructor.name?e:l.constructor.name}return p.checkPropTypes=v,p.PropTypes=p,p}}).call(i,a(2))},function(m,i,a){(function(c){function u(f,d,s,v,b){}m.exports=u}).call(i,a(2))},function(m,i,a){var c=a(4),u=a(5),f=a(6);m.exports=function(){function d(b,w,S,_,r,e){e!==f&&u(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}d.isRequired=d;function s(){return d}var v={array:d,bool:d,func:d,number:d,object:d,string:d,symbol:d,any:d,arrayOf:s,element:d,instanceOf:s,node:d,objectOf:s,oneOf:s,oneOfType:s,shape:s};return v.checkPropTypes=c,v.PropTypes=v,v}},function(m,i,a){Object.defineProperty(i,"__esModule",{value:!0});var c=function(){function r(e,p){for(var n=0;n=2?Math.max(0,o[1].x-o[0].x-P-$):0);return s.default.createElement("g",{transform:"scale(1,-1)"},o.map(function(N,Y){return s.default.createElement("rect",{key:Y,x:N.x-(F+P)/2,y:-y,width:F,height:Math.max(0,y-N.y),style:g,onMouseMove:H&&H.bind(n,N)})}))}}]),e}(s.default.Component);_.propTypes={points:f.default.arrayOf(f.default.object),height:f.default.number,style:f.default.object,barWidth:f.default.number,margin:f.default.number,onMouseMove:f.default.func},_.defaultProps={style:{fill:"slategray"}},i.default=_},function(m,i,a){Object.defineProperty(i,"__esModule",{value:!0});var c=function(){function r(e,p){for(var n=0;n0?1:-1},n.length<2?0:Math.sign(n[n.length-2].y-n[n.length-1].y)}},{key:"render",value:function(){var n=this.props,t=n.points;n.width,n.height;var o=n.size,y=n.style,g=n.spotColors,T=s.default.createElement("circle",{cx:t[0].x,cy:t[0].y,r:o,style:y}),x=s.default.createElement("circle",{cx:t[t.length-1].x,cy:t[t.length-1].y,r:o,style:y||{fill:g[this.lastDirection(t)]}});return s.default.createElement("g",null,y&&T,x)}}]),e}(s.default.Component);_.propTypes={size:f.default.number,style:f.default.object,spotColors:f.default.object},_.defaultProps={size:2,spotColors:{"-1":"red",0:"black",1:"green"}},i.default=_},function(m,i,a){Object.defineProperty(i,"__esModule",{value:!0});var c=function(){function n(t,o){for(var y=0;y1?1:0));return b.map(function(P,$){return{x:$*H+n,y:(o===g?1:o-P)*x+n}})}}])})})(C);var V=C.exports,fe=function(Z){var G,m=Z.hashtag,i=Number((G=m.history)===null||G===void 0||(G=G.get(0))===null||G===void 0?void 0:G.accounts);return Q(oe,{alignItems:"center",justifyContent:"between","data-testid":"hashtag"},void 0,Q(ne,{},void 0,Q(re,{to:"/tags/".concat(m.name),className:"hover:underline"},void 0,Q(q,{tag:"span",size:"sm",weight:"semibold"},void 0,"#",m.name)),!!i&&Q(q,{theme:"muted",size:"sm"},void 0,Q(ae,{id:"trends.count_by_accounts",defaultMessage:"{count} {rawCount, plural, one {person} other {people}} talking",values:{rawCount:i,count:Q("strong",{},void 0,ie(i))}}))),m.history&&Q("div",{className:"w-[40px]","data-testid":"sparklines"},void 0,Q(V.Sparklines,{width:40,height:28,data:m.history.reverse().map(function(a){return+a.uses}).toArray()},void 0,Q(V.SparklinesCurve,{style:{fill:"none"},color:"#818cf8"}))))};export{fe as H}; +import{r as ee,cB as te,a as Q,a2 as ne,L as re,y as q,F as ae,d4 as ie,H as oe}from"../index-be605fd2.js";var C={exports:{}};(function(K,Z){(function(m,i){K.exports=i(ee)})(te,function(G){return function(m){var i={};function a(c){if(i[c])return i[c].exports;var u=i[c]={i:c,l:!1,exports:{}};return m[c].call(u.exports,u,u.exports,a),u.l=!0,u.exports}return a.m=m,a.c=i,a.d=function(c,u,f){a.o(c,u)||Object.defineProperty(c,u,{configurable:!1,enumerable:!0,get:f})},a.n=function(c){var u=c&&c.__esModule?function(){return c.default}:function(){return c};return a.d(u,"a",u),u},a.o=function(c,u){return Object.prototype.hasOwnProperty.call(c,u)},a.p="/",a(a.s=11)}([function(m,i,a){(function(c){m.exports=a(16)()}).call(i,a(2))},function(m,i){m.exports=G},function(m,i){var a=m.exports={},c,u;function f(){throw new Error("setTimeout has not been defined")}function d(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?c=setTimeout:c=f}catch{c=f}try{typeof clearTimeout=="function"?u=clearTimeout:u=d}catch{u=d}})();function s(t){if(c===setTimeout)return setTimeout(t,0);if((c===f||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch{try{return c.call(null,t,0)}catch{return c.call(this,t,0)}}}function v(t){if(u===clearTimeout)return clearTimeout(t);if((u===d||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(t);try{return u(t)}catch{try{return u.call(null,t)}catch{return u.call(this,t)}}}var b=[],w=!1,S,_=-1;function r(){!w||!S||(w=!1,S.length?b=S.concat(b):_=-1,b.length&&e())}function e(){if(!w){var t=s(r);w=!0;for(var o=b.length;o;){for(S=b,b=[];++_1)for(var y=1;y0&&(U.width=L),A>0&&(U.height=A),s.default.createElement("svg",U,s.default.Children.map(this.props.children,function(X){return s.default.cloneElement(X,{data:z,points:I,width:l,height:h,margin:D})}))}}]),O}(d.PureComponent);Y.propTypes={data:f.default.array,limit:f.default.number,width:f.default.number,height:f.default.number,svgWidth:f.default.number,svgHeight:f.default.number,preserveAspectRatio:f.default.string,margin:f.default.number,style:f.default.object,min:f.default.number,max:f.default.number,onMouseMove:f.default.func},Y.defaultProps={data:[],width:240,height:60,preserveAspectRatio:"none",margin:2},i.Sparklines=Y,i.SparklinesLine=S.default,i.SparklinesCurve=r.default,i.SparklinesBars=p.default,i.SparklinesSpots=t.default,i.SparklinesReferenceLine=y.default,i.SparklinesNormalBand=T.default,i.SparklinesText=b.default},function(m,i,a){(function(c){var u=a(4),f=a(5),d=a(8),s=a(6),v=a(15);m.exports=function(b,w){var S=typeof Symbol=="function"&&Symbol.iterator,_="@@iterator";function r(l){var h=l&&(S&&l[S]||l[_]);if(typeof h=="function")return h}var e="<>",p={array:y("array"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:g(),arrayOf:T,element:x(),instanceOf:H,node:N(),objectOf:$,oneOf:P,oneOfType:F,shape:Y};function n(l,h){return l===h?l!==0||1/l===1/h:l!==l&&h!==h}function t(l){this.message=l,this.stack=""}t.prototype=Error.prototype;function o(l){function h(A,M,D,R,E,B,I){return R=R||e,B=B||D,I!==s&&w&&f(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"),M[D]==null?A?M[D]===null?new t("The "+E+" `"+B+"` is marked as required "+("in `"+R+"`, but its value is `null`.")):new t("The "+E+" `"+B+"` is marked as required in "+("`"+R+"`, but its value is `undefined`.")):null:l(M,D,R,E,B)}var L=h.bind(null,!1);return L.isRequired=h.bind(null,!0),L}function y(l){function h(L,A,M,D,R,E){var B=L[A],I=W(B);if(I!==l){var U=k(B);return new t("Invalid "+D+" `"+R+"` of type "+("`"+U+"` supplied to `"+M+"`, expected ")+("`"+l+"`."))}return null}return o(h)}function g(){return o(u.thatReturnsNull)}function T(l){function h(L,A,M,D,R){if(typeof l!="function")return new t("Property `"+R+"` of component `"+M+"` has invalid PropType notation inside arrayOf.");var E=L[A];if(!Array.isArray(E)){var B=W(E);return new t("Invalid "+D+" `"+R+"` of type "+("`"+B+"` supplied to `"+M+"`, expected an array."))}for(var I=0;I"u"||l===null)return""+l;var h=W(l);if(h==="object"){if(l instanceof Date)return"date";if(l instanceof RegExp)return"regexp"}return h}function z(l){var h=k(l);switch(h){case"array":case"object":return"an "+h;case"boolean":case"date":case"regexp":return"a "+h;default:return h}}function J(l){return!l.constructor||!l.constructor.name?e:l.constructor.name}return p.checkPropTypes=v,p.PropTypes=p,p}}).call(i,a(2))},function(m,i,a){(function(c){function u(f,d,s,v,b){}m.exports=u}).call(i,a(2))},function(m,i,a){var c=a(4),u=a(5),f=a(6);m.exports=function(){function d(b,w,S,_,r,e){e!==f&&u(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}d.isRequired=d;function s(){return d}var v={array:d,bool:d,func:d,number:d,object:d,string:d,symbol:d,any:d,arrayOf:s,element:d,instanceOf:s,node:d,objectOf:s,oneOf:s,oneOfType:s,shape:s};return v.checkPropTypes=c,v.PropTypes=v,v}},function(m,i,a){Object.defineProperty(i,"__esModule",{value:!0});var c=function(){function r(e,p){for(var n=0;n=2?Math.max(0,o[1].x-o[0].x-P-$):0);return s.default.createElement("g",{transform:"scale(1,-1)"},o.map(function(N,Y){return s.default.createElement("rect",{key:Y,x:N.x-(F+P)/2,y:-y,width:F,height:Math.max(0,y-N.y),style:g,onMouseMove:H&&H.bind(n,N)})}))}}]),e}(s.default.Component);_.propTypes={points:f.default.arrayOf(f.default.object),height:f.default.number,style:f.default.object,barWidth:f.default.number,margin:f.default.number,onMouseMove:f.default.func},_.defaultProps={style:{fill:"slategray"}},i.default=_},function(m,i,a){Object.defineProperty(i,"__esModule",{value:!0});var c=function(){function r(e,p){for(var n=0;n0?1:-1},n.length<2?0:Math.sign(n[n.length-2].y-n[n.length-1].y)}},{key:"render",value:function(){var n=this.props,t=n.points;n.width,n.height;var o=n.size,y=n.style,g=n.spotColors,T=s.default.createElement("circle",{cx:t[0].x,cy:t[0].y,r:o,style:y}),x=s.default.createElement("circle",{cx:t[t.length-1].x,cy:t[t.length-1].y,r:o,style:y||{fill:g[this.lastDirection(t)]}});return s.default.createElement("g",null,y&&T,x)}}]),e}(s.default.Component);_.propTypes={size:f.default.number,style:f.default.object,spotColors:f.default.object},_.defaultProps={size:2,spotColors:{"-1":"red",0:"black",1:"green"}},i.default=_},function(m,i,a){Object.defineProperty(i,"__esModule",{value:!0});var c=function(){function n(t,o){for(var y=0;y1?1:0));return b.map(function(P,$){return{x:$*H+n,y:(o===g?1:o-P)*x+n}})}}])})})(C);var V=C.exports,fe=function(Z){var G,m=Z.hashtag,i=Number((G=m.history)===null||G===void 0||(G=G.get(0))===null||G===void 0?void 0:G.accounts);return Q(oe,{alignItems:"center",justifyContent:"between","data-testid":"hashtag"},void 0,Q(ne,{},void 0,Q(re,{to:"/tags/".concat(m.name),className:"hover:underline"},void 0,Q(q,{tag:"span",size:"sm",weight:"semibold"},void 0,"#",m.name)),!!i&&Q(q,{theme:"muted",size:"sm"},void 0,Q(ae,{id:"trends.count_by_accounts",defaultMessage:"{count} {rawCount, plural, one {person} other {people}} talking",values:{rawCount:i,count:Q("strong",{},void 0,ie(i))}}))),m.history&&Q("div",{className:"w-[40px]","data-testid":"sparklines"},void 0,Q(V.Sparklines,{width:40,height:28,data:m.history.reverse().map(function(a){return+a.uses}).toArray()},void 0,Q(V.SparklinesCurve,{style:{fill:"none"},color:"#818cf8"}))))};export{fe as H}; diff --git a/packs/js/header-picker-eba39776.js b/packs/js/header-picker-cd9089b7.js similarity index 97% rename from packs/js/header-picker-eba39776.js rename to packs/js/header-picker-cd9089b7.js index 6067d7e09..ea5077fe7 100644 --- a/packs/js/header-picker-eba39776.js +++ b/packs/js/header-picker-cd9089b7.js @@ -1 +1 @@ -import{r as v,R as l,a as e,H as d,W as c,A as u,c7 as b,F as p,u as f,y,aG as w,a5 as N,o as k}from"../index-7380452a.js";import{v as C}from"./photo-plus-14444f2c.js";function U(a){return v.useMemo(()=>{if(a)return URL.createObjectURL(a)},[a])}const R="/packs/assets/camera-plus-28192df4.svg";var j=l.forwardRef(function(a,o){var t=a.className,s=a.src,r=a.onChange,i=a.accept,n=a.disabled;return e("label",{className:c("absolute bottom-0 left-1/2 h-20 w-20 -translate-x-1/2 translate-y-1/2 cursor-pointer rounded-full bg-primary-500 ring-2 ring-white dark:ring-primary-900",t)},void 0,s&&e(b,{src:s,size:80}),e(d,{alignItems:"center",justifyContent:"center",className:c("absolute left-0 top-0 h-full w-full rounded-full transition-opacity",{"opacity-0 hover:opacity-90 bg-primary-500":s})},void 0,e(u,{src:R,className:"h-5 w-5 text-white"})),e("span",{className:"sr-only"},void 0,e(p,{id:"group.upload_avatar",defaultMessage:"Upload avatar"})),l.createElement("input",{ref:o,name:"avatar",type:"file",accept:i,onChange:r,disabled:n,className:"hidden"}))}),x=k({title:{id:"group.upload_banner.title",defaultMessage:"Upload background picture"}}),A=l.forwardRef(function(a,o){var t=a.src,s=a.onChange,r=a.onClear,i=a.accept,n=a.disabled,m=f(),g=function(h){h.stopPropagation(),r()};return e("label",{className:"dark:sm:shadow-inset relative h-24 w-full cursor-pointer overflow-hidden rounded-lg bg-primary-100 text-primary-500 dark:bg-gray-800 dark:text-accent-blue sm:h-36 sm:shadow",title:m.formatMessage(x.title),tabIndex:0},void 0,t&&e("img",{className:"h-full w-full object-cover",src:t,alt:""}),e(d,{className:c("absolute top-0 h-full w-full transition-opacity",{"opacity-0 hover:opacity-90 bg-primary-100 dark:bg-gray-800":t}),space:1.5,alignItems:"center",justifyContent:"center"},void 0,e(u,{src:C,className:"h-4.5 w-4.5"}),e(y,{size:"md",theme:"primary",weight:"semibold"},void 0,e(p,{id:"group.upload_banner",defaultMessage:"Upload photo"})),l.createElement("input",{ref:o,name:"header",type:"file",accept:i,onChange:s,disabled:n,className:"hidden"})),r&&t&&e(w,{onClick:g,src:N,theme:"dark",className:"absolute right-2 top-2 z-10 hover:scale-105 hover:bg-gray-900",iconClassName:"h-5 w-5"}))});export{j as A,A as H,U as u}; +import{r as v,R as l,a as e,H as d,W as c,A as u,c7 as b,F as p,u as f,y,aG as w,a5 as N,o as k}from"../index-be605fd2.js";import{v as C}from"./photo-plus-14444f2c.js";function U(a){return v.useMemo(()=>{if(a)return URL.createObjectURL(a)},[a])}const R="/packs/assets/camera-plus-28192df4.svg";var j=l.forwardRef(function(a,o){var t=a.className,s=a.src,r=a.onChange,i=a.accept,n=a.disabled;return e("label",{className:c("absolute bottom-0 left-1/2 h-20 w-20 -translate-x-1/2 translate-y-1/2 cursor-pointer rounded-full bg-primary-500 ring-2 ring-white dark:ring-primary-900",t)},void 0,s&&e(b,{src:s,size:80}),e(d,{alignItems:"center",justifyContent:"center",className:c("absolute left-0 top-0 h-full w-full rounded-full transition-opacity",{"opacity-0 hover:opacity-90 bg-primary-500":s})},void 0,e(u,{src:R,className:"h-5 w-5 text-white"})),e("span",{className:"sr-only"},void 0,e(p,{id:"group.upload_avatar",defaultMessage:"Upload avatar"})),l.createElement("input",{ref:o,name:"avatar",type:"file",accept:i,onChange:r,disabled:n,className:"hidden"}))}),x=k({title:{id:"group.upload_banner.title",defaultMessage:"Upload background picture"}}),A=l.forwardRef(function(a,o){var t=a.src,s=a.onChange,r=a.onClear,i=a.accept,n=a.disabled,m=f(),g=function(h){h.stopPropagation(),r()};return e("label",{className:"dark:sm:shadow-inset relative h-24 w-full cursor-pointer overflow-hidden rounded-lg bg-primary-100 text-primary-500 dark:bg-gray-800 dark:text-accent-blue sm:h-36 sm:shadow",title:m.formatMessage(x.title),tabIndex:0},void 0,t&&e("img",{className:"h-full w-full object-cover",src:t,alt:""}),e(d,{className:c("absolute top-0 h-full w-full transition-opacity",{"opacity-0 hover:opacity-90 bg-primary-100 dark:bg-gray-800":t}),space:1.5,alignItems:"center",justifyContent:"center"},void 0,e(u,{src:C,className:"h-4.5 w-4.5"}),e(y,{size:"md",theme:"primary",weight:"semibold"},void 0,e(p,{id:"group.upload_banner",defaultMessage:"Upload photo"})),l.createElement("input",{ref:o,name:"header",type:"file",accept:i,onChange:s,disabled:n,className:"hidden"})),r&&t&&e(w,{onClick:g,src:N,theme:"dark",className:"absolute right-2 top-2 z-10 hover:scale-105 hover:bg-gray-900",iconClassName:"h-5 w-5"}))});export{j as A,A as H,U as u}; diff --git a/packs/js/hotkeys-modal-4d4ec08e.js b/packs/js/hotkeys-modal-e6f1a2b7.js similarity index 98% rename from packs/js/hotkeys-modal-4d4ec08e.js rename to packs/js/hotkeys-modal-e6f1a2b7.js index b5795f55f..190f94db5 100644 --- a/packs/js/hotkeys-modal-4d4ec08e.js +++ b/packs/js/hotkeys-modal-e6f1a2b7.js @@ -1 +1 @@ -import{g as v,a as o,F as t,bu as l}from"../index-7380452a.js";var e=function(i){var s=i.children;return o("kbd",{className:"rounded-md border border-solid border-primary-200 bg-primary-50 px-1.5 py-1 font-sans text-xs dark:border-gray-700 dark:bg-gray-800"},void 0,s)},d=function(i){var s=i.children;return o("td",{className:"px-2 pb-3"},void 0,s)},c=function(i){var s=i.onClose,a=v();return o(l,{title:o(t,{id:"keyboard_shortcuts.heading",defaultMessage:"Keyboard shortcuts"}),onClose:s,width:"4xl"},void 0,o("div",{className:"flex flex-col text-xs lg:flex-row"},void 0,o("table",{},void 0,o("thead",{},void 0,o("tr",{},void 0,o("th",{className:"pb-2 font-bold"},void 0,o(t,{id:"keyboard_shortcuts.hotkey",defaultMessage:"Hotkey"})))),o("tbody",{},void 0,o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"r")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.reply",defaultMessage:"to reply"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"m")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.mention",defaultMessage:"to mention author"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"p")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.profile",defaultMessage:"to open author's profile"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"f")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.favourite",defaultMessage:"to like"}))),a.emojiReacts&&o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"e")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.react",defaultMessage:"to react"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"b")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.boost",defaultMessage:"to repost"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"enter"),", ",o(e,{},void 0,"o")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.enter",defaultMessage:"to open post"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"a")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.open_media",defaultMessage:"to open media"}))))),o("table",{},void 0,o("thead",{},void 0,o("tr",{},void 0,o("th",{className:"pb-2 font-bold"},void 0,o(t,{id:"keyboard_shortcuts.hotkey",defaultMessage:"Hotkey"})))),o("tbody",{},void 0,a.spoilers&&o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"x")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.toggle_hidden",defaultMessage:"to show/hide text behind CW"}))),a.spoilers&&o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"h")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.toggle_sensitivity",defaultMessage:"to show/hide media"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"up"),", ",o(e,{},void 0,"k")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.up",defaultMessage:"to move up in the list"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"down"),", ",o(e,{},void 0,"j")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.down",defaultMessage:"to move down in the list"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"n")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.compose",defaultMessage:"to open the compose textarea"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"alt")," + ",o(e,{},void 0,"n")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.toot",defaultMessage:"to start a new post"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"backspace")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.back",defaultMessage:"to navigate back"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"s"),", ",o(e,{},void 0,"/")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.search",defaultMessage:"to focus search"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"esc")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.unfocus",defaultMessage:"to un-focus compose textarea/search"}))))),o("table",{},void 0,o("thead",{},void 0,o("tr",{},void 0,o("th",{className:"pb-2 font-bold"},void 0,o(t,{id:"keyboard_shortcuts.hotkey",defaultMessage:"Hotkey"})))),o("tbody",{},void 0,o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"g")," + ",o(e,{},void 0,"h")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.home",defaultMessage:"to open home timeline"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"g")," + ",o(e,{},void 0,"n")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.notifications",defaultMessage:"to open notifications column"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"g")," + ",o(e,{},void 0,"f")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.favourites",defaultMessage:"to open likes list"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"g")," + ",o(e,{},void 0,"p")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.pinned",defaultMessage:"to open pinned posts list"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"g")," + ",o(e,{},void 0,"u")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.my_profile",defaultMessage:"to open your profile"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"g")," + ",o(e,{},void 0,"b")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.blocked",defaultMessage:"to open blocked users list"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"g")," + ",o(e,{},void 0,"m")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.muted",defaultMessage:"to open muted users list"}))),a.followRequests&&o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"g")," + ",o(e,{},void 0,"r")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.requests",defaultMessage:"to open follow requests list"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"?")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.legend",defaultMessage:"to display this legend"})))))))};export{c as default}; +import{g as v,a as o,F as t,bu as l}from"../index-be605fd2.js";var e=function(i){var s=i.children;return o("kbd",{className:"rounded-md border border-solid border-primary-200 bg-primary-50 px-1.5 py-1 font-sans text-xs dark:border-gray-700 dark:bg-gray-800"},void 0,s)},d=function(i){var s=i.children;return o("td",{className:"px-2 pb-3"},void 0,s)},c=function(i){var s=i.onClose,a=v();return o(l,{title:o(t,{id:"keyboard_shortcuts.heading",defaultMessage:"Keyboard shortcuts"}),onClose:s,width:"4xl"},void 0,o("div",{className:"flex flex-col text-xs lg:flex-row"},void 0,o("table",{},void 0,o("thead",{},void 0,o("tr",{},void 0,o("th",{className:"pb-2 font-bold"},void 0,o(t,{id:"keyboard_shortcuts.hotkey",defaultMessage:"Hotkey"})))),o("tbody",{},void 0,o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"r")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.reply",defaultMessage:"to reply"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"m")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.mention",defaultMessage:"to mention author"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"p")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.profile",defaultMessage:"to open author's profile"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"f")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.favourite",defaultMessage:"to like"}))),a.emojiReacts&&o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"e")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.react",defaultMessage:"to react"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"b")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.boost",defaultMessage:"to repost"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"enter"),", ",o(e,{},void 0,"o")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.enter",defaultMessage:"to open post"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"a")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.open_media",defaultMessage:"to open media"}))))),o("table",{},void 0,o("thead",{},void 0,o("tr",{},void 0,o("th",{className:"pb-2 font-bold"},void 0,o(t,{id:"keyboard_shortcuts.hotkey",defaultMessage:"Hotkey"})))),o("tbody",{},void 0,a.spoilers&&o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"x")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.toggle_hidden",defaultMessage:"to show/hide text behind CW"}))),a.spoilers&&o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"h")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.toggle_sensitivity",defaultMessage:"to show/hide media"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"up"),", ",o(e,{},void 0,"k")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.up",defaultMessage:"to move up in the list"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"down"),", ",o(e,{},void 0,"j")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.down",defaultMessage:"to move down in the list"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"n")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.compose",defaultMessage:"to open the compose textarea"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"alt")," + ",o(e,{},void 0,"n")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.toot",defaultMessage:"to start a new post"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"backspace")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.back",defaultMessage:"to navigate back"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"s"),", ",o(e,{},void 0,"/")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.search",defaultMessage:"to focus search"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"esc")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.unfocus",defaultMessage:"to un-focus compose textarea/search"}))))),o("table",{},void 0,o("thead",{},void 0,o("tr",{},void 0,o("th",{className:"pb-2 font-bold"},void 0,o(t,{id:"keyboard_shortcuts.hotkey",defaultMessage:"Hotkey"})))),o("tbody",{},void 0,o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"g")," + ",o(e,{},void 0,"h")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.home",defaultMessage:"to open home timeline"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"g")," + ",o(e,{},void 0,"n")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.notifications",defaultMessage:"to open notifications column"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"g")," + ",o(e,{},void 0,"f")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.favourites",defaultMessage:"to open likes list"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"g")," + ",o(e,{},void 0,"p")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.pinned",defaultMessage:"to open pinned posts list"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"g")," + ",o(e,{},void 0,"u")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.my_profile",defaultMessage:"to open your profile"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"g")," + ",o(e,{},void 0,"b")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.blocked",defaultMessage:"to open blocked users list"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"g")," + ",o(e,{},void 0,"m")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.muted",defaultMessage:"to open muted users list"}))),a.followRequests&&o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"g")," + ",o(e,{},void 0,"r")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.requests",defaultMessage:"to open follow requests list"}))),o("tr",{},void 0,o(d,{},void 0,o(e,{},void 0,"?")),o(d,{},void 0,o(t,{id:"keyboard_shortcuts.legend",defaultMessage:"to display this legend"})))))))};export{c as default}; diff --git a/packs/js/index-fbc91b1f.js b/packs/js/index-00fe90fc.js similarity index 69% rename from packs/js/index-fbc91b1f.js rename to packs/js/index-00fe90fc.js index 354bfafbe..a92e53861 100644 --- a/packs/js/index-fbc91b1f.js +++ b/packs/js/index-00fe90fc.js @@ -1 +1 @@ -import{Q as p,aJ as f,d as k,u as c,q as o,R as h,aK as n,a,X as g,o as v,F as b}from"../index-7380452a.js";import{P as M}from"./pull-to-refresh-b8beecbe.js";import{S as y}from"./status-list-13fdd81b.js";import"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";import"./status-container-59e57baf.js";import"./pending-status-7f660229.js";import"./poll-preview-66340c9e.js";import"./noop-19c18e1e.js";var R=v({heading:{id:"column.bookmarks",defaultMessage:"Bookmarks"}}),L=p(function(t){t(f())},300,{leading:!0}),P=function(){var s=k(),i=c(),u=o(function(e){return e.status_lists.get("bookmarks").items}),r=o(function(e){return e.status_lists.get("bookmarks").isLoading}),m=o(function(e){return!!e.status_lists.get("bookmarks").next});h.useEffect(function(){s(n())},[]);var d=function(){return s(n())},l=a(b,{id:"empty_column.bookmarks",defaultMessage:"You don't have any bookmarks yet. When you add one, it will show up here."});return a(g,{label:i.formatMessage(R.heading),transparent:!0},void 0,a(M,{onRefresh:d},void 0,a(y,{statusIds:u,scrollKey:"bookmarked_statuses",hasMore:m,isLoading:typeof r=="boolean"?r:!0,onLoadMore:function(){return L(s)},emptyMessage:l,divideType:"space"})))};export{P as default}; +import{Q as p,aJ as f,d as k,u as c,q as o,R as h,aK as n,a,X as g,o as v,F as b}from"../index-be605fd2.js";import{P as M}from"./pull-to-refresh-a7e092ab.js";import{S as y}from"./status-list-c10445e1.js";import"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";import"./status-container-e53698d2.js";import"./pending-status-959f7aeb.js";import"./poll-preview-ddaf662b.js";import"./noop-3f99ae3e.js";var R=v({heading:{id:"column.bookmarks",defaultMessage:"Bookmarks"}}),L=p(function(t){t(f())},300,{leading:!0}),P=function(){var s=k(),i=c(),u=o(function(e){return e.status_lists.get("bookmarks").items}),r=o(function(e){return e.status_lists.get("bookmarks").isLoading}),m=o(function(e){return!!e.status_lists.get("bookmarks").next});h.useEffect(function(){s(n())},[]);var d=function(){return s(n())},l=a(b,{id:"empty_column.bookmarks",defaultMessage:"You don't have any bookmarks yet. When you add one, it will show up here."});return a(g,{label:i.formatMessage(R.heading),transparent:!0},void 0,a(M,{onRefresh:d},void 0,a(y,{statusIds:u,scrollKey:"bookmarked_statuses",hasMore:m,isLoading:typeof r=="boolean"?r:!0,onLoadMore:function(){return L(s)},emptyMessage:l,divideType:"space"})))};export{P as default}; diff --git a/packs/js/index-ff8b63a3.js b/packs/js/index-0b097d9d.js similarity index 89% rename from packs/js/index-ff8b63a3.js rename to packs/js/index-0b097d9d.js index 48185cfd5..1325e4b8e 100644 --- a/packs/js/index-ff8b63a3.js +++ b/packs/js/index-0b097d9d.js @@ -1 +1 @@ -import{M as p,d as v,u as h,q as y,r as M,aE as C,a as e,aB as L,X as d,L as k,I as x,aF as _,aG as u,J as D,aH as w,o as I,aD as c,aI as N,F as E}from"../index-7380452a.js";import{S as R}from"./scrollable-list-df58e451.js";import{N as b}from"./new-list-form-085135e5.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var r=I({heading:{id:"column.lists",defaultMessage:"Lists"},subheading:{id:"lists.subheading",defaultMessage:"Your lists"},add:{id:"lists.new.create",defaultMessage:"Add list"},deleteHeading:{id:"confirmations.delete_list.heading",defaultMessage:"Delete list"},deleteMessage:{id:"confirmations.delete_list.message",defaultMessage:"Are you sure you want to permanently delete this list?"},deleteConfirm:{id:"confirmations.delete_list.confirm",defaultMessage:"Delete"},editList:{id:"lists.edit",defaultMessage:"Edit list"},deleteList:{id:"lists.delete",defaultMessage:"Delete list"}}),S=p([function(i){return i.lists}],function(i){return i&&i.toList().filter(function(a){return!!a}).sort(function(a,s){return a.get("title").localeCompare(s.get("title"))})}),B=function(){var a=v(),s=h(),o=y(function(t){return S(t)});if(M.useEffect(function(){a(C())},[]),!o)return e(d,{},void 0,e(L,{}));var g=function(n){return function(l){l.preventDefault(),a(c("LIST_EDITOR",{listId:n}))}},f=function(n){return function(l){l.preventDefault(),a(c("CONFIRM",{heading:s.formatMessage(r.deleteHeading),message:s.formatMessage(r.deleteMessage),confirm:s.formatMessage(r.deleteConfirm),onConfirm:function(){a(N(n))}}))}},m=e(E,{id:"empty_column.lists",defaultMessage:"You don't have any lists yet. When you create one, it will show up here."});return e(d,{label:s.formatMessage(r.heading)},void 0,e("div",{className:"space-y-4"},void 0,e(b,{}),e(R,{scrollKey:"lists",emptyMessage:m,itemClassName:"py-2"},void 0,o.map(function(t){return e(k,{to:"/list/".concat(t.id),className:"flex items-center gap-1.5 rounded-lg p-2 text-gray-900 hover:bg-gray-100 dark:text-gray-100 dark:hover:bg-gray-800"},t.id,e(x,{src:_}),e("span",{className:"grow"},void 0,t.title),e(u,{iconClassName:"h-5 w-5 text-gray-700 hover:text-gray-800 dark:text-gray-600 dark:hover:text-gray-500",src:D,onClick:g(t.id),title:s.formatMessage(r.editList)}),e(u,{iconClassName:"h-5 w-5 text-gray-700 hover:text-gray-800 dark:text-gray-600 dark:hover:text-gray-500",src:w,onClick:f(t.id),title:s.formatMessage(r.deleteList)}))}))))};export{B as default}; +import{M as p,d as v,u as h,q as y,r as M,aE as C,a as e,aB as L,X as d,L as k,I as x,aF as _,aG as u,J as D,aH as w,o as I,aD as c,aI as N,F as E}from"../index-be605fd2.js";import{S as R}from"./scrollable-list-1e43c72d.js";import{N as b}from"./new-list-form-396f644a.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var r=I({heading:{id:"column.lists",defaultMessage:"Lists"},subheading:{id:"lists.subheading",defaultMessage:"Your lists"},add:{id:"lists.new.create",defaultMessage:"Add list"},deleteHeading:{id:"confirmations.delete_list.heading",defaultMessage:"Delete list"},deleteMessage:{id:"confirmations.delete_list.message",defaultMessage:"Are you sure you want to permanently delete this list?"},deleteConfirm:{id:"confirmations.delete_list.confirm",defaultMessage:"Delete"},editList:{id:"lists.edit",defaultMessage:"Edit list"},deleteList:{id:"lists.delete",defaultMessage:"Delete list"}}),S=p([function(i){return i.lists}],function(i){return i&&i.toList().filter(function(a){return!!a}).sort(function(a,s){return a.get("title").localeCompare(s.get("title"))})}),B=function(){var a=v(),s=h(),o=y(function(t){return S(t)});if(M.useEffect(function(){a(C())},[]),!o)return e(d,{},void 0,e(L,{}));var g=function(n){return function(l){l.preventDefault(),a(c("LIST_EDITOR",{listId:n}))}},f=function(n){return function(l){l.preventDefault(),a(c("CONFIRM",{heading:s.formatMessage(r.deleteHeading),message:s.formatMessage(r.deleteMessage),confirm:s.formatMessage(r.deleteConfirm),onConfirm:function(){a(N(n))}}))}},m=e(E,{id:"empty_column.lists",defaultMessage:"You don't have any lists yet. When you create one, it will show up here."});return e(d,{label:s.formatMessage(r.heading)},void 0,e("div",{className:"space-y-4"},void 0,e(b,{}),e(R,{scrollKey:"lists",emptyMessage:m,itemClassName:"py-2"},void 0,o.map(function(t){return e(k,{to:"/list/".concat(t.id),className:"flex items-center gap-1.5 rounded-lg p-2 text-gray-900 hover:bg-gray-100 dark:text-gray-100 dark:hover:bg-gray-800"},t.id,e(x,{src:_}),e("span",{className:"grow"},void 0,t.title),e(u,{iconClassName:"h-5 w-5 text-gray-700 hover:text-gray-800 dark:text-gray-600 dark:hover:text-gray-500",src:D,onClick:g(t.id),title:s.formatMessage(r.editList)}),e(u,{iconClassName:"h-5 w-5 text-gray-700 hover:text-gray-800 dark:text-gray-600 dark:hover:text-gray-500",src:w,onClick:f(t.id),title:s.formatMessage(r.deleteList)}))}))))};export{B as default}; diff --git a/packs/js/index-2dd95a59.js b/packs/js/index-1086304d.js similarity index 79% rename from packs/js/index-2dd95a59.js rename to packs/js/index-1086304d.js index e1c359244..b6c24aec8 100644 --- a/packs/js/index-2dd95a59.js +++ b/packs/js/index-1086304d.js @@ -1 +1 @@ -import{a3 as y,u as M,d as T,t as E,f as w,q as B,r as P,a4 as r,a as e,F as s,a5 as k,L as R,X as I,o as L,a6 as u}from"../index-7380452a.js";import{A as F}from"./accordion-9597afee.js";import{P as S}from"./pull-to-refresh-b8beecbe.js";import{P as A}from"./pinned-hosts-picker-5815755c.js";import{T as $}from"./timeline-585cfcf0.js";import"./dots-vertical-68cbc8e2.js";import"./scroll-top-button-95820d24.js";import"./status-list-13fdd81b.js";import"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";import"./status-container-59e57baf.js";import"./pending-status-7f660229.js";import"./poll-preview-66340c9e.js";import"./noop-19c18e1e.js";function C({onlyMedia:n}={}){return y(`public${n?":media":""}`,`public${n?":media":""}`)}var c=L({title:{id:"column.public",defaultMessage:"Fediverse timeline"},dismiss:{id:"fediverse_tab.explanation_box.dismiss",defaultMessage:"Don't show again"}}),V=function(){var m=M(),i=T(),d=E(),l=w(),a=!!l.getIn(["public","other","onlyMedia"],!1),f=B(function(o){var t;return(t=o.timelines.get("public"))===null||t===void 0?void 0:t.next}),p="public",v=l.get("explanationBox"),h=l.get("showExplanationBox"),x=function(){i(u(["showExplanationBox"],!1))},g=function(t){i(u(["explanationBox"],t))},b=function(t){i(r({url:f,maxId:t,onlyMedia:a}))},_=function(){return i(r({onlyMedia:a}))};return C({onlyMedia:a}),P.useEffect(function(){i(r({onlyMedia:a}))},[a]),e(I,{className:"-mt-3 sm:mt-0",label:m.formatMessage(c.title),transparent:!0},void 0,e(A,{}),h&&e("div",{className:"mb-4"},void 0,e(F,{headline:e(s,{id:"fediverse_tab.explanation_box.title",defaultMessage:"What is the Fediverse?"}),action:x,actionIcon:k,actionLabel:m.formatMessage(c.dismiss),expanded:v,onToggle:g},void 0,e(s,{id:"fediverse_tab.explanation_box.explanation",defaultMessage:`{site_title} is part of the Fediverse, a social network made up of thousands of independent social media sites (aka "servers"). The posts you see here are from 3rd-party servers. You have the freedom to engage with them, or to block any server you don't like. Pay attention to the full username after the second @ symbol to know which server a post is from. To see only {site_title} posts, visit {local}.`,values:{site_title:d.title,local:e(R,{to:"/timeline/local"},void 0,e(s,{id:"empty_column.home.local_tab",defaultMessage:"the {site_title} tab",values:{site_title:d.title}}))}}))),e(S,{onRefresh:_},void 0,e($,{scrollKey:"".concat(p,"_timeline"),timelineId:"".concat(p).concat(a?":media":""),prefix:"home",onLoadMore:b,emptyMessage:e(s,{id:"empty_column.public",defaultMessage:"There is nothing here! Write something publicly, or manually follow users from other servers to fill it up"}),divideType:"space"})))};export{V as default}; +import{a3 as y,u as M,d as T,t as E,f as w,q as B,r as P,a4 as r,a as e,F as s,a5 as k,L as R,X as I,o as L,a6 as u}from"../index-be605fd2.js";import{A as F}from"./accordion-0fbf6d28.js";import{P as S}from"./pull-to-refresh-a7e092ab.js";import{P as A}from"./pinned-hosts-picker-55861ba6.js";import{T as $}from"./timeline-456dace7.js";import"./dots-vertical-68cbc8e2.js";import"./scroll-top-button-73ec9889.js";import"./status-list-c10445e1.js";import"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";import"./status-container-e53698d2.js";import"./pending-status-959f7aeb.js";import"./poll-preview-ddaf662b.js";import"./noop-3f99ae3e.js";function C({onlyMedia:n}={}){return y(`public${n?":media":""}`,`public${n?":media":""}`)}var c=L({title:{id:"column.public",defaultMessage:"Fediverse timeline"},dismiss:{id:"fediverse_tab.explanation_box.dismiss",defaultMessage:"Don't show again"}}),V=function(){var m=M(),i=T(),d=E(),l=w(),a=!!l.getIn(["public","other","onlyMedia"],!1),f=B(function(o){var t;return(t=o.timelines.get("public"))===null||t===void 0?void 0:t.next}),p="public",v=l.get("explanationBox"),h=l.get("showExplanationBox"),x=function(){i(u(["showExplanationBox"],!1))},g=function(t){i(u(["explanationBox"],t))},b=function(t){i(r({url:f,maxId:t,onlyMedia:a}))},_=function(){return i(r({onlyMedia:a}))};return C({onlyMedia:a}),P.useEffect(function(){i(r({onlyMedia:a}))},[a]),e(I,{className:"-mt-3 sm:mt-0",label:m.formatMessage(c.title),transparent:!0},void 0,e(A,{}),h&&e("div",{className:"mb-4"},void 0,e(F,{headline:e(s,{id:"fediverse_tab.explanation_box.title",defaultMessage:"What is the Fediverse?"}),action:x,actionIcon:k,actionLabel:m.formatMessage(c.dismiss),expanded:v,onToggle:g},void 0,e(s,{id:"fediverse_tab.explanation_box.explanation",defaultMessage:`{site_title} is part of the Fediverse, a social network made up of thousands of independent social media sites (aka "servers"). The posts you see here are from 3rd-party servers. You have the freedom to engage with them, or to block any server you don't like. Pay attention to the full username after the second @ symbol to know which server a post is from. To see only {site_title} posts, visit {local}.`,values:{site_title:d.title,local:e(R,{to:"/timeline/local"},void 0,e(s,{id:"empty_column.home.local_tab",defaultMessage:"the {site_title} tab",values:{site_title:d.title}}))}}))),e(S,{onRefresh:_},void 0,e($,{scrollKey:"".concat(p,"_timeline"),timelineId:"".concat(p).concat(a?":media":""),prefix:"home",onLoadMore:b,emptyMessage:e(s,{id:"empty_column.public",defaultMessage:"There is nothing here! Write something publicly, or manually follow users from other servers to fill it up"}),divideType:"space"})))};export{V as default}; diff --git a/packs/js/index-66aa4115.js b/packs/js/index-194f1846.js similarity index 94% rename from packs/js/index-66aa4115.js rename to packs/js/index-194f1846.js index 7cb48df05..a1d202704 100644 --- a/packs/js/index-66aa4115.js +++ b/packs/js/index-194f1846.js @@ -1 +1 @@ -import{u as w,d as y,a7 as b,g as F,q as x,r as D,bz as u,a as e,a2 as c,y as r,F as i,H as n,bA as C,aa as d,X as E,o as k,bB as N,bp as H}from"../index-7380452a.js";import{S}from"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var a=k({heading:{id:"column.filters",defaultMessage:"Muted words"},home_timeline:{id:"column.filters.home_timeline",defaultMessage:"Home timeline"},public_timeline:{id:"column.filters.public_timeline",defaultMessage:"Public timeline"},notifications:{id:"column.filters.notifications",defaultMessage:"Notifications"},conversations:{id:"column.filters.conversations",defaultMessage:"Conversations"},accounts:{id:"column.filters.accounts",defaultMessage:"Accounts"},delete_error:{id:"column.filters.delete_error",defaultMessage:"Error deleting filter"},edit:{id:"column.filters.edit",defaultMessage:"Edit"},delete:{id:"column.filters.delete",defaultMessage:"Delete"}}),f={home:a.home_timeline,public:a.public_timeline,notifications:a.notifications,thread:a.conversations,account:a.accounts},B=function(){var l=w(),o=y(),m=b(),p=F(),g=p.filtersV2,h=x(function(t){return t.filters}),_=function(s){return function(){return m.push("/filters/".concat(s))}},v=function(s){return function(){o(N(s)).then(function(){return o(u(!0))}).catch(function(){H.error(l.formatMessage(a.delete_error))})}};D.useEffect(function(){o(u(!0))},[]);var M=e(i,{id:"empty_column.filters",defaultMessage:"You haven't created any muted words yet."});return e(E,{className:"filter-settings-panel",label:l.formatMessage(a.heading)},void 0,e(n,{className:"mb-4",space:2,justifyContent:"end"},void 0,e(d,{to:"/filters/new",theme:"primary",size:"sm"},void 0,e(i,{id:"filters.create_filter",defaultMessage:"Create filter"}))),e(S,{scrollKey:"filters",emptyMessage:M,itemClassName:"pb-4 last:pb-0"},void 0,h.map(function(t){return e("div",{className:"rounded-lg bg-gray-100 p-4 dark:bg-primary-800"},t.id,e(c,{space:2},void 0,e(c,{className:"grow",space:1},void 0,e(r,{weight:"medium"},void 0,e(i,{id:"filters.filters_list_phrases_label",defaultMessage:"Keywords or phrases:"})," ",e(r,{theme:"muted",tag:"span"},void 0,t.keywords.map(function(s){return s.keyword}).join(", "))),e(r,{weight:"medium"},void 0,e(i,{id:"filters.filters_list_context_label",defaultMessage:"Filter contexts:"})," ",e(r,{theme:"muted",tag:"span"},void 0,t.context.map(function(s){return f[s]?l.formatMessage(f[s]):s}).join(", "))),e(n,{space:4,wrap:!0},void 0,e(r,{weight:"medium"},void 0,g?t.filter_action==="hide"?e(i,{id:"filters.filters_list_hide_completely",defaultMessage:"Hide content"}):e(i,{id:"filters.filters_list_warn",defaultMessage:"Display warning"}):t.filter_action==="hide"?e(i,{id:"filters.filters_list_drop",defaultMessage:"Drop"}):e(i,{id:"filters.filters_list_hide",defaultMessage:"Hide"})),t.expires_at&&e(r,{weight:"medium"},void 0,new Date(t.expires_at).getTime()<=Date.now()?e(i,{id:"filters.filters_list_expired",defaultMessage:"Expired"}):e(C,{timestamp:t.expires_at,className:"whitespace-nowrap",futureDate:!0})))),e(n,{space:2,justifyContent:"end"},void 0,e(d,{theme:"primary",onClick:_(t.id)},void 0,l.formatMessage(a.edit)),e(d,{theme:"danger",onClick:v(t.id)},void 0,l.formatMessage(a.delete)))))})))};export{B as default}; +import{u as w,d as y,a7 as b,g as F,q as x,r as D,bz as u,a as e,a2 as c,y as r,F as i,H as n,bA as C,aa as d,X as E,o as k,bB as N,bp as H}from"../index-be605fd2.js";import{S}from"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var a=k({heading:{id:"column.filters",defaultMessage:"Muted words"},home_timeline:{id:"column.filters.home_timeline",defaultMessage:"Home timeline"},public_timeline:{id:"column.filters.public_timeline",defaultMessage:"Public timeline"},notifications:{id:"column.filters.notifications",defaultMessage:"Notifications"},conversations:{id:"column.filters.conversations",defaultMessage:"Conversations"},accounts:{id:"column.filters.accounts",defaultMessage:"Accounts"},delete_error:{id:"column.filters.delete_error",defaultMessage:"Error deleting filter"},edit:{id:"column.filters.edit",defaultMessage:"Edit"},delete:{id:"column.filters.delete",defaultMessage:"Delete"}}),f={home:a.home_timeline,public:a.public_timeline,notifications:a.notifications,thread:a.conversations,account:a.accounts},B=function(){var l=w(),o=y(),m=b(),p=F(),g=p.filtersV2,h=x(function(t){return t.filters}),_=function(s){return function(){return m.push("/filters/".concat(s))}},v=function(s){return function(){o(N(s)).then(function(){return o(u(!0))}).catch(function(){H.error(l.formatMessage(a.delete_error))})}};D.useEffect(function(){o(u(!0))},[]);var M=e(i,{id:"empty_column.filters",defaultMessage:"You haven't created any muted words yet."});return e(E,{className:"filter-settings-panel",label:l.formatMessage(a.heading)},void 0,e(n,{className:"mb-4",space:2,justifyContent:"end"},void 0,e(d,{to:"/filters/new",theme:"primary",size:"sm"},void 0,e(i,{id:"filters.create_filter",defaultMessage:"Create filter"}))),e(S,{scrollKey:"filters",emptyMessage:M,itemClassName:"pb-4 last:pb-0"},void 0,h.map(function(t){return e("div",{className:"rounded-lg bg-gray-100 p-4 dark:bg-primary-800"},t.id,e(c,{space:2},void 0,e(c,{className:"grow",space:1},void 0,e(r,{weight:"medium"},void 0,e(i,{id:"filters.filters_list_phrases_label",defaultMessage:"Keywords or phrases:"})," ",e(r,{theme:"muted",tag:"span"},void 0,t.keywords.map(function(s){return s.keyword}).join(", "))),e(r,{weight:"medium"},void 0,e(i,{id:"filters.filters_list_context_label",defaultMessage:"Filter contexts:"})," ",e(r,{theme:"muted",tag:"span"},void 0,t.context.map(function(s){return f[s]?l.formatMessage(f[s]):s}).join(", "))),e(n,{space:4,wrap:!0},void 0,e(r,{weight:"medium"},void 0,g?t.filter_action==="hide"?e(i,{id:"filters.filters_list_hide_completely",defaultMessage:"Hide content"}):e(i,{id:"filters.filters_list_warn",defaultMessage:"Display warning"}):t.filter_action==="hide"?e(i,{id:"filters.filters_list_drop",defaultMessage:"Drop"}):e(i,{id:"filters.filters_list_hide",defaultMessage:"Hide"})),t.expires_at&&e(r,{weight:"medium"},void 0,new Date(t.expires_at).getTime()<=Date.now()?e(i,{id:"filters.filters_list_expired",defaultMessage:"Expired"}):e(C,{timestamp:t.expires_at,className:"whitespace-nowrap",futureDate:!0})))),e(n,{space:2,justifyContent:"end"},void 0,e(d,{theme:"primary",onClick:_(t.id)},void 0,l.formatMessage(a.edit)),e(d,{theme:"danger",onClick:v(t.id)},void 0,l.formatMessage(a.delete)))))})))};export{B as default}; diff --git a/packs/js/index-5bcfa526.js b/packs/js/index-1a285129.js similarity index 96% rename from packs/js/index-5bcfa526.js rename to packs/js/index-1a285129.js index fb7d8bf4d..9c8a122d7 100644 --- a/packs/js/index-5bcfa526.js +++ b/packs/js/index-1a285129.js @@ -1 +1 @@ -import{a as e,a2 as E,y as C,eV as c,eW as p,r as f,at as _,a$ as w,A as h,kj as N,kk as M,aL as L,q as l,kl as I,L as j,u as S,d as P,km as R,kn as z,H as T,cy as k,F as v,aa as A,X as H,a_ as y,eL as q,o as F,aD as V}from"../index-7380452a.js";import{R as B}from"./index-571dd45e.js";import"./warning-07d0fac9.js";var D=function(){var s=p(5,25),t=p(5,15);return e("div",{className:"relative w-full animate-pulse overflow-hidden rounded-lg bg-gray-100 text-primary-50 dark:bg-primary-800 dark:text-primary-800"},void 0,e("div",{className:"h-40 bg-primary-200 dark:bg-gray-600"}),e(E,{className:"p-2.5",space:2},void 0,e(C,{weight:"semibold"},void 0,c(s)),e("div",{className:"flex flex-wrap gap-x-2 gap-y-1 text-gray-700 dark:text-gray-600"},void 0,e("span",{},void 0,c(t)),e("span",{},void 0,c(t)),e("span",{},void 0,c(t)))))},J=function(s){var t=s.id,r=f.useCallback(L(),[]),n=l(function(o){return r(o,{id:t})});return n?e(j,{className:"w-full px-1",to:"/@".concat(n.getIn(["account","acct"]),"/events/").concat(n.id)},void 0,e(I,{status:n,floatingAction:!1})):null},b=function(s){var t=s.statusIds,r=s.isLoading,n=s.emptyMessage,o=f.useState(0),u=_(o,2),i=u[0],a=u[1],g=function(x){a(x%t.size)};return t.size===0?r?e(D,{}):e(w,{variant:"rounded",size:"lg"},void 0,n):e("div",{className:"relative -mx-1"},void 0,i!==0&&e("div",{className:"absolute left-3 top-1/2 z-10 -mt-4"},void 0,e("button",{onClick:function(){return g(i-1)},className:"flex h-8 w-8 items-center justify-center rounded-full bg-white/50 backdrop-blur dark:bg-gray-900/50"},void 0,e(h,{src:M,className:"h-6 w-6 text-black dark:text-white"}))),e(B,{animateHeight:!0,index:i,onChangeIndex:g},void 0,t.map(function(d){return e(J,{id:d},d)})),i!==t.size-1&&e("div",{className:"absolute right-3 top-1/2 z-10 -mt-4"},void 0,e("button",{onClick:function(){return g(i+1)},className:"flex h-8 w-8 items-center justify-center rounded-full bg-white/50 backdrop-blur dark:bg-gray-900/50"},void 0,e(h,{src:N,className:"h-6 w-6 text-black dark:text-white"}))))},O=F({title:{id:"column.events",defaultMessage:"Events"}}),Y=function(){var s=S(),t=P(),r=l(function(a){return a.status_lists.get("recent_events").items}),n=l(function(a){return a.status_lists.get("recent_events").isLoading}),o=l(function(a){return a.status_lists.get("joined_events").items}),u=l(function(a){return a.status_lists.get("joined_events").isLoading}),i=function(){t(V("COMPOSE_EVENT"))};return f.useEffect(function(){t(R()),t(z())},[]),e(H,{label:s.formatMessage(O.title)},void 0,e(T,{className:"mb-2",space:2,justifyContent:"between"},void 0,e(k,{title:e(v,{id:"events.recent_events",defaultMessage:"Recent events"})}),e(A,{className:"ml-auto xl:hidden",theme:"primary",size:"sm",onClick:i},void 0,e(v,{id:"events.create_event",defaultMessage:"Create event"}))),e(y,{className:"mb-2"},void 0,e(b,{statusIds:r,isLoading:n,emptyMessage:e(v,{id:"events.recent_events.empty",defaultMessage:"There are no public events yet."})})),e(q,{className:"mb-2"},void 0,e(k,{title:e(v,{id:"events.joined_events",defaultMessage:"Joined events"})})),e(y,{},void 0,e(b,{statusIds:o,isLoading:u,emptyMessage:e(v,{id:"events.joined_events.empty",defaultMessage:"You haven't joined any event yet."})})))};export{Y as default}; +import{a as e,a2 as E,y as C,eV as c,eW as p,r as f,at as _,a$ as w,A as h,kj as N,kk as M,aL as L,q as l,kl as I,L as j,u as S,d as P,km as R,kn as z,H as T,cy as k,F as v,aa as A,X as H,a_ as y,eL as q,o as F,aD as V}from"../index-be605fd2.js";import{R as B}from"./index-3399e540.js";import"./warning-07d0fac9.js";var D=function(){var s=p(5,25),t=p(5,15);return e("div",{className:"relative w-full animate-pulse overflow-hidden rounded-lg bg-gray-100 text-primary-50 dark:bg-primary-800 dark:text-primary-800"},void 0,e("div",{className:"h-40 bg-primary-200 dark:bg-gray-600"}),e(E,{className:"p-2.5",space:2},void 0,e(C,{weight:"semibold"},void 0,c(s)),e("div",{className:"flex flex-wrap gap-x-2 gap-y-1 text-gray-700 dark:text-gray-600"},void 0,e("span",{},void 0,c(t)),e("span",{},void 0,c(t)),e("span",{},void 0,c(t)))))},J=function(s){var t=s.id,r=f.useCallback(L(),[]),n=l(function(o){return r(o,{id:t})});return n?e(j,{className:"w-full px-1",to:"/@".concat(n.getIn(["account","acct"]),"/events/").concat(n.id)},void 0,e(I,{status:n,floatingAction:!1})):null},b=function(s){var t=s.statusIds,r=s.isLoading,n=s.emptyMessage,o=f.useState(0),u=_(o,2),i=u[0],a=u[1],g=function(x){a(x%t.size)};return t.size===0?r?e(D,{}):e(w,{variant:"rounded",size:"lg"},void 0,n):e("div",{className:"relative -mx-1"},void 0,i!==0&&e("div",{className:"absolute left-3 top-1/2 z-10 -mt-4"},void 0,e("button",{onClick:function(){return g(i-1)},className:"flex h-8 w-8 items-center justify-center rounded-full bg-white/50 backdrop-blur dark:bg-gray-900/50"},void 0,e(h,{src:M,className:"h-6 w-6 text-black dark:text-white"}))),e(B,{animateHeight:!0,index:i,onChangeIndex:g},void 0,t.map(function(d){return e(J,{id:d},d)})),i!==t.size-1&&e("div",{className:"absolute right-3 top-1/2 z-10 -mt-4"},void 0,e("button",{onClick:function(){return g(i+1)},className:"flex h-8 w-8 items-center justify-center rounded-full bg-white/50 backdrop-blur dark:bg-gray-900/50"},void 0,e(h,{src:N,className:"h-6 w-6 text-black dark:text-white"}))))},O=F({title:{id:"column.events",defaultMessage:"Events"}}),Y=function(){var s=S(),t=P(),r=l(function(a){return a.status_lists.get("recent_events").items}),n=l(function(a){return a.status_lists.get("recent_events").isLoading}),o=l(function(a){return a.status_lists.get("joined_events").items}),u=l(function(a){return a.status_lists.get("joined_events").isLoading}),i=function(){t(V("COMPOSE_EVENT"))};return f.useEffect(function(){t(R()),t(z())},[]),e(H,{label:s.formatMessage(O.title)},void 0,e(T,{className:"mb-2",space:2,justifyContent:"between"},void 0,e(k,{title:e(v,{id:"events.recent_events",defaultMessage:"Recent events"})}),e(A,{className:"ml-auto xl:hidden",theme:"primary",size:"sm",onClick:i},void 0,e(v,{id:"events.create_event",defaultMessage:"Create event"}))),e(y,{className:"mb-2"},void 0,e(b,{statusIds:r,isLoading:n,emptyMessage:e(v,{id:"events.recent_events.empty",defaultMessage:"There are no public events yet."})})),e(q,{className:"mb-2"},void 0,e(k,{title:e(v,{id:"events.joined_events",defaultMessage:"Joined events"})})),e(y,{},void 0,e(b,{statusIds:o,isLoading:u,emptyMessage:e(v,{id:"events.joined_events.empty",defaultMessage:"You haven't joined any event yet."})})))};export{Y as default}; diff --git a/packs/js/index-acec8e9a.js b/packs/js/index-245fef5c.js similarity index 95% rename from packs/js/index-acec8e9a.js rename to packs/js/index-245fef5c.js index bfaefc7f9..62410ba35 100644 --- a/packs/js/index-acec8e9a.js +++ b/packs/js/index-245fef5c.js @@ -1 +1 @@ -import{u as T,d as A,g as q,R as n,at as p,_ as j,fi as G,bp as _,a as s,bE as H,bF as m,bG as g,fj as N,bI as V,aa as M,X as B,o as K}from"../index-7380452a.js";import"./es.promise.finally-9155a4db.js";function O(r,e){var a=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter(function(d){return Object.getOwnPropertyDescriptor(r,d).enumerable})),a.push.apply(a,t)}return a}function C(r){for(var e=1;et in p?ft(p,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):p[t]=o;var z=(p,t,o)=>(mt(p,typeof t!="symbol"?t+"":t,o),o);import{v as ht}from"./download-ac53125a.js";import{u as gt,r as i,at as y,Q as _t,cl as ne,R as M,W as G,a as s,I as X,dx as yt,dy as pt,dk as bt,o as wt}from"../index-7380452a.js";import{v as Mt}from"./volume-08f8a8f1.js";import{g as Ae,v as Ct,f as Ie}from"./index-486dc940.js";import"./arrows-minimize-7c27a12c.js";import"./web.url.constructor-8f9eaf9c.js";import"./object-assign-7ac9a0a3.js";import"./es.array.last-index-of-ca8fdd84.js";import"./media-aspect-ratio-df6a7bb1.js";const kt=(p,t=1)=>{const[o,u,l]=p.match(/\w\w/g).map(v=>parseInt(v,16));return`rgba(${o}, ${u}, ${l}, ${t})`};class St{constructor(t){z(this,"tickSize");z(this,"canvas");z(this,"context");z(this,"analyser");this.tickSize=t}setCanvas(t){this.canvas=t,t&&(this.context=t.getContext("2d"))}setAudioContext(t,o){const u=t.createAnalyser();u.smoothingTimeConstant=.6,u.fftSize=2048,o.connect(u),this.analyser=u}getTickPoints(t){const o=[];for(let u=0;u{const k=1-f/(v.length*2.5);let w=((C[f]||0)-b*k)*l;w<0&&(w=0);const B=u/(u-(o+w)),T=c.x*(u-o),K=c.y*(u-o),U=T*B,A=K*B;if(g.push({x1:T,y1:K,x2:U,y2:A}),f<20){let d=w/(200*l);d=d<1?1:d,_.push(d)}});const E=_.reduce((c,f)=>c+f,0)/_.length;return g.map(({x1:c,y1:f,x2:k,y2:w})=>({x1:c,y1:f,x2:k*E,y2:w*E}))}clear(t,o){this.context.clearRect(0,0,t,o)}draw(t,o,u,l,v){this.context.save(),this.getTicks(parseInt(360*v),this.tickSize,l,v).forEach(g=>{this.drawTick(t,o,u,g.x1,g.y1,g.x2,g.y2)}),this.context.restore()}}var h=wt({play:{id:"video.play",defaultMessage:"Play"},pause:{id:"video.pause",defaultMessage:"Pause"},mute:{id:"video.mute",defaultMessage:"Mute sound"},unmute:{id:"video.unmute",defaultMessage:"Unmute sound"},download:{id:"video.download",defaultMessage:"Download file"},hide:{id:"audio.hide",defaultMessage:"Hide audio"},expand:{id:"audio.expand",defaultMessage:"Expand audio"}}),re=10,$e=180,$t=function(t){var o=t.src,u=t.alt,l=u===void 0?"":u,v=t.poster,b=t.accentColor,g=t.backgroundColor,x=t.foregroundColor,C=t.cacheWidth,_=t.fullscreen,E=t.autoPlay,c=t.editable,f=t.deployPictureInPicture,k=f===void 0?!1:f,w=t.sensitiveOverlay,B=w===void 0?null:w,T=t.onToggleVisibility,K=T===void 0?function(){}:T,U=t.visible,A=U===void 0?!0:U,d=gt(),Ve=i.useState(t.width),ae=y(Ve,2),F=ae[0],qe=ae[1],ze=i.useState(t.height),oe=y(ze,2),D=oe[0],Be=oe[1],Ke=i.useState(0),ue=y(Ke,2),H=ue[0],Y=ue[1],Ue=i.useState(0),ie=y(Ue,2),Fe=ie[0],He=ie[1],We=i.useState(void 0),se=y(We,2),Oe=se[0],le=se[1],je=i.useState(!0),ce=y(je,2),S=ce[0],W=ce[1],Ge=i.useState(!1),de=y(Ge,2),L=de[0],ve=de[1],Xe=i.useState(.5),fe=y(Xe,2),O=fe[0],me=fe[1],Ye=i.useState(!1),he=y(Ye,2),Qe=he[0],ge=he[1],Ze=i.useState(!1),_e=y(Ze,2),ye=_e[0],pe=_e[1],N=i.useRef(new St(re)),I=i.useRef(null),P=i.useRef(null),r=i.useRef(null),Q=i.useRef(null),Z=i.useRef(null),R=i.useRef(null),be=function(){var e,a,m;return{src:t.src,volume:(e=r.current)===null||e===void 0?void 0:e.volume,muted:(a=r.current)===null||a===void 0?void 0:a.muted,currentTime:(m=r.current)===null||m===void 0?void 0:m.currentTime,poster:t.poster,backgroundColor:t.backgroundColor,foregroundColor:t.foregroundColor,accentColor:t.accentColor}},we=function(){if(P.current){var e=P.current.offsetWidth,a=_?P.current.offsetHeight:e/(16/9);C&&C(e),qe(e),Be(a)}},$=function(){if(I.current||st(),S){var e;(e=r.current)===null||e===void 0||e.play()}else{var a;(a=r.current)===null||a===void 0||a.pause()}W(!S)},Me=_t(function(){P.current&&we()},250,{trailing:!0}),Je=function(){var e;if(W(!1),((e=I.current)===null||e===void 0?void 0:e.state)==="suspended"){var a;(a=I.current)===null||a===void 0||a.resume()}lt()},et=function(){var e;W(!0),(e=I.current)===null||e===void 0||e.suspend()},tt=function(){if(r.current){var e=r.current.buffered.length-1;e>-1&&He(Math.ceil(r.current.buffered.end(e)/r.current.duration*100))}},Ce=function(){var e=!L;ve(e),r.current&&(r.current.muted=e)},nt=function(e){document.addEventListener("mousemove",q,!0),document.addEventListener("mouseup",ke,!0),document.addEventListener("touchmove",q,!0),document.addEventListener("touchend",ke,!0),q(e),e.preventDefault(),e.stopPropagation()},ke=function n(){document.removeEventListener("mousemove",q,!0),document.removeEventListener("mouseup",n,!0),document.removeEventListener("touchmove",q,!0),document.removeEventListener("touchend",n,!0)},rt=function(e){var a;document.addEventListener("mousemove",V,!0),document.addEventListener("mouseup",Se,!0),document.addEventListener("touchmove",V,!0),document.addEventListener("touchend",Se,!0),ge(!0),(a=r.current)===null||a===void 0||a.pause(),V(e),e.preventDefault(),e.stopPropagation()},Se=function n(){var e;document.removeEventListener("mousemove",V,!0),document.removeEventListener("mouseup",n,!0),document.removeEventListener("touchmove",V,!0),document.removeEventListener("touchend",n,!0),ge(!1),(e=r.current)===null||e===void 0||e.play()},V=ne(function(n){if(r.current&&Q.current){var e=Ae(Q.current,n),a=e.x,m=r.current.duration*a;isNaN(m)||(Y(m),r.current.currentTime=m)}},15),at=function(){r.current&&(Y(r.current.currentTime),le(r.current.duration))},q=ne(function(n){if(r.current&&Z.current){var e=Ae(Z.current,n),a=e.x;isNaN(a)||(me(a),r.current.volume=a)}},15),Ee=ne(function(){if(!(!R.current||!r.current)){var n=R.current.getBoundingClientRect(),e=n.top,a=n.height,m=e<=(window.innerHeight||document.documentElement.clientHeight)&&e+a>=0;!S&&!m&&(r.current.pause(),k&&k("audio",be()),W(!0))}},150,{trailing:!0}),ot=function(){pe(!0)},ut=function(){pe(!1)},it=function(){r.current&&(le(r.current.duration),H&&(r.current.currentTime=H),O!==void 0&&(r.current.volume=O),L!==void 0&&(r.current.muted=L),E&&$())},st=function(){if(r.current){var e=window.AudioContext||window.webkitAudioContext,a=new e,m=a.createMediaElementSource(r.current);N.current.setAudioContext(a,m),m.connect(a.destination),I.current=a}},lt=function n(){requestAnimationFrame(function(){r.current&&(at(),Pe(),xe(),S||n())})},Pe=function(){var e;(e=N.current)===null||e===void 0||e.clear(F||0,D||0)},xe=function(){var e;(e=N.current)===null||e===void 0||e.draw(De(),Le(),ee(),j(),J())},j=function(){return((D||t.height||0)-$e*J()*2)/2},J=function(){return(D||t.height||0)/982},De=function(){return Math.floor((F||0)/2)},Le=function(){return Math.floor(j()+$e*J())},ee=function(){return b||"#ffffff"},ct=function(){return g||"#000000"},dt=function(){return x||"#ffffff"},Ne=function(e){if(r.current){var a=r.current.currentTime+e;isNaN(a)||(Y(a),r.current.currentTime=a)}},Re=function(e){e.key===" "&&(e.preventDefault(),e.stopPropagation(),$())},vt=function(e){switch(e.key){case"k":e.preventDefault(),e.stopPropagation(),$();break;case"m":e.preventDefault(),e.stopPropagation(),Ce();break;case"j":e.preventDefault(),e.stopPropagation(),Ne(-10);break;case"l":e.preventDefault(),e.stopPropagation(),Ne(10);break}},te=function(){return Oe||t.duration},Te=Math.min(H/(te()||0)*100,100);return i.useLayoutEffect(function(){P.current&&we()},[P.current]),i.useEffect(function(){r.current&&(me(r.current.volume),ve(r.current.muted))},[r.current]),i.useEffect(function(){R.current&&N.current&&N.current.setCanvas(R.current)},[R.current,N.current]),i.useEffect(function(){return window.addEventListener("scroll",Ee),window.addEventListener("resize",Me,{passive:!0}),function(){window.removeEventListener("scroll",Ee),window.removeEventListener("resize",Me),!S&&r.current&&k&&k("audio",be())}},[]),i.useEffect(function(){Pe(),xe()},[o,F,D,b]),i.useEffect(function(){if(!A){var n;(n=r.current)===null||n===void 0||n.pause()}},[A]),M.createElement("div",{className:G("audio-player",{editable:c}),ref:P,style:{backgroundColor:ct(),color:dt(),width:"100%",height:_?"100%":D||t.height},onMouseEnter:ot,onMouseLeave:ut,tabIndex:0,onKeyDown:vt,onClick:function(e){return e.stopPropagation()}},B,M.createElement("audio",{src:o,ref:r,preload:"auto",onPlay:Je,onPause:et,onProgress:tt,onLoadedData:it}),A&&M.createElement(M.Fragment,null,M.createElement("canvas",{role:"button",tabIndex:0,className:"audio-player__canvas absolute left-0 top-0 w-full",width:F,height:D,ref:R,onClick:$,onKeyDown:Re,title:l,"aria-label":l}),v&&s("img",{src:v,alt:"",className:"pointer-events-none absolute aspect-1 -translate-x-1/2 -translate-y-1/2 rounded-full object-cover",width:(j()-re)*2,height:(j()-re)*2,style:{left:De(),top:Le()}}),M.createElement("div",{className:"video-player__seek",onMouseDown:rt,ref:Q},s("div",{className:"video-player__seek__buffer",style:{width:"".concat(Fe,"%")}}),s("div",{className:"video-player__seek__progress",style:{width:"".concat(Te,"%"),backgroundColor:b}}),s("span",{className:G("video-player__seek__handle",{active:Qe}),tabIndex:0,style:{left:"".concat(Te,"%"),backgroundColor:b},onKeyDown:Re})),s("div",{className:"video-player__controls active"},void 0,s("div",{className:"video-player__buttons-bar"},void 0,s("div",{className:"video-player__buttons left"},void 0,s("button",{type:"button",title:d.formatMessage(S?h.play:h.pause),"aria-label":d.formatMessage(S?h.play:h.pause),className:"player-button",onClick:$},void 0,s(X,{src:S?yt:Ct})),s("button",{type:"button",title:d.formatMessage(L?h.unmute:h.mute),"aria-label":d.formatMessage(L?h.unmute:h.mute),className:G("player-button volume_button",{active:ye}),onClick:Ce},void 0,s(X,{src:L?pt:Mt})),M.createElement("div",{className:G("video-player__volume",{active:ye}),ref:Z,onMouseDown:nt},s("div",{className:"video-player__volume__current",style:{width:"".concat(O*100,"%"),backgroundColor:ee()}}),s("span",{className:"video-player__volume__handle",tabIndex:0,style:{left:"".concat(O*100,"%"),backgroundColor:ee()}})),s("span",{className:"video-player__time"},void 0,s("span",{className:"video-player__time-current"},void 0,Ie(Math.floor(H))),typeof te()<"u"&&M.createElement(M.Fragment,null,s("span",{className:"video-player__time-sep"},void 0,"/"),s("span",{className:"video-player__time-total"},void 0,Ie(Math.floor(te()||0)))))),s("div",{className:"video-player__buttons right"},void 0,!_&&s("button",{type:"button",title:d.formatMessage(h.hide),"aria-label":d.formatMessage(h.hide),className:"video-player__download__icon player-button",onClick:K},void 0,s(X,{src:bt})),s("a",{title:d.formatMessage(h.download),"aria-label":d.formatMessage(h.download),className:"video-player__download__icon player-button",href:o,download:!0,target:"_blank"},void 0,s(X,{src:ht})))))))};export{$t as default}; +var ft=Object.defineProperty;var mt=(p,t,o)=>t in p?ft(p,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):p[t]=o;var z=(p,t,o)=>(mt(p,typeof t!="symbol"?t+"":t,o),o);import{v as ht}from"./download-ac53125a.js";import{u as gt,r as i,at as y,Q as _t,cl as ne,R as M,W as G,a as s,I as X,dx as yt,dy as pt,dk as bt,o as wt}from"../index-be605fd2.js";import{v as Mt}from"./volume-08f8a8f1.js";import{g as Ae,v as Ct,f as Ie}from"./index-63ea9ebf.js";import"./arrows-minimize-7c27a12c.js";import"./web.url.constructor-0fbaa340.js";import"./object-assign-35b0699c.js";import"./es.array.last-index-of-d76ad0ed.js";import"./media-aspect-ratio-df6a7bb1.js";const kt=(p,t=1)=>{const[o,u,l]=p.match(/\w\w/g).map(v=>parseInt(v,16));return`rgba(${o}, ${u}, ${l}, ${t})`};class St{constructor(t){z(this,"tickSize");z(this,"canvas");z(this,"context");z(this,"analyser");this.tickSize=t}setCanvas(t){this.canvas=t,t&&(this.context=t.getContext("2d"))}setAudioContext(t,o){const u=t.createAnalyser();u.smoothingTimeConstant=.6,u.fftSize=2048,o.connect(u),this.analyser=u}getTickPoints(t){const o=[];for(let u=0;u{const k=1-f/(v.length*2.5);let w=((C[f]||0)-b*k)*l;w<0&&(w=0);const B=u/(u-(o+w)),T=c.x*(u-o),K=c.y*(u-o),U=T*B,A=K*B;if(g.push({x1:T,y1:K,x2:U,y2:A}),f<20){let d=w/(200*l);d=d<1?1:d,_.push(d)}});const E=_.reduce((c,f)=>c+f,0)/_.length;return g.map(({x1:c,y1:f,x2:k,y2:w})=>({x1:c,y1:f,x2:k*E,y2:w*E}))}clear(t,o){this.context.clearRect(0,0,t,o)}draw(t,o,u,l,v){this.context.save(),this.getTicks(parseInt(360*v),this.tickSize,l,v).forEach(g=>{this.drawTick(t,o,u,g.x1,g.y1,g.x2,g.y2)}),this.context.restore()}}var h=wt({play:{id:"video.play",defaultMessage:"Play"},pause:{id:"video.pause",defaultMessage:"Pause"},mute:{id:"video.mute",defaultMessage:"Mute sound"},unmute:{id:"video.unmute",defaultMessage:"Unmute sound"},download:{id:"video.download",defaultMessage:"Download file"},hide:{id:"audio.hide",defaultMessage:"Hide audio"},expand:{id:"audio.expand",defaultMessage:"Expand audio"}}),re=10,$e=180,$t=function(t){var o=t.src,u=t.alt,l=u===void 0?"":u,v=t.poster,b=t.accentColor,g=t.backgroundColor,x=t.foregroundColor,C=t.cacheWidth,_=t.fullscreen,E=t.autoPlay,c=t.editable,f=t.deployPictureInPicture,k=f===void 0?!1:f,w=t.sensitiveOverlay,B=w===void 0?null:w,T=t.onToggleVisibility,K=T===void 0?function(){}:T,U=t.visible,A=U===void 0?!0:U,d=gt(),Ve=i.useState(t.width),ae=y(Ve,2),F=ae[0],qe=ae[1],ze=i.useState(t.height),oe=y(ze,2),D=oe[0],Be=oe[1],Ke=i.useState(0),ue=y(Ke,2),H=ue[0],Y=ue[1],Ue=i.useState(0),ie=y(Ue,2),Fe=ie[0],He=ie[1],We=i.useState(void 0),se=y(We,2),Oe=se[0],le=se[1],je=i.useState(!0),ce=y(je,2),S=ce[0],W=ce[1],Ge=i.useState(!1),de=y(Ge,2),L=de[0],ve=de[1],Xe=i.useState(.5),fe=y(Xe,2),O=fe[0],me=fe[1],Ye=i.useState(!1),he=y(Ye,2),Qe=he[0],ge=he[1],Ze=i.useState(!1),_e=y(Ze,2),ye=_e[0],pe=_e[1],N=i.useRef(new St(re)),I=i.useRef(null),P=i.useRef(null),r=i.useRef(null),Q=i.useRef(null),Z=i.useRef(null),R=i.useRef(null),be=function(){var e,a,m;return{src:t.src,volume:(e=r.current)===null||e===void 0?void 0:e.volume,muted:(a=r.current)===null||a===void 0?void 0:a.muted,currentTime:(m=r.current)===null||m===void 0?void 0:m.currentTime,poster:t.poster,backgroundColor:t.backgroundColor,foregroundColor:t.foregroundColor,accentColor:t.accentColor}},we=function(){if(P.current){var e=P.current.offsetWidth,a=_?P.current.offsetHeight:e/(16/9);C&&C(e),qe(e),Be(a)}},$=function(){if(I.current||st(),S){var e;(e=r.current)===null||e===void 0||e.play()}else{var a;(a=r.current)===null||a===void 0||a.pause()}W(!S)},Me=_t(function(){P.current&&we()},250,{trailing:!0}),Je=function(){var e;if(W(!1),((e=I.current)===null||e===void 0?void 0:e.state)==="suspended"){var a;(a=I.current)===null||a===void 0||a.resume()}lt()},et=function(){var e;W(!0),(e=I.current)===null||e===void 0||e.suspend()},tt=function(){if(r.current){var e=r.current.buffered.length-1;e>-1&&He(Math.ceil(r.current.buffered.end(e)/r.current.duration*100))}},Ce=function(){var e=!L;ve(e),r.current&&(r.current.muted=e)},nt=function(e){document.addEventListener("mousemove",q,!0),document.addEventListener("mouseup",ke,!0),document.addEventListener("touchmove",q,!0),document.addEventListener("touchend",ke,!0),q(e),e.preventDefault(),e.stopPropagation()},ke=function n(){document.removeEventListener("mousemove",q,!0),document.removeEventListener("mouseup",n,!0),document.removeEventListener("touchmove",q,!0),document.removeEventListener("touchend",n,!0)},rt=function(e){var a;document.addEventListener("mousemove",V,!0),document.addEventListener("mouseup",Se,!0),document.addEventListener("touchmove",V,!0),document.addEventListener("touchend",Se,!0),ge(!0),(a=r.current)===null||a===void 0||a.pause(),V(e),e.preventDefault(),e.stopPropagation()},Se=function n(){var e;document.removeEventListener("mousemove",V,!0),document.removeEventListener("mouseup",n,!0),document.removeEventListener("touchmove",V,!0),document.removeEventListener("touchend",n,!0),ge(!1),(e=r.current)===null||e===void 0||e.play()},V=ne(function(n){if(r.current&&Q.current){var e=Ae(Q.current,n),a=e.x,m=r.current.duration*a;isNaN(m)||(Y(m),r.current.currentTime=m)}},15),at=function(){r.current&&(Y(r.current.currentTime),le(r.current.duration))},q=ne(function(n){if(r.current&&Z.current){var e=Ae(Z.current,n),a=e.x;isNaN(a)||(me(a),r.current.volume=a)}},15),Ee=ne(function(){if(!(!R.current||!r.current)){var n=R.current.getBoundingClientRect(),e=n.top,a=n.height,m=e<=(window.innerHeight||document.documentElement.clientHeight)&&e+a>=0;!S&&!m&&(r.current.pause(),k&&k("audio",be()),W(!0))}},150,{trailing:!0}),ot=function(){pe(!0)},ut=function(){pe(!1)},it=function(){r.current&&(le(r.current.duration),H&&(r.current.currentTime=H),O!==void 0&&(r.current.volume=O),L!==void 0&&(r.current.muted=L),E&&$())},st=function(){if(r.current){var e=window.AudioContext||window.webkitAudioContext,a=new e,m=a.createMediaElementSource(r.current);N.current.setAudioContext(a,m),m.connect(a.destination),I.current=a}},lt=function n(){requestAnimationFrame(function(){r.current&&(at(),Pe(),xe(),S||n())})},Pe=function(){var e;(e=N.current)===null||e===void 0||e.clear(F||0,D||0)},xe=function(){var e;(e=N.current)===null||e===void 0||e.draw(De(),Le(),ee(),j(),J())},j=function(){return((D||t.height||0)-$e*J()*2)/2},J=function(){return(D||t.height||0)/982},De=function(){return Math.floor((F||0)/2)},Le=function(){return Math.floor(j()+$e*J())},ee=function(){return b||"#ffffff"},ct=function(){return g||"#000000"},dt=function(){return x||"#ffffff"},Ne=function(e){if(r.current){var a=r.current.currentTime+e;isNaN(a)||(Y(a),r.current.currentTime=a)}},Re=function(e){e.key===" "&&(e.preventDefault(),e.stopPropagation(),$())},vt=function(e){switch(e.key){case"k":e.preventDefault(),e.stopPropagation(),$();break;case"m":e.preventDefault(),e.stopPropagation(),Ce();break;case"j":e.preventDefault(),e.stopPropagation(),Ne(-10);break;case"l":e.preventDefault(),e.stopPropagation(),Ne(10);break}},te=function(){return Oe||t.duration},Te=Math.min(H/(te()||0)*100,100);return i.useLayoutEffect(function(){P.current&&we()},[P.current]),i.useEffect(function(){r.current&&(me(r.current.volume),ve(r.current.muted))},[r.current]),i.useEffect(function(){R.current&&N.current&&N.current.setCanvas(R.current)},[R.current,N.current]),i.useEffect(function(){return window.addEventListener("scroll",Ee),window.addEventListener("resize",Me,{passive:!0}),function(){window.removeEventListener("scroll",Ee),window.removeEventListener("resize",Me),!S&&r.current&&k&&k("audio",be())}},[]),i.useEffect(function(){Pe(),xe()},[o,F,D,b]),i.useEffect(function(){if(!A){var n;(n=r.current)===null||n===void 0||n.pause()}},[A]),M.createElement("div",{className:G("audio-player",{editable:c}),ref:P,style:{backgroundColor:ct(),color:dt(),width:"100%",height:_?"100%":D||t.height},onMouseEnter:ot,onMouseLeave:ut,tabIndex:0,onKeyDown:vt,onClick:function(e){return e.stopPropagation()}},B,M.createElement("audio",{src:o,ref:r,preload:"auto",onPlay:Je,onPause:et,onProgress:tt,onLoadedData:it}),A&&M.createElement(M.Fragment,null,M.createElement("canvas",{role:"button",tabIndex:0,className:"audio-player__canvas absolute left-0 top-0 w-full",width:F,height:D,ref:R,onClick:$,onKeyDown:Re,title:l,"aria-label":l}),v&&s("img",{src:v,alt:"",className:"pointer-events-none absolute aspect-1 -translate-x-1/2 -translate-y-1/2 rounded-full object-cover",width:(j()-re)*2,height:(j()-re)*2,style:{left:De(),top:Le()}}),M.createElement("div",{className:"video-player__seek",onMouseDown:rt,ref:Q},s("div",{className:"video-player__seek__buffer",style:{width:"".concat(Fe,"%")}}),s("div",{className:"video-player__seek__progress",style:{width:"".concat(Te,"%"),backgroundColor:b}}),s("span",{className:G("video-player__seek__handle",{active:Qe}),tabIndex:0,style:{left:"".concat(Te,"%"),backgroundColor:b},onKeyDown:Re})),s("div",{className:"video-player__controls active"},void 0,s("div",{className:"video-player__buttons-bar"},void 0,s("div",{className:"video-player__buttons left"},void 0,s("button",{type:"button",title:d.formatMessage(S?h.play:h.pause),"aria-label":d.formatMessage(S?h.play:h.pause),className:"player-button",onClick:$},void 0,s(X,{src:S?yt:Ct})),s("button",{type:"button",title:d.formatMessage(L?h.unmute:h.mute),"aria-label":d.formatMessage(L?h.unmute:h.mute),className:G("player-button volume_button",{active:ye}),onClick:Ce},void 0,s(X,{src:L?pt:Mt})),M.createElement("div",{className:G("video-player__volume",{active:ye}),ref:Z,onMouseDown:nt},s("div",{className:"video-player__volume__current",style:{width:"".concat(O*100,"%"),backgroundColor:ee()}}),s("span",{className:"video-player__volume__handle",tabIndex:0,style:{left:"".concat(O*100,"%"),backgroundColor:ee()}})),s("span",{className:"video-player__time"},void 0,s("span",{className:"video-player__time-current"},void 0,Ie(Math.floor(H))),typeof te()<"u"&&M.createElement(M.Fragment,null,s("span",{className:"video-player__time-sep"},void 0,"/"),s("span",{className:"video-player__time-total"},void 0,Ie(Math.floor(te()||0)))))),s("div",{className:"video-player__buttons right"},void 0,!_&&s("button",{type:"button",title:d.formatMessage(h.hide),"aria-label":d.formatMessage(h.hide),className:"video-player__download__icon player-button",onClick:K},void 0,s(X,{src:bt})),s("a",{title:d.formatMessage(h.download),"aria-label":d.formatMessage(h.download),className:"video-player__download__icon player-button",href:o,download:!0,target:"_blank"},void 0,s(X,{src:ht})))))))};export{$t as default}; diff --git a/packs/js/index-571dd45e.js b/packs/js/index-3399e540.js similarity index 99% rename from packs/js/index-571dd45e.js rename to packs/js/index-3399e540.js index 1565c812a..2f9d42340 100644 --- a/packs/js/index-571dd45e.js +++ b/packs/js/index-3399e540.js @@ -1 +1 @@ -import{r as K,e1 as Je,cD as Ke}from"../index-7380452a.js";import{r as Ae}from"./warning-07d0fac9.js";var Ye={};function Qe(r){if(r&&r.__esModule)return r;var n={};if(r!=null){for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(r,i):{};o.get||o.set?Object.defineProperty(n,i,o):n[i]=r[i]}}return n.default=r,n}var Ue=Qe,C={},te,me;function Ze(){if(me)return te;me=1;function r(n){return n&&n.__esModule?n:{default:n}}return te=r,te}var z,_e;function et(){if(_e)return z;_e=1;function r(){return z=r=Object.assign||function(n){for(var i=1;i=0)&&(o[u]=n[u]);return o}return re=r,re}var ne,Me;function rt(){if(Me)return ne;Me=1;var r=tt();function n(i,o){if(i==null)return{};var a=r(i,o),u,p;if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(i);for(p=0;p=0)&&Object.prototype.propertyIsEnumerable.call(i,u)&&(a[u]=i[u])}return a}return ne=n,ne}var ie,Re;function nt(){if(Re)return ie;Re=1;function r(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}return ie=r,ie}var ae,Oe;function it(){if(Oe)return ae;Oe=1;function r(i,o){for(var a=0;am&&(v=m+1-Math.exp((m-v)*i.default.RESISTANCE_COEF)):v<0?(v=0,y=(v-p)*g+M):v>m&&(v=m,y=(v-p)*g+M),{index:v,startX:y}}return J}var W={},He;function pt(){if(He)return W;He=1;var r=Q();Object.defineProperty(W,"__esModule",{value:!0}),W.default=void 0;var n=r(K),i=function(u,p){var S=!1,M=function(T){return T?T.key:"empty"};if(u.children.length&&p.children.length){var g=n.default.Children.map(u.children,M),w=g[u.index];if(w!=null){var m=n.default.Children.map(p.children,M),v=m[p.index];w===v&&(S=!0)}}return S},o=i;return W.default=o,W}var H={},ke;function ht(){if(ke)return H;ke=1,Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;function r(i,o){var a=i%o;return a<0?a+o:a}var n=r;return H.default=n,H}var je;function vt(){return je||(je=1,function(r){var n=Q();Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"checkIndexBounds",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(r,"computeIndex",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(r,"constant",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(r,"getDisplaySameSlide",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(r,"mod",{enumerable:!0,get:function(){return p.default}});var i=n(ft()),o=n(ct()),a=n(Fe()),u=n(pt()),p=n(ht())}(le)),le}var Ve;function gt(){if(Ve)return C;Ve=1;var r=Ue,n=Ze();Object.defineProperty(C,"__esModule",{value:!0}),C.getDomTreeShapes=fe,C.findNativeHandler=ce,C.default=C.SwipeableViewsContext=void 0;var i=n(et()),o=n(rt()),a=n(nt()),u=n(it()),p=n(st()),S=n(ut()),M=n(dt()),g=r(K);n(Je),n(Ae());var w=vt();function m(s,f,d,e){return s.addEventListener(f,d,e),{remove:function(){s.removeEventListener(f,d,e)}}}var v={container:{direction:"ltr",display:"flex",willChange:"transform"},slide:{width:"100%",WebkitFlexShrink:0,flexShrink:0,overflow:"auto"}},y={root:{x:{overflowX:"hidden"},"x-reverse":{overflowX:"hidden"},y:{overflowY:"hidden"},"y-reverse":{overflowY:"hidden"}},flexDirection:{x:"row","x-reverse":"row-reverse",y:"column","y-reverse":"column-reverse"},transform:{x:function(f){return"translate(".concat(-f,"%, 0)")},"x-reverse":function(f){return"translate(".concat(f,"%, 0)")},y:function(f){return"translate(0, ".concat(-f,"%)")},"y-reverse":function(f){return"translate(0, ".concat(f,"%)")}},length:{x:"width","x-reverse":"width",y:"height","y-reverse":"height"},rotationMatrix:{x:{x:[1,0],y:[0,1]},"x-reverse":{x:[-1,0],y:[0,1]},y:{x:[0,1],y:[1,0]},"y-reverse":{x:[0,-1],y:[1,0]}},scrollPosition:{x:"scrollLeft","x-reverse":"scrollLeft",y:"scrollTop","y-reverse":"scrollTop"},scrollLength:{x:"scrollWidth","x-reverse":"scrollWidth",y:"scrollHeight","y-reverse":"scrollHeight"},clientLength:{x:"clientWidth","x-reverse":"clientWidth",y:"clientHeight","y-reverse":"clientHeight"}};function T(s,f){var d=f.duration,e=f.easeFunction,t=f.delay;return"".concat(s," ").concat(d," ").concat(e," ").concat(t)}function Z(s,f){var d=y.rotationMatrix[f];return{pageX:d.x[0]*s.pageX+d.x[1]*s.pageY,pageY:d.y[0]*s.pageX+d.y[1]*s.pageY}}function k(s){return s.touches=[{pageX:s.pageX,pageY:s.pageY}],s}function fe(s,f){for(var d=[];s&&s!==f&&s!==document.body&&!s.hasAttribute("data-swipeable");){var e=window.getComputedStyle(s);e.getPropertyValue("position")==="absolute"||e.getPropertyValue("overflow-x")==="hidden"?d=[]:(s.clientWidth>0&&s.scrollWidth>s.clientWidth||s.clientHeight>0&&s.scrollHeight>s.clientHeight)&&d.push({element:s,scrollWidth:s.scrollWidth,scrollHeight:s.scrollHeight,clientWidth:s.clientWidth,clientHeight:s.clientHeight,scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}),s=s.parentNode}return d}var L=null;function ce(s){var f=s.domTreeShapes,d=s.pageX,e=s.startX,t=s.axis;return f.some(function(l){var h=d>=e;(t==="x"||t==="y")&&(h=!h);var c=Math.round(l[y.scrollPosition[t]]),b=c>0,_=c+l[y.clientLength[t]]q&&E>w.constant.UNCERTAINTY_THRESHOLD;if(!R&&(h==="y"||h==="y-reverse")&&(e.indexCurrent===0&&e.startXx.pageX)){e.isSwiping=!1;return}if(E>q&&t.preventDefault(),P===!0||q>w.constant.UNCERTAINTY_THRESHOLD){e.isSwiping=P,e.startX=x.pageX;return}}if(e.isSwiping===!0){t.preventDefault(),e.vx=e.vx*.5+(x.pageX-e.lastX)*.5,e.lastX=x.pageX;var V=(0,w.computeIndex)({children:c,resistance:R,pageX:x.pageX,startIndex:e.startIndex,startX:e.startX,viewLength:e.viewLength}),A=V.index,O=V.startX;if(L===null&&!b){var ee=fe(t.target,e.rootNode),Y=ce({domTreeShapes:ee,startX:e.startX,pageX:x.pageX,axis:h});if(Y)return}O?e.startX=O:L===null&&(L=e.rootNode),e.setIndexCurrent(A);var I=function(){_&&_(A,"move")};(e.state.displaySameSlide||!e.state.isDragging)&&e.setState({displaySameSlide:!1,isDragging:!0},I),I()}}},e.handleSwipeEnd=function(){if(L=null,!!e.started&&(e.started=!1,e.isSwiping===!0)){var t=e.state.indexLatest,l=e.indexCurrent,h=t-l,c;Math.abs(e.vx)>e.props.threshold?e.vx>0?c=Math.floor(l):c=Math.ceil(l):Math.abs(h)>e.props.hysteresis?c=h>0?Math.floor(l):Math.ceil(l):c=t;var b=g.Children.count(e.props.children)-1;c<0?c=0:c>b&&(c=b),e.setIndexCurrent(c),e.setState({indexLatest:c,isDragging:!1},function(){e.props.onSwitching&&e.props.onSwitching(c,"end"),e.props.onChangeIndex&&c!==t&&e.props.onChangeIndex(c,t,{reason:"swipe"}),l===t&&e.handleTransitionEnd()})}},e.handleTouchStart=function(t){e.props.onTouchStart&&e.props.onTouchStart(t),e.handleSwipeStart(t)},e.handleTouchEnd=function(t){e.props.onTouchEnd&&e.props.onTouchEnd(t),e.handleSwipeEnd(t)},e.handleMouseDown=function(t){e.props.onMouseDown&&e.props.onMouseDown(t),t.persist(),e.handleSwipeStart(k(t))},e.handleMouseUp=function(t){e.props.onMouseUp&&e.props.onMouseUp(t),e.handleSwipeEnd(k(t))},e.handleMouseLeave=function(t){e.props.onMouseLeave&&e.props.onMouseLeave(t),e.started&&e.handleSwipeEnd(k(t))},e.handleMouseMove=function(t){e.props.onMouseMove&&e.props.onMouseMove(t),e.started&&e.handleSwipeMove(k(t))},e.handleScroll=function(t){if(e.props.onScroll&&e.props.onScroll(t),t.target===e.rootNode){if(e.ignoreNextScrollEvents){e.ignoreNextScrollEvents=!1;return}var l=e.state.indexLatest,h=Math.ceil(t.target.scrollLeft/t.target.clientWidth)+l;e.ignoreNextScrollEvents=!0,t.target.scrollLeft=0,e.props.onChangeIndex&&h!==l&&e.props.onChangeIndex(h,l,{reason:"focus"})}},e.updateHeight=function(){if(e.activeSlide!==null){var t=e.activeSlide.children[0];t!==void 0&&t.offsetHeight!==void 0&&e.state.heightLatest!==t.offsetHeight&&e.setState({heightLatest:t.offsetHeight})}},e.state={indexLatest:d.index,isDragging:!1,renderOnlyActive:!d.disableLazyLoading,heightLatest:0,displaySameSlide:!0},e.setIndexCurrent(d.index),e}return(0,u.default)(f,[{key:"componentDidMount",value:function(){var e=this;this.transitionListener=m(this.containerNode,"transitionend",function(t){t.target===e.containerNode&&e.handleTransitionEnd()}),this.touchMoveListener=m(this.rootNode,"touchmove",function(t){e.props.disabled||e.handleSwipeMove(t)},{passive:!1}),this.props.disableLazyLoading||(this.firstRenderTimeout=setTimeout(function(){e.setState({renderOnlyActive:!1})},0)),this.props.action&&this.props.action({updateHeight:this.updateHeight})}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=e.index;typeof t=="number"&&t!==this.props.index&&(this.setIndexCurrent(t),this.setState({displaySameSlide:(0,w.getDisplaySameSlide)(this.props,e),indexLatest:t}))}},{key:"componentWillUnmount",value:function(){this.transitionListener.remove(),this.touchMoveListener.remove(),clearTimeout(this.firstRenderTimeout)}},{key:"getSwipeableViewsContext",value:function(){var e=this;return{slideUpdateHeight:function(){e.updateHeight()}}}},{key:"setIndexCurrent",value:function(e){if(!this.props.animateTransitions&&this.indexCurrent!==e&&this.handleTransitionEnd(),this.indexCurrent=e,this.containerNode){var t=this.props.axis,l=y.transform[t](e*100);this.containerNode.style.WebkitTransform=l,this.containerNode.style.transform=l}}},{key:"handleTransitionEnd",value:function(){this.props.onTransitionEnd&&(this.state.displaySameSlide||this.state.isDragging||this.props.onTransitionEnd())}},{key:"render",value:function(){var e=this,t=this.props;t.action;var l=t.animateHeight,h=t.animateTransitions,c=t.axis,b=t.children,_=t.containerStyle,R=t.disabled;t.disableLazyLoading;var x=t.enableMouseEvents;t.hysteresis,t.ignoreNativeScroll,t.index,t.onChangeIndex,t.onSwitching,t.onTransitionEnd,t.resistance;var E=t.slideStyle,q=t.slideClassName,P=t.springConfig,V=t.style;t.threshold;var A=(0,o.default)(t,["action","animateHeight","animateTransitions","axis","children","containerStyle","disabled","disableLazyLoading","enableMouseEvents","hysteresis","ignoreNativeScroll","index","onChangeIndex","onSwitching","onTransitionEnd","resistance","slideStyle","slideClassName","springConfig","style","threshold"]),O=this.state,ee=O.displaySameSlide,Y=O.heightLatest,I=O.indexLatest,he=O.isDragging,ve=O.renderOnlyActive,ze=R?{}:{onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},Be=!R&&x?{onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onMouseLeave:this.handleMouseLeave,onMouseMove:this.handleMouseMove}:{},ge=(0,i.default)({},v.slide,E),U,F;if(he||!h||ee)U="all 0s ease 0s",F="all 0s ease 0s";else if(U=T("transform",P),F=T("-webkit-transform",P),Y!==0){var ye=", ".concat(T("height",P));U+=ye,F+=ye}var $={height:null,WebkitFlexDirection:y.flexDirection[c],flexDirection:y.flexDirection[c],WebkitTransition:F,transition:U};if(!ve){var Se=y.transform[c](this.indexCurrent*100);$.WebkitTransform=Se,$.transform=Se}return l&&($.height=Y),g.createElement(pe.Provider,{value:this.getSwipeableViewsContext()},g.createElement("div",(0,i.default)({ref:this.setRootNode,style:(0,i.default)({},y.root[c],V)},A,ze,Be,{onScroll:this.handleScroll}),g.createElement("div",{ref:this.setContainerNode,style:(0,i.default)({},$,v.container,_),className:"react-swipeable-view-container"},g.Children.map(b,function(Ge,xe){if(ve&&xe!==I)return null;var be,we=!0;return xe===I&&(we=!1,l&&(be=e.setActiveSlide,ge.overflowY="hidden")),g.createElement("div",{ref:be,style:ge,className:q,"aria-hidden":we,"data-swipeable":"true"},Ge)}))))}}]),f}(g.Component);j.displayName="ReactSwipableView",j.propTypes={},j.defaultProps={animateHeight:!1,animateTransitions:!0,axis:"x",disabled:!1,disableLazyLoading:!1,enableMouseEvents:!1,hysteresis:.6,ignoreNativeScroll:!1,index:0,threshold:5,springConfig:{duration:"0.35s",easeFunction:"cubic-bezier(0.15, 0.3, 0.25, 1)",delay:"0s"},resistance:!1};var $e=j;return C.default=$e,C}(function(r){var n=Ue;Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(r,"SwipeableViewsContext",{enumerable:!0,get:function(){return i.SwipeableViewsContext}});var i=n(gt())})(Ye);const xt=Ke(Ye);export{xt as R}; +import{r as K,e1 as Je,cD as Ke}from"../index-be605fd2.js";import{r as Ae}from"./warning-07d0fac9.js";var Ye={};function Qe(r){if(r&&r.__esModule)return r;var n={};if(r!=null){for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(r,i):{};o.get||o.set?Object.defineProperty(n,i,o):n[i]=r[i]}}return n.default=r,n}var Ue=Qe,C={},te,me;function Ze(){if(me)return te;me=1;function r(n){return n&&n.__esModule?n:{default:n}}return te=r,te}var z,_e;function et(){if(_e)return z;_e=1;function r(){return z=r=Object.assign||function(n){for(var i=1;i=0)&&(o[u]=n[u]);return o}return re=r,re}var ne,Me;function rt(){if(Me)return ne;Me=1;var r=tt();function n(i,o){if(i==null)return{};var a=r(i,o),u,p;if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(i);for(p=0;p=0)&&Object.prototype.propertyIsEnumerable.call(i,u)&&(a[u]=i[u])}return a}return ne=n,ne}var ie,Re;function nt(){if(Re)return ie;Re=1;function r(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}return ie=r,ie}var ae,Oe;function it(){if(Oe)return ae;Oe=1;function r(i,o){for(var a=0;am&&(v=m+1-Math.exp((m-v)*i.default.RESISTANCE_COEF)):v<0?(v=0,y=(v-p)*g+M):v>m&&(v=m,y=(v-p)*g+M),{index:v,startX:y}}return J}var W={},He;function pt(){if(He)return W;He=1;var r=Q();Object.defineProperty(W,"__esModule",{value:!0}),W.default=void 0;var n=r(K),i=function(u,p){var S=!1,M=function(T){return T?T.key:"empty"};if(u.children.length&&p.children.length){var g=n.default.Children.map(u.children,M),w=g[u.index];if(w!=null){var m=n.default.Children.map(p.children,M),v=m[p.index];w===v&&(S=!0)}}return S},o=i;return W.default=o,W}var H={},ke;function ht(){if(ke)return H;ke=1,Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;function r(i,o){var a=i%o;return a<0?a+o:a}var n=r;return H.default=n,H}var je;function vt(){return je||(je=1,function(r){var n=Q();Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"checkIndexBounds",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(r,"computeIndex",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(r,"constant",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(r,"getDisplaySameSlide",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(r,"mod",{enumerable:!0,get:function(){return p.default}});var i=n(ft()),o=n(ct()),a=n(Fe()),u=n(pt()),p=n(ht())}(le)),le}var Ve;function gt(){if(Ve)return C;Ve=1;var r=Ue,n=Ze();Object.defineProperty(C,"__esModule",{value:!0}),C.getDomTreeShapes=fe,C.findNativeHandler=ce,C.default=C.SwipeableViewsContext=void 0;var i=n(et()),o=n(rt()),a=n(nt()),u=n(it()),p=n(st()),S=n(ut()),M=n(dt()),g=r(K);n(Je),n(Ae());var w=vt();function m(s,f,d,e){return s.addEventListener(f,d,e),{remove:function(){s.removeEventListener(f,d,e)}}}var v={container:{direction:"ltr",display:"flex",willChange:"transform"},slide:{width:"100%",WebkitFlexShrink:0,flexShrink:0,overflow:"auto"}},y={root:{x:{overflowX:"hidden"},"x-reverse":{overflowX:"hidden"},y:{overflowY:"hidden"},"y-reverse":{overflowY:"hidden"}},flexDirection:{x:"row","x-reverse":"row-reverse",y:"column","y-reverse":"column-reverse"},transform:{x:function(f){return"translate(".concat(-f,"%, 0)")},"x-reverse":function(f){return"translate(".concat(f,"%, 0)")},y:function(f){return"translate(0, ".concat(-f,"%)")},"y-reverse":function(f){return"translate(0, ".concat(f,"%)")}},length:{x:"width","x-reverse":"width",y:"height","y-reverse":"height"},rotationMatrix:{x:{x:[1,0],y:[0,1]},"x-reverse":{x:[-1,0],y:[0,1]},y:{x:[0,1],y:[1,0]},"y-reverse":{x:[0,-1],y:[1,0]}},scrollPosition:{x:"scrollLeft","x-reverse":"scrollLeft",y:"scrollTop","y-reverse":"scrollTop"},scrollLength:{x:"scrollWidth","x-reverse":"scrollWidth",y:"scrollHeight","y-reverse":"scrollHeight"},clientLength:{x:"clientWidth","x-reverse":"clientWidth",y:"clientHeight","y-reverse":"clientHeight"}};function T(s,f){var d=f.duration,e=f.easeFunction,t=f.delay;return"".concat(s," ").concat(d," ").concat(e," ").concat(t)}function Z(s,f){var d=y.rotationMatrix[f];return{pageX:d.x[0]*s.pageX+d.x[1]*s.pageY,pageY:d.y[0]*s.pageX+d.y[1]*s.pageY}}function k(s){return s.touches=[{pageX:s.pageX,pageY:s.pageY}],s}function fe(s,f){for(var d=[];s&&s!==f&&s!==document.body&&!s.hasAttribute("data-swipeable");){var e=window.getComputedStyle(s);e.getPropertyValue("position")==="absolute"||e.getPropertyValue("overflow-x")==="hidden"?d=[]:(s.clientWidth>0&&s.scrollWidth>s.clientWidth||s.clientHeight>0&&s.scrollHeight>s.clientHeight)&&d.push({element:s,scrollWidth:s.scrollWidth,scrollHeight:s.scrollHeight,clientWidth:s.clientWidth,clientHeight:s.clientHeight,scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}),s=s.parentNode}return d}var L=null;function ce(s){var f=s.domTreeShapes,d=s.pageX,e=s.startX,t=s.axis;return f.some(function(l){var h=d>=e;(t==="x"||t==="y")&&(h=!h);var c=Math.round(l[y.scrollPosition[t]]),b=c>0,_=c+l[y.clientLength[t]]q&&E>w.constant.UNCERTAINTY_THRESHOLD;if(!R&&(h==="y"||h==="y-reverse")&&(e.indexCurrent===0&&e.startXx.pageX)){e.isSwiping=!1;return}if(E>q&&t.preventDefault(),P===!0||q>w.constant.UNCERTAINTY_THRESHOLD){e.isSwiping=P,e.startX=x.pageX;return}}if(e.isSwiping===!0){t.preventDefault(),e.vx=e.vx*.5+(x.pageX-e.lastX)*.5,e.lastX=x.pageX;var V=(0,w.computeIndex)({children:c,resistance:R,pageX:x.pageX,startIndex:e.startIndex,startX:e.startX,viewLength:e.viewLength}),A=V.index,O=V.startX;if(L===null&&!b){var ee=fe(t.target,e.rootNode),Y=ce({domTreeShapes:ee,startX:e.startX,pageX:x.pageX,axis:h});if(Y)return}O?e.startX=O:L===null&&(L=e.rootNode),e.setIndexCurrent(A);var I=function(){_&&_(A,"move")};(e.state.displaySameSlide||!e.state.isDragging)&&e.setState({displaySameSlide:!1,isDragging:!0},I),I()}}},e.handleSwipeEnd=function(){if(L=null,!!e.started&&(e.started=!1,e.isSwiping===!0)){var t=e.state.indexLatest,l=e.indexCurrent,h=t-l,c;Math.abs(e.vx)>e.props.threshold?e.vx>0?c=Math.floor(l):c=Math.ceil(l):Math.abs(h)>e.props.hysteresis?c=h>0?Math.floor(l):Math.ceil(l):c=t;var b=g.Children.count(e.props.children)-1;c<0?c=0:c>b&&(c=b),e.setIndexCurrent(c),e.setState({indexLatest:c,isDragging:!1},function(){e.props.onSwitching&&e.props.onSwitching(c,"end"),e.props.onChangeIndex&&c!==t&&e.props.onChangeIndex(c,t,{reason:"swipe"}),l===t&&e.handleTransitionEnd()})}},e.handleTouchStart=function(t){e.props.onTouchStart&&e.props.onTouchStart(t),e.handleSwipeStart(t)},e.handleTouchEnd=function(t){e.props.onTouchEnd&&e.props.onTouchEnd(t),e.handleSwipeEnd(t)},e.handleMouseDown=function(t){e.props.onMouseDown&&e.props.onMouseDown(t),t.persist(),e.handleSwipeStart(k(t))},e.handleMouseUp=function(t){e.props.onMouseUp&&e.props.onMouseUp(t),e.handleSwipeEnd(k(t))},e.handleMouseLeave=function(t){e.props.onMouseLeave&&e.props.onMouseLeave(t),e.started&&e.handleSwipeEnd(k(t))},e.handleMouseMove=function(t){e.props.onMouseMove&&e.props.onMouseMove(t),e.started&&e.handleSwipeMove(k(t))},e.handleScroll=function(t){if(e.props.onScroll&&e.props.onScroll(t),t.target===e.rootNode){if(e.ignoreNextScrollEvents){e.ignoreNextScrollEvents=!1;return}var l=e.state.indexLatest,h=Math.ceil(t.target.scrollLeft/t.target.clientWidth)+l;e.ignoreNextScrollEvents=!0,t.target.scrollLeft=0,e.props.onChangeIndex&&h!==l&&e.props.onChangeIndex(h,l,{reason:"focus"})}},e.updateHeight=function(){if(e.activeSlide!==null){var t=e.activeSlide.children[0];t!==void 0&&t.offsetHeight!==void 0&&e.state.heightLatest!==t.offsetHeight&&e.setState({heightLatest:t.offsetHeight})}},e.state={indexLatest:d.index,isDragging:!1,renderOnlyActive:!d.disableLazyLoading,heightLatest:0,displaySameSlide:!0},e.setIndexCurrent(d.index),e}return(0,u.default)(f,[{key:"componentDidMount",value:function(){var e=this;this.transitionListener=m(this.containerNode,"transitionend",function(t){t.target===e.containerNode&&e.handleTransitionEnd()}),this.touchMoveListener=m(this.rootNode,"touchmove",function(t){e.props.disabled||e.handleSwipeMove(t)},{passive:!1}),this.props.disableLazyLoading||(this.firstRenderTimeout=setTimeout(function(){e.setState({renderOnlyActive:!1})},0)),this.props.action&&this.props.action({updateHeight:this.updateHeight})}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=e.index;typeof t=="number"&&t!==this.props.index&&(this.setIndexCurrent(t),this.setState({displaySameSlide:(0,w.getDisplaySameSlide)(this.props,e),indexLatest:t}))}},{key:"componentWillUnmount",value:function(){this.transitionListener.remove(),this.touchMoveListener.remove(),clearTimeout(this.firstRenderTimeout)}},{key:"getSwipeableViewsContext",value:function(){var e=this;return{slideUpdateHeight:function(){e.updateHeight()}}}},{key:"setIndexCurrent",value:function(e){if(!this.props.animateTransitions&&this.indexCurrent!==e&&this.handleTransitionEnd(),this.indexCurrent=e,this.containerNode){var t=this.props.axis,l=y.transform[t](e*100);this.containerNode.style.WebkitTransform=l,this.containerNode.style.transform=l}}},{key:"handleTransitionEnd",value:function(){this.props.onTransitionEnd&&(this.state.displaySameSlide||this.state.isDragging||this.props.onTransitionEnd())}},{key:"render",value:function(){var e=this,t=this.props;t.action;var l=t.animateHeight,h=t.animateTransitions,c=t.axis,b=t.children,_=t.containerStyle,R=t.disabled;t.disableLazyLoading;var x=t.enableMouseEvents;t.hysteresis,t.ignoreNativeScroll,t.index,t.onChangeIndex,t.onSwitching,t.onTransitionEnd,t.resistance;var E=t.slideStyle,q=t.slideClassName,P=t.springConfig,V=t.style;t.threshold;var A=(0,o.default)(t,["action","animateHeight","animateTransitions","axis","children","containerStyle","disabled","disableLazyLoading","enableMouseEvents","hysteresis","ignoreNativeScroll","index","onChangeIndex","onSwitching","onTransitionEnd","resistance","slideStyle","slideClassName","springConfig","style","threshold"]),O=this.state,ee=O.displaySameSlide,Y=O.heightLatest,I=O.indexLatest,he=O.isDragging,ve=O.renderOnlyActive,ze=R?{}:{onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},Be=!R&&x?{onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onMouseLeave:this.handleMouseLeave,onMouseMove:this.handleMouseMove}:{},ge=(0,i.default)({},v.slide,E),U,F;if(he||!h||ee)U="all 0s ease 0s",F="all 0s ease 0s";else if(U=T("transform",P),F=T("-webkit-transform",P),Y!==0){var ye=", ".concat(T("height",P));U+=ye,F+=ye}var $={height:null,WebkitFlexDirection:y.flexDirection[c],flexDirection:y.flexDirection[c],WebkitTransition:F,transition:U};if(!ve){var Se=y.transform[c](this.indexCurrent*100);$.WebkitTransform=Se,$.transform=Se}return l&&($.height=Y),g.createElement(pe.Provider,{value:this.getSwipeableViewsContext()},g.createElement("div",(0,i.default)({ref:this.setRootNode,style:(0,i.default)({},y.root[c],V)},A,ze,Be,{onScroll:this.handleScroll}),g.createElement("div",{ref:this.setContainerNode,style:(0,i.default)({},$,v.container,_),className:"react-swipeable-view-container"},g.Children.map(b,function(Ge,xe){if(ve&&xe!==I)return null;var be,we=!0;return xe===I&&(we=!1,l&&(be=e.setActiveSlide,ge.overflowY="hidden")),g.createElement("div",{ref:be,style:ge,className:q,"aria-hidden":we,"data-swipeable":"true"},Ge)}))))}}]),f}(g.Component);j.displayName="ReactSwipableView",j.propTypes={},j.defaultProps={animateHeight:!1,animateTransitions:!0,axis:"x",disabled:!1,disableLazyLoading:!1,enableMouseEvents:!1,hysteresis:.6,ignoreNativeScroll:!1,index:0,threshold:5,springConfig:{duration:"0.35s",easeFunction:"cubic-bezier(0.15, 0.3, 0.25, 1)",delay:"0s"},resistance:!1};var $e=j;return C.default=$e,C}(function(r){var n=Ue;Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(r,"SwipeableViewsContext",{enumerable:!0,get:function(){return i.SwipeableViewsContext}});var i=n(gt())})(Ye);const xt=Ke(Ye);export{xt as R}; diff --git a/packs/js/index-f98470b1.js b/packs/js/index-357ae570.js similarity index 92% rename from packs/js/index-f98470b1.js rename to packs/js/index-357ae570.js index 6eec9b819..4b0ed0572 100644 --- a/packs/js/index-f98470b1.js +++ b/packs/js/index-357ae570.js @@ -1 +1 @@ -import{d as C,ay as T,aV as B,q as u,b0 as G,r as L,at as P,b1 as h,a as i,aB as _,X as m,aC as q,F as y,R as F,aD as A}from"../index-7380452a.js";import{L as x}from"./load-more-b53b8d88.js";import{M as U}from"./media-item-9b67131c.js";import"./volume-08f8a8f1.js";import"./es.array.last-index-of-ca8fdd84.js";var V=function(n){var c=n.maxId,v=n.onLoadMore,s=function(){v(c)};return i(x,{onClick:s})},K=function(){var n=C(),c=T(),v=c.username,s=B(v,{withRelationship:!0}),e=s.account,I=s.isLoading,$=s.isUnavailable,t=u(function(o){return G(o,e.id)}),l=u(function(o){var a;return(a=o.timelines.get("account:".concat(e==null?void 0:e.id,":media")))===null||a===void 0?void 0:a.isLoading}),f=u(function(o){var a;return(a=o.timelines.get("account:".concat(e==null?void 0:e.id,":media")))===null||a===void 0?void 0:a.hasMore}),w=u(function(o){var a;return(a=o.timelines.get("account:".concat(e==null?void 0:e.id,":media")))===null||a===void 0?void 0:a.next}),N=L.useState(323),p=P(N,2),O=p[0],S=p[1],E=function(a){a&&S(a.offsetWidth)},D=function(){f&&M(t.size>0?t.last().status.id:void 0)},M=function(a){e&&n(h(e.id,{url:w,maxId:a}))},R=function(a){a.preventDefault(),D()},k=function(a){if(a.type==="video")n(A("VIDEO",{media:a,status:a.status,account:a.account}));else{var d=a.status.media_attachments,r=d.findIndex(function(z){return z.id===a.id});n(A("MEDIA",{media:d,index:r,status:a.status}))}};if(L.useEffect(function(){e&&n(h(e.id))},[e==null?void 0:e.id]),I||!t&&l)return i(m,{},void 0,i(_,{}));if(!e)return i(q,{});var g=null;return f&&!(l&&t.size===0)&&(g=i(x,{className:"my-auto",visible:!l,onClick:R})),$?i(m,{},void 0,i("div",{className:"empty-column-indicator"},void 0,i(y,{id:"empty_column.account_unavailable",defaultMessage:"Profile unavailable"}))):i(m,{label:"".concat(e.display_name," (@").concat(e.acct,")"),transparent:!0,withHeader:!1},void 0,F.createElement("div",{role:"feed",className:"flex flex-wrap gap-2",ref:E},t.map(function(o,a){var d,r;return o===null?i(V,{maxId:a>0&&((r=t.get(a-1))===null||r===void 0?void 0:r.id)||null,onLoadMore:M},"more:"+((d=t.get(a+1))===null||d===void 0?void 0:d.id)):i("div",{className:"aspect-square",style:{width:Math.floor((O-4)/3)-4}},void 0,i(U,{attachment:o,onOpenMedia:k},"".concat(o.status.id,"+").concat(o.id)))}),!l&&t.size===0&&i("div",{className:"empty-column-indicator col-span-2 sm:col-span-3"},void 0,i(y,{id:"account_gallery.none",defaultMessage:"No media to show."})),g),l&&t.size===0&&i("div",{className:"slist__append"},void 0,i(_,{})))};export{K as default}; +import{d as C,ay as T,aV as B,q as u,b0 as G,r as L,at as P,b1 as h,a as i,aB as _,X as m,aC as q,F as y,R as F,aD as A}from"../index-be605fd2.js";import{L as x}from"./load-more-55559f32.js";import{M as U}from"./media-item-f8ffc0fb.js";import"./volume-08f8a8f1.js";import"./es.array.last-index-of-d76ad0ed.js";var V=function(n){var c=n.maxId,v=n.onLoadMore,s=function(){v(c)};return i(x,{onClick:s})},K=function(){var n=C(),c=T(),v=c.username,s=B(v,{withRelationship:!0}),e=s.account,I=s.isLoading,$=s.isUnavailable,t=u(function(o){return G(o,e.id)}),l=u(function(o){var a;return(a=o.timelines.get("account:".concat(e==null?void 0:e.id,":media")))===null||a===void 0?void 0:a.isLoading}),f=u(function(o){var a;return(a=o.timelines.get("account:".concat(e==null?void 0:e.id,":media")))===null||a===void 0?void 0:a.hasMore}),w=u(function(o){var a;return(a=o.timelines.get("account:".concat(e==null?void 0:e.id,":media")))===null||a===void 0?void 0:a.next}),N=L.useState(323),p=P(N,2),O=p[0],S=p[1],E=function(a){a&&S(a.offsetWidth)},D=function(){f&&M(t.size>0?t.last().status.id:void 0)},M=function(a){e&&n(h(e.id,{url:w,maxId:a}))},R=function(a){a.preventDefault(),D()},k=function(a){if(a.type==="video")n(A("VIDEO",{media:a,status:a.status,account:a.account}));else{var d=a.status.media_attachments,r=d.findIndex(function(z){return z.id===a.id});n(A("MEDIA",{media:d,index:r,status:a.status}))}};if(L.useEffect(function(){e&&n(h(e.id))},[e==null?void 0:e.id]),I||!t&&l)return i(m,{},void 0,i(_,{}));if(!e)return i(q,{});var g=null;return f&&!(l&&t.size===0)&&(g=i(x,{className:"my-auto",visible:!l,onClick:R})),$?i(m,{},void 0,i("div",{className:"empty-column-indicator"},void 0,i(y,{id:"empty_column.account_unavailable",defaultMessage:"Profile unavailable"}))):i(m,{label:"".concat(e.display_name," (@").concat(e.acct,")"),transparent:!0,withHeader:!1},void 0,F.createElement("div",{role:"feed",className:"flex flex-wrap gap-2",ref:E},t.map(function(o,a){var d,r;return o===null?i(V,{maxId:a>0&&((r=t.get(a-1))===null||r===void 0?void 0:r.id)||null,onLoadMore:M},"more:"+((d=t.get(a+1))===null||d===void 0?void 0:d.id)):i("div",{className:"aspect-square",style:{width:Math.floor((O-4)/3)-4}},void 0,i(U,{attachment:o,onOpenMedia:k},"".concat(o.status.id,"+").concat(o.id)))}),!l&&t.size===0&&i("div",{className:"empty-column-indicator col-span-2 sm:col-span-3"},void 0,i(y,{id:"account_gallery.none",defaultMessage:"No media to show."})),g),l&&t.size===0&&i("div",{className:"slist__append"},void 0,i(_,{})))};export{K as default}; diff --git a/packs/js/index-6907f734.js b/packs/js/index-431739eb.js similarity index 98% rename from packs/js/index-6907f734.js rename to packs/js/index-431739eb.js index 2ffad1bfb..746e752c8 100644 --- a/packs/js/index-6907f734.js +++ b/packs/js/index-431739eb.js @@ -1 +1 @@ -import{u as q,a,bG as P,H as la,o as F,fl as wa,cV as ca,cY as xa,dC as ka,cT as da,cU as Sa,f6 as Ca,dn as Ma,fm as Ia,r as m,R as H,W as z,y as La,F as p,_ as Pa,fn as Na,at as j,fo as Oa,fp as ua,fq as ja,fr as Ea,eA as Aa,fs as Ta,ft as qa,cE as aa,d as Fa,g as Da,q as Ra,fu as $a,bE as Ja,bF as E,eL as A,cy as T,af as ea,ag as M,fv as Ha,ah as O,bZ as za,bI as Ua,aa as Ba,X as Ka,fw as Va,bp as Ga,fx as Wa,O as ta,bL as Ya}from"../index-7380452a.js";import{A as Xa}from"./accordion-9597afee.js";import{F as Za}from"./file-input-e3eba176.js";import{S as fa}from"./streamfield-757f31b8.js";import{F as Qa}from"./fork-awesome-icon-170511cf.js";import{o as ae}from"./object-to-array-a4f09672.js";import"./dots-vertical-68cbc8e2.js";var oa=F({label:{id:"soapbox_config.home_footer.meta_fields.label_placeholder",defaultMessage:"Label"},url:{id:"soapbox_config.home_footer.meta_fields.url_placeholder",defaultMessage:"URL"}}),ee=function(t){var e=t.value,o=t.onChange,l=q(),d=function(s){return function(r){o(e.set(s,r.currentTarget.value))}};return a(la,{space:2,grow:!0},void 0,a(P,{type:"text",outerClassName:"w-full grow",placeholder:l.formatMessage(oa.label),value:e.title,onChange:d("title")}),a(P,{type:"text",outerClassName:"w-full grow",placeholder:l.formatMessage(oa.url),value:e.url,onChange:d("url")}))};const te={"Web Application Icons":["fa fa-music","fa fa-search","fa fa-heart","fa fa-star","fa fa-user","fa fa-film","fa fa-check","fa fa-times","fa fa-search-plus","fa fa-search-minus","fa fa-power-off","fa fa-signal","fa fa-cog","fa fa-home","fa fa-road","fa fa-download","fa fa-inbox","fa fa-lock","fa fa-flag","fa fa-headphones","fa fa-volume-off","fa fa-volume-down","fa fa-volume-up","fa fa-qrcode","fa fa-barcode","fa fa-tag","fa fa-tags","fa fa-book","fa fa-bookmark","fa fa-print","fa fa-camera","fa fa-map-marker","fa fa-adjust","fa fa-tint","fa fa-plus-circle","fa fa-minus-circle","fa fa-times-circle","fa fa-check-circle","fa fa-question-circle","fa fa-info-circle","fa fa-crosshairs","fa fa-ban","fa fa-share","fa fa-plus","fa fa-minus","fa fa-asterisk","fa fa-exclamation-circle","fa fa-gift","fa fa-leaf","fa fa-fire","fa fa-eye","fa fa-eye-slash","fa fa-exclamation-triangle","fa fa-plane","fa fa-calendar","fa fa-random","fa fa-comment","fa fa-magnet","fa fa-retweet","fa fa-shopping-cart","fa fa-folder","fa fa-folder-open","fa fa-chart-bar","fa fa-camera-retro","fa fa-key","fa fa-cogs","fa fa-comments","fa fa-star-half","fa fa-thumbtack","fa fa-external-link-alt","fa fa-trophy","fa fa-upload","fa fa-phone","fa fa-phone-square","fa fa-unlock","fa fa-credit-card","fa fa-rss","fa fa-bullhorn","fa fa-certificate","fa fa-globe","fa fa-wrench","fa fa-tasks","fa fa-filter","fa fa-briefcase","fa fa-users","fa fa-cloud","fa fa-flask","fa fa-square","fa fa-bars","fa fa-magic","fa fa-truck","fa fa-sort","fa fa-envelope","fa fa-gavel","fa fa-bolt","fa fa-sitemap","fa fa-umbrella","fa fa-cloud-download-alt","fa fa-cloud-upload-alt","fa fa-suitcase","fa fa-bell","fa fa-coffee","fa fa-fighter-jet","fa fa-beer","fa fa-desktop","fa fa-laptop","fa fa-tablet","fa fa-mobile","fa fa-quote-left","fa fa-quote-right","fa fa-spinner","fa fa-circle","fa fa-reply","fa fa-gamepad","fa fa-flag-checkered","fa fa-terminal","fa fa-code","fa fa-reply-all","fa fa-location-arrow","fa fa-crop","fa fa-question","fa fa-info","fa fa-exclamation","fa fa-puzzle-piece","fa fa-microphone","fa fa-microphone-slash","fa fa-fire-extinguisher","fa fa-rocket","fa fa-anchor","fa fa-unlock-alt","fa fa-bullseye","fa fa-ellipsis-h","fa fa-ellipsis-v","fa fa-rss-square","fa fa-minus-square","fa fa-check-square","fa fa-external-link-square-alt","fa fa-share-square","fa fa-compass","fa fa-thumbs-up","fa fa-thumbs-down","fa fa-female","fa fa-male","fa fa-archive","fa fa-bug","fa fa-wheelchair","fa fa-space-shuttle","fa fa-envelope-square","fa fa-university","fa fa-graduation-cap","fa fa-language","fa fa-fax","fa fa-building","fa fa-child","fa fa-paw","fa fa-cube","fa fa-cubes","fa fa-recycle","fa fa-car","fa fa-taxi","fa fa-tree","fa fa-database","fa fa-life-ring","fa fa-paper-plane","fa fa-history","fa fa-share-alt","fa fa-share-alt-square","fa fa-bomb","fa fa-tty","fa fa-binoculars","fa fa-plug","fa fa-wifi","fa fa-calculator","fa fa-bell-slash","fa fa-trash","fa fa-copyright","fa fa-at","fa fa-paint-brush","fa fa-birthday-cake","fa fa-chart-area","fa fa-chart-pie","fa fa-chart-line","fa fa-toggle-off","fa fa-toggle-on","fa fa-bicycle","fa fa-bus","fa fa-cart-plus","fa fa-cart-arrow-down","fa fa-ship","fa fa-user-secret","fa fa-motorcycle","fa fa-street-view","fa fa-heartbeat","fa fa-server","fa fa-user-plus","fa fa-user-times","fa fa-bed","fa fa-battery-full","fa fa-battery-three-quarters","fa fa-battery-half","fa fa-battery-quarter","fa fa-battery-empty","fa fa-mouse-pointer","fa fa-i-cursor","fa fa-object-group","fa fa-object-ungroup","fa fa-sticky-note","fa fa-clone","fa fa-balance-scale","fa fa-hourglass-start","fa fa-hourglass-half","fa fa-hourglass-end","fa fa-hourglass","fa fa-trademark","fa fa-registered","fa fa-industry","fa fa-map-pin","fa fa-map-signs","fa fa-map","fa fa-shopping-bag","fa fa-shopping-basket","fa fa-hashtag","fa fa-percent","fa fa-universal-access","fa fa-blind","fa fa-audio-description","fa fa-braille","fa fa-assistive-listening-systems","fa fa-american-sign-language-interpreting","fa fa-deaf","fa fa-sign-language","fa fa-low-vision","fa fa-envelope-open","fa fa-address-book","fa fa-address-card","fa fa-user-circle","fa fa-id-badge","fa fa-id-card","fa fa-thermometer-full","fa fa-thermometer-three-quarters","fa fa-thermometer-half","fa fa-thermometer-quarter","fa fa-thermometer-empty","fa fa-shower","fa fa-bath","fa fa-podcast","fa fa-window-maximize","fa fa-window-minimize","fa fa-window-restore","fa fa-window-close","fa fa-microchip","fa fa-spell-check","fa fa-moon","fa fa-sun"],"Text Editor Icons":["fa fa-th-large","fa fa-th","fa fa-th-list","fa fa-list-alt","fa fa-font","fa fa-bold","fa fa-italic","fa fa-text-height","fa fa-text-width","fa fa-align-left","fa fa-align-center","fa fa-align-right","fa fa-align-justify","fa fa-list","fa fa-outdent","fa fa-indent","fa fa-link","fa fa-paperclip","fa fa-list-ul","fa fa-list-ol","fa fa-strikethrough","fa fa-underline","fa fa-table","fa fa-columns","fa fa-undo","fa fa-clipboard","fa fa-superscript","fa fa-subscript","fa fa-eraser","fa fa-file","fa fa-paragraph"],"Directional Icons":["fa fa-chevron-left","fa fa-chevron-right","fa fa-arrow-left","fa fa-arrow-right","fa fa-arrow-up","fa fa-arrow-down","fa fa-chevron-up","fa fa-chevron-down","fa fa-arrow-circle-left","fa fa-arrow-circle-right","fa fa-arrow-circle-up","fa fa-arrow-circle-down","fa fa-caret-down","fa fa-caret-up","fa fa-caret-left","fa fa-caret-right","fa fa-angle-double-left","fa fa-angle-double-right","fa fa-angle-double-up","fa fa-angle-double-down","fa fa-angle-left","fa fa-angle-right","fa fa-angle-up","fa fa-angle-down","fa fa-chevron-circle-left","fa fa-chevron-circle-right","fa fa-chevron-circle-up","fa fa-chevron-circle-down"],"Video Player Icons":["fa fa-step-backward","fa fa-fast-backward","fa fa-backward","fa fa-play","fa fa-pause","fa fa-stop","fa fa-forward","fa fa-fast-forward","fa fa-step-forward","fa fa-eject","fa fa-expand","fa fa-compress","fa fa-arrows-alt","fa fa-play-circle","fa fa-pause-circle","fa fa-stop-circle"],"Medical Icons":["fa fa-user-md","fa fa-stethoscope","fa fa-ambulance","fa fa-medkit","fa fa-h-square","fa fa-plus-square"],"Gender Icons":["fa fa-venus","fa fa-mars","fa fa-mercury","fa fa-transgender","fa fa-transgender-alt","fa fa-venus-double","fa fa-mars-double","fa fa-venus-mars","fa fa-mars-stroke","fa fa-mars-stroke-v","fa fa-mars-stroke-h","fa fa-neuter","fa fa-genderless"],"Transportation Icons":["fa fa-train","fa fa-subway"]};var fe=wa,oe=ca,re=xa,ne=ka,ga=function(c,t,e,o,l,d,h,s){for(var r=l,u=0,I=h?ne(h,s):!1,x,g;u0&&fe(x)?(g=oe(x),r=ga(c,t,x,g,r,d-1)-1):(re(r+1),c[r]=x),r++),u++;return r},ie=ga,se=da,le=ie,ce=Sa,de=ca,ue=Ma,ge=Ca;se({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=ce(this),o=de(e),l=ge(e,0);return l.length=le(l,e,e,o,0,t===void 0?1:ue(t)),l}});var pe=Ia;pe("flat");var me=da,he=ae.values;me({target:"Object",stat:!0},{values:function(t){return he(t)}});function ra(c,t){var e=Object.keys(c);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(c);t&&(o=o.filter(function(l){return Object.getOwnPropertyDescriptor(c,l).enumerable})),e.push.apply(e,o)}return e}function ve(c){for(var t=1;t img").forEach(function(v){var L=document.createElement("span");L.innerHTML=''),v.parentNode.replaceChild(L,v)})},I=function(w){o(),l(w)},x=function(w){var v=w.replace("fa fa-","");return a("li",{className:"col-span-1 inline-block"},w,a("button",{className:"flex items-center justify-center rounded-full p-1.5 hover:bg-gray-50 dark:hover:bg-primary-800","aria-label":v,title:v,onClick:function(){return I(v)}},void 0,a("i",{className:z(w,"h-[1.375rem] w-[1.375rem] text-lg leading-[1.15]")})))},g=h.formatMessage(be.emoji);return H.createElement("div",{className:z("absolute z-[101] -my-0.5"),style:ve({transform:"translateX(calc(-1 * env(safe-area-inset-right)))"},d),ref:u},a("div",{className:"h-[270px] overflow-x-hidden overflow-y-scroll rounded bg-white p-1.5 text-gray-900 dark:bg-primary-900 dark:text-gray-100","aria-label":g},void 0,a(La,{className:"px-1.5 py-1"},void 0,a(p,{id:"icon_button.icons",defaultMessage:"Icons"})),a("ul",{className:"grid grid-cols-8"},void 0,Object.values(e).flat().map(function(y){return x(y)}))))},ye=F({emoji:{id:"icon_button.label",defaultMessage:"Select icon"}}),we=function(t){var e=t.value,o=t.onPickIcon,l=q(),d=m.useState(!1),h=j(d,2),s=h[0],r=h[1],u=m.useState(),I=j(u,2),x=I[0],g=I[1],y=m.useRef(null),w=function(S){var B=S.target;r(!0);var $=B.getBoundingClientRect(),K=$.top;g(K*20&&fe(x)?(g=oe(x),r=ga(c,t,x,g,r,d-1)-1):(re(r+1),c[r]=x),r++),u++;return r},ie=ga,se=da,le=ie,ce=Sa,de=ca,ue=Ma,ge=Ca;se({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=ce(this),o=de(e),l=ge(e,0);return l.length=le(l,e,e,o,0,t===void 0?1:ue(t)),l}});var pe=Ia;pe("flat");var me=da,he=ae.values;me({target:"Object",stat:!0},{values:function(t){return he(t)}});function ra(c,t){var e=Object.keys(c);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(c);t&&(o=o.filter(function(l){return Object.getOwnPropertyDescriptor(c,l).enumerable})),e.push.apply(e,o)}return e}function ve(c){for(var t=1;t img").forEach(function(v){var L=document.createElement("span");L.innerHTML=''),v.parentNode.replaceChild(L,v)})},I=function(w){o(),l(w)},x=function(w){var v=w.replace("fa fa-","");return a("li",{className:"col-span-1 inline-block"},w,a("button",{className:"flex items-center justify-center rounded-full p-1.5 hover:bg-gray-50 dark:hover:bg-primary-800","aria-label":v,title:v,onClick:function(){return I(v)}},void 0,a("i",{className:z(w,"h-[1.375rem] w-[1.375rem] text-lg leading-[1.15]")})))},g=h.formatMessage(be.emoji);return H.createElement("div",{className:z("absolute z-[101] -my-0.5"),style:ve({transform:"translateX(calc(-1 * env(safe-area-inset-right)))"},d),ref:u},a("div",{className:"h-[270px] overflow-x-hidden overflow-y-scroll rounded bg-white p-1.5 text-gray-900 dark:bg-primary-900 dark:text-gray-100","aria-label":g},void 0,a(La,{className:"px-1.5 py-1"},void 0,a(p,{id:"icon_button.icons",defaultMessage:"Icons"})),a("ul",{className:"grid grid-cols-8"},void 0,Object.values(e).flat().map(function(y){return x(y)}))))},ye=F({emoji:{id:"icon_button.label",defaultMessage:"Select icon"}}),we=function(t){var e=t.value,o=t.onPickIcon,l=q(),d=m.useState(!1),h=j(d,2),s=h[0],r=h[1],u=m.useState(),I=j(u,2),x=I[0],g=I[1],y=m.useRef(null),w=function(S){var B=S.target;r(!0);var $=B.getBoundingClientRect(),K=$.top;g(K*20;return e(R,{onSubmit:n},void 0,e(M,{space:2},void 0,e("label",{className:"relative grow"},void 0,e("span",{style:{display:"none"}},void 0,i.formatMessage(u.search)),e(w,{type:"text",value:o,onChange:r,placeholder:i.formatMessage(u.search)}),e("div",{role:"button",tabIndex:0,className:"search__icon",onClick:l},void 0,e(F,{src:z,"aria-label":i.formatMessage(u.search),className:q("svg-icon--backspace",{active:d})}))),e(A,{onClick:n},void 0,i.formatMessage(u.searchTitle))))},b=f({close:{id:"lightbox.close",defaultMessage:"Close"},changeTitle:{id:"lists.edit.submit",defaultMessage:"Change title"},addToList:{id:"lists.account.add",defaultMessage:"Add to list"},removeFromList:{id:"lists.account.remove",defaultMessage:"Remove from list"},editList:{id:"lists.edit",defaultMessage:"Edit list"}}),U=function(i){var t=i.listId,o=i.onClose,r=v(),n=m(),l=c(function(a){return a.listEditor.accounts.items}),d=c(function(a){return a.listEditor.suggestions.items});P.useEffect(function(){return n($(t)),function(){n(G())}},[]);var s=function(){o("LIST_ADDER")};return e(j,{title:e(W,{id:"lists.edit",defaultMessage:"Edit list"}),onClose:s},void 0,e(C,{},void 0,e(p,{title:r.formatMessage(b.changeTitle)})),e(K,{}),e("br",{}),l.size>0&&e("div",{},void 0,e(C,{},void 0,e(p,{title:r.formatMessage(b.removeFromList)})),e("div",{className:"max-h-48 overflow-y-auto"},void 0,l.map(function(a){return e(I,{accountId:a},a)}))),e("br",{}),e(C,{},void 0,e(p,{title:r.formatMessage(b.addToList)})),e(V,{}),e("div",{className:"max-h-48 overflow-y-auto"},void 0,d.map(function(a){return e(I,{accountId:a},a)})))};export{U as default}; +import{u as v,d as m,q as c,a as e,a5 as k,a9 as E,bW as T,B as _,H as M,o as f,eE as N,eF as x,bG as w,aa as A,bE as R,cR as y,cS as L,I as F,W as q,eG as D,eH as H,eI as B,r as P,eJ as $,eK as G,eL as C,cy as p,F as W,bu as j}from"../index-be605fd2.js";import{v as z}from"./backspace-c284aa0a.js";var S=f({remove:{id:"lists.account.remove",defaultMessage:"Remove from list"},add:{id:"lists.account.add",defaultMessage:"Add to list"}}),I=function(i){var t=i.accountId,o=v(),r=m(),n=c(function(a){return a.listEditor.accounts.items.includes(t)}),l=function(){return r(N(t))},d=function(){return r(x(t))},s;return n?s=e(E,{src:k,iconClassName:"h-5 w-5",title:o.formatMessage(S.remove),onClick:l}):s=e(E,{src:T,iconClassName:"h-5 w-5",title:o.formatMessage(S.add),onClick:d}),e(M,{space:1,alignItems:"center",justifyContent:"between",className:"p-2.5"},void 0,e("div",{className:"w-full"},void 0,e(_,{id:t,withRelationship:!1})),s)},J=f({title:{id:"lists.edit.submit",defaultMessage:"Change title"},save:{id:"lists.new.save_title",defaultMessage:"Save Title"}}),K=function(){var i=v(),t=m(),o=c(function(a){return a.listEditor.title}),r=c(function(a){return!a.listEditor.isChanged}),n=function(h){t(y(h.target.value))},l=function(h){h.preventDefault(),t(L(!1))},d=function(){t(L(!1))},s=i.formatMessage(J.save);return e(R,{onSubmit:l},void 0,e(M,{space:2},void 0,e(w,{outerClassName:"grow",type:"text",value:o,onChange:n}),e(A,{onClick:d,disabled:r},void 0,s)))},u=f({search:{id:"lists.search",defaultMessage:"Search among people you follow"},searchTitle:{id:"tabs_bar.search",defaultMessage:"Search"}}),V=function(){var i=v(),t=m(),o=c(function(s){return s.listEditor.suggestions.value}),r=function(a){t(D(a.target.value))},n=function(){t(H(o))},l=function(){t(B())},d=o.length>0;return e(R,{onSubmit:n},void 0,e(M,{space:2},void 0,e("label",{className:"relative grow"},void 0,e("span",{style:{display:"none"}},void 0,i.formatMessage(u.search)),e(w,{type:"text",value:o,onChange:r,placeholder:i.formatMessage(u.search)}),e("div",{role:"button",tabIndex:0,className:"search__icon",onClick:l},void 0,e(F,{src:z,"aria-label":i.formatMessage(u.search),className:q("svg-icon--backspace",{active:d})}))),e(A,{onClick:n},void 0,i.formatMessage(u.searchTitle))))},b=f({close:{id:"lightbox.close",defaultMessage:"Close"},changeTitle:{id:"lists.edit.submit",defaultMessage:"Change title"},addToList:{id:"lists.account.add",defaultMessage:"Add to list"},removeFromList:{id:"lists.account.remove",defaultMessage:"Remove from list"},editList:{id:"lists.edit",defaultMessage:"Edit list"}}),U=function(i){var t=i.listId,o=i.onClose,r=v(),n=m(),l=c(function(a){return a.listEditor.accounts.items}),d=c(function(a){return a.listEditor.suggestions.items});P.useEffect(function(){return n($(t)),function(){n(G())}},[]);var s=function(){o("LIST_ADDER")};return e(j,{title:e(W,{id:"lists.edit",defaultMessage:"Edit list"}),onClose:s},void 0,e(C,{},void 0,e(p,{title:r.formatMessage(b.changeTitle)})),e(K,{}),e("br",{}),l.size>0&&e("div",{},void 0,e(C,{},void 0,e(p,{title:r.formatMessage(b.removeFromList)})),e("div",{className:"max-h-48 overflow-y-auto"},void 0,l.map(function(a){return e(I,{accountId:a},a)}))),e("br",{}),e(C,{},void 0,e(p,{title:r.formatMessage(b.addToList)})),e(V,{}),e("div",{className:"max-h-48 overflow-y-auto"},void 0,d.map(function(a){return e(I,{accountId:a},a)})))};export{U as default}; diff --git a/packs/js/index-fb44cfe6.js b/packs/js/index-4d67014f.js similarity index 75% rename from packs/js/index-fb44cfe6.js rename to packs/js/index-4d67014f.js index 5ccafd104..e539c54e1 100644 --- a/packs/js/index-fb44cfe6.js +++ b/packs/js/index-4d67014f.js @@ -1 +1 @@ -import{u as m,a as e,aB as u,X as o,b2 as d,o as g,F as f}from"../index-7380452a.js";import{b as p}from"./useAccountList-6ddad2aa.js";import{S as b}from"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var k=g({heading:{id:"column.blocks",defaultMessage:"Blocks"}}),N=function(){var t=m(),a=p(),r=a.accounts,l=a.hasNextPage,i=a.fetchNextPage,n=a.isLoading;if(n)return e(o,{},void 0,e(u,{}));var c=e(f,{id:"empty_column.blocks",defaultMessage:"You haven't blocked any users yet."});return e(o,{label:t.formatMessage(k.heading)},void 0,e(b,{scrollKey:"blocks",onLoadMore:i,hasMore:l,emptyMessage:c,emptyMessageCard:!1,itemClassName:"pb-4 last:pb-0"},void 0,r.map(function(s){return e(d,{account:s,actionType:"blocking"},s.id)})))};export{N as default}; +import{u as m,a as e,aB as u,X as o,b2 as d,o as g,F as f}from"../index-be605fd2.js";import{b as p}from"./useAccountList-32cce5e6.js";import{S as b}from"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var k=g({heading:{id:"column.blocks",defaultMessage:"Blocks"}}),N=function(){var t=m(),a=p(),r=a.accounts,l=a.hasNextPage,i=a.fetchNextPage,n=a.isLoading;if(n)return e(o,{},void 0,e(u,{}));var c=e(f,{id:"empty_column.blocks",defaultMessage:"You haven't blocked any users yet."});return e(o,{label:t.formatMessage(k.heading)},void 0,e(b,{scrollKey:"blocks",onLoadMore:i,hasMore:l,emptyMessage:c,emptyMessageCard:!1,itemClassName:"pb-4 last:pb-0"},void 0,r.map(function(s){return e(d,{account:s,actionType:"blocking"},s.id)})))};export{N as default}; diff --git a/packs/js/index-ba3389ca.js b/packs/js/index-4dc438b1.js similarity index 75% rename from packs/js/index-ba3389ca.js rename to packs/js/index-4dc438b1.js index 252dafc75..acf11baa5 100644 --- a/packs/js/index-ba3389ca.js +++ b/packs/js/index-4dc438b1.js @@ -1 +1 @@ -import{Q as u,l1 as f,u as g,d as m,r as c,l2 as p,q as o,a as e,X as h,o as w,F as v}from"../index-7380452a.js";import{H as M}from"./hashtag-1d2f7520.js";import{S as _}from"./scrollable-list-df58e451.js";import{P as F}from"./placeholder-hashtag-f832d585.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var L=w({heading:{id:"column.followed_tags",defaultMessage:"Followed hashtags"}}),y=u(function(s){s(f())},300,{leading:!0}),A=function(){var l=g(),t=m();c.useEffect(function(){t(p())},[]);var r=o(function(a){return a.followed_tags.items}),n=o(function(a){return a.followed_tags.isLoading}),d=o(function(a){return!!a.followed_tags.next}),i=e(v,{id:"empty_column.followed_tags",defaultMessage:"You haven't followed any hashtag yet."});return e(h,{label:l.formatMessage(L.heading)},void 0,e(_,{scrollKey:"followed_tags",emptyMessage:i,isLoading:n,hasMore:d,onLoadMore:function(){return y(t)},placeholderComponent:F,placeholderCount:5,itemClassName:"pb-3"},void 0,r.map(function(a){return e(M,{hashtag:a},a.name)})))};export{A as default}; +import{Q as u,l1 as f,u as g,d as m,r as c,l2 as p,q as o,a as e,X as h,o as w,F as v}from"../index-be605fd2.js";import{H as M}from"./hashtag-394c7092.js";import{S as _}from"./scrollable-list-1e43c72d.js";import{P as F}from"./placeholder-hashtag-fb054a2b.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var L=w({heading:{id:"column.followed_tags",defaultMessage:"Followed hashtags"}}),y=u(function(s){s(f())},300,{leading:!0}),A=function(){var l=g(),t=m();c.useEffect(function(){t(p())},[]);var r=o(function(a){return a.followed_tags.items}),n=o(function(a){return a.followed_tags.isLoading}),d=o(function(a){return!!a.followed_tags.next}),i=e(v,{id:"empty_column.followed_tags",defaultMessage:"You haven't followed any hashtag yet."});return e(h,{label:l.formatMessage(L.heading)},void 0,e(_,{scrollKey:"followed_tags",emptyMessage:i,isLoading:n,hasMore:d,onLoadMore:function(){return y(t)},placeholderComponent:F,placeholderCount:5,itemClassName:"pb-3"},void 0,r.map(function(a){return e(M,{hashtag:a},a.name)})))};export{A as default}; diff --git a/packs/js/index-501024f5.js b/packs/js/index-501024f5.js new file mode 100644 index 000000000..dd2f5c31e --- /dev/null +++ b/packs/js/index-501024f5.js @@ -0,0 +1 @@ +import{a as e,aC as a}from"../index-be605fd2.js";var r=function(){return e(a,{})};export{r as default}; diff --git a/packs/js/index-2846fb7c.js b/packs/js/index-566a3dfd.js similarity index 65% rename from packs/js/index-2846fb7c.js rename to packs/js/index-566a3dfd.js index 12bf2a13b..cb2cc8784 100644 --- a/packs/js/index-2846fb7c.js +++ b/packs/js/index-566a3dfd.js @@ -1 +1 @@ -import{u as l,d as f,ay as g,q as e,aR as v,r as M,aS as _,a as t,aC as h,F as S,X as w,o as P}from"../index-7380452a.js";import{S as A}from"./status-list-13fdd81b.js";import"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";import"./status-container-59e57baf.js";import"./pending-status-7f660229.js";import"./poll-preview-66340c9e.js";import"./noop-19c18e1e.js";var L=P({heading:{id:"column.pins",defaultMessage:"Pinned posts"}}),D=function(){var n=l(),r=f(),i=g(),o=i.username,u=e(function(s){var a;return((a=v(s))===null||a===void 0?void 0:a.username)||""}),p=e(function(s){return s.status_lists.get("pins").items}),m=e(function(s){return!!s.status_lists.get("pins").isLoading}),c=e(function(s){return!!s.status_lists.get("pins").next}),d=o.toLowerCase()===u.toLowerCase();return M.useEffect(function(){r(_())},[]),d?t(w,{label:n.formatMessage(L.heading),transparent:!0},void 0,t(A,{statusIds:p,scrollKey:"pinned_statuses",hasMore:c,isLoading:m,emptyMessage:t(S,{id:"pinned_statuses.none",defaultMessage:"No pins to show."})})):t(h,{})};export{D as default}; +import{u as l,d as f,ay as g,q as e,aR as v,r as M,aS as _,a as t,aC as h,F as S,X as w,o as P}from"../index-be605fd2.js";import{S as A}from"./status-list-c10445e1.js";import"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";import"./status-container-e53698d2.js";import"./pending-status-959f7aeb.js";import"./poll-preview-ddaf662b.js";import"./noop-3f99ae3e.js";var L=P({heading:{id:"column.pins",defaultMessage:"Pinned posts"}}),D=function(){var n=l(),r=f(),i=g(),o=i.username,u=e(function(s){var a;return((a=v(s))===null||a===void 0?void 0:a.username)||""}),p=e(function(s){return s.status_lists.get("pins").items}),m=e(function(s){return!!s.status_lists.get("pins").isLoading}),c=e(function(s){return!!s.status_lists.get("pins").next}),d=o.toLowerCase()===u.toLowerCase();return M.useEffect(function(){r(_())},[]),d?t(w,{label:n.formatMessage(L.heading),transparent:!0},void 0,t(A,{statusIds:p,scrollKey:"pinned_statuses",hasMore:c,isLoading:m,emptyMessage:t(S,{id:"pinned_statuses.none",defaultMessage:"No pins to show."})})):t(h,{})};export{D as default}; diff --git a/packs/js/index-f30036af.js b/packs/js/index-57b05c05.js similarity index 81% rename from packs/js/index-f30036af.js rename to packs/js/index-57b05c05.js index 49d6970fa..e34a7645d 100644 --- a/packs/js/index-f30036af.js +++ b/packs/js/index-57b05c05.js @@ -1 +1 @@ -import{u as k,d as $,b8 as x,aV as C,q as l,b9 as E,r as c,Q as O,ba as I,bb as R,bc as U,bd as p,be as _,aW as K,a as s,F as v,X as g,aC as W,o as q}from"../index-7380452a.js";import{S as B}from"./status-list-13fdd81b.js";import"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";import"./status-container-59e57baf.js";import"./pending-status-7f660229.js";import"./poll-preview-66340c9e.js";import"./noop-19c18e1e.js";var D=q({heading:{id:"column.favourited_statuses",defaultMessage:"Liked posts"}}),G=function(h){var n,i=h.params,b=k(),a=$(),y=x(),r=y.account,f=C(i==null?void 0:i.username,{withRelationship:!0}),e=f.account,A=f.isUnavailable,m=(i==null?void 0:i.username)||"",o=m.toLowerCase()===(r==null||(n=r.acct)===null||n===void 0?void 0:n.toLowerCase()),d=o?"favourites":"favourites:".concat(e==null?void 0:e.id),w=l(function(u){var t;return((t=u.status_lists.get(d))===null||t===void 0?void 0:t.items)||E()}),M=l(function(u){var t;return((t=u.status_lists.get(d))===null||t===void 0?void 0:t.isLoading)===!0}),L=l(function(u){var t;return!!((t=u.status_lists.get(d))!==null&&t!==void 0&&t.next)}),F=c.useCallback(O(function(){o?a(I()):e&&a(R(e.id))},300,{leading:!0}),[e==null?void 0:e.id]);if(c.useEffect(function(){o?a(U()):e?(a(p(e.id)),a(_(e.id))):a(K(m))},[]),c.useEffect(function(){e&&!o&&(a(p(e.id)),a(_(e.id)))},[e==null?void 0:e.id]),A)return s(g,{},void 0,s("div",{className:"empty-column-indicator"},void 0,s(v,{id:"empty_column.account_unavailable",defaultMessage:"Profile unavailable"})));if(!e)return s(W,{});var S=o?s(v,{id:"empty_column.favourited_statuses",defaultMessage:"You don't have any liked posts yet. When you like one, it will show up here."}):s(v,{id:"empty_column.account_favourited_statuses",defaultMessage:"This user doesn't have any liked posts yet."});return s(g,{label:b.formatMessage(D.heading),withHeader:!1,transparent:!0},void 0,s(B,{statusIds:w,scrollKey:"favourited_statuses",hasMore:L,isLoading:M,onLoadMore:F,emptyMessage:S}))};export{G as default}; +import{u as k,d as $,b8 as x,aV as C,q as l,b9 as E,r as c,Q as O,ba as I,bb as R,bc as U,bd as p,be as _,aW as K,a as s,F as v,X as g,aC as W,o as q}from"../index-be605fd2.js";import{S as B}from"./status-list-c10445e1.js";import"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";import"./status-container-e53698d2.js";import"./pending-status-959f7aeb.js";import"./poll-preview-ddaf662b.js";import"./noop-3f99ae3e.js";var D=q({heading:{id:"column.favourited_statuses",defaultMessage:"Liked posts"}}),G=function(h){var n,i=h.params,b=k(),a=$(),y=x(),r=y.account,f=C(i==null?void 0:i.username,{withRelationship:!0}),e=f.account,A=f.isUnavailable,m=(i==null?void 0:i.username)||"",o=m.toLowerCase()===(r==null||(n=r.acct)===null||n===void 0?void 0:n.toLowerCase()),d=o?"favourites":"favourites:".concat(e==null?void 0:e.id),w=l(function(u){var t;return((t=u.status_lists.get(d))===null||t===void 0?void 0:t.items)||E()}),M=l(function(u){var t;return((t=u.status_lists.get(d))===null||t===void 0?void 0:t.isLoading)===!0}),L=l(function(u){var t;return!!((t=u.status_lists.get(d))!==null&&t!==void 0&&t.next)}),F=c.useCallback(O(function(){o?a(I()):e&&a(R(e.id))},300,{leading:!0}),[e==null?void 0:e.id]);if(c.useEffect(function(){o?a(U()):e?(a(p(e.id)),a(_(e.id))):a(K(m))},[]),c.useEffect(function(){e&&!o&&(a(p(e.id)),a(_(e.id)))},[e==null?void 0:e.id]),A)return s(g,{},void 0,s("div",{className:"empty-column-indicator"},void 0,s(v,{id:"empty_column.account_unavailable",defaultMessage:"Profile unavailable"})));if(!e)return s(W,{});var S=o?s(v,{id:"empty_column.favourited_statuses",defaultMessage:"You don't have any liked posts yet. When you like one, it will show up here."}):s(v,{id:"empty_column.account_favourited_statuses",defaultMessage:"This user doesn't have any liked posts yet."});return s(g,{label:b.formatMessage(D.heading),withHeader:!1,transparent:!0},void 0,s(B,{statusIds:w,scrollKey:"favourited_statuses",hasMore:L,isLoading:M,onLoadMore:F,emptyMessage:S}))};export{G as default}; diff --git a/packs/js/index-23ba0bda.js b/packs/js/index-5b71c76b.js similarity index 94% rename from packs/js/index-23ba0bda.js rename to packs/js/index-5b71c76b.js index 82ec22b73..fc6515154 100644 --- a/packs/js/index-23ba0bda.js +++ b/packs/js/index-5b71c76b.js @@ -1 +1 @@ -import{u as _,d as M,g as x,q as m,b3 as R,a as e,bW as E,a9 as O,b2 as q,H as I,o as y,iX as D,aa as K,I as T,W as U,iY as j,iZ as N,i_ as H,b8 as L,bL as P,r as B,i$ as W,y as b,F as f,a5 as X,eL as k,cy as S,X as Y,j0 as z}from"../index-7380452a.js";import{S as V}from"./scrollable-list-df58e451.js";import{v as Z}from"./backspace-c284aa0a.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var G=y({add:{id:"aliases.account.add",defaultMessage:"Create alias"}}),J=function(t){var i,n=t.accountId,v=t.aliases,o=_(),d=M(),c=x(),u=m(function(w){return w.me}),r=R(n),a=r.account,s=a==null||(i=a.pleroma)===null||i===void 0?void 0:i.ap_id,l=c.accountMoving?a==null?void 0:a.acct:s,g=l?v.includes(l):!1,F=function(){return d(D(a))};if(!a)return null;var C;return!g&&n!==u&&(C=e(O,{src:E,iconClassName:"h-5 w-5",title:o.formatMessage(G.add),onClick:F})),e(I,{space:1,alignItems:"center",justifyContent:"between",className:"p-2.5"},void 0,e("div",{className:"w-full"},void 0,e(q,{account:a,withRelationship:!1})),C)},h=y({search:{id:"aliases.search",defaultMessage:"Search your old account"},searchTitle:{id:"tabs_bar.search",defaultMessage:"Search"}}),Q=function(){var t=M(),i=_(),n=m(function(r){return r.aliases.suggestions.value}),v=function(a){t(j(a.target.value))},o=function(a){a.keyCode===13&&t(N(n))},d=function(){t(N(n))},c=function(){t(H())},u=n.length>0;return e("div",{className:"flex items-center gap-1"},void 0,e("label",{className:"relative grow"},void 0,e("span",{style:{display:"none"}},void 0,i.formatMessage(h.search)),e("input",{className:"block w-full rounded-full focus:border-primary-500 focus:ring-primary-500 dark:bg-gray-800 dark:text-white dark:placeholder:text-gray-500 sm:text-sm",type:"text",value:n,onChange:v,onKeyUp:o,placeholder:i.formatMessage(h.search)}),e("div",{role:"button",tabIndex:u?0:-1,className:"search__icon",onClick:c},void 0,e(T,{src:Z,"aria-label":i.formatMessage(h.search),className:U("svg-icon--backspace",{active:u})}))),e(K,{onClick:d},void 0,i.formatMessage(h.searchTitle)))},p=y({heading:{id:"column.aliases",defaultMessage:"Account aliases"},subheading_add_new:{id:"column.aliases.subheading_add_new",defaultMessage:"Add New Alias"},create_error:{id:"column.aliases.create_error",defaultMessage:"Error creating alias"},delete_error:{id:"column.aliases.delete_error",defaultMessage:"Error deleting alias"},subheading_aliases:{id:"column.aliases.subheading_aliases",defaultMessage:"Current aliases"},delete:{id:"column.aliases.delete",defaultMessage:"Delete"}}),ie=function(){var t=_(),i=M(),n=x(),v=L(),o=v.account,d=m(function(s){if(n.accountMoving)return P(s.aliases.aliases.items);var l,g;return(l=o==null||(g=o.pleroma)===null||g===void 0?void 0:g.also_known_as)!==null&&l!==void 0?l:[]}),c=m(function(s){return s.aliases.suggestions.items}),u=m(function(s){return s.aliases.suggestions.loaded});B.useEffect(function(){i(W)},[]);var r=function(l){i(z(l.currentTarget.dataset.value))},a=e(f,{id:"empty_column.aliases",defaultMessage:"You haven't created any account alias yet."});return e(Y,{className:"aliases-settings-panel",label:t.formatMessage(p.heading)},void 0,e(k,{},void 0,e(S,{title:t.formatMessage(p.subheading_add_new)})),e(Q,{}),u&&c.size===0?e("div",{className:"aliases__accounts empty-column-indicator"},void 0,e(f,{id:"empty_column.aliases.suggestions",defaultMessage:"There are no account suggestions available for the provided term."})):e("div",{className:"aliases__accounts mb-4"},void 0,c.map(function(s){return e(J,{accountId:s,aliases:d},s)})),e(k,{},void 0,e(S,{title:t.formatMessage(p.subheading_aliases)})),e("div",{className:"aliases-settings-panel"},void 0,e(V,{scrollKey:"aliases",emptyMessage:a},void 0,d.map(function(s,l){return e(I,{alignItems:"center",justifyContent:"between",space:1,className:"p-2"},l,e("div",{},void 0,e(b,{tag:"span",theme:"muted"},void 0,e(f,{id:"aliases.account_label",defaultMessage:"Old account:"}))," ",e(b,{tag:"span"},void 0,s)),e("div",{className:"flex items-center",role:"button",tabIndex:0,onClick:r,"data-value":s,"aria-label":t.formatMessage(p.delete)},void 0,e(T,{className:"mr-1.5",src:X}),e(b,{weight:"bold",theme:"muted"},void 0,e(f,{id:"aliases.aliases_list_delete",defaultMessage:"Unlink alias"}))))}))))};export{ie as default}; +import{u as _,d as M,g as x,q as m,b3 as R,a as e,bW as E,a9 as O,b2 as q,H as I,o as y,iX as D,aa as K,I as T,W as U,iY as j,iZ as N,i_ as H,b8 as L,bL as P,r as B,i$ as W,y as b,F as f,a5 as X,eL as k,cy as S,X as Y,j0 as z}from"../index-be605fd2.js";import{S as V}from"./scrollable-list-1e43c72d.js";import{v as Z}from"./backspace-c284aa0a.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var G=y({add:{id:"aliases.account.add",defaultMessage:"Create alias"}}),J=function(t){var i,n=t.accountId,v=t.aliases,o=_(),d=M(),c=x(),u=m(function(w){return w.me}),r=R(n),a=r.account,s=a==null||(i=a.pleroma)===null||i===void 0?void 0:i.ap_id,l=c.accountMoving?a==null?void 0:a.acct:s,g=l?v.includes(l):!1,F=function(){return d(D(a))};if(!a)return null;var C;return!g&&n!==u&&(C=e(O,{src:E,iconClassName:"h-5 w-5",title:o.formatMessage(G.add),onClick:F})),e(I,{space:1,alignItems:"center",justifyContent:"between",className:"p-2.5"},void 0,e("div",{className:"w-full"},void 0,e(q,{account:a,withRelationship:!1})),C)},h=y({search:{id:"aliases.search",defaultMessage:"Search your old account"},searchTitle:{id:"tabs_bar.search",defaultMessage:"Search"}}),Q=function(){var t=M(),i=_(),n=m(function(r){return r.aliases.suggestions.value}),v=function(a){t(j(a.target.value))},o=function(a){a.keyCode===13&&t(N(n))},d=function(){t(N(n))},c=function(){t(H())},u=n.length>0;return e("div",{className:"flex items-center gap-1"},void 0,e("label",{className:"relative grow"},void 0,e("span",{style:{display:"none"}},void 0,i.formatMessage(h.search)),e("input",{className:"block w-full rounded-full focus:border-primary-500 focus:ring-primary-500 dark:bg-gray-800 dark:text-white dark:placeholder:text-gray-500 sm:text-sm",type:"text",value:n,onChange:v,onKeyUp:o,placeholder:i.formatMessage(h.search)}),e("div",{role:"button",tabIndex:u?0:-1,className:"search__icon",onClick:c},void 0,e(T,{src:Z,"aria-label":i.formatMessage(h.search),className:U("svg-icon--backspace",{active:u})}))),e(K,{onClick:d},void 0,i.formatMessage(h.searchTitle)))},p=y({heading:{id:"column.aliases",defaultMessage:"Account aliases"},subheading_add_new:{id:"column.aliases.subheading_add_new",defaultMessage:"Add New Alias"},create_error:{id:"column.aliases.create_error",defaultMessage:"Error creating alias"},delete_error:{id:"column.aliases.delete_error",defaultMessage:"Error deleting alias"},subheading_aliases:{id:"column.aliases.subheading_aliases",defaultMessage:"Current aliases"},delete:{id:"column.aliases.delete",defaultMessage:"Delete"}}),ie=function(){var t=_(),i=M(),n=x(),v=L(),o=v.account,d=m(function(s){if(n.accountMoving)return P(s.aliases.aliases.items);var l,g;return(l=o==null||(g=o.pleroma)===null||g===void 0?void 0:g.also_known_as)!==null&&l!==void 0?l:[]}),c=m(function(s){return s.aliases.suggestions.items}),u=m(function(s){return s.aliases.suggestions.loaded});B.useEffect(function(){i(W)},[]);var r=function(l){i(z(l.currentTarget.dataset.value))},a=e(f,{id:"empty_column.aliases",defaultMessage:"You haven't created any account alias yet."});return e(Y,{className:"aliases-settings-panel",label:t.formatMessage(p.heading)},void 0,e(k,{},void 0,e(S,{title:t.formatMessage(p.subheading_add_new)})),e(Q,{}),u&&c.size===0?e("div",{className:"aliases__accounts empty-column-indicator"},void 0,e(f,{id:"empty_column.aliases.suggestions",defaultMessage:"There are no account suggestions available for the provided term."})):e("div",{className:"aliases__accounts mb-4"},void 0,c.map(function(s){return e(J,{accountId:s,aliases:d},s)})),e(k,{},void 0,e(S,{title:t.formatMessage(p.subheading_aliases)})),e("div",{className:"aliases-settings-panel"},void 0,e(V,{scrollKey:"aliases",emptyMessage:a},void 0,d.map(function(s,l){return e(I,{alignItems:"center",justifyContent:"between",space:1,className:"p-2"},l,e("div",{},void 0,e(b,{tag:"span",theme:"muted"},void 0,e(f,{id:"aliases.account_label",defaultMessage:"Old account:"}))," ",e(b,{tag:"span"},void 0,s)),e("div",{className:"flex items-center",role:"button",tabIndex:0,onClick:r,"data-value":s,"aria-label":t.formatMessage(p.delete)},void 0,e(T,{className:"mr-1.5",src:X}),e(b,{weight:"bold",theme:"muted"},void 0,e(f,{id:"aliases.aliases_list_delete",defaultMessage:"Unlink alias"}))))}))))};export{ie as default}; diff --git a/packs/js/index-625bf5da.js b/packs/js/index-5eda592e.js similarity index 98% rename from packs/js/index-625bf5da.js rename to packs/js/index-5eda592e.js index 853c41ef4..69f94479b 100644 --- a/packs/js/index-625bf5da.js +++ b/packs/js/index-5eda592e.js @@ -1,4 +1,4 @@ -import{u as n,d as l,R as c,jj as i,jk as r,a as e,F as u,X as p,o as m}from"../index-7380452a.js";import{T as d}from"./timeline-585cfcf0.js";import"./scroll-top-button-95820d24.js";import"./status-list-13fdd81b.js";import"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";import"./status-container-59e57baf.js";import"./pending-status-7f660229.js";import"./poll-preview-66340c9e.js";import"./noop-19c18e1e.js";const _="108046224464672537",f="2022-03-30T15:40:53.287Z",b=null,g=null,h=!1,v="",x="self",y=null,$="https://truthsocial.com/users/alex/statuses/108046244464677537",w="https://truthsocial.com/@alex/108046244464677537",j=0,k=0,T=0,D=!1,q=!1,B=!1,P=!1,C=!1,Z="

A federal agent inspects a 'lumber' truck after smelling alcohol during the prohibition period. Los Angeles, 1926 (during the Prohibition era).

",V=null,E={name:"Soapbox FE",website:"https://soapbox.pub/"},G={id:"107759994408336377",username:"alex",acct:"alex",display_name:"Alex Gleason",locked:!1,bot:!1,discoverable:null,group:!1,created_at:"2022-02-08T00:00:00.000Z",note:"

Launching Truth Social

",url:"https://truthsocial.com/@alex",avatar:"https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/accounts/avatars/107/759/994/408/336/377/original/119cb0dd1fa615b7.png",avatar_static:"https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/accounts/avatars/107/759/994/408/336/377/original/119cb0dd1fa615b7.png",header:"https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/accounts/headers/107/759/994/408/336/377/original/31f62b0453ccf554.png",header_static:"https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/accounts/headers/107/759/994/408/336/377/original/31f62b0453ccf554.png",followers_count:4713,following_count:43,statuses_count:7,last_status_at:"2022-03-30",verified:!0,location:"Texas",website:"https://soapbox.pub/",emojis:[],fields:[]},I=[{id:"108635651287436632",type:"image",url:"https://static-assets-1.truthsocial.com/tmtg:prime-ts-assets/media_attachments/files/108/635/651/487/436/632/original/7873bda5a7ab45d3.jpeg",preview_url:"https://static-assets-1.truthsocial.com/tmtg:prime-ts-assets/media_attachments/files/108/635/651/487/436/632/small/7873bda5a7ab45d3.jpeg",external_video_id:null,remote_url:null,preview_remote_url:null,text_url:"https://truthsocial.com/media/_Kc-2w2Pe7knhYJV-CM",meta:{original:{width:1080,height:841,size:"1080x841",aspect:1.2841854934601664},small:{width:907,height:706,size:"907x706",aspect:1.2847025495750708}},description:null,blurhash:"UIIY5?4n~q9FIUIUD%WB?bt7M{t7of%MofIU"}],M=[],R=[],z=[],S=null,A=null,F={id:_,created_at:f,in_reply_to_id:b,in_reply_to_account_id:g,sensitive:h,spoiler_text:v,visibility:x,language:y,uri:$,url:w,replies_count:j,reblogs_count:k,favourites_count:T,favourited:D,reblogged:q,muted:B,bookmarked:P,pinned:C,content:Z,reblog:V,application:E,account:G,media_attachments:I,mentions:M,tags:R,emojis:z,card:S,poll:A},Q="108046244464677537",N="2022-03-30T15:40:53.287Z",J=null,X=null,H=!1,W="",L="public",O=null,K="https://truthsocial.com/users/alex/statuses/108046244464677537",U="https://truthsocial.com/@alex/108046244464677537",Y=0,ee=0,te=0,ae=!1,oe=!1,se=!1,ne=!1,le=!1,ce="",ie=null,re={name:"Soapbox FE",website:"https://soapbox.pub/"},ue={id:"107759994408336377",username:"alex",acct:"alex",display_name:"Alex Gleason",locked:!1,bot:!1,discoverable:null,group:!1,created_at:"2022-02-08T00:00:00.000Z",note:"

Launching Truth Social

",url:"https://truthsocial.com/@alex",avatar:"https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/accounts/avatars/107/759/994/408/336/377/original/119cb0dd1fa615b7.png",avatar_static:"https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/accounts/avatars/107/759/994/408/336/377/original/119cb0dd1fa615b7.png",header:"https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/accounts/headers/107/759/994/408/336/377/original/31f62b0453ccf554.png",header_static:"https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/accounts/headers/107/759/994/408/336/377/original/31f62b0453ccf554.png",followers_count:4713,following_count:43,statuses_count:7,last_status_at:"2022-03-30",verified:!0,location:"Texas",website:"https://soapbox.pub/",emojis:[],fields:[]},pe=[{id:"108046243948255335",type:"video",url:"https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/media_attachments/files/108/046/243/948/255/335/original/3b17ce701c0d6f08.mp4",preview_url:"https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/cache/preview_cards/images/000/543/912/original/e1fcf6ace01d9ded.jpg",external_video_id:"vwfnq9",remote_url:null,preview_remote_url:null,text_url:"https://truthsocial.com/media/SpbYvqKIT2VubC9FFn0",meta:{original:{width:988,height:556,frame_rate:"60/1",duration:1.949025,bitrate:402396}},description:null,blurhash:null}],me=[],de=[],_e=[],fe={url:"https://rumble.com/vz1trd-video-upload-for-108046244464677537.html?mref=ummtf&mc=3nvg0",title:"Video upload for 108046244464677537",description:"",type:"video",author_name:"hostid1",author_url:"https://rumble.com/user/hostid1",provider_name:"Rumble.com",provider_url:"https://rumble.com/",html:'',width:988,height:556,image:"https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/cache/preview_cards/images/000/543/912/original/e1fcf6ace01d9ded.jpg",embed_url:"",blurhash:"UQH1;m~8sks,%M~9?DRk-mRnR+xs9cWVj[bH"},be=null,ge={id:Q,created_at:N,in_reply_to_id:J,in_reply_to_account_id:X,sensitive:H,spoiler_text:W,visibility:L,language:O,uri:K,url:U,replies_count:Y,reblogs_count:ee,favourites_count:te,favourited:ae,reblogged:oe,muted:se,bookmarked:ne,pinned:le,content:ce,reblog:ie,application:re,account:ue,media_attachments:pe,mentions:me,tags:de,emojis:_e,card:fe,poll:be},he={acct:"alex",avatar:"https://media.gleasonator.com/6d64aecb17348b23aaff78db4687b9476cb0da1c07cc6a819c2e6ec7144c18b1.png",avatar_static:"https://media.gleasonator.com/6d64aecb17348b23aaff78db4687b9476cb0da1c07cc6a819c2e6ec7144c18b1.png",bot:!1,created_at:"2020-01-08T01:25:43.000Z",display_name:"Alex Gleason",emojis:[],fields:[{name:"Website",value:'https://alexgleason.me'},{name:"Pleroma+Soapbox",value:'https://soapbox.pub'},{name:"Email",value:"alex@alexgleason.me"},{name:"Gender identity",value:"Soyboy"},{name:"Donate (PayPal)",value:'https://paypal.me/gleasonator'},{name:"$BTC",value:"bc1q9cx35adpm73aq2fw40ye6ts8hfxqzjr5unwg0n"},{name:"$ETH",value:"0xAc9aB5Fc04Dc1cB1789Af75b523Bd23C70B2D717"},{name:"$DOGE",value:"D5zVZs6jrRakaPVGiErkQiHt9sayzm6V5D"},{name:"$XMR",value:"45JDCLrjJ4bgVUSbbs2yjy9m5Mf4VLPW8fG7jw9sq5u69rXZZopQogZNeyYkMBnXpkaip4p4QwaaJNhdTotPa9g44DBCzdK"}],followers_count:2220,following_count:1544,fqn:"alex@gleasonator.com",header:"https://media.gleasonator.com/accounts/headers/000/000/001/original/9d0e4dbf1c9dbc8f.png",header_static:"https://media.gleasonator.com/accounts/headers/000/000/001/original/9d0e4dbf1c9dbc8f.png",id:"9v5bmRalQvjOy0ECcC",last_status_at:"2022-01-24T21:02:44",locked:!1,note:"I create Fediverse software that empowers people online.

I'm vegan btw

Note: If you have a question for me, please tag me publicly. This gives the opportunity for others to chime in, and bystanders to learn.",pleroma:{accepts_chat_messages:!0,also_known_as:[],ap_id:"https://gleasonator.com/users/alex",background_image:null,favicon:"https://gleasonator.com/favicon.png",hide_favorites:!0,hide_followers:!1,hide_followers_count:!1,hide_follows:!1,hide_follows_count:!1,is_admin:!0,is_confirmed:!0,is_moderator:!1,is_suggested:!0,relationship:{},skip_thread_containment:!1,tags:[]},source:{fields:[{name:"Website",value:"https://alexgleason.me"},{name:"Pleroma+Soapbox",value:"https://soapbox.pub"},{name:"Email",value:"alex@alexgleason.me"},{name:"Gender identity",value:"Soyboy"},{name:"Donate (PayPal)",value:"https://paypal.me/gleasonator"},{name:"$BTC",value:"bc1q9cx35adpm73aq2fw40ye6ts8hfxqzjr5unwg0n"},{name:"$ETH",value:"0xAc9aB5Fc04Dc1cB1789Af75b523Bd23C70B2D717"},{name:"$DOGE",value:"D5zVZs6jrRakaPVGiErkQiHt9sayzm6V5D"},{name:"$XMR",value:"45JDCLrjJ4bgVUSbbs2yjy9m5Mf4VLPW8fG7jw9sq5u69rXZZopQogZNeyYkMBnXpkaip4p4QwaaJNhdTotPa9g44DBCzdK"}],note:`I create Fediverse software that empowers people online.\r +import{u as n,d as l,R as c,jj as i,jk as r,a as e,F as u,X as p,o as m}from"../index-be605fd2.js";import{T as d}from"./timeline-456dace7.js";import"./scroll-top-button-73ec9889.js";import"./status-list-c10445e1.js";import"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";import"./status-container-e53698d2.js";import"./pending-status-959f7aeb.js";import"./poll-preview-ddaf662b.js";import"./noop-3f99ae3e.js";const _="108046224464672537",f="2022-03-30T15:40:53.287Z",b=null,g=null,h=!1,v="",x="self",y=null,$="https://truthsocial.com/users/alex/statuses/108046244464677537",w="https://truthsocial.com/@alex/108046244464677537",j=0,k=0,T=0,D=!1,q=!1,B=!1,P=!1,C=!1,Z="

A federal agent inspects a 'lumber' truck after smelling alcohol during the prohibition period. Los Angeles, 1926 (during the Prohibition era).

",V=null,E={name:"Soapbox FE",website:"https://soapbox.pub/"},G={id:"107759994408336377",username:"alex",acct:"alex",display_name:"Alex Gleason",locked:!1,bot:!1,discoverable:null,group:!1,created_at:"2022-02-08T00:00:00.000Z",note:"

Launching Truth Social

",url:"https://truthsocial.com/@alex",avatar:"https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/accounts/avatars/107/759/994/408/336/377/original/119cb0dd1fa615b7.png",avatar_static:"https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/accounts/avatars/107/759/994/408/336/377/original/119cb0dd1fa615b7.png",header:"https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/accounts/headers/107/759/994/408/336/377/original/31f62b0453ccf554.png",header_static:"https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/accounts/headers/107/759/994/408/336/377/original/31f62b0453ccf554.png",followers_count:4713,following_count:43,statuses_count:7,last_status_at:"2022-03-30",verified:!0,location:"Texas",website:"https://soapbox.pub/",emojis:[],fields:[]},I=[{id:"108635651287436632",type:"image",url:"https://static-assets-1.truthsocial.com/tmtg:prime-ts-assets/media_attachments/files/108/635/651/487/436/632/original/7873bda5a7ab45d3.jpeg",preview_url:"https://static-assets-1.truthsocial.com/tmtg:prime-ts-assets/media_attachments/files/108/635/651/487/436/632/small/7873bda5a7ab45d3.jpeg",external_video_id:null,remote_url:null,preview_remote_url:null,text_url:"https://truthsocial.com/media/_Kc-2w2Pe7knhYJV-CM",meta:{original:{width:1080,height:841,size:"1080x841",aspect:1.2841854934601664},small:{width:907,height:706,size:"907x706",aspect:1.2847025495750708}},description:null,blurhash:"UIIY5?4n~q9FIUIUD%WB?bt7M{t7of%MofIU"}],M=[],R=[],z=[],S=null,A=null,F={id:_,created_at:f,in_reply_to_id:b,in_reply_to_account_id:g,sensitive:h,spoiler_text:v,visibility:x,language:y,uri:$,url:w,replies_count:j,reblogs_count:k,favourites_count:T,favourited:D,reblogged:q,muted:B,bookmarked:P,pinned:C,content:Z,reblog:V,application:E,account:G,media_attachments:I,mentions:M,tags:R,emojis:z,card:S,poll:A},Q="108046244464677537",N="2022-03-30T15:40:53.287Z",J=null,X=null,H=!1,W="",L="public",O=null,K="https://truthsocial.com/users/alex/statuses/108046244464677537",U="https://truthsocial.com/@alex/108046244464677537",Y=0,ee=0,te=0,ae=!1,oe=!1,se=!1,ne=!1,le=!1,ce="",ie=null,re={name:"Soapbox FE",website:"https://soapbox.pub/"},ue={id:"107759994408336377",username:"alex",acct:"alex",display_name:"Alex Gleason",locked:!1,bot:!1,discoverable:null,group:!1,created_at:"2022-02-08T00:00:00.000Z",note:"

Launching Truth Social

",url:"https://truthsocial.com/@alex",avatar:"https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/accounts/avatars/107/759/994/408/336/377/original/119cb0dd1fa615b7.png",avatar_static:"https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/accounts/avatars/107/759/994/408/336/377/original/119cb0dd1fa615b7.png",header:"https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/accounts/headers/107/759/994/408/336/377/original/31f62b0453ccf554.png",header_static:"https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/accounts/headers/107/759/994/408/336/377/original/31f62b0453ccf554.png",followers_count:4713,following_count:43,statuses_count:7,last_status_at:"2022-03-30",verified:!0,location:"Texas",website:"https://soapbox.pub/",emojis:[],fields:[]},pe=[{id:"108046243948255335",type:"video",url:"https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/media_attachments/files/108/046/243/948/255/335/original/3b17ce701c0d6f08.mp4",preview_url:"https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/cache/preview_cards/images/000/543/912/original/e1fcf6ace01d9ded.jpg",external_video_id:"vwfnq9",remote_url:null,preview_remote_url:null,text_url:"https://truthsocial.com/media/SpbYvqKIT2VubC9FFn0",meta:{original:{width:988,height:556,frame_rate:"60/1",duration:1.949025,bitrate:402396}},description:null,blurhash:null}],me=[],de=[],_e=[],fe={url:"https://rumble.com/vz1trd-video-upload-for-108046244464677537.html?mref=ummtf&mc=3nvg0",title:"Video upload for 108046244464677537",description:"",type:"video",author_name:"hostid1",author_url:"https://rumble.com/user/hostid1",provider_name:"Rumble.com",provider_url:"https://rumble.com/",html:'',width:988,height:556,image:"https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/cache/preview_cards/images/000/543/912/original/e1fcf6ace01d9ded.jpg",embed_url:"",blurhash:"UQH1;m~8sks,%M~9?DRk-mRnR+xs9cWVj[bH"},be=null,ge={id:Q,created_at:N,in_reply_to_id:J,in_reply_to_account_id:X,sensitive:H,spoiler_text:W,visibility:L,language:O,uri:K,url:U,replies_count:Y,reblogs_count:ee,favourites_count:te,favourited:ae,reblogged:oe,muted:se,bookmarked:ne,pinned:le,content:ce,reblog:ie,application:re,account:ue,media_attachments:pe,mentions:me,tags:de,emojis:_e,card:fe,poll:be},he={acct:"alex",avatar:"https://media.gleasonator.com/6d64aecb17348b23aaff78db4687b9476cb0da1c07cc6a819c2e6ec7144c18b1.png",avatar_static:"https://media.gleasonator.com/6d64aecb17348b23aaff78db4687b9476cb0da1c07cc6a819c2e6ec7144c18b1.png",bot:!1,created_at:"2020-01-08T01:25:43.000Z",display_name:"Alex Gleason",emojis:[],fields:[{name:"Website",value:'https://alexgleason.me'},{name:"Pleroma+Soapbox",value:'https://soapbox.pub'},{name:"Email",value:"alex@alexgleason.me"},{name:"Gender identity",value:"Soyboy"},{name:"Donate (PayPal)",value:'https://paypal.me/gleasonator'},{name:"$BTC",value:"bc1q9cx35adpm73aq2fw40ye6ts8hfxqzjr5unwg0n"},{name:"$ETH",value:"0xAc9aB5Fc04Dc1cB1789Af75b523Bd23C70B2D717"},{name:"$DOGE",value:"D5zVZs6jrRakaPVGiErkQiHt9sayzm6V5D"},{name:"$XMR",value:"45JDCLrjJ4bgVUSbbs2yjy9m5Mf4VLPW8fG7jw9sq5u69rXZZopQogZNeyYkMBnXpkaip4p4QwaaJNhdTotPa9g44DBCzdK"}],followers_count:2220,following_count:1544,fqn:"alex@gleasonator.com",header:"https://media.gleasonator.com/accounts/headers/000/000/001/original/9d0e4dbf1c9dbc8f.png",header_static:"https://media.gleasonator.com/accounts/headers/000/000/001/original/9d0e4dbf1c9dbc8f.png",id:"9v5bmRalQvjOy0ECcC",last_status_at:"2022-01-24T21:02:44",locked:!1,note:"I create Fediverse software that empowers people online.

I'm vegan btw

Note: If you have a question for me, please tag me publicly. This gives the opportunity for others to chime in, and bystanders to learn.",pleroma:{accepts_chat_messages:!0,also_known_as:[],ap_id:"https://gleasonator.com/users/alex",background_image:null,favicon:"https://gleasonator.com/favicon.png",hide_favorites:!0,hide_followers:!1,hide_followers_count:!1,hide_follows:!1,hide_follows_count:!1,is_admin:!0,is_confirmed:!0,is_moderator:!1,is_suggested:!0,relationship:{},skip_thread_containment:!1,tags:[]},source:{fields:[{name:"Website",value:"https://alexgleason.me"},{name:"Pleroma+Soapbox",value:"https://soapbox.pub"},{name:"Email",value:"alex@alexgleason.me"},{name:"Gender identity",value:"Soyboy"},{name:"Donate (PayPal)",value:"https://paypal.me/gleasonator"},{name:"$BTC",value:"bc1q9cx35adpm73aq2fw40ye6ts8hfxqzjr5unwg0n"},{name:"$ETH",value:"0xAc9aB5Fc04Dc1cB1789Af75b523Bd23C70B2D717"},{name:"$DOGE",value:"D5zVZs6jrRakaPVGiErkQiHt9sayzm6V5D"},{name:"$XMR",value:"45JDCLrjJ4bgVUSbbs2yjy9m5Mf4VLPW8fG7jw9sq5u69rXZZopQogZNeyYkMBnXpkaip4p4QwaaJNhdTotPa9g44DBCzdK"}],note:`I create Fediverse software that empowers people online.\r \r I'm vegan btw\r \r diff --git a/packs/js/index-605b2951.js b/packs/js/index-605b2951.js deleted file mode 100644 index 4d74bb035..000000000 --- a/packs/js/index-605b2951.js +++ /dev/null @@ -1 +0,0 @@ -import{a as e,aC as a}from"../index-7380452a.js";var r=function(){return e(a,{})};export{r as default}; diff --git a/packs/js/index-486dc940.js b/packs/js/index-63ea9ebf.js similarity index 98% rename from packs/js/index-486dc940.js rename to packs/js/index-63ea9ebf.js index 148bf680b..96a5804d0 100644 --- a/packs/js/index-486dc940.js +++ b/packs/js/index-63ea9ebf.js @@ -1 +1 @@ -import{v as it}from"./arrows-minimize-7c27a12c.js";import{u as lt,r as u,at as m,cl as W,Q as ct,R as p,W as k,a as s,dj as dt,A as V,dx as vt,dy as ft,dk as mt,o as pt}from"../index-7380452a.js";import{v as ht}from"./volume-08f8a8f1.js";import"./web.url.constructor-8f9eaf9c.js";import"./es.array.last-index-of-ca8fdd84.js";import{a as gt,m as yt,i as _t,c as bt}from"./media-aspect-ratio-df6a7bb1.js";const Et="/packs/assets/arrows-maximize-91f2dae6.svg",Mt="/packs/assets/player-pause-3dad6718.svg",Se=()=>!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement),xe=()=>{document.exitFullscreen?document.exitFullscreen():"webkitExitFullscreen"in document?document.webkitExitFullscreen():"mozCancelFullScreen"in document&&document.mozCancelFullScreen()},wt=v=>{v.requestFullscreen?v.requestFullscreen():"webkitRequestFullscreen"in v?v.webkitRequestFullscreen():"mozRequestFullScreen"in v&&v.mozRequestFullScreen()};var A=300,d=pt({play:{id:"video.play",defaultMessage:"Play"},pause:{id:"video.pause",defaultMessage:"Pause"},mute:{id:"video.mute",defaultMessage:"Mute sound"},unmute:{id:"video.unmute",defaultMessage:"Unmute sound"},hide:{id:"video.hide",defaultMessage:"Hide video"},expand:{id:"video.expand",defaultMessage:"Expand video"},close:{id:"video.close",defaultMessage:"Close video"},fullscreen:{id:"video.fullscreen",defaultMessage:"Full screen"},exit_fullscreen:{id:"video.exit_fullscreen",defaultMessage:"Exit full screen"}}),X=function(n){var r=Math.floor(n/3600),l=Math.floor((n-r*3600)/60),i=n-r*3600-l*60;return r<10&&(r="0"+r),l<10&&(l="0"+l),i<10&&(i="0"+i),(r==="00"?"":"".concat(r,":"))+"".concat(l,":").concat(i)},Re=function(n){var r;if(n.getBoundingClientRect&&n.parentNode&&(r=n.getBoundingClientRect()),!r)return{left:0,top:0};var l=document.documentElement,i=document.body,E=l.clientLeft||i.clientLeft||0,M=window.pageXOffset||i.scrollLeft,w=r.left+M-E,L=l.clientTop||i.clientTop||0,h=window.pageYOffset||i.scrollTop,D=r.top+h-L;return{left:Math.round(w),top:Math.round(D)}},Y=function(n,r){var l=Re(n),i=n.offsetWidth,E=n.offsetHeight,M=l.top,w=l.left,L=r.pageY,h=r.pageX;return r.changedTouches&&(h=r.changedTouches[0].pageX,L=r.changedTouches[0].pageY),{y:Math.max(0,Math.min(1,(L-M)/E)),x:Math.max(0,Math.min(1,(h-w)/i))}},Lt=function(n){var r=new URL(n),l=r.pathname,i=l.lastIndexOf("/");return l.substring(i+1)},Pt=function(n){var r=n.width,l=n.visible,i=l===void 0?!1:l,E=n.detailed,M=E===void 0?!1:E,w=n.autoFocus,L=w===void 0?!1:w,h=n.cacheWidth,D=n.startTime,De=n.src,S=n.height,j=n.alt,$=n.inline,G=n.aspectRatio,q=G===void 0?16/9:G,Q=n.link,Fe=n.blurhash,J=n.sensitiveOverlay,Ne=J===void 0?null:J,Z=n.onToggleVisibility,Te=Z===void 0?function(){}:Z,g=lt(),F=u.useRef(null),b=u.useRef(null),t=u.useRef(null),U=u.useRef(null),z=u.useRef(null),Ce=u.useState(0),ee=m(Ce,2),te=ee[0],B=ee[1],Ve=u.useState(0),ae=m(Ve,2),ne=ae[0],qe=ae[1],Ue=u.useState(.5),re=m(Ue,2),oe=re[0],H=re[1],ze=u.useState(!0),ue=m(ze,2),y=ue[0],N=ue[1],Be=u.useState(!1),se=m(Be,2),He=se[0],ie=se[1],Ie=u.useState(r),le=m(Ie,2),P=le[0],Oe=le[1],Ke=u.useState(!1),ce=m(Ke,2),f=ce[0],We=ce[1],Ae=u.useState(!1),de=m(Ae,2),ve=de[0],fe=de[1],Xe=u.useState(!1),me=m(Xe,2),I=me[0],O=me[1],Ye=u.useState(0),pe=m(Ye,2),je=pe[0],$e=pe[1],he=function(){if(b.current){var e=b.current.offsetWidth;h&&h(e),Oe(e)}};u.useLayoutEffect(function(){he()},[b.current]),u.useEffect(function(){t.current&&(H(t.current.volume),O(t.current.muted))},[t.current]);var Ge=function(e){return e.stopPropagation()},Qe=function(){N(!1)},Je=function(){N(!0)},Ze=function(){t.current&&(B(Math.floor(t.current.currentTime)),qe(Math.floor(t.current.duration)))},et=function(e){document.addEventListener("mousemove",x,!0),document.addEventListener("mouseup",ge,!0),document.addEventListener("touchmove",x,!0),document.addEventListener("touchend",ge,!0),x(e),e.preventDefault(),e.stopPropagation()},ge=function a(){document.removeEventListener("mousemove",x,!0),document.removeEventListener("mouseup",a,!0),document.removeEventListener("touchmove",x,!0),document.removeEventListener("touchend",a,!0)},x=W(function(a){if(z.current){var e=Y(z.current,a),o=e.x;if(!isNaN(o)){var c=o;o>1?c=1:o<0&&(c=0),t.current&&(t.current.volume=c),H(c)}}},60),tt=function(e){var o;document.addEventListener("mousemove",R,!0),document.addEventListener("mouseup",ye,!0),document.addEventListener("touchmove",R,!0),document.addEventListener("touchend",ye,!0),ie(!0),(o=t.current)===null||o===void 0||o.pause(),R(e),e.preventDefault(),e.stopPropagation()},ye=function a(){var e;document.removeEventListener("mousemove",R,!0),document.removeEventListener("mouseup",a,!0),document.removeEventListener("touchmove",R,!0),document.removeEventListener("touchend",a,!0),ie(!1),(e=t.current)===null||e===void 0||e.play()},R=W(function(a){if(U.current&&t.current){var e=Y(U.current,a),o=e.x,c=Math.floor(t.current.duration*o);isNaN(c)||(t.current.currentTime=c,B(c))}},60),T=function(e){if(t.current){var o=t.current.currentTime+e;isNaN(o)||(B(o),t.current.currentTime=o)}},_e=function(e){e.key===" "&&(e.preventDefault(),e.stopPropagation(),C())},at=function(e){var o=.04;switch(e.key){case"k":e.preventDefault(),e.stopPropagation(),C();break;case"m":e.preventDefault(),e.stopPropagation(),we();break;case"f":e.preventDefault(),e.stopPropagation(),be();break;case"j":e.preventDefault(),e.stopPropagation(),T(-10);break;case"l":e.preventDefault(),e.stopPropagation(),T(10);break;case",":e.preventDefault(),e.stopPropagation(),T(-o);break;case".":e.preventDefault(),e.stopPropagation(),T(o);break}f&&(e.preventDefault(),e.stopPropagation(),e.key==="Escape"&&xe())},C=function(e){if(e==null||e.stopPropagation(),N(!y),y){var o;(o=t.current)===null||o===void 0||o.play()}else{var c;(c=t.current)===null||c===void 0||c.pause()}},be=function(){Se()?xe():b.current&&wt(b.current)},Ee=u.useCallback(ct(function(){he()},250,{trailing:!0}),[b.current,h]),Me=u.useCallback(W(function(){if(t.current){var a=t.current.getBoundingClientRect(),e=a.top,o=a.height,c=e<=(window.innerHeight||document.documentElement.clientHeight)&&e+o>=0;!y&&!c&&(N(!0),t.current.pause())}},150,{trailing:!0}),[t.current,y]),_=u.useCallback(function(){We(Se())},[]),nt=function(){fe(!0)},rt=function(){fe(!1)},we=function(){if(t.current){var e=!t.current.muted;O(!e),t.current.muted=e}},ot=function(){t.current&&D&&(t.current.currentTime=D,t.current.play())},ut=function(){t.current&&t.current.buffered.length>0&&$e(t.current.buffered.end(0)/t.current.duration*100)},st=function(){t.current&&(H(t.current.volume),O(t.current.muted))},Le=te/ne*100,Pe={},K=A;if($&&P){r=P;var ke=P/(16/9);gt(q)?S=Math.max(Math.floor(P/yt),ke):_t(q)?S=Math.max(Math.floor(P/bt),ke):S=Math.floor(P/q),K=S||A,Pe.height=K}return u.useEffect(function(){F.current&&(F.current.style.height="".concat(K,"px"))},[F.current]),u.useEffect(function(){return document.addEventListener("fullscreenchange",_,!0),document.addEventListener("webkitfullscreenchange",_,!0),document.addEventListener("mozfullscreenchange",_,!0),document.addEventListener("MSFullscreenChange",_,!0),window.addEventListener("scroll",Me),window.addEventListener("resize",Ee,{passive:!0}),function(){window.removeEventListener("scroll",Me),window.removeEventListener("resize",Ee),document.removeEventListener("fullscreenchange",_,!0),document.removeEventListener("webkitfullscreenchange",_,!0),document.removeEventListener("mozfullscreenchange",_,!0),document.removeEventListener("MSFullscreenChange",_,!0)}},[]),u.useEffect(function(){if(!i){var a;(a=t.current)===null||a===void 0||a.pause()}},[i]),p.createElement(p.Fragment,null,p.createElement("div",{className:k({hidden:!f}),ref:F}),p.createElement("div",{role:"menuitem",className:k("video-player",{detailed:M,"video-player--inline":$&&!f,fullscreen:f}),style:Pe,ref:b,onMouseEnter:nt,onMouseLeave:rt,onClick:Ge,onKeyDown:at,tabIndex:0},Ne,!f&&s(dt,{hash:Fe,className:"media-gallery__preview"}),p.createElement("video",{ref:t,src:De,loop:!0,role:"button",tabIndex:0,"aria-label":j,title:j,width:r,height:S||A,onClick:C,onKeyDown:_e,onPlay:Qe,onPause:Je,onTimeUpdate:Ze,onLoadedData:ot,onProgress:ut,onVolumeChange:st,style:{display:i?"block":"none"}}),i&&p.createElement(p.Fragment,null,s("div",{className:k("video-player__controls",{active:y||ve})},void 0,p.createElement("div",{className:"video-player__seek",onMouseDown:tt,ref:U},s("div",{className:"video-player__seek__buffer",style:{width:"".concat(je,"%")}}),s("div",{className:"video-player__seek__progress",style:{width:"".concat(Le,"%")}}),s("span",{className:k("video-player__seek__handle",{active:He}),tabIndex:0,style:{left:"".concat(Le,"%")},onKeyDown:_e})),s("div",{className:"video-player__buttons-bar"},void 0,s("div",{className:"video-player__buttons left"},void 0,s("button",{type:"button",title:g.formatMessage(y?d.play:d.pause),"aria-label":g.formatMessage(y?d.play:d.pause),className:"player-button",onClick:C,autoFocus:L},void 0,s(V,{src:y?vt:Mt})),s("button",{type:"button",title:g.formatMessage(I?d.unmute:d.mute),"aria-label":g.formatMessage(I?d.unmute:d.mute),className:"player-button",onClick:we},void 0,s(V,{src:I?ft:ht})),p.createElement("div",{className:k("video-player__volume",{active:ve}),onMouseDown:et,ref:z},s("div",{className:"video-player__volume__current",style:{width:"".concat(oe*100,"%")}}),s("span",{className:k("video-player__volume__handle"),tabIndex:0,style:{left:"".concat(oe*100,"%")}})),(M||f)&&s("span",{},void 0,s("span",{className:"video-player__time-current"},void 0,X(te)),s("span",{className:"video-player__time-sep"},void 0,"/"),s("span",{className:"video-player__time-total"},void 0,X(ne))),Q&&s("span",{className:"video-player__link"},void 0,Q)),s("div",{className:"video-player__buttons right"},void 0,!f&&s("button",{type:"button",title:g.formatMessage(d.hide),"aria-label":g.formatMessage(d.hide),className:"player-button",onClick:Te},void 0,s(V,{src:mt})),s("button",{type:"button",title:g.formatMessage(f?d.exit_fullscreen:d.fullscreen),"aria-label":g.formatMessage(f?d.exit_fullscreen:d.fullscreen),className:"player-button",onClick:be},void 0,s(V,{src:f?it:Et}))))))))};const Nt=Object.freeze(Object.defineProperty({__proto__:null,default:Pt,fileNameFromURL:Lt,findElementPosition:Re,formatTime:X,getPointerPosition:Y},Symbol.toStringTag,{value:"Module"}));export{Pt as V,Et as a,X as f,Y as g,Nt as i,Mt as v}; +import{v as it}from"./arrows-minimize-7c27a12c.js";import{u as lt,r as u,at as m,cl as W,Q as ct,R as p,W as k,a as s,dj as dt,A as V,dx as vt,dy as ft,dk as mt,o as pt}from"../index-be605fd2.js";import{v as ht}from"./volume-08f8a8f1.js";import"./web.url.constructor-0fbaa340.js";import"./es.array.last-index-of-d76ad0ed.js";import{a as gt,m as yt,i as _t,c as bt}from"./media-aspect-ratio-df6a7bb1.js";const Et="/packs/assets/arrows-maximize-91f2dae6.svg",Mt="/packs/assets/player-pause-3dad6718.svg",Se=()=>!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement),xe=()=>{document.exitFullscreen?document.exitFullscreen():"webkitExitFullscreen"in document?document.webkitExitFullscreen():"mozCancelFullScreen"in document&&document.mozCancelFullScreen()},wt=v=>{v.requestFullscreen?v.requestFullscreen():"webkitRequestFullscreen"in v?v.webkitRequestFullscreen():"mozRequestFullScreen"in v&&v.mozRequestFullScreen()};var A=300,d=pt({play:{id:"video.play",defaultMessage:"Play"},pause:{id:"video.pause",defaultMessage:"Pause"},mute:{id:"video.mute",defaultMessage:"Mute sound"},unmute:{id:"video.unmute",defaultMessage:"Unmute sound"},hide:{id:"video.hide",defaultMessage:"Hide video"},expand:{id:"video.expand",defaultMessage:"Expand video"},close:{id:"video.close",defaultMessage:"Close video"},fullscreen:{id:"video.fullscreen",defaultMessage:"Full screen"},exit_fullscreen:{id:"video.exit_fullscreen",defaultMessage:"Exit full screen"}}),X=function(n){var r=Math.floor(n/3600),l=Math.floor((n-r*3600)/60),i=n-r*3600-l*60;return r<10&&(r="0"+r),l<10&&(l="0"+l),i<10&&(i="0"+i),(r==="00"?"":"".concat(r,":"))+"".concat(l,":").concat(i)},Re=function(n){var r;if(n.getBoundingClientRect&&n.parentNode&&(r=n.getBoundingClientRect()),!r)return{left:0,top:0};var l=document.documentElement,i=document.body,E=l.clientLeft||i.clientLeft||0,M=window.pageXOffset||i.scrollLeft,w=r.left+M-E,L=l.clientTop||i.clientTop||0,h=window.pageYOffset||i.scrollTop,D=r.top+h-L;return{left:Math.round(w),top:Math.round(D)}},Y=function(n,r){var l=Re(n),i=n.offsetWidth,E=n.offsetHeight,M=l.top,w=l.left,L=r.pageY,h=r.pageX;return r.changedTouches&&(h=r.changedTouches[0].pageX,L=r.changedTouches[0].pageY),{y:Math.max(0,Math.min(1,(L-M)/E)),x:Math.max(0,Math.min(1,(h-w)/i))}},Lt=function(n){var r=new URL(n),l=r.pathname,i=l.lastIndexOf("/");return l.substring(i+1)},Pt=function(n){var r=n.width,l=n.visible,i=l===void 0?!1:l,E=n.detailed,M=E===void 0?!1:E,w=n.autoFocus,L=w===void 0?!1:w,h=n.cacheWidth,D=n.startTime,De=n.src,S=n.height,j=n.alt,$=n.inline,G=n.aspectRatio,q=G===void 0?16/9:G,Q=n.link,Fe=n.blurhash,J=n.sensitiveOverlay,Ne=J===void 0?null:J,Z=n.onToggleVisibility,Te=Z===void 0?function(){}:Z,g=lt(),F=u.useRef(null),b=u.useRef(null),t=u.useRef(null),U=u.useRef(null),z=u.useRef(null),Ce=u.useState(0),ee=m(Ce,2),te=ee[0],B=ee[1],Ve=u.useState(0),ae=m(Ve,2),ne=ae[0],qe=ae[1],Ue=u.useState(.5),re=m(Ue,2),oe=re[0],H=re[1],ze=u.useState(!0),ue=m(ze,2),y=ue[0],N=ue[1],Be=u.useState(!1),se=m(Be,2),He=se[0],ie=se[1],Ie=u.useState(r),le=m(Ie,2),P=le[0],Oe=le[1],Ke=u.useState(!1),ce=m(Ke,2),f=ce[0],We=ce[1],Ae=u.useState(!1),de=m(Ae,2),ve=de[0],fe=de[1],Xe=u.useState(!1),me=m(Xe,2),I=me[0],O=me[1],Ye=u.useState(0),pe=m(Ye,2),je=pe[0],$e=pe[1],he=function(){if(b.current){var e=b.current.offsetWidth;h&&h(e),Oe(e)}};u.useLayoutEffect(function(){he()},[b.current]),u.useEffect(function(){t.current&&(H(t.current.volume),O(t.current.muted))},[t.current]);var Ge=function(e){return e.stopPropagation()},Qe=function(){N(!1)},Je=function(){N(!0)},Ze=function(){t.current&&(B(Math.floor(t.current.currentTime)),qe(Math.floor(t.current.duration)))},et=function(e){document.addEventListener("mousemove",x,!0),document.addEventListener("mouseup",ge,!0),document.addEventListener("touchmove",x,!0),document.addEventListener("touchend",ge,!0),x(e),e.preventDefault(),e.stopPropagation()},ge=function a(){document.removeEventListener("mousemove",x,!0),document.removeEventListener("mouseup",a,!0),document.removeEventListener("touchmove",x,!0),document.removeEventListener("touchend",a,!0)},x=W(function(a){if(z.current){var e=Y(z.current,a),o=e.x;if(!isNaN(o)){var c=o;o>1?c=1:o<0&&(c=0),t.current&&(t.current.volume=c),H(c)}}},60),tt=function(e){var o;document.addEventListener("mousemove",R,!0),document.addEventListener("mouseup",ye,!0),document.addEventListener("touchmove",R,!0),document.addEventListener("touchend",ye,!0),ie(!0),(o=t.current)===null||o===void 0||o.pause(),R(e),e.preventDefault(),e.stopPropagation()},ye=function a(){var e;document.removeEventListener("mousemove",R,!0),document.removeEventListener("mouseup",a,!0),document.removeEventListener("touchmove",R,!0),document.removeEventListener("touchend",a,!0),ie(!1),(e=t.current)===null||e===void 0||e.play()},R=W(function(a){if(U.current&&t.current){var e=Y(U.current,a),o=e.x,c=Math.floor(t.current.duration*o);isNaN(c)||(t.current.currentTime=c,B(c))}},60),T=function(e){if(t.current){var o=t.current.currentTime+e;isNaN(o)||(B(o),t.current.currentTime=o)}},_e=function(e){e.key===" "&&(e.preventDefault(),e.stopPropagation(),C())},at=function(e){var o=.04;switch(e.key){case"k":e.preventDefault(),e.stopPropagation(),C();break;case"m":e.preventDefault(),e.stopPropagation(),we();break;case"f":e.preventDefault(),e.stopPropagation(),be();break;case"j":e.preventDefault(),e.stopPropagation(),T(-10);break;case"l":e.preventDefault(),e.stopPropagation(),T(10);break;case",":e.preventDefault(),e.stopPropagation(),T(-o);break;case".":e.preventDefault(),e.stopPropagation(),T(o);break}f&&(e.preventDefault(),e.stopPropagation(),e.key==="Escape"&&xe())},C=function(e){if(e==null||e.stopPropagation(),N(!y),y){var o;(o=t.current)===null||o===void 0||o.play()}else{var c;(c=t.current)===null||c===void 0||c.pause()}},be=function(){Se()?xe():b.current&&wt(b.current)},Ee=u.useCallback(ct(function(){he()},250,{trailing:!0}),[b.current,h]),Me=u.useCallback(W(function(){if(t.current){var a=t.current.getBoundingClientRect(),e=a.top,o=a.height,c=e<=(window.innerHeight||document.documentElement.clientHeight)&&e+o>=0;!y&&!c&&(N(!0),t.current.pause())}},150,{trailing:!0}),[t.current,y]),_=u.useCallback(function(){We(Se())},[]),nt=function(){fe(!0)},rt=function(){fe(!1)},we=function(){if(t.current){var e=!t.current.muted;O(!e),t.current.muted=e}},ot=function(){t.current&&D&&(t.current.currentTime=D,t.current.play())},ut=function(){t.current&&t.current.buffered.length>0&&$e(t.current.buffered.end(0)/t.current.duration*100)},st=function(){t.current&&(H(t.current.volume),O(t.current.muted))},Le=te/ne*100,Pe={},K=A;if($&&P){r=P;var ke=P/(16/9);gt(q)?S=Math.max(Math.floor(P/yt),ke):_t(q)?S=Math.max(Math.floor(P/bt),ke):S=Math.floor(P/q),K=S||A,Pe.height=K}return u.useEffect(function(){F.current&&(F.current.style.height="".concat(K,"px"))},[F.current]),u.useEffect(function(){return document.addEventListener("fullscreenchange",_,!0),document.addEventListener("webkitfullscreenchange",_,!0),document.addEventListener("mozfullscreenchange",_,!0),document.addEventListener("MSFullscreenChange",_,!0),window.addEventListener("scroll",Me),window.addEventListener("resize",Ee,{passive:!0}),function(){window.removeEventListener("scroll",Me),window.removeEventListener("resize",Ee),document.removeEventListener("fullscreenchange",_,!0),document.removeEventListener("webkitfullscreenchange",_,!0),document.removeEventListener("mozfullscreenchange",_,!0),document.removeEventListener("MSFullscreenChange",_,!0)}},[]),u.useEffect(function(){if(!i){var a;(a=t.current)===null||a===void 0||a.pause()}},[i]),p.createElement(p.Fragment,null,p.createElement("div",{className:k({hidden:!f}),ref:F}),p.createElement("div",{role:"menuitem",className:k("video-player",{detailed:M,"video-player--inline":$&&!f,fullscreen:f}),style:Pe,ref:b,onMouseEnter:nt,onMouseLeave:rt,onClick:Ge,onKeyDown:at,tabIndex:0},Ne,!f&&s(dt,{hash:Fe,className:"media-gallery__preview"}),p.createElement("video",{ref:t,src:De,loop:!0,role:"button",tabIndex:0,"aria-label":j,title:j,width:r,height:S||A,onClick:C,onKeyDown:_e,onPlay:Qe,onPause:Je,onTimeUpdate:Ze,onLoadedData:ot,onProgress:ut,onVolumeChange:st,style:{display:i?"block":"none"}}),i&&p.createElement(p.Fragment,null,s("div",{className:k("video-player__controls",{active:y||ve})},void 0,p.createElement("div",{className:"video-player__seek",onMouseDown:tt,ref:U},s("div",{className:"video-player__seek__buffer",style:{width:"".concat(je,"%")}}),s("div",{className:"video-player__seek__progress",style:{width:"".concat(Le,"%")}}),s("span",{className:k("video-player__seek__handle",{active:He}),tabIndex:0,style:{left:"".concat(Le,"%")},onKeyDown:_e})),s("div",{className:"video-player__buttons-bar"},void 0,s("div",{className:"video-player__buttons left"},void 0,s("button",{type:"button",title:g.formatMessage(y?d.play:d.pause),"aria-label":g.formatMessage(y?d.play:d.pause),className:"player-button",onClick:C,autoFocus:L},void 0,s(V,{src:y?vt:Mt})),s("button",{type:"button",title:g.formatMessage(I?d.unmute:d.mute),"aria-label":g.formatMessage(I?d.unmute:d.mute),className:"player-button",onClick:we},void 0,s(V,{src:I?ft:ht})),p.createElement("div",{className:k("video-player__volume",{active:ve}),onMouseDown:et,ref:z},s("div",{className:"video-player__volume__current",style:{width:"".concat(oe*100,"%")}}),s("span",{className:k("video-player__volume__handle"),tabIndex:0,style:{left:"".concat(oe*100,"%")}})),(M||f)&&s("span",{},void 0,s("span",{className:"video-player__time-current"},void 0,X(te)),s("span",{className:"video-player__time-sep"},void 0,"/"),s("span",{className:"video-player__time-total"},void 0,X(ne))),Q&&s("span",{className:"video-player__link"},void 0,Q)),s("div",{className:"video-player__buttons right"},void 0,!f&&s("button",{type:"button",title:g.formatMessage(d.hide),"aria-label":g.formatMessage(d.hide),className:"player-button",onClick:Te},void 0,s(V,{src:mt})),s("button",{type:"button",title:g.formatMessage(f?d.exit_fullscreen:d.fullscreen),"aria-label":g.formatMessage(f?d.exit_fullscreen:d.fullscreen),className:"player-button",onClick:be},void 0,s(V,{src:f?it:Et}))))))))};const Nt=Object.freeze(Object.defineProperty({__proto__:null,default:Pt,fileNameFromURL:Lt,findElementPosition:Re,formatTime:X,getPointerPosition:Y},Symbol.toStringTag,{value:"Module"}));export{Pt as V,Et as a,X as f,Y as g,Nt as i,Mt as v}; diff --git a/packs/js/index-83b6cf03.js b/packs/js/index-654bbfc5.js similarity index 73% rename from packs/js/index-83b6cf03.js rename to packs/js/index-654bbfc5.js index 23e0d6262..e430dcaca 100644 --- a/packs/js/index-83b6cf03.js +++ b/packs/js/index-654bbfc5.js @@ -1 +1 @@ -import{a3 as v,g as w,d as T,q as h,r as g,ac as r,ad as H,ae as M,a as t,af as F,ag as x,F as m,ah as y,X as L,ai as E,aj as _}from"../index-7380452a.js";import{T as $}from"./timeline-585cfcf0.js";import"./scroll-top-button-95820d24.js";import"./status-list-13fdd81b.js";import"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";import"./status-container-59e57baf.js";import"./pending-status-7f660229.js";import"./poll-preview-66340c9e.js";import"./noop-19c18e1e.js";function S(n){return v(`hashtag:${n}`,`hashtag&tag=${n}`)}var z=function(d){var l=d.params,a=(l==null?void 0:l.id)||"",u=w(),e=T(),s=h(function(o){return o.tags.get(a)}),c=h(function(o){var i;return(i=o.timelines.get("hashtag:".concat(a)))===null||i===void 0?void 0:i.next}),f=function(i){e(r(a,{url:c,maxId:i}))},p=function(){s!=null&&s.following?e(E(a)):e(_(a))};return S(a),g.useEffect(function(){e(r(a)),e(H(a))},[a]),g.useEffect(function(){e(M("hashtag:".concat(a))),e(r(a))},[a]),t(L,{label:"#".concat(a),transparent:!0},void 0,u.followHashtags&&t(F,{},void 0,t(x,{label:t(m,{id:"hashtag.follow",defaultMessage:"Follow hashtag"})},void 0,t(y,{checked:s==null?void 0:s.following,onChange:p}))),t($,{scrollKey:"hashtag_timeline",timelineId:"hashtag:".concat(a),onLoadMore:f,emptyMessage:t(m,{id:"empty_column.hashtag",defaultMessage:"There is nothing in this hashtag yet."}),divideType:"space"}))};export{z as HashtagTimeline,z as default}; +import{a3 as v,g as w,d as T,q as h,r as g,ac as r,ad as H,ae as M,a as t,af as F,ag as x,F as m,ah as y,X as L,ai as E,aj as _}from"../index-be605fd2.js";import{T as $}from"./timeline-456dace7.js";import"./scroll-top-button-73ec9889.js";import"./status-list-c10445e1.js";import"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";import"./status-container-e53698d2.js";import"./pending-status-959f7aeb.js";import"./poll-preview-ddaf662b.js";import"./noop-3f99ae3e.js";function S(n){return v(`hashtag:${n}`,`hashtag&tag=${n}`)}var z=function(d){var l=d.params,a=(l==null?void 0:l.id)||"",u=w(),e=T(),s=h(function(o){return o.tags.get(a)}),c=h(function(o){var i;return(i=o.timelines.get("hashtag:".concat(a)))===null||i===void 0?void 0:i.next}),f=function(i){e(r(a,{url:c,maxId:i}))},p=function(){s!=null&&s.following?e(E(a)):e(_(a))};return S(a),g.useEffect(function(){e(r(a)),e(H(a))},[a]),g.useEffect(function(){e(M("hashtag:".concat(a))),e(r(a))},[a]),t(L,{label:"#".concat(a),transparent:!0},void 0,u.followHashtags&&t(F,{},void 0,t(x,{label:t(m,{id:"hashtag.follow",defaultMessage:"Follow hashtag"})},void 0,t(y,{checked:s==null?void 0:s.following,onChange:p}))),t($,{scrollKey:"hashtag_timeline",timelineId:"hashtag:".concat(a),onLoadMore:f,emptyMessage:t(m,{id:"empty_column.hashtag",defaultMessage:"There is nothing in this hashtag yet."}),divideType:"space"}))};export{z as HashtagTimeline,z as default}; diff --git a/packs/js/index-9bd9b506.js b/packs/js/index-65e95827.js similarity index 95% rename from packs/js/index-9bd9b506.js rename to packs/js/index-65e95827.js index 10ef1494e..702287a08 100644 --- a/packs/js/index-9bd9b506.js +++ b/packs/js/index-65e95827.js @@ -1 +1 @@ -import{fz as m,bp as p,o as l,d as P,u as I,r as f,at as M,a as s,bI as U,aa as w,bF as y,y as g,bE as k,X as B}from"../index-7380452a.js";import{F as A}from"./file-input-e3eba176.js";const x="IMPORT_FOLLOWS_REQUEST",K="IMPORT_FOLLOWS_SUCCESS",Q="IMPORT_FOLLOWS_FAIL",W="IMPORT_BLOCKS_REQUEST",D="IMPORT_BLOCKS_SUCCESS",V="IMPORT_BLOCKS_FAIL",$="IMPORT_MUTES_REQUEST",z="IMPORT_MUTES_SUCCESS",q="IMPORT_MUTES_FAIL",d=l({blocksSuccess:{id:"import_data.success.blocks",defaultMessage:"Blocks imported successfully"},followersSuccess:{id:"import_data.success.followers",defaultMessage:"Followers imported successfully"},mutesSuccess:{id:"import_data.success.mutes",defaultMessage:"Mutes imported successfully"}}),G=o=>(t,a)=>(t({type:x}),m(a).post("/api/v1/pleroma/follow_import",o).then(e=>{p.success(d.followersSuccess),t({type:K,config:e.data})}).catch(e=>{t({type:Q,error:e})})),X=o=>(t,a)=>(t({type:W}),m(a).post("/api/v1/pleroma/blocks_import",o).then(e=>{p.success(d.blocksSuccess),t({type:D,config:e.data})}).catch(e=>{t({type:V,error:e})})),j=o=>(t,a)=>(t({type:$}),m(a).post("/api/v1/pleroma/mutes_import",o).then(e=>{p.success(d.mutesSuccess),t({type:z,config:e.data})}).catch(e=>{t({type:q,error:e})}));var c=function(t){var a=t.messages,e=t.action,O=P(),n=I(),b=f.useState(!1),_=M(b,2),T=_[0],r=_[1],v=f.useState(null),S=M(v,2),C=S[0],E=S[1],L=function(u){var i=new FormData;i.append("list",C),r(!0),O(e(i)).then(function(){r(!1)}).catch(function(){r(!1)}),u.preventDefault()},R=function(u){var i,h=(i=u.target.files)===null||i===void 0?void 0:i.item(0);E(h)};return s(k,{onSubmit:L},void 0,s(g,{size:"xl",weight:"bold",tag:"label"},void 0,n.formatMessage(a.input_label)),s(y,{hintText:s(g,{theme:"muted"},void 0,n.formatMessage(a.input_hint))},void 0,s(A,{accept:".csv,text/csv",onChange:R,required:!0})),s(U,{},void 0,s(w,{type:"submit",theme:"primary",disabled:T},void 0,n.formatMessage(a.submit))))},H=l({heading:{id:"column.import_data",defaultMessage:"Import data"},submit:{id:"import_data.actions.import",defaultMessage:"Import"}}),J=l({input_label:{id:"import_data.follows_label",defaultMessage:"Follows"},input_hint:{id:"import_data.hints.follows",defaultMessage:"CSV file containing a list of followed accounts"},submit:{id:"import_data.actions.import_follows",defaultMessage:"Import follows"}}),N=l({input_label:{id:"import_data.blocks_label",defaultMessage:"Blocks"},input_hint:{id:"import_data.hints.blocks",defaultMessage:"CSV file containing a list of blocked accounts"},submit:{id:"import_data.actions.import_blocks",defaultMessage:"Import blocks"}}),Y=l({input_label:{id:"import_data.mutes_label",defaultMessage:"Mutes"},input_hint:{id:"import_data.hints.mutes",defaultMessage:"CSV file containing a list of muted accounts"},submit:{id:"import_data.actions.import_mutes",defaultMessage:"Import mutes"}}),et=function(){var t=I();return s(B,{label:t.formatMessage(H.heading)},void 0,s(c,{action:G,messages:J}),s(c,{action:X,messages:N}),s(c,{action:j,messages:Y}))};export{et as default}; +import{fz as m,bp as p,o as l,d as P,u as I,r as f,at as M,a as s,bI as U,aa as w,bF as y,y as g,bE as k,X as B}from"../index-be605fd2.js";import{F as A}from"./file-input-c35dcc9b.js";const x="IMPORT_FOLLOWS_REQUEST",K="IMPORT_FOLLOWS_SUCCESS",Q="IMPORT_FOLLOWS_FAIL",W="IMPORT_BLOCKS_REQUEST",D="IMPORT_BLOCKS_SUCCESS",V="IMPORT_BLOCKS_FAIL",$="IMPORT_MUTES_REQUEST",z="IMPORT_MUTES_SUCCESS",q="IMPORT_MUTES_FAIL",d=l({blocksSuccess:{id:"import_data.success.blocks",defaultMessage:"Blocks imported successfully"},followersSuccess:{id:"import_data.success.followers",defaultMessage:"Followers imported successfully"},mutesSuccess:{id:"import_data.success.mutes",defaultMessage:"Mutes imported successfully"}}),G=o=>(t,a)=>(t({type:x}),m(a).post("/api/v1/pleroma/follow_import",o).then(e=>{p.success(d.followersSuccess),t({type:K,config:e.data})}).catch(e=>{t({type:Q,error:e})})),X=o=>(t,a)=>(t({type:W}),m(a).post("/api/v1/pleroma/blocks_import",o).then(e=>{p.success(d.blocksSuccess),t({type:D,config:e.data})}).catch(e=>{t({type:V,error:e})})),j=o=>(t,a)=>(t({type:$}),m(a).post("/api/v1/pleroma/mutes_import",o).then(e=>{p.success(d.mutesSuccess),t({type:z,config:e.data})}).catch(e=>{t({type:q,error:e})}));var c=function(t){var a=t.messages,e=t.action,O=P(),n=I(),b=f.useState(!1),_=M(b,2),T=_[0],r=_[1],v=f.useState(null),S=M(v,2),C=S[0],E=S[1],L=function(u){var i=new FormData;i.append("list",C),r(!0),O(e(i)).then(function(){r(!1)}).catch(function(){r(!1)}),u.preventDefault()},R=function(u){var i,h=(i=u.target.files)===null||i===void 0?void 0:i.item(0);E(h)};return s(k,{onSubmit:L},void 0,s(g,{size:"xl",weight:"bold",tag:"label"},void 0,n.formatMessage(a.input_label)),s(y,{hintText:s(g,{theme:"muted"},void 0,n.formatMessage(a.input_hint))},void 0,s(A,{accept:".csv,text/csv",onChange:R,required:!0})),s(U,{},void 0,s(w,{type:"submit",theme:"primary",disabled:T},void 0,n.formatMessage(a.submit))))},H=l({heading:{id:"column.import_data",defaultMessage:"Import data"},submit:{id:"import_data.actions.import",defaultMessage:"Import"}}),J=l({input_label:{id:"import_data.follows_label",defaultMessage:"Follows"},input_hint:{id:"import_data.hints.follows",defaultMessage:"CSV file containing a list of followed accounts"},submit:{id:"import_data.actions.import_follows",defaultMessage:"Import follows"}}),N=l({input_label:{id:"import_data.blocks_label",defaultMessage:"Blocks"},input_hint:{id:"import_data.hints.blocks",defaultMessage:"CSV file containing a list of blocked accounts"},submit:{id:"import_data.actions.import_blocks",defaultMessage:"Import blocks"}}),Y=l({input_label:{id:"import_data.mutes_label",defaultMessage:"Mutes"},input_hint:{id:"import_data.hints.mutes",defaultMessage:"CSV file containing a list of muted accounts"},submit:{id:"import_data.actions.import_mutes",defaultMessage:"Import mutes"}}),et=function(){var t=I();return s(B,{label:t.formatMessage(H.heading)},void 0,s(c,{action:G,messages:J}),s(c,{action:X,messages:N}),s(c,{action:j,messages:Y}))};export{et as default}; diff --git a/packs/js/index-bbc2ca16.js b/packs/js/index-67126278.js similarity index 88% rename from packs/js/index-bbc2ca16.js rename to packs/js/index-67126278.js index 8daab316e..6541880bf 100644 --- a/packs/js/index-bbc2ca16.js +++ b/packs/js/index-67126278.js @@ -1 +1 @@ -import{bj as _,g as b,bk as O,bl as R,bm as E,u as y,bn as I,a as e,H as M,bo as k,y as w,aa as z,F as p,bp as F,o as C,r as H,at as j,a2 as B,T as Y,R as h,av as S,B as K,X}from"../index-7380452a.js";import{c as $}from"./useAccountList-6ddad2aa.js";import{S as U}from"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";function q(){const s=_(),n=b(),{entities:a,...t}=O([E.GROUP_MUTES],()=>s.get("/api/v1/groups/mutes"),{schema:R,enabled:n.groupsMuting});return{...t,mutes:a}}var D=C({unmuteSuccess:{id:"group.unmute.success",defaultMessage:"Unmuted the group"}}),J=function(n){var a=n.group,t=n.onUnmute,i=y(),c=I(a),m=function(){c.mutate(void 0,{onSuccess:function(){t(),F.success(i.formatMessage(D.unmuteSuccess))}})};return e(M,{alignItems:"center",justifyContent:"between"},void 0,e(M,{alignItems:"center",space:3},void 0,e(k,{group:a,size:42}),e(w,{weight:"semibold",size:"sm",dangerouslySetInnerHTML:{__html:a.display_name_html},truncate:!0})),e(z,{theme:"primary",type:"button",onClick:m,size:"sm"},void 0,e(p,{id:"group.unmute.label",defaultMessage:"Unmute"})))},Q=C({heading:{id:"column.mutes",defaultMessage:"Mutes"}}),u=function(s){return s.ACCOUNTS="ACCOUNTS",s.GROUPS="GROUPS",s}(u||{}),se=function(){var n=y(),a=b(),t=$(),i=t.accounts,c=t.hasNextPage,m=t.fetchNextPage,g=t.isLoading,o=q(),G=o.mutes,A=o.isLoading,N=o.hasNextPage,x=o.fetchNextPage,L=o.fetchEntities,T=H.useState(u.ACCOUNTS),d=j(T,2),l=d[0],f=d[1],P=l===u.ACCOUNTS,v={itemClassName:"pb-4 last:pb-0",scrollKey:"mutes",emptyMessageCard:!1};return e(X,{label:n.formatMessage(Q.heading)},void 0,e(B,{space:4},void 0,a.groupsMuting&&e(Y,{items:[{text:"Users",action:function(){return f(u.ACCOUNTS)},name:u.ACCOUNTS},{text:"Groups",action:function(){return f(u.GROUPS)},name:u.GROUPS}],activeItem:l}),P?h.createElement(U,S({},v,{isLoading:g,onLoadMore:m,hasMore:c,emptyMessage:e(p,{id:"empty_column.mutes",defaultMessage:"You haven't muted any users yet."})}),i.map(function(r){return e(K,{id:r.id,actionType:"muting"},r.id)})):h.createElement(U,S({},v,{isLoading:A,onLoadMore:x,hasMore:N,emptyMessage:e(p,{id:"mutes.empty.groups",defaultMessage:"You haven't muted any groups yet."})}),G.map(function(r){return e(J,{group:r,onUnmute:L})}))))};export{se as default}; +import{bj as _,g as b,bk as O,bl as R,bm as E,u as y,bn as I,a as e,H as M,bo as k,y as w,aa as z,F as p,bp as F,o as C,r as H,at as j,a2 as B,T as Y,R as h,av as S,B as K,X}from"../index-be605fd2.js";import{c as $}from"./useAccountList-32cce5e6.js";import{S as U}from"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";function q(){const s=_(),n=b(),{entities:a,...t}=O([E.GROUP_MUTES],()=>s.get("/api/v1/groups/mutes"),{schema:R,enabled:n.groupsMuting});return{...t,mutes:a}}var D=C({unmuteSuccess:{id:"group.unmute.success",defaultMessage:"Unmuted the group"}}),J=function(n){var a=n.group,t=n.onUnmute,i=y(),c=I(a),m=function(){c.mutate(void 0,{onSuccess:function(){t(),F.success(i.formatMessage(D.unmuteSuccess))}})};return e(M,{alignItems:"center",justifyContent:"between"},void 0,e(M,{alignItems:"center",space:3},void 0,e(k,{group:a,size:42}),e(w,{weight:"semibold",size:"sm",dangerouslySetInnerHTML:{__html:a.display_name_html},truncate:!0})),e(z,{theme:"primary",type:"button",onClick:m,size:"sm"},void 0,e(p,{id:"group.unmute.label",defaultMessage:"Unmute"})))},Q=C({heading:{id:"column.mutes",defaultMessage:"Mutes"}}),u=function(s){return s.ACCOUNTS="ACCOUNTS",s.GROUPS="GROUPS",s}(u||{}),se=function(){var n=y(),a=b(),t=$(),i=t.accounts,c=t.hasNextPage,m=t.fetchNextPage,g=t.isLoading,o=q(),G=o.mutes,A=o.isLoading,N=o.hasNextPage,x=o.fetchNextPage,L=o.fetchEntities,T=H.useState(u.ACCOUNTS),d=j(T,2),l=d[0],f=d[1],P=l===u.ACCOUNTS,v={itemClassName:"pb-4 last:pb-0",scrollKey:"mutes",emptyMessageCard:!1};return e(X,{label:n.formatMessage(Q.heading)},void 0,e(B,{space:4},void 0,a.groupsMuting&&e(Y,{items:[{text:"Users",action:function(){return f(u.ACCOUNTS)},name:u.ACCOUNTS},{text:"Groups",action:function(){return f(u.GROUPS)},name:u.GROUPS}],activeItem:l}),P?h.createElement(U,S({},v,{isLoading:g,onLoadMore:m,hasMore:c,emptyMessage:e(p,{id:"empty_column.mutes",defaultMessage:"You haven't muted any users yet."})}),i.map(function(r){return e(K,{id:r.id,actionType:"muting"},r.id)})):h.createElement(U,S({},v,{isLoading:A,onLoadMore:x,hasMore:N,emptyMessage:e(p,{id:"mutes.empty.groups",defaultMessage:"You haven't muted any groups yet."})}),G.map(function(r){return e(J,{group:r,onUnmute:L})}))))};export{se as default}; diff --git a/packs/js/index-899a85e6.js b/packs/js/index-6797616c.js similarity index 97% rename from packs/js/index-899a85e6.js rename to packs/js/index-6797616c.js index 30c22d3ff..6fad4ad3d 100644 --- a/packs/js/index-899a85e6.js +++ b/packs/js/index-6797616c.js @@ -1 +1 @@ -import{a7 as O,a as e,a2 as r,y as m,F as N,aa as H,d as ne,u as R,g as ie,ay as me,fI as fe,fJ as ve,fK as pe,r as k,fL as be,q as ye,H as S,R as A,aG as E,d$ as q,d_ as Y,L as K,c7 as Q,cz as _e,fM as we,fN as G,fO as Ce,fP as Me,c6 as ke,fQ as Se,af as B,ag as M,fR as C,fS as J,A as X,fT as xe,fU as Ne,o as T,aD as F,c5 as Oe,fV as Pe,cy as I,b8 as V,f as De,at as $,bE as oe,fW as Ie,a_ as ce,ah as re,_ as le,a6 as Ee,fX as je,fY as Le,fZ as Re,W as Z,f_ as Te,f$ as W,g0 as Ue}from"../index-7380452a.js";import{C as Be,a as He,b as Ae,c as $e}from"./chat-search-input-88ce0ef4.js";import{u as ue}from"./accounts-1cafdbcf.js";import{u as ze}from"./useDebounce-0d4ed135.js";import"./es.array.splice-d733542e.js";import"./index-75eb026b.js";import"./mood-smile-6a052395.js";import"./lodash-787b41ad.js";import"./pull-to-refresh-b8beecbe.js";var Fe=function(){var s=O(),a=function(){s.push("/chats/new")};return e(r,{space:6,alignItems:"center",justifyContent:"center",className:"h-full p-6"},void 0,e(r,{space:2,className:"max-w-sm"},void 0,e(m,{size:"2xl",weight:"bold",tag:"h2",align:"center"},void 0,e(N,{id:"chats.main.blankslate.title",defaultMessage:"No messages yet"})),e(m,{size:"sm",theme:"muted",align:"center"},void 0,e(N,{id:"chats.main.blankslate.subtitle",defaultMessage:"Search for someone to chat with"}))),e(H,{theme:"primary",onClick:a},void 0,e(N,{id:"chats.main.blankslate.new_chat",defaultMessage:"Message someone"})))},We=function(){var s=O(),a=function(){s.push("/chats/new")};return e(r,{space:6,alignItems:"center",justifyContent:"center",className:"h-full p-6"},void 0,e(r,{space:2,className:"max-w-sm"},void 0,e(m,{size:"2xl",weight:"bold",tag:"h2",align:"center"},void 0,e(N,{id:"chats.main.blankslate_with_chats.title",defaultMessage:"Select a chat"})),e(m,{size:"sm",theme:"muted",align:"center"},void 0,e(N,{id:"chats.main.blankslate_with_chats.subtitle",defaultMessage:"Select from one of your open chats or create a new message."}))),e(H,{theme:"primary",onClick:a},void 0,e(N,{id:"chats.main.blankslate.new_chat",defaultMessage:"Message someone"})))},c=T({blockMessage:{id:"chat_settings.block.message",defaultMessage:"Blocking will prevent this profile from direct messaging you and viewing your content. You can unblock later."},blockHeading:{id:"chat_settings.block.heading",defaultMessage:"Block @{acct}"},blockConfirm:{id:"chat_settings.block.confirm",defaultMessage:"Block"},unblockMessage:{id:"chat_settings.unblock.message",defaultMessage:"Unblocking will allow this profile to direct message you and view your content."},unblockHeading:{id:"chat_settings.unblock.heading",defaultMessage:"Unblock @{acct}"},unblockConfirm:{id:"chat_settings.unblock.confirm",defaultMessage:"Unblock"},leaveMessage:{id:"chat_settings.leave.message",defaultMessage:"Are you sure you want to leave this chat? Messages will be deleted for you and this chat will be removed from your inbox."},leaveHeading:{id:"chat_settings.leave.heading",defaultMessage:"Leave Chat"},leaveConfirm:{id:"chat_settings.leave.confirm",defaultMessage:"Leave Chat"},blockUser:{id:"chat_settings.options.block_user",defaultMessage:"Block @{acct}"},unblockUser:{id:"chat_settings.options.unblock_user",defaultMessage:"Unblock @{acct}"},reportUser:{id:"chat_settings.options.report_user",defaultMessage:"Report @{acct}"},leaveChat:{id:"chat_settings.options.leave_chat",defaultMessage:"Leave Chat"},autoDeleteLabel:{id:"chat_settings.auto_delete.label",defaultMessage:"Auto-delete messages"},autoDeleteHint:{id:"chat_settings.auto_delete.hint",defaultMessage:"Sent messages will auto-delete after the time period selected"},autoDelete2Minutes:{id:"chat_settings.auto_delete.2minutes",defaultMessage:"2 minutes"},autoDelete7Days:{id:"chat_settings.auto_delete.7days",defaultMessage:"7 days"},autoDelete14Days:{id:"chat_settings.auto_delete.14days",defaultMessage:"14 days"},autoDelete30Days:{id:"chat_settings.auto_delete.30days",defaultMessage:"30 days"},autoDelete90Days:{id:"chat_settings.auto_delete.90days",defaultMessage:"90 days"},autoDeleteMessage:{id:"chat_window.auto_delete_label",defaultMessage:"Auto-delete after {day, plural, one {# day} other {# days}}"},autoDeleteMessageTooltip:{id:"chat_window.auto_delete_tooltip",defaultMessage:"Chat messages are set to auto-delete after {day, plural, one {# day} other {# days}} upon sending."}}),qe=function(){var s=ne(),a=R(),n=ie(),o=O(),d=me(),f=d.chatId,h=fe(f),t=h.data,v=ve(),u=v.currentChatId,p=pe(),l=p.chatsQuery,g=l.data,j=l.isLoading,y=k.useRef(null),_=be(t==null?void 0:t.id),x=_.deleteChat,z=_.updateChat,P=function(w){return z.mutate({message_expiration:w})},U=ye(function(b){var w;return b.getIn(["relationships",t==null||(w=t.account)===null||w===void 0?void 0:w.id,"blocking"])}),de=function(){s(F("CONFIRM",{heading:a.formatMessage(c.blockHeading,{acct:t==null?void 0:t.account.acct}),message:a.formatMessage(c.blockMessage),confirm:a.formatMessage(c.blockConfirm),confirmationTheme:"primary",onConfirm:function(){return s(Oe(t==null?void 0:t.account.id))}}))},ge=function(){s(F("CONFIRM",{heading:a.formatMessage(c.unblockHeading,{acct:t==null?void 0:t.account.acct}),message:a.formatMessage(c.unblockMessage),confirm:a.formatMessage(c.unblockConfirm),confirmationTheme:"primary",onConfirm:function(){return s(Pe(t==null?void 0:t.account.id))}}))},he=function(){s(F("CONFIRM",{heading:a.formatMessage(c.leaveHeading),message:a.formatMessage(c.leaveMessage),confirm:a.formatMessage(c.leaveConfirm),confirmationTheme:"primary",onConfirm:function(){x.mutate(void 0,{onSuccess:function(){o.push("/chats")}})}}))};return j?null:!u&&g&&g.length>0?e(We,{}):u?t?e(r,{className:"h-full overflow-hidden"},void 0,e(S,{alignItems:"center",justifyContent:"between",space:2,className:"w-full p-4"},void 0,e(S,{alignItems:"center",space:2,className:"overflow-hidden"},void 0,e(S,{alignItems:"center"},void 0,A.createElement(E,{src:q,className:"mr-2 h-7 w-7 sm:mr-0 sm:hidden",ref:Y("Backspace"),onClick:function(){return o.push("/chats")}}),e(K,{to:"/@".concat(t.account.acct)},void 0,e(Q,{src:t.account.avatar,size:40,className:"flex-none"}))),e(r,{alignItems:"start",className:"h-11 overflow-hidden"},void 0,e("div",{className:"flex w-full grow items-center space-x-1"},void 0,e(K,{to:"/@".concat(t.account.acct)},void 0,e(m,{weight:"bold",size:"sm",align:"left",truncate:!0},void 0,t.account.display_name||"@".concat(t.account.username))),t.account.verified&&e(_e,{})),t.message_expiration&&e(we,{text:a.formatMessage(c.autoDeleteMessageTooltip,{day:G(t.message_expiration)})},void 0,e(m,{align:"left",size:"sm",weight:"medium",theme:"primary",truncate:!0,className:"w-full cursor-help"},void 0,a.formatMessage(c.autoDeleteMessage,{day:G(t.message_expiration)}))))),e(Ce,{},void 0,e(Me,{as:E,src:ke,iconClassName:"h-5 w-5 text-gray-600",children:null}),e(Se,{className:"w-80"},void 0,e(r,{space:4,className:"px-6 py-5"},void 0,e(S,{alignItems:"center",space:3},void 0,e(Q,{src:t.account.avatar_static,size:50}),e(r,{},void 0,e(m,{weight:"semibold"},void 0,t.account.display_name),e(m,{size:"sm",theme:"primary"},void 0,"@",t.account.acct))),n.chatsExpiration&&e(B,{},void 0,e(M,{label:a.formatMessage(c.autoDeleteLabel),hint:a.formatMessage(c.autoDeleteHint)}),e(M,{label:a.formatMessage(c.autoDelete7Days),onSelect:function(){return P(C.SEVEN)},isSelected:t.message_expiration===C.SEVEN}),e(M,{label:a.formatMessage(c.autoDelete14Days),onSelect:function(){return P(C.FOURTEEN)},isSelected:t.message_expiration===C.FOURTEEN}),e(M,{label:a.formatMessage(c.autoDelete30Days),onSelect:function(){return P(C.THIRTY)},isSelected:t.message_expiration===C.THIRTY}),e(M,{label:a.formatMessage(c.autoDelete90Days),onSelect:function(){return P(C.NINETY)},isSelected:t.message_expiration===C.NINETY})),e(r,{space:2},void 0,e(J,{as:"button",onSelect:U?ge:de,className:"!px-0 hover:!bg-transparent"},void 0,e("div",{className:"flex w-full items-center space-x-2 text-sm font-bold text-primary-500 dark:text-accent-blue"},void 0,e(X,{src:xe,className:"h-5 w-5"}),e("span",{},void 0,a.formatMessage(U?c.unblockUser:c.blockUser,{acct:t.account.acct})))),n.chatsDelete&&e(J,{as:"button",onSelect:he,className:"!px-0 hover:!bg-transparent"},void 0,e("div",{className:"flex w-full items-center space-x-2 text-sm font-bold text-danger-600 dark:text-danger-500"},void 0,e(X,{src:Ne,className:"h-5 w-5"}),e("span",{},void 0,a.formatMessage(c.leaveChat))))))))),e("div",{className:"h-full overflow-hidden"},void 0,e(Be,{className:"h-full",chat:t,inputRef:y}))):null:e(Fe,{})},Ye=T({title:{id:"chat.new_message.title",defaultMessage:"New Message"}}),Ve=function(){var s=R(),a=O();return e(r,{className:"h-full space-y-4"},void 0,e(r,{className:"grow px-4 pt-6 sm:px-6"},void 0,e(S,{alignItems:"center"},void 0,A.createElement(E,{src:q,className:"mr-2 h-7 w-7 sm:mr-0 sm:hidden",ref:Y("Backspace"),onClick:function(){return a.push("/chats")}}),e(I,{title:s.formatMessage(Ye.title)}))),e(He,{isMainPage:!0}))};function ee(i,s){var a=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);s&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable})),a.push.apply(a,n)}return a}function ae(i){for(var s=1;s0?e(We,{}):u?t?e(r,{className:"h-full overflow-hidden"},void 0,e(S,{alignItems:"center",justifyContent:"between",space:2,className:"w-full p-4"},void 0,e(S,{alignItems:"center",space:2,className:"overflow-hidden"},void 0,e(S,{alignItems:"center"},void 0,A.createElement(E,{src:q,className:"mr-2 h-7 w-7 sm:mr-0 sm:hidden",ref:Y("Backspace"),onClick:function(){return o.push("/chats")}}),e(K,{to:"/@".concat(t.account.acct)},void 0,e(Q,{src:t.account.avatar,size:40,className:"flex-none"}))),e(r,{alignItems:"start",className:"h-11 overflow-hidden"},void 0,e("div",{className:"flex w-full grow items-center space-x-1"},void 0,e(K,{to:"/@".concat(t.account.acct)},void 0,e(m,{weight:"bold",size:"sm",align:"left",truncate:!0},void 0,t.account.display_name||"@".concat(t.account.username))),t.account.verified&&e(_e,{})),t.message_expiration&&e(we,{text:a.formatMessage(c.autoDeleteMessageTooltip,{day:G(t.message_expiration)})},void 0,e(m,{align:"left",size:"sm",weight:"medium",theme:"primary",truncate:!0,className:"w-full cursor-help"},void 0,a.formatMessage(c.autoDeleteMessage,{day:G(t.message_expiration)}))))),e(Ce,{},void 0,e(Me,{as:E,src:ke,iconClassName:"h-5 w-5 text-gray-600",children:null}),e(Se,{className:"w-80"},void 0,e(r,{space:4,className:"px-6 py-5"},void 0,e(S,{alignItems:"center",space:3},void 0,e(Q,{src:t.account.avatar_static,size:50}),e(r,{},void 0,e(m,{weight:"semibold"},void 0,t.account.display_name),e(m,{size:"sm",theme:"primary"},void 0,"@",t.account.acct))),n.chatsExpiration&&e(B,{},void 0,e(M,{label:a.formatMessage(c.autoDeleteLabel),hint:a.formatMessage(c.autoDeleteHint)}),e(M,{label:a.formatMessage(c.autoDelete7Days),onSelect:function(){return P(C.SEVEN)},isSelected:t.message_expiration===C.SEVEN}),e(M,{label:a.formatMessage(c.autoDelete14Days),onSelect:function(){return P(C.FOURTEEN)},isSelected:t.message_expiration===C.FOURTEEN}),e(M,{label:a.formatMessage(c.autoDelete30Days),onSelect:function(){return P(C.THIRTY)},isSelected:t.message_expiration===C.THIRTY}),e(M,{label:a.formatMessage(c.autoDelete90Days),onSelect:function(){return P(C.NINETY)},isSelected:t.message_expiration===C.NINETY})),e(r,{space:2},void 0,e(J,{as:"button",onSelect:U?ge:de,className:"!px-0 hover:!bg-transparent"},void 0,e("div",{className:"flex w-full items-center space-x-2 text-sm font-bold text-primary-500 dark:text-accent-blue"},void 0,e(X,{src:xe,className:"h-5 w-5"}),e("span",{},void 0,a.formatMessage(U?c.unblockUser:c.blockUser,{acct:t.account.acct})))),n.chatsDelete&&e(J,{as:"button",onSelect:he,className:"!px-0 hover:!bg-transparent"},void 0,e("div",{className:"flex w-full items-center space-x-2 text-sm font-bold text-danger-600 dark:text-danger-500"},void 0,e(X,{src:Ne,className:"h-5 w-5"}),e("span",{},void 0,a.formatMessage(c.leaveChat))))))))),e("div",{className:"h-full overflow-hidden"},void 0,e(Be,{className:"h-full",chat:t,inputRef:y}))):null:e(Fe,{})},Ye=T({title:{id:"chat.new_message.title",defaultMessage:"New Message"}}),Ve=function(){var s=R(),a=O();return e(r,{className:"h-full space-y-4"},void 0,e(r,{className:"grow px-4 pt-6 sm:px-6"},void 0,e(S,{alignItems:"center"},void 0,A.createElement(E,{src:q,className:"mr-2 h-7 w-7 sm:mr-0 sm:hidden",ref:Y("Backspace"),onClick:function(){return a.push("/chats")}}),e(I,{title:s.formatMessage(Ye.title)}))),e(He,{isMainPage:!0}))};function ee(i,s){var a=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);s&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable})),a.push.apply(a,n)}return a}function ae(i){for(var s=1;s"),created_at:t.scheduled_at,id:t.id,in_reply_to_id:t.in_reply_to_id,media_attachments:t.media_attachments,poll:t.poll,sensitive:t.sensitive,uri:"/scheduled_statuses/".concat(t.id),url:"/scheduled_statuses/".concat(t.id),visibility:t.visibility});return y(b(u))},l=p({cancel:{id:"scheduled_status.cancel",defaultMessage:"Cancel"},deleteConfirm:{id:"confirmations.scheduled_status_delete.confirm",defaultMessage:"Cancel"},deleteHeading:{id:"confirmations.scheduled_status_delete.heading",defaultMessage:"Cancel scheduled post"},deleteMessage:{id:"confirmations.scheduled_status_delete.message",defaultMessage:"Are you sure you want to cancel this scheduled post?"}}),D=function(n){var t=n.status,a=_(),e=v(),d=function(){e(function(i,h){var g=x(h()).get("deleteModal");e(g?R("CONFIRM",{icon:w,heading:a.formatMessage(l.deleteHeading),message:a.formatMessage(l.deleteMessage),confirm:a.formatMessage(l.deleteConfirm),onConfirm:function(){return e(c(t.id))}}):c(t.id))})};return s(f,{justifyContent:"end"},void 0,s(C,{title:a.formatMessage(l.cancel),text:a.formatMessage(l.cancel),src:I,onClick:d}))},K=["statusId"],Q=function(n){var t=n.statusId,a=A(n,K),e=r(function(u){var i=u.scheduled_statuses.get(t);return i?z(u,i):null});if(!e)return null;var d=e.account;return s("div",{className:m("status__wrapper","status__wrapper-".concat(e.visibility),{"status__wrapper-reply":!!e.in_reply_to_id}),tabIndex:0},void 0,s("div",{className:m("status","status-".concat(e.visibility),{"status-reply":!!e.in_reply_to_id}),"data-id":e.id},void 0,s("div",{className:"mb-4"},void 0,s(f,{justifyContent:"between",alignItems:"start"},void 0,s(E,{account:d,timestamp:e.created_at,futureTimestamp:!0,hideActions:!0},d.id))),s(P,{status:e}),s(L,{status:e,collapsable:!0}),e.media_attachments.size>0&&s(N,{media:e.media_attachments,sensitive:e.sensitive}),e.poll&&s($,{pollId:e.poll}),k.createElement(D,H({status:e},a))))},J=p({heading:{id:"column.scheduled_statuses",defaultMessage:"Scheduled Posts"}}),U=j(function(o){o(q())},300,{leading:!0}),se=function(){var n=_(),t=v(),a=r(function(i){return i.status_lists.get("scheduled_statuses").items}),e=r(function(i){return i.status_lists.get("scheduled_statuses").isLoading}),d=r(function(i){return!!i.status_lists.get("scheduled_statuses").next});B.useEffect(function(){t(F())},[]);var u=s(T,{id:"empty_column.scheduled_statuses",defaultMessage:"You don't have any scheduled statuses yet. When you add one, it will show up here."});return s(O,{label:n.formatMessage(J.heading)},void 0,s(W,{scrollKey:"scheduled_statuses",hasMore:d,isLoading:typeof e=="boolean"?e:!0,onLoadMore:function(){return U(t)},emptyMessage:u},void 0,a.map(function(i){return s(Q,{statusId:i},i)})))};export{se as default}; diff --git a/packs/js/index-b84c723b.js b/packs/js/index-6f58feb4.js similarity index 91% rename from packs/js/index-b84c723b.js rename to packs/js/index-6f58feb4.js index 783498a4b..f6886f38c 100644 --- a/packs/js/index-b84c723b.js +++ b/packs/js/index-6f58feb4.js @@ -1 +1 @@ -import{r as L,u as B,d as Q,q as u,b3 as W,eQ as X,a,B as N,R as C,y as Y,F as M,a9 as j,a5 as G,H as J,W as T,eR as Z,eS as ee,T as ae,aO as se,o as D,eT as te,eU as re,X as ne}from"../index-7380452a.js";import{H as k}from"./hashtag-1d2f7520.js";import{S as oe}from"./scrollable-list-df58e451.js";import{S as U}from"./status-container-59e57baf.js";import{P as ce}from"./placeholder-account-a1add042.js";import{P as ue}from"./placeholder-hashtag-f832d585.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var R=D({accounts:{id:"search_results.accounts",defaultMessage:"People"},statuses:{id:"search_results.statuses",defaultMessage:"Posts"},hashtags:{id:"search_results.hashtags",defaultMessage:"Hashtags"}}),ie=function(){var i,P=L.useRef(null),y=B(),h=Q(),f=u(function(e){return e.search.submittedValue}),s=u(function(e){return e.search.results}),l=u(function(e){return e.suggestions.items}),v=u(function(e){return e.trending_statuses.items}),z=u(function(e){return e.trends.items}),d=u(function(e){return e.search.submitted}),n=u(function(e){return e.search.filter}),w=u(function(e){return e.search.accountId||void 0}),V=W(w),S=V.account,$=function(){return h(Z(n))},K=function(){return h(ee(null))},b=function(t){return h(te(t))},O=function(){var t=[];return t.push({text:y.formatMessage(R.accounts),action:function(){return b("accounts")},name:"accounts"},{text:y.formatMessage(R.statuses),action:function(){return b("statuses")},name:"statuses"}),t.push({text:y.formatMessage(R.hashtags),action:function(){return b("hashtags")},name:"hashtags"}),a(ae,{items:t,activeItem:n})},A=function(t){var r;return(r=m)===null||r===void 0?void 0:r.keySeq().findIndex(function(H){return H===t})},F=function(t){if(m){var r=A(t)-1;E(r)}},I=function(t){if(m){var r=A(t)+1;E(r)}},E=function(t){var r;(r=P.current)===null||r===void 0||r.scrollIntoView({index:t,behavior:"smooth",done:function(){var x=document.querySelector('#search-results [data-index="'.concat(t,'"] .focusable'));x==null||x.focus()}})};L.useEffect(function(){h(X())},[]);var o,p=!1,c,g,_=function(){return a(se,{showPrivacyIndicator:!0})},m;return n==="accounts"&&(p=s.accountsHasMore,c=s.accountsLoaded,_=ce,s.accounts&&s.accounts.size>0?o=s.accounts.map(function(e){return a(N,{id:e},e)}):!d&&l&&!l.isEmpty()?o=l.map(function(e){return a(N,{id:e.account},e.account)}):c&&(g=a("div",{className:"empty-column-indicator"},void 0,a(M,{id:"empty_column.search.accounts",defaultMessage:'There are no people results for "{term}"',values:{term:f}})))),n==="statuses"&&(p=s.statusesHasMore,c=s.statusesLoaded,s.statuses&&s.statuses.size>0?(o=s.statuses.map(function(e){return a(U,{id:e,onMoveUp:F,onMoveDown:I},e)}),m=s.statuses):!d&&v&&!v.isEmpty()?(o=v.map(function(e){return a(U,{id:e,onMoveUp:F,onMoveDown:I},e)}),m=v):c&&(g=a("div",{className:"empty-column-indicator"},void 0,a(M,{id:"empty_column.search.statuses",defaultMessage:'There are no posts results for "{term}"',values:{term:f}})))),n==="hashtags"&&(p=s.hashtagsHasMore,c=s.hashtagsLoaded,_=ue,s.hashtags&&s.hashtags.size>0?o=s.hashtags.map(function(e){return a(k,{hashtag:e},e.name)}):!d&&l&&!l.isEmpty()?o=z.map(function(e){return a(k,{hashtag:e},e.name)}):c&&(g=a("div",{className:"empty-column-indicator"},void 0,a(M,{id:"empty_column.search.hashtags",defaultMessage:'There are no hashtags results for "{term}"',values:{term:f}})))),C.createElement(C.Fragment,null,w?a(J,{className:"mb-4 border-b border-solid border-gray-200 px-2 pb-4 dark:border-gray-800",space:2},void 0,a(j,{iconClassName:"h-5 w-5",src:G,onClick:K}),a(Y,{truncate:!0},void 0,a(M,{id:"search_results.filter_message",defaultMessage:"You are searching for posts from @{acct}.",values:{acct:a("strong",{className:"break-words"},void 0,S==null?void 0:S.acct)}}))):O(),g||C.createElement(oe,{id:"search-results",ref:P,key:n,scrollKey:"".concat(n,":").concat(f),isLoading:d&&!c,showLoading:d&&!c&&((i=o)===null||i===void 0?void 0:i.isEmpty()),hasMore:p,onLoadMore:$,placeholderComponent:_,placeholderCount:20,className:T({"divide-gray-200 dark:divide-gray-800 divide-solid divide-y":n==="statuses"}),itemClassName:T({"pb-4":n==="accounts","pb-3":n==="hashtags"})},o||[]))},le=D({heading:{id:"column.search",defaultMessage:"Search"}}),ye=function(){var i=B();return a(ne,{label:i.formatMessage(le.heading)},void 0,a("div",{className:"space-y-4"},void 0,a(re,{autoFocus:!0,autoSubmit:!0}),a(ie,{})))};export{ye as default}; +import{r as L,u as B,d as Q,q as u,b3 as W,eQ as X,a,B as N,R as C,y as Y,F as M,a9 as j,a5 as G,H as J,W as T,eR as Z,eS as ee,T as ae,aO as se,o as D,eT as te,eU as re,X as ne}from"../index-be605fd2.js";import{H as k}from"./hashtag-394c7092.js";import{S as oe}from"./scrollable-list-1e43c72d.js";import{S as U}from"./status-container-e53698d2.js";import{P as ce}from"./placeholder-account-dcc395bb.js";import{P as ue}from"./placeholder-hashtag-fb054a2b.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var R=D({accounts:{id:"search_results.accounts",defaultMessage:"People"},statuses:{id:"search_results.statuses",defaultMessage:"Posts"},hashtags:{id:"search_results.hashtags",defaultMessage:"Hashtags"}}),ie=function(){var i,P=L.useRef(null),y=B(),h=Q(),f=u(function(e){return e.search.submittedValue}),s=u(function(e){return e.search.results}),l=u(function(e){return e.suggestions.items}),v=u(function(e){return e.trending_statuses.items}),z=u(function(e){return e.trends.items}),d=u(function(e){return e.search.submitted}),n=u(function(e){return e.search.filter}),w=u(function(e){return e.search.accountId||void 0}),V=W(w),S=V.account,$=function(){return h(Z(n))},K=function(){return h(ee(null))},b=function(t){return h(te(t))},O=function(){var t=[];return t.push({text:y.formatMessage(R.accounts),action:function(){return b("accounts")},name:"accounts"},{text:y.formatMessage(R.statuses),action:function(){return b("statuses")},name:"statuses"}),t.push({text:y.formatMessage(R.hashtags),action:function(){return b("hashtags")},name:"hashtags"}),a(ae,{items:t,activeItem:n})},A=function(t){var r;return(r=m)===null||r===void 0?void 0:r.keySeq().findIndex(function(H){return H===t})},F=function(t){if(m){var r=A(t)-1;E(r)}},I=function(t){if(m){var r=A(t)+1;E(r)}},E=function(t){var r;(r=P.current)===null||r===void 0||r.scrollIntoView({index:t,behavior:"smooth",done:function(){var x=document.querySelector('#search-results [data-index="'.concat(t,'"] .focusable'));x==null||x.focus()}})};L.useEffect(function(){h(X())},[]);var o,p=!1,c,g,_=function(){return a(se,{showPrivacyIndicator:!0})},m;return n==="accounts"&&(p=s.accountsHasMore,c=s.accountsLoaded,_=ce,s.accounts&&s.accounts.size>0?o=s.accounts.map(function(e){return a(N,{id:e},e)}):!d&&l&&!l.isEmpty()?o=l.map(function(e){return a(N,{id:e.account},e.account)}):c&&(g=a("div",{className:"empty-column-indicator"},void 0,a(M,{id:"empty_column.search.accounts",defaultMessage:'There are no people results for "{term}"',values:{term:f}})))),n==="statuses"&&(p=s.statusesHasMore,c=s.statusesLoaded,s.statuses&&s.statuses.size>0?(o=s.statuses.map(function(e){return a(U,{id:e,onMoveUp:F,onMoveDown:I},e)}),m=s.statuses):!d&&v&&!v.isEmpty()?(o=v.map(function(e){return a(U,{id:e,onMoveUp:F,onMoveDown:I},e)}),m=v):c&&(g=a("div",{className:"empty-column-indicator"},void 0,a(M,{id:"empty_column.search.statuses",defaultMessage:'There are no posts results for "{term}"',values:{term:f}})))),n==="hashtags"&&(p=s.hashtagsHasMore,c=s.hashtagsLoaded,_=ue,s.hashtags&&s.hashtags.size>0?o=s.hashtags.map(function(e){return a(k,{hashtag:e},e.name)}):!d&&l&&!l.isEmpty()?o=z.map(function(e){return a(k,{hashtag:e},e.name)}):c&&(g=a("div",{className:"empty-column-indicator"},void 0,a(M,{id:"empty_column.search.hashtags",defaultMessage:'There are no hashtags results for "{term}"',values:{term:f}})))),C.createElement(C.Fragment,null,w?a(J,{className:"mb-4 border-b border-solid border-gray-200 px-2 pb-4 dark:border-gray-800",space:2},void 0,a(j,{iconClassName:"h-5 w-5",src:G,onClick:K}),a(Y,{truncate:!0},void 0,a(M,{id:"search_results.filter_message",defaultMessage:"You are searching for posts from @{acct}.",values:{acct:a("strong",{className:"break-words"},void 0,S==null?void 0:S.acct)}}))):O(),g||C.createElement(oe,{id:"search-results",ref:P,key:n,scrollKey:"".concat(n,":").concat(f),isLoading:d&&!c,showLoading:d&&!c&&((i=o)===null||i===void 0?void 0:i.isEmpty()),hasMore:p,onLoadMore:$,placeholderComponent:_,placeholderCount:20,className:T({"divide-gray-200 dark:divide-gray-800 divide-solid divide-y":n==="statuses"}),itemClassName:T({"pb-4":n==="accounts","pb-3":n==="hashtags"})},o||[]))},le=D({heading:{id:"column.search",defaultMessage:"Search"}}),ye=function(){var i=B();return a(ne,{label:i.formatMessage(le.heading)},void 0,a("div",{className:"space-y-4"},void 0,a(re,{autoFocus:!0,autoSubmit:!0}),a(ie,{})))};export{ye as default}; diff --git a/packs/js/index-5c8fa37d.js b/packs/js/index-733cc03a.js similarity index 98% rename from packs/js/index-5c8fa37d.js rename to packs/js/index-733cc03a.js index 2abd4ce81..ee4b097e7 100644 --- a/packs/js/index-5c8fa37d.js +++ b/packs/js/index-733cc03a.js @@ -1,3 +1,3 @@ -import{d as b,u as y,r as C,at as R,a as e,bE as S,y as s,F as r,bF as q,bG as P,bI as T,aa as A,X as x,o as k,jc as w,bp as c,a7 as F,R as f,aw as o,jd as L,hq as I,fU as W,gN as h,L as j,q as E,N as Y}from"../index-7380452a.js";var g=k({heading:{id:"column.developers",defaultMessage:"Developers"},answerLabel:{id:"developers.challenge.answer_label",defaultMessage:"Answer"},answerPlaceholder:{id:"developers.challenge.answer_placeholder",defaultMessage:"Your answer"},success:{id:"developers.challenge.success",defaultMessage:"You are now a developer"},fail:{id:"developers.challenge.fail",defaultMessage:"Wrong answer"}}),B=function(){var t=b(),a=y(),d=C.useState(""),i=R(d,2),n=i[0],p=i[1],v=function(N){p(N.target.value)},m=function(){n==="boxsoap"?(t(w(["isDeveloper"],!0)),c.success(a.formatMessage(g.success))):c.error(a.formatMessage(g.fail))},M=`function soapbox() { +import{d as b,u as y,r as C,at as R,a as e,bE as S,y as s,F as r,bF as q,bG as P,bI as T,aa as A,X as x,o as k,jc as w,bp as c,a7 as F,R as f,aw as o,jd as L,hq as I,fU as W,gN as h,L as j,q as E,N as Y}from"../index-be605fd2.js";var g=k({heading:{id:"column.developers",defaultMessage:"Developers"},answerLabel:{id:"developers.challenge.answer_label",defaultMessage:"Answer"},answerPlaceholder:{id:"developers.challenge.answer_placeholder",defaultMessage:"Your answer"},success:{id:"developers.challenge.success",defaultMessage:"You are now a developer"},fail:{id:"developers.challenge.fail",defaultMessage:"Wrong answer"}}),B=function(){var t=b(),a=y(),d=C.useState(""),i=R(d,2),n=i[0],p=i[1],v=function(N){p(N.target.value)},m=function(){n==="boxsoap"?(t(w(["isDeveloper"],!0)),c.success(a.formatMessage(g.success))):c.error(a.formatMessage(g.fail))},M=`function soapbox() { return 'soap|box'.split('|').reverse().join(''); }`;return e(x,{label:a.formatMessage(g.heading)},void 0,e(S,{onSubmit:m},void 0,e(s,{},void 0,e(r,{id:"developers.challenge.message",defaultMessage:"What is the result of calling {function}?",values:{function:e("span",{className:"font-mono"},void 0,"soapbox()")}})),e(s,{tag:"pre",family:"mono",theme:"muted"},void 0,M),e(q,{labelText:a.formatMessage(g.answerLabel)},void 0,e(P,{name:"answer",placeholder:a.formatMessage(g.answerPlaceholder),onChange:v,value:n,type:"text"})),e(T,{},void 0,e(A,{theme:"primary",type:"submit"},void 0,e(r,{id:"developers.challenge.submit",defaultMessage:"Become a developer"})))))};const G="/packs/assets/urgent-6335a6e3.svg",H="/packs/assets/script-e5d4ad8a.svg",$="/packs/assets/mood-sad-6dc629c0.svg",z="/packs/assets/code-plus-5c0aad62.svg",U="/packs/assets/apps-a7378890.svg";var _=k({heading:{id:"column.developers",defaultMessage:"Developers"},leave:{id:"developers.leave",defaultMessage:"You have left developers"}}),l=function(t){var a=t.to,d=t.onClick,i=t.children,n="bg-gray-200 dark:bg-gray-800 hover:bg-gray-300 dark:hover:bg-gray-800/75 p-4 rounded flex flex-col items-center justify-center space-y-2";return a?e(j,{className:n,to:a},void 0,i):e("button",{className:n,onClick:d},void 0,i)},X=function(){var t=b(),a=F(),d=y(),i=function(v){v.preventDefault(),t(w(["isDeveloper"],!1)),c.success(d.formatMessage(_.leave)),a.push("/")},n=function(v){v.preventDefault(),c.success("Hello world!",{action:function(){return alert("hi")},actionLabel:"Click me"})};return f.createElement(f.Fragment,null,e(x,{label:d.formatMessage(_.heading)},void 0,e("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3"},void 0,e(l,{to:"/developers/apps/create"},void 0,e(o,{src:U,className:"text-gray-700 dark:text-gray-600"}),e(s,{},void 0,e(r,{id:"developers.navigation.app_create_label",defaultMessage:"Create an app"}))),e(l,{to:"/developers/settings_store"},void 0,e(o,{src:z,className:"text-gray-700 dark:text-gray-600"}),e(s,{},void 0,e(r,{id:"developers.navigation.settings_store_label",defaultMessage:"Settings store"}))),e(l,{to:"/developers/timeline"},void 0,e(o,{src:L,className:"text-gray-700 dark:text-gray-600"}),e(s,{},void 0,e(r,{id:"developers.navigation.test_timeline_label",defaultMessage:"Test timeline"}))),e(l,{to:"/error"},void 0,e(o,{src:$,className:"text-gray-700 dark:text-gray-600"}),e(s,{},void 0,e(r,{id:"developers.navigation.intentional_error_label",defaultMessage:"Trigger an error"}))),e(l,{to:"/error/network"},void 0,e(o,{src:I,className:"text-gray-700 dark:text-gray-600"}),e(s,{},void 0,e(r,{id:"developers.navigation.network_error_label",defaultMessage:"Network error"}))),e(l,{to:"/developers/sw"},void 0,e(o,{src:H,className:"text-gray-700 dark:text-gray-600"}),e(s,{},void 0,e(r,{id:"developers.navigation.service_worker_label",defaultMessage:"Service Worker"}))),e(l,{onClick:i},void 0,e(o,{src:W,className:"text-gray-700 dark:text-gray-600"}),e(s,{},void 0,e(r,{id:"developers.navigation.leave_developers_label",defaultMessage:"Leave developers"}))),e(l,{onClick:n},void 0,e(o,{src:G,className:"text-gray-700 dark:text-gray-600"}),e(s,{},void 0,e(r,{id:"developers.navigation.show_toast",defaultMessage:"Trigger Toast"}))))),e("div",{className:"p-4"},void 0,e(s,{align:"center",theme:"subtle",size:"sm"},void 0,h.displayName," ",h.version)))},K=function(){var t=E(function(a){return Y(a).get("isDeveloper")});return t?e(X,{}):e(B,{})};export{K as default}; diff --git a/packs/js/index-88311901.js b/packs/js/index-74f11771.js similarity index 97% rename from packs/js/index-88311901.js rename to packs/js/index-74f11771.js index c2dac6753..e3b48f946 100644 --- a/packs/js/index-88311901.js +++ b/packs/js/index-74f11771.js @@ -1 +1 @@ -import{u as R,d as q,t as G,r as s,at as i,a as e,bE as N,y as Y,F as n,L as j,R as y,bF as F,bG as _,bI as B,aa as D,X as H,o as X,j1 as $,bp as A}from"../index-7380452a.js";var t=X({heading:{id:"column.migration",defaultMessage:"Account migration"},submit:{id:"migration.submit",defaultMessage:"Move followers"},moveAccountSuccess:{id:"migration.move_account.success",defaultMessage:"Account successfully moved."},moveAccountFail:{id:"migration.move_account.fail",defaultMessage:"Account migration failed."},moveAccountFailCooldownPeriod:{id:"migration.move_account.fail.cooldown_period",defaultMessage:"You have moved your account too recently. Please try again later."},acctFieldLabel:{id:"migration.fields.acct.label",defaultMessage:"Handle of the new account"},acctFieldPlaceholder:{id:"migration.fields.acct.placeholder",defaultMessage:"username@domain"},currentPasswordFieldLabel:{id:"migration.fields.confirm_password.label",defaultMessage:"Current password"}}),K=function(){var a=R(),S=q(),x=G(),l=x.pleroma.metadata.migration_cooldown_period,P=s.useState(""),c=i(P,2),u=c[0],d=c[1],C=s.useState(""),m=i(C,2),g=m[0],v=m[1],I=s.useState(!1),f=i(I,2),L=f[0],h=f[1],p=function(r){r.target.name==="password"?v(r.target.value):d(r.target.value)},k=function(){d(""),v("")},w=function(r){return h(!0),S($(u,g)).then(function(){k(),A.success(a.formatMessage(t.moveAccountSuccess))}).catch(function(T){var o,b=a.formatMessage(t.moveAccountFail),E=(o=T.response)===null||o===void 0||(o=o.data)===null||o===void 0?void 0:o.error;E==="You are within cooldown period."&&(b=a.formatMessage(t.moveAccountFailCooldownPeriod)),A.error(b)}).then(function(){h(!1)})};return e(H,{label:a.formatMessage(t.heading)},void 0,e(N,{onSubmit:w},void 0,e(Y,{theme:"muted"},void 0,e(n,{id:"migration.hint",defaultMessage:"This will move your followers to the new account. No other data will be moved. To perform migration, you need to {link} on your new account first.",values:{link:e(j,{className:"text-primary-600 hover:text-primary-800 hover:underline dark:text-primary-400 dark:hover:text-primary-500",to:"/settings/aliases"},void 0,e(n,{id:"migration.hint.link",defaultMessage:"create an account alias"}))}}),!!l&&y.createElement(y.Fragment,null," ",e(n,{id:"migration.hint.cooldown_period",defaultMessage:"If you migrate your account, you will not be able to migrate your account for {cooldownPeriod, plural, one {one day} other {the next # days}}.",values:{cooldownPeriod:l}}))),e(F,{labelText:a.formatMessage(t.acctFieldLabel)},void 0,e(_,{name:"targetAccount",placeholder:a.formatMessage(t.acctFieldPlaceholder),onChange:p,value:u,required:!0})),e(F,{labelText:a.formatMessage(t.currentPasswordFieldLabel)},void 0,e(_,{type:"password",name:"password",onChange:p,value:g,required:!0})),e(B,{},void 0,e(D,{theme:"primary",text:a.formatMessage(t.submit),onClick:w,disabled:L}))))};export{K as default}; +import{u as R,d as q,t as G,r as s,at as i,a as e,bE as N,y as Y,F as n,L as j,R as y,bF as F,bG as _,bI as B,aa as D,X as H,o as X,j1 as $,bp as A}from"../index-be605fd2.js";var t=X({heading:{id:"column.migration",defaultMessage:"Account migration"},submit:{id:"migration.submit",defaultMessage:"Move followers"},moveAccountSuccess:{id:"migration.move_account.success",defaultMessage:"Account successfully moved."},moveAccountFail:{id:"migration.move_account.fail",defaultMessage:"Account migration failed."},moveAccountFailCooldownPeriod:{id:"migration.move_account.fail.cooldown_period",defaultMessage:"You have moved your account too recently. Please try again later."},acctFieldLabel:{id:"migration.fields.acct.label",defaultMessage:"Handle of the new account"},acctFieldPlaceholder:{id:"migration.fields.acct.placeholder",defaultMessage:"username@domain"},currentPasswordFieldLabel:{id:"migration.fields.confirm_password.label",defaultMessage:"Current password"}}),K=function(){var a=R(),S=q(),x=G(),l=x.pleroma.metadata.migration_cooldown_period,P=s.useState(""),c=i(P,2),u=c[0],d=c[1],C=s.useState(""),m=i(C,2),g=m[0],v=m[1],I=s.useState(!1),f=i(I,2),L=f[0],h=f[1],p=function(r){r.target.name==="password"?v(r.target.value):d(r.target.value)},k=function(){d(""),v("")},w=function(r){return h(!0),S($(u,g)).then(function(){k(),A.success(a.formatMessage(t.moveAccountSuccess))}).catch(function(T){var o,b=a.formatMessage(t.moveAccountFail),E=(o=T.response)===null||o===void 0||(o=o.data)===null||o===void 0?void 0:o.error;E==="You are within cooldown period."&&(b=a.formatMessage(t.moveAccountFailCooldownPeriod)),A.error(b)}).then(function(){h(!1)})};return e(H,{label:a.formatMessage(t.heading)},void 0,e(N,{onSubmit:w},void 0,e(Y,{theme:"muted"},void 0,e(n,{id:"migration.hint",defaultMessage:"This will move your followers to the new account. No other data will be moved. To perform migration, you need to {link} on your new account first.",values:{link:e(j,{className:"text-primary-600 hover:text-primary-800 hover:underline dark:text-primary-400 dark:hover:text-primary-500",to:"/settings/aliases"},void 0,e(n,{id:"migration.hint.link",defaultMessage:"create an account alias"}))}}),!!l&&y.createElement(y.Fragment,null," ",e(n,{id:"migration.hint.cooldown_period",defaultMessage:"If you migrate your account, you will not be able to migrate your account for {cooldownPeriod, plural, one {one day} other {the next # days}}.",values:{cooldownPeriod:l}}))),e(F,{labelText:a.formatMessage(t.acctFieldLabel)},void 0,e(_,{name:"targetAccount",placeholder:a.formatMessage(t.acctFieldPlaceholder),onChange:p,value:u,required:!0})),e(F,{labelText:a.formatMessage(t.currentPasswordFieldLabel)},void 0,e(_,{type:"password",name:"password",onChange:p,value:g,required:!0})),e(B,{},void 0,e(D,{theme:"primary",text:a.formatMessage(t.submit),onClick:w,disabled:L}))))};export{K as default}; diff --git a/packs/js/index-dd438a69.js b/packs/js/index-75561210.js similarity index 90% rename from packs/js/index-dd438a69.js rename to packs/js/index-75561210.js index 04d12ae64..eb5f1adaf 100644 --- a/packs/js/index-dd438a69.js +++ b/packs/js/index-75561210.js @@ -1 +1 @@ -import{u as d,d as l,R as i,at as E,fg as C,bp as o,fh as p,a as c,aN as h,aB as g,o as v}from"../index-7380452a.js";var a={IDLE:"IDLE",SUCCESS:"SUCCESS",FAIL:"FAIL"},I=v({success:{id:"email_confirmation.success",defaultMessage:"Your email has been confirmed!"}}),e=new URLSearchParams(window.location.search).get("confirmation_token"),A=function(){var u=d(),f=l(),S=i.useState(a.IDLE),s=E(S,2),t=s[0],r=s[1];return i.useEffect(function(){e&&f(C(e)).then(function(){r(a.SUCCESS),o.success(u.formatMessage(I.success))}).catch(function(n){if(r(a.FAIL),n.response.data.error){var m=p(n.response.data.error);o.error(m)}})},[e]),!e||t===a.SUCCESS||t===a.FAIL?c(h,{to:"/"}):c(g,{})};export{A as default}; +import{u as d,d as l,R as i,at as E,fg as C,bp as o,fh as p,a as c,aN as h,aB as g,o as v}from"../index-be605fd2.js";var a={IDLE:"IDLE",SUCCESS:"SUCCESS",FAIL:"FAIL"},I=v({success:{id:"email_confirmation.success",defaultMessage:"Your email has been confirmed!"}}),e=new URLSearchParams(window.location.search).get("confirmation_token"),A=function(){var u=d(),f=l(),S=i.useState(a.IDLE),s=E(S,2),t=s[0],r=s[1];return i.useEffect(function(){e&&f(C(e)).then(function(){r(a.SUCCESS),o.success(u.formatMessage(I.success))}).catch(function(n){if(r(a.FAIL),n.response.data.error){var m=p(n.response.data.error);o.error(m)}})},[e]),!e||t===a.SUCCESS||t===a.FAIL?c(h,{to:"/"}):c(g,{})};export{A as default}; diff --git a/packs/js/index-704aaec3.js b/packs/js/index-78ab572e.js similarity index 87% rename from packs/js/index-704aaec3.js rename to packs/js/index-78ab572e.js index 179dfe8ad..bf9a65531 100644 --- a/packs/js/index-704aaec3.js +++ b/packs/js/index-78ab572e.js @@ -1 +1 @@ -import{d as m,u as l,a,aG as f,bf as b,y as v,H as k,o as u,bg as g,Q as p,bh as h,q as r,R as D,bi as M,aB as _,X as c,F as y}from"../index-7380452a.js";import{S as B}from"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var C=u({blockDomainConfirm:{id:"confirmations.domain_block.confirm",defaultMessage:"Hide entire domain"},unblockDomain:{id:"account.unblock_domain",defaultMessage:"Unhide {domain}"}}),R=function(o){var n=o.domain,i=m(),t=l(),d=function(){i(g(n))};return a(k,{alignItems:"center",justifyContent:"between",space:1,className:"p-2"},void 0,a(v,{tag:"span"},void 0,n),a(f,{iconClassName:"h-5 w-5",src:b,title:t.formatMessage(C.unblockDomain,{domain:n}),onClick:d}))},S=u({heading:{id:"column.domain_blocks",defaultMessage:"Hidden domains"},unblockDomain:{id:"account.unblock_domain",defaultMessage:"Unhide {domain}"}}),x=p(function(s){s(h())},300,{leading:!0}),I=function(){var o=m(),n=l(),i=r(function(e){return e.domain_lists.blocks.items}),t=r(function(e){return!!e.domain_lists.blocks.next});if(D.useEffect(function(){o(M())},[]),!i)return a(c,{},void 0,a(_,{}));var d=a(y,{id:"empty_column.domain_blocks",defaultMessage:"There are no hidden domains yet."});return a(c,{label:n.formatMessage(S.heading)},void 0,a(B,{scrollKey:"domain_blocks",onLoadMore:function(){return x(o)},hasMore:t,emptyMessage:d,className:"divide-y divide-gray-200 dark:divide-gray-800"},void 0,i.map(function(e){return a(R,{domain:e},e)})))};export{I as default}; +import{d as m,u as l,a,aG as f,bf as b,y as v,H as k,o as u,bg as g,Q as p,bh as h,q as r,R as D,bi as M,aB as _,X as c,F as y}from"../index-be605fd2.js";import{S as B}from"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var C=u({blockDomainConfirm:{id:"confirmations.domain_block.confirm",defaultMessage:"Hide entire domain"},unblockDomain:{id:"account.unblock_domain",defaultMessage:"Unhide {domain}"}}),R=function(o){var n=o.domain,i=m(),t=l(),d=function(){i(g(n))};return a(k,{alignItems:"center",justifyContent:"between",space:1,className:"p-2"},void 0,a(v,{tag:"span"},void 0,n),a(f,{iconClassName:"h-5 w-5",src:b,title:t.formatMessage(C.unblockDomain,{domain:n}),onClick:d}))},S=u({heading:{id:"column.domain_blocks",defaultMessage:"Hidden domains"},unblockDomain:{id:"account.unblock_domain",defaultMessage:"Unhide {domain}"}}),x=p(function(s){s(h())},300,{leading:!0}),I=function(){var o=m(),n=l(),i=r(function(e){return e.domain_lists.blocks.items}),t=r(function(e){return!!e.domain_lists.blocks.next});if(D.useEffect(function(){o(M())},[]),!i)return a(c,{},void 0,a(_,{}));var d=a(y,{id:"empty_column.domain_blocks",defaultMessage:"There are no hidden domains yet."});return a(c,{label:n.formatMessage(S.heading)},void 0,a(B,{scrollKey:"domain_blocks",onLoadMore:function(){return x(o)},hasMore:t,emptyMessage:d,className:"divide-y divide-gray-200 dark:divide-gray-800"},void 0,i.map(function(e){return a(R,{domain:e},e)})))};export{I as default}; diff --git a/packs/js/index-4bb15783.js b/packs/js/index-78fe1150.js similarity index 88% rename from packs/js/index-4bb15783.js rename to packs/js/index-78fe1150.js index 8efe29f6f..61187a817 100644 --- a/packs/js/index-4bb15783.js +++ b/packs/js/index-78fe1150.js @@ -1 +1 @@ -import{d as x,u as P,r as i,aL as T,q as L,at as M,Q as E,aM as N,a as t,aN as y,aC as B,aO as G,X as w,w as H,o as Q,aP as $,aQ as j}from"../index-7380452a.js";import{P as q}from"./pull-to-refresh-b8beecbe.js";import{T as F}from"./thread-b9635854.js";import"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";import"./pending-status-7f660229.js";import"./poll-preview-66340c9e.js";import"./noop-19c18e1e.js";import"./status-container-59e57baf.js";var S=Q({title:{id:"status.title",defaultMessage:"Post Details"},titleDirect:{id:"status.title_direct",defaultMessage:"Direct message"},deleteConfirm:{id:"confirmations.delete.confirm",defaultMessage:"Delete"},deleteHeading:{id:"confirmations.delete.heading",defaultMessage:"Delete post"},deleteMessage:{id:"confirmations.delete.message",defaultMessage:"Are you sure you want to delete this post?"},redraftConfirm:{id:"confirmations.redraft.confirm",defaultMessage:"Delete & redraft"},redraftHeading:{id:"confirmations.redraft.heading",defaultMessage:"Delete & redraft"},redraftMessage:{id:"confirmations.redraft.message",defaultMessage:"Are you sure you want to delete this post and re-draft it? Favorites and reposts will be lost, and replies to the original post will be orphaned."},blockConfirm:{id:"confirmations.block.confirm",defaultMessage:"Block"},revealAll:{id:"status.show_more_all",defaultMessage:"Show more for all"},hideAll:{id:"status.show_less_all",defaultMessage:"Show less for all"},detailedStatus:{id:"status.detailed_status",defaultMessage:"Detailed conversation view"},replyConfirm:{id:"confirmations.reply.confirm",defaultMessage:"Reply"},replyMessage:{id:"confirmations.reply.message",defaultMessage:"Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?"},blockAndReport:{id:"confirmations.block.block_and_report",defaultMessage:"Block & Report"}}),ae=function(s){var l=x(),_=P(),D=i.useCallback(T(),[]),e=L(function(a){return D(a,{id:s.params.statusId})}),b=i.useState(!!e),u=M(b,2),R=u[0],d=u[1],k=i.useState(),c=M(k,2),o=c[0],f=c[1],m=function(){var a=$(regeneratorRuntime.mark(function n(){var g,p,h,v;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return g=s.params,p=g.statusId,r.next=4,l(j(p));case 4:h=r.sent,v=h.next,f(v);case 7:case"end":return r.stop()}},n)}));return function(){return a.apply(this,arguments)}}();i.useEffect(function(){m().then(function(){d(!0)}).catch(function(){d(!0)})},[s.params.statusId]);var I=i.useCallback(E(function(){o&&e&&l(N(e.id,o)).then(function(a){var n=a.next;f(n)}).catch(function(){})},300,{leading:!0}),[o,e]),A=function(){return m()};if(e!=null&&e.event)return t(y,{to:"/@".concat(e.getIn(["account","acct"]),"/events/").concat(e.id)});if(!e&&R)return t(B,{});if(!e)return t(w,{},void 0,t(G,{showPrivacyIndicator:!0}));if(e.group&&H(e.group)==="object"&&e.group.slug&&!s.params.groupSlug)return t(y,{to:"/group/".concat(e.group.slug,"/posts/").concat(s.params.statusId)});var C=function(){return e.visibility==="direct"?S.titleDirect:S.title};return t(w,{label:_.formatMessage(C())},void 0,t(q,{onRefresh:A},void 0,t(F,{status:e,next:o,handleLoadMore:I})))};export{ae as default}; +import{d as x,u as P,r as i,aL as T,q as L,at as M,Q as E,aM as N,a as t,aN as y,aC as B,aO as G,X as w,w as H,o as Q,aP as $,aQ as j}from"../index-be605fd2.js";import{P as q}from"./pull-to-refresh-a7e092ab.js";import{T as F}from"./thread-f9f548a4.js";import"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";import"./pending-status-959f7aeb.js";import"./poll-preview-ddaf662b.js";import"./noop-3f99ae3e.js";import"./status-container-e53698d2.js";var S=Q({title:{id:"status.title",defaultMessage:"Post Details"},titleDirect:{id:"status.title_direct",defaultMessage:"Direct message"},deleteConfirm:{id:"confirmations.delete.confirm",defaultMessage:"Delete"},deleteHeading:{id:"confirmations.delete.heading",defaultMessage:"Delete post"},deleteMessage:{id:"confirmations.delete.message",defaultMessage:"Are you sure you want to delete this post?"},redraftConfirm:{id:"confirmations.redraft.confirm",defaultMessage:"Delete & redraft"},redraftHeading:{id:"confirmations.redraft.heading",defaultMessage:"Delete & redraft"},redraftMessage:{id:"confirmations.redraft.message",defaultMessage:"Are you sure you want to delete this post and re-draft it? Favorites and reposts will be lost, and replies to the original post will be orphaned."},blockConfirm:{id:"confirmations.block.confirm",defaultMessage:"Block"},revealAll:{id:"status.show_more_all",defaultMessage:"Show more for all"},hideAll:{id:"status.show_less_all",defaultMessage:"Show less for all"},detailedStatus:{id:"status.detailed_status",defaultMessage:"Detailed conversation view"},replyConfirm:{id:"confirmations.reply.confirm",defaultMessage:"Reply"},replyMessage:{id:"confirmations.reply.message",defaultMessage:"Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?"},blockAndReport:{id:"confirmations.block.block_and_report",defaultMessage:"Block & Report"}}),ae=function(s){var l=x(),_=P(),D=i.useCallback(T(),[]),e=L(function(a){return D(a,{id:s.params.statusId})}),b=i.useState(!!e),u=M(b,2),R=u[0],d=u[1],k=i.useState(),c=M(k,2),o=c[0],f=c[1],m=function(){var a=$(regeneratorRuntime.mark(function n(){var g,p,h,v;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return g=s.params,p=g.statusId,r.next=4,l(j(p));case 4:h=r.sent,v=h.next,f(v);case 7:case"end":return r.stop()}},n)}));return function(){return a.apply(this,arguments)}}();i.useEffect(function(){m().then(function(){d(!0)}).catch(function(){d(!0)})},[s.params.statusId]);var I=i.useCallback(E(function(){o&&e&&l(N(e.id,o)).then(function(a){var n=a.next;f(n)}).catch(function(){})},300,{leading:!0}),[o,e]),A=function(){return m()};if(e!=null&&e.event)return t(y,{to:"/@".concat(e.getIn(["account","acct"]),"/events/").concat(e.id)});if(!e&&R)return t(B,{});if(!e)return t(w,{},void 0,t(G,{showPrivacyIndicator:!0}));if(e.group&&H(e.group)==="object"&&e.group.slug&&!s.params.groupSlug)return t(y,{to:"/group/".concat(e.group.slug,"/posts/").concat(s.params.statusId)});var C=function(){return e.visibility==="direct"?S.titleDirect:S.title};return t(w,{label:_.formatMessage(C())},void 0,t(q,{onRefresh:A},void 0,t(F,{status:e,next:o,handleLoadMore:I})))};export{ae as default}; diff --git a/packs/js/index-75eb026b.js b/packs/js/index-85a17314.js similarity index 99% rename from packs/js/index-75eb026b.js rename to packs/js/index-85a17314.js index 8685b8464..ee9eb6f78 100644 --- a/packs/js/index-75eb026b.js +++ b/packs/js/index-85a17314.js @@ -1 +1 @@ -import{R as x,cm as Dn}from"../index-7380452a.js";const de=0,Ot=1,Nt=2,un=4;function an(t,e){return n=>t(e(n))}function $n(t,e){return e(t)}function fn(t,e){return n=>t(e,n)}function De(t,e){return()=>t(e)}function me(t,e){return e(t),t}function J(...t){return t}function Un(t){t()}function $e(t){return()=>t}function jn(...t){return()=>{t.map(Un)}}function He(t){return t!==void 0}function Wt(){}function U(t,e){return t(Ot,e)}function G(t,e){t(de,e)}function Oe(t){t(Nt)}function ft(t){return t(un)}function B(t,e){return U(t,fn(e,de))}function yt(t,e){const n=t(Ot,o=>{n(),e(o)});return n}function D(){const t=[];return(e,n)=>{switch(e){case Nt:t.splice(0,t.length);return;case Ot:return t.push(n),()=>{const o=t.indexOf(n);o>-1&&t.splice(o,1)};case de:t.slice().forEach(o=>{o(n)});return;default:throw new Error(`unrecognized action ${e}`)}}}function C(t){let e=t;const n=D();return(o,r)=>{switch(o){case Ot:r(e);break;case de:e=r;break;case un:return e}return n(o,r)}}function Kn(t){let e,n;const o=()=>e&&e();return function(r,s){switch(r){case Ot:return s?n===s?void 0:(o(),n=s,e=U(t,s),e):(o(),Wt);case Nt:o(),n=null;return;default:throw new Error(`unrecognized action ${r}`)}}}function dt(t){return me(D(),e=>B(t,e))}function st(t,e){return me(C(e),n=>B(t,n))}function qn(...t){return e=>t.reduceRight($n,e)}function I(t,...e){const n=qn(...e);return(o,r)=>{switch(o){case Ot:return U(t,n(r));case Nt:Oe(t);return}}}function dn(t,e){return t===e}function Z(t=dn){let e;return n=>o=>{t(e,o)||(e=o,n(o))}}function V(t){return e=>n=>{t(n)&&e(n)}}function b(t){return e=>an(e,t)}function Et(t){return e=>()=>e(t)}function vt(t,e){return n=>o=>n(e=t(e,o))}function At(t){return e=>n=>{t>0?t--:e(n)}}function bt(t){let e=null,n;return o=>r=>{e=r,!n&&(n=setTimeout(()=>{n=void 0,o(e)},t))}}function Ue(t){let e,n;return o=>r=>{e=r,n&&clearTimeout(n),n=setTimeout(()=>{o(e)},t)}}function F(...t){const e=new Array(t.length);let n=0,o=null;const r=Math.pow(2,t.length)-1;return t.forEach((s,i)=>{const l=Math.pow(2,i);U(s,c=>{const f=n;n=n|l,e[i]=c,f!==r&&n===r&&o&&(o(),o=null)})}),s=>i=>{const l=()=>s([i].concat(e));n===r?l():o=l}}function je(...t){return function(e,n){switch(e){case Ot:return jn(...t.map(o=>U(o,n)));case Nt:return;default:throw new Error(`unrecognized action ${e}`)}}}function P(t,e=dn){return I(t,Z(e))}function nt(...t){const e=D(),n=new Array(t.length);let o=0;const r=Math.pow(2,t.length)-1;return t.forEach((s,i)=>{const l=Math.pow(2,i);U(s,c=>{n[i]=c,o=o|l,o===r&&G(e,n)})}),function(s,i){switch(s){case Ot:return o===r&&i(n),U(e,i);case Nt:return Oe(e);default:throw new Error(`unrecognized action ${s}`)}}}function $(t,e=[],{singleton:n}={singleton:!0}){return{id:Yn(),constructor:t,dependencies:e,singleton:n}}const Yn=()=>Symbol();function Zn(t){const e=new Map,n=({id:o,constructor:r,dependencies:s,singleton:i})=>{if(i&&e.has(o))return e.get(o);const l=r(s.map(c=>n(c)));return i&&e.set(o,l),l};return n(t)}function Jn(t,e){const n={},o={};let r=0;const s=t.length;for(;r(v[d]=m=>{const w=h[e.methods[d]];G(w,m)},v),{})}function u(h){return i.reduce((v,d)=>(v[d]=Kn(h[e.events[d]]),v),{})}return{Component:x.forwardRef((h,v)=>{const{children:d,...m}=h,[w]=x.useState(()=>me(Zn(t),p=>c(p,m))),[O]=x.useState(De(u,w));return re(()=>{for(const p of i)p in m&&U(O[p],m[p]);return()=>{Object.values(O).map(Oe)}},[m,O,w]),re(()=>{c(w,m)}),x.useImperativeHandle(v,$e(f(w))),x.createElement(l.Provider,{value:w},n?x.createElement(n,Jn([...o,...r,...i],m),d):d)}),usePublisher:h=>x.useCallback(fn(G,x.useContext(l)[h]),[h]),useEmitterValue:h=>{const d=x.useContext(l)[h],[m,w]=x.useState(De(ft,d));return re(()=>U(d,O=>{O!==m&&w($e(O))}),[d,m]),m},useEmitter:(h,v)=>{const m=x.useContext(l)[h];re(()=>U(m,v),[v,m])}}}const Qn=typeof document<"u"?x.useLayoutEffect:x.useEffect,Xn=Qn;var mt=(t=>(t[t.DEBUG=0]="DEBUG",t[t.INFO=1]="INFO",t[t.WARN=2]="WARN",t[t.ERROR=3]="ERROR",t))(mt||{});const to={0:"debug",1:"log",2:"warn",3:"error"},eo=()=>typeof globalThis>"u"?window:globalThis,Bt=$(()=>{const t=C(3);return{log:C((n,o,r=1)=>{var s;const i=(s=eo().VIRTUOSO_LOG_LEVEL)!=null?s:ft(t);r>=i&&console[to[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,o)}),logLevel:t}},[],{singleton:!0});function Be(t,e=!0){const n=x.useRef(null);let o=r=>{};if(typeof ResizeObserver<"u"){const r=x.useMemo(()=>new ResizeObserver(s=>{const i=s[0].target;i.offsetParent!==null&&t(i)}),[t]);o=s=>{s&&e?(r.observe(s),n.current=s):(n.current&&r.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:o}}function Vt(t,e=!0){return Be(t,e).callbackRef}function no(t,e,n,o,r,s,i){const l=x.useCallback(c=>{const f=oo(c.children,e,"offsetHeight",r);let u=c.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const g=u.lastElementChild.dataset.viewportType==="window",S=i?i.scrollTop:g?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,E=i?i.scrollHeight:g?document.documentElement.scrollHeight:u.scrollHeight,R=i?i.offsetHeight:g?window.innerHeight:u.offsetHeight;o({scrollTop:Math.max(S,0),scrollHeight:E,viewportHeight:R}),s==null||s(ro("row-gap",getComputedStyle(c).rowGap,r)),f!==null&&t(f)},[t,e,r,s,i,o]);return Be(l,n)}function oo(t,e,n,o){const r=t.length;if(r===0)return null;const s=[];for(let i=0;i{const S=g.target,E=S===window||S===document,R=E?window.pageYOffset||document.documentElement.scrollTop:S.scrollTop,h=E?document.documentElement.scrollHeight:S.scrollHeight,v=E?window.innerHeight:S.offsetHeight,d=()=>{t({scrollTop:Math.max(R,0),scrollHeight:h,viewportHeight:v})};g.suppressFlushSync?d():Dn.flushSync(d),i.current!==null&&(R===i.current||R<=0||R===h-v)&&(i.current=null,e(!0),l.current&&(clearTimeout(l.current),l.current=null))},[t,e]);x.useEffect(()=>{const g=r||s.current;return o(r||s.current),c({target:g,suppressFlushSync:!0}),g.addEventListener("scroll",c,{passive:!0}),()=>{o(null),g.removeEventListener("scroll",c)}},[s,c,n,o,r]);function f(g){const S=s.current;if(!S||"offsetHeight"in S&&S.offsetHeight===0)return;const E=g.behavior==="smooth";let R,h,v;S===window?(h=Math.max(Ht(document.documentElement,"height"),document.documentElement.scrollHeight),R=window.innerHeight,v=document.documentElement.scrollTop):(h=S.scrollHeight,R=Ht(S,"height"),v=S.scrollTop);const d=h-R;if(g.top=Math.ceil(Math.max(Math.min(d,g.top),0)),hn(R,h)||g.top===v){t({scrollTop:v,scrollHeight:h,viewportHeight:R}),E&&e(!0);return}E?(i.current=g.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,i.current=null,e(!0)},1e3)):i.current=null,S.scrollTo(g)}function u(g){s.current.scrollBy(g)}return{scrollerRef:s,scrollByCallback:u,scrollToCallback:f}}const it=$(()=>{const t=D(),e=D(),n=C(0),o=D(),r=C(0),s=D(),i=D(),l=C(0),c=C(0),f=C(0),u=C(0),g=D(),S=D(),E=C(!1);return B(I(t,b(({scrollTop:R})=>R)),e),B(I(t,b(({scrollHeight:R})=>R)),i),B(e,r),{scrollContainerState:t,scrollTop:e,viewportHeight:s,headerHeight:l,fixedHeaderHeight:c,fixedFooterHeight:f,footerHeight:u,scrollHeight:i,smoothScrollTargetReached:o,scrollTo:g,scrollBy:S,statefulScrollTop:r,deviation:n,scrollingInProgress:E}},[],{singleton:!0}),jt={lvl:0};function gn(t,e,n,o=jt,r=jt){return{k:t,v:e,lvl:n,l:o,r}}function K(t){return t===jt}function Mt(){return jt}function Ce(t,e){if(K(t))return jt;const{k:n,l:o,r}=t;if(e===n){if(K(o))return r;if(K(r))return o;{const[s,i]=In(o);return ie(tt(t,{k:s,v:i,l:Sn(o)}))}}else return ee&&(l=l.concat(Ee(s,e,n))),o>=e&&o<=n&&l.push({k:o,v:r}),o<=n&&(l=l.concat(Ee(i,e,n))),l}function Pt(t){return K(t)?[]:[...Pt(t.l),{k:t.k,v:t.v},...Pt(t.r)]}function In(t){return K(t.r)?[t.k,t.v]:In(t.r)}function Sn(t){return K(t.r)?t.l:ie(tt(t,{r:Sn(t.r)}))}function tt(t,e){return gn(e.k!==void 0?e.k:t.k,e.v!==void 0?e.v:t.v,e.lvl!==void 0?e.lvl:t.lvl,e.l!==void 0?e.l:t.l,e.r!==void 0?e.r:t.r)}function xe(t){return K(t)||t.lvl>t.r.lvl}function Ke(t){return ye(wn(t))}function ie(t){const{l:e,r:n,lvl:o}=t;if(n.lvl>=o-1&&e.lvl>=o-1)return t;if(o>n.lvl+1){if(xe(e))return wn(tt(t,{lvl:o-1}));if(!K(e)&&!K(e.r))return tt(e.r,{l:tt(e,{r:e.r.l}),r:tt(t,{l:e.r.r,lvl:o-1}),lvl:o});throw new Error("Unexpected empty nodes")}else{if(xe(t))return ye(tt(t,{lvl:o-1}));if(!K(n)&&!K(n.l)){const r=n.l,s=xe(r)?n.lvl-1:n.lvl;return tt(r,{l:tt(t,{r:r.l,lvl:o-1}),r:ye(tt(n,{l:r.r,lvl:s})),lvl:r.lvl+1})}else throw new Error("Unexpected empty nodes")}}function he(t,e,n){if(K(t))return[];const o=wt(t,e)[0];return so(Ee(t,o,n))}function xn(t,e){const n=t.length;if(n===0)return[];let{index:o,value:r}=e(t[0]);const s=[];for(let i=1;i({index:e,value:n}))}function ye(t){const{r:e,lvl:n}=t;return!K(e)&&!K(e.r)&&e.lvl===n&&e.r.lvl===n?tt(e,{l:tt(t,{r:e.l}),lvl:n+1}):t}function wn(t){const{l:e}=t;return!K(e)&&e.lvl===t.lvl?tt(e,{r:tt(t,{l:e.r})}):t}function ce(t,e,n,o=0){let r=t.length-1;for(;o<=r;){const s=Math.floor((o+r)/2),i=t[s],l=n(i,e);if(l===0)return s;if(l===-1){if(r-o<2)return s-1;r=s-1}else{if(r===o)return s;o=s+1}}throw new Error(`Failed binary finding record in array - ${t.join(",")}, searched for ${e}`)}function Tn(t,e,n){return t[ce(t,e,n)]}function io(t,e,n,o){const r=ce(t,e,o),s=ce(t,n,o,r);return t.slice(r,s+1)}const ze=$(()=>({recalcInProgress:C(!1)}),[],{singleton:!0});function lo(t){const{size:e,startIndex:n,endIndex:o}=t;return r=>r.start===n&&(r.end===o||r.end===1/0)&&r.value===e}function qe(t,e){let n=0,o=0;for(;n=u||r===S)&&(t=Ce(t,u)):(f=S!==r,c=!0),g>i&&i>=u&&S!==r&&(t=at(t,i+1,S));f&&(t=at(t,s,r))}return[t,n]}function uo(){return{offsetTree:[],sizeTree:Mt(),groupOffsetTree:Mt(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Le({index:t},e){return e===t?0:e0&&(e=Math.max(e,Tn(t,o,Le).offset)),xn(io(t,e,n,ao),fo)}function Re(t,e,n,o){let r=t,s=0,i=0,l=0,c=0;if(e!==0){c=ce(r,e-1,Le),l=r[c].offset;const u=wt(n,e-1);s=u[0],i=u[1],r.length&&r[c].size===wt(n,e)[1]&&(c-=1),r=r.slice(0,c+1)}else r=[];for(const{start:f,value:u}of he(n,e,1/0)){const g=f-s,S=g*i+l+g*o;r.push({offset:S,size:u,index:f}),s=f,l=S,i=u}return{offsetTree:r,lastIndex:s,lastOffset:l,lastSize:i}}function ho(t,[e,n,o,r]){e.length>0&&o("received item sizes",e,mt.DEBUG);const s=t.sizeTree;let i=s,l=0;if(n.length>0&&K(s)&&e.length===2){const S=e[0].size,E=e[1].size;i=n.reduce((R,h)=>at(at(R,h,S),h+1,E),i)}else[i,l]=co(i,e);if(i===s)return t;const{offsetTree:c,lastIndex:f,lastSize:u,lastOffset:g}=Re(t.offsetTree,l,i,r);return{sizeTree:i,offsetTree:c,lastIndex:f,lastOffset:g,lastSize:u,groupOffsetTree:n.reduce((S,E)=>at(S,E,qt(E,c,r)),Mt()),groupIndices:n}}function qt(t,e,n){if(e.length===0)return 0;const{offset:o,index:r,size:s}=Tn(e,t,Le),i=t-r,l=s*i+(i-1)*n+o;return l>0?l+n:l}function po(t){return typeof t.groupIndex<"u"}function vn(t,e,n){if(po(t))return e.groupIndices[t.groupIndex]+1;{const o=t.index==="LAST"?n:t.index;let r=Cn(o,e);return r=Math.max(0,r,Math.min(n,r)),r}}function Cn(t,e){if(!pe(e))return t;let n=0;for(;e.groupIndices[n]<=t+n;)n++;return t+n}function pe(t){return!K(t.groupOffsetTree)}function go(t){return Pt(t).map(({k:e,v:n},o,r)=>{const s=r[o+1],i=s?s.k-1:1/0;return{startIndex:e,endIndex:i,size:n}})}const Io={offsetHeight:"height",offsetWidth:"width"},Ct=$(([{log:t},{recalcInProgress:e}])=>{const n=D(),o=D(),r=st(o,0),s=D(),i=D(),l=C(0),c=C([]),f=C(void 0),u=C(void 0),g=C((p,a)=>Ht(p,Io[a])),S=C(void 0),E=C(0),R=uo(),h=st(I(n,F(c,t,E),vt(ho,R),Z()),R),v=st(I(c,Z(),vt((p,a)=>({prev:p.current,current:a}),{prev:[],current:[]}),b(({prev:p})=>p)),[]);B(I(c,V(p=>p.length>0),F(h,E),b(([p,a,y])=>{const H=p.reduce((z,k,_)=>at(z,k,qt(k,a.offsetTree,y)||_),Mt());return{...a,groupIndices:p,groupOffsetTree:H}})),h),B(I(o,F(h),V(([p,{lastIndex:a}])=>p[{startIndex:p,endIndex:a,size:y}])),n),B(f,u);const d=st(I(f,b(p=>p===void 0)),!0);B(I(u,V(p=>p!==void 0&&K(ft(h).sizeTree)),b(p=>[{startIndex:0,endIndex:0,size:p}])),n);const m=dt(I(n,F(h),vt(({sizes:p},[a,y])=>({changed:y!==p,sizes:y}),{changed:!1,sizes:R}),b(p=>p.changed)));U(I(l,vt((p,a)=>({diff:p.prev-a,prev:a}),{diff:0,prev:0}),b(p=>p.diff)),p=>{const{groupIndices:a}=ft(h);if(p>0)G(e,!0),G(s,p+qe(p,a));else if(p<0){const y=ft(v);y.length>0&&(p-=qe(-p,y)),G(i,p)}}),U(I(l,F(t)),([p,a])=>{p<0&&a("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:l},mt.ERROR)});const w=dt(s);B(I(s,F(h),b(([p,a])=>{const y=a.groupIndices.length>0,H=[],z=a.lastSize;if(y){const k=Kt(a.sizeTree,0);let _=0,W=0;for(;_{let ht=M.ranges;return M.prevSize!==0&&(ht=[...M.ranges,{startIndex:M.prevIndex,endIndex:j+p-1,size:M.prevSize}]),{ranges:ht,prevIndex:j+p,prevSize:rt}},{ranges:H,prevIndex:p,prevSize:0}).ranges}return Pt(a.sizeTree).reduce((k,{k:_,v:W})=>({ranges:[...k.ranges,{startIndex:k.prevIndex,endIndex:_+p-1,size:k.prevSize}],prevIndex:_+p,prevSize:W}),{ranges:[],prevIndex:0,prevSize:z}).ranges})),n);const O=dt(I(i,F(h,E),b(([p,{offsetTree:a},y])=>{const H=-p;return qt(H,a,y)})));return B(I(i,F(h,E),b(([p,a,y])=>{if(a.groupIndices.length>0){if(K(a.sizeTree))return a;let z=Mt();const k=ft(v);let _=0,W=0,q=0;for(;_<-p;){q=k[W];const M=k[W+1]-q-1;W++,_+=M+1}if(z=Pt(a.sizeTree).reduce((M,{k:j,v:rt})=>at(M,Math.max(0,j+p),rt),z),_!==-p){const M=Kt(a.sizeTree,q);z=at(z,0,M);const j=wt(a.sizeTree,-p+1)[1];z=at(z,1,j)}return{...a,sizeTree:z,...Re(a.offsetTree,0,z,y)}}else{const z=Pt(a.sizeTree).reduce((k,{k:_,v:W})=>at(k,Math.max(0,_+p),W),Mt());return{...a,sizeTree:z,...Re(a.offsetTree,0,z,y)}}})),h),{data:S,totalCount:o,sizeRanges:n,groupIndices:c,defaultItemSize:u,fixedItemSize:f,unshiftWith:s,shiftWith:i,shiftWithOffset:O,beforeUnshiftWith:w,firstItemIndex:l,gap:E,sizes:h,listRefresh:m,statefulTotalCount:r,trackItemSizes:d,itemSize:g}},J(Bt,ze),{singleton:!0}),So=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function En(t){const e=typeof t=="number"?{index:t}:t;return e.align||(e.align="start"),(!e.behavior||!So)&&(e.behavior="auto"),e.offset||(e.offset=0),e}const Jt=$(([{sizes:t,totalCount:e,listRefresh:n,gap:o},{scrollingInProgress:r,viewportHeight:s,scrollTo:i,smoothScrollTargetReached:l,headerHeight:c,footerHeight:f,fixedHeaderHeight:u,fixedFooterHeight:g},{log:S}])=>{const E=D(),R=C(0);let h=null,v=null,d=null;function m(){h&&(h(),h=null),d&&(d(),d=null),v&&(clearTimeout(v),v=null),G(r,!1)}return B(I(E,F(t,s,e,R,c,f,S),F(o,u,g),b(([[w,O,p,a,y,H,z,k],_,W,q])=>{const L=En(w),{align:M,behavior:j,offset:rt}=L,ht=a-1,lt=vn(L,O,ht);let ct=qt(lt,O.offsetTree,_)+H;M==="end"?(ct+=W+wt(O.sizeTree,lt)[1]-p+q,lt===ht&&(ct+=z)):M==="center"?ct+=(W+wt(O.sizeTree,lt)[1]-p+q)/2:ct-=y,rt&&(ct+=rt);const It=Tt=>{m(),Tt?(k("retrying to scroll to",{location:w},mt.DEBUG),G(E,w)):k("list did not change, scroll successful",{},mt.DEBUG)};if(m(),j==="smooth"){let Tt=!1;d=U(n,Dt=>{Tt=Tt||Dt}),h=yt(l,()=>{It(Tt)})}else h=yt(I(n,xo(150)),It);return v=setTimeout(()=>{m()},1200),G(r,!0),k("scrolling from index to",{index:lt,top:ct,behavior:j},mt.DEBUG),{top:ct,behavior:j}})),i),{scrollToIndex:E,topListHeight:R}},J(Ct,it,Bt),{singleton:!0});function xo(t){return e=>{const n=setTimeout(()=>{e(!1)},t);return o=>{o&&(e(!0),clearTimeout(n))}}}const Yt="up",$t="down",wo="none",To={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},vo=0,Qt=$(([{scrollContainerState:t,scrollTop:e,viewportHeight:n,headerHeight:o,footerHeight:r,scrollBy:s}])=>{const i=C(!1),l=C(!0),c=D(),f=D(),u=C(4),g=C(vo),S=st(I(je(I(P(e),At(1),Et(!0)),I(P(e),At(1),Et(!1),Ue(100))),Z()),!1),E=st(I(je(I(s,Et(!0)),I(s,Et(!1),Ue(200))),Z()),!1);B(I(nt(P(e),P(g)),b(([m,w])=>m<=w),Z()),l),B(I(l,bt(50)),f);const R=dt(I(nt(t,P(n),P(o),P(r),P(u)),vt((m,[{scrollTop:w,scrollHeight:O},p,a,y,H])=>{const z=w+p-O>-H,k={viewportHeight:p,scrollTop:w,scrollHeight:O};if(z){let W,q;return w>m.state.scrollTop?(W="SCROLLED_DOWN",q=m.state.scrollTop-w):(W="SIZE_DECREASED",q=m.state.scrollTop-w||m.scrollTopDelta),{atBottom:!0,state:k,atBottomBecause:W,scrollTopDelta:q}}let _;return k.scrollHeight>m.state.scrollHeight?_="SIZE_INCREASED":pm&&m.atBottom===w.atBottom))),h=st(I(t,vt((m,{scrollTop:w,scrollHeight:O,viewportHeight:p})=>{if(hn(m.scrollHeight,O))return{scrollTop:w,scrollHeight:O,jump:0,changed:!1};{const a=O-(w+p)<1;return m.scrollTop!==w&&a?{scrollHeight:O,scrollTop:w,jump:m.scrollTop-w,changed:!0}:{scrollHeight:O,scrollTop:w,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),V(m=>m.changed),b(m=>m.jump)),0);B(I(R,b(m=>m.atBottom)),i),B(I(i,bt(50)),c);const v=C($t);B(I(t,b(({scrollTop:m})=>m),Z(),vt((m,w)=>ft(E)?{direction:m.direction,prevScrollTop:w}:{direction:wm.direction)),v),B(I(t,bt(50),Et(wo)),v);const d=C(0);return B(I(S,V(m=>!m),Et(0)),d),B(I(e,bt(100),F(S),V(([m,w])=>!!w),vt(([m,w],[O])=>[w,O],[0,0]),b(([m,w])=>w-m)),d),{isScrolling:S,isAtTop:l,isAtBottom:i,atBottomState:R,atTopStateChange:f,atBottomStateChange:c,scrollDirection:v,atBottomThreshold:u,atTopThreshold:g,scrollVelocity:d,lastJumpDueToItemResize:h}},J(it)),zt=$(([{log:t}])=>{const e=C(!1),n=dt(I(e,V(o=>o),Z()));return U(e,o=>{o&&ft(t)("props updated",{},mt.DEBUG)}),{propsReady:e,didMount:n}},J(Bt),{singleton:!0});function ke(t,e){t==0?e():requestAnimationFrame(()=>ke(t-1,e))}function Pe(t,e){const n=e-1;return typeof t=="number"?t:t.index==="LAST"?n:t.index}const Xt=$(([{sizes:t,listRefresh:e,defaultItemSize:n},{scrollTop:o},{scrollToIndex:r},{didMount:s}])=>{const i=C(!0),l=C(0),c=C(!1);return B(I(s,F(l),V(([f,u])=>!!u),Et(!1)),i),U(I(nt(e,s),F(i,t,n,c),V(([[,f],u,{sizeTree:g},S,E])=>f&&(!K(g)||He(S))&&!u&&!E),F(l)),([,f])=>{G(c,!0),ke(3,()=>{yt(o,()=>G(i,!0)),G(r,f)})}),{scrolledToInitialItem:i,initialTopMostItemIndex:l}},J(Ct,it,Jt,zt),{singleton:!0});function Ye(t){return t?t==="smooth"?"smooth":"auto":!1}const Co=(t,e)=>typeof t=="function"?Ye(t(e)):e&&Ye(t),Eo=$(([{totalCount:t,listRefresh:e},{isAtBottom:n,atBottomState:o},{scrollToIndex:r},{scrolledToInitialItem:s},{propsReady:i,didMount:l},{log:c},{scrollingInProgress:f}])=>{const u=C(!1),g=D();let S=null;function E(h){G(r,{index:"LAST",align:"end",behavior:h})}U(I(nt(I(P(t),At(1)),l),F(P(u),n,s,f),b(([[h,v],d,m,w,O])=>{let p=v&&w,a="auto";return p&&(a=Co(d,m||O),p=p&&!!a),{totalCount:h,shouldFollow:p,followOutputBehavior:a}}),V(({shouldFollow:h})=>h)),({totalCount:h,followOutputBehavior:v})=>{S&&(S(),S=null),S=yt(e,()=>{ft(c)("following output to ",{totalCount:h},mt.DEBUG),E(v),S=null})});function R(h){const v=yt(o,d=>{h&&!d.atBottom&&d.notAtBottomBecause==="SIZE_INCREASED"&&!S&&(ft(c)("scrolling to bottom due to increased size",{},mt.DEBUG),E("auto"))});setTimeout(v,100)}return U(I(nt(P(u),t,i),V(([h,,v])=>h&&v),vt(({value:h},[,v])=>({refreshed:h===v,value:v}),{refreshed:!1,value:0}),V(({refreshed:h})=>h),F(u,t)),([,h])=>{R(h!==!1)}),U(g,()=>{R(ft(u)!==!1)}),U(nt(P(u),o),([h,v])=>{h&&!v.atBottom&&v.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&E("auto")}),{followOutput:u,autoscrollToBottom:g}},J(Ct,Qt,Jt,Xt,zt,Bt,it));function yo(t){return t.reduce((e,n)=>(e.groupIndices.push(e.totalCount),e.totalCount+=n+1,e),{totalCount:0,groupIndices:[]})}const yn=$(([{totalCount:t,groupIndices:e,sizes:n},{scrollTop:o,headerHeight:r}])=>{const s=D(),i=D(),l=dt(I(s,b(yo)));return B(I(l,b(c=>c.totalCount)),t),B(I(l,b(c=>c.groupIndices)),e),B(I(nt(o,n,r),V(([c,f])=>pe(f)),b(([c,f,u])=>wt(f.groupOffsetTree,Math.max(c-u,0),"v")[0]),Z(),b(c=>[c])),i),{groupCounts:s,topItemsIndexes:i}},J(Ct,it));function Zt(t,e){return!!(t&&t[0]===e[0]&&t[1]===e[1])}function Rn(t,e){return!!(t&&t.startIndex===e.startIndex&&t.endIndex===e.endIndex)}const ue="top",ae="bottom",Ze="none";function Je(t,e,n){return typeof t=="number"?n===Yt&&e===ue||n===$t&&e===ae?t:0:n===Yt?e===ue?t.main:t.reverse:e===ae?t.main:t.reverse}function Qe(t,e){return typeof t=="number"?t:t[e]||0}const Ve=$(([{scrollTop:t,viewportHeight:e,deviation:n,headerHeight:o,fixedHeaderHeight:r}])=>{const s=D(),i=C(0),l=C(0),c=C(0),f=st(I(nt(P(t),P(e),P(o),P(s,Zt),P(c),P(i),P(r),P(n),P(l)),b(([u,g,S,[E,R],h,v,d,m,w])=>{const O=u-m,p=v+d,a=Math.max(S-O,0);let y=Ze;const H=Qe(w,ue),z=Qe(w,ae);return E-=m,E+=S+d,R+=S+d,R-=m,E>u+p-H&&(y=Yt),Ru!=null),Z(Zt)),[0,0]);return{listBoundary:s,overscan:c,topListHeight:i,increaseViewportBy:l,visibleRange:f}},J(it),{singleton:!0});function Ro(t,e,n){if(pe(e)){const o=Cn(t,e);return[{index:wt(e.groupOffsetTree,o)[0],size:0,offset:0},{index:o,size:0,offset:0,data:n&&n[0]}]}return[{index:t,size:0,offset:0,data:n&&n[0]}]}const we={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Xe(t,e,n){if(t.length===0)return[];if(!pe(e))return t.map(f=>({...f,index:f.index+n,originalIndex:f.index}));const o=t[0].index,r=t[t.length-1].index,s=[],i=he(e.groupOffsetTree,o,r);let l,c=0;for(const f of t){(!l||l.end0){f=t[0].offset;const h=t[t.length-1];u=h.offset+h.size}const g=n-c,S=l+g*i+(g-1)*o,E=f,R=S-u;return{items:Xe(t,r,s),topItems:Xe(e,r,s),topListHeight:e.reduce((h,v)=>v.size+h,0),offsetTop:f,offsetBottom:R,top:E,bottom:u,totalCount:n,firstItemIndex:s}}function bn(t,e,n,o,r,s){let i=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-i>=t)break;i++}const l=t+i,c=Pe(e,l),f=Array.from({length:l}).map((u,g)=>({index:g+c,size:0,offset:0,data:s[g+c]}));return le(f,[],l,r,n,o)}const Gt=$(([{sizes:t,totalCount:e,data:n,firstItemIndex:o,gap:r},s,{visibleRange:i,listBoundary:l,topListHeight:c},{scrolledToInitialItem:f,initialTopMostItemIndex:u},{topListHeight:g},S,{didMount:E},{recalcInProgress:R}])=>{const h=C([]),v=C(0),d=D();B(s.topItemsIndexes,h);const m=st(I(nt(E,R,P(i,Zt),P(e),P(t),P(u),f,P(h),P(o),P(r),n),V(([a,y,,H,,,,,,,z])=>{const k=z&&z.length!==H;return a&&!y&&!k}),b(([,,[a,y],H,z,k,_,W,q,L,M])=>{const j=z,{sizeTree:rt,offsetTree:ht}=j,lt=ft(v);if(H===0)return{...we,totalCount:H};if(a===0&&y===0)return lt===0?{...we,totalCount:H}:bn(lt,k,z,q,L,M||[]);if(K(rt))return lt>0?null:le(Ro(Pe(k,H),j,M),[],H,L,j,q);const ct=[];if(W.length>0){const Lt=W[0],T=W[W.length-1];let A=0;for(const Y of he(rt,Lt,T)){const X=Y.value,ot=Math.max(Y.start,Lt),St=Math.min(Y.end,T);for(let et=ot;et<=St;et++)ct.push({index:et,size:X,offset:A,data:M&&M[et]}),A+=X}}if(!_)return le([],ct,H,L,j,q);const It=W.length>0?W[W.length-1]+1:0,Tt=mo(ht,a,y,It);if(Tt.length===0)return null;const Dt=H-1,te=me([],Lt=>{for(const T of Tt){const A=T.value;let Y=A.offset,X=T.start;const ot=A.size;if(A.offset=y);et++)Lt.push({index:et,size:ot,offset:Y,data:M&&M[et]}),Y+=ot+L}});return le(te,ct,H,L,j,q)}),V(a=>a!==null),Z()),we);B(I(n,V(He),b(a=>a==null?void 0:a.length)),e),B(I(m,b(a=>a.topListHeight)),g),B(g,c),B(I(m,b(a=>[a.top,a.bottom])),l),B(I(m,b(a=>a.items)),d);const w=dt(I(m,V(({items:a})=>a.length>0),F(e,n),V(([{items:a},y])=>a[a.length-1].originalIndex===y-1),b(([,a,y])=>[a-1,y]),Z(Zt),b(([a])=>a))),O=dt(I(m,bt(200),V(({items:a,topItems:y})=>a.length>0&&a[0].originalIndex===y.length),b(({items:a})=>a[0].index),Z())),p=dt(I(m,V(({items:a})=>a.length>0),b(({items:a})=>{let y=0,H=a.length-1;for(;a[y].type==="group"&&yy;)H--;return{startIndex:a[y].index,endIndex:a[H].index}}),Z(Rn)));return{listState:m,topItemsIndexes:h,endReached:w,startReached:O,rangeChanged:p,itemsRendered:d,initialItemCount:v,...S}},J(Ct,yn,Ve,Xt,Jt,Qt,zt,ze),{singleton:!0}),bo=$(([{sizes:t,firstItemIndex:e,data:n,gap:o},{initialTopMostItemIndex:r},{initialItemCount:s,listState:i},{didMount:l}])=>(B(I(l,F(s),V(([,c])=>c!==0),F(r,t,e,o,n),b(([[,c],f,u,g,S,E=[]])=>bn(c,f,u,g,S,E))),i),{}),J(Ct,Xt,Gt,zt),{singleton:!0}),Hn=$(([{scrollVelocity:t}])=>{const e=C(!1),n=D(),o=C(!1);return B(I(t,F(o,e,n),V(([r,s])=>!!s),b(([r,s,i,l])=>{const{exit:c,enter:f}=s;if(i){if(c(r,l))return!1}else if(f(r,l))return!0;return i}),Z()),e),U(I(nt(e,t,n),F(o)),([[r,s,i],l])=>r&&l&&l.change&&l.change(s,i)),{isSeeking:e,scrollSeekConfiguration:o,scrollVelocity:t,scrollSeekRangeChanged:n}},J(Qt),{singleton:!0}),Ho=$(([{topItemsIndexes:t}])=>{const e=C(0);return B(I(e,V(n=>n>0),b(n=>Array.from({length:n}).map((o,r)=>r))),t),{topItemCount:e}},J(Gt)),On=$(([{footerHeight:t,headerHeight:e,fixedHeaderHeight:n,fixedFooterHeight:o},{listState:r}])=>{const s=D(),i=st(I(nt(t,o,e,n,r),b(([l,c,f,u,g])=>l+c+f+u+g.offsetBottom+g.bottom)),0);return B(P(i),s),{totalListHeight:i,totalListHeightChanged:s}},J(it,Gt),{singleton:!0});function Bn(t){let e=!1,n;return()=>(e||(e=!0,n=t()),n)}const Oo=Bn(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),Bo=$(([{scrollBy:t,scrollTop:e,deviation:n,scrollingInProgress:o},{isScrolling:r,isAtBottom:s,scrollDirection:i,lastJumpDueToItemResize:l},{listState:c},{beforeUnshiftWith:f,shiftWithOffset:u,sizes:g,gap:S},{log:E},{recalcInProgress:R}])=>{const h=dt(I(c,F(l),vt(([,d,m,w],[{items:O,totalCount:p,bottom:a,offsetBottom:y},H])=>{const z=a+y;let k=0;return m===p&&d.length>0&&O.length>0&&(O[0].originalIndex===0&&d[0].originalIndex===0||(k=z-w,k!==0&&(k+=H))),[k,O,p,z]},[0,[],0,0]),V(([d])=>d!==0),F(e,i,o,s,E,R),V(([,d,m,w,,,O])=>!O&&!w&&d!==0&&m===Yt),b(([[d],,,,,m])=>(m("Upward scrolling compensation",{amount:d},mt.DEBUG),d))));function v(d){d>0?(G(t,{top:-d,behavior:"auto"}),G(n,0)):(G(n,0),G(t,{top:-d,behavior:"auto"}))}return U(I(h,F(n,r)),([d,m,w])=>{w&&Oo()?G(n,m-d):v(-d)}),U(I(nt(st(r,!1),n,R),V(([d,m,w])=>!d&&!w&&m!==0),b(([d,m])=>m),bt(1)),v),B(I(u,b(d=>({top:-d}))),t),U(I(f,F(g,S),b(([d,{lastSize:m,groupIndices:w,sizeTree:O},p])=>{function a(y){return y*(m+p)}if(w.length===0)return a(d);{let y=0;const H=Kt(O,0);let z=0,k=0;for(;zd&&(y-=H,_=d-z+1),z+=_,y+=a(_),k++}return y}})),d=>{G(n,d),requestAnimationFrame(()=>{G(t,{top:d}),requestAnimationFrame(()=>{G(n,0),G(R,!1)})})}),{deviation:n}},J(it,Qt,Gt,Ct,Bt,ze)),zo=$(([{didMount:t},{scrollTo:e},{listState:n}])=>{const o=C(0);return U(I(t,F(o),V(([,r])=>r!==0),b(([,r])=>({top:r}))),r=>{yt(I(n,At(1),V(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{G(e,r)})})}),{initialScrollTop:o}},J(zt,it,Gt),{singleton:!0}),Lo=$(([{viewportHeight:t},{totalListHeight:e}])=>{const n=C(!1),o=st(I(nt(n,t,e),V(([r])=>r),b(([,r,s])=>Math.max(0,r-s)),bt(0),Z()),0);return{alignToBottom:n,paddingTopAddition:o}},J(it,On),{singleton:!0}),Ge=$(([{scrollTo:t,scrollContainerState:e}])=>{const n=D(),o=D(),r=D(),s=C(!1),i=C(void 0);return B(I(nt(n,o),b(([{viewportHeight:l,scrollTop:c,scrollHeight:f},{offsetTop:u}])=>({scrollTop:Math.max(0,c-u),scrollHeight:f,viewportHeight:l}))),e),B(I(t,F(o),b(([l,{offsetTop:c}])=>({...l,top:l.top+c}))),r),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:o,windowScrollTo:r}},J(it)),ko=({itemTop:t,itemBottom:e,viewportTop:n,viewportBottom:o,locationParams:{behavior:r,align:s,...i}})=>to?{...i,behavior:r,align:s??"end"}:null,Po=$(([{sizes:t,totalCount:e,gap:n},{scrollTop:o,viewportHeight:r,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:l,scrollingInProgress:c},{scrollToIndex:f}])=>{const u=D();return B(I(u,F(t,r,e,s,i,l,o),F(n),b(([[g,S,E,R,h,v,d,m],w])=>{const{done:O,behavior:p,align:a,calculateViewLocation:y=ko,...H}=g,z=vn(g,S,R-1),k=qt(z,S.offsetTree,w)+h+v,_=k+wt(S.sizeTree,z)[1],W=m+v,q=m+E-d,L=y({itemTop:k,itemBottom:_,viewportTop:W,viewportBottom:q,locationParams:{behavior:p,align:a,...H}});return L?O&&yt(I(c,V(M=>M===!1),At(ft(c)?1:2)),O):O&&O(),L}),V(g=>g!==null)),f),{scrollIntoView:u}},J(Ct,it,Jt,Gt,Bt),{singleton:!0}),Vo=$(([{sizes:t,sizeRanges:e},{scrollTop:n},{initialTopMostItemIndex:o},{didMount:r},{useWindowScroll:s,windowScrollContainerState:i,windowViewportRect:l}])=>{const c=D(),f=C(void 0),u=C(null),g=C(null);return B(i,u),B(l,g),U(I(c,F(t,n,s,u,g)),([S,E,R,h,v,d])=>{const m=go(E.sizeTree);h&&v!==null&&d!==null&&(R=v.scrollTop-d.offsetTop),S({ranges:m,scrollTop:R})}),B(I(f,V(He),b(Go)),o),B(I(r,F(f),V(([,S])=>S!==void 0),Z(),b(([,S])=>S.ranges)),e),{getState:c,restoreStateFrom:f}},J(Ct,it,Xt,zt,Ge));function Go(t){return{offset:t.scrollTop,index:0,align:"start"}}const Fo=$(([t,e,n,o,r,s,i,l,c,f])=>({...t,...e,...n,...o,...r,...s,...i,...l,...c,...f}),J(Ve,bo,zt,Hn,On,zo,Lo,Ge,Po,Bt)),_o=$(([{totalCount:t,sizeRanges:e,fixedItemSize:n,defaultItemSize:o,trackItemSizes:r,itemSize:s,data:i,firstItemIndex:l,groupIndices:c,statefulTotalCount:f,gap:u,sizes:g},{initialTopMostItemIndex:S,scrolledToInitialItem:E},R,h,v,{listState:d,topItemsIndexes:m,...w},{scrollToIndex:O},p,{topItemCount:a},{groupCounts:y},H])=>(B(w.rangeChanged,H.scrollSeekRangeChanged),B(I(H.windowViewportRect,b(z=>z.visibleHeight)),R.viewportHeight),{totalCount:t,data:i,firstItemIndex:l,sizeRanges:e,initialTopMostItemIndex:S,scrolledToInitialItem:E,topItemsIndexes:m,topItemCount:a,groupCounts:y,fixedItemHeight:n,defaultItemHeight:o,gap:u,...v,statefulTotalCount:f,listState:d,scrollToIndex:O,trackItemSizes:r,itemSize:s,groupIndices:c,...w,...H,...R,sizes:g,...h}),J(Ct,Xt,it,Vo,Eo,Gt,Jt,Bo,Ho,yn,Fo)),Te="-webkit-sticky",tn="sticky",zn=Bn(()=>{if(typeof document>"u")return tn;const t=document.createElement("div");return t.style.position=Te,t.style.position===Te?Te:tn});function Ln(t,e){const n=x.useRef(null),o=x.useCallback(l=>{if(l===null||!l.offsetParent)return;const c=l.getBoundingClientRect(),f=c.width;let u,g;if(e){const S=e.getBoundingClientRect(),E=c.top-S.top;u=S.height-Math.max(0,E),g=E+e.scrollTop}else u=window.innerHeight-Math.max(0,c.top),g=c.top+window.pageYOffset;n.current={offsetTop:g,visibleHeight:u,visibleWidth:f},t(n.current)},[t,e]),{callbackRef:r,ref:s}=Be(o),i=x.useCallback(()=>{o(s.current)},[o,s]);return x.useEffect(()=>{if(e){e.addEventListener("scroll",i);const l=new ResizeObserver(i);return l.observe(e),()=>{e.removeEventListener("scroll",i),l.unobserve(e)}}else return window.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}},[i,e]),r}const kn=x.createContext(void 0),Pn=x.createContext(void 0);function Vn(t){return t}const Mo=$(()=>{const t=C(c=>`Item ${c}`),e=C(null),n=C(c=>`Group ${c}`),o=C({}),r=C(Vn),s=C("div"),i=C(Wt),l=(c,f=null)=>st(I(o,b(u=>u[c]),Z()),f);return{context:e,itemContent:t,groupContent:n,components:o,computeItemKey:r,headerFooterTag:s,scrollerRef:i,FooterComponent:l("Footer"),HeaderComponent:l("Header"),TopItemListComponent:l("TopItemList"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),GroupComponent:l("Group","div"),ScrollerComponent:l("Scroller","div"),EmptyPlaceholder:l("EmptyPlaceholder"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder")}}),Ao=$(([t,e])=>({...t,...e}),J(_o,Mo)),No=({height:t})=>x.createElement("div",{style:{height:t}}),Wo={position:zn(),zIndex:1,overflowAnchor:"none"},Do={overflowAnchor:"none"},en=x.memo(function({showTopList:e=!1}){const n=N("listState"),o=gt("sizeRanges"),r=N("useWindowScroll"),s=N("customScrollParent"),i=gt("windowScrollContainerState"),l=gt("scrollContainerState"),c=s||r?i:l,f=N("itemContent"),u=N("context"),g=N("groupContent"),S=N("trackItemSizes"),E=N("itemSize"),R=N("log"),h=gt("gap"),{callbackRef:v}=no(o,E,S,e?Wt:c,R,h,s),[d,m]=x.useState(0);Fe("deviation",L=>{d!==L&&m(L)});const w=N("EmptyPlaceholder"),O=N("ScrollSeekPlaceholder")||No,p=N("ListComponent"),a=N("ItemComponent"),y=N("GroupComponent"),H=N("computeItemKey"),z=N("isSeeking"),k=N("groupIndices").length>0,_=N("paddingTopAddition"),W=N("scrolledToInitialItem"),q=e?{}:{boxSizing:"border-box",paddingTop:n.offsetTop+_,paddingBottom:n.offsetBottom,marginTop:d,...W?{}:{visibility:"hidden"}};return!e&&n.totalCount===0&&w?x.createElement(w,ut(w,u)):x.createElement(p,{...ut(p,u),ref:v,style:q,"data-test-id":e?"virtuoso-top-item-list":"virtuoso-item-list"},(e?n.topItems:n.items).map(L=>{const M=L.originalIndex,j=H(M+n.firstItemIndex,L.data,u);return z?x.createElement(O,{...ut(O,u),key:j,index:L.index,height:L.size,type:L.type||"item",...L.type==="group"?{}:{groupIndex:L.groupIndex}}):L.type==="group"?x.createElement(y,{...ut(y,u),key:j,"data-index":M,"data-known-size":L.size,"data-item-index":L.index,style:Wo},g(L.index,u)):x.createElement(a,{...ut(a,u),key:j,"data-index":M,"data-known-size":L.size,"data-item-index":L.index,"data-item-group-index":L.groupIndex,item:L.data,style:Do},k?f(L.index,L.groupIndex,L.data,u):f(L.index,L.data,u))}))}),$o={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},ge={width:"100%",height:"100%",position:"absolute",top:0},Uo={width:"100%",position:zn(),top:0,zIndex:1};function ut(t,e){if(typeof t!="string")return{context:e}}const jo=x.memo(function(){const e=N("HeaderComponent"),n=gt("headerHeight"),o=N("headerFooterTag"),r=Vt(i=>n(Ht(i,"height"))),s=N("context");return e?x.createElement(o,{ref:r},x.createElement(e,ut(e,s))):null}),Ko=x.memo(function(){const e=N("FooterComponent"),n=gt("footerHeight"),o=N("headerFooterTag"),r=Vt(i=>n(Ht(i,"height"))),s=N("context");return e?x.createElement(o,{ref:r},x.createElement(e,ut(e,s))):null});function Gn({usePublisher:t,useEmitter:e,useEmitterValue:n}){return x.memo(function({style:s,children:i,...l}){const c=t("scrollContainerState"),f=n("ScrollerComponent"),u=t("smoothScrollTargetReached"),g=n("scrollerRef"),S=n("context"),{scrollerRef:E,scrollByCallback:R,scrollToCallback:h}=pn(c,u,f,g);return e("scrollTo",h),e("scrollBy",R),x.createElement(f,{ref:E,style:{...$o,...s},"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...l,...ut(f,S)},i)})}function Fn({usePublisher:t,useEmitter:e,useEmitterValue:n}){return x.memo(function({style:s,children:i,...l}){const c=t("windowScrollContainerState"),f=n("ScrollerComponent"),u=t("smoothScrollTargetReached"),g=n("totalListHeight"),S=n("deviation"),E=n("customScrollParent"),R=n("context"),{scrollerRef:h,scrollByCallback:v,scrollToCallback:d}=pn(c,u,f,Wt,E);return Xn(()=>(h.current=E||window,()=>{h.current=null}),[h,E]),e("windowScrollTo",d),e("scrollBy",v),x.createElement(f,{style:{position:"relative",...s,...g!==0?{height:g+S}:{}},"data-virtuoso-scroller":!0,...l,...ut(f,R)},i)})}const qo=({children:t})=>{const e=x.useContext(kn),n=gt("viewportHeight"),o=gt("fixedItemHeight"),r=Vt(an(n,s=>Ht(s,"height")));return x.useEffect(()=>{e&&(n(e.viewportHeight),o(e.itemHeight))},[e,n,o]),x.createElement("div",{style:ge,ref:r,"data-viewport-type":"element"},t)},Yo=({children:t})=>{const e=x.useContext(kn),n=gt("windowViewportRect"),o=gt("fixedItemHeight"),r=N("customScrollParent"),s=Ln(n,r);return x.useEffect(()=>{e&&(o(e.itemHeight),n({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:100}))},[e,n,o]),x.createElement("div",{ref:s,style:ge,"data-viewport-type":"window"},t)},Zo=({children:t})=>{const e=N("TopItemListComponent"),n=N("headerHeight"),o={...Uo,marginTop:`${n}px`},r=N("context");return x.createElement(e||"div",{style:o,context:r},t)},Jo=x.memo(function(e){const n=N("useWindowScroll"),o=N("topItemsIndexes").length>0,r=N("customScrollParent"),s=r||n?tr:Xo,i=r||n?Yo:qo;return x.createElement(s,{...e},o&&x.createElement(Zo,null,x.createElement(en,{showTopList:!0})),x.createElement(i,null,x.createElement(jo,null),x.createElement(en,null),x.createElement(Ko,null)))}),{Component:Qo,usePublisher:gt,useEmitterValue:N,useEmitter:Fe}=mn(Ao,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},Jo),Xo=Gn({usePublisher:gt,useEmitterValue:N,useEmitter:Fe}),tr=Fn({usePublisher:gt,useEmitterValue:N,useEmitter:Fe}),Sr=Qo,nn={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},er={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:on,ceil:rn,floor:fe,min:ve,max:Ut}=Math;function nr(t){return{...er,items:t}}function sn(t,e,n){return Array.from({length:e-t+1}).map((o,r)=>{const s=n===null?null:n[r+t];return{index:r+t,data:s}})}function or(t,e){return t&&t.column===e.column&&t.row===e.row}function se(t,e){return t&&t.width===e.width&&t.height===e.height}const rr=$(([{overscan:t,visibleRange:e,listBoundary:n},{scrollTop:o,viewportHeight:r,scrollBy:s,scrollTo:i,smoothScrollTargetReached:l,scrollContainerState:c,footerHeight:f,headerHeight:u},g,S,{propsReady:E,didMount:R},{windowViewportRect:h,useWindowScroll:v,customScrollParent:d,windowScrollContainerState:m,windowScrollTo:w},O])=>{const p=C(0),a=C(0),y=C(nn),H=C({height:0,width:0}),z=C({height:0,width:0}),k=D(),_=D(),W=C(0),q=C(null),L=C({row:0,column:0}),M=D(),j=D(),rt=C(!1),ht=C(0),lt=C(!0),ct=C(!1);U(I(R,F(ht),V(([T,A])=>!!A)),()=>{G(lt,!1),G(a,0)}),U(I(nt(R,lt,z,H,ht,ct),V(([T,A,Y,X,,ot])=>T&&!A&&Y.height!==0&&X.height!==0&&!ot)),([,,,,T])=>{G(ct,!0),ke(1,()=>{G(k,T)}),yt(I(o),()=>{G(n,[0,0]),G(lt,!0)})}),B(I(j,V(T=>T!=null&&T.scrollTop>0),Et(0)),a),U(I(R,F(j),V(([,T])=>T!=null)),([,T])=>{T&&(G(H,T.viewport),G(z,T==null?void 0:T.item),G(L,T.gap),T.scrollTop>0&&(G(rt,!0),yt(I(o,At(1)),A=>{G(rt,!1)}),G(i,{top:T.scrollTop})))}),B(I(H,b(({height:T})=>T)),r),B(I(nt(P(H,se),P(z,se),P(L,(T,A)=>T&&T.column===A.column&&T.row===A.row),P(o)),b(([T,A,Y,X])=>({viewport:T,item:A,gap:Y,scrollTop:X}))),M),B(I(nt(P(p),e,P(L,or),P(z,se),P(H,se),P(q),P(a),P(rt),P(lt),P(ht)),V(([,,,,,,,T])=>!T),b(([T,[A,Y],X,ot,St,et,Ft,,ee,Rt])=>{const{row:pt,column:An}=X,{height:ne,width:Ie}=ot,{width:_e}=St;if(Ft===0&&(T===0||_e===0))return nn;if(Ie===0){const Se=Pe(Rt,T),Wn=Se===0?Math.max(Ft-1,0):Se;return nr(sn(Se,Wn,et))}const oe=_n(_e,Ie,An);let _t,kt;ee?A===0&&Y===0&&Ft>0?(_t=0,kt=Ft-1):(_t=oe*fe((A+pt)/(ne+pt)),kt=oe*rn((Y+pt)/(ne+pt))-1,kt=ve(T-1,Ut(kt,oe-1)),_t=ve(kt,Ut(0,_t))):(_t=0,kt=-1);const Me=sn(_t,kt,et),{top:Ae,bottom:Ne}=ln(St,X,ot,Me),We=rn(T/oe),Nn=We*ne+(We-1)*pt-Ne;return{items:Me,offsetTop:Ae,offsetBottom:Nn,top:Ae,bottom:Ne,itemHeight:ne,itemWidth:Ie}})),y),B(I(q,V(T=>T!==null),b(T=>T.length)),p),B(I(nt(H,z,y,L),V(([T,A,{items:Y}])=>Y.length>0&&A.height!==0&&T.height!==0),b(([T,A,{items:Y},X])=>{const{top:ot,bottom:St}=ln(T,X,A,Y);return[ot,St]}),Z(Zt)),n);const It=C(!1);B(I(o,F(It),b(([T,A])=>A||T!==0)),It);const Tt=dt(I(P(y),V(({items:T})=>T.length>0),F(p,It),V(([{items:T},A,Y])=>Y&&T[T.length-1].index===A-1),b(([,T])=>T-1),Z())),Dt=dt(I(P(y),V(({items:T})=>T.length>0&&T[0].index===0),Et(0),Z())),te=dt(I(P(y),F(rt),V(([{items:T},A])=>T.length>0&&!A),b(([{items:T}])=>({startIndex:T[0].index,endIndex:T[T.length-1].index})),Z(Rn),bt(0)));B(te,S.scrollSeekRangeChanged),B(I(k,F(H,z,p,L),b(([T,A,Y,X,ot])=>{const St=En(T),{align:et,behavior:Ft,offset:ee}=St;let Rt=St.index;Rt==="LAST"&&(Rt=X-1),Rt=Ut(0,Rt,ve(X-1,Rt));let pt=be(A,ot,Y,Rt);return et==="end"?pt=on(pt-A.height+Y.height):et==="center"&&(pt=on(pt-A.height/2+Y.height/2)),ee&&(pt+=ee),{top:pt,behavior:Ft}})),i);const Lt=st(I(y,b(T=>T.offsetBottom+T.bottom)),0);return B(I(h,b(T=>({width:T.visibleWidth,height:T.visibleHeight}))),H),{data:q,totalCount:p,viewportDimensions:H,itemDimensions:z,scrollTop:o,scrollHeight:_,overscan:t,scrollBy:s,scrollTo:i,scrollToIndex:k,smoothScrollTargetReached:l,windowViewportRect:h,windowScrollTo:w,useWindowScroll:v,customScrollParent:d,windowScrollContainerState:m,deviation:W,scrollContainerState:c,footerHeight:f,headerHeight:u,initialItemCount:a,gap:L,restoreStateFrom:j,...S,initialTopMostItemIndex:ht,gridState:y,totalListHeight:Lt,...g,startReached:Dt,endReached:Tt,rangeChanged:te,stateChanged:M,propsReady:E,stateRestoreInProgress:rt,...O}},J(Ve,it,Qt,Hn,zt,Ge,Bt));function ln(t,e,n,o){const{height:r}=n;if(r===void 0||o.length===0)return{top:0,bottom:0};const s=be(t,e,n,o[0].index),i=be(t,e,n,o[o.length-1].index)+r;return{top:s,bottom:i}}function be(t,e,n,o){const r=_n(t.width,n.width,e.column),s=fe(o/r),i=s*n.height+Ut(0,s-1)*e.row;return i>0?i+e.row:i}function _n(t,e,n){return Ut(1,fe((t+n)/(fe(e)+n)))}const sr=$(()=>{const t=C(f=>`Item ${f}`),e=C({}),n=C(null),o=C("virtuoso-grid-item"),r=C("virtuoso-grid-list"),s=C(Vn),i=C("div"),l=C(Wt),c=(f,u=null)=>st(I(e,b(g=>g[f]),Z()),u);return{context:n,itemContent:t,components:e,computeItemKey:s,itemClassName:o,listClassName:r,headerFooterTag:i,scrollerRef:l,FooterComponent:c("Footer"),HeaderComponent:c("Header"),ListComponent:c("List","div"),ItemComponent:c("Item","div"),ScrollerComponent:c("Scroller","div"),ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),ir=$(([t,e])=>({...t,...e}),J(rr,sr)),lr=x.memo(function(){const e=Q("gridState"),n=Q("listClassName"),o=Q("itemClassName"),r=Q("itemContent"),s=Q("computeItemKey"),i=Q("isSeeking"),l=xt("scrollHeight"),c=Q("ItemComponent"),f=Q("ListComponent"),u=Q("ScrollSeekPlaceholder"),g=Q("context"),S=xt("itemDimensions"),E=xt("gap"),R=Q("log"),h=Q("stateRestoreInProgress"),v=Vt(d=>{const m=d.parentElement.parentElement.scrollHeight;l(m);const w=d.firstChild;if(w){const{width:O,height:p}=w.getBoundingClientRect();S({width:O,height:p})}E({row:cn("row-gap",getComputedStyle(d).rowGap,R),column:cn("column-gap",getComputedStyle(d).columnGap,R)})});return h?null:x.createElement(f,{ref:v,className:n,...ut(f,g),style:{paddingTop:e.offsetTop,paddingBottom:e.offsetBottom},"data-test-id":"virtuoso-item-list"},e.items.map(d=>{const m=s(d.index,d.data,g);return i?x.createElement(u,{key:m,...ut(u,g),index:d.index,height:e.itemHeight,width:e.itemWidth}):x.createElement(c,{...ut(c,g),className:o,"data-index":d.index,key:m},r(d.index,d.data,g))}))}),cr=x.memo(function(){const e=Q("HeaderComponent"),n=xt("headerHeight"),o=Q("headerFooterTag"),r=Vt(i=>n(Ht(i,"height"))),s=Q("context");return e?x.createElement(o,{ref:r},x.createElement(e,ut(e,s))):null}),ur=x.memo(function(){const e=Q("FooterComponent"),n=xt("footerHeight"),o=Q("headerFooterTag"),r=Vt(i=>n(Ht(i,"height"))),s=Q("context");return e?x.createElement(o,{ref:r},x.createElement(e,ut(e,s))):null}),ar=({children:t})=>{const e=x.useContext(Pn),n=xt("itemDimensions"),o=xt("viewportDimensions"),r=Vt(s=>{o(s.getBoundingClientRect())});return x.useEffect(()=>{e&&(o({height:e.viewportHeight,width:e.viewportWidth}),n({height:e.itemHeight,width:e.itemWidth}))},[e,o,n]),x.createElement("div",{style:ge,ref:r},t)},fr=({children:t})=>{const e=x.useContext(Pn),n=xt("windowViewportRect"),o=xt("itemDimensions"),r=Q("customScrollParent"),s=Ln(n,r);return x.useEffect(()=>{e&&(o({height:e.itemHeight,width:e.itemWidth}),n({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:e.viewportWidth}))},[e,n,o]),x.createElement("div",{ref:s,style:ge},t)},dr=x.memo(function({...e}){const n=Q("useWindowScroll"),o=Q("customScrollParent"),r=o||n?pr:hr,s=o||n?fr:ar;return x.createElement(r,{...e},x.createElement(s,null,x.createElement(cr,null),x.createElement(lr,null),x.createElement(ur,null)))}),{Component:mr,usePublisher:xt,useEmitterValue:Q,useEmitter:Mn}=mn(ir,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},dr),hr=Gn({usePublisher:xt,useEmitterValue:Q,useEmitter:Mn}),pr=Fn({usePublisher:xt,useEmitterValue:Q,useEmitter:Mn});function cn(t,e,n){return e!=="normal"&&!(e!=null&&e.endsWith("px"))&&n(`${t} was not resolved to pixel value correctly`,e,mt.WARN),e==="normal"?0:parseInt(e??"0",10)}const xr=mr;export{Sr as V,xr as a}; +import{R as x,cm as Dn}from"../index-be605fd2.js";const de=0,Ot=1,Nt=2,un=4;function an(t,e){return n=>t(e(n))}function $n(t,e){return e(t)}function fn(t,e){return n=>t(e,n)}function De(t,e){return()=>t(e)}function me(t,e){return e(t),t}function J(...t){return t}function Un(t){t()}function $e(t){return()=>t}function jn(...t){return()=>{t.map(Un)}}function He(t){return t!==void 0}function Wt(){}function U(t,e){return t(Ot,e)}function G(t,e){t(de,e)}function Oe(t){t(Nt)}function ft(t){return t(un)}function B(t,e){return U(t,fn(e,de))}function yt(t,e){const n=t(Ot,o=>{n(),e(o)});return n}function D(){const t=[];return(e,n)=>{switch(e){case Nt:t.splice(0,t.length);return;case Ot:return t.push(n),()=>{const o=t.indexOf(n);o>-1&&t.splice(o,1)};case de:t.slice().forEach(o=>{o(n)});return;default:throw new Error(`unrecognized action ${e}`)}}}function C(t){let e=t;const n=D();return(o,r)=>{switch(o){case Ot:r(e);break;case de:e=r;break;case un:return e}return n(o,r)}}function Kn(t){let e,n;const o=()=>e&&e();return function(r,s){switch(r){case Ot:return s?n===s?void 0:(o(),n=s,e=U(t,s),e):(o(),Wt);case Nt:o(),n=null;return;default:throw new Error(`unrecognized action ${r}`)}}}function dt(t){return me(D(),e=>B(t,e))}function st(t,e){return me(C(e),n=>B(t,n))}function qn(...t){return e=>t.reduceRight($n,e)}function I(t,...e){const n=qn(...e);return(o,r)=>{switch(o){case Ot:return U(t,n(r));case Nt:Oe(t);return}}}function dn(t,e){return t===e}function Z(t=dn){let e;return n=>o=>{t(e,o)||(e=o,n(o))}}function V(t){return e=>n=>{t(n)&&e(n)}}function b(t){return e=>an(e,t)}function Et(t){return e=>()=>e(t)}function vt(t,e){return n=>o=>n(e=t(e,o))}function At(t){return e=>n=>{t>0?t--:e(n)}}function bt(t){let e=null,n;return o=>r=>{e=r,!n&&(n=setTimeout(()=>{n=void 0,o(e)},t))}}function Ue(t){let e,n;return o=>r=>{e=r,n&&clearTimeout(n),n=setTimeout(()=>{o(e)},t)}}function F(...t){const e=new Array(t.length);let n=0,o=null;const r=Math.pow(2,t.length)-1;return t.forEach((s,i)=>{const l=Math.pow(2,i);U(s,c=>{const f=n;n=n|l,e[i]=c,f!==r&&n===r&&o&&(o(),o=null)})}),s=>i=>{const l=()=>s([i].concat(e));n===r?l():o=l}}function je(...t){return function(e,n){switch(e){case Ot:return jn(...t.map(o=>U(o,n)));case Nt:return;default:throw new Error(`unrecognized action ${e}`)}}}function P(t,e=dn){return I(t,Z(e))}function nt(...t){const e=D(),n=new Array(t.length);let o=0;const r=Math.pow(2,t.length)-1;return t.forEach((s,i)=>{const l=Math.pow(2,i);U(s,c=>{n[i]=c,o=o|l,o===r&&G(e,n)})}),function(s,i){switch(s){case Ot:return o===r&&i(n),U(e,i);case Nt:return Oe(e);default:throw new Error(`unrecognized action ${s}`)}}}function $(t,e=[],{singleton:n}={singleton:!0}){return{id:Yn(),constructor:t,dependencies:e,singleton:n}}const Yn=()=>Symbol();function Zn(t){const e=new Map,n=({id:o,constructor:r,dependencies:s,singleton:i})=>{if(i&&e.has(o))return e.get(o);const l=r(s.map(c=>n(c)));return i&&e.set(o,l),l};return n(t)}function Jn(t,e){const n={},o={};let r=0;const s=t.length;for(;r(v[d]=m=>{const w=h[e.methods[d]];G(w,m)},v),{})}function u(h){return i.reduce((v,d)=>(v[d]=Kn(h[e.events[d]]),v),{})}return{Component:x.forwardRef((h,v)=>{const{children:d,...m}=h,[w]=x.useState(()=>me(Zn(t),p=>c(p,m))),[O]=x.useState(De(u,w));return re(()=>{for(const p of i)p in m&&U(O[p],m[p]);return()=>{Object.values(O).map(Oe)}},[m,O,w]),re(()=>{c(w,m)}),x.useImperativeHandle(v,$e(f(w))),x.createElement(l.Provider,{value:w},n?x.createElement(n,Jn([...o,...r,...i],m),d):d)}),usePublisher:h=>x.useCallback(fn(G,x.useContext(l)[h]),[h]),useEmitterValue:h=>{const d=x.useContext(l)[h],[m,w]=x.useState(De(ft,d));return re(()=>U(d,O=>{O!==m&&w($e(O))}),[d,m]),m},useEmitter:(h,v)=>{const m=x.useContext(l)[h];re(()=>U(m,v),[v,m])}}}const Qn=typeof document<"u"?x.useLayoutEffect:x.useEffect,Xn=Qn;var mt=(t=>(t[t.DEBUG=0]="DEBUG",t[t.INFO=1]="INFO",t[t.WARN=2]="WARN",t[t.ERROR=3]="ERROR",t))(mt||{});const to={0:"debug",1:"log",2:"warn",3:"error"},eo=()=>typeof globalThis>"u"?window:globalThis,Bt=$(()=>{const t=C(3);return{log:C((n,o,r=1)=>{var s;const i=(s=eo().VIRTUOSO_LOG_LEVEL)!=null?s:ft(t);r>=i&&console[to[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,o)}),logLevel:t}},[],{singleton:!0});function Be(t,e=!0){const n=x.useRef(null);let o=r=>{};if(typeof ResizeObserver<"u"){const r=x.useMemo(()=>new ResizeObserver(s=>{const i=s[0].target;i.offsetParent!==null&&t(i)}),[t]);o=s=>{s&&e?(r.observe(s),n.current=s):(n.current&&r.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:o}}function Vt(t,e=!0){return Be(t,e).callbackRef}function no(t,e,n,o,r,s,i){const l=x.useCallback(c=>{const f=oo(c.children,e,"offsetHeight",r);let u=c.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const g=u.lastElementChild.dataset.viewportType==="window",S=i?i.scrollTop:g?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,E=i?i.scrollHeight:g?document.documentElement.scrollHeight:u.scrollHeight,R=i?i.offsetHeight:g?window.innerHeight:u.offsetHeight;o({scrollTop:Math.max(S,0),scrollHeight:E,viewportHeight:R}),s==null||s(ro("row-gap",getComputedStyle(c).rowGap,r)),f!==null&&t(f)},[t,e,r,s,i,o]);return Be(l,n)}function oo(t,e,n,o){const r=t.length;if(r===0)return null;const s=[];for(let i=0;i{const S=g.target,E=S===window||S===document,R=E?window.pageYOffset||document.documentElement.scrollTop:S.scrollTop,h=E?document.documentElement.scrollHeight:S.scrollHeight,v=E?window.innerHeight:S.offsetHeight,d=()=>{t({scrollTop:Math.max(R,0),scrollHeight:h,viewportHeight:v})};g.suppressFlushSync?d():Dn.flushSync(d),i.current!==null&&(R===i.current||R<=0||R===h-v)&&(i.current=null,e(!0),l.current&&(clearTimeout(l.current),l.current=null))},[t,e]);x.useEffect(()=>{const g=r||s.current;return o(r||s.current),c({target:g,suppressFlushSync:!0}),g.addEventListener("scroll",c,{passive:!0}),()=>{o(null),g.removeEventListener("scroll",c)}},[s,c,n,o,r]);function f(g){const S=s.current;if(!S||"offsetHeight"in S&&S.offsetHeight===0)return;const E=g.behavior==="smooth";let R,h,v;S===window?(h=Math.max(Ht(document.documentElement,"height"),document.documentElement.scrollHeight),R=window.innerHeight,v=document.documentElement.scrollTop):(h=S.scrollHeight,R=Ht(S,"height"),v=S.scrollTop);const d=h-R;if(g.top=Math.ceil(Math.max(Math.min(d,g.top),0)),hn(R,h)||g.top===v){t({scrollTop:v,scrollHeight:h,viewportHeight:R}),E&&e(!0);return}E?(i.current=g.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,i.current=null,e(!0)},1e3)):i.current=null,S.scrollTo(g)}function u(g){s.current.scrollBy(g)}return{scrollerRef:s,scrollByCallback:u,scrollToCallback:f}}const it=$(()=>{const t=D(),e=D(),n=C(0),o=D(),r=C(0),s=D(),i=D(),l=C(0),c=C(0),f=C(0),u=C(0),g=D(),S=D(),E=C(!1);return B(I(t,b(({scrollTop:R})=>R)),e),B(I(t,b(({scrollHeight:R})=>R)),i),B(e,r),{scrollContainerState:t,scrollTop:e,viewportHeight:s,headerHeight:l,fixedHeaderHeight:c,fixedFooterHeight:f,footerHeight:u,scrollHeight:i,smoothScrollTargetReached:o,scrollTo:g,scrollBy:S,statefulScrollTop:r,deviation:n,scrollingInProgress:E}},[],{singleton:!0}),jt={lvl:0};function gn(t,e,n,o=jt,r=jt){return{k:t,v:e,lvl:n,l:o,r}}function K(t){return t===jt}function Mt(){return jt}function Ce(t,e){if(K(t))return jt;const{k:n,l:o,r}=t;if(e===n){if(K(o))return r;if(K(r))return o;{const[s,i]=In(o);return ie(tt(t,{k:s,v:i,l:Sn(o)}))}}else return ee&&(l=l.concat(Ee(s,e,n))),o>=e&&o<=n&&l.push({k:o,v:r}),o<=n&&(l=l.concat(Ee(i,e,n))),l}function Pt(t){return K(t)?[]:[...Pt(t.l),{k:t.k,v:t.v},...Pt(t.r)]}function In(t){return K(t.r)?[t.k,t.v]:In(t.r)}function Sn(t){return K(t.r)?t.l:ie(tt(t,{r:Sn(t.r)}))}function tt(t,e){return gn(e.k!==void 0?e.k:t.k,e.v!==void 0?e.v:t.v,e.lvl!==void 0?e.lvl:t.lvl,e.l!==void 0?e.l:t.l,e.r!==void 0?e.r:t.r)}function xe(t){return K(t)||t.lvl>t.r.lvl}function Ke(t){return ye(wn(t))}function ie(t){const{l:e,r:n,lvl:o}=t;if(n.lvl>=o-1&&e.lvl>=o-1)return t;if(o>n.lvl+1){if(xe(e))return wn(tt(t,{lvl:o-1}));if(!K(e)&&!K(e.r))return tt(e.r,{l:tt(e,{r:e.r.l}),r:tt(t,{l:e.r.r,lvl:o-1}),lvl:o});throw new Error("Unexpected empty nodes")}else{if(xe(t))return ye(tt(t,{lvl:o-1}));if(!K(n)&&!K(n.l)){const r=n.l,s=xe(r)?n.lvl-1:n.lvl;return tt(r,{l:tt(t,{r:r.l,lvl:o-1}),r:ye(tt(n,{l:r.r,lvl:s})),lvl:r.lvl+1})}else throw new Error("Unexpected empty nodes")}}function he(t,e,n){if(K(t))return[];const o=wt(t,e)[0];return so(Ee(t,o,n))}function xn(t,e){const n=t.length;if(n===0)return[];let{index:o,value:r}=e(t[0]);const s=[];for(let i=1;i({index:e,value:n}))}function ye(t){const{r:e,lvl:n}=t;return!K(e)&&!K(e.r)&&e.lvl===n&&e.r.lvl===n?tt(e,{l:tt(t,{r:e.l}),lvl:n+1}):t}function wn(t){const{l:e}=t;return!K(e)&&e.lvl===t.lvl?tt(e,{r:tt(t,{l:e.r})}):t}function ce(t,e,n,o=0){let r=t.length-1;for(;o<=r;){const s=Math.floor((o+r)/2),i=t[s],l=n(i,e);if(l===0)return s;if(l===-1){if(r-o<2)return s-1;r=s-1}else{if(r===o)return s;o=s+1}}throw new Error(`Failed binary finding record in array - ${t.join(",")}, searched for ${e}`)}function Tn(t,e,n){return t[ce(t,e,n)]}function io(t,e,n,o){const r=ce(t,e,o),s=ce(t,n,o,r);return t.slice(r,s+1)}const ze=$(()=>({recalcInProgress:C(!1)}),[],{singleton:!0});function lo(t){const{size:e,startIndex:n,endIndex:o}=t;return r=>r.start===n&&(r.end===o||r.end===1/0)&&r.value===e}function qe(t,e){let n=0,o=0;for(;n=u||r===S)&&(t=Ce(t,u)):(f=S!==r,c=!0),g>i&&i>=u&&S!==r&&(t=at(t,i+1,S));f&&(t=at(t,s,r))}return[t,n]}function uo(){return{offsetTree:[],sizeTree:Mt(),groupOffsetTree:Mt(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Le({index:t},e){return e===t?0:e0&&(e=Math.max(e,Tn(t,o,Le).offset)),xn(io(t,e,n,ao),fo)}function Re(t,e,n,o){let r=t,s=0,i=0,l=0,c=0;if(e!==0){c=ce(r,e-1,Le),l=r[c].offset;const u=wt(n,e-1);s=u[0],i=u[1],r.length&&r[c].size===wt(n,e)[1]&&(c-=1),r=r.slice(0,c+1)}else r=[];for(const{start:f,value:u}of he(n,e,1/0)){const g=f-s,S=g*i+l+g*o;r.push({offset:S,size:u,index:f}),s=f,l=S,i=u}return{offsetTree:r,lastIndex:s,lastOffset:l,lastSize:i}}function ho(t,[e,n,o,r]){e.length>0&&o("received item sizes",e,mt.DEBUG);const s=t.sizeTree;let i=s,l=0;if(n.length>0&&K(s)&&e.length===2){const S=e[0].size,E=e[1].size;i=n.reduce((R,h)=>at(at(R,h,S),h+1,E),i)}else[i,l]=co(i,e);if(i===s)return t;const{offsetTree:c,lastIndex:f,lastSize:u,lastOffset:g}=Re(t.offsetTree,l,i,r);return{sizeTree:i,offsetTree:c,lastIndex:f,lastOffset:g,lastSize:u,groupOffsetTree:n.reduce((S,E)=>at(S,E,qt(E,c,r)),Mt()),groupIndices:n}}function qt(t,e,n){if(e.length===0)return 0;const{offset:o,index:r,size:s}=Tn(e,t,Le),i=t-r,l=s*i+(i-1)*n+o;return l>0?l+n:l}function po(t){return typeof t.groupIndex<"u"}function vn(t,e,n){if(po(t))return e.groupIndices[t.groupIndex]+1;{const o=t.index==="LAST"?n:t.index;let r=Cn(o,e);return r=Math.max(0,r,Math.min(n,r)),r}}function Cn(t,e){if(!pe(e))return t;let n=0;for(;e.groupIndices[n]<=t+n;)n++;return t+n}function pe(t){return!K(t.groupOffsetTree)}function go(t){return Pt(t).map(({k:e,v:n},o,r)=>{const s=r[o+1],i=s?s.k-1:1/0;return{startIndex:e,endIndex:i,size:n}})}const Io={offsetHeight:"height",offsetWidth:"width"},Ct=$(([{log:t},{recalcInProgress:e}])=>{const n=D(),o=D(),r=st(o,0),s=D(),i=D(),l=C(0),c=C([]),f=C(void 0),u=C(void 0),g=C((p,a)=>Ht(p,Io[a])),S=C(void 0),E=C(0),R=uo(),h=st(I(n,F(c,t,E),vt(ho,R),Z()),R),v=st(I(c,Z(),vt((p,a)=>({prev:p.current,current:a}),{prev:[],current:[]}),b(({prev:p})=>p)),[]);B(I(c,V(p=>p.length>0),F(h,E),b(([p,a,y])=>{const H=p.reduce((z,k,_)=>at(z,k,qt(k,a.offsetTree,y)||_),Mt());return{...a,groupIndices:p,groupOffsetTree:H}})),h),B(I(o,F(h),V(([p,{lastIndex:a}])=>p[{startIndex:p,endIndex:a,size:y}])),n),B(f,u);const d=st(I(f,b(p=>p===void 0)),!0);B(I(u,V(p=>p!==void 0&&K(ft(h).sizeTree)),b(p=>[{startIndex:0,endIndex:0,size:p}])),n);const m=dt(I(n,F(h),vt(({sizes:p},[a,y])=>({changed:y!==p,sizes:y}),{changed:!1,sizes:R}),b(p=>p.changed)));U(I(l,vt((p,a)=>({diff:p.prev-a,prev:a}),{diff:0,prev:0}),b(p=>p.diff)),p=>{const{groupIndices:a}=ft(h);if(p>0)G(e,!0),G(s,p+qe(p,a));else if(p<0){const y=ft(v);y.length>0&&(p-=qe(-p,y)),G(i,p)}}),U(I(l,F(t)),([p,a])=>{p<0&&a("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:l},mt.ERROR)});const w=dt(s);B(I(s,F(h),b(([p,a])=>{const y=a.groupIndices.length>0,H=[],z=a.lastSize;if(y){const k=Kt(a.sizeTree,0);let _=0,W=0;for(;_{let ht=M.ranges;return M.prevSize!==0&&(ht=[...M.ranges,{startIndex:M.prevIndex,endIndex:j+p-1,size:M.prevSize}]),{ranges:ht,prevIndex:j+p,prevSize:rt}},{ranges:H,prevIndex:p,prevSize:0}).ranges}return Pt(a.sizeTree).reduce((k,{k:_,v:W})=>({ranges:[...k.ranges,{startIndex:k.prevIndex,endIndex:_+p-1,size:k.prevSize}],prevIndex:_+p,prevSize:W}),{ranges:[],prevIndex:0,prevSize:z}).ranges})),n);const O=dt(I(i,F(h,E),b(([p,{offsetTree:a},y])=>{const H=-p;return qt(H,a,y)})));return B(I(i,F(h,E),b(([p,a,y])=>{if(a.groupIndices.length>0){if(K(a.sizeTree))return a;let z=Mt();const k=ft(v);let _=0,W=0,q=0;for(;_<-p;){q=k[W];const M=k[W+1]-q-1;W++,_+=M+1}if(z=Pt(a.sizeTree).reduce((M,{k:j,v:rt})=>at(M,Math.max(0,j+p),rt),z),_!==-p){const M=Kt(a.sizeTree,q);z=at(z,0,M);const j=wt(a.sizeTree,-p+1)[1];z=at(z,1,j)}return{...a,sizeTree:z,...Re(a.offsetTree,0,z,y)}}else{const z=Pt(a.sizeTree).reduce((k,{k:_,v:W})=>at(k,Math.max(0,_+p),W),Mt());return{...a,sizeTree:z,...Re(a.offsetTree,0,z,y)}}})),h),{data:S,totalCount:o,sizeRanges:n,groupIndices:c,defaultItemSize:u,fixedItemSize:f,unshiftWith:s,shiftWith:i,shiftWithOffset:O,beforeUnshiftWith:w,firstItemIndex:l,gap:E,sizes:h,listRefresh:m,statefulTotalCount:r,trackItemSizes:d,itemSize:g}},J(Bt,ze),{singleton:!0}),So=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function En(t){const e=typeof t=="number"?{index:t}:t;return e.align||(e.align="start"),(!e.behavior||!So)&&(e.behavior="auto"),e.offset||(e.offset=0),e}const Jt=$(([{sizes:t,totalCount:e,listRefresh:n,gap:o},{scrollingInProgress:r,viewportHeight:s,scrollTo:i,smoothScrollTargetReached:l,headerHeight:c,footerHeight:f,fixedHeaderHeight:u,fixedFooterHeight:g},{log:S}])=>{const E=D(),R=C(0);let h=null,v=null,d=null;function m(){h&&(h(),h=null),d&&(d(),d=null),v&&(clearTimeout(v),v=null),G(r,!1)}return B(I(E,F(t,s,e,R,c,f,S),F(o,u,g),b(([[w,O,p,a,y,H,z,k],_,W,q])=>{const L=En(w),{align:M,behavior:j,offset:rt}=L,ht=a-1,lt=vn(L,O,ht);let ct=qt(lt,O.offsetTree,_)+H;M==="end"?(ct+=W+wt(O.sizeTree,lt)[1]-p+q,lt===ht&&(ct+=z)):M==="center"?ct+=(W+wt(O.sizeTree,lt)[1]-p+q)/2:ct-=y,rt&&(ct+=rt);const It=Tt=>{m(),Tt?(k("retrying to scroll to",{location:w},mt.DEBUG),G(E,w)):k("list did not change, scroll successful",{},mt.DEBUG)};if(m(),j==="smooth"){let Tt=!1;d=U(n,Dt=>{Tt=Tt||Dt}),h=yt(l,()=>{It(Tt)})}else h=yt(I(n,xo(150)),It);return v=setTimeout(()=>{m()},1200),G(r,!0),k("scrolling from index to",{index:lt,top:ct,behavior:j},mt.DEBUG),{top:ct,behavior:j}})),i),{scrollToIndex:E,topListHeight:R}},J(Ct,it,Bt),{singleton:!0});function xo(t){return e=>{const n=setTimeout(()=>{e(!1)},t);return o=>{o&&(e(!0),clearTimeout(n))}}}const Yt="up",$t="down",wo="none",To={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},vo=0,Qt=$(([{scrollContainerState:t,scrollTop:e,viewportHeight:n,headerHeight:o,footerHeight:r,scrollBy:s}])=>{const i=C(!1),l=C(!0),c=D(),f=D(),u=C(4),g=C(vo),S=st(I(je(I(P(e),At(1),Et(!0)),I(P(e),At(1),Et(!1),Ue(100))),Z()),!1),E=st(I(je(I(s,Et(!0)),I(s,Et(!1),Ue(200))),Z()),!1);B(I(nt(P(e),P(g)),b(([m,w])=>m<=w),Z()),l),B(I(l,bt(50)),f);const R=dt(I(nt(t,P(n),P(o),P(r),P(u)),vt((m,[{scrollTop:w,scrollHeight:O},p,a,y,H])=>{const z=w+p-O>-H,k={viewportHeight:p,scrollTop:w,scrollHeight:O};if(z){let W,q;return w>m.state.scrollTop?(W="SCROLLED_DOWN",q=m.state.scrollTop-w):(W="SIZE_DECREASED",q=m.state.scrollTop-w||m.scrollTopDelta),{atBottom:!0,state:k,atBottomBecause:W,scrollTopDelta:q}}let _;return k.scrollHeight>m.state.scrollHeight?_="SIZE_INCREASED":pm&&m.atBottom===w.atBottom))),h=st(I(t,vt((m,{scrollTop:w,scrollHeight:O,viewportHeight:p})=>{if(hn(m.scrollHeight,O))return{scrollTop:w,scrollHeight:O,jump:0,changed:!1};{const a=O-(w+p)<1;return m.scrollTop!==w&&a?{scrollHeight:O,scrollTop:w,jump:m.scrollTop-w,changed:!0}:{scrollHeight:O,scrollTop:w,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),V(m=>m.changed),b(m=>m.jump)),0);B(I(R,b(m=>m.atBottom)),i),B(I(i,bt(50)),c);const v=C($t);B(I(t,b(({scrollTop:m})=>m),Z(),vt((m,w)=>ft(E)?{direction:m.direction,prevScrollTop:w}:{direction:wm.direction)),v),B(I(t,bt(50),Et(wo)),v);const d=C(0);return B(I(S,V(m=>!m),Et(0)),d),B(I(e,bt(100),F(S),V(([m,w])=>!!w),vt(([m,w],[O])=>[w,O],[0,0]),b(([m,w])=>w-m)),d),{isScrolling:S,isAtTop:l,isAtBottom:i,atBottomState:R,atTopStateChange:f,atBottomStateChange:c,scrollDirection:v,atBottomThreshold:u,atTopThreshold:g,scrollVelocity:d,lastJumpDueToItemResize:h}},J(it)),zt=$(([{log:t}])=>{const e=C(!1),n=dt(I(e,V(o=>o),Z()));return U(e,o=>{o&&ft(t)("props updated",{},mt.DEBUG)}),{propsReady:e,didMount:n}},J(Bt),{singleton:!0});function ke(t,e){t==0?e():requestAnimationFrame(()=>ke(t-1,e))}function Pe(t,e){const n=e-1;return typeof t=="number"?t:t.index==="LAST"?n:t.index}const Xt=$(([{sizes:t,listRefresh:e,defaultItemSize:n},{scrollTop:o},{scrollToIndex:r},{didMount:s}])=>{const i=C(!0),l=C(0),c=C(!1);return B(I(s,F(l),V(([f,u])=>!!u),Et(!1)),i),U(I(nt(e,s),F(i,t,n,c),V(([[,f],u,{sizeTree:g},S,E])=>f&&(!K(g)||He(S))&&!u&&!E),F(l)),([,f])=>{G(c,!0),ke(3,()=>{yt(o,()=>G(i,!0)),G(r,f)})}),{scrolledToInitialItem:i,initialTopMostItemIndex:l}},J(Ct,it,Jt,zt),{singleton:!0});function Ye(t){return t?t==="smooth"?"smooth":"auto":!1}const Co=(t,e)=>typeof t=="function"?Ye(t(e)):e&&Ye(t),Eo=$(([{totalCount:t,listRefresh:e},{isAtBottom:n,atBottomState:o},{scrollToIndex:r},{scrolledToInitialItem:s},{propsReady:i,didMount:l},{log:c},{scrollingInProgress:f}])=>{const u=C(!1),g=D();let S=null;function E(h){G(r,{index:"LAST",align:"end",behavior:h})}U(I(nt(I(P(t),At(1)),l),F(P(u),n,s,f),b(([[h,v],d,m,w,O])=>{let p=v&&w,a="auto";return p&&(a=Co(d,m||O),p=p&&!!a),{totalCount:h,shouldFollow:p,followOutputBehavior:a}}),V(({shouldFollow:h})=>h)),({totalCount:h,followOutputBehavior:v})=>{S&&(S(),S=null),S=yt(e,()=>{ft(c)("following output to ",{totalCount:h},mt.DEBUG),E(v),S=null})});function R(h){const v=yt(o,d=>{h&&!d.atBottom&&d.notAtBottomBecause==="SIZE_INCREASED"&&!S&&(ft(c)("scrolling to bottom due to increased size",{},mt.DEBUG),E("auto"))});setTimeout(v,100)}return U(I(nt(P(u),t,i),V(([h,,v])=>h&&v),vt(({value:h},[,v])=>({refreshed:h===v,value:v}),{refreshed:!1,value:0}),V(({refreshed:h})=>h),F(u,t)),([,h])=>{R(h!==!1)}),U(g,()=>{R(ft(u)!==!1)}),U(nt(P(u),o),([h,v])=>{h&&!v.atBottom&&v.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&E("auto")}),{followOutput:u,autoscrollToBottom:g}},J(Ct,Qt,Jt,Xt,zt,Bt,it));function yo(t){return t.reduce((e,n)=>(e.groupIndices.push(e.totalCount),e.totalCount+=n+1,e),{totalCount:0,groupIndices:[]})}const yn=$(([{totalCount:t,groupIndices:e,sizes:n},{scrollTop:o,headerHeight:r}])=>{const s=D(),i=D(),l=dt(I(s,b(yo)));return B(I(l,b(c=>c.totalCount)),t),B(I(l,b(c=>c.groupIndices)),e),B(I(nt(o,n,r),V(([c,f])=>pe(f)),b(([c,f,u])=>wt(f.groupOffsetTree,Math.max(c-u,0),"v")[0]),Z(),b(c=>[c])),i),{groupCounts:s,topItemsIndexes:i}},J(Ct,it));function Zt(t,e){return!!(t&&t[0]===e[0]&&t[1]===e[1])}function Rn(t,e){return!!(t&&t.startIndex===e.startIndex&&t.endIndex===e.endIndex)}const ue="top",ae="bottom",Ze="none";function Je(t,e,n){return typeof t=="number"?n===Yt&&e===ue||n===$t&&e===ae?t:0:n===Yt?e===ue?t.main:t.reverse:e===ae?t.main:t.reverse}function Qe(t,e){return typeof t=="number"?t:t[e]||0}const Ve=$(([{scrollTop:t,viewportHeight:e,deviation:n,headerHeight:o,fixedHeaderHeight:r}])=>{const s=D(),i=C(0),l=C(0),c=C(0),f=st(I(nt(P(t),P(e),P(o),P(s,Zt),P(c),P(i),P(r),P(n),P(l)),b(([u,g,S,[E,R],h,v,d,m,w])=>{const O=u-m,p=v+d,a=Math.max(S-O,0);let y=Ze;const H=Qe(w,ue),z=Qe(w,ae);return E-=m,E+=S+d,R+=S+d,R-=m,E>u+p-H&&(y=Yt),Ru!=null),Z(Zt)),[0,0]);return{listBoundary:s,overscan:c,topListHeight:i,increaseViewportBy:l,visibleRange:f}},J(it),{singleton:!0});function Ro(t,e,n){if(pe(e)){const o=Cn(t,e);return[{index:wt(e.groupOffsetTree,o)[0],size:0,offset:0},{index:o,size:0,offset:0,data:n&&n[0]}]}return[{index:t,size:0,offset:0,data:n&&n[0]}]}const we={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Xe(t,e,n){if(t.length===0)return[];if(!pe(e))return t.map(f=>({...f,index:f.index+n,originalIndex:f.index}));const o=t[0].index,r=t[t.length-1].index,s=[],i=he(e.groupOffsetTree,o,r);let l,c=0;for(const f of t){(!l||l.end0){f=t[0].offset;const h=t[t.length-1];u=h.offset+h.size}const g=n-c,S=l+g*i+(g-1)*o,E=f,R=S-u;return{items:Xe(t,r,s),topItems:Xe(e,r,s),topListHeight:e.reduce((h,v)=>v.size+h,0),offsetTop:f,offsetBottom:R,top:E,bottom:u,totalCount:n,firstItemIndex:s}}function bn(t,e,n,o,r,s){let i=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-i>=t)break;i++}const l=t+i,c=Pe(e,l),f=Array.from({length:l}).map((u,g)=>({index:g+c,size:0,offset:0,data:s[g+c]}));return le(f,[],l,r,n,o)}const Gt=$(([{sizes:t,totalCount:e,data:n,firstItemIndex:o,gap:r},s,{visibleRange:i,listBoundary:l,topListHeight:c},{scrolledToInitialItem:f,initialTopMostItemIndex:u},{topListHeight:g},S,{didMount:E},{recalcInProgress:R}])=>{const h=C([]),v=C(0),d=D();B(s.topItemsIndexes,h);const m=st(I(nt(E,R,P(i,Zt),P(e),P(t),P(u),f,P(h),P(o),P(r),n),V(([a,y,,H,,,,,,,z])=>{const k=z&&z.length!==H;return a&&!y&&!k}),b(([,,[a,y],H,z,k,_,W,q,L,M])=>{const j=z,{sizeTree:rt,offsetTree:ht}=j,lt=ft(v);if(H===0)return{...we,totalCount:H};if(a===0&&y===0)return lt===0?{...we,totalCount:H}:bn(lt,k,z,q,L,M||[]);if(K(rt))return lt>0?null:le(Ro(Pe(k,H),j,M),[],H,L,j,q);const ct=[];if(W.length>0){const Lt=W[0],T=W[W.length-1];let A=0;for(const Y of he(rt,Lt,T)){const X=Y.value,ot=Math.max(Y.start,Lt),St=Math.min(Y.end,T);for(let et=ot;et<=St;et++)ct.push({index:et,size:X,offset:A,data:M&&M[et]}),A+=X}}if(!_)return le([],ct,H,L,j,q);const It=W.length>0?W[W.length-1]+1:0,Tt=mo(ht,a,y,It);if(Tt.length===0)return null;const Dt=H-1,te=me([],Lt=>{for(const T of Tt){const A=T.value;let Y=A.offset,X=T.start;const ot=A.size;if(A.offset=y);et++)Lt.push({index:et,size:ot,offset:Y,data:M&&M[et]}),Y+=ot+L}});return le(te,ct,H,L,j,q)}),V(a=>a!==null),Z()),we);B(I(n,V(He),b(a=>a==null?void 0:a.length)),e),B(I(m,b(a=>a.topListHeight)),g),B(g,c),B(I(m,b(a=>[a.top,a.bottom])),l),B(I(m,b(a=>a.items)),d);const w=dt(I(m,V(({items:a})=>a.length>0),F(e,n),V(([{items:a},y])=>a[a.length-1].originalIndex===y-1),b(([,a,y])=>[a-1,y]),Z(Zt),b(([a])=>a))),O=dt(I(m,bt(200),V(({items:a,topItems:y})=>a.length>0&&a[0].originalIndex===y.length),b(({items:a})=>a[0].index),Z())),p=dt(I(m,V(({items:a})=>a.length>0),b(({items:a})=>{let y=0,H=a.length-1;for(;a[y].type==="group"&&yy;)H--;return{startIndex:a[y].index,endIndex:a[H].index}}),Z(Rn)));return{listState:m,topItemsIndexes:h,endReached:w,startReached:O,rangeChanged:p,itemsRendered:d,initialItemCount:v,...S}},J(Ct,yn,Ve,Xt,Jt,Qt,zt,ze),{singleton:!0}),bo=$(([{sizes:t,firstItemIndex:e,data:n,gap:o},{initialTopMostItemIndex:r},{initialItemCount:s,listState:i},{didMount:l}])=>(B(I(l,F(s),V(([,c])=>c!==0),F(r,t,e,o,n),b(([[,c],f,u,g,S,E=[]])=>bn(c,f,u,g,S,E))),i),{}),J(Ct,Xt,Gt,zt),{singleton:!0}),Hn=$(([{scrollVelocity:t}])=>{const e=C(!1),n=D(),o=C(!1);return B(I(t,F(o,e,n),V(([r,s])=>!!s),b(([r,s,i,l])=>{const{exit:c,enter:f}=s;if(i){if(c(r,l))return!1}else if(f(r,l))return!0;return i}),Z()),e),U(I(nt(e,t,n),F(o)),([[r,s,i],l])=>r&&l&&l.change&&l.change(s,i)),{isSeeking:e,scrollSeekConfiguration:o,scrollVelocity:t,scrollSeekRangeChanged:n}},J(Qt),{singleton:!0}),Ho=$(([{topItemsIndexes:t}])=>{const e=C(0);return B(I(e,V(n=>n>0),b(n=>Array.from({length:n}).map((o,r)=>r))),t),{topItemCount:e}},J(Gt)),On=$(([{footerHeight:t,headerHeight:e,fixedHeaderHeight:n,fixedFooterHeight:o},{listState:r}])=>{const s=D(),i=st(I(nt(t,o,e,n,r),b(([l,c,f,u,g])=>l+c+f+u+g.offsetBottom+g.bottom)),0);return B(P(i),s),{totalListHeight:i,totalListHeightChanged:s}},J(it,Gt),{singleton:!0});function Bn(t){let e=!1,n;return()=>(e||(e=!0,n=t()),n)}const Oo=Bn(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),Bo=$(([{scrollBy:t,scrollTop:e,deviation:n,scrollingInProgress:o},{isScrolling:r,isAtBottom:s,scrollDirection:i,lastJumpDueToItemResize:l},{listState:c},{beforeUnshiftWith:f,shiftWithOffset:u,sizes:g,gap:S},{log:E},{recalcInProgress:R}])=>{const h=dt(I(c,F(l),vt(([,d,m,w],[{items:O,totalCount:p,bottom:a,offsetBottom:y},H])=>{const z=a+y;let k=0;return m===p&&d.length>0&&O.length>0&&(O[0].originalIndex===0&&d[0].originalIndex===0||(k=z-w,k!==0&&(k+=H))),[k,O,p,z]},[0,[],0,0]),V(([d])=>d!==0),F(e,i,o,s,E,R),V(([,d,m,w,,,O])=>!O&&!w&&d!==0&&m===Yt),b(([[d],,,,,m])=>(m("Upward scrolling compensation",{amount:d},mt.DEBUG),d))));function v(d){d>0?(G(t,{top:-d,behavior:"auto"}),G(n,0)):(G(n,0),G(t,{top:-d,behavior:"auto"}))}return U(I(h,F(n,r)),([d,m,w])=>{w&&Oo()?G(n,m-d):v(-d)}),U(I(nt(st(r,!1),n,R),V(([d,m,w])=>!d&&!w&&m!==0),b(([d,m])=>m),bt(1)),v),B(I(u,b(d=>({top:-d}))),t),U(I(f,F(g,S),b(([d,{lastSize:m,groupIndices:w,sizeTree:O},p])=>{function a(y){return y*(m+p)}if(w.length===0)return a(d);{let y=0;const H=Kt(O,0);let z=0,k=0;for(;zd&&(y-=H,_=d-z+1),z+=_,y+=a(_),k++}return y}})),d=>{G(n,d),requestAnimationFrame(()=>{G(t,{top:d}),requestAnimationFrame(()=>{G(n,0),G(R,!1)})})}),{deviation:n}},J(it,Qt,Gt,Ct,Bt,ze)),zo=$(([{didMount:t},{scrollTo:e},{listState:n}])=>{const o=C(0);return U(I(t,F(o),V(([,r])=>r!==0),b(([,r])=>({top:r}))),r=>{yt(I(n,At(1),V(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{G(e,r)})})}),{initialScrollTop:o}},J(zt,it,Gt),{singleton:!0}),Lo=$(([{viewportHeight:t},{totalListHeight:e}])=>{const n=C(!1),o=st(I(nt(n,t,e),V(([r])=>r),b(([,r,s])=>Math.max(0,r-s)),bt(0),Z()),0);return{alignToBottom:n,paddingTopAddition:o}},J(it,On),{singleton:!0}),Ge=$(([{scrollTo:t,scrollContainerState:e}])=>{const n=D(),o=D(),r=D(),s=C(!1),i=C(void 0);return B(I(nt(n,o),b(([{viewportHeight:l,scrollTop:c,scrollHeight:f},{offsetTop:u}])=>({scrollTop:Math.max(0,c-u),scrollHeight:f,viewportHeight:l}))),e),B(I(t,F(o),b(([l,{offsetTop:c}])=>({...l,top:l.top+c}))),r),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:o,windowScrollTo:r}},J(it)),ko=({itemTop:t,itemBottom:e,viewportTop:n,viewportBottom:o,locationParams:{behavior:r,align:s,...i}})=>to?{...i,behavior:r,align:s??"end"}:null,Po=$(([{sizes:t,totalCount:e,gap:n},{scrollTop:o,viewportHeight:r,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:l,scrollingInProgress:c},{scrollToIndex:f}])=>{const u=D();return B(I(u,F(t,r,e,s,i,l,o),F(n),b(([[g,S,E,R,h,v,d,m],w])=>{const{done:O,behavior:p,align:a,calculateViewLocation:y=ko,...H}=g,z=vn(g,S,R-1),k=qt(z,S.offsetTree,w)+h+v,_=k+wt(S.sizeTree,z)[1],W=m+v,q=m+E-d,L=y({itemTop:k,itemBottom:_,viewportTop:W,viewportBottom:q,locationParams:{behavior:p,align:a,...H}});return L?O&&yt(I(c,V(M=>M===!1),At(ft(c)?1:2)),O):O&&O(),L}),V(g=>g!==null)),f),{scrollIntoView:u}},J(Ct,it,Jt,Gt,Bt),{singleton:!0}),Vo=$(([{sizes:t,sizeRanges:e},{scrollTop:n},{initialTopMostItemIndex:o},{didMount:r},{useWindowScroll:s,windowScrollContainerState:i,windowViewportRect:l}])=>{const c=D(),f=C(void 0),u=C(null),g=C(null);return B(i,u),B(l,g),U(I(c,F(t,n,s,u,g)),([S,E,R,h,v,d])=>{const m=go(E.sizeTree);h&&v!==null&&d!==null&&(R=v.scrollTop-d.offsetTop),S({ranges:m,scrollTop:R})}),B(I(f,V(He),b(Go)),o),B(I(r,F(f),V(([,S])=>S!==void 0),Z(),b(([,S])=>S.ranges)),e),{getState:c,restoreStateFrom:f}},J(Ct,it,Xt,zt,Ge));function Go(t){return{offset:t.scrollTop,index:0,align:"start"}}const Fo=$(([t,e,n,o,r,s,i,l,c,f])=>({...t,...e,...n,...o,...r,...s,...i,...l,...c,...f}),J(Ve,bo,zt,Hn,On,zo,Lo,Ge,Po,Bt)),_o=$(([{totalCount:t,sizeRanges:e,fixedItemSize:n,defaultItemSize:o,trackItemSizes:r,itemSize:s,data:i,firstItemIndex:l,groupIndices:c,statefulTotalCount:f,gap:u,sizes:g},{initialTopMostItemIndex:S,scrolledToInitialItem:E},R,h,v,{listState:d,topItemsIndexes:m,...w},{scrollToIndex:O},p,{topItemCount:a},{groupCounts:y},H])=>(B(w.rangeChanged,H.scrollSeekRangeChanged),B(I(H.windowViewportRect,b(z=>z.visibleHeight)),R.viewportHeight),{totalCount:t,data:i,firstItemIndex:l,sizeRanges:e,initialTopMostItemIndex:S,scrolledToInitialItem:E,topItemsIndexes:m,topItemCount:a,groupCounts:y,fixedItemHeight:n,defaultItemHeight:o,gap:u,...v,statefulTotalCount:f,listState:d,scrollToIndex:O,trackItemSizes:r,itemSize:s,groupIndices:c,...w,...H,...R,sizes:g,...h}),J(Ct,Xt,it,Vo,Eo,Gt,Jt,Bo,Ho,yn,Fo)),Te="-webkit-sticky",tn="sticky",zn=Bn(()=>{if(typeof document>"u")return tn;const t=document.createElement("div");return t.style.position=Te,t.style.position===Te?Te:tn});function Ln(t,e){const n=x.useRef(null),o=x.useCallback(l=>{if(l===null||!l.offsetParent)return;const c=l.getBoundingClientRect(),f=c.width;let u,g;if(e){const S=e.getBoundingClientRect(),E=c.top-S.top;u=S.height-Math.max(0,E),g=E+e.scrollTop}else u=window.innerHeight-Math.max(0,c.top),g=c.top+window.pageYOffset;n.current={offsetTop:g,visibleHeight:u,visibleWidth:f},t(n.current)},[t,e]),{callbackRef:r,ref:s}=Be(o),i=x.useCallback(()=>{o(s.current)},[o,s]);return x.useEffect(()=>{if(e){e.addEventListener("scroll",i);const l=new ResizeObserver(i);return l.observe(e),()=>{e.removeEventListener("scroll",i),l.unobserve(e)}}else return window.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}},[i,e]),r}const kn=x.createContext(void 0),Pn=x.createContext(void 0);function Vn(t){return t}const Mo=$(()=>{const t=C(c=>`Item ${c}`),e=C(null),n=C(c=>`Group ${c}`),o=C({}),r=C(Vn),s=C("div"),i=C(Wt),l=(c,f=null)=>st(I(o,b(u=>u[c]),Z()),f);return{context:e,itemContent:t,groupContent:n,components:o,computeItemKey:r,headerFooterTag:s,scrollerRef:i,FooterComponent:l("Footer"),HeaderComponent:l("Header"),TopItemListComponent:l("TopItemList"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),GroupComponent:l("Group","div"),ScrollerComponent:l("Scroller","div"),EmptyPlaceholder:l("EmptyPlaceholder"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder")}}),Ao=$(([t,e])=>({...t,...e}),J(_o,Mo)),No=({height:t})=>x.createElement("div",{style:{height:t}}),Wo={position:zn(),zIndex:1,overflowAnchor:"none"},Do={overflowAnchor:"none"},en=x.memo(function({showTopList:e=!1}){const n=N("listState"),o=gt("sizeRanges"),r=N("useWindowScroll"),s=N("customScrollParent"),i=gt("windowScrollContainerState"),l=gt("scrollContainerState"),c=s||r?i:l,f=N("itemContent"),u=N("context"),g=N("groupContent"),S=N("trackItemSizes"),E=N("itemSize"),R=N("log"),h=gt("gap"),{callbackRef:v}=no(o,E,S,e?Wt:c,R,h,s),[d,m]=x.useState(0);Fe("deviation",L=>{d!==L&&m(L)});const w=N("EmptyPlaceholder"),O=N("ScrollSeekPlaceholder")||No,p=N("ListComponent"),a=N("ItemComponent"),y=N("GroupComponent"),H=N("computeItemKey"),z=N("isSeeking"),k=N("groupIndices").length>0,_=N("paddingTopAddition"),W=N("scrolledToInitialItem"),q=e?{}:{boxSizing:"border-box",paddingTop:n.offsetTop+_,paddingBottom:n.offsetBottom,marginTop:d,...W?{}:{visibility:"hidden"}};return!e&&n.totalCount===0&&w?x.createElement(w,ut(w,u)):x.createElement(p,{...ut(p,u),ref:v,style:q,"data-test-id":e?"virtuoso-top-item-list":"virtuoso-item-list"},(e?n.topItems:n.items).map(L=>{const M=L.originalIndex,j=H(M+n.firstItemIndex,L.data,u);return z?x.createElement(O,{...ut(O,u),key:j,index:L.index,height:L.size,type:L.type||"item",...L.type==="group"?{}:{groupIndex:L.groupIndex}}):L.type==="group"?x.createElement(y,{...ut(y,u),key:j,"data-index":M,"data-known-size":L.size,"data-item-index":L.index,style:Wo},g(L.index,u)):x.createElement(a,{...ut(a,u),key:j,"data-index":M,"data-known-size":L.size,"data-item-index":L.index,"data-item-group-index":L.groupIndex,item:L.data,style:Do},k?f(L.index,L.groupIndex,L.data,u):f(L.index,L.data,u))}))}),$o={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},ge={width:"100%",height:"100%",position:"absolute",top:0},Uo={width:"100%",position:zn(),top:0,zIndex:1};function ut(t,e){if(typeof t!="string")return{context:e}}const jo=x.memo(function(){const e=N("HeaderComponent"),n=gt("headerHeight"),o=N("headerFooterTag"),r=Vt(i=>n(Ht(i,"height"))),s=N("context");return e?x.createElement(o,{ref:r},x.createElement(e,ut(e,s))):null}),Ko=x.memo(function(){const e=N("FooterComponent"),n=gt("footerHeight"),o=N("headerFooterTag"),r=Vt(i=>n(Ht(i,"height"))),s=N("context");return e?x.createElement(o,{ref:r},x.createElement(e,ut(e,s))):null});function Gn({usePublisher:t,useEmitter:e,useEmitterValue:n}){return x.memo(function({style:s,children:i,...l}){const c=t("scrollContainerState"),f=n("ScrollerComponent"),u=t("smoothScrollTargetReached"),g=n("scrollerRef"),S=n("context"),{scrollerRef:E,scrollByCallback:R,scrollToCallback:h}=pn(c,u,f,g);return e("scrollTo",h),e("scrollBy",R),x.createElement(f,{ref:E,style:{...$o,...s},"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...l,...ut(f,S)},i)})}function Fn({usePublisher:t,useEmitter:e,useEmitterValue:n}){return x.memo(function({style:s,children:i,...l}){const c=t("windowScrollContainerState"),f=n("ScrollerComponent"),u=t("smoothScrollTargetReached"),g=n("totalListHeight"),S=n("deviation"),E=n("customScrollParent"),R=n("context"),{scrollerRef:h,scrollByCallback:v,scrollToCallback:d}=pn(c,u,f,Wt,E);return Xn(()=>(h.current=E||window,()=>{h.current=null}),[h,E]),e("windowScrollTo",d),e("scrollBy",v),x.createElement(f,{style:{position:"relative",...s,...g!==0?{height:g+S}:{}},"data-virtuoso-scroller":!0,...l,...ut(f,R)},i)})}const qo=({children:t})=>{const e=x.useContext(kn),n=gt("viewportHeight"),o=gt("fixedItemHeight"),r=Vt(an(n,s=>Ht(s,"height")));return x.useEffect(()=>{e&&(n(e.viewportHeight),o(e.itemHeight))},[e,n,o]),x.createElement("div",{style:ge,ref:r,"data-viewport-type":"element"},t)},Yo=({children:t})=>{const e=x.useContext(kn),n=gt("windowViewportRect"),o=gt("fixedItemHeight"),r=N("customScrollParent"),s=Ln(n,r);return x.useEffect(()=>{e&&(o(e.itemHeight),n({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:100}))},[e,n,o]),x.createElement("div",{ref:s,style:ge,"data-viewport-type":"window"},t)},Zo=({children:t})=>{const e=N("TopItemListComponent"),n=N("headerHeight"),o={...Uo,marginTop:`${n}px`},r=N("context");return x.createElement(e||"div",{style:o,context:r},t)},Jo=x.memo(function(e){const n=N("useWindowScroll"),o=N("topItemsIndexes").length>0,r=N("customScrollParent"),s=r||n?tr:Xo,i=r||n?Yo:qo;return x.createElement(s,{...e},o&&x.createElement(Zo,null,x.createElement(en,{showTopList:!0})),x.createElement(i,null,x.createElement(jo,null),x.createElement(en,null),x.createElement(Ko,null)))}),{Component:Qo,usePublisher:gt,useEmitterValue:N,useEmitter:Fe}=mn(Ao,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},Jo),Xo=Gn({usePublisher:gt,useEmitterValue:N,useEmitter:Fe}),tr=Fn({usePublisher:gt,useEmitterValue:N,useEmitter:Fe}),Sr=Qo,nn={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},er={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:on,ceil:rn,floor:fe,min:ve,max:Ut}=Math;function nr(t){return{...er,items:t}}function sn(t,e,n){return Array.from({length:e-t+1}).map((o,r)=>{const s=n===null?null:n[r+t];return{index:r+t,data:s}})}function or(t,e){return t&&t.column===e.column&&t.row===e.row}function se(t,e){return t&&t.width===e.width&&t.height===e.height}const rr=$(([{overscan:t,visibleRange:e,listBoundary:n},{scrollTop:o,viewportHeight:r,scrollBy:s,scrollTo:i,smoothScrollTargetReached:l,scrollContainerState:c,footerHeight:f,headerHeight:u},g,S,{propsReady:E,didMount:R},{windowViewportRect:h,useWindowScroll:v,customScrollParent:d,windowScrollContainerState:m,windowScrollTo:w},O])=>{const p=C(0),a=C(0),y=C(nn),H=C({height:0,width:0}),z=C({height:0,width:0}),k=D(),_=D(),W=C(0),q=C(null),L=C({row:0,column:0}),M=D(),j=D(),rt=C(!1),ht=C(0),lt=C(!0),ct=C(!1);U(I(R,F(ht),V(([T,A])=>!!A)),()=>{G(lt,!1),G(a,0)}),U(I(nt(R,lt,z,H,ht,ct),V(([T,A,Y,X,,ot])=>T&&!A&&Y.height!==0&&X.height!==0&&!ot)),([,,,,T])=>{G(ct,!0),ke(1,()=>{G(k,T)}),yt(I(o),()=>{G(n,[0,0]),G(lt,!0)})}),B(I(j,V(T=>T!=null&&T.scrollTop>0),Et(0)),a),U(I(R,F(j),V(([,T])=>T!=null)),([,T])=>{T&&(G(H,T.viewport),G(z,T==null?void 0:T.item),G(L,T.gap),T.scrollTop>0&&(G(rt,!0),yt(I(o,At(1)),A=>{G(rt,!1)}),G(i,{top:T.scrollTop})))}),B(I(H,b(({height:T})=>T)),r),B(I(nt(P(H,se),P(z,se),P(L,(T,A)=>T&&T.column===A.column&&T.row===A.row),P(o)),b(([T,A,Y,X])=>({viewport:T,item:A,gap:Y,scrollTop:X}))),M),B(I(nt(P(p),e,P(L,or),P(z,se),P(H,se),P(q),P(a),P(rt),P(lt),P(ht)),V(([,,,,,,,T])=>!T),b(([T,[A,Y],X,ot,St,et,Ft,,ee,Rt])=>{const{row:pt,column:An}=X,{height:ne,width:Ie}=ot,{width:_e}=St;if(Ft===0&&(T===0||_e===0))return nn;if(Ie===0){const Se=Pe(Rt,T),Wn=Se===0?Math.max(Ft-1,0):Se;return nr(sn(Se,Wn,et))}const oe=_n(_e,Ie,An);let _t,kt;ee?A===0&&Y===0&&Ft>0?(_t=0,kt=Ft-1):(_t=oe*fe((A+pt)/(ne+pt)),kt=oe*rn((Y+pt)/(ne+pt))-1,kt=ve(T-1,Ut(kt,oe-1)),_t=ve(kt,Ut(0,_t))):(_t=0,kt=-1);const Me=sn(_t,kt,et),{top:Ae,bottom:Ne}=ln(St,X,ot,Me),We=rn(T/oe),Nn=We*ne+(We-1)*pt-Ne;return{items:Me,offsetTop:Ae,offsetBottom:Nn,top:Ae,bottom:Ne,itemHeight:ne,itemWidth:Ie}})),y),B(I(q,V(T=>T!==null),b(T=>T.length)),p),B(I(nt(H,z,y,L),V(([T,A,{items:Y}])=>Y.length>0&&A.height!==0&&T.height!==0),b(([T,A,{items:Y},X])=>{const{top:ot,bottom:St}=ln(T,X,A,Y);return[ot,St]}),Z(Zt)),n);const It=C(!1);B(I(o,F(It),b(([T,A])=>A||T!==0)),It);const Tt=dt(I(P(y),V(({items:T})=>T.length>0),F(p,It),V(([{items:T},A,Y])=>Y&&T[T.length-1].index===A-1),b(([,T])=>T-1),Z())),Dt=dt(I(P(y),V(({items:T})=>T.length>0&&T[0].index===0),Et(0),Z())),te=dt(I(P(y),F(rt),V(([{items:T},A])=>T.length>0&&!A),b(([{items:T}])=>({startIndex:T[0].index,endIndex:T[T.length-1].index})),Z(Rn),bt(0)));B(te,S.scrollSeekRangeChanged),B(I(k,F(H,z,p,L),b(([T,A,Y,X,ot])=>{const St=En(T),{align:et,behavior:Ft,offset:ee}=St;let Rt=St.index;Rt==="LAST"&&(Rt=X-1),Rt=Ut(0,Rt,ve(X-1,Rt));let pt=be(A,ot,Y,Rt);return et==="end"?pt=on(pt-A.height+Y.height):et==="center"&&(pt=on(pt-A.height/2+Y.height/2)),ee&&(pt+=ee),{top:pt,behavior:Ft}})),i);const Lt=st(I(y,b(T=>T.offsetBottom+T.bottom)),0);return B(I(h,b(T=>({width:T.visibleWidth,height:T.visibleHeight}))),H),{data:q,totalCount:p,viewportDimensions:H,itemDimensions:z,scrollTop:o,scrollHeight:_,overscan:t,scrollBy:s,scrollTo:i,scrollToIndex:k,smoothScrollTargetReached:l,windowViewportRect:h,windowScrollTo:w,useWindowScroll:v,customScrollParent:d,windowScrollContainerState:m,deviation:W,scrollContainerState:c,footerHeight:f,headerHeight:u,initialItemCount:a,gap:L,restoreStateFrom:j,...S,initialTopMostItemIndex:ht,gridState:y,totalListHeight:Lt,...g,startReached:Dt,endReached:Tt,rangeChanged:te,stateChanged:M,propsReady:E,stateRestoreInProgress:rt,...O}},J(Ve,it,Qt,Hn,zt,Ge,Bt));function ln(t,e,n,o){const{height:r}=n;if(r===void 0||o.length===0)return{top:0,bottom:0};const s=be(t,e,n,o[0].index),i=be(t,e,n,o[o.length-1].index)+r;return{top:s,bottom:i}}function be(t,e,n,o){const r=_n(t.width,n.width,e.column),s=fe(o/r),i=s*n.height+Ut(0,s-1)*e.row;return i>0?i+e.row:i}function _n(t,e,n){return Ut(1,fe((t+n)/(fe(e)+n)))}const sr=$(()=>{const t=C(f=>`Item ${f}`),e=C({}),n=C(null),o=C("virtuoso-grid-item"),r=C("virtuoso-grid-list"),s=C(Vn),i=C("div"),l=C(Wt),c=(f,u=null)=>st(I(e,b(g=>g[f]),Z()),u);return{context:n,itemContent:t,components:e,computeItemKey:s,itemClassName:o,listClassName:r,headerFooterTag:i,scrollerRef:l,FooterComponent:c("Footer"),HeaderComponent:c("Header"),ListComponent:c("List","div"),ItemComponent:c("Item","div"),ScrollerComponent:c("Scroller","div"),ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),ir=$(([t,e])=>({...t,...e}),J(rr,sr)),lr=x.memo(function(){const e=Q("gridState"),n=Q("listClassName"),o=Q("itemClassName"),r=Q("itemContent"),s=Q("computeItemKey"),i=Q("isSeeking"),l=xt("scrollHeight"),c=Q("ItemComponent"),f=Q("ListComponent"),u=Q("ScrollSeekPlaceholder"),g=Q("context"),S=xt("itemDimensions"),E=xt("gap"),R=Q("log"),h=Q("stateRestoreInProgress"),v=Vt(d=>{const m=d.parentElement.parentElement.scrollHeight;l(m);const w=d.firstChild;if(w){const{width:O,height:p}=w.getBoundingClientRect();S({width:O,height:p})}E({row:cn("row-gap",getComputedStyle(d).rowGap,R),column:cn("column-gap",getComputedStyle(d).columnGap,R)})});return h?null:x.createElement(f,{ref:v,className:n,...ut(f,g),style:{paddingTop:e.offsetTop,paddingBottom:e.offsetBottom},"data-test-id":"virtuoso-item-list"},e.items.map(d=>{const m=s(d.index,d.data,g);return i?x.createElement(u,{key:m,...ut(u,g),index:d.index,height:e.itemHeight,width:e.itemWidth}):x.createElement(c,{...ut(c,g),className:o,"data-index":d.index,key:m},r(d.index,d.data,g))}))}),cr=x.memo(function(){const e=Q("HeaderComponent"),n=xt("headerHeight"),o=Q("headerFooterTag"),r=Vt(i=>n(Ht(i,"height"))),s=Q("context");return e?x.createElement(o,{ref:r},x.createElement(e,ut(e,s))):null}),ur=x.memo(function(){const e=Q("FooterComponent"),n=xt("footerHeight"),o=Q("headerFooterTag"),r=Vt(i=>n(Ht(i,"height"))),s=Q("context");return e?x.createElement(o,{ref:r},x.createElement(e,ut(e,s))):null}),ar=({children:t})=>{const e=x.useContext(Pn),n=xt("itemDimensions"),o=xt("viewportDimensions"),r=Vt(s=>{o(s.getBoundingClientRect())});return x.useEffect(()=>{e&&(o({height:e.viewportHeight,width:e.viewportWidth}),n({height:e.itemHeight,width:e.itemWidth}))},[e,o,n]),x.createElement("div",{style:ge,ref:r},t)},fr=({children:t})=>{const e=x.useContext(Pn),n=xt("windowViewportRect"),o=xt("itemDimensions"),r=Q("customScrollParent"),s=Ln(n,r);return x.useEffect(()=>{e&&(o({height:e.itemHeight,width:e.itemWidth}),n({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:e.viewportWidth}))},[e,n,o]),x.createElement("div",{ref:s,style:ge},t)},dr=x.memo(function({...e}){const n=Q("useWindowScroll"),o=Q("customScrollParent"),r=o||n?pr:hr,s=o||n?fr:ar;return x.createElement(r,{...e},x.createElement(s,null,x.createElement(cr,null),x.createElement(lr,null),x.createElement(ur,null)))}),{Component:mr,usePublisher:xt,useEmitterValue:Q,useEmitter:Mn}=mn(ir,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},dr),hr=Gn({usePublisher:xt,useEmitterValue:Q,useEmitter:Mn}),pr=Fn({usePublisher:xt,useEmitterValue:Q,useEmitter:Mn});function cn(t,e,n){return e!=="normal"&&!(e!=null&&e.endsWith("px"))&&n(`${t} was not resolved to pixel value correctly`,e,mt.WARN),e==="normal"?0:parseInt(e??"0",10)}const xr=mr;export{Sr as V,xr as a}; diff --git a/packs/js/index-5fa99826.js b/packs/js/index-89c90e00.js similarity index 57% rename from packs/js/index-5fa99826.js rename to packs/js/index-89c90e00.js index 5970efe64..64378b701 100644 --- a/packs/js/index-5fa99826.js +++ b/packs/js/index-89c90e00.js @@ -1,3 +1,3 @@ -import{d as n,j8 as c,jb as i,a as p,aN as u}from"../index-7380452a.js";var f=function(){var t=n(),r=c(),o=r.search,a=new URLSearchParams(o),e=[a.get("title"),a.get("text"),a.get("url")].filter(function(s){return s}).join(` +import{d as n,j8 as c,jb as i,a as p,aN as u}from"../index-be605fd2.js";var f=function(){var t=n(),r=c(),o=r.search,a=new URLSearchParams(o),e=[a.get("title"),a.get("text"),a.get("url")].filter(function(s){return s}).join(` `);return e&&t(i("compose-modal",e)),p(u,{to:"/"})};export{f as default}; diff --git a/packs/js/index-3011f076.js b/packs/js/index-9628cdd2.js similarity index 96% rename from packs/js/index-3011f076.js rename to packs/js/index-9628cdd2.js index 5dfacfc12..de08ad3ea 100644 --- a/packs/js/index-3011f076.js +++ b/packs/js/index-9628cdd2.js @@ -1 +1 @@ -import{b8 as p,u as v,a as e,ag as i,ah as y,af as g,o as b,d as A,q as E,g as k,r as w,eZ as C,a$ as D,eL as r,cy as l,a_ as c,R as o,F as x,e_ as P,y as F,X as S}from"../index-7380452a.js";import{u as I}from"./accounts-1cafdbcf.js";var O=b({label:{id:"settings.messages.label",defaultMessage:"Allow users to start a new chat with you"}}),R=function(){var n,a=p(),u=a.account,t=v(),f=I(),d=function(m){f.mutate({accepts_chat_messages:m.target.checked})};return u?e(g,{},void 0,e(i,{label:t.formatMessage(O.label)},void 0,e(y,{checked:(n=u.pleroma)===null||n===void 0?void 0:n.accepts_chat_messages,onChange:d}))):null},s=b({accountAliases:{id:"navigation_bar.account_aliases",defaultMessage:"Account aliases"},accountMigration:{id:"settings.account_migration",defaultMessage:"Move Account"},backups:{id:"column.backups",defaultMessage:"Backups"},blocks:{id:"settings.blocks",defaultMessage:"Blocks"},changeEmail:{id:"settings.change_email",defaultMessage:"Change Email"},changePassword:{id:"settings.change_password",defaultMessage:"Change Password"},configureMfa:{id:"settings.configure_mfa",defaultMessage:"Configure MFA"},deleteAccount:{id:"settings.delete_account",defaultMessage:"Delete Account"},editProfile:{id:"settings.edit_profile",defaultMessage:"Edit Profile"},exportData:{id:"column.export_data",defaultMessage:"Export data"},importData:{id:"navigation_bar.import_data",defaultMessage:"Import data"},mfaDisabled:{id:"mfa.disabled",defaultMessage:"Disabled"},mfaEnabled:{id:"mfa.enabled",defaultMessage:"Enabled"},mutes:{id:"settings.mutes",defaultMessage:"Mutes"},other:{id:"settings.other",defaultMessage:"Other options"},preferences:{id:"settings.preferences",defaultMessage:"Preferences"},privacy:{id:"settings.privacy",defaultMessage:"Privacy"},profile:{id:"settings.profile",defaultMessage:"Profile"},security:{id:"settings.security",defaultMessage:"Security"},sessions:{id:"settings.sessions",defaultMessage:"Active sessions"},settings:{id:"settings.settings",defaultMessage:"Settings"}}),N=function(){var n=A(),a=v(),u=E(function(_){return _.security.get("mfa")}),t=k(),f=p(),d=f.account,M=u.getIn(["settings","totp"]);if(w.useEffect(function(){t.security&&n(C())},[n]),!d)return null;var m=d.display_name||d.username;return e(S,{label:a.formatMessage(s.settings),transparent:!0,withHeader:!1},void 0,e(D,{className:"space-y-4",variant:"rounded"},void 0,e(r,{},void 0,e(l,{title:a.formatMessage(s.profile)})),e(c,{},void 0,e(g,{},void 0,e(i,{label:a.formatMessage(s.editProfile),to:"/settings/profile"},void 0,e("span",{className:"max-w-full truncate"},void 0,m)))),e(r,{},void 0,e(l,{title:a.formatMessage(s.privacy)})),e(c,{},void 0,e(g,{},void 0,e(i,{label:a.formatMessage(s.mutes),to:"/mutes"}),e(i,{label:a.formatMessage(s.blocks),to:"/blocks"}))),(t.security||t.sessions)&&o.createElement(o.Fragment,null,e(r,{},void 0,e(l,{title:a.formatMessage(s.security)})),e(c,{},void 0,e(g,{},void 0,t.security&&o.createElement(o.Fragment,null,e(i,{label:a.formatMessage(s.changeEmail),to:"/settings/email"}),e(i,{label:a.formatMessage(s.changePassword),to:"/settings/password"}),e(i,{label:a.formatMessage(s.configureMfa),to:"/settings/mfa"},void 0,e("span",{},void 0,M?a.formatMessage(s.mfaEnabled):a.formatMessage(s.mfaDisabled)))),t.sessions&&e(i,{label:a.formatMessage(s.sessions),to:"/settings/tokens"})))),t.chats?o.createElement(o.Fragment,null,e(r,{},void 0,e(l,{title:e(x,{id:"column.chats",defaultMessage:"Chats"})})),e(c,{},void 0,e(R,{}))):null,e(r,{},void 0,e(l,{title:a.formatMessage(s.preferences)})),e(c,{},void 0,e(P,{})),(t.security||t.accountAliases)&&o.createElement(o.Fragment,null,e(r,{},void 0,e(l,{title:a.formatMessage(s.other)})),e(c,{},void 0,e(g,{},void 0,t.importData&&e(i,{label:a.formatMessage(s.importData),to:"/settings/import"}),t.exportData&&e(i,{label:a.formatMessage(s.exportData),to:"/settings/export"}),t.backups&&e(i,{label:a.formatMessage(s.backups),to:"/settings/backups"}),t.federating&&(t.accountMoving?e(i,{label:a.formatMessage(s.accountMigration),to:"/settings/migrations"}):t.accountAliases&&e(i,{label:a.formatMessage(s.accountAliases),to:"/settings/aliases"})),t.security&&e(i,{label:e(F,{theme:"danger"},void 0,a.formatMessage(s.deleteAccount)),to:"/settings/account"}))))))};export{N as default}; +import{b8 as p,u as v,a as e,ag as i,ah as y,af as g,o as b,d as A,q as E,g as k,r as w,eZ as C,a$ as D,eL as r,cy as l,a_ as c,R as o,F as x,e_ as P,y as F,X as S}from"../index-be605fd2.js";import{u as I}from"./accounts-2089f869.js";var O=b({label:{id:"settings.messages.label",defaultMessage:"Allow users to start a new chat with you"}}),R=function(){var n,a=p(),u=a.account,t=v(),f=I(),d=function(m){f.mutate({accepts_chat_messages:m.target.checked})};return u?e(g,{},void 0,e(i,{label:t.formatMessage(O.label)},void 0,e(y,{checked:(n=u.pleroma)===null||n===void 0?void 0:n.accepts_chat_messages,onChange:d}))):null},s=b({accountAliases:{id:"navigation_bar.account_aliases",defaultMessage:"Account aliases"},accountMigration:{id:"settings.account_migration",defaultMessage:"Move Account"},backups:{id:"column.backups",defaultMessage:"Backups"},blocks:{id:"settings.blocks",defaultMessage:"Blocks"},changeEmail:{id:"settings.change_email",defaultMessage:"Change Email"},changePassword:{id:"settings.change_password",defaultMessage:"Change Password"},configureMfa:{id:"settings.configure_mfa",defaultMessage:"Configure MFA"},deleteAccount:{id:"settings.delete_account",defaultMessage:"Delete Account"},editProfile:{id:"settings.edit_profile",defaultMessage:"Edit Profile"},exportData:{id:"column.export_data",defaultMessage:"Export data"},importData:{id:"navigation_bar.import_data",defaultMessage:"Import data"},mfaDisabled:{id:"mfa.disabled",defaultMessage:"Disabled"},mfaEnabled:{id:"mfa.enabled",defaultMessage:"Enabled"},mutes:{id:"settings.mutes",defaultMessage:"Mutes"},other:{id:"settings.other",defaultMessage:"Other options"},preferences:{id:"settings.preferences",defaultMessage:"Preferences"},privacy:{id:"settings.privacy",defaultMessage:"Privacy"},profile:{id:"settings.profile",defaultMessage:"Profile"},security:{id:"settings.security",defaultMessage:"Security"},sessions:{id:"settings.sessions",defaultMessage:"Active sessions"},settings:{id:"settings.settings",defaultMessage:"Settings"}}),N=function(){var n=A(),a=v(),u=E(function(_){return _.security.get("mfa")}),t=k(),f=p(),d=f.account,M=u.getIn(["settings","totp"]);if(w.useEffect(function(){t.security&&n(C())},[n]),!d)return null;var m=d.display_name||d.username;return e(S,{label:a.formatMessage(s.settings),transparent:!0,withHeader:!1},void 0,e(D,{className:"space-y-4",variant:"rounded"},void 0,e(r,{},void 0,e(l,{title:a.formatMessage(s.profile)})),e(c,{},void 0,e(g,{},void 0,e(i,{label:a.formatMessage(s.editProfile),to:"/settings/profile"},void 0,e("span",{className:"max-w-full truncate"},void 0,m)))),e(r,{},void 0,e(l,{title:a.formatMessage(s.privacy)})),e(c,{},void 0,e(g,{},void 0,e(i,{label:a.formatMessage(s.mutes),to:"/mutes"}),e(i,{label:a.formatMessage(s.blocks),to:"/blocks"}))),(t.security||t.sessions)&&o.createElement(o.Fragment,null,e(r,{},void 0,e(l,{title:a.formatMessage(s.security)})),e(c,{},void 0,e(g,{},void 0,t.security&&o.createElement(o.Fragment,null,e(i,{label:a.formatMessage(s.changeEmail),to:"/settings/email"}),e(i,{label:a.formatMessage(s.changePassword),to:"/settings/password"}),e(i,{label:a.formatMessage(s.configureMfa),to:"/settings/mfa"},void 0,e("span",{},void 0,M?a.formatMessage(s.mfaEnabled):a.formatMessage(s.mfaDisabled)))),t.sessions&&e(i,{label:a.formatMessage(s.sessions),to:"/settings/tokens"})))),t.chats?o.createElement(o.Fragment,null,e(r,{},void 0,e(l,{title:e(x,{id:"column.chats",defaultMessage:"Chats"})})),e(c,{},void 0,e(R,{}))):null,e(r,{},void 0,e(l,{title:a.formatMessage(s.preferences)})),e(c,{},void 0,e(P,{})),(t.security||t.accountAliases)&&o.createElement(o.Fragment,null,e(r,{},void 0,e(l,{title:a.formatMessage(s.other)})),e(c,{},void 0,e(g,{},void 0,t.importData&&e(i,{label:a.formatMessage(s.importData),to:"/settings/import"}),t.exportData&&e(i,{label:a.formatMessage(s.exportData),to:"/settings/export"}),t.backups&&e(i,{label:a.formatMessage(s.backups),to:"/settings/backups"}),t.federating&&(t.accountMoving?e(i,{label:a.formatMessage(s.accountMigration),to:"/settings/migrations"}):t.accountAliases&&e(i,{label:a.formatMessage(s.accountAliases),to:"/settings/aliases"})),t.security&&e(i,{label:e(F,{theme:"danger"},void 0,a.formatMessage(s.deleteAccount)),to:"/settings/account"}))))))};export{N as default}; diff --git a/packs/js/index-dae99015.js b/packs/js/index-96c112b4.js similarity index 88% rename from packs/js/index-dae99015.js rename to packs/js/index-96c112b4.js index 54330ff00..24f0b6fd0 100644 --- a/packs/js/index-dae99015.js +++ b/packs/js/index-96c112b4.js @@ -1 +1 @@ -import{d as g,a7 as w,q as h,am as D,a as c,an as x,r as S,Q as k,ao as y,R as L,F as U,u as A,ap as R,aq as b,X as H,o as E,al as _}from"../index-7380452a.js";import{u as q,A as F}from"./account-search-61b68090.js";import{S as P}from"./scrollable-list-df58e451.js";import{S as T}from"./status-container-59e57baf.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var z=function(t){var n=t.conversationId,r=t.onMoveUp,u=t.onMoveDown,d=g(),m=w(),l=h(function(s){var i=s.conversations.items.find(function(M){return M.id===n});return{accounts:i.accounts.map(function(M){return D(s,M)}),unread:i.unread,lastStatusId:i.last_status||null}}),p=l.accounts,v=l.unread,f=l.lastStatusId,e=function(){v&&d(x(n)),m.push("/statuses/".concat(f))},a=function(){r(n)},o=function(){u(n)};return f===null?null:c(T,{id:f,unread:v,otherAccounts:p,onMoveUp:a,onMoveDown:o,onClick:e})},B=function(){var t=g(),n=S.useRef(null),r=h(function(e){return e.conversations.items}),u=h(function(e){return e.conversations.isLoading}),d=h(function(e){return e.conversations.hasMore}),m=function(a){return r.findIndex(function(o){return o.id===a})},l=function(a){var o=m(a)-1;v(o)},p=function(a){var o=m(a)+1;v(o)},v=function(a){var o;(o=n.current)===null||o===void 0||o.scrollIntoView({index:a,behavior:"smooth",done:function(){var i=document.querySelector('#direct-list [data-index="'.concat(a,'"] .focusable'));i&&i.focus()}})},f=k(function(){var e=r.getIn([-1,"id"]);e&&t(y({maxId:e}))},300,{leading:!0});return L.createElement(P,{hasMore:d,onLoadMore:f,id:"direct-list",scrollKey:"direct",ref:n,isLoading:u,showLoading:u&&r.size===0,emptyMessage:c(U,{id:"empty_column.direct",defaultMessage:"You don't have any direct messages yet. When you send or receive one, it will show up here."})},r.map(function(e){return c(z,{conversationId:e.id,onMoveUp:l,onMoveDown:p},e.id)}))},I=E({title:{id:"column.direct",defaultMessage:"Direct messages"},searchPlaceholder:{id:"direct.search_placeholder",defaultMessage:"Send a message to…"}}),Y=function(){var t=A(),n=g();q(),S.useEffect(function(){return n(R()),n(y()),function(){n(b())}},[]);var r=function(d){n(_(d))};return c(H,{label:t.formatMessage(I.title)},void 0,c(F,{placeholder:t.formatMessage(I.searchPlaceholder),onSelected:r}),c(B,{}))};export{Y as default}; +import{d as g,a7 as w,q as h,am as D,a as c,an as x,r as S,Q as k,ao as y,R as L,F as U,u as A,ap as R,aq as b,X as H,o as E,al as _}from"../index-be605fd2.js";import{u as q,A as F}from"./account-search-46dd7dbb.js";import{S as P}from"./scrollable-list-1e43c72d.js";import{S as T}from"./status-container-e53698d2.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var z=function(t){var n=t.conversationId,r=t.onMoveUp,u=t.onMoveDown,d=g(),m=w(),l=h(function(s){var i=s.conversations.items.find(function(M){return M.id===n});return{accounts:i.accounts.map(function(M){return D(s,M)}),unread:i.unread,lastStatusId:i.last_status||null}}),p=l.accounts,v=l.unread,f=l.lastStatusId,e=function(){v&&d(x(n)),m.push("/statuses/".concat(f))},a=function(){r(n)},o=function(){u(n)};return f===null?null:c(T,{id:f,unread:v,otherAccounts:p,onMoveUp:a,onMoveDown:o,onClick:e})},B=function(){var t=g(),n=S.useRef(null),r=h(function(e){return e.conversations.items}),u=h(function(e){return e.conversations.isLoading}),d=h(function(e){return e.conversations.hasMore}),m=function(a){return r.findIndex(function(o){return o.id===a})},l=function(a){var o=m(a)-1;v(o)},p=function(a){var o=m(a)+1;v(o)},v=function(a){var o;(o=n.current)===null||o===void 0||o.scrollIntoView({index:a,behavior:"smooth",done:function(){var i=document.querySelector('#direct-list [data-index="'.concat(a,'"] .focusable'));i&&i.focus()}})},f=k(function(){var e=r.getIn([-1,"id"]);e&&t(y({maxId:e}))},300,{leading:!0});return L.createElement(P,{hasMore:d,onLoadMore:f,id:"direct-list",scrollKey:"direct",ref:n,isLoading:u,showLoading:u&&r.size===0,emptyMessage:c(U,{id:"empty_column.direct",defaultMessage:"You don't have any direct messages yet. When you send or receive one, it will show up here."})},r.map(function(e){return c(z,{conversationId:e.id,onMoveUp:l,onMoveDown:p},e.id)}))},I=E({title:{id:"column.direct",defaultMessage:"Direct messages"},searchPlaceholder:{id:"direct.search_placeholder",defaultMessage:"Send a message to…"}}),Y=function(){var t=A(),n=g();q(),S.useEffect(function(){return n(R()),n(y()),function(){n(b())}},[]);var r=function(d){n(_(d))};return c(H,{label:t.formatMessage(I.title)},void 0,c(F,{placeholder:t.formatMessage(I.searchPlaceholder),onSelected:r}),c(B,{}))};export{Y as default}; diff --git a/packs/js/index-de5510c5.js b/packs/js/index-9c870042.js similarity index 70% rename from packs/js/index-de5510c5.js rename to packs/js/index-9c870042.js index 328e6d0e2..2a79afd56 100644 --- a/packs/js/index-de5510c5.js +++ b/packs/js/index-9c870042.js @@ -1 +1 @@ -import{a3 as _,a7 as y,d as M,f as T,q as x,r as C,a8 as d,a as t,X as R,H as I,a9 as $,a5 as k,y as H,F as u}from"../index-7380452a.js";import{T as S}from"./timeline-585cfcf0.js";import{P as w}from"./pinned-hosts-picker-5815755c.js";import"./scroll-top-button-95820d24.js";import"./status-list-13fdd81b.js";import"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";import"./status-container-59e57baf.js";import"./pending-status-7f660229.js";import"./poll-preview-66340c9e.js";import"./noop-19c18e1e.js";function P({instance:n,onlyMedia:o}){return _(`remote${o?":media":""}:${n}`,`public:remote${o?":media":""}&instance=${n}`)}var j=function(o){var s=o.params,p=y(),m=M(),e=s==null?void 0:s.instance,l=T(),c="remote",a=!!l.getIn(["remote","other","onlyMedia"]),v=x(function(r){var i;return(i=r.timelines.get("remote"))===null||i===void 0?void 0:i.next}),f=l.getIn(["remote_timeline","pinnedHosts"]).includes(e),h=function(){p.push("/timeline/fediverse")},g=function(i){m(d(e,{url:v,maxId:i,onlyMedia:a}))};return P({instance:e,onlyMedia:a}),C.useEffect(function(){m(d(e,{onlyMedia:a,maxId:void 0}))},[a]),t(R,{label:e,transparent:!0},void 0,e&&t(w,{host:e}),!f&&t(I,{className:"mb-4 px-2",space:2},void 0,t($,{iconClassName:"h-5 w-5",src:k,onClick:h}),t(H,{},void 0,t(u,{id:"remote_timeline.filter_message",defaultMessage:"You are viewing the timeline of {instance}.",values:{instance:e}}))),t(S,{scrollKey:"".concat(c,"_").concat(e,"_timeline"),timelineId:"".concat(c).concat(a?":media":"",":").concat(e),onLoadMore:g,emptyMessage:t(u,{id:"empty_column.remote",defaultMessage:"There is nothing here! Manually follow users from {instance} to fill it up.",values:{instance:e}}),divideType:"space"}))};export{j as default}; +import{a3 as _,a7 as y,d as M,f as T,q as x,r as C,a8 as d,a as t,X as R,H as I,a9 as $,a5 as k,y as H,F as u}from"../index-be605fd2.js";import{T as S}from"./timeline-456dace7.js";import{P as w}from"./pinned-hosts-picker-55861ba6.js";import"./scroll-top-button-73ec9889.js";import"./status-list-c10445e1.js";import"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";import"./status-container-e53698d2.js";import"./pending-status-959f7aeb.js";import"./poll-preview-ddaf662b.js";import"./noop-3f99ae3e.js";function P({instance:n,onlyMedia:o}){return _(`remote${o?":media":""}:${n}`,`public:remote${o?":media":""}&instance=${n}`)}var j=function(o){var s=o.params,p=y(),m=M(),e=s==null?void 0:s.instance,l=T(),c="remote",a=!!l.getIn(["remote","other","onlyMedia"]),v=x(function(r){var i;return(i=r.timelines.get("remote"))===null||i===void 0?void 0:i.next}),f=l.getIn(["remote_timeline","pinnedHosts"]).includes(e),h=function(){p.push("/timeline/fediverse")},g=function(i){m(d(e,{url:v,maxId:i,onlyMedia:a}))};return P({instance:e,onlyMedia:a}),C.useEffect(function(){m(d(e,{onlyMedia:a,maxId:void 0}))},[a]),t(R,{label:e,transparent:!0},void 0,e&&t(w,{host:e}),!f&&t(I,{className:"mb-4 px-2",space:2},void 0,t($,{iconClassName:"h-5 w-5",src:k,onClick:h}),t(H,{},void 0,t(u,{id:"remote_timeline.filter_message",defaultMessage:"You are viewing the timeline of {instance}.",values:{instance:e}}))),t(S,{scrollKey:"".concat(c,"_").concat(e,"_timeline"),timelineId:"".concat(c).concat(a?":media":"",":").concat(e),onLoadMore:g,emptyMessage:t(u,{id:"empty_column.remote",defaultMessage:"There is nothing here! Manually follow users from {instance} to fill it up.",values:{instance:e}}),divideType:"space"}))};export{j as default}; diff --git a/packs/js/index-fa21c2a3.js b/packs/js/index-a35ea6ff.js similarity index 96% rename from packs/js/index-fa21c2a3.js rename to packs/js/index-a35ea6ff.js index fe6080c22..1e3b731a4 100644 --- a/packs/js/index-fa21c2a3.js +++ b/packs/js/index-a35ea6ff.js @@ -1 +1 @@ -import{R,a as e,P as W,H as ee,b as re,c as le,u as K,d as te,f as ae,g as ce,v as ie,I as y,i as Y,k as G,l as oe,m as ne,n as D,T as ue,o as O,s as de,r as h,p as fe,q as k,t as me,w as g,x as A,F as Q,y as ve,L as pe,z as ge,E as he,A as _e,S as Me,B,C as ye,D as be,G as we,J as Ne,K as J,M as qe,N as $,O as xe,Q as H,U as X,V as S,W as ke,X as Re,Y as je}from"../index-7380452a.js";import{P as Ie}from"./pull-to-refresh-b8beecbe.js";import{S as Ce}from"./scroll-top-button-95820d24.js";import{S as Pe}from"./scrollable-list-df58e451.js";import{v as Le}from"./mood-smile-6a052395.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var Se=function(){return e("div",{className:"bg-white px-4 py-6 dark:bg-primary-900 sm:p-6"},void 0,e("div",{className:"w-full animate-pulse"},void 0,e("div",{className:"mb-2"},void 0,e(W,{minLength:20,maxLength:20})),e("div",{},void 0,e(ee,{space:3,alignItems:"center"},void 0,e("div",{className:"shrink-0"},void 0,e(re,{size:48})),e("div",{className:"min-w-0 flex-1"},void 0,e(le,{minLength:3,maxLength:25})))),e("div",{className:"mt-4"},void 0,e(W,{minLength:5,maxLength:120}))))};const Fe=R.memo(Se);var f=O({all:{id:"notifications.filter.all",defaultMessage:"All"},mentions:{id:"notifications.filter.mentions",defaultMessage:"Mentions"},favourites:{id:"notifications.filter.favourites",defaultMessage:"Likes"},boosts:{id:"notifications.filter.boosts",defaultMessage:"Reposts"},polls:{id:"notifications.filter.polls",defaultMessage:"Poll results"},follows:{id:"notifications.filter.follows",defaultMessage:"Follows"},emoji_reacts:{id:"notifications.filter.emoji_reacts",defaultMessage:"Emoji reacts"},statuses:{id:"notifications.filter.statuses",defaultMessage:"Updates from people you follow"}}),De=function(){var t=K(),d=te(),s=ae(),i=ce(),m=s.getIn(["notifications","quickFilter","active"]),c=s.getIn(["notifications","quickFilter","advanced"]),a=function(u){return function(){return d(de(u))}},o=[{text:t.formatMessage(f.all),action:a("all"),name:"all"}];return c?(o.push({text:e(y,{src:ie}),title:t.formatMessage(f.mentions),action:a("mention"),name:"mention"}),o.push({text:e(y,{src:Y}),title:t.formatMessage(f.favourites),action:a("favourite"),name:"favourite"}),i.emojiReacts&&o.push({text:e(y,{src:Le}),title:t.formatMessage(f.emoji_reacts),action:a("pleroma:emoji_reaction"),name:"pleroma:emoji_reaction"}),o.push({text:e(y,{src:G}),title:t.formatMessage(f.boosts),action:a("reblog"),name:"reblog"}),o.push({text:e(y,{src:oe}),title:t.formatMessage(f.polls),action:a("poll"),name:"poll"}),o.push({text:e(y,{src:ne}),title:t.formatMessage(f.statuses),action:a("status"),name:"status"}),o.push({text:e(y,{src:D}),title:t.formatMessage(f.follows),action:a("follow"),name:"follow"})):o.push({text:t.formatMessage(f.mentions),action:a("mention"),name:"mention"}),e(ue,{items:o,activeItem:m})};const Te="/packs/assets/calendar-time-e551770b.svg";var Ue=function(t,d,s){var i=[d];return i.push(t.formatDate(s,{hour:"2-digit",minute:"2-digit",month:"short",day:"numeric"})),i.join(", ")},ze=function(t){return e("bdi",{},void 0,e(pe,{className:"font-bold text-gray-800 hover:underline dark:text-gray-200",title:t.acct,to:"/@".concat(t.acct),dangerouslySetInnerHTML:{__html:t.display_name_html}}))},Ee={follow:D,follow_request:D,mention:ie,favourite:Y,group_favourite:Y,reblog:G,group_reblog:G,status:ne,poll:oe,move:ye,"pleroma:chat_mention":be,"pleroma:emoji_reaction":we,user_approved:D,update:Ne,"pleroma:event_reminder":Te,"pleroma:participation_request":J,"pleroma:participation_accepted":J},Ae=ge({id:"notification.name",defaultMessage:"{link}{others}"}),se=O({follow:{id:"notification.follow",defaultMessage:"{name} followed you"},follow_request:{id:"notification.follow_request",defaultMessage:"{name} has requested to follow you"},mention:{id:"notification.mentioned",defaultMessage:"{name} mentioned you"},favourite:{id:"notification.favourite",defaultMessage:"{name} liked your post"},group_favourite:{id:"notification.group_favourite",defaultMessage:"{name} liked your group post"},reblog:{id:"notification.reblog",defaultMessage:"{name} reposted your post"},group_reblog:{id:"notification.group_reblog",defaultMessage:"{name} reposted your group post"},status:{id:"notification.status",defaultMessage:"{name} just posted"},poll:{id:"notification.poll",defaultMessage:"A poll you have voted in has ended"},move:{id:"notification.move",defaultMessage:"{name} moved to {targetName}"},"pleroma:chat_mention":{id:"notification.pleroma:chat_mention",defaultMessage:"{name} sent you a message"},"pleroma:emoji_reaction":{id:"notification.pleroma:emoji_reaction",defaultMessage:"{name} reacted to your post"},user_approved:{id:"notification.user_approved",defaultMessage:"Welcome to {instance}!"},update:{id:"notification.update",defaultMessage:"{name} edited a post you interacted with"},"pleroma:event_reminder":{id:"notification.pleroma:event_reminder",defaultMessage:"An event you are participating in starts soon"},"pleroma:participation_request":{id:"notification.pleroma:participation_request",defaultMessage:"{name} wants to join your event"},"pleroma:participation_accepted":{id:"notification.pleroma:participation_accepted",defaultMessage:"You were accepted to join the event"}}),Be=function(t,d,s,i,m,c){var a=ze(s),o=t.formatMessage(Ae,{link:a,others:i&&i>0?e(Q,{id:"notification.others",defaultMessage:" + {count, plural, one {# other} other {# others}}",values:{count:i-1}}):""});return t.formatMessage(se[d],{name:o,targetName:m,instance:c})},F=48,$e=function(t){var d=t.hidden,s=d===void 0?!1:d,i=t.onMoveUp,m=t.onMoveDown,c=h.useCallback(fe(),[]),a=k(function(v){return c(v,t.notification)}),o=K(),j=me(),u=a.type,r=a.account,_=a.status,I=function(){i&&i(a.id)},C=function(){m&&m(a.id)},N=function(){return u==="pleroma:emoji_reaction"&&a.emoji?e(he,{emoji:a.emoji,src:a.emoji_url||void 0,className:"h-4 w-4 flex-none"}):A(u)?e(_e,{src:Ee[u],size:16,className:"flex-none text-primary-600 dark:text-primary-400"}):null},T=function(){switch(u){case"follow":case"user_approved":return{type:0,content:r&&g(r)==="object"?e(B,{id:r.id,hidden:s,avatarSize:F,withRelationship:!0}):null};case"follow_request":return{type:0,content:r&&g(r)==="object"?e(B,{id:r.id,hidden:s,avatarSize:F,actionType:"follow_request",withRelationship:!0}):null};case"move":return{type:0,content:r&&g(r)==="object"&&a.target&&g(a.target)==="object"?e(B,{id:a.target.id,hidden:s,avatarSize:F,withRelationship:!0}):null};case"favourite":case"group_favourite":case"mention":case"reblog":case"group_reblog":case"status":case"poll":case"update":case"pleroma:emoji_reaction":case"pleroma:event_reminder":case"pleroma:participation_accepted":case"pleroma:participation_request":return{type:1,content:_&&g(_)==="object"?e(Me,{status:_,hidden:s,onMoveDown:C,onMoveUp:I,avatarSize:F,showGroup:!1,notification:{icon:N(),text:q}}):null};default:return{type:-1,content:null}}},P=a.target&&g(a.target)==="object"?a.target.acct:"",q=A(u)&&r&&g(r)==="object"?Be(o,u,r,a.total_count,P,j.title):null,L=A(u)?Ue(o,o.formatMessage(se[u],{name:r&&g(r)==="object"?r.acct:"",targetName:P}),a.created_at):"",U=function(){var p=T(),z=p.type,x=p.content;return R.createElement(R.Fragment,null,x!==null&&z!==1&&e("div",{className:"mb-2"},void 0,e(ee,{alignItems:"center",space:3},void 0,e("div",{className:"flex justify-end"},void 0,N()),e("div",{className:"truncate"},void 0,e(ve,{theme:"muted",size:"xs",truncate:!0,"data-testid":"message"},void 0,q)))),x!==null&&e("div",{},void 0,x))};return e("div",{className:"notification focusable",tabIndex:0,"aria-label":L},void 0,e("div",{className:"focusable p-4"},void 0,U()))},Z=O({title:{id:"column.notifications",defaultMessage:"Notifications"},queue:{id:"notifications.queue_label",defaultMessage:"Click to see {count} new {count, plural, one {notification} other {notifications}}"}}),He=qe([function(l){return $(l).getIn(["notifications","quickFilter","show"])},function(l){return $(l).getIn(["notifications","quickFilter","active"])},function(l){return xe($(l).getIn(["notifications","shows"]).filter(function(t){return!t}).keys())},function(l){return l.notifications.items.toList()}],function(l,t,d,s){return!l||t==="all"?s.filterNot(function(i){return i!==null&&d.includes(i.get("type"))}):s.filter(function(i){return i!==null&&t===i.get("type")})}),Je=function(){var t=te(),d=K(),s=ae(),i=s.getIn(["notifications","quickFilter","show"]),m=s.getIn(["notifications","quickFilter","active"]),c=k(function(n){return He(n)}),a=k(function(n){return n.notifications.isLoading}),o=k(function(n){return n.notifications.hasMore}),j=k(function(n){return n.notifications.totalQueuedNotificationsCount||0}),u=h.useRef(null),r=h.useRef(null),_=h.useRef(null),I=h.useCallback(H(function(){var n=c.last();t(X({maxId:n&&n.get("id")}))},300,{leading:!0}),[c]),C=h.useCallback(H(function(){t(S(!0))},100),[]),N=h.useCallback(H(function(){t(S(!1))},100),[]),T=function(b){var M=c.findIndex(function(w){return w!==null&&w.get("id")===b})-1;q(M)},P=function(b){var M=c.findIndex(function(w){return w!==null&&w.get("id")===b})+1;q(M)},q=function(b){var M;(M=u.current)===null||M===void 0||M.scrollIntoView({index:b,behavior:"smooth",done:function(){var E=r.current,V=E==null?void 0:E.querySelector('[data-index="'.concat(b,'"] .focusable'));V&&V.focus()}})},L=function(){t(je())},U=function(){return t(X())};h.useEffect(function(){return L(),t(S(!0)),function(){I.cancel(),C.cancel(),N.cancel(),t(S(!1))}},[]);var v=m==="all"?e(Q,{id:"empty_column.notifications",defaultMessage:"You don't have any notifications yet. Interact with others to start the conversation."}):e(Q,{id:"empty_column.notifications_filtered",defaultMessage:"You don't have any notifications of this type yet."}),p=null,z=i?e(De,{}):null;a&&_.current?p=_.current:c.size>0||o?p=c.map(function(n){return e($e,{notification:n,onMoveUp:T,onMoveDown:P},n.id)}):p=null,_.current=p;var x=R.createElement(Pe,{ref:u,scrollKey:"notifications",isLoading:a,showLoading:a&&c.size===0,hasMore:o,emptyMessage:v,placeholderComponent:Fe,placeholderCount:20,onLoadMore:I,onScrollToTop:C,onScroll:N,className:ke({"divide-y divide-gray-200 dark:divide-primary-800 divide-solid":c.size>0,"space-y-2":c.size===0})},p);return R.createElement(Re,{ref:r,label:d.formatMessage(Z.title),withHeader:!1},z,e(Ce,{onClick:L,count:j,message:Z.queue}),e(Ie,{onRefresh:U},void 0,x))};export{Je as default}; +import{R,a as e,P as W,H as ee,b as re,c as le,u as K,d as te,f as ae,g as ce,v as ie,I as y,i as Y,k as G,l as oe,m as ne,n as D,T as ue,o as O,s as de,r as h,p as fe,q as k,t as me,w as g,x as A,F as Q,y as ve,L as pe,z as ge,E as he,A as _e,S as Me,B,C as ye,D as be,G as we,J as Ne,K as J,M as qe,N as $,O as xe,Q as H,U as X,V as S,W as ke,X as Re,Y as je}from"../index-be605fd2.js";import{P as Ie}from"./pull-to-refresh-a7e092ab.js";import{S as Ce}from"./scroll-top-button-73ec9889.js";import{S as Pe}from"./scrollable-list-1e43c72d.js";import{v as Le}from"./mood-smile-6a052395.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var Se=function(){return e("div",{className:"bg-white px-4 py-6 dark:bg-primary-900 sm:p-6"},void 0,e("div",{className:"w-full animate-pulse"},void 0,e("div",{className:"mb-2"},void 0,e(W,{minLength:20,maxLength:20})),e("div",{},void 0,e(ee,{space:3,alignItems:"center"},void 0,e("div",{className:"shrink-0"},void 0,e(re,{size:48})),e("div",{className:"min-w-0 flex-1"},void 0,e(le,{minLength:3,maxLength:25})))),e("div",{className:"mt-4"},void 0,e(W,{minLength:5,maxLength:120}))))};const Fe=R.memo(Se);var f=O({all:{id:"notifications.filter.all",defaultMessage:"All"},mentions:{id:"notifications.filter.mentions",defaultMessage:"Mentions"},favourites:{id:"notifications.filter.favourites",defaultMessage:"Likes"},boosts:{id:"notifications.filter.boosts",defaultMessage:"Reposts"},polls:{id:"notifications.filter.polls",defaultMessage:"Poll results"},follows:{id:"notifications.filter.follows",defaultMessage:"Follows"},emoji_reacts:{id:"notifications.filter.emoji_reacts",defaultMessage:"Emoji reacts"},statuses:{id:"notifications.filter.statuses",defaultMessage:"Updates from people you follow"}}),De=function(){var t=K(),d=te(),s=ae(),i=ce(),m=s.getIn(["notifications","quickFilter","active"]),c=s.getIn(["notifications","quickFilter","advanced"]),a=function(u){return function(){return d(de(u))}},o=[{text:t.formatMessage(f.all),action:a("all"),name:"all"}];return c?(o.push({text:e(y,{src:ie}),title:t.formatMessage(f.mentions),action:a("mention"),name:"mention"}),o.push({text:e(y,{src:Y}),title:t.formatMessage(f.favourites),action:a("favourite"),name:"favourite"}),i.emojiReacts&&o.push({text:e(y,{src:Le}),title:t.formatMessage(f.emoji_reacts),action:a("pleroma:emoji_reaction"),name:"pleroma:emoji_reaction"}),o.push({text:e(y,{src:G}),title:t.formatMessage(f.boosts),action:a("reblog"),name:"reblog"}),o.push({text:e(y,{src:oe}),title:t.formatMessage(f.polls),action:a("poll"),name:"poll"}),o.push({text:e(y,{src:ne}),title:t.formatMessage(f.statuses),action:a("status"),name:"status"}),o.push({text:e(y,{src:D}),title:t.formatMessage(f.follows),action:a("follow"),name:"follow"})):o.push({text:t.formatMessage(f.mentions),action:a("mention"),name:"mention"}),e(ue,{items:o,activeItem:m})};const Te="/packs/assets/calendar-time-e551770b.svg";var Ue=function(t,d,s){var i=[d];return i.push(t.formatDate(s,{hour:"2-digit",minute:"2-digit",month:"short",day:"numeric"})),i.join(", ")},ze=function(t){return e("bdi",{},void 0,e(pe,{className:"font-bold text-gray-800 hover:underline dark:text-gray-200",title:t.acct,to:"/@".concat(t.acct),dangerouslySetInnerHTML:{__html:t.display_name_html}}))},Ee={follow:D,follow_request:D,mention:ie,favourite:Y,group_favourite:Y,reblog:G,group_reblog:G,status:ne,poll:oe,move:ye,"pleroma:chat_mention":be,"pleroma:emoji_reaction":we,user_approved:D,update:Ne,"pleroma:event_reminder":Te,"pleroma:participation_request":J,"pleroma:participation_accepted":J},Ae=ge({id:"notification.name",defaultMessage:"{link}{others}"}),se=O({follow:{id:"notification.follow",defaultMessage:"{name} followed you"},follow_request:{id:"notification.follow_request",defaultMessage:"{name} has requested to follow you"},mention:{id:"notification.mentioned",defaultMessage:"{name} mentioned you"},favourite:{id:"notification.favourite",defaultMessage:"{name} liked your post"},group_favourite:{id:"notification.group_favourite",defaultMessage:"{name} liked your group post"},reblog:{id:"notification.reblog",defaultMessage:"{name} reposted your post"},group_reblog:{id:"notification.group_reblog",defaultMessage:"{name} reposted your group post"},status:{id:"notification.status",defaultMessage:"{name} just posted"},poll:{id:"notification.poll",defaultMessage:"A poll you have voted in has ended"},move:{id:"notification.move",defaultMessage:"{name} moved to {targetName}"},"pleroma:chat_mention":{id:"notification.pleroma:chat_mention",defaultMessage:"{name} sent you a message"},"pleroma:emoji_reaction":{id:"notification.pleroma:emoji_reaction",defaultMessage:"{name} reacted to your post"},user_approved:{id:"notification.user_approved",defaultMessage:"Welcome to {instance}!"},update:{id:"notification.update",defaultMessage:"{name} edited a post you interacted with"},"pleroma:event_reminder":{id:"notification.pleroma:event_reminder",defaultMessage:"An event you are participating in starts soon"},"pleroma:participation_request":{id:"notification.pleroma:participation_request",defaultMessage:"{name} wants to join your event"},"pleroma:participation_accepted":{id:"notification.pleroma:participation_accepted",defaultMessage:"You were accepted to join the event"}}),Be=function(t,d,s,i,m,c){var a=ze(s),o=t.formatMessage(Ae,{link:a,others:i&&i>0?e(Q,{id:"notification.others",defaultMessage:" + {count, plural, one {# other} other {# others}}",values:{count:i-1}}):""});return t.formatMessage(se[d],{name:o,targetName:m,instance:c})},F=48,$e=function(t){var d=t.hidden,s=d===void 0?!1:d,i=t.onMoveUp,m=t.onMoveDown,c=h.useCallback(fe(),[]),a=k(function(v){return c(v,t.notification)}),o=K(),j=me(),u=a.type,r=a.account,_=a.status,I=function(){i&&i(a.id)},C=function(){m&&m(a.id)},N=function(){return u==="pleroma:emoji_reaction"&&a.emoji?e(he,{emoji:a.emoji,src:a.emoji_url||void 0,className:"h-4 w-4 flex-none"}):A(u)?e(_e,{src:Ee[u],size:16,className:"flex-none text-primary-600 dark:text-primary-400"}):null},T=function(){switch(u){case"follow":case"user_approved":return{type:0,content:r&&g(r)==="object"?e(B,{id:r.id,hidden:s,avatarSize:F,withRelationship:!0}):null};case"follow_request":return{type:0,content:r&&g(r)==="object"?e(B,{id:r.id,hidden:s,avatarSize:F,actionType:"follow_request",withRelationship:!0}):null};case"move":return{type:0,content:r&&g(r)==="object"&&a.target&&g(a.target)==="object"?e(B,{id:a.target.id,hidden:s,avatarSize:F,withRelationship:!0}):null};case"favourite":case"group_favourite":case"mention":case"reblog":case"group_reblog":case"status":case"poll":case"update":case"pleroma:emoji_reaction":case"pleroma:event_reminder":case"pleroma:participation_accepted":case"pleroma:participation_request":return{type:1,content:_&&g(_)==="object"?e(Me,{status:_,hidden:s,onMoveDown:C,onMoveUp:I,avatarSize:F,showGroup:!1,notification:{icon:N(),text:q}}):null};default:return{type:-1,content:null}}},P=a.target&&g(a.target)==="object"?a.target.acct:"",q=A(u)&&r&&g(r)==="object"?Be(o,u,r,a.total_count,P,j.title):null,L=A(u)?Ue(o,o.formatMessage(se[u],{name:r&&g(r)==="object"?r.acct:"",targetName:P}),a.created_at):"",U=function(){var p=T(),z=p.type,x=p.content;return R.createElement(R.Fragment,null,x!==null&&z!==1&&e("div",{className:"mb-2"},void 0,e(ee,{alignItems:"center",space:3},void 0,e("div",{className:"flex justify-end"},void 0,N()),e("div",{className:"truncate"},void 0,e(ve,{theme:"muted",size:"xs",truncate:!0,"data-testid":"message"},void 0,q)))),x!==null&&e("div",{},void 0,x))};return e("div",{className:"notification focusable",tabIndex:0,"aria-label":L},void 0,e("div",{className:"focusable p-4"},void 0,U()))},Z=O({title:{id:"column.notifications",defaultMessage:"Notifications"},queue:{id:"notifications.queue_label",defaultMessage:"Click to see {count} new {count, plural, one {notification} other {notifications}}"}}),He=qe([function(l){return $(l).getIn(["notifications","quickFilter","show"])},function(l){return $(l).getIn(["notifications","quickFilter","active"])},function(l){return xe($(l).getIn(["notifications","shows"]).filter(function(t){return!t}).keys())},function(l){return l.notifications.items.toList()}],function(l,t,d,s){return!l||t==="all"?s.filterNot(function(i){return i!==null&&d.includes(i.get("type"))}):s.filter(function(i){return i!==null&&t===i.get("type")})}),Je=function(){var t=te(),d=K(),s=ae(),i=s.getIn(["notifications","quickFilter","show"]),m=s.getIn(["notifications","quickFilter","active"]),c=k(function(n){return He(n)}),a=k(function(n){return n.notifications.isLoading}),o=k(function(n){return n.notifications.hasMore}),j=k(function(n){return n.notifications.totalQueuedNotificationsCount||0}),u=h.useRef(null),r=h.useRef(null),_=h.useRef(null),I=h.useCallback(H(function(){var n=c.last();t(X({maxId:n&&n.get("id")}))},300,{leading:!0}),[c]),C=h.useCallback(H(function(){t(S(!0))},100),[]),N=h.useCallback(H(function(){t(S(!1))},100),[]),T=function(b){var M=c.findIndex(function(w){return w!==null&&w.get("id")===b})-1;q(M)},P=function(b){var M=c.findIndex(function(w){return w!==null&&w.get("id")===b})+1;q(M)},q=function(b){var M;(M=u.current)===null||M===void 0||M.scrollIntoView({index:b,behavior:"smooth",done:function(){var E=r.current,V=E==null?void 0:E.querySelector('[data-index="'.concat(b,'"] .focusable'));V&&V.focus()}})},L=function(){t(je())},U=function(){return t(X())};h.useEffect(function(){return L(),t(S(!0)),function(){I.cancel(),C.cancel(),N.cancel(),t(S(!1))}},[]);var v=m==="all"?e(Q,{id:"empty_column.notifications",defaultMessage:"You don't have any notifications yet. Interact with others to start the conversation."}):e(Q,{id:"empty_column.notifications_filtered",defaultMessage:"You don't have any notifications of this type yet."}),p=null,z=i?e(De,{}):null;a&&_.current?p=_.current:c.size>0||o?p=c.map(function(n){return e($e,{notification:n,onMoveUp:T,onMoveDown:P},n.id)}):p=null,_.current=p;var x=R.createElement(Pe,{ref:u,scrollKey:"notifications",isLoading:a,showLoading:a&&c.size===0,hasMore:o,emptyMessage:v,placeholderComponent:Fe,placeholderCount:20,onLoadMore:I,onScrollToTop:C,onScroll:N,className:ke({"divide-y divide-gray-200 dark:divide-primary-800 divide-solid":c.size>0,"space-y-2":c.size===0})},p);return R.createElement(Re,{ref:r,label:d.formatMessage(Z.title),withHeader:!1},z,e(Ce,{onClick:L,count:j,message:Z.queue}),e(Ie,{onRefresh:U},void 0,x))};export{Je as default}; diff --git a/packs/js/index-4be17463.js b/packs/js/index-a4ed1d8d.js similarity index 99% rename from packs/js/index-4be17463.js rename to packs/js/index-a4ed1d8d.js index 6c163a722..08df38dcd 100644 --- a/packs/js/index-4be17463.js +++ b/packs/js/index-a4ed1d8d.js @@ -1,4 +1,4 @@ -import{v as Da}from"./download-ac53125a.js";import{r as C,cl as Na,R as u,a as S,gV as Nn,gW as Ht,gX as ft,gY as Ia,gZ as In,g_ as Ga,g$ as Lt,h0 as Ua,h1 as za,h2 as Gn,h3 as Wa,h4 as Un,h5 as Dt,h6 as zn,h7 as Ka,h8 as Xa,h9 as Wn,ha as Va,hb as Ya,hc as qa,hd as Ja,he as Za,hf as Nt,hg as Kn,hh as Xn,hi as Qa,hj as ei,hk as ti,hl as g,_ as Re,fn as ri,hm as Vn,at as ne,fo as ni,cT as ai,hn as ii,ed as oi,ho as li,H as si,a2 as ui,u as ci,d as fi,aU as hi,q as Sr,hp as pi,cF as Er,bE as di,af as Cr,bI as gi,cO as bi,hq as vi,hr as mi,aa as _r,F as Or,X as yi,ag as Yn,o as xi,fp as $r,aP as wt,bp as Tr,hs as wi,fw as Si}from"../index-7380452a.js";import{d as Ei}from"./download-2e3dfb39.js";import{o as Ci}from"./object-to-array-a4f09672.js";var _i=function(e){var r=e.value,n=e.onChange,a=C.useRef(null),i=function(c){document.addEventListener("mousemove",l,!0),document.addEventListener("mouseup",o,!0),document.addEventListener("touchmove",l,!0),document.addEventListener("touchend",o,!0),l(c),c.preventDefault(),c.stopPropagation()},o=function s(){document.removeEventListener("mousemove",l,!0),document.removeEventListener("mouseup",s,!0),document.removeEventListener("touchmove",l,!0),document.removeEventListener("touchend",s,!0)},l=Na(function(s){if(a.current){var c=$i(a.current,s),f=c.x;if(!isNaN(f)){var h=f;f>1?h=1:f<0&&(h=0),n(h)}}},60);return u.createElement("div",{className:"relative inline-flex h-6 cursor-pointer transition",onMouseDown:i,ref:a},S("div",{className:"absolute top-1/2 h-1 w-full -translate-y-1/2 rounded-full bg-primary-200 dark:bg-primary-700"}),S("div",{className:"absolute top-1/2 h-1 -translate-y-1/2 rounded-full bg-accent-500",style:{width:"".concat(r*100,"%")}}),S("span",{className:"absolute top-1/2 z-10 -ml-1.5 h-3 w-3 -translate-y-1/2 rounded-full bg-accent-500 shadow",tabIndex:0,style:{left:"".concat(r*100,"%")}}))},Oi=function(e){var r;if(e.getBoundingClientRect&&e.parentNode&&(r=e.getBoundingClientRect()),!r)return{left:0,top:0};var n=document.documentElement,a=document.body,i=n.clientLeft||a.clientLeft||0,o=window.pageXOffset||a.scrollLeft,l=r.left+o-i,s=n.clientTop||a.clientTop||0,c=window.pageYOffset||a.scrollTop,f=r.top+c-s;return{left:Math.round(l),top:Math.round(f)}},$i=function(e,r){var n=Oi(e),a=e.offsetWidth,i=e.offsetHeight,o=n.top,l=n.left,s=r.pageY,c=r.pageX;return r.changedTouches&&(c=r.changedTouches[0].pageX,s=r.changedTouches[0].pageY),{y:Math.max(0,Math.min(1,(s-o)/i)),x:Math.max(0,Math.min(1,(c-l)/a))}},N={},We={},Ti=Nn,Ai=Ht,Pi=ft,Ri="[object String]";function Mi(t){return typeof t=="string"||!Ai(t)&&Pi(t)&&Ti(t)==Ri}var ki=Mi,Fi=Ia;function ji(t){return typeof t=="function"?t:Fi}var Bi=ji,Hi=In,Li=Bi;function Di(t,e){return t&&Hi(t,Li(e))}var It=Di,Ni=Ga,Ii=Ni(Object.getPrototypeOf,Object),Gt=Ii,Gi=Nn,Ui=Gt,zi=ft,Wi="[object Object]",Ki=Function.prototype,Xi=Object.prototype,qn=Ki.toString,Vi=Xi.hasOwnProperty,Yi=qn.call(Object);function qi(t){if(!zi(t)||Gi(t)!=Wi)return!1;var e=Ui(t);if(e===null)return!0;var r=Vi.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&qn.call(r)==Yi}var Ji=qi,Zi=Lt;function Qi(t,e){return function(r,n){if(r==null)return r;if(!Zi(r))return t(r,n);for(var a=r.length,i=e?a:-1,o=Object(r);(e?i--:++i0&&arguments[0]!==void 0?arguments[0]:[],r=[];return(0,Eo.default)(e,function(n){Array.isArray(n)?t(n).map(function(a){return r.push(a)}):(0,wo.default)(n)?(0,yo.default)(n,function(a,i){a===!0&&r.push(i),r.push(i+"-"+a)}):(0,vo.default)(n)&&r.push(n)}),r};We.default=Co;var Ke={};function _o(t,e){for(var r=-1,n=t==null?0:t.length;++r1&&arguments[1]!==void 0?arguments[1]:[],n=e.default&&(0,Iu.default)(e.default)||{};return r.map(function(a){var i=e[a];return i&&(0,Du.default)(i,function(o,l){n[l]||(n[l]={}),n[l]=Gu({},n[l],i[l])}),a}),n};Ke.default=Uu;var Xe={};Object.defineProperty(Xe,"__esModule",{value:!0});Xe.autoprefix=void 0;var zu=It,Lr=Ku(zu),Wu=Object.assign||function(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:"span";return function(n){Qu(a,n);function a(){var i,o,l,s;Zu(this,a);for(var c=arguments.length,f=Array(c),h=0;h1&&arguments[1]!==void 0?arguments[1]:"span";return function(n){ic(a,n);function a(){var i,o,l,s;ac(this,a);for(var c=arguments.length,f=Array(c),h=0;h1&&arguments[1]!==void 0?arguments[1]:!0;n[o]=l};return e===0&&a("first-child"),e===r-1&&a("last-child"),(e===0||e%2===0)&&a("even"),Math.abs(e%2)===1&&a("odd"),a("nth-child",e),n};Wt.default=lc;Object.defineProperty(N,"__esModule",{value:!0});N.ReactCSS=N.loop=N.handleActive=Kt=N.handleHover=N.hover=void 0;var sc=We,uc=Me(sc),cc=Ke,fc=Me(cc),hc=Xe,pc=Me(hc),dc=Ve,na=Me(dc),gc=Ye,bc=Me(gc),vc=Wt,mc=Me(vc);function Me(t){return t&&t.__esModule?t:{default:t}}N.hover=na.default;var Kt=N.handleHover=na.default;N.handleActive=bc.default;N.loop=mc.default;var yc=N.ReactCSS=function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),a=1;al?p=1:p=Math.round(h*100/l)/100,r.a!==p)return{h:r.h,s:r.s,l:r.l,a:p,source:"rgb"}}else{var d=void 0;if(f<0?d=0:f>o?d=1:d=Math.round(f*100/o)/100,a!==d)return{h:r.h,s:r.s,l:r.l,a:d,source:"rgb"}}return null},Ct={},wc=function(e,r,n,a){if(typeof document>"u"&&!a)return null;var i=a?new a:document.createElement("canvas");i.width=n*2,i.height=n*2;var o=i.getContext("2d");return o?(o.fillStyle=e,o.fillRect(0,0,i.width,i.height),o.fillStyle=r,o.fillRect(0,0,n,n),o.translate(n,n),o.fillRect(0,0,n,n),i.toDataURL()):null},Sc=function(e,r,n,a){var i=e+"-"+r+"-"+n+(a?"-server":"");if(Ct[i])return Ct[i];var o=wc(e,r,n,a);return Ct[i]=o,o},Ir=Object.assign||function(t){for(var e=1;e1?h=1:f<0&&(h=0),n(h)}}},60);return u.createElement("div",{className:"relative inline-flex h-6 cursor-pointer transition",onMouseDown:i,ref:a},S("div",{className:"absolute top-1/2 h-1 w-full -translate-y-1/2 rounded-full bg-primary-200 dark:bg-primary-700"}),S("div",{className:"absolute top-1/2 h-1 -translate-y-1/2 rounded-full bg-accent-500",style:{width:"".concat(r*100,"%")}}),S("span",{className:"absolute top-1/2 z-10 -ml-1.5 h-3 w-3 -translate-y-1/2 rounded-full bg-accent-500 shadow",tabIndex:0,style:{left:"".concat(r*100,"%")}}))},Oi=function(e){var r;if(e.getBoundingClientRect&&e.parentNode&&(r=e.getBoundingClientRect()),!r)return{left:0,top:0};var n=document.documentElement,a=document.body,i=n.clientLeft||a.clientLeft||0,o=window.pageXOffset||a.scrollLeft,l=r.left+o-i,s=n.clientTop||a.clientTop||0,c=window.pageYOffset||a.scrollTop,f=r.top+c-s;return{left:Math.round(l),top:Math.round(f)}},$i=function(e,r){var n=Oi(e),a=e.offsetWidth,i=e.offsetHeight,o=n.top,l=n.left,s=r.pageY,c=r.pageX;return r.changedTouches&&(c=r.changedTouches[0].pageX,s=r.changedTouches[0].pageY),{y:Math.max(0,Math.min(1,(s-o)/i)),x:Math.max(0,Math.min(1,(c-l)/a))}},N={},We={},Ti=Nn,Ai=Ht,Pi=ft,Ri="[object String]";function Mi(t){return typeof t=="string"||!Ai(t)&&Pi(t)&&Ti(t)==Ri}var ki=Mi,Fi=Ia;function ji(t){return typeof t=="function"?t:Fi}var Bi=ji,Hi=In,Li=Bi;function Di(t,e){return t&&Hi(t,Li(e))}var It=Di,Ni=Ga,Ii=Ni(Object.getPrototypeOf,Object),Gt=Ii,Gi=Nn,Ui=Gt,zi=ft,Wi="[object Object]",Ki=Function.prototype,Xi=Object.prototype,qn=Ki.toString,Vi=Xi.hasOwnProperty,Yi=qn.call(Object);function qi(t){if(!zi(t)||Gi(t)!=Wi)return!1;var e=Ui(t);if(e===null)return!0;var r=Vi.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&qn.call(r)==Yi}var Ji=qi,Zi=Lt;function Qi(t,e){return function(r,n){if(r==null)return r;if(!Zi(r))return t(r,n);for(var a=r.length,i=e?a:-1,o=Object(r);(e?i--:++i0&&arguments[0]!==void 0?arguments[0]:[],r=[];return(0,Eo.default)(e,function(n){Array.isArray(n)?t(n).map(function(a){return r.push(a)}):(0,wo.default)(n)?(0,yo.default)(n,function(a,i){a===!0&&r.push(i),r.push(i+"-"+a)}):(0,vo.default)(n)&&r.push(n)}),r};We.default=Co;var Ke={};function _o(t,e){for(var r=-1,n=t==null?0:t.length;++r1&&arguments[1]!==void 0?arguments[1]:[],n=e.default&&(0,Iu.default)(e.default)||{};return r.map(function(a){var i=e[a];return i&&(0,Du.default)(i,function(o,l){n[l]||(n[l]={}),n[l]=Gu({},n[l],i[l])}),a}),n};Ke.default=Uu;var Xe={};Object.defineProperty(Xe,"__esModule",{value:!0});Xe.autoprefix=void 0;var zu=It,Lr=Ku(zu),Wu=Object.assign||function(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:"span";return function(n){Qu(a,n);function a(){var i,o,l,s;Zu(this,a);for(var c=arguments.length,f=Array(c),h=0;h1&&arguments[1]!==void 0?arguments[1]:"span";return function(n){ic(a,n);function a(){var i,o,l,s;ac(this,a);for(var c=arguments.length,f=Array(c),h=0;h1&&arguments[1]!==void 0?arguments[1]:!0;n[o]=l};return e===0&&a("first-child"),e===r-1&&a("last-child"),(e===0||e%2===0)&&a("even"),Math.abs(e%2)===1&&a("odd"),a("nth-child",e),n};Wt.default=lc;Object.defineProperty(N,"__esModule",{value:!0});N.ReactCSS=N.loop=N.handleActive=Kt=N.handleHover=N.hover=void 0;var sc=We,uc=Me(sc),cc=Ke,fc=Me(cc),hc=Xe,pc=Me(hc),dc=Ve,na=Me(dc),gc=Ye,bc=Me(gc),vc=Wt,mc=Me(vc);function Me(t){return t&&t.__esModule?t:{default:t}}N.hover=na.default;var Kt=N.handleHover=na.default;N.handleActive=bc.default;N.loop=mc.default;var yc=N.ReactCSS=function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),a=1;al?p=1:p=Math.round(h*100/l)/100,r.a!==p)return{h:r.h,s:r.s,l:r.l,a:p,source:"rgb"}}else{var d=void 0;if(f<0?d=0:f>o?d=1:d=Math.round(f*100/o)/100,a!==d)return{h:r.h,s:r.s,l:r.l,a:d,source:"rgb"}}return null},Ct={},wc=function(e,r,n,a){if(typeof document>"u"&&!a)return null;var i=a?new a:document.createElement("canvas");i.width=n*2,i.height=n*2;var o=i.getContext("2d");return o?(o.fillStyle=e,o.fillRect(0,0,i.width,i.height),o.fillStyle=r,o.fillRect(0,0,n,n),o.translate(n,n),o.fillRect(0,0,n,n),i.toDataURL()):null},Sc=function(e,r,n,a){var i=e+"-"+r+"-"+n+(a?"-server":"");if(Ct[i])return Ct[i];var o=wc(e,r,n,a);return Ct[i]=o,o},Ir=Object.assign||function(t){for(var e=1;e-1},Bc=function(e){return Number(String(e).replace(/%/g,""))},Hc=1,E=function(t){Rc(e,t);function e(r){Ac(this,e);var n=Pc(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.handleBlur=function(){n.state.blurValue&&n.setState({value:n.state.blurValue,blurValue:null})},n.handleChange=function(a){n.setUpdatedValue(a.target.value,a)},n.handleKeyDown=function(a){var i=Bc(a.target.value);if(!isNaN(i)&&jc(a.keyCode)){var o=n.getArrowOffset(),l=a.keyCode===aa?i+o:i-o;n.setUpdatedValue(l,a)}},n.handleDrag=function(a){if(n.props.dragLabel){var i=Math.round(n.props.value+a.movementX);i>=0&&i<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(i),a)}},n.handleMouseDown=function(a){n.props.dragLabel&&(a.preventDefault(),n.handleDrag(a),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(r.value).toUpperCase(),blurValue:String(r.value).toUpperCase()},n.inputId="rc-editable-input-"+Hc++,n}return $c(e,[{key:"componentDidUpdate",value:function(n,a){this.props.value!==this.state.value&&(n.value!==this.props.value||a.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(n){return Tc({},this.props.label,n)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||Mc}},{key:"setUpdatedValue",value:function(n,a){var i=this.props.label?this.getValueObjectWithLabel(n):n;this.props.onChange&&this.props.onChange(i,a),this.setState({value:n})}},{key:"render",value:function(){var n=this,a=x({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return u.createElement("div",{style:a.wrap},u.createElement("input",{id:this.inputId,style:a.input,ref:function(o){return n.input=o},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?u.createElement("label",{htmlFor:this.inputId,style:a.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),e}(C.PureComponent||C.Component),Lc=function(e,r,n,a){var i=a.clientWidth,o=a.clientHeight,l=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,s=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,c=l-(a.getBoundingClientRect().left+window.pageXOffset),f=s-(a.getBoundingClientRect().top+window.pageYOffset);if(r==="vertical"){var h=void 0;if(f<0)h=359;else if(f>o)h=0;else{var p=-(f*100/o)+100;h=360*p/100}if(n.h!==h)return{h,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var d=void 0;if(c<0)d=0;else if(c>i)d=359;else{var b=c*100/i;d=360*b/100}if(n.h!==d)return{h:d,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null},Dc=function(){function t(e,r){for(var n=0;n(u,a)=>Q(a).get("/api/v1/pleroma/admin/email_list/subscribers.csv"),je=()=>(u,a)=>Q(a).get("/api/v1/pleroma/admin/email_list/unsubscribers.csv"),He=()=>(u,a)=>Q(a).get("/api/v1/pleroma/admin/email_list/combined.csv");var U=function(a){var t=a.count,s=a.label,r=a.to,o=r===void 0?"#":r,n=a.percent,c=n===void 0?!1:n;return me(t)?e(F,{className:"flex cursor-pointer flex-col items-center space-y-2 rounded bg-gray-200 p-4 transition-transform hover:-translate-y-1 dark:bg-gray-800",to:o},void 0,e(M,{align:"center",size:"2xl",weight:"medium"},void 0,e(pe,{value:t,style:c?"unit":void 0,unit:c?"percent":void 0})),e(M,{align:"center"},void 0,s)):null},ze=function(a){var t=a.children;return e("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3"},void 0,t)},Oe=function(a){var t=a.onChange,s=a.children,r=y.Children.map(s,function(o){return y.cloneElement(o,{onChange:t})});return e(P,{},void 0,r)},K=function(a){var t=a.label,s=a.hint,r=a.checked,o=r===void 0?!1:r,n=a.onChange,c=a.value;return e(p,{label:t,hint:s},void 0,e("input",{type:"radio",checked:o,onChange:n,value:c,className:"h-4 w-4 border-gray-300 text-primary-600 focus:ring-primary-500"}))},Ge=C({saved:{id:"admin.dashboard.settings_saved",defaultMessage:"Settings saved!"}}),Be=function(a){var t={open:[D(":registrations_open",!0),D(":account_approval_required",!1)],approval:[D(":registrations_open",!0),D(":account_approval_required",!0)],closed:[D(":registrations_open",!1)]};return[{group:":pleroma",key:":instance",value:t[a]}]},We=function(a){return a.approval_required&&a.registrations?"approval":a.registrations?"open":"closed"},Ke=function(){var a=w(),t=R(),s=ee(),r=We(s),o=function(c){var l=Be(c.target.value);t(ge(l)).then(function(){ae.success(a.formatMessage(Ge.saved))}).catch(function(){})};return e(Oe,{onChange:o},void 0,e(K,{label:e(d,{id:"admin.dashboard.registration_mode.open_label",defaultMessage:"Open"}),hint:e(d,{id:"admin.dashboard.registration_mode.open_hint",defaultMessage:"Anyone can join."}),checked:r==="open",value:"open"}),e(K,{label:e(d,{id:"admin.dashboard.registration_mode.approval_label",defaultMessage:"Approval Required"}),hint:e(d,{id:"admin.dashboard.registration_mode.approval_hint",defaultMessage:"Users can sign up, but their account only gets activated when an admin approves it."}),checked:r==="approval",value:"approval"}),e(K,{label:e(d,{id:"admin.dashboard.registration_mode.closed_label",defaultMessage:"Closed"}),hint:e(d,{id:"admin.dashboard.registration_mode.closed_hint",defaultMessage:"Nobody can sign up. You can still invite people."}),checked:r==="closed",value:"closed"}))},Je=function(){var a=R(),t=ee(),s=fe(),r=te(),o=r.account,n=function(g){a($e()).then(function(f){var h=f.data;B(h,"subscribers.csv")}).catch(function(){}),g.preventDefault()},c=function(g){a(je()).then(function(f){var h=f.data;B(h,"unsubscribers.csv")}).catch(function(){}),g.preventDefault()},l=function(g){a(He()).then(function(f){var h=f.data;B(h,"combined.csv")}).catch(function(){}),g.preventDefault()},i=he(t.version),k=t.stats.user_count,q=t.stats.status_count,v=t.stats.domain_count,S=t.pleroma.stats.mau,I=k&&S?Math.round(S/k*100):void 0;return o?e(_,{space:6,className:"mt-4"},void 0,e(ze,{},void 0,e(U,{count:S,label:e(d,{id:"admin.dashcounters.mau_label",defaultMessage:"monthly active users"})}),e(U,{to:"/ghostbox/admin/users",count:k,label:e(d,{id:"admin.dashcounters.user_count_label",defaultMessage:"total users"})}),e(U,{count:I,label:e(d,{id:"admin.dashcounters.retention_label",defaultMessage:"user retention"}),percent:!0}),e(U,{to:"/timeline/local",count:q,label:e(d,{id:"admin.dashcounters.status_count_label",defaultMessage:"posts"})}),e(U,{count:v,label:e(d,{id:"admin.dashcounters.domain_count_label",defaultMessage:"peers"})})),e(P,{},void 0,o.admin&&e(p,{to:"/ghostbox/admin/config",label:e(d,{id:"navigation_bar.soapbox_config",defaultMessage:"Soapbox config"})}),e(p,{to:"/ghostbox/admin/log",label:e(d,{id:"column.admin.moderation_log",defaultMessage:"Moderation Log"})}),s.announcements&&e(p,{to:"/ghostbox/admin/announcements",label:e(d,{id:"column.admin.announcements",defaultMessage:"Announcements"})})),o.admin&&y.createElement(y.Fragment,null,e(j,{title:e(d,{id:"admin.dashboard.registration_mode_label",defaultMessage:"Registrations"})}),e(Ke,{})),e(j,{title:e(d,{id:"admin.dashwidgets.software_header",defaultMessage:"Software"})}),e(P,{},void 0,e(p,{label:e(d,{id:"admin.software.frontend",defaultMessage:"Frontend"})},void 0,e("a",{href:"".concat(E.url,"/tree/").concat(E.ref),className:"flex items-center space-x-1 truncate",target:"_blank"},void 0,e("span",{},void 0,E.displayName," ",E.version),e(be,{className:"h-4 w-4",src:_e}))),e(p,{label:e(d,{id:"admin.software.backend",defaultMessage:"Backend"})},void 0,e("span",{},void 0,i.software+(i.build?"+".concat(i.build):"")," ",i.version))),s.emailList&&o.admin&&y.createElement(y.Fragment,null,e(j,{title:e(d,{id:"admin.dashwidgets.email_list_header",defaultMessage:"Email list"})}),e(P,{},void 0,e(p,{label:"subscribers.csv"},void 0,e(H,{src:G,onClick:n,iconClassName:"h-5 w-5"})),e(p,{label:"unsubscribers.csv"},void 0,e(H,{src:G,onClick:c,iconClassName:"h-5 w-5"})),e(p,{label:"combined.csv"},void 0,e(H,{src:G,onClick:l,iconClassName:"h-5 w-5"}))))):null};const Ve="/packs/assets/hourglass-empty-0fb26cd3.svg";var Z=C({viewStatus:{id:"admin.reports.actions.view_status",defaultMessage:"View post"},deleteStatus:{id:"admin.statuses.actions.delete_status",defaultMessage:"Delete post"}}),Qe=function(a){var t=a.status,s=w(),r=R(),o=function(){r(Re(s,t.id))},n=function(){var i=t.getIn(["account","acct"]);return[{text:s.formatMessage(Z.viewStatus,{acct:"@".concat(i)}),to:"/@".concat(i,"/posts/").concat(t.id),icon:Ce},{text:s.formatMessage(Z.deleteStatus,{acct:"@".concat(i)}),action:o,icon:ne,destructive:!0}]},c=n();return e(L,{space:2,alignItems:"start"},void 0,e(_,{space:2,className:"overflow-hidden",grow:!0},void 0,e(Me,{status:t}),e(we,{status:t})),e("div",{className:"flex-none"},void 0,e(se,{items:c,src:re})))},J=C({reportClosed:{id:"admin.reports.report_closed_message",defaultMessage:"Report on @{name} was closed"},deactivateUser:{id:"admin.users.actions.deactivate_user",defaultMessage:"Deactivate @{name}"},deleteUser:{id:"admin.users.actions.delete_user",defaultMessage:"Delete @{name}"}}),Xe=function(a){var t=a.id,s=w(),r=R(),o=A.useCallback(ye(),[]),n=x(function(m){return o(m,t)}),c=A.useState(!1),l=V(c,2),i=l[0],k=l[1];if(!n)return null;var q=n.account,v=n.target_account,S=function(){return[{text:s.formatMessage(J.deactivateUser,{name:v.username}),action:T,icon:Ve},{text:s.formatMessage(J.deleteUser,{name:v.username}),action:g,icon:ne,destructive:!0}]},I=function(){r(ke([n.id])).then(function(){var b=s.formatMessage(J.reportClosed,{name:v.username});ae.success(b)}).catch(function(){})},T=function(){var b=v.id;r(Se(s,b,function(){return I()}))},g=function(){var b=v.id;r(Ie(s,b,function(){return I()}))},f=function(b){k(b)},h=S(),X=n.statuses,Y=X.count(),N=v.acct,$=q.acct;return e(L,{space:3,className:"p-3"},n.id,e(z,{accountId:v.id,inline:!0},void 0,e(F,{to:"/@".concat(N),title:N},void 0,e(xe,{src:v.avatar,size:32,className:"overflow-hidden"}))),e(_,{space:3,className:"overflow-hidden",grow:!0},void 0,e(M,{tag:"h4",weight:"bold"},void 0,e(d,{id:"admin.reports.report_title",defaultMessage:"Report on {acct}",values:{acct:e(z,{accountId:v.id,inline:!0},void 0,e(F,{to:"/@".concat(N),title:N},void 0,"@",N))}})),Y>0&&e(qe,{headline:"Reported posts (".concat(Y,")"),expanded:i,onToggle:f},void 0,e(_,{space:4},void 0,X.map(function(m){return e(Qe,{report:n,status:m},m.id)}))),e(_,{},void 0,(n.comment||"").length>0&&e(M,{tag:"blockquote",dangerouslySetInnerHTML:{__html:n.comment}}),e(L,{space:1},void 0,e(M,{theme:"muted",tag:"span"},void 0,"—"),e(z,{accountId:q.id,inline:!0},void 0,e(F,{to:"/@".concat($),title:$,className:"text-primary-600 hover:underline dark:text-accent-blue"},void 0,"@",$))))),e(L,{space:2,alignItems:"start",className:"flex-none"},void 0,e(Ae,{onClick:I},void 0,e(d,{id:"admin.reports.actions.close",defaultMessage:"Close"})),e(se,{items:h,src:re})))},Ye=C({heading:{id:"column.admin.reports",defaultMessage:"Reports"},modlog:{id:"column.admin.reports.menu.moderation_log",defaultMessage:"Moderation Log"},emptyMessage:{id:"admin.reports.empty_message",defaultMessage:"There are no open reports. If a user gets reported, they will show up here."}}),Ze=function(){var a=w(),t=R(),s=A.useState(!0),r=V(s,2),o=r[0],n=r[1],c=x(function(i){return i.admin.openReports.toList()});A.useEffect(function(){t(Ne()).then(function(){return n(!1)}).catch(function(){})},[]);var l=o&&c.count()===0;return e(oe,{isLoading:o,showLoading:l,scrollKey:"admin-reports",emptyMessage:a.formatMessage(Ye.emptyMessage),className:"divide-y divide-solid divide-gray-200 dark:divide-gray-800"},void 0,c.map(function(i){return i&&e(Xe,{id:i},i)}))},ea=C({heading:{id:"column.admin.dashboard",defaultMessage:"Dashboard"}}),ua=function(){var a=w(),t=te(),s=t.account;return s?e(De,{label:a.formatMessage(ea.heading),withHeader:!1},void 0,e(Te,{}),e(Ue,{},void 0,e(O,{path:"/ghostbox/admin",exact:!0,component:Je}),e(O,{path:"/ghostbox/admin/reports",exact:!0,component:Ze}),e(O,{path:"/ghostbox/admin/approval",exact:!0,component:Pe}))):null};export{ua as default}; +import{u as w,gF as ie,q as x,a as e,T as de,o as C,d as R,b3 as ce,a2 as _,y as M,H as L,gG as ue,gH as le,r as A,at as V,gI as ve,fz as Q,gJ as me,gK as pe,L as F,R as y,af as P,ag as p,t as ee,F as d,eo as ge,bp as ae,gL as D,g as fe,b8 as te,gM as he,cy as j,aG as H,gN as E,A as be,ch as _e,bR as Me,gO as we,cO as se,J as Ce,aH as ne,gP as Re,gQ as ye,gR as z,c7 as xe,aa as Ae,gS as ke,ci as Se,cj as Ie,gT as Ne,X as De,f_ as Ue,f$ as O}from"../index-be605fd2.js";import{S as oe}from"./scrollable-list-1e43c72d.js";import{A as Le}from"./authorize-reject-buttons-1aaf0a6a.js";import{v as G}from"./download-ac53125a.js";import{d as B}from"./download-2e3dfb39.js";import{v as re}from"./dots-vertical-68cbc8e2.js";import{A as qe}from"./accordion-0fbf6d28.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var W=C({dashboard:{id:"admin_nav.dashboard",defaultMessage:"Dashboard"},reports:{id:"admin_nav.reports",defaultMessage:"Reports"},waitlist:{id:"admin_nav.awaiting_approval",defaultMessage:"Waitlist"}}),Te=function(){var a=w(),t=ie(),s=x(function(n){return n.admin.awaitingApproval.count()}),r=x(function(n){return n.admin.openReports.count()}),o=[{name:"/ghostbox/admin",text:a.formatMessage(W.dashboard),to:"/ghostbox/admin"},{name:"/ghostbox/admin/reports",text:a.formatMessage(W.reports),to:"/ghostbox/admin/reports",count:r},{name:"/ghostbox/admin/approval",text:a.formatMessage(W.waitlist),to:"/ghostbox/admin/approval",count:s}];return e(de,{items:o,activeItem:t.path})},Ee=function(a){var t=a.accountId,s=R(),r=ce(t),o=r.account,n=x(function(i){return i.admin.users.get(t)});if(!o)return null;var c=function(){return s(ue([o.id]))},l=function(){return s(le([o.id]))};return e(L,{space:4,justifyContent:"between"},void 0,e(_,{space:1},void 0,e(M,{weight:"semibold"},void 0,"@",o.acct),e(M,{tag:"blockquote",size:"sm"},void 0,(n==null?void 0:n.invite_request)||"")),e(_,{justifyContent:"center"},void 0,e(Le,{onAuthorize:c,onReject:l,countdown:3e3})))},Fe=C({heading:{id:"column.admin.awaiting_approval",defaultMessage:"Awaiting Approval"},emptyMessage:{id:"admin.awaiting_approval.empty_message",defaultMessage:"There is nobody waiting for approval. When a new user signs up, you can review them here."}}),Pe=function(){var a=w(),t=R(),s=x(function(i){return i.admin.awaitingApproval}),r=A.useState(!0),o=V(r,2),n=o[0],c=o[1];A.useEffect(function(){t(ve(["local","need_approval"])).then(function(){return c(!1)}).catch(function(){})},[]);var l=n&&s.count()===0;return e(oe,{isLoading:n,showLoading:l,scrollKey:"awaiting-approval",emptyMessage:a.formatMessage(Fe.emptyMessage),className:"divide-y divide-solid divide-gray-200 dark:divide-gray-800"},void 0,s.map(function(i){return e("div",{className:"px-5 py-4"},i,e(Ee,{accountId:i}))}))};const $e=()=>(u,a)=>Q(a).get("/api/v1/pleroma/admin/email_list/subscribers.csv"),je=()=>(u,a)=>Q(a).get("/api/v1/pleroma/admin/email_list/unsubscribers.csv"),He=()=>(u,a)=>Q(a).get("/api/v1/pleroma/admin/email_list/combined.csv");var U=function(a){var t=a.count,s=a.label,r=a.to,o=r===void 0?"#":r,n=a.percent,c=n===void 0?!1:n;return me(t)?e(F,{className:"flex cursor-pointer flex-col items-center space-y-2 rounded bg-gray-200 p-4 transition-transform hover:-translate-y-1 dark:bg-gray-800",to:o},void 0,e(M,{align:"center",size:"2xl",weight:"medium"},void 0,e(pe,{value:t,style:c?"unit":void 0,unit:c?"percent":void 0})),e(M,{align:"center"},void 0,s)):null},ze=function(a){var t=a.children;return e("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3"},void 0,t)},Oe=function(a){var t=a.onChange,s=a.children,r=y.Children.map(s,function(o){return y.cloneElement(o,{onChange:t})});return e(P,{},void 0,r)},K=function(a){var t=a.label,s=a.hint,r=a.checked,o=r===void 0?!1:r,n=a.onChange,c=a.value;return e(p,{label:t,hint:s},void 0,e("input",{type:"radio",checked:o,onChange:n,value:c,className:"h-4 w-4 border-gray-300 text-primary-600 focus:ring-primary-500"}))},Ge=C({saved:{id:"admin.dashboard.settings_saved",defaultMessage:"Settings saved!"}}),Be=function(a){var t={open:[D(":registrations_open",!0),D(":account_approval_required",!1)],approval:[D(":registrations_open",!0),D(":account_approval_required",!0)],closed:[D(":registrations_open",!1)]};return[{group:":pleroma",key:":instance",value:t[a]}]},We=function(a){return a.approval_required&&a.registrations?"approval":a.registrations?"open":"closed"},Ke=function(){var a=w(),t=R(),s=ee(),r=We(s),o=function(c){var l=Be(c.target.value);t(ge(l)).then(function(){ae.success(a.formatMessage(Ge.saved))}).catch(function(){})};return e(Oe,{onChange:o},void 0,e(K,{label:e(d,{id:"admin.dashboard.registration_mode.open_label",defaultMessage:"Open"}),hint:e(d,{id:"admin.dashboard.registration_mode.open_hint",defaultMessage:"Anyone can join."}),checked:r==="open",value:"open"}),e(K,{label:e(d,{id:"admin.dashboard.registration_mode.approval_label",defaultMessage:"Approval Required"}),hint:e(d,{id:"admin.dashboard.registration_mode.approval_hint",defaultMessage:"Users can sign up, but their account only gets activated when an admin approves it."}),checked:r==="approval",value:"approval"}),e(K,{label:e(d,{id:"admin.dashboard.registration_mode.closed_label",defaultMessage:"Closed"}),hint:e(d,{id:"admin.dashboard.registration_mode.closed_hint",defaultMessage:"Nobody can sign up. You can still invite people."}),checked:r==="closed",value:"closed"}))},Je=function(){var a=R(),t=ee(),s=fe(),r=te(),o=r.account,n=function(g){a($e()).then(function(f){var h=f.data;B(h,"subscribers.csv")}).catch(function(){}),g.preventDefault()},c=function(g){a(je()).then(function(f){var h=f.data;B(h,"unsubscribers.csv")}).catch(function(){}),g.preventDefault()},l=function(g){a(He()).then(function(f){var h=f.data;B(h,"combined.csv")}).catch(function(){}),g.preventDefault()},i=he(t.version),k=t.stats.user_count,q=t.stats.status_count,v=t.stats.domain_count,S=t.pleroma.stats.mau,I=k&&S?Math.round(S/k*100):void 0;return o?e(_,{space:6,className:"mt-4"},void 0,e(ze,{},void 0,e(U,{count:S,label:e(d,{id:"admin.dashcounters.mau_label",defaultMessage:"monthly active users"})}),e(U,{to:"/ghostbox/admin/users",count:k,label:e(d,{id:"admin.dashcounters.user_count_label",defaultMessage:"total users"})}),e(U,{count:I,label:e(d,{id:"admin.dashcounters.retention_label",defaultMessage:"user retention"}),percent:!0}),e(U,{to:"/timeline/local",count:q,label:e(d,{id:"admin.dashcounters.status_count_label",defaultMessage:"posts"})}),e(U,{count:v,label:e(d,{id:"admin.dashcounters.domain_count_label",defaultMessage:"peers"})})),e(P,{},void 0,o.admin&&e(p,{to:"/ghostbox/admin/config",label:e(d,{id:"navigation_bar.soapbox_config",defaultMessage:"Soapbox config"})}),e(p,{to:"/ghostbox/admin/log",label:e(d,{id:"column.admin.moderation_log",defaultMessage:"Moderation Log"})}),s.announcements&&e(p,{to:"/ghostbox/admin/announcements",label:e(d,{id:"column.admin.announcements",defaultMessage:"Announcements"})})),o.admin&&y.createElement(y.Fragment,null,e(j,{title:e(d,{id:"admin.dashboard.registration_mode_label",defaultMessage:"Registrations"})}),e(Ke,{})),e(j,{title:e(d,{id:"admin.dashwidgets.software_header",defaultMessage:"Software"})}),e(P,{},void 0,e(p,{label:e(d,{id:"admin.software.frontend",defaultMessage:"Frontend"})},void 0,e("a",{href:"".concat(E.url,"/tree/").concat(E.ref),className:"flex items-center space-x-1 truncate",target:"_blank"},void 0,e("span",{},void 0,E.displayName," ",E.version),e(be,{className:"h-4 w-4",src:_e}))),e(p,{label:e(d,{id:"admin.software.backend",defaultMessage:"Backend"})},void 0,e("span",{},void 0,i.software+(i.build?"+".concat(i.build):"")," ",i.version))),s.emailList&&o.admin&&y.createElement(y.Fragment,null,e(j,{title:e(d,{id:"admin.dashwidgets.email_list_header",defaultMessage:"Email list"})}),e(P,{},void 0,e(p,{label:"subscribers.csv"},void 0,e(H,{src:G,onClick:n,iconClassName:"h-5 w-5"})),e(p,{label:"unsubscribers.csv"},void 0,e(H,{src:G,onClick:c,iconClassName:"h-5 w-5"})),e(p,{label:"combined.csv"},void 0,e(H,{src:G,onClick:l,iconClassName:"h-5 w-5"}))))):null};const Ve="/packs/assets/hourglass-empty-0fb26cd3.svg";var Z=C({viewStatus:{id:"admin.reports.actions.view_status",defaultMessage:"View post"},deleteStatus:{id:"admin.statuses.actions.delete_status",defaultMessage:"Delete post"}}),Qe=function(a){var t=a.status,s=w(),r=R(),o=function(){r(Re(s,t.id))},n=function(){var i=t.getIn(["account","acct"]);return[{text:s.formatMessage(Z.viewStatus,{acct:"@".concat(i)}),to:"/@".concat(i,"/posts/").concat(t.id),icon:Ce},{text:s.formatMessage(Z.deleteStatus,{acct:"@".concat(i)}),action:o,icon:ne,destructive:!0}]},c=n();return e(L,{space:2,alignItems:"start"},void 0,e(_,{space:2,className:"overflow-hidden",grow:!0},void 0,e(Me,{status:t}),e(we,{status:t})),e("div",{className:"flex-none"},void 0,e(se,{items:c,src:re})))},J=C({reportClosed:{id:"admin.reports.report_closed_message",defaultMessage:"Report on @{name} was closed"},deactivateUser:{id:"admin.users.actions.deactivate_user",defaultMessage:"Deactivate @{name}"},deleteUser:{id:"admin.users.actions.delete_user",defaultMessage:"Delete @{name}"}}),Xe=function(a){var t=a.id,s=w(),r=R(),o=A.useCallback(ye(),[]),n=x(function(m){return o(m,t)}),c=A.useState(!1),l=V(c,2),i=l[0],k=l[1];if(!n)return null;var q=n.account,v=n.target_account,S=function(){return[{text:s.formatMessage(J.deactivateUser,{name:v.username}),action:T,icon:Ve},{text:s.formatMessage(J.deleteUser,{name:v.username}),action:g,icon:ne,destructive:!0}]},I=function(){r(ke([n.id])).then(function(){var b=s.formatMessage(J.reportClosed,{name:v.username});ae.success(b)}).catch(function(){})},T=function(){var b=v.id;r(Se(s,b,function(){return I()}))},g=function(){var b=v.id;r(Ie(s,b,function(){return I()}))},f=function(b){k(b)},h=S(),X=n.statuses,Y=X.count(),N=v.acct,$=q.acct;return e(L,{space:3,className:"p-3"},n.id,e(z,{accountId:v.id,inline:!0},void 0,e(F,{to:"/@".concat(N),title:N},void 0,e(xe,{src:v.avatar,size:32,className:"overflow-hidden"}))),e(_,{space:3,className:"overflow-hidden",grow:!0},void 0,e(M,{tag:"h4",weight:"bold"},void 0,e(d,{id:"admin.reports.report_title",defaultMessage:"Report on {acct}",values:{acct:e(z,{accountId:v.id,inline:!0},void 0,e(F,{to:"/@".concat(N),title:N},void 0,"@",N))}})),Y>0&&e(qe,{headline:"Reported posts (".concat(Y,")"),expanded:i,onToggle:f},void 0,e(_,{space:4},void 0,X.map(function(m){return e(Qe,{report:n,status:m},m.id)}))),e(_,{},void 0,(n.comment||"").length>0&&e(M,{tag:"blockquote",dangerouslySetInnerHTML:{__html:n.comment}}),e(L,{space:1},void 0,e(M,{theme:"muted",tag:"span"},void 0,"—"),e(z,{accountId:q.id,inline:!0},void 0,e(F,{to:"/@".concat($),title:$,className:"text-primary-600 hover:underline dark:text-accent-blue"},void 0,"@",$))))),e(L,{space:2,alignItems:"start",className:"flex-none"},void 0,e(Ae,{onClick:I},void 0,e(d,{id:"admin.reports.actions.close",defaultMessage:"Close"})),e(se,{items:h,src:re})))},Ye=C({heading:{id:"column.admin.reports",defaultMessage:"Reports"},modlog:{id:"column.admin.reports.menu.moderation_log",defaultMessage:"Moderation Log"},emptyMessage:{id:"admin.reports.empty_message",defaultMessage:"There are no open reports. If a user gets reported, they will show up here."}}),Ze=function(){var a=w(),t=R(),s=A.useState(!0),r=V(s,2),o=r[0],n=r[1],c=x(function(i){return i.admin.openReports.toList()});A.useEffect(function(){t(Ne()).then(function(){return n(!1)}).catch(function(){})},[]);var l=o&&c.count()===0;return e(oe,{isLoading:o,showLoading:l,scrollKey:"admin-reports",emptyMessage:a.formatMessage(Ye.emptyMessage),className:"divide-y divide-solid divide-gray-200 dark:divide-gray-800"},void 0,c.map(function(i){return i&&e(Xe,{id:i},i)}))},ea=C({heading:{id:"column.admin.dashboard",defaultMessage:"Dashboard"}}),ua=function(){var a=w(),t=te(),s=t.account;return s?e(De,{label:a.formatMessage(ea.heading),withHeader:!1},void 0,e(Te,{}),e(Ue,{},void 0,e(O,{path:"/ghostbox/admin",exact:!0,component:Je}),e(O,{path:"/ghostbox/admin/reports",exact:!0,component:Ze}),e(O,{path:"/ghostbox/admin/approval",exact:!0,component:Pe}))):null};export{ua as default}; diff --git a/packs/js/index-71d7c29c.js b/packs/js/index-b320f3f0.js similarity index 69% rename from packs/js/index-71d7c29c.js rename to packs/js/index-b320f3f0.js index 2f5366701..c47e4ec2a 100644 --- a/packs/js/index-71d7c29c.js +++ b/packs/js/index-b320f3f0.js @@ -1 +1 @@ -import{a3 as d,u as f,d as y,f as v,q as g,r as h,ab as o,a as i,F as M,X as T,o as x}from"../index-7380452a.js";import{P as R}from"./pull-to-refresh-b8beecbe.js";import{T as b}from"./timeline-585cfcf0.js";import"./scroll-top-button-95820d24.js";import"./status-list-13fdd81b.js";import"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";import"./status-container-59e57baf.js";import"./pending-status-7f660229.js";import"./poll-preview-66340c9e.js";import"./noop-19c18e1e.js";function C({onlyMedia:a}={}){return d(`community${a?":media":""}`,`public:local${a?":media":""}`)}var I=x({title:{id:"column.community",defaultMessage:"Local timeline"}}),N=function(){var s=f(),m=y(),l=v(),e=!!l.getIn(["community","other","onlyMedia"],!1),u=g(function(n){var t;return(t=n.timelines.get("community"))===null||t===void 0?void 0:t.next}),r="community",c=function(t){m(o({url:u,maxId:t,onlyMedia:e}))},p=function(){return m(o({onlyMedia:e}))};return C({onlyMedia:e}),h.useEffect(function(){m(o({onlyMedia:e}))},[e]),i(T,{className:"-mt-3 sm:mt-0",label:s.formatMessage(I.title),transparent:!0},void 0,i(R,{onRefresh:p},void 0,i(b,{scrollKey:"".concat(r,"_timeline"),timelineId:"".concat(r).concat(e?":media":""),prefix:"home",onLoadMore:c,emptyMessage:i(M,{id:"empty_column.community",defaultMessage:"The local timeline is empty. Write something publicly to get the ball rolling!"}),divideType:"space"})))};export{N as default}; +import{a3 as d,u as f,d as y,f as v,q as g,r as h,ab as o,a as i,F as M,X as T,o as x}from"../index-be605fd2.js";import{P as R}from"./pull-to-refresh-a7e092ab.js";import{T as b}from"./timeline-456dace7.js";import"./scroll-top-button-73ec9889.js";import"./status-list-c10445e1.js";import"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";import"./status-container-e53698d2.js";import"./pending-status-959f7aeb.js";import"./poll-preview-ddaf662b.js";import"./noop-3f99ae3e.js";function C({onlyMedia:a}={}){return d(`community${a?":media":""}`,`public:local${a?":media":""}`)}var I=x({title:{id:"column.community",defaultMessage:"Local timeline"}}),N=function(){var s=f(),m=y(),l=v(),e=!!l.getIn(["community","other","onlyMedia"],!1),u=g(function(n){var t;return(t=n.timelines.get("community"))===null||t===void 0?void 0:t.next}),r="community",c=function(t){m(o({url:u,maxId:t,onlyMedia:e}))},p=function(){return m(o({onlyMedia:e}))};return C({onlyMedia:e}),h.useEffect(function(){m(o({onlyMedia:e}))},[e]),i(T,{className:"-mt-3 sm:mt-0",label:s.formatMessage(I.title),transparent:!0},void 0,i(R,{onRefresh:p},void 0,i(b,{scrollKey:"".concat(r,"_timeline"),timelineId:"".concat(r).concat(e?":media":""),prefix:"home",onLoadMore:c,emptyMessage:i(M,{id:"empty_column.community",defaultMessage:"The local timeline is empty. Write something publicly to get the ball rolling!"}),divideType:"space"})))};export{N as default}; diff --git a/packs/js/index-4f4d03b8.js b/packs/js/index-b4b4f3e9.js similarity index 74% rename from packs/js/index-4f4d03b8.js rename to packs/js/index-b4b4f3e9.js index c50f16ecc..bf8bba4a9 100644 --- a/packs/js/index-4f4d03b8.js +++ b/packs/js/index-b4b4f3e9.js @@ -1 +1 @@ -import{ar as g,a3 as L,d as T,ay as M,q as o,r as y,az as _,aA as l,a as e,aB as C,X as d,aC as E,F as m,aa as I,aD as b}from"../index-7380452a.js";import{T as k}from"./timeline-585cfcf0.js";import"./scroll-top-button-95820d24.js";import"./status-list-13fdd81b.js";import"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";import"./status-container-59e57baf.js";import"./pending-status-7f660229.js";import"./poll-preview-66340c9e.js";import"./noop-19c18e1e.js";function x(r){const{isLoggedIn:i}=g();return L(`list:${r}`,`list&list=${r}`,null,null,{enabled:i})}var K=function(){var i=T(),p=M(),t=p.id,n=o(function(a){return a.lists.get(t)}),u=o(function(a){var s;return(s=a.timelines.get("list:".concat(t)))===null||s===void 0?void 0:s.next});x(t),y.useEffect(function(){i(_(t)),i(l(t))},[t]);var c=function(s){i(l(t,{url:u,maxId:s}))},f=function(){i(b("LIST_EDITOR",{listId:t}))},v=n?n.title:t;if(typeof n>"u")return e(d,{},void 0,e("div",{},void 0,e(C,{})));if(n===!1)return e(E,{});var h=e("div",{},void 0,e(m,{id:"empty_column.list",defaultMessage:"There is nothing in this list yet. When members of this list create new posts, they will appear here."}),e("br",{}),e("br",{}),e(I,{onClick:f},void 0,e(m,{id:"list.click_to_add",defaultMessage:"Click here to add people"})));return e(d,{label:v,transparent:!0},void 0,e(k,{scrollKey:"list_timeline",timelineId:"list:".concat(t),onLoadMore:c,emptyMessage:h,divideType:"space"}))};export{K as default}; +import{ar as g,a3 as L,d as T,ay as M,q as o,r as y,az as _,aA as l,a as e,aB as C,X as d,aC as E,F as m,aa as I,aD as b}from"../index-be605fd2.js";import{T as k}from"./timeline-456dace7.js";import"./scroll-top-button-73ec9889.js";import"./status-list-c10445e1.js";import"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";import"./status-container-e53698d2.js";import"./pending-status-959f7aeb.js";import"./poll-preview-ddaf662b.js";import"./noop-3f99ae3e.js";function x(r){const{isLoggedIn:i}=g();return L(`list:${r}`,`list&list=${r}`,null,null,{enabled:i})}var K=function(){var i=T(),p=M(),t=p.id,n=o(function(a){return a.lists.get(t)}),u=o(function(a){var s;return(s=a.timelines.get("list:".concat(t)))===null||s===void 0?void 0:s.next});x(t),y.useEffect(function(){i(_(t)),i(l(t))},[t]);var c=function(s){i(l(t,{url:u,maxId:s}))},f=function(){i(b("LIST_EDITOR",{listId:t}))},v=n?n.title:t;if(typeof n>"u")return e(d,{},void 0,e("div",{},void 0,e(C,{})));if(n===!1)return e(E,{});var h=e("div",{},void 0,e(m,{id:"empty_column.list",defaultMessage:"There is nothing in this list yet. When members of this list create new posts, they will appear here."}),e("br",{}),e("br",{}),e(I,{onClick:f},void 0,e(m,{id:"list.click_to_add",defaultMessage:"Click here to add people"})));return e(d,{label:v,transparent:!0},void 0,e(k,{scrollKey:"list_timeline",timelineId:"list:".concat(t),onLoadMore:c,emptyMessage:h,divideType:"space"}))};export{K as default}; diff --git a/packs/js/index-0de3a47b.js b/packs/js/index-ba6fc339.js similarity index 98% rename from packs/js/index-0de3a47b.js rename to packs/js/index-ba6fc339.js index e0e02d3d3..8430fe4ba 100644 --- a/packs/js/index-0de3a47b.js +++ b/packs/js/index-ba6fc339.js @@ -1,4 +1,4 @@ -import{fz as i,bp as d,o as l,fA as S,fB as T,d as M,u as x,r as C,at as h,a as n,bI as v,aa as L,y as m,bE as y,X as R}from"../index-7380452a.js";const w="EXPORT_FOLLOWS_REQUEST",k="EXPORT_FOLLOWS_SUCCESS",U="EXPORT_FOLLOWS_FAIL",X="EXPORT_BLOCKS_REQUEST",P="EXPORT_BLOCKS_SUCCESS",A="EXPORT_BLOCKS_FAIL",F="EXPORT_MUTES_REQUEST",B="EXPORT_MUTES_SUCCESS",I="EXPORT_MUTES_FAIL",_=l({blocksSuccess:{id:"export_data.success.blocks",defaultMessage:"Blocks exported successfully"},followersSuccess:{id:"export_data.success.followers",defaultMessage:"Followers exported successfully"},mutesSuccess:{id:"export_data.success.mutes",defaultMessage:"Mutes exported successfully"}});function p(s,t){const e=document.createElement("a");e.setAttribute("href","data:text/csv;charset=utf-8,"+encodeURIComponent(s)),e.setAttribute("download",t),e.style.display="none",document.body.appendChild(e),e.click(),document.body.removeChild(e)}const f=s=>async t=>{const e=t.data;let a=[],c=S(t).refs.find(o=>o.rel==="next");for(;c;)t=await i(s).get(c.uri),c=S(t).refs.find(o=>o.rel==="next"),Array.prototype.push.apply(e,t.data);return a=e.map(o=>T(o).fqn),Array.from(new Set(a))},K=()=>(s,t)=>{s({type:w});const e=t().me;return i(t).get(`/api/v1/accounts/${e}/following?limit=40`).then(f(t)).then(a=>{a=a.map(c=>c+",true"),a.unshift("Account address,Show boosts"),p(a.join(` +import{fz as i,bp as d,o as l,fA as S,fB as T,d as M,u as x,r as C,at as h,a as n,bI as v,aa as L,y as m,bE as y,X as R}from"../index-be605fd2.js";const w="EXPORT_FOLLOWS_REQUEST",k="EXPORT_FOLLOWS_SUCCESS",U="EXPORT_FOLLOWS_FAIL",X="EXPORT_BLOCKS_REQUEST",P="EXPORT_BLOCKS_SUCCESS",A="EXPORT_BLOCKS_FAIL",F="EXPORT_MUTES_REQUEST",B="EXPORT_MUTES_SUCCESS",I="EXPORT_MUTES_FAIL",_=l({blocksSuccess:{id:"export_data.success.blocks",defaultMessage:"Blocks exported successfully"},followersSuccess:{id:"export_data.success.followers",defaultMessage:"Followers exported successfully"},mutesSuccess:{id:"export_data.success.mutes",defaultMessage:"Mutes exported successfully"}});function p(s,t){const e=document.createElement("a");e.setAttribute("href","data:text/csv;charset=utf-8,"+encodeURIComponent(s)),e.setAttribute("download",t),e.style.display="none",document.body.appendChild(e),e.click(),document.body.removeChild(e)}const f=s=>async t=>{const e=t.data;let a=[],c=S(t).refs.find(o=>o.rel==="next");for(;c;)t=await i(s).get(c.uri),c=S(t).refs.find(o=>o.rel==="next"),Array.prototype.push.apply(e,t.data);return a=e.map(o=>T(o).fqn),Array.from(new Set(a))},K=()=>(s,t)=>{s({type:w});const e=t().me;return i(t).get(`/api/v1/accounts/${e}/following?limit=40`).then(f(t)).then(a=>{a=a.map(c=>c+",true"),a.unshift("Account address,Show boosts"),p(a.join(` `),"export_followings.csv"),d.success(_.followersSuccess),s({type:k})}).catch(a=>{s({type:U,error:a})})},Q=()=>(s,t)=>(s({type:X}),i(t).get("/api/v1/blocks?limit=40").then(f(t)).then(e=>{p(e.join(` `),"export_block.csv"),d.success(_.blocksSuccess),s({type:P})}).catch(e=>{s({type:A,error:e})})),W=()=>(s,t)=>(s({type:F}),i(t).get("/api/v1/mutes?limit=40").then(f(t)).then(e=>{p(e.join(` `),"export_mutes.csv"),d.success(_.mutesSuccess),s({type:B})}).catch(e=>{s({type:I,error:e})}));var u=function(t){var e=t.messages,a=t.action,c=M(),o=x(),g=C.useState(!1),E=h(g,2),O=E[0],r=E[1],b=function($){r(!0),c(a()).then(function(){r(!1)}).catch(function(){r(!1)})};return n(y,{},void 0,n(m,{size:"xl",weight:"bold"},void 0,o.formatMessage(e.input_label)),n(m,{theme:"muted"},void 0,o.formatMessage(e.input_hint)),n(v,{},void 0,n(L,{theme:"primary",onClick:b,disabled:O},void 0,o.formatMessage(e.submit))))},V=l({heading:{id:"column.export_data",defaultMessage:"Export data"},submit:{id:"export_data.actions.export",defaultMessage:"Export"}}),D=l({input_label:{id:"export_data.follows_label",defaultMessage:"Follows"},input_hint:{id:"export_data.hints.follows",defaultMessage:"Get a CSV file containing a list of followed accounts"},submit:{id:"export_data.actions.export_follows",defaultMessage:"Export follows"}}),j=l({input_label:{id:"export_data.blocks_label",defaultMessage:"Blocks"},input_hint:{id:"export_data.hints.blocks",defaultMessage:"Get a CSV file containing a list of blocked accounts"},submit:{id:"export_data.actions.export_blocks",defaultMessage:"Export blocks"}}),z=l({input_label:{id:"export_data.mutes_label",defaultMessage:"Mutes"},input_hint:{id:"export_data.hints.mutes",defaultMessage:"Get a CSV file containing a list of muted accounts"},submit:{id:"export_data.actions.export_mutes",defaultMessage:"Export mutes"}}),H=function(){var t=x();return n(R,{label:t.formatMessage(V.heading)},void 0,n(u,{action:K,messages:D}),n(u,{action:Q,messages:j}),n(u,{action:W,messages:z}))};export{H as default}; diff --git a/packs/js/index-df990da1.js b/packs/js/index-c3905184.js similarity index 93% rename from packs/js/index-df990da1.js rename to packs/js/index-c3905184.js index 11ea288b2..50ca57313 100644 --- a/packs/js/index-df990da1.js +++ b/packs/js/index-c3905184.js @@ -1 +1 @@ -import{u as C,d as M,q as f,a as e,a5 as h,a9 as v,bW as R,I as b,aF as I,o as L,eM as _,eN as w,M as x,r as N,eO as k,eP as F,eL as m,cy as g,B as q,F as E,bu as P}from"../index-7380452a.js";import{N as D}from"./new-list-form-085135e5.js";var p=L({remove:{id:"lists.account.remove",defaultMessage:"Remove from list"},add:{id:"lists.account.add",defaultMessage:"Add to list"}}),S=function(s){var t=s.listId,l=C(),r=M(),o=f(function(d){return d.lists.get(t)}),u=f(function(d){return d.listAdder.lists.items.includes(t)}),c=function(){return r(_(t))},i=function(){return r(w(t))};if(!o)return null;var n;return u?n=e(v,{iconClassName:"h-5 w-5",src:h,title:l.formatMessage(p.remove),onClick:c}):n=e(v,{iconClassName:"h-5 w-5",src:R,title:l.formatMessage(p.add),onClick:i}),e("div",{className:"flex items-center gap-1.5 px-2 py-4 text-black dark:text-white"},void 0,e(b,{src:I}),e("span",{className:"grow"},void 0,o.title),n)},A=L({close:{id:"lightbox.close",defaultMessage:"Close"},subheading:{id:"lists.subheading",defaultMessage:"Your lists"},add:{id:"lists.new.create",defaultMessage:"Add List"}}),T=x([function(a){return a.lists}],function(a){return a&&a.toList().filter(function(s){return!!s}).sort(function(s,t){return s.title.localeCompare(t.title)})}),O=function(s){var t=s.accountId,l=s.onClose,r=C(),o=M(),u=f(function(i){return T(i).map(function(n){return n.id})});N.useEffect(function(){return o(k(t)),function(){o(F())}},[]);var c=function(){l("LIST_ADDER")};return e(P,{title:e(E,{id:"list_adder.header_title",defaultMessage:"Add or Remove from Lists"}),onClose:c},void 0,e(q,{id:t,withRelationship:!1}),e("br",{}),e(m,{},void 0,e(g,{title:r.formatMessage(A.add)})),e(D,{}),e("br",{}),e(m,{},void 0,e(g,{title:r.formatMessage(A.subheading)})),e("div",{},void 0,u.map(function(i){return e(S,{listId:i},i)})))};export{O as default}; +import{u as C,d as M,q as f,a as e,a5 as h,a9 as v,bW as R,I as b,aF as I,o as L,eM as _,eN as w,M as x,r as N,eO as k,eP as F,eL as m,cy as g,B as q,F as E,bu as P}from"../index-be605fd2.js";import{N as D}from"./new-list-form-396f644a.js";var p=L({remove:{id:"lists.account.remove",defaultMessage:"Remove from list"},add:{id:"lists.account.add",defaultMessage:"Add to list"}}),S=function(s){var t=s.listId,l=C(),r=M(),o=f(function(d){return d.lists.get(t)}),u=f(function(d){return d.listAdder.lists.items.includes(t)}),c=function(){return r(_(t))},i=function(){return r(w(t))};if(!o)return null;var n;return u?n=e(v,{iconClassName:"h-5 w-5",src:h,title:l.formatMessage(p.remove),onClick:c}):n=e(v,{iconClassName:"h-5 w-5",src:R,title:l.formatMessage(p.add),onClick:i}),e("div",{className:"flex items-center gap-1.5 px-2 py-4 text-black dark:text-white"},void 0,e(b,{src:I}),e("span",{className:"grow"},void 0,o.title),n)},A=L({close:{id:"lightbox.close",defaultMessage:"Close"},subheading:{id:"lists.subheading",defaultMessage:"Your lists"},add:{id:"lists.new.create",defaultMessage:"Add List"}}),T=x([function(a){return a.lists}],function(a){return a&&a.toList().filter(function(s){return!!s}).sort(function(s,t){return s.title.localeCompare(t.title)})}),O=function(s){var t=s.accountId,l=s.onClose,r=C(),o=M(),u=f(function(i){return T(i).map(function(n){return n.id})});N.useEffect(function(){return o(k(t)),function(){o(F())}},[]);var c=function(){l("LIST_ADDER")};return e(P,{title:e(E,{id:"list_adder.header_title",defaultMessage:"Add or Remove from Lists"}),onClose:c},void 0,e(q,{id:t,withRelationship:!1}),e("br",{}),e(m,{},void 0,e(g,{title:r.formatMessage(A.add)})),e(D,{}),e("br",{}),e(m,{},void 0,e(g,{title:r.formatMessage(A.subheading)})),e("div",{},void 0,u.map(function(i){return e(S,{listId:i},i)})))};export{O as default}; diff --git a/packs/js/index-faefcaa0.js b/packs/js/index-d390d93a.js similarity index 84% rename from packs/js/index-faefcaa0.js rename to packs/js/index-d390d93a.js index 035ebca2d..ec5e91fb8 100644 --- a/packs/js/index-faefcaa0.js +++ b/packs/js/index-d390d93a.js @@ -1 +1 @@ -import{d as i,b3 as v,a as o,b2 as m,b4 as p,b5 as h,Q as w,b6 as q,u as A,q as l,R,b7 as g,aB as M,X as c,o as _,F as b}from"../index-7380452a.js";import{S as F}from"./scrollable-list-df58e451.js";import{A as y}from"./authorize-reject-buttons-f28a0539.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var z=function(a){var t=a.id,s=i(),n=v(t),r=n.account,e=function(){return s(p(t))},f=function(){return s(h(t))};return r?o("div",{className:"p-2.5"},void 0,o(m,{account:r,action:o(y,{onAuthorize:e,onReject:f,countdown:3e3})})):null},j=_({heading:{id:"column.follow_requests",defaultMessage:"Follow requests"}}),L=w(function(u){u(q())},300,{leading:!0}),C=function(){var a=i(),t=A(),s=l(function(e){return e.user_lists.follow_requests.items}),n=l(function(e){return!!e.user_lists.follow_requests.next});if(R.useEffect(function(){a(g())},[]),!s)return o(c,{},void 0,o(M,{}));var r=o(b,{id:"empty_column.follow_requests",defaultMessage:"You don't have any follow requests yet. When you receive one, it will show up here."});return o(c,{label:t.formatMessage(j.heading)},void 0,o(F,{scrollKey:"follow_requests",onLoadMore:function(){return L(a)},hasMore:n,emptyMessage:r},void 0,s.map(function(e){return o(z,{id:e},e)})))};export{C as default}; +import{d as i,b3 as v,a as o,b2 as m,b4 as p,b5 as h,Q as w,b6 as q,u as A,q as l,R,b7 as g,aB as M,X as c,o as _,F as b}from"../index-be605fd2.js";import{S as F}from"./scrollable-list-1e43c72d.js";import{A as y}from"./authorize-reject-buttons-1aaf0a6a.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var z=function(a){var t=a.id,s=i(),n=v(t),r=n.account,e=function(){return s(p(t))},f=function(){return s(h(t))};return r?o("div",{className:"p-2.5"},void 0,o(m,{account:r,action:o(y,{onAuthorize:e,onReject:f,countdown:3e3})})):null},j=_({heading:{id:"column.follow_requests",defaultMessage:"Follow requests"}}),L=w(function(u){u(q())},300,{leading:!0}),C=function(){var a=i(),t=A(),s=l(function(e){return e.user_lists.follow_requests.items}),n=l(function(e){return!!e.user_lists.follow_requests.next});if(R.useEffect(function(){a(g())},[]),!s)return o(c,{},void 0,o(M,{}));var r=o(b,{id:"empty_column.follow_requests",defaultMessage:"You don't have any follow requests yet. When you receive one, it will show up here."});return o(c,{label:t.formatMessage(j.heading)},void 0,o(F,{scrollKey:"follow_requests",onLoadMore:function(){return L(a)},hasMore:n,emptyMessage:r},void 0,s.map(function(e){return o(z,{id:e},e)})))};export{C as default}; diff --git a/packs/js/index-7b6c023e.js b/packs/js/index-d7234eb4.js similarity index 85% rename from packs/js/index-7b6c023e.js rename to packs/js/index-d7234eb4.js index d738c67eb..ba365af00 100644 --- a/packs/js/index-7b6c023e.js +++ b/packs/js/index-d7234eb4.js @@ -1 +1 @@ -import{eq as M,q as m,r as p,at as x,a as e,W as v,I,u as R,t as y,iV as E,iW as b,X as S,o as T}from"../index-7380452a.js";import{S as k}from"./scrollable-list-df58e451.js";import{A}from"./accordion-9597afee.js";import{I as N}from"./instance-restrictions-85d3f8a1.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";import"./dots-vertical-68cbc8e2.js";const q="/packs/assets/caret-right-8d06c486.svg",w="/packs/assets/caret-down-3f1f97a7.svg";var B=M(),D=function(s){var n=s.host,a=m(function(d){return B(d,n)}),l=p.useState(!1),r=x(l,2),i=r[0],c=r[1],u=function(g){c(function(f){return!f}),g.preventDefault()};return e("div",{},void 0,e("a",{href:"#",className:"flex items-center gap-1 py-2.5 no-underline",onClick:u},void 0,e(I,{src:i?w:q}),e("div",{className:v({"line-through":a.getIn(["federation","reject"])})},void 0,a.get("host"))),e("div",{className:v({"h-0 overflow-hidden":!i,"h-auto":i})},void 0,e(N,{remoteInstance:a})))},o=T({heading:{id:"column.federation_restrictions",defaultMessage:"Federation Restrictions"},boxTitle:{id:"federation_restrictions.explanation_box.title",defaultMessage:"Instance-specific policies"},boxMessage:{id:"federation_restrictions.explanation_box.message",defaultMessage:"Normally servers on the Fediverse can communicate freely. {siteTitle} has imposed restrictions on the following servers."},emptyMessage:{id:"federation_restrictions.empty_message",defaultMessage:"{siteTitle} has not restricted any instances."},notDisclosed:{id:"federation_restrictions.not_disclosed_message",defaultMessage:"{siteTitle} does not disclose federation restrictions through the API."}}),L=function(){var s=R(),n=y(),a=p.useCallback(E(),[]),l=m(function(t){return a(t)}),r=m(function(t){return b(t)}),i=p.useState(!0),c=x(i,2),u=c[0],d=c[1],g=function(_){d(_)},f=r?o.emptyMessage:o.notDisclosed;return e(S,{label:s.formatMessage(o.heading)},void 0,e(A,{headline:s.formatMessage(o.boxTitle),expanded:u,onToggle:g},void 0,s.formatMessage(o.boxMessage,{siteTitle:n.title})),e("div",{className:"pt-4"},void 0,e(k,{emptyMessage:s.formatMessage(f,{siteTitle:n.title})},void 0,l.map(function(t){return e(D,{host:t},t)}))))};export{L as default}; +import{eq as M,q as m,r as p,at as x,a as e,W as v,I,u as R,t as y,iV as E,iW as b,X as S,o as T}from"../index-be605fd2.js";import{S as k}from"./scrollable-list-1e43c72d.js";import{A}from"./accordion-0fbf6d28.js";import{I as N}from"./instance-restrictions-d5ec77d9.js";import"./index-85a17314.js";import"./load-more-55559f32.js";import"./dots-vertical-68cbc8e2.js";const q="/packs/assets/caret-right-8d06c486.svg",w="/packs/assets/caret-down-3f1f97a7.svg";var B=M(),D=function(s){var n=s.host,a=m(function(d){return B(d,n)}),l=p.useState(!1),r=x(l,2),i=r[0],c=r[1],u=function(g){c(function(f){return!f}),g.preventDefault()};return e("div",{},void 0,e("a",{href:"#",className:"flex items-center gap-1 py-2.5 no-underline",onClick:u},void 0,e(I,{src:i?w:q}),e("div",{className:v({"line-through":a.getIn(["federation","reject"])})},void 0,a.get("host"))),e("div",{className:v({"h-0 overflow-hidden":!i,"h-auto":i})},void 0,e(N,{remoteInstance:a})))},o=T({heading:{id:"column.federation_restrictions",defaultMessage:"Federation Restrictions"},boxTitle:{id:"federation_restrictions.explanation_box.title",defaultMessage:"Instance-specific policies"},boxMessage:{id:"federation_restrictions.explanation_box.message",defaultMessage:"Normally servers on the Fediverse can communicate freely. {siteTitle} has imposed restrictions on the following servers."},emptyMessage:{id:"federation_restrictions.empty_message",defaultMessage:"{siteTitle} has not restricted any instances."},notDisclosed:{id:"federation_restrictions.not_disclosed_message",defaultMessage:"{siteTitle} does not disclose federation restrictions through the API."}}),L=function(){var s=R(),n=y(),a=p.useCallback(E(),[]),l=m(function(t){return a(t)}),r=m(function(t){return b(t)}),i=p.useState(!0),c=x(i,2),u=c[0],d=c[1],g=function(_){d(_)},f=r?o.emptyMessage:o.notDisclosed;return e(S,{label:s.formatMessage(o.heading)},void 0,e(A,{headline:s.formatMessage(o.boxTitle),expanded:u,onToggle:g},void 0,s.formatMessage(o.boxMessage,{siteTitle:n.title})),e("div",{className:"pt-4"},void 0,e(k,{emptyMessage:s.formatMessage(f,{siteTitle:n.title})},void 0,l.map(function(t){return e(D,{host:t},t)}))))};export{L as default}; diff --git a/packs/js/index-e384b39c.js b/packs/js/index-d7afcbc5.js similarity index 81% rename from packs/js/index-e384b39c.js rename to packs/js/index-d7afcbc5.js index ae61cb92c..e226ed182 100644 --- a/packs/js/index-e384b39c.js +++ b/packs/js/index-d7afcbc5.js @@ -1 +1 @@ -import{g as P,ko as x,R as f,a as e,er as k,d as w,u as L,q as E,r as T,at as I,kp as F,L as A,bG as D,aa as v,da as B,F as n,a2 as u,o as O,aD as q,y as G}from"../index-7380452a.js";import{u as z}from"./useDebounce-0d4ed135.js";import{G as U}from"./group-card-c9aa3023.js";import{S as V}from"./scrollable-list-df58e451.js";import{h as j,P as K}from"./permissions-2149f5e2.js";import{P as Y}from"./placeholder-group-card-d679cbe1.js";import{P as H}from"./pending-items-row-3c568fd1.js";import{T as J,a as Q}from"./tab-bar-b3f08956.js";import"./group-header-image-e076498c.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";const W=function(){var i=P(),s=x(),r=s.groups,t=s.isFetching;return!i.groupsPending||t||r.length===0?null:f.createElement(f.Fragment,null,e(H,{to:"/groups/pending-requests",count:r.length,size:"lg"}),e(k,{}))};var X=O({placeholder:{id:"groups.search.placeholder",defaultMessage:"Search My Groups"}}),le=function(){var s=z,r=w(),t=P(),M=L(),l=E(function(a){return j(a,K)}),C=T.useState(""),p=I(C,2),c=p[0],_=p[1],y=s(c,300),o=F(y),d=o.groups,g=o.isLoading,m=o.hasNextPage,S=o.fetchNextPage,b=function(){m&&S()},h=function(){return r(q("CREATE_GROUP"))},R=function(){return e(u,{space:4,alignItems:"center",justifyContent:"center",className:"py-6"},void 0,e(u,{space:2,className:"max-w-sm"},void 0,e(G,{size:"2xl",weight:"bold",tag:"h2",align:"center"},void 0,e(n,{id:"groups.empty.title",defaultMessage:"No Groups yet"})),e(G,{size:"sm",theme:"muted",align:"center"},void 0,e(n,{id:"groups.empty.subtitle",defaultMessage:"Start discovering groups to join or create your own."}))),l&&e(v,{className:"self-center",onClick:h,theme:"secondary"},void 0,e(n,{id:"new_group_panel.action",defaultMessage:"Create Group"})))};return e(u,{space:4},void 0,t.groupsDiscovery&&e(J,{activeTab:Q.MY_GROUPS}),l&&e(v,{className:"xl:hidden",icon:B,onClick:h,theme:"secondary",block:!0},void 0,e(n,{id:"new_group_panel.action",defaultMessage:"Create Group"})),t.groupsSearch?e(D,{onChange:function(N){return _(N.target.value)},placeholder:M.formatMessage(X.placeholder),theme:"search",value:c}):null,e(W,{}),e(V,{scrollKey:"groups",emptyMessage:R(),emptyMessageCard:!1,itemClassName:"pb-4 last:pb-0",isLoading:g,showLoading:g&&d.length===0,placeholderComponent:Y,placeholderCount:3,onLoadMore:b,hasMore:m},void 0,d.map(function(a){return e(A,{to:"/group/".concat(a.slug)},a.id,e(U,{group:a}))})))};export{le as default}; +import{g as P,ko as x,R as f,a as e,er as k,d as w,u as L,q as E,r as T,at as I,kp as F,L as A,bG as D,aa as v,da as B,F as n,a2 as u,o as O,aD as q,y as G}from"../index-be605fd2.js";import{u as z}from"./useDebounce-93e74587.js";import{G as U}from"./group-card-e8bab249.js";import{S as V}from"./scrollable-list-1e43c72d.js";import{h as j,P as K}from"./permissions-2149f5e2.js";import{P as Y}from"./placeholder-group-card-a81c5966.js";import{P as H}from"./pending-items-row-1f87d8f3.js";import{T as J,a as Q}from"./tab-bar-777df18a.js";import"./group-header-image-068adc6d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";const W=function(){var i=P(),s=x(),r=s.groups,t=s.isFetching;return!i.groupsPending||t||r.length===0?null:f.createElement(f.Fragment,null,e(H,{to:"/groups/pending-requests",count:r.length,size:"lg"}),e(k,{}))};var X=O({placeholder:{id:"groups.search.placeholder",defaultMessage:"Search My Groups"}}),le=function(){var s=z,r=w(),t=P(),M=L(),l=E(function(a){return j(a,K)}),C=T.useState(""),p=I(C,2),c=p[0],_=p[1],y=s(c,300),o=F(y),d=o.groups,g=o.isLoading,m=o.hasNextPage,S=o.fetchNextPage,b=function(){m&&S()},h=function(){return r(q("CREATE_GROUP"))},R=function(){return e(u,{space:4,alignItems:"center",justifyContent:"center",className:"py-6"},void 0,e(u,{space:2,className:"max-w-sm"},void 0,e(G,{size:"2xl",weight:"bold",tag:"h2",align:"center"},void 0,e(n,{id:"groups.empty.title",defaultMessage:"No Groups yet"})),e(G,{size:"sm",theme:"muted",align:"center"},void 0,e(n,{id:"groups.empty.subtitle",defaultMessage:"Start discovering groups to join or create your own."}))),l&&e(v,{className:"self-center",onClick:h,theme:"secondary"},void 0,e(n,{id:"new_group_panel.action",defaultMessage:"Create Group"})))};return e(u,{space:4},void 0,t.groupsDiscovery&&e(J,{activeTab:Q.MY_GROUPS}),l&&e(v,{className:"xl:hidden",icon:B,onClick:h,theme:"secondary",block:!0},void 0,e(n,{id:"new_group_panel.action",defaultMessage:"Create Group"})),t.groupsSearch?e(D,{onChange:function(N){return _(N.target.value)},placeholder:M.formatMessage(X.placeholder),theme:"search",value:c}):null,e(W,{}),e(V,{scrollKey:"groups",emptyMessage:R(),emptyMessageCard:!1,itemClassName:"pb-4 last:pb-0",isLoading:g,showLoading:g&&d.length===0,placeholderComponent:Y,placeholderCount:3,onLoadMore:b,hasMore:m},void 0,d.map(function(a){return e(A,{to:"/group/".concat(a.slug)},a.id,e(U,{group:a}))})))};export{le as default}; diff --git a/packs/js/index-8f3060b3.js b/packs/js/index-d962c00d.js similarity index 99% rename from packs/js/index-8f3060b3.js rename to packs/js/index-d962c00d.js index 5827376da..3b4204f36 100644 --- a/packs/js/index-8f3060b3.js +++ b/packs/js/index-d962c00d.js @@ -1,4 +1,4 @@ -import{i as tn,t as Se,l as _,a as Ds,c as Cs,b as As,d as Os,g as Et,r as xe,S as kn,e as bt,f as Be,h as Kr,j as Us,k as y,u as Ms,m as Ls,n as Pe,o as ze,p as Bs,q as Ps,D as Xr,G as yt,s as Jn,v as Jr,w as Qn,x as zs,y as Fs,z as en,A as Rn,B as dt,C as ae,E as Gs,F as Qr,H as nn,I as Ot,J as Tn,K as tr,L as $s,M as ti,N as xn,O as Ys,P as Hs,Q as js,R as Ws,T as J,U as ei,V as qs,W as ft,X as Ie,Y as er,Z as In,_ as Ve,$ as Zs,a0 as Vs,a1 as Ks,a2 as rn,a3 as sn,a4 as nr}from"./browsertracing-7f035310.js";import{ag as Qf,a5 as th,a6 as eh,ah as nh,a7 as rh,a8 as ih,a9 as sh,ai as ah,aa as oh,ab as ch,ac as uh,ad as lh,ae as dh,af as fh}from"./browsertracing-7f035310.js";import{r as K,h as Fe}from"../index-7380452a.js";function Xs(t,e,n=250,r,i,s,a){if(!s.exception||!s.exception.values||!a||!tn(a.originalException,Error))return;const o=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;o&&(s.exception.values=Js(an(t,e,i,a.originalException,r,s.exception.values,o,0),n))}function an(t,e,n,r,i,s,a,o){if(s.length>=n+1)return s;let c=[...s];if(tn(r[i],Error)){rr(a,o);const u=t(e,r[i]),d=c.length;ir(u,i,d,o),c=an(t,e,n,r[i],i,[u,...c],u,d)}return Array.isArray(r.errors)&&r.errors.forEach((u,d)=>{if(tn(u,Error)){rr(a,o);const l=t(e,u),f=c.length;ir(l,`errors[${d}]`,f,o),c=an(t,e,n,u,i,[l,...c],l,f)}}),c}function rr(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,is_exception_group:!0,exception_id:e}}function ir(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function Js(t,e){return t.map(n=>(n.value&&(n.value=Se(n.value,e)),n))}const Qs=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function ta(t){return t==="http"||t==="https"}function oe(t,e=!1){const{host:n,path:r,pass:i,port:s,projectId:a,protocol:o,publicKey:c}=t;return`${o}://${c}${e&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${a}`}function ni(t){const e=Qs.exec(t);if(!e){console.error(`Invalid Sentry Dsn: ${t}`);return}const[n,r,i="",s,a="",o]=e.slice(1);let c="",u=o;const d=u.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),u=d.pop()),u){const l=u.match(/^\d+/);l&&(u=l[0])}return ri({host:s,pass:i,path:c,projectId:u,port:a,protocol:n,publicKey:r})}function ri(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function ea(t){if(!(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__))return!0;const{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(a=>t[a]?!1:(_.error(`Invalid Sentry Dsn: ${a} missing`),!0))?!1:n.match(/^\d+$/)?ta(r)?e&&isNaN(parseInt(e,10))?(_.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(_.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(_.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function ii(t){const e=typeof t=="string"?ni(t):ri(t);if(!(!e||!ea(e)))return e}class rt extends Error{constructor(e,n="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function na(){const t=typeof WeakSet=="function",e=t?new WeakSet:[];function n(i){if(t)return e.has(i)?!0:(e.add(i),!1);for(let s=0;sn?si(t,e-1,n):r}function on(t,e,n=1/0,r=1/0,i=na()){const[s,a]=i;if(e==null||["number","boolean","string"].includes(typeof e)&&!Ds(e))return e;const o=ra(t,e);if(!o.startsWith("[object "))return o;if(e.__sentry_skip_normalization__)return e;const c=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:n;if(c===0)return o.replace("object ","");if(s(e))return"[Circular ~]";const u=e;if(u&&typeof u.toJSON=="function")try{const h=u.toJSON();return on("",h,c-1,r,i)}catch{}const d=Array.isArray(e)?[]:{};let l=0;const f=Cs(e);for(const h in f){if(!Object.prototype.hasOwnProperty.call(f,h))continue;if(l>=r){d[h]="[MaxProperties ~]";break}const p=f[h];d[h]=on(h,p,c-1,r,i),l++}return a(e),d}function ra(t,e){try{if(t==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&e===global)return"[Global]";if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(As(e))return"[VueViewModel]";if(Os(e))return"[SyntheticEvent]";if(typeof e=="number"&&e!==e)return"[NaN]";if(typeof e=="function")return`[Function: ${Et(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;const n=ia(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function ia(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}function sa(t){return~-encodeURI(t).split(/%..|./).length}function aa(t){return sa(JSON.stringify(t))}function oa(t){const e=[];function n(){return t===void 0||e.lengthr(o)).then(null,()=>r(o).then(null,()=>{})),o}function s(a){return new kn((o,c)=>{let u=e.length;if(!u)return o(!0);const d=setTimeout(()=>{a&&a>0&&o(!1)},a);e.forEach(l=>{bt(l).then(()=>{--u||(clearTimeout(d),o(!0))},c)})})}return{$:e,add:i,drain:s}}const ca=["fatal","error","warning","log","info","debug"];function ua(t){return t==="warn"?"warning":ca.includes(t)?t:"log"}function Ht(t,e=[]){return[t,e]}function la(t,e){const[n,r]=t;return[n,[...r,e]]}function Ut(t,e){const n=t[1];for(const r of n){const i=r[0].type;if(e(r,i))return!0}return!1}function da(t,e){return Ut(t,(n,r)=>e.includes(r))}function cn(t,e){return(e||new TextEncoder).encode(t)}function ai(t,e){const[n,r]=t;let i=JSON.stringify(n);function s(a){typeof i=="string"?i=typeof a=="string"?i+a:[cn(i,e),a]:i.push(typeof a=="string"?cn(a,e):a)}for(const a of r){const[o,c]=a;if(s(` +import{i as tn,t as Se,l as _,a as Ds,c as Cs,b as As,d as Os,g as Et,r as xe,S as kn,e as bt,f as Be,h as Kr,j as Us,k as y,u as Ms,m as Ls,n as Pe,o as ze,p as Bs,q as Ps,D as Xr,G as yt,s as Jn,v as Jr,w as Qn,x as zs,y as Fs,z as en,A as Rn,B as dt,C as ae,E as Gs,F as Qr,H as nn,I as Ot,J as Tn,K as tr,L as $s,M as ti,N as xn,O as Ys,P as Hs,Q as js,R as Ws,T as J,U as ei,V as qs,W as ft,X as Ie,Y as er,Z as In,_ as Ve,$ as Zs,a0 as Vs,a1 as Ks,a2 as rn,a3 as sn,a4 as nr}from"./browsertracing-7f035310.js";import{ag as Qf,a5 as th,a6 as eh,ah as nh,a7 as rh,a8 as ih,a9 as sh,ai as ah,aa as oh,ab as ch,ac as uh,ad as lh,ae as dh,af as fh}from"./browsertracing-7f035310.js";import{r as K,h as Fe}from"../index-be605fd2.js";function Xs(t,e,n=250,r,i,s,a){if(!s.exception||!s.exception.values||!a||!tn(a.originalException,Error))return;const o=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;o&&(s.exception.values=Js(an(t,e,i,a.originalException,r,s.exception.values,o,0),n))}function an(t,e,n,r,i,s,a,o){if(s.length>=n+1)return s;let c=[...s];if(tn(r[i],Error)){rr(a,o);const u=t(e,r[i]),d=c.length;ir(u,i,d,o),c=an(t,e,n,r[i],i,[u,...c],u,d)}return Array.isArray(r.errors)&&r.errors.forEach((u,d)=>{if(tn(u,Error)){rr(a,o);const l=t(e,u),f=c.length;ir(l,`errors[${d}]`,f,o),c=an(t,e,n,u,i,[l,...c],l,f)}}),c}function rr(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,is_exception_group:!0,exception_id:e}}function ir(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function Js(t,e){return t.map(n=>(n.value&&(n.value=Se(n.value,e)),n))}const Qs=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function ta(t){return t==="http"||t==="https"}function oe(t,e=!1){const{host:n,path:r,pass:i,port:s,projectId:a,protocol:o,publicKey:c}=t;return`${o}://${c}${e&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${a}`}function ni(t){const e=Qs.exec(t);if(!e){console.error(`Invalid Sentry Dsn: ${t}`);return}const[n,r,i="",s,a="",o]=e.slice(1);let c="",u=o;const d=u.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),u=d.pop()),u){const l=u.match(/^\d+/);l&&(u=l[0])}return ri({host:s,pass:i,path:c,projectId:u,port:a,protocol:n,publicKey:r})}function ri(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function ea(t){if(!(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__))return!0;const{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(a=>t[a]?!1:(_.error(`Invalid Sentry Dsn: ${a} missing`),!0))?!1:n.match(/^\d+$/)?ta(r)?e&&isNaN(parseInt(e,10))?(_.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(_.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(_.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function ii(t){const e=typeof t=="string"?ni(t):ri(t);if(!(!e||!ea(e)))return e}class rt extends Error{constructor(e,n="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function na(){const t=typeof WeakSet=="function",e=t?new WeakSet:[];function n(i){if(t)return e.has(i)?!0:(e.add(i),!1);for(let s=0;sn?si(t,e-1,n):r}function on(t,e,n=1/0,r=1/0,i=na()){const[s,a]=i;if(e==null||["number","boolean","string"].includes(typeof e)&&!Ds(e))return e;const o=ra(t,e);if(!o.startsWith("[object "))return o;if(e.__sentry_skip_normalization__)return e;const c=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:n;if(c===0)return o.replace("object ","");if(s(e))return"[Circular ~]";const u=e;if(u&&typeof u.toJSON=="function")try{const h=u.toJSON();return on("",h,c-1,r,i)}catch{}const d=Array.isArray(e)?[]:{};let l=0;const f=Cs(e);for(const h in f){if(!Object.prototype.hasOwnProperty.call(f,h))continue;if(l>=r){d[h]="[MaxProperties ~]";break}const p=f[h];d[h]=on(h,p,c-1,r,i),l++}return a(e),d}function ra(t,e){try{if(t==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&e===global)return"[Global]";if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(As(e))return"[VueViewModel]";if(Os(e))return"[SyntheticEvent]";if(typeof e=="number"&&e!==e)return"[NaN]";if(typeof e=="function")return`[Function: ${Et(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;const n=ia(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function ia(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}function sa(t){return~-encodeURI(t).split(/%..|./).length}function aa(t){return sa(JSON.stringify(t))}function oa(t){const e=[];function n(){return t===void 0||e.lengthr(o)).then(null,()=>r(o).then(null,()=>{})),o}function s(a){return new kn((o,c)=>{let u=e.length;if(!u)return o(!0);const d=setTimeout(()=>{a&&a>0&&o(!1)},a);e.forEach(l=>{bt(l).then(()=>{--u||(clearTimeout(d),o(!0))},c)})})}return{$:e,add:i,drain:s}}const ca=["fatal","error","warning","log","info","debug"];function ua(t){return t==="warn"?"warning":ca.includes(t)?t:"log"}function Ht(t,e=[]){return[t,e]}function la(t,e){const[n,r]=t;return[n,[...r,e]]}function Ut(t,e){const n=t[1];for(const r of n){const i=r[0].type;if(e(r,i))return!0}return!1}function da(t,e){return Ut(t,(n,r)=>e.includes(r))}function cn(t,e){return(e||new TextEncoder).encode(t)}function ai(t,e){const[n,r]=t;let i=JSON.stringify(n);function s(a){typeof i=="string"?i=typeof a=="string"?i+a:[cn(i,e),a]:i.push(typeof a=="string"?cn(a,e):a)}for(const a of r){const[o,c]=a;if(s(` ${JSON.stringify(o)} `),typeof c=="string"||c instanceof Uint8Array)s(c);else{let u;try{u=JSON.stringify(c)}catch{u=JSON.stringify(st(c))}s(u)}}return typeof i=="string"?i:fa(i)}function fa(t){const e=t.reduce((i,s)=>i+s.length,0),n=new Uint8Array(e);let r=0;for(const i of t)n.set(i,r),r+=i.length;return n}function ha(t,e,n){let r=typeof t=="string"?e.encode(t):t;function i(c){const u=r.subarray(0,c);return r=r.subarray(c+1),u}function s(){let c=r.indexOf(10);return c<0&&(c=r.length),JSON.parse(n.decode(i(c)))}const a=s(),o=[];for(;r.length;){const c=s(),u=typeof c.length=="number"?c.length:void 0;o.push([c,u?i(u):s()])}return[a,o]}function pa(t,e){const n=typeof t.data=="string"?cn(t.data,e):t.data;return[Be({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}const _a={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor"};function sr(t){return _a[t]}function Nn(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function oi(t,e,n,r){const i=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!n&&{dsn:oe(r)},...i&&{trace:Be({...i})}}}function ma(t,e,n){const r=[{type:"client_report"},{timestamp:n||Kr(),discarded_events:t}];return Ht(e?{dsn:e}:{},[r])}const ga=60*1e3;function ci(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${t}`);return isNaN(r)?ga:r-e}function ya(t,e){return t[e]||t.all||0}function Ea(t,e,n=Date.now()){return ya(t,e)>n}function ba(t,{statusCode:e,headers:n},r=Date.now()){const i={...t},s=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(s)for(const o of s.trim().split(",")){const[c,u]=o.split(":",2),d=parseInt(c,10),l=(isNaN(d)?60:d)*1e3;if(!u)i.all=r+l;else for(const f of u.split(";"))i[f]=r+l}else a?i.all=r+ci(a,r):e===429&&(i.all=r+60*1e3);return i}function _f(t,e,n){const r=Us();r&&r.setMeasurement(t,e,n)}function Ge(t,e){return y().captureException(t,{captureContext:e})}function mf(t,e){const n=typeof e=="string"?e:void 0,r=typeof e!="string"?{captureContext:e}:void 0;return y().captureMessage(t,n,r)}function gf(t,e){return y().captureEvent(t,e)}function wa(t){y().configureScope(t)}function yf(t){y().addBreadcrumb(t)}function Sa(t,e){y().setContext(t,e)}function Ef(t){y().setExtras(t)}function bf(t,e){y().setExtra(t,e)}function wf(t){y().setTags(t)}function Sf(t,e){y().setTag(t,e)}function vf(t){y().setUser(t)}function ui(t){y().withScope(t)}function kf(t,e){return y().startTransaction({...t},e)}async function Rf(t){const e=y().getClient();return e?e.flush(t):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&_.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function Tf(t){const e=y().getClient();return e?e.close(t):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&_.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function xf(){return y().lastEventId()}const va="7";function li(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function ka(t){return`${li(t)}${t.projectId}/envelope/`}function Ra(t,e){return Ms({sentry_key:t.publicKey,sentry_version:va,...e&&{sentry_client:`${e.name}/${e.version}`}})}function di(t,e={}){const n=typeof e=="string"?e:e.tunnel,r=typeof e=="string"||!e._metadata?void 0:e._metadata.sdk;return n||`${ka(t)}?${Ra(t,r)}`}function Ta(t,e){const n=ii(t);if(!n)return"";const r=`${li(n)}embed/error-page/`;let i=`dsn=${oe(n)}`;for(const s in e)if(s!=="dsn")if(s==="user"){const a=e.user;if(!a)continue;a.name&&(i+=`&name=${encodeURIComponent(a.name)}`),a.email&&(i+=`&email=${encodeURIComponent(a.email)}`)}else i+=`&${encodeURIComponent(s)}=${encodeURIComponent(e[s])}`;return`${r}?${i}`}function xa(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function Ia(t,e,n,r){const i=Nn(n),s={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&{dsn:oe(e)}},a="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return Ht(s,[a])}function Na(t,e,n,r){const i=Nn(n),s=t.type&&t.type!=="replay_event"?t.type:"event";xa(t,n&&n.sdk);const a=oi(t,i,r,e);return delete t.sdkProcessingMetadata,Ht(a,[[{type:s},t]])}const ar=[];function Da(t){const e={};return t.forEach(n=>{const{name:r}=n,i=e[r];i&&!i.isDefaultInstance&&n.isDefaultInstance||(e[r]=n)}),Object.keys(e).map(n=>e[n])}function Ca(t){const e=t.defaultIntegrations||[],n=t.integrations;e.forEach(a=>{a.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...e,...n]:typeof n=="function"?r=Ls(n(e)):r=e;const i=Da(r),s=Oa(i,a=>a.name==="Debug");if(s!==-1){const[a]=i.splice(s,1);i.push(a)}return i}function Aa(t,e){const n={};return e.forEach(r=>{r&&fi(t,r,n)}),n}function fi(t,e,n){if(n[e.name]=e,ar.indexOf(e.name)===-1&&(e.setupOnce(Pe,y),ar.push(e.name)),t.on&&typeof e.preprocessEvent=="function"){const r=e.preprocessEvent.bind(e);t.on("preprocessEvent",(i,s)=>r(i,s,t))}if(t.addEventProcessor&&typeof e.processEvent=="function"){const r=e.processEvent.bind(e),i=Object.assign((s,a)=>r(s,a,t),{id:e.name});t.addEventProcessor(i)}(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&_.log(`Integration installed: ${e.name}`)}function Oa(t,e){for(let n=0;nl.name);Ua(o,t),Ba(o,c),e.type===void 0&&Ma(o,t.stackParser);let u=r;n.captureContext&&(u=Bs.clone(u).update(n.captureContext));let d=bt(o);if(u){if(u.getAttachments){const l=[...n.attachments||[],...u.getAttachments()];l.length&&(n.attachments=l)}d=u.applyToEvent(o,n)}return d.then(l=>i&&i.getEventProcessors?Ps(i.getEventProcessors(),l,n):l).then(l=>(l&&La(l),typeof s=="number"&&s>0?Pa(l,s,a):l))}function Ua(t,e){const{environment:n,release:r,dist:i,maxValueLength:s=250}=e;"environment"in t||(t.environment="environment"in e?n:Xr),t.release===void 0&&r!==void 0&&(t.release=r),t.dist===void 0&&i!==void 0&&(t.dist=i),t.message&&(t.message=Se(t.message,s));const a=t.exception&&t.exception.values&&t.exception.values[0];a&&a.value&&(a.value=Se(a.value,s));const o=t.request;o&&o.url&&(o.url=Se(o.url,s))}const or=new WeakMap;function Ma(t,e){const n=yt._sentryDebugIds;if(!n)return;let r;const i=or.get(e);i?r=i:(r=new Map,or.set(e,r));const s=Object.keys(n).reduce((a,o)=>{let c;const u=r.get(o);u?c=u:(c=e(o),r.set(o,c));for(let d=c.length-1;d>=0;d--){const l=c[d];if(l.filename){a[l.filename]=n[o];break}}return a},{});try{t.exception.values.forEach(a=>{a.stacktrace.frames.forEach(o=>{o.filename&&(o.debug_id=s[o.filename])})})}catch{}}function La(t){const e={};try{t.exception.values.forEach(r=>{r.stacktrace.frames.forEach(i=>{i.debug_id&&(i.abs_path?e[i.abs_path]=i.debug_id:i.filename&&(e[i.filename]=i.debug_id),delete i.debug_id)})})}catch{}if(Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.keys(e).forEach(r=>{n.push({type:"sourcemap",code_file:r,debug_id:e[r]})})}function Ba(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function Pa(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(i=>({...i,...i.data&&{data:st(i.data,e,n)}}))},...t.user&&{user:st(t.user,e,n)},...t.contexts&&{contexts:st(t.contexts,e,n)},...t.extra&&{extra:st(t.extra,e,n)}};return t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=st(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(i=>(i.data&&(i.data=st(i.data,e,n)),i))),r}const cr="Not capturing exception because it's already been captured.";class za{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=ii(e.dsn):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&_.warn("No DSN provided, client will not do anything."),this._dsn){const n=di(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n})}}captureException(e,n,r){if(Jn(e)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&_.log(cr);return}let i=n&&n.event_id;return this._process(this.eventFromException(e,n).then(s=>this._captureEvent(s,n,r)).then(s=>{i=s})),i}captureMessage(e,n,r,i){let s=r&&r.event_id;const a=Jr(e)?this.eventFromMessage(String(e),n,r):this.eventFromException(e,r);return this._process(a.then(o=>this._captureEvent(o,r,i)).then(o=>{s=o})),s}captureEvent(e,n,r){if(n&&n.originalException&&Jn(n.originalException)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&_.log(cr);return}let i=n&&n.event_id;return this._process(this._captureEvent(e,n,r).then(s=>{i=s})),i}captureSession(e){if(!this._isEnabled()){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&_.warn("SDK not enabled, will not capture session.");return}typeof e.release!="string"?(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&_.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Qn(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const n=this._transport;return n?this._isClientDoneProcessing(e).then(r=>n.flush(e).then(i=>r&&i)):bt(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=Aa(this,this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&_.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){fi(this,e,this._integrations)}sendEvent(e,n={}){if(this.emit("beforeSendEvent",e,n),this._dsn){let r=Na(e,this._dsn,this._options._metadata,this._options.tunnel);for(const s of n.attachments||[])r=la(r,pa(s,this._options.transportOptions&&this._options.transportOptions.textEncoder));const i=this._sendEnvelope(r);i&&i.then(s=>this.emit("afterSendEvent",e,s),null)}}sendSession(e){if(this._dsn){const n=Ia(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}}recordDroppedEvent(e,n,r){if(this._options.sendClientReports){const i=`${e}:${n}`;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&_.log(`Adding outcome: "${i}"`),this._outcomes[i]=this._outcomes[i]+1||1}}on(e,n){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(n)}emit(e,...n){this._hooks[e]&&this._hooks[e].forEach(r=>r(...n))}_updateSessionFromEvent(e,n){let r=!1,i=!1;const s=n.exception&&n.exception.values;if(s){i=!0;for(const c of s){const u=c.mechanism;if(u&&u.handled===!1){r=!0;break}}}const a=e.status==="ok";(a&&e.errors===0||a&&r)&&(Qn(e,{...r&&{status:"crashed"},errors:e.errors||Number(i||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new kn(n=>{let r=0;const i=1,s=setInterval(()=>{this._numProcessing==0?(clearInterval(s),n(!0)):(r+=i,e&&r>=e&&(clearInterval(s),n(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._dsn!==void 0}_prepareEvent(e,n,r){const i=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s.length>0&&(n.integrations=s),this.emit("preprocessEvent",e,n),hi(i,e,n,r,this).then(a=>{if(a===null)return a;const{propagationContext:o}=a.sdkProcessingMetadata||{};if(!(a.contexts&&a.contexts.trace)&&o){const{traceId:u,spanId:d,parentSpanId:l,dsc:f}=o;a.contexts={trace:{trace_id:u,span_id:d,parent_span_id:l},...a.contexts};const h=f||zs(u,this,r);a.sdkProcessingMetadata={dynamicSamplingContext:h,...a.sdkProcessingMetadata}}return a})}_captureEvent(e,n={},r){return this._processEvent(e,n,r).then(i=>i.event_id,i=>{if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){const s=i;s.logLevel==="log"?_.log(s.message):_.warn(s)}})}_processEvent(e,n,r){const i=this.getOptions(),{sampleRate:s}=i;if(!this._isEnabled())return xe(new rt("SDK not enabled, will not capture event.","log"));const a=_i(e),o=pi(e),c=e.type||"error",u=`before send for type \`${c}\``;if(o&&typeof s=="number"&&Math.random()>s)return this.recordDroppedEvent("sample_rate","error",e),xe(new rt(`Discarding event because it's not included in the random sample (sampling rate = ${s})`,"log"));const d=c==="replay_event"?"replay":c;return this._prepareEvent(e,n,r).then(l=>{if(l===null)throw this.recordDroppedEvent("event_processor",d,e),new rt("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return l;const h=Ga(i,l,n);return Fa(h,u)}).then(l=>{if(l===null)throw this.recordDroppedEvent("before_send",d,e),new rt(`${u} returned \`null\`, will not send event.`,"log");const f=r&&r.getSession();!a&&f&&this._updateSessionFromEvent(f,l);const h=l.transaction_info;if(a&&h&&l.transaction!==e.transaction){const p="custom";l.transaction_info={...h,source:p}}return this.sendEvent(l,n),l}).then(null,l=>{throw l instanceof rt?l:(this.captureException(l,{data:{__sentry__:!0},originalException:l}),new rt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. Reason: ${l}`))})}_process(e){this._numProcessing++,e.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_sendEnvelope(e){if(this._transport&&this._dsn)return this.emit("beforeEnvelope",e),this._transport.send(e).then(null,n=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&_.error("Error while sending event:",n)});(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&_.error("Transport disabled")}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map(n=>{const[r,i]=n.split(":");return{reason:r,category:i,quantity:e[n]}})}}function Fa(t,e){const n=`${e} must return \`null\` or a valid event.`;if(Fs(t))return t.then(r=>{if(!en(r)&&r!==null)throw new rt(n);return r},r=>{throw new rt(`${e} rejected with ${r}`)});if(!en(t)&&t!==null)throw new rt(n);return t}function Ga(t,e,n){const{beforeSend:r,beforeSendTransaction:i}=t;return pi(e)&&r?r(e,n):_i(e)&&i?i(e,n):e}function pi(t){return t.type===void 0}function _i(t){return t.type==="transaction"}function $a(t,e){e.debug===!0&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?_.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));const n=y();n.getScope().update(e.initialScope);const i=new t(e);n.bindClient(i)}const Ya=30;function mi(t,e,n=oa(t.bufferSize||Ya)){let r={};const i=a=>n.drain(a);function s(a){const o=[];if(Ut(a,(l,f)=>{const h=sr(f);if(Ea(r,h)){const p=ur(l,f);t.recordDroppedEvent("ratelimit_backoff",h,p)}else o.push(l)}),o.length===0)return bt();const c=Ht(a[0],o),u=l=>{Ut(c,(f,h)=>{const p=ur(f,h);t.recordDroppedEvent(l,sr(h),p)})},d=()=>e({body:ai(c,t.textEncoder)}).then(l=>(l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&_.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=ba(r,l),l),l=>{throw u("network_error"),l});return n.add(d).then(l=>l,l=>{if(l instanceof rt)return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&_.error("Skipped sending event because buffer is full."),u("queue_overflow"),bt();throw l})}return s.__sentry__baseTransport__=!0,{send:s,flush:i}}function ur(t,e){if(!(e!=="event"&&e!=="transaction"))return Array.isArray(t)?t[1]:void 0}const Ha=100,lr=5e3,ja=36e5;function Ke(t,e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&_.info(`[Offline]: ${t}`,e)}function Wa(t){return e=>{const n=t(e),r=e.createStore?e.createStore(e):void 0;let i=lr,s;function a(d,l,f){return da(d,["replay_event","replay_recording","client_report"])?!1:e.shouldStore?e.shouldStore(d,l,f):!0}function o(d){r&&(s&&clearTimeout(s),s=setTimeout(async()=>{s=void 0;const l=await r.pop();l&&(Ke("Attempting to send previously queued event"),u(l).catch(f=>{Ke("Failed to retry sending",f)}))},d),typeof s!="number"&&s.unref&&s.unref())}function c(){s||(o(i),i=Math.min(i*2,ja))}async function u(d){try{const l=await n.send(d);let f=Ha;if(l){if(l.headers&&l.headers["retry-after"])f=ci(l.headers["retry-after"]);else if((l.statusCode||0)>=400)return l}return o(f),i=lr,l}catch(l){if(r&&await a(d,l,i))return await r.insert(d),c(),Ke("Error sending. Event queued",l),{};throw l}}return e.flushAtStartup&&c(),{send:u,flush:d=>n.flush(d)}}}function gi(t,e){let n;return Ut(t,(r,i)=>(e.includes(i)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function qa(t,e){return n=>{const r=t(n);return{send:async i=>{const s=gi(i,["event","transaction","profile","replay_event"]);return s&&(s.release=e),r.send(i)},flush:i=>r.flush(i)}}}function If(t,e){return n=>{const r=t(n),i={};function s(c,u){const d=u?`${c}:${u}`:c;if(!i[d]){const l=ni(c);if(!l)return;const f=di(l);i[d]=u?qa(t,u)({...n,url:f}):t({...n,url:f})}return i[d]}async function a(c){function u(f){const h=f&&f.length?f:["event"];return gi(c,h)}const d=e({envelope:c,getEvent:u}).map(f=>typeof f=="string"?s(f,void 0):s(f.dsn,f.release)).filter(f=>!!f);return d.length===0&&d.push(r),(await Promise.all(d.map(f=>f.send(c))))[0]}async function o(c){const u=[...Object.keys(i).map(l=>i[l]),r];return(await Promise.all(u.map(l=>l.flush(c)))).every(l=>l)}return{send:a,flush:o}}}const Ne="7.70.0";let dr;class ce{static __initStatic(){this.id="FunctionToString"}constructor(){this.name=ce.id}setupOnce(){dr=Function.prototype.toString;try{Function.prototype.toString=function(...e){const n=Rn(this)||this;return dr.apply(n,e)}}catch{}}}ce.__initStatic();const Za=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],Va=[/^.*healthcheck.*$/,/^.*healthy.*$/,/^.*live.*$/,/^.*ready.*$/,/^.*heartbeat.*$/,/^.*\/health$/,/^.*\/healthz$/];class Mt{static __initStatic(){this.id="InboundFilters"}constructor(e={}){this.name=Mt.id,this._options=e}setupOnce(e,n){const r=i=>{const s=n();if(s){const a=s.getIntegration(Mt);if(a){const o=s.getClient(),c=o?o.getOptions():{},u=Ka(a._options,c);return Xa(i,u)?null:i}}return i};r.id=this.name,e(r)}}Mt.__initStatic();function Ka(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:Za],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[],...t.disableTransactionDefaults?[]:Va],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function Xa(t,e){return e.ignoreInternal&&ro(t)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&_.warn(`Event dropped due to being internal Sentry Error. diff --git a/packs/js/index-d2abd689.js b/packs/js/index-da62f213.js similarity index 83% rename from packs/js/index-d2abd689.js rename to packs/js/index-da62f213.js index 6d5c2080f..fe13ce286 100644 --- a/packs/js/index-d2abd689.js +++ b/packs/js/index-da62f213.js @@ -1 +1 @@ -import{aT as U,a7 as $,d as P,g as V,f as Y,aU as q,aV as D,r,at as G,q as i,aW as H,aX as K,aY as N,aZ as h,a,aB as W,aC as X,a_ as Z,y as j,F as d,a$ as z}from"../index-7380452a.js";import{S as J}from"./status-list-13fdd81b.js";import"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";import"./status-container-59e57baf.js";import"./pending-status-7f660229.js";import"./poll-preview-66340c9e.js";import"./noop-19c18e1e.js";var _=U(),ue=function(l){var u=l.params,v=l.withReplies,n=v===void 0?!1:v,y=$(),o=P(),b=V(),S=Y(),x=q(),A=D(u.username,{withRelationship:!0}),e=A.account,I=r.useState(!e),f=G(I,2),M=f[0],p=f[1],c=n?"".concat(e==null?void 0:e.id,":with_replies"):e==null?void 0:e.id,L=S.getIn(["account_timeline","shows","pinned"])===!0&&!n,k=i(function(t){return _(t,{type:"account:".concat(c),prefix:"account_timeline"})}),w=i(function(t){return _(t,{type:"account:".concat(e==null?void 0:e.id,":pinned"),prefix:"account_timeline"})}),m=i(function(t){return t.relationships.getIn([e==null?void 0:e.id,"blocked_by"])===!0}),E=m&&!b.blockersVisible,g=x.getIn(["extensions","patron","enabled"])===!0,T=i(function(t){return t.getIn(["timelines","account:".concat(c),"isLoading"])===!0}),R=i(function(t){return t.getIn(["timelines","account:".concat(c),"hasMore"])===!0}),C=i(function(t){var s;return(s=t.timelines.get("account:".concat(c)))===null||s===void 0?void 0:s.next}),B=(e==null?void 0:e.username)||u.username;r.useEffect(function(){o(H(u.username,y)).then(function(){return p(!1)}).catch(function(){return p(!1)})},[u.username]),r.useEffect(function(){e&&!n&&o(K(e.id))},[e==null?void 0:e.id,n]),r.useEffect(function(){e&&g&&o(N(e.url))},[e==null?void 0:e.url,g]),r.useEffect(function(){e&&o(h(e.id,{withReplies:n}))},[e==null?void 0:e.id,n]);var F=function(s){e&&o(h(e.id,{url:C,maxId:s,withReplies:n}))};return!e&&M?a(W,{}):e?E?a(z,{},void 0,a(Z,{},void 0,a(j,{align:"center"},void 0,m?a(d,{id:"empty_column.account_blocked",defaultMessage:"You are blocked by @{accountUsername}.",values:{accountUsername:B}}):a(d,{id:"empty_column.account_unavailable",defaultMessage:"Profile unavailable"})))):a(J,{scrollKey:"account_timeline",statusIds:k,featuredStatusIds:L?w:void 0,isLoading:T,hasMore:R,onLoadMore:F,emptyMessage:a(d,{id:"empty_column.account_timeline",defaultMessage:"No posts here!"})}):a(X,{nested:!0})};export{ue as default}; +import{aT as U,a7 as $,d as P,g as V,f as Y,aU as q,aV as D,r,at as G,q as i,aW as H,aX as K,aY as N,aZ as h,a,aB as W,aC as X,a_ as Z,y as j,F as d,a$ as z}from"../index-be605fd2.js";import{S as J}from"./status-list-c10445e1.js";import"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";import"./status-container-e53698d2.js";import"./pending-status-959f7aeb.js";import"./poll-preview-ddaf662b.js";import"./noop-3f99ae3e.js";var _=U(),ue=function(l){var u=l.params,v=l.withReplies,n=v===void 0?!1:v,y=$(),o=P(),b=V(),S=Y(),x=q(),A=D(u.username,{withRelationship:!0}),e=A.account,I=r.useState(!e),f=G(I,2),M=f[0],p=f[1],c=n?"".concat(e==null?void 0:e.id,":with_replies"):e==null?void 0:e.id,L=S.getIn(["account_timeline","shows","pinned"])===!0&&!n,k=i(function(t){return _(t,{type:"account:".concat(c),prefix:"account_timeline"})}),w=i(function(t){return _(t,{type:"account:".concat(e==null?void 0:e.id,":pinned"),prefix:"account_timeline"})}),m=i(function(t){return t.relationships.getIn([e==null?void 0:e.id,"blocked_by"])===!0}),E=m&&!b.blockersVisible,g=x.getIn(["extensions","patron","enabled"])===!0,T=i(function(t){return t.getIn(["timelines","account:".concat(c),"isLoading"])===!0}),R=i(function(t){return t.getIn(["timelines","account:".concat(c),"hasMore"])===!0}),C=i(function(t){var s;return(s=t.timelines.get("account:".concat(c)))===null||s===void 0?void 0:s.next}),B=(e==null?void 0:e.username)||u.username;r.useEffect(function(){o(H(u.username,y)).then(function(){return p(!1)}).catch(function(){return p(!1)})},[u.username]),r.useEffect(function(){e&&!n&&o(K(e.id))},[e==null?void 0:e.id,n]),r.useEffect(function(){e&&g&&o(N(e.url))},[e==null?void 0:e.url,g]),r.useEffect(function(){e&&o(h(e.id,{withReplies:n}))},[e==null?void 0:e.id,n]);var F=function(s){e&&o(h(e.id,{url:C,maxId:s,withReplies:n}))};return!e&&M?a(W,{}):e?E?a(z,{},void 0,a(Z,{},void 0,a(j,{align:"center"},void 0,m?a(d,{id:"empty_column.account_blocked",defaultMessage:"You are blocked by @{accountUsername}.",values:{accountUsername:B}}):a(d,{id:"empty_column.account_unavailable",defaultMessage:"Profile unavailable"})))):a(J,{scrollKey:"account_timeline",statusIds:k,featuredStatusIds:L?w:void 0,isLoading:T,hasMore:R,onLoadMore:F,emptyMessage:a(d,{id:"empty_column.account_timeline",defaultMessage:"No posts here!"})}):a(X,{nested:!0})};export{ue as default}; diff --git a/packs/js/index-8318dff9.js b/packs/js/index-df9dbbbc.js similarity index 80% rename from packs/js/index-8318dff9.js rename to packs/js/index-df9dbbbc.js index a17a55c0b..7d36516ad 100644 --- a/packs/js/index-8318dff9.js +++ b/packs/js/index-df9dbbbc.js @@ -1 +1 @@ -import{u as f,aV as p,a,aB as v,aC as w,F as t,b2 as M,X as b,o as h}from"../index-7380452a.js";import{a as y}from"./useAccountList-6ddad2aa.js";import{S as F}from"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var L=h({heading:{id:"column.following",defaultMessage:"Following"}}),S=function(l){var s=l.params,r=f(),n=p(s==null?void 0:s.username),e=n.account,u=n.isUnavailable,o=y(e==null?void 0:e.id),c=o.accounts,d=o.hasNextPage,m=o.fetchNextPage,g=o.isLoading;return g?a(v,{}):e?u?a("div",{className:"empty-column-indicator"},void 0,a(t,{id:"empty_column.account_unavailable",defaultMessage:"Profile unavailable"})):a(b,{label:r.formatMessage(L.heading),transparent:!0},void 0,a(F,{scrollKey:"following",hasMore:d,onLoadMore:m,emptyMessage:a(t,{id:"account.follows.empty",defaultMessage:"This user doesn't follow anyone yet."}),itemClassName:"pb-4"},void 0,c.map(function(i){return a(M,{account:i},i.id)}))):a(w,{})};export{S as default}; +import{u as f,aV as p,a,aB as v,aC as w,F as t,b2 as M,X as b,o as h}from"../index-be605fd2.js";import{a as y}from"./useAccountList-32cce5e6.js";import{S as F}from"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var L=h({heading:{id:"column.following",defaultMessage:"Following"}}),S=function(l){var s=l.params,r=f(),n=p(s==null?void 0:s.username),e=n.account,u=n.isUnavailable,o=y(e==null?void 0:e.id),c=o.accounts,d=o.hasNextPage,m=o.fetchNextPage,g=o.isLoading;return g?a(v,{}):e?u?a("div",{className:"empty-column-indicator"},void 0,a(t,{id:"empty_column.account_unavailable",defaultMessage:"Profile unavailable"})):a(b,{label:r.formatMessage(L.heading),transparent:!0},void 0,a(F,{scrollKey:"following",hasMore:d,onLoadMore:m,emptyMessage:a(t,{id:"account.follows.empty",defaultMessage:"This user doesn't follow anyone yet."}),itemClassName:"pb-4"},void 0,c.map(function(i){return a(M,{account:i},i.id)}))):a(w,{})};export{S as default}; diff --git a/packs/js/index-d07463ea.js b/packs/js/index-e00cba31.js similarity index 97% rename from packs/js/index-d07463ea.js rename to packs/js/index-e00cba31.js index 407d40fcc..0cd4b12ec 100644 --- a/packs/js/index-d07463ea.js +++ b/packs/js/index-e00cba31.js @@ -1 +1 @@ -import{r as p,cF as z,a as e,H as j,q as y,b3 as I,N as P,a2 as f,y as i,d4 as L,F as m,bA as T,b2 as E,W as F,hB as H,cA as O,u as q,d as G,j8 as U,t as W,g as X,at as k,j9 as $,X as J,o as K,ja as Q}from"../index-7380452a.js";import{L as V}from"./load-more-b53b8d88.js";var h=function(t){var r=t.name,c=t.value,n=t.checked,o=t.onChange,a=t.label,d=p.useMemo(function(){return"radio-".concat(z())},[]);return e(j,{alignItems:"center",space:3},void 0,e("input",{type:"radio",name:r,id:d,value:c,checked:n,onChange:o,className:"h-4 w-4 border-gray-300 text-primary-600 focus:ring-primary-500"}),e("label",{htmlFor:d,className:"block text-sm font-medium text-gray-700"},void 0,a))},Y=function(t){var r,c=t.id,n=y(function(l){return l.me}),o=I(c),a=o.account,d=y(function(l){return P(l).get("autoPlayGif")});if(!a)return null;var w=n!==a.id&&((r=a.relationship)===null||r===void 0?void 0:r.followed_by);return e("div",{className:"flex flex-col divide-y divide-gray-200 rounded-lg bg-white text-center shadow dark:divide-primary-700 dark:bg-primary-800"},void 0,e("div",{className:"relative"},void 0,w&&e("div",{className:"absolute left-2.5 top-2.5"},void 0,e(H,{slug:"opaque",title:e(m,{id:"account.follows_you",defaultMessage:"Follows you"})})),e("div",{className:"absolute bottom-2.5 right-2.5"},void 0,e(O,{account:a,small:!0})),e("img",{src:d?a.header:a.header_static,alt:"",className:"h-32 w-full rounded-t-lg object-cover"})),e(f,{space:4,className:"p-3"},void 0,e(E,{account:a,withRelationship:!1}),e(i,{truncate:!0,align:"left",className:F("[&_br]:hidden [&_p:first-child]:inline [&_p:first-child]:truncate [&_p]:hidden"),dangerouslySetInnerHTML:{__html:a.note_emojified||" "}})),e("div",{className:"grid grid-cols-3 gap-1 py-4"},void 0,e(f,{},void 0,e(i,{theme:"primary",size:"md",weight:"medium"},void 0,L(a.statuses_count)),e(i,{theme:"muted",size:"sm"},void 0,e(m,{id:"account.posts",defaultMessage:"Posts"}))),e(f,{},void 0,e(i,{theme:"primary",size:"md",weight:"medium"},void 0,L(a.followers_count)),e(i,{theme:"muted",size:"sm"},void 0,e(m,{id:"account.followers",defaultMessage:"Followers"}))),e(f,{},void 0,e(i,{theme:"primary",size:"md",weight:"medium"},void 0,a.last_status_at?e(T,{theme:"inherit",timestamp:a.last_status_at}):e(m,{id:"account.never_active",defaultMessage:"Never"})),e(i,{theme:"muted",size:"sm"},void 0,e(m,{id:"account.last_status",defaultMessage:"Last active"})))))},g=K({title:{id:"column.directory",defaultMessage:"Browse profiles"},recentlyActive:{id:"directory.recently_active",defaultMessage:"Recently active"},newArrivals:{id:"directory.new_arrivals",defaultMessage:"New arrivals"},local:{id:"directory.local",defaultMessage:"From {domain} only"},federated:{id:"directory.federated",defaultMessage:"From known fediverse"}}),ae=function(){var t=q(),r=G(),c=U(),n=c.search,o=new URLSearchParams(n),a=W(),d=X(),w=y(function(s){return s.user_lists.directory.items}),l=y(function(s){return s.user_lists.directory.isLoading}),S=p.useState(o.get("order")||"active"),M=k(S,2),u=M[0],x=M[1],R=p.useState(!!o.get("local")),N=k(R,2),v=N[0],B=N[1];p.useEffect(function(){r($({order:u||"active",local:v||!1}))},[u,v]);var A=function(_){x(_.target.value)},C=function(_){B(_.target.value==="1")},D=function(){r(Q({order:u||"active",local:v||!1}))};return e(J,{label:t.formatMessage(g.title)},void 0,e(f,{space:4},void 0,e("div",{className:"grid grid-cols-2 gap-2"},void 0,e("div",{},void 0,e(i,{weight:"medium"},void 0,"Display filter"),e("fieldset",{className:"mt-3"},void 0,e("legend",{className:"sr-only"},void 0,"Display filter"),e("div",{className:"space-y-2"},void 0,e(h,{name:"order",value:"active",label:t.formatMessage(g.recentlyActive),checked:u==="active",onChange:A}),e(h,{name:"order",value:"new",label:t.formatMessage(g.newArrivals),checked:u==="new",onChange:A})))),d.federating&&e("div",{},void 0,e(i,{weight:"medium"},void 0,"Fediverse filter"),e("fieldset",{className:"mt-3"},void 0,e("legend",{className:"sr-only"},void 0,"Fediverse filter"),e("div",{className:"space-y-2"},void 0,e(h,{name:"local",value:"1",label:t.formatMessage(g.local,{domain:a.title}),checked:v,onChange:C}),e(h,{name:"local",value:"0",label:t.formatMessage(g.federated),checked:!v,onChange:C}))))),e("div",{className:F({"grid grid-cols-1 sm:grid-cols-2 gap-2.5":!0,"opacity-30":l})},void 0,w.map(function(s){return e(Y,{id:s},s)})),e(V,{onClick:D,disabled:l})))};export{ae as default}; +import{r as p,cF as z,a as e,H as j,q as y,b3 as I,N as P,a2 as f,y as i,d4 as L,F as m,bA as T,b2 as E,W as F,hB as H,cA as O,u as q,d as G,j8 as U,t as W,g as X,at as k,j9 as $,X as J,o as K,ja as Q}from"../index-be605fd2.js";import{L as V}from"./load-more-55559f32.js";var h=function(t){var r=t.name,c=t.value,n=t.checked,o=t.onChange,a=t.label,d=p.useMemo(function(){return"radio-".concat(z())},[]);return e(j,{alignItems:"center",space:3},void 0,e("input",{type:"radio",name:r,id:d,value:c,checked:n,onChange:o,className:"h-4 w-4 border-gray-300 text-primary-600 focus:ring-primary-500"}),e("label",{htmlFor:d,className:"block text-sm font-medium text-gray-700"},void 0,a))},Y=function(t){var r,c=t.id,n=y(function(l){return l.me}),o=I(c),a=o.account,d=y(function(l){return P(l).get("autoPlayGif")});if(!a)return null;var w=n!==a.id&&((r=a.relationship)===null||r===void 0?void 0:r.followed_by);return e("div",{className:"flex flex-col divide-y divide-gray-200 rounded-lg bg-white text-center shadow dark:divide-primary-700 dark:bg-primary-800"},void 0,e("div",{className:"relative"},void 0,w&&e("div",{className:"absolute left-2.5 top-2.5"},void 0,e(H,{slug:"opaque",title:e(m,{id:"account.follows_you",defaultMessage:"Follows you"})})),e("div",{className:"absolute bottom-2.5 right-2.5"},void 0,e(O,{account:a,small:!0})),e("img",{src:d?a.header:a.header_static,alt:"",className:"h-32 w-full rounded-t-lg object-cover"})),e(f,{space:4,className:"p-3"},void 0,e(E,{account:a,withRelationship:!1}),e(i,{truncate:!0,align:"left",className:F("[&_br]:hidden [&_p:first-child]:inline [&_p:first-child]:truncate [&_p]:hidden"),dangerouslySetInnerHTML:{__html:a.note_emojified||" "}})),e("div",{className:"grid grid-cols-3 gap-1 py-4"},void 0,e(f,{},void 0,e(i,{theme:"primary",size:"md",weight:"medium"},void 0,L(a.statuses_count)),e(i,{theme:"muted",size:"sm"},void 0,e(m,{id:"account.posts",defaultMessage:"Posts"}))),e(f,{},void 0,e(i,{theme:"primary",size:"md",weight:"medium"},void 0,L(a.followers_count)),e(i,{theme:"muted",size:"sm"},void 0,e(m,{id:"account.followers",defaultMessage:"Followers"}))),e(f,{},void 0,e(i,{theme:"primary",size:"md",weight:"medium"},void 0,a.last_status_at?e(T,{theme:"inherit",timestamp:a.last_status_at}):e(m,{id:"account.never_active",defaultMessage:"Never"})),e(i,{theme:"muted",size:"sm"},void 0,e(m,{id:"account.last_status",defaultMessage:"Last active"})))))},g=K({title:{id:"column.directory",defaultMessage:"Browse profiles"},recentlyActive:{id:"directory.recently_active",defaultMessage:"Recently active"},newArrivals:{id:"directory.new_arrivals",defaultMessage:"New arrivals"},local:{id:"directory.local",defaultMessage:"From {domain} only"},federated:{id:"directory.federated",defaultMessage:"From known fediverse"}}),ae=function(){var t=q(),r=G(),c=U(),n=c.search,o=new URLSearchParams(n),a=W(),d=X(),w=y(function(s){return s.user_lists.directory.items}),l=y(function(s){return s.user_lists.directory.isLoading}),S=p.useState(o.get("order")||"active"),M=k(S,2),u=M[0],x=M[1],R=p.useState(!!o.get("local")),N=k(R,2),v=N[0],B=N[1];p.useEffect(function(){r($({order:u||"active",local:v||!1}))},[u,v]);var A=function(_){x(_.target.value)},C=function(_){B(_.target.value==="1")},D=function(){r(Q({order:u||"active",local:v||!1}))};return e(J,{label:t.formatMessage(g.title)},void 0,e(f,{space:4},void 0,e("div",{className:"grid grid-cols-2 gap-2"},void 0,e("div",{},void 0,e(i,{weight:"medium"},void 0,"Display filter"),e("fieldset",{className:"mt-3"},void 0,e("legend",{className:"sr-only"},void 0,"Display filter"),e("div",{className:"space-y-2"},void 0,e(h,{name:"order",value:"active",label:t.formatMessage(g.recentlyActive),checked:u==="active",onChange:A}),e(h,{name:"order",value:"new",label:t.formatMessage(g.newArrivals),checked:u==="new",onChange:A})))),d.federating&&e("div",{},void 0,e(i,{weight:"medium"},void 0,"Fediverse filter"),e("fieldset",{className:"mt-3"},void 0,e("legend",{className:"sr-only"},void 0,"Fediverse filter"),e("div",{className:"space-y-2"},void 0,e(h,{name:"local",value:"1",label:t.formatMessage(g.local,{domain:a.title}),checked:v,onChange:C}),e(h,{name:"local",value:"0",label:t.formatMessage(g.federated),checked:!v,onChange:C}))))),e("div",{className:F({"grid grid-cols-1 sm:grid-cols-2 gap-2.5":!0,"opacity-30":l})},void 0,w.map(function(s){return e(Y,{id:s},s)})),e(V,{onClick:D,disabled:l})))};export{ae as default}; diff --git a/packs/js/index-1b47413a.js b/packs/js/index-e1f19958.js similarity index 65% rename from packs/js/index-1b47413a.js rename to packs/js/index-e1f19958.js index 25dd7b667..01b316bb6 100644 --- a/packs/js/index-1b47413a.js +++ b/packs/js/index-e1f19958.js @@ -1 +1 @@ -import{u as c,d as m,q as u,r as p,ak as s,a,X as g,F as h,o as f,al as v}from"../index-7380452a.js";import{u as M,A as y}from"./account-search-61b68090.js";import{T as S}from"./timeline-585cfcf0.js";import"./scroll-top-button-95820d24.js";import"./status-list-13fdd81b.js";import"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";import"./status-container-59e57baf.js";import"./pending-status-7f660229.js";import"./poll-preview-66340c9e.js";import"./noop-19c18e1e.js";var o=f({heading:{id:"column.direct",defaultMessage:"Direct messages"},searchPlaceholder:{id:"direct.search_placeholder",defaultMessage:"Send a message to…"}}),R=function(){var i=c(),t=m(),n=u(function(r){var e;return(e=r.timelines.get("direct"))===null||e===void 0?void 0:e.next});M(),p.useEffect(function(){t(s())},[]);var d=function(e){t(v(e))},l=function(e){t(s({url:n,maxId:e}))};return a(g,{label:i.formatMessage(o.heading)},void 0,a(y,{placeholder:i.formatMessage(o.searchPlaceholder),onSelected:d}),a(S,{scrollKey:"direct_timeline",timelineId:"direct",onLoadMore:l,emptyMessage:a(h,{id:"empty_column.direct",defaultMessage:"You don't have any direct messages yet. When you send or receive one, it will show up here."}),divideType:"border"}))};export{R as default}; +import{u as c,d as m,q as u,r as p,ak as s,a,X as g,F as h,o as f,al as v}from"../index-be605fd2.js";import{u as M,A as y}from"./account-search-46dd7dbb.js";import{T as S}from"./timeline-456dace7.js";import"./scroll-top-button-73ec9889.js";import"./status-list-c10445e1.js";import"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";import"./status-container-e53698d2.js";import"./pending-status-959f7aeb.js";import"./poll-preview-ddaf662b.js";import"./noop-3f99ae3e.js";var o=f({heading:{id:"column.direct",defaultMessage:"Direct messages"},searchPlaceholder:{id:"direct.search_placeholder",defaultMessage:"Send a message to…"}}),R=function(){var i=c(),t=m(),n=u(function(r){var e;return(e=r.timelines.get("direct"))===null||e===void 0?void 0:e.next});M(),p.useEffect(function(){t(s())},[]);var d=function(e){t(v(e))},l=function(e){t(s({url:n,maxId:e}))};return a(g,{label:i.formatMessage(o.heading)},void 0,a(y,{placeholder:i.formatMessage(o.searchPlaceholder),onSelected:d}),a(S,{scrollKey:"direct_timeline",timelineId:"direct",onLoadMore:l,emptyMessage:a(h,{id:"empty_column.direct",defaultMessage:"You don't have any direct messages yet. When you send or receive one, it will show up here."}),divideType:"border"}))};export{R as default}; diff --git a/packs/js/index-5df8a359.js b/packs/js/index-e23414ba.js similarity index 97% rename from packs/js/index-5df8a359.js rename to packs/js/index-e23414ba.js index 5a54a653e..1e1af08ca 100644 --- a/packs/js/index-5df8a359.js +++ b/packs/js/index-e23414ba.js @@ -1 +1 @@ -import{u as Z,d as le,t as oe,b8 as se,g as re,q as de,r as F,at as N,a as e,bE as ne,R as W,av as q,bF as k,F as r,bG as P,f1 as fe,bZ as ue,af as ce,ag as y,ah as M,bI as he,aa as G,X as ve,f2 as pe,f3 as _e,o as me,bL as j,H as ge,f4 as be,f5 as we,bp as K,_ as E}from"../index-7380452a.js";import"./es.array.splice-d733542e.js";import{S as ye}from"./streamfield-757f31b8.js";import{u as X}from"./useImageField-871ba8c6.js";import{H as Me,A as Ce}from"./header-picker-eba39776.js";import"./photo-plus-14444f2c.js";function Y(u,a){var t=Object.keys(u);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(u);a&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(u,c).enumerable})),t.push.apply(t,i)}return t}function g(u){for(var a=1;ad(t).getIn(["remote_timeline","pinnedHosts"]),M=t=>(n,e)=>{const i=e(),s=p(i);return n(u(["remote_timeline","pinnedHosts"],s.add(t)))},S=t=>(n,e)=>{const i=e(),s=p(i);return n(u(["remote_timeline","pinnedHosts"],s.remove(t)))};var A=g(),c=R({pinHost:{id:"remote_instance.pin_host",defaultMessage:"Pin {host}"},unpinHost:{id:"remote_instance.unpin_host",defaultMessage:"Unpin {host}"}}),w=function(n){var e=n.host,i=f(),s=H(),l=h(),a=v(function(r){return A(r,e)}),o=l.getIn(["remote_timeline","pinnedHosts"]).includes(e),m=function(){s(o?S(e):M(e))};return a?_(q,{title:a.get("host"),onActionClick:m,actionIcon:o?I:P,actionTitle:i.formatMessage(o?c.unpinHost:c.pinHost,{host:e})}):null};export{w as default}; +import{a6 as u,N as d,eq as g,u as f,d as H,f as h,q as v,a as _,hN as I,hO as P,o as R}from"../index-be605fd2.js";import{W as q}from"./widget-84f84d09.js";import"./arrow-right-b75290c7.js";const p=t=>d(t).getIn(["remote_timeline","pinnedHosts"]),M=t=>(n,e)=>{const i=e(),s=p(i);return n(u(["remote_timeline","pinnedHosts"],s.add(t)))},S=t=>(n,e)=>{const i=e(),s=p(i);return n(u(["remote_timeline","pinnedHosts"],s.remove(t)))};var A=g(),c=R({pinHost:{id:"remote_instance.pin_host",defaultMessage:"Pin {host}"},unpinHost:{id:"remote_instance.unpin_host",defaultMessage:"Unpin {host}"}}),w=function(n){var e=n.host,i=f(),s=H(),l=h(),a=v(function(r){return A(r,e)}),o=l.getIn(["remote_timeline","pinnedHosts"]).includes(e),m=function(){s(o?S(e):M(e))};return a?_(q,{title:a.get("host"),onActionClick:m,actionIcon:o?I:P,actionTitle:i.formatMessage(o?c.unpinHost:c.pinHost,{host:e})}):null};export{w as default}; diff --git a/packs/js/instance-moderation-panel-94f25c40.js b/packs/js/instance-moderation-panel-a8c2611c.js similarity index 84% rename from packs/js/instance-moderation-panel-94f25c40.js rename to packs/js/instance-moderation-panel-a8c2611c.js index e0aa81af7..b5ae86a0f 100644 --- a/packs/js/instance-moderation-panel-94f25c40.js +++ b/packs/js/instance-moderation-panel-a8c2611c.js @@ -1 +1 @@ -import{v as l}from"./dots-vertical-68cbc8e2.js";import{eq as f,u as v,d as p,b8 as g,q as M,a as e,F as _,cO as I,fY as R,o as F,aD as h}from"../index-7380452a.js";import{W as E}from"./widget-2ac720e4.js";import{I as A}from"./instance-restrictions-85d3f8a1.js";import"./arrow-right-b75290c7.js";var D=f(),q=F({editFederation:{id:"remote_instance.edit_federation",defaultMessage:"Edit federation"}}),W=function(i){var n=i.host,o=v(),s=p(),r=g(),t=r.account,d=M(function(a){return D(a,n)}),c=function(){s(h("EDIT_FEDERATION",{host:n}))},u=function(){return[{text:o.formatMessage(q.editFederation),action:c,icon:R}]},m=u();return e(E,{title:e(_,{id:"remote_instance.federation_panel.heading",defaultMessage:"Federation Restrictions"}),action:t!=null&&t.admin?e(I,{items:m,src:l}):void 0},void 0,e(A,{remoteInstance:d}))};export{W as default}; +import{v as l}from"./dots-vertical-68cbc8e2.js";import{eq as f,u as v,d as p,b8 as g,q as M,a as e,F as _,cO as I,fY as R,o as F,aD as h}from"../index-be605fd2.js";import{W as E}from"./widget-84f84d09.js";import{I as A}from"./instance-restrictions-d5ec77d9.js";import"./arrow-right-b75290c7.js";var D=f(),q=F({editFederation:{id:"remote_instance.edit_federation",defaultMessage:"Edit federation"}}),W=function(i){var n=i.host,o=v(),s=p(),r=g(),t=r.account,d=M(function(a){return D(a,n)}),c=function(){s(h("EDIT_FEDERATION",{host:n}))},u=function(){return[{text:o.formatMessage(q.editFederation),action:c,icon:R}]},m=u();return e(E,{title:e(_,{id:"remote_instance.federation_panel.heading",defaultMessage:"Federation Restrictions"}),action:t!=null&&t.admin?e(I,{items:m,src:l}):void 0},void 0,e(A,{remoteInstance:d}))};export{W as default}; diff --git a/packs/js/instance-restrictions-85d3f8a1.js b/packs/js/instance-restrictions-d5ec77d9.js similarity index 97% rename from packs/js/instance-restrictions-85d3f8a1.js rename to packs/js/instance-restrictions-d5ec77d9.js index f7058cf63..763772d3c 100644 --- a/packs/js/instance-restrictions-85d3f8a1.js +++ b/packs/js/instance-restrictions-d5ec77d9.js @@ -1 +1 @@ -import{t as k,a as e,a2 as I,F as s,R as f,I as P,H as q,y as F,dc as T,bf as x,dt as u,dk as y}from"../index-7380452a.js";const b="/packs/assets/shield-check-626ac67c.svg",S="/packs/assets/shield-lock-e937dcf4.svg",H="/packs/assets/shield-x-0f874623.svg";var N=function(n){return n.get("federation").deleteAll(["accept","reject_deletes","report_removal"]).reduce(function(i,o){return i||o},!1)},r=function(n){var i=n.icon,o=n.children;return e(q,{space:3},void 0,e(P,{className:"h-5 w-5 flex-none",src:i}),e(F,{theme:"muted"},void 0,o))},A=function(n){var i=n.remoteInstance,o=k(),_=function(){var t=[],a=i.get("federation").toJS(),c=a.avatar_removal,d=a.banner_removal,h=a.federated_timeline_removal,p=a.followers_only,M=a.media_nsfw,m=a.media_removal,v=m&&c&&d,w=m||c||d;return p?t.push(e(r,{icon:T},"followersOnly",e(s,{id:"federation_restriction.followers_only",defaultMessage:"Hidden except to followers"}))):h&&t.push(e(r,{icon:x},"federatedTimelineRemoval",e(s,{id:"federation_restriction.federated_timeline_removal",defaultMessage:"Fediverse timeline removal"}))),v?t.push(e(r,{icon:u},"fullMediaRemoval",e(s,{id:"federation_restriction.full_media_removal",defaultMessage:"Full media removal"}))):w&&t.push(e(r,{icon:u},"partialMediaRemoval",e(s,{id:"federation_restriction.partial_media_removal",defaultMessage:"Partial media removal"}))),!v&&M&&t.push(e(r,{icon:y},"mediaNsfw",e(s,{id:"federation_restriction.media_nsfw",defaultMessage:"Attachments marked NSFW"}))),t},g=function(){if(!o||!i)return null;var t=i.get("host"),a=o.title;return i.getIn(["federation","reject"])===!0?e(r,{icon:H},void 0,e(s,{id:"remote_instance.federation_panel.restricted_message",defaultMessage:"{siteTitle} blocks all activities from {host}.",values:{host:t,siteTitle:a}})):N(i)?f.createElement(f.Fragment,null,e(r,{icon:S},void 0,e(s,{id:"remote_instance.federation_panel.some_restrictions_message",defaultMessage:"{siteTitle} has placed some restrictions on {host}.",values:{host:t,siteTitle:a}})),_()):e(r,{icon:b},void 0,e(s,{id:"remote_instance.federation_panel.no_restrictions_message",defaultMessage:"{siteTitle} has placed no restrictions on {host}.",values:{host:t,siteTitle:a}}))};return e(I,{space:3},void 0,g())};export{A as I}; +import{t as k,a as e,a2 as I,F as s,R as f,I as P,H as q,y as F,dc as T,bf as x,dt as u,dk as y}from"../index-be605fd2.js";const b="/packs/assets/shield-check-626ac67c.svg",S="/packs/assets/shield-lock-e937dcf4.svg",H="/packs/assets/shield-x-0f874623.svg";var N=function(n){return n.get("federation").deleteAll(["accept","reject_deletes","report_removal"]).reduce(function(i,o){return i||o},!1)},r=function(n){var i=n.icon,o=n.children;return e(q,{space:3},void 0,e(P,{className:"h-5 w-5 flex-none",src:i}),e(F,{theme:"muted"},void 0,o))},A=function(n){var i=n.remoteInstance,o=k(),_=function(){var t=[],a=i.get("federation").toJS(),c=a.avatar_removal,d=a.banner_removal,h=a.federated_timeline_removal,p=a.followers_only,M=a.media_nsfw,m=a.media_removal,v=m&&c&&d,w=m||c||d;return p?t.push(e(r,{icon:T},"followersOnly",e(s,{id:"federation_restriction.followers_only",defaultMessage:"Hidden except to followers"}))):h&&t.push(e(r,{icon:x},"federatedTimelineRemoval",e(s,{id:"federation_restriction.federated_timeline_removal",defaultMessage:"Fediverse timeline removal"}))),v?t.push(e(r,{icon:u},"fullMediaRemoval",e(s,{id:"federation_restriction.full_media_removal",defaultMessage:"Full media removal"}))):w&&t.push(e(r,{icon:u},"partialMediaRemoval",e(s,{id:"federation_restriction.partial_media_removal",defaultMessage:"Partial media removal"}))),!v&&M&&t.push(e(r,{icon:y},"mediaNsfw",e(s,{id:"federation_restriction.media_nsfw",defaultMessage:"Attachments marked NSFW"}))),t},g=function(){if(!o||!i)return null;var t=i.get("host"),a=o.title;return i.getIn(["federation","reject"])===!0?e(r,{icon:H},void 0,e(s,{id:"remote_instance.federation_panel.restricted_message",defaultMessage:"{siteTitle} blocks all activities from {host}.",values:{host:t,siteTitle:a}})):N(i)?f.createElement(f.Fragment,null,e(r,{icon:S},void 0,e(s,{id:"remote_instance.federation_panel.some_restrictions_message",defaultMessage:"{siteTitle} has placed some restrictions on {host}.",values:{host:t,siteTitle:a}})),_()):e(r,{icon:b},void 0,e(s,{id:"remote_instance.federation_panel.no_restrictions_message",defaultMessage:"{siteTitle} has placed no restrictions on {host}.",values:{host:t,siteTitle:a}}))};return e(I,{space:3},void 0,g())};export{A as I}; diff --git a/packs/js/join-event-modal-088ec15c.js b/packs/js/join-event-modal-75060207.js similarity index 93% rename from packs/js/join-event-modal-088ec15c.js rename to packs/js/join-event-modal-75060207.js index 168874495..805219017 100644 --- a/packs/js/join-event-modal-088ec15c.js +++ b/packs/js/join-event-modal-75060207.js @@ -1 +1 @@ -import{u as S,d as y,r as h,at as v,a,bF as w,bZ as E,F as x,bu as A,o as C,bv as D,jW as F}from"../index-7380452a.js";var o=C({hint:{id:"join_event.hint",defaultMessage:"You can tell the organizer why do you want to participate in this event:"},placeholder:{id:"join_event.placeholder",defaultMessage:"Message to organizer"},join:{id:"join_event.join",defaultMessage:"Request join"}}),T=function(f){var g=f.statusId,t=S(),s=y(),m=h.useState(""),i=v(m,2),r=i[0],p=i[1],M=h.useState(!1),l=v(M,2),u=l[0],b=l[1],d=function(){s(D("JOIN_EVENT"))},_=function(e){p(e.target.value)},c=function(){b(!0),s(F(g,r)).then(function(){d()}).catch(function(){})},j=function(e){e.key==="Enter"&&(e.ctrlKey||e.metaKey)&&c()};return a(A,{title:a(x,{id:"join_event.title",defaultMessage:"Join event"}),onClose:d,confirmationAction:c,confirmationText:t.formatMessage(o.join),confirmationDisabled:u},void 0,a(w,{labelText:t.formatMessage(o.hint)},void 0,a(E,{placeholder:t.formatMessage(o.placeholder),value:r,onChange:_,onKeyDown:j,disabled:u,autoFocus:!0})))};export{T as default}; +import{u as S,d as y,r as h,at as v,a,bF as w,bZ as E,F as x,bu as A,o as C,bv as D,jW as F}from"../index-be605fd2.js";var o=C({hint:{id:"join_event.hint",defaultMessage:"You can tell the organizer why do you want to participate in this event:"},placeholder:{id:"join_event.placeholder",defaultMessage:"Message to organizer"},join:{id:"join_event.join",defaultMessage:"Request join"}}),T=function(f){var g=f.statusId,t=S(),s=y(),m=h.useState(""),i=v(m,2),r=i[0],p=i[1],M=h.useState(!1),l=v(M,2),u=l[0],b=l[1],d=function(){s(D("JOIN_EVENT"))},_=function(e){p(e.target.value)},c=function(){b(!0),s(F(g,r)).then(function(){d()}).catch(function(){})},j=function(e){e.key==="Enter"&&(e.ctrlKey||e.metaKey)&&c()};return a(A,{title:a(x,{id:"join_event.title",defaultMessage:"Join event"}),onClose:d,confirmationAction:c,confirmationText:t.formatMessage(o.join),confirmationDisabled:u},void 0,a(w,{labelText:t.formatMessage(o.hint)},void 0,a(E,{placeholder:t.formatMessage(o.placeholder),value:r,onChange:_,onKeyDown:j,disabled:u,autoFocus:!0})))};export{T as default}; diff --git a/packs/js/landing-page-modal-0f71e319.js b/packs/js/landing-page-modal-a616178b.js similarity index 95% rename from packs/js/landing-page-modal-0f71e319.js rename to packs/js/landing-page-modal-a616178b.js index f4098e48e..9c25976f7 100644 --- a/packs/js/landing-page-modal-0f71e319.js +++ b/packs/js/landing-page-modal-a616178b.js @@ -1 +1 @@ -import{u as n,aU as u,ek as v,a as e,A as m,y as c,W as p,aa as t,eA as f,bu as h,o as b}from"../index-7380452a.js";const y="/packs/assets/lifebuoy-b82645ac.svg";var o=b({download:{id:"landing_page_modal.download",defaultMessage:"Download"},helpCenter:{id:"landing_page_modal.helpCenter",defaultMessage:"Help Center"},login:{id:"header.login.label",defaultMessage:"Log in"},register:{id:"header.register.label",defaultMessage:"Register"}}),C=function(r){var d=r.onClose,a=n(),l=u(),g=v(),s=g.isOpen,i=l.links;return e(h,{title:e(f,{alt:"Logo",className:"h-6 w-auto cursor-pointer"}),onClose:function(){return d("LANDING_PAGE")}},void 0,e("div",{className:"mt-4 divide-y divide-solid divide-gray-200 dark:divide-gray-800"},void 0,i.get("help")&&e("nav",{className:"mb-6 grid gap-y-8"},void 0,e("a",{href:i.get("help"),target:"_blank",className:"flex items-center space-x-3 rounded-md p-3 hover:bg-gray-50 dark:hover:bg-gray-900/50"},void 0,e(m,{src:y,className:"h-6 w-6 shrink-0 text-gray-600 dark:text-gray-700"}),e(c,{weight:"medium"},void 0,a.formatMessage(o.helpCenter)))),e("div",{className:p("grid gap-4 pt-6",{"grid-cols-2":s,"grid-cols-1":!s})},void 0,e(t,{to:"/login",theme:"tertiary",block:!0},void 0,a.formatMessage(o.login)),s&&e(t,{to:"/signup",theme:"primary",block:!0},void 0,a.formatMessage(o.register)))))};export{C as default}; +import{u as n,aU as u,ek as v,a as e,A as m,y as c,W as p,aa as t,eA as f,bu as h,o as b}from"../index-be605fd2.js";const y="/packs/assets/lifebuoy-b82645ac.svg";var o=b({download:{id:"landing_page_modal.download",defaultMessage:"Download"},helpCenter:{id:"landing_page_modal.helpCenter",defaultMessage:"Help Center"},login:{id:"header.login.label",defaultMessage:"Log in"},register:{id:"header.register.label",defaultMessage:"Register"}}),C=function(r){var d=r.onClose,a=n(),l=u(),g=v(),s=g.isOpen,i=l.links;return e(h,{title:e(f,{alt:"Logo",className:"h-6 w-auto cursor-pointer"}),onClose:function(){return d("LANDING_PAGE")}},void 0,e("div",{className:"mt-4 divide-y divide-solid divide-gray-200 dark:divide-gray-800"},void 0,i.get("help")&&e("nav",{className:"mb-6 grid gap-y-8"},void 0,e("a",{href:i.get("help"),target:"_blank",className:"flex items-center space-x-3 rounded-md p-3 hover:bg-gray-50 dark:hover:bg-gray-900/50"},void 0,e(m,{src:y,className:"h-6 w-6 shrink-0 text-gray-600 dark:text-gray-700"}),e(c,{weight:"medium"},void 0,a.formatMessage(o.helpCenter)))),e("div",{className:p("grid gap-4 pt-6",{"grid-cols-2":s,"grid-cols-1":!s})},void 0,e(t,{to:"/login",theme:"tertiary",block:!0},void 0,a.formatMessage(o.login)),s&&e(t,{to:"/signup",theme:"primary",block:!0},void 0,a.formatMessage(o.register)))))};export{C as default}; diff --git a/packs/js/latest-accounts-panel-fe48dc2e.js b/packs/js/latest-accounts-panel-54623f66.js similarity index 88% rename from packs/js/latest-accounts-panel-fe48dc2e.js rename to packs/js/latest-accounts-panel-54623f66.js index a11ac1e5e..1a5137dd8 100644 --- a/packs/js/latest-accounts-panel-fe48dc2e.js +++ b/packs/js/latest-accounts-panel-54623f66.js @@ -1 +1 @@ -import{u as I,a7 as M,d as S,q as i,am as k,r as c,at as E,gI as w,hn as C,hP as D,a as u,B as L,o as P}from"../index-7380452a.js";import{W as R}from"./widget-2ac720e4.js";import"./arrow-right-b75290c7.js";var l=P({title:{id:"admin.latest_accounts_panel.title",defaultMessage:"Latest Accounts"},expand:{id:"admin.latest_accounts_panel.more",defaultMessage:"Click to see {count, plural, one {# account} other {# accounts}}"}}),q=function(d){var n=d.limit,a=n===void 0?5:n,o=I(),f=M(),m=S(),e=i(function(t){return t.admin.get("latestUsers").take(a)}),p=i(function(t){return e.every(function(y){var s;return!!((s=k(t,y))!==null&&s!==void 0&&s.created_at)})}),v=c.useState(e.size),r=E(v,2),h=r[0],A=r[1];c.useEffect(function(){m(w(["local","active"],1,null,a)).then(function(t){A(t.count)}).catch(function(){})},[]);var _=e.sort(C).reverse(),g=p&&D(e,_);if(!g||!e||e.isEmpty())return null;var x=function(){f.push("/ghostbox/admin/users")};return u(R,{title:o.formatMessage(l.title),onActionClick:x,actionTitle:o.formatMessage(l.expand,{count:h})},void 0,e.take(a).map(function(t){return u(L,{id:t,withRelationship:!1,withDate:!0},t)}))};export{q as default}; +import{u as I,a7 as M,d as S,q as i,am as k,r as c,at as E,gI as w,hn as C,hP as D,a as u,B as L,o as P}from"../index-be605fd2.js";import{W as R}from"./widget-84f84d09.js";import"./arrow-right-b75290c7.js";var l=P({title:{id:"admin.latest_accounts_panel.title",defaultMessage:"Latest Accounts"},expand:{id:"admin.latest_accounts_panel.more",defaultMessage:"Click to see {count, plural, one {# account} other {# accounts}}"}}),q=function(d){var n=d.limit,a=n===void 0?5:n,o=I(),f=M(),m=S(),e=i(function(t){return t.admin.get("latestUsers").take(a)}),p=i(function(t){return e.every(function(y){var s;return!!((s=k(t,y))!==null&&s!==void 0&&s.created_at)})}),v=c.useState(e.size),r=E(v,2),h=r[0],A=r[1];c.useEffect(function(){m(w(["local","active"],1,null,a)).then(function(t){A(t.count)}).catch(function(){})},[]);var _=e.sort(C).reverse(),g=p&&D(e,_);if(!g||!e||e.isEmpty())return null;var x=function(){f.push("/ghostbox/admin/users")};return u(R,{title:o.formatMessage(l.title),onActionClick:x,actionTitle:o.formatMessage(l.expand,{count:h})},void 0,e.take(a).map(function(t){return u(L,{id:t,withRelationship:!1,withDate:!0},t)}))};export{q as default}; diff --git a/packs/js/layout-buttons-5e2bb51b.js b/packs/js/layout-buttons-127c2f5f.js similarity index 80% rename from packs/js/layout-buttons-5e2bb51b.js rename to packs/js/layout-buttons-127c2f5f.js index b506cd9fc..c1fe56310 100644 --- a/packs/js/layout-buttons-5e2bb51b.js +++ b/packs/js/layout-buttons-127c2f5f.js @@ -1 +1 @@ -import{v as u,a as l}from"./layout-list-fe4f62ad.js";import{a as t,A as r,W as c,H as m}from"../index-7380452a.js";var a=function(e){return e.LIST="LIST",e.GRID="GRID",e}(a||{}),y=function(n){var o=n.layout,i=n.onSelect;return t(m,{alignItems:"center",space:1},void 0,t("button",{"data-testid":"layout-list-action",onClick:function(){return i(a.LIST)}},void 0,t(r,{src:l,className:c("h-5 w-5 text-gray-600",{"text-primary-600":o===a.LIST})})),t("button",{"data-testid":"layout-grid-action",onClick:function(){return i(a.GRID)}},void 0,t(r,{src:u,className:c("h-5 w-5 text-gray-600",{"text-primary-600":o===a.GRID})})))};export{a as G,y as L}; +import{v as u,a as l}from"./layout-list-e34f9942.js";import{a as t,A as r,W as c,H as m}from"../index-be605fd2.js";var a=function(e){return e.LIST="LIST",e.GRID="GRID",e}(a||{}),y=function(n){var o=n.layout,i=n.onSelect;return t(m,{alignItems:"center",space:1},void 0,t("button",{"data-testid":"layout-list-action",onClick:function(){return i(a.LIST)}},void 0,t(r,{src:l,className:c("h-5 w-5 text-gray-600",{"text-primary-600":o===a.LIST})})),t("button",{"data-testid":"layout-grid-action",onClick:function(){return i(a.GRID)}},void 0,t(r,{src:u,className:c("h-5 w-5 text-gray-600",{"text-primary-600":o===a.GRID})})))};export{a as G,y as L}; diff --git a/packs/js/layout-list-fe4f62ad.js b/packs/js/layout-list-e34f9942.js similarity index 89% rename from packs/js/layout-list-fe4f62ad.js rename to packs/js/layout-list-e34f9942.js index 44030b1e9..22bc375df 100644 --- a/packs/js/layout-list-fe4f62ad.js +++ b/packs/js/layout-list-e34f9942.js @@ -1 +1 @@ -import{r as n,a as t,L as c,R as l,a2 as a,bo as u,y as d,H as p,dr as m,ds as g,kt as v}from"../index-7380452a.js";import{G as f}from"./group-header-image-e076498c.js";var b=n.forwardRef(function(s,o){var e=s.group,r=s.width,i=r===void 0?"auto":r;return t("div",{className:"relative flex shrink-0 flex-col space-y-2 px-1",style:{width:i},"data-testid":"group-grid-item"},e.id,t(c,{to:"/group/".concat(e.slug)},void 0,l.createElement(a,{className:"aspect-h-7 aspect-w-10 h-full w-full overflow-hidden rounded-lg",ref:o,style:{minHeight:180}},t(f,{group:e,className:"absolute inset-0 object-cover"}),t("div",{className:"absolute inset-x-0 bottom-0 flex justify-center rounded-b-lg bg-gradient-to-t from-gray-900 to-transparent pb-8 pt-12 transition-opacity duration-500"}),t(a,{justifyContent:"end",className:"p-4 text-white",space:3},void 0,t(u,{group:e,size:44}),t(a,{space:1},void 0,t(d,{weight:"bold",dangerouslySetInnerHTML:{__html:e.display_name_html},theme:"inherit",truncate:!0}),t(p,{alignItems:"center",space:1},void 0,t(m,{group:e}),t("span",{},void 0,"•"),t(g,{group:e})))))),t(v,{group:e}))});const w="/packs/assets/layout-grid-45b77ac6.svg",_="/packs/assets/layout-list-94787117.svg";export{b as G,_ as a,w as v}; +import{r as n,a as t,L as c,R as l,a2 as a,bo as u,y as d,H as p,dr as m,ds as g,kt as v}from"../index-be605fd2.js";import{G as f}from"./group-header-image-068adc6d.js";var b=n.forwardRef(function(s,o){var e=s.group,r=s.width,i=r===void 0?"auto":r;return t("div",{className:"relative flex shrink-0 flex-col space-y-2 px-1",style:{width:i},"data-testid":"group-grid-item"},e.id,t(c,{to:"/group/".concat(e.slug)},void 0,l.createElement(a,{className:"aspect-h-7 aspect-w-10 h-full w-full overflow-hidden rounded-lg",ref:o,style:{minHeight:180}},t(f,{group:e,className:"absolute inset-0 object-cover"}),t("div",{className:"absolute inset-x-0 bottom-0 flex justify-center rounded-b-lg bg-gradient-to-t from-gray-900 to-transparent pb-8 pt-12 transition-opacity duration-500"}),t(a,{justifyContent:"end",className:"p-4 text-white",space:3},void 0,t(u,{group:e,size:44}),t(a,{space:1},void 0,t(d,{weight:"bold",dangerouslySetInnerHTML:{__html:e.display_name_html},theme:"inherit",truncate:!0}),t(p,{alignItems:"center",space:1},void 0,t(m,{group:e}),t("span",{},void 0,"•"),t(g,{group:e})))))),t(v,{group:e}))});const w="/packs/assets/layout-grid-45b77ac6.svg",_="/packs/assets/layout-list-94787117.svg";export{b as G,_ as a,w as v}; diff --git a/packs/js/load-more-b53b8d88.js b/packs/js/load-more-55559f32.js similarity index 79% rename from packs/js/load-more-b53b8d88.js rename to packs/js/load-more-55559f32.js index 5fe3e6bea..874070d4f 100644 --- a/packs/js/load-more-b53b8d88.js +++ b/packs/js/load-more-55559f32.js @@ -1 +1 @@ -import{a as o,F as l,aa as d}from"../index-7380452a.js";var u=function(a){var i=a.onClick,t=a.disabled,e=a.visible,s=e===void 0?!0:e,r=a.className;return s?o(d,{className:r,theme:"primary",block:!0,disabled:t||!s,onClick:i},void 0,o(l,{id:"status.load_more",defaultMessage:"Load more"})):null};export{u as L}; +import{a as o,F as l,aa as d}from"../index-be605fd2.js";var u=function(a){var i=a.onClick,t=a.disabled,e=a.visible,s=e===void 0?!0:e,r=a.className;return s?o(d,{className:r,theme:"primary",block:!0,disabled:t||!s,onClick:i},void 0,o(l,{id:"status.load_more",defaultMessage:"Load more"})):null};export{u as L}; diff --git a/packs/js/lodash-787b41ad.js b/packs/js/lodash-e014fe55.js similarity index 99% rename from packs/js/lodash-787b41ad.js rename to packs/js/lodash-e014fe55.js index 05e8f5c60..0b1811c8e 100644 --- a/packs/js/lodash-787b41ad.js +++ b/packs/js/lodash-e014fe55.js @@ -1,4 +1,4 @@ -import{cB as jt}from"../index-7380452a.js";var Je={exports:{}};/** +import{cB as jt}from"../index-be605fd2.js";var Je={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors diff --git a/packs/js/logout-5666ded9.js b/packs/js/logout-c14b6e6f.js similarity index 77% rename from packs/js/logout-5666ded9.js rename to packs/js/logout-c14b6e6f.js index 9e2bd4483..7f6dc6557 100644 --- a/packs/js/logout-5666ded9.js +++ b/packs/js/logout-c14b6e6f.js @@ -1 +1 @@ -import{eX as u,r as t,at as c,eY as i,a,aN as f,aB as l}from"../index-7380452a.js";var h=function(){var r=u(),s=t.useState(!1),e=c(s,2),o=e[0],n=e[1];return t.useEffect(function(){r(i()).then(function(){return n(!0)}).catch(console.warn)},[]),o?a(f,{to:"/"}):a(l,{})};export{h as default}; +import{eX as u,r as t,at as c,eY as i,a,aN as f,aB as l}from"../index-be605fd2.js";var h=function(){var r=u(),s=t.useState(!1),e=c(s,2),o=e[0],n=e[1];return t.useEffect(function(){r(i()).then(function(){return n(!0)}).catch(console.warn)},[]),o?a(f,{to:"/"}):a(l,{})};export{h as default}; diff --git a/packs/js/manage-group-46c1b3b3.js b/packs/js/manage-group-7434b0f0.js similarity index 97% rename from packs/js/manage-group-46c1b3b3.js rename to packs/js/manage-group-7434b0f0.js index e737da15c..43a9a4e8a 100644 --- a/packs/js/manage-group-46c1b3b3.js +++ b/packs/js/manage-group-7434b0f0.js @@ -1 +1 @@ -import{kv as k,bm as y,kK as C,d as S,hR as D,a7 as E,u as H,e9 as O,kz as q,a as e,aB as I,X as p,kL as L,a_ as T,R as o,eL as u,cy as d,af as l,ag as r,kM as w,y as P,o as A,aD as B,aH as F,bp as N}from"../index-7380452a.js";function x(){const{deleteEntity:g,isSubmitting:n}=k([y.GROUPS],{delete:"/api/v1/groups/:id"});return{mutate:g,isSubmitting:n}}var t=A({heading:{id:"column.manage_group",defaultMessage:"Manage Group"},editGroup:{id:"manage_group.edit_group",defaultMessage:"Edit Group"},pendingRequests:{id:"manage_group.pending_requests",defaultMessage:"Pending Requests"},blockedMembers:{id:"manage_group.blocked_members",defaultMessage:"Banned Members"},deleteGroup:{id:"manage_group.delete_group",defaultMessage:"Delete Group"},deleteConfirm:{id:"confirmations.delete_group.confirm",defaultMessage:"Delete"},deleteHeading:{id:"confirmations.delete_group.heading",defaultMessage:"Delete Group"},deleteMessage:{id:"confirmations.delete_group.message",defaultMessage:"Are you sure you want to delete this group? This is a permanent action that cannot be undone."},members:{id:"group.tabs.members",defaultMessage:"Members"},other:{id:"settings.other",defaultMessage:"Other Options"},deleteSuccess:{id:"group.delete.success",defaultMessage:"Group successfully deleted"}}),X=function(n){var i,c=n.params,f=c.groupId,M=C(),v=S(),h=D(),b=E(),a=H(),_=O(f),s=_.group,G=x(),m=(s==null||(i=s.relationship)===null||i===void 0?void 0:i.role)===q.OWNER;if(!s||!s.relationship)return e(p,{label:a.formatMessage(t.heading)},void 0,e(I,{}));if(!s.relationship.role||!["owner","admin","moderator"].includes(s.relationship.role))return e(L,{});var R=function(){return v(B("CONFIRM",{icon:F,heading:a.formatMessage(t.deleteHeading),message:a.formatMessage(t.deleteMessage),confirm:a.formatMessage(t.deleteConfirm),onConfirm:function(){G.mutate(s.id,{onSuccess:function(){N.success(a.formatMessage(t.deleteSuccess)),b.push(h)}})}}))};return e(p,{label:a.formatMessage(t.heading),backHref:"/group/".concat(s.slug)},void 0,e(T,{className:"space-y-4"},void 0,m&&o.createElement(o.Fragment,null,e(u,{},void 0,e(d,{title:a.formatMessage(t.editGroup)})),e(l,{},void 0,e(r,{label:a.formatMessage(t.editGroup),to:"/group/".concat(s.slug,"/manage/edit")},void 0,e("span",{dangerouslySetInnerHTML:{__html:s.display_name_html}})))),e(u,{},void 0,e(d,{title:a.formatMessage(t.members)})),e(l,{},void 0,M.software!==w&&e(r,{label:a.formatMessage(t.pendingRequests),to:"/group/".concat(s.slug,"/manage/requests")}),e(r,{label:a.formatMessage(t.blockedMembers),to:"/group/".concat(s.slug,"/manage/blocks")})),m&&o.createElement(o.Fragment,null,e(u,{},void 0,e(d,{title:a.formatMessage(t.other)})),e(l,{},void 0,e(r,{label:e(P,{theme:"danger"},void 0,a.formatMessage(t.deleteGroup)),onClick:R})))))};export{X as default}; +import{kv as k,bm as y,kK as C,d as S,hR as D,a7 as E,u as H,e9 as O,kz as q,a as e,aB as I,X as p,kL as L,a_ as T,R as o,eL as u,cy as d,af as l,ag as r,kM as w,y as P,o as A,aD as B,aH as F,bp as N}from"../index-be605fd2.js";function x(){const{deleteEntity:g,isSubmitting:n}=k([y.GROUPS],{delete:"/api/v1/groups/:id"});return{mutate:g,isSubmitting:n}}var t=A({heading:{id:"column.manage_group",defaultMessage:"Manage Group"},editGroup:{id:"manage_group.edit_group",defaultMessage:"Edit Group"},pendingRequests:{id:"manage_group.pending_requests",defaultMessage:"Pending Requests"},blockedMembers:{id:"manage_group.blocked_members",defaultMessage:"Banned Members"},deleteGroup:{id:"manage_group.delete_group",defaultMessage:"Delete Group"},deleteConfirm:{id:"confirmations.delete_group.confirm",defaultMessage:"Delete"},deleteHeading:{id:"confirmations.delete_group.heading",defaultMessage:"Delete Group"},deleteMessage:{id:"confirmations.delete_group.message",defaultMessage:"Are you sure you want to delete this group? This is a permanent action that cannot be undone."},members:{id:"group.tabs.members",defaultMessage:"Members"},other:{id:"settings.other",defaultMessage:"Other Options"},deleteSuccess:{id:"group.delete.success",defaultMessage:"Group successfully deleted"}}),X=function(n){var i,c=n.params,f=c.groupId,M=C(),v=S(),h=D(),b=E(),a=H(),_=O(f),s=_.group,G=x(),m=(s==null||(i=s.relationship)===null||i===void 0?void 0:i.role)===q.OWNER;if(!s||!s.relationship)return e(p,{label:a.formatMessage(t.heading)},void 0,e(I,{}));if(!s.relationship.role||!["owner","admin","moderator"].includes(s.relationship.role))return e(L,{});var R=function(){return v(B("CONFIRM",{icon:F,heading:a.formatMessage(t.deleteHeading),message:a.formatMessage(t.deleteMessage),confirm:a.formatMessage(t.deleteConfirm),onConfirm:function(){G.mutate(s.id,{onSuccess:function(){N.success(a.formatMessage(t.deleteSuccess)),b.push(h)}})}}))};return e(p,{label:a.formatMessage(t.heading),backHref:"/group/".concat(s.slug)},void 0,e(T,{className:"space-y-4"},void 0,m&&o.createElement(o.Fragment,null,e(u,{},void 0,e(d,{title:a.formatMessage(t.editGroup)})),e(l,{},void 0,e(r,{label:a.formatMessage(t.editGroup),to:"/group/".concat(s.slug,"/manage/edit")},void 0,e("span",{dangerouslySetInnerHTML:{__html:s.display_name_html}})))),e(u,{},void 0,e(d,{title:a.formatMessage(t.members)})),e(l,{},void 0,M.software!==w&&e(r,{label:a.formatMessage(t.pendingRequests),to:"/group/".concat(s.slug,"/manage/requests")}),e(r,{label:a.formatMessage(t.blockedMembers),to:"/group/".concat(s.slug,"/manage/blocks")})),m&&o.createElement(o.Fragment,null,e(u,{},void 0,e(d,{title:a.formatMessage(t.other)})),e(l,{},void 0,e(r,{label:e(P,{theme:"danger"},void 0,a.formatMessage(t.deleteGroup)),onClick:R})))))};export{X as default}; diff --git a/packs/js/media-gallery-3853c23c.js b/packs/js/media-gallery-b081354c.js similarity index 98% rename from packs/js/media-gallery-3853c23c.js rename to packs/js/media-gallery-b081354c.js index 0aa73b7de..8e1b1211c 100644 --- a/packs/js/media-gallery-3853c23c.js +++ b/packs/js/media-gallery-b081354c.js @@ -1 +1 @@ -import{v as ae}from"./volume-08f8a8f1.js";import{r as Y,at as J,a as u,R as ee,W as I,f as te,aU as ie,du as le,dv as re,dw as oe,I as Q,dj as Z,dh as ne,di as $,av as se}from"../index-7380452a.js";import{i as l,m as b,a as e,b as o,c as G}from"./media-aspect-ratio-df6a7bb1.js";var H=4,pe=45,he=function(h){return h>=G&&h<=b},ue=function(h){var t=h.getIn(["meta","original","aspect"]);return t?!he(t):!0},de=function(h){var t=h.attachment,L=h.index,M=h.onClick,R=h.standalone,O=R===void 0?!1:R,W=h.visible,g=h.dimensions,F=h.last,_=h.total,U=te(),T=U.get("autoPlayGif")===!0,z=ie(),N=z.mediaPreview,q=function(c){var w=c.currentTarget;E()&&w.play()},k=function(c){var w=c.currentTarget;E()&&(w.pause(),w.currentTime=0)},E=function(){return!T&&t.type==="gifv"},S=function(c){$()&&!c.target.autoPlay?(c.target.autoPlay=!0,c.preventDefault()):c.button===0&&!(c.ctrlKey||c.metaKey)&&(E()&&(c.target.pause(),c.target.currentTime=0),c.preventDefault(),M(L)),c.stopPropagation()},K=function(c){var w=c.currentTarget;w.playbackRate=3,w.play()},j=function(c){var w=c.currentTarget;w.pause(),w.currentTime=0},y=100,P="100%",f="auto",s="auto",r="auto",x="auto",d="left",v="relative";g&&(y=g.w,P=g.h,f=g.t||"auto",x=g.r||"auto",r=g.b||"auto",s=g.l||"auto",d=g.float||"left",v=g.pos||"relative");var p="";if(t.type==="unknown"){var B=le(t.url,pe),C=u(Q,{className:"h-16 w-16 text-gray-800 dark:text-gray-200",src:re[t.getIn(["pleroma","mime_type"])]||oe});return u("div",{className:I("media-gallery__item",{standalone:O,"rounded-md":_>1}),style:{position:v,float:d,left:s,top:f,right:x,bottom:r,height:P,width:"".concat(y,"%")}},t.id,u("a",{className:"media-gallery__item-thumbnail",href:t.url,target:"_blank",style:{cursor:"pointer"}},void 0,u(Z,{hash:t.blurhash,className:"media-gallery__preview"}),u("span",{className:"media-gallery__item__icons"},void 0,C),u("span",{className:"media-gallery__filename__label"},void 0,B)))}else if(t.type==="image"){var i=_===1&&ue(t);p=u("a",{className:"media-gallery__item-thumbnail",href:t.url,onClick:S,target:"_blank"},void 0,u(ne,{className:"h-full w-full",src:N?t.preview_url:t.url,alt:t.description,letterboxed:i,showExt:!0}))}else if(t.type==="gifv"){var a={};$()&&(a.playsInline=!0),T&&(a.autoPlay=!0),p=u("div",{className:I("media-gallery__gifv",{autoplay:T})},void 0,ee.createElement("video",se({className:"media-gallery__item-gifv-thumbnail","aria-label":t.description,title:t.description,role:"application",src:t.url,onClick:S,onMouseEnter:q,onMouseLeave:k,loop:!0,muted:!0},a)),u("span",{className:"media-gallery__gifv__label"},void 0,"GIF"))}else if(t.type==="audio"){var n,m=(n=t.url.split(".").pop())===null||n===void 0?void 0:n.toUpperCase();p=u("a",{className:I("media-gallery__item-thumbnail"),href:t.url,onClick:S,target:"_blank",title:t.description},void 0,u("span",{className:"media-gallery__item__icons"},void 0,u(Q,{src:ae})),u("span",{className:"media-gallery__file-extension__label"},void 0,m))}else if(t.type==="video"){var A,X=(A=t.url.split(".").pop())===null||A===void 0?void 0:A.toUpperCase();p=u("a",{className:I("media-gallery__item-thumbnail"),href:t.url,onClick:S,target:"_blank",title:t.description},void 0,u("video",{muted:!0,loop:!0,onMouseOver:K,onMouseOut:j},void 0,u("source",{src:t.url})),u("span",{className:"media-gallery__file-extension__label"},void 0,X))}return u("div",{className:I("media-gallery__item","media-gallery__item--".concat(t.type),{standalone:O,"rounded-md":_>1}),style:{position:v,float:d,left:s,top:f,right:x,bottom:r,height:P,width:"".concat(y,"%")}},t.id,F&&_>H&&u("div",{className:"media-gallery__item-overflow"},void 0,"+",_-H+1),u(Z,{hash:t.blurhash,className:"media-gallery__preview"}),W&&p)},fe=function(h){var t=h.media,L=h.defaultWidth,M=L===void 0?0:L,R=h.className,O=h.onOpenMedia,W=h.cacheWidth,g=h.compact,F=h.height,_=h.sensitiveOverlay,U=_===void 0?null:_,T=Y.useState(M),z=J(T,2),N=z[0],q=z[1],k=Y.useRef(null),E=function(s){O(t,s)},S=function(){var s=N||M,r=t.getIn([0,"meta","original","aspect"]),x=function(){return r?e(r)?Math.floor(s/b):l(r)?Math.floor(s/G):Math.floor(s/r):s*9/16};return{style:{height:x()},itemsDimensions:[],size:1,width:N}},K=function(s){var r=N||M,x=Math.floor(r/b),d="".concat(Math.floor(r/b),"px"),v={},p=[],B=Array(s).fill(null).map(function(A,X){return t.getIn([X,"meta","original","aspect"])}),C=J(B,4),i=C[0],a=C[1],n=C[2],m=C[3];return s===2?(l(i)&&l(a)?v.height=r-r/b:e(i)&&e(a)?v.height=x*2:e(i)&&l(a)||l(i)&&e(a)||e(i)&&o(a)||o(i)&&e(a)?v.height=r*.6+r/b:v.height=r/2,l(i)&&l(a)?p=[{w:50,h:"100%",r:"2px"},{w:50,h:"100%",l:"2px"}]:e(i)&&e(a)?p=[{w:100,h:d,b:"2px"},{w:100,h:d,t:"2px"}]:e(i)&&l(a)||e(i)&&o(a)?p=[{w:100,h:"".concat(r/b,"px"),b:"2px"},{w:100,h:"".concat(r*.6,"px"),t:"2px"}]:l(i)&&e(a)||o(i)&&e(a)?p=[{w:100,h:"".concat(r*.6,"px"),b:"2px"},{w:100,h:"".concat(r/b,"px"),t:"2px"}]:p=[{w:50,h:"100%",r:"2px"},{w:50,h:"100%",l:"2px"}]):s===3?(e(i)&&e(a)&&e(n)?v.height=x*3:l(i)&&l(a)&&l(n)?v.height=Math.floor(r/G):v.height=r,e(i)&&o(a)&&o(n)?p=[{w:100,h:"50%",b:"2px"},{w:50,h:"50%",t:"2px",r:"2px"},{w:50,h:"50%",t:"2px",l:"2px"}]:e(i)&&e(a)&&e(n)?p=[{w:100,h:d,b:"4px"},{w:100,h:d},{w:100,h:d,t:"4px"}]:l(i)&&o(a)&&o(n)?p=[{w:50,h:"100%",r:"2px"},{w:50,h:"50%",b:"2px",l:"2px"},{w:50,h:"50%",t:"2px",l:"2px"}]:o(i)&&o(a)&&l(n)?p=[{w:50,h:"50%",b:"2px",r:"2px"},{w:50,h:"50%",l:"-2px",b:"-2px",pos:"absolute",float:"none"},{w:50,h:"100%",r:"-2px",t:"0px",b:"0px",pos:"absolute",float:"none"}]:o(i)&&l(a)&&o(n)||l(i)&&l(a)&&l(n)?p=[{w:50,h:"50%",b:"2px",r:"2px"},{w:50,h:"100%",l:"2px",float:"right"},{w:50,h:"50%",t:"2px",r:"2px"}]:e(i)&&e(a)&&o(n)||e(i)&&e(a)&&l(n)?p=[{w:50,h:d,b:"2px",r:"2px"},{w:50,h:d,b:"2px",l:"2px"},{w:100,h:"".concat(r-x,"px"),t:"2px"}]:o(i)&&e(a)&&e(n)||l(i)&&e(a)&&e(n)?p=[{w:100,h:"".concat(r-x,"px"),b:"2px"},{w:50,h:d,t:"2px",r:"2px"},{w:50,h:d,t:"2px",l:"2px"}]:p=[{w:50,h:"50%",b:"2px",r:"2px"},{w:50,h:"50%",b:"2px",l:"2px"},{w:100,h:"50%",t:"2px"}]):s>=4&&(l(i)&&l(a)&&l(n)&&l(m)||l(i)&&l(a)&&l(n)&&o(m)||l(i)&&l(a)&&o(n)&&l(m)||l(i)&&o(a)&&l(n)&&l(m)||o(i)&&l(a)&&l(n)&&l(m)?v.height=Math.floor(r/G):e(i)&&e(a)&&e(n)&&e(m)?v.height=x*2:e(i)&&e(a)&&o(n)&&o(m)||o(i)&&o(a)&&e(n)&&e(m)?v.height=x+r/2:v.height=r,e(i)&&e(a)&&o(n)&&o(m)?p=[{w:50,h:d,b:"2px",r:"2px"},{w:50,h:d,b:"2px",l:"2px"},{w:50,h:"".concat(r/2,"px"),t:"2px",r:"2px"},{w:50,h:"".concat(r/2,"px"),t:"2px",l:"2px"}]:o(i)&&o(a)&&e(n)&&e(m)?p=[{w:50,h:"".concat(r/2,"px"),b:"2px",r:"2px"},{w:50,h:"".concat(r/2,"px"),b:"2px",l:"2px"},{w:50,h:d,t:"2px",r:"2px"},{w:50,h:d,t:"2px",l:"2px"}]:l(i)&&o(a)&&o(n)&&o(m)||l(i)&&e(a)&&e(n)&&e(m)?p=[{w:67,h:"100%",r:"2px"},{w:33,h:"33%",b:"4px",l:"2px"},{w:33,h:"33%",l:"2px"},{w:33,h:"33%",t:"4px",l:"2px"}]:p=[{w:50,h:"50%",b:"2px",r:"2px"},{w:50,h:"50%",b:"2px",l:"2px"},{w:50,h:"50%",t:"2px",r:"2px"},{w:50,h:"50%",t:"2px",l:"2px"}]),{style:v,itemsDimensions:p,size:s,width:r}},j=function(s){var r=N||M;if(r){if(s===1)return S();if(s>1)return K(s)}return{style:{height:F},itemsDimensions:[],size:s,width:r}},y=j(t.size),P=t.take(H).map(function(f,s){return u(de,{onClick:E,attachment:f,index:s,size:y.size,displayWidth:y.width,visible:!!h.visible,dimensions:y.itemsDimensions[s],last:s===H-1,total:t.size},f.id)});return Y.useLayoutEffect(function(){if(k.current){var f=k.current.offsetWidth;W&&W(f),q(f)}},[k.current]),ee.createElement("div",{className:I(R,"media-gallery",{"media-gallery--compact":g}),style:y.style,ref:k},U,P)};export{fe as default}; +import{v as ae}from"./volume-08f8a8f1.js";import{r as Y,at as J,a as u,R as ee,W as I,f as te,aU as ie,du as le,dv as re,dw as oe,I as Q,dj as Z,dh as ne,di as $,av as se}from"../index-be605fd2.js";import{i as l,m as b,a as e,b as o,c as G}from"./media-aspect-ratio-df6a7bb1.js";var H=4,pe=45,he=function(h){return h>=G&&h<=b},ue=function(h){var t=h.getIn(["meta","original","aspect"]);return t?!he(t):!0},de=function(h){var t=h.attachment,L=h.index,M=h.onClick,R=h.standalone,O=R===void 0?!1:R,W=h.visible,g=h.dimensions,F=h.last,_=h.total,U=te(),T=U.get("autoPlayGif")===!0,z=ie(),N=z.mediaPreview,q=function(c){var w=c.currentTarget;E()&&w.play()},k=function(c){var w=c.currentTarget;E()&&(w.pause(),w.currentTime=0)},E=function(){return!T&&t.type==="gifv"},S=function(c){$()&&!c.target.autoPlay?(c.target.autoPlay=!0,c.preventDefault()):c.button===0&&!(c.ctrlKey||c.metaKey)&&(E()&&(c.target.pause(),c.target.currentTime=0),c.preventDefault(),M(L)),c.stopPropagation()},K=function(c){var w=c.currentTarget;w.playbackRate=3,w.play()},j=function(c){var w=c.currentTarget;w.pause(),w.currentTime=0},y=100,P="100%",f="auto",s="auto",r="auto",x="auto",d="left",v="relative";g&&(y=g.w,P=g.h,f=g.t||"auto",x=g.r||"auto",r=g.b||"auto",s=g.l||"auto",d=g.float||"left",v=g.pos||"relative");var p="";if(t.type==="unknown"){var B=le(t.url,pe),C=u(Q,{className:"h-16 w-16 text-gray-800 dark:text-gray-200",src:re[t.getIn(["pleroma","mime_type"])]||oe});return u("div",{className:I("media-gallery__item",{standalone:O,"rounded-md":_>1}),style:{position:v,float:d,left:s,top:f,right:x,bottom:r,height:P,width:"".concat(y,"%")}},t.id,u("a",{className:"media-gallery__item-thumbnail",href:t.url,target:"_blank",style:{cursor:"pointer"}},void 0,u(Z,{hash:t.blurhash,className:"media-gallery__preview"}),u("span",{className:"media-gallery__item__icons"},void 0,C),u("span",{className:"media-gallery__filename__label"},void 0,B)))}else if(t.type==="image"){var i=_===1&&ue(t);p=u("a",{className:"media-gallery__item-thumbnail",href:t.url,onClick:S,target:"_blank"},void 0,u(ne,{className:"h-full w-full",src:N?t.preview_url:t.url,alt:t.description,letterboxed:i,showExt:!0}))}else if(t.type==="gifv"){var a={};$()&&(a.playsInline=!0),T&&(a.autoPlay=!0),p=u("div",{className:I("media-gallery__gifv",{autoplay:T})},void 0,ee.createElement("video",se({className:"media-gallery__item-gifv-thumbnail","aria-label":t.description,title:t.description,role:"application",src:t.url,onClick:S,onMouseEnter:q,onMouseLeave:k,loop:!0,muted:!0},a)),u("span",{className:"media-gallery__gifv__label"},void 0,"GIF"))}else if(t.type==="audio"){var n,m=(n=t.url.split(".").pop())===null||n===void 0?void 0:n.toUpperCase();p=u("a",{className:I("media-gallery__item-thumbnail"),href:t.url,onClick:S,target:"_blank",title:t.description},void 0,u("span",{className:"media-gallery__item__icons"},void 0,u(Q,{src:ae})),u("span",{className:"media-gallery__file-extension__label"},void 0,m))}else if(t.type==="video"){var A,X=(A=t.url.split(".").pop())===null||A===void 0?void 0:A.toUpperCase();p=u("a",{className:I("media-gallery__item-thumbnail"),href:t.url,onClick:S,target:"_blank",title:t.description},void 0,u("video",{muted:!0,loop:!0,onMouseOver:K,onMouseOut:j},void 0,u("source",{src:t.url})),u("span",{className:"media-gallery__file-extension__label"},void 0,X))}return u("div",{className:I("media-gallery__item","media-gallery__item--".concat(t.type),{standalone:O,"rounded-md":_>1}),style:{position:v,float:d,left:s,top:f,right:x,bottom:r,height:P,width:"".concat(y,"%")}},t.id,F&&_>H&&u("div",{className:"media-gallery__item-overflow"},void 0,"+",_-H+1),u(Z,{hash:t.blurhash,className:"media-gallery__preview"}),W&&p)},fe=function(h){var t=h.media,L=h.defaultWidth,M=L===void 0?0:L,R=h.className,O=h.onOpenMedia,W=h.cacheWidth,g=h.compact,F=h.height,_=h.sensitiveOverlay,U=_===void 0?null:_,T=Y.useState(M),z=J(T,2),N=z[0],q=z[1],k=Y.useRef(null),E=function(s){O(t,s)},S=function(){var s=N||M,r=t.getIn([0,"meta","original","aspect"]),x=function(){return r?e(r)?Math.floor(s/b):l(r)?Math.floor(s/G):Math.floor(s/r):s*9/16};return{style:{height:x()},itemsDimensions:[],size:1,width:N}},K=function(s){var r=N||M,x=Math.floor(r/b),d="".concat(Math.floor(r/b),"px"),v={},p=[],B=Array(s).fill(null).map(function(A,X){return t.getIn([X,"meta","original","aspect"])}),C=J(B,4),i=C[0],a=C[1],n=C[2],m=C[3];return s===2?(l(i)&&l(a)?v.height=r-r/b:e(i)&&e(a)?v.height=x*2:e(i)&&l(a)||l(i)&&e(a)||e(i)&&o(a)||o(i)&&e(a)?v.height=r*.6+r/b:v.height=r/2,l(i)&&l(a)?p=[{w:50,h:"100%",r:"2px"},{w:50,h:"100%",l:"2px"}]:e(i)&&e(a)?p=[{w:100,h:d,b:"2px"},{w:100,h:d,t:"2px"}]:e(i)&&l(a)||e(i)&&o(a)?p=[{w:100,h:"".concat(r/b,"px"),b:"2px"},{w:100,h:"".concat(r*.6,"px"),t:"2px"}]:l(i)&&e(a)||o(i)&&e(a)?p=[{w:100,h:"".concat(r*.6,"px"),b:"2px"},{w:100,h:"".concat(r/b,"px"),t:"2px"}]:p=[{w:50,h:"100%",r:"2px"},{w:50,h:"100%",l:"2px"}]):s===3?(e(i)&&e(a)&&e(n)?v.height=x*3:l(i)&&l(a)&&l(n)?v.height=Math.floor(r/G):v.height=r,e(i)&&o(a)&&o(n)?p=[{w:100,h:"50%",b:"2px"},{w:50,h:"50%",t:"2px",r:"2px"},{w:50,h:"50%",t:"2px",l:"2px"}]:e(i)&&e(a)&&e(n)?p=[{w:100,h:d,b:"4px"},{w:100,h:d},{w:100,h:d,t:"4px"}]:l(i)&&o(a)&&o(n)?p=[{w:50,h:"100%",r:"2px"},{w:50,h:"50%",b:"2px",l:"2px"},{w:50,h:"50%",t:"2px",l:"2px"}]:o(i)&&o(a)&&l(n)?p=[{w:50,h:"50%",b:"2px",r:"2px"},{w:50,h:"50%",l:"-2px",b:"-2px",pos:"absolute",float:"none"},{w:50,h:"100%",r:"-2px",t:"0px",b:"0px",pos:"absolute",float:"none"}]:o(i)&&l(a)&&o(n)||l(i)&&l(a)&&l(n)?p=[{w:50,h:"50%",b:"2px",r:"2px"},{w:50,h:"100%",l:"2px",float:"right"},{w:50,h:"50%",t:"2px",r:"2px"}]:e(i)&&e(a)&&o(n)||e(i)&&e(a)&&l(n)?p=[{w:50,h:d,b:"2px",r:"2px"},{w:50,h:d,b:"2px",l:"2px"},{w:100,h:"".concat(r-x,"px"),t:"2px"}]:o(i)&&e(a)&&e(n)||l(i)&&e(a)&&e(n)?p=[{w:100,h:"".concat(r-x,"px"),b:"2px"},{w:50,h:d,t:"2px",r:"2px"},{w:50,h:d,t:"2px",l:"2px"}]:p=[{w:50,h:"50%",b:"2px",r:"2px"},{w:50,h:"50%",b:"2px",l:"2px"},{w:100,h:"50%",t:"2px"}]):s>=4&&(l(i)&&l(a)&&l(n)&&l(m)||l(i)&&l(a)&&l(n)&&o(m)||l(i)&&l(a)&&o(n)&&l(m)||l(i)&&o(a)&&l(n)&&l(m)||o(i)&&l(a)&&l(n)&&l(m)?v.height=Math.floor(r/G):e(i)&&e(a)&&e(n)&&e(m)?v.height=x*2:e(i)&&e(a)&&o(n)&&o(m)||o(i)&&o(a)&&e(n)&&e(m)?v.height=x+r/2:v.height=r,e(i)&&e(a)&&o(n)&&o(m)?p=[{w:50,h:d,b:"2px",r:"2px"},{w:50,h:d,b:"2px",l:"2px"},{w:50,h:"".concat(r/2,"px"),t:"2px",r:"2px"},{w:50,h:"".concat(r/2,"px"),t:"2px",l:"2px"}]:o(i)&&o(a)&&e(n)&&e(m)?p=[{w:50,h:"".concat(r/2,"px"),b:"2px",r:"2px"},{w:50,h:"".concat(r/2,"px"),b:"2px",l:"2px"},{w:50,h:d,t:"2px",r:"2px"},{w:50,h:d,t:"2px",l:"2px"}]:l(i)&&o(a)&&o(n)&&o(m)||l(i)&&e(a)&&e(n)&&e(m)?p=[{w:67,h:"100%",r:"2px"},{w:33,h:"33%",b:"4px",l:"2px"},{w:33,h:"33%",l:"2px"},{w:33,h:"33%",t:"4px",l:"2px"}]:p=[{w:50,h:"50%",b:"2px",r:"2px"},{w:50,h:"50%",b:"2px",l:"2px"},{w:50,h:"50%",t:"2px",r:"2px"},{w:50,h:"50%",t:"2px",l:"2px"}]),{style:v,itemsDimensions:p,size:s,width:r}},j=function(s){var r=N||M;if(r){if(s===1)return S();if(s>1)return K(s)}return{style:{height:F},itemsDimensions:[],size:s,width:r}},y=j(t.size),P=t.take(H).map(function(f,s){return u(de,{onClick:E,attachment:f,index:s,size:y.size,displayWidth:y.width,visible:!!h.visible,dimensions:y.itemsDimensions[s],last:s===H-1,total:t.size},f.id)});return Y.useLayoutEffect(function(){if(k.current){var f=k.current.offsetWidth;W&&W(f),q(f)}},[k.current]),ee.createElement("div",{className:I(R,"media-gallery",{"media-gallery--compact":g}),style:y.style,ref:k},U,P)};export{fe as default}; diff --git a/packs/js/media-item-9b67131c.js b/packs/js/media-item-f8ffc0fb.js similarity index 93% rename from packs/js/media-item-9b67131c.js rename to packs/js/media-item-f8ffc0fb.js index d90990962..579a8d828 100644 --- a/packs/js/media-item-9b67131c.js +++ b/packs/js/media-item-f8ffc0fb.js @@ -1 +1 @@ -import{f as C,r as T,dd as G,at as j,a,dh as q,di as K,R as L,av as V,W as p,dj as B,I as g,dk as D}from"../index-7380452a.js";import{v as F}from"./volume-08f8a8f1.js";import"./es.array.last-index-of-ca8fdd84.js";var Q=function(v){var e=v.attachment,y=v.onOpenMedia,d=C(),r=d.get("autoPlayGif"),h=d.get("showSensitiveMedia"),b=T.useState(G(e.status,h)),u=j(b,2),t=u[0],M=u[1],N=function(i){var l=i.target;c()&&l.play()},I=function(i){var l=i.target;c()&&(l.pause(),l.currentTime=0)},c=function(){return!r&&["gifv","video"].includes(e.type)},w=function(i){i.button===0&&!(i.ctrlKey||i.metaKey)&&(i.preventDefault(),t?y(e):M(!0))},m=e.status,x=m.spoiler_text||e.description,s="",_;if(e.type!=="unknown"){if(e.type==="image"){var P=Number(e.meta.getIn(["focus","x"]))||0,S=Number(e.meta.getIn(["focus","y"]))||0,k=(P/2+.5)*100,E=(S/-2+.5)*100;s=a(q,{src:e.preview_url,alt:e.description,style:{objectPosition:"".concat(k,"% ").concat(E,"%")},className:"h-full w-full overflow-hidden rounded-lg"})}else if(["gifv","video"].indexOf(e.type)!==-1){var n={};K()&&(n.playsInline=!0),r&&(n.autoPlay=!0),s=a("div",{className:p("media-gallery__gifv",{autoplay:r})},void 0,L.createElement("video",V({className:"media-gallery__item-gifv-thumbnail","aria-label":e.description,title:e.description,role:"application",src:e.url,onMouseEnter:N,onMouseLeave:I,loop:!0,muted:!0},n)),a("span",{className:"media-gallery__gifv__label"},void 0,"GIF"))}else if(e.type==="audio"){var f=e.remote_url||"",O=f.lastIndexOf("."),R=f.slice(O+1).toUpperCase();s=a("div",{className:"media-gallery__item-thumbnail"},void 0,a("span",{className:"media-gallery__item__icons"},void 0,a(g,{src:F})),a("span",{className:"media-gallery__file-extension__label"},void 0,R))}}return t||(_=a("span",{className:"media-gallery__item__icons"},void 0,a(g,{src:D}))),a("div",{className:"col-span-1"},void 0,a("a",{className:"media-gallery__item-thumbnail aspect-1",href:m.url,target:"_blank",onClick:w,title:x},void 0,a(B,{hash:e.blurhash,className:p("media-gallery__preview",{"media-gallery__preview--hidden":t})}),t&&s,!t&&_))};export{Q as M}; +import{f as C,r as T,dd as G,at as j,a,dh as q,di as K,R as L,av as V,W as p,dj as B,I as g,dk as D}from"../index-be605fd2.js";import{v as F}from"./volume-08f8a8f1.js";import"./es.array.last-index-of-d76ad0ed.js";var Q=function(v){var e=v.attachment,y=v.onOpenMedia,d=C(),r=d.get("autoPlayGif"),h=d.get("showSensitiveMedia"),b=T.useState(G(e.status,h)),u=j(b,2),t=u[0],M=u[1],N=function(i){var l=i.target;c()&&l.play()},I=function(i){var l=i.target;c()&&(l.pause(),l.currentTime=0)},c=function(){return!r&&["gifv","video"].includes(e.type)},w=function(i){i.button===0&&!(i.ctrlKey||i.metaKey)&&(i.preventDefault(),t?y(e):M(!0))},m=e.status,x=m.spoiler_text||e.description,s="",_;if(e.type!=="unknown"){if(e.type==="image"){var P=Number(e.meta.getIn(["focus","x"]))||0,S=Number(e.meta.getIn(["focus","y"]))||0,k=(P/2+.5)*100,E=(S/-2+.5)*100;s=a(q,{src:e.preview_url,alt:e.description,style:{objectPosition:"".concat(k,"% ").concat(E,"%")},className:"h-full w-full overflow-hidden rounded-lg"})}else if(["gifv","video"].indexOf(e.type)!==-1){var n={};K()&&(n.playsInline=!0),r&&(n.autoPlay=!0),s=a("div",{className:p("media-gallery__gifv",{autoplay:r})},void 0,L.createElement("video",V({className:"media-gallery__item-gifv-thumbnail","aria-label":e.description,title:e.description,role:"application",src:e.url,onMouseEnter:N,onMouseLeave:I,loop:!0,muted:!0},n)),a("span",{className:"media-gallery__gifv__label"},void 0,"GIF"))}else if(e.type==="audio"){var f=e.remote_url||"",O=f.lastIndexOf("."),R=f.slice(O+1).toUpperCase();s=a("div",{className:"media-gallery__item-thumbnail"},void 0,a("span",{className:"media-gallery__item__icons"},void 0,a(g,{src:F})),a("span",{className:"media-gallery__file-extension__label"},void 0,R))}}return t||(_=a("span",{className:"media-gallery__item__icons"},void 0,a(g,{src:D}))),a("div",{className:"col-span-1"},void 0,a("a",{className:"media-gallery__item-thumbnail aspect-1",href:m.url,target:"_blank",onClick:w,title:x},void 0,a(B,{hash:e.blurhash,className:p("media-gallery__preview",{"media-gallery__preview--hidden":t})}),t&&s,!t&&_))};export{Q as M}; diff --git a/packs/js/media-modal-4e3635a1.js b/packs/js/media-modal-735f29ce.js similarity index 94% rename from packs/js/media-modal-4e3635a1.js rename to packs/js/media-modal-735f29ce.js index a1be1e8c4..7f6e8b14c 100644 --- a/packs/js/media-modal-4e3635a1.js +++ b/packs/js/media-modal-735f29ce.js @@ -1 +1 @@ -import{v as we}from"./arrow-right-b75290c7.js";import{r as C,a as s,R as E,av as xe,di as ye,dU as J,dV as ee,_ as h,dW as g,at as I,dX as te,dY as T,dZ as ae,W as b,d as Ce,a7 as _e,u as Se,aL as ke,q as be,F as Ie,Q as Ee,aM as Le,aC as Ne,aO as Me,a2 as Re,H as O,aG as B,a5 as Pe,d_ as De,A as G,d$ as Ae,df as ze,o as Te,e0 as $e,aP as He,aQ as Oe}from"../index-7380452a.js";import{V as Be,a as Ve}from"./index-486dc940.js";import{v as We}from"./arrows-minimize-7c27a12c.js";import{v as qe}from"./download-ac53125a.js";import{R as Ue}from"./index-571dd45e.js";import Xe from"./index-e88098cf.js";import{T as je}from"./thread-b9635854.js";import"./volume-08f8a8f1.js";import"./web.url.constructor-8f9eaf9c.js";import"./object-assign-7ac9a0a3.js";import"./es.array.last-index-of-ca8fdd84.js";import"./media-aspect-ratio-df6a7bb1.js";import"./warning-07d0fac9.js";import"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";import"./pending-status-7f660229.js";import"./poll-preview-66340c9e.js";import"./noop-19c18e1e.js";import"./status-container-59e57baf.js";var Fe=function(o){var i=o.src,e=o.alt,t=o.time,r=o.controls,d=o.muted,n=o.onClick,l=C.useRef(null);C.useEffect(function(){var c,p=function(){t&&(l.current.currentTime=t)};return(c=l.current)===null||c===void 0||c.addEventListener("loadeddata",p),function(){var v;(v=l.current)===null||v===void 0||v.removeEventListener("loadeddata",p)}},[l.current]);var f=function(p){p.stopPropagation();var v=n;v&&v()},m={};return ye()&&(m.playsInline=!0),s("div",{className:"extended-video-player"},void 0,E.createElement("video",xe({ref:l,src:i,autoPlay:!0,role:"button",tabIndex:0,"aria-label":e,title:e,muted:d,controls:r,loop:!r,onClick:f},m)))};function Ye(w){var o=Ke();return function(){var e=T(w),t;if(o){var r=T(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return ae(this,t)}}function Ke(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Z=1,Ge=4,Ze=function(o,i){return{x:(o.clientX+i.clientX)/2,y:(o.clientY+i.clientY)/2}},Q=function(o,i){return Math.sqrt(Math.pow(o.clientX-i.clientX,2)+Math.pow(o.clientY-i.clientY,2))},Qe=function(o,i,e){return Math.min(i,Math.max(o,e))},re=function(w){J(i,w);var o=Ye(i);function i(){var e;ee(this,i);for(var t=arguments.length,r=new Array(t),d=0;d"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var ne=function(w){J(i,w);var o=Je(i);function i(){var e;ee(this,i);for(var t=arguments.length,r=new Array(t),d=0;d1,de=function(u){return $(u%i.size)},X=function(){return $((z()+1)%i.size)},j=function(){return $((i.size+z()-1)%i.size)},A=se?"pointer-events-none opacity-0":"",F=function(u){switch(u.key){case"ArrowLeft":j(),u.preventDefault(),u.stopPropagation();break;case"ArrowRight":X(),u.preventDefault(),u.stopPropagation();break}},ve=function(){var u=H?i.get(D):i.get(0);window.open(u==null?void 0:u.url)},z=function(){return D!==null?D:o.index},Y=function(){le(function(u){return!u&&$e()})},fe=function(u){e&&u.button===0&&!(u.ctrlKey||u.metaKey)&&(u.preventDefault(),l.push("/@".concat(e.account.acct,"/posts/").concat(e==null?void 0:e.id)),t())},he=i.map(function(a,u){var N=a.meta.getIn(["original","width"])||void 0,M=a.meta.getIn(["original","height"])||void 0,K=e&&s("a",{href:e.url,onClick:fe},void 0,s(Ie,{id:"lightbox.view_context",defaultMessage:"View context"}));return a.type==="image"?s(ne,{previewSrc:a.preview_url,src:a.url,width:N,height:M,alt:a.description,onClick:Y},a.url):a.type==="video"?s(Be,{preview:a.preview_url,blurhash:a.blurhash,src:a.url,width:N,height:M,startTime:d,detailed:!0,autoFocus:u===z(),link:K,alt:a.description,visible:!0},a.url):a.type==="audio"?s(Xe,{src:a.url,alt:a.description,poster:a.preview_url!==a.url?a.preview_url:e==null?void 0:e.getIn(["account","avatar_static"]),backgroundColor:a.meta.getIn(["colors","background"]),foregroundColor:a.meta.getIn(["colors","foreground"]),accentColor:a.meta.getIn(["colors","accent"]),duration:a.meta.getIn(["original","duration"],0)},a.url):a.type==="gifv"?s(Fe,{src:a.url,muted:!0,controls:!1,width:N,height:M,alt:a.description,onClick:Y},a.preview_url):null}).toArray(),me=C.useCallback(Ee(function(){_&&e&&n(Le(e==null?void 0:e.id,_)).then(function(a){var u=a.next;V(u)}).catch(function(){})},300,{leading:!0}),[_,e]),pe=function(){var a=He(regeneratorRuntime.mark(function u(){var N,M;return regeneratorRuntime.wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return R.next=2,n(Oe(e==null?void 0:e.id));case 2:N=R.sent,M=N.next,V(M);case 5:case"end":return R.stop()}},u)}));return function(){return a.apply(this,arguments)}}();if(C.useEffect(function(){pe().then(function(){y(!0)}).catch(function(){y(!0)})},[e==null?void 0:e.id]),C.useEffect(function(){return window.addEventListener("keydown",F,!1),function(){window.removeEventListener("keydown",F)}},[D]),e){if(!c&&x)return s(Ne,{});if(!c)return s(Me,{})}var ge=function(u){u.target.tagName==="DIV"&&t()};return s("div",{className:"media-modal pointer-events-auto fixed inset-0 z-[9999] h-full bg-gray-900/90"},void 0,s("div",{className:"absolute inset-0",role:"presentation"},void 0,s(Re,{onClick:ge,className:b("fixed inset-0 h-full grow transition-all",{"xl:pr-96":!L,"xl:pr-0":L}),justifyContent:"between"},void 0,s(O,{alignItems:"center",justifyContent:"between",className:b("flex-[0_0_60px] p-4 transition-opacity",A)},void 0,s(B,{title:f.formatMessage(P.close),src:Pe,onClick:t,theme:"dark",className:"!p-1.5 hover:scale-105 hover:bg-gray-900",iconClassName:"h-5 w-5"}),s(O,{alignItems:"center",space:2},void 0,s(B,{src:qe,theme:"dark",className:"!p-1.5 hover:scale-105 hover:bg-gray-900",iconClassName:"h-5 w-5",onClick:ve}),e&&s(B,{src:L?We:Ve,title:f.formatMessage(L?P.minimize:P.expand),theme:"dark",className:"hidden !p-1.5 hover:scale-105 hover:bg-gray-900 xl:block",iconClassName:"h-5 w-5",onClick:function(){return ue(!L)}}))),s("div",{className:"relative h-[calc(100vh-120px)] w-full grow"},void 0,H&&s("div",{className:b("absolute inset-y-0 left-5 z-10 flex items-center transition-opacity",A)},void 0,E.createElement("button",{tabIndex:0,className:"flex h-10 w-10 items-center justify-center rounded-full bg-gray-900 text-white",ref:De("Backspace"),onClick:j,"aria-label":f.formatMessage(P.previous)},s(G,{src:Ae,className:"h-5 w-5"}))),s(Ue,{style:tt,containerStyle:at,onChangeIndex:de,index:z()},void 0,he),H&&s("div",{className:b("absolute inset-y-0 right-5 z-10 flex items-center transition-opacity",A)},void 0,s("button",{tabIndex:0,className:"flex h-10 w-10 items-center justify-center rounded-full bg-gray-900 text-white",onClick:X,"aria-label":f.formatMessage(P.next)},void 0,s(G,{src:we,className:"h-5 w-5"})))),c&&s(O,{justifyContent:"center",className:b("flex-[0_0_60px] transition-opacity",A)},void 0,s(ze,{status:c,space:"md",statusActionButtonTheme:"inverse"}))),c&&s("div",{className:b("-right-96 hidden bg-white transition-all xl:fixed xl:inset-y-0 xl:right-0 xl:flex xl:w-96 xl:flex-col",{"xl:!-right-96":L})},void 0,s(je,{status:c,withMedia:!1,useWindowScroll:!1,itemClassName:"px-4",next:_,handleLoadMore:me}))))};export{kt as default}; +import{v as we}from"./arrow-right-b75290c7.js";import{r as C,a as s,R as E,av as xe,di as ye,dU as J,dV as ee,_ as h,dW as g,at as I,dX as te,dY as T,dZ as ae,W as b,d as Ce,a7 as _e,u as Se,aL as ke,q as be,F as Ie,Q as Ee,aM as Le,aC as Ne,aO as Me,a2 as Re,H as O,aG as B,a5 as Pe,d_ as De,A as G,d$ as Ae,df as ze,o as Te,e0 as $e,aP as He,aQ as Oe}from"../index-be605fd2.js";import{V as Be,a as Ve}from"./index-63ea9ebf.js";import{v as We}from"./arrows-minimize-7c27a12c.js";import{v as qe}from"./download-ac53125a.js";import{R as Ue}from"./index-3399e540.js";import Xe from"./index-305a8551.js";import{T as je}from"./thread-f9f548a4.js";import"./volume-08f8a8f1.js";import"./web.url.constructor-0fbaa340.js";import"./object-assign-35b0699c.js";import"./es.array.last-index-of-d76ad0ed.js";import"./media-aspect-ratio-df6a7bb1.js";import"./warning-07d0fac9.js";import"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";import"./pending-status-959f7aeb.js";import"./poll-preview-ddaf662b.js";import"./noop-3f99ae3e.js";import"./status-container-e53698d2.js";var Fe=function(o){var i=o.src,e=o.alt,t=o.time,r=o.controls,d=o.muted,n=o.onClick,l=C.useRef(null);C.useEffect(function(){var c,p=function(){t&&(l.current.currentTime=t)};return(c=l.current)===null||c===void 0||c.addEventListener("loadeddata",p),function(){var v;(v=l.current)===null||v===void 0||v.removeEventListener("loadeddata",p)}},[l.current]);var f=function(p){p.stopPropagation();var v=n;v&&v()},m={};return ye()&&(m.playsInline=!0),s("div",{className:"extended-video-player"},void 0,E.createElement("video",xe({ref:l,src:i,autoPlay:!0,role:"button",tabIndex:0,"aria-label":e,title:e,muted:d,controls:r,loop:!r,onClick:f},m)))};function Ye(w){var o=Ke();return function(){var e=T(w),t;if(o){var r=T(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return ae(this,t)}}function Ke(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Z=1,Ge=4,Ze=function(o,i){return{x:(o.clientX+i.clientX)/2,y:(o.clientY+i.clientY)/2}},Q=function(o,i){return Math.sqrt(Math.pow(o.clientX-i.clientX,2)+Math.pow(o.clientY-i.clientY,2))},Qe=function(o,i,e){return Math.min(i,Math.max(o,e))},re=function(w){J(i,w);var o=Ye(i);function i(){var e;ee(this,i);for(var t=arguments.length,r=new Array(t),d=0;d"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var ne=function(w){J(i,w);var o=Je(i);function i(){var e;ee(this,i);for(var t=arguments.length,r=new Array(t),d=0;d1,de=function(u){return $(u%i.size)},X=function(){return $((z()+1)%i.size)},j=function(){return $((i.size+z()-1)%i.size)},A=se?"pointer-events-none opacity-0":"",F=function(u){switch(u.key){case"ArrowLeft":j(),u.preventDefault(),u.stopPropagation();break;case"ArrowRight":X(),u.preventDefault(),u.stopPropagation();break}},ve=function(){var u=H?i.get(D):i.get(0);window.open(u==null?void 0:u.url)},z=function(){return D!==null?D:o.index},Y=function(){le(function(u){return!u&&$e()})},fe=function(u){e&&u.button===0&&!(u.ctrlKey||u.metaKey)&&(u.preventDefault(),l.push("/@".concat(e.account.acct,"/posts/").concat(e==null?void 0:e.id)),t())},he=i.map(function(a,u){var N=a.meta.getIn(["original","width"])||void 0,M=a.meta.getIn(["original","height"])||void 0,K=e&&s("a",{href:e.url,onClick:fe},void 0,s(Ie,{id:"lightbox.view_context",defaultMessage:"View context"}));return a.type==="image"?s(ne,{previewSrc:a.preview_url,src:a.url,width:N,height:M,alt:a.description,onClick:Y},a.url):a.type==="video"?s(Be,{preview:a.preview_url,blurhash:a.blurhash,src:a.url,width:N,height:M,startTime:d,detailed:!0,autoFocus:u===z(),link:K,alt:a.description,visible:!0},a.url):a.type==="audio"?s(Xe,{src:a.url,alt:a.description,poster:a.preview_url!==a.url?a.preview_url:e==null?void 0:e.getIn(["account","avatar_static"]),backgroundColor:a.meta.getIn(["colors","background"]),foregroundColor:a.meta.getIn(["colors","foreground"]),accentColor:a.meta.getIn(["colors","accent"]),duration:a.meta.getIn(["original","duration"],0)},a.url):a.type==="gifv"?s(Fe,{src:a.url,muted:!0,controls:!1,width:N,height:M,alt:a.description,onClick:Y},a.preview_url):null}).toArray(),me=C.useCallback(Ee(function(){_&&e&&n(Le(e==null?void 0:e.id,_)).then(function(a){var u=a.next;V(u)}).catch(function(){})},300,{leading:!0}),[_,e]),pe=function(){var a=He(regeneratorRuntime.mark(function u(){var N,M;return regeneratorRuntime.wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return R.next=2,n(Oe(e==null?void 0:e.id));case 2:N=R.sent,M=N.next,V(M);case 5:case"end":return R.stop()}},u)}));return function(){return a.apply(this,arguments)}}();if(C.useEffect(function(){pe().then(function(){y(!0)}).catch(function(){y(!0)})},[e==null?void 0:e.id]),C.useEffect(function(){return window.addEventListener("keydown",F,!1),function(){window.removeEventListener("keydown",F)}},[D]),e){if(!c&&x)return s(Ne,{});if(!c)return s(Me,{})}var ge=function(u){u.target.tagName==="DIV"&&t()};return s("div",{className:"media-modal pointer-events-auto fixed inset-0 z-[9999] h-full bg-gray-900/90"},void 0,s("div",{className:"absolute inset-0",role:"presentation"},void 0,s(Re,{onClick:ge,className:b("fixed inset-0 h-full grow transition-all",{"xl:pr-96":!L,"xl:pr-0":L}),justifyContent:"between"},void 0,s(O,{alignItems:"center",justifyContent:"between",className:b("flex-[0_0_60px] p-4 transition-opacity",A)},void 0,s(B,{title:f.formatMessage(P.close),src:Pe,onClick:t,theme:"dark",className:"!p-1.5 hover:scale-105 hover:bg-gray-900",iconClassName:"h-5 w-5"}),s(O,{alignItems:"center",space:2},void 0,s(B,{src:qe,theme:"dark",className:"!p-1.5 hover:scale-105 hover:bg-gray-900",iconClassName:"h-5 w-5",onClick:ve}),e&&s(B,{src:L?We:Ve,title:f.formatMessage(L?P.minimize:P.expand),theme:"dark",className:"hidden !p-1.5 hover:scale-105 hover:bg-gray-900 xl:block",iconClassName:"h-5 w-5",onClick:function(){return ue(!L)}}))),s("div",{className:"relative h-[calc(100vh-120px)] w-full grow"},void 0,H&&s("div",{className:b("absolute inset-y-0 left-5 z-10 flex items-center transition-opacity",A)},void 0,E.createElement("button",{tabIndex:0,className:"flex h-10 w-10 items-center justify-center rounded-full bg-gray-900 text-white",ref:De("Backspace"),onClick:j,"aria-label":f.formatMessage(P.previous)},s(G,{src:Ae,className:"h-5 w-5"}))),s(Ue,{style:tt,containerStyle:at,onChangeIndex:de,index:z()},void 0,he),H&&s("div",{className:b("absolute inset-y-0 right-5 z-10 flex items-center transition-opacity",A)},void 0,s("button",{tabIndex:0,className:"flex h-10 w-10 items-center justify-center rounded-full bg-gray-900 text-white",onClick:X,"aria-label":f.formatMessage(P.next)},void 0,s(G,{src:we,className:"h-5 w-5"})))),c&&s(O,{justifyContent:"center",className:b("flex-[0_0_60px] transition-opacity",A)},void 0,s(ze,{status:c,space:"md",statusActionButtonTheme:"inverse"}))),c&&s("div",{className:b("-right-96 hidden bg-white transition-all xl:fixed xl:inset-y-0 xl:right-0 xl:flex xl:w-96 xl:flex-col",{"xl:!-right-96":L})},void 0,s(je,{status:c,withMedia:!1,useWindowScroll:!1,itemClassName:"px-4",next:_,handleLoadMore:me}))))};export{kt as default}; diff --git a/packs/js/mentions-modal-023f3271.js b/packs/js/mentions-modal-12dc1b96.js similarity index 73% rename from packs/js/mentions-modal-023f3271.js rename to packs/js/mentions-modal-12dc1b96.js index 2f73f81a3..a34baf9f4 100644 --- a/packs/js/mentions-modal-023f3271.js +++ b/packs/js/mentions-modal-12dc1b96.js @@ -1 +1 @@ -import{d as f,r as i,aL as p,q as v,b9 as C,a,B as M,F as S,bu as b,aQ as h,aB as g}from"../index-7380452a.js";import{S as k}from"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var D=function(s){var l=s.onClose,o=s.statusId,u=f(),c=i.useCallback(p(),[]),n=v(function(t){return c(t,{id:o})}),r=n?C(n.mentions.map(function(t){return t.get("id")})):null,m=function(){u(h(o))},d=function(){l("MENTIONS")};i.useEffect(function(){m()},[]);var e;return r?e=a(k,{scrollKey:"mentions",className:"max-w-full",itemClassName:"pb-3"},void 0,r.map(function(t){return a(M,{id:t},t)})):e=a(g,{}),a(b,{title:a(S,{id:"column.mentions",defaultMessage:"Mentions"}),onClose:d},void 0,e)};export{D as default}; +import{d as f,r as i,aL as p,q as v,b9 as C,a,B as M,F as S,bu as b,aQ as h,aB as g}from"../index-be605fd2.js";import{S as k}from"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var D=function(s){var l=s.onClose,o=s.statusId,u=f(),c=i.useCallback(p(),[]),n=v(function(t){return c(t,{id:o})}),r=n?C(n.mentions.map(function(t){return t.get("id")})):null,m=function(){u(h(o))},d=function(){l("MENTIONS")};i.useEffect(function(){m()},[]);var e;return r?e=a(k,{scrollKey:"mentions",className:"max-w-full",itemClassName:"pb-3"},void 0,r.map(function(t){return a(M,{id:t},t)})):e=a(g,{}),a(b,{title:a(S,{id:"column.mentions",defaultMessage:"Mentions"}),onClose:d},void 0,e)};export{D as default}; diff --git a/packs/js/mfa-form-055b9d1a.js b/packs/js/mfa-form-f8ae9bea.js similarity index 99% rename from packs/js/mfa-form-055b9d1a.js rename to packs/js/mfa-form-f8ae9bea.js index 6171884c4..bd00cfc80 100644 --- a/packs/js/mfa-form-055b9d1a.js +++ b/packs/js/mfa-form-f8ae9bea.js @@ -1,4 +1,4 @@ -import{r as C,at as T,u as Q,d as H,a7 as G,fE as ue,bp as F,a as d,bI as K,aa as k,bF as Y,F as b,bG as $,a2 as I,y as S,bE as ee,o as x,fF as ce,aB as de,R as z,fG as fe,_ as te,fH as he,eZ as me,q as pe,X as ge}from"../index-7380452a.js";import"./es.promise.finally-9155a4db.js";var B=x({mfa_setup_disable_button:{id:"column.mfa_disable_button",defaultMessage:"Disable"},disableFail:{id:"security.disable.fail",defaultMessage:"Incorrect password. Try again."},mfaDisableSuccess:{id:"mfa.disable.success_message",defaultMessage:"MFA disabled"},passwordPlaceholder:{id:"mfa.mfa_setup.password_placeholder",defaultMessage:"Password"}}),Me=function(){var r=C.useState(!1),i=T(r,2),n=i[0],m=i[1],f=C.useState(""),c=T(f,2),g=c[0],e=c[1],t=Q(),s=H(),a=G(),o=C.useCallback(function(){m(!0),s(ue("totp",g)).then(function(){F.success(t.formatMessage(B.mfaDisableSuccess)),a.push("../auth/edit")}).finally(function(){m(!1)}).catch(function(){F.error(t.formatMessage(B.disableFail))})},[g,s,t]),h=function(w){e(w.target.value)};return d(ee,{onSubmit:o},void 0,d(I,{},void 0,d(S,{weight:"medium"},void 0,d(b,{id:"mfa.otp_enabled_title",defaultMessage:"OTP Enabled"})),d(S,{theme:"muted"},void 0,d(b,{id:"mfa.otp_enabled_description",defaultMessage:"You have enabled two-factor authentication via OTP."}))),d(Y,{labelText:t.formatMessage(B.passwordPlaceholder),hintText:d(b,{id:"mfa.mfa_disable_enter_password",defaultMessage:"Enter your current password to disable two-factor auth."})},void 0,d($,{type:"password",placeholder:t.formatMessage(B.passwordPlaceholder),name:"password",onChange:h,disabled:n,value:g,required:!0})),d(K,{},void 0,d(k,{disabled:n,theme:"danger",type:"submit",text:t.formatMessage(B.mfa_setup_disable_button)})))},j=x({mfaCancelButton:{id:"column.mfa_cancel",defaultMessage:"Cancel"},mfaSetupButton:{id:"column.mfa_setup",defaultMessage:"Proceed to Setup"},codesFail:{id:"security.codes.fail",defaultMessage:"Failed to fetch backup codes"}}),we=function(r){var i=r.displayOtpForm,n=r.handleSetupProceedClick,m=H(),f=Q(),c=G(),g=C.useState([]),e=T(g,2),t=e[0],s=e[1];return C.useEffect(function(){m(ce()).then(function(a){var o=a.codes;s(o)}).catch(function(){F.error(f.formatMessage(j.codesFail))})},[]),d(I,{space:4},void 0,d(I,{space:4},void 0,d(S,{theme:"muted"},void 0,d(b,{id:"mfa.setup_warning",defaultMessage:"Write these codes down or save them somewhere secure - otherwise you won't see them again. If you lose access to your 2FA app and recovery codes you'll be locked out of your account."})),d("div",{className:"rounded-lg border-2 border-solid border-gray-200 p-4 dark:border-gray-800"},void 0,d(I,{space:3},void 0,d(S,{weight:"medium",align:"center"},void 0,d(b,{id:"mfa.setup_recoverycodes",defaultMessage:"Recovery codes"})),t.length>0?d("div",{className:"grid grid-cols-2 gap-3 rounded-lg text-center"},void 0,t.map(function(a,o){return d(S,{theme:"muted",size:"sm"},o,a)})):d(de,{})))),!i&&d(K,{},void 0,d(k,{theme:"tertiary",text:f.formatMessage(j.mfaCancelButton),onClick:function(){return c.push("../auth/edit")}}),t.length>0&&d(k,{theme:"primary",text:f.formatMessage(j.mfaSetupButton),onClick:n})))},Ee=Object.defineProperty,U=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,q=(u,r,i)=>r in u?Ee(u,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):u[r]=i,Z=(u,r)=>{for(var i in r||(r={}))se.call(r,i)&&q(u,i,r[i]);if(U)for(var i of U(r))ae.call(r,i)&&q(u,i,r[i]);return u},Ce=(u,r)=>{var i={};for(var n in u)se.call(u,n)&&r.indexOf(n)<0&&(i[n]=u[n]);if(u!=null&&U)for(var n of U(u))r.indexOf(n)<0&&ae.call(u,n)&&(i[n]=u[n]);return i};/** +import{r as C,at as T,u as Q,d as H,a7 as G,fE as ue,bp as F,a as d,bI as K,aa as k,bF as Y,F as b,bG as $,a2 as I,y as S,bE as ee,o as x,fF as ce,aB as de,R as z,fG as fe,_ as te,fH as he,eZ as me,q as pe,X as ge}from"../index-be605fd2.js";import"./es.promise.finally-0ef07e66.js";var B=x({mfa_setup_disable_button:{id:"column.mfa_disable_button",defaultMessage:"Disable"},disableFail:{id:"security.disable.fail",defaultMessage:"Incorrect password. Try again."},mfaDisableSuccess:{id:"mfa.disable.success_message",defaultMessage:"MFA disabled"},passwordPlaceholder:{id:"mfa.mfa_setup.password_placeholder",defaultMessage:"Password"}}),Me=function(){var r=C.useState(!1),i=T(r,2),n=i[0],m=i[1],f=C.useState(""),c=T(f,2),g=c[0],e=c[1],t=Q(),s=H(),a=G(),o=C.useCallback(function(){m(!0),s(ue("totp",g)).then(function(){F.success(t.formatMessage(B.mfaDisableSuccess)),a.push("../auth/edit")}).finally(function(){m(!1)}).catch(function(){F.error(t.formatMessage(B.disableFail))})},[g,s,t]),h=function(w){e(w.target.value)};return d(ee,{onSubmit:o},void 0,d(I,{},void 0,d(S,{weight:"medium"},void 0,d(b,{id:"mfa.otp_enabled_title",defaultMessage:"OTP Enabled"})),d(S,{theme:"muted"},void 0,d(b,{id:"mfa.otp_enabled_description",defaultMessage:"You have enabled two-factor authentication via OTP."}))),d(Y,{labelText:t.formatMessage(B.passwordPlaceholder),hintText:d(b,{id:"mfa.mfa_disable_enter_password",defaultMessage:"Enter your current password to disable two-factor auth."})},void 0,d($,{type:"password",placeholder:t.formatMessage(B.passwordPlaceholder),name:"password",onChange:h,disabled:n,value:g,required:!0})),d(K,{},void 0,d(k,{disabled:n,theme:"danger",type:"submit",text:t.formatMessage(B.mfa_setup_disable_button)})))},j=x({mfaCancelButton:{id:"column.mfa_cancel",defaultMessage:"Cancel"},mfaSetupButton:{id:"column.mfa_setup",defaultMessage:"Proceed to Setup"},codesFail:{id:"security.codes.fail",defaultMessage:"Failed to fetch backup codes"}}),we=function(r){var i=r.displayOtpForm,n=r.handleSetupProceedClick,m=H(),f=Q(),c=G(),g=C.useState([]),e=T(g,2),t=e[0],s=e[1];return C.useEffect(function(){m(ce()).then(function(a){var o=a.codes;s(o)}).catch(function(){F.error(f.formatMessage(j.codesFail))})},[]),d(I,{space:4},void 0,d(I,{space:4},void 0,d(S,{theme:"muted"},void 0,d(b,{id:"mfa.setup_warning",defaultMessage:"Write these codes down or save them somewhere secure - otherwise you won't see them again. If you lose access to your 2FA app and recovery codes you'll be locked out of your account."})),d("div",{className:"rounded-lg border-2 border-solid border-gray-200 p-4 dark:border-gray-800"},void 0,d(I,{space:3},void 0,d(S,{weight:"medium",align:"center"},void 0,d(b,{id:"mfa.setup_recoverycodes",defaultMessage:"Recovery codes"})),t.length>0?d("div",{className:"grid grid-cols-2 gap-3 rounded-lg text-center"},void 0,t.map(function(a,o){return d(S,{theme:"muted",size:"sm"},o,a)})):d(de,{})))),!i&&d(K,{},void 0,d(k,{theme:"tertiary",text:f.formatMessage(j.mfaCancelButton),onClick:function(){return c.push("../auth/edit")}}),t.length>0&&d(k,{theme:"primary",text:f.formatMessage(j.mfaSetupButton),onClick:n})))},Ee=Object.defineProperty,U=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,q=(u,r,i)=>r in u?Ee(u,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):u[r]=i,Z=(u,r)=>{for(var i in r||(r={}))se.call(r,i)&&q(u,i,r[i]);if(U)for(var i of U(r))ae.call(r,i)&&q(u,i,r[i]);return u},Ce=(u,r)=>{var i={};for(var n in u)se.call(u,n)&&r.indexOf(n)<0&&(i[n]=u[n]);if(u!=null&&U)for(var n of U(u))r.indexOf(n)<0&&ae.call(u,n)&&(i[n]=u[n]);return i};/** * @license QR Code generator library (TypeScript) * Copyright (c) Project Nayuki. * SPDX-License-Identifier: MIT diff --git a/packs/js/missing-description-modal-250e0a46.js b/packs/js/missing-description-modal-b7099f96.js similarity index 83% rename from packs/js/missing-description-modal-250e0a46.js rename to packs/js/missing-description-modal-b7099f96.js index e3f03d260..37937d9e2 100644 --- a/packs/js/missing-description-modal-250e0a46.js +++ b/packs/js/missing-description-modal-b7099f96.js @@ -1 +1 @@ -import{e3 as o,a as s,F as c,bu as l,o as d}from"../index-7380452a.js";var t=d({modalTitle:{id:"missing_description_modal.text",defaultMessage:"You have not entered a description for all attachments."},post:{id:"missing_description_modal.continue",defaultMessage:"Post"},cancel:{id:"missing_description_modal.cancel",defaultMessage:"Cancel"}}),r=function(e){var i=e.onClose,n=e.onContinue,a=e.intl;return s(l,{title:a.formatMessage(t.modalTitle),confirmationAction:n,confirmationText:a.formatMessage(t.post),confirmationTheme:"danger",cancelText:a.formatMessage(t.cancel),cancelAction:i},void 0,s("p",{className:"text-gray-600 dark:text-gray-300"},void 0,s(c,{id:"missing_description_modal.description",defaultMessage:"Continue anyway?"})))};const M=o(r);export{M as default}; +import{e3 as o,a as s,F as c,bu as l,o as d}from"../index-be605fd2.js";var t=d({modalTitle:{id:"missing_description_modal.text",defaultMessage:"You have not entered a description for all attachments."},post:{id:"missing_description_modal.continue",defaultMessage:"Post"},cancel:{id:"missing_description_modal.cancel",defaultMessage:"Cancel"}}),r=function(e){var i=e.onClose,n=e.onContinue,a=e.intl;return s(l,{title:a.formatMessage(t.modalTitle),confirmationAction:n,confirmationText:a.formatMessage(t.post),confirmationTheme:"danger",cancelText:a.formatMessage(t.cancel),cancelAction:i},void 0,s("p",{className:"text-gray-600 dark:text-gray-300"},void 0,s(c,{id:"missing_description_modal.description",defaultMessage:"Continue anyway?"})))};const M=o(r);export{M as default}; diff --git a/packs/js/modal-container-bd39a3de.js b/packs/js/modal-container-d4d02030.js similarity index 96% rename from packs/js/modal-container-bd39a3de.js rename to packs/js/modal-container-d4d02030.js index 449b15fcf..6aaa9812f 100644 --- a/packs/js/modal-container-bd39a3de.js +++ b/packs/js/modal-container-d4d02030.js @@ -1 +1 @@ -import{u as v,a as n,bu as O,o as R,aB as _,dU as T,dV as I,_ as u,dW as M,R as p,av as m,dX as N,hM as y,dY as C,dZ as S,i0 as h,i1 as A,i2 as P,i3 as g,i4 as D,i5 as b,i6 as L,i7 as B,i8 as U,i9 as k,ia as V,ib as F,ic as w,id as Y,ie as x,ig as G,ih as H,ii as z,ij as J,ik as K,il as $,im as j,io as W,ip as Z,iq as q,ir as X,is as Q,it as ee,iu as oe,iv as ae,iw as re,ix as te,iy as se,iz as ne,iA as ie,iB as le,iC as de,iD as ce,iE as ue,ee as Me,eb as pe,bv as Ee}from"../index-7380452a.js";import{M as me}from"./modal-root-dfddfde1.js";var E=R({error:{id:"bundle_modal_error.message",defaultMessage:"Something went wrong while loading this modal."},retry:{id:"bundle_modal_error.retry",defaultMessage:"Try again"},close:{id:"bundle_modal_error.close",defaultMessage:"Close"}}),Ce=function(a){var i=a.onRetry,e=a.onClose,r=v(),s=function(){i()};return n(O,{title:r.formatMessage(E.error),confirmationAction:e,confirmationText:r.formatMessage(E.close),secondaryAction:s,secondaryText:r.formatMessage(E.retry)})},fe=function(){return n("div",{className:"modal-root__modal error-modal"},void 0,n("div",{className:"error-modal__body"},void 0,n(_,{})),n("div",{className:"error-modal__footer"},void 0,n("div",{},void 0,n("button",{className:"error-modal__nav"}))))};function ve(o){var a=Oe();return function(){var e=C(o),r;if(a){var s=C(this).constructor;r=Reflect.construct(e,arguments,s)}else r=e.apply(this,arguments);return S(this,r)}}function Oe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Re={ACCOUNT_MODERATION:h,ACCOUNT_NOTE:A,ACTIONS:P,BIRTHDAYS:g,BOOST:D,COMPARE_HISTORY:b,COMPONENT:L,COMPOSE:B,COMPOSE_EVENT:U,CONFIRM:k,CREATE_GROUP:V,DISLIKES:F,EDIT_ANNOUNCEMENT:w,EDIT_FEDERATION:Y,EMBED:x,EMOJI_PICKER:G,EVENT_MAP:H,EVENT_PARTICIPANTS:z,FAMILIAR_FOLLOWERS:J,FAVOURITES:K,HOTKEYS:$,JOIN_EVENT:j,LANDING_PAGE:W,LIST_ADDER:Z,LIST_EDITOR:q,MEDIA:X,MENTIONS:Q,MISSING_DESCRIPTION:ee,MUTE:oe,POLICY:ae,REACTIONS:re,REBLOGS:te,REPLY_MENTIONS:se,REPORT:ne,UNAUTHORIZED:ie,VERIFY_SMS:le,VIDEO:de},_e=function(o){T(i,o);var a=ve(i);function i(){var e;I(this,i);for(var r=arguments.length,s=new Array(r),t=0;t{const a=o.modals.last({modalType:null,modalProps:{}});return{type:a.modalType,props:a.modalProps}},Ie=o=>({onClose(a){switch(a){case"COMPOSE":o(pe());break;case"COMPOSE_EVENT":o(Me());break;case"REPORT":o(ue());break}o(Ee(a))}}),Se=ce(Te,Ie)(_e);export{Se as default}; +import{u as v,a as n,bu as O,o as R,aB as _,dU as T,dV as I,_ as u,dW as M,R as p,av as m,dX as N,hM as y,dY as C,dZ as S,i0 as h,i1 as A,i2 as P,i3 as g,i4 as D,i5 as b,i6 as L,i7 as B,i8 as U,i9 as k,ia as V,ib as F,ic as w,id as Y,ie as x,ig as G,ih as H,ii as z,ij as J,ik as K,il as $,im as j,io as W,ip as Z,iq as q,ir as X,is as Q,it as ee,iu as oe,iv as ae,iw as re,ix as te,iy as se,iz as ne,iA as ie,iB as le,iC as de,iD as ce,iE as ue,ee as Me,eb as pe,bv as Ee}from"../index-be605fd2.js";import{M as me}from"./modal-root-3073c8e6.js";var E=R({error:{id:"bundle_modal_error.message",defaultMessage:"Something went wrong while loading this modal."},retry:{id:"bundle_modal_error.retry",defaultMessage:"Try again"},close:{id:"bundle_modal_error.close",defaultMessage:"Close"}}),Ce=function(a){var i=a.onRetry,e=a.onClose,r=v(),s=function(){i()};return n(O,{title:r.formatMessage(E.error),confirmationAction:e,confirmationText:r.formatMessage(E.close),secondaryAction:s,secondaryText:r.formatMessage(E.retry)})},fe=function(){return n("div",{className:"modal-root__modal error-modal"},void 0,n("div",{className:"error-modal__body"},void 0,n(_,{})),n("div",{className:"error-modal__footer"},void 0,n("div",{},void 0,n("button",{className:"error-modal__nav"}))))};function ve(o){var a=Oe();return function(){var e=C(o),r;if(a){var s=C(this).constructor;r=Reflect.construct(e,arguments,s)}else r=e.apply(this,arguments);return S(this,r)}}function Oe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Re={ACCOUNT_MODERATION:h,ACCOUNT_NOTE:A,ACTIONS:P,BIRTHDAYS:g,BOOST:D,COMPARE_HISTORY:b,COMPONENT:L,COMPOSE:B,COMPOSE_EVENT:U,CONFIRM:k,CREATE_GROUP:V,DISLIKES:F,EDIT_ANNOUNCEMENT:w,EDIT_FEDERATION:Y,EMBED:x,EMOJI_PICKER:G,EVENT_MAP:H,EVENT_PARTICIPANTS:z,FAMILIAR_FOLLOWERS:J,FAVOURITES:K,HOTKEYS:$,JOIN_EVENT:j,LANDING_PAGE:W,LIST_ADDER:Z,LIST_EDITOR:q,MEDIA:X,MENTIONS:Q,MISSING_DESCRIPTION:ee,MUTE:oe,POLICY:ae,REACTIONS:re,REBLOGS:te,REPLY_MENTIONS:se,REPORT:ne,UNAUTHORIZED:ie,VERIFY_SMS:le,VIDEO:de},_e=function(o){T(i,o);var a=ve(i);function i(){var e;I(this,i);for(var r=arguments.length,s=new Array(r),t=0;t{const a=o.modals.last({modalType:null,modalProps:{}});return{type:a.modalType,props:a.modalProps}},Ie=o=>({onClose(a){switch(a){case"COMPOSE":o(pe());break;case"COMPOSE_EVENT":o(Me());break;case"REPORT":o(ue());break}o(Ee(a))}}),Se=ce(Te,Ie)(_e);export{Se as default}; diff --git a/packs/js/modal-root-dfddfde1.js b/packs/js/modal-root-3073c8e6.js similarity index 99% rename from packs/js/modal-root-dfddfde1.js rename to packs/js/modal-root-3073c8e6.js index fe3394246..0e9449bba 100644 --- a/packs/js/modal-root-dfddfde1.js +++ b/packs/js/modal-root-3073c8e6.js @@ -1,4 +1,4 @@ -import{u as J,a7 as X,d as Z,r as C,at as $,ed as K,R as U,W as q,a as p,aD as z,aH as B,F as O,bv as k,eb as ee,ee as te,ef as ne,eg as ie,bL as re,_ as ae,o as oe}from"../index-7380452a.js";var T=function(){function u(r,a){for(var l=0;l"u")return;var u=Array.prototype.slice,r=Element.prototype.matches||Element.prototype.msMatchesSelector,a=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","details","summary","iframe","object","embed","[contenteditable]"].join(","),l=function(){function d(t,e){S(this,d),this._inertManager=e,this._rootElement=t,this._managedNodes=new Set,this._rootElement.hasAttribute("aria-hidden")?this._savedAriaHidden=this._rootElement.getAttribute("aria-hidden"):this._savedAriaHidden=null,this._rootElement.setAttribute("aria-hidden","true"),this._makeSubtreeUnfocusable(this._rootElement),this._observer=new MutationObserver(this._onMutation.bind(this)),this._observer.observe(this._rootElement,{attributes:!0,childList:!0,subtree:!0})}return T(d,[{key:"destructor",value:function(){this._observer.disconnect(),this._rootElement&&(this._savedAriaHidden!==null?this._rootElement.setAttribute("aria-hidden",this._savedAriaHidden):this._rootElement.removeAttribute("aria-hidden")),this._managedNodes.forEach(function(e){this._unmanageNode(e.node)},this),this._observer=null,this._rootElement=null,this._managedNodes=null,this._inertManager=null}},{key:"_makeSubtreeUnfocusable",value:function(e){var i=this;N(e,function(f){return i._visitNode(f)});var n=document.activeElement;if(!document.body.contains(e)){for(var o=e,c=void 0;o;){if(o.nodeType===Node.DOCUMENT_FRAGMENT_NODE){c=o;break}o=o.parentNode}c&&(n=c.activeElement)}e.contains(n)&&(n.blur(),n===document.activeElement&&document.body.focus())}},{key:"_visitNode",value:function(e){if(e.nodeType===Node.ELEMENT_NODE){var i=e;i!==this._rootElement&&i.hasAttribute("inert")&&this._adoptInertRoot(i),(r.call(i,a)||i.hasAttribute("tabindex"))&&this._manageNode(i)}}},{key:"_manageNode",value:function(e){var i=this._inertManager.register(e,this);this._managedNodes.add(i)}},{key:"_unmanageNode",value:function(e){var i=this._inertManager.deregister(e,this);i&&this._managedNodes.delete(i)}},{key:"_unmanageSubtree",value:function(e){var i=this;N(e,function(n){return i._unmanageNode(n)})}},{key:"_adoptInertRoot",value:function(e){var i=this._inertManager.getInertRoot(e);i||(this._inertManager.setInert(e,!0),i=this._inertManager.getInertRoot(e)),i.managedNodes.forEach(function(n){this._manageNode(n.node)},this)}},{key:"_onMutation",value:function(e,i){e.forEach(function(n){var o=n.target;if(n.type==="childList")u.call(n.addedNodes).forEach(function(f){this._makeSubtreeUnfocusable(f)},this),u.call(n.removedNodes).forEach(function(f){this._unmanageSubtree(f)},this);else if(n.type==="attributes"){if(n.attributeName==="tabindex")this._manageNode(o);else if(o!==this._rootElement&&n.attributeName==="inert"&&o.hasAttribute("inert")){this._adoptInertRoot(o);var c=this._inertManager.getInertRoot(o);this._managedNodes.forEach(function(f){o.contains(f.node)&&c._manageNode(f.node)})}}},this)}},{key:"managedNodes",get:function(){return new Set(this._managedNodes)}},{key:"hasSavedAriaHidden",get:function(){return this._savedAriaHidden!==null}},{key:"savedAriaHidden",set:function(e){this._savedAriaHidden=e},get:function(){return this._savedAriaHidden}}]),d}(),h=function(){function d(t,e){S(this,d),this._node=t,this._overrodeFocusMethod=!1,this._inertRoots=new Set([e]),this._savedTabIndex=null,this._destroyed=!1,this.ensureUntabbable()}return T(d,[{key:"destructor",value:function(){if(this._throwIfDestroyed(),this._node&&this._node.nodeType===Node.ELEMENT_NODE){var e=this._node;this._savedTabIndex!==null?e.setAttribute("tabindex",this._savedTabIndex):e.removeAttribute("tabindex"),this._overrodeFocusMethod&&delete e.focus}this._node=null,this._inertRoots=null,this._destroyed=!0}},{key:"_throwIfDestroyed",value:function(){if(this.destroyed)throw new Error("Trying to access destroyed InertNode")}},{key:"ensureUntabbable",value:function(){if(this.node.nodeType===Node.ELEMENT_NODE){var e=this.node;if(r.call(e,a)){if(e.tabIndex===-1&&this.hasSavedTabIndex)return;e.hasAttribute("tabindex")&&(this._savedTabIndex=e.tabIndex),e.setAttribute("tabindex","-1"),e.nodeType===Node.ELEMENT_NODE&&(e.focus=function(){},this._overrodeFocusMethod=!0)}else e.hasAttribute("tabindex")&&(this._savedTabIndex=e.tabIndex,e.removeAttribute("tabindex"))}}},{key:"addInertRoot",value:function(e){this._throwIfDestroyed(),this._inertRoots.add(e)}},{key:"removeInertRoot",value:function(e){this._throwIfDestroyed(),this._inertRoots.delete(e),this._inertRoots.size===0&&this.destructor()}},{key:"destroyed",get:function(){return this._destroyed}},{key:"hasSavedTabIndex",get:function(){return this._savedTabIndex!==null}},{key:"node",get:function(){return this._throwIfDestroyed(),this._node}},{key:"savedTabIndex",set:function(e){this._throwIfDestroyed(),this._savedTabIndex=e},get:function(){return this._throwIfDestroyed(),this._savedTabIndex}}]),d}(),E=function(){function d(t){if(S(this,d),!t)throw new Error("Missing required argument; InertManager needs to wrap a document.");this._document=t,this._managedNodes=new Map,this._inertRoots=new Map,this._observer=new MutationObserver(this._watchForInert.bind(this)),M(t.head||t.body||t.documentElement),t.readyState==="loading"?t.addEventListener("DOMContentLoaded",this._onDocumentLoaded.bind(this)):this._onDocumentLoaded()}return T(d,[{key:"setInert",value:function(e,i){if(i){if(this._inertRoots.has(e))return;var n=new l(e,this);if(e.setAttribute("inert",""),this._inertRoots.set(e,n),!this._document.body.contains(e))for(var o=e.parentNode;o;)o.nodeType===11&&M(o),o=o.parentNode}else{if(!this._inertRoots.has(e))return;var c=this._inertRoots.get(e);c.destructor(),this._inertRoots.delete(e),e.removeAttribute("inert")}}},{key:"getInertRoot",value:function(e){return this._inertRoots.get(e)}},{key:"register",value:function(e,i){var n=this._managedNodes.get(e);return n!==void 0?n.addInertRoot(i):n=new h(e,i),this._managedNodes.set(e,n),n}},{key:"deregister",value:function(e,i){var n=this._managedNodes.get(e);return n?(n.removeInertRoot(i),n.destroyed&&this._managedNodes.delete(e),n):null}},{key:"_onDocumentLoaded",value:function(){var e=u.call(this._document.querySelectorAll("[inert]"));e.forEach(function(i){this.setInert(i,!0)},this),this._observer.observe(this._document.body||this._document.documentElement,{attributes:!0,subtree:!0,childList:!0})}},{key:"_watchForInert",value:function(e,i){var n=this;e.forEach(function(o){switch(o.type){case"childList":u.call(o.addedNodes).forEach(function(g){if(g.nodeType===Node.ELEMENT_NODE){var b=u.call(g.querySelectorAll("[inert]"));r.call(g,"[inert]")&&b.unshift(g),b.forEach(function(w){this.setInert(w,!0)},n)}},n);break;case"attributes":if(o.attributeName!=="inert")return;var c=o.target,f=c.hasAttribute("inert");n.setInert(c,f);break}},this)}}]),d}();function N(d,t,e){if(d.nodeType==Node.ELEMENT_NODE){var i=d;t&&t(i);var n=i.shadowRoot;if(n){N(n,t);return}if(i.localName=="content"){for(var o=i,c=o.getDistributedNodes?o.getDistributedNodes():[],f=0;f"u")return;var u=Array.prototype.slice,r=Element.prototype.matches||Element.prototype.msMatchesSelector,a=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","details","summary","iframe","object","embed","[contenteditable]"].join(","),l=function(){function d(t,e){S(this,d),this._inertManager=e,this._rootElement=t,this._managedNodes=new Set,this._rootElement.hasAttribute("aria-hidden")?this._savedAriaHidden=this._rootElement.getAttribute("aria-hidden"):this._savedAriaHidden=null,this._rootElement.setAttribute("aria-hidden","true"),this._makeSubtreeUnfocusable(this._rootElement),this._observer=new MutationObserver(this._onMutation.bind(this)),this._observer.observe(this._rootElement,{attributes:!0,childList:!0,subtree:!0})}return T(d,[{key:"destructor",value:function(){this._observer.disconnect(),this._rootElement&&(this._savedAriaHidden!==null?this._rootElement.setAttribute("aria-hidden",this._savedAriaHidden):this._rootElement.removeAttribute("aria-hidden")),this._managedNodes.forEach(function(e){this._unmanageNode(e.node)},this),this._observer=null,this._rootElement=null,this._managedNodes=null,this._inertManager=null}},{key:"_makeSubtreeUnfocusable",value:function(e){var i=this;N(e,function(f){return i._visitNode(f)});var n=document.activeElement;if(!document.body.contains(e)){for(var o=e,c=void 0;o;){if(o.nodeType===Node.DOCUMENT_FRAGMENT_NODE){c=o;break}o=o.parentNode}c&&(n=c.activeElement)}e.contains(n)&&(n.blur(),n===document.activeElement&&document.body.focus())}},{key:"_visitNode",value:function(e){if(e.nodeType===Node.ELEMENT_NODE){var i=e;i!==this._rootElement&&i.hasAttribute("inert")&&this._adoptInertRoot(i),(r.call(i,a)||i.hasAttribute("tabindex"))&&this._manageNode(i)}}},{key:"_manageNode",value:function(e){var i=this._inertManager.register(e,this);this._managedNodes.add(i)}},{key:"_unmanageNode",value:function(e){var i=this._inertManager.deregister(e,this);i&&this._managedNodes.delete(i)}},{key:"_unmanageSubtree",value:function(e){var i=this;N(e,function(n){return i._unmanageNode(n)})}},{key:"_adoptInertRoot",value:function(e){var i=this._inertManager.getInertRoot(e);i||(this._inertManager.setInert(e,!0),i=this._inertManager.getInertRoot(e)),i.managedNodes.forEach(function(n){this._manageNode(n.node)},this)}},{key:"_onMutation",value:function(e,i){e.forEach(function(n){var o=n.target;if(n.type==="childList")u.call(n.addedNodes).forEach(function(f){this._makeSubtreeUnfocusable(f)},this),u.call(n.removedNodes).forEach(function(f){this._unmanageSubtree(f)},this);else if(n.type==="attributes"){if(n.attributeName==="tabindex")this._manageNode(o);else if(o!==this._rootElement&&n.attributeName==="inert"&&o.hasAttribute("inert")){this._adoptInertRoot(o);var c=this._inertManager.getInertRoot(o);this._managedNodes.forEach(function(f){o.contains(f.node)&&c._manageNode(f.node)})}}},this)}},{key:"managedNodes",get:function(){return new Set(this._managedNodes)}},{key:"hasSavedAriaHidden",get:function(){return this._savedAriaHidden!==null}},{key:"savedAriaHidden",set:function(e){this._savedAriaHidden=e},get:function(){return this._savedAriaHidden}}]),d}(),h=function(){function d(t,e){S(this,d),this._node=t,this._overrodeFocusMethod=!1,this._inertRoots=new Set([e]),this._savedTabIndex=null,this._destroyed=!1,this.ensureUntabbable()}return T(d,[{key:"destructor",value:function(){if(this._throwIfDestroyed(),this._node&&this._node.nodeType===Node.ELEMENT_NODE){var e=this._node;this._savedTabIndex!==null?e.setAttribute("tabindex",this._savedTabIndex):e.removeAttribute("tabindex"),this._overrodeFocusMethod&&delete e.focus}this._node=null,this._inertRoots=null,this._destroyed=!0}},{key:"_throwIfDestroyed",value:function(){if(this.destroyed)throw new Error("Trying to access destroyed InertNode")}},{key:"ensureUntabbable",value:function(){if(this.node.nodeType===Node.ELEMENT_NODE){var e=this.node;if(r.call(e,a)){if(e.tabIndex===-1&&this.hasSavedTabIndex)return;e.hasAttribute("tabindex")&&(this._savedTabIndex=e.tabIndex),e.setAttribute("tabindex","-1"),e.nodeType===Node.ELEMENT_NODE&&(e.focus=function(){},this._overrodeFocusMethod=!0)}else e.hasAttribute("tabindex")&&(this._savedTabIndex=e.tabIndex,e.removeAttribute("tabindex"))}}},{key:"addInertRoot",value:function(e){this._throwIfDestroyed(),this._inertRoots.add(e)}},{key:"removeInertRoot",value:function(e){this._throwIfDestroyed(),this._inertRoots.delete(e),this._inertRoots.size===0&&this.destructor()}},{key:"destroyed",get:function(){return this._destroyed}},{key:"hasSavedTabIndex",get:function(){return this._savedTabIndex!==null}},{key:"node",get:function(){return this._throwIfDestroyed(),this._node}},{key:"savedTabIndex",set:function(e){this._throwIfDestroyed(),this._savedTabIndex=e},get:function(){return this._throwIfDestroyed(),this._savedTabIndex}}]),d}(),E=function(){function d(t){if(S(this,d),!t)throw new Error("Missing required argument; InertManager needs to wrap a document.");this._document=t,this._managedNodes=new Map,this._inertRoots=new Map,this._observer=new MutationObserver(this._watchForInert.bind(this)),M(t.head||t.body||t.documentElement),t.readyState==="loading"?t.addEventListener("DOMContentLoaded",this._onDocumentLoaded.bind(this)):this._onDocumentLoaded()}return T(d,[{key:"setInert",value:function(e,i){if(i){if(this._inertRoots.has(e))return;var n=new l(e,this);if(e.setAttribute("inert",""),this._inertRoots.set(e,n),!this._document.body.contains(e))for(var o=e.parentNode;o;)o.nodeType===11&&M(o),o=o.parentNode}else{if(!this._inertRoots.has(e))return;var c=this._inertRoots.get(e);c.destructor(),this._inertRoots.delete(e),e.removeAttribute("inert")}}},{key:"getInertRoot",value:function(e){return this._inertRoots.get(e)}},{key:"register",value:function(e,i){var n=this._managedNodes.get(e);return n!==void 0?n.addInertRoot(i):n=new h(e,i),this._managedNodes.set(e,n),n}},{key:"deregister",value:function(e,i){var n=this._managedNodes.get(e);return n?(n.removeInertRoot(i),n.destroyed&&this._managedNodes.delete(e),n):null}},{key:"_onDocumentLoaded",value:function(){var e=u.call(this._document.querySelectorAll("[inert]"));e.forEach(function(i){this.setInert(i,!0)},this),this._observer.observe(this._document.body||this._document.documentElement,{attributes:!0,subtree:!0,childList:!0})}},{key:"_watchForInert",value:function(e,i){var n=this;e.forEach(function(o){switch(o.type){case"childList":u.call(o.addedNodes).forEach(function(g){if(g.nodeType===Node.ELEMENT_NODE){var b=u.call(g.querySelectorAll("[inert]"));r.call(g,"[inert]")&&b.unshift(g),b.forEach(function(w){this.setInert(w,!0)},n)}},n);break;case"attributes":if(o.attributeName!=="inert")return;var c=o.target,f=c.hasAttribute("inert");n.setInert(c,f);break}},this)}}]),d}();function N(d,t,e){if(d.nodeType==Node.ELEMENT_NODE){var i=d;t&&t(i);var n=i.shadowRoot;if(n){N(n,t);return}if(i.localName=="content"){for(var o=i,c=o.getDistributedNodes?o.getDistributedNodes():[],f=0;f0}),M=i.useState(!0),d=c(M,2),u=d[0],n=d[1],L=i.useState(0),m=c(L,2),_=m[0],g=m[1],S=u&&r.count()===0;i.useEffect(function(){t(f()).then(function(){n(!1),g(1)}).catch(function(){})},[]);var x=function(){var s=_+1;n(!0),t(f({page:s})).then(function(){n(!1),g(s)}).catch(function(){})};return a(b,{label:o.formatMessage(h.heading)},void 0,a(k,{isLoading:u,showLoading:S,scrollKey:"moderation-log",emptyMessage:o.formatMessage(h.emptyMessage),hasMore:y,onLoadMore:x,className:"divide-y divide-solid divide-gray-200 dark:divide-gray-800"},void 0,r.map(function(e){return e&&a(N,{log:e},e.id)})))},N=function(o){var t=o.log;return a(D,{space:2,className:"p-4"},void 0,a(v,{},void 0,t.message),a(v,{theme:"muted",size:"xs"},void 0,a(A,{value:new Date(t.time*1e3),hour12:!0,year:"numeric",month:"short",day:"2-digit",hour:"numeric",minute:"2-digit"})))};export{z as default}; +import{u as w,d as I,q as l,r as i,at as c,gU as f,a,X as b,y as v,d8 as A,a2 as D,o as E}from"../index-be605fd2.js";import{S as k}from"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var h=E({heading:{id:"column.admin.moderation_log",defaultMessage:"Moderation Log"},emptyMessage:{id:"admin.moderation_log.empty_message",defaultMessage:"You have not performed any moderation actions yet. When you do, a history will be shown here."}}),z=function(){var o=w(),t=I(),r=l(function(e){return e.admin_log.index.map(function(s){return e.admin_log.items.get(String(s))})}),y=l(function(e){return e.admin_log.total-e.admin_log.index.count()>0}),M=i.useState(!0),d=c(M,2),u=d[0],n=d[1],L=i.useState(0),m=c(L,2),_=m[0],g=m[1],S=u&&r.count()===0;i.useEffect(function(){t(f()).then(function(){n(!1),g(1)}).catch(function(){})},[]);var x=function(){var s=_+1;n(!0),t(f({page:s})).then(function(){n(!1),g(s)}).catch(function(){})};return a(b,{label:o.formatMessage(h.heading)},void 0,a(k,{isLoading:u,showLoading:S,scrollKey:"moderation-log",emptyMessage:o.formatMessage(h.emptyMessage),hasMore:y,onLoadMore:x,className:"divide-y divide-solid divide-gray-200 dark:divide-gray-800"},void 0,r.map(function(e){return e&&a(N,{log:e},e.id)})))},N=function(o){var t=o.log;return a(D,{space:2,className:"p-4"},void 0,a(v,{},void 0,t.message),a(v,{theme:"muted",size:"xs"},void 0,a(A,{value:new Date(t.time*1e3),hour12:!0,year:"numeric",month:"short",day:"2-digit",hour:"numeric",minute:"2-digit"})))};export{z as default}; diff --git a/packs/js/mute-modal-ee4db2be.js b/packs/js/mute-modal-adf71913.js similarity index 96% rename from packs/js/mute-modal-ee4db2be.js rename to packs/js/mute-modal-adf71913.js index 2e309ebf0..ad15c5204 100644 --- a/packs/js/mute-modal-ee4db2be.js +++ b/packs/js/mute-modal-adf71913.js @@ -1 +1 @@ -import{d as D,q as c,b3 as w,g as _,a as e,a2 as l,y as u,F as t,H as m,ah as g,R as f,bt as k,bu as y,bv as v,bw as E,bx as F,by as H}from"../index-7380452a.js";var R=function(){var n=D(),h=c(function(a){return a.mutes.new.accountId}),M=w(h||void 0),o=M.account,s=c(function(a){return a.mutes.new.notifications}),i=c(function(a){return a.mutes.new.duration}),p=_().mutesDuration;if(!o)return null;var A=function(){n(v()),n(E(o.id,s,i))},r=function(){n(v())},C=function(){n(F())},d=function(x){n(H(x))},b=function(){return d(i?0:2*60*60*24)};return e(y,{title:e(t,{id:"confirmations.mute.heading",defaultMessage:"Mute @{name}",values:{name:o.acct}}),onClose:r,confirmationAction:A,confirmationText:e(t,{id:"confirmations.mute.confirm",defaultMessage:"Mute"}),cancelText:e(t,{id:"confirmation_modal.cancel",defaultMessage:"Cancel"}),cancelAction:r},void 0,e(l,{space:4},void 0,e(u,{},void 0,e(t,{id:"confirmations.mute.message",defaultMessage:"Are you sure you want to mute {name}?",values:{name:e("strong",{className:"break-words"},void 0,"@",o.acct)}})),e("label",{},void 0,e(m,{alignItems:"center",space:2},void 0,e(u,{tag:"span",theme:"muted"},void 0,e(t,{id:"mute_modal.hide_notifications",defaultMessage:"Hide notifications from this user?"})),e(g,{checked:s,onChange:C}))),p&&f.createElement(f.Fragment,null,e("label",{},void 0,e(m,{alignItems:"center",space:2},void 0,e(u,{tag:"span"},void 0,e(t,{id:"mute_modal.auto_expire",defaultMessage:"Automatically expire mute?"})),e(g,{checked:i!==0,onChange:b}))),i!==0&&e(l,{space:2},void 0,e(u,{weight:"medium"},void 0,e(t,{id:"mute_modal.duration",defaultMessage:"Duration"}),": "),e(k,{onDurationChange:d})))))};export{R as default}; +import{d as D,q as c,b3 as w,g as _,a as e,a2 as l,y as u,F as t,H as m,ah as g,R as f,bt as k,bu as y,bv as v,bw as E,bx as F,by as H}from"../index-be605fd2.js";var R=function(){var n=D(),h=c(function(a){return a.mutes.new.accountId}),M=w(h||void 0),o=M.account,s=c(function(a){return a.mutes.new.notifications}),i=c(function(a){return a.mutes.new.duration}),p=_().mutesDuration;if(!o)return null;var A=function(){n(v()),n(E(o.id,s,i))},r=function(){n(v())},C=function(){n(F())},d=function(x){n(H(x))},b=function(){return d(i?0:2*60*60*24)};return e(y,{title:e(t,{id:"confirmations.mute.heading",defaultMessage:"Mute @{name}",values:{name:o.acct}}),onClose:r,confirmationAction:A,confirmationText:e(t,{id:"confirmations.mute.confirm",defaultMessage:"Mute"}),cancelText:e(t,{id:"confirmation_modal.cancel",defaultMessage:"Cancel"}),cancelAction:r},void 0,e(l,{space:4},void 0,e(u,{},void 0,e(t,{id:"confirmations.mute.message",defaultMessage:"Are you sure you want to mute {name}?",values:{name:e("strong",{className:"break-words"},void 0,"@",o.acct)}})),e("label",{},void 0,e(m,{alignItems:"center",space:2},void 0,e(u,{tag:"span",theme:"muted"},void 0,e(t,{id:"mute_modal.hide_notifications",defaultMessage:"Hide notifications from this user?"})),e(g,{checked:s,onChange:C}))),p&&f.createElement(f.Fragment,null,e("label",{},void 0,e(m,{alignItems:"center",space:2},void 0,e(u,{tag:"span"},void 0,e(t,{id:"mute_modal.auto_expire",defaultMessage:"Automatically expire mute?"})),e(g,{checked:i!==0,onChange:b}))),i!==0&&e(l,{space:2},void 0,e(u,{weight:"medium"},void 0,e(t,{id:"mute_modal.duration",defaultMessage:"Duration"}),": "),e(k,{onDurationChange:d})))))};export{R as default}; diff --git a/packs/js/my-groups-panel-cc88785b.js b/packs/js/my-groups-panel-d41ae74e.js similarity index 53% rename from packs/js/my-groups-panel-cc88785b.js rename to packs/js/my-groups-panel-d41ae74e.js index 512ba0601..636e93138 100644 --- a/packs/js/my-groups-panel-cc88785b.js +++ b/packs/js/my-groups-panel-d41ae74e.js @@ -1 +1 @@ -import{kp as p,a as t}from"../index-7380452a.js";import{W as l}from"./widget-2ac720e4.js";import{G as c}from"./group-list-item-c21d0638.js";import{P as m}from"./placeholder-group-search-5e3066d6.js";import"./arrow-right-b75290c7.js";var v=function(){var r=p(),i=r.groups,o=r.isFetching,s=r.isFetched,a=r.isError,n=s&&i.length===0||a;return n?null:t(l,{title:"My Groups"},void 0,o?new Array(3).fill(0).map(function(e,u){return t(m,{withJoinAction:!1},u)}):i.slice(0,3).map(function(e){return t(c,{group:e,withJoinAction:!1},e.id)}))};export{v as default}; +import{kp as p,a as t}from"../index-be605fd2.js";import{W as l}from"./widget-84f84d09.js";import{G as c}from"./group-list-item-d71c8a2e.js";import{P as m}from"./placeholder-group-search-1a309751.js";import"./arrow-right-b75290c7.js";var v=function(){var r=p(),i=r.groups,o=r.isFetching,s=r.isFetched,a=r.isError,n=s&&i.length===0||a;return n?null:t(l,{title:"My Groups"},void 0,o?new Array(3).fill(0).map(function(e,u){return t(m,{withJoinAction:!1},u)}):i.slice(0,3).map(function(e){return t(c,{group:e,withJoinAction:!1},e.id)}))};export{v as default}; diff --git a/packs/js/new-event-panel-29372c07.js b/packs/js/new-event-panel-1fbbcf6a.js similarity index 89% rename from packs/js/new-event-panel-29372c07.js rename to packs/js/new-event-panel-1fbbcf6a.js index 02c1e1428..40291ad56 100644 --- a/packs/js/new-event-panel-29372c07.js +++ b/packs/js/new-event-panel-1fbbcf6a.js @@ -1 +1 @@ -import{d as s,a as e,a2 as t,y as n,F as a,aa as d,K as l,aD as r}from"../index-7380452a.js";var p=function(){var i=s(),o=function(){i(r("COMPOSE_EVENT"))};return e(t,{space:2},void 0,e(t,{},void 0,e(n,{size:"lg",weight:"bold"},void 0,e(a,{id:"new_event_panel.title",defaultMessage:"Create New Event"})),e(n,{theme:"muted",size:"sm"},void 0,e(a,{id:"new_event_panel.subtitle",defaultMessage:"Can't find what you're looking for? Schedule your own event."}))),e(d,{icon:l,onClick:o,theme:"secondary",block:!0},void 0,e(a,{id:"new_event_panel.action",defaultMessage:"Create event"})))};export{p as default}; +import{d as s,a as e,a2 as t,y as n,F as a,aa as d,K as l,aD as r}from"../index-be605fd2.js";var p=function(){var i=s(),o=function(){i(r("COMPOSE_EVENT"))};return e(t,{space:2},void 0,e(t,{},void 0,e(n,{size:"lg",weight:"bold"},void 0,e(a,{id:"new_event_panel.title",defaultMessage:"Create New Event"})),e(n,{theme:"muted",size:"sm"},void 0,e(a,{id:"new_event_panel.subtitle",defaultMessage:"Can't find what you're looking for? Schedule your own event."}))),e(d,{icon:l,onClick:o,theme:"secondary",block:!0},void 0,e(a,{id:"new_event_panel.action",defaultMessage:"Create event"})))};export{p as default}; diff --git a/packs/js/new-group-panel-d8f75bf3.js b/packs/js/new-group-panel-00a252ec.js similarity index 90% rename from packs/js/new-group-panel-d8f75bf3.js rename to packs/js/new-group-panel-00a252ec.js index 8639408de..714da5e7b 100644 --- a/packs/js/new-group-panel-d8f75bf3.js +++ b/packs/js/new-group-panel-00a252ec.js @@ -1 +1 @@ -import{d as i,q as p,a as e,a2 as r,y as o,F as a,aa as l,aD as d}from"../index-7380452a.js";import{h as c,P as f}from"./permissions-2149f5e2.js";var _=function(){var s=i(),u=p(function(t){return c(t,f)}),n=function(){s(d("CREATE_GROUP"))};return u?e(r,{space:2},void 0,e(r,{},void 0,e(o,{size:"lg",weight:"bold"},void 0,e(a,{id:"new_group_panel.title",defaultMessage:"Create Group"})),e(o,{theme:"muted",size:"sm"},void 0,e(a,{id:"new_group_panel.subtitle",defaultMessage:"Can't find what you're looking for? Start your own private or public group."}))),e(l,{onClick:n,theme:"secondary",block:!0},void 0,e(a,{id:"new_group_panel.action",defaultMessage:"Create Group"}))):null};export{_ as default}; +import{d as i,q as p,a as e,a2 as r,y as o,F as a,aa as l,aD as d}from"../index-be605fd2.js";import{h as c,P as f}from"./permissions-2149f5e2.js";var _=function(){var s=i(),u=p(function(t){return c(t,f)}),n=function(){s(d("CREATE_GROUP"))};return u?e(r,{space:2},void 0,e(r,{},void 0,e(o,{size:"lg",weight:"bold"},void 0,e(a,{id:"new_group_panel.title",defaultMessage:"Create Group"})),e(o,{theme:"muted",size:"sm"},void 0,e(a,{id:"new_group_panel.subtitle",defaultMessage:"Can't find what you're looking for? Start your own private or public group."}))),e(l,{onClick:n,theme:"secondary",block:!0},void 0,e(a,{id:"new_group_panel.action",defaultMessage:"Create Group"}))):null};export{_ as default}; diff --git a/packs/js/new-list-form-085135e5.js b/packs/js/new-list-form-396f644a.js similarity index 92% rename from packs/js/new-list-form-085135e5.js rename to packs/js/new-list-form-396f644a.js index 5f377a029..b1221c612 100644 --- a/packs/js/new-list-form-085135e5.js +++ b/packs/js/new-list-form-396f644a.js @@ -1 +1 @@ -import{d as m,u as p,q as o,a as e,H as g,bG as f,aa as h,bE as b,o as w,cR as S,cS as E}from"../index-7380452a.js";var d=w({label:{id:"lists.new.title_placeholder",defaultMessage:"New list title"},title:{id:"lists.new.create",defaultMessage:"Add list"},create:{id:"lists.new.create_title",defaultMessage:"Add list"}}),y=function(){var s=m(),i=p(),u=o(function(t){return t.listEditor.get("title")}),l=o(function(t){return!!t.listEditor.get("isSubmitting")}),c=function(a){s(S(a.target.value))},r=function(a){a.preventDefault(),s(E(!0))},n=i.formatMessage(d.label),v=i.formatMessage(d.create);return e(b,{onSubmit:r},void 0,e(g,{space:2},void 0,e("label",{className:"grow"},void 0,e("span",{style:{display:"none"}},void 0,n),e(f,{type:"text",value:u,disabled:l,onChange:c,placeholder:n})),e(h,{disabled:l,onClick:r,theme:"primary"},void 0,v)))};export{y as N}; +import{d as m,u as p,q as o,a as e,H as g,bG as f,aa as h,bE as b,o as w,cR as S,cS as E}from"../index-be605fd2.js";var d=w({label:{id:"lists.new.title_placeholder",defaultMessage:"New list title"},title:{id:"lists.new.create",defaultMessage:"Add list"},create:{id:"lists.new.create_title",defaultMessage:"Add list"}}),y=function(){var s=m(),i=p(),u=o(function(t){return t.listEditor.get("title")}),l=o(function(t){return!!t.listEditor.get("isSubmitting")}),c=function(a){s(S(a.target.value))},r=function(a){a.preventDefault(),s(E(!0))},n=i.formatMessage(d.label),v=i.formatMessage(d.create);return e(b,{onSubmit:r},void 0,e(g,{space:2},void 0,e("label",{className:"grow"},void 0,e("span",{style:{display:"none"}},void 0,n),e(f,{type:"text",value:u,disabled:l,onChange:c,placeholder:n})),e(h,{disabled:l,onClick:r,theme:"primary"},void 0,v)))};export{y as N}; diff --git a/packs/js/noop-19c18e1e.js b/packs/js/noop-19c18e1e.js deleted file mode 100644 index e56e23d88..000000000 --- a/packs/js/noop-19c18e1e.js +++ /dev/null @@ -1 +0,0 @@ -import{cD as o}from"../index-7380452a.js";function n(){}var t=n;const r=o(t);export{r as n}; diff --git a/packs/js/noop-3f99ae3e.js b/packs/js/noop-3f99ae3e.js new file mode 100644 index 000000000..d9b7ff184 --- /dev/null +++ b/packs/js/noop-3f99ae3e.js @@ -0,0 +1 @@ +import{cD as o}from"../index-be605fd2.js";function n(){}var t=n;const r=o(t);export{r as n}; diff --git a/packs/js/object-assign-7ac9a0a3.js b/packs/js/object-assign-35b0699c.js similarity index 90% rename from packs/js/object-assign-7ac9a0a3.js rename to packs/js/object-assign-35b0699c.js index afdfe9423..5a6987809 100644 --- a/packs/js/object-assign-7ac9a0a3.js +++ b/packs/js/object-assign-35b0699c.js @@ -1 +1 @@ -import{dB as g,dz as y,dO as j,dP as O,dQ as h,cU as P,dR as w,dS as E,dT as I}from"../index-7380452a.js";var d=g,T=y,x=j,$=O,c=h,R=E,S=I,A=P,B=w,r=Object.assign,f=Object.defineProperty,C=T([].concat),M=!r||$(function(){if(d&&r({b:1},r(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var o={},t={},i=Symbol("assign detection"),e="abcdefghijklmnopqrst";return o[i]=7,e.split("").forEach(function(n){t[n]=n}),r({},o)[i]!==7||c(r({},t)).join("")!==e})?function(t,i){for(var e=A(t),n=arguments.length,v=1,b=R.f,m=S.f;n>v;)for(var a=B(arguments[v++]),l=b?C(c(a),b(a)):c(a),p=l.length,u=0,s;p>u;)s=l[u++],(!d||x(m,a,s))&&(e[s]=a[s]);return e}:r;export{M as o}; +import{dB as g,dz as y,dO as j,dP as O,dQ as h,cU as P,dR as w,dS as E,dT as I}from"../index-be605fd2.js";var d=g,T=y,x=j,$=O,c=h,R=E,S=I,A=P,B=w,r=Object.assign,f=Object.defineProperty,C=T([].concat),M=!r||$(function(){if(d&&r({b:1},r(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var o={},t={},i=Symbol("assign detection"),e="abcdefghijklmnopqrst";return o[i]=7,e.split("").forEach(function(n){t[n]=n}),r({},o)[i]!==7||c(r({},t)).join("")!==e})?function(t,i){for(var e=A(t),n=arguments.length,v=1,b=R.f,m=S.f;n>v;)for(var a=B(arguments[v++]),l=b?C(c(a),b(a)):c(a),p=l.length,u=0,s;p>u;)s=l[u++],(!d||x(m,a,s))&&(e[s]=a[s]);return e}:r;export{M as o}; diff --git a/packs/js/object-to-array-a4f09672.js b/packs/js/object-to-array-ff10cf63.js similarity index 84% rename from packs/js/object-to-array-a4f09672.js rename to packs/js/object-to-array-ff10cf63.js index 1fdbf6bdf..e140bb380 100644 --- a/packs/js/object-to-array-a4f09672.js +++ b/packs/js/object-to-array-ff10cf63.js @@ -1 +1 @@ -import{dB as y,dP as b,dz as d,dT as p,fy as O,dQ as j,dm as h}from"../index-7380452a.js";var v=y,I=b,u=d,m=O,E=j,P=h,T=p.f,c=u(T),$=u([].push),R=v&&I(function(){var a=Object.create(null);return a[2]=2,!c(a,2)}),n=function(a){return function(i){for(var r=P(i),t=E(r),l=R&&m(r)===null,f=t.length,o=0,s=[],e;f>o;)e=t[o++],(!v||(l?e in r:c(r,e)))&&$(s,a?[e,r[e]]:r[e]);return s}},G={entries:n(!0),values:n(!1)};export{G as o}; +import{dB as y,dP as b,dz as d,dT as p,fy as O,dQ as j,dm as h}from"../index-be605fd2.js";var v=y,I=b,u=d,m=O,E=j,P=h,T=p.f,c=u(T),$=u([].push),R=v&&I(function(){var a=Object.create(null);return a[2]=2,!c(a,2)}),n=function(a){return function(i){for(var r=P(i),t=E(r),l=R&&m(r)===null,f=t.length,o=0,s=[],e;f>o;)e=t[o++],(!v||(l?e in r:c(r,e)))&&$(s,a?[e,r[e]]:r[e]);return s}},G={entries:n(!0),values:n(!1)};export{G as o}; diff --git a/packs/js/onboarding-wizard-f9b75a48.js b/packs/js/onboarding-wizard-d2099c82.js similarity index 97% rename from packs/js/onboarding-wizard-f9b75a48.js rename to packs/js/onboarding-wizard-d2099c82.js index 863832e47..5ca66b168 100644 --- a/packs/js/onboarding-wizard-f9b75a48.js +++ b/packs/js/onboarding-wizard-d2099c82.js @@ -1 +1 @@ -import{d as E,b8 as W,R as c,at as N,f2 as oe,a as e,a_ as j,a2 as d,y as l,F as a,c7 as ee,aB as ae,W as U,A as Y,bW as te,aa as _,a$ as T,fa as re,f4 as q,bp as O,o as G,u as J,bF as ie,bZ as se,f3 as ne,dh as de,bG as le,t as ue,hW as ce,b2 as ve,Q as me,B as ge,g as pe,H as fe,jo as be,jp as he}from"../index-7380452a.js";import{R as ye}from"./index-571dd45e.js";import"./web.url.constructor-8f9eaf9c.js";import{S as xe}from"./scrollable-list-df58e451.js";import{b as Se}from"./suggestions-c5444903.js";import"./warning-07d0fac9.js";import"./object-assign-7ac9a0a3.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var we=G({error:{id:"onboarding.error",defaultMessage:"An unexpected error occurred. Please try again or skip this step."}}),ke=function(f){var s=f.onNext,v=E(),u=W(),o=u.account,t=c.useRef(null),w=c.useState(),b=N(w,2),n=b[0],x=b[1],g=c.useState(!1),h=N(g,2),m=h[0],i=h[1],r=c.useState(!0),S=N(r,2),C=S[0],M=S[1],R=o?oe(o.avatar):!1,A=function(){var k;(k=t.current)===null||k===void 0||k.click()},z=function(k){var p,y=16e4,P=(p=k.target.files)===null||p===void 0?void 0:p.item(0);P&&re(P,y).then(function($){var I=$?URL.createObjectURL($):o==null?void 0:o.avatar;x(I),i(!0);var B=new FormData;B.append("avatar",P);var V=v(q(B));Promise.all([V]).then(function(){M(!1),i(!1),s()}).catch(function(H){var L;i(!1),M(!1),x(null),((L=H.response)===null||L===void 0?void 0:L.status)===422?O.error(H.response.data.error.replace("Validation failed: ","")):O.error(we.error)})}).catch(console.error)};return e(T,{variant:"rounded",size:"xl"},void 0,e(j,{},void 0,e("div",{},void 0,e("div",{className:"-mx-4 mb-4 border-b border-solid border-gray-200 pb-4 dark:border-gray-900/50 sm:-mx-10 sm:pb-10"},void 0,e(d,{space:2},void 0,e(l,{size:"2xl",align:"center",weight:"bold"},void 0,e(a,{id:"onboarding.avatar.title",defaultMessage:"Choose a profile picture"})),e(l,{theme:"muted",align:"center"},void 0,e(a,{id:"onboarding.avatar.subtitle",defaultMessage:"Just have fun with it."})))),e("div",{className:"mx-auto sm:w-2/3 sm:pt-10 md:w-1/2"},void 0,e(d,{space:10},void 0,e("div",{className:"relative mx-auto rounded-full bg-gray-200"},void 0,o&&e(ee,{src:n||o.avatar,size:175}),m&&e("div",{className:"absolute inset-0 flex items-center justify-center rounded-full bg-white/80 dark:bg-primary-900/80"},void 0,e(ae,{withText:!1})),e("button",{onClick:A,type:"button",className:U({"absolute bottom-3 right-2 p-1 bg-primary-600 rounded-full ring-2 ring-white dark:ring-primary-900 hover:bg-primary-700":!0,"opacity-50 pointer-events-none":m}),disabled:m},void 0,e(Y,{src:te,className:"h-5 w-5 text-white"})),c.createElement("input",{type:"file",className:"hidden",ref:t,onChange:z})),e(d,{justifyContent:"center",space:2},void 0,e(_,{block:!0,theme:"primary",type:"button",onClick:s,disabled:R&&C||m},void 0,m?e(a,{id:"onboarding.saving",defaultMessage:"Saving…"}):e(a,{id:"onboarding.next",defaultMessage:"Next"})),C&&e(_,{block:!0,theme:"tertiary",type:"button",onClick:s},void 0,e(a,{id:"onboarding.skip",defaultMessage:"Skip for now"}))))))))},Q=G({bioPlaceholder:{id:"onboarding.bio.placeholder",defaultMessage:"Tell the world a little about yourself…"},error:{id:"onboarding.error",defaultMessage:"An unexpected error occurred. Please try again or skip this step."}}),Ne=function(f){var s,v,u=f.onNext,o=J(),t=E(),w=W(),b=w.account,n=c.useState((s=b==null||(v=b.source)===null||v===void 0?void 0:v.note)!==null&&s!==void 0?s:""),x=N(n,2),g=x[0],h=x[1],m=c.useState(!1),i=N(m,2),r=i[0],S=i[1],C=c.useState([]),M=N(C,2),R=M[0],A=M[1],z=function(){S(!0);var k=t(q({note:g}));Promise.all([k]).then(function(){S(!1),u()}).catch(function(p){var y;S(!1),((y=p.response)===null||y===void 0?void 0:y.status)===422?A([p.response.data.error.replace("Validation failed: ","")]):O.error(Q.error)})};return e(T,{variant:"rounded",size:"xl"},void 0,e(j,{},void 0,e("div",{},void 0,e("div",{className:"-mx-4 mb-4 border-b border-solid border-gray-200 pb-4 dark:border-gray-800 sm:-mx-10 sm:pb-10"},void 0,e(d,{space:2},void 0,e(l,{size:"2xl",align:"center",weight:"bold"},void 0,e(a,{id:"onboarding.note.title",defaultMessage:"Write a short bio"})),e(l,{theme:"muted",align:"center"},void 0,e(a,{id:"onboarding.note.subtitle",defaultMessage:"You can always edit this later."})))),e(d,{space:5},void 0,e("div",{className:"mx-auto sm:w-2/3 sm:pt-10"},void 0,e(ie,{hintText:e(a,{id:"onboarding.bio.hint",defaultMessage:"Max 500 characters"}),labelText:e(a,{id:"edit_profile.fields.bio_label",defaultMessage:"Bio"}),errors:R},void 0,e(se,{onChange:function(k){return h(k.target.value)},placeholder:o.formatMessage(Q.bioPlaceholder),value:g,maxLength:500}))),e("div",{className:"mx-auto sm:w-2/3 md:w-1/2"},void 0,e(d,{justifyContent:"center",space:2},void 0,e(_,{block:!0,theme:"primary",type:"submit",disabled:r,onClick:z},void 0,r?e(a,{id:"onboarding.saving",defaultMessage:"Saving…"}):e(a,{id:"onboarding.next",defaultMessage:"Next"})),e(_,{block:!0,theme:"tertiary",type:"button",onClick:u},void 0,e(a,{id:"onboarding.skip",defaultMessage:"Skip for now"}))))))))};const _e="/packs/assets/confetti-ad45ba10.svg";var Me=function(f){var s=f.onComplete;return e(T,{variant:"rounded",size:"xl"},void 0,e(j,{},void 0,e(d,{space:2},void 0,e(Y,{strokeWidth:1,src:_e,className:"mx-auto h-16 w-16 text-primary-600 dark:text-primary-400"}),e(l,{size:"2xl",align:"center",weight:"bold"},void 0,e(a,{id:"onboarding.finished.title",defaultMessage:"Onboarding complete"})),e(l,{theme:"muted",align:"center"},void 0,e(a,{id:"onboarding.finished.message",defaultMessage:"We are very excited to welcome you to our community! Tap the button below to get started."}))),e("div",{className:"mx-auto pt-10 sm:w-2/3 md:w-1/2"},void 0,e(d,{justifyContent:"center",space:2},void 0,e(_,{block:!0,theme:"primary",onClick:s},void 0,e(a,{id:"onboarding.view_feed",defaultMessage:"View Feed"}))))))},Z=G({header:{id:"account.header.alt",defaultMessage:"Profile header"},error:{id:"onboarding.error",defaultMessage:"An unexpected error occurred. Please try again or skip this step."}}),Ce=function(f){var s=f.onNext,v=J(),u=E(),o=W(),t=o.account,w=c.useRef(null),b=c.useState(),n=N(b,2),x=n[0],g=n[1],h=c.useState(!1),m=N(h,2),i=m[0],r=m[1],S=c.useState(!0),C=N(S,2),M=C[0],R=C[1],A=t?ne(t.header):!1,z=function(){var p;(p=w.current)===null||p===void 0||p.click()},D=function(p){var y,P=2073600,$=(y=p.target.files)===null||y===void 0?void 0:y.item(0);$&&re($,P).then(function(I){var B=I?URL.createObjectURL(I):t==null?void 0:t.header;g(B),r(!0);var V=new FormData;V.append("header",I);var H=u(q(V));Promise.all([H]).then(function(){R(!1),r(!1),s()}).catch(function(L){var K;r(!1),R(!1),g(null),((K=L.response)===null||K===void 0?void 0:K.status)===422?O.error(L.response.data.error.replace("Validation failed: ","")):O.error(Z.error)})}).catch(console.error)};return e(T,{variant:"rounded",size:"xl"},void 0,e(j,{},void 0,e("div",{},void 0,e("div",{className:"-mx-4 mb-4 border-b border-solid border-gray-200 pb-4 dark:border-gray-800 sm:-mx-10 sm:pb-10"},void 0,e(d,{space:2},void 0,e(l,{size:"2xl",align:"center",weight:"bold"},void 0,e(a,{id:"onboarding.header.title",defaultMessage:"Pick a cover image"})),e(l,{theme:"muted",align:"center"},void 0,e(a,{id:"onboarding.header.subtitle",defaultMessage:"This will be shown at the top of your profile."})))),e("div",{className:"mx-auto sm:w-2/3 sm:pt-10 md:w-1/2"},void 0,e(d,{space:10},void 0,e("div",{className:"rounded-lg border border-solid border-gray-200 dark:border-gray-800"},void 0,e("div",{role:"button",className:"relative flex h-24 items-center justify-center rounded-t-md bg-gray-200 dark:bg-gray-800"},void 0,x||(t==null?void 0:t.header)&&e(de,{src:x||t.header,alt:v.formatMessage(Z.header),className:"absolute inset-0 rounded-t-md object-cover"}),i&&e("div",{className:"absolute inset-0 flex items-center justify-center rounded-t-md bg-white/80 dark:bg-primary-900/80"},void 0,e(ae,{withText:!1})),e("button",{onClick:z,type:"button",className:U({"absolute -top-3 -right-3 p-1 bg-primary-600 rounded-full ring-2 ring-white dark:ring-primary-900 hover:bg-primary-700":!0,"opacity-50 pointer-events-none":i}),disabled:i},void 0,e(Y,{src:te,className:"h-5 w-5 text-white"})),c.createElement("input",{type:"file",className:"hidden",ref:w,onChange:D})),e("div",{className:"flex flex-col px-4 pb-4"},void 0,t&&e(ee,{src:t.avatar,size:64,className:"-mt-8 mb-2 ring-2 ring-white dark:ring-primary-800"}),e(l,{weight:"bold",size:"sm"},void 0,t==null?void 0:t.display_name),e(l,{theme:"muted",size:"sm"},void 0,"@",t==null?void 0:t.username))),e(d,{justifyContent:"center",space:2},void 0,e(_,{block:!0,theme:"primary",type:"button",onClick:s,disabled:A&&M||i},void 0,i?e(a,{id:"onboarding.saving",defaultMessage:"Saving…"}):e(a,{id:"onboarding.next",defaultMessage:"Next"})),M&&e(_,{block:!0,theme:"tertiary",type:"button",onClick:s},void 0,e(a,{id:"onboarding.skip",defaultMessage:"Skip for now"}))))))))},X=G({usernamePlaceholder:{id:"onboarding.display_name.placeholder",defaultMessage:"Eg. John Smith"},error:{id:"onboarding.error",defaultMessage:"An unexpected error occurred. Please try again or skip this step."}}),$e=function(f){var s=f.onNext,v=J(),u=E(),o=W(),t=o.account,w=c.useState((t==null?void 0:t.display_name)||""),b=N(w,2),n=b[0],x=b[1],g=c.useState(!1),h=N(g,2),m=h[0],i=h[1],r=c.useState([]),S=N(r,2),C=S[0],M=S[1],R=n.trim(),A=R.length>0,z=!A||n.length>30,D=c.useMemo(function(){var p=30-n.length,y=p===1?"character remaining":"characters remaining";return"".concat(p," ").concat(y)},[n]),k=function(){i(!0);var y=u(q({display_name:n}));Promise.all([y]).then(function(){i(!1),s()}).catch(function(P){var $;i(!1),(($=P.response)===null||$===void 0?void 0:$.status)===422?M([P.response.data.error.replace("Validation failed: ","")]):O.error(X.error)})};return e(T,{variant:"rounded",size:"xl"},void 0,e(j,{},void 0,e("div",{},void 0,e("div",{className:"-mx-4 mb-4 border-b border-solid border-gray-200 pb-4 dark:border-gray-800 sm:-mx-10 sm:pb-10"},void 0,e(d,{space:2},void 0,e(l,{size:"2xl",align:"center",weight:"bold"},void 0,e(a,{id:"onboarding.display_name.title",defaultMessage:"Choose a display name"})),e(l,{theme:"muted",align:"center"},void 0,e(a,{id:"onboarding.display_name.subtitle",defaultMessage:"You can always edit this later."})))),e("div",{className:"mx-auto sm:w-2/3 sm:pt-10 md:w-1/2"},void 0,e(d,{space:5},void 0,e(ie,{hintText:D,labelText:e(a,{id:"onboarding.display_name.label",defaultMessage:"Display name"}),errors:C},void 0,e(le,{onChange:function(y){return x(y.target.value)},placeholder:v.formatMessage(X.usernamePlaceholder),type:"text",value:n,maxLength:30})),e(d,{justifyContent:"center",space:2},void 0,e(_,{block:!0,theme:"primary",type:"submit",disabled:z||m,onClick:k},void 0,m?e(a,{id:"onboarding.saving",defaultMessage:"Saving…"}):e(a,{id:"onboarding.next",defaultMessage:"Next"})),e(_,{block:!0,theme:"tertiary",type:"button",onClick:s},void 0,e(a,{id:"onboarding.skip",defaultMessage:"Skip for now"}))))))))},Re=function(f){var s=f.onNext,v=W(),u=v.account,o=ue();return e(T,{variant:"rounded",size:"xl"},void 0,e(j,{},void 0,e(d,{space:2},void 0,e(Y,{strokeWidth:1,src:ce,className:"mx-auto h-16 w-16 text-primary-600 dark:text-primary-400"}),e(l,{size:"2xl",weight:"bold"},void 0,e(a,{id:"onboarding.fediverse.title",defaultMessage:"{siteTitle} is just one part of the Fediverse",values:{siteTitle:o.title}})),e(d,{space:4},void 0,e("div",{className:"border-b border-solid border-gray-200 pb-2 dark:border-gray-800 sm:pb-5"},void 0,e(d,{space:4},void 0,e(l,{theme:"muted"},void 0,e(a,{id:"onboarding.fediverse.message",defaultMessage:'The Fediverse is a social network made up of thousands of diverse and independently-run social media sites (aka "servers"). You can follow users — and like, repost, and reply to posts — from most other Fediverse servers, because they can communicate with {siteTitle}.',values:{siteTitle:o.title}})),e(l,{theme:"muted"},void 0,e(a,{id:"onboarding.fediverse.trailer",defaultMessage:"Because it is distributed and anyone can run their own server, the Fediverse is resilient and open. If you choose to join another server or set up your own, you can interact with the same people and continue on the same social graph."})))),u&&e("div",{className:"rounded-lg bg-primary-50 p-4 text-center dark:bg-gray-800"},void 0,e(ve,{account:u})),e(l,{theme:"muted"},void 0,e(a,{id:"onboarding.fediverse.its_you",defaultMessage:"This is you! Other people can follow you from other servers by using your full @-handle."})),e(l,{theme:"muted"},void 0,e(a,{id:"onboarding.fediverse.other_instances",defaultMessage:"When browsing your timeline, pay attention to the full username after the second @ symbol to know which server a post is from."})))),e("div",{className:"mx-auto pt-10 sm:w-2/3 md:w-1/2"},void 0,e(d,{justifyContent:"center",space:2},void 0,e(_,{block:!0,theme:"primary",onClick:s},void 0,e(a,{id:"onboarding.fediverse.next",defaultMessage:"Next"}))))))},Pe=function(f){var s=f.onNext,v=Se(),u=v.data,o=v.fetchNextPage,t=v.hasNextPage,w=v.isFetching,b=me(function(){return w?null:o()},300),n=function(){return u?e("div",{className:"flex flex-col sm:pb-10 sm:pt-4"},void 0,e(xe,{isLoading:w,scrollKey:"suggestions",onLoadMore:b,hasMore:t,useWindowScroll:!1,style:{height:320}},void 0,u.map(function(m){return e("div",{className:"py-2"},m.account.id,e(ge,{id:m.account.id,showProfileHoverCard:!1,withLinkToProfile:!1}))}))):null},x=function(){return e("div",{className:"my-2 rounded-lg bg-primary-50 p-8 text-center dark:bg-gray-800"},void 0,e(l,{},void 0,e(a,{id:"empty_column.follow_recommendations",defaultMessage:"Looks like no suggestions could be generated for you. You can try using search to look for people you might know or explore trending hashtags."})))},g=function(){return!u||u.length===0?x():n()};return e(T,{variant:"rounded",size:"xl"},void 0,e(j,{},void 0,e("div",{},void 0,e("div",{className:"-mx-4 mb-4 border-b border-solid border-gray-200 pb-4 dark:border-gray-800 sm:-mx-10 sm:pb-10"},void 0,e(d,{space:2},void 0,e(l,{size:"2xl",align:"center",weight:"bold"},void 0,e(a,{id:"onboarding.suggestions.title",defaultMessage:"Suggested accounts"})),e(l,{theme:"muted",align:"center"},void 0,e(a,{id:"onboarding.suggestions.subtitle",defaultMessage:"Here are a few of the most popular accounts you might like."})))),g(),e("div",{className:"mx-auto sm:w-2/3 md:w-1/2"},void 0,e(d,{},void 0,e(d,{justifyContent:"center",space:2},void 0,e(_,{block:!0,theme:"primary",onClick:s},void 0,e(a,{id:"onboarding.done",defaultMessage:"Done"})),e(_,{block:!0,theme:"tertiary",type:"button",onClick:s},void 0,e(a,{id:"onboarding.skip",defaultMessage:"Skip for now"}))))))))},Ee=function(){var f=E(),s=pe(),v=c.useState(0),u=N(v,2),o=u[0],t=u[1],w=function(r){t(r)},b=function(){t(function(r){return Math.max(0,r-1)})},n=function(){t(function(r){return Math.min(r+1,g.length-1)})},x=function(){f(he())},g=[e(ke,{onNext:n}),e($e,{onNext:n}),e(Ne,{onNext:n}),e(Ce,{onNext:n}),e(Pe,{onNext:n})];s.federating&&g.push(e(Re,{onNext:n})),g.push(e(Me,{onComplete:x}));var h=function(r){var S=r.key;switch(S){case"ArrowLeft":b();break;case"ArrowRight":n();break}},m=function(r){t(r)};return c.useEffect(function(){return document.addEventListener("keyup",h),function(){document.removeEventListener("keyup",h)}},[]),e("div",{"data-testid":"onboarding-wizard"},void 0,e(be,{}),e("main",{className:"flex h-screen flex-col overflow-x-hidden"},void 0,e("div",{className:"flex h-full flex-col items-center justify-center"},void 0,e(ye,{animateHeight:!0,index:o,onChangeIndex:w},void 0,g.map(function(i,r){return e("div",{className:"w-full max-w-[100vw] py-6 sm:mx-auto sm:max-w-lg md:max-w-2xl"},r,e("div",{className:U({"transition-opacity ease-linear":!0,"opacity-0 duration-500":o!==r,"opacity-100 duration-75":o===r})},void 0,i))})),e(fe,{space:3,alignItems:"center",justifyContent:"center",className:"relative"},void 0,g.map(function(i,r){return e("button",{tabIndex:0,onClick:function(){return m(r)},className:U({"w-5 h-5 rounded-full focus:ring-primary-600 focus:ring-2 focus:ring-offset-2":!0,"bg-gray-300 dark:bg-gray-700 dark:hover:bg-gray-700/75 hover:bg-gray-400":r!==o,"bg-primary-600":r===o})},r)})))))};export{Ee as default}; +import{d as E,b8 as W,R as c,at as N,f2 as oe,a as e,a_ as j,a2 as d,y as l,F as a,c7 as ee,aB as ae,W as U,A as Y,bW as te,aa as _,a$ as T,fa as re,f4 as q,bp as O,o as G,u as J,bF as ie,bZ as se,f3 as ne,dh as de,bG as le,t as ue,hW as ce,b2 as ve,Q as me,B as ge,g as pe,H as fe,jo as be,jp as he}from"../index-be605fd2.js";import{R as ye}from"./index-3399e540.js";import"./web.url.constructor-0fbaa340.js";import{S as xe}from"./scrollable-list-1e43c72d.js";import{b as Se}from"./suggestions-28e579c4.js";import"./warning-07d0fac9.js";import"./object-assign-35b0699c.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var we=G({error:{id:"onboarding.error",defaultMessage:"An unexpected error occurred. Please try again or skip this step."}}),ke=function(f){var s=f.onNext,v=E(),u=W(),o=u.account,t=c.useRef(null),w=c.useState(),b=N(w,2),n=b[0],x=b[1],g=c.useState(!1),h=N(g,2),m=h[0],i=h[1],r=c.useState(!0),S=N(r,2),C=S[0],M=S[1],R=o?oe(o.avatar):!1,A=function(){var k;(k=t.current)===null||k===void 0||k.click()},z=function(k){var p,y=16e4,P=(p=k.target.files)===null||p===void 0?void 0:p.item(0);P&&re(P,y).then(function($){var I=$?URL.createObjectURL($):o==null?void 0:o.avatar;x(I),i(!0);var B=new FormData;B.append("avatar",P);var V=v(q(B));Promise.all([V]).then(function(){M(!1),i(!1),s()}).catch(function(H){var L;i(!1),M(!1),x(null),((L=H.response)===null||L===void 0?void 0:L.status)===422?O.error(H.response.data.error.replace("Validation failed: ","")):O.error(we.error)})}).catch(console.error)};return e(T,{variant:"rounded",size:"xl"},void 0,e(j,{},void 0,e("div",{},void 0,e("div",{className:"-mx-4 mb-4 border-b border-solid border-gray-200 pb-4 dark:border-gray-900/50 sm:-mx-10 sm:pb-10"},void 0,e(d,{space:2},void 0,e(l,{size:"2xl",align:"center",weight:"bold"},void 0,e(a,{id:"onboarding.avatar.title",defaultMessage:"Choose a profile picture"})),e(l,{theme:"muted",align:"center"},void 0,e(a,{id:"onboarding.avatar.subtitle",defaultMessage:"Just have fun with it."})))),e("div",{className:"mx-auto sm:w-2/3 sm:pt-10 md:w-1/2"},void 0,e(d,{space:10},void 0,e("div",{className:"relative mx-auto rounded-full bg-gray-200"},void 0,o&&e(ee,{src:n||o.avatar,size:175}),m&&e("div",{className:"absolute inset-0 flex items-center justify-center rounded-full bg-white/80 dark:bg-primary-900/80"},void 0,e(ae,{withText:!1})),e("button",{onClick:A,type:"button",className:U({"absolute bottom-3 right-2 p-1 bg-primary-600 rounded-full ring-2 ring-white dark:ring-primary-900 hover:bg-primary-700":!0,"opacity-50 pointer-events-none":m}),disabled:m},void 0,e(Y,{src:te,className:"h-5 w-5 text-white"})),c.createElement("input",{type:"file",className:"hidden",ref:t,onChange:z})),e(d,{justifyContent:"center",space:2},void 0,e(_,{block:!0,theme:"primary",type:"button",onClick:s,disabled:R&&C||m},void 0,m?e(a,{id:"onboarding.saving",defaultMessage:"Saving…"}):e(a,{id:"onboarding.next",defaultMessage:"Next"})),C&&e(_,{block:!0,theme:"tertiary",type:"button",onClick:s},void 0,e(a,{id:"onboarding.skip",defaultMessage:"Skip for now"}))))))))},Q=G({bioPlaceholder:{id:"onboarding.bio.placeholder",defaultMessage:"Tell the world a little about yourself…"},error:{id:"onboarding.error",defaultMessage:"An unexpected error occurred. Please try again or skip this step."}}),Ne=function(f){var s,v,u=f.onNext,o=J(),t=E(),w=W(),b=w.account,n=c.useState((s=b==null||(v=b.source)===null||v===void 0?void 0:v.note)!==null&&s!==void 0?s:""),x=N(n,2),g=x[0],h=x[1],m=c.useState(!1),i=N(m,2),r=i[0],S=i[1],C=c.useState([]),M=N(C,2),R=M[0],A=M[1],z=function(){S(!0);var k=t(q({note:g}));Promise.all([k]).then(function(){S(!1),u()}).catch(function(p){var y;S(!1),((y=p.response)===null||y===void 0?void 0:y.status)===422?A([p.response.data.error.replace("Validation failed: ","")]):O.error(Q.error)})};return e(T,{variant:"rounded",size:"xl"},void 0,e(j,{},void 0,e("div",{},void 0,e("div",{className:"-mx-4 mb-4 border-b border-solid border-gray-200 pb-4 dark:border-gray-800 sm:-mx-10 sm:pb-10"},void 0,e(d,{space:2},void 0,e(l,{size:"2xl",align:"center",weight:"bold"},void 0,e(a,{id:"onboarding.note.title",defaultMessage:"Write a short bio"})),e(l,{theme:"muted",align:"center"},void 0,e(a,{id:"onboarding.note.subtitle",defaultMessage:"You can always edit this later."})))),e(d,{space:5},void 0,e("div",{className:"mx-auto sm:w-2/3 sm:pt-10"},void 0,e(ie,{hintText:e(a,{id:"onboarding.bio.hint",defaultMessage:"Max 500 characters"}),labelText:e(a,{id:"edit_profile.fields.bio_label",defaultMessage:"Bio"}),errors:R},void 0,e(se,{onChange:function(k){return h(k.target.value)},placeholder:o.formatMessage(Q.bioPlaceholder),value:g,maxLength:500}))),e("div",{className:"mx-auto sm:w-2/3 md:w-1/2"},void 0,e(d,{justifyContent:"center",space:2},void 0,e(_,{block:!0,theme:"primary",type:"submit",disabled:r,onClick:z},void 0,r?e(a,{id:"onboarding.saving",defaultMessage:"Saving…"}):e(a,{id:"onboarding.next",defaultMessage:"Next"})),e(_,{block:!0,theme:"tertiary",type:"button",onClick:u},void 0,e(a,{id:"onboarding.skip",defaultMessage:"Skip for now"}))))))))};const _e="/packs/assets/confetti-ad45ba10.svg";var Me=function(f){var s=f.onComplete;return e(T,{variant:"rounded",size:"xl"},void 0,e(j,{},void 0,e(d,{space:2},void 0,e(Y,{strokeWidth:1,src:_e,className:"mx-auto h-16 w-16 text-primary-600 dark:text-primary-400"}),e(l,{size:"2xl",align:"center",weight:"bold"},void 0,e(a,{id:"onboarding.finished.title",defaultMessage:"Onboarding complete"})),e(l,{theme:"muted",align:"center"},void 0,e(a,{id:"onboarding.finished.message",defaultMessage:"We are very excited to welcome you to our community! Tap the button below to get started."}))),e("div",{className:"mx-auto pt-10 sm:w-2/3 md:w-1/2"},void 0,e(d,{justifyContent:"center",space:2},void 0,e(_,{block:!0,theme:"primary",onClick:s},void 0,e(a,{id:"onboarding.view_feed",defaultMessage:"View Feed"}))))))},Z=G({header:{id:"account.header.alt",defaultMessage:"Profile header"},error:{id:"onboarding.error",defaultMessage:"An unexpected error occurred. Please try again or skip this step."}}),Ce=function(f){var s=f.onNext,v=J(),u=E(),o=W(),t=o.account,w=c.useRef(null),b=c.useState(),n=N(b,2),x=n[0],g=n[1],h=c.useState(!1),m=N(h,2),i=m[0],r=m[1],S=c.useState(!0),C=N(S,2),M=C[0],R=C[1],A=t?ne(t.header):!1,z=function(){var p;(p=w.current)===null||p===void 0||p.click()},D=function(p){var y,P=2073600,$=(y=p.target.files)===null||y===void 0?void 0:y.item(0);$&&re($,P).then(function(I){var B=I?URL.createObjectURL(I):t==null?void 0:t.header;g(B),r(!0);var V=new FormData;V.append("header",I);var H=u(q(V));Promise.all([H]).then(function(){R(!1),r(!1),s()}).catch(function(L){var K;r(!1),R(!1),g(null),((K=L.response)===null||K===void 0?void 0:K.status)===422?O.error(L.response.data.error.replace("Validation failed: ","")):O.error(Z.error)})}).catch(console.error)};return e(T,{variant:"rounded",size:"xl"},void 0,e(j,{},void 0,e("div",{},void 0,e("div",{className:"-mx-4 mb-4 border-b border-solid border-gray-200 pb-4 dark:border-gray-800 sm:-mx-10 sm:pb-10"},void 0,e(d,{space:2},void 0,e(l,{size:"2xl",align:"center",weight:"bold"},void 0,e(a,{id:"onboarding.header.title",defaultMessage:"Pick a cover image"})),e(l,{theme:"muted",align:"center"},void 0,e(a,{id:"onboarding.header.subtitle",defaultMessage:"This will be shown at the top of your profile."})))),e("div",{className:"mx-auto sm:w-2/3 sm:pt-10 md:w-1/2"},void 0,e(d,{space:10},void 0,e("div",{className:"rounded-lg border border-solid border-gray-200 dark:border-gray-800"},void 0,e("div",{role:"button",className:"relative flex h-24 items-center justify-center rounded-t-md bg-gray-200 dark:bg-gray-800"},void 0,x||(t==null?void 0:t.header)&&e(de,{src:x||t.header,alt:v.formatMessage(Z.header),className:"absolute inset-0 rounded-t-md object-cover"}),i&&e("div",{className:"absolute inset-0 flex items-center justify-center rounded-t-md bg-white/80 dark:bg-primary-900/80"},void 0,e(ae,{withText:!1})),e("button",{onClick:z,type:"button",className:U({"absolute -top-3 -right-3 p-1 bg-primary-600 rounded-full ring-2 ring-white dark:ring-primary-900 hover:bg-primary-700":!0,"opacity-50 pointer-events-none":i}),disabled:i},void 0,e(Y,{src:te,className:"h-5 w-5 text-white"})),c.createElement("input",{type:"file",className:"hidden",ref:w,onChange:D})),e("div",{className:"flex flex-col px-4 pb-4"},void 0,t&&e(ee,{src:t.avatar,size:64,className:"-mt-8 mb-2 ring-2 ring-white dark:ring-primary-800"}),e(l,{weight:"bold",size:"sm"},void 0,t==null?void 0:t.display_name),e(l,{theme:"muted",size:"sm"},void 0,"@",t==null?void 0:t.username))),e(d,{justifyContent:"center",space:2},void 0,e(_,{block:!0,theme:"primary",type:"button",onClick:s,disabled:A&&M||i},void 0,i?e(a,{id:"onboarding.saving",defaultMessage:"Saving…"}):e(a,{id:"onboarding.next",defaultMessage:"Next"})),M&&e(_,{block:!0,theme:"tertiary",type:"button",onClick:s},void 0,e(a,{id:"onboarding.skip",defaultMessage:"Skip for now"}))))))))},X=G({usernamePlaceholder:{id:"onboarding.display_name.placeholder",defaultMessage:"Eg. John Smith"},error:{id:"onboarding.error",defaultMessage:"An unexpected error occurred. Please try again or skip this step."}}),$e=function(f){var s=f.onNext,v=J(),u=E(),o=W(),t=o.account,w=c.useState((t==null?void 0:t.display_name)||""),b=N(w,2),n=b[0],x=b[1],g=c.useState(!1),h=N(g,2),m=h[0],i=h[1],r=c.useState([]),S=N(r,2),C=S[0],M=S[1],R=n.trim(),A=R.length>0,z=!A||n.length>30,D=c.useMemo(function(){var p=30-n.length,y=p===1?"character remaining":"characters remaining";return"".concat(p," ").concat(y)},[n]),k=function(){i(!0);var y=u(q({display_name:n}));Promise.all([y]).then(function(){i(!1),s()}).catch(function(P){var $;i(!1),(($=P.response)===null||$===void 0?void 0:$.status)===422?M([P.response.data.error.replace("Validation failed: ","")]):O.error(X.error)})};return e(T,{variant:"rounded",size:"xl"},void 0,e(j,{},void 0,e("div",{},void 0,e("div",{className:"-mx-4 mb-4 border-b border-solid border-gray-200 pb-4 dark:border-gray-800 sm:-mx-10 sm:pb-10"},void 0,e(d,{space:2},void 0,e(l,{size:"2xl",align:"center",weight:"bold"},void 0,e(a,{id:"onboarding.display_name.title",defaultMessage:"Choose a display name"})),e(l,{theme:"muted",align:"center"},void 0,e(a,{id:"onboarding.display_name.subtitle",defaultMessage:"You can always edit this later."})))),e("div",{className:"mx-auto sm:w-2/3 sm:pt-10 md:w-1/2"},void 0,e(d,{space:5},void 0,e(ie,{hintText:D,labelText:e(a,{id:"onboarding.display_name.label",defaultMessage:"Display name"}),errors:C},void 0,e(le,{onChange:function(y){return x(y.target.value)},placeholder:v.formatMessage(X.usernamePlaceholder),type:"text",value:n,maxLength:30})),e(d,{justifyContent:"center",space:2},void 0,e(_,{block:!0,theme:"primary",type:"submit",disabled:z||m,onClick:k},void 0,m?e(a,{id:"onboarding.saving",defaultMessage:"Saving…"}):e(a,{id:"onboarding.next",defaultMessage:"Next"})),e(_,{block:!0,theme:"tertiary",type:"button",onClick:s},void 0,e(a,{id:"onboarding.skip",defaultMessage:"Skip for now"}))))))))},Re=function(f){var s=f.onNext,v=W(),u=v.account,o=ue();return e(T,{variant:"rounded",size:"xl"},void 0,e(j,{},void 0,e(d,{space:2},void 0,e(Y,{strokeWidth:1,src:ce,className:"mx-auto h-16 w-16 text-primary-600 dark:text-primary-400"}),e(l,{size:"2xl",weight:"bold"},void 0,e(a,{id:"onboarding.fediverse.title",defaultMessage:"{siteTitle} is just one part of the Fediverse",values:{siteTitle:o.title}})),e(d,{space:4},void 0,e("div",{className:"border-b border-solid border-gray-200 pb-2 dark:border-gray-800 sm:pb-5"},void 0,e(d,{space:4},void 0,e(l,{theme:"muted"},void 0,e(a,{id:"onboarding.fediverse.message",defaultMessage:'The Fediverse is a social network made up of thousands of diverse and independently-run social media sites (aka "servers"). You can follow users — and like, repost, and reply to posts — from most other Fediverse servers, because they can communicate with {siteTitle}.',values:{siteTitle:o.title}})),e(l,{theme:"muted"},void 0,e(a,{id:"onboarding.fediverse.trailer",defaultMessage:"Because it is distributed and anyone can run their own server, the Fediverse is resilient and open. If you choose to join another server or set up your own, you can interact with the same people and continue on the same social graph."})))),u&&e("div",{className:"rounded-lg bg-primary-50 p-4 text-center dark:bg-gray-800"},void 0,e(ve,{account:u})),e(l,{theme:"muted"},void 0,e(a,{id:"onboarding.fediverse.its_you",defaultMessage:"This is you! Other people can follow you from other servers by using your full @-handle."})),e(l,{theme:"muted"},void 0,e(a,{id:"onboarding.fediverse.other_instances",defaultMessage:"When browsing your timeline, pay attention to the full username after the second @ symbol to know which server a post is from."})))),e("div",{className:"mx-auto pt-10 sm:w-2/3 md:w-1/2"},void 0,e(d,{justifyContent:"center",space:2},void 0,e(_,{block:!0,theme:"primary",onClick:s},void 0,e(a,{id:"onboarding.fediverse.next",defaultMessage:"Next"}))))))},Pe=function(f){var s=f.onNext,v=Se(),u=v.data,o=v.fetchNextPage,t=v.hasNextPage,w=v.isFetching,b=me(function(){return w?null:o()},300),n=function(){return u?e("div",{className:"flex flex-col sm:pb-10 sm:pt-4"},void 0,e(xe,{isLoading:w,scrollKey:"suggestions",onLoadMore:b,hasMore:t,useWindowScroll:!1,style:{height:320}},void 0,u.map(function(m){return e("div",{className:"py-2"},m.account.id,e(ge,{id:m.account.id,showProfileHoverCard:!1,withLinkToProfile:!1}))}))):null},x=function(){return e("div",{className:"my-2 rounded-lg bg-primary-50 p-8 text-center dark:bg-gray-800"},void 0,e(l,{},void 0,e(a,{id:"empty_column.follow_recommendations",defaultMessage:"Looks like no suggestions could be generated for you. You can try using search to look for people you might know or explore trending hashtags."})))},g=function(){return!u||u.length===0?x():n()};return e(T,{variant:"rounded",size:"xl"},void 0,e(j,{},void 0,e("div",{},void 0,e("div",{className:"-mx-4 mb-4 border-b border-solid border-gray-200 pb-4 dark:border-gray-800 sm:-mx-10 sm:pb-10"},void 0,e(d,{space:2},void 0,e(l,{size:"2xl",align:"center",weight:"bold"},void 0,e(a,{id:"onboarding.suggestions.title",defaultMessage:"Suggested accounts"})),e(l,{theme:"muted",align:"center"},void 0,e(a,{id:"onboarding.suggestions.subtitle",defaultMessage:"Here are a few of the most popular accounts you might like."})))),g(),e("div",{className:"mx-auto sm:w-2/3 md:w-1/2"},void 0,e(d,{},void 0,e(d,{justifyContent:"center",space:2},void 0,e(_,{block:!0,theme:"primary",onClick:s},void 0,e(a,{id:"onboarding.done",defaultMessage:"Done"})),e(_,{block:!0,theme:"tertiary",type:"button",onClick:s},void 0,e(a,{id:"onboarding.skip",defaultMessage:"Skip for now"}))))))))},Ee=function(){var f=E(),s=pe(),v=c.useState(0),u=N(v,2),o=u[0],t=u[1],w=function(r){t(r)},b=function(){t(function(r){return Math.max(0,r-1)})},n=function(){t(function(r){return Math.min(r+1,g.length-1)})},x=function(){f(he())},g=[e(ke,{onNext:n}),e($e,{onNext:n}),e(Ne,{onNext:n}),e(Ce,{onNext:n}),e(Pe,{onNext:n})];s.federating&&g.push(e(Re,{onNext:n})),g.push(e(Me,{onComplete:x}));var h=function(r){var S=r.key;switch(S){case"ArrowLeft":b();break;case"ArrowRight":n();break}},m=function(r){t(r)};return c.useEffect(function(){return document.addEventListener("keyup",h),function(){document.removeEventListener("keyup",h)}},[]),e("div",{"data-testid":"onboarding-wizard"},void 0,e(be,{}),e("main",{className:"flex h-screen flex-col overflow-x-hidden"},void 0,e("div",{className:"flex h-full flex-col items-center justify-center"},void 0,e(ye,{animateHeight:!0,index:o,onChangeIndex:w},void 0,g.map(function(i,r){return e("div",{className:"w-full max-w-[100vw] py-6 sm:mx-auto sm:max-w-lg md:max-w-2xl"},r,e("div",{className:U({"transition-opacity ease-linear":!0,"opacity-0 duration-500":o!==r,"opacity-100 duration-75":o===r})},void 0,i))})),e(fe,{space:3,alignItems:"center",justifyContent:"center",className:"relative"},void 0,g.map(function(i,r){return e("button",{tabIndex:0,onClick:function(){return m(r)},className:U({"w-5 h-5 rounded-full focus:ring-primary-600 focus:ring-2 focus:ring-offset-2":!0,"bg-gray-300 dark:bg-gray-700 dark:hover:bg-gray-700/75 hover:bg-gray-400":r!==o,"bg-primary-600":r===o})},r)})))))};export{Ee as default}; diff --git a/packs/js/pending-items-row-3c568fd1.js b/packs/js/pending-items-row-1f87d8f3.js similarity index 93% rename from packs/js/pending-items-row-3c568fd1.js rename to packs/js/pending-items-row-1f87d8f3.js index d4683cd28..bf24e492f 100644 --- a/packs/js/pending-items-row-3c568fd1.js +++ b/packs/js/pending-items-row-1f87d8f3.js @@ -1 +1 @@ -import{a as e,H as r,W as i,A as n,y as g,F as c,kj as m,L as u}from"../index-7380452a.js";const l="/packs/assets/exclamation-circle-4309c24d.svg";var x=function(a){var o=a.to,d=a.count,s=a.size,t=s===void 0?"md":s;return e(u,{to:o,className:"group","data-testid":"pending-items-row"},void 0,e(r,{alignItems:"center",justifyContent:"between"},void 0,e(r,{alignItems:"center",space:2},void 0,e("div",{className:i("rounded-full bg-primary-200 text-primary-500 dark:bg-primary-800 dark:text-primary-200",{"p-3":t==="lg","p-2.5":t==="md"})},void 0,e(n,{src:l,className:i({"h-5 w-5":t==="md","h-7 w-7":t==="lg"})})),e(g,{weight:"bold",size:"md"},void 0,e(c,{id:"groups.pending.count",defaultMessage:"{number, plural, one {# pending request} other {# pending requests}}",values:{number:d}}))),e(n,{src:m,className:"h-5 w-5 text-gray-600 transition-colors group-hover:text-gray-700 dark:text-gray-600 dark:group-hover:text-gray-500"})))};export{x as P}; +import{a as e,H as r,W as i,A as n,y as g,F as c,kj as m,L as u}from"../index-be605fd2.js";const l="/packs/assets/exclamation-circle-4309c24d.svg";var x=function(a){var o=a.to,d=a.count,s=a.size,t=s===void 0?"md":s;return e(u,{to:o,className:"group","data-testid":"pending-items-row"},void 0,e(r,{alignItems:"center",justifyContent:"between"},void 0,e(r,{alignItems:"center",space:2},void 0,e("div",{className:i("rounded-full bg-primary-200 text-primary-500 dark:bg-primary-800 dark:text-primary-200",{"p-3":t==="lg","p-2.5":t==="md"})},void 0,e(n,{src:l,className:i({"h-5 w-5":t==="md","h-7 w-7":t==="lg"})})),e(g,{weight:"bold",size:"md"},void 0,e(c,{id:"groups.pending.count",defaultMessage:"{number, plural, one {# pending request} other {# pending requests}}",values:{number:d}}))),e(n,{src:m,className:"h-5 w-5 text-gray-600 transition-colors group-hover:text-gray-700 dark:text-gray-600 dark:group-hover:text-gray-500"})))};export{x as P}; diff --git a/packs/js/pending-requests-b08ce6bc.js b/packs/js/pending-requests-aa9d3531.js similarity index 75% rename from packs/js/pending-requests-b08ce6bc.js rename to packs/js/pending-requests-aa9d3531.js index 0a92fb38e..901243fd7 100644 --- a/packs/js/pending-requests-b08ce6bc.js +++ b/packs/js/pending-requests-aa9d3531.js @@ -1 +1 @@ -import{u as p,ko as u,a as e,L as g,X as m,o as c,a2 as o,y as r,F as i}from"../index-7380452a.js";import{G as f}from"./group-card-c9aa3023.js";import{S as v}from"./scrollable-list-df58e451.js";import{P as b}from"./placeholder-group-card-d679cbe1.js";import"./group-header-image-e076498c.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var h=c({label:{id:"groups.pending.label",defaultMessage:"Pending Requests"}});const P=function(){var l=p(),a=u(),t=a.groups,n=a.isLoading,d=function(){return e(o,{space:4,alignItems:"center",justifyContent:"center",className:"py-6","data-testid":"pending-requests-blankslate"},void 0,e(o,{space:2,className:"max-w-sm"},void 0,e(r,{size:"2xl",weight:"bold",tag:"h2",align:"center"},void 0,e(i,{id:"groups.pending.empty.title",defaultMessage:"No pending requests"})),e(r,{size:"sm",theme:"muted",align:"center"},void 0,e(i,{id:"groups.pending.empty.subtitle",defaultMessage:"You have no pending requests at this time."}))))};return e(m,{label:l.formatMessage(h.label)},void 0,e(v,{emptyMessage:d(),emptyMessageCard:!1,isLoading:n,itemClassName:"pb-4 last:pb-0",placeholderComponent:b,placeholderCount:3,scrollKey:"pending-group-requests",showLoading:n&&t.length===0},void 0,t.map(function(s){return e(g,{to:"/group/".concat(s.slug)},s.id,e(f,{group:s}))})))};export{P as default}; +import{u as p,ko as u,a as e,L as g,X as m,o as c,a2 as o,y as r,F as i}from"../index-be605fd2.js";import{G as f}from"./group-card-e8bab249.js";import{S as v}from"./scrollable-list-1e43c72d.js";import{P as b}from"./placeholder-group-card-a81c5966.js";import"./group-header-image-068adc6d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var h=c({label:{id:"groups.pending.label",defaultMessage:"Pending Requests"}});const P=function(){var l=p(),a=u(),t=a.groups,n=a.isLoading,d=function(){return e(o,{space:4,alignItems:"center",justifyContent:"center",className:"py-6","data-testid":"pending-requests-blankslate"},void 0,e(o,{space:2,className:"max-w-sm"},void 0,e(r,{size:"2xl",weight:"bold",tag:"h2",align:"center"},void 0,e(i,{id:"groups.pending.empty.title",defaultMessage:"No pending requests"})),e(r,{size:"sm",theme:"muted",align:"center"},void 0,e(i,{id:"groups.pending.empty.subtitle",defaultMessage:"You have no pending requests at this time."}))))};return e(m,{label:l.formatMessage(h.label)},void 0,e(v,{emptyMessage:d(),emptyMessageCard:!1,isLoading:n,itemClassName:"pb-4 last:pb-0",placeholderComponent:b,placeholderCount:3,scrollKey:"pending-group-requests",showLoading:n&&t.length===0},void 0,t.map(function(s){return e(g,{to:"/group/".concat(s.slug)},s.id,e(f,{group:s}))})))};export{P as default}; diff --git a/packs/js/pending-status-7f660229.js b/packs/js/pending-status-959f7aeb.js similarity index 95% rename from packs/js/pending-status-7f660229.js rename to packs/js/pending-status-959f7aeb.js index bf9b41d61..696551f56 100644 --- a/packs/js/pending-status-7f660229.js +++ b/packs/js/pending-status-959f7aeb.js @@ -1,2 +1,2 @@ -import{cG as N,r as M,at as C,R as D,a as i,cH as q,cE as v,O as _,cI as A,cJ as E,q as k,W as y,a$ as H,H as W,b2 as G,cK as z,a2 as K,bR as L,cL as T,cM as $}from"../index-7380452a.js";import{P as j}from"./poll-preview-66340c9e.js";var B=N({style:{},itemsDimensions:[],size:1,width:0}),J=function(t){var s=t.media,c=t.defaultWidth,d=M.useState(c),o=C(d,2),l=o[0],a=o[1],p=function(e){e&&a(e.offsetWidth)},m=function(e){var n={},u=[];return e===1?(n.height=l*9/16,u=[{w:"100%",h:"100%"}]):e===2?(n.height=l/2,u=[{w:"50%",h:"100%",r:"2px"},{w:"50%",h:"100%",l:"2px"}]):e===3?(n.height=l,u=[{w:"50%",h:"50%",b:"2px",r:"2px"},{w:"50%",h:"50%",b:"2px",l:"2px"},{w:"100%",h:"50%",t:"2px"}]):e>=4&&(n.height=l,u=[{w:"50%",h:"50%",b:"2px",r:"2px"},{w:"50%",h:"50%",b:"2px",l:"2px"},{w:"50%",h:"50%",t:"2px",r:"2px"},{w:"50%",h:"50%",t:"2px",l:"2px"}]),B({style:n,itemsDimensions:u,size:e,width:l})},h=function(e,n){var u=e.w,b=e.h,x=e.t||"auto",g=e.r||"auto",P=e.b||"auto",S=e.l||"auto",R=e.float||"left",I=e.pos||"relative";return i("div",{className:"media-gallery__item animate-pulse bg-primary-200",style:{position:I,float:R,left:S,top:x,right:g,bottom:P,height:b,width:u}},n)},w=m(s.size);return D.createElement("div",{className:"media-gallery media-gallery--placeholder",style:w.get("style"),ref:p},s.take(4).map(function(f,e){return h(w.get("itemsDimensions")[e],e)}))};const O=q(),Q=r=>r.in_reply_to_id?_(r.to||[]).map(t=>v({acct:t})):_(),F=r=>r.hasIn(["poll","options"])?r.poll.update("options",t=>t.map(s=>v({title:s}))):null,U=(r,t,s)=>{const c=r.me,d=O(r,c),o=t.in_reply_to_id,l=v({account:d,content:t.status.replace(new RegExp(` +import{cG as N,r as M,at as C,R as D,a as i,cH as q,cE as v,O as _,cI as A,cJ as E,q as k,W as y,a$ as H,H as W,b2 as G,cK as z,a2 as K,bR as L,cL as T,cM as $}from"../index-be605fd2.js";import{P as j}from"./poll-preview-ddaf662b.js";var B=N({style:{},itemsDimensions:[],size:1,width:0}),J=function(t){var s=t.media,c=t.defaultWidth,d=M.useState(c),o=C(d,2),l=o[0],a=o[1],p=function(e){e&&a(e.offsetWidth)},m=function(e){var n={},u=[];return e===1?(n.height=l*9/16,u=[{w:"100%",h:"100%"}]):e===2?(n.height=l/2,u=[{w:"50%",h:"100%",r:"2px"},{w:"50%",h:"100%",l:"2px"}]):e===3?(n.height=l,u=[{w:"50%",h:"50%",b:"2px",r:"2px"},{w:"50%",h:"50%",b:"2px",l:"2px"},{w:"100%",h:"50%",t:"2px"}]):e>=4&&(n.height=l,u=[{w:"50%",h:"50%",b:"2px",r:"2px"},{w:"50%",h:"50%",b:"2px",l:"2px"},{w:"50%",h:"50%",t:"2px",r:"2px"},{w:"50%",h:"50%",t:"2px",l:"2px"}]),B({style:n,itemsDimensions:u,size:e,width:l})},h=function(e,n){var u=e.w,b=e.h,x=e.t||"auto",g=e.r||"auto",P=e.b||"auto",S=e.l||"auto",R=e.float||"left",I=e.pos||"relative";return i("div",{className:"media-gallery__item animate-pulse bg-primary-200",style:{position:I,float:R,left:S,top:x,right:g,bottom:P,height:b,width:u}},n)},w=m(s.size);return D.createElement("div",{className:"media-gallery media-gallery--placeholder",style:w.get("style"),ref:p},s.take(4).map(function(f,e){return h(w.get("itemsDimensions")[e],e)}))};const O=q(),Q=r=>r.in_reply_to_id?_(r.to||[]).map(t=>v({acct:t})):_(),F=r=>r.hasIn(["poll","options"])?r.poll.update("options",t=>t.map(s=>v({title:s}))):null,U=(r,t,s)=>{const c=r.me,d=O(r,c),o=t.in_reply_to_id,l=v({account:d,content:t.status.replace(new RegExp(` `,"g"),"
"),id:`末pending-${s}`,in_reply_to_account_id:r.statuses.getIn([o,"account"],null),in_reply_to_id:o,media_attachments:(t.media_ids||_()).map(a=>v({id:a})),mentions:Q(t),poll:F(t),quote:t.quote_id,sensitive:t.sensitive,visibility:t.visibility});return A(E(l))};var V=function(t){return!!t.content.match(/https?:\/\/\S*/)},X=function(t){var s=t.status;return s.media_attachments&&!s.media_attachments.isEmpty()?i(J,{media:s.media_attachments}):!s.quote&&V(s)?i($,{}):null},tt=function(t){var s=t.idempotencyKey,c=t.className,d=t.muted,o=t.thread,l=o===void 0?!1:o,a=k(function(m){var h=m.pending_statuses.get(s);return h?U(m,h,s):null});if(!a||!a.account)return null;var p=a.account;return i("div",{className:y("opacity-50",c)},void 0,i("div",{className:y("status",{"status-reply":!!a.in_reply_to_id,muted:d}),"data-id":a.id},void 0,i(H,{className:y("py-6 sm:p-5","status-".concat(a.visibility),{"status-reply":!!a.in_reply_to_id}),variant:l?"default":"rounded"},void 0,i("div",{className:"mb-4"},void 0,i(W,{justifyContent:"between",alignItems:"start"},void 0,i(G,{account:p,timestamp:a.created_at,hideActions:!0,withLinkToProfile:!1},p.id))),i("div",{className:"status__content-wrapper"},void 0,i(z,{status:a}),i(K,{space:4},void 0,i(L,{status:a,collapsable:!0}),i(X,{status:a}),a.poll&&i(j,{pollId:a.poll}),a.quote&&i(T,{statusId:a.quote}))))))};export{tt as P}; diff --git a/packs/js/pinned-accounts-panel-67ec6a97.js b/packs/js/pinned-accounts-panel-22ccbc02.js similarity index 82% rename from packs/js/pinned-accounts-panel-67ec6a97.js rename to packs/js/pinned-accounts-panel-22ccbc02.js index 04d514a1f..59b7a54d4 100644 --- a/packs/js/pinned-accounts-panel-67ec6a97.js +++ b/packs/js/pinned-accounts-panel-22ccbc02.js @@ -1 +1 @@ -import{d as c,q as u,b9 as l,r as d,hK as p,a as t,hL as m,hM as f,B as h,F as v}from"../index-7380452a.js";import{W as _}from"./widget-2ac720e4.js";import"./arrow-right-b75290c7.js";var g=function(s){var n=s.account,o=s.limit,r=c(),a=u(function(e){var i;return((i=e.user_lists.pinned.get(n.id))===null||i===void 0?void 0:i.items)||l()}).slice(0,o);return d.useEffect(function(){r(p(n.id))},[]),a.isEmpty()?t(f,{fetchComponent:m},void 0,function(e){return t(e,{limit:o})}):t(_,{title:t(v,{id:"pinned_accounts.title",defaultMessage:"{name}’s choices",values:{name:t("span",{dangerouslySetInnerHTML:{__html:n.display_name_html}})}})},void 0,a&&a.map(function(e){return t(h,{id:e,withRelationship:!1},e)}))};export{g as default}; +import{d as c,q as u,b9 as l,r as d,hK as p,a as t,hL as m,hM as f,B as h,F as v}from"../index-be605fd2.js";import{W as _}from"./widget-84f84d09.js";import"./arrow-right-b75290c7.js";var g=function(s){var n=s.account,o=s.limit,r=c(),a=u(function(e){var i;return((i=e.user_lists.pinned.get(n.id))===null||i===void 0?void 0:i.items)||l()}).slice(0,o);return d.useEffect(function(){r(p(n.id))},[]),a.isEmpty()?t(f,{fetchComponent:m},void 0,function(e){return t(e,{limit:o})}):t(_,{title:t(v,{id:"pinned_accounts.title",defaultMessage:"{name}’s choices",values:{name:t("span",{dangerouslySetInnerHTML:{__html:n.display_name_html}})}})},void 0,a&&a.map(function(e){return t(h,{id:e,withRelationship:!1},e)}))};export{g as default}; diff --git a/packs/js/pinned-hosts-picker-5815755c.js b/packs/js/pinned-hosts-picker-55861ba6.js similarity index 80% rename from packs/js/pinned-hosts-picker-5815755c.js rename to packs/js/pinned-hosts-picker-55861ba6.js index 004b37894..c6e16e868 100644 --- a/packs/js/pinned-hosts-picker-5815755c.js +++ b/packs/js/pinned-hosts-picker-55861ba6.js @@ -1 +1 @@ -import{f as r,a as n,aa as c,H as o}from"../index-7380452a.js";var p=function(a){var s=a.host,i=r(),t=i.getIn(["remote_timeline","pinnedHosts"]);return!t||t.isEmpty()?null:n(o,{className:"mb-4",space:2},void 0,t.map(function(e){return n(c,{to:"/timeline/".concat(e),size:"sm",theme:e===s?"accent":"secondary"},e,e)}))};export{p as P}; +import{f as r,a as n,aa as c,H as o}from"../index-be605fd2.js";var p=function(a){var s=a.host,i=r(),t=i.getIn(["remote_timeline","pinnedHosts"]);return!t||t.isEmpty()?null:n(o,{className:"mb-4",space:2},void 0,t.map(function(e){return n(c,{to:"/timeline/".concat(e),size:"sm",theme:e===s?"accent":"secondary"},e,e)}))};export{p as P}; diff --git a/packs/js/placeholder-account-a1add042.js b/packs/js/placeholder-account-dcc395bb.js similarity index 78% rename from packs/js/placeholder-account-a1add042.js rename to packs/js/placeholder-account-dcc395bb.js index 6cb600857..6e9ca5e21 100644 --- a/packs/js/placeholder-account-a1add042.js +++ b/packs/js/placeholder-account-dcc395bb.js @@ -1 +1 @@ -import{R as a,a as e,b as c,H as t,c as o}from"../index-7380452a.js";var l=function(){return e(t,{space:3,alignItems:"center"},void 0,e("div",{className:"shrink-0"},void 0,e(c,{size:42})),e("div",{className:"min-w-0 flex-1"},void 0,e(o,{minLength:3,maxLength:25})))};const r=a.memo(l);export{r as P}; +import{R as a,a as e,b as c,H as t,c as o}from"../index-be605fd2.js";var l=function(){return e(t,{space:3,alignItems:"center"},void 0,e("div",{className:"shrink-0"},void 0,e(c,{size:42})),e("div",{className:"min-w-0 flex-1"},void 0,e(o,{minLength:3,maxLength:25})))};const r=a.memo(l);export{r as P}; diff --git a/packs/js/placeholder-group-card-d679cbe1.js b/packs/js/placeholder-group-card-a81c5966.js similarity index 85% rename from packs/js/placeholder-group-card-d679cbe1.js rename to packs/js/placeholder-group-card-a81c5966.js index 8553c0735..d4de4741b 100644 --- a/packs/js/placeholder-group-card-d679cbe1.js +++ b/packs/js/placeholder-group-card-a81c5966.js @@ -1 +1 @@ -import{a,a2 as e,y as s,eV as r,H as d,eW as o}from"../index-7380452a.js";var i=function(){var t=o(12,20);return a("div",{className:"animate-pulse"},void 0,a(e,{className:"relative h-[240px] rounded-lg border border-solid border-gray-300 bg-white dark:border-primary-800 dark:bg-primary-900"},void 0,a("div",{className:"relative grow basis-1/2 rounded-t-lg bg-gray-300 dark:bg-gray-800"}),a("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"},void 0,a("div",{className:"h-16 w-16 rounded-full bg-gray-500 ring-2 ring-white dark:bg-primary-800 dark:ring-primary-900"})),a(e,{alignItems:"center",justifyContent:"end",grow:!0,className:"basis-1/2 py-4",space:.5},void 0,a(s,{size:"lg",theme:"subtle",weight:"bold"},void 0,r(t)),a(d,{className:"text-gray-400 dark:text-gray-600",space:3,wrap:!0},void 0,a("span",{},void 0,r(6)),a("span",{},void 0,r(6))))))};const g=i;export{g as P}; +import{a,a2 as e,y as s,eV as r,H as d,eW as o}from"../index-be605fd2.js";var i=function(){var t=o(12,20);return a("div",{className:"animate-pulse"},void 0,a(e,{className:"relative h-[240px] rounded-lg border border-solid border-gray-300 bg-white dark:border-primary-800 dark:bg-primary-900"},void 0,a("div",{className:"relative grow basis-1/2 rounded-t-lg bg-gray-300 dark:bg-gray-800"}),a("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"},void 0,a("div",{className:"h-16 w-16 rounded-full bg-gray-500 ring-2 ring-white dark:bg-primary-800 dark:ring-primary-900"})),a(e,{alignItems:"center",justifyContent:"end",grow:!0,className:"basis-1/2 py-4",space:.5},void 0,a(s,{size:"lg",theme:"subtle",weight:"bold"},void 0,r(t)),a(d,{className:"text-gray-400 dark:text-gray-600",space:3,wrap:!0},void 0,a("span",{},void 0,r(6)),a("span",{},void 0,r(6))))))};const g=i;export{g as P}; diff --git a/packs/js/placeholder-group-search-5e3066d6.js b/packs/js/placeholder-group-search-1a309751.js similarity index 92% rename from packs/js/placeholder-group-search-5e3066d6.js rename to packs/js/placeholder-group-search-1a309751.js index 37a77db96..379d50849 100644 --- a/packs/js/placeholder-group-search-5e3066d6.js +++ b/packs/js/placeholder-group-search-1a309751.js @@ -1 +1 @@ -import{a as e,H as a,a2 as d,y as t,eV as i,eW as m}from"../index-7380452a.js";const c=function(n){var r=n.withJoinAction,s=r===void 0?!0:r,o=m(12,20);return e(a,{alignItems:"center",justifyContent:"between",className:"animate-pulse"},void 0,e(a,{alignItems:"center",space:2,className:"overflow-hidden"},void 0,e("div",{className:"h-11 w-11 rounded-full bg-gray-500 dark:bg-gray-700 dark:ring-primary-900"}),e(d,{className:"text-gray-500 dark:text-gray-700"},void 0,e(t,{theme:"inherit",weight:"bold"},void 0,i(o)),e(a,{space:1,alignItems:"center"},void 0,e(t,{theme:"inherit",tag:"span",size:"sm",weight:"medium"},void 0,i(6)),e("span",{},void 0,"•"),e(t,{theme:"inherit",tag:"span",size:"sm",weight:"medium"},void 0,i(6))))),s&&e("div",{className:"h-10 w-36 rounded-full bg-gray-300 dark:bg-gray-800"}))};export{c as P}; +import{a as e,H as a,a2 as d,y as t,eV as i,eW as m}from"../index-be605fd2.js";const c=function(n){var r=n.withJoinAction,s=r===void 0?!0:r,o=m(12,20);return e(a,{alignItems:"center",justifyContent:"between",className:"animate-pulse"},void 0,e(a,{alignItems:"center",space:2,className:"overflow-hidden"},void 0,e("div",{className:"h-11 w-11 rounded-full bg-gray-500 dark:bg-gray-700 dark:ring-primary-900"}),e(d,{className:"text-gray-500 dark:text-gray-700"},void 0,e(t,{theme:"inherit",weight:"bold"},void 0,i(o)),e(a,{space:1,alignItems:"center"},void 0,e(t,{theme:"inherit",tag:"span",size:"sm",weight:"medium"},void 0,i(6)),e("span",{},void 0,"•"),e(t,{theme:"inherit",tag:"span",size:"sm",weight:"medium"},void 0,i(6))))),s&&e("div",{className:"h-10 w-36 rounded-full bg-gray-300 dark:bg-gray-800"}))};export{c as P}; diff --git a/packs/js/placeholder-hashtag-f832d585.js b/packs/js/placeholder-hashtag-fb054a2b.js similarity index 69% rename from packs/js/placeholder-hashtag-f832d585.js rename to packs/js/placeholder-hashtag-fb054a2b.js index 2f11fbd02..0e171440d 100644 --- a/packs/js/placeholder-hashtag-f832d585.js +++ b/packs/js/placeholder-hashtag-fb054a2b.js @@ -1 +1 @@ -import{a,eV as r,eW as t}from"../index-7380452a.js";var l=function(){var e=t(15,30);return a("div",{className:"animate-pulse text-primary-200 dark:text-primary-700"},void 0,a("p",{},void 0,r(e)))};export{l as P}; +import{a,eV as r,eW as t}from"../index-be605fd2.js";var l=function(){var e=t(15,30);return a("div",{className:"animate-pulse text-primary-200 dark:text-primary-700"},void 0,a("p",{},void 0,r(e)))};export{l as P}; diff --git a/packs/js/poll-preview-66340c9e.js b/packs/js/poll-preview-ddaf662b.js similarity index 61% rename from packs/js/poll-preview-66340c9e.js rename to packs/js/poll-preview-ddaf662b.js index bd114ce13..2e8cfd234 100644 --- a/packs/js/poll-preview-66340c9e.js +++ b/packs/js/poll-preview-ddaf662b.js @@ -1 +1 @@ -import{q as n,a,cN as s,a2 as p}from"../index-7380452a.js";import{n as i}from"./noop-19c18e1e.js";var v=function(r){var t=r.pollId,e=n(function(o){return o.polls.get(t)});return e?a(p,{space:2},void 0,e.options.map(function(o,l){return a(s,{poll:e,option:o,index:l,showResults:!1,active:!1,onToggle:i},l)})):null};export{v as P}; +import{q as n,a,cN as s,a2 as p}from"../index-be605fd2.js";import{n as i}from"./noop-3f99ae3e.js";var v=function(r){var t=r.pollId,e=n(function(o){return o.polls.get(t)});return e?a(p,{space:2},void 0,e.options.map(function(o,l){return a(s,{poll:e,option:o,index:l,showResults:!1,active:!1,onToggle:i},l)})):null};export{v as P}; diff --git a/packs/js/popular-663f5bb0.js b/packs/js/popular-208feabb.js similarity index 72% rename from packs/js/popular-663f5bb0.js rename to packs/js/popular-208feabb.js index 2bcc0dcba..c57dd3ec1 100644 --- a/packs/js/popular-663f5bb0.js +++ b/packs/js/popular-208feabb.js @@ -1 +1 @@ -import{u as P,r as i,at as b,a,W as S,R as l,av as v,X as _,o as w,as as C}from"../index-7380452a.js";import{V as I,a as N}from"./index-75eb026b.js";import{u as R}from"./usePopularGroups-953a6f15.js";import{G as y}from"./layout-list-fe4f62ad.js";import{G as M}from"./group-list-item-c21d0638.js";import{G as f,L as E}from"./layout-buttons-5e2bb51b.js";import"./group-header-image-e076498c.js";var W=["context"],T=w({label:{id:"groups.popular.label",defaultMessage:"Popular Groups"}}),V=l.forwardRef(function(r,o){r.context;var s=C(r,W);return l.createElement("div",v({ref:o},s,{className:"flex flex-wrap"}))}),z=function(){var o=P(),s=i.useState(f.LIST),c=b(s,2),d=c[0],x=c[1],n=R(),p=n.groups,G=n.hasNextPage,L=n.fetchNextPage,m=function(){G&&L()},g=i.useCallback(function(e,t){return a("div",{className:S({"pt-4":t!==0})},void 0,a(M,{group:e,withJoinAction:!0}))},[]),h=i.useCallback(function(e){return a(y,{group:e})},[]);return a(_,{label:o.formatMessage(T.label),action:a(E,{layout:d,onSelect:function(t){return x(t)}})},void 0,d===f.LIST?a(I,{useWindowScroll:!0,data:p,itemContent:function(t,u){return g(u,t)},endReached:m}):a(N,{useWindowScroll:!0,data:p,itemContent:function(t,u){return h(u)},components:{Item:function(t){return l.createElement("div",v({},t,{className:"w-1/2 flex-none pb-4 [&:nth-last-of-type(-n+2)]:pb-0"}))},List:V},endReached:m}))};export{z as default}; +import{u as P,r as i,at as b,a,W as S,R as l,av as v,X as _,o as w,as as C}from"../index-be605fd2.js";import{V as I,a as N}from"./index-85a17314.js";import{u as R}from"./usePopularGroups-d12a3589.js";import{G as y}from"./layout-list-e34f9942.js";import{G as M}from"./group-list-item-d71c8a2e.js";import{G as f,L as E}from"./layout-buttons-127c2f5f.js";import"./group-header-image-068adc6d.js";var W=["context"],T=w({label:{id:"groups.popular.label",defaultMessage:"Popular Groups"}}),V=l.forwardRef(function(r,o){r.context;var s=C(r,W);return l.createElement("div",v({ref:o},s,{className:"flex flex-wrap"}))}),z=function(){var o=P(),s=i.useState(f.LIST),c=b(s,2),d=c[0],x=c[1],n=R(),p=n.groups,G=n.hasNextPage,L=n.fetchNextPage,m=function(){G&&L()},g=i.useCallback(function(e,t){return a("div",{className:S({"pt-4":t!==0})},void 0,a(M,{group:e,withJoinAction:!0}))},[]),h=i.useCallback(function(e){return a(y,{group:e})},[]);return a(_,{label:o.formatMessage(T.label),action:a(E,{layout:d,onSelect:function(t){return x(t)}})},void 0,d===f.LIST?a(I,{useWindowScroll:!0,data:p,itemContent:function(t,u){return g(u,t)},endReached:m}):a(N,{useWindowScroll:!0,data:p,itemContent:function(t,u){return h(u)},components:{Item:function(t){return l.createElement("div",v({},t,{className:"w-1/2 flex-none pb-4 [&:nth-last-of-type(-n+2)]:pb-0"}))},List:V},endReached:m}))};export{z as default}; diff --git a/packs/js/profile-field-200e6fc1.js b/packs/js/profile-field-946d1d6f.js similarity index 92% rename from packs/js/profile-field-200e6fc1.js rename to packs/js/profile-field-946d1d6f.js index 0fe5de041..fb26b7230 100644 --- a/packs/js/profile-field-200e6fc1.js +++ b/packs/js/profile-field-946d1d6f.js @@ -1 +1 @@ -import{u as n,a as e,W as r,H as d,A as l,dp as o,hC as t,o as m}from"../index-7380452a.js";var c=m({linkVerifiedOn:{id:"account.link_verified_on",defaultMessage:"Ownership of this link was checked on {date}"}}),f={month:"short",day:"numeric",year:"numeric",hour12:!0,hour:"numeric",minute:"2-digit"},_=function(s){var a=s.field,i=n();return e("dl",{},void 0,e("dt",{title:a.name},void 0,e(t,{weight:"bold",tag:"span",dangerouslySetInnerHTML:{__html:a.name_emojified}})),e("dd",{className:r({"text-success-500":a.verified_at}),title:a.value_plain},void 0,e(d,{space:2,alignItems:"center"},void 0,a.verified_at&&e("span",{className:"flex-none",title:i.formatMessage(c.linkVerifiedOn,{date:i.formatDate(a.verified_at,f)})},void 0,e(l,{src:o})),e(t,{className:"overflow-hidden break-words",tag:"span",dangerouslySetInnerHTML:{__html:a.value_emojified}}))))};export{_ as P}; +import{u as n,a as e,W as r,H as d,A as l,dp as o,hC as t,o as m}from"../index-be605fd2.js";var c=m({linkVerifiedOn:{id:"account.link_verified_on",defaultMessage:"Ownership of this link was checked on {date}"}}),f={month:"short",day:"numeric",year:"numeric",hour12:!0,hour:"numeric",minute:"2-digit"},_=function(s){var a=s.field,i=n();return e("dl",{},void 0,e("dt",{title:a.name},void 0,e(t,{weight:"bold",tag:"span",dangerouslySetInnerHTML:{__html:a.name_emojified}})),e("dd",{className:r({"text-success-500":a.verified_at}),title:a.value_plain},void 0,e(d,{space:2,alignItems:"center"},void 0,a.verified_at&&e("span",{className:"flex-none",title:i.formatMessage(c.linkVerifiedOn,{date:i.formatDate(a.verified_at,f)})},void 0,e(l,{src:o})),e(t,{className:"overflow-hidden break-words",tag:"span",dangerouslySetInnerHTML:{__html:a.value_emojified}}))))};export{_ as P}; diff --git a/packs/js/profile-fields-panel-f2d1726d.js b/packs/js/profile-fields-panel-9418d645.js similarity index 53% rename from packs/js/profile-fields-panel-f2d1726d.js rename to packs/js/profile-fields-panel-9418d645.js index 3cb1a7630..1f0914013 100644 --- a/packs/js/profile-fields-panel-f2d1726d.js +++ b/packs/js/profile-fields-panel-9418d645.js @@ -1 +1 @@ -import{a as e,a2 as o,F as l}from"../index-7380452a.js";import{W as s}from"./widget-2ac720e4.js";import{P as f}from"./profile-field-200e6fc1.js";import"./arrow-right-b75290c7.js";var u=function(a){var t=a.account;return e(s,{title:e(l,{id:"profile_fields_panel.title",defaultMessage:"Profile fields"})},void 0,e(o,{space:4},void 0,t.fields.map(function(i,r){return e(f,{field:i},r)})))};export{u as default}; +import{a as e,a2 as o,F as l}from"../index-be605fd2.js";import{W as s}from"./widget-84f84d09.js";import{P as f}from"./profile-field-946d1d6f.js";import"./arrow-right-b75290c7.js";var u=function(a){var t=a.account;return e(s,{title:e(l,{id:"profile_fields_panel.title",defaultMessage:"Profile fields"})},void 0,e(o,{space:4},void 0,t.fields.map(function(i,r){return e(f,{field:i},r)})))};export{u as default}; diff --git a/packs/js/profile-hover-card-6034bfe5.js b/packs/js/profile-hover-card-4eadd46d.js similarity index 92% rename from packs/js/profile-hover-card-6034bfe5.js rename to packs/js/profile-hover-card-4eadd46d.js index 1e64adbff..ebeb12125 100644 --- a/packs/js/profile-hover-card-6034bfe5.js +++ b/packs/js/profile-hover-card-4eadd46d.js @@ -1 +1 @@ -import{d as F,a7 as N,u as $,r as v,at as k,q as f,b3 as q,Z as z,iF as T,iG as g,R as U,av as j,W as G,a as e,a_ as J,a2 as W,hM as Z,iH as K,cA as O,cg as Q,H as V,A as X,hD as Y,y as h,F as i,hB as u,a$ as ee,iI as ae}from"../index-7380452a.js";import{u as te}from"./usePopper-24b8ee92.js";import{u as oe}from"./usePatronUser-de20e9c0.js";var re=function(t,r){var s=[];return t!=null&&t.admin?s.push(e(u,{slug:"admin",title:e(i,{id:"account_moderation_modal.roles.admin",defaultMessage:"Admin"})},"admin")):t!=null&&t.moderator&&s.push(e(u,{slug:"moderator",title:e(i,{id:"account_moderation_modal.roles.moderator",defaultMessage:"Moderator"})},"moderator")),r!=null&&r.is_patron&&s.push(e(u,{slug:"patron",title:e(i,{id:"account.patron",defaultMessage:"Patron"})},"patron")),s},se=function(t){return function(){t(ae())}},ne=function(t){return function(){t(g(!0))}},de=function(t){var r,s=t.visible,p=s===void 0?!0:s,n=F(),y=N(),M=$(),b=v.useState(null),m=k(b,2),P=m[0],w=m[1],E=f(function(o){return o.me}),l=f(function(o){return o.profile_hover_card.accountId||void 0}),H=q(l,{withRelationship:!0}),a=H.account,A=oe(a==null?void 0:a.url),B=A.patronUser,C=f(function(o){var c;return(c=o.profile_hover_card.ref)===null||c===void 0?void 0:c.current}),x=re(a,B);v.useEffect(function(){l&&n(z([l]))},[n,l]),v.useEffect(function(){var o=y.listen(function(){T.cancel(),n(g())});return function(){o()}},[]);var _=te(C,P),I=_.styles,R=_.attributes;if(!a)return null;var S={__html:a.note_emojified},L=M.formatDate(a.created_at,{month:"long",year:"numeric"}),D=E!==a.id&&((r=a.relationship)===null||r===void 0?void 0:r.followed_by)===!0;return U.createElement("div",j({className:G({"absolute transition-opacity w-[320px] z-[101] top-0 left-0":!0,"opacity-100":p,"opacity-0 pointer-events-none":!p}),ref:w,style:I.popper},R.popper,{onMouseEnter:se(n),onMouseLeave:ne(n)}),e(ee,{variant:"rounded",className:"relative isolate overflow-hidden"},void 0,e(J,{},void 0,e(W,{space:2},void 0,e(Z,{fetchComponent:K},void 0,function(o){return e(o,{accountId:a.id,action:e(O,{account:a,small:!0}),badges:x})}),Q(a)?e(V,{alignItems:"center",space:.5},void 0,e(X,{src:Y,className:"h-4 w-4 text-gray-800 dark:text-gray-200"}),e(h,{size:"sm"},void 0,e(i,{id:"account.member_since",defaultMessage:"Joined {date}",values:{date:L}}))):null,a.note.length>0&&e(h,{size:"sm",dangerouslySetInnerHTML:S})),D&&e("div",{className:"absolute left-2 top-2"},void 0,e(u,{slug:"opaque",title:e(i,{id:"account.follows_you",defaultMessage:"Follows you"})})))))};export{de as ProfileHoverCard,de as default}; +import{d as F,a7 as N,u as $,r as v,at as k,q as f,b3 as q,Z as z,iF as T,iG as g,R as U,av as j,W as G,a as e,a_ as J,a2 as W,hM as Z,iH as K,cA as O,cg as Q,H as V,A as X,hD as Y,y as h,F as i,hB as u,a$ as ee,iI as ae}from"../index-be605fd2.js";import{u as te}from"./usePopper-4a92d7ef.js";import{u as oe}from"./usePatronUser-c97ecc3d.js";var re=function(t,r){var s=[];return t!=null&&t.admin?s.push(e(u,{slug:"admin",title:e(i,{id:"account_moderation_modal.roles.admin",defaultMessage:"Admin"})},"admin")):t!=null&&t.moderator&&s.push(e(u,{slug:"moderator",title:e(i,{id:"account_moderation_modal.roles.moderator",defaultMessage:"Moderator"})},"moderator")),r!=null&&r.is_patron&&s.push(e(u,{slug:"patron",title:e(i,{id:"account.patron",defaultMessage:"Patron"})},"patron")),s},se=function(t){return function(){t(ae())}},ne=function(t){return function(){t(g(!0))}},de=function(t){var r,s=t.visible,p=s===void 0?!0:s,n=F(),y=N(),M=$(),b=v.useState(null),m=k(b,2),P=m[0],w=m[1],E=f(function(o){return o.me}),l=f(function(o){return o.profile_hover_card.accountId||void 0}),H=q(l,{withRelationship:!0}),a=H.account,A=oe(a==null?void 0:a.url),B=A.patronUser,C=f(function(o){var c;return(c=o.profile_hover_card.ref)===null||c===void 0?void 0:c.current}),x=re(a,B);v.useEffect(function(){l&&n(z([l]))},[n,l]),v.useEffect(function(){var o=y.listen(function(){T.cancel(),n(g())});return function(){o()}},[]);var _=te(C,P),I=_.styles,R=_.attributes;if(!a)return null;var S={__html:a.note_emojified},L=M.formatDate(a.created_at,{month:"long",year:"numeric"}),D=E!==a.id&&((r=a.relationship)===null||r===void 0?void 0:r.followed_by)===!0;return U.createElement("div",j({className:G({"absolute transition-opacity w-[320px] z-[101] top-0 left-0":!0,"opacity-100":p,"opacity-0 pointer-events-none":!p}),ref:w,style:I.popper},R.popper,{onMouseEnter:se(n),onMouseLeave:ne(n)}),e(ee,{variant:"rounded",className:"relative isolate overflow-hidden"},void 0,e(J,{},void 0,e(W,{space:2},void 0,e(Z,{fetchComponent:K},void 0,function(o){return e(o,{accountId:a.id,action:e(O,{account:a,small:!0}),badges:x})}),Q(a)?e(V,{alignItems:"center",space:.5},void 0,e(X,{src:Y,className:"h-4 w-4 text-gray-800 dark:text-gray-200"}),e(h,{size:"sm"},void 0,e(i,{id:"account.member_since",defaultMessage:"Joined {date}",values:{date:L}}))):null,a.note.length>0&&e(h,{size:"sm",dangerouslySetInnerHTML:S})),D&&e("div",{className:"absolute left-2 top-2"},void 0,e(u,{slug:"opaque",title:e(i,{id:"account.follows_you",defaultMessage:"Follows you"})})))))};export{de as ProfileHoverCard,de as default}; diff --git a/packs/js/profile-info-panel-9fddd91a.js b/packs/js/profile-info-panel-cec85d6e.js similarity index 94% rename from packs/js/profile-info-panel-9fddd91a.js rename to packs/js/profile-info-panel-cec85d6e.js index ac0da3a42..94a563a08 100644 --- a/packs/js/profile-info-panel-9fddd91a.js +++ b/packs/js/profile-info-panel-cec85d6e.js @@ -1 +1 @@ -import{cH as P,q as w,O as U,a as e,W as $,c7 as C,H as o,d as H,g as O,b9 as E,r as W,hz as j,L as G,y as u,cz as V,gR as J,F as m,hA as Z,aD as K,u as Q,aU as X,a2 as h,hB as _,A as y,dc as Y,hC as ee,cg as ae,hD as te,hE as re,hF as ie,o as se,bL as oe,ce as ne,hG as le,cb as ce}from"../index-7380452a.js";import{v as de}from"./balloon-551f6642.js";import"./web.url.constructor-8f9eaf9c.js";import{u as ue}from"./usePatronUser-de20e9c0.js";import{P as me}from"./profile-field-200e6fc1.js";import{P as ve}from"./profile-stats-adc53a08.js";import"./object-assign-7ac9a0a3.js";var fe=P(),ge=function(c){var i=c.accountIds,n=c.limit,a=n===void 0?3:n,p=w(function(t){return U(i.slice(0,a).map(function(s){return fe(t,s)}).filter(function(s){return s}))});return e(o,{className:"relative","aria-hidden":!0},void 0,p.map(function(t,s){return e("div",{className:$("relative",{"-ml-3":s!==0}),style:{zIndex:a-s}},t.id,e(C,{className:"ring-1 ring-white dark:ring-primary-900",src:t.avatar,size:20}))}))},pe=P(),he=function(c){var i=c.account,n=H(),a=w(function(r){return r.me}),p=O(),t=w(function(r){var v;return((v=r.user_lists.familiar_followers.get(i.id))===null||v===void 0?void 0:v.items)||E()}),s=w(function(r){return t.slice(0,2).map(function(v){return pe(r,v)})});W.useEffect(function(){a&&p.familiarFollowers&&n(j(i.id))},[i.id]);var M=function(){n(K("FAMILIAR_FOLLOWERS",{accountId:i.id}))};if(t.size===0)return null;var b=s.map(function(r){return!!r&&e(J,{accountId:r.id,inline:!0},void 0,e(G,{className:"mention inline-block",to:"/@".concat(r.acct)},void 0,e(o,{space:1,alignItems:"center",grow:!0},void 0,e(u,{size:"sm",theme:"primary",truncate:!0,dangerouslySetInnerHTML:{__html:r.display_name_html}}),r.verified&&e(V,{}))))}).toArray();return t.size>2&&b.push(e("span",{className:"cursor-pointer hover:underline",role:"presentation",onClick:M},void 0,e(m,{id:"account.familiar_followers.more",defaultMessage:"{count, plural, one {# other} other {# others}} you follow",values:{count:t.size-s.size}}))),e(o,{space:2,alignItems:"center"},void 0,e(ge,{accountIds:t}),e(u,{theme:"muted",size:"sm"},void 0,e(m,{id:"account.familiar_followers",defaultMessage:"Followed by {accounts}",values:{accounts:e(Z,{type:"conjunction",value:b})}})))},_e=function(c){try{var i=new URL(c);return["http:","https:"].includes(i.protocol)}catch{return!1}},k=se({linkVerifiedOn:{id:"account.link_verified_on",defaultMessage:"Ownership of this link was checked on {date}"},account_locked:{id:"account.locked_info",defaultMessage:"This account privacy status is set to locked. The owner manually reviews who can follow them."},deactivated:{id:"account.deactivated",defaultMessage:"Deactivated"},bot:{id:"account.badges.bot",defaultMessage:"Bot"}}),Fe=function(c){var i,n,a=c.account,p=c.username,t=Q(),s=X(),M=s.displayFqn,b=ue(a==null?void 0:a.url),r=b.patronUser,v=w(function(f){return f.me}),B=(a==null?void 0:a.id)===v,S=function(){return a!=null&&a.admin?e(_,{slug:"admin",title:e(m,{id:"account_moderation_modal.roles.admin",defaultMessage:"Admin"})},"staff"):a!=null&&a.moderator?e(_,{slug:"moderator",title:e(m,{id:"account_moderation_modal.roles.moderator",defaultMessage:"Moderator"})},"staff"):null},A=function(){var d=a?ne(a):[];return d.map(function(l){return e(_,{slug:l,title:le(ce(l))},l)})},N=function(){var d=A(),l=S(),I=(r==null?void 0:r.is_patron)===!0,g=[];return l&&g.push(l),I&&g.push(e(_,{slug:"patron",title:e(m,{id:"account.patron",defaultMessage:"Patron"})},"patron")),[].concat(g,oe(d))},L=function(){var d,l=a==null||(d=a.pleroma)===null||d===void 0?void 0:d.birthday;if(!l)return null;var I=t.formatDate(l,{timeZone:"UTC",day:"numeric",month:"long",year:"numeric"}),g=new Date(l),z=new Date,T=g.getDate()===z.getDate()&&g.getMonth()===z.getMonth();return e(o,{alignItems:"center",space:.5},void 0,e(y,{src:de,className:"h-4 w-4 text-gray-800 dark:text-gray-200"}),e(u,{size:"sm"},void 0,T?e(m,{id:"account.birthday_today",defaultMessage:"Birthday is today!"}):e(m,{id:"account.birthday",defaultMessage:"Born {date}",values:{date:I}})))};if(!a)return e("div",{className:"mt-6 min-w-0 flex-1 sm:px-2"},void 0,e(h,{space:2},void 0,e(h,{},void 0,e(o,{space:1,alignItems:"center"},void 0,e(u,{size:"sm",theme:"muted",direction:"ltr",truncate:!0},void 0,"@",p)))));var R=(i=(n=a.pleroma)===null||n===void 0?void 0:n.deactivated)!==null&&i!==void 0?i:!1,D=R?{__html:t.formatMessage(k.deactivated)}:{__html:a.display_name_html},q=t.formatDate(a.created_at,{month:"long",year:"numeric"}),F=N();return e("div",{className:"mt-6 min-w-0 flex-1 sm:px-2"},void 0,e(h,{space:2},void 0,e(h,{},void 0,e(o,{space:1,alignItems:"center"},void 0,e(u,{size:"lg",weight:"bold",dangerouslySetInnerHTML:D,truncate:!0}),a.bot&&e(_,{slug:"bot",title:t.formatMessage(k.bot)}),F.length>0&&e(o,{space:1,alignItems:"center"},void 0,F)),e(o,{alignItems:"center",space:.5},void 0,e(u,{size:"sm",theme:"muted",direction:"ltr",truncate:!0},void 0,"@",M?a.fqn:a.acct),a.locked&&e(y,{src:Y,alt:t.formatMessage(k.account_locked),className:"h-4 w-4 text-gray-600"}))),e(ve,{account:a}),a.note.length>0&&e(ee,{size:"sm",dangerouslySetInnerHTML:{__html:a.note_emojified},truncate:!0}),e("div",{className:"flex flex-col items-start gap-2 md:flex-row md:flex-wrap md:items-center"},void 0,ae(a)?e(o,{alignItems:"center",space:.5},void 0,e(y,{src:te,className:"h-4 w-4 text-gray-800 dark:text-gray-200"}),e(u,{size:"sm"},void 0,e(m,{id:"account.member_since",defaultMessage:"Joined {date}",values:{date:q}}))):null,a.location?e(o,{alignItems:"center",space:.5},void 0,e(y,{src:re,className:"h-4 w-4 text-gray-800 dark:text-gray-200"}),e(u,{size:"sm"},void 0,a.location)):null,a.website?e(o,{alignItems:"center",space:.5},void 0,e(y,{src:ie,className:"h-4 w-4 text-gray-800 dark:text-gray-200"}),e("div",{className:"max-w-[300px]"},void 0,e(u,{size:"sm",truncate:!0},void 0,_e(a.website)?e("a",{className:"text-primary-600 hover:underline dark:text-accent-blue",href:a.website,target:"_blank"},void 0,a.website):a.website))):null,L()),B?null:e(he,{account:a})),a.fields.length>0&&e(h,{space:2,className:"mt-4 xl:hidden"},void 0,a.fields.map(function(f,d){return e(me,{field:f},d)})))};export{Fe as default}; +import{cH as P,q as w,O as U,a as e,W as $,c7 as C,H as o,d as H,g as O,b9 as E,r as W,hz as j,L as G,y as u,cz as V,gR as J,F as m,hA as Z,aD as K,u as Q,aU as X,a2 as h,hB as _,A as y,dc as Y,hC as ee,cg as ae,hD as te,hE as re,hF as ie,o as se,bL as oe,ce as ne,hG as le,cb as ce}from"../index-be605fd2.js";import{v as de}from"./balloon-551f6642.js";import"./web.url.constructor-0fbaa340.js";import{u as ue}from"./usePatronUser-c97ecc3d.js";import{P as me}from"./profile-field-946d1d6f.js";import{P as ve}from"./profile-stats-6fec8ab1.js";import"./object-assign-35b0699c.js";var fe=P(),ge=function(c){var i=c.accountIds,n=c.limit,a=n===void 0?3:n,p=w(function(t){return U(i.slice(0,a).map(function(s){return fe(t,s)}).filter(function(s){return s}))});return e(o,{className:"relative","aria-hidden":!0},void 0,p.map(function(t,s){return e("div",{className:$("relative",{"-ml-3":s!==0}),style:{zIndex:a-s}},t.id,e(C,{className:"ring-1 ring-white dark:ring-primary-900",src:t.avatar,size:20}))}))},pe=P(),he=function(c){var i=c.account,n=H(),a=w(function(r){return r.me}),p=O(),t=w(function(r){var v;return((v=r.user_lists.familiar_followers.get(i.id))===null||v===void 0?void 0:v.items)||E()}),s=w(function(r){return t.slice(0,2).map(function(v){return pe(r,v)})});W.useEffect(function(){a&&p.familiarFollowers&&n(j(i.id))},[i.id]);var M=function(){n(K("FAMILIAR_FOLLOWERS",{accountId:i.id}))};if(t.size===0)return null;var b=s.map(function(r){return!!r&&e(J,{accountId:r.id,inline:!0},void 0,e(G,{className:"mention inline-block",to:"/@".concat(r.acct)},void 0,e(o,{space:1,alignItems:"center",grow:!0},void 0,e(u,{size:"sm",theme:"primary",truncate:!0,dangerouslySetInnerHTML:{__html:r.display_name_html}}),r.verified&&e(V,{}))))}).toArray();return t.size>2&&b.push(e("span",{className:"cursor-pointer hover:underline",role:"presentation",onClick:M},void 0,e(m,{id:"account.familiar_followers.more",defaultMessage:"{count, plural, one {# other} other {# others}} you follow",values:{count:t.size-s.size}}))),e(o,{space:2,alignItems:"center"},void 0,e(ge,{accountIds:t}),e(u,{theme:"muted",size:"sm"},void 0,e(m,{id:"account.familiar_followers",defaultMessage:"Followed by {accounts}",values:{accounts:e(Z,{type:"conjunction",value:b})}})))},_e=function(c){try{var i=new URL(c);return["http:","https:"].includes(i.protocol)}catch{return!1}},k=se({linkVerifiedOn:{id:"account.link_verified_on",defaultMessage:"Ownership of this link was checked on {date}"},account_locked:{id:"account.locked_info",defaultMessage:"This account privacy status is set to locked. The owner manually reviews who can follow them."},deactivated:{id:"account.deactivated",defaultMessage:"Deactivated"},bot:{id:"account.badges.bot",defaultMessage:"Bot"}}),Fe=function(c){var i,n,a=c.account,p=c.username,t=Q(),s=X(),M=s.displayFqn,b=ue(a==null?void 0:a.url),r=b.patronUser,v=w(function(f){return f.me}),B=(a==null?void 0:a.id)===v,S=function(){return a!=null&&a.admin?e(_,{slug:"admin",title:e(m,{id:"account_moderation_modal.roles.admin",defaultMessage:"Admin"})},"staff"):a!=null&&a.moderator?e(_,{slug:"moderator",title:e(m,{id:"account_moderation_modal.roles.moderator",defaultMessage:"Moderator"})},"staff"):null},A=function(){var d=a?ne(a):[];return d.map(function(l){return e(_,{slug:l,title:le(ce(l))},l)})},N=function(){var d=A(),l=S(),I=(r==null?void 0:r.is_patron)===!0,g=[];return l&&g.push(l),I&&g.push(e(_,{slug:"patron",title:e(m,{id:"account.patron",defaultMessage:"Patron"})},"patron")),[].concat(g,oe(d))},L=function(){var d,l=a==null||(d=a.pleroma)===null||d===void 0?void 0:d.birthday;if(!l)return null;var I=t.formatDate(l,{timeZone:"UTC",day:"numeric",month:"long",year:"numeric"}),g=new Date(l),z=new Date,T=g.getDate()===z.getDate()&&g.getMonth()===z.getMonth();return e(o,{alignItems:"center",space:.5},void 0,e(y,{src:de,className:"h-4 w-4 text-gray-800 dark:text-gray-200"}),e(u,{size:"sm"},void 0,T?e(m,{id:"account.birthday_today",defaultMessage:"Birthday is today!"}):e(m,{id:"account.birthday",defaultMessage:"Born {date}",values:{date:I}})))};if(!a)return e("div",{className:"mt-6 min-w-0 flex-1 sm:px-2"},void 0,e(h,{space:2},void 0,e(h,{},void 0,e(o,{space:1,alignItems:"center"},void 0,e(u,{size:"sm",theme:"muted",direction:"ltr",truncate:!0},void 0,"@",p)))));var R=(i=(n=a.pleroma)===null||n===void 0?void 0:n.deactivated)!==null&&i!==void 0?i:!1,D=R?{__html:t.formatMessage(k.deactivated)}:{__html:a.display_name_html},q=t.formatDate(a.created_at,{month:"long",year:"numeric"}),F=N();return e("div",{className:"mt-6 min-w-0 flex-1 sm:px-2"},void 0,e(h,{space:2},void 0,e(h,{},void 0,e(o,{space:1,alignItems:"center"},void 0,e(u,{size:"lg",weight:"bold",dangerouslySetInnerHTML:D,truncate:!0}),a.bot&&e(_,{slug:"bot",title:t.formatMessage(k.bot)}),F.length>0&&e(o,{space:1,alignItems:"center"},void 0,F)),e(o,{alignItems:"center",space:.5},void 0,e(u,{size:"sm",theme:"muted",direction:"ltr",truncate:!0},void 0,"@",M?a.fqn:a.acct),a.locked&&e(y,{src:Y,alt:t.formatMessage(k.account_locked),className:"h-4 w-4 text-gray-600"}))),e(ve,{account:a}),a.note.length>0&&e(ee,{size:"sm",dangerouslySetInnerHTML:{__html:a.note_emojified},truncate:!0}),e("div",{className:"flex flex-col items-start gap-2 md:flex-row md:flex-wrap md:items-center"},void 0,ae(a)?e(o,{alignItems:"center",space:.5},void 0,e(y,{src:te,className:"h-4 w-4 text-gray-800 dark:text-gray-200"}),e(u,{size:"sm"},void 0,e(m,{id:"account.member_since",defaultMessage:"Joined {date}",values:{date:q}}))):null,a.location?e(o,{alignItems:"center",space:.5},void 0,e(y,{src:re,className:"h-4 w-4 text-gray-800 dark:text-gray-200"}),e(u,{size:"sm"},void 0,a.location)):null,a.website?e(o,{alignItems:"center",space:.5},void 0,e(y,{src:ie,className:"h-4 w-4 text-gray-800 dark:text-gray-200"}),e("div",{className:"max-w-[300px]"},void 0,e(u,{size:"sm",truncate:!0},void 0,_e(a.website)?e("a",{className:"text-primary-600 hover:underline dark:text-accent-blue",href:a.website,target:"_blank"},void 0,a.website):a.website))):null,L()),B?null:e(he,{account:a})),a.fields.length>0&&e(h,{space:2,className:"mt-4 xl:hidden"},void 0,a.fields.map(function(f,d){return e(me,{field:f},d)})))};export{Fe as default}; diff --git a/packs/js/profile-media-panel-2b1eb0c9.js b/packs/js/profile-media-panel-4acaf1d7.js similarity index 81% rename from packs/js/profile-media-panel-2b1eb0c9.js rename to packs/js/profile-media-panel-4acaf1d7.js index 935646a32..8b136d011 100644 --- a/packs/js/profile-media-panel-2b1eb0c9.js +++ b/packs/js/profile-media-panel-4acaf1d7.js @@ -1 +1 @@ -import{d as _,r as l,at as y,q as I,b0 as h,O as x,b1 as E,a,aB as b,F as c,y as O,aD as p}from"../index-7380452a.js";import{W as S}from"./widget-2ac720e4.js";import{M as D}from"./media-item-9b67131c.js";import"./arrow-right-b75290c7.js";import"./volume-08f8a8f1.js";import"./es.array.last-index-of-ca8fdd84.js";var W=function(f){var e=f.account,n=_(),m=l.useState(!0),d=y(m,2),v=d[0],o=d[1],g=I(function(r){return e?h(r,e==null?void 0:e.id):x()}),M=function(t){if(t.type==="video")n(p("VIDEO",{media:t,status:t.status}));else{var s=t.getIn(["status","media_attachments"]),i=s.findIndex(function(u){return u.id===t.id});n(p("MEDIA",{media:s,index:i,status:t.status}))}};l.useEffect(function(){o(!0),e&&n(E(e.id)).then(function(){return o(!1)}).catch(function(){})},[e==null?void 0:e.id]);var A=function(){var t=g.filter(function(i){return i.getIn(["status","visibility"])==="public"}),s=t.slice(0,9);return s.isEmpty()?a(O,{size:"sm",theme:"muted"},void 0,a(c,{id:"media_panel.empty_message",defaultMessage:"No media found."})):a("div",{className:"grid grid-cols-3 gap-1"},void 0,s.map(function(i,u){return a(D,{attachment:i,onOpenMedia:M},"".concat(i.getIn(["status","id"]),"+").concat(i.id))}))};return a(S,{title:a(c,{id:"media_panel.title",defaultMessage:"Media"})},void 0,e&&a("div",{className:"w-full"},void 0,v?a(b,{}):A()))};export{W as default}; +import{d as _,r as l,at as y,q as I,b0 as h,O as x,b1 as E,a,aB as b,F as c,y as O,aD as p}from"../index-be605fd2.js";import{W as S}from"./widget-84f84d09.js";import{M as D}from"./media-item-f8ffc0fb.js";import"./arrow-right-b75290c7.js";import"./volume-08f8a8f1.js";import"./es.array.last-index-of-d76ad0ed.js";var W=function(f){var e=f.account,n=_(),m=l.useState(!0),d=y(m,2),v=d[0],o=d[1],g=I(function(r){return e?h(r,e==null?void 0:e.id):x()}),M=function(t){if(t.type==="video")n(p("VIDEO",{media:t,status:t.status}));else{var s=t.getIn(["status","media_attachments"]),i=s.findIndex(function(u){return u.id===t.id});n(p("MEDIA",{media:s,index:i,status:t.status}))}};l.useEffect(function(){o(!0),e&&n(E(e.id)).then(function(){return o(!1)}).catch(function(){})},[e==null?void 0:e.id]);var A=function(){var t=g.filter(function(i){return i.getIn(["status","visibility"])==="public"}),s=t.slice(0,9);return s.isEmpty()?a(O,{size:"sm",theme:"muted"},void 0,a(c,{id:"media_panel.empty_message",defaultMessage:"No media found."})):a("div",{className:"grid grid-cols-3 gap-1"},void 0,s.map(function(i,u){return a(D,{attachment:i,onOpenMedia:M},"".concat(i.getIn(["status","id"]),"+").concat(i.id))}))};return a(S,{title:a(c,{id:"media_panel.title",defaultMessage:"Media"})},void 0,e&&a("div",{className:"w-full"},void 0,v?a(b,{}):A()))};export{W as default}; diff --git a/packs/js/profile-stats-adc53a08.js b/packs/js/profile-stats-6fec8ab1.js similarity index 93% rename from packs/js/profile-stats-adc53a08.js rename to packs/js/profile-stats-6fec8ab1.js index 01930b2d3..b7cedcc1e 100644 --- a/packs/js/profile-stats-adc53a08.js +++ b/packs/js/profile-stats-6fec8ab1.js @@ -1 +1 @@ -import{u as m,a as e,hJ as r,H as s,y as a,d4 as n,o as d}from"../index-7380452a.js";var c=d({followers:{id:"account.followers",defaultMessage:"Followers"},follows:{id:"account.follows",defaultMessage:"Follows"}}),w=function(t){var o=t.account,i=t.onClickHandler,l=m();return o?e(s,{alignItems:"center",space:3},void 0,e(r,{to:"/@".concat(o.acct,"/followers"),onClick:i,title:l.formatNumber(o.followers_count),className:"hover:underline"},void 0,e(s,{alignItems:"center",space:1},void 0,e(a,{theme:"primary",weight:"bold",size:"sm"},void 0,n(o.followers_count)),e(a,{weight:"bold",size:"sm"},void 0,l.formatMessage(c.followers)))),e(r,{to:"/@".concat(o.acct,"/following"),onClick:i,title:l.formatNumber(o.following_count),className:"hover:underline"},void 0,e(s,{alignItems:"center",space:1},void 0,e(a,{theme:"primary",weight:"bold",size:"sm"},void 0,n(o.following_count)),e(a,{weight:"bold",size:"sm"},void 0,l.formatMessage(c.follows))))):null};export{w as P}; +import{u as m,a as e,hJ as r,H as s,y as a,d4 as n,o as d}from"../index-be605fd2.js";var c=d({followers:{id:"account.followers",defaultMessage:"Followers"},follows:{id:"account.follows",defaultMessage:"Follows"}}),w=function(t){var o=t.account,i=t.onClickHandler,l=m();return o?e(s,{alignItems:"center",space:3},void 0,e(r,{to:"/@".concat(o.acct,"/followers"),onClick:i,title:l.formatNumber(o.followers_count),className:"hover:underline"},void 0,e(s,{alignItems:"center",space:1},void 0,e(a,{theme:"primary",weight:"bold",size:"sm"},void 0,n(o.followers_count)),e(a,{weight:"bold",size:"sm"},void 0,l.formatMessage(c.followers)))),e(r,{to:"/@".concat(o.acct,"/following"),onClick:i,title:l.formatNumber(o.following_count),className:"hover:underline"},void 0,e(s,{alignItems:"center",space:1},void 0,e(a,{theme:"primary",weight:"bold",size:"sm"},void 0,n(o.following_count)),e(a,{weight:"bold",size:"sm"},void 0,l.formatMessage(c.follows))))):null};export{w as P}; diff --git a/packs/js/promo-panel-c3b530d1.js b/packs/js/promo-panel-60d3b884.js similarity index 68% rename from packs/js/promo-panel-c3b530d1.js rename to packs/js/promo-panel-60d3b884.js index 6cf066818..ca05990e3 100644 --- a/packs/js/promo-panel-c3b530d1.js +++ b/packs/js/promo-panel-60d3b884.js @@ -1 +1 @@ -import{t as m,aU as c,f,a as e,a2 as p,y as u}from"../index-7380452a.js";import{F as g}from"./fork-awesome-icon-170511cf.js";import{W as x}from"./widget-2ac720e4.js";import"./arrow-right-b75290c7.js";var k=function(){var o=m(),r=c(),s=r.promoPanel,n=f(),a=s.get("items"),l=n.get("locale");return!a||a.isEmpty()?null:e(x,{title:o.title},void 0,e(p,{space:2},void 0,a.map(function(t,i){return e(u,{},i,e("a",{className:"flex items-center",href:t.url,target:"_blank"},void 0,e(g,{id:t.icon,className:"mr-2 flex-none text-lg rtl:ml-2 rtl:mr-0",fixedWidth:!0}),t.textLocales.get(l)||t.text))})))};export{k as default}; +import{t as m,aU as c,f,a as e,a2 as p,y as u}from"../index-be605fd2.js";import{F as g}from"./fork-awesome-icon-42a9fa19.js";import{W as x}from"./widget-84f84d09.js";import"./arrow-right-b75290c7.js";var k=function(){var o=m(),r=c(),s=r.promoPanel,n=f(),a=s.get("items"),l=n.get("locale");return!a||a.isEmpty()?null:e(x,{title:o.title},void 0,e(p,{space:2},void 0,a.map(function(t,i){return e(u,{},i,e("a",{className:"flex items-center",href:t.url,target:"_blank"},void 0,e(g,{id:t.icon,className:"mr-2 flex-none text-lg rtl:ml-2 rtl:mr-0",fixedWidth:!0}),t.textLocales.get(l)||t.text))})))};export{k as default}; diff --git a/packs/js/pull-to-refresh-b8beecbe.js b/packs/js/pull-to-refresh-a7e092ab.js similarity index 99% rename from packs/js/pull-to-refresh-b8beecbe.js rename to packs/js/pull-to-refresh-a7e092ab.js index c2d092a70..98ef9154a 100644 --- a/packs/js/pull-to-refresh-b8beecbe.js +++ b/packs/js/pull-to-refresh-a7e092ab.js @@ -1,4 +1,4 @@ -import{R as t,r as m,as as q,av as V,a as X,aB as G}from"../index-7380452a.js";var E;(function(e){e[e.UP=-1]="UP",e[e.DOWN=1]="DOWN"})(E||(E={}));function J(e){var r=getComputedStyle(e).overflowY;return e===document.scrollingElement&&r==="visible"?!0:!(r!=="scroll"&&r!=="auto")}function K(e,r){if(!J(e))return!1;if(r===E.DOWN){var a=e.scrollTop+e.clientHeight;return a0;throw new Error("unsupported direction")}function H(e,r){return K(e,r)?!0:e.parentElement==null?!1:H(e.parentElement,r)}function z(e,r){r===void 0&&(r={});var a=r.insertAt;if(!(!e||typeof document>"u")){var o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",i.setAttribute("nonce",window.__webpack_nonce__),a==="top"&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var Q=`.lds-ellipsis { +import{R as t,r as m,as as q,av as V,a as X,aB as G}from"../index-be605fd2.js";var E;(function(e){e[e.UP=-1]="UP",e[e.DOWN=1]="DOWN"})(E||(E={}));function J(e){var r=getComputedStyle(e).overflowY;return e===document.scrollingElement&&r==="visible"?!0:!(r!=="scroll"&&r!=="auto")}function K(e,r){if(!J(e))return!1;if(r===E.DOWN){var a=e.scrollTop+e.clientHeight;return a0;throw new Error("unsupported direction")}function H(e,r){return K(e,r)?!0:e.parentElement==null?!1:H(e.parentElement,r)}function z(e,r){r===void 0&&(r={});var a=r.insertAt;if(!(!e||typeof document>"u")){var o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",i.setAttribute("nonce",window.__webpack_nonce__),a==="top"&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var Q=`.lds-ellipsis { display: inline-block; position: relative; width: 64px; diff --git a/packs/js/reactions-modal-c74f7f81.js b/packs/js/reactions-modal-c5e40e75.js similarity index 90% rename from packs/js/reactions-modal-c74f7f81.js rename to packs/js/reactions-modal-c5e40e75.js index b628f84a4..2eb4fb588 100644 --- a/packs/js/reactions-modal-c74f7f81.js +++ b/packs/js/reactions-modal-c5e40e75.js @@ -1 +1 @@ -import{d as A,u as F,r as m,at as N,q as w,O as z,ey as I,R as h,a as n,B as j,W as B,F as g,bu as T,ev as U,ez as $,E as D,T as L,aB as k,o as O}from"../index-7380452a.js";import{S as W}from"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var q=O({close:{id:"lightbox.close",defaultMessage:"Close"},all:{id:"reactions.all",defaultMessage:"All"}}),Q=function(c){var C=c.onClose,r=c.statusId,M=c.reaction,d=A(),R=F(),x=m.useState(M),f=N(x,2),o=f[0],v=f[1],i=w(function(e){var a,t,s=(a=e.user_lists.favourited_by.get(r))===null||a===void 0?void 0:a.items,l=(t=e.user_lists.reactions.get(r))===null||t===void 0?void 0:t.items;return s&&l&&z(s!=null&&s.size?[I({accounts:s,count:s.size,name:"⭐️"})]:[]).concat(l||[])}),y=function(){d(U(r)),d($(r))},E=function(){C("REACTIONS")},S=function(){var a=[{text:R.formatMessage(q.all),action:function(){return v("")},name:"all"}];return i.forEach(function(t){return a.push({text:n("div",{className:"flex items-center gap-1"},void 0,n(D,{className:"h-4 w-4",emoji:t.name,src:t.url||void 0}),t.count),action:function(){return v(t.name)},name:t.name})}),n(L,{items:a,activeItem:o||"all"})},p=m.useMemo(function(){if(i)if(o){var e=i.find(function(a){var t=a.name;return t===o});if(e)return e.accounts.map(function(a){return{id:a,reaction:o,reactionUrl:e.url||void 0}}).toList()}else return i.map(function(a){var t=a.accounts,s=a.name,l=a.url;return t.map(function(_){return{id:_,reaction:s,reactionUrl:l}})}).flatten()},[i,o]);m.useEffect(function(){y()},[]);var u;if(!p||!i)u=n(k,{});else{var b=n(g,{id:"status.reactions.empty",defaultMessage:"No one has reacted to this post yet. When someone does, they will show up here."});u=h.createElement(h.Fragment,null,i.size>0&&S(),n(W,{scrollKey:"reactions",emptyMessage:b,className:B("max-w-full",{"mt-4":i.size>0}),itemClassName:"pb-3"},void 0,p.map(function(e){return n(j,{id:e.id,emoji:e.reaction,emojiUrl:e.reactionUrl},"".concat(e.id,"-").concat(e.reaction))})))}return n(T,{title:n(g,{id:"column.reactions",defaultMessage:"Reactions"}),onClose:E},void 0,u)};export{Q as default}; +import{d as A,u as F,r as m,at as N,q as w,O as z,ey as I,R as h,a as n,B as j,W as B,F as g,bu as T,ev as U,ez as $,E as D,T as L,aB as k,o as O}from"../index-be605fd2.js";import{S as W}from"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var q=O({close:{id:"lightbox.close",defaultMessage:"Close"},all:{id:"reactions.all",defaultMessage:"All"}}),Q=function(c){var C=c.onClose,r=c.statusId,M=c.reaction,d=A(),R=F(),x=m.useState(M),f=N(x,2),o=f[0],v=f[1],i=w(function(e){var a,t,s=(a=e.user_lists.favourited_by.get(r))===null||a===void 0?void 0:a.items,l=(t=e.user_lists.reactions.get(r))===null||t===void 0?void 0:t.items;return s&&l&&z(s!=null&&s.size?[I({accounts:s,count:s.size,name:"⭐️"})]:[]).concat(l||[])}),y=function(){d(U(r)),d($(r))},E=function(){C("REACTIONS")},S=function(){var a=[{text:R.formatMessage(q.all),action:function(){return v("")},name:"all"}];return i.forEach(function(t){return a.push({text:n("div",{className:"flex items-center gap-1"},void 0,n(D,{className:"h-4 w-4",emoji:t.name,src:t.url||void 0}),t.count),action:function(){return v(t.name)},name:t.name})}),n(L,{items:a,activeItem:o||"all"})},p=m.useMemo(function(){if(i)if(o){var e=i.find(function(a){var t=a.name;return t===o});if(e)return e.accounts.map(function(a){return{id:a,reaction:o,reactionUrl:e.url||void 0}}).toList()}else return i.map(function(a){var t=a.accounts,s=a.name,l=a.url;return t.map(function(_){return{id:_,reaction:s,reactionUrl:l}})}).flatten()},[i,o]);m.useEffect(function(){y()},[]);var u;if(!p||!i)u=n(k,{});else{var b=n(g,{id:"status.reactions.empty",defaultMessage:"No one has reacted to this post yet. When someone does, they will show up here."});u=h.createElement(h.Fragment,null,i.size>0&&S(),n(W,{scrollKey:"reactions",emptyMessage:b,className:B("max-w-full",{"mt-4":i.size>0}),itemClassName:"pb-3"},void 0,p.map(function(e){return n(j,{id:e.id,emoji:e.reaction,emojiUrl:e.reactionUrl},"".concat(e.id,"-").concat(e.reaction))})))}return n(T,{title:n(g,{id:"column.reactions",defaultMessage:"Reactions"}),onClose:E},void 0,u)};export{Q as default}; diff --git a/packs/js/reblogs-modal-e81d7374.js b/packs/js/reblogs-modal-3d6a5daf.js similarity index 82% rename from packs/js/reblogs-modal-e81d7374.js rename to packs/js/reblogs-modal-3d6a5daf.js index c082e2287..c03e491cd 100644 --- a/packs/js/reblogs-modal-e81d7374.js +++ b/packs/js/reblogs-modal-3d6a5daf.js @@ -1 +1 @@ -import{d as b,q as u,r as g,a as t,B as m,F as d,bu as M,es as C,et as y,eu as R,aB as _}from"../index-7380452a.js";import{S}from"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var A=function(n){var c=n.onClose,o=n.statusId,a=b(),i=u(function(e){var s;return(s=e.user_lists.reblogged_by.get(o))===null||s===void 0?void 0:s.items}),r=u(function(e){var s;return(s=e.user_lists.reblogged_by.get(o))===null||s===void 0?void 0:s.next}),f=function(){a(C(o)),a(y(o))};g.useEffect(function(){f()},[]);var p=function(){c("REBLOGS")},v=function(){r&&a(R(o,r))},l;if(!i)l=t(_,{});else{var h=t(d,{id:"status.reblogs.empty",defaultMessage:"No one has reposted this post yet. When someone does, they will show up here."});l=t(S,{scrollKey:"reblogs",emptyMessage:h,className:"max-w-full",itemClassName:"pb-3",style:{height:"80vh"},useWindowScroll:!1,onLoadMore:v,hasMore:!!r},void 0,i.map(function(e){return t(m,{id:e},e)}))}return t(M,{title:t(d,{id:"column.reblogs",defaultMessage:"Reposts"}),onClose:p},void 0,l)};export{A as default}; +import{d as b,q as u,r as g,a as t,B as m,F as d,bu as M,es as C,et as y,eu as R,aB as _}from"../index-be605fd2.js";import{S}from"./scrollable-list-1e43c72d.js";import"./index-85a17314.js";import"./load-more-55559f32.js";var A=function(n){var c=n.onClose,o=n.statusId,a=b(),i=u(function(e){var s;return(s=e.user_lists.reblogged_by.get(o))===null||s===void 0?void 0:s.items}),r=u(function(e){var s;return(s=e.user_lists.reblogged_by.get(o))===null||s===void 0?void 0:s.next}),f=function(){a(C(o)),a(y(o))};g.useEffect(function(){f()},[]);var p=function(){c("REBLOGS")},v=function(){r&&a(R(o,r))},l;if(!i)l=t(_,{});else{var h=t(d,{id:"status.reblogs.empty",defaultMessage:"No one has reposted this post yet. When someone does, they will show up here."});l=t(S,{scrollKey:"reblogs",emptyMessage:h,className:"max-w-full",itemClassName:"pb-3",style:{height:"80vh"},useWindowScroll:!1,onLoadMore:v,hasMore:!!r},void 0,i.map(function(e){return t(m,{id:e},e)}))}return t(M,{title:t(d,{id:"column.reblogs",defaultMessage:"Reposts"}),onClose:p},void 0,l)};export{A as default}; diff --git a/packs/js/reply-mentions-modal-48dcf84b.js b/packs/js/reply-mentions-modal-88976cd4.js similarity index 91% rename from packs/js/reply-mentions-modal-48dcf84b.js rename to packs/js/reply-mentions-modal-88976cd4.js index 940cc2a10..741aede5c 100644 --- a/packs/js/reply-mentions-modal-48dcf84b.js +++ b/packs/js/reply-mentions-modal-88976cd4.js @@ -1 +1 @@ -import{u as h,d as R,e6 as _,b3 as I,r as M,bd as b,a as e,a5 as y,a9 as p,bW as w,b2 as k,H as N,o as P,eh as E,ei as S,aL as q,q as T,b8 as F,ej as L,F as O,d$ as $,bu as j}from"../index-7380452a.js";var f=P({remove:{id:"reply_mentions.account.remove",defaultMessage:"Remove from mentions"},add:{id:"reply_mentions.account.add",defaultMessage:"Add to mentions"}}),x=function(n){var c,i=n.composeId,a=n.accountId,r=n.author,t=h(),u=R(),l=_(i),d=I(a),s=d.account,v=!!s&&((c=l.to)===null||c===void 0?void 0:c.includes(s.acct)),o=function(){return u(E(i,a))},g=function(){return u(S(i,a))};if(M.useEffect(function(){a&&!s&&u(b(a))},[]),!s)return null;var m;return v?m=e(p,{src:y,iconClassName:"h-5 w-5",title:t.formatMessage(f.remove),onClick:o}):m=e(p,{src:w,iconClassName:"h-5 w-5",title:t.formatMessage(f.add),onClick:g}),e(N,{space:1,alignItems:"center",justifyContent:"between",className:"p-2.5"},void 0,e("div",{className:"w-full"},void 0,e(k,{account:s,withRelationship:!1,withLinkToProfile:!1})),!r&&m)},B=function(n){var c=n.composeId,i=n.onClose,a=_(c),r=M.useCallback(q(),[]),t=T(function(o){return r(o,{id:a.in_reply_to})}),u=F(),l=u.account,d=L(t,l),s=(t==null?void 0:t.account).id,v=function(){i("REPLY_MENTIONS")};return e(j,{title:e(O,{id:"navigation_bar.in_reply_to",defaultMessage:"In reply to"}),onClose:v,closeIcon:$,closePosition:"left"},void 0,e("div",{className:"reply-mentions-modal__accounts"},void 0,d.map(function(o){return e(x,{composeId:c,accountId:o,author:s===o},o)})))};export{B as default}; +import{u as h,d as R,e6 as _,b3 as I,r as M,bd as b,a as e,a5 as y,a9 as p,bW as w,b2 as k,H as N,o as P,eh as E,ei as S,aL as q,q as T,b8 as F,ej as L,F as O,d$ as $,bu as j}from"../index-be605fd2.js";var f=P({remove:{id:"reply_mentions.account.remove",defaultMessage:"Remove from mentions"},add:{id:"reply_mentions.account.add",defaultMessage:"Add to mentions"}}),x=function(n){var c,i=n.composeId,a=n.accountId,r=n.author,t=h(),u=R(),l=_(i),d=I(a),s=d.account,v=!!s&&((c=l.to)===null||c===void 0?void 0:c.includes(s.acct)),o=function(){return u(E(i,a))},g=function(){return u(S(i,a))};if(M.useEffect(function(){a&&!s&&u(b(a))},[]),!s)return null;var m;return v?m=e(p,{src:y,iconClassName:"h-5 w-5",title:t.formatMessage(f.remove),onClick:o}):m=e(p,{src:w,iconClassName:"h-5 w-5",title:t.formatMessage(f.add),onClick:g}),e(N,{space:1,alignItems:"center",justifyContent:"between",className:"p-2.5"},void 0,e("div",{className:"w-full"},void 0,e(k,{account:s,withRelationship:!1,withLinkToProfile:!1})),!r&&m)},B=function(n){var c=n.composeId,i=n.onClose,a=_(c),r=M.useCallback(q(),[]),t=T(function(o){return r(o,{id:a.in_reply_to})}),u=F(),l=u.account,d=L(t,l),s=(t==null?void 0:t.account).id,v=function(){i("REPLY_MENTIONS")};return e(j,{title:e(O,{id:"navigation_bar.in_reply_to",defaultMessage:"In reply to"}),onClose:v,closeIcon:$,closePosition:"left"},void 0,e("div",{className:"reply-mentions-modal__accounts"},void 0,d.map(function(o){return e(x,{composeId:c,accountId:o,author:s===o},o)})))};export{B as default}; diff --git a/packs/js/report-modal-97969a9e.js b/packs/js/report-modal-0b861280.js similarity index 98% rename from packs/js/report-modal-97969a9e.js rename to packs/js/report-modal-0b861280.js index 73ebdd91f..323626dd4 100644 --- a/packs/js/report-modal-97969a9e.js +++ b/packs/js/report-modal-0b861280.js @@ -1 +1 @@ -import{u as L,q as u,bM as he,bN as f,a as e,y as k,a2 as E,o as j,F as G,d as V,R as O,bO as be,r as p,bP as Se,bQ as ye,bR as re,ah as X,bS as ke,g as Te,b9 as Me,bT as we,at as D,bU as ae,bF as q,H as J,bV as Ee,aa as $,bW as Re,bX as Ae,bY as xe,bZ as Ce,b_ as Oe,W as Y,b$ as _e,_ as P,b3 as Ne,aZ as He,c0 as Fe,bu as Ge,c1 as Ie,B as ze,c2 as ee,c3 as Pe,c4 as We,c5 as Ue,af as Be,ag as qe,A as De,c6 as Le,c7 as je}from"../index-7380452a.js";import{G as Ve}from"./group-card-c9aa3023.js";import{v as Ye}from"./arrows-minimize-7c27a12c.js";import{n as Ze}from"./noop-19c18e1e.js";import"./group-header-image-e076498c.js";var W=j({accountEntity:{id:"report.confirmation.entity.account",defaultMessage:"account"},groupEntity:{id:"report.confirmation.entity.group",defaultMessage:"group"},title:{id:"report.confirmation.title",defaultMessage:"Thanks for submitting your report."},content:{id:"report.confirmation.content",defaultMessage:"If we find that this {entity} is violating the {link} we will take further action on the matter."}}),se=e(G,{id:"shared.tos",defaultMessage:"Terms of Service"}),Qe=function(l){return e("a",{href:l,target:"_blank",className:"text-primary-600 hover:text-primary-800 hover:underline dark:text-accent-blue dark:hover:text-accent-blue"},void 0,se)},U=function(){var l=L(),i=u(function(a){return he(a).get("links")}),t=u(function(a){return a.reports.new.entityType}),o=t===f.GROUP?l.formatMessage(W.groupEntity):l.formatMessage(W.accountEntity);return e(E,{space:1},void 0,e(k,{weight:"semibold",tag:"h1",size:"xl"},void 0,l.formatMessage(W.title)),e(k,{},void 0,l.formatMessage(W.content,{entity:o,link:i.get("termsOfService")?Qe(i.get("termsOfService")):se})))},Xe=function(l){var i=l.id,t=l.disabled,o=V(),a=u(function(m){return m.statuses.get(i)}),A=u(function(m){return m.reports.new.status_ids.includes(i)}),s=function(b){return o(ke(i,b.target.checked))};if(!a||a.reblog)return null;var v;if(a.media_attachments.size>0){var R,M;if(!a.media_attachments.some(function(m){return m.type==="unknown"}))if(((R=a.media_attachments.get(0))===null||R===void 0?void 0:R.type)==="video"){var S=a.media_attachments.get(0);S&&(v=O.createElement(O.Fragment,null,e(p.Suspense,{},void 0,e(be,{preview:S.preview_url,blurhash:S.blurhash,src:S.url,alt:S.description,aspectRatio:S.meta.getIn(["original","aspect"]),width:239,height:110,inline:!0}))))}else if(((M=a.media_attachments.get(0))===null||M===void 0?void 0:M.type)==="audio"){var w=a.media_attachments.get(0);w&&(v=O.createElement(O.Fragment,null,e(p.Suspense,{},void 0,e(Se,{src:w.url,alt:w.description}))))}else v=O.createElement(O.Fragment,null,e(p.Suspense,{},void 0,e(ye,{media:a.media_attachments,height:110,onOpenMedia:Ze})))}return e("div",{className:"status-check-box"},void 0,e("div",{className:"status-check-box__status"},void 0,e(re,{status:a}),v),e("div",{className:"status-check-box-toggle"},void 0,e(X,{checked:A,onChange:s,disabled:t})))},I=j({addAdditionalStatuses:{id:"report.otherActions.addAdditional",defaultMessage:"Would you like to add additional statuses to this report?"},addMore:{id:"report.otherActions.addMore",defaultMessage:"Add more"},furtherActions:{id:"report.otherActions.furtherActions",defaultMessage:"Further actions:"},hideAdditonalStatuses:{id:"report.otherActions.hideAdditional",defaultMessage:"Hide additional statuses"},otherStatuses:{id:"report.otherActions.otherStatuses",defaultMessage:"Include other statuses?"}}),Z=function(l){var i=l.account,t=V(),o=Te(),a=L(),A=u(function(g){return Me(g.timelines.get("account:".concat(i.id,":with_replies")).items).union(g.reports.new.status_ids)}),s=u(function(g){return g.reports.new.block}),v=u(function(g){return g.reports.new.forward}),R=we(i)&&o.federating,M=u(function(g){return g.reports.new.isSubmitting}),S=p.useState(!1),w=D(S,2),m=w[0],b=w[1],_=function(x){t(Ae(x.target.checked))},N=function(x){t(xe(x.target.checked))};return p.useEffect(function(){t(ae())},[]),e(E,{space:4},void 0,o.reportMultipleStatuses&&e(E,{space:2},void 0,e(k,{tag:"h1",size:"xl",weight:"semibold"},void 0,a.formatMessage(I.otherStatuses)),e(q,{labelText:a.formatMessage(I.addAdditionalStatuses)},void 0,m?e(E,{space:2},void 0,e("div",{className:"divide-y divide-solid divide-gray-200 dark:divide-gray-800"},void 0,A.map(function(g){return e(Xe,{id:g},g)})),e("div",{},void 0,e($,{icon:Ye,theme:"tertiary",size:"sm",onClick:function(){return b(!1)}},void 0,a.formatMessage(I.hideAdditonalStatuses)))):e($,{icon:Re,theme:"tertiary",size:"sm",onClick:function(){return b(!0)}},void 0,a.formatMessage(I.addMore)))),e(E,{space:2},void 0,e(k,{tag:"h1",size:"xl",weight:"semibold"},void 0,a.formatMessage(I.furtherActions)),e(q,{labelText:e(G,{id:"report.block_hint",defaultMessage:"Do you also want to block this account?"})},void 0,e(J,{space:2,alignItems:"center"},void 0,e(X,{checked:s,onChange:_,id:"report-block"}),e(k,{theme:"muted",tag:"label",size:"sm",htmlFor:"report-block"},void 0,e(G,{id:"report.block",defaultMessage:"Block {target}",values:{target:"@".concat(i.acct)}})))),R&&e(q,{labelText:e(G,{id:"report.forward_hint",defaultMessage:"The account is from another server. Send a copy of the report there as well?"})},void 0,e(J,{space:2,alignItems:"center"},void 0,e(X,{checked:v,onChange:N,id:"report-forward",disabled:M}),e(k,{theme:"muted",tag:"label",size:"sm",htmlFor:"report-forward"},void 0,e(G,{id:"report.forward",defaultMessage:"Forward to {target}",values:{target:Ee(i)}}))))))},Q=j({placeholder:{id:"report.placeholder",defaultMessage:"Additional comments"},reasonForReporting:{id:"report.reason.title",defaultMessage:"Reason for reporting"}}),te=385,B=function(){var l=V(),i=L(),t=p.useRef(null),o=p.useState(!1),a=D(o,2),A=a[0],s=a[1],v=p.useState(!0),R=D(v,2),M=R[0],S=R[1],w=u(function(d){return d.reports.new.entityType}),m=u(function(d){return d.reports.new.comment}),b=u(function(d){return d.rules.items}),_=u(function(d){return d.reports.new.rule_ids}),N=b.length>0,g=function(h){l(_e(h.target.value))},x=function(){if(t.current){var h=t.current,r=h.scrollTop,H=h.scrollHeight,z=h.clientHeight;r+z>H-24?s(!0):s(!1),r<24?S(!0):S(!1)}},C=function(h){var r="content";switch(w){case f.ACCOUNT:r="account";break;case f.STATUS:case f.CHAT_MESSAGE:r="content";break;case f.GROUP:r="group";break;default:r="content";break}return h.rule_type?h.rule_type===r:!0};return p.useEffect(function(){l(ae())},[]),p.useEffect(function(){if(b.length>0&&t.current){var d=t.current.clientHeight;d<=te&&s(!0)}},[b,t.current]),e(E,{space:4},void 0,N&&e(E,{space:2},void 0,e(k,{size:"xl",weight:"semibold",tag:"h1"},void 0,i.formatMessage(Q.reasonForReporting)),e("div",{className:"relative"},void 0,O.createElement("div",{style:{maxHeight:te},className:"-space-y-px overflow-y-auto rounded-lg",onScroll:x,ref:t},b.filter(C).map(function(d,h){var r=_.includes(String(d.id));return e("button",{"data-testid":"rule-".concat(d.id),onClick:function(){return l(Oe(d.id))},className:Y({"relative border border-solid border-gray-200 dark:border-gray-800 hover:bg-gray-100 dark:hover:bg-primary-800/30 text-start w-full p-4 flex justify-between items-center cursor-pointer":!0,"rounded-tl-lg rounded-tr-lg":h===0,"rounded-bl-lg rounded-br-lg":h===b.length-1,"bg-gray-200 hover:bg-gray-200 dark:bg-primary-800/50":r})},h,e(E,{className:"mr-3"},void 0,e(k,{tag:"span",size:"sm",weight:"medium",theme:r?"primary":"default"},void 0,d.text),e(k,{tag:"span",theme:"muted",size:"sm"},void 0,d.subtext)),e("input",{name:"reason",type:"checkbox",value:d.id,checked:r,readOnly:!0,className:"h-4 w-4 rounded border-2 border-gray-300 text-primary-600 checked:bg-primary-500 focus:ring-primary-500 dark:border-gray-800 dark:bg-gray-900 dark:checked:bg-primary-500 dark:focus:ring-primary-500"}))})),e("div",{className:Y("pointer-events-none absolute inset-x-0 top-0 flex justify-center rounded-t-lg bg-gradient-to-b from-white pb-12 pt-8 transition-opacity duration-500 dark:from-gray-900",{"opacity-0":M,"opacity-100":!M})}),e("div",{className:Y("pointer-events-none absolute inset-x-0 bottom-0 flex justify-center rounded-b-lg bg-gradient-to-t from-white pb-8 pt-12 transition-opacity duration-500 dark:from-gray-900",{"opacity-0":A,"opacity-100":!A})}))),e(q,{labelText:i.formatMessage(Q.placeholder)},void 0,e(Ce,{placeholder:i.formatMessage(Q.placeholder),value:m,onChange:g})))},F,y=j({blankslate:{id:"report.reason.blankslate",defaultMessage:"You have removed all statuses from being selected."},done:{id:"report.done",defaultMessage:"Done"},next:{id:"report.next",defaultMessage:"Next"},submit:{id:"report.submit",defaultMessage:"Submit"},reportContext:{id:"report.chatMessage.context",defaultMessage:"When reporting a user’s message, the five messages before and five messages after the one selected will be passed along to our moderation team for context."},reportMessage:{id:"report.chatMessage.title",defaultMessage:"Report message"},reportGroup:{id:"report.group.title",defaultMessage:"Report Group"},cancel:{id:"common.cancel",defaultMessage:"Cancel"},previous:{id:"report.previous",defaultMessage:"Previous"}}),c=function(T){return T.ONE="ONE",T.TWO="TWO",T.THREE="THREE",T}(c||{}),Je=(F={},P(F,f.ACCOUNT,{ONE:B,TWO:Z,THREE:U}),P(F,f.CHAT_MESSAGE,{ONE:B,TWO:Z,THREE:U}),P(F,f.STATUS,{ONE:B,TWO:Z,THREE:U}),P(F,f.GROUP,{ONE:B,TWO:null,THREE:U}),F),Ke=function(l){var i=l.statusId,t=u(function(o){return o.statuses.get(i)});return t?e(E,{space:2,className:"rounded-lg bg-gray-100 p-4 dark:bg-gray-800"},void 0,e(ze,{id:t.account,showProfileHoverCard:!1,withLinkToProfile:!1,timestamp:t.created_at,hideActions:!0}),e(re,{status:t,collapsable:!0}),t.media_attachments.size>0&&e(Ie,{media:t.media_attachments,sensitive:t.sensitive})):null},st=function(l){var i=l.onClose,t=V(),o=L(),a=u(function(n){return n.reports.new.account_id}),A=Ne(a||void 0),s=A.account,v=u(function(n){return n.reports.new.entityType}),R=u(function(n){return n.reports.new.block}),M=u(function(n){return n.reports.new.isSubmitting}),S=u(function(n){return n.rules.items}),w=u(function(n){return n.reports.new.rule_ids}),m=u(function(n){return n.reports.new.status_ids}),b=u(function(n){return n.reports.new.chat_message}),_=u(function(n){return n.reports.new.group}),N=S.length>0,g=v===f.ACCOUNT,x=v===f.STATUS,C=v===f.GROUP,d=p.useState(c.ONE),h=D(d,2),r=h[0],H=h[1],z=function(){t(Pe()).then(function(){return H(c.THREE)}).catch(function(ve){return t(We(ve))}),R&&s&&t(Ue(s.id))},ne=p.useCallback(function(){switch(m.size){case 0:return e("div",{className:"flex w-full items-center justify-center rounded-lg bg-gray-100 p-4 dark:bg-gray-800"},void 0,e(k,{theme:"muted"},void 0,o.formatMessage(y.blankslate)));default:return e(Ke,{statusId:m.first()})}},[m.size]),oe=p.useMemo(function(){switch(r){case c.ONE:return o.formatMessage(y.cancel);default:return o.formatMessage(y.previous)}},[r]),ie=function(){switch(r){case c.ONE:i();break;case c.TWO:H(c.ONE);break}},ue=p.useMemo(function(){switch(r){case c.ONE:return C?o.formatMessage(y.submit):o.formatMessage(y.next);case c.TWO:return C?o.formatMessage(y.done):o.formatMessage(y.submit);case c.THREE:return o.formatMessage(y.done);default:return o.formatMessage(y.next)}},[r,C]),de=function(){switch(r){case c.ONE:C?z():H(c.TWO);break;case c.TWO:C?(t(ee()),i()):z();break;case c.THREE:t(ee()),i();break}},ce=function(){if(s)return e(E,{space:4},void 0,e(J,{alignItems:"center",space:4,className:"rounded-md border border-solid border-gray-400 p-4 dark:border-2 dark:border-gray-800"},void 0,e("div",{},void 0,e(je,{src:s.avatar,className:"h-8 w-8"})),e("div",{className:"grow rounded-md bg-gray-200 p-4 dark:bg-primary-800"},void 0,e(k,{dangerouslySetInnerHTML:{__html:b==null?void 0:b.content}}))),e(Be,{},void 0,e(qe,{label:e(De,{src:Le,className:"text-gray-600"})},void 0,e(k,{size:"sm"},void 0,o.formatMessage(y.reportContext)))))},le=function(){if(_)return e(Ve,{group:_})},ge=function(){switch(v){case f.STATUS:return ne();case f.CHAT_MESSAGE:return ce();case f.GROUP:return r===c.TWO?null:le();default:return null}},fe=function(){switch(v){case f.CHAT_MESSAGE:return o.formatMessage(y.reportMessage);case f.GROUP:return o.formatMessage(y.reportGroup);default:return e(G,{id:"report.target",defaultMessage:"Reporting {target}",values:{target:e("strong",{},void 0,"@",s==null?void 0:s.acct)}})}},pe=p.useMemo(function(){return r===c.THREE?!1:M||N&&w.isEmpty()||x&&m.size===0},[r,M,N,w,m.size,x]),me=p.useCallback(function(){switch(r){case c.ONE:return .33;case c.TWO:return .66;case c.THREE:return 1;default:return 0}},[r]);if(p.useEffect(function(){s!=null&&s.id&&t(He(s.id,{withReplies:!0,maxId:null}))},[s==null?void 0:s.id]),!s)return null;var K=Je[v][r];return e(Ge,{title:fe(),onClose:i,cancelText:oe,cancelAction:r===c.THREE?void 0:ie,confirmationAction:de,confirmationText:ue,confirmationDisabled:pe,skipFocus:!0},void 0,e(E,{space:4},void 0,e(Fe,{progress:me()}),r!==c.THREE&&!g&&ge(),K&&e(K,{account:s})))};export{st as default}; +import{u as L,q as u,bM as he,bN as f,a as e,y as k,a2 as E,o as j,F as G,d as V,R as O,bO as be,r as p,bP as Se,bQ as ye,bR as re,ah as X,bS as ke,g as Te,b9 as Me,bT as we,at as D,bU as ae,bF as q,H as J,bV as Ee,aa as $,bW as Re,bX as Ae,bY as xe,bZ as Ce,b_ as Oe,W as Y,b$ as _e,_ as P,b3 as Ne,aZ as He,c0 as Fe,bu as Ge,c1 as Ie,B as ze,c2 as ee,c3 as Pe,c4 as We,c5 as Ue,af as Be,ag as qe,A as De,c6 as Le,c7 as je}from"../index-be605fd2.js";import{G as Ve}from"./group-card-e8bab249.js";import{v as Ye}from"./arrows-minimize-7c27a12c.js";import{n as Ze}from"./noop-3f99ae3e.js";import"./group-header-image-068adc6d.js";var W=j({accountEntity:{id:"report.confirmation.entity.account",defaultMessage:"account"},groupEntity:{id:"report.confirmation.entity.group",defaultMessage:"group"},title:{id:"report.confirmation.title",defaultMessage:"Thanks for submitting your report."},content:{id:"report.confirmation.content",defaultMessage:"If we find that this {entity} is violating the {link} we will take further action on the matter."}}),se=e(G,{id:"shared.tos",defaultMessage:"Terms of Service"}),Qe=function(l){return e("a",{href:l,target:"_blank",className:"text-primary-600 hover:text-primary-800 hover:underline dark:text-accent-blue dark:hover:text-accent-blue"},void 0,se)},U=function(){var l=L(),i=u(function(a){return he(a).get("links")}),t=u(function(a){return a.reports.new.entityType}),o=t===f.GROUP?l.formatMessage(W.groupEntity):l.formatMessage(W.accountEntity);return e(E,{space:1},void 0,e(k,{weight:"semibold",tag:"h1",size:"xl"},void 0,l.formatMessage(W.title)),e(k,{},void 0,l.formatMessage(W.content,{entity:o,link:i.get("termsOfService")?Qe(i.get("termsOfService")):se})))},Xe=function(l){var i=l.id,t=l.disabled,o=V(),a=u(function(m){return m.statuses.get(i)}),A=u(function(m){return m.reports.new.status_ids.includes(i)}),s=function(b){return o(ke(i,b.target.checked))};if(!a||a.reblog)return null;var v;if(a.media_attachments.size>0){var R,M;if(!a.media_attachments.some(function(m){return m.type==="unknown"}))if(((R=a.media_attachments.get(0))===null||R===void 0?void 0:R.type)==="video"){var S=a.media_attachments.get(0);S&&(v=O.createElement(O.Fragment,null,e(p.Suspense,{},void 0,e(be,{preview:S.preview_url,blurhash:S.blurhash,src:S.url,alt:S.description,aspectRatio:S.meta.getIn(["original","aspect"]),width:239,height:110,inline:!0}))))}else if(((M=a.media_attachments.get(0))===null||M===void 0?void 0:M.type)==="audio"){var w=a.media_attachments.get(0);w&&(v=O.createElement(O.Fragment,null,e(p.Suspense,{},void 0,e(Se,{src:w.url,alt:w.description}))))}else v=O.createElement(O.Fragment,null,e(p.Suspense,{},void 0,e(ye,{media:a.media_attachments,height:110,onOpenMedia:Ze})))}return e("div",{className:"status-check-box"},void 0,e("div",{className:"status-check-box__status"},void 0,e(re,{status:a}),v),e("div",{className:"status-check-box-toggle"},void 0,e(X,{checked:A,onChange:s,disabled:t})))},I=j({addAdditionalStatuses:{id:"report.otherActions.addAdditional",defaultMessage:"Would you like to add additional statuses to this report?"},addMore:{id:"report.otherActions.addMore",defaultMessage:"Add more"},furtherActions:{id:"report.otherActions.furtherActions",defaultMessage:"Further actions:"},hideAdditonalStatuses:{id:"report.otherActions.hideAdditional",defaultMessage:"Hide additional statuses"},otherStatuses:{id:"report.otherActions.otherStatuses",defaultMessage:"Include other statuses?"}}),Z=function(l){var i=l.account,t=V(),o=Te(),a=L(),A=u(function(g){return Me(g.timelines.get("account:".concat(i.id,":with_replies")).items).union(g.reports.new.status_ids)}),s=u(function(g){return g.reports.new.block}),v=u(function(g){return g.reports.new.forward}),R=we(i)&&o.federating,M=u(function(g){return g.reports.new.isSubmitting}),S=p.useState(!1),w=D(S,2),m=w[0],b=w[1],_=function(x){t(Ae(x.target.checked))},N=function(x){t(xe(x.target.checked))};return p.useEffect(function(){t(ae())},[]),e(E,{space:4},void 0,o.reportMultipleStatuses&&e(E,{space:2},void 0,e(k,{tag:"h1",size:"xl",weight:"semibold"},void 0,a.formatMessage(I.otherStatuses)),e(q,{labelText:a.formatMessage(I.addAdditionalStatuses)},void 0,m?e(E,{space:2},void 0,e("div",{className:"divide-y divide-solid divide-gray-200 dark:divide-gray-800"},void 0,A.map(function(g){return e(Xe,{id:g},g)})),e("div",{},void 0,e($,{icon:Ye,theme:"tertiary",size:"sm",onClick:function(){return b(!1)}},void 0,a.formatMessage(I.hideAdditonalStatuses)))):e($,{icon:Re,theme:"tertiary",size:"sm",onClick:function(){return b(!0)}},void 0,a.formatMessage(I.addMore)))),e(E,{space:2},void 0,e(k,{tag:"h1",size:"xl",weight:"semibold"},void 0,a.formatMessage(I.furtherActions)),e(q,{labelText:e(G,{id:"report.block_hint",defaultMessage:"Do you also want to block this account?"})},void 0,e(J,{space:2,alignItems:"center"},void 0,e(X,{checked:s,onChange:_,id:"report-block"}),e(k,{theme:"muted",tag:"label",size:"sm",htmlFor:"report-block"},void 0,e(G,{id:"report.block",defaultMessage:"Block {target}",values:{target:"@".concat(i.acct)}})))),R&&e(q,{labelText:e(G,{id:"report.forward_hint",defaultMessage:"The account is from another server. Send a copy of the report there as well?"})},void 0,e(J,{space:2,alignItems:"center"},void 0,e(X,{checked:v,onChange:N,id:"report-forward",disabled:M}),e(k,{theme:"muted",tag:"label",size:"sm",htmlFor:"report-forward"},void 0,e(G,{id:"report.forward",defaultMessage:"Forward to {target}",values:{target:Ee(i)}}))))))},Q=j({placeholder:{id:"report.placeholder",defaultMessage:"Additional comments"},reasonForReporting:{id:"report.reason.title",defaultMessage:"Reason for reporting"}}),te=385,B=function(){var l=V(),i=L(),t=p.useRef(null),o=p.useState(!1),a=D(o,2),A=a[0],s=a[1],v=p.useState(!0),R=D(v,2),M=R[0],S=R[1],w=u(function(d){return d.reports.new.entityType}),m=u(function(d){return d.reports.new.comment}),b=u(function(d){return d.rules.items}),_=u(function(d){return d.reports.new.rule_ids}),N=b.length>0,g=function(h){l(_e(h.target.value))},x=function(){if(t.current){var h=t.current,r=h.scrollTop,H=h.scrollHeight,z=h.clientHeight;r+z>H-24?s(!0):s(!1),r<24?S(!0):S(!1)}},C=function(h){var r="content";switch(w){case f.ACCOUNT:r="account";break;case f.STATUS:case f.CHAT_MESSAGE:r="content";break;case f.GROUP:r="group";break;default:r="content";break}return h.rule_type?h.rule_type===r:!0};return p.useEffect(function(){l(ae())},[]),p.useEffect(function(){if(b.length>0&&t.current){var d=t.current.clientHeight;d<=te&&s(!0)}},[b,t.current]),e(E,{space:4},void 0,N&&e(E,{space:2},void 0,e(k,{size:"xl",weight:"semibold",tag:"h1"},void 0,i.formatMessage(Q.reasonForReporting)),e("div",{className:"relative"},void 0,O.createElement("div",{style:{maxHeight:te},className:"-space-y-px overflow-y-auto rounded-lg",onScroll:x,ref:t},b.filter(C).map(function(d,h){var r=_.includes(String(d.id));return e("button",{"data-testid":"rule-".concat(d.id),onClick:function(){return l(Oe(d.id))},className:Y({"relative border border-solid border-gray-200 dark:border-gray-800 hover:bg-gray-100 dark:hover:bg-primary-800/30 text-start w-full p-4 flex justify-between items-center cursor-pointer":!0,"rounded-tl-lg rounded-tr-lg":h===0,"rounded-bl-lg rounded-br-lg":h===b.length-1,"bg-gray-200 hover:bg-gray-200 dark:bg-primary-800/50":r})},h,e(E,{className:"mr-3"},void 0,e(k,{tag:"span",size:"sm",weight:"medium",theme:r?"primary":"default"},void 0,d.text),e(k,{tag:"span",theme:"muted",size:"sm"},void 0,d.subtext)),e("input",{name:"reason",type:"checkbox",value:d.id,checked:r,readOnly:!0,className:"h-4 w-4 rounded border-2 border-gray-300 text-primary-600 checked:bg-primary-500 focus:ring-primary-500 dark:border-gray-800 dark:bg-gray-900 dark:checked:bg-primary-500 dark:focus:ring-primary-500"}))})),e("div",{className:Y("pointer-events-none absolute inset-x-0 top-0 flex justify-center rounded-t-lg bg-gradient-to-b from-white pb-12 pt-8 transition-opacity duration-500 dark:from-gray-900",{"opacity-0":M,"opacity-100":!M})}),e("div",{className:Y("pointer-events-none absolute inset-x-0 bottom-0 flex justify-center rounded-b-lg bg-gradient-to-t from-white pb-8 pt-12 transition-opacity duration-500 dark:from-gray-900",{"opacity-0":A,"opacity-100":!A})}))),e(q,{labelText:i.formatMessage(Q.placeholder)},void 0,e(Ce,{placeholder:i.formatMessage(Q.placeholder),value:m,onChange:g})))},F,y=j({blankslate:{id:"report.reason.blankslate",defaultMessage:"You have removed all statuses from being selected."},done:{id:"report.done",defaultMessage:"Done"},next:{id:"report.next",defaultMessage:"Next"},submit:{id:"report.submit",defaultMessage:"Submit"},reportContext:{id:"report.chatMessage.context",defaultMessage:"When reporting a user’s message, the five messages before and five messages after the one selected will be passed along to our moderation team for context."},reportMessage:{id:"report.chatMessage.title",defaultMessage:"Report message"},reportGroup:{id:"report.group.title",defaultMessage:"Report Group"},cancel:{id:"common.cancel",defaultMessage:"Cancel"},previous:{id:"report.previous",defaultMessage:"Previous"}}),c=function(T){return T.ONE="ONE",T.TWO="TWO",T.THREE="THREE",T}(c||{}),Je=(F={},P(F,f.ACCOUNT,{ONE:B,TWO:Z,THREE:U}),P(F,f.CHAT_MESSAGE,{ONE:B,TWO:Z,THREE:U}),P(F,f.STATUS,{ONE:B,TWO:Z,THREE:U}),P(F,f.GROUP,{ONE:B,TWO:null,THREE:U}),F),Ke=function(l){var i=l.statusId,t=u(function(o){return o.statuses.get(i)});return t?e(E,{space:2,className:"rounded-lg bg-gray-100 p-4 dark:bg-gray-800"},void 0,e(ze,{id:t.account,showProfileHoverCard:!1,withLinkToProfile:!1,timestamp:t.created_at,hideActions:!0}),e(re,{status:t,collapsable:!0}),t.media_attachments.size>0&&e(Ie,{media:t.media_attachments,sensitive:t.sensitive})):null},st=function(l){var i=l.onClose,t=V(),o=L(),a=u(function(n){return n.reports.new.account_id}),A=Ne(a||void 0),s=A.account,v=u(function(n){return n.reports.new.entityType}),R=u(function(n){return n.reports.new.block}),M=u(function(n){return n.reports.new.isSubmitting}),S=u(function(n){return n.rules.items}),w=u(function(n){return n.reports.new.rule_ids}),m=u(function(n){return n.reports.new.status_ids}),b=u(function(n){return n.reports.new.chat_message}),_=u(function(n){return n.reports.new.group}),N=S.length>0,g=v===f.ACCOUNT,x=v===f.STATUS,C=v===f.GROUP,d=p.useState(c.ONE),h=D(d,2),r=h[0],H=h[1],z=function(){t(Pe()).then(function(){return H(c.THREE)}).catch(function(ve){return t(We(ve))}),R&&s&&t(Ue(s.id))},ne=p.useCallback(function(){switch(m.size){case 0:return e("div",{className:"flex w-full items-center justify-center rounded-lg bg-gray-100 p-4 dark:bg-gray-800"},void 0,e(k,{theme:"muted"},void 0,o.formatMessage(y.blankslate)));default:return e(Ke,{statusId:m.first()})}},[m.size]),oe=p.useMemo(function(){switch(r){case c.ONE:return o.formatMessage(y.cancel);default:return o.formatMessage(y.previous)}},[r]),ie=function(){switch(r){case c.ONE:i();break;case c.TWO:H(c.ONE);break}},ue=p.useMemo(function(){switch(r){case c.ONE:return C?o.formatMessage(y.submit):o.formatMessage(y.next);case c.TWO:return C?o.formatMessage(y.done):o.formatMessage(y.submit);case c.THREE:return o.formatMessage(y.done);default:return o.formatMessage(y.next)}},[r,C]),de=function(){switch(r){case c.ONE:C?z():H(c.TWO);break;case c.TWO:C?(t(ee()),i()):z();break;case c.THREE:t(ee()),i();break}},ce=function(){if(s)return e(E,{space:4},void 0,e(J,{alignItems:"center",space:4,className:"rounded-md border border-solid border-gray-400 p-4 dark:border-2 dark:border-gray-800"},void 0,e("div",{},void 0,e(je,{src:s.avatar,className:"h-8 w-8"})),e("div",{className:"grow rounded-md bg-gray-200 p-4 dark:bg-primary-800"},void 0,e(k,{dangerouslySetInnerHTML:{__html:b==null?void 0:b.content}}))),e(Be,{},void 0,e(qe,{label:e(De,{src:Le,className:"text-gray-600"})},void 0,e(k,{size:"sm"},void 0,o.formatMessage(y.reportContext)))))},le=function(){if(_)return e(Ve,{group:_})},ge=function(){switch(v){case f.STATUS:return ne();case f.CHAT_MESSAGE:return ce();case f.GROUP:return r===c.TWO?null:le();default:return null}},fe=function(){switch(v){case f.CHAT_MESSAGE:return o.formatMessage(y.reportMessage);case f.GROUP:return o.formatMessage(y.reportGroup);default:return e(G,{id:"report.target",defaultMessage:"Reporting {target}",values:{target:e("strong",{},void 0,"@",s==null?void 0:s.acct)}})}},pe=p.useMemo(function(){return r===c.THREE?!1:M||N&&w.isEmpty()||x&&m.size===0},[r,M,N,w,m.size,x]),me=p.useCallback(function(){switch(r){case c.ONE:return .33;case c.TWO:return .66;case c.THREE:return 1;default:return 0}},[r]);if(p.useEffect(function(){s!=null&&s.id&&t(He(s.id,{withReplies:!0,maxId:null}))},[s==null?void 0:s.id]),!s)return null;var K=Je[v][r];return e(Ge,{title:fe(),onClose:i,cancelText:oe,cancelAction:r===c.THREE?void 0:ie,confirmationAction:de,confirmationText:ue,confirmationDisabled:pe,skipFocus:!0},void 0,e(E,{space:4},void 0,e(Fe,{progress:me()}),r!==c.THREE&&!g&&ge(),K&&e(K,{account:s})))};export{st as default}; diff --git a/packs/js/schedule-form-ae47b3a7.js b/packs/js/schedule-form-89b40965.js similarity index 94% rename from packs/js/schedule-form-ae47b3a7.js rename to packs/js/schedule-form-89b40965.js index 4a34302d3..438d6418e 100644 --- a/packs/js/schedule-form-ae47b3a7.js +++ b/packs/js/schedule-form-89b40965.js @@ -1 +1 @@ -import{d as h,u as p,e6 as f,a as e,H as g,hM as M,j2 as w,W as D,a9 as F,a5 as S,y as C,F as T,a2 as y,o as N,j3 as k,j4 as x}from"../index-7380452a.js";var I=function(a){return a&&new Date().setHours(0,0,0,0)<=new Date(a).setHours(0,0,0,0)},c=function(a){var t=new Date(new Date().getTime()+3e5),s=new Date(a);return t.getTime()0&&m&&h()<=u&&r(),a.current=null},250)},[m,u,r,t]),T=l.useCallback(_(function(){h()>c?v(!0):v(!1)},150,{trailing:!0}),[c]),S=o.useCallback(function(){window.scrollTo({top:0})},[]),x=function(){setTimeout(S,10),r()};l.useEffect(function(){return window.addEventListener("scroll",T),function(){window.removeEventListener("scroll",T)}},[r]),l.useEffect(function(){p()},[p]);var C=o.useMemo(function(){return t>0&&f},[t,f]);return C?s("div",{className:"fixed left-1/2 top-20 z-50 -translate-x-1/2"},void 0,s("button",{className:"flex cursor-pointer items-center space-x-1.5 whitespace-nowrap rounded-full bg-primary-600 px-4 py-2 text-white transition-transform hover:scale-105 hover:bg-primary-700 active:scale-100",onClick:x},void 0,s(I,{src:B}),s(z,{theme:"inherit",size:"sm"},void 0,w.formatMessage(g,{count:t})))):null};export{U as S}; +import{u as E,f as y,R as o,r as l,at as R,cl as _,a as s,I,y as z}from"../index-be605fd2.js";const B="/packs/assets/arrow-bar-to-up-57af5989.svg";var U=function(e){var r=e.onClick,t=e.count,g=e.message,n=e.threshold,c=n===void 0?400:n,i=e.autoloadThreshold,u=i===void 0?50:i,w=E(),b=y(),a=o.useRef(null),k=l.useState(!1),d=R(k,2),f=d[0],v=d[1],m=b.get("autoloadTimelines")===!0,h=o.useCallback(function(){return(document.scrollingElement||document.documentElement).scrollTop},[]),p=o.useCallback(function(){a.current&&clearTimeout(a.current),a.current=setTimeout(function(){t>0&&m&&h()<=u&&r(),a.current=null},250)},[m,u,r,t]),T=l.useCallback(_(function(){h()>c?v(!0):v(!1)},150,{trailing:!0}),[c]),S=o.useCallback(function(){window.scrollTo({top:0})},[]),x=function(){setTimeout(S,10),r()};l.useEffect(function(){return window.addEventListener("scroll",T),function(){window.removeEventListener("scroll",T)}},[r]),l.useEffect(function(){p()},[p]);var C=o.useMemo(function(){return t>0&&f},[t,f]);return C?s("div",{className:"fixed left-1/2 top-20 z-50 -translate-x-1/2"},void 0,s("button",{className:"flex cursor-pointer items-center space-x-1.5 whitespace-nowrap rounded-full bg-primary-600 px-4 py-2 text-white transition-transform hover:scale-105 hover:bg-primary-700 active:scale-100",onClick:x},void 0,s(I,{src:B}),s(z,{theme:"inherit",size:"sm"},void 0,w.formatMessage(g,{count:t})))):null};export{U as S}; diff --git a/packs/js/scrollable-list-1e43c72d.js b/packs/js/scrollable-list-1e43c72d.js new file mode 100644 index 000000000..6df6f0e2c --- /dev/null +++ b/packs/js/scrollable-list-1e43c72d.js @@ -0,0 +1 @@ +import{R as r,a7 as ee,f as te,r as i,a as s,aB as k,Q as ne,as as O,av as W,a$ as re}from"../index-be605fd2.js";import{V as ae}from"./index-85a17314.js";import{L as oe}from"./load-more-55559f32.js";var se=["context"],le=["context"],ie=function(l){var n=l.context,a=O(l,se);return a["data-known-size"]<=12?null:r.createElement("div",W({className:n==null?void 0:n.itemClassName},a))},de=r.forwardRef(function(e,l){var n=e.context,a=O(e,le);return r.createElement("div",W({ref:l,className:n==null?void 0:n.listClassName},a))}),ve=r.forwardRef(function(e,l){var n=e.scrollKey,a=e.prepend,C=a===void 0?null:a,D=e.alwaysPrepend,F=e.children,u=e.isLoading,I=e.emptyMessage,E=e.emptyMessageCard,H=E===void 0?!0:E,h=e.showLoading;e.onRefresh;var R=e.onScroll,K=e.onScrollToTop,m=e.onLoadMore,w=e.className,z=e.itemClassName,A=e.id,v=e.hasMore,d=e.placeholderComponent,L=e.placeholderCount,N=L===void 0?0:L,P=e.initialTopMostItemIndex,g=P===void 0?0:P,T=e.style,B=T===void 0?{}:T,$=e.useWindowScroll,J=$===void 0?!0:$,V=ee(),j=te(),p=j.get("autoloadMore"),f="soapbox:scrollData:".concat(n),o=i.useMemo(function(){return JSON.parse(sessionStorage.getItem(f))},[f]),x=i.useRef(o?o.index:0),y=i.useRef(o?o.offset:0),q=Array.from(F||[]),b=h&&d&&N>0,S=b?Array(N).fill(""):q;v&&(p||u)&&d?S.push(s(d,{})):v&&(p||u)&&S.push(s(k,{}));var M=i.useCallback(ne(function(){var t=document.querySelector('[data-virtuoso-scroller] [data-item-index="'.concat(x.current,'"]'));t?y.current=t.getBoundingClientRect().top*-1:y.current=0},150,{trailing:!0}),[]);i.useEffect(function(){return document.addEventListener("scroll",M),sessionStorage.removeItem(f),function(){if(n){var t={index:x.current,offset:y.current};sessionStorage.setItem(f,JSON.stringify(t))}document.removeEventListener("scroll",M)}},[]);var Q=function(){return s("div",{className:"mt-2"},void 0,D&&C,u?s(k,{}):r.createElement(r.Fragment,null,H?s(re,{variant:"rounded",size:"lg"},void 0,I):I))},G=function(c,_){return b?s(d,{}):_},U=function(){p&&v&&m&&m()},X=function(){return p||!v||!m?null:s(oe,{visible:!u,onClick:m})},Y=function(c){x.current=Math.min(c.startIndex+1,c.endIndex),M()},Z=i.useMemo(function(){return h?0:g||(o&&V.action==="POP"?{align:"start",index:o.index,offset:o.offset}:0)},[h,g]);return r.createElement(ae,{ref:l,id:A,useWindowScroll:J,className:w,data:S,startReached:K,endReached:U,isScrolling:function(c){return c&&R&&R()},itemContent:G,initialTopMostItemIndex:Z,rangeChanged:Y,style:B,context:{listClassName:w,itemClassName:z},components:{Header:function(){return r.createElement(r.Fragment,null,C)},ScrollSeekPlaceholder:d,EmptyPlaceholder:function(){return Q()},List:de,Item:ie,Footer:X}})});export{ve as S}; diff --git a/packs/js/scrollable-list-df58e451.js b/packs/js/scrollable-list-df58e451.js deleted file mode 100644 index 0430f6e4e..000000000 --- a/packs/js/scrollable-list-df58e451.js +++ /dev/null @@ -1 +0,0 @@ -import{R as n,a7 as ee,f as te,r as i,a as o,aB as O,Q as re,as as W,av as k,a$ as ne}from"../index-7380452a.js";import{V as ae}from"./index-75eb026b.js";import{L as oe}from"./load-more-b53b8d88.js";var se=["context"],le=["context"],ie=function(s){var r=s.context,l=W(s,se);return n.createElement("div",k({className:r==null?void 0:r.itemClassName},l))},de=n.forwardRef(function(e,s){var r=e.context,l=W(e,le);return n.createElement("div",k({ref:s,className:r==null?void 0:r.listClassName},l))}),ve=n.forwardRef(function(e,s){var r=e.scrollKey,l=e.prepend,C=l===void 0?null:l,D=e.alwaysPrepend,F=e.children,u=e.isLoading,I=e.emptyMessage,E=e.emptyMessageCard,H=E===void 0?!0:E,h=e.showLoading;e.onRefresh;var R=e.onScroll,K=e.onScrollToTop,m=e.onLoadMore,L=e.className,A=e.itemClassName,B=e.id,v=e.hasMore,d=e.placeholderComponent,N=e.placeholderCount,w=N===void 0?0:N,P=e.initialTopMostItemIndex,g=P===void 0?0:P,T=e.style,J=T===void 0?{}:T,$=e.useWindowScroll,V=$===void 0?!0:$,j=ee(),q=te(),p=q.get("autoloadMore"),f="soapbox:scrollData:".concat(r),a=i.useMemo(function(){return JSON.parse(sessionStorage.getItem(f))},[f]),x=i.useRef(a?a.index:0),y=i.useRef(a?a.offset:0),z=Array.from(F||[]),b=h&&d&&w>0,S=b?Array(w).fill(""):z;v&&(p||u)&&d?S.push(o(d,{})):v&&(p||u)&&S.push(o(O,{}));var M=i.useCallback(re(function(){var t=document.querySelector('[data-virtuoso-scroller] [data-item-index="'.concat(x.current,'"]'));t?y.current=t.getBoundingClientRect().top*-1:y.current=0},150,{trailing:!0}),[]);i.useEffect(function(){return document.addEventListener("scroll",M),sessionStorage.removeItem(f),function(){if(r){var t={index:x.current,offset:y.current};sessionStorage.setItem(f,JSON.stringify(t))}document.removeEventListener("scroll",M)}},[]);var Q=function(){return o("div",{className:"mt-2"},void 0,D&&C,u?o(O,{}):n.createElement(n.Fragment,null,H?o(ne,{variant:"rounded",size:"lg"},void 0,I):I))},G=function(c,_){return b?o(d,{}):_},U=function(){p&&v&&m&&m()},X=function(){return p||!v||!m?null:o(oe,{visible:!u,onClick:m})},Y=function(c){x.current=Math.min(c.startIndex+1,c.endIndex),M()},Z=i.useMemo(function(){return h?0:g||(a&&j.action==="POP"?{align:"start",index:a.index,offset:a.offset}:0)},[h,g]);return n.createElement(ae,{ref:s,id:B,useWindowScroll:V,className:L,data:S,startReached:K,endReached:U,isScrolling:function(c){return c&&R&&R()},itemContent:G,initialTopMostItemIndex:Z,rangeChanged:Y,style:J,context:{listClassName:L,itemClassName:A},components:{Header:function(){return n.createElement(n.Fragment,null,C)},ScrollSeekPlaceholder:d,EmptyPlaceholder:function(){return Q()},List:de,Item:ie,Footer:X}})});export{ve as S}; diff --git a/packs/js/service-worker-info-8e511663.js b/packs/js/service-worker-info-8051c8bb.js similarity index 97% rename from packs/js/service-worker-info-8e511663.js rename to packs/js/service-worker-info-8051c8bb.js index 6eb6e59a1..83b4a3a0a 100644 --- a/packs/js/service-worker-info-8e511663.js +++ b/packs/js/service-worker-info-8051c8bb.js @@ -1 +1 @@ -import{a,W as h,u as M,a2 as R,af as b,ag as p,H as k,y as _,A as I,ch as L,bI as y,aa as W,F as o,X as x,o as z,r as g,at as S,aP as A,jl as N}from"../index-7380452a.js";var U=function(i){var t=i.state,s=t===void 0?"inactive":t,r=i.size,e=r===void 0?"sm":r;return a("div",{className:h("rounded-full outline-double",{"w-1.5 h-1.5 shadow-sm":e==="sm","bg-green-500 outline-green-400":s==="active","bg-yellow-500 outline-yellow-400":s==="pending","bg-red-500 outline-red-400":s==="error","bg-neutral-500 outline-neutral-400":s==="inactive"})})},f=z({heading:{id:"column.developers.service_worker",defaultMessage:"Service Worker"},status:{id:"sw.status",defaultMessage:"Status"},url:{id:"sw.url",defaultMessage:"Script URL"}}),$=function(){var i=g.useState(!0),t=S(i,2),s=t[0],r=t[1],e=g.useState(),n=S(e,2),d=n[0],c=n[1],v="serviceWorker"in navigator;return g.useEffect(function(){v?navigator.serviceWorker.getRegistration().then(function(u){c(u),r(!1)}).catch(function(){return r(!1)}):r(!1)},[]),{isLoading:s,registration:d}},H=function(){var i,t=M(),s=$(),r=s.isLoading,e=s.registration,n=e==null||(i=e.active)===null||i===void 0?void 0:i.scriptURL,d=function(){return e!=null&&e.waiting?"pending":e!=null&&e.active?"active":"inactive"},c=function(){return r?a(o,{id:"sw.state.loading",defaultMessage:"Loading…"}):!r&&!e?a(o,{id:"sw.state.unavailable",defaultMessage:"Unavailable"}):e!=null&&e.waiting?a(o,{id:"sw.state.waiting",defaultMessage:"Waiting"}):e!=null&&e.active?a(o,{id:"sw.state.active",defaultMessage:"Active"}):a(o,{id:"sw.state.unknown",defaultMessage:"Unknown"})},v=function(){var u=A(regeneratorRuntime.mark(function w(){return regeneratorRuntime.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,N();case 2:window.location.reload();case 3:case"end":return l.stop()}},w)}));return function(){return u.apply(this,arguments)}}();return a(x,{label:t.formatMessage(f.heading),backHref:"/developers"},void 0,a(R,{space:4},void 0,a(b,{},void 0,a(p,{label:t.formatMessage(f.status)},void 0,a(k,{alignItems:"center",space:2},void 0,a(U,{state:d()}),a(_,{size:"md",theme:"muted"},void 0,c()))),n&&a(p,{label:t.formatMessage(f.url)},void 0,a("a",{href:n,target:"_blank",className:"flex items-center space-x-1 truncate"},void 0,a("span",{className:"truncate"},void 0,n),a(I,{className:"h-4 w-4",src:L})))),a(y,{},void 0,a(W,{theme:"tertiary",type:"button",onClick:v},void 0,a(o,{id:"sw.restart",defaultMessage:"Restart"})))))};export{H as default}; +import{a,W as h,u as M,a2 as R,af as b,ag as p,H as k,y as _,A as I,ch as L,bI as y,aa as W,F as o,X as x,o as z,r as g,at as S,aP as A,jl as N}from"../index-be605fd2.js";var U=function(i){var t=i.state,s=t===void 0?"inactive":t,r=i.size,e=r===void 0?"sm":r;return a("div",{className:h("rounded-full outline-double",{"w-1.5 h-1.5 shadow-sm":e==="sm","bg-green-500 outline-green-400":s==="active","bg-yellow-500 outline-yellow-400":s==="pending","bg-red-500 outline-red-400":s==="error","bg-neutral-500 outline-neutral-400":s==="inactive"})})},f=z({heading:{id:"column.developers.service_worker",defaultMessage:"Service Worker"},status:{id:"sw.status",defaultMessage:"Status"},url:{id:"sw.url",defaultMessage:"Script URL"}}),$=function(){var i=g.useState(!0),t=S(i,2),s=t[0],r=t[1],e=g.useState(),n=S(e,2),d=n[0],c=n[1],v="serviceWorker"in navigator;return g.useEffect(function(){v?navigator.serviceWorker.getRegistration().then(function(u){c(u),r(!1)}).catch(function(){return r(!1)}):r(!1)},[]),{isLoading:s,registration:d}},H=function(){var i,t=M(),s=$(),r=s.isLoading,e=s.registration,n=e==null||(i=e.active)===null||i===void 0?void 0:i.scriptURL,d=function(){return e!=null&&e.waiting?"pending":e!=null&&e.active?"active":"inactive"},c=function(){return r?a(o,{id:"sw.state.loading",defaultMessage:"Loading…"}):!r&&!e?a(o,{id:"sw.state.unavailable",defaultMessage:"Unavailable"}):e!=null&&e.waiting?a(o,{id:"sw.state.waiting",defaultMessage:"Waiting"}):e!=null&&e.active?a(o,{id:"sw.state.active",defaultMessage:"Active"}):a(o,{id:"sw.state.unknown",defaultMessage:"Unknown"})},v=function(){var u=A(regeneratorRuntime.mark(function w(){return regeneratorRuntime.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,N();case 2:window.location.reload();case 3:case"end":return l.stop()}},w)}));return function(){return u.apply(this,arguments)}}();return a(x,{label:t.formatMessage(f.heading),backHref:"/developers"},void 0,a(R,{space:4},void 0,a(b,{},void 0,a(p,{label:t.formatMessage(f.status)},void 0,a(k,{alignItems:"center",space:2},void 0,a(U,{state:d()}),a(_,{size:"md",theme:"muted"},void 0,c()))),n&&a(p,{label:t.formatMessage(f.url)},void 0,a("a",{href:n,target:"_blank",className:"flex items-center space-x-1 truncate"},void 0,a("span",{className:"truncate"},void 0,n),a(I,{className:"h-4 w-4",src:L})))),a(y,{},void 0,a(W,{theme:"tertiary",type:"button",onClick:v},void 0,a(o,{id:"sw.restart",defaultMessage:"Restart"})))))};export{H as default}; diff --git a/packs/js/settings-store-ebcfb308.js b/packs/js/settings-store-be34f359.js similarity index 98% rename from packs/js/settings-store-ebcfb308.js rename to packs/js/settings-store-be34f359.js index b2ea3861a..8b64af881 100644 --- a/packs/js/settings-store-ebcfb308.js +++ b/packs/js/settings-store-be34f359.js @@ -1 +1 @@ -import{u as P,d as T,f as k,q as x,r as f,at as m,a as e,eL as L,cy as D,bE as I,bF as U,bZ as R,bI as V,aa as j,F as t,X as q,af as B,ag as i,fW as n,o as G,a6 as H,f4 as W,_ as X,jh as Z,ji as z,bp as K}from"../index-7380452a.js";var Q=function(r){try{return JSON.parse(r),!0}catch{return!1}},v=G({heading:{id:"column.settings_store",defaultMessage:"Settings store"},advanced:{id:"developers.settings_store.advanced",defaultMessage:"Advanced settings"},hint:{id:"developers.settings_store.hint",defaultMessage:"It is possible to directly edit your user settings here. BE CAREFUL! Editing this section can break your account, and you will only be able to recover through the API."}}),$=function(){var r=P(),l=T(),a=k(),c=x(function(g){return g.settings}),N=f.useState(JSON.stringify(c,null,2)),p=m(N,2),S=p[0],b=p[1],A=f.useState(!0),_=m(A,2),M=_[0],y=_[1],J=f.useState(!1),w=m(J,2),C=w[0],h=w[1],F=function(u){var o=u.target,d=o.value;b(d),y(Q(d))},s=function(u,o){l(H(u,o,{showAlert:!0}))},O=function(u){var o=JSON.parse(S);h(!0),l(W({pleroma_settings_store:X({},Z,o)})).then(function(d){l({type:z,settings:o}),h(!1)}).catch(function(d){K.showAlertForError(d),h(!1)})};return f.useEffect(function(){b(JSON.stringify(c,null,2)),y(!0)},[c]),e(q,{label:r.formatMessage(v.heading),backHref:"/developers"},void 0,e(I,{onSubmit:O},void 0,e(U,{hintText:r.formatMessage(v.hint),errors:M?[]:["is invalid"]},void 0,e(R,{value:S,onChange:F,disabled:C,rows:12,isCodeEditor:!0})),e(V,{},void 0,e(j,{theme:"primary",type:"submit",disabled:!M||C},void 0,e(t,{id:"soapbox_config.save",defaultMessage:"Save"})))),e(L,{},void 0,e(D,{title:r.formatMessage(v.advanced)})),e(B,{},void 0,e(i,{label:e(t,{id:"preferences.fields.demo_label",defaultMessage:"Demo mode"}),hint:e(t,{id:"preferences.fields.demo_hint",defaultMessage:"Use the default Soapbox logo and color scheme. Useful for taking screenshots."})},void 0,e(n,{settings:a,settingPath:["demo"],onChange:s})),e(i,{label:e(t,{id:"preferences.notifications.advanced",defaultMessage:"Show all notification categories"})},void 0,e(n,{settings:a,settingPath:["notifications","quickFilter","advanced"],onChange:s})),e(i,{label:e(t,{id:"preferences.fields.unfollow_modal_label",defaultMessage:"Show confirmation dialog before unfollowing someone"})},void 0,e(n,{settings:a,settingPath:["unfollowModal"],onChange:s})),e(i,{label:e(t,{id:"preferences.fields.missing_description_modal_label",defaultMessage:"Show confirmation dialog before sending a post without media descriptions"})},void 0,e(n,{settings:a,settingPath:["missingDescriptionModal"],onChange:s})),e(i,{label:e(t,{id:"preferences.fields.reduce_motion_label",defaultMessage:"Reduce motion in animations"})},void 0,e(n,{settings:a,settingPath:["reduceMotion"],onChange:s})),e(i,{label:e(t,{id:"preferences.fields.underline_links_label",defaultMessage:"Always underline links in posts"})},void 0,e(n,{settings:a,settingPath:["underlineLinks"],onChange:s})),e(i,{label:e(t,{id:"preferences.fields.system_font_label",defaultMessage:"Use system's default font"})},void 0,e(n,{settings:a,settingPath:["systemFont"],onChange:s})),e(i,{label:e(t,{id:"preferences.fields.demetricator_label",defaultMessage:"Use Demetricator"}),hint:e(t,{id:"preferences.hints.demetricator",defaultMessage:"Decrease social media anxiety by hiding all numbers from the site."})},void 0,e(n,{settings:a,settingPath:["demetricator"],onChange:s}))))};export{$ as default}; +import{u as P,d as T,f as k,q as x,r as f,at as m,a as e,eL as L,cy as D,bE as I,bF as U,bZ as R,bI as V,aa as j,F as t,X as q,af as B,ag as i,fW as n,o as G,a6 as H,f4 as W,_ as X,jh as Z,ji as z,bp as K}from"../index-be605fd2.js";var Q=function(r){try{return JSON.parse(r),!0}catch{return!1}},v=G({heading:{id:"column.settings_store",defaultMessage:"Settings store"},advanced:{id:"developers.settings_store.advanced",defaultMessage:"Advanced settings"},hint:{id:"developers.settings_store.hint",defaultMessage:"It is possible to directly edit your user settings here. BE CAREFUL! Editing this section can break your account, and you will only be able to recover through the API."}}),$=function(){var r=P(),l=T(),a=k(),c=x(function(g){return g.settings}),N=f.useState(JSON.stringify(c,null,2)),p=m(N,2),S=p[0],b=p[1],A=f.useState(!0),_=m(A,2),M=_[0],y=_[1],J=f.useState(!1),w=m(J,2),C=w[0],h=w[1],F=function(u){var o=u.target,d=o.value;b(d),y(Q(d))},s=function(u,o){l(H(u,o,{showAlert:!0}))},O=function(u){var o=JSON.parse(S);h(!0),l(W({pleroma_settings_store:X({},Z,o)})).then(function(d){l({type:z,settings:o}),h(!1)}).catch(function(d){K.showAlertForError(d),h(!1)})};return f.useEffect(function(){b(JSON.stringify(c,null,2)),y(!0)},[c]),e(q,{label:r.formatMessage(v.heading),backHref:"/developers"},void 0,e(I,{onSubmit:O},void 0,e(U,{hintText:r.formatMessage(v.hint),errors:M?[]:["is invalid"]},void 0,e(R,{value:S,onChange:F,disabled:C,rows:12,isCodeEditor:!0})),e(V,{},void 0,e(j,{theme:"primary",type:"submit",disabled:!M||C},void 0,e(t,{id:"soapbox_config.save",defaultMessage:"Save"})))),e(L,{},void 0,e(D,{title:r.formatMessage(v.advanced)})),e(B,{},void 0,e(i,{label:e(t,{id:"preferences.fields.demo_label",defaultMessage:"Demo mode"}),hint:e(t,{id:"preferences.fields.demo_hint",defaultMessage:"Use the default Soapbox logo and color scheme. Useful for taking screenshots."})},void 0,e(n,{settings:a,settingPath:["demo"],onChange:s})),e(i,{label:e(t,{id:"preferences.notifications.advanced",defaultMessage:"Show all notification categories"})},void 0,e(n,{settings:a,settingPath:["notifications","quickFilter","advanced"],onChange:s})),e(i,{label:e(t,{id:"preferences.fields.unfollow_modal_label",defaultMessage:"Show confirmation dialog before unfollowing someone"})},void 0,e(n,{settings:a,settingPath:["unfollowModal"],onChange:s})),e(i,{label:e(t,{id:"preferences.fields.missing_description_modal_label",defaultMessage:"Show confirmation dialog before sending a post without media descriptions"})},void 0,e(n,{settings:a,settingPath:["missingDescriptionModal"],onChange:s})),e(i,{label:e(t,{id:"preferences.fields.reduce_motion_label",defaultMessage:"Reduce motion in animations"})},void 0,e(n,{settings:a,settingPath:["reduceMotion"],onChange:s})),e(i,{label:e(t,{id:"preferences.fields.underline_links_label",defaultMessage:"Always underline links in posts"})},void 0,e(n,{settings:a,settingPath:["underlineLinks"],onChange:s})),e(i,{label:e(t,{id:"preferences.fields.system_font_label",defaultMessage:"Use system's default font"})},void 0,e(n,{settings:a,settingPath:["systemFont"],onChange:s})),e(i,{label:e(t,{id:"preferences.fields.demetricator_label",defaultMessage:"Use Demetricator"}),hint:e(t,{id:"preferences.hints.demetricator",defaultMessage:"Decrease social media anxiety by hiding all numbers from the site."})},void 0,e(n,{settings:a,settingPath:["demetricator"],onChange:s}))))};export{$ as default}; diff --git a/packs/js/sidebar-menu-598bffb6.js b/packs/js/sidebar-menu-9774afae.js similarity index 98% rename from packs/js/sidebar-menu-598bffb6.js rename to packs/js/sidebar-menu-9774afae.js index 55bf581d6..e8e2cef9a 100644 --- a/packs/js/sidebar-menu-598bffb6.js +++ b/packs/js/sidebar-menu-9774afae.js @@ -1 +1 @@ -import{u as W,d as $,r as Q,hQ as U,g as V,q as g,b3 as X,N as Y,hR as j,R as u,at as J,hS as K,a as e,W as p,aG as Z,a5 as ee,a2 as x,L as ae,b2 as P,er as f,hT as te,n as se,hU as oe,da as ie,aF as re,K as ne,hV as le,hW as ce,hX as ue,F as b,hY as de,fT as q,hZ as ge,fX as A,fU as fe,H as N,y as w,A as M,cQ as ve,hJ as S,bW as me,o as ke,h_ as be,eY as _e,h$ as he}from"../index-7380452a.js";import{v as pe}from"./hash-746ab8b6.js";import{P as xe}from"./profile-stats-adc53a08.js";const we="/packs/assets/filter-ea3a7ceb.svg";var o=ke({followers:{id:"account.followers",defaultMessage:"Followers"},follows:{id:"account.follows",defaultMessage:"Follows"},profile:{id:"account.profile",defaultMessage:"Profile"},preferences:{id:"navigation_bar.preferences",defaultMessage:"Preferences"},blocks:{id:"navigation_bar.blocks",defaultMessage:"Blocked users"},domainBlocks:{id:"navigation_bar.domain_blocks",defaultMessage:"Hidden domains"},mutes:{id:"navigation_bar.mutes",defaultMessage:"Muted users"},filters:{id:"navigation_bar.filters",defaultMessage:"Muted words"},followedTags:{id:"navigation_bar.followed_tags",defaultMessage:"Followed hashtags"},soapboxConfig:{id:"navigation_bar.soapbox_config",defaultMessage:"Soapbox config"},accountMigration:{id:"navigation_bar.account_migration",defaultMessage:"Move account"},accountAliases:{id:"navigation_bar.account_aliases",defaultMessage:"Account aliases"},logout:{id:"navigation_bar.logout",defaultMessage:"Logout"},bookmarks:{id:"column.bookmarks",defaultMessage:"Bookmarks"},lists:{id:"column.lists",defaultMessage:"Lists"},groups:{id:"column.groups",defaultMessage:"Groups"},events:{id:"column.events",defaultMessage:"Events"},invites:{id:"navigation_bar.invites",defaultMessage:"Invites"},developers:{id:"navigation.developers",defaultMessage:"Developers"},addAccount:{id:"profile_dropdown.add_account",defaultMessage:"Add an existing account"},followRequests:{id:"navigation_bar.follow_requests",defaultMessage:"Follow requests"},close:{id:"lightbox.close",defaultMessage:"Close"}}),i=function(a){var c=a.href,v=a.to,r=a.icon,_=a.text,m=a.onClick,n=e(N,{space:2,alignItems:"center"},void 0,e("div",{className:"relative inline-flex rounded-full bg-primary-50 p-2 dark:bg-gray-800"},void 0,e(M,{src:r,className:"h-5 w-5 text-primary-500"})),e(w,{tag:"span",weight:"medium",theme:"inherit"},void 0,_));return v?e(S,{className:"group rounded-full text-gray-900 hover:bg-gray-50 dark:text-gray-100 dark:hover:bg-gray-800",to:v,onClick:m},void 0,n):e("a",{className:"group rounded-full text-gray-900 hover:bg-gray-50 dark:text-gray-100 dark:hover:bg-gray-800",href:c,target:"_blank",onClick:m},void 0,n)},Re=function(){var a=W(),c=$(),v=Q.useCallback(U(),[]),r=V(),_=g(function(s){return s.me}),m=X(_||void 0),n=m.account,F=g(function(s){return v(s)}),k=g(function(s){return s.sidebar.sidebarOpen}),T=g(function(s){return Y(s)}),O=g(function(s){return s.user_lists.follow_requests.items.count()}),D=j(),H=u.useRef(null),B=u.useState(!1),C=J(B,2),y=C[0],R=C[1],t=function(){return c(be())},d=function(){R(!1),t()},E=function(l){return function(h){h.preventDefault(),c(he(l.id))}},I=function(l){l.preventDefault(),c(_e())},G=function(l){l.preventDefault(),R(function(h){return!h})},z=function(l){return e("a",{href:"#",className:"block py-2",onClick:E(l)},l.id,e("div",{className:"pointer-events-none"},void 0,e(P,{account:l,showProfileHoverCard:!1,withRelationship:!1,withLinkToProfile:!1})))};return u.useEffect(function(){c(K())},[]),n?e("div",{"aria-expanded":k,className:p({"z-[1000]":k,hidden:!k})},void 0,e("div",{className:"fixed inset-0 bg-gray-500/90 dark:bg-gray-700/90",role:"button",onClick:d}),e("div",{className:"fixed inset-0 z-[1000] flex"},void 0,e("div",{className:p({"flex flex-col flex-1 bg-white dark:bg-primary-900 -translate-x-full rtl:translate-x-full w-full max-w-xs":!0,"!translate-x-0":k})},void 0,u.createElement(Z,{title:a.formatMessage(o.close),onClick:d,src:ee,ref:H,iconClassName:"h-6 w-6",className:"absolute right-0 top-0 -mr-11 mt-2 text-gray-600 hover:text-gray-600 dark:text-gray-400 dark:hover:text-gray-300"}),e("div",{className:"relative h-full w-full overflow-auto overflow-y-scroll"},void 0,e("div",{className:"p-4"},void 0,e(x,{space:4},void 0,e(ae,{to:"/@".concat(n.acct),onClick:t},void 0,e(P,{account:n,showProfileHoverCard:!1,withLinkToProfile:!1})),e(xe,{account:n,onClickHandler:d}),e(x,{space:4},void 0,e(f,{}),e(i,{to:"/@".concat(n.acct),icon:te,text:a.formatMessage(o.profile),onClick:t}),(n.locked||O>0)&&e(i,{to:"/follow_requests",icon:se,text:a.formatMessage(o.followRequests),onClick:t}),r.bookmarks&&e(i,{to:"/bookmarks",icon:oe,text:a.formatMessage(o.bookmarks),onClick:t}),r.groups&&e(i,{to:D,icon:ie,text:a.formatMessage(o.groups),onClick:t}),r.lists&&e(i,{to:"/lists",icon:re,text:a.formatMessage(o.lists),onClick:t}),r.events&&e(i,{to:"/events",icon:ne,text:a.formatMessage(o.events),onClick:t}),T.get("isDeveloper")&&e(i,{to:"/developers",icon:le,text:a.formatMessage(o.developers),onClick:t}),r.publicTimeline&&u.createElement(u.Fragment,null,e(f,{}),e(i,{to:"/timeline/local",icon:r.federating?ce:ue,text:r.federating?e(b,{id:"tabs_bar.local",defaultMessage:"Local"}):e(b,{id:"tabs_bar.all",defaultMessage:"All"}),onClick:t}),r.federating&&e(i,{to:"/timeline/fediverse",icon:de,text:e(b,{id:"tabs_bar.fediverse",defaultMessage:"Fediverse"}),onClick:t})),e(f,{}),e(i,{to:"/blocks",icon:q,text:a.formatMessage(o.blocks),onClick:t}),e(i,{to:"/mutes",icon:ge,text:a.formatMessage(o.mutes),onClick:t}),e(i,{to:"/settings/preferences",icon:A,text:a.formatMessage(o.preferences),onClick:t}),r.federating&&e(i,{to:"/domain_blocks",icon:q,text:a.formatMessage(o.domainBlocks),onClick:t}),(r.filters||r.filtersV2)&&e(i,{to:"/filters",icon:we,text:a.formatMessage(o.filters),onClick:t}),r.followedHashtagsList&&e(i,{to:"/followed_tags",icon:pe,text:a.formatMessage(o.followedTags),onClick:t}),n.admin&&e(i,{to:"/ghostbox/admin/config",icon:A,text:a.formatMessage(o.soapboxConfig),onClick:t}),e(f,{}),e(i,{to:"/logout",icon:fe,text:a.formatMessage(o.logout),onClick:I}),e(f,{}),e(x,{space:4},void 0,e("button",{type:"button",onClick:G,className:"py-1"},void 0,e(N,{alignItems:"center",justifyContent:"between"},void 0,e(w,{tag:"span"},void 0,e(b,{id:"profile_dropdown.switch_account",defaultMessage:"Switch accounts"})),e(M,{src:ve,className:p("h-4 w-4 text-gray-900 transition-transform dark:text-gray-100",{"rotate-180":y})}))),y&&e("div",{className:"border-t-2 border-solid border-gray-100 dark:border-gray-800"},void 0,F.map(function(s){return z(s)}),e(S,{className:"flex items-center space-x-1 py-2",to:"/login/add",onClick:d},void 0,e(M,{className:"h-4 w-4 text-primary-500",src:me}),e(w,{size:"sm",weight:"medium"},void 0,a.formatMessage(o.addAccount)))))))))),e("div",{"aria-hidden":!0,className:"w-14 shrink-0",onClick:d}))):null};export{Re as default}; +import{u as W,d as $,r as Q,hQ as U,g as V,q as g,b3 as X,N as Y,hR as j,R as u,at as J,hS as K,a as e,W as p,aG as Z,a5 as ee,a2 as x,L as ae,b2 as P,er as f,hT as te,n as se,hU as oe,da as ie,aF as re,K as ne,hV as le,hW as ce,hX as ue,F as b,hY as de,fT as q,hZ as ge,fX as A,fU as fe,H as N,y as w,A as M,cQ as ve,hJ as S,bW as me,o as ke,h_ as be,eY as _e,h$ as he}from"../index-be605fd2.js";import{v as pe}from"./hash-746ab8b6.js";import{P as xe}from"./profile-stats-6fec8ab1.js";const we="/packs/assets/filter-ea3a7ceb.svg";var o=ke({followers:{id:"account.followers",defaultMessage:"Followers"},follows:{id:"account.follows",defaultMessage:"Follows"},profile:{id:"account.profile",defaultMessage:"Profile"},preferences:{id:"navigation_bar.preferences",defaultMessage:"Preferences"},blocks:{id:"navigation_bar.blocks",defaultMessage:"Blocked users"},domainBlocks:{id:"navigation_bar.domain_blocks",defaultMessage:"Hidden domains"},mutes:{id:"navigation_bar.mutes",defaultMessage:"Muted users"},filters:{id:"navigation_bar.filters",defaultMessage:"Muted words"},followedTags:{id:"navigation_bar.followed_tags",defaultMessage:"Followed hashtags"},soapboxConfig:{id:"navigation_bar.soapbox_config",defaultMessage:"Soapbox config"},accountMigration:{id:"navigation_bar.account_migration",defaultMessage:"Move account"},accountAliases:{id:"navigation_bar.account_aliases",defaultMessage:"Account aliases"},logout:{id:"navigation_bar.logout",defaultMessage:"Logout"},bookmarks:{id:"column.bookmarks",defaultMessage:"Bookmarks"},lists:{id:"column.lists",defaultMessage:"Lists"},groups:{id:"column.groups",defaultMessage:"Groups"},events:{id:"column.events",defaultMessage:"Events"},invites:{id:"navigation_bar.invites",defaultMessage:"Invites"},developers:{id:"navigation.developers",defaultMessage:"Developers"},addAccount:{id:"profile_dropdown.add_account",defaultMessage:"Add an existing account"},followRequests:{id:"navigation_bar.follow_requests",defaultMessage:"Follow requests"},close:{id:"lightbox.close",defaultMessage:"Close"}}),i=function(a){var c=a.href,v=a.to,r=a.icon,_=a.text,m=a.onClick,n=e(N,{space:2,alignItems:"center"},void 0,e("div",{className:"relative inline-flex rounded-full bg-primary-50 p-2 dark:bg-gray-800"},void 0,e(M,{src:r,className:"h-5 w-5 text-primary-500"})),e(w,{tag:"span",weight:"medium",theme:"inherit"},void 0,_));return v?e(S,{className:"group rounded-full text-gray-900 hover:bg-gray-50 dark:text-gray-100 dark:hover:bg-gray-800",to:v,onClick:m},void 0,n):e("a",{className:"group rounded-full text-gray-900 hover:bg-gray-50 dark:text-gray-100 dark:hover:bg-gray-800",href:c,target:"_blank",onClick:m},void 0,n)},Re=function(){var a=W(),c=$(),v=Q.useCallback(U(),[]),r=V(),_=g(function(s){return s.me}),m=X(_||void 0),n=m.account,F=g(function(s){return v(s)}),k=g(function(s){return s.sidebar.sidebarOpen}),T=g(function(s){return Y(s)}),O=g(function(s){return s.user_lists.follow_requests.items.count()}),D=j(),H=u.useRef(null),B=u.useState(!1),C=J(B,2),y=C[0],R=C[1],t=function(){return c(be())},d=function(){R(!1),t()},E=function(l){return function(h){h.preventDefault(),c(he(l.id))}},I=function(l){l.preventDefault(),c(_e())},G=function(l){l.preventDefault(),R(function(h){return!h})},z=function(l){return e("a",{href:"#",className:"block py-2",onClick:E(l)},l.id,e("div",{className:"pointer-events-none"},void 0,e(P,{account:l,showProfileHoverCard:!1,withRelationship:!1,withLinkToProfile:!1})))};return u.useEffect(function(){c(K())},[]),n?e("div",{"aria-expanded":k,className:p({"z-[1000]":k,hidden:!k})},void 0,e("div",{className:"fixed inset-0 bg-gray-500/90 dark:bg-gray-700/90",role:"button",onClick:d}),e("div",{className:"fixed inset-0 z-[1000] flex"},void 0,e("div",{className:p({"flex flex-col flex-1 bg-white dark:bg-primary-900 -translate-x-full rtl:translate-x-full w-full max-w-xs":!0,"!translate-x-0":k})},void 0,u.createElement(Z,{title:a.formatMessage(o.close),onClick:d,src:ee,ref:H,iconClassName:"h-6 w-6",className:"absolute right-0 top-0 -mr-11 mt-2 text-gray-600 hover:text-gray-600 dark:text-gray-400 dark:hover:text-gray-300"}),e("div",{className:"relative h-full w-full overflow-auto overflow-y-scroll"},void 0,e("div",{className:"p-4"},void 0,e(x,{space:4},void 0,e(ae,{to:"/@".concat(n.acct),onClick:t},void 0,e(P,{account:n,showProfileHoverCard:!1,withLinkToProfile:!1})),e(xe,{account:n,onClickHandler:d}),e(x,{space:4},void 0,e(f,{}),e(i,{to:"/@".concat(n.acct),icon:te,text:a.formatMessage(o.profile),onClick:t}),(n.locked||O>0)&&e(i,{to:"/follow_requests",icon:se,text:a.formatMessage(o.followRequests),onClick:t}),r.bookmarks&&e(i,{to:"/bookmarks",icon:oe,text:a.formatMessage(o.bookmarks),onClick:t}),r.groups&&e(i,{to:D,icon:ie,text:a.formatMessage(o.groups),onClick:t}),r.lists&&e(i,{to:"/lists",icon:re,text:a.formatMessage(o.lists),onClick:t}),r.events&&e(i,{to:"/events",icon:ne,text:a.formatMessage(o.events),onClick:t}),T.get("isDeveloper")&&e(i,{to:"/developers",icon:le,text:a.formatMessage(o.developers),onClick:t}),r.publicTimeline&&u.createElement(u.Fragment,null,e(f,{}),e(i,{to:"/timeline/local",icon:r.federating?ce:ue,text:r.federating?e(b,{id:"tabs_bar.local",defaultMessage:"Local"}):e(b,{id:"tabs_bar.all",defaultMessage:"All"}),onClick:t}),r.federating&&e(i,{to:"/timeline/fediverse",icon:de,text:e(b,{id:"tabs_bar.fediverse",defaultMessage:"Fediverse"}),onClick:t})),e(f,{}),e(i,{to:"/blocks",icon:q,text:a.formatMessage(o.blocks),onClick:t}),e(i,{to:"/mutes",icon:ge,text:a.formatMessage(o.mutes),onClick:t}),e(i,{to:"/settings/preferences",icon:A,text:a.formatMessage(o.preferences),onClick:t}),r.federating&&e(i,{to:"/domain_blocks",icon:q,text:a.formatMessage(o.domainBlocks),onClick:t}),(r.filters||r.filtersV2)&&e(i,{to:"/filters",icon:we,text:a.formatMessage(o.filters),onClick:t}),r.followedHashtagsList&&e(i,{to:"/followed_tags",icon:pe,text:a.formatMessage(o.followedTags),onClick:t}),n.admin&&e(i,{to:"/ghostbox/admin/config",icon:A,text:a.formatMessage(o.soapboxConfig),onClick:t}),e(f,{}),e(i,{to:"/logout",icon:fe,text:a.formatMessage(o.logout),onClick:I}),e(f,{}),e(x,{space:4},void 0,e("button",{type:"button",onClick:G,className:"py-1"},void 0,e(N,{alignItems:"center",justifyContent:"between"},void 0,e(w,{tag:"span"},void 0,e(b,{id:"profile_dropdown.switch_account",defaultMessage:"Switch accounts"})),e(M,{src:ve,className:p("h-4 w-4 text-gray-900 transition-transform dark:text-gray-100",{"rotate-180":y})}))),y&&e("div",{className:"border-t-2 border-solid border-gray-100 dark:border-gray-800"},void 0,F.map(function(s){return z(s)}),e(S,{className:"flex items-center space-x-1 py-2",to:"/login/add",onClick:d},void 0,e(M,{className:"h-4 w-4 text-primary-500",src:me}),e(w,{size:"sm",weight:"medium"},void 0,a.formatMessage(o.addAccount)))))))))),e("div",{"aria-hidden":!0,className:"w-14 shrink-0",onClick:d}))):null};export{Re as default}; diff --git a/packs/js/sign-up-panel-7566c684.js b/packs/js/sign-up-panel-96b7bc81.js similarity index 89% rename from packs/js/sign-up-panel-7566c684.js rename to packs/js/sign-up-panel-96b7bc81.js index b193f65f3..f8338d10f 100644 --- a/packs/js/sign-up-panel-7566c684.js +++ b/packs/js/sign-up-panel-96b7bc81.js @@ -1 +1 @@ -import{t as o,ek as p,q as d,a as e,a2 as a,y as s,F as t,aa as g}from"../index-7380452a.js";var v=function(){var i=o(),n=p(),u=n.isOpen,r=d(function(l){return l.me});return r||!u?null:e(a,{space:2,"data-testid":"sign-up-panel"},void 0,e(a,{},void 0,e(s,{size:"lg",weight:"bold"},void 0,e(t,{id:"signup_panel.title",defaultMessage:"New to {site_title}?",values:{site_title:i.title}})),e(s,{theme:"muted",size:"sm"},void 0,e(t,{id:"signup_panel.subtitle",defaultMessage:"Sign up now to discuss."}))),e(g,{theme:"primary",block:!0,to:"/signup"},void 0,e(t,{id:"account.register",defaultMessage:"Sign up"})))};export{v as default}; +import{t as o,ek as p,q as d,a as e,a2 as a,y as s,F as t,aa as g}from"../index-be605fd2.js";var v=function(){var i=o(),n=p(),u=n.isOpen,r=d(function(l){return l.me});return r||!u?null:e(a,{space:2,"data-testid":"sign-up-panel"},void 0,e(a,{},void 0,e(s,{size:"lg",weight:"bold"},void 0,e(t,{id:"signup_panel.title",defaultMessage:"New to {site_title}?",values:{site_title:i.title}})),e(s,{theme:"muted",size:"sm"},void 0,e(t,{id:"signup_panel.subtitle",defaultMessage:"Sign up now to discuss."}))),e(g,{theme:"primary",block:!0,to:"/signup"},void 0,e(t,{id:"account.register",defaultMessage:"Sign up"})))};export{v as default}; diff --git a/packs/js/soapbox-config-e8b7bfd1.js b/packs/js/soapbox-config-03c81c59.js similarity index 50% rename from packs/js/soapbox-config-e8b7bfd1.js rename to packs/js/soapbox-config-03c81c59.js index a586c740e..b0c0af6e9 100644 --- a/packs/js/soapbox-config-e8b7bfd1.js +++ b/packs/js/soapbox-config-03c81c59.js @@ -1 +1 @@ -import{bM as a}from"../index-7380452a.js";const r={getAds:async o=>{const t=o();return a(t).ads.toArray()}};export{r as default}; +import{bM as a}from"../index-be605fd2.js";const r={getAds:async o=>{const t=o();return a(t).ads.toArray()}};export{r as default}; diff --git a/packs/js/status-container-59e57baf.js b/packs/js/status-container-e53698d2.js similarity index 78% rename from packs/js/status-container-59e57baf.js rename to packs/js/status-container-e53698d2.js index 8ec561276..10b2d2fda 100644 --- a/packs/js/status-container-59e57baf.js +++ b/packs/js/status-container-e53698d2.js @@ -1 +1 @@ -import{as as o,r as c,aL as i,q as l,R as S,S as x,av as d}from"../index-7380452a.js";var v=["id","contextType"],m=function(t){var a=t.id,r=t.contextType,s=o(t,v),n=c.useCallback(i(),[]),e=l(function(u){return n(u,{id:a,contextType:r})});return e?S.createElement(x,d({status:e},s)):null};export{m as S}; +import{as as o,r as c,aL as i,q as l,R as S,S as x,av as d}from"../index-be605fd2.js";var v=["id","contextType"],m=function(t){var a=t.id,r=t.contextType,s=o(t,v),n=c.useCallback(i(),[]),e=l(function(u){return n(u,{id:a,contextType:r})});return e?S.createElement(x,d({status:e},s)):null};export{m as S}; diff --git a/packs/js/status-hover-card-612ae817.js b/packs/js/status-hover-card-f61749bb.js similarity index 90% rename from packs/js/status-hover-card-612ae817.js rename to packs/js/status-hover-card-f61749bb.js index 8f745e392..4a5e422e8 100644 --- a/packs/js/status-hover-card-612ae817.js +++ b/packs/js/status-hover-card-f61749bb.js @@ -1 +1 @@ -import{d as x,a7 as M,r,at as R,q as u,et as A,iL as w,iM as p,iN as L,R as N,av as P,W as $,a as n,a_ as g,a$ as k}from"../index-7380452a.js";import{u as B}from"./usePopper-24b8ee92.js";import{S as q}from"./status-container-59e57baf.js";var W=function(d){var o=d.visible,i=o===void 0?!0:o,s=x(),f=M(),_=r.useState(null),c=R(_,2),m=c[0],S=c[1],t=u(function(e){return e.status_hover_card.statusId||void 0}),l=u(function(e){return e.statuses.get(t)}),h=u(function(e){var a;return(a=e.status_hover_card.ref)===null||a===void 0?void 0:a.current});r.useEffect(function(){t&&!l&&s(A(t))},[t,l]),r.useEffect(function(){var e=f.listen(function(){w.cancel(),s(p())});return function(){e()}},[]);var v=B(h,m,{placement:"top"}),y=v.styles,C=v.attributes,b=r.useCallback(function(){return function(){s(L())}},[]),E=r.useCallback(function(){return function(){s(p(!0))}},[]);if(!t)return null;var H=function(a){return n(q,{id:a,hoverable:!1,hideActionBar:!0,muted:!0},a)};return N.createElement("div",P({className:$({"absolute transition-opacity w-[500px] z-50 top-0 left-0":!0,"opacity-100":i,"opacity-0 pointer-events-none":!i}),ref:S,style:y.popper},C.popper,{onMouseEnter:b(),onMouseLeave:E()}),n(k,{className:"relative"},void 0,n(g,{},void 0,H(t))))};export{W as StatusHoverCard,W as default}; +import{d as x,a7 as M,r,at as R,q as u,et as A,iL as w,iM as p,iN as L,R as N,av as P,W as $,a as n,a_ as g,a$ as k}from"../index-be605fd2.js";import{u as B}from"./usePopper-4a92d7ef.js";import{S as q}from"./status-container-e53698d2.js";var W=function(d){var o=d.visible,i=o===void 0?!0:o,s=x(),f=M(),_=r.useState(null),c=R(_,2),m=c[0],S=c[1],t=u(function(e){return e.status_hover_card.statusId||void 0}),l=u(function(e){return e.statuses.get(t)}),h=u(function(e){var a;return(a=e.status_hover_card.ref)===null||a===void 0?void 0:a.current});r.useEffect(function(){t&&!l&&s(A(t))},[t,l]),r.useEffect(function(){var e=f.listen(function(){w.cancel(),s(p())});return function(){e()}},[]);var v=B(h,m,{placement:"top"}),y=v.styles,C=v.attributes,b=r.useCallback(function(){return function(){s(L())}},[]),E=r.useCallback(function(){return function(){s(p(!0))}},[]);if(!t)return null;var H=function(a){return n(q,{id:a,hoverable:!1,hideActionBar:!0,muted:!0},a)};return N.createElement("div",P({className:$({"absolute transition-opacity w-[500px] z-50 top-0 left-0":!0,"opacity-100":i,"opacity-0 pointer-events-none":!i}),ref:S,style:y.popper},C.popper,{onMouseEnter:b(),onMouseLeave:E()}),n(k,{className:"relative"},void 0,n(g,{},void 0,H(t))))};export{W as StatusHoverCard,W as default}; diff --git a/packs/js/status-list-13fdd81b.js b/packs/js/status-list-c10445e1.js similarity index 96% rename from packs/js/status-list-13fdd81b.js rename to packs/js/status-list-c10445e1.js index 32297b42b..520ac8e41 100644 --- a/packs/js/status-list-13fdd81b.js +++ b/packs/js/status-list-c10445e1.js @@ -1 +1 @@ -import{u as de,a as l,I as be,cq as Se,o as le,bM as Ie,cr as te,d as Ce,cs as fe,ct as Ae,cu as Me,cv as _e,t as je,r as T,at as ke,aP as ze,cw as Le,R as ve,a$ as V,a2 as N,y as F,F as U,H as B,c7 as Oe,A as Pe,aG as Ee,c6 as De,cx as Te,q as ne,a_ as Ne,cy as Re,L as pe,b3 as $e,cz as qe,cA as Ge,cB as q,cC as Xe,cD as Fe,as as Be,aU as Ue,cE as Ve,cF as We,Q as He,av as Qe,aO as Ke,W as re,_ as Ye}from"../index-7380452a.js";import{S as Je}from"./scrollable-list-df58e451.js";import{S as ae}from"./status-container-59e57baf.js";import{P as Ze}from"./pending-status-7f660229.js";var et=le({load_more:{id:"status.load_more",defaultMessage:"Load more"}}),tt=function(d){var a=d.disabled,u=d.maxId,c=d.onClick,g=de(),p=function(){return c(u)};return l("button",{className:"load-more load-gap",disabled:a,onClick:p,"aria-label":g.formatMessage(et.load_more)},void 0,l(be,{src:Se}))};const nt="/packs/assets/timeline-72a32d57.svg",oe={soapbox:async()=>(await te(()=>import("./soapbox-config-e8b7bfd1.js"),["packs/js/soapbox-config-e8b7bfd1.js","packs/index-7380452a.js","packs/assets/index-09eb95bf.css"])).default,truth:async()=>(await te(()=>import("./truth-6b332fbc.js"),["packs/js/truth-6b332fbc.js","packs/index-7380452a.js","packs/assets/index-09eb95bf.css"])).default},rt=async v=>{const d=v(),a=Ie(d),u=a.extensions.getIn(["ads","enabled"],!1)===!0,c=a.extensions.getIn(["ads","provider"],"soapbox");if(u&&oe[c])return oe[c]()},at=5*60*1e3,ot=(v,d=at)=>v.expires_at?new Date().getTime()>new Date(v.expires_at).getTime()-d:!1,ge={ads:["ads"]};function it(){const v=Ce(),d=async()=>v(async(c,g)=>{const p=await rt(g);return p?p.getAds(g):[]}),a=fe(ge.ads,d,{placeholderData:[]}),u=Ae(Me).parse(a.data).filter(c=>!ot(c));return{...a,data:u}}var st=function(d){var a=d.ad,u=_e(),c=je(),g=T.useRef(void 0),p=T.useRef(null),i=T.useState(!1),e=ke(i,2),n=e[0],o=e[1];fe(["ads","impression",a.impression],ze(regeneratorRuntime.mark(function f(){return regeneratorRuntime.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:if(!a.impression){I.next=4;break}return I.next=3,Le.get(a.impression);case 3:return I.abrupt("return",I.sent);case 4:case"end":return I.stop()}},f)})),{cacheTime:1/0,staleTime:1/0});var t=function(){u.invalidateQueries(ge.ads)},r=function(){o(!n)},s=function(S){S.target&&p.current&&!p.current.contains(S.target)&&o(!1)};return T.useEffect(function(){return document.addEventListener("mousedown",s),function(){document.removeEventListener("mousedown",s)}},[p]),T.useEffect(function(){if(a.expires_at){var f=new Date(a.expires_at).getTime()-new Date().getTime();g.current=setTimeout(t,f)}return function(){g.current&&clearTimeout(g.current)}},[a.expires_at]),l("div",{className:"relative"},void 0,l(V,{className:"py-4",variant:"rounded"},void 0,l(N,{space:4},void 0,l(B,{alignItems:"center",space:3},void 0,l(Oe,{src:c.thumbnail,size:42}),l(N,{grow:!0},void 0,l(B,{space:1},void 0,l(F,{size:"sm",weight:"semibold",truncate:!0},void 0,c.title),l(Pe,{className:"h-4 w-4 stroke-accent-500",src:nt})),l(N,{},void 0,l(B,{alignItems:"center",space:1},void 0,l(F,{theme:"muted",size:"sm",truncate:!0},void 0,l(U,{id:"sponsored.subtitle",defaultMessage:"Sponsored post"}))))),l(N,{justifyContent:"center"},void 0,l(Ee,{iconClassName:"h-6 w-6 stroke-gray-600",src:De,onClick:r}))),l(Te,{card:a.card,onOpenMedia:function(){},horizontal:!0}))),n&&ve.createElement("div",{ref:p,className:"absolute right-5 top-5 max-w-[234px]"},l(V,{variant:"rounded"},void 0,l(N,{space:2},void 0,l(F,{size:"sm",weight:"bold"},void 0,l(U,{id:"sponsored.info.title",defaultMessage:"Why am I seeing this ad?"})),l(F,{size:"sm",theme:"muted"},void 0,a.reason?a.reason:l(U,{id:"sponsored.info.message",defaultMessage:"{siteTitle} displays ads to help fund our service.",values:{siteTitle:c.title}}))))))},ie=le({heading:{id:"feed_suggestions.heading",defaultMessage:"Suggested Profiles"},viewAll:{id:"feed_suggestions.view_all",defaultMessage:"View all"}}),ut=function(d){var a=d.accountId,u=$e(a),c=u.account;return c?l(N,{space:3,className:"w-52 shrink-0 rounded-md border border-solid border-gray-300 p-4 dark:border-gray-800 md:w-full md:shrink md:border-transparent md:p-0 dark:md:border-transparent"},void 0,l(pe,{to:"/@".concat(c.acct),title:c.acct},void 0,l(N,{space:3,className:"mx-auto w-40 md:w-24"},void 0,l("img",{src:c.avatar,className:"mx-auto block h-16 w-16 min-w-[56px] rounded-full object-cover",alt:c.acct}),l(N,{},void 0,l(B,{alignItems:"center",justifyContent:"center",space:1},void 0,l(F,{weight:"semibold",dangerouslySetInnerHTML:{__html:c.display_name_html},truncate:!0,align:"center",size:"sm",className:"max-w-[95%]"}),c.verified&&l(qe,{})),l(F,{theme:"muted",align:"center",size:"sm",truncate:!0},void 0,"@",c.acct)))),l("div",{className:"text-center"},void 0,l(Ge,{account:c}))):null},ct=function(d){d.statusId,d.onMoveUp,d.onMoveDown;var a=de(),u=ne(function(g){return g.suggestions.items}),c=ne(function(g){return g.suggestions.isLoading});return!c&&u.size===0?null:l(V,{size:"lg",variant:"rounded",className:"focusable space-y-6",tabIndex:0},void 0,l(B,{justifyContent:"between",alignItems:"center"},void 0,l(Re,{title:a.formatMessage(ie.heading)}),l(pe,{to:"/suggestions",className:"text-primary-600 hover:underline dark:text-accent-blue"},void 0,a.formatMessage(ie.viewAll))),l(Ne,{},void 0,l(B,{space:4,alignItems:"center",className:"overflow-x-auto md:space-x-0 lg:overflow-x-hidden"},void 0,u.slice(0,4).map(function(g){return l(ut,{accountId:g.account},g.account)}))))},W={exports:{}};W.exports;(function(v){(function(d,a,u){function c(e){var n=this,o=i();n.next=function(){var t=2091639*n.s0+n.c*23283064365386963e-26;return n.s0=n.s1,n.s1=n.s2,n.s2=t-(n.c=t|0)},n.c=1,n.s0=o(" "),n.s1=o(" "),n.s2=o(" "),n.s0-=o(e),n.s0<0&&(n.s0+=1),n.s1-=o(e),n.s1<0&&(n.s1+=1),n.s2-=o(e),n.s2<0&&(n.s2+=1),o=null}function g(e,n){return n.c=e.c,n.s0=e.s0,n.s1=e.s1,n.s2=e.s2,n}function p(e,n){var o=new c(e),t=n&&n.state,r=o.next;return r.int32=function(){return o.next()*4294967296|0},r.double=function(){return r()+(r()*2097152|0)*11102230246251565e-32},r.quick=r,t&&(typeof t=="object"&&g(t,o),r.state=function(){return g(o,{})}),r}function i(){var e=4022871197,n=function(o){o=String(o);for(var t=0;t>>0,r-=e,r*=e,e=r>>>0,r-=e,e+=r*4294967296}return(e>>>0)*23283064365386963e-26};return n}a&&a.exports?a.exports=p:u&&u.amd?u(function(){return p}):this.alea=p})(q,v,!1)})(W);var dt=W.exports,H={exports:{}};H.exports;(function(v){(function(d,a,u){function c(i){var e=this,n="";e.x=0,e.y=0,e.z=0,e.w=0,e.next=function(){var t=e.x^e.x<<11;return e.x=e.y,e.y=e.z,e.z=e.w,e.w^=e.w>>>19^t^t>>>8},i===(i|0)?e.x=i:n+=i;for(var o=0;o>>0)/4294967296};return t.double=function(){do var r=n.next()>>>11,s=(n.next()>>>0)/4294967296,f=(r+s)/(1<<21);while(f===0);return f},t.int32=n.next,t.quick=t,o&&(typeof o=="object"&&g(o,n),t.state=function(){return g(n,{})}),t}a&&a.exports?a.exports=p:u&&u.amd?u(function(){return p}):this.xor128=p})(q,v,!1)})(H);var lt=H.exports,Q={exports:{}};Q.exports;(function(v){(function(d,a,u){function c(i){var e=this,n="";e.next=function(){var t=e.x^e.x>>>2;return e.x=e.y,e.y=e.z,e.z=e.w,e.w=e.v,(e.d=e.d+362437|0)+(e.v=e.v^e.v<<4^(t^t<<1))|0},e.x=0,e.y=0,e.z=0,e.w=0,e.v=0,i===(i|0)?e.x=i:n+=i;for(var o=0;o>>4),e.next()}function g(i,e){return e.x=i.x,e.y=i.y,e.z=i.z,e.w=i.w,e.v=i.v,e.d=i.d,e}function p(i,e){var n=new c(i),o=e&&e.state,t=function(){return(n.next()>>>0)/4294967296};return t.double=function(){do var r=n.next()>>>11,s=(n.next()>>>0)/4294967296,f=(r+s)/(1<<21);while(f===0);return f},t.int32=n.next,t.quick=t,o&&(typeof o=="object"&&g(o,n),t.state=function(){return g(n,{})}),t}a&&a.exports?a.exports=p:u&&u.amd?u(function(){return p}):this.xorwow=p})(q,v,!1)})(Q);var ft=Q.exports,K={exports:{}};K.exports;(function(v){(function(d,a,u){function c(i){var e=this;e.next=function(){var o=e.x,t=e.i,r,s;return r=o[t],r^=r>>>7,s=r^r<<24,r=o[t+1&7],s^=r^r>>>10,r=o[t+3&7],s^=r^r>>>3,r=o[t+4&7],s^=r^r<<7,r=o[t+7&7],r=r^r<<13,s^=r^r<<9,o[t]=s,e.i=t+1&7,s};function n(o,t){var r,s=[];if(t===(t|0))s[0]=t;else for(t=""+t,r=0;r0;--r)o.next()}n(e,i)}function g(i,e){return e.x=i.x.slice(),e.i=i.i,e}function p(i,e){i==null&&(i=+new Date);var n=new c(i),o=e&&e.state,t=function(){return(n.next()>>>0)/4294967296};return t.double=function(){do var r=n.next()>>>11,s=(n.next()>>>0)/4294967296,f=(r+s)/(1<<21);while(f===0);return f},t.int32=n.next,t.quick=t,o&&(o.x&&g(o,n),t.state=function(){return g(n,{})}),t}a&&a.exports?a.exports=p:u&&u.amd?u(function(){return p}):this.xorshift7=p})(q,v,!1)})(K);var vt=K.exports,Y={exports:{}};Y.exports;(function(v){(function(d,a,u){function c(i){var e=this;e.next=function(){var o=e.w,t=e.X,r=e.i,s,f;return e.w=o=o+1640531527|0,f=t[r+34&127],s=t[r=r+1&127],f^=f<<13,s^=s<<17,f^=f>>>15,s^=s>>>12,f=t[r]=f^s,e.i=r,f+(o^o>>>16)|0};function n(o,t){var r,s,f,S,I,z=[],D=128;for(t===(t|0)?(s=t,t=null):(t=t+"\0",s=0,D=Math.max(D,t.length)),f=0,S=-32;S>>15,s^=s<<4,s^=s>>>13,S>=0&&(I=I+1640531527|0,r=z[S&127]^=s+I,f=r==0?f+1:0);for(f>=128&&(z[(t&&t.length||0)&127]=-1),f=127,S=4*128;S>0;--S)s=z[f+34&127],r=z[f=f+1&127],s^=s<<13,r^=r<<17,s^=s>>>15,r^=r>>>12,z[f]=s^r;o.w=I,o.X=z,o.i=f}n(e,i)}function g(i,e){return e.i=i.i,e.w=i.w,e.X=i.X.slice(),e}function p(i,e){i==null&&(i=+new Date);var n=new c(i),o=e&&e.state,t=function(){return(n.next()>>>0)/4294967296};return t.double=function(){do var r=n.next()>>>11,s=(n.next()>>>0)/4294967296,f=(r+s)/(1<<21);while(f===0);return f},t.int32=n.next,t.quick=t,o&&(o.X&&g(o,n),t.state=function(){return g(n,{})}),t}a&&a.exports?a.exports=p:u&&u.amd?u(function(){return p}):this.xor4096=p})(q,v,!1)})(Y);var pt=Y.exports,J={exports:{}};J.exports;(function(v){(function(d,a,u){function c(i){var e=this,n="";e.next=function(){var t=e.b,r=e.c,s=e.d,f=e.a;return t=t<<25^t>>>7^r,r=r-s|0,s=s<<24^s>>>8^f,f=f-t|0,e.b=t=t<<20^t>>>12^r,e.c=r=r-s|0,e.d=s<<16^r>>>16^f,e.a=f-t|0},e.a=0,e.b=0,e.c=-1640531527,e.d=1367130551,i===Math.floor(i)?(e.a=i/4294967296|0,e.b=i|0):n+=i;for(var o=0;o>>0)/4294967296};return t.double=function(){do var r=n.next()>>>11,s=(n.next()>>>0)/4294967296,f=(r+s)/(1<<21);while(f===0);return f},t.int32=n.next,t.quick=t,o&&(typeof o=="object"&&g(o,n),t.state=function(){return g(n,{})}),t}a&&a.exports?a.exports=p:u&&u.amd?u(function(){return p}):this.tychei=p})(q,v,!1)})(J);var gt=J.exports,xe={exports:{}};(function(v){(function(d,a,u){var c=256,g=6,p=52,i="random",e=u.pow(c,g),n=u.pow(2,p),o=n*2,t=c-1,r;function s(m,h,C){var b=[];h=h==!0?{entropy:!0}:h||{};var y=z(I(h.entropy?[m,R(a)]:m??D(),3),b),A=new f(b),_=function(){for(var k=A.g(g),L=e,O=0;k=o;)k/=2,L/=2,O>>>=1;return(k+O)/L};return _.int32=function(){return A.g(4)|0},_.quick=function(){return A.g(4)/4294967296},_.double=_,z(R(A.S),a),(h.pass||C||function(k,L,O,P){return P&&(P.S&&S(P,A),k.state=function(){return S(A,{})}),O?(u[i]=k,L):k})(_,y,"global"in h?h.global:this==u,h.state)}function f(m){var h,C=m.length,b=this,y=0,A=b.i=b.j=0,_=b.S=[];for(C||(m=[C++]);y{const u=Mt(a),c=Math.floor(d/u.pageSize),g=d%u.pageSize,p=Ct(`${u.seed}-page-${c}`),i=Math.floor(p()*(u.range[1]-u.range[0]))+u.range[0];if(g===i)return v[c%v.length]},Mt=v=>{const{seed:d,range:a,pageSize:u}=v&&typeof v=="object"?v:{};return{seed:typeof d=="string"?d:"",range:Array.isArray(a)?[Number(a[0]),Number(a[1])]:[2,6],pageSize:typeof u=="number"?u:20}},_t=(v,d,a)=>{const u=jt(a),c=v?Math.floor(d/u.interval)%v.length:0,g=v?v[c]:void 0;return(d+1)%u.interval===0?g:void 0},jt=v=>{const{interval:d}=v&&typeof v=="object"?v:{};return{interval:typeof d=="number"?d:20}},se={linear:_t,abovefold:At};var kt=["statusIds","lastStatusId","featuredStatusIds","divideType","onLoadMore","timelineId","isLoading","isPartial","showAds","showGroup"];function ue(v,d){var a=Object.keys(v);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(v);d&&(u=u.filter(function(c){return Object.getOwnPropertyDescriptor(v,c).enumerable})),a.push.apply(a,u)}return a}function ce(v){for(var d=1;d1&&arguments[1]!==void 0?arguments[1]:!1,j=y(x,w)-1;L(j)},_=function(x){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,j=y(x,w)+1;L(j)},k=T.useCallback(He(function(){var M=u||a.last();i&&M&&i(M.replace("末suggestions-",""))},300,{leading:!0}),[i,u,a.last()]),L=function(x){var w;(w=h.current)===null||w===void 0||w.scrollIntoView({index:x,behavior:"smooth",done:function(){var E=document.querySelector('#status-list [data-index="'.concat(x,'"] .focusable'));E==null||E.focus()}})},O=function(x){var w=a.toList(),j=w.get(x+1),E=w.get(x-1);return x<1||!j||!E||!i?null:l(tt,{disabled:n,maxId:E,onClick:i},"gap:"+j)},P=function(x){return l(ae,{id:x,onMoveUp:A,onMoveDown:_,contextType:e,showGroup:f,variant:p==="border"?"slim":"rounded"},x)},X=function(x,w){return l(st,{ad:x},"ad-".concat(w))},$=function(x){var w=x.replace(/^末pending-/,"");return l(Ze,{idempotencyKey:w},x)},me=function(){return c?c.toArray().map(function(x){return l(ae,{id:x,featured:!0,onMoveUp:A,onMoveDown:_,contextType:e,showGroup:f,variant:p==="border"?"slim":"default"},"f-".concat(x))}):[]},he=function(x){return l(ct,{statusId:x,onMoveUp:A,onMoveDown:_},"suggestions")},we=function(){return n||a.size>0?a.toList().reduce(function(x,w,j){if(r&&z){var E,Z=(E=se[R])===null||E===void 0?void 0:E.call(se,z,j,ce(ce({},m),{},{seed:C.current}));Z&&x.push(X(Z,j))}if(w===null){var ee=O(j);ee&&x.push(ee)}else w.startsWith("末suggestions-")?D.feedInjection&&x.push(he(w)):w.startsWith("末pending-")?x.push($(w)):x.push(P(w));return x},[]):[]},ye=function(){var x=me(),w=we();return x&&w?x.concat(w):w};return o?l("div",{className:"regeneration-indicator"},void 0,l("div",{},void 0,l("div",{className:"regeneration-indicator__label"},void 0,l(U,{id:"regeneration_indicator.label",tagName:"strong",defaultMessage:"Loading…"}),l(U,{id:"regeneration_indicator.sublabel",defaultMessage:"Your home feed is being prepared!"})))):ve.createElement(Je,Qe({id:"status-list",key:"scrollable-list",isLoading:n,showLoading:n&&a.size===0,onLoadMore:k,placeholderComponent:function(){return l(Ke,{variant:p==="border"?"slim":"rounded"})},placeholderCount:20,ref:h,className:re("divide-y divide-solid divide-gray-200 dark:divide-gray-800",{"divide-none":p!=="border"}),itemClassName:re({"pb-3":p!=="border"})},S),ye())};export{Et as S}; +import{u as de,a as l,I as be,cq as Se,o as le,bM as Ie,cr as te,d as Ce,cs as fe,ct as Ae,cu as Me,cv as _e,t as je,r as T,at as ke,aP as ze,cw as Le,R as ve,a$ as V,a2 as N,y as F,F as U,H as B,c7 as Oe,A as Pe,aG as Ee,c6 as De,cx as Te,q as ne,a_ as Ne,cy as Re,L as pe,b3 as $e,cz as qe,cA as Ge,cB as q,cC as Xe,cD as Fe,as as Be,aU as Ue,cE as Ve,cF as We,Q as He,av as Qe,aO as Ke,W as re,_ as Ye}from"../index-be605fd2.js";import{S as Je}from"./scrollable-list-1e43c72d.js";import{S as ae}from"./status-container-e53698d2.js";import{P as Ze}from"./pending-status-959f7aeb.js";var et=le({load_more:{id:"status.load_more",defaultMessage:"Load more"}}),tt=function(d){var a=d.disabled,u=d.maxId,c=d.onClick,g=de(),p=function(){return c(u)};return l("button",{className:"load-more load-gap",disabled:a,onClick:p,"aria-label":g.formatMessage(et.load_more)},void 0,l(be,{src:Se}))};const nt="/packs/assets/timeline-72a32d57.svg",oe={soapbox:async()=>(await te(()=>import("./soapbox-config-03c81c59.js"),["packs/js/soapbox-config-03c81c59.js","packs/index-be605fd2.js","packs/assets/index-09eb95bf.css"])).default,truth:async()=>(await te(()=>import("./truth-ba20639e.js"),["packs/js/truth-ba20639e.js","packs/index-be605fd2.js","packs/assets/index-09eb95bf.css"])).default},rt=async v=>{const d=v(),a=Ie(d),u=a.extensions.getIn(["ads","enabled"],!1)===!0,c=a.extensions.getIn(["ads","provider"],"soapbox");if(u&&oe[c])return oe[c]()},at=5*60*1e3,ot=(v,d=at)=>v.expires_at?new Date().getTime()>new Date(v.expires_at).getTime()-d:!1,ge={ads:["ads"]};function it(){const v=Ce(),d=async()=>v(async(c,g)=>{const p=await rt(g);return p?p.getAds(g):[]}),a=fe(ge.ads,d,{placeholderData:[]}),u=Ae(Me).parse(a.data).filter(c=>!ot(c));return{...a,data:u}}var st=function(d){var a=d.ad,u=_e(),c=je(),g=T.useRef(void 0),p=T.useRef(null),i=T.useState(!1),e=ke(i,2),n=e[0],o=e[1];fe(["ads","impression",a.impression],ze(regeneratorRuntime.mark(function f(){return regeneratorRuntime.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:if(!a.impression){I.next=4;break}return I.next=3,Le.get(a.impression);case 3:return I.abrupt("return",I.sent);case 4:case"end":return I.stop()}},f)})),{cacheTime:1/0,staleTime:1/0});var t=function(){u.invalidateQueries(ge.ads)},r=function(){o(!n)},s=function(S){S.target&&p.current&&!p.current.contains(S.target)&&o(!1)};return T.useEffect(function(){return document.addEventListener("mousedown",s),function(){document.removeEventListener("mousedown",s)}},[p]),T.useEffect(function(){if(a.expires_at){var f=new Date(a.expires_at).getTime()-new Date().getTime();g.current=setTimeout(t,f)}return function(){g.current&&clearTimeout(g.current)}},[a.expires_at]),l("div",{className:"relative"},void 0,l(V,{className:"py-4",variant:"rounded"},void 0,l(N,{space:4},void 0,l(B,{alignItems:"center",space:3},void 0,l(Oe,{src:c.thumbnail,size:42}),l(N,{grow:!0},void 0,l(B,{space:1},void 0,l(F,{size:"sm",weight:"semibold",truncate:!0},void 0,c.title),l(Pe,{className:"h-4 w-4 stroke-accent-500",src:nt})),l(N,{},void 0,l(B,{alignItems:"center",space:1},void 0,l(F,{theme:"muted",size:"sm",truncate:!0},void 0,l(U,{id:"sponsored.subtitle",defaultMessage:"Sponsored post"}))))),l(N,{justifyContent:"center"},void 0,l(Ee,{iconClassName:"h-6 w-6 stroke-gray-600",src:De,onClick:r}))),l(Te,{card:a.card,onOpenMedia:function(){},horizontal:!0}))),n&&ve.createElement("div",{ref:p,className:"absolute right-5 top-5 max-w-[234px]"},l(V,{variant:"rounded"},void 0,l(N,{space:2},void 0,l(F,{size:"sm",weight:"bold"},void 0,l(U,{id:"sponsored.info.title",defaultMessage:"Why am I seeing this ad?"})),l(F,{size:"sm",theme:"muted"},void 0,a.reason?a.reason:l(U,{id:"sponsored.info.message",defaultMessage:"{siteTitle} displays ads to help fund our service.",values:{siteTitle:c.title}}))))))},ie=le({heading:{id:"feed_suggestions.heading",defaultMessage:"Suggested Profiles"},viewAll:{id:"feed_suggestions.view_all",defaultMessage:"View all"}}),ut=function(d){var a=d.accountId,u=$e(a),c=u.account;return c?l(N,{space:3,className:"w-52 shrink-0 rounded-md border border-solid border-gray-300 p-4 dark:border-gray-800 md:w-full md:shrink md:border-transparent md:p-0 dark:md:border-transparent"},void 0,l(pe,{to:"/@".concat(c.acct),title:c.acct},void 0,l(N,{space:3,className:"mx-auto w-40 md:w-24"},void 0,l("img",{src:c.avatar,className:"mx-auto block h-16 w-16 min-w-[56px] rounded-full object-cover",alt:c.acct}),l(N,{},void 0,l(B,{alignItems:"center",justifyContent:"center",space:1},void 0,l(F,{weight:"semibold",dangerouslySetInnerHTML:{__html:c.display_name_html},truncate:!0,align:"center",size:"sm",className:"max-w-[95%]"}),c.verified&&l(qe,{})),l(F,{theme:"muted",align:"center",size:"sm",truncate:!0},void 0,"@",c.acct)))),l("div",{className:"text-center"},void 0,l(Ge,{account:c}))):null},ct=function(d){d.statusId,d.onMoveUp,d.onMoveDown;var a=de(),u=ne(function(g){return g.suggestions.items}),c=ne(function(g){return g.suggestions.isLoading});return!c&&u.size===0?null:l(V,{size:"lg",variant:"rounded",className:"focusable space-y-6",tabIndex:0},void 0,l(B,{justifyContent:"between",alignItems:"center"},void 0,l(Re,{title:a.formatMessage(ie.heading)}),l(pe,{to:"/suggestions",className:"text-primary-600 hover:underline dark:text-accent-blue"},void 0,a.formatMessage(ie.viewAll))),l(Ne,{},void 0,l(B,{space:4,alignItems:"center",className:"overflow-x-auto md:space-x-0 lg:overflow-x-hidden"},void 0,u.slice(0,4).map(function(g){return l(ut,{accountId:g.account},g.account)}))))},W={exports:{}};W.exports;(function(v){(function(d,a,u){function c(e){var n=this,o=i();n.next=function(){var t=2091639*n.s0+n.c*23283064365386963e-26;return n.s0=n.s1,n.s1=n.s2,n.s2=t-(n.c=t|0)},n.c=1,n.s0=o(" "),n.s1=o(" "),n.s2=o(" "),n.s0-=o(e),n.s0<0&&(n.s0+=1),n.s1-=o(e),n.s1<0&&(n.s1+=1),n.s2-=o(e),n.s2<0&&(n.s2+=1),o=null}function g(e,n){return n.c=e.c,n.s0=e.s0,n.s1=e.s1,n.s2=e.s2,n}function p(e,n){var o=new c(e),t=n&&n.state,r=o.next;return r.int32=function(){return o.next()*4294967296|0},r.double=function(){return r()+(r()*2097152|0)*11102230246251565e-32},r.quick=r,t&&(typeof t=="object"&&g(t,o),r.state=function(){return g(o,{})}),r}function i(){var e=4022871197,n=function(o){o=String(o);for(var t=0;t>>0,r-=e,r*=e,e=r>>>0,r-=e,e+=r*4294967296}return(e>>>0)*23283064365386963e-26};return n}a&&a.exports?a.exports=p:u&&u.amd?u(function(){return p}):this.alea=p})(q,v,!1)})(W);var dt=W.exports,H={exports:{}};H.exports;(function(v){(function(d,a,u){function c(i){var e=this,n="";e.x=0,e.y=0,e.z=0,e.w=0,e.next=function(){var t=e.x^e.x<<11;return e.x=e.y,e.y=e.z,e.z=e.w,e.w^=e.w>>>19^t^t>>>8},i===(i|0)?e.x=i:n+=i;for(var o=0;o>>0)/4294967296};return t.double=function(){do var r=n.next()>>>11,s=(n.next()>>>0)/4294967296,f=(r+s)/(1<<21);while(f===0);return f},t.int32=n.next,t.quick=t,o&&(typeof o=="object"&&g(o,n),t.state=function(){return g(n,{})}),t}a&&a.exports?a.exports=p:u&&u.amd?u(function(){return p}):this.xor128=p})(q,v,!1)})(H);var lt=H.exports,Q={exports:{}};Q.exports;(function(v){(function(d,a,u){function c(i){var e=this,n="";e.next=function(){var t=e.x^e.x>>>2;return e.x=e.y,e.y=e.z,e.z=e.w,e.w=e.v,(e.d=e.d+362437|0)+(e.v=e.v^e.v<<4^(t^t<<1))|0},e.x=0,e.y=0,e.z=0,e.w=0,e.v=0,i===(i|0)?e.x=i:n+=i;for(var o=0;o>>4),e.next()}function g(i,e){return e.x=i.x,e.y=i.y,e.z=i.z,e.w=i.w,e.v=i.v,e.d=i.d,e}function p(i,e){var n=new c(i),o=e&&e.state,t=function(){return(n.next()>>>0)/4294967296};return t.double=function(){do var r=n.next()>>>11,s=(n.next()>>>0)/4294967296,f=(r+s)/(1<<21);while(f===0);return f},t.int32=n.next,t.quick=t,o&&(typeof o=="object"&&g(o,n),t.state=function(){return g(n,{})}),t}a&&a.exports?a.exports=p:u&&u.amd?u(function(){return p}):this.xorwow=p})(q,v,!1)})(Q);var ft=Q.exports,K={exports:{}};K.exports;(function(v){(function(d,a,u){function c(i){var e=this;e.next=function(){var o=e.x,t=e.i,r,s;return r=o[t],r^=r>>>7,s=r^r<<24,r=o[t+1&7],s^=r^r>>>10,r=o[t+3&7],s^=r^r>>>3,r=o[t+4&7],s^=r^r<<7,r=o[t+7&7],r=r^r<<13,s^=r^r<<9,o[t]=s,e.i=t+1&7,s};function n(o,t){var r,s=[];if(t===(t|0))s[0]=t;else for(t=""+t,r=0;r0;--r)o.next()}n(e,i)}function g(i,e){return e.x=i.x.slice(),e.i=i.i,e}function p(i,e){i==null&&(i=+new Date);var n=new c(i),o=e&&e.state,t=function(){return(n.next()>>>0)/4294967296};return t.double=function(){do var r=n.next()>>>11,s=(n.next()>>>0)/4294967296,f=(r+s)/(1<<21);while(f===0);return f},t.int32=n.next,t.quick=t,o&&(o.x&&g(o,n),t.state=function(){return g(n,{})}),t}a&&a.exports?a.exports=p:u&&u.amd?u(function(){return p}):this.xorshift7=p})(q,v,!1)})(K);var vt=K.exports,Y={exports:{}};Y.exports;(function(v){(function(d,a,u){function c(i){var e=this;e.next=function(){var o=e.w,t=e.X,r=e.i,s,f;return e.w=o=o+1640531527|0,f=t[r+34&127],s=t[r=r+1&127],f^=f<<13,s^=s<<17,f^=f>>>15,s^=s>>>12,f=t[r]=f^s,e.i=r,f+(o^o>>>16)|0};function n(o,t){var r,s,f,S,I,z=[],D=128;for(t===(t|0)?(s=t,t=null):(t=t+"\0",s=0,D=Math.max(D,t.length)),f=0,S=-32;S>>15,s^=s<<4,s^=s>>>13,S>=0&&(I=I+1640531527|0,r=z[S&127]^=s+I,f=r==0?f+1:0);for(f>=128&&(z[(t&&t.length||0)&127]=-1),f=127,S=4*128;S>0;--S)s=z[f+34&127],r=z[f=f+1&127],s^=s<<13,r^=r<<17,s^=s>>>15,r^=r>>>12,z[f]=s^r;o.w=I,o.X=z,o.i=f}n(e,i)}function g(i,e){return e.i=i.i,e.w=i.w,e.X=i.X.slice(),e}function p(i,e){i==null&&(i=+new Date);var n=new c(i),o=e&&e.state,t=function(){return(n.next()>>>0)/4294967296};return t.double=function(){do var r=n.next()>>>11,s=(n.next()>>>0)/4294967296,f=(r+s)/(1<<21);while(f===0);return f},t.int32=n.next,t.quick=t,o&&(o.X&&g(o,n),t.state=function(){return g(n,{})}),t}a&&a.exports?a.exports=p:u&&u.amd?u(function(){return p}):this.xor4096=p})(q,v,!1)})(Y);var pt=Y.exports,J={exports:{}};J.exports;(function(v){(function(d,a,u){function c(i){var e=this,n="";e.next=function(){var t=e.b,r=e.c,s=e.d,f=e.a;return t=t<<25^t>>>7^r,r=r-s|0,s=s<<24^s>>>8^f,f=f-t|0,e.b=t=t<<20^t>>>12^r,e.c=r=r-s|0,e.d=s<<16^r>>>16^f,e.a=f-t|0},e.a=0,e.b=0,e.c=-1640531527,e.d=1367130551,i===Math.floor(i)?(e.a=i/4294967296|0,e.b=i|0):n+=i;for(var o=0;o>>0)/4294967296};return t.double=function(){do var r=n.next()>>>11,s=(n.next()>>>0)/4294967296,f=(r+s)/(1<<21);while(f===0);return f},t.int32=n.next,t.quick=t,o&&(typeof o=="object"&&g(o,n),t.state=function(){return g(n,{})}),t}a&&a.exports?a.exports=p:u&&u.amd?u(function(){return p}):this.tychei=p})(q,v,!1)})(J);var gt=J.exports,xe={exports:{}};(function(v){(function(d,a,u){var c=256,g=6,p=52,i="random",e=u.pow(c,g),n=u.pow(2,p),o=n*2,t=c-1,r;function s(m,h,C){var b=[];h=h==!0?{entropy:!0}:h||{};var y=z(I(h.entropy?[m,R(a)]:m??D(),3),b),A=new f(b),_=function(){for(var k=A.g(g),L=e,O=0;k=o;)k/=2,L/=2,O>>>=1;return(k+O)/L};return _.int32=function(){return A.g(4)|0},_.quick=function(){return A.g(4)/4294967296},_.double=_,z(R(A.S),a),(h.pass||C||function(k,L,O,P){return P&&(P.S&&S(P,A),k.state=function(){return S(A,{})}),O?(u[i]=k,L):k})(_,y,"global"in h?h.global:this==u,h.state)}function f(m){var h,C=m.length,b=this,y=0,A=b.i=b.j=0,_=b.S=[];for(C||(m=[C++]);y{const u=Mt(a),c=Math.floor(d/u.pageSize),g=d%u.pageSize,p=Ct(`${u.seed}-page-${c}`),i=Math.floor(p()*(u.range[1]-u.range[0]))+u.range[0];if(g===i)return v[c%v.length]},Mt=v=>{const{seed:d,range:a,pageSize:u}=v&&typeof v=="object"?v:{};return{seed:typeof d=="string"?d:"",range:Array.isArray(a)?[Number(a[0]),Number(a[1])]:[2,6],pageSize:typeof u=="number"?u:20}},_t=(v,d,a)=>{const u=jt(a),c=v?Math.floor(d/u.interval)%v.length:0,g=v?v[c]:void 0;return(d+1)%u.interval===0?g:void 0},jt=v=>{const{interval:d}=v&&typeof v=="object"?v:{};return{interval:typeof d=="number"?d:20}},se={linear:_t,abovefold:At};var kt=["statusIds","lastStatusId","featuredStatusIds","divideType","onLoadMore","timelineId","isLoading","isPartial","showAds","showGroup"];function ue(v,d){var a=Object.keys(v);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(v);d&&(u=u.filter(function(c){return Object.getOwnPropertyDescriptor(v,c).enumerable})),a.push.apply(a,u)}return a}function ce(v){for(var d=1;d1&&arguments[1]!==void 0?arguments[1]:!1,j=y(x,w)-1;L(j)},_=function(x){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,j=y(x,w)+1;L(j)},k=T.useCallback(He(function(){var M=u||a.last();i&&M&&i(M.replace("末suggestions-",""))},300,{leading:!0}),[i,u,a.last()]),L=function(x){var w;(w=h.current)===null||w===void 0||w.scrollIntoView({index:x,behavior:"smooth",done:function(){var E=document.querySelector('#status-list [data-index="'.concat(x,'"] .focusable'));E==null||E.focus()}})},O=function(x){var w=a.toList(),j=w.get(x+1),E=w.get(x-1);return x<1||!j||!E||!i?null:l(tt,{disabled:n,maxId:E,onClick:i},"gap:"+j)},P=function(x){return l(ae,{id:x,onMoveUp:A,onMoveDown:_,contextType:e,showGroup:f,variant:p==="border"?"slim":"rounded"},x)},X=function(x,w){return l(st,{ad:x},"ad-".concat(w))},$=function(x){var w=x.replace(/^末pending-/,"");return l(Ze,{idempotencyKey:w},x)},me=function(){return c?c.toArray().map(function(x){return l(ae,{id:x,featured:!0,onMoveUp:A,onMoveDown:_,contextType:e,showGroup:f,variant:p==="border"?"slim":"default"},"f-".concat(x))}):[]},he=function(x){return l(ct,{statusId:x,onMoveUp:A,onMoveDown:_},"suggestions")},we=function(){return n||a.size>0?a.toList().reduce(function(x,w,j){if(r&&z){var E,Z=(E=se[R])===null||E===void 0?void 0:E.call(se,z,j,ce(ce({},m),{},{seed:C.current}));Z&&x.push(X(Z,j))}if(w===null){var ee=O(j);ee&&x.push(ee)}else w.startsWith("末suggestions-")?D.feedInjection&&x.push(he(w)):w.startsWith("末pending-")?x.push($(w)):x.push(P(w));return x},[]):[]},ye=function(){var x=me(),w=we();return x&&w?x.concat(w):w};return o?l("div",{className:"regeneration-indicator"},void 0,l("div",{},void 0,l("div",{className:"regeneration-indicator__label"},void 0,l(U,{id:"regeneration_indicator.label",tagName:"strong",defaultMessage:"Loading…"}),l(U,{id:"regeneration_indicator.sublabel",defaultMessage:"Your home feed is being prepared!"})))):ve.createElement(Je,Qe({id:"status-list",key:"scrollable-list",isLoading:n,showLoading:n&&a.size===0,onLoadMore:k,placeholderComponent:function(){return l(Ke,{variant:p==="border"?"slim":"rounded"})},placeholderCount:20,ref:h,className:re("divide-y divide-solid divide-gray-200 dark:divide-gray-800",{"divide-none":p!=="border"}),itemClassName:re({"pb-3":p!=="border"})},S),ye())};export{Et as S}; diff --git a/packs/js/streamfield-757f31b8.js b/packs/js/streamfield-6197ce03.js similarity index 93% rename from packs/js/streamfield-757f31b8.js rename to packs/js/streamfield-6197ce03.js index 17e70a70e..65474072b 100644 --- a/packs/js/streamfield-757f31b8.js +++ b/packs/js/streamfield-6197ce03.js @@ -1 +1 @@ -import{u as b,a,aa as k,a2 as o,H as R,aG as M,a5 as S,y as h,o as w,bL as A}from"../index-7380452a.js";var I=w({add:{id:"streamfield.add",defaultMessage:"Add"},remove:{id:"streamfield.remove",defaultMessage:"Remove"}}),H=function(e){var n=e.values,m=e.label,i=e.hint,d=e.onAddItem,r=e.onRemoveItem,C=e.onChange,f=e.component,l=e.maxItems,p=l===void 0?1/0:l,c=e.minItems,x=c===void 0?0:c,u=b(),y=function(t){return function(v){var g=A(n);g[t]=v,C(g)}};return a(o,{space:4},void 0,a(o,{},void 0,m&&a(h,{size:"sm",weight:"medium"},void 0,m),i&&a(h,{size:"xs",theme:"muted"},void 0,i)),n.length>0&&a(o,{space:1},void 0,n.map(function(s,t){return s!=null&&s._destroy?null:a(R,{space:2,alignItems:"center"},void 0,a(f,{onChange:y(t),value:s,autoFocus:t>0},t),n.length>x&&r&&a(M,{iconClassName:"h-4 w-4",className:"bg-transparent text-gray-600 hover:text-gray-600",src:S,onClick:function(){return r(t)},title:u.formatMessage(I.remove)}))})),d&&n.length0&&a(o,{space:1},void 0,n.map(function(s,t){return s!=null&&s._destroy?null:a(R,{space:2,alignItems:"center"},void 0,a(f,{onChange:y(t),value:s,autoFocus:t>0},t),n.length>x&&r&&a(M,{iconClassName:"h-4 w-4",className:"bg-transparent text-gray-600 hover:text-gray-600",src:S,onClick:function(){return r(t)},title:u.formatMessage(I.remove)}))})),d&&n.length({id:s.account_id,avatar:s.account_avatar,avatar_static:s.account_avatar,acct:s.acct,display_name:s.display_name,note:s.note,verified:s.verified}),j=()=>{var i;const s=y(),a=M(),p=w(),d=async t=>{var r;const c=(t==null?void 0:t.link)||"/api/v2/suggestions",e=await s.get(c),k=!!e.headers.link,l=(r=x(e).refs.find(u=>u.rel==="next"))==null?void 0:r.uri,o=e.data.map(({account:u})=>u),v=o.map(u=>u.id);return a(_(o)),a(A(v)),{result:e.data.map(u=>({...u,account:u.account.id})),link:l,hasMore:k}},S=async t=>{var v;const c=(t==null?void 0:t.link)||"/api/v1/truth/carousels/suggestions",e=await s.get(c),k=!!e.headers.link,l=(v=x(e).refs.find(r=>r.rel==="next"))==null?void 0:v.uri,o=e.data.map(b);return a(_(o,{should_refetch:!0})),{result:e.data.map(r=>({...r,account:r.account_id})),link:l,hasMore:k}},h=t=>p.truthSuggestions?S(t):d(t),n=m(L.suggestions,({pageParam:t})=>h(t),{keepPreviousData:!0,getNextPageParam:t=>{if(t!=null&&t.hasMore)return{nextLink:t==null?void 0:t.link}}}),g=(i=n.data)==null?void 0:i.pages.reduce((t,c)=>[...t,...c.result],[]);return{...n,data:g||[]}},F=()=>{const s=y();return D(a=>s.delete(`/api/v1/suggestions/${a}`),{onMutate(a){I(L.suggestions,a,(p,d)=>p.account===d)}})};function N(){var h;const s=y(),a=M(),p=async n=>{var l;const g=(n==null?void 0:n.link)||"/api/v2/suggestions",i=await s.get(g),t=!!i.headers.link,c=(l=x(i).refs.find(o=>o.rel==="next"))==null?void 0:l.uri,e=i.data.map(({account:o})=>o),k=e.map(o=>o.id);return a(_(e)),a(A(k)),{data:i.data,link:c,hasMore:t}},d=m(["suggestions","v2"],({pageParam:n})=>p(n),{keepPreviousData:!0,getNextPageParam:n=>{if(n.hasMore)return{link:n.link}}}),S=(h=d.data)==null?void 0:h.pages.reduce((n,g)=>[...n,...g.data],[]);return{...d,data:S}}export{F as a,N as b,j as u}; +import{bj as y,d as M,gw as m,g as w,e$ as D,j5 as I,fA as x,j6 as _,Z as A}from"../index-be605fd2.js";const L={suggestions:["suggestions"]},b=s=>({id:s.account_id,avatar:s.account_avatar,avatar_static:s.account_avatar,acct:s.acct,display_name:s.display_name,note:s.note,verified:s.verified}),j=()=>{var i;const s=y(),a=M(),p=w(),d=async t=>{var r;const c=(t==null?void 0:t.link)||"/api/v2/suggestions",e=await s.get(c),k=!!e.headers.link,l=(r=x(e).refs.find(u=>u.rel==="next"))==null?void 0:r.uri,o=e.data.map(({account:u})=>u),v=o.map(u=>u.id);return a(_(o)),a(A(v)),{result:e.data.map(u=>({...u,account:u.account.id})),link:l,hasMore:k}},S=async t=>{var v;const c=(t==null?void 0:t.link)||"/api/v1/truth/carousels/suggestions",e=await s.get(c),k=!!e.headers.link,l=(v=x(e).refs.find(r=>r.rel==="next"))==null?void 0:v.uri,o=e.data.map(b);return a(_(o,{should_refetch:!0})),{result:e.data.map(r=>({...r,account:r.account_id})),link:l,hasMore:k}},h=t=>p.truthSuggestions?S(t):d(t),n=m(L.suggestions,({pageParam:t})=>h(t),{keepPreviousData:!0,getNextPageParam:t=>{if(t!=null&&t.hasMore)return{nextLink:t==null?void 0:t.link}}}),g=(i=n.data)==null?void 0:i.pages.reduce((t,c)=>[...t,...c.result],[]);return{...n,data:g||[]}},F=()=>{const s=y();return D(a=>s.delete(`/api/v1/suggestions/${a}`),{onMutate(a){I(L.suggestions,a,(p,d)=>p.account===d)}})};function N(){var h;const s=y(),a=M(),p=async n=>{var l;const g=(n==null?void 0:n.link)||"/api/v2/suggestions",i=await s.get(g),t=!!i.headers.link,c=(l=x(i).refs.find(o=>o.rel==="next"))==null?void 0:l.uri,e=i.data.map(({account:o})=>o),k=e.map(o=>o.id);return a(_(e)),a(A(k)),{data:i.data,link:c,hasMore:t}},d=m(["suggestions","v2"],({pageParam:n})=>p(n),{keepPreviousData:!0,getNextPageParam:n=>{if(n.hasMore)return{link:n.link}}}),S=(h=d.data)==null?void 0:h.pages.reduce((n,g)=>[...n,...g.data],[]);return{...d,data:S}}export{F as a,N as b,j as u}; diff --git a/packs/js/tab-bar-b3f08956.js b/packs/js/tab-bar-777df18a.js similarity index 85% rename from packs/js/tab-bar-b3f08956.js rename to packs/js/tab-bar-777df18a.js index e20f0ad88..cb9c7c14f 100644 --- a/packs/js/tab-bar-b3f08956.js +++ b/packs/js/tab-bar-777df18a.js @@ -1 +1 @@ -import{a7 as i,r as u,a as c,T as p}from"../index-7380452a.js";var r=function(a){return a.MY_GROUPS="MY_GROUPS",a.FIND_GROUPS="FIND_GROUPS",a}({}),m=function(e){var n=e.activeTab,t=i(),o=u.useMemo(function(){return[{text:"My Groups",action:function(){return t.push("/groups")},name:r.MY_GROUPS},{text:"Find Groups",action:function(){return t.push("/groups/discover")},name:r.FIND_GROUPS}]},[]);return c(p,{items:o,activeItem:n})};export{m as T,r as a}; +import{a7 as i,r as u,a as c,T as p}from"../index-be605fd2.js";var r=function(a){return a.MY_GROUPS="MY_GROUPS",a.FIND_GROUPS="FIND_GROUPS",a}({}),m=function(e){var n=e.activeTab,t=i(),o=u.useMemo(function(){return[{text:"My Groups",action:function(){return t.push("/groups")},name:r.MY_GROUPS},{text:"Find Groups",action:function(){return t.push("/groups/discover")},name:r.FIND_GROUPS}]},[]);return c(p,{items:o,activeItem:n})};export{m as T,r as a}; diff --git a/packs/js/tag-708fa6df.js b/packs/js/tag-ca20a566.js similarity index 83% rename from packs/js/tag-708fa6df.js rename to packs/js/tag-ca20a566.js index bbd93a17e..186cf24b0 100644 --- a/packs/js/tag-708fa6df.js +++ b/packs/js/tag-ca20a566.js @@ -1 +1 @@ -import{G as C,a as k,v as w}from"./layout-list-fe4f62ad.js";import{bj as N,g as y,bk as P,bl as E,bm as D,kq as A,r as f,at as W,a as t,W as g,R as v,av as R,H as q,A as I,X as F,as as V}from"../index-7380452a.js";import{V as j,a as H}from"./index-75eb026b.js";import{u as M}from"./useGroupTag-49646e08.js";import{G as J}from"./group-list-item-c21d0638.js";import"./group-header-image-e076498c.js";function O(e){const i=N(),n=y(),{entities:c,...l}=P([D.GROUPS,"tags",e],()=>i.get(`/api/v1/tags/${e}/groups`),{schema:E,enabled:n.groupsDiscovery}),{relationships:u}=A(["tags",e],c.map(r=>r.id)),m=c.map(r=>({...r,relationship:u[r.id]||null}));return{...l,groups:m}}var U=["context"],s=function(e){return e.LIST="LIST",e.GRID="GRID",e}(s||{}),X=v.forwardRef(function(e,i){e.context;var n=V(e,U);return v.createElement("div",R({ref:i},n,{className:"flex flex-wrap"}))}),Z=function(i){var n=i.params.id,c=f.useState(s.LIST),l=W(c,2),u=l[0],m=l[1],r=M(n),G=r.tag,L=r.isLoading,d=O(n),x=d.groups,S=d.hasNextPage,_=d.fetchNextPage,h=function(){S&&_()},b=f.useCallback(function(a,o){return t("div",{className:g({"pt-4":o!==0})},void 0,t(J,{group:a,withJoinAction:!0}))},[]),T=f.useCallback(function(a){return t(C,{group:a})},[]);return L||!G?null:t(F,{label:"#".concat(G.name),action:t(q,{alignItems:"center"},void 0,t("button",{onClick:function(){return m(s.LIST)}},void 0,t(I,{src:k,className:g("h-5 w-5 text-gray-600",{"text-primary-600":u===s.LIST})})),t("button",{onClick:function(){return m(s.GRID)}},void 0,t(I,{src:w,className:g("h-5 w-5 text-gray-600",{"text-primary-600":u===s.GRID})})))},void 0,u===s.LIST?t(j,{useWindowScroll:!0,data:x,itemContent:function(o,p){return b(p,o)},endReached:h}):t(H,{useWindowScroll:!0,data:x,itemContent:function(o,p){return T(p)},components:{Item:function(o){return v.createElement("div",R({},o,{className:"w-1/2 flex-none pb-4 [&:nth-last-of-type(-n+2)]:pb-0"}))},List:X},endReached:h}))};export{Z as default}; +import{G as C,a as k,v as w}from"./layout-list-e34f9942.js";import{bj as N,g as y,bk as P,bl as E,bm as D,kq as A,r as f,at as W,a as t,W as g,R as v,av as R,H as q,A as I,X as F,as as V}from"../index-be605fd2.js";import{V as j,a as H}from"./index-85a17314.js";import{u as M}from"./useGroupTag-9c7d1cac.js";import{G as J}from"./group-list-item-d71c8a2e.js";import"./group-header-image-068adc6d.js";function O(e){const i=N(),n=y(),{entities:c,...l}=P([D.GROUPS,"tags",e],()=>i.get(`/api/v1/tags/${e}/groups`),{schema:E,enabled:n.groupsDiscovery}),{relationships:u}=A(["tags",e],c.map(r=>r.id)),m=c.map(r=>({...r,relationship:u[r.id]||null}));return{...l,groups:m}}var U=["context"],s=function(e){return e.LIST="LIST",e.GRID="GRID",e}(s||{}),X=v.forwardRef(function(e,i){e.context;var n=V(e,U);return v.createElement("div",R({ref:i},n,{className:"flex flex-wrap"}))}),Z=function(i){var n=i.params.id,c=f.useState(s.LIST),l=W(c,2),u=l[0],m=l[1],r=M(n),G=r.tag,L=r.isLoading,d=O(n),x=d.groups,S=d.hasNextPage,_=d.fetchNextPage,h=function(){S&&_()},b=f.useCallback(function(a,o){return t("div",{className:g({"pt-4":o!==0})},void 0,t(J,{group:a,withJoinAction:!0}))},[]),T=f.useCallback(function(a){return t(C,{group:a})},[]);return L||!G?null:t(F,{label:"#".concat(G.name),action:t(q,{alignItems:"center"},void 0,t("button",{onClick:function(){return m(s.LIST)}},void 0,t(I,{src:k,className:g("h-5 w-5 text-gray-600",{"text-primary-600":u===s.LIST})})),t("button",{onClick:function(){return m(s.GRID)}},void 0,t(I,{src:w,className:g("h-5 w-5 text-gray-600",{"text-primary-600":u===s.GRID})})))},void 0,u===s.LIST?t(j,{useWindowScroll:!0,data:x,itemContent:function(o,p){return b(p,o)},endReached:h}):t(H,{useWindowScroll:!0,data:x,itemContent:function(o,p){return T(p)},components:{Item:function(o){return v.createElement("div",R({},o,{className:"w-1/2 flex-none pb-4 [&:nth-last-of-type(-n+2)]:pb-0"}))},List:X},endReached:h}))};export{Z as default}; diff --git a/packs/js/tag-list-item-16aa64ec.js b/packs/js/tag-list-item-bf8ca941.js similarity index 91% rename from packs/js/tag-list-item-16aa64ec.js rename to packs/js/tag-list-item-bf8ca941.js index 3f25e626d..87dda279f 100644 --- a/packs/js/tag-list-item-16aa64ec.js +++ b/packs/js/tag-list-item-bf8ca941.js @@ -1 +1 @@ -import{bj as i,g as u,bk as g,ku as n,bm as m,a as s,a2 as c,y as o,F as p,L as d}from"../index-7380452a.js";function l(){const t=i(),a=u(),{entities:e,...r}=g([m.GROUP_TAGS],()=>t.get("/api/v1/groups/tags"),{schema:n,enabled:a.groupsDiscovery});return{...r,tags:e}}var h=function(a){var e=a.tag;return s(d,{to:"/groups/discover/tags/".concat(e.id),className:"group","data-testid":"tag-list-item"},void 0,s(c,{},void 0,s(o,{weight:"bold",className:"group-hover:text-primary-600 group-hover:underline dark:group-hover:text-accent-blue"},void 0,"#",e.name),s(o,{size:"sm",theme:"muted",weight:"medium"},void 0,s(p,{id:"groups.discovery.tags.no_of_groups",defaultMessage:"Number of groups"}),":"," ",e.groups)))};export{h as T,l as u}; +import{bj as i,g as u,bk as g,ku as n,bm as m,a as s,a2 as c,y as o,F as p,L as d}from"../index-be605fd2.js";function l(){const t=i(),a=u(),{entities:e,...r}=g([m.GROUP_TAGS],()=>t.get("/api/v1/groups/tags"),{schema:n,enabled:a.groupsDiscovery});return{...r,tags:e}}var h=function(a){var e=a.tag;return s(d,{to:"/groups/discover/tags/".concat(e.id),className:"group","data-testid":"tag-list-item"},void 0,s(c,{},void 0,s(o,{weight:"bold",className:"group-hover:text-primary-600 group-hover:underline dark:group-hover:text-accent-blue"},void 0,"#",e.name),s(o,{size:"sm",theme:"muted",weight:"medium"},void 0,s(p,{id:"groups.discovery.tags.no_of_groups",defaultMessage:"Number of groups"}),":"," ",e.groups)))};export{h as T,l as u}; diff --git a/packs/js/tags-8516eaa3.js b/packs/js/tags-f0b4cdee.js similarity index 83% rename from packs/js/tags-8516eaa3.js rename to packs/js/tags-f0b4cdee.js index f62e64130..bec4ebcd6 100644 --- a/packs/js/tags-8516eaa3.js +++ b/packs/js/tags-f0b4cdee.js @@ -1 +1 @@ -import{u as f,a as e,y as p,F as h,X as v,o as T,W as x}from"../index-7380452a.js";import{V as M}from"./index-75eb026b.js";import{u as P,T as N}from"./tag-list-item-16aa64ec.js";var E=T({title:{id:"groups.tags.title",defaultMessage:"Browse Topics"}}),y=function(){var r=f(),a=P(),t=a.tags,o=a.isFetched,i=a.isError,d=a.hasNextPage,l=a.fetchNextPage,n=o&&t.length===0||i,u=function(){d&&l()},g=function(c,s){return e("div",{className:x({"pt-4":c!==0})},void 0,e(N,{tag:s},s.id))};return e(v,{label:r.formatMessage(E.title)},void 0,n?e(p,{theme:"muted"},void 0,e(h,{id:"groups.discover.tags.empty",defaultMessage:"Unable to fetch popular topics at this time. Please check back later."})):e(M,{useWindowScroll:!0,data:t,itemContent:g,endReached:u}))};export{y as default}; +import{u as f,a as e,y as p,F as h,X as v,o as T,W as x}from"../index-be605fd2.js";import{V as M}from"./index-85a17314.js";import{u as P,T as N}from"./tag-list-item-bf8ca941.js";var E=T({title:{id:"groups.tags.title",defaultMessage:"Browse Topics"}}),y=function(){var r=f(),a=P(),t=a.tags,o=a.isFetched,i=a.isError,d=a.hasNextPage,l=a.fetchNextPage,n=o&&t.length===0||i,u=function(){d&&l()},g=function(c,s){return e("div",{className:x({"pt-4":c!==0})},void 0,e(N,{tag:s},s.id))};return e(v,{label:r.formatMessage(E.title)},void 0,n?e(p,{theme:"muted"},void 0,e(h,{id:"groups.discover.tags.empty",defaultMessage:"Unable to fetch popular topics at this time. Please check back later."})):e(M,{useWindowScroll:!0,data:t,itemContent:g,endReached:u}))};export{y as default}; diff --git a/packs/js/thread-b9635854.js b/packs/js/thread-f9f548a4.js similarity index 98% rename from packs/js/thread-b9635854.js rename to packs/js/thread-f9f548a4.js index 8b5f09389..ecf46b92c 100644 --- a/packs/js/thread-b9635854.js +++ b/packs/js/thread-f9f548a4.js @@ -1 +1 @@ -import{cT as Z,cU as Re,cV as we,cW as Oe,cX as Ne,cY as Te,cZ as le,c_ as J,c$ as ke,d0 as Ee,d1 as Ae,d2 as De,d3 as Le,q as j,aU as de,d as ce,g as ve,w as fe,a as e,H as B,F as b,E as $e,W as D,y as H,d4 as ze,L as me,d5 as Fe,O as U,aD as A,u as ge,r as O,d6 as Pe,cL as qe,R as M,b2 as Ue,cK as je,d7 as Be,d8 as He,d9 as ae,A as K,da as Ve,db as We,dc as Qe,t as Ge,a2 as Y,cy as Ke,a$ as Ye,aa as ne,b9 as L,av as Ze,aO as pe,M as he,b8 as Je,f as Xe,dd as re,at as et,de as tt,df as at,bL as se,dg as nt}from"../index-7380452a.js";import{S as rt}from"./scrollable-list-df58e451.js";import{P as st}from"./pending-status-7f660229.js";import{S as ot}from"./status-container-59e57baf.js";var it=Z,ut=Re,lt=we,dt=Oe,ct=Ne,vt=Te,ft=[].unshift(0)!==1,mt=function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(o){return o instanceof TypeError}},gt=ft||!mt();it({target:"Array",proto:!0,arity:1,forced:gt},{unshift:function(r){var t=ut(this),s=lt(t),l=arguments.length;if(l){vt(s+l);for(var a=s;a--;){var d=a+l;a in t?t[d]=t[a]:ct(t,d)}for(var i=0;it,d=St(s)?s:Ct(s),i=a?_t(arguments,t):[],c=a?function(){yt(d,this,i)}:d;return r?o(c,l):o(c)}:o},Ot=Z,ye=J,ie=le.set,Nt=wt,ue=ye.setImmediate?Nt(ie,!1):ie;Ot({global:!0,bind:!0,enumerable:!0,forced:ye.setImmediate!==ue},{setImmediate:ue});var Tt=function(r){var t=r.status,s=j(function(m){var f=m.me;return f}),l=de(),a=l.allowedEmoji,d=ce(),i=ve(),c=t.account;if(!c||fe(c)!=="object")return null;var y=function(){d(A("UNAUTHORIZED"))},I=function(f,h){d(A("REBLOGS",{username:f,statusId:h}))},C=function(f,h){d(A("FAVOURITES",{username:f,statusId:h}))},v=function(f,h){d(A("DISLIKES",{username:f,statusId:h}))},_=function(f,h){d(A("REACTIONS",{username:f,statusId:h}))},$=function(){return Fe(U(t.pleroma.get("emoji_reactions")),t.favourites_count,t.favourited,a)},N=function(f){f.preventDefault(),s?I(c.acct,t.id):y()},R=function(){return t.reblogs_count?e(q,{count:t.reblogs_count,onClick:N},void 0,e(b,{id:"status.interactions.reblogs",defaultMessage:"{count, plural, one {Repost} other {Reposts}}",values:{count:t.reblogs_count}})):null},S=function(){return t.quotes_count?e(q,{count:t.quotes_count,to:"/@".concat(t.getIn(["account","acct"]),"/posts/").concat(t.id,"/quotes")},void 0,e(b,{id:"status.interactions.quotes",defaultMessage:"{count, plural, one {Quote} other {Quotes}}",values:{count:t.quotes_count}})):null},p=function(f){f.preventDefault(),s?C(c.acct,t.id):y()},T=function(f){f.preventDefault(),s?v(c.acct,t.id):y()},z=function(){return t.favourites_count?e(q,{count:t.favourites_count,onClick:i.exposableReactions?p:void 0},void 0,e(b,{id:"status.interactions.favourites",defaultMessage:"{count, plural, one {Like} other {Likes}}",values:{count:t.favourites_count}})):null},Q=function(){var f=t.dislikes_count;return f?e(q,{count:t.favourites_count,onClick:i.exposableReactions?T:void 0},void 0,e(b,{id:"status.interactions.dislikes",defaultMessage:"{count, plural, one {Dislike} other {Dislikes}}",values:{count:f}})):null},V=function(){if(!s)return y();_(c.acct,t.id)},W=function(){var f=$(),h=f.reduce(function(x,F){return x+F.get("count")},0);return h?e(q,{count:h,onClick:i.exposableReactions?V:void 0},void 0,e(B,{space:.5,alignItems:"center"},void 0,f.take(3).map(function(x,F){return e($e,{className:"h-4.5 w-4.5 flex-none",emoji:x.get("name"),src:x.get("url")},F)}))):null};return e(B,{space:3},void 0,R(),S(),i.emojiReacts?W():z(),Q())},q=function(r){var t=r.count,s=r.children,l=r.onClick,a=r.to,d=ve(),i=D({"text-gray-600 dark:text-gray-700":!0,"hover:underline":d.exposableReactions,"cursor-default":!d.exposableReactions}),c=e(B,{space:1,alignItems:"center"},void 0,e(H,{weight:"bold"},void 0,ze(t)),e(H,{tag:"div",theme:"muted"},void 0,s));return a?e(me,{to:a,className:i},void 0,c):e("button",{type:"button",onClick:l,className:i},void 0,c)},kt=function(r){var t=r.status,s=r.onOpenCompareHistoryModal,l=r.onToggleMediaVisibility,a=r.showMedia,d=r.withMedia,i=d===void 0?!0:d,c=ge(),y=O.useRef(null),I=function(){s(t)},C=function(){return t.group?e("div",{className:"mb-4"},void 0,e(ae,{avatarSize:42,icon:e(K,{src:Ve,className:"h-4 w-4 text-primary-600 dark:text-accent-blue"}),text:e(b,{id:"status.group",defaultMessage:"Posted in {group}",values:{group:e(me,{to:"/group/".concat(t.group.slug),className:"hover:underline"},void 0,e("bdi",{className:"truncate"},void 0,e("strong",{className:"text-gray-800 dark:text-gray-200"},void 0,e("span",{dangerouslySetInnerHTML:{__html:t.group.display_name_html}}))))}})})):e(ae,{visibility:v.visibility})},v=Pe(t);if(!v)return null;var _=v.account;if(!_||fe(_)!=="object")return null;var $=v.visibility==="self",N=v.sensitive,R=null,S;return v.quote&&(v.pleroma.get("quote_visible",!0)===!1?S=e("div",{className:"quoted-actualStatus-tombstone"},void 0,e("p",{},void 0,e(b,{id:"actualStatuses.quote_tombstone",defaultMessage:"Post is unavailable."}))):S=e(qe,{statusId:v.quote})),v.visibility==="direct"?R=e(K,{className:"h-4 w-4 text-gray-700 dark:text-gray-600",src:We}):v.visibility==="private"&&(R=e(K,{className:"h-4 w-4 text-gray-700 dark:text-gray-600",src:Qe})),e("div",{className:"border-box"},void 0,M.createElement("div",{ref:y,className:"detailed-actualStatus",tabIndex:-1},e("div",{className:"mb-4"},void 0,C(),e(Ue,{account:_,avatarSize:42,hideActions:!0,approvalStatus:v.approval_status},_.id)),e(je,{status:v}),e(Be,{showMedia:a||!1,isSensitive:$||N,onToggleMediaVisibility:l,additionalMediaCondition:i,quote:S,hasMedia:!!(S||v.card||v.media_attachments.size>0),contentOption:{status:v,textSize:"lg",translatable:!0}}),e(B,{justifyContent:"between",alignItems:"center",className:"py-3",wrap:!0},void 0,e(Tt,{status:v}),e(B,{space:1,alignItems:"center"},void 0,R,e("span",{},void 0,e("a",{href:v.url,target:"_blank",rel:"noopener",className:"hover:underline"},void 0,e(H,{tag:"span",theme:"muted",size:"sm"},void 0,e(He,{value:new Date(v.created_at),hour12:!0,year:"numeric",month:"short",day:"2-digit",hour:"numeric",minute:"2-digit"}))),v.edited_at&&M.createElement(M.Fragment,null," · ",e("div",{className:"inline hover:underline",onClick:I,role:"button",tabIndex:0},void 0,e(H,{tag:"span",theme:"muted",size:"sm"},void 0,e(b,{id:"actualStatus.edited",defaultMessage:"Edited {date}",values:{date:c.formatDate(new Date(v.edited_at),{hour12:!0,month:"short",day:"2-digit",hour:"numeric",minute:"2-digit"})}})))))))))},Et=function(){var r=Ge(),t=de(),s=t.displayCta;return s?e(Ye,{className:"space-y-6 px-6 py-12 text-center",variant:"rounded"},void 0,e(Y,{},void 0,e(Ke,{title:e(b,{id:"thread_login.title",defaultMessage:"Continue the conversation"})}),e(H,{},void 0,e(b,{id:"thread_login.message",defaultMessage:"Join {siteTitle} to get the full story and details.",values:{siteTitle:r.title}}))),e(Y,{space:4,className:"mx-auto max-w-xs"},void 0,e(ne,{theme:"tertiary",to:"/login",block:!0},void 0,e(b,{id:"thread_login.login",defaultMessage:"Log in"})),e(ne,{to:"/signup",block:!0},void 0,e(b,{id:"thread_login.signup",defaultMessage:"Sign up"})))):null},At=function(r){var t=r.id,s=r.focusedStatusId,l=j(function(c){return c.contexts.inReplyTos.get(t)}),a=j(function(c){return c.contexts.replies.get(t,L()).size}),d=j(function(c){return!!c.statuses.get(t)}),i=function(){var y=l&&l!==s,I=a>0,C=y||I;return C?e("div",{className:D("absolute left-5 z-[1] hidden w-0.5 bg-gray-200 rtl:left-auto rtl:right-5 dark:bg-primary-800",{"!block top-[calc(12px+42px+1.25rem)] h-[calc(100%-42px-8px-1rem)]":I})}):null};return e("div",{className:"thread__status"},void 0,i(),d?M.createElement(ot,Ze({},r,{showGroup:!1})):e(pe,{showPrivacyIndicator:!0,variant:"default"}))},Dt=he([function(o,r){return r},function(o){return o.contexts.inReplyTos}],function(o,r){for(var t=L(),s=o;s&&!t.includes(s);)t=L([s]).union(t),s=r.get(s);return t}),Lt=he([function(o,r){return r},function(o){return o.contexts.replies}],function(o,r){for(var t=L(),s=[o];s.length>0;){var l=s.shift();if(!l)break;var a=r.get(l);if(t.includes(l))break;o!==l&&(t=t.union([l])),a&&a.reverse().forEach(function(d){s.unshift(d)})}return t}),qt=function(r){var t=r.handleLoadMore,s=r.itemClassName,l=r.next,a=r.status,d=r.useWindowScroll,i=d===void 0?!0:d,c=r.withMedia,y=c===void 0?!0:c,I=ce(),C=ge(),v=Je(),_=v.account,$=Xe(),N=$.get("showSensitiveMedia"),R=(a==null?void 0:a.visibility)==="self",S=j(function(g){var n=L(),u=L();if(a){var P=a.id;n=Dt(g,g.contexts.inReplyTos.get(P)),u=Lt(g,P),n=n.delete(P).subtract(u),u=u.delete(P).subtract(n)}return{status:a,ancestorsIds:n,descendantsIds:u}}),p=S.ancestorsIds,T=S.descendantsIds,z=p.size;!i&&z!==0&&(z=p.size+1);var Q=O.useState((a==null?void 0:a.visibility)==="self"?!1:re(a,N)),V=et(Q,2),W=V[0],m=V[1],f=O.useRef(null),h=O.useRef(null),x=O.useRef(null),F=function(){m(!W)},X=function(n){if(n===(a==null?void 0:a.id))k(p.size-1);else{var u=U(p).indexOf(n);u===-1?(u=U(T).indexOf(n),k(p.size+u)):k(u-1)}},ee=function(n){if(n===(a==null?void 0:a.id))k(p.size+1);else{var u=U(p).indexOf(n);u===-1?(u=U(T).indexOf(n),k(p.size+u+2)):k(u+1)}},k=function(n){var u;i||(n=n+1),(u=x.current)===null||u===void 0||u.scrollIntoView({index:n,behavior:"smooth",done:function(){var E;(E=f.current)===null||E===void 0||(E=E.querySelector('[data-index="'.concat(n,'"] .focusable')))===null||E===void 0||E.focus()}})},Se=function(n){return e("div",{className:"py-4 pb-8"},void 0,e(nt,{id:n,onMoveUp:X,onMoveDown:ee},n))},Me=function(n){return e(At,{id:n,focusedStatusId:a.id,onMoveUp:X,onMoveDown:ee,contextType:"thread"},n)},Ie=function(n){var u=n.replace(/^末pending-/,"");return e(st,{idempotencyKey:u,thread:!0},n)},te=function(n){return n.map(function(u){return u.endsWith("-tombstone")?Se(u):u.startsWith("末pending-")?Ie(u):Me(u)})};O.useEffect(function(){m((a==null?void 0:a.visibility)==="self"?!1:re(a,N))},[a.id]),O.useEffect(function(){var g;(g=x.current)===null||g===void 0||g.scrollToIndex({index:p.size,offset:-146}),setImmediate(function(){var n;return(n=h.current)===null||n===void 0||(n=n.querySelector(".detailed-actualStatus"))===null||n===void 0?void 0:n.focus()})},[a.id,p.size]);var _e=function(n){I(A("COMPARE_HISTORY",{statusId:n.id}))},xe=p.size>0,G=T.size>0,Ce=e("div",{className:D({"pb-4":G})},a.id,M.createElement("div",{ref:h,className:"focusable relative",tabIndex:0,"aria-label":tt(C,a)},e(kt,{status:a,showMedia:W,withMedia:y,onToggleMediaVisibility:F,onOpenCompareHistoryModal:_e}),R?null:M.createElement(M.Fragment,null,e("hr",{className:"-mx-4 mb-2 max-w-[100vw] border-t-2 dark:border-gray-800"}),e(at,{status:a,expandable:!1,space:"lg",withLabels:!0}))),G&&e("hr",{className:"-mx-4 mt-2 max-w-[100vw] border-t-2 dark:border-gray-800"})),w=[];return i||w.push(e("div",{className:"h-4"},"padding")),xe&&w.push.apply(w,se(te(p).toArray())),w.push(Ce),G&&w.push.apply(w,se(te(T).toArray())),e(Y,{space:2,className:D({"h-full":!i,"mt-2":i})},void 0,M.createElement("div",{ref:f,className:D("thread",{"h-full":!i})},M.createElement(rt,{id:"thread",ref:x,hasMore:!!l,onLoadMore:t,placeholderComponent:function(){return e(pe,{showPrivacyIndicator:!0,variant:"slim"})},initialTopMostItemIndex:z,useWindowScroll:i,itemClassName:s,className:D({"h-full":!i})},w)),!_&&e(Et,{}))};export{qt as T,At as a,Lt as g}; +import{cT as Z,cU as Re,cV as we,cW as Oe,cX as Ne,cY as Te,cZ as le,c_ as J,c$ as ke,d0 as Ee,d1 as Ae,d2 as De,d3 as Le,q as j,aU as de,d as ce,g as ve,w as fe,a as e,H as B,F as b,E as $e,W as D,y as H,d4 as ze,L as me,d5 as Fe,O as U,aD as A,u as ge,r as O,d6 as Pe,cL as qe,R as M,b2 as Ue,cK as je,d7 as Be,d8 as He,d9 as ae,A as K,da as Ve,db as We,dc as Qe,t as Ge,a2 as Y,cy as Ke,a$ as Ye,aa as ne,b9 as L,av as Ze,aO as pe,M as he,b8 as Je,f as Xe,dd as re,at as et,de as tt,df as at,bL as se,dg as nt}from"../index-be605fd2.js";import{S as rt}from"./scrollable-list-1e43c72d.js";import{P as st}from"./pending-status-959f7aeb.js";import{S as ot}from"./status-container-e53698d2.js";var it=Z,ut=Re,lt=we,dt=Oe,ct=Ne,vt=Te,ft=[].unshift(0)!==1,mt=function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(o){return o instanceof TypeError}},gt=ft||!mt();it({target:"Array",proto:!0,arity:1,forced:gt},{unshift:function(r){var t=ut(this),s=lt(t),l=arguments.length;if(l){vt(s+l);for(var a=s;a--;){var d=a+l;a in t?t[d]=t[a]:ct(t,d)}for(var i=0;it,d=St(s)?s:Ct(s),i=a?_t(arguments,t):[],c=a?function(){yt(d,this,i)}:d;return r?o(c,l):o(c)}:o},Ot=Z,ye=J,ie=le.set,Nt=wt,ue=ye.setImmediate?Nt(ie,!1):ie;Ot({global:!0,bind:!0,enumerable:!0,forced:ye.setImmediate!==ue},{setImmediate:ue});var Tt=function(r){var t=r.status,s=j(function(m){var f=m.me;return f}),l=de(),a=l.allowedEmoji,d=ce(),i=ve(),c=t.account;if(!c||fe(c)!=="object")return null;var y=function(){d(A("UNAUTHORIZED"))},I=function(f,h){d(A("REBLOGS",{username:f,statusId:h}))},C=function(f,h){d(A("FAVOURITES",{username:f,statusId:h}))},v=function(f,h){d(A("DISLIKES",{username:f,statusId:h}))},_=function(f,h){d(A("REACTIONS",{username:f,statusId:h}))},$=function(){return Fe(U(t.pleroma.get("emoji_reactions")),t.favourites_count,t.favourited,a)},N=function(f){f.preventDefault(),s?I(c.acct,t.id):y()},R=function(){return t.reblogs_count?e(q,{count:t.reblogs_count,onClick:N},void 0,e(b,{id:"status.interactions.reblogs",defaultMessage:"{count, plural, one {Repost} other {Reposts}}",values:{count:t.reblogs_count}})):null},S=function(){return t.quotes_count?e(q,{count:t.quotes_count,to:"/@".concat(t.getIn(["account","acct"]),"/posts/").concat(t.id,"/quotes")},void 0,e(b,{id:"status.interactions.quotes",defaultMessage:"{count, plural, one {Quote} other {Quotes}}",values:{count:t.quotes_count}})):null},p=function(f){f.preventDefault(),s?C(c.acct,t.id):y()},T=function(f){f.preventDefault(),s?v(c.acct,t.id):y()},z=function(){return t.favourites_count?e(q,{count:t.favourites_count,onClick:i.exposableReactions?p:void 0},void 0,e(b,{id:"status.interactions.favourites",defaultMessage:"{count, plural, one {Like} other {Likes}}",values:{count:t.favourites_count}})):null},Q=function(){var f=t.dislikes_count;return f?e(q,{count:t.favourites_count,onClick:i.exposableReactions?T:void 0},void 0,e(b,{id:"status.interactions.dislikes",defaultMessage:"{count, plural, one {Dislike} other {Dislikes}}",values:{count:f}})):null},V=function(){if(!s)return y();_(c.acct,t.id)},W=function(){var f=$(),h=f.reduce(function(x,F){return x+F.get("count")},0);return h?e(q,{count:h,onClick:i.exposableReactions?V:void 0},void 0,e(B,{space:.5,alignItems:"center"},void 0,f.take(3).map(function(x,F){return e($e,{className:"h-4.5 w-4.5 flex-none",emoji:x.get("name"),src:x.get("url")},F)}))):null};return e(B,{space:3},void 0,R(),S(),i.emojiReacts?W():z(),Q())},q=function(r){var t=r.count,s=r.children,l=r.onClick,a=r.to,d=ve(),i=D({"text-gray-600 dark:text-gray-700":!0,"hover:underline":d.exposableReactions,"cursor-default":!d.exposableReactions}),c=e(B,{space:1,alignItems:"center"},void 0,e(H,{weight:"bold"},void 0,ze(t)),e(H,{tag:"div",theme:"muted"},void 0,s));return a?e(me,{to:a,className:i},void 0,c):e("button",{type:"button",onClick:l,className:i},void 0,c)},kt=function(r){var t=r.status,s=r.onOpenCompareHistoryModal,l=r.onToggleMediaVisibility,a=r.showMedia,d=r.withMedia,i=d===void 0?!0:d,c=ge(),y=O.useRef(null),I=function(){s(t)},C=function(){return t.group?e("div",{className:"mb-4"},void 0,e(ae,{avatarSize:42,icon:e(K,{src:Ve,className:"h-4 w-4 text-primary-600 dark:text-accent-blue"}),text:e(b,{id:"status.group",defaultMessage:"Posted in {group}",values:{group:e(me,{to:"/group/".concat(t.group.slug),className:"hover:underline"},void 0,e("bdi",{className:"truncate"},void 0,e("strong",{className:"text-gray-800 dark:text-gray-200"},void 0,e("span",{dangerouslySetInnerHTML:{__html:t.group.display_name_html}}))))}})})):e(ae,{visibility:v.visibility})},v=Pe(t);if(!v)return null;var _=v.account;if(!_||fe(_)!=="object")return null;var $=v.visibility==="self",N=v.sensitive,R=null,S;return v.quote&&(v.pleroma.get("quote_visible",!0)===!1?S=e("div",{className:"quoted-actualStatus-tombstone"},void 0,e("p",{},void 0,e(b,{id:"actualStatuses.quote_tombstone",defaultMessage:"Post is unavailable."}))):S=e(qe,{statusId:v.quote})),v.visibility==="direct"?R=e(K,{className:"h-4 w-4 text-gray-700 dark:text-gray-600",src:We}):v.visibility==="private"&&(R=e(K,{className:"h-4 w-4 text-gray-700 dark:text-gray-600",src:Qe})),e("div",{className:"border-box"},void 0,M.createElement("div",{ref:y,className:"detailed-actualStatus",tabIndex:-1},e("div",{className:"mb-4"},void 0,C(),e(Ue,{account:_,avatarSize:42,hideActions:!0,approvalStatus:v.approval_status},_.id)),e(je,{status:v}),e(Be,{showMedia:a||!1,isSensitive:$||N,onToggleMediaVisibility:l,additionalMediaCondition:i,quote:S,hasMedia:!!(S||v.card||v.media_attachments.size>0),contentOption:{status:v,textSize:"lg",translatable:!0}}),e(B,{justifyContent:"between",alignItems:"center",className:"py-3",wrap:!0},void 0,e(Tt,{status:v}),e(B,{space:1,alignItems:"center"},void 0,R,e("span",{},void 0,e("a",{href:v.url,target:"_blank",rel:"noopener",className:"hover:underline"},void 0,e(H,{tag:"span",theme:"muted",size:"sm"},void 0,e(He,{value:new Date(v.created_at),hour12:!0,year:"numeric",month:"short",day:"2-digit",hour:"numeric",minute:"2-digit"}))),v.edited_at&&M.createElement(M.Fragment,null," · ",e("div",{className:"inline hover:underline",onClick:I,role:"button",tabIndex:0},void 0,e(H,{tag:"span",theme:"muted",size:"sm"},void 0,e(b,{id:"actualStatus.edited",defaultMessage:"Edited {date}",values:{date:c.formatDate(new Date(v.edited_at),{hour12:!0,month:"short",day:"2-digit",hour:"numeric",minute:"2-digit"})}})))))))))},Et=function(){var r=Ge(),t=de(),s=t.displayCta;return s?e(Ye,{className:"space-y-6 px-6 py-12 text-center",variant:"rounded"},void 0,e(Y,{},void 0,e(Ke,{title:e(b,{id:"thread_login.title",defaultMessage:"Continue the conversation"})}),e(H,{},void 0,e(b,{id:"thread_login.message",defaultMessage:"Join {siteTitle} to get the full story and details.",values:{siteTitle:r.title}}))),e(Y,{space:4,className:"mx-auto max-w-xs"},void 0,e(ne,{theme:"tertiary",to:"/login",block:!0},void 0,e(b,{id:"thread_login.login",defaultMessage:"Log in"})),e(ne,{to:"/signup",block:!0},void 0,e(b,{id:"thread_login.signup",defaultMessage:"Sign up"})))):null},At=function(r){var t=r.id,s=r.focusedStatusId,l=j(function(c){return c.contexts.inReplyTos.get(t)}),a=j(function(c){return c.contexts.replies.get(t,L()).size}),d=j(function(c){return!!c.statuses.get(t)}),i=function(){var y=l&&l!==s,I=a>0,C=y||I;return C?e("div",{className:D("absolute left-5 z-[1] hidden w-0.5 bg-gray-200 rtl:left-auto rtl:right-5 dark:bg-primary-800",{"!block top-[calc(12px+42px+1.25rem)] h-[calc(100%-42px-8px-1rem)]":I})}):null};return e("div",{className:"thread__status"},void 0,i(),d?M.createElement(ot,Ze({},r,{showGroup:!1})):e(pe,{showPrivacyIndicator:!0,variant:"default"}))},Dt=he([function(o,r){return r},function(o){return o.contexts.inReplyTos}],function(o,r){for(var t=L(),s=o;s&&!t.includes(s);)t=L([s]).union(t),s=r.get(s);return t}),Lt=he([function(o,r){return r},function(o){return o.contexts.replies}],function(o,r){for(var t=L(),s=[o];s.length>0;){var l=s.shift();if(!l)break;var a=r.get(l);if(t.includes(l))break;o!==l&&(t=t.union([l])),a&&a.reverse().forEach(function(d){s.unshift(d)})}return t}),qt=function(r){var t=r.handleLoadMore,s=r.itemClassName,l=r.next,a=r.status,d=r.useWindowScroll,i=d===void 0?!0:d,c=r.withMedia,y=c===void 0?!0:c,I=ce(),C=ge(),v=Je(),_=v.account,$=Xe(),N=$.get("showSensitiveMedia"),R=(a==null?void 0:a.visibility)==="self",S=j(function(g){var n=L(),u=L();if(a){var P=a.id;n=Dt(g,g.contexts.inReplyTos.get(P)),u=Lt(g,P),n=n.delete(P).subtract(u),u=u.delete(P).subtract(n)}return{status:a,ancestorsIds:n,descendantsIds:u}}),p=S.ancestorsIds,T=S.descendantsIds,z=p.size;!i&&z!==0&&(z=p.size+1);var Q=O.useState((a==null?void 0:a.visibility)==="self"?!1:re(a,N)),V=et(Q,2),W=V[0],m=V[1],f=O.useRef(null),h=O.useRef(null),x=O.useRef(null),F=function(){m(!W)},X=function(n){if(n===(a==null?void 0:a.id))k(p.size-1);else{var u=U(p).indexOf(n);u===-1?(u=U(T).indexOf(n),k(p.size+u)):k(u-1)}},ee=function(n){if(n===(a==null?void 0:a.id))k(p.size+1);else{var u=U(p).indexOf(n);u===-1?(u=U(T).indexOf(n),k(p.size+u+2)):k(u+1)}},k=function(n){var u;i||(n=n+1),(u=x.current)===null||u===void 0||u.scrollIntoView({index:n,behavior:"smooth",done:function(){var E;(E=f.current)===null||E===void 0||(E=E.querySelector('[data-index="'.concat(n,'"] .focusable')))===null||E===void 0||E.focus()}})},Se=function(n){return e("div",{className:"py-4 pb-8"},void 0,e(nt,{id:n,onMoveUp:X,onMoveDown:ee},n))},Me=function(n){return e(At,{id:n,focusedStatusId:a.id,onMoveUp:X,onMoveDown:ee,contextType:"thread"},n)},Ie=function(n){var u=n.replace(/^末pending-/,"");return e(st,{idempotencyKey:u,thread:!0},n)},te=function(n){return n.map(function(u){return u.endsWith("-tombstone")?Se(u):u.startsWith("末pending-")?Ie(u):Me(u)})};O.useEffect(function(){m((a==null?void 0:a.visibility)==="self"?!1:re(a,N))},[a.id]),O.useEffect(function(){var g;(g=x.current)===null||g===void 0||g.scrollToIndex({index:p.size,offset:-146}),setImmediate(function(){var n;return(n=h.current)===null||n===void 0||(n=n.querySelector(".detailed-actualStatus"))===null||n===void 0?void 0:n.focus()})},[a.id,p.size]);var _e=function(n){I(A("COMPARE_HISTORY",{statusId:n.id}))},xe=p.size>0,G=T.size>0,Ce=e("div",{className:D({"pb-4":G})},a.id,M.createElement("div",{ref:h,className:"focusable relative",tabIndex:0,"aria-label":tt(C,a)},e(kt,{status:a,showMedia:W,withMedia:y,onToggleMediaVisibility:F,onOpenCompareHistoryModal:_e}),R?null:M.createElement(M.Fragment,null,e("hr",{className:"-mx-4 mb-2 max-w-[100vw] border-t-2 dark:border-gray-800"}),e(at,{status:a,expandable:!1,space:"lg",withLabels:!0}))),G&&e("hr",{className:"-mx-4 mt-2 max-w-[100vw] border-t-2 dark:border-gray-800"})),w=[];return i||w.push(e("div",{className:"h-4"},"padding")),xe&&w.push.apply(w,se(te(p).toArray())),w.push(Ce),G&&w.push.apply(w,se(te(T).toArray())),e(Y,{space:2,className:D({"h-full":!i,"mt-2":i})},void 0,M.createElement("div",{ref:f,className:D("thread",{"h-full":!i})},M.createElement(rt,{id:"thread",ref:x,hasMore:!!l,onLoadMore:t,placeholderComponent:function(){return e(pe,{showPrivacyIndicator:!0,variant:"slim"})},initialTopMostItemIndex:z,useWindowScroll:i,itemClassName:s,className:D({"h-full":!i})},w)),!_&&e(Et,{}))};export{qt as T,At as a,Lt as g}; diff --git a/packs/js/timeline-585cfcf0.js b/packs/js/timeline-456dace7.js similarity index 87% rename from packs/js/timeline-585cfcf0.js rename to packs/js/timeline-456dace7.js index 55f66e53c..aa427478f 100644 --- a/packs/js/timeline-585cfcf0.js +++ b/packs/js/timeline-456dace7.js @@ -1 +1 @@ -import{as as x,d as C,r,aT as L,q as i,b9 as M,Q as u,cn as d,R as o,a as c,co as k,av as E,o as P,cp as R}from"../index-7380452a.js";import{S as A}from"./scroll-top-button-95820d24.js";import{S as D}from"./status-list-13fdd81b.js";var F=["timelineId","onLoadMore","prefix"],Q=P({queue:{id:"status_list.queue_label",defaultMessage:"Click to see {count} new {count, plural, one {post} other {posts}}"}}),G=function(n){var a=n.timelineId,l=n.onLoadMore,m=n.prefix,v=x(n,F),s=C(),p=r.useCallback(L(),[]),g=i(function(t){var e;return(((e=t.timelines.get(a))===null||e===void 0?void 0:e.items)||M()).last()}),f=i(function(t){return p(t,{type:a,prefix:m})}),T=i(function(t){return(t.timelines.get(a)||{isLoading:!0}).isLoading===!0}),S=i(function(t){var e;return(((e=t.timelines.get(a))===null||e===void 0?void 0:e.isPartial)||!1)===!0}),h=i(function(t){var e;return((e=t.timelines.get(a))===null||e===void 0?void 0:e.hasMore)===!0}),I=i(function(t){var e;return((e=t.timelines.get(a))===null||e===void 0?void 0:e.totalQueuedItemsCount)||0}),$=i(function(t){var e;return!!((e=t.timelines.get(a))!==null&&e!==void 0&&e.feedAccountId)}),b=function(){$||s(R(a,l))},q=r.useCallback(u(function(){s(d(a,!0))},100),[a]),_=r.useCallback(u(function(){s(d(a,!1))},100),[a]);return o.createElement(o.Fragment,null,c(k,{},void 0,c(A,{onClick:b,count:I,message:Q.queue},"timeline-queue-button-header")),o.createElement(D,E({timelineId:a,onScrollToTop:q,onScroll:_,lastStatusId:g,statusIds:f,isLoading:T,isPartial:S,hasMore:h,onLoadMore:l},v)))};export{G as T}; +import{as as x,d as C,r,aT as L,q as i,b9 as M,Q as u,cn as d,R as o,a as c,co as k,av as E,o as P,cp as R}from"../index-be605fd2.js";import{S as A}from"./scroll-top-button-73ec9889.js";import{S as D}from"./status-list-c10445e1.js";var F=["timelineId","onLoadMore","prefix"],Q=P({queue:{id:"status_list.queue_label",defaultMessage:"Click to see {count} new {count, plural, one {post} other {posts}}"}}),G=function(n){var a=n.timelineId,l=n.onLoadMore,m=n.prefix,v=x(n,F),s=C(),p=r.useCallback(L(),[]),g=i(function(t){var e;return(((e=t.timelines.get(a))===null||e===void 0?void 0:e.items)||M()).last()}),f=i(function(t){return p(t,{type:a,prefix:m})}),T=i(function(t){return(t.timelines.get(a)||{isLoading:!0}).isLoading===!0}),S=i(function(t){var e;return(((e=t.timelines.get(a))===null||e===void 0?void 0:e.isPartial)||!1)===!0}),h=i(function(t){var e;return((e=t.timelines.get(a))===null||e===void 0?void 0:e.hasMore)===!0}),I=i(function(t){var e;return((e=t.timelines.get(a))===null||e===void 0?void 0:e.totalQueuedItemsCount)||0}),$=i(function(t){var e;return!!((e=t.timelines.get(a))!==null&&e!==void 0&&e.feedAccountId)}),b=function(){$||s(R(a,l))},q=r.useCallback(u(function(){s(d(a,!0))},100),[a]),_=r.useCallback(u(function(){s(d(a,!1))},100),[a]);return o.createElement(o.Fragment,null,c(k,{},void 0,c(A,{onClick:b,count:I,message:Q.queue},"timeline-queue-button-header")),o.createElement(D,E({timelineId:a,onScrollToTop:q,onScroll:_,lastStatusId:g,statusIds:f,isLoading:T,isPartial:S,hasMore:h,onLoadMore:l},v)))};export{G as T}; diff --git a/packs/js/trends-panel-7e8ff0ce.js b/packs/js/trends-panel-ab54a034.js similarity index 89% rename from packs/js/trends-panel-7e8ff0ce.js rename to packs/js/trends-panel-ab54a034.js index 5b36afbbc..b19d6a440 100644 --- a/packs/js/trends-panel-7e8ff0ce.js +++ b/packs/js/trends-panel-ab54a034.js @@ -1 +1 @@ -import{R as c,a as e,eV as m,a2 as g,eW as u,bj as h,d as v,cs as f,hx as T,hy as F,u as y,F as w,L as x,y as A,o as M,eT as k}from"../index-7380452a.js";import{H as z}from"./hashtag-1d2f7520.js";import{W as D}from"./widget-2ac720e4.js";import"./arrow-right-b75290c7.js";const H=function(i){var t=i.limit,s=u(6,3),l=u(10,3);return c.createElement(c.Fragment,null,new Array(t).fill(void 0).map(function(r,n){return e(g,{className:"animate-pulse text-primary-200 dark:text-primary-700"},n,e("p",{},void 0,m(s)),e("p",{},void 0,m(l)))}))};function P(){const i=h(),t=v();return f(["trends"],async()=>{const{data:r}=await i.get("/api/v1/trends");return t(T(r)),r.map(a=>F(a))},{placeholderData:[],staleTime:6e5})}var R=M({viewAll:{id:"trendsPanel.viewAll",defaultMessage:"View all"}}),_=function(t){var s=t.limit,l=v(),r=y(),n=P(),a=n.data,o=n.isFetching,p=function(){l(k("hashtags"))};return!o&&!(a!=null&&a.length)?null:e(D,{title:e(w,{id:"trends.title",defaultMessage:"Trends"}),action:e(x,{className:"text-right",to:"/search",onClick:p},void 0,e(A,{tag:"span",theme:"primary",size:"sm",className:"hover:underline"},void 0,r.formatMessage(R.viewAll)))},void 0,o?e(H,{limit:s}):a==null?void 0:a.slice(0,s).map(function(d){return e(z,{hashtag:d},d.name)}))};export{_ as default}; +import{R as c,a as e,eV as m,a2 as g,eW as u,bj as h,d as v,cs as f,hx as T,hy as F,u as y,F as w,L as x,y as A,o as M,eT as k}from"../index-be605fd2.js";import{H as z}from"./hashtag-394c7092.js";import{W as D}from"./widget-84f84d09.js";import"./arrow-right-b75290c7.js";const H=function(i){var t=i.limit,s=u(6,3),l=u(10,3);return c.createElement(c.Fragment,null,new Array(t).fill(void 0).map(function(r,n){return e(g,{className:"animate-pulse text-primary-200 dark:text-primary-700"},n,e("p",{},void 0,m(s)),e("p",{},void 0,m(l)))}))};function P(){const i=h(),t=v();return f(["trends"],async()=>{const{data:r}=await i.get("/api/v1/trends");return t(T(r)),r.map(a=>F(a))},{placeholderData:[],staleTime:6e5})}var R=M({viewAll:{id:"trendsPanel.viewAll",defaultMessage:"View all"}}),_=function(t){var s=t.limit,l=v(),r=y(),n=P(),a=n.data,o=n.isFetching,p=function(){l(k("hashtags"))};return!o&&!(a!=null&&a.length)?null:e(D,{title:e(w,{id:"trends.title",defaultMessage:"Trends"}),action:e(x,{className:"text-right",to:"/search",onClick:p},void 0,e(A,{tag:"span",theme:"primary",size:"sm",className:"hover:underline"},void 0,r.formatMessage(R.viewAll)))},void 0,o?e(H,{limit:s}):a==null?void 0:a.slice(0,s).map(function(d){return e(z,{hashtag:d},d.name)}))};export{_ as default}; diff --git a/packs/js/truth-6b332fbc.js b/packs/js/truth-ba20639e.js similarity index 69% rename from packs/js/truth-6b332fbc.js rename to packs/js/truth-ba20639e.js index 32ad4873b..72386b246 100644 --- a/packs/js/truth-6b332fbc.js +++ b/packs/js/truth-ba20639e.js @@ -1 +1 @@ -import{kw as t,l4 as c,N as n,cw as i,ct as o}from"../index-7380452a.js";const d=t.object({impression:t.string(),card:c,expires_at:t.string(),reason:t.string().catch("")}),h={getAds:async e=>{const s=e(),r=n(s);try{const{data:a}=await i.get("/api/v2/truth/ads?device=desktop",{headers:{"Accept-Language":t.string().catch("*").parse(r.get("locale"))}});return o(d).parse(a)}catch{}return[]}};export{h as default}; +import{kw as t,l4 as c,N as n,cw as i,ct as o}from"../index-be605fd2.js";const d=t.object({impression:t.string(),card:c,expires_at:t.string(),reason:t.string().catch("")}),h={getAds:async e=>{const s=e(),r=n(s);try{const{data:a}=await i.get("/api/v2/truth/ads?device=desktop",{headers:{"Accept-Language":t.string().catch("*").parse(r.get("locale"))}});return o(d).parse(a)}catch{}return[]}};export{h as default}; diff --git a/packs/js/unauthorized-modal-96327280.js b/packs/js/unauthorized-modal-7c536f36.js similarity index 98% rename from packs/js/unauthorized-modal-96327280.js rename to packs/js/unauthorized-modal-7c536f36.js index ab5a43879..e8582aa05 100644 --- a/packs/js/unauthorized-modal-96327280.js +++ b/packs/js/unauthorized-modal-7c536f36.js @@ -1 +1 @@ -import{u as P,a7 as k,d as T,t as x,ek as F,q as N,am as z,g as U,r as D,at as j,a as e,a2 as H,y as d,F as t,bu as h,bE as V,bG as q,aa as B,o as G,el as J,bp as Y}from"../index-7380452a.js";var y=G({close:{id:"lightbox.close",defaultMessage:"Close"},accountPlaceholder:{id:"remote_interaction.account_placeholder",defaultMessage:"Enter your username@domain you want to act from"},userNotFoundError:{id:"remote_interaction.user_not_found_error",defaultMessage:"Couldn't find given user"}}),W=function(s){var i=s.action,u=s.onClose,C=s.account,A=s.ap_id,c=P(),f=k(),I=T(),m=x(),R=F(),r=R.isOpen,S=N(function(n){var o;return(o=z(n,C))===null||o===void 0?void 0:o.display_name}),g=U(),b=D.useState(""),v=j(b,2),_=v[0],E=v[1],L=function(o){E(o.target.value)},l=function(){u("UNAUTHORIZED")},w=function(o){o.preventDefault(),I(J(A,_)).then(function(a){window.open(a,"_new","noopener,noreferrer"),u("UNAUTHORIZED")}).catch(function(a){a.message==="Couldn't find user"&&Y.error(c.formatMessage(y.userNotFoundError))})},p=function(){f.push("/login"),l()},M=function(){f.push("/signup"),l()},O=function(){var o,a;return i==="FOLLOW"?(o=e(t,{id:"remote_interaction.follow_title",defaultMessage:"Follow {user} remotely",values:{user:S}}),a=e(t,{id:"remote_interaction.follow",defaultMessage:"Proceed to follow"})):i==="REPLY"?(o=e(t,{id:"remote_interaction.reply_title",defaultMessage:"Reply to a post remotely"}),a=e(t,{id:"remote_interaction.reply",defaultMessage:"Proceed to reply"})):i==="REBLOG"?(o=e(t,{id:"remote_interaction.reblog_title",defaultMessage:"Reblog a post remotely"}),a=e(t,{id:"remote_interaction.reblog",defaultMessage:"Proceed to repost"})):i==="FAVOURITE"?(o=e(t,{id:"remote_interaction.favourite_title",defaultMessage:"Like a post remotely"}),a=e(t,{id:"remote_interaction.favourite",defaultMessage:"Proceed to like"})):i==="DISLIKE"?(o=e(t,{id:"remote_interaction.dislike_title",defaultMessage:"Dislike a post remotely"}),a=e(t,{id:"remote_interaction.dislike",defaultMessage:"Proceed to dislike"})):i==="POLL_VOTE"?(o=e(t,{id:"remote_interaction.poll_vote_title",defaultMessage:"Vote in a poll remotely"}),a=e(t,{id:"remote_interaction.poll_vote",defaultMessage:"Proceed to vote"})):i==="JOIN"&&(o=e(t,{id:"remote_interaction.event_join_title",defaultMessage:"Join an event remotely"}),a=e(t,{id:"remote_interaction.event_join",defaultMessage:"Proceed to join"})),e(h,{title:o,onClose:l,confirmationAction:p,confirmationText:e(t,{id:"account.login",defaultMessage:"Log in"}),secondaryAction:r?M:void 0,secondaryText:r?e(t,{id:"account.register",defaultMessage:"Sign up"}):void 0},void 0,e("div",{className:"remote-interaction-modal__content"},void 0,e(V,{className:"remote-interaction-modal__fields",onSubmit:w},void 0,e(q,{placeholder:c.formatMessage(y.accountPlaceholder),name:"remote_follow[acct]",value:_,autoCorrect:"off",autoCapitalize:"off",onChange:L,required:!0}),e(B,{type:"submit",theme:"primary"},void 0,a)),e("div",{className:"remote-interaction-modal__divider"},void 0,e(d,{align:"center"},void 0,e(t,{id:"remote_interaction.divider",defaultMessage:"or"}))),r&&e(d,{size:"lg",weight:"medium"},void 0,e(t,{id:"unauthorized_modal.title",defaultMessage:"Sign up for {site_title}",values:{site_title:m.title}}))))};return i&&g.remoteInteractions&&g.federating?O():e(h,{title:e(t,{id:"unauthorized_modal.title",defaultMessage:"Sign up for {site_title}",values:{site_title:m.title}}),onClose:l,confirmationAction:p,confirmationText:e(t,{id:"account.login",defaultMessage:"Log in"}),secondaryAction:r?M:void 0,secondaryText:r?e(t,{id:"account.register",defaultMessage:"Sign up"}):void 0},void 0,e(H,{},void 0,e(d,{},void 0,e(t,{id:"unauthorized_modal.text",defaultMessage:"You need to be logged in to do that."}))))};export{W as default}; +import{u as P,a7 as k,d as T,t as x,ek as F,q as N,am as z,g as U,r as D,at as j,a as e,a2 as H,y as d,F as t,bu as h,bE as V,bG as q,aa as B,o as G,el as J,bp as Y}from"../index-be605fd2.js";var y=G({close:{id:"lightbox.close",defaultMessage:"Close"},accountPlaceholder:{id:"remote_interaction.account_placeholder",defaultMessage:"Enter your username@domain you want to act from"},userNotFoundError:{id:"remote_interaction.user_not_found_error",defaultMessage:"Couldn't find given user"}}),W=function(s){var i=s.action,u=s.onClose,C=s.account,A=s.ap_id,c=P(),f=k(),I=T(),m=x(),R=F(),r=R.isOpen,S=N(function(n){var o;return(o=z(n,C))===null||o===void 0?void 0:o.display_name}),g=U(),b=D.useState(""),v=j(b,2),_=v[0],E=v[1],L=function(o){E(o.target.value)},l=function(){u("UNAUTHORIZED")},w=function(o){o.preventDefault(),I(J(A,_)).then(function(a){window.open(a,"_new","noopener,noreferrer"),u("UNAUTHORIZED")}).catch(function(a){a.message==="Couldn't find user"&&Y.error(c.formatMessage(y.userNotFoundError))})},p=function(){f.push("/login"),l()},M=function(){f.push("/signup"),l()},O=function(){var o,a;return i==="FOLLOW"?(o=e(t,{id:"remote_interaction.follow_title",defaultMessage:"Follow {user} remotely",values:{user:S}}),a=e(t,{id:"remote_interaction.follow",defaultMessage:"Proceed to follow"})):i==="REPLY"?(o=e(t,{id:"remote_interaction.reply_title",defaultMessage:"Reply to a post remotely"}),a=e(t,{id:"remote_interaction.reply",defaultMessage:"Proceed to reply"})):i==="REBLOG"?(o=e(t,{id:"remote_interaction.reblog_title",defaultMessage:"Reblog a post remotely"}),a=e(t,{id:"remote_interaction.reblog",defaultMessage:"Proceed to repost"})):i==="FAVOURITE"?(o=e(t,{id:"remote_interaction.favourite_title",defaultMessage:"Like a post remotely"}),a=e(t,{id:"remote_interaction.favourite",defaultMessage:"Proceed to like"})):i==="DISLIKE"?(o=e(t,{id:"remote_interaction.dislike_title",defaultMessage:"Dislike a post remotely"}),a=e(t,{id:"remote_interaction.dislike",defaultMessage:"Proceed to dislike"})):i==="POLL_VOTE"?(o=e(t,{id:"remote_interaction.poll_vote_title",defaultMessage:"Vote in a poll remotely"}),a=e(t,{id:"remote_interaction.poll_vote",defaultMessage:"Proceed to vote"})):i==="JOIN"&&(o=e(t,{id:"remote_interaction.event_join_title",defaultMessage:"Join an event remotely"}),a=e(t,{id:"remote_interaction.event_join",defaultMessage:"Proceed to join"})),e(h,{title:o,onClose:l,confirmationAction:p,confirmationText:e(t,{id:"account.login",defaultMessage:"Log in"}),secondaryAction:r?M:void 0,secondaryText:r?e(t,{id:"account.register",defaultMessage:"Sign up"}):void 0},void 0,e("div",{className:"remote-interaction-modal__content"},void 0,e(V,{className:"remote-interaction-modal__fields",onSubmit:w},void 0,e(q,{placeholder:c.formatMessage(y.accountPlaceholder),name:"remote_follow[acct]",value:_,autoCorrect:"off",autoCapitalize:"off",onChange:L,required:!0}),e(B,{type:"submit",theme:"primary"},void 0,a)),e("div",{className:"remote-interaction-modal__divider"},void 0,e(d,{align:"center"},void 0,e(t,{id:"remote_interaction.divider",defaultMessage:"or"}))),r&&e(d,{size:"lg",weight:"medium"},void 0,e(t,{id:"unauthorized_modal.title",defaultMessage:"Sign up for {site_title}",values:{site_title:m.title}}))))};return i&&g.remoteInteractions&&g.federating?O():e(h,{title:e(t,{id:"unauthorized_modal.title",defaultMessage:"Sign up for {site_title}",values:{site_title:m.title}}),onClose:l,confirmationAction:p,confirmationText:e(t,{id:"account.login",defaultMessage:"Log in"}),secondaryAction:r?M:void 0,secondaryText:r?e(t,{id:"account.register",defaultMessage:"Sign up"}):void 0},void 0,e(H,{},void 0,e(d,{},void 0,e(t,{id:"unauthorized_modal.text",defaultMessage:"You need to be logged in to do that."}))))};export{W as default}; diff --git a/packs/js/useAccountList-6ddad2aa.js b/packs/js/useAccountList-32cce5e6.js similarity index 93% rename from packs/js/useAccountList-6ddad2aa.js rename to packs/js/useAccountList-32cce5e6.js index 5cf1b1ad5..3738b1258 100644 --- a/packs/js/useAccountList-6ddad2aa.js +++ b/packs/js/useAccountList-32cce5e6.js @@ -1 +1 @@ -import{bj as n,ar as f,bq as h,br as g,bm as l,bk as m,bs as d}from"../index-7380452a.js";function w(s,e){const a=n(),{isLoggedIn:i}=f();function c(t){const p=t.map(b=>`id[]=${b}`).join("&");return a.get(`/api/v1/accounts/relationships?${p}`)}const{entityMap:u,...r}=h([l.RELATIONSHIPS,...s],e,c,{schema:g,enabled:i});return{relationships:u,...r}}function o(s,e,a={}){const{entities:i,...c}=m([l.ACCOUNTS,...s],e,{schema:d,enabled:a.enabled}),{relationships:u}=w(s,i.map(({id:t})=>t));return{accounts:i.map(t=>({...t,relationship:u[t.id]})),...c}}function S(){const s=n();return o(["blocks"],()=>s.get("/api/v1/blocks"))}function k(){const s=n();return o(["mutes"],()=>s.get("/api/v1/mutes"))}function A(s){const e=n();return o([s,"following"],()=>e.get(`/api/v1/accounts/${s}/following`),{enabled:!!s})}function E(s){const e=n();return o([s,"followers"],()=>e.get(`/api/v1/accounts/${s}/followers`),{enabled:!!s})}export{A as a,S as b,k as c,E as u}; +import{bj as n,ar as f,bq as h,br as g,bm as l,bk as m,bs as d}from"../index-be605fd2.js";function w(s,e){const a=n(),{isLoggedIn:i}=f();function c(t){const p=t.map(b=>`id[]=${b}`).join("&");return a.get(`/api/v1/accounts/relationships?${p}`)}const{entityMap:u,...r}=h([l.RELATIONSHIPS,...s],e,c,{schema:g,enabled:i});return{relationships:u,...r}}function o(s,e,a={}){const{entities:i,...c}=m([l.ACCOUNTS,...s],e,{schema:d,enabled:a.enabled}),{relationships:u}=w(s,i.map(({id:t})=>t));return{accounts:i.map(t=>({...t,relationship:u[t.id]})),...c}}function S(){const s=n();return o(["blocks"],()=>s.get("/api/v1/blocks"))}function k(){const s=n();return o(["mutes"],()=>s.get("/api/v1/mutes"))}function A(s){const e=n();return o([s,"following"],()=>e.get(`/api/v1/accounts/${s}/following`),{enabled:!!s})}function E(s){const e=n();return o([s,"followers"],()=>e.get(`/api/v1/accounts/${s}/followers`),{enabled:!!s})}export{A as a,S as b,k as c,E as u}; diff --git a/packs/js/useDebounce-0d4ed135.js b/packs/js/useDebounce-93e74587.js similarity index 66% rename from packs/js/useDebounce-0d4ed135.js rename to packs/js/useDebounce-93e74587.js index 70c6a8119..beb588bf9 100644 --- a/packs/js/useDebounce-0d4ed135.js +++ b/packs/js/useDebounce-93e74587.js @@ -1 +1 @@ -import{r as o}from"../index-7380452a.js";const n=(e,t)=>{const[r,s]=o.useState(e);return o.useEffect(()=>{const u=setTimeout(()=>s(e),t);return()=>{clearTimeout(u)}},[e,t]),r};export{n as u}; +import{r as o}from"../index-be605fd2.js";const n=(e,t)=>{const[r,s]=o.useState(e);return o.useEffect(()=>{const u=setTimeout(()=>s(e),t);return()=>{clearTimeout(u)}},[e,t]),r};export{n as u}; diff --git a/packs/js/useGroupMembers-d353ac79.js b/packs/js/useGroupMembers-4d4508c4.js similarity index 74% rename from packs/js/useGroupMembers-d353ac79.js rename to packs/js/useGroupMembers-4d4508c4.js index 7cbc9a64b..fca115b9c 100644 --- a/packs/js/useGroupMembers-d353ac79.js +++ b/packs/js/useGroupMembers-4d4508c4.js @@ -1 +1 @@ -import{bj as m,bk as u,bm as a,kx as o}from"../index-7380452a.js";function n(e,s){const t=m(),{entities:r,...i}=u([a.GROUP_MEMBERSHIPS,e,s],()=>t.get(`/api/v1/groups/${e}/memberships?role=${s}`),{schema:o});return{...i,groupMembers:r}}export{n as u}; +import{bj as m,bk as u,bm as a,kx as o}from"../index-be605fd2.js";function n(e,s){const t=m(),{entities:r,...i}=u([a.GROUP_MEMBERSHIPS,e,s],()=>t.get(`/api/v1/groups/${e}/memberships?role=${s}`),{schema:o});return{...i,groupMembers:r}}export{n as u}; diff --git a/packs/js/useGroupTag-49646e08.js b/packs/js/useGroupTag-9c7d1cac.js similarity index 68% rename from packs/js/useGroupTag-49646e08.js rename to packs/js/useGroupTag-9c7d1cac.js index 5f52075b6..06a06c784 100644 --- a/packs/js/useGroupTag-49646e08.js +++ b/packs/js/useGroupTag-9c7d1cac.js @@ -1 +1 @@ -import{bj as u,hH as i,ku as n,bm as o}from"../index-7380452a.js";function p(t){const s=u(),{entity:a,...e}=i([o.GROUP_TAGS,t],()=>s.get(`/api/v1/tags/${t}`),{schema:n});return{...e,tag:a}}export{p as u}; +import{bj as u,hH as i,ku as n,bm as o}from"../index-be605fd2.js";function p(t){const s=u(),{entity:a,...e}=i([o.GROUP_TAGS,t],()=>s.get(`/api/v1/tags/${t}`),{schema:n});return{...e,tag:a}}export{p as u}; diff --git a/packs/js/useGroupTags-604f28f5.js b/packs/js/useGroupTags-a5aa31b5.js similarity index 71% rename from packs/js/useGroupTags-604f28f5.js rename to packs/js/useGroupTags-a5aa31b5.js index 20bf09ce6..b0aad3dfa 100644 --- a/packs/js/useGroupTags-604f28f5.js +++ b/packs/js/useGroupTags-a5aa31b5.js @@ -1 +1 @@ -import{bj as i,bk as u,bm as r,ku as n}from"../index-7380452a.js";function p(s){const t=i(),{entities:e,...a}=u([r.GROUP_TAGS,s],()=>t.get(`/api/v1/truth/trends/groups/${s}/tags`),{schema:n});return{...a,tags:e}}export{p as u}; +import{bj as i,bk as u,bm as r,ku as n}from"../index-be605fd2.js";function p(s){const t=i(),{entities:e,...a}=u([r.GROUP_TAGS,s],()=>t.get(`/api/v1/truth/trends/groups/${s}/tags`),{schema:n});return{...a,tags:e}}export{p as u}; diff --git a/packs/js/useImageField-871ba8c6.js b/packs/js/useImageField-712debc5.js similarity index 64% rename from packs/js/useImageField-871ba8c6.js rename to packs/js/useImageField-712debc5.js index 583c8f6e3..a4e382a55 100644 --- a/packs/js/useImageField-871ba8c6.js +++ b/packs/js/useImageField-712debc5.js @@ -1 +1 @@ -import{r as o,fa as s}from"../index-7380452a.js";import{u as i}from"./header-picker-eba39776.js";function f(e={}){const[r,a]=o.useState();return{src:i(r)||(r===null?void 0:e.preview),file:r,onChange:async({target:{files:n}})=>{const t=n==null?void 0:n.item(0);t&&(typeof e.maxPixels=="number"?a(await s(t,e.maxPixels)):a(t))},onClear:()=>a(null)}}export{f as u}; +import{r as o,fa as s}from"../index-be605fd2.js";import{u as i}from"./header-picker-cd9089b7.js";function f(e={}){const[r,a]=o.useState();return{src:i(r)||(r===null?void 0:e.preview),file:r,onChange:async({target:{files:n}})=>{const t=n==null?void 0:n.item(0);t&&(typeof e.maxPixels=="number"?a(await s(t,e.maxPixels)):a(t))},onClear:()=>a(null)}}export{f as u}; diff --git a/packs/js/usePatronUser-de20e9c0.js b/packs/js/usePatronUser-c97ecc3d.js similarity index 75% rename from packs/js/usePatronUser-de20e9c0.js rename to packs/js/usePatronUser-c97ecc3d.js index e5245cd80..72085ef88 100644 --- a/packs/js/usePatronUser-de20e9c0.js +++ b/packs/js/usePatronUser-c97ecc3d.js @@ -1 +1 @@ -import{bj as a,hH as o,hI as r,bm as i}from"../index-7380452a.js";function c(t){const e=a(),{entity:n,...s}=o([i.PATRON_USERS,t||""],()=>e.get(`/api/patron/v1/accounts/${encodeURIComponent(t)}`),{schema:r,enabled:!!t});return{patronUser:n,...s}}export{c as u}; +import{bj as a,hH as o,hI as r,bm as i}from"../index-be605fd2.js";function c(t){const e=a(),{entity:n,...s}=o([i.PATRON_USERS,t||""],()=>e.get(`/api/patron/v1/accounts/${encodeURIComponent(t)}`),{schema:r,enabled:!!t});return{patronUser:n,...s}}export{c as u}; diff --git a/packs/js/usePopper-24b8ee92.js b/packs/js/usePopper-4a92d7ef.js similarity index 99% rename from packs/js/usePopper-24b8ee92.js rename to packs/js/usePopper-4a92d7ef.js index 0037ed3aa..094adea24 100644 --- a/packs/js/usePopper-24b8ee92.js +++ b/packs/js/usePopper-4a92d7ef.js @@ -1 +1 @@ -import{r as G,iJ as de,iK as me}from"../index-7380452a.js";var Pr=function(t){return Array.isArray(t)?t[0]:t},he=function(t){if(typeof t=="function"){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a"u")return!1;var t=C(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function $e(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},a=t.attributes[r]||{},i=t.elements[r];!k(i)||!F(i)||(Object.assign(i.style,n),Object.keys(a).forEach(function(u){var o=a[u];o===!1?i.removeAttribute(u):i.setAttribute(u,o===!0?"":o)}))})}function Se(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var a=t.elements[n],i=t.attributes[n]||{},u=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),o=u.reduce(function(s,p){return s[p]="",s},{});!k(a)||!F(a)||(Object.assign(a.style,o),Object.keys(i).forEach(function(s){a.removeAttribute(s)}))})}}const Be={name:"applyStyles",enabled:!0,phase:"write",fn:$e,effect:Se,requires:["computeStyles"]};function H(e){return e.split("-")[0]}var J=Math.max,gt=Math.min,_=Math.round;function At(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function ee(){return!/^((?!chrome|android).)*safari/i.test(At())}function tt(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),a=1,i=1;t&&k(e)&&(a=e.offsetWidth>0&&_(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&_(n.height)/e.offsetHeight||1);var u=K(e)?C(e):window,o=u.visualViewport,s=!ee()&&r,p=(n.left+(s&&o?o.offsetLeft:0))/a,f=(n.top+(s&&o?o.offsetTop:0))/i,l=n.width/a,m=n.height/i;return{width:l,height:m,top:f,right:p+l,bottom:f+m,left:p,x:p,y:f}}function jt(e){var t=tt(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function re(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Rt(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function V(e){return C(e).getComputedStyle(e)}function Ce(e){return["table","td","th"].indexOf(F(e))>=0}function N(e){return((K(e)?e.ownerDocument:e.document)||window.document).documentElement}function bt(e){return F(e)==="html"?e:e.assignedSlot||e.parentNode||(Rt(e)?e.host:null)||N(e)}function Xt(e){return!k(e)||V(e).position==="fixed"?null:e.offsetParent}function ke(e){var t=/firefox/i.test(At()),r=/Trident/i.test(At());if(r&&k(e)){var n=V(e);if(n.position==="fixed")return null}var a=bt(e);for(Rt(a)&&(a=a.host);k(a)&&["html","body"].indexOf(F(a))<0;){var i=V(a);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return a;a=a.parentNode}return null}function pt(e){for(var t=C(e),r=Xt(e);r&&Ce(r)&&V(r).position==="static";)r=Xt(r);return r&&(F(r)==="html"||F(r)==="body"&&V(r).position==="static")?t:r||ke(e)||t}function $t(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function it(e,t,r){return J(e,gt(t,r))}function Me(e,t,r){var n=it(e,t,r);return n>r?r:n}function ne(){return{top:0,right:0,bottom:0,left:0}}function ae(e){return Object.assign({},ne(),e)}function ie(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var Te=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,ae(typeof t!="number"?t:ie(t,ut))};function Le(e){var t,r=e.state,n=e.name,a=e.options,i=r.elements.arrow,u=r.modifiersData.popperOffsets,o=H(r.placement),s=$t(o),p=[S,T].indexOf(o)>=0,f=p?"height":"width";if(!(!i||!u)){var l=Te(a.padding,r),m=jt(i),c=s==="y"?$:S,y=s==="y"?M:T,h=r.rects.reference[f]+r.rects.reference[s]-u[s]-r.rects.popper[f],v=u[s]-r.rects.reference[s],w=pt(i),O=w?s==="y"?w.clientHeight||0:w.clientWidth||0:0,E=h/2-v/2,d=l[c],g=O-m[f]-l[y],b=O/2-m[f]/2+E,x=it(d,b,g),D=s;r.modifiersData[n]=(t={},t[D]=x,t.centerOffset=x-b,t)}}function We(e){var t=e.state,r=e.options,n=r.element,a=n===void 0?"[data-popper-arrow]":n;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||re(t.elements.popper,a)&&(t.elements.arrow=a))}const He={name:"arrow",enabled:!0,phase:"main",fn:Le,effect:We,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function et(e){return e.split("-")[1]}var Fe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ve(e,t){var r=e.x,n=e.y,a=t.devicePixelRatio||1;return{x:_(r*a)/a||0,y:_(n*a)/a||0}}function Yt(e){var t,r=e.popper,n=e.popperRect,a=e.placement,i=e.variation,u=e.offsets,o=e.position,s=e.gpuAcceleration,p=e.adaptive,f=e.roundOffsets,l=e.isFixed,m=u.x,c=m===void 0?0:m,y=u.y,h=y===void 0?0:y,v=typeof f=="function"?f({x:c,y:h}):{x:c,y:h};c=v.x,h=v.y;var w=u.hasOwnProperty("x"),O=u.hasOwnProperty("y"),E=S,d=$,g=window;if(p){var b=pt(r),x="clientHeight",D="clientWidth";if(b===C(r)&&(b=N(r),V(b).position!=="static"&&o==="absolute"&&(x="scrollHeight",D="scrollWidth")),b=b,a===$||(a===S||a===T)&&i===st){d=M;var P=l&&b===g&&g.visualViewport?g.visualViewport.height:b[x];h-=P-n.height,h*=s?1:-1}if(a===S||(a===$||a===M)&&i===st){E=T;var A=l&&b===g&&g.visualViewport?g.visualViewport.width:b[D];c-=A-n.width,c*=s?1:-1}}var R=Object.assign({position:o},p&&Fe),L=f===!0?Ve({x:c,y:h},C(r)):{x:c,y:h};if(c=L.x,h=L.y,s){var j;return Object.assign({},R,(j={},j[d]=O?"0":"",j[E]=w?"0":"",j.transform=(g.devicePixelRatio||1)<=1?"translate("+c+"px, "+h+"px)":"translate3d("+c+"px, "+h+"px, 0)",j))}return Object.assign({},R,(t={},t[d]=O?h+"px":"",t[E]=w?c+"px":"",t.transform="",t))}function Ie(e){var t=e.state,r=e.options,n=r.gpuAcceleration,a=n===void 0?!0:n,i=r.adaptive,u=i===void 0?!0:i,o=r.roundOffsets,s=o===void 0?!0:o,p={placement:H(t.placement),variation:et(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Yt(Object.assign({},p,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:u,roundOffsets:s})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Yt(Object.assign({},p,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Ne={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Ie,data:{}};var ht={passive:!0};function Ue(e){var t=e.state,r=e.instance,n=e.options,a=n.scroll,i=a===void 0?!0:a,u=n.resize,o=u===void 0?!0:u,s=C(t.elements.popper),p=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&p.forEach(function(f){f.addEventListener("scroll",r.update,ht)}),o&&s.addEventListener("resize",r.update,ht),function(){i&&p.forEach(function(f){f.removeEventListener("scroll",r.update,ht)}),o&&s.removeEventListener("resize",r.update,ht)}}const qe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ue,data:{}};var Xe={left:"right",right:"left",bottom:"top",top:"bottom"};function yt(e){return e.replace(/left|right|bottom|top/g,function(t){return Xe[t]})}var Ye={start:"end",end:"start"};function zt(e){return e.replace(/start|end/g,function(t){return Ye[t]})}function St(e){var t=C(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function Bt(e){return tt(N(e)).left+St(e).scrollLeft}function ze(e,t){var r=C(e),n=N(e),a=r.visualViewport,i=n.clientWidth,u=n.clientHeight,o=0,s=0;if(a){i=a.width,u=a.height;var p=ee();(p||!p&&t==="fixed")&&(o=a.offsetLeft,s=a.offsetTop)}return{width:i,height:u,x:o+Bt(e),y:s}}function Ge(e){var t,r=N(e),n=St(e),a=(t=e.ownerDocument)==null?void 0:t.body,i=J(r.scrollWidth,r.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),u=J(r.scrollHeight,r.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),o=-n.scrollLeft+Bt(e),s=-n.scrollTop;return V(a||r).direction==="rtl"&&(o+=J(r.clientWidth,a?a.clientWidth:0)-i),{width:i,height:u,x:o,y:s}}function Ct(e){var t=V(e),r=t.overflow,n=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+a+n)}function oe(e){return["html","body","#document"].indexOf(F(e))>=0?e.ownerDocument.body:k(e)&&Ct(e)?e:oe(bt(e))}function ot(e,t){var r;t===void 0&&(t=[]);var n=oe(e),a=n===((r=e.ownerDocument)==null?void 0:r.body),i=C(n),u=a?[i].concat(i.visualViewport||[],Ct(n)?n:[]):n,o=t.concat(u);return a?o:o.concat(ot(bt(u)))}function Pt(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Je(e,t){var r=tt(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function Gt(e,t,r){return t===_t?Pt(ze(e,r)):K(t)?Je(t,r):Pt(Ge(N(e)))}function Ke(e){var t=ot(bt(e)),r=["absolute","fixed"].indexOf(V(e).position)>=0,n=r&&k(e)?pt(e):e;return K(n)?t.filter(function(a){return K(a)&&re(a,n)&&F(a)!=="body"}):[]}function Qe(e,t,r,n){var a=t==="clippingParents"?Ke(e):[].concat(t),i=[].concat(a,[r]),u=i[0],o=i.reduce(function(s,p){var f=Gt(e,p,n);return s.top=J(f.top,s.top),s.right=gt(f.right,s.right),s.bottom=gt(f.bottom,s.bottom),s.left=J(f.left,s.left),s},Gt(e,u,n));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function se(e){var t=e.reference,r=e.element,n=e.placement,a=n?H(n):null,i=n?et(n):null,u=t.x+t.width/2-r.width/2,o=t.y+t.height/2-r.height/2,s;switch(a){case $:s={x:u,y:t.y-r.height};break;case M:s={x:u,y:t.y+t.height};break;case T:s={x:t.x+t.width,y:o};break;case S:s={x:t.x-r.width,y:o};break;default:s={x:t.x,y:t.y}}var p=a?$t(a):null;if(p!=null){var f=p==="y"?"height":"width";switch(i){case Z:s[p]=s[p]-(t[f]/2-r[f]/2);break;case st:s[p]=s[p]+(t[f]/2-r[f]/2);break}}return s}function ft(e,t){t===void 0&&(t={});var r=t,n=r.placement,a=n===void 0?e.placement:n,i=r.strategy,u=i===void 0?e.strategy:i,o=r.boundary,s=o===void 0?ye:o,p=r.rootBoundary,f=p===void 0?_t:p,l=r.elementContext,m=l===void 0?at:l,c=r.altBoundary,y=c===void 0?!1:c,h=r.padding,v=h===void 0?0:h,w=ae(typeof v!="number"?v:ie(v,ut)),O=m===at?ge:at,E=e.rects.popper,d=e.elements[y?O:m],g=Qe(K(d)?d:d.contextElement||N(e.elements.popper),s,f,u),b=tt(e.elements.reference),x=se({reference:b,element:E,strategy:"absolute",placement:a}),D=Pt(Object.assign({},E,x)),P=m===at?D:b,A={top:g.top-P.top+w.top,bottom:P.bottom-g.bottom+w.bottom,left:g.left-P.left+w.left,right:P.right-g.right+w.right},R=e.modifiersData.offset;if(m===at&&R){var L=R[a];Object.keys(A).forEach(function(j){var U=[T,M].indexOf(j)>=0?1:-1,q=[$,M].indexOf(j)>=0?"y":"x";A[j]+=L[q]*U})}return A}function Ze(e,t){t===void 0&&(t={});var r=t,n=r.placement,a=r.boundary,i=r.rootBoundary,u=r.padding,o=r.flipVariations,s=r.allowedAutoPlacements,p=s===void 0?te:s,f=et(n),l=f?o?qt:qt.filter(function(y){return et(y)===f}):ut,m=l.filter(function(y){return p.indexOf(y)>=0});m.length===0&&(m=l);var c=m.reduce(function(y,h){return y[h]=ft(e,{placement:h,boundary:a,rootBoundary:i,padding:u})[H(h)],y},{});return Object.keys(c).sort(function(y,h){return c[y]-c[h]})}function _e(e){if(H(e)===Dt)return[];var t=yt(e);return[zt(e),t,zt(t)]}function tr(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var a=r.mainAxis,i=a===void 0?!0:a,u=r.altAxis,o=u===void 0?!0:u,s=r.fallbackPlacements,p=r.padding,f=r.boundary,l=r.rootBoundary,m=r.altBoundary,c=r.flipVariations,y=c===void 0?!0:c,h=r.allowedAutoPlacements,v=t.options.placement,w=H(v),O=w===v,E=s||(O||!y?[yt(v)]:_e(v)),d=[v].concat(E).reduce(function(Q,I){return Q.concat(H(I)===Dt?Ze(t,{placement:I,boundary:f,rootBoundary:l,padding:p,flipVariations:y,allowedAutoPlacements:h}):I)},[]),g=t.rects.reference,b=t.rects.popper,x=new Map,D=!0,P=d[0],A=0;A=0,q=U?"width":"height",B=ft(t,{placement:R,boundary:f,rootBoundary:l,altBoundary:m,padding:p}),W=U?j?T:S:j?M:$;g[q]>b[q]&&(W=yt(W));var ct=yt(W),X=[];if(i&&X.push(B[L]<=0),o&&X.push(B[W]<=0,B[ct]<=0),X.every(function(Q){return Q})){P=R,D=!1;break}x.set(R,X)}if(D)for(var lt=y?3:1,wt=function(I){var nt=d.find(function(dt){var Y=x.get(dt);if(Y)return Y.slice(0,I).every(function(xt){return xt})});if(nt)return P=nt,"break"},rt=lt;rt>0;rt--){var vt=wt(rt);if(vt==="break")break}t.placement!==P&&(t.modifiersData[n]._skip=!0,t.placement=P,t.reset=!0)}}const er={name:"flip",enabled:!0,phase:"main",fn:tr,requiresIfExists:["offset"],data:{_skip:!1}};function Jt(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Kt(e){return[$,T,M,S].some(function(t){return e[t]>=0})}function rr(e){var t=e.state,r=e.name,n=t.rects.reference,a=t.rects.popper,i=t.modifiersData.preventOverflow,u=ft(t,{elementContext:"reference"}),o=ft(t,{altBoundary:!0}),s=Jt(u,n),p=Jt(o,a,i),f=Kt(s),l=Kt(p);t.modifiersData[r]={referenceClippingOffsets:s,popperEscapeOffsets:p,isReferenceHidden:f,hasPopperEscaped:l},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":l})}const nr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:rr};function ar(e,t,r){var n=H(e),a=[S,$].indexOf(n)>=0?-1:1,i=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,u=i[0],o=i[1];return u=u||0,o=(o||0)*a,[S,T].indexOf(n)>=0?{x:o,y:u}:{x:u,y:o}}function ir(e){var t=e.state,r=e.options,n=e.name,a=r.offset,i=a===void 0?[0,0]:a,u=te.reduce(function(f,l){return f[l]=ar(l,t.rects,i),f},{}),o=u[t.placement],s=o.x,p=o.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=p),t.modifiersData[n]=u}const or={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ir};function sr(e){var t=e.state,r=e.name;t.modifiersData[r]=se({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const fr={name:"popperOffsets",enabled:!0,phase:"read",fn:sr,data:{}};function ur(e){return e==="x"?"y":"x"}function pr(e){var t=e.state,r=e.options,n=e.name,a=r.mainAxis,i=a===void 0?!0:a,u=r.altAxis,o=u===void 0?!1:u,s=r.boundary,p=r.rootBoundary,f=r.altBoundary,l=r.padding,m=r.tether,c=m===void 0?!0:m,y=r.tetherOffset,h=y===void 0?0:y,v=ft(t,{boundary:s,rootBoundary:p,padding:l,altBoundary:f}),w=H(t.placement),O=et(t.placement),E=!O,d=$t(w),g=ur(d),b=t.modifiersData.popperOffsets,x=t.rects.reference,D=t.rects.popper,P=typeof h=="function"?h(Object.assign({},t.rects,{placement:t.placement})):h,A=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,L={x:0,y:0};if(b){if(i){var j,U=d==="y"?$:S,q=d==="y"?M:T,B=d==="y"?"height":"width",W=b[d],ct=W+v[U],X=W-v[q],lt=c?-D[B]/2:0,wt=O===Z?x[B]:D[B],rt=O===Z?-D[B]:-x[B],vt=t.elements.arrow,Q=c&&vt?jt(vt):{width:0,height:0},I=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:ne(),nt=I[U],dt=I[q],Y=it(0,x[B],Q[B]),xt=E?x[B]/2-lt-Y-nt-A.mainAxis:wt-Y-nt-A.mainAxis,fe=E?-x[B]/2+lt+Y+dt+A.mainAxis:rt+Y+dt+A.mainAxis,Ot=t.elements.arrow&&pt(t.elements.arrow),ue=Ot?d==="y"?Ot.clientTop||0:Ot.clientLeft||0:0,kt=(j=R==null?void 0:R[d])!=null?j:0,pe=W+xt-kt-ue,ce=W+fe-kt,Mt=it(c?gt(ct,pe):ct,W,c?J(X,ce):X);b[d]=Mt,L[d]=Mt-W}if(o){var Tt,le=d==="x"?$:S,ve=d==="x"?M:T,z=b[g],mt=g==="y"?"height":"width",Lt=z+v[le],Wt=z-v[ve],Et=[$,S].indexOf(w)!==-1,Ht=(Tt=R==null?void 0:R[g])!=null?Tt:0,Ft=Et?Lt:z-x[mt]-D[mt]-Ht+A.altAxis,Vt=Et?z+x[mt]+D[mt]-Ht-A.altAxis:Wt,It=c&&Et?Me(Ft,z,Vt):it(c?Ft:Lt,z,c?Vt:Wt);b[g]=It,L[g]=It-z}t.modifiersData[n]=L}}const cr={name:"preventOverflow",enabled:!0,phase:"main",fn:pr,requiresIfExists:["offset"]};function lr(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function vr(e){return e===C(e)||!k(e)?St(e):lr(e)}function dr(e){var t=e.getBoundingClientRect(),r=_(t.width)/e.offsetWidth||1,n=_(t.height)/e.offsetHeight||1;return r!==1||n!==1}function mr(e,t,r){r===void 0&&(r=!1);var n=k(t),a=k(t)&&dr(t),i=N(t),u=tt(e,a,r),o={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(n||!n&&!r)&&((F(t)!=="body"||Ct(i))&&(o=vr(t)),k(t)?(s=tt(t,!0),s.x+=t.clientLeft,s.y+=t.clientTop):i&&(s.x=Bt(i))),{x:u.left+o.scrollLeft-s.x,y:u.top+o.scrollTop-s.y,width:u.width,height:u.height}}function hr(e){var t=new Map,r=new Set,n=[];e.forEach(function(i){t.set(i.name,i)});function a(i){r.add(i.name);var u=[].concat(i.requires||[],i.requiresIfExists||[]);u.forEach(function(o){if(!r.has(o)){var s=t.get(o);s&&a(s)}}),n.push(i)}return e.forEach(function(i){r.has(i.name)||a(i)}),n}function yr(e){var t=hr(e);return je.reduce(function(r,n){return r.concat(t.filter(function(a){return a.phase===n}))},[])}function gr(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function br(e){var t=e.reduce(function(r,n){var a=r[n.name];return r[n.name]=a?Object.assign({},a,n,{options:Object.assign({},a.options,n.options),data:Object.assign({},a.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var Qt={placement:"bottom",modifiers:[],strategy:"absolute"};function Zt(){for(var e=arguments.length,t=new Array(e),r=0;r1?r-1:0),a=1;a"u")return!1;var t=C(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function $e(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},a=t.attributes[r]||{},i=t.elements[r];!k(i)||!F(i)||(Object.assign(i.style,n),Object.keys(a).forEach(function(u){var o=a[u];o===!1?i.removeAttribute(u):i.setAttribute(u,o===!0?"":o)}))})}function Se(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var a=t.elements[n],i=t.attributes[n]||{},u=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),o=u.reduce(function(s,p){return s[p]="",s},{});!k(a)||!F(a)||(Object.assign(a.style,o),Object.keys(i).forEach(function(s){a.removeAttribute(s)}))})}}const Be={name:"applyStyles",enabled:!0,phase:"write",fn:$e,effect:Se,requires:["computeStyles"]};function H(e){return e.split("-")[0]}var J=Math.max,gt=Math.min,_=Math.round;function At(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function ee(){return!/^((?!chrome|android).)*safari/i.test(At())}function tt(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),a=1,i=1;t&&k(e)&&(a=e.offsetWidth>0&&_(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&_(n.height)/e.offsetHeight||1);var u=K(e)?C(e):window,o=u.visualViewport,s=!ee()&&r,p=(n.left+(s&&o?o.offsetLeft:0))/a,f=(n.top+(s&&o?o.offsetTop:0))/i,l=n.width/a,m=n.height/i;return{width:l,height:m,top:f,right:p+l,bottom:f+m,left:p,x:p,y:f}}function jt(e){var t=tt(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function re(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Rt(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function V(e){return C(e).getComputedStyle(e)}function Ce(e){return["table","td","th"].indexOf(F(e))>=0}function N(e){return((K(e)?e.ownerDocument:e.document)||window.document).documentElement}function bt(e){return F(e)==="html"?e:e.assignedSlot||e.parentNode||(Rt(e)?e.host:null)||N(e)}function Xt(e){return!k(e)||V(e).position==="fixed"?null:e.offsetParent}function ke(e){var t=/firefox/i.test(At()),r=/Trident/i.test(At());if(r&&k(e)){var n=V(e);if(n.position==="fixed")return null}var a=bt(e);for(Rt(a)&&(a=a.host);k(a)&&["html","body"].indexOf(F(a))<0;){var i=V(a);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return a;a=a.parentNode}return null}function pt(e){for(var t=C(e),r=Xt(e);r&&Ce(r)&&V(r).position==="static";)r=Xt(r);return r&&(F(r)==="html"||F(r)==="body"&&V(r).position==="static")?t:r||ke(e)||t}function $t(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function it(e,t,r){return J(e,gt(t,r))}function Me(e,t,r){var n=it(e,t,r);return n>r?r:n}function ne(){return{top:0,right:0,bottom:0,left:0}}function ae(e){return Object.assign({},ne(),e)}function ie(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var Te=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,ae(typeof t!="number"?t:ie(t,ut))};function Le(e){var t,r=e.state,n=e.name,a=e.options,i=r.elements.arrow,u=r.modifiersData.popperOffsets,o=H(r.placement),s=$t(o),p=[S,T].indexOf(o)>=0,f=p?"height":"width";if(!(!i||!u)){var l=Te(a.padding,r),m=jt(i),c=s==="y"?$:S,y=s==="y"?M:T,h=r.rects.reference[f]+r.rects.reference[s]-u[s]-r.rects.popper[f],v=u[s]-r.rects.reference[s],w=pt(i),O=w?s==="y"?w.clientHeight||0:w.clientWidth||0:0,E=h/2-v/2,d=l[c],g=O-m[f]-l[y],b=O/2-m[f]/2+E,x=it(d,b,g),D=s;r.modifiersData[n]=(t={},t[D]=x,t.centerOffset=x-b,t)}}function We(e){var t=e.state,r=e.options,n=r.element,a=n===void 0?"[data-popper-arrow]":n;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||re(t.elements.popper,a)&&(t.elements.arrow=a))}const He={name:"arrow",enabled:!0,phase:"main",fn:Le,effect:We,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function et(e){return e.split("-")[1]}var Fe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ve(e,t){var r=e.x,n=e.y,a=t.devicePixelRatio||1;return{x:_(r*a)/a||0,y:_(n*a)/a||0}}function Yt(e){var t,r=e.popper,n=e.popperRect,a=e.placement,i=e.variation,u=e.offsets,o=e.position,s=e.gpuAcceleration,p=e.adaptive,f=e.roundOffsets,l=e.isFixed,m=u.x,c=m===void 0?0:m,y=u.y,h=y===void 0?0:y,v=typeof f=="function"?f({x:c,y:h}):{x:c,y:h};c=v.x,h=v.y;var w=u.hasOwnProperty("x"),O=u.hasOwnProperty("y"),E=S,d=$,g=window;if(p){var b=pt(r),x="clientHeight",D="clientWidth";if(b===C(r)&&(b=N(r),V(b).position!=="static"&&o==="absolute"&&(x="scrollHeight",D="scrollWidth")),b=b,a===$||(a===S||a===T)&&i===st){d=M;var P=l&&b===g&&g.visualViewport?g.visualViewport.height:b[x];h-=P-n.height,h*=s?1:-1}if(a===S||(a===$||a===M)&&i===st){E=T;var A=l&&b===g&&g.visualViewport?g.visualViewport.width:b[D];c-=A-n.width,c*=s?1:-1}}var R=Object.assign({position:o},p&&Fe),L=f===!0?Ve({x:c,y:h},C(r)):{x:c,y:h};if(c=L.x,h=L.y,s){var j;return Object.assign({},R,(j={},j[d]=O?"0":"",j[E]=w?"0":"",j.transform=(g.devicePixelRatio||1)<=1?"translate("+c+"px, "+h+"px)":"translate3d("+c+"px, "+h+"px, 0)",j))}return Object.assign({},R,(t={},t[d]=O?h+"px":"",t[E]=w?c+"px":"",t.transform="",t))}function Ie(e){var t=e.state,r=e.options,n=r.gpuAcceleration,a=n===void 0?!0:n,i=r.adaptive,u=i===void 0?!0:i,o=r.roundOffsets,s=o===void 0?!0:o,p={placement:H(t.placement),variation:et(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Yt(Object.assign({},p,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:u,roundOffsets:s})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Yt(Object.assign({},p,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Ne={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Ie,data:{}};var ht={passive:!0};function Ue(e){var t=e.state,r=e.instance,n=e.options,a=n.scroll,i=a===void 0?!0:a,u=n.resize,o=u===void 0?!0:u,s=C(t.elements.popper),p=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&p.forEach(function(f){f.addEventListener("scroll",r.update,ht)}),o&&s.addEventListener("resize",r.update,ht),function(){i&&p.forEach(function(f){f.removeEventListener("scroll",r.update,ht)}),o&&s.removeEventListener("resize",r.update,ht)}}const qe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ue,data:{}};var Xe={left:"right",right:"left",bottom:"top",top:"bottom"};function yt(e){return e.replace(/left|right|bottom|top/g,function(t){return Xe[t]})}var Ye={start:"end",end:"start"};function zt(e){return e.replace(/start|end/g,function(t){return Ye[t]})}function St(e){var t=C(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function Bt(e){return tt(N(e)).left+St(e).scrollLeft}function ze(e,t){var r=C(e),n=N(e),a=r.visualViewport,i=n.clientWidth,u=n.clientHeight,o=0,s=0;if(a){i=a.width,u=a.height;var p=ee();(p||!p&&t==="fixed")&&(o=a.offsetLeft,s=a.offsetTop)}return{width:i,height:u,x:o+Bt(e),y:s}}function Ge(e){var t,r=N(e),n=St(e),a=(t=e.ownerDocument)==null?void 0:t.body,i=J(r.scrollWidth,r.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),u=J(r.scrollHeight,r.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),o=-n.scrollLeft+Bt(e),s=-n.scrollTop;return V(a||r).direction==="rtl"&&(o+=J(r.clientWidth,a?a.clientWidth:0)-i),{width:i,height:u,x:o,y:s}}function Ct(e){var t=V(e),r=t.overflow,n=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+a+n)}function oe(e){return["html","body","#document"].indexOf(F(e))>=0?e.ownerDocument.body:k(e)&&Ct(e)?e:oe(bt(e))}function ot(e,t){var r;t===void 0&&(t=[]);var n=oe(e),a=n===((r=e.ownerDocument)==null?void 0:r.body),i=C(n),u=a?[i].concat(i.visualViewport||[],Ct(n)?n:[]):n,o=t.concat(u);return a?o:o.concat(ot(bt(u)))}function Pt(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Je(e,t){var r=tt(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function Gt(e,t,r){return t===_t?Pt(ze(e,r)):K(t)?Je(t,r):Pt(Ge(N(e)))}function Ke(e){var t=ot(bt(e)),r=["absolute","fixed"].indexOf(V(e).position)>=0,n=r&&k(e)?pt(e):e;return K(n)?t.filter(function(a){return K(a)&&re(a,n)&&F(a)!=="body"}):[]}function Qe(e,t,r,n){var a=t==="clippingParents"?Ke(e):[].concat(t),i=[].concat(a,[r]),u=i[0],o=i.reduce(function(s,p){var f=Gt(e,p,n);return s.top=J(f.top,s.top),s.right=gt(f.right,s.right),s.bottom=gt(f.bottom,s.bottom),s.left=J(f.left,s.left),s},Gt(e,u,n));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function se(e){var t=e.reference,r=e.element,n=e.placement,a=n?H(n):null,i=n?et(n):null,u=t.x+t.width/2-r.width/2,o=t.y+t.height/2-r.height/2,s;switch(a){case $:s={x:u,y:t.y-r.height};break;case M:s={x:u,y:t.y+t.height};break;case T:s={x:t.x+t.width,y:o};break;case S:s={x:t.x-r.width,y:o};break;default:s={x:t.x,y:t.y}}var p=a?$t(a):null;if(p!=null){var f=p==="y"?"height":"width";switch(i){case Z:s[p]=s[p]-(t[f]/2-r[f]/2);break;case st:s[p]=s[p]+(t[f]/2-r[f]/2);break}}return s}function ft(e,t){t===void 0&&(t={});var r=t,n=r.placement,a=n===void 0?e.placement:n,i=r.strategy,u=i===void 0?e.strategy:i,o=r.boundary,s=o===void 0?ye:o,p=r.rootBoundary,f=p===void 0?_t:p,l=r.elementContext,m=l===void 0?at:l,c=r.altBoundary,y=c===void 0?!1:c,h=r.padding,v=h===void 0?0:h,w=ae(typeof v!="number"?v:ie(v,ut)),O=m===at?ge:at,E=e.rects.popper,d=e.elements[y?O:m],g=Qe(K(d)?d:d.contextElement||N(e.elements.popper),s,f,u),b=tt(e.elements.reference),x=se({reference:b,element:E,strategy:"absolute",placement:a}),D=Pt(Object.assign({},E,x)),P=m===at?D:b,A={top:g.top-P.top+w.top,bottom:P.bottom-g.bottom+w.bottom,left:g.left-P.left+w.left,right:P.right-g.right+w.right},R=e.modifiersData.offset;if(m===at&&R){var L=R[a];Object.keys(A).forEach(function(j){var U=[T,M].indexOf(j)>=0?1:-1,q=[$,M].indexOf(j)>=0?"y":"x";A[j]+=L[q]*U})}return A}function Ze(e,t){t===void 0&&(t={});var r=t,n=r.placement,a=r.boundary,i=r.rootBoundary,u=r.padding,o=r.flipVariations,s=r.allowedAutoPlacements,p=s===void 0?te:s,f=et(n),l=f?o?qt:qt.filter(function(y){return et(y)===f}):ut,m=l.filter(function(y){return p.indexOf(y)>=0});m.length===0&&(m=l);var c=m.reduce(function(y,h){return y[h]=ft(e,{placement:h,boundary:a,rootBoundary:i,padding:u})[H(h)],y},{});return Object.keys(c).sort(function(y,h){return c[y]-c[h]})}function _e(e){if(H(e)===Dt)return[];var t=yt(e);return[zt(e),t,zt(t)]}function tr(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var a=r.mainAxis,i=a===void 0?!0:a,u=r.altAxis,o=u===void 0?!0:u,s=r.fallbackPlacements,p=r.padding,f=r.boundary,l=r.rootBoundary,m=r.altBoundary,c=r.flipVariations,y=c===void 0?!0:c,h=r.allowedAutoPlacements,v=t.options.placement,w=H(v),O=w===v,E=s||(O||!y?[yt(v)]:_e(v)),d=[v].concat(E).reduce(function(Q,I){return Q.concat(H(I)===Dt?Ze(t,{placement:I,boundary:f,rootBoundary:l,padding:p,flipVariations:y,allowedAutoPlacements:h}):I)},[]),g=t.rects.reference,b=t.rects.popper,x=new Map,D=!0,P=d[0],A=0;A=0,q=U?"width":"height",B=ft(t,{placement:R,boundary:f,rootBoundary:l,altBoundary:m,padding:p}),W=U?j?T:S:j?M:$;g[q]>b[q]&&(W=yt(W));var ct=yt(W),X=[];if(i&&X.push(B[L]<=0),o&&X.push(B[W]<=0,B[ct]<=0),X.every(function(Q){return Q})){P=R,D=!1;break}x.set(R,X)}if(D)for(var lt=y?3:1,wt=function(I){var nt=d.find(function(dt){var Y=x.get(dt);if(Y)return Y.slice(0,I).every(function(xt){return xt})});if(nt)return P=nt,"break"},rt=lt;rt>0;rt--){var vt=wt(rt);if(vt==="break")break}t.placement!==P&&(t.modifiersData[n]._skip=!0,t.placement=P,t.reset=!0)}}const er={name:"flip",enabled:!0,phase:"main",fn:tr,requiresIfExists:["offset"],data:{_skip:!1}};function Jt(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Kt(e){return[$,T,M,S].some(function(t){return e[t]>=0})}function rr(e){var t=e.state,r=e.name,n=t.rects.reference,a=t.rects.popper,i=t.modifiersData.preventOverflow,u=ft(t,{elementContext:"reference"}),o=ft(t,{altBoundary:!0}),s=Jt(u,n),p=Jt(o,a,i),f=Kt(s),l=Kt(p);t.modifiersData[r]={referenceClippingOffsets:s,popperEscapeOffsets:p,isReferenceHidden:f,hasPopperEscaped:l},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":l})}const nr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:rr};function ar(e,t,r){var n=H(e),a=[S,$].indexOf(n)>=0?-1:1,i=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,u=i[0],o=i[1];return u=u||0,o=(o||0)*a,[S,T].indexOf(n)>=0?{x:o,y:u}:{x:u,y:o}}function ir(e){var t=e.state,r=e.options,n=e.name,a=r.offset,i=a===void 0?[0,0]:a,u=te.reduce(function(f,l){return f[l]=ar(l,t.rects,i),f},{}),o=u[t.placement],s=o.x,p=o.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=p),t.modifiersData[n]=u}const or={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ir};function sr(e){var t=e.state,r=e.name;t.modifiersData[r]=se({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const fr={name:"popperOffsets",enabled:!0,phase:"read",fn:sr,data:{}};function ur(e){return e==="x"?"y":"x"}function pr(e){var t=e.state,r=e.options,n=e.name,a=r.mainAxis,i=a===void 0?!0:a,u=r.altAxis,o=u===void 0?!1:u,s=r.boundary,p=r.rootBoundary,f=r.altBoundary,l=r.padding,m=r.tether,c=m===void 0?!0:m,y=r.tetherOffset,h=y===void 0?0:y,v=ft(t,{boundary:s,rootBoundary:p,padding:l,altBoundary:f}),w=H(t.placement),O=et(t.placement),E=!O,d=$t(w),g=ur(d),b=t.modifiersData.popperOffsets,x=t.rects.reference,D=t.rects.popper,P=typeof h=="function"?h(Object.assign({},t.rects,{placement:t.placement})):h,A=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,L={x:0,y:0};if(b){if(i){var j,U=d==="y"?$:S,q=d==="y"?M:T,B=d==="y"?"height":"width",W=b[d],ct=W+v[U],X=W-v[q],lt=c?-D[B]/2:0,wt=O===Z?x[B]:D[B],rt=O===Z?-D[B]:-x[B],vt=t.elements.arrow,Q=c&&vt?jt(vt):{width:0,height:0},I=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:ne(),nt=I[U],dt=I[q],Y=it(0,x[B],Q[B]),xt=E?x[B]/2-lt-Y-nt-A.mainAxis:wt-Y-nt-A.mainAxis,fe=E?-x[B]/2+lt+Y+dt+A.mainAxis:rt+Y+dt+A.mainAxis,Ot=t.elements.arrow&&pt(t.elements.arrow),ue=Ot?d==="y"?Ot.clientTop||0:Ot.clientLeft||0:0,kt=(j=R==null?void 0:R[d])!=null?j:0,pe=W+xt-kt-ue,ce=W+fe-kt,Mt=it(c?gt(ct,pe):ct,W,c?J(X,ce):X);b[d]=Mt,L[d]=Mt-W}if(o){var Tt,le=d==="x"?$:S,ve=d==="x"?M:T,z=b[g],mt=g==="y"?"height":"width",Lt=z+v[le],Wt=z-v[ve],Et=[$,S].indexOf(w)!==-1,Ht=(Tt=R==null?void 0:R[g])!=null?Tt:0,Ft=Et?Lt:z-x[mt]-D[mt]-Ht+A.altAxis,Vt=Et?z+x[mt]+D[mt]-Ht-A.altAxis:Wt,It=c&&Et?Me(Ft,z,Vt):it(c?Ft:Lt,z,c?Vt:Wt);b[g]=It,L[g]=It-z}t.modifiersData[n]=L}}const cr={name:"preventOverflow",enabled:!0,phase:"main",fn:pr,requiresIfExists:["offset"]};function lr(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function vr(e){return e===C(e)||!k(e)?St(e):lr(e)}function dr(e){var t=e.getBoundingClientRect(),r=_(t.width)/e.offsetWidth||1,n=_(t.height)/e.offsetHeight||1;return r!==1||n!==1}function mr(e,t,r){r===void 0&&(r=!1);var n=k(t),a=k(t)&&dr(t),i=N(t),u=tt(e,a,r),o={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(n||!n&&!r)&&((F(t)!=="body"||Ct(i))&&(o=vr(t)),k(t)?(s=tt(t,!0),s.x+=t.clientLeft,s.y+=t.clientTop):i&&(s.x=Bt(i))),{x:u.left+o.scrollLeft-s.x,y:u.top+o.scrollTop-s.y,width:u.width,height:u.height}}function hr(e){var t=new Map,r=new Set,n=[];e.forEach(function(i){t.set(i.name,i)});function a(i){r.add(i.name);var u=[].concat(i.requires||[],i.requiresIfExists||[]);u.forEach(function(o){if(!r.has(o)){var s=t.get(o);s&&a(s)}}),n.push(i)}return e.forEach(function(i){r.has(i.name)||a(i)}),n}function yr(e){var t=hr(e);return je.reduce(function(r,n){return r.concat(t.filter(function(a){return a.phase===n}))},[])}function gr(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function br(e){var t=e.reduce(function(r,n){var a=r[n.name];return r[n.name]=a?Object.assign({},a,n,{options:Object.assign({},a.options,n.options),data:Object.assign({},a.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var Qt={placement:"bottom",modifiers:[],strategy:"absolute"};function Zt(){for(var e=arguments.length,t=new Array(e),r=0;rt.get("/api/v1/truth/trends/groups"),{schema:l,enabled:a.groupsDiscovery}),{relationships:r}=m(["popular"],e.map(s=>s.id)),u=e.map(s=>({...s,relationship:r[s.id]||null}));return{...o,groups:u}}export{b as u}; +import{bj as i,g as p,bk as n,bl as l,bm as c,kq as m}from"../index-be605fd2.js";function b(){const t=i(),a=p(),{entities:e,...o}=n([c.GROUPS,"popular"],()=>t.get("/api/v1/truth/trends/groups"),{schema:l,enabled:a.groupsDiscovery}),{relationships:r}=m(["popular"],e.map(s=>s.id)),u=e.map(s=>({...s,relationship:r[s.id]||null}));return{...o,groups:u}}export{b as u}; diff --git a/packs/js/useSuggestedGroups-ad7e5c64.js b/packs/js/useSuggestedGroups-a15d5e07.js similarity index 82% rename from packs/js/useSuggestedGroups-ad7e5c64.js rename to packs/js/useSuggestedGroups-a15d5e07.js index cbd54a4cd..c7121dd78 100644 --- a/packs/js/useSuggestedGroups-ad7e5c64.js +++ b/packs/js/useSuggestedGroups-a15d5e07.js @@ -1 +1 @@ -import{bj as n,g as r,bk as p,bl as g,bm as c,kq as l}from"../index-7380452a.js";function d(){const t=n(),u=r(),{entities:e,...i}=p([c.GROUPS,"suggested"],()=>t.get("/api/v1/truth/suggestions/groups"),{schema:g,enabled:u.groupsDiscovery}),{relationships:a}=l(["suggested"],e.map(s=>s.id)),o=e.map(s=>({...s,relationship:a[s.id]||null}));return{...i,groups:o}}export{d as u}; +import{bj as n,g as r,bk as p,bl as g,bm as c,kq as l}from"../index-be605fd2.js";function d(){const t=n(),u=r(),{entities:e,...i}=p([c.GROUPS,"suggested"],()=>t.get("/api/v1/truth/suggestions/groups"),{schema:g,enabled:u.groupsDiscovery}),{relationships:a}=l(["suggested"],e.map(s=>s.id)),o=e.map(s=>({...s,relationship:a[s.id]||null}));return{...i,groups:o}}export{d as u}; diff --git a/packs/js/user-index-b6d304df.js b/packs/js/user-index-7d345da1.js similarity index 83% rename from packs/js/user-index-b6d304df.js rename to packs/js/user-index-7d345da1.js index 1f3b28eee..1345fbc76 100644 --- a/packs/js/user-index-b6d304df.js +++ b/packs/js/user-index-7d345da1.js @@ -1 +1 @@ -import{d as x,u as y,q as M,r as d,Q as _,iS as C,a as s,B as I,bG as L,X as U,o as b,iT as Q,iU as S}from"../index-7380452a.js";import{S as A}from"./scrollable-list-df58e451.js";import"./index-75eb026b.js";import"./load-more-b53b8d88.js";var i=b({heading:{id:"column.admin.users",defaultMessage:"Users"},empty:{id:"admin.user_index.empty",defaultMessage:"No users found."},searchPlaceholder:{id:"admin.user_index.search_input_placeholder",defaultMessage:"Who are you looking for?"}}),D=function(){var r=x(),t=y(),a=M(function(e){return e.admin_user_index}),n=a.isLoading,o=a.items,l=a.total,c=a.query,m=a.next,p=function(){n||r(Q())},u=d.useCallback(_(function(){r(C())},900,{leading:!0}),[]),f=function(v){r(S(v.target.value)),u()};d.useEffect(function(){u()},[]);var h=o.count()0&&e(t,{space:1,alignItems:"center"},void 0,s))),e(o,{size:"sm",theme:"muted",truncate:!0},void 0,"@",k(a,f))),e(t,{alignItems:"center",space:3},void 0,a.followers_count>=0&&e(i,{to:"/@".concat(a.acct,"/followers"),title:d.formatNumber(a.followers_count)},void 0,e(t,{alignItems:"center",space:1},void 0,e(o,{theme:"primary",weight:"bold",size:"sm"},void 0,m(a.followers_count)),e(o,{weight:"bold",size:"sm"},void 0,e(v,{id:"account.followers",defaultMessage:"Followers"})))),a.following_count>=0&&e(i,{to:"/@".concat(a.acct,"/following"),title:d.formatNumber(a.following_count)},void 0,e(t,{alignItems:"center",space:1},void 0,e(o,{theme:"primary",weight:"bold",size:"sm"},void 0,m(a.following_count)),e(o,{weight:"bold",size:"sm"},void 0,e(v,{id:"account.follows",defaultMessage:"Follows"})))))))};export{q as default}; +import{u as I,b3 as N,q as _,ht as z,a as e,a2 as l,dh as F,H as t,L as i,c7 as A,y as o,cz as S,hu as k,d4 as m,F as v}from"../index-be605fd2.js";var q=function(c){var u=c.accountId,n=c.action,s=c.badges,r=c.domain,d=I(),g=N(u),a=g.account,f=_(function(y){return z(y)});if(!a)return null;var h={__html:a.display_name_html},w=!a.acct.includes("@")&&r?"".concat(a.acct,"@").concat(r):a.acct,b=a.header,p=a.verified;return e("div",{className:"relative"},void 0,e(l,{space:2},void 0,e(l,{},void 0,e("div",{className:"relative -mx-4 -mt-4 h-24 overflow-hidden bg-gray-200"},void 0,b&&e(F,{src:a.header})),e(t,{justifyContent:"between"},void 0,e(i,{to:"/@".concat(a.acct),title:w,className:"-mt-12 block"},void 0,e(A,{src:a.avatar,size:80,className:"h-20 w-20 overflow-hidden bg-gray-50 ring-2 ring-white"})),n&&e("div",{className:"mt-2"},void 0,n))),e(l,{},void 0,e(i,{to:"/@".concat(a.acct)},void 0,e(t,{space:1,alignItems:"center"},void 0,e(o,{size:"lg",weight:"bold",dangerouslySetInnerHTML:h,truncate:!0}),p&&e(S,{}),s&&s.length>0&&e(t,{space:1,alignItems:"center"},void 0,s))),e(o,{size:"sm",theme:"muted",truncate:!0},void 0,"@",k(a,f))),e(t,{alignItems:"center",space:3},void 0,a.followers_count>=0&&e(i,{to:"/@".concat(a.acct,"/followers"),title:d.formatNumber(a.followers_count)},void 0,e(t,{alignItems:"center",space:1},void 0,e(o,{theme:"primary",weight:"bold",size:"sm"},void 0,m(a.followers_count)),e(o,{weight:"bold",size:"sm"},void 0,e(v,{id:"account.followers",defaultMessage:"Followers"})))),a.following_count>=0&&e(i,{to:"/@".concat(a.acct,"/following"),title:d.formatNumber(a.following_count)},void 0,e(t,{alignItems:"center",space:1},void 0,e(o,{theme:"primary",weight:"bold",size:"sm"},void 0,m(a.following_count)),e(o,{weight:"bold",size:"sm"},void 0,e(v,{id:"account.follows",defaultMessage:"Follows"})))))))};export{q as default}; diff --git a/packs/js/verify-sms-modal-de5c58f2.js b/packs/js/verify-sms-modal-34fd41dc.js similarity index 96% rename from packs/js/verify-sms-modal-de5c58f2.js rename to packs/js/verify-sms-modal-34fd41dc.js index 3535faa11..ffbafbc31 100644 --- a/packs/js/verify-sms-modal-de5c58f2.js +++ b/packs/js/verify-sms-modal-34fd41dc.js @@ -1 +1 @@ -import{d as B,u as G,t as O,q as D,ju as W,r as s,at as v,a as i,a2 as H,F as c,bu as J,o as K,R as C,y as R,jv as X,jw as Z,bF as $,jx as ee,jy as ie,bv as ae,bp as m,jz as te}from"../index-7380452a.js";import"./es.promise.finally-9155a4db.js";var o=K({verificationInvalid:{id:"sms_verification.invalid",defaultMessage:"Please enter a valid phone number."},verificationSuccess:{id:"sms_verification.success",defaultMessage:"A verification code has been sent to your phone number."},verificationFail:{id:"sms_verification.fail",defaultMessage:"Failed to send SMS message to your phone number."},verificationExpired:{id:"sms_verification.expired",defaultMessage:"Your SMS token has expired."},verifySms:{id:"sms_verification.modal.verify_sms",defaultMessage:"Verify SMS"},verifyNumber:{id:"sms_verification.modal.verify_number",defaultMessage:"Verify phone number"},verifyCode:{id:"sms_verification.modal.verify_code",defaultMessage:"Verify code"}}),e=function(t){return t.IDLE="IDLE",t.READY="READY",t.REQUESTED="REQUESTED",t.FAIL="FAIL",t.SUCCESS="SUCCESS",t}(e||{}),se=function(I){var E=I.onClose,f=B(),r=G(),A=O(),y=D(function(a){return W(a)}),V=D(function(a){return a.verification.isLoading}),T=s.useState(e.IDLE),g=v(T,2),n=g[0],d=g[1],x=s.useState(),h=v(x,2),S=h[0],F=h[1],L=s.useState(""),p=v(L,2),l=p[0],k=p[1],U=s.useState(!1),M=v(U,2),Y=M[0],w=M[1],Q=!!S,j=s.useCallback(function(a){F(a)},[]),_=function(u){if(u.preventDefault(),!Q){d(e.IDLE),m.error(r.formatMessage(o.verificationInvalid));return}f(te(S)).then(function(){m.success(r.formatMessage(o.verificationSuccess))}).finally(function(){return d(e.REQUESTED)}).catch(function(){m.error(r.formatMessage(o.verificationFail))})},P=function(u){w(!0),_(u)},q=function(u){switch(n){case e.IDLE:d(e.READY);break;case e.READY:_(u);break;case e.REQUESTED:b();break}},N=s.useMemo(function(){switch(n){case e.IDLE:return r.formatMessage(o.verifySms);case e.READY:return r.formatMessage(o.verifyNumber);case e.REQUESTED:return r.formatMessage(o.verifyCode);default:return null}},[n]),z=function(){switch(n){case e.IDLE:return i(R,{theme:"muted"},void 0,i(c,{id:"sms_verification.modal.verify_help_text",defaultMessage:"Verify your phone number to start using {instance}.",values:{instance:A.title}}));case e.READY:return i($,{labelText:i(c,{id:"sms_verification.phone.label",defaultMessage:"Phone number"})},void 0,i(Z,{value:S,onChange:j,required:!0,autoFocus:!0}));case e.REQUESTED:return C.createElement(C.Fragment,null,i(R,{theme:"muted",size:"sm",align:"center"},void 0,i(c,{id:"sms_verification.modal.enter_code",defaultMessage:"We sent you a 6-digit code via SMS. Enter it below."})),i(X,{value:l,onChange:k,numInputs:6,isInputNum:!0,shouldAutoFocus:!0,isDisabled:V,containerStyle:"flex justify-center mt-2 space-x-4",inputStyle:"w-10i border-gray-300 rounded-md focus:ring-indigo-500 focus:border-indigo-500"}));default:return null}},b=function(){y&&f(ee(l)).then(function(){d(e.SUCCESS),f(ie(y)).then(function(){return f(ae("VERIFY_SMS"))})}).catch(function(){return m.error(r.formatMessage(o.verificationExpired))})};return s.useEffect(function(){l.length===6&&b()},[l]),i(J,{title:i(c,{id:"sms_verification.modal.verify_title",defaultMessage:"Verify your phone number"}),onClose:function(){return E("VERIFY_SMS")},cancelAction:n===e.IDLE?function(){return E("VERIFY_SMS")}:void 0,cancelText:"Skip for now",confirmationAction:q,confirmationText:N,secondaryAction:n===e.REQUESTED?P:void 0,secondaryText:n===e.REQUESTED?i(c,{id:"sms_verification.modal.resend_code",defaultMessage:"Resend verification code?"}):void 0,secondaryDisabled:Y},void 0,i(H,{space:4},void 0,z()))};export{se as default}; +import{d as B,u as G,t as O,q as D,ju as W,r as s,at as v,a as i,a2 as H,F as c,bu as J,o as K,R as C,y as R,jv as X,jw as Z,bF as $,jx as ee,jy as ie,bv as ae,bp as m,jz as te}from"../index-be605fd2.js";import"./es.promise.finally-0ef07e66.js";var o=K({verificationInvalid:{id:"sms_verification.invalid",defaultMessage:"Please enter a valid phone number."},verificationSuccess:{id:"sms_verification.success",defaultMessage:"A verification code has been sent to your phone number."},verificationFail:{id:"sms_verification.fail",defaultMessage:"Failed to send SMS message to your phone number."},verificationExpired:{id:"sms_verification.expired",defaultMessage:"Your SMS token has expired."},verifySms:{id:"sms_verification.modal.verify_sms",defaultMessage:"Verify SMS"},verifyNumber:{id:"sms_verification.modal.verify_number",defaultMessage:"Verify phone number"},verifyCode:{id:"sms_verification.modal.verify_code",defaultMessage:"Verify code"}}),e=function(t){return t.IDLE="IDLE",t.READY="READY",t.REQUESTED="REQUESTED",t.FAIL="FAIL",t.SUCCESS="SUCCESS",t}(e||{}),se=function(I){var E=I.onClose,f=B(),r=G(),A=O(),y=D(function(a){return W(a)}),V=D(function(a){return a.verification.isLoading}),T=s.useState(e.IDLE),g=v(T,2),n=g[0],d=g[1],x=s.useState(),h=v(x,2),S=h[0],F=h[1],L=s.useState(""),p=v(L,2),l=p[0],k=p[1],U=s.useState(!1),M=v(U,2),Y=M[0],w=M[1],Q=!!S,j=s.useCallback(function(a){F(a)},[]),_=function(u){if(u.preventDefault(),!Q){d(e.IDLE),m.error(r.formatMessage(o.verificationInvalid));return}f(te(S)).then(function(){m.success(r.formatMessage(o.verificationSuccess))}).finally(function(){return d(e.REQUESTED)}).catch(function(){m.error(r.formatMessage(o.verificationFail))})},P=function(u){w(!0),_(u)},q=function(u){switch(n){case e.IDLE:d(e.READY);break;case e.READY:_(u);break;case e.REQUESTED:b();break}},N=s.useMemo(function(){switch(n){case e.IDLE:return r.formatMessage(o.verifySms);case e.READY:return r.formatMessage(o.verifyNumber);case e.REQUESTED:return r.formatMessage(o.verifyCode);default:return null}},[n]),z=function(){switch(n){case e.IDLE:return i(R,{theme:"muted"},void 0,i(c,{id:"sms_verification.modal.verify_help_text",defaultMessage:"Verify your phone number to start using {instance}.",values:{instance:A.title}}));case e.READY:return i($,{labelText:i(c,{id:"sms_verification.phone.label",defaultMessage:"Phone number"})},void 0,i(Z,{value:S,onChange:j,required:!0,autoFocus:!0}));case e.REQUESTED:return C.createElement(C.Fragment,null,i(R,{theme:"muted",size:"sm",align:"center"},void 0,i(c,{id:"sms_verification.modal.enter_code",defaultMessage:"We sent you a 6-digit code via SMS. Enter it below."})),i(X,{value:l,onChange:k,numInputs:6,isInputNum:!0,shouldAutoFocus:!0,isDisabled:V,containerStyle:"flex justify-center mt-2 space-x-4",inputStyle:"w-10i border-gray-300 rounded-md focus:ring-indigo-500 focus:border-indigo-500"}));default:return null}},b=function(){y&&f(ee(l)).then(function(){d(e.SUCCESS),f(ie(y)).then(function(){return f(ae("VERIFY_SMS"))})}).catch(function(){return m.error(r.formatMessage(o.verificationExpired))})};return s.useEffect(function(){l.length===6&&b()},[l]),i(J,{title:i(c,{id:"sms_verification.modal.verify_title",defaultMessage:"Verify your phone number"}),onClose:function(){return E("VERIFY_SMS")},cancelAction:n===e.IDLE?function(){return E("VERIFY_SMS")}:void 0,cancelText:"Skip for now",confirmationAction:q,confirmationText:N,secondaryAction:n===e.REQUESTED?P:void 0,secondaryText:n===e.REQUESTED?i(c,{id:"sms_verification.modal.resend_code",defaultMessage:"Resend verification code?"}):void 0,secondaryDisabled:Y},void 0,i(H,{space:4},void 0,z()))};export{se as default}; diff --git a/packs/js/video-modal-4719b4f5.js b/packs/js/video-modal-1e593c2c.js similarity index 73% rename from packs/js/video-modal-4719b4f5.js rename to packs/js/video-modal-1e593c2c.js index 2415d9ae8..86a309758 100644 --- a/packs/js/video-modal-4719b4f5.js +++ b/packs/js/video-modal-1e593c2c.js @@ -1 +1 @@ -import{a7 as n,a as o,F as c}from"../index-7380452a.js";import{V as m}from"./index-486dc940.js";import"./arrows-minimize-7c27a12c.js";import"./volume-08f8a8f1.js";import"./web.url.constructor-8f9eaf9c.js";import"./object-assign-7ac9a0a3.js";import"./es.array.last-index-of-ca8fdd84.js";import"./media-aspect-ratio-df6a7bb1.js";var y=function(t){var i=t.status,r=t.account,a=t.media,l=t.time;t.onClose;var s=n(),u=function(e){e.button===0&&!(e.ctrlKey||e.metaKey)&&(e.preventDefault(),s.push("/@".concat(r.acct,"/posts/").concat(i.id)))},d=i&&r&&o("a",{href:i.url,onClick:u},void 0,o(c,{id:"lightbox.view_context",defaultMessage:"View context"}));return o("div",{className:"pointer-events-auto mx-auto block w-full max-w-xl overflow-hidden rounded-2xl text-left align-middle shadow-xl transition-all"},void 0,o(m,{preview:a.preview_url,blurhash:a.blurhash,src:a.url,startTime:l,link:d,detailed:!0,autoFocus:!0,alt:a.description,visible:!0}))};export{y as default}; +import{a7 as n,a as o,F as c}from"../index-be605fd2.js";import{V as m}from"./index-63ea9ebf.js";import"./arrows-minimize-7c27a12c.js";import"./volume-08f8a8f1.js";import"./web.url.constructor-0fbaa340.js";import"./object-assign-35b0699c.js";import"./es.array.last-index-of-d76ad0ed.js";import"./media-aspect-ratio-df6a7bb1.js";var y=function(t){var i=t.status,r=t.account,a=t.media,l=t.time;t.onClose;var s=n(),u=function(e){e.button===0&&!(e.ctrlKey||e.metaKey)&&(e.preventDefault(),s.push("/@".concat(r.acct,"/posts/").concat(i.id)))},d=i&&r&&o("a",{href:i.url,onClick:u},void 0,o(c,{id:"lightbox.view_context",defaultMessage:"View context"}));return o("div",{className:"pointer-events-auto mx-auto block w-full max-w-xl overflow-hidden rounded-2xl text-left align-middle shadow-xl transition-all"},void 0,o(m,{preview:a.preview_url,blurhash:a.blurhash,src:a.url,startTime:l,link:d,detailed:!0,autoFocus:!0,alt:a.description,visible:!0}))};export{y as default}; diff --git a/packs/js/waitlist-page-2cc03b24.js b/packs/js/waitlist-page-7f7001df.js similarity index 92% rename from packs/js/waitlist-page-2cc03b24.js rename to packs/js/waitlist-page-7f7001df.js index 437c07669..bd0cafde6 100644 --- a/packs/js/waitlist-page-2cc03b24.js +++ b/packs/js/waitlist-page-7f7001df.js @@ -1 +1 @@ -import{d as p,t as g,b8 as x,r as h,a as e,L as y,eA as w,aa as r,F as s,a2 as n,y as N,jo as b,eY as _,aD as k}from"../index-7380452a.js";var S=function(){var a,t,o=p(),c=g(),u=x(),i=u.account,m=(a=i==null||(t=i.source)===null||t===void 0?void 0:t.sms_verified)!==null&&a!==void 0?a:!0,d=function(f){f.preventDefault(),o(_())},l=function(){return o(k("VERIFY_SMS"))};return h.useEffect(function(){m||l()},[]),e("div",{},void 0,e(b,{}),e("main",{className:"relative mx-auto flex h-screen max-w-7xl flex-col px-2 sm:px-6 lg:px-8"},void 0,e("header",{className:"relative flex h-16 justify-between"},void 0,e("div",{className:"relative flex flex-1 items-stretch justify-center"},void 0,e(y,{to:"/",className:"flex shrink-0 cursor-pointer items-center"},void 0,e(w,{alt:"Logo",className:"h-7"})),e("div",{className:"absolute inset-y-0 right-0 flex items-center pr-2"},void 0,e(r,{onClick:d,theme:"primary",to:"/logout"},void 0,e(s,{id:"navigation_bar.logout",defaultMessage:"Logout"}))))),e("div",{className:"-mt-16 flex h-full flex-col items-center justify-center"},void 0,e("div",{className:"max-w-xl"},void 0,e(n,{space:4},void 0,e("img",{src:"/instance/images/waitlist.png",className:"mx-auto h-32 w-32",alt:"Waitlisted"}),e(n,{space:2},void 0,e(N,{size:"lg",theme:"muted",align:"center",weight:"medium"},void 0,e(s,{id:"waitlist.body",defaultMessage:"Welcome back to {title}! You were previously placed on our waitlist. Please verify your phone number to receive immediate access to your account!",values:{title:c.title}})),e("div",{className:"text-center"},void 0,e(r,{onClick:l,theme:"primary"},void 0,e(s,{id:"waitlist.actions.verify_number",defaultMessage:"Verify phone number"})))))))))};export{S as default}; +import{d as p,t as g,b8 as x,r as h,a as e,L as y,eA as w,aa as r,F as s,a2 as n,y as N,jo as b,eY as _,aD as k}from"../index-be605fd2.js";var S=function(){var a,t,o=p(),c=g(),u=x(),i=u.account,m=(a=i==null||(t=i.source)===null||t===void 0?void 0:t.sms_verified)!==null&&a!==void 0?a:!0,d=function(f){f.preventDefault(),o(_())},l=function(){return o(k("VERIFY_SMS"))};return h.useEffect(function(){m||l()},[]),e("div",{},void 0,e(b,{}),e("main",{className:"relative mx-auto flex h-screen max-w-7xl flex-col px-2 sm:px-6 lg:px-8"},void 0,e("header",{className:"relative flex h-16 justify-between"},void 0,e("div",{className:"relative flex flex-1 items-stretch justify-center"},void 0,e(y,{to:"/",className:"flex shrink-0 cursor-pointer items-center"},void 0,e(w,{alt:"Logo",className:"h-7"})),e("div",{className:"absolute inset-y-0 right-0 flex items-center pr-2"},void 0,e(r,{onClick:d,theme:"primary",to:"/logout"},void 0,e(s,{id:"navigation_bar.logout",defaultMessage:"Logout"}))))),e("div",{className:"-mt-16 flex h-full flex-col items-center justify-center"},void 0,e("div",{className:"max-w-xl"},void 0,e(n,{space:4},void 0,e("img",{src:"/instance/images/waitlist.png",className:"mx-auto h-32 w-32",alt:"Waitlisted"}),e(n,{space:2},void 0,e(N,{size:"lg",theme:"muted",align:"center",weight:"medium"},void 0,e(s,{id:"waitlist.body",defaultMessage:"Welcome back to {title}! You were previously placed on our waitlist. Please verify your phone number to receive immediate access to your account!",values:{title:c.title}})),e("div",{className:"text-center"},void 0,e(r,{onClick:l,theme:"primary"},void 0,e(s,{id:"waitlist.actions.verify_number",defaultMessage:"Verify phone number"})))))))))};export{S as default}; diff --git a/packs/js/web.url.constructor-8f9eaf9c.js b/packs/js/web.url.constructor-0fbaa340.js similarity index 99% rename from packs/js/web.url.constructor-8f9eaf9c.js rename to packs/js/web.url.constructor-0fbaa340.js index a70ecd77d..2542336a0 100644 --- a/packs/js/web.url.constructor-8f9eaf9c.js +++ b/packs/js/web.url.constructor-0fbaa340.js @@ -1 +1 @@ -import{dz as Oe,dA as We,cT as Je,dB as Xe,c_ as Ke,dC as Qe,dD as Ze,dE as er,dF as rr,dG as tr,dH as ar,dI as nr,d2 as sr,dJ as ir,dK as or,dL as fr,dM as ur,dN as lr}from"../index-7380452a.js";import{o as hr}from"./object-assign-7ac9a0a3.js";var y=Oe,Z=2147483647,z=36,qe=1,ve=26,cr=38,vr=700,pr=72,mr=128,gr="-",Sr=/[^\0-\u007E]/,$e=/[.\u3002\uFF0E\uFF61]/g,we="Overflow: input needs wider integers to process",ee=z-qe,Ae=RangeError,dr=y($e.exec),N=Math.floor,re=String.fromCharCode,Re=y("".charCodeAt),Me=y([].join),H=y([].push),Pr=y("".replace),Lr=y("".split),wr=y("".toLowerCase),Ar=function(r){for(var n=[],t=0,e=r.length;t=55296&&a<=56319&&t>1,r+=N(r/n);r>ee*ve>>1;)r=N(r/ee),e+=z;return N(e+(ee+1)*r/(r+cr))},Ir=function(r){var n=[];r=Ar(r);var t=r.length,e=mr,a=0,o=pr,i,f;for(i=0;i=e&&fN((Z-a)/s))throw Ae(we);for(a+=(c-e)*s,e=c,i=0;iZ)throw Ae(we);if(f===e){for(var l=a,p=z;;){var E=p<=o?qe:p>=o+ve?ve:p-o;if(l?@[\\\]^|]/,Wr=/[\0\t\n\r #/:<>?@[\\\]^|]/,Jr=/^[\u0000-\u0020]+/,Xr=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Kr=/[\t\n\r]/g,g,Qr=function(r){var n=$r(r,"."),t,e,a,o,i,f,u;if(n.length&&n[n.length-1]===""&&n.length--,t=n.length,t>4)return r;for(e=[],a=0;a1&&d(o,0)==="0"&&(i=w(jr,o)?16:8,o=V(o,i===8?1:2)),o==="")f=0;else{if(!w(i===10?Yr:i===8?Gr:Ge,o))return r;f=X(o,i)}x(e,f)}for(a=0;a=Te(256,5-t))return null}else if(f>255)return null;for(u=Or(e),a=0;a6))return;for(f=0;l();){if(u=null,f>0)if(l()==="."&&f<4)a++;else return;if(!w(ge,l()))return;for(;w(ge,l());){if(h=X(l(),10),u===null)u=h;else{if(u===0)return;u=u*10+h}if(u>255)return;a++}n[t]=n[t]*256+u,f++,(f===2||f===4)&&t++}if(f!==4)return;break}else if(l()===":"){if(a++,!l())return}else if(l())return;n[t++]=o}if(e!==null)for(c=t-e,t=7;t!==0&&c>0;)s=n[t],n[t--]=n[e+c-1],n[e+--c]=s;else if(t!==8)return;return n},et=function(r){for(var n=null,t=1,e=null,a=0,o=0;o<8;o++)r[o]!==0?(a>t&&(n=e,t=a),e=null,a=0):(e===null&&(e=o),++a);return a>t&&(n=e,t=a),n},q=function(r){var n,t,e,a;if(typeof r=="number"){for(n=[],t=0;t<4;t++)Mr(n,r%256),r=kr(r/256);return $(n,".")}else if(typeof r=="object"){for(n="",e=et(r),t=0;t<8;t++)a&&r[t]===0||(a&&(a=!1),e===t?(n+=t?":":"::",a=!0):(n+=Dr(r[t],16),t<7&&(n+=":")));return"["+n+"]"}return r},b={},Ye=Pe({},b,{" ":1,'"':1,"<":1,">":1,"`":1}),be=Pe({},Ye,{"#":1,"?":1,"{":1,"}":1}),ne=Pe({},be,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),T=function(r,n){var t=Ur(r,0);return t>32&&t<127&&!pe(n,r)?r:encodeURIComponent(r)},j={ftp:21,file:null,http:80,https:443,ws:80,wss:443},M=function(r,n){var t;return r.length===2&&w(je,d(r,0))&&((t=d(r,1))===":"||!n&&t==="|")},_e=function(r){var n;return r.length>1&&M(V(r,0,2))&&(r.length===2||(n=d(r,2))==="/"||n==="\\"||n==="?"||n==="#")},rt=function(r){return r==="."||K(r)==="%2e"},tt=function(r){return r=K(r),r===".."||r==="%2e."||r===".%2e"||r==="%2e%2e"},se={},Ue={},ie={},ye={},Ce={},oe={},Be={},xe={},G={},Y={},fe={},ue={},le={},he={},Ne={},ce={},B={},A={},Fe={},U={},R={},Le=function(r,n,t){var e=I(r),a,o,i;if(n){if(o=this.parse(e),o)throw me(o);this.searchParams=null}else{if(t!==void 0&&(a=new Le(t,!0)),o=this.parse(e,null,a),o)throw me(o);i=Fr(new Nr),i.bindURL(this),this.searchParams=i}};Le.prototype={type:"URL",parse:function(r,n,t){var e=this,a=n||se,o=0,i="",f=!1,u=!1,h=!1,c,s,l,p;for(r=I(r),n||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,r=te(r,Jr,""),r=te(r,Xr,"$1")),r=te(r,Kr,""),c=C(r);o<=c.length;){switch(s=c[o],a){case se:if(s&&w(je,s))i+=K(s),a=Ue;else{if(n)return ae;a=ie;continue}break;case Ue:if(s&&(w(Vr,s)||s==="+"||s==="-"||s==="."))i+=K(s);else if(s===":"){if(n&&(e.isSpecial()!==pe(j,i)||i==="file"&&(e.includesCredentials()||e.port!==null)||e.scheme==="file"&&!e.host))return;if(e.scheme=i,n){e.isSpecial()&&j[e.scheme]===e.port&&(e.port=null);return}i="",e.scheme==="file"?a=he:e.isSpecial()&&t&&t.scheme===e.scheme?a=ye:e.isSpecial()?a=xe:c[o+1]==="/"?(a=Ce,o++):(e.cannotBeABaseURL=!0,x(e.path,""),a=Fe)}else{if(n)return ae;i="",a=ie,o=0;continue}break;case ie:if(!t||t.cannotBeABaseURL&&s!=="#")return ae;if(t.cannotBeABaseURL&&s==="#"){e.scheme=t.scheme,e.path=L(t.path),e.query=t.query,e.fragment="",e.cannotBeABaseURL=!0,a=R;break}a=t.scheme==="file"?he:oe;continue;case ye:if(s==="/"&&c[o+1]==="/")a=G,o++;else{a=oe;continue}break;case Ce:if(s==="/"){a=Y;break}else{a=A;continue}case oe:if(e.scheme=t.scheme,s===g)e.username=t.username,e.password=t.password,e.host=t.host,e.port=t.port,e.path=L(t.path),e.query=t.query;else if(s==="/"||s==="\\"&&e.isSpecial())a=Be;else if(s==="?")e.username=t.username,e.password=t.password,e.host=t.host,e.port=t.port,e.path=L(t.path),e.query="",a=U;else if(s==="#")e.username=t.username,e.password=t.password,e.host=t.host,e.port=t.port,e.path=L(t.path),e.query=t.query,e.fragment="",a=R;else{e.username=t.username,e.password=t.password,e.host=t.host,e.port=t.port,e.path=L(t.path),e.path.length--,a=A;continue}break;case Be:if(e.isSpecial()&&(s==="/"||s==="\\"))a=G;else if(s==="/")a=Y;else{e.username=t.username,e.password=t.password,e.host=t.host,e.port=t.port,a=A;continue}break;case xe:if(a=G,s!=="/"||d(i,o+1)!=="/")continue;o++;break;case G:if(s!=="/"&&s!=="\\"){a=Y;continue}break;case Y:if(s==="@"){f&&(i="%40"+i),f=!0,l=C(i);for(var E=0;E65535)return He;e.port=e.isSpecial()&&Q===j[e.scheme]?null:Q,i=""}if(n)return;a=B;continue}else return He;break;case he:if(e.scheme="file",s==="/"||s==="\\")a=Ne;else if(t&&t.scheme==="file")switch(s){case g:e.host=t.host,e.path=L(t.path),e.query=t.query;break;case"?":e.host=t.host,e.path=L(t.path),e.query="",a=U;break;case"#":e.host=t.host,e.path=L(t.path),e.query=t.query,e.fragment="",a=R;break;default:_e($(L(c,o),""))||(e.host=t.host,e.path=L(t.path),e.shortenPath()),a=A;continue}else{a=A;continue}break;case Ne:if(s==="/"||s==="\\"){a=ce;break}t&&t.scheme==="file"&&!_e($(L(c,o),""))&&(M(t.path[0],!0)?x(e.path,t.path[0]):e.host=t.host),a=A;continue;case ce:if(s===g||s==="/"||s==="\\"||s==="?"||s==="#"){if(!n&&M(i))a=A;else if(i===""){if(e.host="",n)return;a=B}else{if(p=e.parseHost(i),p)return p;if(e.host==="localhost"&&(e.host=""),n)return;i="",a=B}continue}else i+=s;break;case B:if(e.isSpecial()){if(a=A,s!=="/"&&s!=="\\")continue}else if(!n&&s==="?")e.query="",a=U;else if(!n&&s==="#")e.fragment="",a=R;else if(s!==g&&(a=A,s!=="/"))continue;break;case A:if(s===g||s==="/"||s==="\\"&&e.isSpecial()||!n&&(s==="?"||s==="#")){if(tt(i)?(e.shortenPath(),s!=="/"&&!(s==="\\"&&e.isSpecial())&&x(e.path,"")):rt(i)?s!=="/"&&!(s==="\\"&&e.isSpecial())&&x(e.path,""):(e.scheme==="file"&&!e.path.length&&M(i)&&(e.host&&(e.host=""),i=d(i,0)+":"),x(e.path,i)),i="",e.scheme==="file"&&(s===g||s==="?"||s==="#"))for(;e.path.length>1&&e.path[0]==="";)qr(e.path);s==="?"?(e.query="",a=U):s==="#"&&(e.fragment="",a=R)}else i+=T(s,be);break;case Fe:s==="?"?(e.query="",a=U):s==="#"?(e.fragment="",a=R):s!==g&&(e.path[0]+=T(s,b));break;case U:!n&&s==="#"?(e.fragment="",a=R):s!==g&&(s==="'"&&e.isSpecial()?e.query+="%27":s==="#"?e.query+="%23":e.query+=T(s,b));break;case R:s!==g&&(e.fragment+=T(s,Ye));break}o++}},parseHost:function(r){var n,t,e;if(d(r,0)==="["){if(d(r,r.length-1)!=="]"||(n=Zr(V(r,1,-1)),!n))return _;this.host=n}else if(this.isSpecial()){if(r=yr(r),w(br,r)||(n=Qr(r),n===null))return _;this.host=n}else{if(w(Wr,r))return _;for(n="",t=C(r),e=0;e1?arguments[1]:void 0,a=xr(t,new Le(n,!1,e));Se||(t.href=a.serialize(),t.origin=a.getOrigin(),t.protocol=a.getProtocol(),t.username=a.getUsername(),t.password=a.getPassword(),t.host=a.getHost(),t.hostname=a.getHostname(),t.port=a.getPort(),t.pathname=a.getPathname(),t.search=a.getSearch(),t.searchParams=a.getSearchParams(),t.hash=a.getHash())},v=F.prototype,S=function(r,n){return{get:function(){return J(this)[r]()},set:n&&function(t){return J(this)[n](t)},configurable:!0,enumerable:!0}};Se&&(m(v,"href",S("serialize","setHref")),m(v,"origin",S("getOrigin")),m(v,"protocol",S("getProtocol","setProtocol")),m(v,"username",S("getUsername","setUsername")),m(v,"password",S("getPassword","setPassword")),m(v,"host",S("getHost","setHost")),m(v,"hostname",S("getHostname","setHostname")),m(v,"port",S("getPort","setPort")),m(v,"pathname",S("getPathname","setPathname")),m(v,"search",S("getSearch","setSearch")),m(v,"searchParams",S("getSearchParams")),m(v,"hash",S("getHash","setHash")));W(v,"toJSON",function(){return J(this).serialize()},{enumerable:!0});W(v,"toString",function(){return J(this).serialize()},{enumerable:!0});if(O){var ke=O.createObjectURL,De=O.revokeObjectURL;ke&&W(F,"createObjectURL",Ee(ke,O)),De&&W(F,"revokeObjectURL",Ee(De,O))}Cr(F,"URL");Tr({global:!0,constructor:!0,forced:!Hr,sham:!Se},{URL:F}); +import{dz as Oe,dA as We,cT as Je,dB as Xe,c_ as Ke,dC as Qe,dD as Ze,dE as er,dF as rr,dG as tr,dH as ar,dI as nr,d2 as sr,dJ as ir,dK as or,dL as fr,dM as ur,dN as lr}from"../index-be605fd2.js";import{o as hr}from"./object-assign-35b0699c.js";var y=Oe,Z=2147483647,z=36,qe=1,ve=26,cr=38,vr=700,pr=72,mr=128,gr="-",Sr=/[^\0-\u007E]/,$e=/[.\u3002\uFF0E\uFF61]/g,we="Overflow: input needs wider integers to process",ee=z-qe,Ae=RangeError,dr=y($e.exec),N=Math.floor,re=String.fromCharCode,Re=y("".charCodeAt),Me=y([].join),H=y([].push),Pr=y("".replace),Lr=y("".split),wr=y("".toLowerCase),Ar=function(r){for(var n=[],t=0,e=r.length;t=55296&&a<=56319&&t>1,r+=N(r/n);r>ee*ve>>1;)r=N(r/ee),e+=z;return N(e+(ee+1)*r/(r+cr))},Ir=function(r){var n=[];r=Ar(r);var t=r.length,e=mr,a=0,o=pr,i,f;for(i=0;i=e&&fN((Z-a)/s))throw Ae(we);for(a+=(c-e)*s,e=c,i=0;iZ)throw Ae(we);if(f===e){for(var l=a,p=z;;){var E=p<=o?qe:p>=o+ve?ve:p-o;if(l?@[\\\]^|]/,Wr=/[\0\t\n\r #/:<>?@[\\\]^|]/,Jr=/^[\u0000-\u0020]+/,Xr=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Kr=/[\t\n\r]/g,g,Qr=function(r){var n=$r(r,"."),t,e,a,o,i,f,u;if(n.length&&n[n.length-1]===""&&n.length--,t=n.length,t>4)return r;for(e=[],a=0;a1&&d(o,0)==="0"&&(i=w(jr,o)?16:8,o=V(o,i===8?1:2)),o==="")f=0;else{if(!w(i===10?Yr:i===8?Gr:Ge,o))return r;f=X(o,i)}x(e,f)}for(a=0;a=Te(256,5-t))return null}else if(f>255)return null;for(u=Or(e),a=0;a6))return;for(f=0;l();){if(u=null,f>0)if(l()==="."&&f<4)a++;else return;if(!w(ge,l()))return;for(;w(ge,l());){if(h=X(l(),10),u===null)u=h;else{if(u===0)return;u=u*10+h}if(u>255)return;a++}n[t]=n[t]*256+u,f++,(f===2||f===4)&&t++}if(f!==4)return;break}else if(l()===":"){if(a++,!l())return}else if(l())return;n[t++]=o}if(e!==null)for(c=t-e,t=7;t!==0&&c>0;)s=n[t],n[t--]=n[e+c-1],n[e+--c]=s;else if(t!==8)return;return n},et=function(r){for(var n=null,t=1,e=null,a=0,o=0;o<8;o++)r[o]!==0?(a>t&&(n=e,t=a),e=null,a=0):(e===null&&(e=o),++a);return a>t&&(n=e,t=a),n},q=function(r){var n,t,e,a;if(typeof r=="number"){for(n=[],t=0;t<4;t++)Mr(n,r%256),r=kr(r/256);return $(n,".")}else if(typeof r=="object"){for(n="",e=et(r),t=0;t<8;t++)a&&r[t]===0||(a&&(a=!1),e===t?(n+=t?":":"::",a=!0):(n+=Dr(r[t],16),t<7&&(n+=":")));return"["+n+"]"}return r},b={},Ye=Pe({},b,{" ":1,'"':1,"<":1,">":1,"`":1}),be=Pe({},Ye,{"#":1,"?":1,"{":1,"}":1}),ne=Pe({},be,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),T=function(r,n){var t=Ur(r,0);return t>32&&t<127&&!pe(n,r)?r:encodeURIComponent(r)},j={ftp:21,file:null,http:80,https:443,ws:80,wss:443},M=function(r,n){var t;return r.length===2&&w(je,d(r,0))&&((t=d(r,1))===":"||!n&&t==="|")},_e=function(r){var n;return r.length>1&&M(V(r,0,2))&&(r.length===2||(n=d(r,2))==="/"||n==="\\"||n==="?"||n==="#")},rt=function(r){return r==="."||K(r)==="%2e"},tt=function(r){return r=K(r),r===".."||r==="%2e."||r===".%2e"||r==="%2e%2e"},se={},Ue={},ie={},ye={},Ce={},oe={},Be={},xe={},G={},Y={},fe={},ue={},le={},he={},Ne={},ce={},B={},A={},Fe={},U={},R={},Le=function(r,n,t){var e=I(r),a,o,i;if(n){if(o=this.parse(e),o)throw me(o);this.searchParams=null}else{if(t!==void 0&&(a=new Le(t,!0)),o=this.parse(e,null,a),o)throw me(o);i=Fr(new Nr),i.bindURL(this),this.searchParams=i}};Le.prototype={type:"URL",parse:function(r,n,t){var e=this,a=n||se,o=0,i="",f=!1,u=!1,h=!1,c,s,l,p;for(r=I(r),n||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,r=te(r,Jr,""),r=te(r,Xr,"$1")),r=te(r,Kr,""),c=C(r);o<=c.length;){switch(s=c[o],a){case se:if(s&&w(je,s))i+=K(s),a=Ue;else{if(n)return ae;a=ie;continue}break;case Ue:if(s&&(w(Vr,s)||s==="+"||s==="-"||s==="."))i+=K(s);else if(s===":"){if(n&&(e.isSpecial()!==pe(j,i)||i==="file"&&(e.includesCredentials()||e.port!==null)||e.scheme==="file"&&!e.host))return;if(e.scheme=i,n){e.isSpecial()&&j[e.scheme]===e.port&&(e.port=null);return}i="",e.scheme==="file"?a=he:e.isSpecial()&&t&&t.scheme===e.scheme?a=ye:e.isSpecial()?a=xe:c[o+1]==="/"?(a=Ce,o++):(e.cannotBeABaseURL=!0,x(e.path,""),a=Fe)}else{if(n)return ae;i="",a=ie,o=0;continue}break;case ie:if(!t||t.cannotBeABaseURL&&s!=="#")return ae;if(t.cannotBeABaseURL&&s==="#"){e.scheme=t.scheme,e.path=L(t.path),e.query=t.query,e.fragment="",e.cannotBeABaseURL=!0,a=R;break}a=t.scheme==="file"?he:oe;continue;case ye:if(s==="/"&&c[o+1]==="/")a=G,o++;else{a=oe;continue}break;case Ce:if(s==="/"){a=Y;break}else{a=A;continue}case oe:if(e.scheme=t.scheme,s===g)e.username=t.username,e.password=t.password,e.host=t.host,e.port=t.port,e.path=L(t.path),e.query=t.query;else if(s==="/"||s==="\\"&&e.isSpecial())a=Be;else if(s==="?")e.username=t.username,e.password=t.password,e.host=t.host,e.port=t.port,e.path=L(t.path),e.query="",a=U;else if(s==="#")e.username=t.username,e.password=t.password,e.host=t.host,e.port=t.port,e.path=L(t.path),e.query=t.query,e.fragment="",a=R;else{e.username=t.username,e.password=t.password,e.host=t.host,e.port=t.port,e.path=L(t.path),e.path.length--,a=A;continue}break;case Be:if(e.isSpecial()&&(s==="/"||s==="\\"))a=G;else if(s==="/")a=Y;else{e.username=t.username,e.password=t.password,e.host=t.host,e.port=t.port,a=A;continue}break;case xe:if(a=G,s!=="/"||d(i,o+1)!=="/")continue;o++;break;case G:if(s!=="/"&&s!=="\\"){a=Y;continue}break;case Y:if(s==="@"){f&&(i="%40"+i),f=!0,l=C(i);for(var E=0;E65535)return He;e.port=e.isSpecial()&&Q===j[e.scheme]?null:Q,i=""}if(n)return;a=B;continue}else return He;break;case he:if(e.scheme="file",s==="/"||s==="\\")a=Ne;else if(t&&t.scheme==="file")switch(s){case g:e.host=t.host,e.path=L(t.path),e.query=t.query;break;case"?":e.host=t.host,e.path=L(t.path),e.query="",a=U;break;case"#":e.host=t.host,e.path=L(t.path),e.query=t.query,e.fragment="",a=R;break;default:_e($(L(c,o),""))||(e.host=t.host,e.path=L(t.path),e.shortenPath()),a=A;continue}else{a=A;continue}break;case Ne:if(s==="/"||s==="\\"){a=ce;break}t&&t.scheme==="file"&&!_e($(L(c,o),""))&&(M(t.path[0],!0)?x(e.path,t.path[0]):e.host=t.host),a=A;continue;case ce:if(s===g||s==="/"||s==="\\"||s==="?"||s==="#"){if(!n&&M(i))a=A;else if(i===""){if(e.host="",n)return;a=B}else{if(p=e.parseHost(i),p)return p;if(e.host==="localhost"&&(e.host=""),n)return;i="",a=B}continue}else i+=s;break;case B:if(e.isSpecial()){if(a=A,s!=="/"&&s!=="\\")continue}else if(!n&&s==="?")e.query="",a=U;else if(!n&&s==="#")e.fragment="",a=R;else if(s!==g&&(a=A,s!=="/"))continue;break;case A:if(s===g||s==="/"||s==="\\"&&e.isSpecial()||!n&&(s==="?"||s==="#")){if(tt(i)?(e.shortenPath(),s!=="/"&&!(s==="\\"&&e.isSpecial())&&x(e.path,"")):rt(i)?s!=="/"&&!(s==="\\"&&e.isSpecial())&&x(e.path,""):(e.scheme==="file"&&!e.path.length&&M(i)&&(e.host&&(e.host=""),i=d(i,0)+":"),x(e.path,i)),i="",e.scheme==="file"&&(s===g||s==="?"||s==="#"))for(;e.path.length>1&&e.path[0]==="";)qr(e.path);s==="?"?(e.query="",a=U):s==="#"&&(e.fragment="",a=R)}else i+=T(s,be);break;case Fe:s==="?"?(e.query="",a=U):s==="#"?(e.fragment="",a=R):s!==g&&(e.path[0]+=T(s,b));break;case U:!n&&s==="#"?(e.fragment="",a=R):s!==g&&(s==="'"&&e.isSpecial()?e.query+="%27":s==="#"?e.query+="%23":e.query+=T(s,b));break;case R:s!==g&&(e.fragment+=T(s,Ye));break}o++}},parseHost:function(r){var n,t,e;if(d(r,0)==="["){if(d(r,r.length-1)!=="]"||(n=Zr(V(r,1,-1)),!n))return _;this.host=n}else if(this.isSpecial()){if(r=yr(r),w(br,r)||(n=Qr(r),n===null))return _;this.host=n}else{if(w(Wr,r))return _;for(n="",t=C(r),e=0;e1?arguments[1]:void 0,a=xr(t,new Le(n,!1,e));Se||(t.href=a.serialize(),t.origin=a.getOrigin(),t.protocol=a.getProtocol(),t.username=a.getUsername(),t.password=a.getPassword(),t.host=a.getHost(),t.hostname=a.getHostname(),t.port=a.getPort(),t.pathname=a.getPathname(),t.search=a.getSearch(),t.searchParams=a.getSearchParams(),t.hash=a.getHash())},v=F.prototype,S=function(r,n){return{get:function(){return J(this)[r]()},set:n&&function(t){return J(this)[n](t)},configurable:!0,enumerable:!0}};Se&&(m(v,"href",S("serialize","setHref")),m(v,"origin",S("getOrigin")),m(v,"protocol",S("getProtocol","setProtocol")),m(v,"username",S("getUsername","setUsername")),m(v,"password",S("getPassword","setPassword")),m(v,"host",S("getHost","setHost")),m(v,"hostname",S("getHostname","setHostname")),m(v,"port",S("getPort","setPort")),m(v,"pathname",S("getPathname","setPathname")),m(v,"search",S("getSearch","setSearch")),m(v,"searchParams",S("getSearchParams")),m(v,"hash",S("getHash","setHash")));W(v,"toJSON",function(){return J(this).serialize()},{enumerable:!0});W(v,"toString",function(){return J(this).serialize()},{enumerable:!0});if(O){var ke=O.createObjectURL,De=O.revokeObjectURL;ke&&W(F,"createObjectURL",Ee(ke,O)),De&&W(F,"revokeObjectURL",Ee(De,O))}Cr(F,"URL");Tr({global:!0,constructor:!0,forced:!Hr,sham:!Se},{URL:F}); diff --git a/packs/js/who-to-follow-panel-ba5370e1.js b/packs/js/who-to-follow-panel-105a50e7.js similarity index 86% rename from packs/js/who-to-follow-panel-ba5370e1.js rename to packs/js/who-to-follow-panel-105a50e7.js index 3fcacd4cd..1e7fcfad6 100644 --- a/packs/js/who-to-follow-panel-ba5370e1.js +++ b/packs/js/who-to-follow-panel-105a50e7.js @@ -1 +1 @@ -import{R as m,a as e,a2 as g,eV as u,H as w,eW as c,u as S,B as F,a5 as _,F as d,L as x,y as k,o as y}from"../index-7380452a.js";import{W as T}from"./widget-2ac720e4.js";import{u as M,a as N}from"./suggestions-c5444903.js";import"./arrow-right-b75290c7.js";const R=function(r){var t=r.limit,s=c(15,3),i=c(15,3);return m.createElement(m.Fragment,null,new Array(t).fill(void 0).map(function(n,a){return e(w,{alignItems:"center",space:2,className:"animate-pulse"},a,e(g,{space:3,className:"text-center"},void 0,e("div",{className:"mx-auto block h-9 w-9 rounded-full bg-primary-200 dark:bg-primary-700"})),e(g,{className:"text-primary-200 dark:text-primary-700"},void 0,e("p",{},void 0,u(s)),e("p",{},void 0,u(i))))}))};var I=y({dismissSuggestion:{id:"suggestions.dismiss",defaultMessage:"Dismiss suggestion"}}),A=function(t){var s=t.limit,i=S(),n=M(),a=n.data,l=n.isFetching,v=N(),f=a.slice(0,s),p=function(h){v.mutate(h.id)};return!l&&!a.length?null:e(T,{title:e(d,{id:"who_to_follow.title",defaultMessage:"People To Follow"}),action:e(x,{className:"text-right",to:"/suggestions"},void 0,e(k,{tag:"span",theme:"primary",size:"sm",className:"hover:underline"},void 0,e(d,{id:"feed_suggestions.view_all",defaultMessage:"View all"})))},void 0,l?e(R,{limit:s}):f.map(function(o){return e(F,{id:o.account,actionIcon:_,actionTitle:i.formatMessage(I.dismissSuggestion),onActionClick:p},o.account)}))};export{A as default}; +import{R as m,a as e,a2 as g,eV as u,H as w,eW as c,u as S,B as F,a5 as _,F as d,L as x,y as k,o as y}from"../index-be605fd2.js";import{W as T}from"./widget-84f84d09.js";import{u as M,a as N}from"./suggestions-28e579c4.js";import"./arrow-right-b75290c7.js";const R=function(r){var t=r.limit,s=c(15,3),i=c(15,3);return m.createElement(m.Fragment,null,new Array(t).fill(void 0).map(function(n,a){return e(w,{alignItems:"center",space:2,className:"animate-pulse"},a,e(g,{space:3,className:"text-center"},void 0,e("div",{className:"mx-auto block h-9 w-9 rounded-full bg-primary-200 dark:bg-primary-700"})),e(g,{className:"text-primary-200 dark:text-primary-700"},void 0,e("p",{},void 0,u(s)),e("p",{},void 0,u(i))))}))};var I=y({dismissSuggestion:{id:"suggestions.dismiss",defaultMessage:"Dismiss suggestion"}}),A=function(t){var s=t.limit,i=S(),n=M(),a=n.data,l=n.isFetching,v=N(),f=a.slice(0,s),p=function(h){v.mutate(h.id)};return!l&&!a.length?null:e(T,{title:e(d,{id:"who_to_follow.title",defaultMessage:"People To Follow"}),action:e(x,{className:"text-right",to:"/suggestions"},void 0,e(k,{tag:"span",theme:"primary",size:"sm",className:"hover:underline"},void 0,e(d,{id:"feed_suggestions.view_all",defaultMessage:"View all"})))},void 0,l?e(R,{limit:s}):f.map(function(o){return e(F,{id:o.account,actionIcon:_,actionTitle:i.formatMessage(I.dismissSuggestion),onActionClick:p},o.account)}))};export{A as default}; diff --git a/packs/js/widget-2ac720e4.js b/packs/js/widget-84f84d09.js similarity index 89% rename from packs/js/widget-2ac720e4.js rename to packs/js/widget-84f84d09.js index 63e5d24b1..d03641c18 100644 --- a/packs/js/widget-2ac720e4.js +++ b/packs/js/widget-84f84d09.js @@ -1 +1 @@ -import{v}from"./arrow-right-b75290c7.js";import{a as i,H as g,aG as u,a2 as c,y as h}from"../index-7380452a.js";var m=function(t){var e=t.title;return i(h,{size:"xl",weight:"bold",tag:"h1"},void 0,e)},k=function(t){var e=t.children;return i(c,{space:3},void 0,e)},w=function(t){var e=t.title,l=t.children,n=t.onActionClick,o=t.actionIcon,r=o===void 0?v:o,d=t.actionTitle,s=t.action;return i(c,{space:4},void 0,i(g,{alignItems:"center",justifyContent:"between"},void 0,i(m,{title:e}),s||n&&i(u,{className:"ml-2 h-6 w-6 text-black rtl:rotate-180 dark:text-white",src:r,onClick:n,title:d})),i(k,{},void 0,l))};export{w as W}; +import{v}from"./arrow-right-b75290c7.js";import{a as i,H as g,aG as u,a2 as c,y as h}from"../index-be605fd2.js";var m=function(t){var e=t.title;return i(h,{size:"xl",weight:"bold",tag:"h1"},void 0,e)},k=function(t){var e=t.children;return i(c,{space:3},void 0,e)},w=function(t){var e=t.title,l=t.children,n=t.onActionClick,o=t.actionIcon,r=o===void 0?v:o,d=t.actionTitle,s=t.action;return i(c,{space:4},void 0,i(g,{alignItems:"center",justifyContent:"between"},void 0,i(m,{title:e}),s||n&&i(u,{className:"ml-2 h-6 w-6 text-black rtl:rotate-180 dark:text-white",src:r,onClick:n,title:d})),i(k,{},void 0,l))};export{w as W};