@lmvz-ds/components 0.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +3 -0
- package/assets/LMVZ_logo_175.svg +1 -0
- package/assets/card-placeholder.svg +4 -0
- package/assets/fonts/Router-Bold.woff +0 -0
- package/assets/fonts/Router-Book.woff +0 -0
- package/assets/fonts/Router-Medium.woff +0 -0
- package/assets/icons/Logo.svg +10 -0
- package/assets/icons/actions.svg +5 -0
- package/assets/icons/adduser.svg +3 -0
- package/assets/icons/alert.svg +3 -0
- package/assets/icons/apple.svg +3 -0
- package/assets/icons/arrow-down.svg +3 -0
- package/assets/icons/arrow-left.svg +3 -0
- package/assets/icons/arrow-right.svg +3 -0
- package/assets/icons/arrow-up.svg +3 -0
- package/assets/icons/book.svg +3 -0
- package/assets/icons/bookmark.svg +3 -0
- package/assets/icons/checkmark.svg +3 -0
- package/assets/icons/chevron-down.svg +3 -0
- package/assets/icons/chevron-left.svg +3 -0
- package/assets/icons/chevron-right.svg +3 -0
- package/assets/icons/chevron-up.svg +3 -0
- package/assets/icons/close-l.svg +3 -0
- package/assets/icons/close-sm.svg +3 -0
- package/assets/icons/cog.svg +4 -0
- package/assets/icons/computer.svg +3 -0
- package/assets/icons/dashboard.svg +6 -0
- package/assets/icons/delete.svg +3 -0
- package/assets/icons/download.svg +3 -0
- package/assets/icons/edit.svg +3 -0
- package/assets/icons/external.svg +3 -0
- package/assets/icons/facebook.svg +3 -0
- package/assets/icons/favorite.svg +3 -0
- package/assets/icons/filter.svg +3 -0
- package/assets/icons/group.svg +3 -0
- package/assets/icons/hide.svg +3 -0
- package/assets/icons/home.svg +3 -0
- package/assets/icons/info.svg +3 -0
- package/assets/icons/instagram.svg +3 -0
- package/assets/icons/letter.svg +3 -0
- package/assets/icons/linkedin.svg +5 -0
- package/assets/icons/logout.svg +3 -0
- package/assets/icons/map.svg +3 -0
- package/assets/icons/minus.svg +3 -0
- package/assets/icons/navigation.svg +3 -0
- package/assets/icons/plus.svg +3 -0
- package/assets/icons/qr-scan.svg +3 -0
- package/assets/icons/question.svg +10 -0
- package/assets/icons/reader.svg +3 -0
- package/assets/icons/reset.svg +3 -0
- package/assets/icons/school.svg +3 -0
- package/assets/icons/search.svg +3 -0
- package/assets/icons/send.svg +3 -0
- package/assets/icons/settings.svg +3 -0
- package/assets/icons/share.svg +10 -0
- package/assets/icons/shopping-cart.svg +3 -0
- package/assets/icons/show.svg +3 -0
- package/assets/icons/snapchat.svg +3 -0
- package/assets/icons/sort.svg +3 -0
- package/assets/icons/speech-bubble.svg +3 -0
- package/assets/icons/star.svg +3 -0
- package/assets/icons/student.svg +3 -0
- package/assets/icons/upload.svg +3 -0
- package/assets/icons/user.svg +3 -0
- package/assets/icons/warn-circle.svg +3 -0
- package/assets/icons/warn-triangle.svg +3 -0
- package/assets/icons/whatsapp.svg +4 -0
- package/assets/icons/world.svg +10 -0
- package/assets/icons/x.svg +3 -0
- package/assets/icons/youtube.svg +3 -0
- package/assets/zukunftslinie.svg +3 -0
- package/dist/cjs/Effect-BIlTHtLK.js +19172 -0
- package/dist/cjs/_commonjsHelpers-CFO10eej.js +7 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/aria-validation-controller-B7unOPxT.js +2929 -0
- package/dist/cjs/axe-BNqwbBGU.js +32834 -0
- package/dist/cjs/component-CRc6eHcV.js +138 -0
- package/dist/cjs/element-activation-controller-DC_6T0Rt.js +31 -0
- package/dist/cjs/icons-DbL3LSmP.js +659 -0
- package/dist/cjs/index-9ZJx0550.js +2752 -0
- package/dist/cjs/index-CVw4GUo6.js +92 -0
- package/dist/cjs/index.cjs.js +96 -0
- package/dist/cjs/lmvz-action.cjs.entry.js +22 -0
- package/dist/cjs/lmvz-button.cjs.entry.js +72 -0
- package/dist/cjs/lmvz-card.cjs.entry.js +33 -0
- package/dist/cjs/lmvz-chip.cjs.entry.js +18 -0
- package/dist/cjs/lmvz-components.cjs.js +25 -0
- package/dist/cjs/lmvz-header.cjs.entry.js +134 -0
- package/dist/cjs/lmvz-icon.cjs.entry.js +76 -0
- package/dist/cjs/lmvz-input.cjs.entry.js +176 -0
- package/dist/cjs/lmvz-menuitem.cjs.entry.js +32 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/collection/api/ds.constants.js +73 -0
- package/dist/collection/api/index.js +1 -0
- package/dist/collection/assets/LMVZ_logo_175.svg +1 -0
- package/dist/collection/assets/card-placeholder.svg +4 -0
- package/dist/collection/assets/fonts/Router-Bold.woff +0 -0
- package/dist/collection/assets/fonts/Router-Book.woff +0 -0
- package/dist/collection/assets/fonts/Router-Medium.woff +0 -0
- package/dist/collection/assets/icons/Logo.svg +10 -0
- package/dist/collection/assets/icons/actions.svg +5 -0
- package/dist/collection/assets/icons/adduser.svg +3 -0
- package/dist/collection/assets/icons/alert.svg +3 -0
- package/dist/collection/assets/icons/apple.svg +3 -0
- package/dist/collection/assets/icons/arrow-down.svg +3 -0
- package/dist/collection/assets/icons/arrow-left.svg +3 -0
- package/dist/collection/assets/icons/arrow-right.svg +3 -0
- package/dist/collection/assets/icons/arrow-up.svg +3 -0
- package/dist/collection/assets/icons/book.svg +3 -0
- package/dist/collection/assets/icons/bookmark.svg +3 -0
- package/dist/collection/assets/icons/checkmark.svg +3 -0
- package/dist/collection/assets/icons/chevron-down.svg +3 -0
- package/dist/collection/assets/icons/chevron-left.svg +3 -0
- package/dist/collection/assets/icons/chevron-right.svg +3 -0
- package/dist/collection/assets/icons/chevron-up.svg +3 -0
- package/dist/collection/assets/icons/close-l.svg +3 -0
- package/dist/collection/assets/icons/close-sm.svg +3 -0
- package/dist/collection/assets/icons/cog.svg +4 -0
- package/dist/collection/assets/icons/computer.svg +3 -0
- package/dist/collection/assets/icons/dashboard.svg +6 -0
- package/dist/collection/assets/icons/delete.svg +3 -0
- package/dist/collection/assets/icons/download.svg +3 -0
- package/dist/collection/assets/icons/edit.svg +3 -0
- package/dist/collection/assets/icons/external.svg +3 -0
- package/dist/collection/assets/icons/facebook.svg +3 -0
- package/dist/collection/assets/icons/favorite.svg +3 -0
- package/dist/collection/assets/icons/filter.svg +3 -0
- package/dist/collection/assets/icons/group.svg +3 -0
- package/dist/collection/assets/icons/hide.svg +3 -0
- package/dist/collection/assets/icons/home.svg +3 -0
- package/dist/collection/assets/icons/info.svg +3 -0
- package/dist/collection/assets/icons/instagram.svg +3 -0
- package/dist/collection/assets/icons/letter.svg +3 -0
- package/dist/collection/assets/icons/linkedin.svg +5 -0
- package/dist/collection/assets/icons/logout.svg +3 -0
- package/dist/collection/assets/icons/map.svg +3 -0
- package/dist/collection/assets/icons/minus.svg +3 -0
- package/dist/collection/assets/icons/navigation.svg +3 -0
- package/dist/collection/assets/icons/plus.svg +3 -0
- package/dist/collection/assets/icons/qr-scan.svg +3 -0
- package/dist/collection/assets/icons/question.svg +10 -0
- package/dist/collection/assets/icons/reader.svg +3 -0
- package/dist/collection/assets/icons/reset.svg +3 -0
- package/dist/collection/assets/icons/school.svg +3 -0
- package/dist/collection/assets/icons/search.svg +3 -0
- package/dist/collection/assets/icons/send.svg +3 -0
- package/dist/collection/assets/icons/settings.svg +3 -0
- package/dist/collection/assets/icons/share.svg +10 -0
- package/dist/collection/assets/icons/shopping-cart.svg +3 -0
- package/dist/collection/assets/icons/show.svg +3 -0
- package/dist/collection/assets/icons/snapchat.svg +3 -0
- package/dist/collection/assets/icons/sort.svg +3 -0
- package/dist/collection/assets/icons/speech-bubble.svg +3 -0
- package/dist/collection/assets/icons/star.svg +3 -0
- package/dist/collection/assets/icons/student.svg +3 -0
- package/dist/collection/assets/icons/upload.svg +3 -0
- package/dist/collection/assets/icons/user.svg +3 -0
- package/dist/collection/assets/icons/warn-circle.svg +3 -0
- package/dist/collection/assets/icons/warn-triangle.svg +3 -0
- package/dist/collection/assets/icons/whatsapp.svg +4 -0
- package/dist/collection/assets/icons/world.svg +10 -0
- package/dist/collection/assets/icons/x.svg +3 -0
- package/dist/collection/assets/icons/youtube.svg +3 -0
- package/dist/collection/assets/zukunftslinie.svg +3 -0
- package/dist/collection/collection-manifest.json +21 -0
- package/dist/collection/components/lmvz-action/lmvz-action.css +3 -0
- package/dist/collection/components/lmvz-action/lmvz-action.js +45 -0
- package/dist/collection/components/lmvz-button/lmvz-button.css +199 -0
- package/dist/collection/components/lmvz-button/lmvz-button.js +245 -0
- package/dist/collection/components/lmvz-card/lmvz-card.css +283 -0
- package/dist/collection/components/lmvz-card/lmvz-card.js +137 -0
- package/dist/collection/components/lmvz-chip/lmvz-chip.css +3 -0
- package/dist/collection/components/lmvz-chip/lmvz-chip.js +42 -0
- package/dist/collection/components/lmvz-header/lmvz-header.css +49 -0
- package/dist/collection/components/lmvz-header/lmvz-header.js +138 -0
- package/dist/collection/components/lmvz-icon/icons.js +36 -0
- package/dist/collection/components/lmvz-icon/lmvz-icon.css +82 -0
- package/dist/collection/components/lmvz-icon/lmvz-icon.js +191 -0
- package/dist/collection/components/lmvz-icon/public.js +1 -0
- package/dist/collection/components/lmvz-icon/test/icons.unit.js +89 -0
- package/dist/collection/components/lmvz-input/lmvz-input.css +201 -0
- package/dist/collection/components/lmvz-input/lmvz-input.js +847 -0
- package/dist/collection/components/lmvz-menuitem/lmvz-menuitem.css +89 -0
- package/dist/collection/components/lmvz-menuitem/lmvz-menuitem.js +97 -0
- package/dist/collection/index.js +3 -0
- package/dist/collection/integration/header-integration.js +28 -0
- package/dist/collection/styles/buttons.css +1 -0
- package/dist/collection/styles/router-font.css +1 -0
- package/dist/collection/styles/tokens.css +1 -0
- package/dist/collection/styles/typography.css +1 -0
- package/dist/collection/themes/all.css +1 -0
- package/dist/collection/themes/dark.css +1 -0
- package/dist/collection/themes/light.css +1 -0
- package/dist/collection/utils/component.js +268 -0
- package/dist/collection/utils/effect.js +6 -0
- package/dist/collection/utils/element-activation-controller.js +27 -0
- package/dist/collection/utils/http.js +24 -0
- package/dist/collection/utils/http.test.js +46 -0
- package/dist/collection/utils/list-keyboard-controller.js +44 -0
- package/dist/collection/utils/public.js +1 -0
- package/dist/collection/utils/reactive-controller-host.js +39 -0
- package/dist/collection/utils/typing.js +1 -0
- package/dist/collection/utils/url.js +7 -0
- package/dist/collection/utils/validation/aria-validation-controller.js +124 -0
- package/dist/collection/utils/validation/svg.js +24 -0
- package/dist/components/index.d.ts +53 -0
- package/dist/components/index.js +1 -0
- package/dist/components/lmvz-action.d.ts +11 -0
- package/dist/components/lmvz-action.js +1 -0
- package/dist/components/lmvz-button.d.ts +11 -0
- package/dist/components/lmvz-button.js +1 -0
- package/dist/components/lmvz-card.d.ts +11 -0
- package/dist/components/lmvz-card.js +1 -0
- package/dist/components/lmvz-chip.d.ts +11 -0
- package/dist/components/lmvz-chip.js +1 -0
- package/dist/components/lmvz-header.d.ts +11 -0
- package/dist/components/lmvz-header.js +1 -0
- package/dist/components/lmvz-icon.d.ts +11 -0
- package/dist/components/lmvz-icon.js +1 -0
- package/dist/components/lmvz-input.d.ts +11 -0
- package/dist/components/lmvz-input.js +1 -0
- package/dist/components/lmvz-menuitem.d.ts +11 -0
- package/dist/components/lmvz-menuitem.js +1 -0
- package/dist/components/p-B3JVFwO1.js +1 -0
- package/dist/components/p-B85MJLTf.js +1 -0
- package/dist/components/p-BFwzIh71.js +1 -0
- package/dist/components/p-BaPwpeMs.js +1 -0
- package/dist/components/p-CN0JX9-m.js +1 -0
- package/dist/components/p-D1HbKFuh.js +12 -0
- package/dist/components/p-DDmjv-N_.js +1 -0
- package/dist/components/p-DMLRPGid.js +6 -0
- package/dist/esm/Effect-D9S7OTyY.js +18963 -0
- package/dist/esm/_commonjsHelpers-B85MJLTf.js +5 -0
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/aria-validation-controller-C7nQzCCq.js +2926 -0
- package/dist/esm/axe-cRQ9Ux1I.js +32832 -0
- package/dist/esm/component-B3JVFwO1.js +132 -0
- package/dist/esm/element-activation-controller-CN0JX9-m.js +29 -0
- package/dist/esm/icons-B71gAZmE.js +655 -0
- package/dist/esm/index-Bt32KzDW.js +90 -0
- package/dist/esm/index-smGPjoDX.js +2741 -0
- package/dist/esm/index.js +85 -0
- package/dist/esm/lmvz-action.entry.js +20 -0
- package/dist/esm/lmvz-button.entry.js +70 -0
- package/dist/esm/lmvz-card.entry.js +31 -0
- package/dist/esm/lmvz-chip.entry.js +16 -0
- package/dist/esm/lmvz-components.js +21 -0
- package/dist/esm/lmvz-header.entry.js +132 -0
- package/dist/esm/lmvz-icon.entry.js +74 -0
- package/dist/esm/lmvz-input.entry.js +174 -0
- package/dist/esm/lmvz-menuitem.entry.js +30 -0
- package/dist/esm/loader.js +11 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/lmvz-components/assets/LMVZ_logo_175.svg +1 -0
- package/dist/lmvz-components/assets/card-placeholder.svg +4 -0
- package/dist/lmvz-components/assets/fonts/Router-Bold.woff +0 -0
- package/dist/lmvz-components/assets/fonts/Router-Book.woff +0 -0
- package/dist/lmvz-components/assets/fonts/Router-Medium.woff +0 -0
- package/dist/lmvz-components/assets/icons/Logo.svg +10 -0
- package/dist/lmvz-components/assets/icons/actions.svg +5 -0
- package/dist/lmvz-components/assets/icons/adduser.svg +3 -0
- package/dist/lmvz-components/assets/icons/alert.svg +3 -0
- package/dist/lmvz-components/assets/icons/apple.svg +3 -0
- package/dist/lmvz-components/assets/icons/arrow-down.svg +3 -0
- package/dist/lmvz-components/assets/icons/arrow-left.svg +3 -0
- package/dist/lmvz-components/assets/icons/arrow-right.svg +3 -0
- package/dist/lmvz-components/assets/icons/arrow-up.svg +3 -0
- package/dist/lmvz-components/assets/icons/book.svg +3 -0
- package/dist/lmvz-components/assets/icons/bookmark.svg +3 -0
- package/dist/lmvz-components/assets/icons/checkmark.svg +3 -0
- package/dist/lmvz-components/assets/icons/chevron-down.svg +3 -0
- package/dist/lmvz-components/assets/icons/chevron-left.svg +3 -0
- package/dist/lmvz-components/assets/icons/chevron-right.svg +3 -0
- package/dist/lmvz-components/assets/icons/chevron-up.svg +3 -0
- package/dist/lmvz-components/assets/icons/close-l.svg +3 -0
- package/dist/lmvz-components/assets/icons/close-sm.svg +3 -0
- package/dist/lmvz-components/assets/icons/cog.svg +4 -0
- package/dist/lmvz-components/assets/icons/computer.svg +3 -0
- package/dist/lmvz-components/assets/icons/dashboard.svg +6 -0
- package/dist/lmvz-components/assets/icons/delete.svg +3 -0
- package/dist/lmvz-components/assets/icons/download.svg +3 -0
- package/dist/lmvz-components/assets/icons/edit.svg +3 -0
- package/dist/lmvz-components/assets/icons/external.svg +3 -0
- package/dist/lmvz-components/assets/icons/facebook.svg +3 -0
- package/dist/lmvz-components/assets/icons/favorite.svg +3 -0
- package/dist/lmvz-components/assets/icons/filter.svg +3 -0
- package/dist/lmvz-components/assets/icons/group.svg +3 -0
- package/dist/lmvz-components/assets/icons/hide.svg +3 -0
- package/dist/lmvz-components/assets/icons/home.svg +3 -0
- package/dist/lmvz-components/assets/icons/info.svg +3 -0
- package/dist/lmvz-components/assets/icons/instagram.svg +3 -0
- package/dist/lmvz-components/assets/icons/letter.svg +3 -0
- package/dist/lmvz-components/assets/icons/linkedin.svg +5 -0
- package/dist/lmvz-components/assets/icons/logout.svg +3 -0
- package/dist/lmvz-components/assets/icons/map.svg +3 -0
- package/dist/lmvz-components/assets/icons/minus.svg +3 -0
- package/dist/lmvz-components/assets/icons/navigation.svg +3 -0
- package/dist/lmvz-components/assets/icons/plus.svg +3 -0
- package/dist/lmvz-components/assets/icons/qr-scan.svg +3 -0
- package/dist/lmvz-components/assets/icons/question.svg +10 -0
- package/dist/lmvz-components/assets/icons/reader.svg +3 -0
- package/dist/lmvz-components/assets/icons/reset.svg +3 -0
- package/dist/lmvz-components/assets/icons/school.svg +3 -0
- package/dist/lmvz-components/assets/icons/search.svg +3 -0
- package/dist/lmvz-components/assets/icons/send.svg +3 -0
- package/dist/lmvz-components/assets/icons/settings.svg +3 -0
- package/dist/lmvz-components/assets/icons/share.svg +10 -0
- package/dist/lmvz-components/assets/icons/shopping-cart.svg +3 -0
- package/dist/lmvz-components/assets/icons/show.svg +3 -0
- package/dist/lmvz-components/assets/icons/snapchat.svg +3 -0
- package/dist/lmvz-components/assets/icons/sort.svg +3 -0
- package/dist/lmvz-components/assets/icons/speech-bubble.svg +3 -0
- package/dist/lmvz-components/assets/icons/star.svg +3 -0
- package/dist/lmvz-components/assets/icons/student.svg +3 -0
- package/dist/lmvz-components/assets/icons/upload.svg +3 -0
- package/dist/lmvz-components/assets/icons/user.svg +3 -0
- package/dist/lmvz-components/assets/icons/warn-circle.svg +3 -0
- package/dist/lmvz-components/assets/icons/warn-triangle.svg +3 -0
- package/dist/lmvz-components/assets/icons/whatsapp.svg +4 -0
- package/dist/lmvz-components/assets/icons/world.svg +10 -0
- package/dist/lmvz-components/assets/icons/x.svg +3 -0
- package/dist/lmvz-components/assets/icons/youtube.svg +3 -0
- package/dist/lmvz-components/assets/zukunftslinie.svg +3 -0
- package/dist/lmvz-components/index.esm.js +1 -0
- package/dist/lmvz-components/lmvz-components.esm.js +1 -0
- package/dist/lmvz-components/p-87b01940.entry.js +1 -0
- package/dist/lmvz-components/p-9faac8f3.entry.js +1 -0
- package/dist/lmvz-components/p-B3JVFwO1.js +1 -0
- package/dist/lmvz-components/p-B85MJLTf.js +1 -0
- package/dist/lmvz-components/p-CN0JX9-m.js +1 -0
- package/dist/lmvz-components/p-D1HbKFuh.js +12 -0
- package/dist/lmvz-components/p-D9S7OTyY.js +1 -0
- package/dist/lmvz-components/p-DMLRPGid.js +6 -0
- package/dist/lmvz-components/p-DQuL1Twl.js +1 -0
- package/dist/lmvz-components/p-DlIX18fw.js +1 -0
- package/dist/lmvz-components/p-DlrjrWsu.js +1 -0
- package/dist/lmvz-components/p-a4615e4b.entry.js +1 -0
- package/dist/lmvz-components/p-a8c88454.entry.js +1 -0
- package/dist/lmvz-components/p-d4b68381.entry.js +1 -0
- package/dist/lmvz-components/p-e63e239a.entry.js +1 -0
- package/dist/lmvz-components/p-f956a5e7.entry.js +1 -0
- package/dist/lmvz-components/p-fefd2fe4.entry.js +1 -0
- package/dist/lmvz-components/p-smGPjoDX.js +2 -0
- package/dist/lmvz-components/styles/buttons.css +1 -0
- package/dist/lmvz-components/styles/router-font.css +1 -0
- package/dist/lmvz-components/styles/tokens.css +1 -0
- package/dist/lmvz-components/styles/typography.css +1 -0
- package/dist/lmvz-components/themes/all.css +1 -0
- package/dist/lmvz-components/themes/dark.css +1 -0
- package/dist/lmvz-components/themes/light.css +1 -0
- package/dist/manifest.d.ts +480 -0
- package/dist/manifest.json +5184 -0
- package/dist/types/api/aria-types.d.ts +9 -0
- package/dist/types/api/ds.constants.d.ts +8 -0
- package/dist/types/api/ds.types.d.ts +39 -0
- package/dist/types/api/index.d.ts +3 -0
- package/dist/types/components/lmvz-action/lmvz-action.d.ts +6 -0
- package/dist/types/components/lmvz-button/lmvz-button.d.ts +25 -0
- package/dist/types/components/lmvz-card/lmvz-card.d.ts +11 -0
- package/dist/types/components/lmvz-chip/lmvz-chip.d.ts +4 -0
- package/dist/types/components/lmvz-header/lmvz-header.d.ts +23 -0
- package/dist/types/components/lmvz-icon/icons.d.ts +8 -0
- package/dist/types/components/lmvz-icon/lmvz-icon.d.ts +20 -0
- package/dist/types/components/lmvz-icon/public.d.ts +1 -0
- package/dist/types/components/lmvz-icon/test/icons.unit.d.ts +1 -0
- package/dist/types/components/lmvz-input/lmvz-input.d.ts +63 -0
- package/dist/types/components/lmvz-menuitem/lmvz-menuitem.d.ts +12 -0
- package/dist/types/components.d.ts +773 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/stencil-public-runtime.d.ts +1860 -0
- package/dist/types/utils/component.d.ts +36 -0
- package/dist/types/utils/effect.d.ts +3 -0
- package/dist/types/utils/element-activation-controller.d.ts +19 -0
- package/dist/types/utils/http.d.ts +24 -0
- package/dist/types/utils/http.test.d.ts +1 -0
- package/dist/types/utils/list-keyboard-controller.d.ts +13 -0
- package/dist/types/utils/public.d.ts +1 -0
- package/dist/types/utils/reactive-controller-host.d.ts +26 -0
- package/dist/types/utils/typing.d.ts +3 -0
- package/dist/types/utils/url.d.ts +8 -0
- package/dist/types/utils/validation/aria-validation-controller.d.ts +31 -0
- package/dist/types/utils/validation/svg.d.ts +11 -0
- package/hydrate/index.d.ts +287 -0
- package/hydrate/index.js +78213 -0
- package/hydrate/index.mjs +78203 -0
- package/hydrate/package.json +12 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +216 -0
- package/readme.md +193 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as t,B as e}from"./p-BaPwpeMs.js";const r=function(t,e){if("function"==typeof t)return function(){return t(arguments)?e.apply(this,arguments):t=>e(t,...arguments)};switch(t){case 0:case 1:throw new RangeError(`Invalid arity ${t}`);case 2:return function(t,r){return arguments.length>=2?e(t,r):function(r){return e(r,t)}};case 3:return function(t,r,n){return arguments.length>=3?e(t,r,n):function(n){return e(n,t,r)}};case 4:return function(t,r,n,s){return arguments.length>=4?e(t,r,n,s):function(s){return e(s,t,r,n)}};case 5:return function(t,r,n,s,i){return arguments.length>=5?e(t,r,n,s,i):function(i){return e(i,t,r,n,s)}};default:return function(){if(arguments.length>=t)return e.apply(this,arguments);const r=arguments;return function(t){return e(t,...r)}}}},n=t=>t,s=t=>()=>t,i=s(!0),o=s(!1),c=s(void 0),u=c;function a(t,e,r,n,s,i,o,c,u){switch(arguments.length){case 1:return t;case 2:return e(t);case 3:return r(e(t));case 4:return n(r(e(t)));case 5:return s(n(r(e(t))));case 6:return i(s(n(r(e(t)))));case 7:return o(i(s(n(r(e(t))))));case 8:return c(o(i(s(n(r(e(t)))))));case 9:return u(c(o(i(s(n(r(e(t))))))));default:{let t=arguments[0];for(let e=1;e<arguments.length;e++)t=arguments[e](t);return t}}}const h=t=>(e,r)=>e===r||t(e,r),l=r(2,((t,e)=>h(((r,n)=>t(e(r),e(n)))))),f="effect/GlobalValue";let d;const b=(t,e)=>(d||(globalThis[f]??=new Map,d=globalThis[f]),d.has(t)||d.set(t,e()),d.get(t)),p=t=>"number"==typeof t,m=t=>"function"==typeof t,S=t=>(t=>"object"==typeof t&&null!==t)(t)||m(t),y=r(2,((t,e)=>S(t)&&e in t)),g=r(2,((t,e)=>y(t,"_tag")&&t._tag===e)),w=t=>null==t,v=t=>"string"==typeof t||y(t,Symbol.iterator),_=t=>`BUG: ${t} - please report an issue at https://github.com/Effect-TS/effect/issues`;let O=class t{self;called=!1;constructor(t){this.self=t}next(t){return this.called?{value:t,done:!0}:(this.called=!0,{value:this.self,done:!1})}return(t){return{value:t,done:!0}}throw(t){throw t}[Symbol.iterator](){return new t(this.self)}};class E{_state;constructor(t,e,r,n){return w(e)&&w(t)?(e=4294967295*Math.random()>>>0,t=0):w(e)&&(e=t,t=0),w(n)&&w(r)?(n=this._state?this._state[3]:4150755663,r=this._state?this._state[2]:335903614):w(n)&&(n=r,r=0),this._state=new Int32Array([0,0,r>>>0,(1|(n||0))>>>0]),this._next(),F(this._state,this._state[0],this._state[1],t>>>0,e>>>0),this._next(),this}getState(){return[this._state[0],this._state[1],this._state[2],this._state[3]]}setState(t){this._state[0]=t[0],this._state[1]=t[1],this._state[2]=t[2],this._state[3]=1|t[3]}integer(t){return Math.round(this.number()*Number.MAX_SAFE_INTEGER)%t}number(){return(1*(67108863&this._next())*134217728+1*(134217727&this._next()))/9007199254740992}_next(){const t=this._state[0]>>>0,e=this._state[1]>>>0;!function(t,e,r,n,s){let i=32557*(r>>>16)>>>0,o=19605*(65535&r)>>>0,c=32557*(65535&r)>>>0,u=19605*(r>>>16)+((o>>>16)+(i>>>16))>>>0;o=o<<16>>>0,c=c+o>>>0,c>>>0<o>>>0&&(u=u+1>>>0),i=i<<16>>>0,c=c+i>>>0,c>>>0<i>>>0&&(u=u+1>>>0),u=u+Math.imul(r,1481765933)>>>0,u=u+Math.imul(e,s)>>>0,t[0]=u,t[1]=c}(this._state,t,e,0,1284865837),F(this._state,this._state[0],this._state[1],this._state[2],this._state[3]);let r=t>>>18,n=(e>>>18|t<<14)>>>0;r=(r^t)>>>0,n=(n^e)>>>0;const s=(n>>>27|r<<5)>>>0,i=t>>>27;return(s>>>i|s<<((-i>>>0&31)>>>0))>>>0}}function F(t,e,r,n,s){let i=e+n>>>0;const o=r+s>>>0;o>>>0<r>>>0&&(i=i+1|0),t[0]=i,t[1]=o}const k=Symbol.for("effect/Utils/YieldWrap");class M{#t;constructor(t){this.#t=t}[k](){return this.#t}}function C(t){if("object"==typeof t&&null!==t&&k in t)return t[k]();throw new Error(_("yieldWrapGet"))}const I=b("effect/Utils/isStructuralRegion",(()=>({enabled:!1,tester:void 0}))),j={effect_internal_function:t=>t()},N=!0===j.effect_internal_function((()=>(new Error).stack))?.includes("effect_internal_function")?j.effect_internal_function:t=>{try{return t()}finally{}},R=b(Symbol.for("effect/Hash/randomHashCache"),(()=>new WeakMap)),A=Symbol.for("effect/Hash"),x=t=>{if(!0===I.enabled)return 0;switch(typeof t){case"number":return P(t);case"bigint":return B(t.toString(10));case"boolean":case"symbol":return B(String(t));case"string":return B(t);case"undefined":return B("undefined");case"function":case"object":return null===t?B("null"):t instanceof Date?Number.isNaN(t.getTime())?B("Invalid Date"):x(t.toISOString()):t instanceof URL?x(t.href):L(t)?t[A]():D(t);default:throw new Error(`BUG: unhandled typeof ${typeof t} - please report an issue at https://github.com/Effect-TS/effect/issues`)}},D=t=>(R.has(t)||R.set(t,P(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))),R.get(t)),T=t=>e=>53*e^t,$=t=>3221225471&t|t>>>1&1073741824,L=t=>y(t,A),P=t=>{if(t!=t||t===1/0)return 0;let e=0|t;for(e!==t&&(e^=4294967295*t);t>4294967295;)e^=t/=4294967295;return $(e)},B=t=>{let e=5381,r=t.length;for(;r;)e=33*e^t.charCodeAt(--r);return $(e)},q=t=>((t,e)=>{let r=12289;for(let n=0;n<e.length;n++)r^=a(B(e[n]),T(x(t[e[n]])));return $(r)})(t,Object.keys(t)),U=t=>{let e=6151;for(let r=0;r<t.length;r++)e=a(e,T(x(t[r])));return $(e)},z=function(){if(1===arguments.length){const t=arguments[0];return function(e){return Object.defineProperty(t,A,{value:()=>e,enumerable:!1}),e}}const t=arguments[1];return Object.defineProperty(arguments[0],A,{value:()=>t,enumerable:!1}),t},J=Symbol.for("effect/Equal");function W(){return 1===arguments.length?t=>V(t,arguments[0]):V(arguments[0],arguments[1])}function V(t,e){if(t===e)return!0;const r=typeof t;if(r!==typeof e)return!1;if("object"===r||"function"===r){if(null!==t&&null!==e){if(H(t)&&H(e))return!(x(t)!==x(e)||!t[J](e))||!(!I.enabled||!I.tester)&&I.tester(t,e);if(t instanceof Date&&e instanceof Date){const r=t.getTime(),n=e.getTime();return r===n||Number.isNaN(r)&&Number.isNaN(n)}if(t instanceof URL&&e instanceof URL)return t.href===e.href}if(I.enabled){if(Array.isArray(t)&&Array.isArray(e))return t.length===e.length&&t.every(((t,r)=>V(t,e[r])));if(Object.getPrototypeOf(t)===Object.prototype&&Object.getPrototypeOf(t)===Object.prototype){const r=Object.keys(t),n=Object.keys(e);if(r.length===n.length){for(const n of r)if(!(n in e)||!V(t[n],e[n]))return!!I.tester&&I.tester(t,e);return!0}}return!!I.tester&&I.tester(t,e)}}return!(!I.enabled||!I.tester)&&I.tester(t,e)}const H=t=>y(t,J),G=()=>W,Q=Symbol.for("nodejs.util.inspect.custom"),Y=t=>{try{if(y(t,"toJSON")&&m(t.toJSON)&&0===t.toJSON.length)return t.toJSON();if(Array.isArray(t))return t.map(Y)}catch{return{}}return nt(t)},K=t=>JSON.stringify(t,null,2),Z=(t,e=2)=>{if("string"==typeof t)return t;try{return"object"==typeof t?X(t,e):String(t)}catch{return String(t)}},X=(t,e)=>{let r=[];const n=JSON.stringify(t,((t,e)=>"object"==typeof e&&null!==e?r.includes(e)?void 0:r.push(e)&&(void 0!==rt.fiberRefs&&et(e)?e[tt](rt.fiberRefs):e):e),e);return r=void 0,n},tt=Symbol.for("effect/Inspectable/Redactable"),et=t=>"object"==typeof t&&null!==t&&tt in t,rt=b("effect/Inspectable/redactableState",(()=>({fiberRefs:void 0}))),nt=t=>et(t)&&void 0!==rt.fiberRefs?t[tt](rt.fiberRefs):t,st=(t,e)=>{switch(e.length){case 0:return t;case 1:return e[0](t);case 2:return e[1](e[0](t));case 3:return e[2](e[1](e[0](t)));case 4:return e[3](e[2](e[1](e[0](t))));case 5:return e[4](e[3](e[2](e[1](e[0](t)))));case 6:return e[5](e[4](e[3](e[2](e[1](e[0](t))))));case 7:return e[6](e[5](e[4](e[3](e[2](e[1](e[0](t)))))));case 8:return e[7](e[6](e[5](e[4](e[3](e[2](e[1](e[0](t))))))));case 9:return e[8](e[7](e[6](e[5](e[4](e[3](e[2](e[1](e[0](t)))))))));default:{let r=t;for(let t=0,n=e.length;t<n;t++)r=e[t](r);return r}}},it="Async",ot="Commit",ct="Failure",ut="OnFailure",at="OnSuccess",ht="OnSuccessAndFailure",lt="Success",ft="Sync",dt="Tag",bt="UpdateRuntimeFlags",pt="While",mt="Iterator",St="WithRuntime",yt="Yield",gt="RevertFlags",wt=()=>"3.19.14",vt=Symbol.for("effect/Effect"),_t=Symbol.for("effect/Stream"),Ot=Symbol.for("effect/Sink"),Et=Symbol.for("effect/Channel"),Ft={_R:t=>t,_E:t=>t,_A:t=>t,_V:wt()},kt={[vt]:Ft,[_t]:Ft,[Ot]:{_A:t=>t,_In:t=>t,_L:t=>t,_E:t=>t,_R:t=>t},[Et]:{_Env:t=>t,_InErr:t=>t,_InElem:t=>t,_InDone:t=>t,_OutErr:t=>t,_OutElem:t=>t,_OutDone:t=>t},[J](t){return this===t},[A](){return z(this,D(this))},[Symbol.iterator](){return new O(new M(this))},pipe(){return st(this,arguments)}},Mt={[A](){return z(this,q(this))},[J](t){const e=Object.keys(this),r=Object.keys(t);if(e.length!==r.length)return!1;for(const r of e)if(!(r in t)||!W(this[r],t[r]))return!1;return!0}},Ct={...kt,_op:ot},It={...Ct,...Mt},jt=function(){function t(){}return t.prototype=Ct,t}(),Nt=Symbol.for("effect/Option"),Rt={...kt,[Nt]:{_A:t=>t},[Q](){return this.toJSON()},toString(){return K(this.toJSON())}},At=Object.assign(Object.create(Rt),{_tag:"Some",_op:"Some",[J](t){return Tt(t)&&Lt(t)&&W(this.value,t.value)},[A](){return z(this,T(x(this._tag))(x(this.value)))},toJSON(){return{_id:"Option",_tag:this._tag,value:Y(this.value)}}}),xt=x("None"),Dt=Object.assign(Object.create(Rt),{_tag:"None",_op:"None",[J]:t=>Tt(t)&&$t(t),[A]:()=>xt,toJSON(){return{_id:"Option",_tag:this._tag}}}),Tt=t=>y(t,Nt),$t=t=>"None"===t._tag,Lt=t=>"Some"===t._tag,Pt=Object.create(Dt),Bt=t=>{const e=Object.create(At);return e.value=t,e},qt=Symbol.for("effect/Either"),Ut={...kt,[qt]:{_R:t=>t},[Q](){return this.toJSON()},toString(){return K(this.toJSON())}},zt=Object.assign(Object.create(Ut),{_tag:"Right",_op:"Right",[J](t){return Wt(t)&&Ht(t)&&W(this.right,t.right)},[A](){return T(x(this._tag))(x(this.right))},toJSON(){return{_id:"Either",_tag:this._tag,right:Y(this.right)}}}),Jt=Object.assign(Object.create(Ut),{_tag:"Left",_op:"Left",[J](t){return Wt(t)&&Vt(t)&&W(this.left,t.left)},[A](){return T(x(this._tag))(x(this.left))},toJSON(){return{_id:"Either",_tag:this._tag,left:Y(this.left)}}}),Wt=t=>y(t,qt),Vt=t=>"Left"===t._tag,Ht=t=>"Right"===t._tag,Gt=t=>{const e=Object.create(zt);return e.right=t,e},Qt=t=>{const e=Object.create(Jt);return e.left=t,e},Yt=Vt,Kt=Ht,Zt=r(2,((t,{onLeft:e,onRight:r})=>Yt(t)?e(t.left):r(t.right))),Xt=Zt({onLeft:n,onRight:n}),te=r(2,((t,e)=>{if(Kt(t))return t.right;throw e(t.left)})),ee=t=>t.length>0,re=t=>(e,r)=>e===r?0:t(e,r),ne=re(((t,e)=>t<e?-1:1)),se=r(2,((t,e)=>re(((r,n)=>t(e(r),e(n)))))),ie=t=>r(2,((e,r)=>1===t(e,r))),oe=()=>Pt,ce=Bt,ue=$t,ae=Lt,he=r(2,((t,{onNone:e,onSome:r})=>ue(t)?e():r(t.value))),le=t=>Vt(t)?Pt:Bt(t.right),fe=r(2,((t,e)=>ue(t)?e():t.value)),de=r(2,((t,e)=>ue(t)?ce(e()):t)),be=t=>null==t?oe():ce(t),pe=fe(c),me=r(2,((t,e)=>{if(ae(t))return t.value;throw e()}))((()=>new Error("getOrThrow called on a None"))),Se=r(2,((t,e)=>ue(t)?oe():ce(e(t.value)))),ye=r(2,((t,e)=>ue(t)?oe():e(t.value))),ge=(t=>r(2,((e,r)=>!ue(e)&&t(e.value,r))))(G()),we=t=>(e,r)=>ue(e)?r:ue(r)?e:ce(t(e.value,r.value)),ve=(...t)=>t,_e=t=>new Array(t),Oe=r(2,((t,e)=>{const r=Math.max(1,Math.floor(t)),n=new Array(r);for(let t=0;t<r;t++)n[t]=e(t);return n})),Ee=t=>Array.isArray(t)?t:Array.from(t),Fe=r(2,((t,e)=>[e,...t])),ke=r(2,((t,e)=>[...t,e])),Me=r(2,((t,e)=>Ee(t).concat(Ee(e)))),Ce=ee,Ie=ee,je=(t,e)=>t<0||t>=e.length,Ne=r(2,((t,e)=>{const r=Math.floor(e);return je(r,t)?oe():ce(t[r])})),Re=r(2,((t,e)=>{const r=Math.floor(e);if(je(r,t))throw new Error(`Index ${r} out of bounds`);return t[r]})),Ae=Ne(0),xe=Re(0),De=t=>t[t.length-1],Te=t=>t.slice(1),$e=r(2,((t,e)=>Je(t,((t,e)=>{let r=0;for(const n of t){if(!e(n,r))break;r++}return r})(t,e)))),Le=r(2,((t,e)=>{const r=Ee(t);return r.slice(((t,e)=>Math.floor(Math.min(Math.max(0,t),e.length)))(e,r),r.length)})),Pe=t=>Array.from(t).reverse(),Be=r(2,((t,e)=>{const r=Array.from(t);return r.sort(e),r})),qe=r(2,((t,e)=>Ue(t,e,ve))),Ue=r(3,((t,e,r)=>{const n=Ee(t),s=Ee(e);if(Ie(n)&&Ie(s)){const t=[r(xe(n),xe(s))],e=Math.min(n.length,s.length);for(let i=1;i<e;i++)t[i]=r(n[i],s[i]);return t}return[]})),ze=G(),Je=r(2,((t,e)=>{const r=Array.from(t),n=Math.floor(e);return Ie(r)?n>=1?We(r,n):[[],r]:[r,[]]})),We=r(2,((t,e)=>{const r=Math.max(1,Math.floor(e));return r>=t.length?[Ve(t),[]]:[Fe(t.slice(1,r),xe(t)),t.slice(r)]})),Ve=t=>t.slice(),He=r(3,((t,e,r)=>{const n=Ee(t),s=Ee(e);return Ie(n)?Ie(s)?sr(r)(Me(n,s)):n:s})),Ge=r(2,((t,e)=>He(t,e,ze))),Qe=()=>[],Ye=t=>[t],Ke=r(2,((t,e)=>t.map(e))),Ze=r(2,((t,e)=>{if((t=>0===t.length)(t))return[];const r=[];for(let n=0;n<t.length;n++){const s=e(t[n],n);for(let t=0;t<s.length;t++)r.push(s[t])}return r}))(n),Xe=r(2,((t,e)=>{const r=Ee(t),n=[];for(let t=0;t<r.length;t++){const s=e(r[t],t);ae(s)&&n.push(s.value)}return n})),tr=r(2,((t,e)=>{const r=Ee(t),n=[];for(let t=0;t<r.length;t++)e(r[t],t)&&n.push(r[t]);return n})),er=r(3,((t,e,r)=>Ee(t).reduce(((t,e,n)=>r(t,e,n)),e))),rr=(t,e)=>{const r=[];let n,s=t;for(;ae(n=e(s));){const[t,e]=n.value;r.push(t),s=e}return r},nr=t=>h(((e,r)=>{if(e.length!==r.length)return!1;for(let n=0;n<e.length;n++)if(!t(e[n],r[n]))return!1;return!0})),sr=r(2,((t,e)=>{const r=Ee(t);if(Ie(r)){const t=[xe(r)],n=Te(r);for(const r of n)t.every((t=>!e(r,t)))&&t.push(r);return t}return[]})),ir=t=>sr(t,G()),or=r(2,((t,e)=>Ee(t).join(e))),cr=ne,ur=Symbol.for("effect/Context/Tag"),ar=Symbol.for("effect/Context/Reference"),hr=Symbol.for("effect/STM"),lr={...kt,_op:"Tag",[hr]:Ft,[ur]:{_Service:t=>t,_Identifier:t=>t},toString(){return K(this.toJSON())},toJSON(){return{_id:"Tag",key:this.key,stack:this.stack}},[Q](){return this.toJSON()},of:t=>t,context(t){return yr(this,t)}},fr={...lr,[ar]:ar},dr=Symbol.for("effect/Context"),br={[dr]:{_Services:t=>t},[J](t){if(mr(t)&&this.unsafeMap.size===t.unsafeMap.size){for(const e of this.unsafeMap.keys())if(!t.unsafeMap.has(e)||!W(this.unsafeMap.get(e),t.unsafeMap.get(e)))return!1;return!0}return!1},[A](){return z(this,P(this.unsafeMap.size))},pipe(){return st(this,arguments)},toString(){return K(this.toJSON())},toJSON(){return{_id:"Context",services:Array.from(this.unsafeMap).map(Y)}},[Q](){return this.toJSON()}},pr=t=>{const e=Object.create(br);return e.unsafeMap=t,e},mr=t=>y(t,dr),Sr=pr(new Map),yr=(t,e)=>pr(new Map([[t.key,e]])),gr=r(3,((t,e,r)=>{const n=new Map(t.unsafeMap);return n.set(e.key,r),pr(n)})),wr=b("effect/Context/defaultValueCache",(()=>new Map)),vr=t=>{if(wr.has(t.key))return wr.get(t.key);const e=t.defaultValue();return wr.set(t.key,e),e},_r=r(2,((t,e)=>{if(!t.unsafeMap.has(e.key)){if(ar in e)return vr(e);throw(t=>{const e=new Error("Service not found"+(t.key?`: ${String(t.key)}`:""));if(t.stack){const r=t.stack.split("\n");if(r.length>2){const t=r[2].match(/at (.*)/);t&&(e.message=e.message+` (defined at ${t[1]})`)}}if(e.stack){const t=e.stack.split("\n");t.splice(1,3),e.stack=t.join("\n")}return e})(e)}return t.unsafeMap.get(e.key)})),Or=_r,Er=r(2,((t,e)=>t.unsafeMap.has(e.key)?Bt(t.unsafeMap.get(e.key)):y(e,ar)?Bt(vr(e)):Pt)),Fr=r(2,((t,e)=>{const r=new Map(t.unsafeMap);for(const[t,n]of e.unsafeMap)r.set(t,n);return pr(r)})),kr=t=>{const e=Error.stackTraceLimit;Error.stackTraceLimit=2;const r=new Error;Error.stackTraceLimit=e;const n=Object.create(lr);return Object.defineProperty(n,"stack",{get:()=>r.stack}),n.key=t,n},Mr=mr,Cr=()=>Sr,Ir=yr,jr=gr,Nr=Or,Rr=_r,Ar=Er,xr=Fr,Dr=()=>(t,e)=>{const r=Error.stackTraceLimit;Error.stackTraceLimit=2;const n=new Error;function s(){}return Error.stackTraceLimit=r,Object.setPrototypeOf(s,fr),s.key=t,s.defaultValue=e.defaultValue,Object.defineProperty(s,"stack",{get:()=>n.stack}),s},Tr=Symbol.for("effect/Chunk"),$r=[],Lr=(t=>h(((e,r)=>e.length===r.length&&Gr(e).every(((e,n)=>t(e,Xr(r,n)))))))(W),Pr={[Tr]:{_A:t=>t},toString(){return K(this.toJSON())},toJSON(){return{_id:"Chunk",values:Gr(this).map(Y)}},[Q](){return this.toJSON()},[J](t){return qr(t)&&Lr(this,t)},[A](){return z(this,U(Gr(this)))},[Symbol.iterator](){switch(this.backing._tag){case"IArray":return this.backing.array[Symbol.iterator]();case"IEmpty":return $r[Symbol.iterator]();default:return Gr(this)[Symbol.iterator]()}},pipe(){return st(this,arguments)}},Br=t=>{const e=Object.create(Pr);switch(e.backing=t,t._tag){case"IEmpty":e.length=0,e.depth=0,e.left=e,e.right=e;break;case"IConcat":e.length=t.left.length+t.right.length,e.depth=1+Math.max(t.left.depth,t.right.depth),e.left=t.left,e.right=t.right;break;case"IArray":e.length=t.array.length,e.depth=0,e.left=Ur,e.right=Ur;break;case"ISingleton":e.length=1,e.depth=0,e.left=Ur,e.right=Ur;break;case"ISlice":e.length=t.length,e.depth=t.chunk.depth+1,e.left=Ur,e.right=Ur}return e},qr=t=>y(t,Tr),Ur=Br({_tag:"IEmpty"}),zr=()=>Ur,Jr=(...t)=>Zr(t),Wr=t=>Br({_tag:"ISingleton",a:t}),Vr=t=>qr(t)?t:Kr(Ee(t)),Hr=(t,e,r)=>{switch(t.backing._tag){case"IArray":!function(t,e,r,n,s){for(let e=0;e<Math.min(t.length,0+s);e++)r[n+e-0]=t[e]}(t.backing.array,0,e,r,t.length);break;case"IConcat":Hr(t.left,e,r),Hr(t.right,e,r+t.left.length);break;case"ISingleton":e[r]=t.backing.a;break;case"ISlice":{let n=0,s=r;for(;n<t.length;)e[s]=Xr(t,n),n+=1,s+=1;break}}},Gr=t=>{switch(t.backing._tag){case"IEmpty":return $r;case"IArray":return t.backing.array;default:{const e=new Array(t.length);return Hr(t,e,0),t.backing={_tag:"IArray",array:e},t.left=Ur,t.right=Ur,t.depth=0,e}}},Qr=t=>{switch(t.backing._tag){case"IEmpty":case"ISingleton":return t;case"IArray":return Br({_tag:"IArray",array:Pe(t.backing.array)});case"IConcat":return Br({_tag:"IConcat",left:Qr(t.backing.right),right:Qr(t.backing.left)});case"ISlice":return Kr(Pe(Gr(t)))}},Yr=r(2,((t,e)=>e<0||e>=t.length?oe():ce(Xr(t,e)))),Kr=t=>0===t.length?zr():1===t.length?Wr(t[0]):Br({_tag:"IArray",array:t}),Zr=t=>Kr(t),Xr=r(2,((t,e)=>{switch(t.backing._tag){case"IEmpty":throw new Error("Index out of bounds");case"ISingleton":if(0!==e)throw new Error("Index out of bounds");return t.backing.a;case"IArray":if(e>=t.length||e<0)throw new Error("Index out of bounds");return t.backing.array[e];case"IConcat":return e<t.left.length?Xr(t.left,e):Xr(t.right,e-t.left.length);case"ISlice":return Xr(t.backing.chunk,e+t.backing.offset)}})),tn=r(2,((t,e)=>sn(t,Wr(e)))),en=r(2,((t,e)=>sn(Wr(e),t))),rn=r(2,((t,e)=>{if(e<=0)return Ur;if(e>=t.length)return t;switch(t.backing._tag){case"ISlice":return Br({_tag:"ISlice",chunk:t.backing.chunk,length:e,offset:t.backing.offset});case"IConcat":return e>t.left.length?Br({_tag:"IConcat",left:t.left,right:rn(t.right,e-t.left.length)}):rn(t.left,e);default:return Br({_tag:"ISlice",chunk:t,offset:0,length:e})}})),nn=r(2,((t,e)=>{if(e<=0)return t;if(e>=t.length)return Ur;switch(t.backing._tag){case"ISlice":return Br({_tag:"ISlice",chunk:t.backing.chunk,offset:t.backing.offset+e,length:t.backing.length-e});case"IConcat":return e>t.left.length?nn(t.right,e-t.left.length):Br({_tag:"IConcat",left:nn(t.left,e),right:t.right});default:return Br({_tag:"ISlice",chunk:t,offset:e,length:t.length-e})}})),sn=r(2,((t,e)=>{if("IEmpty"===t.backing._tag)return e;if("IEmpty"===e.backing._tag)return t;const r=e.depth-t.depth;if(Math.abs(r)<=1)return Br({_tag:"IConcat",left:t,right:e});if(r<-1){if(t.left.depth>=t.right.depth){const r=sn(t.right,e);return Br({_tag:"IConcat",left:t.left,right:r})}{const r=sn(t.right.right,e);if(r.depth===t.depth-3){const e=Br({_tag:"IConcat",left:t.right.left,right:r});return Br({_tag:"IConcat",left:t.left,right:e})}{const e=Br({_tag:"IConcat",left:t.left,right:t.right.left});return Br({_tag:"IConcat",left:e,right:r})}}}if(e.right.depth>=e.left.depth){const r=sn(t,e.left);return Br({_tag:"IConcat",left:r,right:e.right})}{const r=sn(t,e.left.left);if(r.depth===e.depth-3){const t=Br({_tag:"IConcat",left:r,right:e.left.right});return Br({_tag:"IConcat",left:t,right:e.right})}{const t=Br({_tag:"IConcat",left:e.left.right,right:e.right});return Br({_tag:"IConcat",left:r,right:t})}}})),on=r(2,((t,e)=>Kr(Xe(t,e)))),cn=r(2,((t,e)=>Kr(tr(t,e)))),un=t=>0===t.length,an=t=>t.length>0,hn=Yr(0),ln=t=>Xr(t,0),fn=ln,dn=r(2,((t,e)=>"ISingleton"===t.backing._tag?Wr(e(t.backing.a,0)):Kr(a(Gr(t),Ke(((t,r)=>e(t,r))))))),bn=r(2,((t,e)=>[rn(t,e),nn(t,e)])),pn=r(2,((t,e)=>{let r=0;for(const n of Gr(t)){if(e(n))break;r++}return bn(t,r)})),mn=t=>nn(t,1),Sn=er,yn=Symbol.for("effect/Duration"),gn=BigInt(0),wn=BigInt(24),vn=BigInt(60),_n=BigInt(1e3),On=BigInt(1e6),En=BigInt(1e9),Fn=/^(-?\d+(?:\.\d+)?)\s+(nanos?|micros?|millis?|seconds?|minutes?|hours?|days?|weeks?)$/,kn=t=>{if(Nn(t))return t;if(p(t))return Tn(t);if((t=>"bigint"==typeof t)(t))return xn(t);if(Array.isArray(t)&&2===t.length&&t.every(p))return t[0]===-1/0||t[1]===-1/0||Number.isNaN(t[0])||Number.isNaN(t[1])?Rn:t[0]===1/0||t[1]===1/0?An:xn(BigInt(Math.round(1e9*t[0]))+BigInt(Math.round(t[1])));if((t=>"string"==typeof t)(t)){const e=Fn.exec(t);if(e){const[t,r,n]=e,s=Number(r);switch(n){case"nano":case"nanos":return xn(BigInt(r));case"micro":case"micros":return Dn(BigInt(r));case"milli":case"millis":return Tn(s);case"second":case"seconds":return $n(s);case"minute":case"minutes":return Ln(s);case"hour":case"hours":return Pn(s);case"day":case"days":return Bn(s);case"week":case"weeks":return qn(s)}}}throw new Error("Invalid DurationInput")},Mn={_tag:"Millis",millis:0},Cn={_tag:"Infinity"},In={[yn]:yn,[A](){return z(this,q(this.value))},[J](t){return Nn(t)&&Gn(this,t)},toString(){return`Duration(${Qn(this)})`},toJSON(){switch(this.value._tag){case"Millis":return{_id:"Duration",_tag:"Millis",millis:this.value.millis};case"Nanos":return{_id:"Duration",_tag:"Nanos",hrtime:zn(this)};case"Infinity":return{_id:"Duration",_tag:"Infinity"}}},[Q](){return this.toJSON()},pipe(){return st(this,arguments)}},jn=t=>{const e=Object.create(In);return e.value=p(t)?isNaN(t)||t<=0?Mn:Number.isFinite(t)?Number.isInteger(t)?{_tag:"Millis",millis:t}:{_tag:"Nanos",nanos:BigInt(Math.round(1e6*t))}:Cn:t<=gn?Mn:{_tag:"Nanos",nanos:t},e},Nn=t=>y(t,yn),Rn=jn(0),An=jn(1/0),xn=t=>jn(t),Dn=t=>jn(t*_n),Tn=t=>jn(t),$n=t=>jn(1e3*t),Ln=t=>jn(6e4*t),Pn=t=>jn(36e5*t),Bn=t=>jn(864e5*t),qn=t=>jn(6048e5*t),Un=t=>Jn(t,{onMillis:t=>t,onNanos:t=>Number(t)/1e6}),zn=t=>{const e=kn(t);switch(e.value._tag){case"Infinity":return[1/0,0];case"Nanos":return[Number(e.value.nanos/En),Number(e.value.nanos%En)];case"Millis":return[Math.floor(e.value.millis/1e3),Math.round(e.value.millis%1e3*1e6)]}},Jn=r(2,((t,e)=>{const r=kn(t);switch(r.value._tag){case"Nanos":return e.onNanos(r.value.nanos);case"Infinity":return e.onMillis(1/0);case"Millis":return e.onMillis(r.value.millis)}})),Wn=r(3,((t,e,r)=>{const n=kn(t),s=kn(e);if("Infinity"===n.value._tag||"Infinity"===s.value._tag)return r.onMillis(Un(n),Un(s));if("Nanos"===n.value._tag||"Nanos"===s.value._tag){const t="Nanos"===n.value._tag?n.value.nanos:BigInt(Math.round(1e6*n.value.millis)),e="Nanos"===s.value._tag?s.value.nanos:BigInt(Math.round(1e6*s.value.millis));return r.onNanos(t,e)}return r.onMillis(n.value.millis,s.value.millis)})),Vn=r(2,((t,e)=>Wn(t,e,{onMillis:(t,e)=>t<=e,onNanos:(t,e)=>t<=e}))),Hn=r(2,((t,e)=>Wn(t,e,{onMillis:(t,e)=>t>=e,onNanos:(t,e)=>t>=e}))),Gn=r(2,((t,e)=>((t,e)=>Wn(t,e,{onMillis:(t,e)=>t===e,onNanos:(t,e)=>t===e}))(kn(t),kn(e)))),Qn=t=>{const e=kn(t);if("Infinity"===e.value._tag)return"Infinity";if((t=>{switch(t.value._tag){case"Millis":return 0===t.value.millis;case"Nanos":return t.value.nanos===gn;case"Infinity":return!1}})(e))return"0";const r=(t=>{const e=kn(t);if("Infinity"===e.value._tag)return{days:1/0,hours:1/0,minutes:1/0,seconds:1/0,millis:1/0,nanos:1/0};const r=(t=>{const e=kn(t);switch(e.value._tag){case"Infinity":throw new Error("Cannot convert infinite duration to nanos");case"Nanos":return e.value.nanos;case"Millis":return BigInt(Math.round(1e6*e.value.millis))}})(e),n=r/On,s=n/_n,i=s/vn,o=i/vn;return{days:Number(o/wn),hours:Number(o%wn),minutes:Number(i%vn),seconds:Number(s%vn),millis:Number(n%_n),nanos:Number(r%On)}})(e),n=[];return 0!==r.days&&n.push(`${r.days}d`),0!==r.hours&&n.push(`${r.hours}h`),0!==r.minutes&&n.push(`${r.minutes}m`),0!==r.seconds&&n.push(`${r.seconds}s`),0!==r.millis&&n.push(`${r.millis}ms`),0!==r.nanos&&n.push(`${r.nanos}ns`),n.join(" ")},Yn=Math.pow(2,5),Kn=Yn-1,Zn=Yn/2,Xn=Yn/4;function ts(t,e){return e>>>t&Kn}function es(t){return 1<<t}function rs(t,e){return r=t&e-1,r=(r=(858993459&(r-=r>>1&1431655765))+(r>>2&858993459))+(r>>4)&252645135,127&(r+=r>>8)+(r>>16);var r}function ns(t,e,r,n){let s=n;if(!t){const t=n.length;s=new Array(t);for(let e=0;e<t;++e)s[e]=n[e]}return s[e]=r,s}function ss(t,e,r){const n=r.length-1;let s=0,i=0,o=r;if(t)s=i=e;else for(o=new Array(n);s<e;)o[i++]=r[s++];for(++s;s<=n;)o[i++]=r[s++];return t&&(o.length=n),o}class is{_tag="EmptyNode";modify(t,e,r,n,s,i){const o=r(oe());return ue(o)?new is:(++i.value,new us(t,n,s,o))}}function os(t){return g(t,"EmptyNode")}function cs(t,e){return!os(t)&&e===t.edit}class us{edit;hash;key;value;_tag="LeafNode";constructor(t,e,r,n){this.edit=t,this.hash=e,this.key=r,this.value=n}modify(t,e,r,n,s,i){if(W(s,this.key)){const e=r(this.value);return e===this.value?this:ue(e)?(--i.value,new is):cs(this,t)?(this.value=e,this):new us(t,n,s,e)}const o=r(oe());return ue(o)?this:(++i.value,ds(t,e,this.hash,this,n,new us(t,n,s,o)))}}class as{edit;hash;children;_tag="CollisionNode";constructor(t,e,r){this.edit=t,this.hash=e,this.children=r}modify(t,e,r,n,s,i){if(n===this.hash){const e=cs(this,t),n=this.updateCollisionList(e,t,this.hash,this.children,r,s,i);return n===this.children?this:n.length>1?new as(t,this.hash,n):n[0]}const o=r(oe());return ue(o)?this:(++i.value,ds(t,e,this.hash,this,n,new us(t,n,s,o)))}updateCollisionList(t,e,r,n,s,i,o){const c=n.length;for(let u=0;u<c;++u){const c=n[u];if("key"in c&&W(i,c.key)){const a=c.value,h=s(a);return h===a?n:ue(h)?(--o.value,ss(t,u,n)):ns(t,u,new us(e,r,i,h),n)}}const u=s(oe());return ue(u)?n:(++o.value,ns(t,c,new us(e,r,i,u),n))}}class hs{edit;mask;children;_tag="IndexedNode";constructor(t,e,r){this.edit=t,this.mask=e,this.children=r}modify(t,e,r,n,s,i){const o=this.mask,c=this.children,u=ts(e,n),a=es(u),h=rs(o,a),l=o&a,f=cs(this,t);if(!l){const l=(new is).modify(t,e+5,r,n,s,i);return l?c.length>=Zn?function(t,e,r,n,s){const i=[];let o=n,c=0;for(let t=0;o;++t)1&o&&(i[t]=s[c++]),o>>>=1;return i[e]=r,new ls(t,c+1,i)}(t,u,l,o,c):new hs(t,o|a,function(t,e,r,n){const s=n.length;if(t){let t=s;for(;t>=e;)n[t--]=n[t];return n[e]=r,n}let i=0,o=0;const c=new Array(s+1);for(;i<e;)c[o++]=n[i++];for(c[e]=r;i<s;)c[++o]=n[i++];return c}(f,h,l,c)):this}const d=c[h],b=d.modify(t,e+5,r,n,s,i);if(d===b)return this;let p,m=o;if(os(b)){if(m&=~a,!m)return new is;if(c.length<=2&&(os(S=c[1^h])||"LeafNode"===S._tag||"CollisionNode"===S._tag))return c[1^h];p=ss(f,h,c)}else p=ns(f,h,b,c);var S;return f?(this.mask=m,this.children=p,this):new hs(t,m,p)}}class ls{edit;size;children;_tag="ArrayNode";constructor(t,e,r){this.edit=t,this.size=e,this.children=r}modify(t,e,r,n,s,i){let o=this.size;const c=this.children,u=ts(e,n),a=c[u],h=(a||new is).modify(t,e+5,r,n,s,i);if(a===h)return this;const l=cs(this,t);let f;if(os(a)&&!os(h))++o,f=ns(l,u,h,c);else if(!os(a)&&os(h)){if(--o,o<=Xn)return function(t,e,r,n){const s=new Array(e-1);let i=0,o=0;for(let t=0,e=n.length;t<e;++t)if(t!==r){const e=n[t];e&&!os(e)&&(s[i++]=e,o|=1<<t)}return new hs(t,o,s)}(t,o,u,c);f=ns(l,u,new is,c)}else f=ns(l,u,h,c);return l?(this.size=o,this.children=f,this):new ls(t,o,f)}}function fs(t,e,r,n,s,i){if(r===s)return new as(t,r,[i,n]);const o=ts(e,r),c=ts(e,s);if(o===c)return e=>new hs(t,es(o)|es(c),[e]);{const e=o<c?[n,i]:[i,n];return new hs(t,es(o)|es(c),e)}}function ds(t,e,r,n,s,i){let o,c=e;for(;;){const e=fs(t,c,r,n,s,i);if("function"!=typeof e){let t=e;for(;null!=o;)t=o.value(t),o=o.previous;return t}o={value:e,previous:o},c+=5}}const bs="effect/HashMap",ps=Symbol.for(bs),ms={[ps]:ps,[Symbol.iterator](){return new ys(this,((t,e)=>[t,e]))},[A](){let t=x(bs);for(const e of this)t^=a(x(e[0]),T(x(e[1])));return z(this,t)},[J](t){if(Es(t)){if(t._size!==this._size)return!1;for(const e of this){const r=a(t,ks(e[0],x(e[0])));if(ue(r))return!1;if(!W(e[1],r.value))return!1}return!0}return!1},toString(){return K(this.toJSON())},toJSON(){return{_id:"HashMap",values:Array.from(this).map(Y)}},[Q](){return this.toJSON()},pipe(){return st(this,arguments)}},Ss=(t,e,r,n)=>{const s=Object.create(ms);return s._editable=t,s._edit=e,s._root=r,s._size=n,s};class ys{map;f;v;constructor(t,e){this.map=t,this.f=e,this.v=ws(this.map._root,this.f,void 0)}next(){if(ue(this.v))return{done:!0,value:void 0};const t=this.v.value;return this.v=gs(t.cont),{done:!1,value:t.value}}[Symbol.iterator](){return new ys(this.map,this.f)}}const gs=t=>t?vs(t[0],t[1],t[2],t[3],t[4]):oe(),ws=(t,e,r)=>{switch(t._tag){case"LeafNode":return ae(t.value)?ce({value:e(t.key,t.value.value),cont:r}):gs(r);case"CollisionNode":case"ArrayNode":case"IndexedNode":{const n=t.children;return vs(n.length,n,0,e,r)}default:return gs(r)}},vs=(t,e,r,n,s)=>{for(;r<t;){const i=e[r++];if(i&&!os(i))return ws(i,n,[t,e,r,n,s])}return gs(s)},_s=Ss(!1,0,new is,0),Os=()=>_s,Es=t=>y(t,ps),Fs=r(2,((t,e)=>ks(t,e,x(e)))),ks=r(3,((t,e,r)=>{let n=t._root,s=0;for(;;)switch(n._tag){case"LeafNode":return W(e,n.key)?n.value:oe();case"CollisionNode":if(r===n.hash){const t=n.children;for(let r=0,n=t.length;r<n;++r){const n=t[r];if("key"in n&&W(e,n.key))return n.value}}return oe();case"IndexedNode":{const t=es(ts(s,r));if(n.mask&t){n=n.children[rs(n.mask,t)],s+=5;break}return oe()}case"ArrayNode":if(n=n.children[ts(s,r)],n){s+=5;break}return oe();default:return oe()}})),Ms=r(2,((t,e)=>ae(ks(t,e,x(e))))),Cs=r(3,((t,e,r)=>As(t,e,(()=>ce(r))))),Is=r(3,((t,e,r)=>t._editable?(t._root=e,t._size=r,t):e===t._root?t:Ss(t._editable,t._edit,e,r))),js=t=>new ys(t,(t=>t)),Ns=t=>t._size,Rs=t=>Ss(!0,t._edit+1,t._root,t._size),As=r(3,((t,e,r)=>xs(t,e,x(e),r))),xs=r(4,((t,e,r,n)=>{const s={value:t._size},i=t._root.modify(t._editable?t._edit:NaN,0,n,r,e,s);return a(t,Is(i,s.value))})),Ds=r(2,((t,e)=>As(t,e,oe))),Ts=r(2,((t,e)=>Ls(t,Os(),((t,r,n)=>Cs(t,n,e(r,n)))))),$s=r(2,((t,e)=>Ls(t,void 0,((t,r,n)=>e(r,n))))),Ls=r(3,((t,e,r)=>{const n=t._root;if("LeafNode"===n._tag)return ae(n.value)?r(e,n.value.value,n.key):e;if("EmptyNode"===n._tag)return e;const s=[n.children];let i;for(;i=s.pop();)for(let t=0,n=i.length;t<n;){const n=i[t++];n&&!os(n)&&("LeafNode"===n._tag?ae(n.value)&&(e=r(e,n.value.value,n.key)):s.push(n.children))}return e})),Ps="effect/HashSet",Bs=Symbol.for(Ps),qs={[Bs]:Bs,[Symbol.iterator](){return js(this._keyMap)},[A](){return z(this,T(x(this._keyMap))(x(Ps)))},[J](t){return!!zs(t)&&Ns(this._keyMap)===Ns(t._keyMap)&&W(this._keyMap,t._keyMap)},toString(){return K(this.toJSON())},toJSON(){return{_id:"HashSet",values:Array.from(this).map(Y)}},[Q](){return this.toJSON()},pipe(){return st(this,arguments)}},Us=t=>{const e=Object.create(qs);return e._keyMap=t,e},zs=t=>y(t,Bs),Js=Us(Os()),Ws=()=>Js,Vs=r(2,((t,e)=>Ms(t._keyMap,e))),Hs=t=>Us(Rs(t._keyMap)),Gs=t=>(t._keyMap._editable=!1,t),Qs=r(2,((t,e)=>{const r=Hs(t);return e(r),Gs(r)})),Ys=r(2,((t,e)=>t._keyMap._editable?(Cs(e,!0)(t._keyMap),t):Us(Cs(e,!0)(t._keyMap)))),Ks=r(2,((t,e)=>t._keyMap._editable?(Ds(e)(t._keyMap),t):Us(Ds(e)(t._keyMap)))),Zs=r(2,((t,e)=>Qs(t,(t=>{for(const r of e)Ks(t,r)})))),Xs=r(2,((t,e)=>Qs(Ws(),(r=>{ti(t,(t=>Ys(r,t)));for(const t of e)Ys(r,t)})))),ti=r(2,((t,e)=>$s(t._keyMap,((t,r)=>e(r))))),ei=r(3,((t,e,r)=>Ls(t._keyMap,e,((t,e,n)=>r(t,n))))),ri=Ws,ni=(...t)=>{const e=Hs(Ws());for(const r of t)Ys(e,r);return Gs(e)},si=Vs,ii=t=>Ns(t._keyMap),oi=Ys,ci=Ks,ui=Zs,ai=Xs,hi=ei,li=Symbol.for("effect/MutableRef"),fi={[li]:li,toString(){return K(this.toJSON())},toJSON(){return{_id:"MutableRef",current:Y(this.current)}},[Q](){return this.toJSON()},pipe(){return st(this,arguments)}},di=t=>{const e=Object.create(fi);return e.current=t,e},bi=r(3,((t,e,r)=>!!W(e,t.current)&&(t.current=r,!0))),pi=t=>t.current,mi=r(2,((t,e)=>(t.current=e,t))),Si="effect/FiberId",yi=Symbol.for(Si),gi="None",wi="Runtime",vi="Composite",_i=B(`${Si}-${gi}`);let Oi=class{[yi]=yi;_tag=gi;id=-1;startTimeMillis=-1;[A](){return _i}[J](t){return Mi(t)&&t._tag===gi}toString(){return K(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag}}[Q](){return this.toJSON()}};class Ei{id;startTimeMillis;[yi]=yi;_tag=wi;constructor(t,e){this.id=t,this.startTimeMillis=e}[A](){return z(this,B(`${Si}-${this._tag}-${this.id}-${this.startTimeMillis}`))}[J](t){return Mi(t)&&t._tag===wi&&this.id===t.id&&this.startTimeMillis===t.startTimeMillis}toString(){return K(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag,id:this.id,startTimeMillis:this.startTimeMillis}}[Q](){return this.toJSON()}}class Fi{left;right;[yi]=yi;_tag=vi;constructor(t,e){this.left=t,this.right=e}_hash;[A](){return a(B(`${Si}-${this._tag}`),T(x(this.left)),T(x(this.right)),z(this))}[J](t){return Mi(t)&&t._tag===vi&&W(this.left,t.left)&&W(this.right,t.right)}toString(){return K(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag,left:Y(this.left),right:Y(this.right)}}[Q](){return this.toJSON()}}const ki=new Oi,Mi=t=>y(t,yi),Ci=r(2,((t,e)=>t._tag===gi?e:e._tag===gi?t:new Fi(t,e))),Ii=t=>{switch(t._tag){case gi:return ri();case wi:return ni(t.id);case vi:return a(Ii(t.left),ai(Ii(t.right)))}},ji=b(Symbol.for("effect/Fiber/Id/_fiberCounter"),(()=>di(0))),Ni=t=>Array.from(Ii(t)).map((t=>`#${t}`)).join(","),Ri=ki,Ai=Ci,xi=Ni,Di=()=>{const t=pi(ji);return a(ji,mi(t+1)),new Ei(t,Date.now())},Ti=Os,$i=Fs,Li=Cs,Pi=js,Bi=As,qi=Ts,Ui=Ls,zi=Symbol.for("effect/List"),Ji=t=>Ee(t),Wi=(()=>l(nr(W),Ji))(),Vi={[zi]:zi,_tag:"Cons",toString(){return K(this.toJSON())},toJSON(){return{_id:"List",_tag:"Cons",values:Ji(this).map(Y)}},[Q](){return this.toJSON()},[J](t){return Ki(t)&&this._tag===t._tag&&Wi(this,t)},[A](){return z(this,U(Ji(this)))},[Symbol.iterator](){let t=!1,e=this;return{next(){if(t)return this.return();if("Nil"===e._tag)return t=!0,this.return();const r=e.head;return e=e.tail,{done:t,value:r}},return:e=>(t||(t=!0),{done:!0,value:e})}},pipe(){return st(this,arguments)}},Hi=(t,e)=>{const r=Object.create(Vi);return r.head=t,r.tail=e,r},Gi=B("Nil"),Qi={[zi]:zi,_tag:"Nil",toString(){return K(this.toJSON())},toJSON:()=>({_id:"List",_tag:"Nil"}),[Q](){return this.toJSON()},[A]:()=>Gi,[J](t){return Ki(t)&&this._tag===t._tag},[Symbol.iterator]:()=>({next:()=>({done:!0,value:void 0})}),pipe(){return st(this,arguments)}},Yi=Object.create(Qi),Ki=t=>y(t,zi),Zi=t=>"Nil"===t._tag,Xi=(t,e)=>Hi(t,e),to=()=>Yi,eo=t=>Hi(t,Yi),ro=r(2,((t,e)=>so(e,t))),no=r(2,((t,e)=>Xi(e,t))),so=r(2,((t,e)=>{if(Zi(t))return e;if(Zi(e))return t;{const r=Hi(e.head,t);let n=r,s=e.tail;for(;!Zi(s);){const e=Hi(s.head,t);n.tail=e,n=e,s=s.tail}return r}})),io=r(3,((t,e,r)=>{let n=e,s=t;for(;!Zi(s);)n=r(n,s.head),s=s.tail;return n})),oo=t=>{let e=to(),r=t;for(;!Zi(r);)e=no(e,r.head),r=r.tail;return e},co=function(){function t(t){t&&Object.assign(this,t)}return t.prototype=Mt,t}(),uo=t=>Object.assign(Object.create(Mt),t),ao=Symbol.for("effect/DifferContextPatch");function ho(t){return t}const lo={...co.prototype,[ao]:{_Value:ho,_Patch:ho}},fo=Object.create(Object.assign(Object.create(lo),{_tag:"Empty"})),bo=()=>fo,po=Object.assign(Object.create(lo),{_tag:"AndThen"}),mo=Object.assign(Object.create(lo),{_tag:"AddService"}),So=(t,e)=>{const r=Object.create(mo);return r.key=t,r.service=e,r},yo=Object.assign(Object.create(lo),{_tag:"RemoveService"}),go=t=>{const e=Object.create(yo);return e.key=t,e},wo=Object.assign(Object.create(lo),{_tag:"UpdateService"}),vo=(t,e)=>{const r=Object.create(wo);return r.key=t,r.update=e,r},_o=r(2,((t,e)=>((t,e)=>{const r=Object.create(po);return r.first=t,r.second=e,r})(t,e))),Oo=r(2,((t,e)=>{if("Empty"===t._tag)return e;let r=!1,n=Wr(t);const s=new Map(e.unsafeMap);for(;an(n);){const t=fn(n),e=mn(n);switch(t._tag){case"Empty":n=e;break;case"AddService":s.set(t.key,t.service),n=e;break;case"AndThen":n=en(en(e,t.second),t.first);break;case"RemoveService":s.delete(t.key),n=e;break;case"UpdateService":s.set(t.key,t.update(s.get(t.key))),r=!0,n=e}}if(!r)return pr(s);const i=new Map;for(const[t]of e.unsafeMap)s.has(t)&&(i.set(t,s.get(t)),s.delete(t));for(const[t,e]of s)i.set(t,e);return pr(i)})),Eo=Symbol.for("effect/DifferHashSetPatch");function Fo(t){return t}const ko={...co.prototype,[Eo]:{_Value:Fo,_Key:Fo,_Patch:Fo}},Mo=Object.create(Object.assign(Object.create(ko),{_tag:"Empty"})),Co=()=>Mo,Io=Object.assign(Object.create(ko),{_tag:"AndThen"}),jo=Object.assign(Object.create(ko),{_tag:"Add"}),No=t=>{const e=Object.create(jo);return e.value=t,e},Ro=Object.assign(Object.create(ko),{_tag:"Remove"}),Ao=r(2,((t,e)=>((t,e)=>{const r=Object.create(Io);return r.first=t,r.second=e,r})(t,e))),xo=r(2,((t,e)=>{if("Empty"===t._tag)return e;let r=e,n=Wr(t);for(;an(n);){const t=fn(n),e=mn(n);switch(t._tag){case"Empty":n=e;break;case"AndThen":n=en(t.first)(en(t.second)(e));break;case"Add":r=oi(t.value)(r),n=e;break;case"Remove":r=ci(t.value)(r),n=e}}return r})),Do=Symbol.for("effect/DifferReadonlyArrayPatch");function To(t){return t}const $o={...co.prototype,[Do]:{_Value:To,_Patch:To}},Lo=Object.create(Object.assign(Object.create($o),{_tag:"Empty"})),Po=()=>Lo,Bo=Object.assign(Object.create($o),{_tag:"AndThen"}),qo=Object.assign(Object.create($o),{_tag:"Append"}),Uo=Object.assign(Object.create($o),{_tag:"Slice"}),zo=Object.assign(Object.create($o),{_tag:"Update"}),Jo=(t,e)=>{const r=Object.create(zo);return r.index=t,r.patch=e,r},Wo=r(2,((t,e)=>((t,e)=>{const r=Object.create(Bo);return r.first=t,r.second=e,r})(t,e))),Vo=r(3,((t,e,r)=>{if("Empty"===t._tag)return e;let n=e.slice(),s=Ye(t);for(;Ce(s);){const t=xe(s),e=Te(s);switch(t._tag){case"Empty":s=e;break;case"AndThen":e.unshift(t.first,t.second),s=e;break;case"Append":for(const e of t.values)n.push(e);s=e;break;case"Slice":n=n.slice(t.from,t.until),s=e;break;case"Update":n[t.index]=r.patch(t.patch,n[t.index]),s=e}}return n})),Ho=Symbol.for("effect/Differ"),Go={[Ho]:{_P:n,_V:n},pipe(){return st(this,arguments)}},Qo=t=>{const e=Object.create(Go);return e.empty=t.empty,e.diff=t.diff,e.combine=t.combine,e.patch=t.patch,e},Yo=()=>Ko(((t,e)=>e)),Ko=t=>Qo({empty:n,combine:(t,e)=>t===n?e:e===n?t:r=>e(t(r)),diff:(t,e)=>W(t,e)?n:s(e),patch:(e,r)=>t(r,e(r))}),Zo=255,Xo=t=>t&Zo,tc=t=>t>>8&Zo,ec=(t,e)=>(t&Zo)+((e&t&Zo)<<8),rc=ec(0,0),nc=r(2,((t,e)=>ec(Xo(t)&~e,tc(t)))),sc=r(2,((t,e)=>t|e)),ic=r(2,((t,e)=>t|e)),oc=t=>cc(t)&&!fc(t),cc=t=>uc(t,1),uc=r(2,((t,e)=>!!(t&e))),ac=(...t)=>t.reduce(((t,e)=>t|e),0),hc=ac(0),lc=t=>uc(t,4),fc=t=>uc(t,16),dc=r(2,((t,e)=>ec(t^e,e))),bc=r(2,((t,e)=>t&(~Xo(e)>>>0&Zo|tc(e))|Xo(e)&tc(e))),pc=Qo({empty:rc,diff:(t,e)=>dc(t,e),combine:(t,e)=>sc(e)(t),patch:(t,e)=>bc(e,t)}),mc=t=>ec(t,0),Sc=nc,yc=(t,e)=>({_tag:"Par",left:t,right:e}),gc=(t,e)=>({_tag:"Seq",left:t,right:e}),wc=t=>{let e=t,r=Fc(),n=to(),s=to();for(;;)switch(e._tag){case"Empty":if(Zi(n))return[r,s];e=n.head,n=n.tail;break;case"Par":n=Xi(e.right,n),e=e.left;break;case"Seq":{const t=e.left,r=e.right;switch(t._tag){case"Empty":e=r;break;case"Par":{const n=t.right;e=yc(gc(t.left,r),gc(n,r));break}case"Seq":e=gc(t.left,gc(t.right,r));break;case"Single":e=t,s=Xi(r,s)}break}case"Single":if(r=kc(r,e),Zi(n))return[r,s];e=n.head,n=n.tail}throw new Error("BUG: BlockedRequests.step - please report an issue at https://github.com/Effect-TS/effect/issues")},vc=(t,e)=>{if(Zi(t))return eo(jc(e));if(Cc(e))return t;const r=Tc(t.head),n=Ic(e);return 1===r.length&&1===n.length&&W(r[0],n[0])?Xi(Dc(t.head,jc(e)),t.tail):Xi(jc(e),t)},_c=Symbol.for("effect/RequestBlock/RequestBlockParallel"),Oc={_R:t=>t};class Ec{map;[_c]=Oc;constructor(t){this.map=t}}const Fc=()=>new Ec(Ti()),kc=(t,e)=>new Ec(Bi(t.map,e.dataSource,(t=>de(Se(t,tn(e.blockedRequest)),(()=>Wr(e.blockedRequest)))))),Mc=(t,e)=>new Ec(Ui(t.map,e.map,((t,e,r)=>Li(t,r,he($i(t,r),{onNone:()=>e,onSome:t=>sn(e,t)}))))),Cc=t=>(t=>t&&os(t._root))(t.map),Ic=t=>Array.from(Pi(t.map)),jc=t=>xc(qi(t.map,(t=>Wr(t)))),Nc=Symbol.for("effect/RequestBlock/RequestBlockSequential"),Rc={_R:t=>t};class Ac{map;[Nc]=Rc;constructor(t){this.map=t}}const xc=t=>new Ac(t),Dc=(t,e)=>new Ac(Ui(e.map,t.map,((t,e,r)=>Li(t,r,he($i(t,r),{onNone:()=>zr(),onSome:t=>sn(t,e)}))))),Tc=t=>Array.from(Pi(t.map)),$c="Die",Lc="Empty",Pc="Fail",Bc="Interrupt",qc="Parallel",Uc="Sequential",zc="effect/Cause",Jc=Symbol.for(zc),Wc={[Jc]:{_E:t=>t},[A](){return a(x(zc),T(x(hu(this))),z(this))},[J](t){return Zc(t)&&au(this,t)},pipe(){return st(this,arguments)},toJSON(){switch(this._tag){case"Empty":return{_id:"Cause",_tag:this._tag};case"Die":return{_id:"Cause",_tag:this._tag,defect:Y(this.defect)};case"Interrupt":return{_id:"Cause",_tag:this._tag,fiberId:this.fiberId.toJSON()};case"Fail":return{_id:"Cause",_tag:this._tag,failure:Y(this.error)};case"Sequential":case"Parallel":return{_id:"Cause",_tag:this._tag,left:Y(this.left),right:Y(this.right)}}},toString(){return wu(this)},[Q](){return this.toJSON()}},Vc=(()=>{const t=Object.create(Wc);return t._tag=Lc,t})(),Hc=t=>{const e=Object.create(Wc);return e._tag=Pc,e.error=t,e},Gc=t=>{const e=Object.create(Wc);return e._tag=$c,e.defect=t,e},Qc=t=>{const e=Object.create(Wc);return e._tag=Bc,e.fiberId=t,e},Yc=(t,e)=>{const r=Object.create(Wc);return r._tag=qc,r.left=t,r.right=e,r},Kc=(t,e)=>{const r=Object.create(Wc);return r._tag=Uc,r.left=t,r.right=e,r},Zc=t=>y(t,Jc),Xc=t=>t._tag===$c,tu=t=>ae(iu(t)),eu=t=>gu(void 0,bu)(t),ru=t=>Qr(yu(t,zr(),((t,e)=>e._tag===$c?ce(a(t,en(e.defect))):oe()))),nu=t=>yu(t,ri(),((t,e)=>e._tag===Bc?ce(a(t,oi(e.fiberId))):oe())),su=t=>{const e=(t=>fu(t,(t=>t._tag===Pc?ce(t.error):oe())))(t);switch(e._tag){case"None":return Gt(t);case"Some":return Qt(e.value)}},iu=t=>fu(t,(t=>t._tag===Bc?ce(t.fiberId):oe())),ou=t=>Su(t,{onEmpty:Vc,onFail:()=>Vc,onDie:Gc,onInterrupt:Qc,onSequential:Kc,onParallel:Yc}),cu=r(2,((t,e)=>uu(t,(t=>Hc(e(t)))))),uu=r(2,((t,e)=>Su(t,{onEmpty:Vc,onFail:t=>e(t),onDie:t=>Gc(t),onInterrupt:t=>Qc(t),onSequential:(t,e)=>Kc(t,e),onParallel:(t,e)=>Yc(t,e)}))),au=(t,e)=>{let r=Wr(t),n=Wr(e);for(;an(r)&&an(n);){const[t,e]=a(fn(r),yu([ri(),zr()],(([t,e],r)=>{const[n,s]=du(r);return ce([a(t,ai(n)),a(e,sn(s))])}))),[s,i]=a(fn(n),yu([ri(),zr()],(([t,e],r)=>{const[n,s]=du(r);return ce([a(t,ai(n)),a(e,sn(s))])})));if(!W(t,s))return!1;r=e,n=i}return!0},hu=t=>lu(Wr(t),zr()),lu=(t,e)=>{for(;;){const[r,n]=a(t,er([ri(),zr()],(([t,e],r)=>{const[n,s]=du(r);return[a(t,ai(n)),a(e,sn(s))]}))),s=ii(r)>0?a(e,en(r)):e;if(un(n))return Qr(s);t=n,e=s}throw new Error(_("Cause.flattenCauseLoop"))},fu=r(2,((t,e)=>{const r=[t];for(;r.length>0;){const t=r.pop(),n=e(t);switch(n._tag){case"None":switch(t._tag){case Uc:case qc:r.push(t.right),r.push(t.left)}break;case"Some":return n}}return oe()})),du=t=>{let e=t;const r=[];let n=ri(),s=zr();for(;void 0!==e;)switch(e._tag){case Lc:if(0===r.length)return[n,s];e=r.pop();break;case Pc:if(n=oi(n,Jr(e._tag,e.error)),0===r.length)return[n,s];e=r.pop();break;case $c:if(n=oi(n,Jr(e._tag,e.defect)),0===r.length)return[n,s];e=r.pop();break;case Bc:if(n=oi(n,Jr(e._tag,e.fiberId)),0===r.length)return[n,s];e=r.pop();break;case Uc:switch(e.left._tag){case Lc:e=e.right;break;case Uc:e=Kc(e.left.left,Kc(e.left.right,e.right));break;case qc:e=Yc(Kc(e.left.left,e.right),Kc(e.left.right,e.right));break;default:s=en(s,e.right),e=e.left}break;case qc:r.push(e.right),e=e.left}throw new Error(_("Cause.evaluateCauseLoop"))},bu={emptyCase:i,failCase:o,dieCase:o,interruptCase:i,sequentialCase:(t,e,r)=>e&&r,parallelCase:(t,e,r)=>e&&r},pu="SequentialCase",mu="ParallelCase",Su=r(2,((t,{onDie:e,onEmpty:r,onFail:n,onInterrupt:s,onParallel:i,onSequential:o})=>gu(t,void 0,{emptyCase:()=>r,failCase:(t,e)=>n(e),dieCase:(t,r)=>e(r),interruptCase:(t,e)=>s(e),sequentialCase:(t,e,r)=>o(e,r),parallelCase:(t,e,r)=>i(e,r)}))),yu=r(3,((t,e,r)=>{let n=e,s=t;const i=[];for(;void 0!==s;){const t=r(n,s);switch(n=ae(t)?t.value:n,s._tag){case Uc:case qc:i.push(s.right),s=s.left;break;default:s=void 0}void 0===s&&i.length>0&&(s=i.pop())}return n})),gu=r(3,((t,e,r)=>{const n=[t],s=[];for(;n.length>0;){const t=n.pop();switch(t._tag){case Lc:s.push(Gt(r.emptyCase(e)));break;case Pc:s.push(Gt(r.failCase(e,t.error)));break;case $c:s.push(Gt(r.dieCase(e,t.defect)));break;case Bc:s.push(Gt(r.interruptCase(e,t.fiberId)));break;case Uc:n.push(t.right),n.push(t.left),s.push(Qt({_tag:pu}));break;case qc:n.push(t.right),n.push(t.left),s.push(Qt({_tag:mu}))}}const i=[];for(;s.length>0;){const t=s.pop();switch(t._tag){case"Left":switch(t.left._tag){case pu:{const t=i.pop(),n=i.pop(),s=r.sequentialCase(e,t,n);i.push(s);break}case mu:{const t=i.pop(),n=i.pop(),s=r.parallelCase(e,t,n);i.push(s);break}}break;case"Right":i.push(t.right)}}if(0===i.length)throw new Error("BUG: Cause.reduceWithContext - please report an issue at https://github.com/Effect-TS/effect/issues");return i.pop()})),wu=(t,e)=>eu(t)?"All fibers interrupted without errors.":Cu(t).map((function(t){return!0!==e?.renderErrorCause||void 0===t.cause?t.stack:`${t.stack} {\n${vu(t.cause," ")}\n}`})).join("\n"),vu=(t,e)=>{const r=t.stack.split("\n");let n=`${e}[cause]: ${r[0]}`;for(let t=1,s=r.length;t<s;t++)n+=`\n${e}${r[t]}`;return t.cause&&(n+=` {\n${vu(t.cause,`${e} `)}\n${e}}`),n};class _u extends globalThis.Error{span=void 0;constructor(t){const e="object"==typeof t&&null!==t,r=Error.stackTraceLimit;Error.stackTraceLimit=1,super(Ou(t),e&&"cause"in t&&void 0!==t.cause?{cause:new _u(t.cause)}:void 0),""===this.message&&(this.message="An error has occurred"),Error.stackTraceLimit=r,this.name=t instanceof Error?t.name:"Error",e&&(Mu in t&&(this.span=t[Mu]),Object.keys(t).forEach((e=>{e in this||(this[e]=t[e])}))),this.stack=ku(`${this.name}: ${this.message}`,t instanceof Error&&t.stack?t.stack:"",this.span)}}const Ou=t=>{if("string"==typeof t)return t;if("object"==typeof t&&null!==t&&t instanceof Error)return t.message;try{if(y(t,"toString")&&m(t.toString)&&t.toString!==Object.prototype.toString&&t.toString!==globalThis.Array.prototype.toString)return t.toString()}catch{}return X(t)},Eu=/\((.*)\)/g,Fu=b("effect/Tracer/spanToTrace",(()=>new WeakMap)),ku=(t,e,r)=>{const n=[t],s=e.startsWith(t)?e.slice(t.length).split("\n"):e.split("\n");for(let t=1;t<s.length;t++)if(s[t].includes(" at new BaseEffectError")||s[t].includes(" at new YieldableError"))t++;else{if(s[t].includes("Generator.next"))break;if(s[t].includes("effect_internal_function"))break;n.push(s[t].replace(/at .*effect_instruction_i.*\((.*)\)/,"at $1").replace(/EffectPrimitive\.\w+/,"<anonymous>"))}if(r){let t=r,e=0;for(;t&&"Span"===t._tag&&e<10;){const r=Fu.get(t);if("function"==typeof r){const e=r();if("string"==typeof e){const r=e.matchAll(Eu);let s=!1;for(const[,e]of r)s=!0,n.push(` at ${t.name} (${e})`);s||n.push(` at ${t.name} (${e.replace(/^at /,"")})`)}else n.push(` at ${t.name}`)}else n.push(` at ${t.name}`);t=pe(t.parent),e++}}return n.join("\n")},Mu=Symbol.for("effect/SpanAnnotation"),Cu=t=>gu(t,void 0,{emptyCase:()=>[],dieCase:(t,e)=>[new _u(e)],failCase:(t,e)=>[new _u(e)],interruptCase:()=>[],parallelCase:(t,e,r)=>[...e,...r],sequentialCase:(t,e,r)=>[...e,...r]}),Iu="Pending",ju="Done",Nu=Symbol.for("effect/Deferred"),Ru={_E:t=>t,_A:t=>t},Au=t=>({_tag:ju,effect:t});class xu{self;called=!1;constructor(t){this.self=t}next(t){return this.called?{value:t,done:!0}:(this.called=!0,{value:this.self,done:!1})}return(t){return{value:t,done:!0}}throw(t){throw t}[Symbol.iterator](){return new xu(this.self)}}const Du=(t,e)=>{const r=new Lu("Blocked");return r.effect_instruction_i0=t,r.effect_instruction_i1=e,r},Tu=Symbol.for("effect/Effect");class $u{patch;op;_op=gt;constructor(t,e){this.patch=t,this.op=e}}class Lu{_op;effect_instruction_i0=void 0;effect_instruction_i1=void 0;effect_instruction_i2=void 0;trace=void 0;[Tu]=Ft;constructor(t){this._op=t}[J](t){return this===t}[A](){return z(this,D(this))}pipe(){return st(this,arguments)}toJSON(){return{_id:"Effect",_op:this._op,effect_instruction_i0:Y(this.effect_instruction_i0),effect_instruction_i1:Y(this.effect_instruction_i1),effect_instruction_i2:Y(this.effect_instruction_i2)}}toString(){return K(this.toJSON())}[Q](){return this.toJSON()}[Symbol.iterator](){return new xu(new M(this))}}class Pu{_op;effect_instruction_i0=void 0;effect_instruction_i1=void 0;effect_instruction_i2=void 0;trace=void 0;[Tu]=Ft;constructor(t){this._op=t,this._tag=t}[J](t){return Uh(t)&&"Failure"===t._op&&W(this.effect_instruction_i0,t.effect_instruction_i0)}[A](){return a(B(this._tag),T(x(this.effect_instruction_i0)),z(this))}get cause(){return this.effect_instruction_i0}pipe(){return st(this,arguments)}toJSON(){return{_id:"Exit",_tag:this._op,cause:this.cause.toJSON()}}toString(){return K(this.toJSON())}[Q](){return this.toJSON()}[Symbol.iterator](){return new xu(new M(this))}}class Bu{_op;effect_instruction_i0=void 0;effect_instruction_i1=void 0;effect_instruction_i2=void 0;trace=void 0;[Tu]=Ft;constructor(t){this._op=t,this._tag=t}[J](t){return Uh(t)&&"Success"===t._op&&W(this.effect_instruction_i0,t.effect_instruction_i0)}[A](){return a(B(this._tag),T(x(this.effect_instruction_i0)),z(this))}get value(){return this.effect_instruction_i0}pipe(){return st(this,arguments)}toJSON(){return{_id:"Exit",_tag:this._op,value:Y(this.value)}}toString(){return K(this.toJSON())}[Q](){return this.toJSON()}[Symbol.iterator](){return new xu(new M(this))}}const qu=t=>y(t,Tu),Uu=t=>{const e=new Lu(St);return e.effect_instruction_i0=t,e},zu=r(3,((t,e,r)=>Da((n=>ha(t,(t=>ha(na(ja((()=>n(e(t))))),(e=>ja((()=>r(t,e))).pipe(ba({onFailure:t=>{switch(e._tag){case ct:return oa(Kc(e.effect_instruction_i0,t));case lt:return oa(t)}},onSuccess:()=>e})))))))))),Ju=r(2,((t,e)=>ha(t,(()=>Ia(e))))),Wu=t=>Ju(t,void 0),Vu=function(){const t=new Lu(ot);switch(arguments.length){case 2:t.effect_instruction_i0=arguments[0],t.commit=arguments[1];break;case 3:t.effect_instruction_i0=arguments[0],t.effect_instruction_i1=arguments[1],t.commit=arguments[2];break;case 4:t.effect_instruction_i0=arguments[0],t.effect_instruction_i1=arguments[1],t.effect_instruction_i2=arguments[2],t.commit=arguments[3];break;default:throw new Error(_("you're not supposed to end up here"))}return t},Hu=(t,e=Ri)=>{const r=new Lu(it);let n;return r.effect_instruction_i0=e=>{n=t(e)},r.effect_instruction_i1=e,ka(r,(()=>qu(n)?n:Ta))},Gu=(t,e=Ri)=>ja((()=>Hu(t,e))),Qu=(t,e=Ri)=>Vu(t,(function(){let t,r;function n(e){t?t(e):void 0===r&&(r=e)}const s=new Lu(it);let i,o;return s.effect_instruction_i0=e=>{t=e,r&&e(r)},s.effect_instruction_i1=e,1!==this.effect_instruction_i0.length?(o=new AbortController,i=N((()=>this.effect_instruction_i0(n,o.signal)))):i=N((()=>this.effect_instruction_i0(n))),i||o?ka(s,(()=>(o&&o.abort(),i??Ta))):s})),Yu=r(2,((t,e)=>{const r=new Lu(ut);return r.effect_instruction_i0=t,r.effect_instruction_i1=e,r})),Ku=r(2,((t,e)=>pa(t,{onFailure:e,onSuccess:Ia}))),Zu=Symbol.for("effect/OriginalAnnotation"),Xu=(t,e)=>ae(e)?new Proxy(t,{has:(t,e)=>e===Mu||e===Zu||e in t,get:(r,n)=>n===Mu?e.value:n===Zu?t:r[n]}):t,ta=t=>S(t)&&!(Mu in t)?Uu((e=>oa(Gc(Xu(t,wl(e)))))):oa(Gc(t)),ea=t=>ca((()=>Gc(new Th(t)))),ra=t=>pa(t,{onFailure:t=>Ia(Qt(t)),onSuccess:t=>Ia(Gt(t))}),na=t=>da(t,{onFailure:Hh,onSuccess:Kh}),sa=t=>S(t)&&!(Mu in t)?Uu((e=>oa(Hc(Xu(t,wl(e)))))):oa(Hc(t)),ia=t=>ha(Na(t),sa),oa=t=>{const e=new Pu(ct);return e.effect_instruction_i0=t,e},ca=t=>ha(Na(t),oa),ua=Uu((t=>Ia(t.id()))),aa=t=>Uu((e=>t(e.id()))),ha=r(2,((t,e)=>{const r=new Lu(at);return r.effect_instruction_i0=t,r.effect_instruction_i1=e,r})),la=t=>{const e=new Lu("OnStep");return e.effect_instruction_i0=t,e},fa=t=>ha(t,n),da=r(2,((t,e)=>ba(t,{onFailure:t=>Ia(e.onFailure(t)),onSuccess:t=>Ia(e.onSuccess(t))}))),ba=r(2,((t,e)=>{const r=new Lu(ht);return r.effect_instruction_i0=t,r.effect_instruction_i1=e.onFailure,r.effect_instruction_i2=e.onSuccess,r})),pa=r(2,((t,e)=>ba(t,{onFailure:t=>{if(ru(t).length>0)return oa((t=>Su(t,{onEmpty:Vc,onFail:Gc,onDie:Gc,onInterrupt:Qc,onSequential:Kc,onParallel:Yc}))(t));const r=(t=>Qr(yu(t,zr(),((t,e)=>e._tag===Pc?ce(a(t,en(e.error))):oe()))))(t);return r.length>0?e.onFailure(ln(r)):oa(t)},onSuccess:e.onSuccess}))),ma=r(2,((t,e)=>ja((()=>{const r=Ee(t),n=_e(r.length);let s=0;return Ju(La({while:()=>s<r.length,body:()=>e(r[s],s),step:t=>{n[s++]=t}}),n)})))),Sa=r(2,((t,e)=>ja((()=>{const r=Ee(t);let n=0;return La({while:()=>n<r.length,body:()=>e(r[n],n),step:()=>{n++}})})))),ya=ha(ua,(t=>ga(t))),ga=t=>oa(Qc(t)),wa=t=>{const e=new Lu(bt);return e.effect_instruction_i0=ec(r=1,r),e.effect_instruction_i1=()=>t,e;var r},va=r(2,((t,e)=>Da((r=>ha(na(r(t)),(t=>ul(e,t))))))),_a=r(2,((t,e)=>ha(t,(t=>Na((()=>e(t))))))),Oa=r(2,((t,e)=>pa(t,{onFailure:t=>ia((()=>e.onFailure(t))),onSuccess:t=>Na((()=>e.onSuccess(t)))}))),Ea=r(2,((t,e)=>ba(t,{onFailure:t=>{const r=su(t);switch(r._tag){case"Left":return ia((()=>e(r.left)));case"Right":return oa(r.right)}},onSuccess:Ia}))),Fa=r(2,((t,e)=>Da((r=>ba(r(t),{onFailure:t=>{const r=Hh(t);return ba(e(r),{onFailure:e=>Hh(Kc(t,e)),onSuccess:()=>r})},onSuccess:t=>{const r=Kh(t);return Wa(e(r),r)}}))))),ka=r(2,((t,e)=>Fa(t,Qh({onFailure:t=>eu(t)?Wu(e(nu(t))):Ta,onSuccess:()=>Ta})))),Ma=r(2,((t,e)=>Aa(t,e,Ia))),Ca=r(2,((t,e)=>pa(t,{onFailure:t=>ta(e(t)),onSuccess:Ia}))),Ia=t=>{const e=new Bu(lt);return e.effect_instruction_i0=t,e},ja=t=>{const e=new Lu(ot);return e.commit=t,e},Na=t=>{const e=new Lu(ft);return e.effect_instruction_i0=t,e},Ra=r((t=>3===t.length||2===t.length&&!(S(t[1])&&"onlyEffect"in t[1])),((t,e)=>ha(t,(t=>{const r="function"==typeof e?e(t):e;return qu(r)?Ju(r,t):y(n=r,"then")&&m(n.then)?Hu((e=>{r.then((()=>e(Ia(t))),(t=>e(sa(new qh(t,"An unknown error occurred in Effect.tap")))))})):Ia(t);var n})))),Aa=r(3,((t,e,r)=>ba(t,{onFailure:t=>ru(t).length>0?oa(me((t=>Su(t,{onEmpty:oe(),onFail:t=>ce(Gc(t)),onDie:t=>ce(Gc(t)),onInterrupt:()=>oe(),onSequential:we(Kc),onParallel:we(Yc)}))(t))):e(),onSuccess:r}))),xa=t=>{const e=new Lu(bt);return e.effect_instruction_i0=mc(1),e.effect_instruction_i1=()=>t,e},Da=t=>Vu(t,(function(){const t=new Lu(bt);return t.effect_instruction_i0=mc(1),t.effect_instruction_i1=t=>cc(t)?N((()=>this.effect_instruction_i0(wa))):N((()=>this.effect_instruction_i0(xa))),t})),Ta=Ia(void 0),$a=r(2,((t,e)=>ha(e,(e=>e?a(t,_a(ce)):Ia(oe()))))),La=t=>{const e=new Lu(pt);return e.effect_instruction_i0=t.while,e.effect_instruction_i1=t.body,e.effect_instruction_i2=t.step,e},Pa=t=>ja((()=>{const e=new Lu(mt);return e.effect_instruction_i0=t(),e})),Ba=function(){const t=1===arguments.length?arguments[0]:arguments[1].bind(arguments[0]);return Pa((()=>t(a)))},qa=(t,...e)=>Object.defineProperty(0===e.length?function(...e){return Pa((()=>t.apply(this,e)))}:function(...r){let n=Pa((()=>t.apply(this,r)));for(const t of e)n=t(n,...r);return n},"length",{value:t.length,configurable:!0}),Ua=t=>{const e=new Lu(yt);return void 0!==t?.priority?gh(e,t.priority):e},za=r(2,((t,e)=>ha(t,(t=>_a(e,(e=>[t,e])))))),Ja=r(2,((t,e)=>ha(t,(t=>Ju(e,t))))),Wa=r(2,((t,e)=>ha(t,(()=>e)))),Va=r(3,((t,e,r)=>ha(t,(t=>_a(e,(e=>r(t,e))))))),Ha=t=>ha(ua,(e=>a(t,Ga(e)))),Ga=r(2,((t,e)=>ha(t.interruptAsFork(e),(()=>t.await)))),Qa={_tag:"Error",syslog:3,label:"ERROR",ordinal:4e4,pipe(){return st(this,arguments)}},Ya={_tag:"Warning",syslog:4,label:"WARN",ordinal:3e4,pipe(){return st(this,arguments)}},Ka={_tag:"Info",syslog:6,label:"INFO",ordinal:2e4,pipe(){return st(this,arguments)}},Za={_tag:"Debug",syslog:7,label:"DEBUG",ordinal:1e4,pipe(){return st(this,arguments)}},Xa=Symbol.for("effect/FiberRef"),th={_A:t=>t},eh=t=>Uu((e=>Kh(e.getFiberRef(t)))),rh=r(2,((t,e)=>ha(eh(t),e))),nh=r(2,((t,e)=>sh(t,(()=>[void 0,e])))),sh=r(2,((t,e)=>Uu((r=>{const[n,s]=e(r.getFiberRef(t));return r.setFiberRef(t,s),Ia(n)})))),ih=r(3,((t,e,r)=>zu(Ja(eh(e),nh(e,r)),(()=>t),(t=>nh(e,t))))),oh=r(3,((t,e,r)=>rh(e,(n=>ih(t,e,r(n)))))),ch=(t,e)=>lh(t,{differ:Yo(),fork:e?.fork??n,join:e?.join}),uh=t=>{const e=Qo({empty:Co(),combine:(t,e)=>Ao(e)(t),diff:(t,e)=>((t,e)=>{const[r,n]=hi([t,Co()],(([t,e],r)=>si(r)(t)?[ci(r)(t),e]:[t,Ao(No(r))(e)]))(e);return hi(n,((t,e)=>Ao((t=>{const e=Object.create(Ro);return e.value=t,e})(e))(t)))(r)})(t,e),patch:(t,e)=>xo(e)(t)});return lh(t,{differ:e,fork:e.empty})},ah=t=>{const e=(t=>Qo({empty:Po(),combine:(t,e)=>Wo(t,e),diff:(e,r)=>(t=>{let e=0,r=Po();for(;e<t.oldValue.length&&e<t.newValue.length;){const n=t.differ.diff(t.oldValue[e],t.newValue[e]);W(n,t.differ.empty)||(r=Wo(r,Jo(e,n))),e+=1}return e<t.oldValue.length&&(r=Wo(r,((t,e)=>{const r=Object.create(Uo);return r.from=0,r.until=e,r})(0,e))),e<t.newValue.length&&(r=Wo(r,(t=>{const e=Object.create(qo);return e.values=t,e})(Le(e)(t.newValue)))),r})({oldValue:e,newValue:r,differ:t}),patch:(e,r)=>Vo(e,r,t)}))(Yo());return lh(t,{differ:e,fork:e.empty})},hh=t=>{const e=Qo({empty:bo(),combine:(t,e)=>_o(e)(t),diff:(t,e)=>((t,e)=>{const r=new Map(t.unsafeMap);let n=bo();for(const[t,s]of e.unsafeMap.entries())if(r.has(t)){const e=r.get(t);r.delete(t),W(e,s)||(n=_o(vo(t,(()=>s)))(n))}else r.delete(t),n=_o(So(t,s))(n);for(const[t]of r.entries())n=_o(go(t))(n);return n})(t,e),patch:(t,e)=>Oo(e)(t)});return lh(t,{differ:e,fork:e.empty})},lh=(t,e)=>({...Ct,[Xa]:th,initial:t,commit(){return eh(this)},diff:(t,r)=>e.differ.diff(t,r),combine:(t,r)=>e.differ.combine(t,r),patch:t=>r=>e.differ.patch(t,r),fork:e.fork,join:e.join??((t,e)=>e)}),fh=t=>lh(t,{differ:pc,fork:pc.empty}),dh=b(Symbol.for("effect/FiberRef/currentContext"),(()=>hh(Cr()))),bh=b(Symbol.for("effect/FiberRef/currentSchedulingPriority"),(()=>ch(0))),ph=b(Symbol.for("effect/FiberRef/currentMaxOpsBeforeYield"),(()=>ch(2048))),mh=b(Symbol.for("effect/FiberRef/currentLogAnnotation"),(()=>ch(Ti()))),Sh=b(Symbol.for("effect/FiberRef/currentLogLevel"),(()=>ch(Ka))),yh=b(Symbol.for("effect/FiberRef/currentLogSpan"),(()=>ch(to()))),gh=r(2,((t,e)=>ih(t,bh,e))),wh=b(Symbol.for("effect/FiberRef/currentConcurrency"),(()=>ch("unbounded"))),vh=b(Symbol.for("effect/FiberRef/currentRequestBatching"),(()=>ch(!0))),_h=b(Symbol.for("effect/FiberRef/currentUnhandledErrorLogLevel"),(()=>ch(ce(Za)))),Oh=b(Symbol.for("effect/FiberRef/versionMismatchErrorLogLevel"),(()=>ch(ce(Ya)))),Eh=b(Symbol.for("effect/FiberRef/currentMetricLabels"),(()=>ah([]))),Fh=b(Symbol.for("effect/FiberRef/currentForkScopeOverride"),(()=>ch(oe(),{fork:()=>oe(),join:t=>t}))),kh=b(Symbol.for("effect/FiberRef/currentInterruptedCause"),(()=>ch(Vc,{fork:()=>Vc,join:t=>t}))),Mh=Symbol.for("effect/Scope"),Ch=Symbol.for("effect/CloseableScope"),Ih=(t,e)=>t.addFinalizer((()=>Wu(e))),jh=(t,e)=>t.addFinalizer(e),Nh=(t,e)=>t.close(e),Rh=(t,e)=>t.fork(e),Ah=function(){class t extends globalThis.Error{commit(){return sa(this)}toJSON(){const t={...this};return this.message&&(t.message=this.message),this.cause&&(t.cause=this.cause),t}[Q](){return this.toString!==globalThis.Error.prototype.toString?this.stack?`${this.toString()}\n${this.stack.split("\n").slice(1).join("\n")}`:this.toString():"Bun"in globalThis?wu(Hc(this),{renderErrorCause:!0}):this}}return Object.assign(t.prototype,It),t}(),xh=(t,e)=>{class r extends Ah{_tag=e}return Object.assign(r.prototype,t),r.prototype.name=e,r},Dh=Symbol.for("effect/Cause/errors/RuntimeException"),Th=xh({[Dh]:Dh},"RuntimeException"),$h=Symbol.for("effect/Cause/errors/InterruptedException"),Lh=Symbol.for("effect/Cause/errors/NoSuchElement"),Ph=xh({[Lh]:Lh},"NoSuchElementException"),Bh=Symbol.for("effect/Cause/errors/UnknownException"),qh=function(){class t extends Ah{_tag="UnknownException";error;constructor(t,e){super(e??"An unknown error occurred",{cause:t}),this.error=t}}return Object.assign(t.prototype,{[Bh]:Bh,name:"UnknownException"}),t}(),Uh=t=>qu(t)&&"_tag"in t&&("Success"===t._tag||"Failure"===t._tag),zh=r(2,((t,e)=>{switch(t._tag){case ct:return Hh(t.effect_instruction_i0);case lt:return Kh(e)}})),Jh=t=>zh(t,void 0),Wh=(t,e)=>rl(t,e?.parallel?Yc:Kc),Vh=t=>Hh(Hc(t)),Hh=t=>{const e=new Pu(ct);return e.effect_instruction_i0=t,e},Gh=r(2,((t,e)=>{switch(t._tag){case ct:return Hh(t.effect_instruction_i0);case lt:return Kh(e(t.effect_instruction_i0))}})),Qh=r(2,((t,{onFailure:e,onSuccess:r})=>{switch(t._tag){case ct:return e(t.effect_instruction_i0);case lt:return r(t.effect_instruction_i0)}})),Yh=r(2,((t,{onFailure:e,onSuccess:r})=>{switch(t._tag){case ct:return e(t.effect_instruction_i0);case lt:return r(t.effect_instruction_i0)}})),Kh=t=>{const e=new Bu(lt);return e.effect_instruction_i0=t,e},Zh=Kh(void 0),Xh=r(2,((t,e)=>el(t,e,{onSuccess:(t,e)=>[t,e],onFailure:Kc}))),tl=r(2,((t,e)=>el(t,e,{onSuccess:(t,e)=>e,onFailure:Kc}))),el=r(3,((t,e,{onFailure:r,onSuccess:n})=>{switch(t._tag){case ct:switch(e._tag){case lt:return Hh(t.effect_instruction_i0);case ct:return Hh(r(t.effect_instruction_i0,e.effect_instruction_i0))}case lt:switch(e._tag){case lt:return Kh(n(t.effect_instruction_i0,e.effect_instruction_i0));case ct:return Hh(e.effect_instruction_i0)}}})),rl=(t,e)=>{const r=Vr(t);return an(r)?a(mn(r),er(a(fn(r),Gh(Wr)),((t,r)=>a(t,el(r,{onSuccess:(t,e)=>a(t,en(e)),onFailure:e})))),Gh(Qr),Gh((t=>Gr(t))),ce):oe()},nl=t=>{var e;return{...Ct,[Nu]:Ru,state:di((e=[],{_tag:Iu,joiners:e})),commit(){return ol(this)},blockingOn:t}},sl=()=>ha(ua,(t=>il(t))),il=t=>Na((()=>nl(t))),ol=t=>Gu((e=>{const r=pi(t.state);switch(r._tag){case ju:return e(r.effect);case Iu:return r.joiners.push(e),dl(t,e)}}),t.blockingOn),cl=r(2,((t,e)=>Na((()=>{const r=pi(t.state);switch(r._tag){case ju:return!1;case Iu:mi(t.state,Au(e));for(let t=0,n=r.joiners.length;t<n;t++)r.joiners[t](e);return!0}})))),ul=r(2,((t,e)=>cl(t,e))),al=r(2,((t,e)=>cl(t,oa(e)))),hl=r(2,((t,e)=>cl(t,ga(e)))),ll=r(2,((t,e)=>cl(t,Ia(e)))),fl=(t,e)=>{const r=pi(t.state);if(r._tag===Iu){mi(t.state,Au(e));for(let t=0,n=r.joiners.length;t<n;t++)r.joiners[t](e)}},dl=(t,e)=>Na((()=>{const r=pi(t.state);if(r._tag===Iu){const t=r.joiners.indexOf(e);t>=0&&r.joiners.splice(t,1)}})),bl=Uu((t=>Kh(t.currentContext))),pl=()=>bl,ml=t=>ha(pl(),t),Sl=r(2,((t,e)=>ih(dh,e)(t))),yl=r(2,((t,e)=>oh(dh,(t=>xr(t,e)))(t))),gl=r(2,((t,e)=>ml((r=>Sl(t,e(r)))))),wl=t=>{const e=t.currentSpan;return void 0!==e&&"Span"===e._tag?ce(e):oe()},vl=sl,_l=ol,Ol=ul,El=al,Fl=t=>ha(ua,(e=>cl(t,ga(e)))),kl=t=>Na((()=>pi(t.state)._tag===ju)),Ml=ll,Cl=nl,Il=t=>"Failure"===t._tag,jl=t=>"Success"===t._tag,Nl=Wh,Rl=Vh,Al=Hh,xl=Gh,Dl=Qh,Tl=Kh,$l=Zh,Ll=Xh,Pl=tl,Bl=Symbol.for("effect/MutableHashMap"),ql={[Bl]:Bl,[Symbol.iterator](){return new Ul(this)},toString(){return K(this.toJSON())},toJSON(){return{_id:"MutableHashMap",values:Array.from(this).map(Y)}},[Q](){return this.toJSON()},pipe(){return st(this,arguments)}};class Ul{self;referentialIterator;bucketIterator;constructor(t){this.self=t,this.referentialIterator=t.referential[Symbol.iterator]()}next(){if(void 0!==this.bucketIterator)return this.bucketIterator.next();const t=this.referentialIterator.next();return t.done?(this.bucketIterator=new zl(this.self.buckets.values()),this.next()):t}[Symbol.iterator](){return new Ul(this.self)}}class zl{backing;constructor(t){this.backing=t}currentBucket;next(){if(void 0===this.currentBucket){const t=this.backing.next();if(t.done)return t;this.currentBucket=t.value[Symbol.iterator]()}const t=this.currentBucket.next();return t.done?(this.currentBucket=void 0,this.next()):t}}const Jl=()=>{const t=Object.create(ql);return t.referential=new Map,t.buckets=new Map,t.bucketsSize=0,t},Wl=r(2,((t,e)=>{if(!1===H(e))return t.referential.has(e)?ce(t.referential.get(e)):oe();const r=e[A](),n=t.buckets.get(r);return void 0===n?oe():Vl(t,n,e)})),Vl=(t,e,r,n=!1)=>{for(let s=0,i=e.length;s<i;s++)if(r[J](e[s][0])){const r=e[s][1];return n&&(e.splice(s,1),t.bucketsSize--),ce(r)}return oe()},Hl=r(2,((t,e)=>ae(Wl(t,e)))),Gl=r(3,((t,e,r)=>{if(!1===H(e))return t.referential.set(e,r),t;const n=e[A](),s=t.buckets.get(n);return void 0===s?(t.buckets.set(n,[[e,r]]),t.bucketsSize++,t):(Ql(t,s,e),s.push([e,r]),t.bucketsSize++,t)})),Ql=(t,e,r)=>{for(let n=0,s=e.length;n<s;n++)if(r[J](e[n][0]))return e.splice(n,1),void t.bucketsSize--},Yl=r(2,((t,e)=>{if(!1===H(e))return t.referential.delete(e),t;const r=e[A](),n=t.buckets.get(r);return void 0===n||(Ql(t,n,e),0===n.length&&t.buckets.delete(r)),t})),Kl=t=>t.referential.size+t.bucketsSize,Zl=Symbol.for("effect/MutableList"),Xl={[Zl]:Zl,[Symbol.iterator](){let t=!1,e=this.head;return{next(){if(t)return this.return();if(null==e)return t=!0,this.return();const r=e.value;return e=e.next,{done:t,value:r}},return:e=>(t||(t=!0),{done:!0,value:e})}},toString(){return K(this.toJSON())},toJSON(){return{_id:"MutableList",values:Array.from(this).map(Y)}},[Q](){return this.toJSON()},pipe(){return st(this,arguments)}},tf=t=>0===ef(t),ef=t=>t._length,rf=r(2,((t,e)=>{const r=(t=>({value:t,removed:!1,prev:void 0,next:void 0}))(e);return void 0===t.head&&(t.head=r),void 0===t.tail||(t.tail.next=r,r.prev=t.tail),t.tail=r,t._length+=1,t})),nf=Symbol.for("effect/MutableQueue"),sf=Symbol.for("effect/mutable/MutableQueue/Empty"),of={[nf]:nf,[Symbol.iterator](){return Array.from(this.queue)[Symbol.iterator]()},toString(){return K(this.toJSON())},toJSON(){return{_id:"MutableQueue",values:Array.from(this).map(Y)}},[Q](){return this.toJSON()},pipe(){return st(this,arguments)}},cf=t=>{const e=Object.create(of);return e.queue=(()=>{const t=Object.create(Xl);return t.head=void 0,t.tail=void 0,t._length=0,t})(),e.capacity=t,e},uf=()=>cf(void 0),af=t=>ef(t.queue),hf=t=>tf(t.queue),lf=r(2,((t,e)=>{const r=ef(t.queue);return(void 0===t.capacity||r!==t.capacity)&&(rf(e)(t.queue),!0)})),ff=r(2,((t,e)=>{const r=e[Symbol.iterator]();let n,s=zr(),i=!0;for(;i&&(n=r.next())&&!n.done;)i=lf(n.value)(t);for(;null!=n&&!n.done;)s=en(n.value)(s),n=r.next();return Qr(s)})),df=r(2,((t,e)=>tf(t.queue)?e:(t=>{const e=t.head;if(void 0!==e)return((t,e)=>{e.removed||(e.removed=!0,void 0!==e.prev&&void 0!==e.next?(e.prev.next=e.next,e.next.prev=e.prev):void 0!==e.prev?(t.tail=e.prev,e.prev.next=void 0):void 0!==e.next?(t.head=e.next,e.next.prev=void 0):(t.tail=void 0,t.head=void 0),t._length>0&&(t._length-=1))})(t,e),e.value})(t.queue))),bf=r(2,((t,e)=>{let r=zr(),n=0;for(;n<e;){const e=df(sf)(t);if(e===sf)break;r=en(e)(r),n+=1}return Qr(r)})),pf=Symbol.for("effect/Clock"),mf=kr("effect/Clock"),Sf={unsafeSchedule(t,e){const r=Un(e);if(r>2147483647)return o;let n=!1;const s=setTimeout((()=>{n=!0,t()}),r);return()=>(clearTimeout(s),!n)}},yf=function(){const t=BigInt(1e6);if("undefined"==typeof performance||"function"!=typeof performance.now)return()=>BigInt(Date.now())*t;let e;return()=>(void 0===e&&(e=BigInt(Date.now())*t-BigInt(Math.round(1e6*performance.now()))),e+BigInt(Math.round(1e6*performance.now())))}(),gf=function(){const t="object"==typeof process&&"hrtime"in process&&"function"==typeof process.hrtime.bigint?process.hrtime:void 0;if(!t)return yf;const e=yf()-t.bigint();return()=>e+t.bigint()}();class wf{[pf]=pf;unsafeCurrentTimeMillis(){return Date.now()}unsafeCurrentTimeNanos(){return gf()}currentTimeMillis=Na((()=>this.unsafeCurrentTimeMillis()));currentTimeNanos=Na((()=>this.unsafeCurrentTimeNanos()));scheduler(){return Ia(Sf)}sleep(t){return Qu((e=>{const r=Sf.unsafeSchedule((()=>e(Ta)),t);return Wu(Na(r))}))}}const vf=()=>new wf,_f="InvalidData",Of="MissingData",Ef="SourceUnavailable",Ff="Unsupported",kf=Symbol.for("effect/ConfigError"),Mf={_tag:"ConfigError",[kf]:kf},Cf=(t,e)=>{const r=Object.create(Mf);return r._op="And",r.left=t,r.right=e,Object.defineProperty(r,"toString",{enumerable:!1,value(){return`${this.left} and ${this.right}`}}),Object.defineProperty(r,"message",{enumerable:!1,get(){return this.toString()}}),r},If=(t,e)=>{const r=Object.create(Mf);return r._op="Or",r.left=t,r.right=e,Object.defineProperty(r,"toString",{enumerable:!1,value(){return`${this.left} or ${this.right}`}}),Object.defineProperty(r,"message",{enumerable:!1,get(){return this.toString()}}),r},jf=(t,e,r={pathDelim:"."})=>{const n=Object.create(Mf);return n._op=_f,n.path=t,n.message=e,Object.defineProperty(n,"toString",{enumerable:!1,value(){return`(Invalid data at ${a(this.path,or(r.pathDelim))}: "${this.message}")`}}),n},Nf=(t,e,r={pathDelim:"."})=>{const n=Object.create(Mf);return n._op=Of,n.path=t,n.message=e,Object.defineProperty(n,"toString",{enumerable:!1,value(){return`(Missing data at ${a(this.path,or(r.pathDelim))}: "${this.message}")`}}),n},Rf=(t,e,r,n={pathDelim:"."})=>{const s=Object.create(Mf);return s._op=Ef,s.path=t,s.message=e,s.cause=r,Object.defineProperty(s,"toString",{enumerable:!1,value(){return`(Source unavailable at ${a(this.path,or(n.pathDelim))}: "${this.message}")`}}),s},Af=(t,e,r={pathDelim:"."})=>{const n=Object.create(Mf);return n._op=Ff,n.path=t,n.message=e,Object.defineProperty(n,"toString",{enumerable:!1,value(){return`(Unsupported operation at ${a(this.path,or(r.pathDelim))}: "${this.message}")`}}),n},xf=r(2,((t,e)=>{switch(t._op){case"And":return Cf(xf(t.left,e),xf(t.right,e));case"Or":return If(xf(t.left,e),xf(t.right,e));case _f:return jf([...e,...t.path],t.message);case Of:return Nf([...e,...t.path],t.message);case Ef:return Rf([...e,...t.path],t.message,t.cause);case Ff:return Af([...e,...t.path],t.message)}})),Df={_tag:"Empty"},Tf=r(2,((t,e)=>{let r=eo(e),n=t;for(;"Cons"===r._tag;){const t=r.head;switch(t._tag){case"Empty":r=r.tail;break;case"AndThen":r=Xi(t.first,Xi(t.second,r.tail));break;case"MapName":n=Ke(n,t.f),r=r.tail;break;case"Nested":n=Fe(n,t.name),r=r.tail;break;case"Unnested":if(!a(Ae(n),ge(t.name)))return Qt(Nf(n,`Expected ${t.name} to be in path in ConfigProvider#unnested`));n=Te(n),r=r.tail}}return Gt(n)})),$f=(t,e)=>[...t,...e],Lf=Symbol.for("effect/ConfigProvider"),Pf=kr("effect/ConfigProvider"),Bf=Symbol.for("effect/ConfigProviderFlat"),qf=t=>({[Lf]:Lf,pipe(){return st(this,arguments)},...t}),Uf=t=>{const{pathDelim:e,seqDelim:r}=Object.assign({},{pathDelim:"_",seqDelim:","},t),n=()=>"undefined"!=typeof process&&"env"in process&&"object"==typeof process.env?process.env:{};return s=(t=>({[Bf]:Bf,patch:t.patch,load:(e,r,n=!0)=>t.load(e,r,n),enumerateChildren:t.enumerateChildren}))({load:(t,s,i=!0)=>{const o=(t=>a(t,or(e)))(t),c=n();return a(o in c?ce(c[o]):oe(),Ea((()=>Nf(t,`Expected ${o} to exist in the process context`))),ha((e=>Wf(e,t,s,r,i))))},enumerateChildren:t=>Na((()=>{const r=n();return(t=>{const e=Hs(Ws());for(const r of t)Ys(e,r);return Gs(e)})(Object.keys(r).map((t=>t.toUpperCase().split(e))).filter((e=>{for(let r=0;r<t.length;r++){const n=a(t,Re(r)),s=e[r];if(void 0===s||n!==s)return!1}return!0})).flatMap((e=>e.slice(t.length,t.length+1))))})),patch:Df}),qf({load:t=>ha(zf(s,[],t,!1),(e=>he(Ae(e),{onNone:()=>sa(Nf([],`Expected a single value having structure: ${t}`)),onSome:Ia}))),flattened:s});var s},zf=(t,e,r,n)=>{const s=r;switch(s._tag){case"Constant":return Ia(Ye(s.value));case"Described":return ja((()=>zf(t,e,s.config,n)));case"Fail":return sa(Nf(e,s.message));case"Fallback":return a(ja((()=>zf(t,e,s.first,n))),Ku((r=>s.condition(r)?a(zf(t,e,s.second,n),Ku((t=>sa(If(r,t))))):sa(r))));case"Lazy":return ja((()=>zf(t,e,s.config(),n)));case"MapOrFail":return ja((()=>a(zf(t,e,s.original,n),ha(ma((t=>a(s.mapOrFail(t),Ea(xf(((t,e)=>{let r=e;if("Nested"===r._tag){const e=t.slice();for(;"Nested"===r._tag;)e.push(r.name),r=r.config;return e}return t})(e,s.original))))))))));case"Nested":return ja((()=>zf(t,$f(e,Ye(s.name)),s.config,n)));case"Primitive":return a(Tf(e,t.patch),ha((e=>a(t.load(e,s,n),ha((t=>{if(0===t.length){const t=a(Ie(r=e)?ce(De(r)):oe(),fe((()=>"<n/a>")));return sa(Nf([],`Expected ${s.description} with name ${t}`))}var r;return Ia(t)}))))));case"Sequence":return a(Tf(e,t.patch),ha((r=>a(t.enumerateChildren(r),ha(Hf),ha((r=>0===r.length?ja((()=>_a(zf(t,e,s.config,!0),Ye))):a(ma(r,(r=>zf(t,ke(e,`[${r}]`),s.config,!0))),_a((t=>{const e=Ze(t);return Ye(0===e.length?[]:e)})))))))));case"HashMap":return ja((()=>a(Tf(e,t.patch),ha((e=>a(t.enumerateChildren(e),ha((r=>a(r,ma((r=>zf(t,$f(e,Ye(r)),s.valueConfig,n))),_a((t=>0===t.length?Ye(Ti()):a(Vf(t),Ke((t=>(t=>{const e=Rs(Os());for(const r of t)Cs(e,r[0],r[1]);return(r=e)._editable=!1,r;var r})(qe(Ee(r),t))))))))))))))));case"ZipWith":return ja((()=>a(zf(t,e,s.left,n),ra,ha((r=>a(zf(t,e,s.right,n),ra,ha((t=>{if(Yt(r)&&Yt(t))return sa(Cf(r.left,t.left));if(Yt(r)&&Kt(t))return sa(r.left);if(Kt(r)&&Yt(t))return sa(t.left);if(Kt(r)&&Kt(t)){const n=a(e,or(".")),i=Jf(e,n),[o,c]=((t,e,r,n)=>{const s=rr(r.length,(e=>e>=n.length?oe():ce([t(e),e+1]))),i=rr(n.length,(t=>t>=r.length?oe():ce([e(t),t+1])));return[$f(r,s),$f(n,i)]})(i,i,a(r.right,Ke(Gt)),a(t.right,Ke(Gt)));return a(o,qe(c),ma((([t,e])=>a(za(t,e),_a((([t,e])=>s.zip(t,e)))))))}throw new Error("BUG: ConfigProvider.fromFlatLoop - please report an issue at https://github.com/Effect-TS/effect/issues")}))))))))}},Jf=(t,e)=>r=>Qt(Nf(t,`The element at index ${r} in a sequence at path "${e}" was missing`)),Wf=(t,e,r,n,s)=>s?a(((t,e)=>{const r=t.split(new RegExp(`\\s*${(t=>t.replace(/[/\\^$*+?.()|[\]{}]/g,"\\$&"))(e)}\\s*`));return r})(t,n),ma((t=>r.parse(t.trim()))),Ea(xf(e))):a(r.parse(t),Oa({onFailure:xf(e),onSuccess:Ye})),Vf=t=>Object.keys(t[0]).map((e=>t.map((t=>t[e])))),Hf=t=>a(ma(t,Qf),Oa({onFailure:()=>[],onSuccess:Be(cr)}),ra,_a(Xt)),Gf=/^(\[(\d+)\])$/,Qf=t=>{const e=t.match(Gf);if(null!==e){const t=e[2];return a(void 0!==t&&t.length>0?ce(t):oe(),ye(Yf))}return oe()},Yf=t=>{const e=Number.parseInt(t);return Number.isNaN(e)?oe():ce(e)},Kf=Symbol.for("effect/Console"),Zf=kr("effect/Console"),Xf={[Kf]:Kf,assert:(t,...e)=>Na((()=>{console.assert(t,...e)})),clear:Na((()=>{console.clear()})),count:t=>Na((()=>{console.count(t)})),countReset:t=>Na((()=>{console.countReset(t)})),debug:(...t)=>Na((()=>{console.debug(...t)})),dir:(t,e)=>Na((()=>{console.dir(t,e)})),dirxml:(...t)=>Na((()=>{console.dirxml(...t)})),error:(...t)=>Na((()=>{console.error(...t)})),group:t=>Na(t?.collapsed?()=>console.groupCollapsed(t?.label):()=>console.group(t?.label)),groupEnd:Na((()=>{console.groupEnd()})),info:(...t)=>Na((()=>{console.info(...t)})),log:(...t)=>Na((()=>{console.log(...t)})),table:(t,e)=>Na((()=>{console.table(t,e)})),time:t=>Na((()=>console.time(t))),timeEnd:t=>Na((()=>console.timeEnd(t))),timeLog:(t,...e)=>Na((()=>{console.timeLog(t,...e)})),trace:(...t)=>Na((()=>{console.trace(...t)})),warn:(...t)=>Na((()=>{console.warn(...t)})),unsafe:console},td=Symbol.for("effect/Random"),ed=kr("effect/Random");class rd{seed;[td]=td;PRNG;constructor(t){this.seed=t,this.PRNG=new E(t)}get next(){return Na((()=>this.PRNG.number()))}get nextBoolean(){return _a(this.next,(t=>t>.5))}get nextInt(){return Na((()=>this.PRNG.integer(Number.MAX_SAFE_INTEGER)))}nextRange(t,e){return _a(this.next,(r=>(e-t)*r+t))}nextIntBetween(t,e){return Na((()=>this.PRNG.integer(e-t)+t))}shuffle(t){return nd(t,(t=>this.nextIntBetween(0,t)))}}const nd=(t,e)=>ja((()=>a(Na((()=>Array.from(t))),ha((t=>{const r=[];for(let e=t.length;e>=2;e-=1)r.push(e);return a(r,Sa((r=>a(e(r),_a((e=>sd(t,r-1,e)))))),Ju(Vr(t)))}))))),sd=(t,e,r)=>{const n=t[e];return t[e]=t[r],t[r]=n,t},id=t=>new rd(x(t)),od=Symbol.for("effect/Tracer"),cd=t=>({[od]:od,...t}),ud=kr("effect/Tracer"),ad=kr("effect/ParentSpan"),hd=function(){return function(t){let e="";for(let r=0;r<t;r++)e+="abcdef0123456789".charAt(Math.floor(16*Math.random()));return e}}();class ld{name;parent;context;startTime;kind;_tag="Span";spanId;traceId="native";sampled=!0;status;attributes;events=[];links;constructor(t,e,r,n,s,i){this.name=t,this.parent=e,this.context=r,this.startTime=s,this.kind=i,this.status={_tag:"Started",startTime:s},this.attributes=new Map,this.traceId="Some"===e._tag?e.value.traceId:hd(32),this.spanId=hd(16),this.links=Array.from(n)}end(t,e){this.status={_tag:"Ended",endTime:t,exit:e,startTime:this.status.startTime}}attribute(t,e){this.attributes.set(t,e)}event(t,e,r){this.events.push([t,e,r??{}])}addLinks(t){this.links.push(...t)}}const fd=cd({span:(t,e,r,n,s,i)=>new ld(t,e,r,n,s,i),context:t=>t()}),dd=a(Cr(),jr(mf,vf()),jr(Zf,Xf),jr(ed,id(Math.random())),jr(Pf,Uf()),jr(ud,fd)),bd=b(Symbol.for("effect/DefaultServices/currentServices"),(()=>hh(dd))),pd=t=>(t=>Uu((e=>t(e.currentDefaultServices))))((e=>t(e.unsafeMap.get(mf.key)))),md=pd((t=>t.currentTimeMillis)),Sd=pd,yd=Symbol.for("effect/FiberRefs");class gd{locals;[yd]=yd;constructor(t){this.locals=t}pipe(){return st(this,arguments)}}const wd=r(3,((t,e,r)=>{const n=new Map(t.locals);return r.locals.forEach(((t,r)=>{const s=t[0][1];if(!t[0][0][J](e)){if(!n.has(r)){if(W(s,r.initial))return;return void n.set(r,[[e,r.join(r.initial,s)]])}const i=n.get(r),[o,c]=((t,e,r,n=!1)=>{const s=t;let i,o=e,c=r,u=n;for(;void 0===i;)if(Ie(o)&&Ie(c)){const t=xe(o)[0],e=Te(o),r=xe(c)[0],n=xe(c)[1],s=Te(c);t.startTimeMillis<r.startTimeMillis?(c=s,u=!0):t.startTimeMillis>r.startTimeMillis?o=e:t.id<r.id?(c=s,u=!0):t.id>r.id?o=e:i=[n,u]}else i=[s.initial,!0];return i})(r,i,t);if(c){const t=r.diff(o,s),c=i[0][1],u=r.join(c,r.patch(t)(c));if(!W(c,u)){let t;const s=i[0][0];t=s[J](e)?[[s,u],...i.slice(1)]:[[e,u],...i],n.set(r,t)}}}})),new gd(n)})),vd=r(2,((t,e)=>{const r=new Map;return _d(t,r,e),new gd(r)})),_d=(t,e,r)=>{t.locals.forEach(((t,n)=>{const s=t[0][1],i=n.patch(n.fork)(s);W(s,i)?e.set(n,t):e.set(n,[[r,i],...t])}))},Od=r(2,((t,e)=>{const r=new Map(t.locals);return r.delete(e),new gd(r)})),Ed=r(2,((t,e)=>t.locals.has(e)?ce(xe(t.locals.get(e))[1]):oe())),Fd=r(2,((t,e)=>a(Ed(t,e),fe((()=>e.initial))))),kd=r(2,((t,{fiberId:e,fiberRef:r,value:n})=>{if(0===t.locals.size)return new gd(new Map([[r,[[e,n]]]]));const s=new Map(t.locals);return Md(s,e,r,n),new gd(s)})),Md=(t,e,r,n)=>{const s=t.get(r)??[];let i;if(Ie(s)){const[t,r]=xe(s);if(t[J](e)){if(W(r,n))return;i=[[e,n],...s.slice(1)]}else i=[[e,n],...s]}else i=[[e,n]];t.set(r,i)},Cd=r(2,((t,{entries:e,forkAs:r})=>{if(0===t.locals.size)return new gd(new Map(e));const n=new Map(t.locals);return void 0!==r&&_d(t,n,r),e.forEach((([t,e])=>{1===e.length?Md(n,e[0][0],t,e[0][1]):e.forEach((([e,r])=>{Md(n,e,t,r)}))})),new gd(n)})),Id=Fd,jd=Cd,Nd=function(){return t=new Map,new gd(t);var t},Rd=Qa,Ad=Ya,xd=Ka,Dd=ie(a(cr,se((t=>t.ordinal)))),Td=t=>t.replace(/[\s="]/g,"_"),$d=t=>e=>`${Td(e.label)}=${t-e.startTime}ms`,Ld=kt,Pd=jt;class Bd extends Pd{}const qd=Symbol.for("effect/Readable"),Ud=Symbol.for("effect/Ref"),zd={_A:t=>t};class Jd extends Bd{ref;commit(){return this.get}[Ud]=zd;[qd]=qd;constructor(t){super(),this.ref=t,this.get=Na((()=>pi(this.ref)))}get;modify(t){return Na((()=>{const e=pi(this.ref),[r,n]=t(e);return e!==n&&mi(n)(this.ref),r}))}}const Wd=t=>new Jd(di(t)),Vd=t=>Na((()=>Wd(t))),Hd=t=>t.get,Gd=r(2,((t,e)=>t.modify((()=>[void 0,e])))),Qd=r(2,((t,e)=>t.modify(e))),Yd=r(2,((t,e)=>t.modify((t=>[void 0,e(t)])))),Kd=Vd,Zd=Hd,Xd=Qd,tb=Yd,eb="Empty",rb="Remove",nb="Update",sb="AndThen",ib={_tag:eb},ob=(t,e)=>{const r=new Map(t.locals);let n=ib;for(const[t,s]of e.locals.entries()){const e=xe(s)[1],i=r.get(t);if(void 0!==i){const r=xe(i)[1];W(r,e)||(n=cb({_tag:nb,fiberRef:t,patch:t.diff(r,e)})(n))}else n=cb({_tag:"Add",fiberRef:t,value:e})(n);r.delete(t)}for(const[t]of r.entries())n=cb({_tag:rb,fiberRef:t})(n);return n},cb=r(2,((t,e)=>({_tag:sb,first:t,second:e}))),ub=r(3,((t,e,r)=>{let n=r,s=Ye(t);for(;Ie(s);){const t=xe(s),r=Te(s);switch(t._tag){case eb:s=r;break;case"Add":n=kd(n,{fiberId:e,fiberRef:t.fiberRef,value:t.value}),s=r;break;case rb:n=Od(n,t.fiberRef),s=r;break;case nb:{const i=Fd(n,t.fiberRef);n=kd(n,{fiberId:e,fiberRef:t.fiberRef,value:t.fiberRef.patch(t.patch)(i)}),s=r;break}case sb:s=Fe(t.first)(Fe(t.second)(r))}}return n})),ab="effect/MetricLabel",hb=Symbol.for(ab);class lb{key;value;[hb]=hb;_hash;constructor(t,e){this.key=t,this.value=e,this._hash=B(ab+this.key+this.value)}[A](){return this._hash}[J](t){return db(t)&&this.key===t.key&&this.value===t.value}pipe(){return st(this,arguments)}}const fb=(t,e)=>new lb(t,e),db=t=>y(t,hb),bb=r(2,((t,e)=>ba(t,{onFailure:t=>{const r=e(t);switch(r._tag){case"None":return oa(t);case"Some":return r.value}},onSuccess:Ia}))),pb=Sd,mb=r(2,((t,e)=>pa(t,{onFailure:t=>Ia(e.onFailure(t)),onSuccess:t=>Ia(e.onSuccess(t))}))),Sb=Uu((t=>Ia(t.getFiberRefs()))),yb=t=>(...e)=>{const r=be(t);let n;for(let t=0,r=e.length;t<r;t++){const r=e[t];Zc(r)&&(n=void 0!==n?Kc(n,r):r,e=[...e.slice(0,t),...e.slice(t+1)],t--)}return void 0===n&&(n=Vc),Uu((t=>(t.log(e,n,r),Ta)))},gb=yb(Ad),wb=yb(Rd),vb=r(2,((t,e)=>ba(t,{onFailure:t=>ca((()=>e(t))),onSuccess:Ia}))),_b=r(2,((t,e)=>Ma(t,(()=>Na(e))))),Ob=r(3,((t,e,r)=>ml((n=>Sl(t,jr(n,e,r)))))),Eb=r(3,((t,e,r)=>ml((n=>ha(r,(r=>Sl(t,a(n,jr(e,r))))))))),Fb=t=>{const e=kn(t);return pd((t=>t.sleep(e)))},kb=Ia(oe()),Mb=r(3,((t,e,r)=>ha(e,(n=>ha(t,(t=>_a(e,(e=>[r(n,e),t])))))))),Cb=r(2,((t,e)=>ba(t,{onFailure:t=>{const r=su(t);switch(r._tag){case"Left":return Wa(e(r.left),oa(t));case"Right":return oa(t)}},onSuccess:Ia}))),Ib=r(2,((t,e)=>ba(t,{onFailure:t=>Wa(e(t),oa(t)),onSuccess:Ia}))),jb=r(2,((t,e)=>ja((()=>e()?_a(t,ce):Ia(oe()))))),Nb="Sequential",Rb="Parallel",Ab={_tag:Nb},xb={_tag:Rb},Db=Ab,Tb=xb,$b=t=>({_tag:"ParallelN",parallelism:t}),Lb=ob,Pb=ub,Bb="effect/FiberStatus",qb=Symbol.for(Bb),Ub="Done",zb="Running",Jb="Suspended",Wb=B(`${Bb}-${Ub}`);let Vb=class{[qb]=qb;_tag=Ub;[A](){return Wb}[J](t){return Qb(t)&&t._tag===Ub}};class Hb{runtimeFlags;[qb]=qb;_tag=zb;constructor(t){this.runtimeFlags=t}[A](){return a(x(Bb),T(x(this._tag)),T(x(this.runtimeFlags)),z(this))}[J](t){return Qb(t)&&t._tag===zb&&this.runtimeFlags===t.runtimeFlags}}class Gb{runtimeFlags;blockingOn;[qb]=qb;_tag=Jb;constructor(t,e){this.runtimeFlags=t,this.blockingOn=e}[A](){return a(x(Bb),T(x(this._tag)),T(x(this.runtimeFlags)),T(x(this.blockingOn)),z(this))}[J](t){return Qb(t)&&t._tag===Jb&&this.runtimeFlags===t.runtimeFlags&&W(this.blockingOn,t.blockingOn)}}const Qb=t=>y(t,qb),Yb=new Vb,Kb=t=>new Hb(t),Zb=Symbol.for("effect/Micro"),Xb=Symbol.for("effect/Micro/MicroExit"),tp=Symbol.for("effect/Micro/MicroCause"),ep={_E:n};class rp extends globalThis.Error{_tag;traces;[tp];constructor(t,e,r){const n=`MicroCause.${t}`;let s,i,o;if(e instanceof globalThis.Error){s=`(${n}) ${e.name}`,i=e.message;const t=i.split("\n").length;o=e.stack?`(${n}) ${e.stack.split("\n").slice(0,t+3).join("\n")}`:`${s}: ${i}`}else s=n,i=Z(e,0),o=`${s}: ${i}`;r.length>0&&(o+=`\n ${r.join("\n ")}`),super(i),this._tag=t,this.traces=r,this[tp]=ep,this.name=s,this.stack=o}pipe(){return st(this,arguments)}toString(){return this.stack}[Q](){return this.stack}}class np extends rp{defect;constructor(t,e=[]){super("Die",t,e),this.defect=t}}class sp extends rp{constructor(t=[]){super("Interrupt","interrupted",t)}}const ip=(t=[])=>new sp(t),op=Symbol.for("effect/Micro/MicroFiber"),cp={_A:n,_E:n};class up{context;interruptible;[op];_stack=[];_observers=[];_exit;_children;currentOpCount=0;constructor(t,e=!0){this.context=t,this.interruptible=e,this[op]=cp}getRef(t){return(e=this.context).unsafeMap.has((r=t).key)?e.unsafeMap.get(r.key):vr(r);var e,r}addObserver(t){return this._exit?(t(this._exit),u):(this._observers.push(t),()=>{const e=this._observers.indexOf(t);e>=0&&this._observers.splice(e,1)})}_interrupted=!1;unsafeInterrupt(){this._exit||(this._interrupted=!0,this.interruptible&&this.evaluate(Ap))}unsafePoll(){return this._exit}evaluate(t){if(this._exit)return;if(void 0!==this._yielded){const t=this._yielded;this._yielded=void 0,t()}const e=this.runLoop(t);if(e===mp)return;const r=ap.interruptChildren&&ap.interruptChildren(this);if(void 0!==r)return this.evaluate(Cp(r,(()=>e)));this._exit=e;for(let t=0;t<this._observers.length;t++)this._observers[t](e);this._observers.length=0}runLoop(t){let e=!1,r=t;this.currentOpCount=0;try{for(;;){if(this.currentOpCount++,!e&&this.getRef(qp).shouldYield(this)){e=!0;const t=r;r=Cp(Fp,(()=>t))}if(r=r[fp](this),r===mp){const t=this._yielded;return Xb in t?(this._yielded=void 0,t):mp}}}catch(t){return y(r,fp)?xp(t):xp(`MicroFiber.runLoop: Not a valid effect: ${String(r)}`)}}getCont(t){for(;;){const e=this._stack.pop();if(!e)return;const r=e[pp]&&e[pp](this);if(r)return{[t]:r};if(e[t])return e}}_yielded=void 0;yieldWith(t){return this._yielded=t,mp}children(){return this._children??=new Set}}const ap=b("effect/Micro/fiberMiddleware",(()=>({interruptChildren:void 0}))),hp=Symbol.for("effect/Micro/identifier"),lp=Symbol.for("effect/Micro/args"),fp=Symbol.for("effect/Micro/evaluate"),dp=Symbol.for("effect/Micro/successCont"),bp=Symbol.for("effect/Micro/failureCont"),pp=Symbol.for("effect/Micro/ensureCont"),mp=Symbol.for("effect/Micro/Yield"),Sp={_A:n,_E:n,_R:n},yp={...Ld,_op:"Micro",[Zb]:Sp,pipe(){return st(this,arguments)},[Symbol.iterator](){return new O(new M(this))},toJSON(){return{_id:"Micro",op:this[hp],...lp in this?{args:this[lp]}:void 0}},toString(){return K(this)},[Q](){return K(this)}};function gp(){return xp("Micro.evaluate: Not implemented")}const wp=t=>({...yp,[hp]:t.op,[fp]:t.eval??gp,[dp]:t.contA,[bp]:t.contE,[pp]:t.ensure}),vp=t=>{const e=wp(t);return function(){const r=Object.create(e);return r[lp]=!1===t.single?arguments:arguments[0],r}},_p=t=>{const e={...wp(t),[Xb]:Xb,_tag:t.op,get[t.prop](){return this[lp]},toJSON(){return{_id:"MicroExit",_tag:t.op,[t.prop]:this[lp]}},[J](e){return jp(e)&&e._tag===t.op&&W(this[lp],e[lp])},[A](){return z(this,T(B(t.op))(x(this[lp])))}};return function(t){const r=Object.create(e);return r[lp]=t,r[dp]=void 0,r[bp]=void 0,r[pp]=void 0,r}},Op=_p({op:"Success",prop:"value",eval(t){const e=t.getCont(dp);return e?e[dp](this[lp],t):t.yieldWith(this)}}),Ep=_p({op:"Failure",prop:"cause",eval(t){let e=t.getCont(bp);for(;"Interrupt"===this[lp]._tag&&e&&t.interruptible;)e=t.getCont(bp);return e?e[bp](this[lp],t):t.yieldWith(this)}}),Fp=vp({op:"Yield",eval(t){let e=!1;return t.getRef(qp).scheduleTask((()=>{e||t.evaluate(Dp)}),this[lp]??0),t.yieldWith((()=>{e=!0}))}})(0),kp=Op(void 0),Mp=vp({op:"WithMicroFiber",eval(t){return this[lp](t)}}),Cp=r(2,((t,e)=>{const r=Object.create(Ip);return r[lp]=t,r[dp]=e,r})),Ip=wp({op:"OnSuccess",eval(t){return t._stack.push(this),this[lp]}}),jp=t=>y(t,Xb),Np=Op,Rp=Ep,Ap=Rp(ip()),xp=t=>Rp(((t,e=[])=>new np(t,e))(t)),Dp=Np(void 0),Tp="setImmediate"in globalThis?globalThis.setImmediate:t=>setTimeout(t,0);class $p{tasks=[];running=!1;scheduleTask(t,e){this.tasks.push(t),this.running||(this.running=!0,Tp(this.afterScheduled))}afterScheduled=()=>{this.running=!1,this.runTasks()};runTasks(){const t=this.tasks;this.tasks=[];for(let e=0,r=t.length;e<r;e++)t[e]()}shouldYield(t){return t.currentOpCount>=t.getRef(Bp)}flush(){for(;this.tasks.length>0;)this.runTasks()}}const Lp=r(2,((t,e)=>Mp((r=>{const n=r.context;return r.context=e(n),Jp(t,(()=>(r.context=n,kp)))})))),Pp=r(2,((t,e)=>Lp(t,xr(e))));class Bp extends(Dr()("effect/Micro/currentMaxOpsBeforeYield",{defaultValue:()=>2048})){}class qp extends(Dr()("effect/Micro/currentScheduler",{defaultValue:()=>new $p})){}const Up=r(2,((t,e)=>{const r=Object.create(zp);return r[lp]=t,r[dp]=e.onSuccess,r[bp]=e.onFailure,r})),zp=wp({op:"OnSuccessAndFailure",eval(t){return t._stack.push(this),this[lp]}}),Jp=r(2,((t,e)=>Hp((r=>Up(r(t),{onFailure:t=>Cp(e(Rp(t)),(()=>Ep(t))),onSuccess:t=>Cp(e(Np(t)),(()=>Op(t)))}))))),Wp=vp({op:"SetInterruptible",ensure(t){if(t.interruptible=this[lp],t._interrupted&&t.interruptible)return()=>Ap}}),Vp=t=>Mp((e=>e.interruptible?t:(e.interruptible=!0,e._stack.push(Wp(!1)),e._interrupted?Ap:t))),Hp=t=>Mp((e=>e.interruptible?(e.interruptible=!1,e._stack.push(Wp(!0)),t(Vp)):t(n)));class Gp{buckets=[];scheduleTask(t,e){const r=this.buckets.length;let n,s=0;for(;s<r&&this.buckets[s][0]<=e;s++)n=this.buckets[s];n&&n[0]===e?n[1].push(t):s===r?this.buckets.push([e,[t]]):this.buckets.splice(s,0,[e,[t]])}}class Qp{maxNextTickBeforeTimer;running=!1;tasks=new Gp;constructor(t){this.maxNextTickBeforeTimer=t}starveInternal(t){const e=this.tasks.buckets;this.tasks.buckets=[];for(const[t,r]of e)for(let t=0;t<r.length;t++)r[t]();0===this.tasks.buckets.length?this.running=!1:this.starve(t)}starve(t=0){t>=this.maxNextTickBeforeTimer?setTimeout((()=>this.starveInternal(0)),0):Promise.resolve(void 0).then((()=>this.starveInternal(t+1)))}shouldYield(t){return t.currentOpCount>t.getFiberRef(ph)&&t.getFiberRef(bh)}scheduleTask(t,e){this.tasks.scheduleTask(t,e),this.running||(this.running=!0,this.starve())}}const Yp=b(Symbol.for("effect/Scheduler/defaultScheduler"),(()=>new Qp(2048))),Kp=b(Symbol.for("effect/FiberRef/currentScheduler"),(()=>ch(Yp))),Zp=b(Symbol.for("effect/FiberRef/currentRequestMap"),(()=>ch(new Map))),Xp=(t,e,r,n)=>{switch(t){case void 0:return e();case"unbounded":return r();case"inherit":return rh(wh,(t=>"unbounded"===t?r():t>1?n(t):e()));default:return t>1?n(t):e()}},tm="InterruptSignal",em="Stateful",rm="Resume",nm="YieldNow",sm=t=>({_tag:tm,cause:t}),im=t=>({_tag:em,onFiber:t}),om=t=>({_tag:rm,effect:t}),cm=Symbol.for("effect/FiberScope");class um{[cm]=cm;fiberId=Ri;roots=new Set;add(t,e){this.roots.add(e),e.addObserver((()=>{this.roots.delete(e)}))}}class am{fiberId;parent;[cm]=cm;constructor(t,e){this.fiberId=t,this.parent=e}add(t,e){this.parent.tell(im((t=>{t.addChild(e),e.addObserver((()=>{t.removeChild(e)}))})))}}const hm=b(Symbol.for("effect/FiberScope/Global"),(()=>new um)),lm=Symbol.for("effect/Fiber"),fm={_E:t=>t,_A:t=>t},dm=Symbol.for("effect/Fiber"),bm=t=>Ja(fa(t.await),t.inheritAll),pm="effect/FiberCurrent",mm=Symbol.for("effect/Logger"),Sm={_Message:t=>t,_Output:t=>t},ym=t=>({[mm]:Sm,log:t,pipe(){return st(this,arguments)}}),gm=/^[^\s"=]*$/,wm=(t,e)=>({annotations:r,cause:n,date:s,fiberId:i,logLevel:o,message:c,spans:u})=>{const a=(e,r)=>`${Td(e)}=${(e=>e.match(gm)?e:t(e))(r)}`,h=(t,e)=>" "+a(t,e);let l=a("timestamp",s.toISOString());l+=h("level",o.label),l+=h("fiber",Ni(i));const f=(d=c,Array.isArray(d)?d:[d]);var d;for(let t=0;t<f.length;t++)l+=h("message",Z(f[t],e));(t=>t._tag===Lc)(n)||(l+=h("cause",wu(n,{renderErrorCause:!0})));for(const t of u)l+=" "+$d(s.getTime())(t);for(const[t,n]of r)l+=h(t,Z(n,e));return l},vm=ym(wm((t=>`"${t.replace(/\\([\s\S])|(")/g,"\\$1$2")}"`)));"object"==typeof process&&null!==process&&"object"==typeof process.stdout&&null!==process.stdout&&process;const _m="effect/MetricBoundaries",Om=Symbol.for(_m);class Em{values;[Om]=Om;constructor(t){this.values=t,this._hash=a(B(_m),T(U(this.values)))}_hash;[A](){return this._hash}[J](t){return Fm(t)&&W(this.values,t.values)}pipe(){return st(this,arguments)}}const Fm=t=>y(t,Om),km=t=>{const e=a(t,Me(Wr(Number.POSITIVE_INFINITY)),ir);return new Em(e)},Mm=t=>a(Oe(t.count-1,(e=>t.start*Math.pow(t.factor,e))),Kr,km),Cm=Symbol.for("effect/MetricKeyType"),Im="effect/MetricKeyType/Counter",jm=Symbol.for(Im),Nm=Symbol.for("effect/MetricKeyType/Frequency"),Rm=Symbol.for("effect/MetricKeyType/Gauge"),Am="effect/MetricKeyType/Histogram",xm=Symbol.for(Am),Dm=Symbol.for("effect/MetricKeyType/Summary"),Tm={_In:t=>t,_Out:t=>t};class $m{incremental;bigint;[Cm]=Tm;[jm]=jm;constructor(t,e){this.incremental=t,this.bigint=e,this._hash=B(Im)}_hash;[A](){return this._hash}[J](t){return Pm(t)}pipe(){return st(this,arguments)}}class Lm{boundaries;[Cm]=Tm;[xm]=xm;constructor(t){this.boundaries=t,this._hash=a(B(Am),T(x(this.boundaries)))}_hash;[A](){return this._hash}[J](t){return Bm(t)&&W(this.boundaries,t.boundaries)}pipe(){return st(this,arguments)}}const Pm=t=>y(t,jm),Bm=t=>y(t,xm),qm=Symbol.for("effect/MetricKey"),Um={_Type:t=>t},zm=nr(W);class Jm{name;keyType;description;tags;[qm]=Um;constructor(t,e,r,n=[]){this.name=t,this.keyType=e,this.description=r,this.tags=n,this._hash=a(B(this.name+this.description),T(x(this.keyType)),T(U(this.tags)))}_hash;[A](){return this._hash}[J](t){return Wm(t)&&this.name===t.name&&W(this.keyType,t.keyType)&&W(this.description,t.description)&&zm(this.tags,t.tags)}pipe(){return st(this,arguments)}}const Wm=t=>y(t,qm),Vm=r(2,((t,e)=>0===e.length?t:new Jm(t.name,t.keyType,t.description,Ge(t.tags,e)))),Hm=Symbol.for("effect/MetricState"),Gm="effect/MetricState/Counter",Qm=Symbol.for(Gm),Ym="effect/MetricState/Frequency",Km=Symbol.for(Ym),Zm="effect/MetricState/Gauge",Xm=Symbol.for(Zm),tS="effect/MetricState/Histogram",eS=Symbol.for(tS),rS="effect/MetricState/Summary",nS=Symbol.for(rS),sS={_A:t=>t};class iS{count;[Hm]=sS;[Qm]=Qm;constructor(t){this.count=t}[A](){return a(x(Gm),T(x(this.count)),z(this))}[J](t){return lS(t)&&this.count===t.count}pipe(){return st(this,arguments)}}const oS=nr(W);class cS{occurrences;[Hm]=sS;[Km]=Km;constructor(t){this.occurrences=t}_hash;[A](){return a(B(Ym),T(U(Ee(this.occurrences.entries()))),z(this))}[J](t){return fS(t)&&oS(Ee(this.occurrences.entries()),Ee(t.occurrences.entries()))}pipe(){return st(this,arguments)}}class uS{value;[Hm]=sS;[Xm]=Xm;constructor(t){this.value=t}[A](){return a(x(Zm),T(x(this.value)),z(this))}[J](t){return dS(t)&&this.value===t.value}pipe(){return st(this,arguments)}}class aS{buckets;count;min;max;sum;[Hm]=sS;[eS]=eS;constructor(t,e,r,n,s){this.buckets=t,this.count=e,this.min=r,this.max=n,this.sum=s}[A](){return a(x(tS),T(x(this.buckets)),T(x(this.count)),T(x(this.min)),T(x(this.max)),T(x(this.sum)),z(this))}[J](t){return bS(t)&&W(this.buckets,t.buckets)&&this.count===t.count&&this.min===t.min&&this.max===t.max&&this.sum===t.sum}pipe(){return st(this,arguments)}}class hS{error;quantiles;count;min;max;sum;[Hm]=sS;[nS]=nS;constructor(t,e,r,n,s,i){this.error=t,this.quantiles=e,this.count=r,this.min=n,this.max=s,this.sum=i}[A](){return a(x(rS),T(x(this.error)),T(x(this.quantiles)),T(x(this.count)),T(x(this.min)),T(x(this.max)),T(x(this.sum)),z(this))}[J](t){return pS(t)&&this.error===t.error&&W(this.quantiles,t.quantiles)&&this.count===t.count&&this.min===t.min&&this.max===t.max&&this.sum===t.sum}pipe(){return st(this,arguments)}}const lS=t=>y(t,Qm),fS=t=>y(t,Km),dS=t=>y(t,Xm),bS=t=>y(t,eS),pS=t=>y(t,nS),mS=Symbol.for("effect/MetricHook"),SS={_In:t=>t,_Out:t=>t},yS=t=>({[mS]:SS,pipe(){return st(this,arguments)},...t}),gS=BigInt(0),wS=(t,e,r)=>{const n=r.length;if(!Ie(e))return[];const s=e[0],i=e.slice(1),o=vS(t,n,oe(),0,s,r),c=Ye(o);return i.forEach((e=>{c.push(vS(t,n,o.value,o.consumed,e,o.rest))})),Ke(c,(t=>[t.quantile,t.value]))},vS=(t,e,r,n,s,i)=>{let o=t,c=e,u=r,a=n,h=s,l=i,f=t,d=e,b=r,p=n,m=s,S=i;for(;;){if(!Ie(l))return{quantile:h,value:oe(),consumed:a,rest:[]};if(1===h)return{quantile:h,value:ce(De(l)),consumed:a+l.length,rest:[]};const t=xe(l),e=$e(l,(e=>e===t)),r=h*c,n=o/2*r,s=a+e[0].length,i=Math.abs(s-r);if(s<r-n)f=o,d=c,b=Ae(l),p=s,m=h,S=e[1],o=f,c=d,u=b,a=p,h=m,l=S;else{if(s>r+n)return{quantile:h,value:ue(u)?ce(t):u,consumed:a,rest:l};switch(u._tag){case"None":f=o,d=c,b=Ae(l),p=s,m=h,S=e[1],o=f,c=d,u=b,a=p,h=m,l=S;continue;case"Some":if(i<Math.abs(r-u.value)){f=o,d=c,b=Ae(l),p=s,m=h,S=e[1],o=f,c=d,u=b,a=p,h=m,l=S;continue}return{quantile:h,value:ce(u.value),consumed:a,rest:l}}}}throw new Error("BUG: MetricHook.resolveQuantiles - please report an issue at https://github.com/Effect-TS/effect/issues")},_S=Symbol.for("effect/MetricPair"),OS={_Type:t=>t},ES=(t,e)=>({[_S]:OS,metricKey:t,metricState:e,pipe(){return st(this,arguments)}}),FS=Symbol.for("effect/MetricRegistry");class kS{[FS]=FS;map=Jl();snapshot(){const t=[];for(const[e,r]of this.map)t.push(ES(e,r.get()));return t}get(t){const e=a(this.map,Wl(t),pe);if(null==e){if(Pm(t.keyType))return this.getCounter(t);if(y(t.keyType,Rm))return this.getGauge(t);if(y(t.keyType,Nm))return this.getFrequency(t);if(Bm(t.keyType))return this.getHistogram(t);if((t=>y(t,Dm))(t.keyType))return this.getSummary(t);throw new Error("BUG: MetricRegistry.get - unknown MetricKeyType - please report an issue at https://github.com/Effect-TS/effect/issues")}return e}getCounter(t){let e=a(this.map,Wl(t),pe);if(null==e){const r=(t=>{let e=t.keyType.bigint?gS:0;const r=t.keyType.incremental?t.keyType.bigint?t=>t>=gS:t=>t>=0:()=>!0,n=t=>{r(t)&&(e+=t)};return yS({get:()=>new iS(e),update:n,modify:n})})(t);a(this.map,Hl(t))||a(this.map,Gl(t,r)),e=r}return e}getFrequency(t){let e=a(this.map,Wl(t),pe);if(null==e){const r=(t=>{const e=new Map;for(const r of t.keyType.preregisteredWords)e.set(r,0);const r=t=>{const r=e.get(t)??0;e.set(t,r+1)};return yS({get:()=>new cS(e),update:r,modify:r})})(t);a(this.map,Hl(t))||a(this.map,Gl(t,r)),e=r}return e}getGauge(t){let e=a(this.map,Wl(t),pe);if(null==e){const r=((t,e)=>{let r=e;return yS({get:()=>new uS(r),update:t=>{r=t},modify:t=>{r+=t}})})(0,t.keyType.bigint?BigInt(0):0);a(this.map,Hl(t))||a(this.map,Gl(t,r)),e=r}return e}getHistogram(t){let e=a(this.map,Wl(t),pe);if(null==e){const r=(t=>{const e=t.keyType.boundaries.values,r=e.length,n=new Uint32Array(r+1),s=new Float64Array(r);let i=0,o=0,c=Number.MAX_VALUE,u=Number.MIN_VALUE;a(e,Be(cr),Ke(((t,e)=>{s[e]=t})));const h=t=>{let e=0,a=r;for(;e!==a;){const r=Math.floor(e+(a-e)/2);t<=s[r]?a=r:e=r,a===e+1&&(t<=s[e]?a=e:e=a)}n[e]=n[e]+1,i+=1,o+=t,t<c&&(c=t),t>u&&(u=t)},l=()=>{const t=_e(r);let e=0;for(let i=0;i<r;i++)e+=n[i],t[i]=[s[i],e];return t};return yS({get:()=>{return t={buckets:l(),count:i,min:c,max:u,sum:o},new aS(t.buckets,t.count,t.min,t.max,t.sum);var t},update:h,modify:h})})(t);a(this.map,Hl(t))||a(this.map,Gl(t,r)),e=r}return e}getSummary(t){let e=a(this.map,Wl(t),pe);if(null==e){const r=(t=>{const{error:e,maxAge:r,maxSize:n,quantiles:s}=t.keyType,i=a(s,Be(cr)),o=_e(n);let c=0,u=0,h=0,l=0,f=0;const d=t=>{const s=[];let c=0;for(;c!==n-1;){const e=o[c];if(null!=e){const[n,i]=e,o=Tn(t-n);Hn(o,Rn)&&Vn(o,r)&&s.push(i)}c+=1}return wS(e,i,Be(s,cr))},b=(t,e)=>{n>0&&(c+=1,o[c%n]=[e,t]),l=0===u?t:Math.min(l,t),f=0===u?t:Math.max(f,t),u+=1,h+=t};return yS({get:()=>{return t={error:e,quantiles:d(Date.now()),count:u,min:l,max:f,sum:h},new hS(t.error,t.quantiles,t.count,t.min,t.max,t.sum);var t},update:([t,e])=>b(t,e),modify:([t,e])=>b(t,e)})})(t);a(this.map,Hl(t))||a(this.map,Gl(t,r)),e=r}return e}}const MS=Symbol.for("effect/Metric"),CS={_Type:t=>t,_In:t=>t,_Out:t=>t},IS=b(Symbol.for("effect/Metric/globalMetricRegistry"),(()=>new kS)),jS=function(t,e,r,n){const s=Object.assign((t=>Ra(t,(t=>TS(s,t)))),{[MS]:CS,keyType:t,unsafeUpdate:e,unsafeValue:r,unsafeModify:n,register(){return this.unsafeValue([]),this},pipe(){return st(this,arguments)}});return s},NS=(t,e)=>RS(((t,e)=>new Jm(t,(t=>new $m(t?.incremental??!1,t?.bigint??!1))(e),be(e?.description)))(t,e)),RS=t=>{let e;const r=new WeakMap,n=n=>{if(0===n.length)return void 0!==e||(e=IS.get(t)),e;let s=r.get(n);return void 0!==s||(s=IS.get(Vm(t,n)),r.set(n,s)),s};return jS(t.keyType,((t,e)=>n(e).update(t)),(t=>n(t).get()),((t,e)=>n(e).modify(t)))},AS=(t,e,r)=>RS(((t,e,r)=>new Jm(t,(t=>new Lm(t))(e),be(r)))(t,e,r)),xS=r(3,((t,e,r)=>DS(t,[fb(e,r)]))),DS=r(2,((t,e)=>jS(t.keyType,((r,n)=>t.unsafeUpdate(r,Ge(e,n))),(r=>t.unsafeValue(Ge(e,r))),((r,n)=>t.unsafeModify(r,Ge(e,n)))))),TS=r(2,((t,e)=>rh(Eh,(r=>Na((()=>t.unsafeUpdate(e,r))))))),$S=r(2,((t,e)=>rh(Zp,(r=>Na((()=>{if(r.has(t)){const n=r.get(t);n.state.completed||(n.state.completed=!0,fl(n.result,e))}})))))),LS=Symbol.for("effect/Supervisor"),PS={_T:t=>t};class BS{underlying;value0;[LS]=PS;constructor(t,e){this.underlying=t,this.value0=e}get value(){return this.value0}onStart(t,e,r,n){this.underlying.onStart(t,e,r,n)}onEnd(t,e){this.underlying.onEnd(t,e)}onEffect(t,e){this.underlying.onEffect(t,e)}onSuspend(t){this.underlying.onSuspend(t)}onResume(t){this.underlying.onResume(t)}map(t){return new BS(this,a(this.value,_a(t)))}zip(t){return new qS(this,t)}}class qS{left;right;_tag="Zip";[LS]=PS;constructor(t,e){this.left=t,this.right=e}get value(){return za(this.left.value,this.right.value)}onStart(t,e,r,n){this.left.onStart(t,e,r,n),this.right.onStart(t,e,r,n)}onEnd(t,e){this.left.onEnd(t,e),this.right.onEnd(t,e)}onEffect(t,e){this.left.onEffect(t,e),this.right.onEffect(t,e)}onSuspend(t){this.left.onSuspend(t),this.right.onSuspend(t)}onResume(t){this.left.onResume(t),this.right.onResume(t)}map(t){return new BS(this,a(this.value,_a(t)))}zip(t){return new qS(this,t)}}const US=t=>y(t,LS)&&g(t,"Zip");class zS{effect;[LS]=PS;constructor(t){this.effect=t}get value(){return this.effect}onStart(t,e,r,n){}onEnd(t,e){}onEffect(t,e){}onSuspend(t){}onResume(t){}map(t){return new BS(this,a(this.value,_a(t)))}zip(t){return new qS(this,t)}onRun(t,e){return t()}}const JS=b("effect/Supervisor/none",(()=>new zS(Ta))),WS="Empty",VS="AddSupervisor",HS="RemoveSupervisor",GS="AndThen",QS={_tag:WS},YS=(t,e)=>({_tag:GS,first:t,second:e}),KS=(t,e)=>W(t,e)?JS:US(t)?KS(t.left,e).zip(KS(t.right,e)):t,ZS=t=>W(t,JS)?ri():US(t)?a(ZS(t.left),ai(ZS(t.right))):ni(t),XS=Qo({empty:QS,patch:(t,e)=>((t,e)=>{let r=t,n=e;for(;an(n);){const t=fn(n);switch(t._tag){case WS:n=mn(n);break;case VS:r=r.zip(t.supervisor),n=mn(n);break;case HS:r=KS(r,t.supervisor),n=mn(n);break;case GS:n=en(t.first)(en(t.second)(mn(n)))}}return r})(e,Wr(t)),combine:YS,diff:(t,e)=>{if(W(t,e))return QS;const r=ZS(t),n=ZS(e),s=a(n,ui(r),hi(QS,((t,e)=>YS(t,{_tag:VS,supervisor:e})))),i=a(r,ui(n),hi(QS,((t,e)=>YS(t,{_tag:HS,supervisor:e}))));return YS(s,i)}}),ty=NS("effect_fiber_started",{incremental:!0}),ey=NS("effect_fiber_active"),ry=NS("effect_fiber_successes",{incremental:!0}),ny=NS("effect_fiber_failures",{incremental:!0}),sy=xS(AS("effect_fiber_lifetimes",Mm({start:.5,factor:2,count:35})),"time_unit","milliseconds"),iy="Continue",oy="Yield",cy={_E:t=>t,_A:t=>t},uy=t=>{throw new Error(`BUG: FiberRuntime - ${Z(t)} - please report an issue at https://github.com/Effect-TS/effect/issues`)},ay=Symbol.for("effect/internal/fiberRuntime/YieldedOp"),hy=b("effect/internal/fiberRuntime/yieldedOpChannel",(()=>({currentOp:null}))),ly={[at]:(t,e,r)=>N((()=>e.effect_instruction_i1(r))),OnStep:(t,e,r)=>Kh(Kh(r)),[ht]:(t,e,r)=>N((()=>e.effect_instruction_i2(r))),[gt]:(t,e,r)=>(t.patchRuntimeFlags(t.currentRuntimeFlags,e.patch),oc(t.currentRuntimeFlags)&&t.isInterrupted()?Hh(t.getInterruptedCause()):Kh(r)),[pt]:(t,e,r)=>(N((()=>e.effect_instruction_i2(r))),N((()=>e.effect_instruction_i0()))?(t.pushStack(e),N((()=>e.effect_instruction_i1()))):Ta),[mt]:(t,e,r)=>{for(;;){const n=N((()=>e.effect_instruction_i0.next(r)));if(n.done)return Kh(n.value);const s=C(n.value);if(!Uh(s))return t.pushStack(e),s;if("Failure"===s._tag)return s;r=s.value}}},fy={[tm]:(t,e,r,n)=>(t.processNewInterruptSignal(n.cause),oc(e)?Hh(n.cause):r),[rm]:()=>{throw new Error("It is illegal to have multiple concurrent run loops in a single fiber")},[em]:(t,e,r,n)=>(n.onFiber(t,Kb(e)),r),[nm]:(t,e,r)=>ha(Ua(),(()=>r))},dy=wt();class by extends Bd{[lm]=fm;[dm]=cy;_fiberRefs;_fiberId;_queue=new Array;_children=null;_observers=new Array;_running=!1;_stack=[];_asyncInterruptor=null;_asyncBlockingOn=null;_exitValue=null;_steps=[];_isYielding=!1;currentRuntimeFlags;currentOpCount=0;currentSupervisor;currentScheduler;currentTracer;currentSpan;currentContext;currentDefaultServices;constructor(t,e,r){if(super(),this.currentRuntimeFlags=r,this._fiberId=t,this._fiberRefs=e,lc(r)){const t=this.getFiberRef(Eh);ty.unsafeUpdate(1,t),ey.unsafeUpdate(1,t)}this.refreshRefCache()}commit(){return bm(this)}id(){return this._fiberId}resume(t){this.tell(om(t))}get status(){return this.ask(((t,e)=>e))}get runtimeFlags(){return this.ask(((t,e)=>e._tag===Ub?t.currentRuntimeFlags:e.runtimeFlags))}scope(){return new am((t=this).id(),t);var t}get children(){return this.ask((t=>Array.from(t.getChildren())))}getChildren(){return null===this._children&&(this._children=new Set),this._children}getInterruptedCause(){return this.getFiberRef(kh)}fiberRefs(){return this.ask((t=>t.getFiberRefs()))}ask(t){return ja((()=>{const e=nl(this._fiberId);return this.tell(im(((r,n)=>{fl(e,Na((()=>t(r,n))))}))),ol(e)}))}tell(t){this._queue.push(t),this._running||(this._running=!0,this.drainQueueLaterOnExecutor())}get await(){return Qu((t=>{const e=e=>t(Ia(e));return this.tell(im((t=>{null!==t._exitValue?e(this._exitValue):t.addObserver(e)}))),Na((()=>this.tell(im((t=>{t.removeObserver(e)})))))}),this.id())}get inheritAll(){return Uu(((t,e)=>{const r=t.id(),n=t.getFiberRefs(),s=e.runtimeFlags,i=this.getFiberRefs(),o=wd(n,r,i);t.setFiberRefs(o);const c=t.getFiberRef(Wy);return(t=>{const e=new Lu(bt);return e.effect_instruction_i0=t,e.effect_instruction_i1=void 0,e})(a(dc(s,c),Sc(1),Sc(16)))}))}get poll(){return Na((()=>be(this._exitValue)))}unsafePoll(){return this._exitValue}interruptAsFork(t){return Na((()=>this.tell(sm(Qc(t)))))}unsafeInterruptAsFork(t){this.tell(sm(Qc(t)))}addObserver(t){null!==this._exitValue?t(this._exitValue):this._observers.push(t)}removeObserver(t){this._observers=this._observers.filter((e=>e!==t))}getFiberRefs(){return this.setFiberRef(Wy,this.currentRuntimeFlags),this._fiberRefs}unsafeDeleteFiberRef(t){this._fiberRefs=Od(this._fiberRefs,t)}getFiberRef(t){return this._fiberRefs.locals.has(t)?this._fiberRefs.locals.get(t)[0][1]:t.initial}setFiberRef(t,e){this._fiberRefs=kd(this._fiberRefs,{fiberId:this._fiberId,fiberRef:t,value:e}),this.refreshRefCache()}refreshRefCache(){this.currentDefaultServices=this.getFiberRef(bd),this.currentTracer=this.currentDefaultServices.unsafeMap.get(ud.key),this.currentSupervisor=this.getFiberRef(Vy),this.currentScheduler=this.getFiberRef(Kp),this.currentContext=this.getFiberRef(dh),this.currentSpan=this.currentContext.unsafeMap.get(ad.key)}setFiberRefs(t){this._fiberRefs=t,this.refreshRefCache()}addChild(t){this.getChildren().add(t)}removeChild(t){this.getChildren().delete(t)}transferChildren(t){const e=this._children;if(this._children=null,null!==e&&e.size>0)for(const r of e)null===r._exitValue&&t.add(this.currentRuntimeFlags,r)}drainQueueOnCurrentThread(){let t=!0;for(;t;){let e=iy;const r=globalThis[pm];globalThis[pm]=this;try{for(;e===iy;)e=0===this._queue.length?"Done":this.evaluateMessageWhileSuspended(this._queue.splice(0,1)[0])}finally{this._running=!1,globalThis[pm]=r}this._queue.length>0&&!this._running?(this._running=!0,e===oy?(this.drainQueueLaterOnExecutor(),t=!1):t=!0):t=!1}}drainQueueLaterOnExecutor(){this.currentScheduler.scheduleTask(this.run,this.getFiberRef(bh))}drainQueueWhileRunning(t,e){let r=e;for(;this._queue.length>0;){const e=this._queue.splice(0,1)[0];r=fy[e._tag](this,t,r,e)}return r}isInterrupted(){return!((t=this.getFiberRef(kh))._tag===Lc||yu(t,!0,((t,e)=>{switch(e._tag){case Lc:return ce(t);case $c:case Pc:case Bc:return ce(!1);default:return oe()}})));var t}addInterruptedCause(t){const e=this.getFiberRef(kh);this.setFiberRef(kh,Kc(e,t))}processNewInterruptSignal(t){this.addInterruptedCause(t),this.sendInterruptSignalToAllChildren()}sendInterruptSignalToAllChildren(){if(null===this._children||0===this._children.size)return!1;let t=!1;for(const e of this._children)e.tell(sm(Qc(this.id()))),t=!0;return t}interruptAllChildren(){if(this.sendInterruptSignalToAllChildren()){const t=this._children.values();this._children=null;let e=!1;return La({while:()=>!e,body:()=>{const r=t.next();return r.done?Na((()=>{e=!0})):Wu(r.value.await)},step:()=>{}})}return null}reportExitValue(t){if(lc(this.currentRuntimeFlags)){const e=this.getFiberRef(Eh),r=this.id().startTimeMillis,n=Date.now();switch(sy.unsafeUpdate(n-r,e),ey.unsafeUpdate(-1,e),t._tag){case lt:ry.unsafeUpdate(1,e);break;case ct:ny.unsafeUpdate(1,e)}}if("Failure"===t._tag){const e=this.getFiberRef(_h);eu(t.cause)||"Some"!==e._tag||this.log("Fiber terminated with an unhandled error",t.cause,e)}}setExitValue(t){this._exitValue=t,this.reportExitValue(t);for(let e=this._observers.length-1;e>=0;e--)this._observers[e](t);this._observers=[]}getLoggers(){return this.getFiberRef(yy)}log(t,e,r){const n=ae(r)?r.value:this.getFiberRef(Sh),s=this.getFiberRef(py);if(Dd(s,n))return;const i=this.getFiberRef(yh),o=this.getFiberRef(mh),c=this.getLoggers(),u=this.getFiberRefs();if(ii(c)>0){const r=Nr(this.getFiberRef(bd),mf),s=new Date(r.unsafeCurrentTimeMillis());((t,e)=>{const r=rt.fiberRefs;rt.fiberRefs=t;try{return e()}finally{rt.fiberRefs=r}})(u,(()=>{for(const r of c)r.log({fiberId:this.id(),logLevel:n,message:t,cause:e,context:u,spans:i,annotations:o,date:s})}))}}evaluateMessageWhileSuspended(t){switch(t._tag){case nm:return oy;case tm:return this.processNewInterruptSignal(t.cause),null!==this._asyncInterruptor&&(this._asyncInterruptor(Hh(t.cause)),this._asyncInterruptor=null),iy;case rm:return this._asyncInterruptor=null,this._asyncBlockingOn=null,this.evaluateEffect(t.effect),iy;case em:return t.onFiber(this,null!==this._exitValue?Yb:new Gb(this.currentRuntimeFlags,this._asyncBlockingOn)),iy;default:return uy(t)}}evaluateEffect(t){this.currentSupervisor.onResume(this);try{let e=oc(this.currentRuntimeFlags)&&this.isInterrupted()?Hh(this.getInterruptedCause()):t;for(;null!==e;){const t=this.runLoop(e);if(t===ay){const t=hy.currentOp;hy.currentOp=null,t._op===yt?uc(this.currentRuntimeFlags,32)?(this.tell({_tag:nm}),this.tell(om(Zh)),e=null):e=Zh:t._op===it&&(e=null)}else{this.currentRuntimeFlags=a(this.currentRuntimeFlags,ic(16));const r=this.interruptAllChildren();null!==r?e=ha(r,(()=>t)):(0===this._queue.length?this.setExitValue(t):this.tell(om(t)),e=null)}}}finally{this.currentSupervisor.onSuspend(this)}}start(t){if(this._running)this.tell(om(t));else{this._running=!0;const e=globalThis[pm];globalThis[pm]=this;try{this.evaluateEffect(t)}finally{this._running=!1,globalThis[pm]=e,this._queue.length>0&&this.drainQueueLaterOnExecutor()}}}startFork(t){this.tell(om(t))}patchRuntimeFlags(t,e){const r=bc(t,e);return globalThis[pm]=this,this.currentRuntimeFlags=r,r}initiateAsync(t,e){let r=!1;const n=t=>{r||(r=!0,this.tell(om(t)))};oc(t)&&(this._asyncInterruptor=n);try{e(n)}catch(t){n(oa(Gc(t)))}}pushStack(t){this._stack.push(t),"OnStep"===t._op&&this._steps.push({refs:this.getFiberRefs(),flags:this.currentRuntimeFlags})}popStack(){const t=this._stack.pop();if(t)return"OnStep"===t._op&&this._steps.pop(),t}getNextSuccessCont(){let t=this.popStack();for(;t;){if(t._op!==ut)return t;t=this.popStack()}}getNextFailCont(){let t=this.popStack();for(;t;){if(t._op!==at&&t._op!==pt&&t._op!==mt)return t;t=this.popStack()}}[dt](t){return Na((()=>Rr(this.currentContext,t)))}Left(t){return sa(t.left)}None(t){return sa(new Ph)}Right(t){return Kh(t.right)}Some(t){return Kh(t.value)}Micro(t){return Hu((e=>{let r=e;const n=(t=>{const e=new up(qp.context(new $p));return e.evaluate(t),e})(Pp(t,this.currentContext));return n.addObserver((t=>{if("Success"===t._tag)return r(Kh(t.value));switch(t.cause._tag){case"Interrupt":return r(Hh(Qc(Ri)));case"Fail":return r(sa(t.cause.error));case"Die":return r(ta(t.cause.defect))}})),Hu((t=>{r=()=>{t(Ta)},n.unsafeInterrupt()}))}))}[ft](t){const e=N((()=>t.effect_instruction_i0())),r=this.getNextSuccessCont();return void 0!==r?(r._op in ly||uy(r),ly[r._op](this,r,e)):(hy.currentOp=Kh(e),ay)}[lt](t){const e=t,r=this.getNextSuccessCont();return void 0!==r?(r._op in ly||uy(r),ly[r._op](this,r,e.effect_instruction_i0)):(hy.currentOp=e,ay)}[ct](t){const e=t.effect_instruction_i0,r=this.getNextFailCont();if(void 0===r)return hy.currentOp=Hh(e),ay;switch(r._op){case ut:case ht:return oc(this.currentRuntimeFlags)&&this.isInterrupted()?Hh(ou(e)):N((()=>r.effect_instruction_i1(e)));case"OnStep":return oc(this.currentRuntimeFlags)&&this.isInterrupted()?Hh(ou(e)):Kh(Hh(e));case gt:return this.patchRuntimeFlags(this.currentRuntimeFlags,r.patch),oc(this.currentRuntimeFlags)&&this.isInterrupted()?Hh(Kc(e,this.getInterruptedCause())):Hh(e);default:uy(r)}}[St](t){return N((()=>t.effect_instruction_i0(this,Kb(this.currentRuntimeFlags))))}Blocked(t){const e=this.getFiberRefs(),r=this.currentRuntimeFlags;if(this._steps.length>0){const n=[],s=this._steps[this._steps.length-1];let i=this.popStack();for(;i&&"OnStep"!==i._op;)n.push(i),i=this.popStack();this.setFiberRefs(s.refs),this.currentRuntimeFlags=s.flags;const o=Lb(s.refs,e),c=dc(s.flags,r);return Kh(Du(t.effect_instruction_i0,Uu((e=>{for(;n.length>0;)e.pushStack(n.pop());return e.setFiberRefs(Pb(e.id(),e.getFiberRefs())(o)),e.currentRuntimeFlags=bc(c)(e.currentRuntimeFlags),t.effect_instruction_i1}))))}return Da((e=>ha(Ey((t=>{const e=new Lu("RunBlocked");return e.effect_instruction_i0=t,e})(t.effect_instruction_i0)),(()=>e(t.effect_instruction_i1)))))}RunBlocked(t){return Sa((t=>{let e=eo(t),r=to();for(;;){const[t,n]=io(e,[Fc(),to()],(([t,e],r)=>{const[n,s]=wc(r);return[Mc(t,n),ro(e,s)]}));if(r=vc(r,t),Zi(n))return oo(r);e=n}throw new Error("BUG: BlockedRequests.flatten - please report an issue at https://github.com/Effect-TS/effect/issues")})(t.effect_instruction_i0),(t=>_y((t=>Array.from(t.map))(t),(([t,e])=>{const r=new Map,n=[];for(const t of e){n.push(Gr(t));for(const e of t)r.set(e.request,e)}const s=n.flat();return ih(Zy(t.runAll(n),s,(()=>s.forEach((t=>{t.listeners.interrupted=!0})))),Zp,r)}),!1,!1)))}[bt](t){const e=t.effect_instruction_i0,r=this.currentRuntimeFlags,n=bc(r,e);if(oc(n)&&this.isInterrupted())return Hh(this.getInterruptedCause());if(this.patchRuntimeFlags(this.currentRuntimeFlags,e),t.effect_instruction_i1){const e=dc(n,r);return this.pushStack(new $u(e,t)),N((()=>t.effect_instruction_i1(r)))}return Zh}[at](t){return this.pushStack(t),t.effect_instruction_i0}OnStep(t){return this.pushStack(t),t.effect_instruction_i0}[ut](t){return this.pushStack(t),t.effect_instruction_i0}[ht](t){return this.pushStack(t),t.effect_instruction_i0}[it](t){return this._asyncBlockingOn=t.effect_instruction_i1,this.initiateAsync(this.currentRuntimeFlags,t.effect_instruction_i0),hy.currentOp=t,ay}[yt](t){return this._isYielding=!1,hy.currentOp=t,ay}[pt](t){const e=t.effect_instruction_i1;return(0,t.effect_instruction_i0)()?(this.pushStack(t),e()):Zh}[mt](t){return ly[mt](this,t,void 0)}[ot](t){return N((()=>t.commit()))}runLoop(t){let e=t;for(this.currentOpCount=0;;){if(2&this.currentRuntimeFlags&&this.currentSupervisor.onEffect(this,e),this._queue.length>0&&(e=this.drainQueueWhileRunning(this.currentRuntimeFlags,e)),!this._isYielding){this.currentOpCount+=1;const t=this.currentScheduler.shouldYield(this);if(!1!==t){this._isYielding=!0,this.currentOpCount=0;const r=e;e=ha(Ua({priority:t}),(()=>r))}}try{if(e=this.currentTracer.context((()=>{if(dy!==e[Tu]._V){const t=this.getFiberRef(Oh);"Some"===t._tag&&this.log(`Executing an Effect versioned ${e[Tu]._V} with a Runtime of version 3.19.14, you may want to dedupe the effect dependencies, you can use the language service plugin to detect this at compile time: https://github.com/Effect-TS/language-service`,Vc,t)}return this[e._op](e)}),this),e===ay){const t=hy.currentOp;return t._op===yt||t._op===it?ay:(hy.currentOp=null,t._op===lt||t._op===ct?t:Hh(Gc(t)))}}catch(t){e=e!==ay&&!y(e,"_op")||!(e._op in this)?ea(`Not a valid effect: ${Z(e)}`):y(t,$h)?Hh(Kc(Gc(t),Qc(Ri))):ta(t)}}}run=()=>{this.drainQueueOnCurrentThread()}}const py=b("effect/FiberRef/currentMinimumLogLevel",(()=>ch(xd))),my=b(Symbol.for("effect/Logger/defaultLogger"),(()=>{return t=vm,ym((e=>{const r=Id(e.context,bd);Nr(r,Zf).unsafe.log(t.log(e))}));var t})),Sy=b(Symbol.for("effect/Logger/tracerLogger"),(()=>ym((({annotations:t,cause:e,context:r,fiberId:n,logLevel:s,message:i})=>{const o=Ar(Fd(r,dh),ad);if("None"===o._tag||"ExternalSpan"===o.value._tag)return;const c=Rr(Fd(r,bd),mf),u={};for(const[e,r]of t)u[e]=r;u["effect.fiberId"]=xi(n),u["effect.logLevel"]=s.label,null!==e&&"Empty"!==e._tag&&(u["effect.cause"]=wu(e,{renderErrorCause:!0})),o.value.event(Z(Array.isArray(i)&&1===i.length?i[0]:i),c.unsafeCurrentTimeNanos(),u)})))),yy=b(Symbol.for("effect/FiberRef/currentLoggers"),(()=>uh(ni(my,Sy)))),gy=(t,e)=>{const[r,s]=(t=>{if(Array.isArray(t)||v(t))return[t,oe()];const e=Object.keys(t),r=e.length;return[e.map((e=>t[e])),ce((t=>{const n={};for(let s=0;s<r;s++)n[e[s]]=t[s];return n}))]})(t);return"validate"===e?.mode?((t,e,r)=>{const s=[];for(const e of t)s.push(ra(e));return ha(wy(s,n,{concurrency:r?.concurrency,batching:r?.batching,concurrentFinalizers:r?.concurrentFinalizers}),(t=>{const n=oe(),s=t.length,i=new Array(s),o=new Array(s);let c=!1;for(let e=0;e<s;e++){const r=t[e];"Left"===r._tag?(i[e]=ce(r.left),c=!0):(o[e]=r.right,i[e]=n)}return c?sa("Some"===e._tag?e.value(i):i):r?.discard?Ta:Ia("Some"===e._tag?e.value(o):o)}))})(r,s,e):"either"===e?.mode?((t,e,r)=>{const s=[];for(const e of t)s.push(ra(e));return r?.discard?wy(s,n,{concurrency:r?.concurrency,batching:r?.batching,discard:!0,concurrentFinalizers:r?.concurrentFinalizers}):_a(wy(s,n,{concurrency:r?.concurrency,batching:r?.batching,concurrentFinalizers:r?.concurrentFinalizers}),(t=>"Some"===e._tag?e.value(t):t))})(r,s,e):!0!==e?.discard&&"Some"===s._tag?_a(wy(r,n,e),s.value):wy(r,n,e)},wy=r((t=>v(t[0])),((t,e,r)=>Uu((n=>{const s=!0===r?.batching||"inherit"===r?.batching&&n.getFiberRef(vh);return r?.discard?Xp(r.concurrency,(()=>Ny(Db,r?.concurrentFinalizers)((r=>s?_y(t,((t,n)=>r(e(t,n))),!0,!1,1):Sa(t,((t,n)=>r(e(t,n))))))),(()=>Ny(Tb,r?.concurrentFinalizers)((r=>_y(t,((t,n)=>r(e(t,n))),s,!1)))),(n=>Ny($b(n),r?.concurrentFinalizers)((r=>_y(t,((t,n)=>r(e(t,n))),s,!1,n))))):Xp(r?.concurrency,(()=>Ny(Db,r?.concurrentFinalizers)((r=>s?Oy(t,1,((t,n)=>r(e(t,n))),!0):ma(t,((t,n)=>r(e(t,n))))))),(()=>Ny(Tb,r?.concurrentFinalizers)((r=>vy(t,((t,n)=>r(e(t,n))),s)))),(n=>Ny($b(n),r?.concurrentFinalizers)((r=>Oy(t,n,((t,n)=>r(e(t,n))),s)))))})))),vy=(t,e,r)=>ja((()=>{const n=Ee(t),s=new Array(n.length);return Wa(_y(n,((t,r)=>ha(e(t,r),(t=>Na((()=>s[r]=t))))),r,!1),Ia(s))})),_y=(t,e,r,n,s)=>Da((i=>(t=>Uu((e=>{const r=a(e.getFiberRef(Fh),fe((()=>e.scope())));return t(ih(Fh,ce(r)))})))((o=>Uu((c=>{let u=Array.from(t).reverse(),a=u.length;if(0===a)return Ta;let h=0,l=!1;const f=s?Math.min(u.length,s):u.length,d=new Set,b=new Array,p=new Array,m=new Array,S=new Array,y=()=>{const t=b.filter((({exit:t})=>"Failure"===t._tag)).sort(((t,e)=>t.index<e.index?-1:t.index===e.index?0:1)).map((({exit:t})=>t));return 0===t.length&&t.push(Zh),t},g=(t,e=!1)=>{const r=xa(o(t)),n=ky(r,c,c.currentRuntimeFlags,hm);return c.currentScheduler.scheduleTask((()=>{e&&n.unsafeInterruptAsFork(c.id()),n.resume(r)}),0),n},w=()=>{n||(a-=u.length,u=[]),l=!0,d.forEach((t=>{t.currentScheduler.scheduleTask((()=>{t.unsafeInterruptAsFork(c.id())}),0)}))},v=r?la:na,_=g(Qu((t=>{const n=(t,e)=>{"Blocked"===t._op?S.push(t):(b.push({index:e,exit:t}),"Failure"!==t._op||l||w())},o=()=>{if(u.length>0){const f=u.pop();let w=h++;const _=()=>{const t=u.pop();return w=h++,ha(Ua(),(()=>ha(v(i(e(t,w))),O)))},O=t=>u.length>0&&(n(t,w),u.length>0)?_():Ia(t),E=ha(v(i(e(f,w))),O),F=g(E);p.push(F),d.add(F),l&&F.currentScheduler.scheduleTask((()=>{F.unsafeInterruptAsFork(c.id())}),0),F.addObserver((e=>{let i;if(i="Failure"===e._op?e:e.effect_instruction_i0,m.push(F),d.delete(F),n(i,w),b.length===a)t(Ia(fe(Wh(y(),{parallel:!0}),(()=>Zh))));else if(S.length+b.length===a){const e=y(),n=S.map((t=>t.effect_instruction_i0)).reduce(yc);t(Ia(Du(n,_y([fe(Wh(e,{parallel:!0}),(()=>Zh)),...S.map((t=>t.effect_instruction_i1))],(t=>t),r,!0,s))))}else o()}))}};for(let t=0;t<f;t++)o()})));return Wu(Fa(fa(i(bm(_))),Qh({onFailure:t=>{w();const e=S.length+1,r=Math.min("number"==typeof s?s:S.length,S.length),n=Array.from(S);return Qu((s=>{let i=0;const o=(r,o)=>()=>{i++,i===e&&s(Kh(Hh(t))),n.length>0&&o&&c()},c=()=>{g(n.pop(),!0).addObserver(o(0,!0))};_.addObserver(o(0,!1));for(let t=0;t<r;t++)c()}))},onSuccess:()=>ma(m,(t=>t.inheritAll))})))})))))),Oy=(t,e,r,n)=>ja((()=>{const s=Ee(t),i=new Array(s.length);return Wa(_y(s,((t,e)=>_a(r(t,e),(t=>i[e]=t))),n,!1,e),Ia(i))})),Ey=t=>Cy(t,hm),Fy=(t,e,r,n=null)=>{const s=My(t,e,r,n);return s.resume(t),s},ky=(t,e,r,n=null)=>My(t,e,r,n),My=(t,e,r,n=null)=>{const s=Di(),i=e.getFiberRefs(),o=vd(i,s),c=new by(s,o,r),u=Fd(o,dh),h=c.currentSupervisor;return h.onStart(u,t,ce(e),c),c.addObserver((t=>h.onEnd(t,c))),(null!==n?n:a(e.getFiberRef(Fh),fe((()=>e.scope())))).add(r,c),c},Cy=(t,e)=>Uu(((r,n)=>Ia(Fy(t,r,n.runtimeFlags,e)))),Iy=t=>ml((e=>he(Ar(e,Ly),{onNone:()=>t,onSome:e=>{switch(e.strategy._tag){case"Parallel":return t;case"Sequential":case"ParallelN":return ha(Rh(e,Tb),(e=>zy(t,e)))}}}))),jy=t=>e=>ml((r=>he(Ar(r,Ly),{onNone:()=>e,onSome:r=>"ParallelN"===r.strategy._tag&&r.strategy.parallelism===t?e:ha(Rh(r,$b(t)),(t=>zy(e,t)))}))),Ny=(t,e)=>r=>ml((s=>he(Ar(s,Ly),{onNone:()=>r(n),onSome:s=>{if(!0!==e)return r(n);{const e="Parallel"===t._tag?Iy:"Sequential"===t._tag?Ay:jy(t.parallelism);switch(s.strategy._tag){case"Parallel":return e(r(Iy));case"Sequential":return e(r(Ay));case"ParallelN":return e(r(jy(s.strategy.parallelism)))}}}}))),Ry=t=>ha(Uy(),(e=>Fa(t(e),(t=>e.close(t))))),Ay=t=>ml((e=>he(Ar(e,Ly),{onNone:()=>t,onSome:e=>{switch(e.strategy._tag){case"Sequential":return t;case"Parallel":case"ParallelN":return ha(Rh(e,Db),(e=>zy(t,e)))}}}))),xy=r((t=>qu(t[1])),((t,e,r)=>$y(t,e,((t,e)=>[t,e]),r))),Dy=r((t=>qu(t[1])),((t,e,r)=>!0===r?.concurrent||void 0!==r?.batching&&!1!==r.batching?$y(t,e,(t=>t),r):Ja(t,e))),Ty=r((t=>qu(t[1])),((t,e,r)=>!0===r?.concurrent||void 0!==r?.batching&&!1!==r.batching?$y(t,e,((t,e)=>e),r):Wa(t,e))),$y=r((t=>qu(t[1])),((t,e,r,n)=>_a(gy([t,e],{concurrency:n?.concurrent?2:1,batching:n?.batching,concurrentFinalizers:n?.concurrentFinalizers}),(([t,e])=>r(t,e))))),Ly=kr("effect/Scope"),Py=Ly,By={[Mh]:Mh,[Ch]:Ch,pipe(){return st(this,arguments)},fork(t){return Na((()=>{const e=qy(t);if("Closed"===this.state._tag)return e.state=this.state,e;const r={};return this.state.finalizers.set(r,(t=>e.close(t))),((t,e)=>{"Open"===t.state._tag&&t.state.finalizers.set({},e)})(e,(()=>Na((()=>{"Open"===this.state._tag&&this.state.finalizers.delete(r)})))),e}))},close(t){return ja((()=>{if("Closed"===this.state._tag)return Ta;const e=Array.from(this.state.finalizers.values()).reverse();return this.state={_tag:"Closed",exit:t},0===e.length?Ta:this.strategy._tag===Nb?a(ma(e,(e=>na(e(t)))),ha((t=>a(Wh(t),Se(Jh),fe((()=>Zh)))))):(()=>this.strategy._tag===Rb)()?a(vy(e,(e=>na(e(t))),!1),ha((t=>a(Wh(t,{parallel:!0}),Se(Jh),fe((()=>Zh)))))):a(Oy(e,this.strategy.parallelism,(e=>na(e(t))),!1),ha((t=>a(Wh(t,{parallel:!0}),Se(Jh),fe((()=>Zh))))))}))},addFinalizer(t){return ja((()=>"Closed"===this.state._tag?t(this.state.exit):(this.state.finalizers.set({},t),Ta)))}},qy=(t=Ab)=>{const e=Object.create(By);return e.strategy=t,e.state={_tag:"Open",finalizers:new Map},e},Uy=(t=Ab)=>Na((()=>qy(t))),zy=r(2,((t,e)=>gl(t,xr(Ir(Ly,e))))),Jy=t=>lh(t,{differ:XS,fork:QS}),Wy=fh(hc),Vy=Jy(JS),Hy=r(3,((t,e,r)=>Qy(t,e,{onSelfWin:(t,e)=>ha(t.await,(n=>{switch(n._tag){case lt:return ha(t.inheritAll,(()=>r.onSelfDone(n,e)));case ct:return r.onSelfDone(n,e)}})),onOtherWin:(t,e)=>ha(t.await,(n=>{switch(n._tag){case lt:return ha(t.inheritAll,(()=>r.onOtherDone(n,e)));case ct:return r.onOtherDone(n,e)}}))}))),Gy=r(2,((t,e)=>aa((r=>Hy(t,e,{onSelfDone:(t,e)=>Yh(t,{onFailure:t=>a(bm(e),vb((e=>Yc(t,e)))),onSuccess:t=>a(e,Ga(r),Ju(t))}),onOtherDone:(t,e)=>Yh(t,{onFailure:t=>a(bm(e),vb((e=>Yc(e,t)))),onSuccess:t=>a(e,Ga(r),Ju(t))})}))))),Qy=r(3,((t,e,r)=>Uu(((n,s)=>{const i=s.runtimeFlags,o=di(!0),c=My(t,n,i,r.selfScope),u=My(e,n,i,r.otherScope);return Qu((n=>{c.addObserver((()=>Yy(c,u,r.onSelfWin,o,n))),u.addObserver((()=>Yy(u,c,r.onOtherWin,o,n))),c.startFork(t),u.startFork(e)}),Ai(c.id(),u.id()))})))),Yy=(t,e,r,n,s)=>{bi(!0,!1)(n)&&s(r(t,e))},Ky=r(2,((t,e)=>Da((r=>ba(r(t),{onFailure:t=>ba(e,{onFailure:e=>oa(Kc(t,e)),onSuccess:()=>oa(t)}),onSuccess:t=>Ju(e,t)}))))),Zy=(t,e,r)=>aa((n=>ha(ha(Ey(wa(t)),(t=>Qu((n=>{const s=e.map((t=>t.listeners.count)),i=()=>{s.every((t=>0===t))&&e.every((t=>"Pending"===t.result.state.current._tag||!("Done"!==t.result.state.current._tag||!Uh(t.result.state.current.effect)||"Failure"!==t.result.state.current.effect._tag||!tu(t.result.state.current.effect.cause))))&&(o.forEach((t=>t())),r?.(),n(Ha(t)))};t.addObserver((t=>{o.forEach((t=>t())),n(t)}));const o=e.map(((t,e)=>{const r=t=>{s[e]=t,i()};return t.listeners.addObserver(r),()=>t.listeners.removeObserver(r)}));return i(),Na((()=>{o.forEach((t=>t()))}))})))),(()=>ja((()=>{const t=e.flatMap((t=>t.state.completed?[]:[t]));return Sa(t,(t=>$S(t.request,(t=>Hh(Qc(t)))(n))))})))))),Xy=Hc,tg=Gc,eg=Qc,rg=Xc,ng=tu,sg=eu,ig=nu,og=su,cg=cu,ug=Symbol.for("effect/ScheduleInterval"),ag={[ug]:ug,startMillis:0,endMillis:0},hg=(t,e)=>t>e?ag:{[ug]:ug,startMillis:t,endMillis:e},lg=r(2,((t,e)=>fg(t,e)===t)),fg=r(2,((t,e)=>t.endMillis<=e.startMillis?t:e.endMillis<=t.startMillis?e:t.startMillis<e.startMillis?t:e.startMillis<t.startMillis?e:t.endMillis<=e.endMillis?t:e)),dg=r(2,((t,e)=>{const r=Math.max(t.startMillis,e.startMillis),n=Math.min(t.endMillis,e.endMillis);return hg(r,n)})),bg=ag,pg=lg,mg=dg,Sg=Symbol.for("effect/ScheduleIntervals"),yg=t=>({[Sg]:Sg,intervals:t}),gg=r(2,((t,e)=>wg(t.intervals,e.intervals,zr()))),wg=(t,e,r)=>{let n=t,s=e,i=r;for(;an(n)&&an(s);){const t=a(fn(n),mg(fn(s))),e=(o=t).startMillis>=o.endMillis?i:a(i,en(t));a(fn(n),pg(fn(s)))?n=mn(n):s=mn(s),i=e}var o;return yg(Qr(i))},vg=t=>a(t.intervals,hn,fe((()=>bg))).startMillis,_g=r(2,((t,e)=>vg(t)<vg(e))),Og=yg,Eg=gg,Fg=vg,kg=t=>a(t.intervals,hn,fe((()=>bg))).endMillis,Mg=_g,Cg="Continue",Ig="Done",jg={_tag:Ig},Ng=t=>t._tag===Cg,Rg=t=>t._tag===Ig,Ag=Ih,xg=jh,Dg=Nh,Tg=zy,$g=Rh,Lg=Uy;class Pg{permits;waiters=new Set;taken=0;constructor(t){this.permits=t}get free(){return this.permits-this.taken}take=t=>Gu((e=>{if(this.free<t){const r=()=>{this.free<t||(this.waiters.delete(r),this.taken+=t,e(Ia(t)))};return this.waiters.add(r),Na((()=>{this.waiters.delete(r)}))}return this.taken+=t,e(Ia(t))}));updateTakenUnsafe(t,e){return this.taken=e(this.taken),this.waiters.size>0&&t.getFiberRef(Kp).scheduleTask((()=>{const t=this.waiters.values();let e=t.next();for(;!1===e.done&&this.free>0;)e.value(),e=t.next()}),t.getFiberRef(bh)),Ia(this.free)}updateTaken(t){return Uu((e=>this.updateTakenUnsafe(e,t)))}resize=t=>Wu(Uu((e=>(this.permits=t,this.free<0?Ta:this.updateTakenUnsafe(e,(t=>t))))));release=t=>this.updateTaken((e=>e-t));releaseAll=this.updateTaken((()=>0));withPermits=t=>e=>Da((r=>ha(r(this.take(t)),(t=>Ky(r(e),this.release(t))))));withPermitsIfAvailable=t=>e=>Da((r=>ja((()=>this.free<t?kb:(this.taken+=t,Ky(r((t=>_a(t,ce))(e)),this.release(t)))))))}const Bg=t=>new Pg(t),qg=r(2,((t,e)=>Uu(((r,n)=>{const s=e,i=Fy(t,r,n.runtimeFlags,hm);if("Open"===s.state._tag){const t=()=>aa((t=>W(t,i.id())?Ta:Wu(Ha(i)))),e={};s.state.finalizers.set(e,t),i.addObserver((()=>{"Closed"!==s.state._tag&&s.state.finalizers.delete(e)}))}else i.unsafeInterruptAsFork(r.id());return Ia(i)})))),Ug=r(2,((t,e)=>a(na(t),Gy(na(e)),(t=>fa(t))))),zg=Symbol.for("effect/Ref/SynchronizedRef"),Jg={_A:t=>t};class Wg extends Bd{ref;withLock;[zg]=Jg;[Ud]=zd;[qd]=qd;constructor(t,e){super(),this.ref=t,this.withLock=e,this.get=Hd(this.ref)}get;commit(){return this.get}modify(t){return this.modifyEffect((e=>Ia(t(e))))}modifyEffect(t){return this.withLock(a(ha(Hd(this.ref),t),ha((([t,e])=>Ju(Gd(this.ref,e),t)))))}}const Vg=t=>{const e=Wd(t),r=Bg(1);return new Wg(e,r.withPermits(1))},Hg=Symbol.for("effect/ManagedRuntime"),Gg=t=>t.await,Qg=t=>t.inheritAll,Yg=Ha,Kg=Ga,Zg=bm,Xg=t=>function(){if(1===arguments.length){const e=arguments[0];return(r,...n)=>t(e,r,...n)}return t.apply(this,arguments)},tw=Xg(((t,e,r)=>{const n=Di(),s=[[dh,[[n,t.context]]]];r?.scheduler&&s.push([Kp,[[n,r.scheduler]]]);let i=jd(t.fiberRefs,{entries:s,forkAs:n});r?.updateRefs&&(i=r.updateRefs(i,n));const o=new by(n,i,t.runtimeFlags);let c=e;r?.scope&&(c=ha($g(r.scope,Ab),(t=>Wa(Ih(t,aa((t=>W(t,o.id())?Ta:Ga(o,t)))),Fa(e,(e=>Dg(t,e)))))));const u=o.currentSupervisor;return u!==JS&&(u.onStart(t.context,c,oe(),o),o.addObserver((t=>u.onEnd(t,o)))),hm.add(t.runtimeFlags,o),!1===r?.immediate?o.resume(c):o.start(c),o})),ew=Symbol.for("effect/Runtime/FiberFailure"),rw=Symbol.for("effect/Runtime/FiberFailure/Cause");class nw extends Error{[ew];[rw];constructor(t){const e=Cu(t)[0];super(e?.message||"An error has occurred"),this[ew]=ew,this[rw]=t,this.name=e?`(FiberFailure) ${e.name}`:"FiberFailure",e?.stack&&(this.stack=e.stack)}toJSON(){return{_id:"FiberFailure",cause:this[rw].toJSON()}}toString(){return"(FiberFailure) "+wu(this[rw],{renderErrorCause:!0})}[Q](){return this.toString()}}const sw=Xg(((t,e,r)=>iw(t,e,r).then((t=>{switch(t._tag){case lt:return t.effect_instruction_i0;case ct:throw(t=>{const e=Error.stackTraceLimit;Error.stackTraceLimit=0;const r=new nw(t);return Error.stackTraceLimit=e,r})(t.effect_instruction_i0)}})))),iw=Xg(((t,e,r)=>new Promise((n=>{const s=(t=>{const e=t;switch(e._op){case"Failure":case"Success":return e;case"Left":return Vh(e.left);case"Right":return Kh(e.right);case"Some":return Kh(e.value);case"None":return Vh(new Ph)}})(e);s&&n(s);const i=tw(t)(e);i.addObserver((t=>{n(t)})),void 0!==r?.signal&&(r.signal.aborted?i.unsafeInterruptAsFork(i.id()):r.signal.addEventListener("abort",(()=>{i.unsafeInterruptAsFork(i.id())}),{once:!0}))}))));class ow{context;runtimeFlags;fiberRefs;constructor(t,e,r){this.context=t,this.runtimeFlags=e,this.fiberRefs=r}pipe(){return st(this,arguments)}}const cw=t=>new ow(t.context,t.runtimeFlags,t.fiberRefs),uw=ac(1,32,4),aw=cw({context:Cr(),runtimeFlags:uw,fiberRefs:Nd()}),hw=tw(aw),lw=sw(aw),fw=r(2,((t,e)=>t.modifyEffect(e))),dw=Symbol.for("effect/Layer"),bw={[dw]:{_RIn:t=>t,_E:t=>t,_ROut:t=>t},pipe(){return st(this,arguments)}},pw=Symbol.for("effect/Layer/MemoMap"),mw=Dr()("effect/Layer/CurrentMemoMap",{defaultValue:()=>gw()});class Sw{ref;[pw];constructor(t){this.ref=t,this[pw]=pw}getOrElseMemoize(t,e){return a(fw(this.ref,(r=>{const n=r.get(t);if(void 0!==n){const[t,s]=n,i=a(t,ha((([t,e])=>a((t=>{return e=(e,r)=>a(t,ub(e,r)),Uu((t=>(t.setFiberRefs(e(t.id(),t.getFiberRefs())),Ta)));var e})(t),Ju(e)))),Fa(Qh({onFailure:()=>Ta,onSuccess:()=>jh(e,s)})));return Ia([i,r])}return a(Vd(0),ha((n=>a(sl(),ha((s=>a(Vd((()=>Ta)),_a((i=>{const o=Da((o=>a(Uy(),ha((c=>a(o(ha(_w(t,c,!0),(t=>{return e=t(this),Mb(e,Sb,ob);var e}))),na,ha((o=>{switch(o._tag){case ct:return a(al(s,o.effect_instruction_i0),Wa(Nh(c,o)),Wa(oa(o.effect_instruction_i0)));case lt:return a(Gd(i,(t=>a(Nh(c,t),$a(Qd(n,(t=>[1===t,t-1]))),Wu))),Wa(Yd(n,(t=>t+1))),Wa(jh(e,(e=>a(Na((()=>r.delete(t))),Wa(Hd(i)),ha((t=>t(e))))))),Wa(ll(s,o.effect_instruction_i0)),Ju(o.effect_instruction_i0[1]))}})))))))),c=[a(ol(s),Fa(Yh({onFailure:()=>Ta,onSuccess:()=>Yd(n,(t=>t+1))}))),t=>a(Hd(i),ha((e=>e(t))))];return[o,(u=t,"Fresh"===u._op_layer?r:r.set(t,c))];var u})))))))))})),fa)}}const yw=ja((()=>{return _a((t=new Map,Na((()=>Vg(t)))),(t=>new Sw(t)));var t})),gw=()=>new Sw(Vg(new Map)),ww=r(2,((t,e)=>ha(yw,(r=>vw(t,r,e))))),vw=r(3,((t,e,r)=>ha(_w(t,r),(t=>Ob(t(e),mw,e))))),_w=(t,e,r=!1)=>{const n=t;switch(n._op_layer){case"Locally":return Na((()=>t=>n.f(t.getOrElseMemoize(n.self,e))));case"ExtendScope":return Na((()=>t=>{return e=e=>t.getOrElseMemoize(n.layer,e),ha(Ly,e);var e}));case"Fold":return Na((()=>t=>a(t.getOrElseMemoize(n.layer,e),ba({onFailure:r=>t.getOrElseMemoize(n.failureK(r),e),onSuccess:r=>t.getOrElseMemoize(n.successK(r),e)}))));case"Fresh":return Na((()=>()=>a(n.layer,ww(e))));case"FromEffect":return Na(r?()=>()=>n.effect:()=>r=>r.getOrElseMemoize(t,e));case"Provide":return Na((()=>t=>a(t.getOrElseMemoize(n.first,e),ha((r=>a(t.getOrElseMemoize(n.second,e),Sl(r)))))));case"Scoped":return Na(r?()=>()=>zy(n.effect,e):()=>r=>r.getOrElseMemoize(t,e));case"Suspend":return Na((()=>t=>t.getOrElseMemoize(n.evaluate(),e)));case"ProvideMerge":return Na((()=>t=>a(t.getOrElseMemoize(n.first,e),Va(t.getOrElseMemoize(n.second,e),n.zipK))));case"ZipWith":return Ba((function*(){const t=yield*Rh(e,xb),r=yield*Rh(t,Ab),s=yield*Rh(t,Ab);return t=>a(t.getOrElseMemoize(n.first,r),$y(t.getOrElseMemoize(n.second,s),n.zipK,{concurrent:!0}))}));case"MergeAll":{const t=n.layers;return _a(Rh(e,xb),(e=>r=>{const n=new Array(t.length);return _a(_y(t,qa((function*(t,s){const i=yield*Rh(e,Ab),o=yield*r.getOrElseMemoize(t,i);n[s]=o})),!1,!1),(()=>((...t)=>{const e=new Map;for(let r=0;r<t.length;r++)t[r].unsafeMap.forEach(((t,r)=>{e.set(r,t)}));return pr(e)})(...n)))}))}}},Ow=r(2,((t,e)=>Ry((r=>ha(ww(e,r),(e=>yl(t,e))))))),Ew=r(2,((t,e)=>{const r=Lb(aw.fiberRefs,e.fiberRefs),n=dc(aw.runtimeFlags,e.runtimeFlags);return Da((s=>Uu((i=>{const o=i.getFiberRef(dh),c=i.getFiberRefs(),u=Pb(i.id(),c)(r),a=i.currentRuntimeFlags,h=bc(n)(a),l=Lb(u,c),f=dc(h,a);return i.setFiberRefs(u),i.currentRuntimeFlags=h,Ky(yl(s(t),xr(o,e.context)),Uu((t=>(t.setFiberRefs(Pb(t.id(),t.getFiberRefs())(l)),t.currentRuntimeFlags=bc(f)(t.currentRuntimeFlags),Ta))))}))))})),Fw=r(2,((t,e)=>Array.isArray(e)?Ow(t,((...t)=>{const e=Object.create(bw);return e._op_layer="MergeAll",e.layers=t,e})(...e)):y(e,dw)?Ow(t,e):Mr(e)?yl(t,e):Hg in e?ha(e.runtimeEffect,(e=>Ew(t,e))):Ew(t,e))),kw=Symbol.for("effect/Schedule"),Mw=Symbol.for("effect/ScheduleDriver"),Cw={start:0,now:0,input:void 0,output:void 0,elapsed:Rn,elapsedSincePrevious:Rn,recurrence:0},Iw=Dr()("effect/Schedule/CurrentIterationMetadata",{defaultValue:()=>Cw}),jw={_Out:t=>t,_In:t=>t,_R:t=>t},Nw={_Out:t=>t,_In:t=>t,_R:t=>t};class Rw{initial;step;[kw]=jw;constructor(t,e){this.initial=t,this.step=e}pipe(){return st(this,arguments)}}const Aw=(t,e,r,n)=>Yd(t,(t=>0===t.recurrence?{now:e,input:r,output:n,recurrence:t.recurrence+1,elapsed:Rn,elapsedSincePrevious:Rn,start:e}:{now:e,input:r,output:n,recurrence:t.recurrence+1,elapsed:Tn(e-t.start),elapsedSincePrevious:Tn(e-t.now),start:t.start}));class xw{schedule;ref;[Mw]=Nw;constructor(t,e){this.schedule=t,this.ref=e}get state(){return _a(Hd(this.ref),(t=>t[1]))}get last(){return ha(Hd(this.ref),(([t,e])=>{switch(t._tag){case"None":return ia((()=>new Ph));case"Some":return Ia(t.value)}}))}iterationMeta=Wd(Cw);get reset(){return Gd(this.ref,[oe(),this.schedule.initial]).pipe(Ja(Gd(this.iterationMeta,Cw)))}next(t){return a(_a(Hd(this.ref),(t=>t[1])),ha((e=>a(md,ha((r=>a(ja((()=>this.schedule.step(r,t,e))),ha((([e,n,s])=>{const i=Gd(this.ref,[ce(n),e]);if(Rg(s))return i.pipe(Wa(sa(oe())));const o=Fg(s.intervals)-r;if(o<=0)return i.pipe(Wa(Aw(this.iterationMeta,r,t,n)),Ju(n));const c=Tn(o);return a(i,Wa(Aw(this.iterationMeta,r,t,n)),Wa(Fb(c)),Ju(n))})))))))))}}const Dw=(t,e)=>new Rw(t,e),Tw=r(2,((t,e)=>$w(t,((t,r)=>Na((()=>e(t,r))))))),$w=r(2,((t,e)=>Dw(t.initial,((r,n,s)=>ha(t.step(r,n,s),(([t,r,s])=>Rg(s)?Ia([t,r,jg]):_a(e(n,r),(e=>e?[t,r,s]:[t,r,jg])))))))),Lw=r(2,((t,e)=>Pw(t,e,Eg))),Pw=r(3,((t,e,r)=>Dw([t.initial,e.initial],((n,s,i)=>a(Va(t.step(n,s,i[0]),e.step(n,s,i[1]),((t,e)=>[t,e])),ha((([[n,i,o],[c,u,a]])=>Ng(o)&&Ng(a)?Bw(t,e,s,n,i,o.intervals,c,u,a.intervals,r):Ia([[n,c],[i,u],jg])))))))),Bw=(t,e,r,n,s,i,o,c,u,h)=>{const l=h(i,u);return(t=>an(t.intervals))(l)?Ia([[n,o],[s,c],(f=l,{_tag:Cg,intervals:f})]):a(i,Mg(u))?ha(t.step(kg(i),r,n),(([n,s,i])=>Rg(i)?Ia([[n,o],[s,c],jg]):Bw(t,e,r,n,s,i.intervals,o,c,u,h))):ha(e.step(kg(u),r,o),(([o,c,u])=>Rg(u)?Ia([[n,o],[s,c],jg]):Bw(t,e,r,n,s,i,o,c,u.intervals,h)));var f},qw=r(2,((t,e)=>Uw(t,(t=>Na((()=>e(t))))))),Uw=r(2,((t,e)=>Dw(t.initial,((r,n,s)=>ha(t.step(r,n,s),(([t,r,n])=>_a(e(r),(e=>[t,e,n])))))))),zw=(t,e)=>Dw(t,((t,r,n)=>Na((()=>{return[e(n),n,(s=t,r=hg(s,Number.POSITIVE_INFINITY),{_tag:Cg,intervals:Og(Wr(r))})];var r,s})))),Jw=r(2,((t,e)=>$w(t,(t=>(t=>_a(t,(t=>!t)))(e(t)))))),Ww=r(2,((t,e)=>$w(t,(t=>e(t))))),Vw=r(2,((t,e)=>Tw(t,((t,r)=>e(r))))),Hw=Symbol.for("effect/Schedule/ScheduleDefect");class Gw{error;[Hw];constructor(t){this.error=t,this[Hw]=Hw}}const Qw=t=>Ku(t,(t=>ta(new Gw(t)))),Yw=r(2,((t,e)=>Zw(t,e,(t=>sa(t))))),Kw=r(2,((t,e)=>{if(y(e,kw))return Yw(t,e);const r=e.schedule??(t=>Dw(t.initial,((e,r,n)=>a(t.step(e,r,n),_a((([t,e,n])=>[t,r,n]))))))(tv),n=e.while?Ww(r,(t=>{const r=e.while(t);return"boolean"==typeof r?Ia(r):Qw(r)})):r,s=e.until?Jw(n,(t=>{const r=e.until(t);return"boolean"==typeof r?Ia(r):Qw(r)})):n,i=e.times?Lw(s,(o=e.times,Vw(tv,(t=>t<o)))).pipe(qw((t=>t[0]))):s;var o,c;return c=Yw(t,i),Yu(c,(t=>oa((t=>he(fu(t,(t=>Xc(t)&&y(t.defect,Hw)?ce(t.defect):oe())),{onNone:()=>t,onSome:t=>Hc(t.error)}))(t))))})),Zw=r(3,((t,e,r)=>ha((t=>a(Vd([oe(),t.initial]),_a((e=>new xw(t,e)))))(e),(e=>pa(t,{onFailure:t=>r(t,oe()),onSuccess:n=>Xw(Eb(t,Iw,Hd(e.iterationMeta)),e,((t,n)=>Eb(r(t,n),Iw,Hd(e.iterationMeta))),n)}))))),Xw=(t,e,r,s)=>pa(e.next(s),{onFailure:()=>(t=>Ca(t,n))(e.last),onSuccess:n=>pa(t,{onFailure:t=>r(t,ce(n)),onSuccess:n=>Xw(t,e,r,n)})}),tv=zw(0,(t=>t+1)),ev=qu,rv=gy,nv=wy,sv=Qu,iv=Uu,ov=sa,cv=oa,uv=ea,av=Ba,hv=Ia,lv=ja,fv=Na,dv=Ta,bv=Ku,pv=Yu,mv=bb,Sv=t=>{let e,r;return"function"==typeof t?e=t:(e=t.try,r=t.catch),ja((()=>{try{return Ia(N(e))}catch(t){return sa(r?N((()=>r(t))):new qh(t,"An unknown error occurred in Effect.try"))}}))},yv=t=>{let e,r;"function"==typeof t?e=t:(e=t.try,r=t.catch);const n=t=>r?ia((()=>r(t))):sa(new qh(t,"An unknown error occurred in Effect.tryPromise"));return Qu(e.length>=1?(t,r)=>{try{e(r).then((e=>t(Ia(e))),(e=>t(n(e))))}catch(e){t(n(e))}}:t=>{try{e().then((e=>t(Ia(e))),(e=>t(n(e))))}catch(e){t(n(e))}})},gv=ya,wv=wa,vv=xa,_v=Da,Ov=Ju,Ev=Wu,Fv=_a,kv=Ea,Mv=zu,Cv=Ky,Iv=Py,jv=Ry,Nv=aa,Rv=Ey,Av=qg,xv=Fw,Dv=na,Tv=va,$v=jb,Lv=ha,Pv=fa,Bv=Gy,qv=Ug,Uv=Hy,zv=Ra,Jv=Cb,Wv=Ib,Vv=t=>{const e=ha(ha(t,(()=>Ua())),(()=>e));return e},Hv=Kw,Gv=mb,Qv=da,Yv=ba,Kv=gb,Zv=wb,Xv=_b,t_=t=>Na((()=>Bg(t))),e_=hw,r_=lw,n_=xy,s_=Dy,i_=Ty,o_=$y,c_=Symbol.for("effect/QueueEnqueue"),u_=Symbol.for("effect/QueueDequeue"),a_=Symbol.for("effect/QueueStrategy"),h_=Symbol.for("effect/BackingQueue"),l_={_A:t=>t},f_={_A:t=>t},d_={_In:t=>t},b_={_Out:t=>t};class p_ extends Bd{queue;takers;shutdownHook;shutdownFlag;strategy;[c_]=d_;[u_]=b_;constructor(t,e,r,n,s){super(),this.queue=t,this.takers=e,this.shutdownHook=r,this.shutdownFlag=n,this.strategy=s}pipe(){return st(this,arguments)}commit(){return this.take}capacity(){return this.queue.capacity()}get size(){return ja((()=>Ku(this.unsafeSize(),(()=>ya))))}unsafeSize(){return pi(this.shutdownFlag)?oe():ce(this.queue.length()-af(this.takers)+this.strategy.surplusSize())}get isEmpty(){return _a(this.size,(t=>t<=0))}get isFull(){return _a(this.size,(t=>t>=this.capacity()))}get shutdown(){return xa(Uu((t=>(a(this.shutdownFlag,mi(!0)),a(_y(C_(this.takers),(e=>hl(e,t.id())),!1,!1),Wa(this.strategy.shutdown),$a(ll(this.shutdownHook,void 0)),Wu)))))}get isShutdown(){return Na((()=>pi(this.shutdownFlag)))}get awaitShutdown(){return ol(this.shutdownHook)}isActive(){return!pi(this.shutdownFlag)}unsafeOffer(t){if(pi(this.shutdownFlag))return!1;let e;if(0===this.queue.length()){const r=a(this.takers,df(sf));r!==sf?(k_(r,t),e=!0):e=!1}else e=!1;if(e)return!0;const r=this.queue.offer(t);return N_(this.strategy,this.queue,this.takers),r}offer(t){return ja((()=>{if(pi(this.shutdownFlag))return ya;let e;if(0===this.queue.length()){const r=a(this.takers,df(sf));r!==sf?(k_(r,t),e=!0):e=!1}else e=!1;if(e)return Ia(!0);const r=this.queue.offer(t);return N_(this.strategy,this.queue,this.takers),r?Ia(!0):this.strategy.handleSurplus([t],this.queue,this.takers,this.shutdownFlag)}))}offerAll(t){return ja((()=>{if(pi(this.shutdownFlag))return ya;const e=Ee(t),r=0===this.queue.length()?Ee(I_(this.takers,e.length)):Qe,[n,s]=a(e,Je(r.length));for(let t=0;t<r.length;t++)k_(r[t],n[t]);if(0===s.length)return Ia(!0);const i=this.queue.offerAll(s);return N_(this.strategy,this.queue,this.takers),un(i)?Ia(!0):this.strategy.handleSurplus(i,this.queue,this.takers,this.shutdownFlag)}))}get take(){return Uu((t=>{if(pi(this.shutdownFlag))return ya;const e=this.queue.poll(sf);if(e!==sf)return this.strategy.unsafeOnQueueEmptySpace(this.queue,this.takers),Ia(e);{const e=nl(t.id());return a(ja((()=>(a(this.takers,lf(e)),N_(this.strategy,this.queue,this.takers),pi(this.shutdownFlag)?ya:ol(e)))),ka((()=>Na((()=>j_(this.takers,e))))))}}))}get takeAll(){return ja((()=>pi(this.shutdownFlag)?ya:Na((()=>{const t=this.queue.pollUpTo(Number.POSITIVE_INFINITY);return this.strategy.unsafeOnQueueEmptySpace(this.queue,this.takers),Vr(t)}))))}takeUpTo(t){return ja((()=>pi(this.shutdownFlag)?ya:Na((()=>{const e=this.queue.pollUpTo(t);return this.strategy.unsafeOnQueueEmptySpace(this.queue,this.takers),Vr(e)}))))}takeBetween(t,e){return ja((()=>m_(this,t,e,zr())))}}const m_=(t,e,r,n)=>r<e?Ia(n):a(__(t,r),ha((s=>{const i=e-s.length;return 1===i?a(v_(t),_a((t=>a(n,sn(s),tn(t))))):i>1?a(v_(t),ha((e=>m_(t,i-1,r-s.length-1,a(n,sn(s),tn(e)))))):Ia(a(n,sn(s)))}))),S_=(t,e)=>a(sl(),_a((r=>((t,e,r,n,s)=>new p_(t,e,r,n,s))(t,uf(),r,di(!1),e))));class y_{mutable;[h_]=f_;constructor(t){this.mutable=t}poll(t){return df(this.mutable,t)}pollUpTo(t){return bf(this.mutable,t)}offerAll(t){return ff(this.mutable,t)}offer(t){return lf(this.mutable,t)}capacity(){return void 0===(t=this.mutable).capacity?1/0:t.capacity;var t}length(){return af(this.mutable)}}const g_=t=>new y_(t),w_=r(2,((t,e)=>t.offer(e))),v_=t=>t.take,__=r(2,((t,e)=>t.takeUpTo(e))),O_=r(3,((t,e,r)=>t.takeBetween(e,r)));class E_{[a_]=l_;putters=uf();surplusSize(){return af(this.putters)}onCompleteTakersWithEmptyQueue(t){for(;!hf(this.putters)&&!hf(t);){const e=df(t,void 0),r=df(this.putters,void 0);r[2]&&k_(r[1],!0),k_(e,r[0])}}get shutdown(){return a(ua,ha((t=>a(Na((()=>C_(this.putters))),ha((e=>_y(e,(([e,r,n])=>n?a(hl(r,t),Wu):Ta),!1,!1)))))))}handleSurplus(t,e,r,n){return Uu((s=>{const i=nl(s.id());return a(ja((()=>(this.unsafeOffer(t,i),this.unsafeOnQueueEmptySpace(e,r),N_(this,e,r),pi(n)?ya:ol(i)))),ka((()=>Na((()=>this.unsafeRemove(i))))))}))}unsafeOnQueueEmptySpace(t,e){let r=!0;for(;r&&(t.capacity()===Number.POSITIVE_INFINITY||t.length()<t.capacity());){const n=a(this.putters,df(sf));if(n===sf)r=!1;else{const r=t.offer(n[0]);r&&n[2]?k_(n[1],!0):r||M_(this.putters,a(C_(this.putters),en(n))),N_(this,t,e)}}}unsafeOffer(t,e){const r=Ee(t);for(let t=0;t<r.length;t++){const n=r[t];a(this.putters,lf(t===r.length-1?[n,e,!0]:[n,e,!1]))}}unsafeRemove(t){M_(this.putters,a(C_(this.putters),cn((([,e])=>e!==t))))}}class F_{[a_]=l_;surplusSize(){return 0}get shutdown(){return Ta}onCompleteTakersWithEmptyQueue(){}handleSurplus(t,e,r,n){return Ia(!1)}unsafeOnQueueEmptySpace(t,e){}}const k_=(t,e)=>fl(t,Ia(e)),M_=(t,e)=>a(t,ff(e)),C_=t=>a(t,bf(Number.POSITIVE_INFINITY)),I_=(t,e)=>a(t,bf(e)),j_=(t,e)=>{M_(t,a(C_(t),cn((t=>e!==t))))},N_=(t,e,r)=>{let n=!0;for(;n&&0!==e.length();){const s=a(r,df(sf));if(s!==sf){const i=e.poll(sf);i!==sf?(k_(s,i),t.unsafeOnQueueEmptySpace(e,r)):M_(r,a(C_(r),en(s))),n=!0}else n=!1}n&&0===e.length()&&!hf(r)&&t.onCompleteTakersWithEmptyQueue(r)},R_=t=>a(Na((()=>cf(t))),ha((t=>S_(g_(t),new E_)))),A_=()=>a(Na((()=>uf())),ha((t=>S_(g_(t),new F_)))),x_=t=>t.shutdown,D_=w_,T_=v_,$_=O_,L_="Continue",P_=Symbol.for("effect/ChannelChildExecutorDecision"),B_={[P_]:P_},q_=()=>{const t=Object.create(B_);return t._tag=L_,t},U_="ContinuationK",z_=Symbol.for("effect/ChannelContinuation"),J_={_Env:t=>t,_InErr:t=>t,_InElem:t=>t,_InDone:t=>t,_OutErr:t=>t,_OutDone:t=>t,_OutErr2:t=>t,_OutElem:t=>t,_OutDone2:t=>t};class W_{onSuccess;onHalt;_tag=U_;[z_]=J_;constructor(t,e){this.onSuccess=t,this.onHalt=e}onExit(t){return Il(t)?this.onHalt(t.cause):this.onSuccess(t.value)}}class V_{finalizer;_tag="ContinuationFinalizer";[z_]=J_;constructor(t){this.finalizer=t}}const H_="PullAfterNext",G_=Symbol.for("effect/ChannelUpstreamPullStrategy"),Q_={[G_]:{_A:t=>t}},Y_=t=>{const e=Object.create(Q_);return e._tag=H_,e.emitSeparator=t,e},K_="BracketOut",Z_="Bridge",X_="ConcatAll",tO="Emit",eO="Ensuring",rO="Fail",nO="Fold",sO="FromEffect",iO="PipeTo",oO="Read",cO="Succeed",uO="SucceedNow",aO="Suspend",hO=Symbol.for("effect/Channel"),lO={[hO]:{_Env:t=>t,_InErr:t=>t,_InElem:t=>t,_InDone:t=>t,_OutErr:t=>t,_OutElem:t=>t,_OutDone:t=>t},pipe(){return st(this,arguments)}},fO=t=>y(t,hO)||ev(t),dO=r(2,((t,e)=>{const r=Object.create(lO);return r._tag=K_,r.acquire=()=>t,r.finalizer=e,r})),bO=(t,e,r)=>{const s=Object.create(lO);return s._tag=X_,s.combineInners=e,s.combineAll=r,s.onPull=()=>Y_(oe()),s.onEmit=()=>q_,s.value=()=>t,s.k=n,s},pO=r(4,((t,e,r,n)=>{const s=Object.create(lO);return s._tag=X_,s.combineInners=r,s.combineAll=n,s.onPull=()=>Y_(oe()),s.onEmit=()=>q_,s.value=()=>t,s.k=e,s})),mO=r(2,((t,e)=>{const r=Object.create(lO);return r._tag=Z_,r.input=e,r.channel=t,r})),SO=r(2,((t,e)=>{const r=Object.create(lO);return r._tag=eO,r.channel=t,r.finalizer=e,r})),yO=t=>gO(Xy(t)),gO=t=>wO((()=>t)),wO=t=>{const e=Object.create(lO);return e._tag=rO,e.error=t,e},vO=r(2,((t,e)=>{const r=Object.create(lO);return r._tag=nO,r.channel=t,r.k=new W_(e,gO),r})),_O=t=>{const e=Object.create(lO);return e._tag=sO,e.effect=()=>t,e},OO=r(2,((t,e)=>{const r=Object.create(lO);return r._tag=iO,r.left=()=>t,r.right=()=>e,r})),EO=t=>FO({onInput:t.onInput,onFailure:e=>Zt(og(e),{onLeft:t.onFailure,onRight:gO}),onDone:t.onDone}),FO=t=>{const e=Object.create(lO);return e._tag=oO,e.more=t.onInput,e.done=new W_(t.onDone,t.onFailure),e},kO=t=>IO((()=>t)),MO=t=>{const e=Object.create(lO);return e._tag=uO,e.terminal=t,e},CO=t=>{const e=Object.create(lO);return e._tag=aO,e.channel=t,e},IO=t=>{const e=Object.create(lO);return e._tag=cO,e.evaluate=t,e},jO=MO(void 0),NO=t=>{const e=Object.create(lO);return e._tag=tO,e.out=t,e},RO="Done",AO="Emit",xO="FromEffect",DO="Read",TO=Symbol.for("effect/ChannelState"),$O={[TO]:{_E:t=>t,_R:t=>t}},LO=()=>{const t=Object.create($O);return t._tag=RO,t},PO=()=>{const t=Object.create($O);return t._tag=AO,t},BO=t=>{const e=Object.create($O);return e._tag=xO,e.effect=t,e},qO=(t,e,r,n)=>{const s=Object.create($O);return s._tag=DO,s.upstream=t,s.onEffect=e,s.onEmit=r,s.onDone=n,s},UO=t=>t._tag===xO,zO=t=>UO(t)?(t=>mb(t,{onFailure:u,onSuccess:u}))(t.effect):void 0,JO="PullFromChild",WO="PullFromUpstream",VO="DrainChildExecutors",HO="Emit";class GO{childExecutor;parentSubexecutor;onEmit;_tag=JO;constructor(t,e,r){this.childExecutor=t,this.parentSubexecutor=e,this.onEmit=r}close(t){const e=this.childExecutor.close(t),r=this.parentSubexecutor.close(t);return void 0!==e&&void 0!==r?o_(Dv(e),Dv(r),((t,e)=>a(t,Pl(e)))):void 0!==e?e:void 0!==r?r:void 0}enqueuePullFromChild(t){return this}}class QO{upstreamExecutor;createChild;lastDone;activeChildExecutors;combineChildResults;combineWithChildResult;onPull;onEmit;_tag=WO;constructor(t,e,r,n,s,i,o,c){this.upstreamExecutor=t,this.createChild=e,this.lastDone=r,this.activeChildExecutors=n,this.combineChildResults=s,this.combineWithChildResult=i,this.onPull=o,this.onEmit=c}close(t){const e=this.upstreamExecutor.close(t);return[...this.activeChildExecutors.map((e=>void 0!==e?e.childExecutor.close(t):void 0)),e].reduce(((t,e)=>void 0!==t&&void 0!==e?o_(t,Dv(e),((t,e)=>Pl(t,e))):void 0!==t?t:void 0!==e?Dv(e):void 0),void 0)}enqueuePullFromChild(t){return new QO(this.upstreamExecutor,this.createChild,this.lastDone,[...this.activeChildExecutors,t],this.combineChildResults,this.combineWithChildResult,this.onPull,this.onEmit)}}class YO{upstreamExecutor;lastDone;activeChildExecutors;upstreamDone;combineChildResults;combineWithChildResult;onPull;_tag=VO;constructor(t,e,r,n,s,i,o){this.upstreamExecutor=t,this.lastDone=e,this.activeChildExecutors=r,this.upstreamDone=n,this.combineChildResults=s,this.combineWithChildResult=i,this.onPull=o}close(t){const e=this.upstreamExecutor.close(t);return[...this.activeChildExecutors.map((e=>void 0!==e?e.childExecutor.close(t):void 0)),e].reduce(((t,e)=>void 0!==t&&void 0!==e?o_(t,Dv(e),((t,e)=>Pl(t,e))):void 0!==t?t:void 0!==e?Dv(e):void 0),void 0)}enqueuePullFromChild(t){return new YO(this.upstreamExecutor,this.lastDone,[...this.activeChildExecutors,t],this.upstreamDone,this.combineChildResults,this.combineWithChildResult,this.onPull)}}class KO{value;next;_tag=HO;constructor(t,e){this.value=t,this.next=e}close(t){return this.next.close(t)}enqueuePullFromChild(t){return this}}const ZO=Symbol.for("effect/ChannelUpstreamPullRequest"),XO={[ZO]:{_A:t=>t}},tE=t=>{const e=Object.create(XO);return e._tag="Pulled",e.value=t,e};class eE{_activeSubexecutor=void 0;_cancelled=void 0;_closeLastSubstream=void 0;_currentChannel;_done=void 0;_doneStack=[];_emitted=void 0;_executeCloseLastSubstream;_input=void 0;_inProgressFinalizer=void 0;_providedEnv;constructor(t,e,r){this._currentChannel=t,this._executeCloseLastSubstream=r,this._providedEnv=e}run(){let t;for(;void 0===t;)if(void 0!==this._cancelled)t=this.processCancellation();else if(void 0!==this._activeSubexecutor)t=this.runSubexecutor();else try{if(void 0===this._currentChannel)t=LO();else switch(ev(this._currentChannel)&&(this._currentChannel=_O(this._currentChannel)),this._currentChannel._tag){case K_:t=this.runBracketOut(this._currentChannel);break;case Z_:{const e=this._currentChannel.input;if(this._currentChannel=this._currentChannel.channel,void 0!==this._input){const r=this._input;this._input=void 0;const n=()=>Lv(e.awaitRead(),(()=>lv((()=>{const t=r.run();switch(t._tag){case RO:return Dl(r.getDone(),{onFailure:t=>e.error(t),onSuccess:t=>e.done(t)});case AO:return Lv(e.emit(r.getEmit()),(()=>n()));case xO:return Yv(t.effect,{onFailure:t=>e.error(t),onSuccess:()=>n()});case DO:return sE(t,(()=>n()),(t=>e.error(t)))}}))));t=BO(Lv(Rv(wv(n())),(t=>fv((()=>this.addFinalizer((e=>Lv(Yg(t),(()=>lv((()=>{const t=this.restorePipe(e,r);return void 0!==t?t:dv})))))))))))}break}case X_:{const t=new eE(this._currentChannel.value(),this._providedEnv,(t=>fv((()=>{this._closeLastSubstream=a(void 0===this._closeLastSubstream?dv:this._closeLastSubstream,i_(t))}))));t._input=this._input;const e=this._currentChannel;this._activeSubexecutor=new QO(t,(t=>e.k(t)),void 0,[],((t,r)=>e.combineInners(t,r)),((t,r)=>e.combineAll(t,r)),(t=>e.onPull(t)),(t=>e.onEmit(t))),this._closeLastSubstream=void 0,this._currentChannel=void 0;break}case tO:this._emitted=this._currentChannel.out,this._currentChannel=void 0!==this._activeSubexecutor?void 0:jO,t=PO();break;case eO:this.runEnsuring(this._currentChannel);break;case rO:t=this.doneHalt(this._currentChannel.error());break;case nO:this._doneStack.push(this._currentChannel.k),this._currentChannel=this._currentChannel.channel;break;case sO:{const e=void 0===this._providedEnv?this._currentChannel.effect():a(this._currentChannel.effect(),xv(this._providedEnv));t=BO(Yv(e,{onFailure:t=>{const e=this.doneHalt(t);return void 0!==e&&UO(e)?e.effect:dv},onSuccess:t=>{const e=this.doneSucceed(t);return void 0!==e&&UO(e)?e.effect:dv}}));break}case iO:{const t=this._input,e=new eE(this._currentChannel.left(),this._providedEnv,(t=>this._executeCloseLastSubstream(t)));e._input=t,this._input=e,this.addFinalizer((e=>{const r=this.restorePipe(e,t);return void 0!==r?r:dv})),this._currentChannel=this._currentChannel.right();break}case"Provide":{const t=this._providedEnv;this._providedEnv=this._currentChannel.context(),this._currentChannel=this._currentChannel.inner,this.addFinalizer((()=>fv((()=>{this._providedEnv=t}))));break}case oO:{const e=this._currentChannel;t=qO(this._input,n,(t=>{try{this._currentChannel=e.more(t)}catch(t){this._currentChannel=e.done.onExit(Hh(Gc(t)))}}),(t=>{this._currentChannel=(t=>e.done.onExit(t))(t)}));break}case cO:t=this.doneSucceed(this._currentChannel.evaluate());break;case uO:t=this.doneSucceed(this._currentChannel.terminal);break;case aO:this._currentChannel=this._currentChannel.channel()}}catch(t){this._currentChannel=gO(tg(t))}return t}getDone(){return this._done}getEmit(){return this._emitted}cancelWith(t){this._cancelled=t}clearInProgressFinalizer(){this._inProgressFinalizer=void 0}storeInProgressFinalizer(t){this._inProgressFinalizer=t}popAllFinalizers(t){const e=[];let r=this._doneStack.pop();for(;r;)"ContinuationFinalizer"===r._tag&&e.push(r.finalizer),r=this._doneStack.pop();const n=0===e.length?dv:nE(e,t);return this.storeInProgressFinalizer(n),n}popNextFinalizers(){const t=[];for(;0!==this._doneStack.length;){const e=this._doneStack[this._doneStack.length-1];if(e._tag===U_)return t;t.push(e),this._doneStack.pop()}return t}restorePipe(t,e){const r=this._input;return this._input=e,void 0!==r?r.close(t):dv}close(t){let e;const r=this._inProgressFinalizer;let n;void 0!==r&&(e=a(r,Cv(fv((()=>this.clearInProgressFinalizer())))));const s=this.popAllFinalizers(t);void 0!==s&&(n=a(s,Cv(fv((()=>this.clearInProgressFinalizer())))));const i=void 0===this._activeSubexecutor?void 0:this._activeSubexecutor.close(t);if(void 0!==i||void 0!==e||void 0!==n)return a(Dv(rE(i)),n_(Dv(rE(e))),n_(Dv(rE(n))),Fv((([[t,e],r])=>a(t,Pl(e),Pl(r)))),vv,Lv((t=>lv((()=>t)))))}doneSucceed(t){if(0===this._doneStack.length)return this._done=Tl(t),this._currentChannel=void 0,LO();const e=this._doneStack[this._doneStack.length-1];if(e._tag===U_)return this._doneStack.pop(),void(this._currentChannel=e.onSuccess(t));const r=this.popNextFinalizers();if(0===this._doneStack.length)return this._doneStack=r.reverse(),this._done=Tl(t),this._currentChannel=void 0,LO();const n=nE(r.map((t=>t.finalizer)),Tl(t));this.storeInProgressFinalizer(n);const s=a(n,Cv(fv((()=>this.clearInProgressFinalizer()))),vv,Lv((()=>fv((()=>this.doneSucceed(t))))));return BO(s)}doneHalt(t){if(0===this._doneStack.length)return this._done=Al(t),this._currentChannel=void 0,LO();const e=this._doneStack[this._doneStack.length-1];if(e._tag===U_){this._doneStack.pop();try{this._currentChannel=e.onHalt(t)}catch(t){this._currentChannel=gO(tg(t))}return}const r=this.popNextFinalizers();if(0===this._doneStack.length)return this._doneStack=r.reverse(),this._done=Al(t),this._currentChannel=void 0,LO();const n=nE(r.map((t=>t.finalizer)),Al(t));this.storeInProgressFinalizer(n);const s=a(n,Cv(fv((()=>this.clearInProgressFinalizer()))),vv,Lv((()=>fv((()=>this.doneHalt(t))))));return BO(s)}processCancellation(){return this._currentChannel=void 0,this._done=this._cancelled,this._cancelled=void 0,LO()}runBracketOut(t){const e=vv(Yv(this.provide(t.acquire()),{onFailure:t=>fv((()=>{this._currentChannel=gO(t)})),onSuccess:e=>fv((()=>{this.addFinalizer((r=>this.provide(t.finalizer(e,r)))),this._currentChannel=NO(e)}))}));return BO(e)}provide(t){return void 0===this._providedEnv?t:a(t,xv(this._providedEnv))}runEnsuring(t){this.addFinalizer(t.finalizer),this._currentChannel=t.channel}addFinalizer(t){this._doneStack.push(new V_(t))}runSubexecutor(){const t=this._activeSubexecutor;switch(t._tag){case JO:return this.pullFromChild(t.childExecutor,t.parentSubexecutor,t.onEmit,t);case WO:return this.pullFromUpstream(t);case VO:return this.drainChildExecutors(t);case HO:return this._emitted=t.value,this._activeSubexecutor=t.next,PO()}}replaceSubexecutor(t){this._currentChannel=void 0,this._activeSubexecutor=t}finishWithExit(t){const e=Dl(t,{onFailure:t=>this.doneHalt(t),onSuccess:t=>this.doneSucceed(t)});return this._activeSubexecutor=void 0,void 0===e?dv:UO(r=e)?r.effect:dv;var r}finishSubexecutorWithCloseEffect(t,...e){this.addFinalizer((()=>a(e,nv((e=>a(fv((()=>e(t))),Lv((t=>void 0!==t?t:dv)))),{discard:!0}))));const r=a(t,Dl({onFailure:t=>this.doneHalt(t),onSuccess:t=>this.doneSucceed(t)}));return this._activeSubexecutor=void 0,r}applyUpstreamPullStrategy(t,e,r){switch(r._tag){case H_:{const n=!t||e.some((t=>void 0!==t));return[r.emitSeparator,n?[void 0,...e]:e]}case"PullAfterAllEnqueued":{const n=!t||e.some((t=>void 0!==t));return[r.emitSeparator,n?[...e,void 0]:e]}}}pullFromChild(t,e,r,s){return qO(t,n,(n=>{const i=r(n);switch(i._tag){case L_:break;case"Close":this.finishWithDoneValue(t,e,i.value);break;case"Yield":{const t=e.enqueuePullFromChild(s);this.replaceSubexecutor(t);break}}this._activeSubexecutor=new KO(n,this._activeSubexecutor)}),Dl({onFailure:r=>{const n=this.handleSubexecutorFailure(t,e,r);return void 0===n?void 0:zO(n)},onSuccess:r=>{this.finishWithDoneValue(t,e,r)}}))}finishWithDoneValue(t,e,r){const n=e;switch(n._tag){case WO:{const e=new QO(n.upstreamExecutor,n.createChild,void 0!==n.lastDone?n.combineChildResults(n.lastDone,r):r,n.activeChildExecutors,n.combineChildResults,n.combineWithChildResult,n.onPull,n.onEmit);this._closeLastSubstream=t.close(Tl(r)),this.replaceSubexecutor(e);break}case VO:{const e=new YO(n.upstreamExecutor,void 0!==n.lastDone?n.combineChildResults(n.lastDone,r):r,n.activeChildExecutors,n.upstreamDone,n.combineChildResults,n.combineWithChildResult,n.onPull);this._closeLastSubstream=t.close(Tl(r)),this.replaceSubexecutor(e);break}}}handleSubexecutorFailure(t,e,r){return this.finishSubexecutorWithCloseEffect(Al(r),(t=>e.close(t)),(e=>t.close(e)))}pullFromUpstream(t){if(0===t.activeChildExecutors.length)return this.performPullFromUpstream(t);const e=t.activeChildExecutors[0],r=new QO(t.upstreamExecutor,t.createChild,t.lastDone,t.activeChildExecutors.slice(1),t.combineChildResults,t.combineWithChildResult,t.onPull,t.onEmit);if(void 0===e)return this.performPullFromUpstream(r);this.replaceSubexecutor(new GO(e.childExecutor,r,e.onEmit))}performPullFromUpstream(t){return qO(t.upstreamExecutor,(t=>{const e=void 0===this._closeLastSubstream?dv:this._closeLastSubstream;return this._closeLastSubstream=void 0,a(this._executeCloseLastSubstream(e),i_(t))}),(e=>{if(void 0!==this._closeLastSubstream){const r=this._closeLastSubstream;return this._closeLastSubstream=void 0,a(this._executeCloseLastSubstream(r),Fv((()=>{const r=new eE(t.createChild(e),this._providedEnv,this._executeCloseLastSubstream);r._input=this._input;const[n,s]=this.applyUpstreamPullStrategy(!1,t.activeChildExecutors,t.onPull(tE(e)));this._activeSubexecutor=new GO(r,new QO(t.upstreamExecutor,t.createChild,t.lastDone,s,t.combineChildResults,t.combineWithChildResult,t.onPull,t.onEmit),t.onEmit),ae(n)&&(this._activeSubexecutor=new KO(n.value,this._activeSubexecutor))})))}const r=new eE(t.createChild(e),this._providedEnv,this._executeCloseLastSubstream);r._input=this._input;const[n,s]=this.applyUpstreamPullStrategy(!1,t.activeChildExecutors,t.onPull(tE(e)));this._activeSubexecutor=new GO(r,new QO(t.upstreamExecutor,t.createChild,t.lastDone,s,t.combineChildResults,t.combineWithChildResult,t.onPull,t.onEmit),t.onEmit),ae(n)&&(this._activeSubexecutor=new KO(n.value,this._activeSubexecutor))}),(e=>{if(t.activeChildExecutors.some((t=>void 0!==t))){const e=new YO(t.upstreamExecutor,t.lastDone,[void 0,...t.activeChildExecutors],t.upstreamExecutor.getDone(),t.combineChildResults,t.combineWithChildResult,t.onPull);if(void 0!==this._closeLastSubstream){const t=this._closeLastSubstream;return this._closeLastSubstream=void 0,a(this._executeCloseLastSubstream(t),Fv((()=>this.replaceSubexecutor(e))))}return void this.replaceSubexecutor(e)}const r=this._closeLastSubstream,n=this.finishSubexecutorWithCloseEffect(a(e,xl((e=>t.combineWithChildResult(t.lastDone,e)))),(()=>r),(e=>t.upstreamExecutor.close(e)));return void 0===n?void 0:zO(n)}))}drainChildExecutors(t){if(0===t.activeChildExecutors.length){const e=this._closeLastSubstream;return void 0!==e&&this.addFinalizer((()=>hv(e))),this.finishSubexecutorWithCloseEffect(t.upstreamDone,(()=>e),(e=>t.upstreamExecutor.close(e)))}const e=t.activeChildExecutors[0],r=t.activeChildExecutors.slice(1);if(void 0===e){const[e,n]=this.applyUpstreamPullStrategy(!0,r,t.onPull((t=>{const e=Object.create(XO);return e._tag="NoUpstream",e.activeDownstreamCount=t,e})(r.reduce(((t,e)=>void 0!==e?t+1:t),0))));return this.replaceSubexecutor(new YO(t.upstreamExecutor,t.lastDone,n,t.upstreamDone,t.combineChildResults,t.combineWithChildResult,t.onPull)),ae(e)?(this._emitted=e.value,PO()):void 0}const n=new YO(t.upstreamExecutor,t.lastDone,r,t.upstreamDone,t.combineChildResults,t.combineWithChildResult,t.onPull);this.replaceSubexecutor(new GO(e.childExecutor,n,e.onEmit))}}const rE=t=>void 0!==t?t:dv,nE=(t,e)=>a(nv(t,(t=>Dv(t(e)))),Fv((t=>a(Nl(t),fe((()=>$l))))),Lv((t=>lv((()=>t))))),sE=(t,e,r)=>{const n=[t],s=()=>{const t=n.pop();if(void 0===t||void 0===t.upstream)return uv("Unexpected end of input for channel execution");const i=t.upstream.run();switch(i._tag){case AO:{const i=t.onEmit(t.upstream.getEmit());return 0===n.length?void 0===i?lv(e):a(i,Yv({onFailure:r,onSuccess:e})):void 0===i?lv((()=>s())):a(i,Yv({onFailure:r,onSuccess:()=>s()}))}case RO:{const i=t.onDone(t.upstream.getDone());return 0===n.length?void 0===i?lv(e):a(i,Yv({onFailure:r,onSuccess:e})):void 0===i?lv((()=>s())):a(i,Yv({onFailure:r,onSuccess:()=>s()}))}case xO:return n.push(t),a(t.onEffect(i.effect),pv((e=>lv((()=>{const r=t.onDone(Al(e));return void 0===r?dv:r})))),Yv({onFailure:r,onSuccess:()=>s()}));case DO:return n.push(t),n.push(i),lv((()=>s()))}};return s()},iE=r(2,((t,e)=>_v((r=>rv([$g(e,Db),vl(),vl()]).pipe(Lv((([s,i,o])=>r(((e,r,s)=>Mv(fv((()=>new eE(t,void 0,n))),(t=>lv((()=>oE(t.run(),t).pipe(Tv(e),i_(_l(e)),s_(_l(r)))))),((t,e)=>{const r=t.close(e);return void 0===r?dv:Wv(r,(t=>Ag(s,cv(t))))})))(i,o,s)).pipe(Av(e),Lv((t=>e.addFinalizer((e=>{const r=Il(e)?ig(e.cause):void 0;return kl(i).pipe(Lv((e=>e?Ml(o,void 0).pipe(i_(Gg(t)),i_(Qg(t))):Ml(o,void 0).pipe(i_(r&&ii(r)>0?Kg(t,a(r,hi(ki,((t,e)=>Ci(e)(t))))):Yg(t)),i_(Qg(t))))))})).pipe(i_(r(_l(i)))))))))))))),oE=(t,e)=>{const r=t;switch(r._tag){case xO:return a(r.effect,Lv((()=>oE(e.run(),e))));case AO:return oE(e.run(),e);case RO:return lv((()=>e.getDone()));case DO:return sE(r,(()=>oE(e.run(),e)),cv)}},cE=Symbol.for("effect/ChannelMergeDecision"),uE={[cE]:{_R:t=>t,_E0:t=>t,_Z0:t=>t,_E:t=>t,_Z:t=>t}},aE=t=>{const e=Object.create(uE);return e._tag="Await",e.f=t,e},hE="BothRunning",lE="LeftDone",fE="RightDone",dE=Symbol.for("effect/ChannelMergeState"),bE={[dE]:dE},pE=(t,e)=>{const r=Object.create(bE);return r._tag=hE,r.left=t,r.right=e,r},mE=t=>{const e=Object.create(bE);return e._tag=lE,e.f=t,e},SE=t=>{const e=Object.create(bE);return e._tag=fE,e.f=t,e},yE="BackPressure",gE="BufferSliding",wE=Symbol.for("effect/ChannelMergeStrategy"),vE={[wE]:wE},_E=()=>{const t=Object.create(vE);return t._tag=yE,t},OE=()=>{const t=Object.create(vE);return t._tag=gE,t},EE=r(2,((t,{onBackPressure:e,onBufferSliding:r})=>{switch(t._tag){case yE:return e();case gE:return r()}})),FE="Empty",kE="Emit",ME="Error",CE="Done",IE=t=>({_tag:FE,notifyProducer:t}),jE=t=>({_tag:kE,notifyConsumers:t}),NE=t=>({_tag:ME,cause:t}),RE=t=>({_tag:CE,done:t});class AE{ref;constructor(t){this.ref=t}awaitRead(){return Pv(Xd(this.ref,(t=>t._tag===FE?[_l(t.notifyProducer),t]:[dv,t])))}get close(){return Nv((t=>this.error(eg(t))))}done(t){return Pv(Xd(this.ref,(e=>{switch(e._tag){case FE:return[_l(e.notifyProducer),e];case kE:return[nv(e.notifyConsumers,(e=>Ml(e,Qt(t))),{discard:!0}),RE(t)];case ME:case CE:return[gv,e]}})))}emit(t){return Lv(vl(),(e=>Pv(Xd(this.ref,(r=>{switch(r._tag){case FE:return[_l(r.notifyProducer),r];case kE:{const n=r.notifyConsumers[0],s=r.notifyConsumers.slice(1);if(void 0!==n)return[Ml(n,Gt(t)),0===s.length?IE(e):jE(s)];throw new Error("Bug: Channel.SingleProducerAsyncInput.emit - Queue was empty! please report an issue at https://github.com/Effect-TS/effect/issues")}case ME:case CE:return[gv,r]}})))))}error(t){return Pv(Xd(this.ref,(e=>{switch(e._tag){case FE:return[_l(e.notifyProducer),e];case kE:return[nv(e.notifyConsumers,(e=>El(e,t)),{discard:!0}),NE(t)];case ME:case CE:return[gv,e]}})))}get take(){return this.takeWith((t=>Al(cg(t,Qt))),(t=>Tl(t)),(t=>Rl(Gt(t))))}takeWith(t,e,r){return Lv(vl(),(n=>Pv(Xd(this.ref,(s=>{switch(s._tag){case FE:return[i_(Ml(s.notifyProducer,void 0),Qv(_l(n),{onFailure:t,onSuccess:Zt({onLeft:r,onRight:e})})),jE([n])];case kE:return[Qv(_l(n),{onFailure:t,onSuccess:Zt({onLeft:r,onRight:e})}),jE([...s.notifyConsumers,n])];case ME:return[hv(t(s.cause)),s];case CE:return[hv(r(s.done)),s]}})))))}}const xE=()=>a(vl(),Lv((t=>Kd(IE(t)))),Fv((t=>new AE(t)))),DE=r(2,((t,e)=>pO(t,e,(()=>{}),(()=>{})))),TE=t=>{const e=FO({onInput:()=>e,onFailure:gO,onDone:kO});return OO(t,e)},$E=r(2,((t,e)=>SO(t,(()=>e)))),LE=t=>YE(t.takeWith(gO,(e=>vO(NO(e),(()=>LE(t)))),kO)),PE=()=>EO({onInput:t=>vO(NO(t),(()=>PE())),onFailure:yO,onDone:MO}),BE=r(2,((t,e)=>vO(t,(t=>IO((()=>e(t))))))),qE=r(2,((t,e)=>{const r=EO({onInput:t=>vO(NO(e(t)),(()=>r)),onFailure:yO,onDone:MO});return OO(t,r)})),UE=r(3,((t,e,r)=>ZE((s=>av((function*(){const i=yield*xE(),o=LE(i),c=yield*R_(r);yield*Ag(s,x_(c));const u=yield*vl(),a=r===Number.POSITIVE_INFINITY?()=>n:(yield*t_(r)).withPermits,h=yield*o.pipe(OO(t),GE(s));yield*h.pipe(Yv({onFailure:t=>D_(c,cv(t)),onSuccess:Zt({onLeft:t=>i_(wv(a(r)(dv)),Ev(D_(c,hv(Qt(t))))),onRight:t=>av((function*(){const r=yield*vl(),i=yield*vl();yield*D_(c,Fv(_l(r),Gt)),yield*Ml(i,void 0).pipe(i_(_v((r=>Dv(r(_l(u))).pipe(qv(Dv(r(e(t)))),Lv(n)))).pipe(Wv((t=>El(u,t))),Tv(r))),a(1),Av(s)),yield*_l(i)}))})}),Vv,wv,Av(s));const l=YE(Qv(Pv(T_(c)),{onFailure:gO,onSuccess:Zt({onLeft:MO,onRight:t=>vO(NO(t),(()=>l))})}));return mO(l,i)})))))),zE=r(3,((t,e,r)=>(t=>e=>(({bufferSize:t=16,concurrency:e,mergeStrategy:r=_E()})=>(s,i)=>ZE((o=>av((function*(){const c="unbounded"===e?Number.MAX_SAFE_INTEGER:e,u=yield*xE(),h=LE(u),l=yield*R_(t);yield*Ag(o,x_(l));const f=yield*A_();yield*Ag(o,x_(f));const d=yield*Kd(oe()),b=yield*vl(),p=(yield*t_(c)).withPermits,m=yield*GE(OO(h,s),o);function S(t){return t.pipe(Lv(Zt({onLeft:t=>hv(ce(t)),onRight:t=>Ov(D_(l,hv(Gt(t))),oe())})),Hv({until:t=>ae(t)}),Lv((t=>tb(d,he({onNone:()=>ce(t.value),onSome:e=>ce(i(e,t.value))})))),pv((t=>ng(t)?cv(t):D_(l,cv(t)).pipe(i_(Ml(b,void 0)),Ev))))}yield*m.pipe(Yv({onFailure:t=>D_(l,cv(t)).pipe(i_(hv(!1))),onSuccess:Zt({onLeft:t=>Uv(wv(_l(b)),wv(p(c)(dv)),{onSelfDone:(t,e)=>Ov(Yg(e),!1),onOtherDone:(e,r)=>i_(Yg(r),Zd(d).pipe(Lv(he({onNone:()=>D_(l,hv(Qt(t))),onSome:e=>D_(l,hv(Qt(i(e,t))))})),Ov(!1)))}),onRight:t=>EE(r,{onBackPressure:()=>av((function*(){const e=yield*vl(),r=jv((e=>GE(OO(h,t),e).pipe(Lv((t=>Bv(Dv(S(t)),Dv(wv(_l(b)))))),Lv(n))));return yield*Ml(e,void 0).pipe(i_(r),p(1),Av(o)),yield*_l(e),!(yield*kl(b))})),onBufferSliding:()=>av((function*(){const e=yield*vl(),r=yield*vl(),s=yield*(i=f,i.size);var i;yield*T_(f).pipe(Lv((t=>Ml(t,void 0))),$v((()=>s>=c))),yield*D_(f,e);const u=jv((r=>GE(OO(h,t),r).pipe(Lv((t=>Dv(S(t)).pipe(Bv(Dv(wv(_l(b)))),Bv(Dv(wv(_l(e))))))),Lv(n))));return yield*Ml(r,void 0).pipe(i_(u),p(1),Av(o)),yield*_l(r),!(yield*kl(b))}))})})}),Hv({while:t=>t}),Av(o));const y=a(T_(l),Pv,Qv({onFailure:gO,onSuccess:Zt({onLeft:MO,onRight:t=>vO(NO(t),(()=>y))})}),YE);return mO(y,u)})))))(t)(e,u))(r)(qE(t,e)))),JE=r(2,((t,e)=>ZE((function(r){return av((function*(){const n=yield*xE(),s=LE(n),i=yield*GE(OO(s,t),r),o=yield*GE(OO(s,e.other),r);function c(t,e,n){return(s,i,o)=>{function c(t){const r=t;return"Done"===r._tag?hv(_O(i_(Yg(e),r.effect))):Fv(Gg(e),Dl({onFailure:t=>_O(r.f(Al(t))),onSuccess:Zt({onLeft:t=>_O(r.f(Tl(t))),onRight:t=>rF(NO(t),u(o(r.f)))})}))}return Dl(t,{onFailure:t=>c(s(Al(t))),onSuccess:Zt({onLeft:t=>c(s(Tl(t))),onRight:t=>hv(vO(NO(t),(()=>vO(_O(Av(wv(n),r)),(t=>u(i(t,e)))))))})})}}function u(t){switch(t._tag){case hE:{const r=wv(Zg(t.left)),n=wv(Zg(t.right));return YE(Uv(r,n,{onSelfDone:(r,n)=>i_(Yg(n),c(r,t.right,i)(e.onSelfDone,pE,(t=>mE(t)))),onOtherDone:(r,n)=>i_(Yg(n),c(r,t.left,o)(e.onOtherDone,((t,e)=>pE(e,t)),(t=>SE(t))))}))}case lE:return YE(Fv(Dv(o),Dl({onFailure:e=>_O(t.f(Al(e))),onSuccess:Zt({onLeft:e=>_O(t.f(Tl(e))),onRight:e=>vO(NO(e),(()=>u(mE(t.f))))})})));case fE:return YE(Fv(Dv(i),Dl({onFailure:e=>_O(t.f(Al(e))),onSuccess:Zt({onLeft:e=>_O(t.f(Tl(e))),onRight:e=>vO(NO(e),(()=>u(SE(t.f))))})})))}}return _O(iv((t=>{const e=iv((e=>(e.transferChildren(t.scope()),dv))),n=wv(i).pipe(Cv(e),Av(r)),s=wv(o).pipe(Cv(e),Av(r));return o_(n,s,((t,e)=>pE(t,e)))}))).pipe(vO(u),mO(n))}))})))),WE=r(2,((t,e)=>CO((()=>{let r;const n=EO({onInput:t=>vO(NO(t),(()=>n)),onFailure:t=>(r=sF(t),gO(tg(r))),onDone:MO}),s=FO({onInput:t=>a(NO(t),vO((()=>s))),onFailure:t=>rg(t)&&iF(t.defect)&&W(t.defect,r)?yO(t.defect.error):gO(t),onDone:MO});return OO(OO(OO(t,n),e),s)})))),VE=t=>(t=>jv((e=>iE(t,e))))(TE(t)),HE=t=>KE(Fv(Iv,(e=>vO(_O(t(e)),NO)))),GE=r(2,((t,e)=>n_(fv((()=>new eE(t,void 0,n))),Uu(((t,e)=>Ia(new ow(t.getFiberRef(dh),e.runtimeFlags,t.getFiberRefs()))))).pipe(zv((([t,r])=>xg(e,(e=>{const n=t.close(e);return void 0!==n?xv(n,r):dv})))),vv,Fv((([t])=>lv((()=>QE(t.run(),t)))))))),QE=(t,e)=>{const r=t;switch(r._tag){case RO:return Dl(e.getDone(),{onFailure:cv,onSuccess:t=>hv(Qt(t))});case AO:return hv(Gt(e.getEmit()));case xO:return a(r.effect,Lv((()=>QE(e.run(),e))));case DO:return sE(r,(()=>QE(e.run(),e)),(t=>cv(t)))}},YE=t=>{return e=_O(t),vO(e,n);var e},KE=t=>{return bO((e=t,YE(_v((t=>Fv(Lg(),(r=>dO(Wv(t(Tg(e,r)),(t=>Dg(r,Al(t)))),((t,e)=>Dg(r,e))))))))),(t=>t),(t=>t));var e},ZE=t=>bO(HE(t),(t=>t),(t=>t)),XE=t=>tF(0,t.length,t),tF=(t,e,r)=>t===e?jO:a(NO(a(r,Xr(t))),vO((()=>tF(t+1,e,r)))),eF=r((t=>fO(t[1])),((t,e,r)=>r?.concurrent?JE(t,{other:e,onSelfDone:t=>aE((e=>lv((()=>Ll(t,e))))),onOtherDone:t=>aE((e=>lv((()=>Ll(e,t)))))}):vO(t,(t=>BE(e,(e=>[t,e])))))),rF=r((t=>fO(t[1])),((t,e,r)=>r?.concurrent?BE(eF(t,e,{concurrent:!0}),(t=>t[1])):vO(t,(()=>e)))),nF=Symbol.for("effect/Channel/ChannelException"),sF=t=>({_tag:"ChannelException",[nF]:nF,error:t}),iF=t=>y(t,nF),oF=Symbol.for("effect/Sink"),cF={_A:t=>t,_In:t=>t,_L:t=>t,_E:t=>t,_R:t=>t};class uF{channel;[oF]=cF;constructor(t){this.channel=t}pipe(){return st(this,arguments)}}const aF=new uF(TE(PE())),hF=t=>ev(t)?hF(new uF(_O(t))):t.channel,lF=Symbol.for("effect/Take"),fF={_A:t=>t,_E:t=>t};class dF{exit;[lF]=fF;constructor(t){this.exit=t}pipe(){return st(this,arguments)}}const bF=t=>new dF(Tl(t)),pF=new dF(Rl(oe())),mF=Symbol.for("effect/Stream"),SF={_R:t=>t,_E:t=>t,_A:t=>t};class yF{channel;[mF]=SF;constructor(t){this.channel=t}pipe(){return st(this,arguments)}}const gF=t=>y(t,mF)||ev(t),wF=r(2,((t,e)=>new yF(a(MF(t),$E(e))))),vF=r((t=>gF(t[0])),((t,e,r)=>{const n=r?.bufferSize??16;return r?.switch?_F(r?.concurrency,(()=>OF(t,1,n,e)),(r=>OF(t,r,n,e))):_F(r?.concurrency,(()=>new yF(DE(MF(t),(t=>a(t,dn((t=>MF(e(t)))),Sn(jO,((t,e)=>a(t,rF(e))))))))),(()=>new yF(a(MF(t),DE(XE),zE((t=>MF(e(t))),r)))))})),_F=(t,e,r)=>{switch(t){case void 0:return e();case"unbounded":return r(Number.MAX_SAFE_INTEGER);default:return t>1?r(t):e()}},OF=r(4,((t,e,r,n)=>new yF(a(MF(t),DE(XE),zE((t=>MF(n(t))),{concurrency:e,mergeStrategy:OE(),bufferSize:r}))))),EF=r((t=>gF(t[0])),((t,e)=>vF(t,n,e))),FF=t=>{const e=FO({onInput:t=>((t,e)=>{const[r,n]=a(t,pn((t=>!jl(t)))),s=a(hn(n),he({onNone:()=>e,onSome:Dl({onFailure:t=>he((t=>Su(t,{onEmpty:ce(Vc),onFail:Se(Hc),onDie:t=>ce(Gc(t)),onInterrupt:t=>ce(Qc(t)),onSequential:we(Kc),onParallel:we(Yc)}))(t),{onNone:()=>jO,onSome:gO}),onSuccess:()=>jO})}));return a(NO(a(r,on((t=>jl(t)?ce(t.value):oe())))),vO((()=>s)))})(t,e),onFailure:t=>gO(t),onDone:()=>jO});return new yF(a(MF(t),OO(e)))},kF=t=>(t=>{const e=FO({onInput:t=>vO(XE(t),(()=>e)),onFailure:gO,onDone:()=>jO});return new yF(a(MF(t),OO(e)))})(FF(a(t,NF((t=>t.exit))))),MF=t=>{if("channel"in t)return t.channel;if(ev(t))return MF(CF(t));throw new TypeError("Expected a Stream.")},CF=t=>a(t,kv(ce),IF),IF=t=>new yF(YE(Gv(t,{onFailure:he({onNone:()=>jO,onSome:yO}),onSuccess:t=>NO(Wr(t))}))),jF=(t,e)=>a($_(t,1,e?.maxChunkSize??4096),pv((e=>a(t.isShutdown,Lv((t=>t&&ng(e)?ov(oe()):(t=>kv(cv(t),ce))(e)))))),xF,e?.shutdown?wF(x_(t)):n),NF=r(2,((t,e)=>new yF(a(MF(t),qE(dn(e)))))),RF=r(2,((t,e)=>{const r=t=>{const n=t.next();return n.done?FO({onInput:t=>r(t[Symbol.iterator]()),onFailure:gO,onDone:kO}):YE(Fv(e(n.value),(e=>vO(NO(Wr(e)),(()=>r(t))))))};return new yF(a(MF(t),OO(CO((()=>r(zr()[Symbol.iterator]()))))))})),AF=r(3,((t,e,r)=>new yF(a(MF(t),DE(XE),UE(r,e),qE(Wr))))),xF=t=>TF(t,(t=>a(Fv(t,(e=>ce([e,t]))),bv(he({onNone:()=>hv(oe()),onSome:ov}))))),DF=r(2,((t,e)=>MF(t).pipe(WE(hF(e)),VE))),TF=(t,e)=>{return r=()=>{const r=t=>YE(Fv(e(t),he({onNone:()=>jO,onSome:([t,e])=>vO(NO(t),(()=>r(e)))})));return new yF(r(t))},new yF(CO((()=>MF(r()))));var r},$F=Symbol.for("effect/GroupBy"),LF={_R:t=>t,_E:t=>t,_K:t=>t,_V:t=>t},PF=r((t=>y(t[0],$F)),((t,e,r)=>vF(t.grouped,(([t,r])=>e(t,kF(jF(r,{shutdown:!0})))),{concurrency:"unbounded",bufferSize:r?.bufferSize??16}))),BF=t=>({[$F]:LF,pipe(){return st(this,arguments)},grouped:t}),qF=r((t=>"function"!=typeof t[0]),((t,e,r)=>r?.key?PF(UF(t,r.key,{bufferSize:r.bufferSize}),((t,r)=>RF(r,e))):_F(r?.concurrency,(()=>RF(t,e)),(n=>r?.unordered?vF(t,(t=>CF(e(t))),{concurrency:n}):AF(t,n,e))))),UF=r((t=>"function"!=typeof t[0]),((t,e,r)=>{const n=(t,s)=>FO({onInput:i=>vO(_O(nv(zF(i,e),(([e,n])=>{const i=t.get(e);return void 0===i?a(R_(r?.bufferSize??16),Lv((r=>a(fv((()=>{t.set(e,r)})),i_(D_(s,new dF(Tl(Wr([e,r]))))),i_(a(D_(r,bF(n)),mv((t=>sg(t)?ce(dv):oe())))))))):mv(D_(i,bF(n)),(t=>sg(t)?ce(dv):oe()))}),{discard:!0})),(()=>n(t,s))),onFailure:t=>_O(D_(s,(t=>new dF(Al(a(t,cg(ce)))))(t))),onDone:()=>_O(a(nv(t.entries(),(([t,e])=>a(D_(e,pF),mv((t=>sg(t)?ce(dv):oe())))),{discard:!0}),i_(D_(s,pF))))});return BF((t=>EF((t=>new yF(HE((e=>t(e).pipe(Fv(Wr))))))((e=>t(e)))))((e=>av((function*(){const r=new Map,s=yield*A_();return yield*Ag(e,x_(s)),yield*MF(t).pipe(OO(n(r,s)),TE,iE(e),Av(e),Ov(kF(jF(s,{shutdown:!0}))))})))))})),zF=r(2,((t,e)=>{const r=[],n=t[Symbol.iterator](),s=new Map;let i;for(;(i=n.next())&&!i.done;){const t=i.value,n=e(t);if(s.has(n))s.get(n).push(t);else{const e=[t];r.push([n,e]),s.set(n,e)}}return Kr(r.map((t=>[t[0],Kr(t[1])])))})),JF=jF,WF=qF,VF=class extends t{constructor(){super(!1)}controllers=new Set;addController(t){this.controllers.add(t)}removeController(t){this.controllers.delete(t)}get activeControllers(){return Array.from(this.controllers).filter((t=>!t.disabled))}connectedCallback(){this.controllers.size||console.warn("ReactiveControllerHost connected with no controllers registered.",this),this.activeControllers.forEach((t=>t.hostConnected?.()))}disconnectedCallback(){this.activeControllers.forEach((t=>t.hostDisconnected?.()))}componentWillLoad(){this.activeControllers.forEach((t=>t.hostWillLoad?.()))}componentDidLoad(){this.activeControllers.forEach((t=>t.hostDidLoad?.()))}componentWillRender(){this.activeControllers.forEach((t=>t.hostWillRender?.()))}componentDidRender(){this.activeControllers.forEach((t=>t.hostDidRender?.()))}componentWillUpdate(){this.activeControllers.forEach((t=>t.hostWillUpdate?.()))}componentDidUpdate(){this.activeControllers.forEach((t=>t.hostDidUpdate?.()))}};class HF{host;config;static get globalValidationEnabled(){return e.isDev}static axe=this.globalValidationEnabled?import("./p-D1HbKFuh.js").then((function(t){return t.a})):null;static axeQueue=null;static axeStreamFiber=null;visibilityObserver;elementQueued=!1;elementValidated=!1;knownValidationErrors=[];get disabled(){return!0}constructor(t,e){this.host=t,this.config=e,HF.initializeAxeStream()}static initializeAxeStream(){if(!this.globalValidationEnabled)return;if(this.axeStreamFiber)return;const t=av((function*(){const t=HF.axeQueue=yield*R_(100),e=yield*(t=>Qu(t.length>=1?(e,r)=>{try{t(r).then((t=>e(Ia(t))),(t=>e(ta(t))))}catch(t){e(ta(t))}}:e=>{try{t().then((t=>e(Ia(t))),(t=>e(ta(t))))}catch(t){e(ta(t))}}))((()=>HF.axe));if(!e)return void console.error("Axe library not available, ARIA validation will not run.");const r=JF(t).pipe(WF((({context:t,onComplete:r})=>sv((n=>{e.run(t,{},((t,e)=>{r(t,e),n(dv)}))})))));var n;yield*(n=r,DF(n,aF))}));this.axeStreamFiber=e_(t)}hostDidLoad(){this.elementQueued||this.elementValidated||(this.host.el.checkVisibility()?this.enqueueValidation():this.observeVisibilityOnce())}hostDidUpdate(){this.checkLazyValidation()}hostDisconnected(){this.discardVisibilityObserver()}observeVisibilityOnce(){this.visibilityObserver=new IntersectionObserver((t=>{for(const e of t)e.target===this.host.el&&e.isIntersecting&&(this.checkLazyValidation(),this.discardVisibilityObserver())}),{root:this.host.el.parentElement,rootMargin:"0px",threshold:.01}),this.visibilityObserver.observe(this.host.el)}checkLazyValidation(){(this.config?.reValidateOnPropChanges||!this.elementQueued&&!this.elementValidated)&&this.enqueueValidation()}enqueueValidation(){}discardVisibilityObserver(){this.visibilityObserver&&(this.visibilityObserver.disconnect(),this.visibilityObserver=void 0)}}export{ka as $,HF as A,uo as B,ha as C,Yl as D,Jl as E,pb as F,lf as G,bi as H,df as I,sf as J,mi as K,di as L,uf as M,A as N,a as O,z as P,T as Q,VF as R,x as S,J as T,y as U,W as V,Wu as W,jb as X,Tl as Y,Un as Z,_l as _,Gt as a,Wa as a0,Fl as a1,Ol as a2,na as a3,Sl as a4,Ah as a5,av as a6,yv as a7,Sv as a8,Jv as a9,Kv as aa,Xv as ab,An as ac,Zv as ad,bv as ae,hv as af,Kt as b,le as c,kn as d,_a as e,gy as f,te as g,pl as h,n as i,ua as j,Xt as k,Qt as l,he as m,Kl as n,ja as o,Wl as p,Ia as q,r_ as r,Na as s,oe as t,Hl as u,ae as v,ce as w,pe as x,Cl as y,Gl as z}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t={isDev:!1},n=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(n||{}),e=(t=>(t.Array="array",t.Date="date",t.Map="map",t.Object="object",t.RegularExpression="regexp",t.Set="set",t.Channel="channel",t.Symbol="symbol",t))(e||{}),o="type",l="value",s="serialized:";function i(t,n,e){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,n);if(o&&(!e||o.get))return o;t=Object.getPrototypeOf(t)}}var r,c=(t,n)=>{var e;Object.entries(null!=(e=n.o.t)?e:{}).map((([e,[o]])=>{if(31&o||32&o){const o=t[e],l=i(Object.getPrototypeOf(t),e,!0)||Object.getOwnPropertyDescriptor(t,e);l&&Object.defineProperty(t,e,{get(){return l.get.call(this)},set(t){l.set.call(this,t)},configurable:!0,enumerable:!0}),n.l.has(e)?t[e]=n.l.get(e):void 0!==o&&(t[e]=o)}}))},f=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},u=(t,n)=>n in t,a=(t,n)=>(0,console.error)(t,n),d=new Map,$="s-id",p="sty-id",h="c-id",v="http://www.w3.org/1999/xlink",y=["formAssociatedCallback","formResetCallback","formDisabledCallback","formStateRestoreCallback"],m="undefined"!=typeof window?window:{},b=m.HTMLElement||class{},g={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,o)=>t.addEventListener(n,e,o),rel:(t,n,e,o)=>t.removeEventListener(n,e,o),ce:(t,n)=>new CustomEvent(t,n)},w=(()=>{try{return!!m.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),j=!!w&&(()=>!!m.document&&Object.getOwnPropertyDescriptor(m.document.adoptedStyleSheets,"length").writable)(),O=!1,S=[],N=[],k=(t,n)=>e=>{t.push(e),O||(O=!0,n&&4&g.i?C(M):g.raf(M))},x=t=>{for(let n=0;n<t.length;n++)try{t[n](performance.now())}catch(t){a(t)}t.length=0},M=()=>{x(S),x(N),(O=S.length>0)&&g.raf(M)},C=t=>Promise.resolve(undefined).then(t),E=k(N,!0),A=t=>{const n=new URL(t,g.u);return n.origin!==m.location.origin?n.href:n.pathname},I=t=>g.u=t;function L(t){const n={mode:"open"};n.delegatesFocus=!!(16&t.i);const e=this.attachShadow(n);void 0===r&&(r=null),r&&(j?e.adoptedStyleSheets.push(r):e.adoptedStyleSheets=[...e.adoptedStyleSheets,r])}var R=t=>{const n=V(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&_(n,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!D(t,T(t),!1).length)}));let e=0;for(e=0;e<n.length;e++){const t=n[e];1===t.nodeType&&V(t,"childNodes").length&&R(t)}};function _(t,n,e){let o,l=0,s=[];for(;l<t.length;l++){if(o=t[l],o["s-sr"]&&(!n||o["s-hn"]===n)&&(void 0===e||T(o)===e)&&(s.push(o),void 0!==e))return s;s=[...s,..._(o.childNodes,n,e)]}return s}var D=(t,n,e=!0)=>{const o=[];(e&&t["s-sr"]||!t["s-sr"])&&o.push(t);let l=t;for(;l=l.nextSibling;)T(l)!==n||!e&&l["s-sr"]||o.push(l);return o},B=(t,n)=>1===t.nodeType?null===t.getAttribute("slot")&&""===n||t.getAttribute("slot")===n:t["s-sn"]===n||""===n,F=(t,n,e,o)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const l=document.createTextNode("");if(l["s-nr"]=t,!n["s-cr"]||!n["s-cr"].parentNode)return;const s=n["s-cr"].parentNode,i=V(s,"appendChild");if(void 0!==o){l["s-oo"]=o;const t=V(s,"childNodes"),n=[l];t.forEach((t=>{t["s-nr"]&&n.push(t)})),n.sort(((t,n)=>!t["s-oo"]||t["s-oo"]<(n["s-oo"]||0)?-1:!n["s-oo"]||n["s-oo"]<t["s-oo"]?1:0)),n.forEach((t=>i.call(s,t)))}else i.call(s,l);t["s-ol"]=l,t["s-sh"]=n["s-hn"]},T=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function U(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const n=n=>function(t){const e=[],o=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const l=this["s-cr"].parentElement;return(l.__childNodes?l.childNodes:(t=>{const n=[];for(let e=0;e<t.length;e++){const o=t[e]["s-nr"]||void 0;o&&o.isConnected&&n.push(o)}return n})(l.childNodes)).forEach((t=>{o===T(t)&&e.push(t)})),n?e.filter((t=>1===t.nodeType)):e}.bind(t);t.assignedElements=n(!0),t.assignedNodes=n(!1)}function V(t,n){if("__"+n in t){const e=t["__"+n];return"function"!=typeof e?e:e.bind(t)}return"function"!=typeof t[n]?t[n]:t[n].bind(t)}var H=new WeakMap,P=(t,n,e)=>{let o=d.get(t);w&&e?(o=o||new CSSStyleSheet,"string"==typeof o?o=n:o.replaceSync(n)):o=n,d.set(t,o)},z=(t,n)=>{var e,o,l;const s=W(n),i=d.get(s);if(!m.document)return s;if(t=11===t.nodeType?t:m.document,i)if("string"==typeof i){let l,r=H.get(t=t.head||t);r||H.set(t,r=new Set);const c=t.querySelector(`[${p}="${s}"]`);if(c)c.textContent=i;else if(!r.has(s)){l=m.document.createElement("style"),l.textContent=i;const c=null!=(e=g.$)?e:function(){var t,n,e;return null!=(e=null==(n=null==(t=m.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?e:void 0}();if(null!=c&&l.setAttribute("nonce",c),!(1&n.i))if("HEAD"===t.nodeName){const n=t.querySelectorAll("link[rel=preconnect]"),e=n.length>0?n[n.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==e?void 0:e.parentNode)===t?e:null)}else if("host"in t)if(w){const n=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;n.replaceSync(i),j?t.adoptedStyleSheets.unshift(n):t.adoptedStyleSheets=[n,...t.adoptedStyleSheets]}else{const n=t.querySelector("style");n?n.textContent=i+n.textContent:t.prepend(l)}else t.append(l);1&n.i&&t.insertBefore(l,null),4&n.i&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(s)}}else{let n=H.get(t);if(n||H.set(t,n=new Set),!n.has(s)){const e=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(i.constructor===e.CSSStyleSheet)o=i;else{o=new e.CSSStyleSheet;for(let t=0;t<i.cssRules.length;t++)o.insertRule(i.cssRules[t].cssText,t)}if(j?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],n.add(s),"host"in t){const n=t.querySelector(`[${p}="${s}"]`);n&&E((()=>n.remove()))}}}return s},W=t=>"sc-"+t.p,q=t=>"object"==(t=typeof t)||"function"===t,Y=(t,n,...e)=>{let o=null,l=null,s=null,i=!1,r=!1;const c=[],f=n=>{for(let e=0;e<n.length;e++)o=n[e],Array.isArray(o)?f(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!q(o))&&(o=String(o)),i&&r?c[c.length-1].h+=o:c.push(i?J(null,o):o),r=i)};if(f(e),n){n.key&&(l=n.key),n.name&&(s=n.name);{const t=n.className||n.class;t&&(n.class="object"!=typeof t?t:Object.keys(t).filter((n=>t[n])).join(" "))}}const u=J(t,null);return u.v=n,c.length>0&&(u.m=c),u.j=l,u.O=s,u},J=(t,n)=>({i:0,S:t,h:null!=n?n:null,N:null,m:null,v:null,j:null,O:null}),Z={},G=(t,n,e,o,l,s,i,r=[])=>{let c,f,u,a;const d=l["s-sc"];if(1===s.nodeType){if(c=s.getAttribute(h),c&&(f=c.split("."),f[0]===i||"0"===f[0])){u=Q({i:0,k:f[0],M:f[1],C:f[2],A:f[3],S:s.tagName.toLowerCase(),N:s,v:{class:s.className||""}}),n.push(u),s.removeAttribute(h),t.m||(t.m=[]),d&&f[0]===i&&(s["s-si"]=d,u.v.class+=" "+d);const l=u.N.getAttribute("s-sn");"string"==typeof l&&("slot-fb"===u.S&&(X(l,f[2],u,s,t,n,e,o,r),d&&s.classList.add(d)),u.N["s-sn"]=l,u.N.removeAttribute("s-sn")),void 0!==u.A&&(t.m[u.A]=u),t=u,o&&"0"===u.C&&(o[u.A]=u.N)}if(s.shadowRoot)for(a=s.shadowRoot.childNodes.length-1;a>=0;a--)G(t,n,e,o,l,s.shadowRoot.childNodes[a],i,r);const $=s.__childNodes||s.childNodes;for(a=$.length-1;a>=0;a--)G(t,n,e,o,l,$[a],i,r)}else if(8===s.nodeType)f=s.nodeValue.split("."),(f[1]===i||"0"===f[1])&&(c=f[0],u=Q({k:f[1],M:f[2],C:f[3],A:f[4]||"0",N:s,v:null,m:null,j:null,O:null,S:null,h:null}),"t"===c?(u.N=lt(s,3),u.N&&3===u.N.nodeType&&(u.h=u.N.textContent,n.push(u),s.remove(),i===u.k&&(t.m||(t.m=[]),t.m[u.A]=u),o&&"0"===u.C&&(o[u.A]=u.N))):"c"===c?(u.N=lt(s,8),u.N&&8===u.N.nodeType&&(n.push(u),s.remove())):u.k===i&&("s"===c?X(s["s-sn"]=f[5]||"",f[2],u,s,t,n,e,o,r):"r"===c&&(o?s.remove():(l["s-cr"]=s,s["s-cn"]=!0))));else if(t&&"style"===t.S){const n=J(null,s.textContent);n.N=s,n.A="0",t.m=[n]}return t},K=(t,n)=>{if(1===t.nodeType){const e=t[$]||t.getAttribute($);e&&n.set(e,t);let o=0;if(t.shadowRoot)for(;o<t.shadowRoot.childNodes.length;o++)K(t.shadowRoot.childNodes[o],n);const l=t.__childNodes||t.childNodes;for(o=0;o<l.length;o++)K(l[o],n)}else if(8===t.nodeType){const e=t.nodeValue.split(".");"o"===e[0]&&(n.set(e[1]+"."+e[2],t),t.nodeValue="",t["s-en"]=e[3])}},Q=t=>({i:0,k:null,M:null,C:null,A:"0",N:null,v:null,m:null,j:null,O:null,S:null,h:null,...t});function X(t,n,e,o,l,s,i,r,c){o["s-sr"]=!0,e.O=t||null,e.S="slot";const f=(null==l?void 0:l.N)?l.N["s-id"]||l.N.getAttribute("s-id"):"";if(r&&m.document){const s=e.N=m.document.createElement(e.S);e.O&&e.N.setAttribute("name",t),l.N.shadowRoot&&f&&f!==e.k?V(l.N,"insertBefore")(s,V(l.N,"children")[0]):V(V(o,"parentNode"),"insertBefore")(s,o),ot(c,n,t,o,e.k),o.remove(),"0"===e.C&&(r[e.A]=e.N)}else{const s=e.N,i=f&&f!==e.k&&l.N.shadowRoot;ot(c,n,t,o,i?f:e.k),U(o),i&&l.N.insertBefore(s,l.N.children[0])}s.push(e),i.push(e),l.m||(l.m=[]),l.m[e.A]=e}var tt,nt,et,ot=(t,n,e,o,l)=>{var s,i;let r=o.nextSibling;if(t[n]=t[n]||[],r&&!(null==(s=r.nodeValue)?void 0:s.startsWith("s.")))do{!r||(r.getAttribute&&r.getAttribute("slot")||r["s-sn"])!==e&&(""!==e||r["s-sn"]||r.getAttribute&&r.getAttribute("slot")||8!==r.nodeType&&3!==r.nodeType)||(r["s-sn"]=e,t[n].push({slot:o,node:r,hostId:l})),r=null==r?void 0:r.nextSibling}while(r&&!(null==(i=r.nodeValue)?void 0:i.startsWith("s.")))},lt=(t,n)=>{let e=t;do{e=e.nextSibling}while(e&&(e.nodeType!==n||!e.nodeValue));return e},st=class t{static fromLocalValue(n){const e=n[o],s=l in n?n[l]:void 0;switch(e){case"string":case"boolean":return s;case"bigint":return BigInt(s);case"undefined":return;case"null":return null;case"number":return"NaN"===s?NaN:"-0"===s?-0:"Infinity"===s?1/0:"-Infinity"===s?-1/0:s;case"array":return s.map((n=>t.fromLocalValue(n)));case"date":return new Date(s);case"map":const n=new Map;for(const[e,o]of s){const l="object"==typeof e&&null!==e?t.fromLocalValue(e):e,s=t.fromLocalValue(o);n.set(l,s)}return n;case"object":const o={};for(const[n,e]of s)o[n]=t.fromLocalValue(e);return o;case"regexp":const{pattern:l,flags:i}=s;return new RegExp(l,i);case"set":const r=new Set;for(const n of s)r.add(t.fromLocalValue(n));return r;case"symbol":return Symbol(s);default:throw new Error(`Unsupported type: ${e}`)}}static fromLocalValueArray(n){return n.map((n=>t.fromLocalValue(n)))}static isLocalValueObject(t){if("object"!=typeof t||null===t)return!1;if(!t.hasOwnProperty(o))return!1;const s=t[o];return!!Object.values({...n,...e}).includes(s)&&("null"===s||"undefined"===s||t.hasOwnProperty(l))}},it=(t,n,e)=>{return"string"==typeof t&&t.startsWith(s)?t="string"==typeof(o=t)&&o.startsWith(s)?st.fromLocalValue(JSON.parse(atob(o.slice(11)))):o:null==t||q(t)?t:4&n?(e&&"string"==typeof t||"false"!==t)&&(""===t||!!t):2&n?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&n?String(t):t;var o},rt=(t,n)=>{const e=t;return{emit:t=>ct(e,n,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},ct=(t,n,e)=>{const o=g.ce(n,e);return t.dispatchEvent(o),o},ft=(t,n,e,o,l,s,i)=>{if(e===o)return;let r=u(t,n),c=n.toLowerCase();if("class"===n){const n=t.classList,l=at(e);let s=at(o);if((t["s-si"]||t["s-sc"])&&i){const e=t["s-sc"]||t["s-si"];s.push(e),l.forEach((t=>{t.startsWith(e)&&s.push(t)})),s=[...new Set(s)].filter((t=>t)),n.add(...s)}else n.remove(...l.filter((t=>t&&!s.includes(t)))),n.add(...s.filter((t=>t&&!l.includes(t))))}else if("style"===n){for(const n in e)o&&null!=o[n]||(n.includes("-")?t.style.removeProperty(n):t.style[n]="");for(const n in o)e&&o[n]===e[n]||(n.includes("-")?t.style.setProperty(n,o[n]):t.style[n]=o[n])}else if("key"===n);else if("ref"===n)o&&Lt(o,t);else if(t.__lookupSetter__(n)||"o"!==n[0]||"n"!==n[1]){if("a"===n[0]&&n.startsWith("attr:")){const e=n.slice(5);let l;{const n=f(t);if(n&&n.o&&n.o.t){const t=n.o.t[e];t&&t[1]&&(l=t[1])}}return l||(l=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==o||!1===o?!1===o&&""!==t.getAttribute(l)||t.removeAttribute(l):t.setAttribute(l,!0===o?"":o))}if("p"===n[0]&&n.startsWith("prop:")){const e=n.slice(5);try{t[e]=o}catch(t){}return}{const i=q(o);if((r||i&&null!==o)&&!l)try{if(t.tagName.includes("-"))t[n]!==o&&(t[n]=o);else{const l=null==o?"":o;"list"===n?r=!1:null!=e&&t[n]===l||("function"==typeof t.__lookupSetter__(n)?t[n]=l:t.setAttribute(n,l))}}catch(t){}let f=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(n=c,f=!0),null==o||!1===o?!1===o&&""!==t.getAttribute(n)||(f?t.removeAttributeNS(v,n):t.removeAttribute(n)):(!r||4&s||l)&&!i&&1===t.nodeType&&(o=!0===o?"":o,f?t.setAttributeNS(v,n,o):t.setAttribute(n,o))}}else if(n="-"===n[2]?n.slice(3):u(m,c)?c.slice(2):c[2]+n.slice(3),e||o){const l=n.endsWith(dt);n=n.replace($t,""),e&&g.rel(t,n,e,l),o&&g.ael(t,n,o,l)}},ut=/\s/,at=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(ut):[]),dt="Capture",$t=new RegExp(dt+"$"),pt=(t,n,e,o)=>{const l=11===n.N.nodeType&&n.N.host?n.N.host:n.N,s=t&&t.v||{},i=n.v||{};for(const t of ht(Object.keys(s)))t in i||ft(l,t,s[t],void 0,e,n.i,o);for(const t of ht(Object.keys(i)))ft(l,t,s[t],i[t],e,n.i,o)};function ht(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var vt=!1,yt=!1,mt=!1,bt=!1,gt=[],wt=[],jt=(t,n,e)=>{var o;const l=n.m[e];let s,i,r,c=0;if(vt||(mt=!0,"slot"===l.S&&(l.i|=l.m?2:1)),null!=l.h)s=l.N=m.document.createTextNode(l.h);else if(1&l.i)s=l.N=m.document.createTextNode(""),pt(null,l,bt);else{if(!m.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(s=l.N=m.document.createElement(!vt&&2&l.i?"slot-fb":l.S),pt(null,l,bt),null!=(f=tt)&&void 0!==f&&s["s-si"]!==tt&&s.classList.add(s["s-si"]=tt),l.m){const n="template"===l.S?s.content:s;for(c=0;c<l.m.length;++c)i=jt(t,l,c),i&&n.appendChild(i)}}var f;return s["s-hn"]=et,3&l.i&&(s["s-sr"]=!0,s["s-cr"]=nt,s["s-sn"]=l.O||"",s["s-rf"]=null==(o=l.v)?void 0:o.ref,U(s),r=t&&t.m&&t.m[e],r&&r.S===l.S&&t.N&&Ot(t.N),_t(nt,s,n.N,null==t?void 0:t.N)),s},Ot=t=>{g.i|=1;const n=t.closest(et.toLowerCase());if(null!=n){const e=Array.from(n.__childNodes||n.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of e?o.reverse():o)null!=t["s-sh"]&&(Rt(n,t,null!=e?e:null),t["s-sh"]=void 0,mt=!0)}g.i&=-2},St=(t,n)=>{g.i|=1;const e=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let n=t;for(;n=n.nextSibling;)n&&n["s-sn"]===t["s-sn"]&&n["s-sh"]===et&&e.push(n)}for(let t=e.length-1;t>=0;t--){const o=e[t];o["s-hn"]!==et&&o["s-ol"]&&(Rt(Mt(o).parentNode,o,Mt(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,mt=!0),n&&St(o,n)}g.i&=-2},Nt=(t,n,e,o,l,s)=>{let i,r=t["s-cr"]&&t["s-cr"].parentNode||t;for(r.shadowRoot&&r.tagName===et&&(r=r.shadowRoot),"template"===e.S&&(r=r.content);l<=s;++l)o[l]&&(i=jt(null,e,l),i&&(o[l].N=i,Rt(r,i,Mt(n))))},kt=(t,n,e)=>{for(let o=n;o<=e;++o){const n=t[o];if(n){const t=n.N;It(n),t&&(yt=!0,t["s-ol"]?t["s-ol"].remove():St(t,!0),t.remove())}}},xt=(t,n,e=!1)=>t.S===n.S&&("slot"===t.S?t.O===n.O:e?(e&&!t.j&&n.j&&(t.j=n.j),!0):t.j===n.j),Mt=t=>t&&t["s-ol"]||t,Ct=(t,n,e=!1)=>{const o=n.N=t.N,l=t.m,s=n.m,i=n.h;let r;null==i?("slot"!==n.S||vt||t.O!==n.O&&(n.N["s-sn"]=n.O||"",Ot(n.N.parentElement)),pt(t,n,bt,e),null!==l&&null!==s?((t,n,e,o,l=!1)=>{let s,i,r=0,c=0,f=0,u=0,a=n.length-1,d=n[0],$=n[a],p=o.length-1,h=o[0],v=o[p];const y="template"===e.S?t.content:t;for(;r<=a&&c<=p;)if(null==d)d=n[++r];else if(null==$)$=n[--a];else if(null==h)h=o[++c];else if(null==v)v=o[--p];else if(xt(d,h,l))Ct(d,h,l),d=n[++r],h=o[++c];else if(xt($,v,l))Ct($,v,l),$=n[--a],v=o[--p];else if(xt(d,v,l))"slot"!==d.S&&"slot"!==v.S||St(d.N.parentNode,!1),Ct(d,v,l),Rt(y,d.N,$.N.nextSibling),d=n[++r],v=o[--p];else if(xt($,h,l))"slot"!==d.S&&"slot"!==v.S||St($.N.parentNode,!1),Ct($,h,l),Rt(y,$.N,d.N),$=n[--a],h=o[++c];else{for(f=-1,u=r;u<=a;++u)if(n[u]&&null!==n[u].j&&n[u].j===h.j){f=u;break}f>=0?(i=n[f],i.S!==h.S?s=jt(n&&n[c],e,f):(Ct(i,h,l),n[f]=void 0,s=i.N),h=o[++c]):(s=jt(n&&n[c],e,c),h=o[++c]),s&&Rt(Mt(d.N).parentNode,s,Mt(d.N))}r>a?Nt(t,null==o[p+1]?null:o[p+1].N,e,o,c,p):c>p&&kt(n,r,a)})(o,l,n,s,e):null!==s?(null!==t.h&&(o.textContent=""),Nt(o,null,n,s,0,s.length-1)):e||null===l?e&&null!==l&&null===s&&(n.m=l):kt(l,0,l.length-1)):(r=o["s-cr"])?r.parentNode.textContent=i:t.h!==i&&(o.data=i)},Et=[],At=t=>{let n,e,o;const l=t.__childNodes||t.childNodes;for(const t of l){if(t["s-sr"]&&(n=t["s-cr"])&&n.parentNode){e=n.parentNode.__childNodes||n.parentNode.childNodes;const l=t["s-sn"];for(o=e.length-1;o>=0;o--)if(n=e[o],!(n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||n["s-sh"]&&n["s-sh"]===t["s-hn"]))if(B(n,l)){let e=Et.find((t=>t.I===n));yt=!0,n["s-sn"]=n["s-sn"]||l,e?(e.I["s-sh"]=t["s-hn"],e.L=t):(n["s-sh"]=t["s-hn"],Et.push({L:t,I:n})),n["s-sr"]&&Et.map((t=>{B(t.I,n["s-sn"])&&(e=Et.find((t=>t.I===n)),e&&!t.L&&(t.L=e.L))}))}else Et.some((t=>t.I===n))||Et.push({I:n})}1===t.nodeType&&At(t)}},It=t=>{t.v&&t.v.ref&>.push((()=>t.v.ref(null))),t.m&&t.m.map(It)},Lt=(t,n)=>{wt.push((()=>t(n)))},Rt=(t,n,e,o)=>{if("string"==typeof n["s-sn"]&&n["s-sr"]&&n["s-cr"])_t(n["s-cr"],n,t,n.parentElement);else if("string"==typeof n["s-sn"]){t.insertBefore(n,e);const{slotNode:l}=function(t,n){var e;if(!(n=n||(null==(e=t["s-ol"])?void 0:e.parentElement)))return{slotNode:null,slotName:""};const o=t["s-sn"]=T(t)||"";return{slotNode:_(V(n,"childNodes"),n.tagName,o)[0],slotName:o}}(n);return l&&!o&&l.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1})),n}return t.__insertBefore?t.__insertBefore(n,e):null==t?void 0:t.insertBefore(n,e)};function _t(t,n,e,o){var l,s;let i;if(t&&"string"==typeof n["s-sn"]&&n["s-sr"]&&t.parentNode&&t.parentNode["s-sc"]&&(i=n["s-si"]||t.parentNode["s-sc"])){const t=n["s-sn"],r=n["s-hn"];if(null==(l=e.classList)||l.add(i+"-s"),o&&(null==(s=o.classList)?void 0:s.contains(i+"-s"))){let n=(o.__childNodes||o.childNodes)[0],e=!1;for(;n;){if(n["s-sn"]!==t&&n["s-hn"]===r&&n["s-sr"]){e=!0;break}n=n.nextSibling}e||o.classList.remove(i+"-s")}}}var Dt=(t,n,e=!1)=>{var o,l,s,i,r;const c=t.$hostElement$,f=t.o,u=t.R||J(null,null);var a;const d=(a=n)&&a.S===Z?n:Y(null,null,n);if(et=c.tagName,f._&&(d.v=d.v||{},f._.forEach((([t,n])=>{d.v[n]=c[t]}))),e&&d.v)for(const t of Object.keys(d.v))c.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(d.v[t]=c[t]);if(d.S=null,d.i|=4,t.R=d,d.N=u.N=c.shadowRoot||c,tt=c["s-sc"],vt=!(!(1&f.i)||128&f.i),nt=c["s-cr"],yt=!1,Ct(u,d,e),g.i|=1,mt){At(d.N);for(const t of Et){const n=t.I;if(!n["s-ol"]&&m.document){const t=m.document.createTextNode("");t["s-nr"]=n,Rt(n.parentNode,n["s-ol"]=t,n,e)}}for(const t of Et){const n=t.I,r=t.L;if(1===n.nodeType&&e&&(n["s-ih"]=null!=(o=n.hidden)&&o),r){const t=r.parentNode;let o=r.nextSibling;if(o&&1===o.nodeType){let e=null==(l=n["s-ol"])?void 0:l.previousSibling;for(;e;){let l=null!=(s=e["s-nr"])?s:null;if(l&&l["s-sn"]===n["s-sn"]&&t===(l.__parentNode||l.parentNode)){for(l=l.nextSibling;l===n||(null==l?void 0:l["s-sr"]);)l=null==l?void 0:l.nextSibling;if(!l||!l["s-nr"]){o=l;break}}e=e.previousSibling}}if((!o&&t!==(n.__parentNode||n.parentNode)||(n.__nextSibling||n.nextSibling)!==o)&&n!==o){if(Rt(t,n,o,e),8===n.nodeType&&n.nodeValue.startsWith("s-nt-")){const t=m.document.createTextNode(n.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=n["s-hn"],t["s-sn"]=n["s-sn"],t["s-sh"]=n["s-sh"],t["s-sr"]=n["s-sr"],t["s-ol"]=n["s-ol"],t["s-ol"]["s-nr"]=t,Rt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}1===n.nodeType&&"SLOT-FB"!==n.tagName&&(n.hidden=null!=(i=n["s-ih"])&&i)}n&&"function"==typeof r["s-rf"]&&r["s-rf"](r)}else 1===n.nodeType&&(n.hidden=!0)}}if(yt&&R(d.N),g.i&=-2,Et.length=0,!vt&&!(1&f.i)&&c["s-cr"]){const t=d.N.__childNodes||d.N.childNodes;for(const n of t)if(n["s-hn"]!==et&&!n["s-sh"])if(e&&null==n["s-ih"]&&(n["s-ih"]=null!=(r=n.hidden)&&r),1===n.nodeType)n.hidden=!0;else if(3===n.nodeType&&n.nodeValue.trim()){const t=m.document.createComment("s-nt-"+n.nodeValue);t["s-sn"]=n["s-sn"],Rt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}}nt=void 0,gt.forEach((t=>t())),gt.length=0,wt.forEach((t=>t())),wt.length=0},Bt=(t,n)=>{if(n&&!t.D&&n["s-p"]){const e=n["s-p"].push(new Promise((o=>t.D=()=>{n["s-p"].splice(e-1,1),o()})))}},Ft=(t,n)=>{if(t.i|=16,4&t.i)return void(t.i|=512);Bt(t,t.B);const e=()=>Tt(t,n);if(!n)return E(e);queueMicrotask((()=>{e()}))},Tt=(t,n)=>{const e=t.$hostElement$,o=e;if(!o)throw new Error(`Can't render component <${e.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return l=qt(o,n?"componentWillLoad":"componentWillUpdate",void 0,e),l=Ut(l,(()=>qt(o,"componentWillRender",void 0,e))),Ut(l,(()=>Ht(t,o,n)))},Ut=(t,n)=>Vt(t)?t.then(n).catch((t=>{console.error(t),n()})):n(),Vt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Ht=async(t,n,e)=>{var o;const l=t.$hostElement$,s=l["s-rc"];e&&(t=>{const n=t.o,e=t.$hostElement$,o=n.i,l=z(e.shadowRoot?e.shadowRoot:e.getRootNode(),n);10&o&&(e["s-sc"]=l,e.classList.add(l+"-h"))})(t);Pt(t,n,l,e),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const n=null!=(o=l["s-p"])?o:[],e=()=>zt(t);0===n.length?e():(Promise.all(n).then(e).catch(e),t.i|=4,n.length=0)}},Pt=(t,n,e,o)=>{try{n=n.render(),t.i&=-17,t.i|=2,Dt(t,n,o)}catch(n){a(n,t.$hostElement$)}return null},zt=t=>{const n=t.$hostElement$,e=n,o=t.B;qt(e,"componentDidRender",void 0,n),64&t.i?qt(e,"componentDidUpdate",void 0,n):(t.i|=64,Yt(n),qt(e,"componentDidLoad",void 0,n),t.F(n),o||Wt()),t.D&&(t.D(),t.D=void 0),512&t.i&&C((()=>Ft(t,!1))),t.i&=-517},Wt=()=>{var t;C((()=>ct(m,"appload",{detail:{namespace:"lmvz-components"}}))),(null==(t=g.T)?void 0:t.size)&&g.T.clear()},qt=(t,n,e,o)=>{if(t&&t[n])try{return t[n](e)}catch(t){a(t,o)}},Yt=t=>t.classList.add("hydrated"),Jt=(t,n,e,o)=>{const l=f(t);if(!l)return;const s=t,i=l.l.get(n),r=l.i,c=s;e=it(e,o.t[n][0],!!(64&o.i));const u=Number.isNaN(i)&&Number.isNaN(e);if(e!==i&&!u){if(l.l.set(n,e),o.U){const t=o.U[n];t&&t.map((t=>{try{const[[o,s]]=Object.entries(t);(128&r||1&s)&&(c?c[o](e,i,n):l.V.push((()=>{l.H[o](e,i,n)})))}catch(t){a(t,s)}}))}if(2&r){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(e,i,n)&&!(16&r))return;16&r||Ft(l,!1)}}},Zt=(t,n,e)=>{var o,l;const s=t.prototype;64&n.i&&1&e&&y.forEach((t=>{const n=s[t];Object.defineProperty(s,t,{value(...e){var o;const l=f(this),s=this;s?"function"==typeof n&&n.call(s,...e):null==(o=null==l?void 0:l.P)||o.then((n=>{const o=n[t];"function"==typeof o&&o.call(n,...e)}))}})}));{t.watchers&&!n.U&&(n.U=t.watchers),t.deserializers&&!n.W&&(n.W=t.deserializers),t.serializers&&!n.q&&(n.q=t.serializers);const e=Object.entries(null!=(o=n.t)?o:{});e.map((([t,[e]])=>{if(31&e||32&e){const{get:o,set:l}=i(s,t)||{};o&&(n.t[t][0]|=2048),l&&(n.t[t][0]|=4096),Object.defineProperty(s,t,{get(){return o?o.apply(this):(n=t,f(this).l.get(n));var n},configurable:!0,enumerable:!0}),Object.defineProperty(s,t,{set(o){const s=f(this);if(s){if(l)return void 0===(32&e?this[t]:s.$hostElement$[t])&&s.l.get(t)&&(o=s.l.get(t)),l.apply(this,[it(o,e,!!(64&n.i))]),void Jt(this,t,o=32&e?this[t]:s.$hostElement$[t],n);Jt(this,t,o,n)}}})}}));{const o=new Map;s.attributeChangedCallback=function(t,l,i){g.jmp((()=>{var r;const c=o.get(t),u=f(this);if(this.hasOwnProperty(c),s.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==i)return;if(null==c){const e=null==u?void 0:u.i;if(u&&e&&!(8&e)&&i!==l){const o=this,s=null==(r=n.U)?void 0:r[t];null==s||s.forEach((n=>{const[[s,r]]=Object.entries(n);null!=o[s]&&(128&e||1&r)&&o[s].call(o,i,l,t)}))}return}const a=e.find((([t])=>t===c));a&&4&a[1][0]&&(i=null!==i&&"false"!==i);const d=Object.getOwnPropertyDescriptor(s,c);i==this[c]||d.get&&!d.set||(this[c]=i)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(l=n.U)?l:{}),...e.filter((([t,n])=>31&n[0])).map((([t,e])=>{var l;const s=e[1]||t;return o.set(s,t),512&e[0]&&(null==(l=n._)||l.push([t,s])),s}))]))}}return t},Gt=t=>{if(!m.document)return;const n=t["s-cr"]=m.document.createComment("");n["s-cn"]=!0,Rt(t,n,t.firstChild)},Kt=(t,n)=>{const e={i:n[0],p:n[1]};try{e.t=n[2],e.U=t.U,e.W=t.W,e.q=t.q,e._=[],(()=>{if(!m.document)return;const t=m.document.querySelectorAll(`[${p}]`);let n=0;for(;n<t.length;n++)P(t[n].getAttribute(p),t[n].innerHTML.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),!0)})();const o=t.prototype.connectedCallback,l=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,n)=>{const e={i:0,$hostElement$:t,o:n,l:new Map,Y:new Map};e.P=new Promise((t=>e.F=t)),t["s-p"]=[],t["s-rc"]=[];const o=e;t.__stencil__getHostRef=()=>o,512&n.i&&c(t,e)})(this,e)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!f(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&g.i)){const n=f(t);if(!n)return;const e=n.o,o=()=>{};if(1&n.i)(null==n?void 0:n.H)||(null==n?void 0:n.P)&&n.P.then((()=>{}));else{let o;if(n.i|=1,o=t.getAttribute($),o){if(1&e.i){const n=z(t.shadowRoot,e);t.classList.remove(n+"-h",n+"-s")}else if(2&e.i){const n=W(e);t["s-sc"]=n}((t,n,e,o)=>{var l,s,i,r;const c=t.shadowRoot,u=[],a=[],d=[],p=c?[]:null,h=J(n,null);let v;h.N=t;{const n=o.o;n&&10&n.i&&t["s-sc"]?(v=t["s-sc"],t.classList.add(v+"-h")):t["s-sc"]&&delete t["s-sc"]}!m.document||g.T&&g.T.size||K(m.document.body,g.T=new Map),t[$]=e,t.removeAttribute($),o.R=G(h,u,a,p,t,t,e,d);let y=0;const b=u.length;let w;for(;y<b;y++){w=u[y];const e=w.k+"."+w.M,o=g.T.get(e),s=w.N;if(c){if((null==(l=w.S)?void 0:l.toString().includes("-"))&&"slot-fb"!==w.S&&!w.N.shadowRoot){const t=f(w.N);if(t){const n=W(t.o),e=m.document.querySelector(`style[sty-id="${n}"]`);e&&p.unshift(e.cloneNode(!0))}}}else s["s-hn"]=n.toUpperCase(),"slot"===w.S&&(s["s-cr"]=t["s-cr"]);"slot"===w.S&&(w.O=w.N["s-sn"]||w.N.name||null,w.m?(w.i|=2,w.N.childNodes.length||w.m.forEach((t=>{w.N.appendChild(t.N)}))):w.i|=1),o&&o.isConnected&&(o.parentElement.shadowRoot&&""===o["s-en"]&&o.parentNode.insertBefore(s,o.nextSibling),o.parentNode.removeChild(o),c||(s["s-oo"]=parseInt(w.M))),o&&!o["s-id"]&&g.T.delete(e)}const j=[],O=d.length;let S,N,k,x,M=0,C=0;for(;M<O;M++)if(S=d[M],S&&S.length)for(k=S.length,N=0;N<k;N++){if(x=S[N],j[x.hostId]||(j[x.hostId]=g.T.get(x.hostId)),!j[x.hostId])continue;const t=j[x.hostId];t.shadowRoot&&x.node.parentElement!==t&&t.insertBefore(x.node,null==(i=null==(s=S[N-1])?void 0:s.node)?void 0:i.nextSibling),t.shadowRoot&&c||(x.slot["s-cr"]||(x.slot["s-cr"]=t["s-cr"],x.slot["s-cr"]=!x.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),F(x.node,x.slot,0,x.node["s-oo"]||C),(null==(r=x.node.parentElement)?void 0:r.shadowRoot)&&x.node.getAttribute&&x.node.getAttribute("slot")&&x.node.removeAttribute("slot")),C=(x.node["s-oo"]||C)+1}if(v&&a.length&&a.forEach((t=>{t.N.parentElement.classList.add(v+"-s")})),c&&!c.childNodes.length){let n=0;const e=p.length;if(e){for(;n<e;n++){const t=p[n];t&&c.appendChild(t)}Array.from(t.childNodes).forEach((t=>{"string"!=typeof t["s-en"]&&"string"!=typeof t["s-sn"]&&(1===t.nodeType&&t.slot&&t.hidden?t.removeAttribute("hidden"):8!==t.nodeType||t.nodeValue||t.parentNode.removeChild(t))}))}}o.$hostElement$=t})(t,e.p,o,n)}o||12&e.i&&Gt(t);{let e=t;for(;e=e.parentNode||e.host;)if(1===e.nodeType&&e.hasAttribute("s-id")&&e["s-p"]||e["s-p"]){Bt(n,n.B=e);break}}e.t&&Object.entries(e.t).map((([n,[e]])=>{if(31&e&&Object.prototype.hasOwnProperty.call(t,n)){const e=t[n];delete t[n],t[n]=e}})),(async(t,n,e)=>{let o;try{if(!(32&n.i)&&(n.i|=32,o=t.constructor,customElements.whenDefined(t.localName).then((()=>n.i|=128)),o&&o.style)){let t;"string"==typeof o.style&&(t=o.style);const n=W(e);if(!d.has(n)){const o=()=>{};P(n,t,!!(1&e.i)),o()}}const l=n.B,s=()=>Ft(n,!0);l&&l["s-rc"]?l["s-rc"].push(s):s()}catch(e){a(e,t),n.D&&(n.D(),n.D=void 0),n.F&&n.F(t)}})(t,n,e)}o()}})(this),o&&o.call(this)},disconnectedCallback(){(async t=>{1&g.i||f(t),H.has(t)&&H.delete(t),t.shadowRoot&&H.has(t.shadowRoot)&&H.delete(t.shadowRoot)})(this),l&&l.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${e.p}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else L.call(this,e)}}),Object.defineProperty(t,"is",{value:e.p,configurable:!0}),Zt(t,e,3)}catch(n){return a(n),t}},Qt=t=>g.$=t,Xt=t=>Object.assign(g,t);function tn(t,n){Dt({o:{i:0,p:n.tagName},$hostElement$:n},t)}function nn(t){return t}export{t as B,b as H,Qt as a,Xt as b,rt as c,Z as d,A as g,Y as h,Kt as p,tn as r,I as s,nn as t}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class t{host;config;constructor(t,i){this.host=t,this.config=i}hostDidLoad(){this.host.el.hasAttribute("tabindex")||console.warn("Interactive element does not have a tabindex attribute!",this.host.el),this.host.el.addEventListener("keydown",this.handleKeyDown.bind(this)),this.host.el.addEventListener("click",this.handleActivation.bind(this))}handleKeyDown=t=>{(this.config?.keys??["Enter"," "]).includes(t.key)&&(t.preventDefault(),this.handleActivation(t))};handleActivation=t=>{this.host.lmvzActivation.emit(),this.config?.localHandler&&this.config.localHandler(t)}}export{t as E}
|