@ncino/web-components 5.0.0-preview.2 → 5.0.0-preview.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/dist/_virtual/_commonjsHelpers.js +1 -1
- package/dist/_virtual/index_html.js +1 -1
- package/dist/_virtual/index_react.js +1 -1
- package/dist/_virtual/preload-helper.js +1 -1
- package/dist/assets/node_modules/.pnpm/ckeditor5@45.2.1/node_modules/ckeditor5/dist/ckeditor5.css +1 -1
- package/dist/components/accordion/gator/base/accordion.gator.js +6 -6
- package/dist/components/accordion/gator/group/accordion-group.gator.js +2 -2
- package/dist/components/alert/gator/base/alert.gator.js +2 -2
- package/dist/components/alert/gator/subtitle/alert-subtitle.gator.js +2 -2
- package/dist/components/alert/gator/title/alert-title.gator.js +2 -2
- package/dist/components/avatar/gator/avatar.gator.js +2 -2
- package/dist/components/badge/gator/badge.gator.js +2 -2
- package/dist/components/banner/gator/banner.gator.js +2 -2
- package/dist/components/boolean/boolean.gator.js +6 -6
- package/dist/components/breadcrumbs/gator/breadcrumb/breadcrumb.gator.js +2 -2
- package/dist/components/button/gator/button.gator.js +4 -4
- package/dist/components/button-group/gator/button-group.gator.js +2 -2
- package/dist/components/card/gator/footer/card-footer.gator.js +2 -2
- package/dist/components/card/gator/header/card-header.gator.js +2 -2
- package/dist/components/checkbox/checkbox.gator.js +5 -5
- package/dist/components/checkbox-group/checkbox-group.gator.js +8 -8
- package/dist/components/combobox/base/combobox.js +1 -1
- package/dist/components/combobox/base/combobox.slds.js +13 -13
- package/dist/components/date-picker/base/gator/datepicker.gator.js +18 -18
- package/dist/components/date-picker/year-month-selector/year-month-selector.gator.js +2 -2
- package/dist/components/headline-card/gator/headline-card.gator.js +2 -2
- package/dist/components/icon/gator/icon.gator.js +2 -2
- package/dist/components/illustration/gator/illustration.gator.js +2 -2
- package/dist/components/input/base/input-base.gator.js +1 -1
- package/dist/components/input/gator/dropdown/input-dropdown.gator.js +11 -11
- package/dist/components/input/gator/input-currency/input-currency.gator.js +2 -2
- package/dist/components/input/gator/input-date/input-date.gator.js +15 -15
- package/dist/components/input/gator/input-file/input-file.gator.js +3 -3
- package/dist/components/input/gator/input-masked/input-masked.gator.js +1 -1
- package/dist/components/input/gator/input-phone/input-phone.gator.js +2 -2
- package/dist/components/input/gator/input-search/input-search.gator.js +2 -2
- package/dist/components/input/gator/input-text/input-text.gator.js +1 -1
- package/dist/components/input/gator/input-time/input-time.gator.js +2 -2
- package/dist/components/list/gator/list/list.gator.js +2 -2
- package/dist/components/list/gator/list-item/list-item.gator.js +6 -6
- package/dist/components/menu/base/gator/menu.gator.js +3 -3
- package/dist/components/menu/base/slds/menu.slds.js +2 -2
- package/dist/components/menu/menu-item/gator/menu-item.gator.js +2 -2
- package/dist/components/menu/menu-submenu/menu-submenu.js +1 -1
- package/dist/components/modal/gator/modal.gator.js +38 -39
- package/dist/components/page-header/gator/page-header.gator.js +2 -2
- package/dist/components/panel/gator/panel.gator.js +13 -13
- package/dist/components/panel/gator/panel.storybook-test.js +1 -1
- package/dist/components/pill/pill.slds.js +3 -3
- package/dist/components/popover/gator/popover.gator.js +10 -10
- package/dist/components/popover/popover.js +1 -1
- package/dist/components/radio/radio.gator.js +2 -2
- package/dist/components/radio-group/radio-group.gator.js +2 -2
- package/dist/components/selection-box-group/selection-box-group.gator.js +5 -5
- package/dist/components/selector/gator/selector.gator.js +2 -2
- package/dist/components/switch/gator/switch.gator.js +2 -2
- package/dist/components/tabs/gator/tabset/tabset.gator.js +3 -3
- package/dist/components/text-detail/gator/text-detail.gator.js +17 -18
- package/dist/components/time-picker/gator/time-picker.gator.js +19 -19
- package/dist/components/toast/gator/base/toast.gator.js +8 -9
- package/dist/components/toast/gator/subtitle/toast-subtitle.gator.js +2 -2
- package/dist/components/toast/gator/title/toast-title.gator.js +2 -2
- package/dist/components/toast/toast.js +1 -1
- package/dist/components/toast-container/gator/toast-container.gator.js +18 -0
- package/dist/components/toast-container/index.js +1 -0
- package/dist/components/toaster/gator/toaster.gator.js +5 -0
- package/dist/components/toaster/index.js +1 -0
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/index.gator.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.services.js +1 -0
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-autosave@45.2.1/node_modules/@ckeditor/ckeditor5-autosave/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-basic-styles@45.2.1/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-clipboard@45.2.1/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +10 -10
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-cloud-services@45.2.1/node_modules/@ckeditor/ckeditor5-cloud-services/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-code-block@45.2.1/node_modules/@ckeditor/ckeditor5-code-block/dist/index.js +5 -5
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-core@45.2.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-editor-classic@45.2.1/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-engine@45.2.1/node_modules/@ckeditor/ckeditor5-engine/dist/index.js +12 -12
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-find-and-replace@45.2.1/node_modules/@ckeditor/ckeditor5-find-and-replace/dist/index.js +3 -3
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-font@45.2.1/node_modules/@ckeditor/ckeditor5-font/dist/index.js +3 -3
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-heading@45.2.1/node_modules/@ckeditor/ckeditor5-heading/dist/index.js +3 -3
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-embed@45.2.1/node_modules/@ckeditor/ckeditor5-html-embed/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-support@45.2.1/node_modules/@ckeditor/ckeditor5-html-support/dist/index.js +6 -6
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-image@45.2.1/node_modules/@ckeditor/ckeditor5-image/dist/index.js +4 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-indent@45.2.1/node_modules/@ckeditor/ckeditor5-indent/dist/index.js +4 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-link@45.2.1/node_modules/@ckeditor/ckeditor5-link/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-list@45.2.1/node_modules/@ckeditor/ckeditor5-list/dist/index.js +5 -5
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-markdown-gfm@45.2.1/node_modules/@ckeditor/ckeditor5-markdown-gfm/dist/index.js +4 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-media-embed@45.2.1/node_modules/@ckeditor/ckeditor5-media-embed/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-paragraph@45.2.1/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-paste-from-office@45.2.1/node_modules/@ckeditor/ckeditor5-paste-from-office/dist/index.js +9 -9
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-source-editing@45.2.1/node_modules/@ckeditor/ckeditor5-source-editing/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-special-characters@45.2.1/node_modules/@ckeditor/ckeditor5-special-characters/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-style@45.2.1/node_modules/@ckeditor/ckeditor5-style/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-table@45.2.1/node_modules/@ckeditor/ckeditor5-table/dist/index.js +6 -6
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-typing@45.2.1/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +4 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-ui@45.2.1/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +10 -10
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-undo@45.2.1/node_modules/@ckeditor/ckeditor5-undo/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-upload@45.2.1/node_modules/@ckeditor/ckeditor5-upload/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-utils@45.2.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js +38 -38
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-watchdog@45.2.1/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js +3 -3
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-widget@45.2.1/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@deltablot_dropzone@7.3.1/node_modules/@deltablot/dropzone/dist/dropzone.js +1 -1
- package/dist/node_modules/.pnpm/@fastify_busboy@2.1.1/node_modules/@fastify/busboy/lib/main.js +1 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.4/node_modules/@figma/code-connect/dist/common/fetch.js +1 -0
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.4/node_modules/@figma/code-connect/dist/connect/figma_rest_api.js +1 -0
- package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.3 → @figma_code-connect@1.3.4}/node_modules/@figma/code-connect/dist/connect/helpers.js +1 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.4/node_modules/@figma/code-connect/package.json.js +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +1 -1
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js +2 -2
- package/dist/node_modules/.pnpm/@storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_/node_modules/@storybook/core/dist/channels/index.js +9 -9
- package/dist/node_modules/.pnpm/@storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_/node_modules/@storybook/core/dist/csf/index.js +1 -1
- package/dist/node_modules/.pnpm/@storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_/node_modules/@storybook/core/dist/preview-api/index.js +22 -22
- package/dist/node_modules/.pnpm/@storybook_instrumenter@8.6.14_storybook@8.6.14_prettier@3.6.2_/node_modules/@storybook/instrumenter/dist/index.js +36 -36
- package/dist/node_modules/.pnpm/@storybook_test@8.6.14_storybook@8.6.14_prettier@3.6.2_/node_modules/@storybook/test/dist/index.js +111 -111
- package/dist/node_modules/.pnpm/@vitest_browser@3.2.4_msw@2.7.3_@types_node@24.0.10_typescript@5.8.3__playwright@1.53.2_77c47ac19cbe97978028e1e5ac862536/node_modules/@vitest/browser/context.js +1 -0
- package/dist/node_modules/.pnpm/@vitest_expect@3.2.4/node_modules/@vitest/expect/dist/index.js +8 -8
- package/dist/node_modules/.pnpm/@vitest_pretty-format@3.2.4/node_modules/@vitest/pretty-format/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/chunk-hooks.js +5 -5
- package/dist/node_modules/.pnpm/@vitest_snapshot@3.2.4/node_modules/@vitest/snapshot/dist/index.js +11 -11
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/diff.js +21 -21
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/error.js +2 -2
- package/dist/node_modules/.pnpm/axe-core@4.10.3/node_modules/axe-core/axe.js +4 -4
- package/dist/node_modules/.pnpm/chai@5.2.0/node_modules/chai/chai.js +3 -3
- package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/isPrototype.js +1 -1
- package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js +1 -1
- package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/get.js +1 -1
- package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/unset.js +1 -1
- package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js +1 -1
- package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/function/debounce.js +1 -1
- package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/object/cloneDeepWith.js +1 -1
- package/dist/node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js +2 -2
- package/dist/node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/async-directive.js +1 -1
- package/dist/node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directive-helpers.js +2 -2
- package/dist/node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/class-map.js +2 -2
- package/dist/node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js +2 -2
- package/dist/node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/repeat.js +5 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js +3 -3
- package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/cache.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/cachestorage.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/parse.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/constants.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/headers.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/index.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/request.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/response.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/util.js +2 -2
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/webidl.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/connection.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/events.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/frame.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/receiver.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/util.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/websocket.js +1 -1
- package/dist/node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.10_@vitest_browser@3.2.4_@vitest_ui@3_8c34ee540b1f52c214debce201d1e515/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js +1 -1
- package/dist/node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.10_@vitest_browser@3.2.4_@vitest_ui@3_8c34ee540b1f52c214debce201d1e515/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js +8 -8
- package/dist/packages/web-components/src/components/button/gator/button.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/modal/gator/modal.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/switch/gator/switch.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/text-detail/gator/text-detail.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/toast/gator/base/toast.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/toast-container/gator/toast-container.gator.scss.js +1 -0
- package/dist/packages/web-components/src/components/toaster/gator/toaster.gator.scss.js +1 -0
- package/dist/packages/web-components/src/index.slds.scss.js +1 -1
- package/dist/services/toaster-service.js +1 -0
- package/dist/types/components/modal/gator/modal.gator.d.ts +1 -1
- package/dist/types/components/text-detail/gator/text-detail.gator.d.ts +4 -2
- package/dist/types/components/toast/toast.d.ts +14 -0
- package/dist/types/components/toast-container/gator/toast-container.gator.d.ts +15 -0
- package/dist/types/components/toast-container/gator/toast-container.gator.test.d.ts +0 -0
- package/dist/types/components/toast-container/index.d.ts +1 -0
- package/dist/types/components/toaster/gator/toaster.gator.d.ts +32 -0
- package/dist/types/components/toaster/gator/toaster.gator.test.d.ts +0 -0
- package/dist/types/components/toaster/index.d.ts +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.gator.d.ts +2 -0
- package/dist/types/index.services.d.ts +1 -0
- package/dist/types/services/toaster-service.d.ts +117 -0
- package/dist/types/services/toaster-service.test.d.ts +1 -0
- package/dist/utils/accessibility-utils.js +1 -1
- package/dist/utils/datatestid-utils.js +1 -1
- package/dist/utils/lightdom-utils.js +1 -1
- package/dist/utils/vitest-a11y-utils.js +1 -1
- package/dist/utils/vitest-utils.js +1 -1
- package/package.json +15 -11
- package/web-types.json +182 -110
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.3/node_modules/@figma/code-connect/dist/common/fetch.js +0 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.3/node_modules/@figma/code-connect/dist/connect/figma_rest_api.js +0 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.3/node_modules/@figma/code-connect/package.json.js +0 -1
- package/dist/node_modules/.pnpm/@vitest_browser@3.2.4_msw@2.7.3_@types_node@24.0.10_typescript@5.8.3__playwright@1.53.1_5fd2997ee9a97429a51e07bc2023c338/node_modules/@vitest/browser/context.js +0 -1
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.3 → @figma_code-connect@1.3.4}/node_modules/@figma/code-connect/dist/client/external.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.3 → @figma_code-connect@1.3.4}/node_modules/@figma/code-connect/dist/client/figma_client.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.3 → @figma_code-connect@1.3.4}/node_modules/@figma/code-connect/dist/common/logging.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.3 → @figma_code-connect@1.3.4}/node_modules/@figma/code-connect/dist/common/updates.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.3 → @figma_code-connect@1.3.4}/node_modules/@figma/code-connect/dist/connect/external_types.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.3 → @figma_code-connect@1.3.4}/node_modules/@figma/code-connect/dist/connect/index_common.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.3 → @figma_code-connect@1.3.4}/node_modules/@figma/code-connect/dist/html/external.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.3 → @figma_code-connect@1.3.4}/node_modules/@figma/code-connect/dist/html/index_html.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.3 → @figma_code-connect@1.3.4}/node_modules/@figma/code-connect/dist/html/template_literal.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.3 → @figma_code-connect@1.3.4}/node_modules/@figma/code-connect/dist/react/external.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.3 → @figma_code-connect@1.3.4}/node_modules/@figma/code-connect/dist/react/index_react.js +0 -0
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import{logger as s,pretty as r}from"../client-logger/index.js";import*as index from"../core-events/index.js";import{CHANNEL_WS_DISCONNECT as S$1}from"../core-events/index.js";var ae=Object.create,ut=Object.defineProperty,se=Object.getOwnPropertyDescriptor,le=Object.getOwnPropertyNames,ce=Object.getPrototypeOf,pe=Object.prototype.hasOwnProperty,a=(n,e)=>ut(n,"name",{value:e,configurable:!0}),H=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')}),ue=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),fe=(n,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of le(e))!pe.call(n,l)&&l!==t&&ut(n,l,{get:()=>e[l],enumerable:!(o=se(e,l))||o.enumerable});return n},he=(n,e,t)=>(t=n!=null?ae(ce(n)):{},fe(ut(t,"default",{value:n,enumerable:!0}),n)),xt=ue((n,e)=>{(function(t){if(typeof n=="object"&&typeof e<"u")e.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var o;typeof window<"u"?o=window:typeof global<"u"?o=global:typeof self<"u"?o=self:o=this,o.memoizerific=t()}})(function(){return a(function t(o,l,c){function i(p,
|
|
1
|
+
import{logger as s,pretty as r}from"../client-logger/index.js";import*as index from"../core-events/index.js";import{CHANNEL_WS_DISCONNECT as S$1}from"../core-events/index.js";var ae=Object.create,ut=Object.defineProperty,se=Object.getOwnPropertyDescriptor,le=Object.getOwnPropertyNames,ce=Object.getPrototypeOf,pe=Object.prototype.hasOwnProperty,a=(n,e)=>ut(n,"name",{value:e,configurable:!0}),H=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')}),ue=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),fe=(n,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of le(e))!pe.call(n,l)&&l!==t&&ut(n,l,{get:()=>e[l],enumerable:!(o=se(e,l))||o.enumerable});return n},he=(n,e,t)=>(t=n!=null?ae(ce(n)):{},fe(ut(t,"default",{value:n,enumerable:!0}),n)),xt=ue((n,e)=>{(function(t){if(typeof n=="object"&&typeof e<"u")e.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var o;typeof window<"u"?o=window:typeof global<"u"?o=global:typeof self<"u"?o=self:o=this,o.memoizerific=t()}})(function(){return a(function t(o,l,c){function i(p,E){if(!l[p]){if(!o[p]){var g=typeof H=="function"&&H;if(!E&&g)return g(p,!0);if(u)return u(p,!0);var d=new Error("Cannot find module '"+p+"'");throw d.code="MODULE_NOT_FOUND",d}var m=l[p]={exports:{}};o[p][0].call(m.exports,function(b){var _=o[p][1][b];return i(_||b)},m,m.exports,t,o,l,c)}return l[p].exports}a(i,"s");for(var u=typeof H=="function"&&H,y=0;y<c.length;y++)i(c[y]);return i},"e")({1:[function(t,o,l){o.exports=function(c){if(typeof Map!="function"||c){var i=t("./similar");return new i}else return new Map}},{"./similar":2}],2:[function(t,o,l){function c(){return this.list=[],this.lastItem=void 0,this.size=0,this}a(c,"Similar"),c.prototype.get=function(i){var u;if(this.lastItem&&this.isEqual(this.lastItem.key,i))return this.lastItem.val;if(u=this.indexOf(i),u>=0)return this.lastItem=this.list[u],this.list[u].val},c.prototype.set=function(i,u){var y;return this.lastItem&&this.isEqual(this.lastItem.key,i)?(this.lastItem.val=u,this):(y=this.indexOf(i),y>=0?(this.lastItem=this.list[y],this.list[y].val=u,this):(this.lastItem={key:i,val:u},this.list.push(this.lastItem),this.size++,this))},c.prototype.delete=function(i){var u;if(this.lastItem&&this.isEqual(this.lastItem.key,i)&&(this.lastItem=void 0),u=this.indexOf(i),u>=0)return this.size--,this.list.splice(u,1)[0]},c.prototype.has=function(i){var u;return this.lastItem&&this.isEqual(this.lastItem.key,i)?!0:(u=this.indexOf(i),u>=0?(this.lastItem=this.list[u],!0):!1)},c.prototype.forEach=function(i,u){var y;for(y=0;y<this.size;y++)i.call(u||this,this.list[y].val,this.list[y].key,this)},c.prototype.indexOf=function(i){var u;for(u=0;u<this.size;u++)if(this.isEqual(this.list[u].key,i))return u;return-1},c.prototype.isEqual=function(i,u){return i===u||i!==i&&u!==u},o.exports=c},{}],3:[function(t,o,l){var c=t("map-or-similar");o.exports=function(p){var E=new c(!1),g=[];return function(d){var m=a(function(){var b=E,_,L,O=arguments.length-1,D=Array(O+1),N=!0,R;if((m.numArgs||m.numArgs===0)&&m.numArgs!==O+1)throw new Error("Memoizerific functions should always be called with the same number of arguments");for(R=0;R<O;R++){if(D[R]={cacheItem:b,arg:arguments[R]},b.has(arguments[R])){b=b.get(arguments[R]);continue}N=!1,_=new c(!1),b.set(arguments[R],_),b=_}return N&&(b.has(arguments[O])?L=b.get(arguments[O]):N=!1),N||(L=d.apply(null,arguments),b.set(arguments[O],L)),p>0&&(D[O]={cacheItem:b,arg:arguments[O]},N?i(g,D):g.push(D),g.length>p&&u(g.shift())),m.wasMemoized=N,m.numArgs=O+1,L},"memoizerific");return m.limit=p,m.wasMemoized=!1,m.cache=E,m.lru=g,m}};function i(p,E){var g=p.length,d=E.length,m,b,_;for(b=0;b<g;b++){for(m=!0,_=0;_<d;_++)if(!y(p[b][_].arg,E[_].arg)){m=!1;break}if(m)break}p.push(p.splice(b,1)[0])}a(i,"moveToMostRecentLru");function u(p){var E=p.length,g=p[E-1],d,m;for(g.cacheItem.delete(g.arg),m=E-2;m>=0&&(g=p[m],d=g.cacheItem.get(g.arg),!d||!d.size);m--)g.cacheItem.delete(g.arg)}a(u,"removeCachedResult");function y(p,E){return p===E||p!==p&&E!==E}a(y,"isEqual")},{"map-or-similar":1}]},{},[3])(3)})}),S=(()=>{let n;return typeof window<"u"?n=window:typeof globalThis<"u"?n=globalThis:typeof global<"u"?n=global:typeof self<"u"?n=self:n={},n})();function F(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];var o=Array.from(typeof n=="string"?[n]:n);o[o.length-1]=o[o.length-1].replace(/\r?\n([\t ]*)$/,"");var l=o.reduce(function(u,y){var p=y.match(/\n([\t ]+|(?!\s).)/g);return p?u.concat(p.map(function(E){var g,d;return(d=(g=E.match(/[\t ]/g))===null||g===void 0?void 0:g.length)!==null&&d!==void 0?d:0})):u},[]);if(l.length){var c=new RegExp(`
|
|
2
2
|
[ ]{`+Math.min.apply(Math,l)+"}","g");o=o.map(function(u){return u.replace(c,`
|
|
3
|
-
`)})}o[0]=o[0].replace(/^\r?\n/,"");var i=o[0];return e.forEach(function(u,y){var p=i.match(/(?:^|\n)( *)$/),
|
|
3
|
+
`)})}o[0]=o[0].replace(/^\r?\n/,"");var i=o[0];return e.forEach(function(u,y){var p=i.match(/(?:^|\n)( *)$/),E=p?p[1]:"",g=u;typeof u=="string"&&u.includes(`
|
|
4
4
|
`)&&(g=String(u).split(`
|
|
5
|
-
`).map(function(d,
|
|
6
|
-
`)),i+=g+o[y+1]}),i}a(F,"dedent");var ft=new Map,ye="UNIVERSAL_STORE:",x={PENDING:"PENDING",RESOLVED:"RESOLVED",REJECTED:"REJECTED"},h=class v{constructor(e,t){if(this.debugging=!1,this.listeners=new Map([["*",new Set]]),this.getState=a(()=>(this.debug("getState",{state:this.state}),this.state),"getState"),this.subscribe=a((o,l)=>{let c=typeof o=="function",i=c?"*":o,u=c?o:l;if(this.debug("subscribe",{eventType:i,listener:u}),!u)throw new TypeError(`Missing first subscribe argument, or second if first is the event type, when subscribing to a UniversalStore with id '${this.id}'`);return this.listeners.has(i)||this.listeners.set(i,new Set),this.listeners.get(i).add(u),()=>{
|
|
5
|
+
`).map(function(d,m){return m===0?d:""+E+d}).join(`
|
|
6
|
+
`)),i+=g+o[y+1]}),i}a(F,"dedent");var ft=new Map,ye="UNIVERSAL_STORE:",x={PENDING:"PENDING",RESOLVED:"RESOLVED",REJECTED:"REJECTED"},h=class v{constructor(e,t){if(this.debugging=!1,this.listeners=new Map([["*",new Set]]),this.getState=a(()=>(this.debug("getState",{state:this.state}),this.state),"getState"),this.subscribe=a((o,l)=>{let c=typeof o=="function",i=c?"*":o,u=c?o:l;if(this.debug("subscribe",{eventType:i,listener:u}),!u)throw new TypeError(`Missing first subscribe argument, or second if first is the event type, when subscribing to a UniversalStore with id '${this.id}'`);return this.listeners.has(i)||this.listeners.set(i,new Set),this.listeners.get(i).add(u),()=>{this.debug("unsubscribe",{eventType:i,listener:u}),this.listeners.has(i)&&(this.listeners.get(i).delete(u),this.listeners.get(i)?.size===0&&this.listeners.delete(i))}},"subscribe"),this.send=a(o=>{if(this.debug("send",{event:o}),this.status!==v.Status.READY)throw new TypeError(F`Cannot send event before store is ready. You can get the current status with store.status,
|
|
7
7
|
or await store.readyPromise to wait for the store to be ready before sending events.
|
|
8
|
-
${JSON.stringify({event:o,id:this.id,actor:this.actor,environment:this.environment},null,2)}`);this.emitToListeners(o,{actor:this.actor}),this.emitToChannel(o,{actor:this.actor})},"send"),this.debugging=e.debug??!1,!v.isInternalConstructing)throw new TypeError("UniversalStore is not constructable - use UniversalStore.create() instead");if(v.isInternalConstructing=!1,this.id=e.id,this.actorId=Date.now().toString(36)+Math.random().toString(36).substring(2),this.actorType=e.leader?v.ActorType.LEADER:v.ActorType.FOLLOWER,this.state=e.initialState,this.channelEventName=`${ye}${this.id}`,this.debug("constructor",{options:e,environmentOverrides:t,channelEventName:this.channelEventName}),this.actor.type===v.ActorType.LEADER)this.syncing={state:x.RESOLVED,promise:Promise.resolve()};else{let o,l,c=new Promise((i,u)=>{o=a(()=>{this.syncing.state===x.PENDING&&(this.syncing.state=x.RESOLVED,i())},"syncingResolve"),l=a(y=>{this.syncing.state===x.PENDING&&(this.syncing.state=x.REJECTED,u(y))},"syncingReject")});this.syncing={state:x.PENDING,promise:c,resolve:o,reject:l}}this.getState=this.getState.bind(this),this.setState=this.setState.bind(this),this.subscribe=this.subscribe.bind(this),this.onStateChange=this.onStateChange.bind(this),this.send=this.send.bind(this),this.emitToChannel=this.emitToChannel.bind(this),this.prepareThis=this.prepareThis.bind(this),this.emitToListeners=this.emitToListeners.bind(this),this.handleChannelEvents=this.handleChannelEvents.bind(this),this.debug=this.debug.bind(this),this.channel=
|
|
8
|
+
${JSON.stringify({event:o,id:this.id,actor:this.actor,environment:this.environment},null,2)}`);this.emitToListeners(o,{actor:this.actor}),this.emitToChannel(o,{actor:this.actor})},"send"),this.debugging=e.debug??!1,!v.isInternalConstructing)throw new TypeError("UniversalStore is not constructable - use UniversalStore.create() instead");if(v.isInternalConstructing=!1,this.id=e.id,this.actorId=Date.now().toString(36)+Math.random().toString(36).substring(2),this.actorType=e.leader?v.ActorType.LEADER:v.ActorType.FOLLOWER,this.state=e.initialState,this.channelEventName=`${ye}${this.id}`,this.debug("constructor",{options:e,environmentOverrides:t,channelEventName:this.channelEventName}),this.actor.type===v.ActorType.LEADER)this.syncing={state:x.RESOLVED,promise:Promise.resolve()};else{let o,l,c=new Promise((i,u)=>{o=a(()=>{this.syncing.state===x.PENDING&&(this.syncing.state=x.RESOLVED,i())},"syncingResolve"),l=a(y=>{this.syncing.state===x.PENDING&&(this.syncing.state=x.REJECTED,u(y))},"syncingReject")});this.syncing={state:x.PENDING,promise:c,resolve:o,reject:l}}this.getState=this.getState.bind(this),this.setState=this.setState.bind(this),this.subscribe=this.subscribe.bind(this),this.onStateChange=this.onStateChange.bind(this),this.send=this.send.bind(this),this.emitToChannel=this.emitToChannel.bind(this),this.prepareThis=this.prepareThis.bind(this),this.emitToListeners=this.emitToListeners.bind(this),this.handleChannelEvents=this.handleChannelEvents.bind(this),this.debug=this.debug.bind(this),this.channel=t?.channel??v.preparation.channel,this.environment=t?.environment??v.preparation.environment,this.channel&&this.environment?this.prepareThis({channel:this.channel,environment:this.environment}):v.preparation.promise.then(this.prepareThis)}static setupPreparationPromise(){let e,t,o=new Promise((l,c)=>{e=a(i=>{l(i)},"resolveRef"),t=a((...i)=>{c(i)},"rejectRef")});v.preparation={resolve:e,reject:t,promise:o}}get actor(){return Object.freeze({id:this.actorId,type:this.actorType,environment:this.environment??v.Environment.UNKNOWN})}get status(){if(!this.channel||!this.environment)return v.Status.UNPREPARED;switch(this.syncing?.state){case x.PENDING:case void 0:return v.Status.SYNCING;case x.REJECTED:return v.Status.ERROR;case x.RESOLVED:default:return v.Status.READY}}untilReady(){return Promise.all([v.preparation.promise,this.syncing?.promise])}static create(e){if(!e||typeof e?.id!="string")throw new TypeError("id is required and must be a string, when creating a UniversalStore");e.debug&&console.debug(F`[UniversalStore]
|
|
9
9
|
create`,{options:e});let t=ft.get(e.id);if(t)return console.warn(F`UniversalStore with id "${e.id}" already exists in this environment, re-using existing.
|
|
10
10
|
You should reuse the existing instance instead of trying to create a new one.`),t;v.isInternalConstructing=!0;let o=new v(e);return ft.set(e.id,o),o}static __prepare(e,t){v.preparation.channel=e,v.preparation.environment=t,v.preparation.resolve({channel:e,environment:t})}setState(e){let t=this.state,o=typeof e=="function"?e(t):e;if(this.debug("setState",{newState:o,previousState:t,updater:e}),this.status!==v.Status.READY)throw new TypeError(F`Cannot set state before store is ready. You can get the current status with store.status,
|
|
11
11
|
or await store.readyPromise to wait for the store to be ready before sending events.
|
|
12
|
-
${JSON.stringify({newState:o,id:this.id,actor:this.actor,environment:this.environment},null,2)}`);this.state=o;let l={type:v.InternalEventType.SET_STATE,payload:{state:o,previousState:t}};this.emitToChannel(l,{actor:this.actor}),this.emitToListeners(l,{actor:this.actor})}onStateChange(e){return this.debug("onStateChange",{listener:e}),this.subscribe(v.InternalEventType.SET_STATE,({payload:t},o)=>{e(t.state,t.previousState,o)})}emitToChannel(e,t){
|
|
12
|
+
${JSON.stringify({newState:o,id:this.id,actor:this.actor,environment:this.environment},null,2)}`);this.state=o;let l={type:v.InternalEventType.SET_STATE,payload:{state:o,previousState:t}};this.emitToChannel(l,{actor:this.actor}),this.emitToListeners(l,{actor:this.actor})}onStateChange(e){return this.debug("onStateChange",{listener:e}),this.subscribe(v.InternalEventType.SET_STATE,({payload:t},o)=>{e(t.state,t.previousState,o)})}emitToChannel(e,t){this.debug("emitToChannel",{event:e,eventInfo:t,channel:this.channel}),this.channel?.emit(this.channelEventName,{event:e,eventInfo:t})}prepareThis({channel:e,environment:t}){this.channel=e,this.environment=t,this.debug("prepared",{channel:e,environment:t}),this.channel.on(this.channelEventName,this.handleChannelEvents),this.actor.type===v.ActorType.LEADER?this.emitToChannel({type:v.InternalEventType.LEADER_CREATED},{actor:this.actor}):(this.emitToChannel({type:v.InternalEventType.FOLLOWER_CREATED},{actor:this.actor}),this.emitToChannel({type:v.InternalEventType.EXISTING_STATE_REQUEST},{actor:this.actor}),setTimeout(()=>{this.syncing.reject(new TypeError(`No existing state found for follower with id: '${this.id}'. Make sure a leader with the same id exists before creating a follower.`))},1e3))}emitToListeners(e,t){let o=this.listeners.get(e.type),l=this.listeners.get("*");this.debug("emitToListeners",{event:e,eventInfo:t,eventTypeListeners:o,everythingListeners:l}),[...o??[],...l??[]].forEach(c=>c(e,t))}handleChannelEvents(e){let{event:t,eventInfo:o}=e;if([o.actor.id,o.forwardingActor?.id].includes(this.actor.id)){this.debug("handleChannelEvents: Ignoring event from self",{channelEvent:e});return}else if(this.syncing?.state===x.PENDING&&t.type!==v.InternalEventType.EXISTING_STATE_RESPONSE){this.debug("handleChannelEvents: Ignoring event while syncing",{channelEvent:e});return}if(this.debug("handleChannelEvents",{channelEvent:e}),this.actor.type===v.ActorType.LEADER){let l=!0;switch(t.type){case v.InternalEventType.EXISTING_STATE_REQUEST:l=!1;let c={type:v.InternalEventType.EXISTING_STATE_RESPONSE,payload:this.state};this.debug("handleChannelEvents: responding to existing state request",{responseEvent:c}),this.emitToChannel(c,{actor:this.actor});break;case v.InternalEventType.LEADER_CREATED:l=!1,this.syncing.state=x.REJECTED,this.debug("handleChannelEvents: erroring due to second leader being created",{event:t}),console.error(F`Detected multiple UniversalStore leaders created with the same id "${this.id}".
|
|
13
13
|
Only one leader can exists at a time, your stores are now in an invalid state.
|
|
14
14
|
Leaders detected:
|
|
15
15
|
this: ${JSON.stringify(this.actor,null,2)}
|
|
16
|
-
other: ${JSON.stringify(o.actor,null,2)}`);break}
|
|
17
|
-
${e}`,JSON.stringify({data:t,actor:this.actor,state:this.state,status:this.status},null,2))}static __reset(){v.preparation.reject(new Error("reset")),v.setupPreparationPromise(),v.isInternalConstructing=!1}};a(h,"UniversalStore"),h.ActorType={LEADER:"LEADER",FOLLOWER:"FOLLOWER"},h.Environment={SERVER:"SERVER",MANAGER:"MANAGER",PREVIEW:"PREVIEW",UNKNOWN:"UNKNOWN",MOCK:"MOCK"},h.InternalEventType={EXISTING_STATE_REQUEST:"__EXISTING_STATE_REQUEST",EXISTING_STATE_RESPONSE:"__EXISTING_STATE_RESPONSE",SET_STATE:"__SET_STATE",LEADER_CREATED:"__LEADER_CREATED",FOLLOWER_CREATED:"__FOLLOWER_CREATED"},h.Status={UNPREPARED:"UNPREPARED",SYNCING:"SYNCING",READY:"READY",ERROR:"ERROR"},h.isInternalConstructing=!1,h.setupPreparationPromise();var $=h,de=a(n=>n.transports!==void 0,"isMulti"),ge=a(()=>Math.random().toString(16).slice(2),"generateRandomId"),ht=class{constructor(e={}){this.sender=ge(),this.events={},this.data={},this.transports=[],this.isAsync=e.async||!1,de(e)?(this.transports=e.transports||[],this.transports.forEach(t=>{t.setHandler(o=>this.handleEvent(o))})):this.transports=e.transport?[e.transport]:[],this.transports.forEach(t=>{t.setHandler(o=>this.handleEvent(o))})}get hasTransport(){return this.transports.length>0}addListener(e,t){this.events[e]=this.events[e]||[],this.events[e].push(t)}emit(e,...t){let o={type:e,args:t,from:this.sender},l={};t.length>=1&&t[0]&&t[0].options&&(l=t[0].options);let c=a(()=>{this.transports.forEach(i=>{i.send(o,l)}),this.handleEvent(o)},"handler");this.isAsync?setImmediate(c):c()}last(e){return this.data[e]}eventNames(){return Object.keys(this.events)}listenerCount(e){let t=this.listeners(e);return t?t.length:0}listeners(e){return this.events[e]||void 0}once(e,t){let o=this.onceListener(e,t);this.addListener(e,o)}removeAllListeners(e){e?this.events[e]&&delete this.events[e]:this.events={}}removeListener(e,t){let o=this.listeners(e);o&&(this.events[e]=o.filter(l=>l!==t))}on(e,t){this.addListener(e,t)}off(e,t){this.removeListener(e,t)}handleEvent(e){let t=this.listeners(e.type);t&&t.length&&t.forEach(o=>{o.apply(e,e.args)}),this.data[e.type]=e.args}onceListener(e,t){let o=a((...l)=>(this.removeListener(e,o),t(...l)),"onceListener");return o}};a(ht,"Channel");var B=ht,ve=Object.create,Ot=Object.defineProperty,me=Object.getOwnPropertyDescriptor,Ct=Object.getOwnPropertyNames,Ee=Object.getPrototypeOf,be=Object.prototype.hasOwnProperty,P=a((n,e)=>a(function(){return e||(0,n[Ct(n)[0]])((e={exports:{}}).exports,e),e.exports},"__require"),"__commonJS"),Se=a((n,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of Ct(e))!be.call(n,l)&&l!==t&&Ot(n,l,{get:a(()=>e[l],"get"),enumerable:!(o=me(e,l))||o.enumerable});return n},"__copyProps"),ot=a((n,e,t)=>(t=n!=null?ve(Ee(n)):{},Se(e||!n||!n.__esModule?Ot(t,"default",{value:n,enumerable:!0}):t,n)),"__toESM"),_e=["bubbles","cancelBubble","cancelable","composed","currentTarget","defaultPrevented","eventPhase","isTrusted","returnValue","srcElement","target","timeStamp","type"],Te=["detail"];function Pt(n){let e=_e.filter(t=>n[t]!==void 0).reduce((t,o)=>({...t,[o]:n[o]}),{});return n instanceof CustomEvent&&Te.filter(t=>n[t]!==void 0).forEach(t=>{e[t]=n[t]}),e}a(Pt,"extractEventHiddenProperties");var Bt=he(xt()),Ft=P({"node_modules/has-symbols/shams.js"(n,e){e.exports=a(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},o=Symbol("test"),l=Object(o);if(typeof o=="string"||Object.prototype.toString.call(o)!=="[object Symbol]"||Object.prototype.toString.call(l)!=="[object Symbol]")return!1;var c=42;t[o]=c;for(o in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==o||!Object.prototype.propertyIsEnumerable.call(t,o))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(t,o);if(u.value!==c||u.enumerable!==!0)return!1}return!0},"hasSymbols")}}),Mt=P({"node_modules/has-symbols/index.js"(n,e){var t=typeof Symbol<"u"&&Symbol,o=Ft();e.exports=a(function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:o()},"hasNativeSymbols")}}),Ae=P({"node_modules/function-bind/implementation.js"(n,e){var t="Function.prototype.bind called on incompatible ",o=Array.prototype.slice,l=Object.prototype.toString,c="[object Function]";e.exports=a(function(i){var u=this;if(typeof u!="function"||l.call(u)!==c)throw new TypeError(t+u);for(var y=o.call(arguments,1),p,m=a(function(){if(this instanceof p){var _=u.apply(this,y.concat(o.call(arguments)));return Object(_)===_?_:this}else return u.apply(i,y.concat(o.call(arguments)))},"binder"),g=Math.max(0,u.length-y.length),d=[],E=0;E<g;E++)d.push("$"+E);if(p=Function("binder","return function ("+d.join(",")+"){ return binder.apply(this,arguments); }")(m),u.prototype){var b=a(function(){},"Empty2");b.prototype=u.prototype,p.prototype=new b,b.prototype=null}return p},"bind")}}),gt=P({"node_modules/function-bind/index.js"(n,e){var t=Ae();e.exports=Function.prototype.bind||t}}),we=P({"node_modules/has/src/index.js"(n,e){var t=gt();e.exports=t.call(Function.call,Object.prototype.hasOwnProperty)}}),$t=P({"node_modules/get-intrinsic/index.js"(n,e){var t,o=SyntaxError,l=Function,c=TypeError,i=a(function(A){try{return l('"use strict"; return ('+A+").constructor;")()}catch{}},"getEvalledConstructor"),u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch{u=null}var y=a(function(){throw new c},"throwTypeError"),p=u?function(){try{return arguments.callee,y}catch{try{return u(arguments,"callee").get}catch{return y}}}():y,m=Mt()(),g=Object.getPrototypeOf||function(A){return A.__proto__},d={},E=typeof Uint8Array>"u"?t:g(Uint8Array),b={"%AggregateError%":typeof AggregateError>"u"?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?t:ArrayBuffer,"%ArrayIteratorPrototype%":m?g([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":typeof Atomics>"u"?t:Atomics,"%BigInt%":typeof BigInt>"u"?t:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?t:Float32Array,"%Float64Array%":typeof Float64Array>"u"?t:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?t:FinalizationRegistry,"%Function%":l,"%GeneratorFunction%":d,"%Int8Array%":typeof Int8Array>"u"?t:Int8Array,"%Int16Array%":typeof Int16Array>"u"?t:Int16Array,"%Int32Array%":typeof Int32Array>"u"?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":m?g(g([][Symbol.iterator]())):t,"%JSON%":typeof JSON=="object"?JSON:t,"%Map%":typeof Map>"u"?t:Map,"%MapIteratorPrototype%":typeof Map>"u"||!m?t:g(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?t:Promise,"%Proxy%":typeof Proxy>"u"?t:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?t:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?t:Set,"%SetIteratorPrototype%":typeof Set>"u"||!m?t:g(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":m?g(""[Symbol.iterator]()):t,"%Symbol%":m?Symbol:t,"%SyntaxError%":o,"%ThrowTypeError%":p,"%TypedArray%":E,"%TypeError%":c,"%Uint8Array%":typeof Uint8Array>"u"?t:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?t:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?t:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?t:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?t:WeakMap,"%WeakRef%":typeof WeakRef>"u"?t:WeakRef,"%WeakSet%":typeof WeakSet>"u"?t:WeakSet},_=a(function A(T){var w;if(T==="%AsyncFunction%")w=i("async function () {}");else if(T==="%GeneratorFunction%")w=i("function* () {}");else if(T==="%AsyncGeneratorFunction%")w=i("async function* () {}");else if(T==="%AsyncGenerator%"){var I=A("%AsyncGeneratorFunction%");I&&(w=I.prototype)}else if(T==="%AsyncIteratorPrototype%"){var C=A("%AsyncGenerator%");C&&(w=g(C.prototype))}return b[T]=w,w},"doEval2"),L={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},O=gt(),D=we(),N=O.call(Function.call,Array.prototype.concat),R=O.call(Function.apply,Array.prototype.splice),tt=O.call(Function.call,String.prototype.replace),Z=O.call(Function.call,String.prototype.slice),rt=O.call(Function.call,RegExp.prototype.exec),nt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,pt=/\\(\\)?/g,yt=a(function(A){var T=Z(A,0,1),w=Z(A,-1);if(T==="%"&&w!=="%")throw new o("invalid intrinsic syntax, expected closing `%`");if(w==="%"&&T!=="%")throw new o("invalid intrinsic syntax, expected opening `%`");var I=[];return tt(A,nt,function(C,z,j,ee){I[I.length]=j?tt(ee,pt,"$1"):z||C}),I},"stringToPath3"),It=a(function(A,T){var w=A,I;if(D(L,w)&&(I=L[w],w="%"+I[0]+"%"),D(b,w)){var C=b[w];if(C===d&&(C=_(w)),typeof C>"u"&&!T)throw new c("intrinsic "+A+" exists, but is not available. Please file an issue!");return{alias:I,name:w,value:C}}throw new o("intrinsic "+A+" does not exist!")},"getBaseIntrinsic2");e.exports=a(function(A,T){if(typeof A!="string"||A.length===0)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof T!="boolean")throw new c('"allowMissing" argument must be a boolean');if(rt(/^%?[^%]*%?$/,A)===null)throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var w=yt(A),I=w.length>0?w[0]:"",C=It("%"+I+"%",T),z=C.name,j=C.value,ee=!1,et=C.alias;et&&(I=et[0],R(w,N([0,1],et)));for(var re=1,Q=!0;re<w.length;re+=1){var M=w[re],ne=Z(M,0,1),oe=Z(M,-1);if((ne==='"'||ne==="'"||ne==="`"||oe==='"'||oe==="'"||oe==="`")&&ne!==oe)throw new o("property names with quotes must have matching quotes");if((M==="constructor"||!Q)&&(ee=!0),I+="."+M,z="%"+I+"%",D(b,z))j=b[z];else if(j!=null){if(!(M in j)){if(!T)throw new c("base intrinsic for "+A+" exists, but the property is not available.");return}if(u&&re+1>=w.length){var ie=u(j,M);Q=!!ie,Q&&"get"in ie&&!("originalValue"in ie.get)?j=ie.get:j=j[M]}else Q=D(j,M),j=j[M];Q&&!ee&&(b[z]=j)}}return j},"GetIntrinsic")}}),Oe=P({"node_modules/call-bind/index.js"(n,e){var t=gt(),o=$t(),l=o("%Function.prototype.apply%"),c=o("%Function.prototype.call%"),i=o("%Reflect.apply%",!0)||t.call(c,l),u=o("%Object.getOwnPropertyDescriptor%",!0),y=o("%Object.defineProperty%",!0),p=o("%Math.max%");if(y)try{y({},"a",{value:1})}catch{y=null}e.exports=a(function(g){var d=i(t,c,arguments);if(u&&y){var E=u(d,"length");E.configurable&&y(d,"length",{value:1+p(0,g.length-(arguments.length-1))})}return d},"callBind");var m=a(function(){return i(t,l,arguments)},"applyBind2");y?y(e.exports,"apply",{value:m}):e.exports.apply=m}}),Ce=P({"node_modules/call-bind/callBound.js"(n,e){var t=$t(),o=Oe(),l=o(t("String.prototype.indexOf"));e.exports=a(function(c,i){var u=t(c,!!i);return typeof u=="function"&&l(c,".prototype.")>-1?o(u):u},"callBoundIntrinsic")}}),Pe=P({"node_modules/has-tostringtag/shams.js"(n,e){var t=Ft();e.exports=a(function(){return t()&&!!Symbol.toStringTag},"hasToStringTagShams")}}),Ie=P({"node_modules/is-regex/index.js"(n,e){var t=Ce(),o=Pe()(),l,c,i,u;o&&(l=t("Object.prototype.hasOwnProperty"),c=t("RegExp.prototype.exec"),i={},y=a(function(){throw i},"throwRegexMarker"),u={toString:y,valueOf:y},typeof Symbol.toPrimitive=="symbol"&&(u[Symbol.toPrimitive]=y));var y,p=t("Object.prototype.toString"),m=Object.getOwnPropertyDescriptor,g="[object RegExp]";e.exports=a(o?function(d){if(!d||typeof d!="object")return!1;var E=m(d,"lastIndex"),b=E&&l(E,"value");if(!b)return!1;try{c(d,u)}catch(_){return _===i}}:function(d){return!d||typeof d!="object"&&typeof d!="function"?!1:p(d)===g},"isRegex")}}),xe=P({"node_modules/is-function/index.js"(n,e){e.exports=o;var t=Object.prototype.toString;function o(l){if(!l)return!1;var c=t.call(l);return c==="[object Function]"||typeof l=="function"&&c!=="[object RegExp]"||typeof window<"u"&&(l===window.setTimeout||l===window.alert||l===window.confirm||l===window.prompt)}a(o,"isFunction3")}}),Re=P({"node_modules/is-symbol/index.js"(n,e){var t=Object.prototype.toString,o=Mt()();o?(l=Symbol.prototype.toString,c=/^Symbol\(.*\)$/,i=a(function(u){return typeof u.valueOf()!="symbol"?!1:c.test(l.call(u))},"isRealSymbolObject"),e.exports=a(function(u){if(typeof u=="symbol")return!0;if(t.call(u)!=="[object Symbol]")return!1;try{return i(u)}catch{return!1}},"isSymbol3")):e.exports=a(function(u){return!1},"isSymbol3");var l,c,i}}),Ne=ot(Ie()),je=ot(xe()),Le=ot(Re());function De(n){return n!=null&&typeof n=="object"&&Array.isArray(n)===!1}a(De,"isObject");var Fe=typeof global=="object"&&global&&global.Object===Object&&global,Me=Fe,$e=typeof self=="object"&&self&&self.Object===Object&&self,Ue=Me||$e||Function("return this")(),vt=Ue,ke=vt.Symbol,U=ke,Ut=Object.prototype,Ge=Ut.hasOwnProperty,We=Ut.toString,q=U?U.toStringTag:void 0;function ze(n){var e=Ge.call(n,q),t=n[q];try{n[q]=void 0;var o=!0}catch{}var l=We.call(n);return o&&(e?n[q]=t:delete n[q]),l}a(ze,"getRawTag");var He=ze,Be=Object.prototype,qe=Be.toString;function Ve(n){return qe.call(n)}a(Ve,"objectToString");var Je=Ve,Ke="[object Null]",Ye="[object Undefined]",Rt=U?U.toStringTag:void 0;function Xe(n){return n==null?n===void 0?Ye:Ke:Rt&&Rt in Object(n)?He(n):Je(n)}a(Xe,"baseGetTag");var kt=Xe;function Qe(n){return n!=null&&typeof n=="object"}a(Qe,"isObjectLike");var Ze=Qe,tr="[object Symbol]";function er(n){return typeof n=="symbol"||Ze(n)&&kt(n)==tr}a(er,"isSymbol");var mt=er;function rr(n,e){for(var t=-1,o=n==null?0:n.length,l=Array(o);++t<o;)l[t]=e(n[t],t,n);return l}a(rr,"arrayMap");var nr=rr,or=Array.isArray,Et=or,Nt=U?U.prototype:void 0,jt=Nt?Nt.toString:void 0;function Gt(n){if(typeof n=="string")return n;if(Et(n))return nr(n,Gt)+"";if(mt(n))return jt?jt.call(n):"";var e=n+"";return e=="0"&&1/n==-1/0?"-0":e}a(Gt,"baseToString");var ar=Gt;function sr(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}a(sr,"isObject2");var Wt=sr,lr="[object AsyncFunction]",cr="[object Function]",pr="[object GeneratorFunction]",ur="[object Proxy]";function fr(n){if(!Wt(n))return!1;var e=kt(n);return e==cr||e==pr||e==lr||e==ur}a(fr,"isFunction");var hr=fr,yr=vt["__core-js_shared__"],dt=yr,Lt=function(){var n=/[^.]+$/.exec(dt&&dt.keys&&dt.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function dr(n){return!!Lt&&Lt in n}a(dr,"isMasked");var gr=dr,vr=Function.prototype,mr=vr.toString;function Er(n){if(n!=null){try{return mr.call(n)}catch{}try{return n+""}catch{}}return""}a(Er,"toSource");var br=Er,Sr=/[\\^$.*+?()[\]{}|]/g,_r=/^\[object .+?Constructor\]$/,Tr=Function.prototype,Ar=Object.prototype,wr=Tr.toString,Or=Ar.hasOwnProperty,Cr=RegExp("^"+wr.call(Or).replace(Sr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Pr(n){if(!Wt(n)||gr(n))return!1;var e=hr(n)?Cr:_r;return e.test(br(n))}a(Pr,"baseIsNative");var Ir=Pr;function xr(n,e){return n==null?void 0:n[e]}a(xr,"getValue");var Rr=xr;function Nr(n,e){var t=Rr(n,e);return Ir(t)?t:void 0}a(Nr,"getNative");var zt=Nr;function jr(n,e){return n===e||n!==n&&e!==e}a(jr,"eq");var Lr=jr,Dr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fr=/^\w*$/;function Mr(n,e){if(Et(n))return!1;var t=typeof n;return t=="number"||t=="symbol"||t=="boolean"||n==null||mt(n)?!0:Fr.test(n)||!Dr.test(n)||e!=null&&n in Object(e)}a(Mr,"isKey");var $r=Mr,Ur=zt(Object,"create"),V=Ur;function kr(){this.__data__=V?V(null):{},this.size=0}a(kr,"hashClear");var Gr=kr;function Wr(n){var e=this.has(n)&&delete this.__data__[n];return this.size-=e?1:0,e}a(Wr,"hashDelete");var zr=Wr,Hr="__lodash_hash_undefined__",Br=Object.prototype,qr=Br.hasOwnProperty;function Vr(n){var e=this.__data__;if(V){var t=e[n];return t===Hr?void 0:t}return qr.call(e,n)?e[n]:void 0}a(Vr,"hashGet");var Jr=Vr,Kr=Object.prototype,Yr=Kr.hasOwnProperty;function Xr(n){var e=this.__data__;return V?e[n]!==void 0:Yr.call(e,n)}a(Xr,"hashHas");var Qr=Xr,Zr="__lodash_hash_undefined__";function tn(n,e){var t=this.__data__;return this.size+=this.has(n)?0:1,t[n]=V&&e===void 0?Zr:e,this}a(tn,"hashSet");var en=tn;function k(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var o=n[e];this.set(o[0],o[1])}}a(k,"Hash");k.prototype.clear=Gr;k.prototype.delete=zr;k.prototype.get=Jr;k.prototype.has=Qr;k.prototype.set=en;var Dt=k;function rn(){this.__data__=[],this.size=0}a(rn,"listCacheClear");var nn=rn;function on(n,e){for(var t=n.length;t--;)if(Lr(n[t][0],e))return t;return-1}a(on,"assocIndexOf");var at=on,an=Array.prototype,sn=an.splice;function ln(n){var e=this.__data__,t=at(e,n);if(t<0)return!1;var o=e.length-1;return t==o?e.pop():sn.call(e,t,1),--this.size,!0}a(ln,"listCacheDelete");var cn=ln;function pn(n){var e=this.__data__,t=at(e,n);return t<0?void 0:e[t][1]}a(pn,"listCacheGet");var un=pn;function fn(n){return at(this.__data__,n)>-1}a(fn,"listCacheHas");var hn=fn;function yn(n,e){var t=this.__data__,o=at(t,n);return o<0?(++this.size,t.push([n,e])):t[o][1]=e,this}a(yn,"listCacheSet");var dn=yn;function G(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var o=n[e];this.set(o[0],o[1])}}a(G,"ListCache");G.prototype.clear=nn;G.prototype.delete=cn;G.prototype.get=un;G.prototype.has=hn;G.prototype.set=dn;var gn=G,vn=zt(vt,"Map"),mn=vn;function En(){this.size=0,this.__data__={hash:new Dt,map:new(mn||gn),string:new Dt}}a(En,"mapCacheClear");var bn=En;function Sn(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null}a(Sn,"isKeyable");var _n=Sn;function Tn(n,e){var t=n.__data__;return _n(e)?t[typeof e=="string"?"string":"hash"]:t.map}a(Tn,"getMapData");var st=Tn;function An(n){var e=st(this,n).delete(n);return this.size-=e?1:0,e}a(An,"mapCacheDelete");var wn=An;function On(n){return st(this,n).get(n)}a(On,"mapCacheGet");var Cn=On;function Pn(n){return st(this,n).has(n)}a(Pn,"mapCacheHas");var In=Pn;function xn(n,e){var t=st(this,n),o=t.size;return t.set(n,e),this.size+=t.size==o?0:1,this}a(xn,"mapCacheSet");var Rn=xn;function W(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var o=n[e];this.set(o[0],o[1])}}a(W,"MapCache");W.prototype.clear=bn;W.prototype.delete=wn;W.prototype.get=Cn;W.prototype.has=In;W.prototype.set=Rn;var Ht=W,Nn="Expected a function";function bt(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new TypeError(Nn);var t=a(function(){var o=arguments,l=e?e.apply(this,o):o[0],c=t.cache;if(c.has(l))return c.get(l);var i=n.apply(this,o);return t.cache=c.set(l,i)||c,i},"memoized");return t.cache=new(bt.Cache||Ht),t}a(bt,"memoize");bt.Cache=Ht;var jn=bt,Ln=500;function Dn(n){var e=jn(n,function(o){return t.size===Ln&&t.clear(),o}),t=e.cache;return e}a(Dn,"memoizeCapped");var Fn=Dn,Mn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$n=/\\(\\)?/g,Un=Fn(function(n){var e=[];return n.charCodeAt(0)===46&&e.push(""),n.replace(Mn,function(t,o,l,c){e.push(l?c.replace($n,"$1"):o||t)}),e}),kn=Un;function Gn(n){return n==null?"":ar(n)}a(Gn,"toString");var Wn=Gn;function zn(n,e){return Et(n)?n:$r(n,e)?[n]:kn(Wn(n))}a(zn,"castPath");var Hn=zn;function qn(n){if(typeof n=="string"||mt(n))return n;var e=n+"";return e=="0"&&1/n==-1/0?"-0":e}a(qn,"toKey");var Vn=qn;function Jn(n,e){e=Hn(e,n);for(var t=0,o=e.length;n!=null&&t<o;)n=n[Vn(e[t++])];return t&&t==o?n:void 0}a(Jn,"baseGet");var Kn=Jn;function Yn(n,e,t){var o=n==null?void 0:Kn(n,e);return o===void 0?t:o}a(Yn,"get");var Xn=Yn,it=De,Qn=a(n=>{let e=null,t=!1,o=!1,l=!1,c="";if(n.indexOf("//")>=0||n.indexOf("/*")>=0)for(let i=0;i<n.length;i+=1)!e&&!t&&!o&&!l?n[i]==='"'||n[i]==="'"||n[i]==="`"?e=n[i]:n[i]==="/"&&n[i+1]==="*"?t=!0:n[i]==="/"&&n[i+1]==="/"?o=!0:n[i]==="/"&&n[i+1]!=="/"&&(l=!0):(e&&(n[i]===e&&n[i-1]!=="\\"||n[i]===`
|
|
16
|
+
other: ${JSON.stringify(o.actor,null,2)}`);break}l&&(this.debug("handleChannelEvents: forwarding event",{channelEvent:e}),this.emitToChannel(t,{actor:o.actor,forwardingActor:this.actor}))}if(this.actor.type===v.ActorType.FOLLOWER)switch(t.type){case v.InternalEventType.EXISTING_STATE_RESPONSE:if(this.debug("handleChannelEvents: Setting state from leader's existing state response",{event:t}),this.syncing?.state!==x.PENDING)break;this.syncing.resolve?.();let l={type:v.InternalEventType.SET_STATE,payload:{state:t.payload,previousState:this.state}};this.state=t.payload,this.emitToListeners(l,o);break}switch(t.type){case v.InternalEventType.SET_STATE:this.debug("handleChannelEvents: Setting state",{event:t}),this.state=t.payload.state;break}this.emitToListeners(t,{actor:o.actor})}debug(e,t){this.debugging&&console.debug(F`[UniversalStore::${this.id}::${this.environment??v.Environment.UNKNOWN}]
|
|
17
|
+
${e}`,JSON.stringify({data:t,actor:this.actor,state:this.state,status:this.status},null,2))}static __reset(){v.preparation.reject(new Error("reset")),v.setupPreparationPromise(),v.isInternalConstructing=!1}};a(h,"UniversalStore"),h.ActorType={LEADER:"LEADER",FOLLOWER:"FOLLOWER"},h.Environment={SERVER:"SERVER",MANAGER:"MANAGER",PREVIEW:"PREVIEW",UNKNOWN:"UNKNOWN",MOCK:"MOCK"},h.InternalEventType={EXISTING_STATE_REQUEST:"__EXISTING_STATE_REQUEST",EXISTING_STATE_RESPONSE:"__EXISTING_STATE_RESPONSE",SET_STATE:"__SET_STATE",LEADER_CREATED:"__LEADER_CREATED",FOLLOWER_CREATED:"__FOLLOWER_CREATED"},h.Status={UNPREPARED:"UNPREPARED",SYNCING:"SYNCING",READY:"READY",ERROR:"ERROR"},h.isInternalConstructing=!1,h.setupPreparationPromise();var $=h,de=a(n=>n.transports!==void 0,"isMulti"),ge=a(()=>Math.random().toString(16).slice(2),"generateRandomId"),ht=class{constructor(e={}){this.sender=ge(),this.events={},this.data={},this.transports=[],this.isAsync=e.async||!1,de(e)?(this.transports=e.transports||[],this.transports.forEach(t=>{t.setHandler(o=>this.handleEvent(o))})):this.transports=e.transport?[e.transport]:[],this.transports.forEach(t=>{t.setHandler(o=>this.handleEvent(o))})}get hasTransport(){return this.transports.length>0}addListener(e,t){this.events[e]=this.events[e]||[],this.events[e].push(t)}emit(e,...t){let o={type:e,args:t,from:this.sender},l={};t.length>=1&&t[0]&&t[0].options&&(l=t[0].options);let c=a(()=>{this.transports.forEach(i=>{i.send(o,l)}),this.handleEvent(o)},"handler");this.isAsync?setImmediate(c):c()}last(e){return this.data[e]}eventNames(){return Object.keys(this.events)}listenerCount(e){let t=this.listeners(e);return t?t.length:0}listeners(e){return this.events[e]||void 0}once(e,t){let o=this.onceListener(e,t);this.addListener(e,o)}removeAllListeners(e){e?this.events[e]&&delete this.events[e]:this.events={}}removeListener(e,t){let o=this.listeners(e);o&&(this.events[e]=o.filter(l=>l!==t))}on(e,t){this.addListener(e,t)}off(e,t){this.removeListener(e,t)}handleEvent(e){let t=this.listeners(e.type);t&&t.length&&t.forEach(o=>{o.apply(e,e.args)}),this.data[e.type]=e.args}onceListener(e,t){let o=a((...l)=>(this.removeListener(e,o),t(...l)),"onceListener");return o}};a(ht,"Channel");var B=ht,ve=Object.create,Ot=Object.defineProperty,me=Object.getOwnPropertyDescriptor,Ct=Object.getOwnPropertyNames,Ee=Object.getPrototypeOf,be=Object.prototype.hasOwnProperty,P=a((n,e)=>a(function(){return e||(0,n[Ct(n)[0]])((e={exports:{}}).exports,e),e.exports},"__require"),"__commonJS"),Se=a((n,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of Ct(e))!be.call(n,l)&&l!==t&&Ot(n,l,{get:a(()=>e[l],"get"),enumerable:!(o=me(e,l))||o.enumerable});return n},"__copyProps"),ot=a((n,e,t)=>(t=n!=null?ve(Ee(n)):{},Se(e||!n||!n.__esModule?Ot(t,"default",{value:n,enumerable:!0}):t,n)),"__toESM"),_e=["bubbles","cancelBubble","cancelable","composed","currentTarget","defaultPrevented","eventPhase","isTrusted","returnValue","srcElement","target","timeStamp","type"],Te=["detail"];function Pt(n){let e=_e.filter(t=>n[t]!==void 0).reduce((t,o)=>({...t,[o]:n[o]}),{});return n instanceof CustomEvent&&Te.filter(t=>n[t]!==void 0).forEach(t=>{e[t]=n[t]}),e}a(Pt,"extractEventHiddenProperties");var Bt=he(xt()),Ft=P({"node_modules/has-symbols/shams.js"(n,e){e.exports=a(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},o=Symbol("test"),l=Object(o);if(typeof o=="string"||Object.prototype.toString.call(o)!=="[object Symbol]"||Object.prototype.toString.call(l)!=="[object Symbol]")return!1;var c=42;t[o]=c;for(o in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==o||!Object.prototype.propertyIsEnumerable.call(t,o))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(t,o);if(u.value!==c||u.enumerable!==!0)return!1}return!0},"hasSymbols")}}),Mt=P({"node_modules/has-symbols/index.js"(n,e){var t=typeof Symbol<"u"&&Symbol,o=Ft();e.exports=a(function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:o()},"hasNativeSymbols")}}),Ae=P({"node_modules/function-bind/implementation.js"(n,e){var t="Function.prototype.bind called on incompatible ",o=Array.prototype.slice,l=Object.prototype.toString,c="[object Function]";e.exports=a(function(i){var u=this;if(typeof u!="function"||l.call(u)!==c)throw new TypeError(t+u);for(var y=o.call(arguments,1),p,E=a(function(){if(this instanceof p){var _=u.apply(this,y.concat(o.call(arguments)));return Object(_)===_?_:this}else return u.apply(i,y.concat(o.call(arguments)))},"binder"),g=Math.max(0,u.length-y.length),d=[],m=0;m<g;m++)d.push("$"+m);if(p=Function("binder","return function ("+d.join(",")+"){ return binder.apply(this,arguments); }")(E),u.prototype){var b=a(function(){},"Empty2");b.prototype=u.prototype,p.prototype=new b,b.prototype=null}return p},"bind")}}),gt=P({"node_modules/function-bind/index.js"(n,e){var t=Ae();e.exports=Function.prototype.bind||t}}),we=P({"node_modules/has/src/index.js"(n,e){var t=gt();e.exports=t.call(Function.call,Object.prototype.hasOwnProperty)}}),$t=P({"node_modules/get-intrinsic/index.js"(n,e){var t,o=SyntaxError,l=Function,c=TypeError,i=a(function(A){try{return l('"use strict"; return ('+A+").constructor;")()}catch{}},"getEvalledConstructor"),u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch{u=null}var y=a(function(){throw new c},"throwTypeError"),p=u?function(){try{return arguments.callee,y}catch{try{return u(arguments,"callee").get}catch{return y}}}():y,E=Mt()(),g=Object.getPrototypeOf||function(A){return A.__proto__},d={},m=typeof Uint8Array>"u"?t:g(Uint8Array),b={"%AggregateError%":typeof AggregateError>"u"?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?t:ArrayBuffer,"%ArrayIteratorPrototype%":E?g([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":typeof Atomics>"u"?t:Atomics,"%BigInt%":typeof BigInt>"u"?t:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?t:Float32Array,"%Float64Array%":typeof Float64Array>"u"?t:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?t:FinalizationRegistry,"%Function%":l,"%GeneratorFunction%":d,"%Int8Array%":typeof Int8Array>"u"?t:Int8Array,"%Int16Array%":typeof Int16Array>"u"?t:Int16Array,"%Int32Array%":typeof Int32Array>"u"?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":E?g(g([][Symbol.iterator]())):t,"%JSON%":typeof JSON=="object"?JSON:t,"%Map%":typeof Map>"u"?t:Map,"%MapIteratorPrototype%":typeof Map>"u"||!E?t:g(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?t:Promise,"%Proxy%":typeof Proxy>"u"?t:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?t:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?t:Set,"%SetIteratorPrototype%":typeof Set>"u"||!E?t:g(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E?g(""[Symbol.iterator]()):t,"%Symbol%":E?Symbol:t,"%SyntaxError%":o,"%ThrowTypeError%":p,"%TypedArray%":m,"%TypeError%":c,"%Uint8Array%":typeof Uint8Array>"u"?t:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?t:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?t:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?t:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?t:WeakMap,"%WeakRef%":typeof WeakRef>"u"?t:WeakRef,"%WeakSet%":typeof WeakSet>"u"?t:WeakSet},_=a(function A(T){var w;if(T==="%AsyncFunction%")w=i("async function () {}");else if(T==="%GeneratorFunction%")w=i("function* () {}");else if(T==="%AsyncGeneratorFunction%")w=i("async function* () {}");else if(T==="%AsyncGenerator%"){var I=A("%AsyncGeneratorFunction%");I&&(w=I.prototype)}else if(T==="%AsyncIteratorPrototype%"){var C=A("%AsyncGenerator%");C&&(w=g(C.prototype))}return b[T]=w,w},"doEval2"),L={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},O=gt(),D=we(),N=O.call(Function.call,Array.prototype.concat),R=O.call(Function.apply,Array.prototype.splice),tt=O.call(Function.call,String.prototype.replace),Z=O.call(Function.call,String.prototype.slice),rt=O.call(Function.call,RegExp.prototype.exec),nt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,pt=/\\(\\)?/g,yt=a(function(A){var T=Z(A,0,1),w=Z(A,-1);if(T==="%"&&w!=="%")throw new o("invalid intrinsic syntax, expected closing `%`");if(w==="%"&&T!=="%")throw new o("invalid intrinsic syntax, expected opening `%`");var I=[];return tt(A,nt,function(C,z,j,ee){I[I.length]=j?tt(ee,pt,"$1"):z||C}),I},"stringToPath3"),It=a(function(A,T){var w=A,I;if(D(L,w)&&(I=L[w],w="%"+I[0]+"%"),D(b,w)){var C=b[w];if(C===d&&(C=_(w)),typeof C>"u"&&!T)throw new c("intrinsic "+A+" exists, but is not available. Please file an issue!");return{alias:I,name:w,value:C}}throw new o("intrinsic "+A+" does not exist!")},"getBaseIntrinsic2");e.exports=a(function(A,T){if(typeof A!="string"||A.length===0)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof T!="boolean")throw new c('"allowMissing" argument must be a boolean');if(rt(/^%?[^%]*%?$/,A)===null)throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var w=yt(A),I=w.length>0?w[0]:"",C=It("%"+I+"%",T),z=C.name,j=C.value,ee=!1,et=C.alias;et&&(I=et[0],R(w,N([0,1],et)));for(var re=1,Q=!0;re<w.length;re+=1){var M=w[re],ne=Z(M,0,1),oe=Z(M,-1);if((ne==='"'||ne==="'"||ne==="`"||oe==='"'||oe==="'"||oe==="`")&&ne!==oe)throw new o("property names with quotes must have matching quotes");if((M==="constructor"||!Q)&&(ee=!0),I+="."+M,z="%"+I+"%",D(b,z))j=b[z];else if(j!=null){if(!(M in j)){if(!T)throw new c("base intrinsic for "+A+" exists, but the property is not available.");return}if(u&&re+1>=w.length){var ie=u(j,M);Q=!!ie,Q&&"get"in ie&&!("originalValue"in ie.get)?j=ie.get:j=j[M]}else Q=D(j,M),j=j[M];Q&&!ee&&(b[z]=j)}}return j},"GetIntrinsic")}}),Oe=P({"node_modules/call-bind/index.js"(n,e){var t=gt(),o=$t(),l=o("%Function.prototype.apply%"),c=o("%Function.prototype.call%"),i=o("%Reflect.apply%",!0)||t.call(c,l),u=o("%Object.getOwnPropertyDescriptor%",!0),y=o("%Object.defineProperty%",!0),p=o("%Math.max%");if(y)try{y({},"a",{value:1})}catch{y=null}e.exports=a(function(g){var d=i(t,c,arguments);if(u&&y){var m=u(d,"length");m.configurable&&y(d,"length",{value:1+p(0,g.length-(arguments.length-1))})}return d},"callBind");var E=a(function(){return i(t,l,arguments)},"applyBind2");y?y(e.exports,"apply",{value:E}):e.exports.apply=E}}),Ce=P({"node_modules/call-bind/callBound.js"(n,e){var t=$t(),o=Oe(),l=o(t("String.prototype.indexOf"));e.exports=a(function(c,i){var u=t(c,!!i);return typeof u=="function"&&l(c,".prototype.")>-1?o(u):u},"callBoundIntrinsic")}}),Pe=P({"node_modules/has-tostringtag/shams.js"(n,e){var t=Ft();e.exports=a(function(){return t()&&!!Symbol.toStringTag},"hasToStringTagShams")}}),Ie=P({"node_modules/is-regex/index.js"(n,e){var t=Ce(),o=Pe()(),l,c,i,u;o&&(l=t("Object.prototype.hasOwnProperty"),c=t("RegExp.prototype.exec"),i={},y=a(function(){throw i},"throwRegexMarker"),u={toString:y,valueOf:y},typeof Symbol.toPrimitive=="symbol"&&(u[Symbol.toPrimitive]=y));var y,p=t("Object.prototype.toString"),E=Object.getOwnPropertyDescriptor,g="[object RegExp]";e.exports=a(o?function(d){if(!d||typeof d!="object")return!1;var m=E(d,"lastIndex"),b=m&&l(m,"value");if(!b)return!1;try{c(d,u)}catch(_){return _===i}}:function(d){return!d||typeof d!="object"&&typeof d!="function"?!1:p(d)===g},"isRegex")}}),xe=P({"node_modules/is-function/index.js"(n,e){e.exports=o;var t=Object.prototype.toString;function o(l){if(!l)return!1;var c=t.call(l);return c==="[object Function]"||typeof l=="function"&&c!=="[object RegExp]"||typeof window<"u"&&(l===window.setTimeout||l===window.alert||l===window.confirm||l===window.prompt)}a(o,"isFunction3")}}),Re=P({"node_modules/is-symbol/index.js"(n,e){var t=Object.prototype.toString,o=Mt()();o?(l=Symbol.prototype.toString,c=/^Symbol\(.*\)$/,i=a(function(u){return typeof u.valueOf()!="symbol"?!1:c.test(l.call(u))},"isRealSymbolObject"),e.exports=a(function(u){if(typeof u=="symbol")return!0;if(t.call(u)!=="[object Symbol]")return!1;try{return i(u)}catch{return!1}},"isSymbol3")):e.exports=a(function(u){return!1},"isSymbol3");var l,c,i}}),Ne=ot(Ie()),je=ot(xe()),Le=ot(Re());function De(n){return n!=null&&typeof n=="object"&&Array.isArray(n)===!1}a(De,"isObject");var Fe=typeof global=="object"&&global&&global.Object===Object&&global,Me=Fe,$e=typeof self=="object"&&self&&self.Object===Object&&self,Ue=Me||$e||Function("return this")(),vt=Ue,ke=vt.Symbol,U=ke,Ut=Object.prototype,Ge=Ut.hasOwnProperty,We=Ut.toString,q=U?U.toStringTag:void 0;function ze(n){var e=Ge.call(n,q),t=n[q];try{n[q]=void 0;var o=!0}catch{}var l=We.call(n);return o&&(e?n[q]=t:delete n[q]),l}a(ze,"getRawTag");var He=ze,Be=Object.prototype,qe=Be.toString;function Ve(n){return qe.call(n)}a(Ve,"objectToString");var Je=Ve,Ke="[object Null]",Ye="[object Undefined]",Rt=U?U.toStringTag:void 0;function Xe(n){return n==null?n===void 0?Ye:Ke:Rt&&Rt in Object(n)?He(n):Je(n)}a(Xe,"baseGetTag");var kt=Xe;function Qe(n){return n!=null&&typeof n=="object"}a(Qe,"isObjectLike");var Ze=Qe,tr="[object Symbol]";function er(n){return typeof n=="symbol"||Ze(n)&&kt(n)==tr}a(er,"isSymbol");var mt=er;function rr(n,e){for(var t=-1,o=n==null?0:n.length,l=Array(o);++t<o;)l[t]=e(n[t],t,n);return l}a(rr,"arrayMap");var nr=rr,or=Array.isArray,Et=or,Nt=U?U.prototype:void 0,jt=Nt?Nt.toString:void 0;function Gt(n){if(typeof n=="string")return n;if(Et(n))return nr(n,Gt)+"";if(mt(n))return jt?jt.call(n):"";var e=n+"";return e=="0"&&1/n==-1/0?"-0":e}a(Gt,"baseToString");var ar=Gt;function sr(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}a(sr,"isObject2");var Wt=sr,lr="[object AsyncFunction]",cr="[object Function]",pr="[object GeneratorFunction]",ur="[object Proxy]";function fr(n){if(!Wt(n))return!1;var e=kt(n);return e==cr||e==pr||e==lr||e==ur}a(fr,"isFunction");var hr=fr,yr=vt["__core-js_shared__"],dt=yr,Lt=function(){var n=/[^.]+$/.exec(dt&&dt.keys&&dt.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function dr(n){return!!Lt&&Lt in n}a(dr,"isMasked");var gr=dr,vr=Function.prototype,mr=vr.toString;function Er(n){if(n!=null){try{return mr.call(n)}catch{}try{return n+""}catch{}}return""}a(Er,"toSource");var br=Er,Sr=/[\\^$.*+?()[\]{}|]/g,_r=/^\[object .+?Constructor\]$/,Tr=Function.prototype,Ar=Object.prototype,wr=Tr.toString,Or=Ar.hasOwnProperty,Cr=RegExp("^"+wr.call(Or).replace(Sr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Pr(n){if(!Wt(n)||gr(n))return!1;var e=hr(n)?Cr:_r;return e.test(br(n))}a(Pr,"baseIsNative");var Ir=Pr;function xr(n,e){return n?.[e]}a(xr,"getValue");var Rr=xr;function Nr(n,e){var t=Rr(n,e);return Ir(t)?t:void 0}a(Nr,"getNative");var zt=Nr;function jr(n,e){return n===e||n!==n&&e!==e}a(jr,"eq");var Lr=jr,Dr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fr=/^\w*$/;function Mr(n,e){if(Et(n))return!1;var t=typeof n;return t=="number"||t=="symbol"||t=="boolean"||n==null||mt(n)?!0:Fr.test(n)||!Dr.test(n)||e!=null&&n in Object(e)}a(Mr,"isKey");var $r=Mr,Ur=zt(Object,"create"),V=Ur;function kr(){this.__data__=V?V(null):{},this.size=0}a(kr,"hashClear");var Gr=kr;function Wr(n){var e=this.has(n)&&delete this.__data__[n];return this.size-=e?1:0,e}a(Wr,"hashDelete");var zr=Wr,Hr="__lodash_hash_undefined__",Br=Object.prototype,qr=Br.hasOwnProperty;function Vr(n){var e=this.__data__;if(V){var t=e[n];return t===Hr?void 0:t}return qr.call(e,n)?e[n]:void 0}a(Vr,"hashGet");var Jr=Vr,Kr=Object.prototype,Yr=Kr.hasOwnProperty;function Xr(n){var e=this.__data__;return V?e[n]!==void 0:Yr.call(e,n)}a(Xr,"hashHas");var Qr=Xr,Zr="__lodash_hash_undefined__";function tn(n,e){var t=this.__data__;return this.size+=this.has(n)?0:1,t[n]=V&&e===void 0?Zr:e,this}a(tn,"hashSet");var en=tn;function k(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var o=n[e];this.set(o[0],o[1])}}a(k,"Hash");k.prototype.clear=Gr;k.prototype.delete=zr;k.prototype.get=Jr;k.prototype.has=Qr;k.prototype.set=en;var Dt=k;function rn(){this.__data__=[],this.size=0}a(rn,"listCacheClear");var nn=rn;function on(n,e){for(var t=n.length;t--;)if(Lr(n[t][0],e))return t;return-1}a(on,"assocIndexOf");var at=on,an=Array.prototype,sn=an.splice;function ln(n){var e=this.__data__,t=at(e,n);if(t<0)return!1;var o=e.length-1;return t==o?e.pop():sn.call(e,t,1),--this.size,!0}a(ln,"listCacheDelete");var cn=ln;function pn(n){var e=this.__data__,t=at(e,n);return t<0?void 0:e[t][1]}a(pn,"listCacheGet");var un=pn;function fn(n){return at(this.__data__,n)>-1}a(fn,"listCacheHas");var hn=fn;function yn(n,e){var t=this.__data__,o=at(t,n);return o<0?(++this.size,t.push([n,e])):t[o][1]=e,this}a(yn,"listCacheSet");var dn=yn;function G(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var o=n[e];this.set(o[0],o[1])}}a(G,"ListCache");G.prototype.clear=nn;G.prototype.delete=cn;G.prototype.get=un;G.prototype.has=hn;G.prototype.set=dn;var gn=G,vn=zt(vt,"Map"),mn=vn;function En(){this.size=0,this.__data__={hash:new Dt,map:new(mn||gn),string:new Dt}}a(En,"mapCacheClear");var bn=En;function Sn(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null}a(Sn,"isKeyable");var _n=Sn;function Tn(n,e){var t=n.__data__;return _n(e)?t[typeof e=="string"?"string":"hash"]:t.map}a(Tn,"getMapData");var st=Tn;function An(n){var e=st(this,n).delete(n);return this.size-=e?1:0,e}a(An,"mapCacheDelete");var wn=An;function On(n){return st(this,n).get(n)}a(On,"mapCacheGet");var Cn=On;function Pn(n){return st(this,n).has(n)}a(Pn,"mapCacheHas");var In=Pn;function xn(n,e){var t=st(this,n),o=t.size;return t.set(n,e),this.size+=t.size==o?0:1,this}a(xn,"mapCacheSet");var Rn=xn;function W(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var o=n[e];this.set(o[0],o[1])}}a(W,"MapCache");W.prototype.clear=bn;W.prototype.delete=wn;W.prototype.get=Cn;W.prototype.has=In;W.prototype.set=Rn;var Ht=W,Nn="Expected a function";function bt(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new TypeError(Nn);var t=a(function(){var o=arguments,l=e?e.apply(this,o):o[0],c=t.cache;if(c.has(l))return c.get(l);var i=n.apply(this,o);return t.cache=c.set(l,i)||c,i},"memoized");return t.cache=new(bt.Cache||Ht),t}a(bt,"memoize");bt.Cache=Ht;var jn=bt,Ln=500;function Dn(n){var e=jn(n,function(o){return t.size===Ln&&t.clear(),o}),t=e.cache;return e}a(Dn,"memoizeCapped");var Fn=Dn,Mn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$n=/\\(\\)?/g,Un=Fn(function(n){var e=[];return n.charCodeAt(0)===46&&e.push(""),n.replace(Mn,function(t,o,l,c){e.push(l?c.replace($n,"$1"):o||t)}),e}),kn=Un;function Gn(n){return n==null?"":ar(n)}a(Gn,"toString");var Wn=Gn;function zn(n,e){return Et(n)?n:$r(n,e)?[n]:kn(Wn(n))}a(zn,"castPath");var Hn=zn;function qn(n){if(typeof n=="string"||mt(n))return n;var e=n+"";return e=="0"&&1/n==-1/0?"-0":e}a(qn,"toKey");var Vn=qn;function Jn(n,e){e=Hn(e,n);for(var t=0,o=e.length;n!=null&&t<o;)n=n[Vn(e[t++])];return t&&t==o?n:void 0}a(Jn,"baseGet");var Kn=Jn;function Yn(n,e,t){var o=n==null?void 0:Kn(n,e);return o===void 0?t:o}a(Yn,"get");var Xn=Yn,it=De,Qn=a(n=>{let e=null,t=!1,o=!1,l=!1,c="";if(n.indexOf("//")>=0||n.indexOf("/*")>=0)for(let i=0;i<n.length;i+=1)!e&&!t&&!o&&!l?n[i]==='"'||n[i]==="'"||n[i]==="`"?e=n[i]:n[i]==="/"&&n[i+1]==="*"?t=!0:n[i]==="/"&&n[i+1]==="/"?o=!0:n[i]==="/"&&n[i+1]!=="/"&&(l=!0):(e&&(n[i]===e&&n[i-1]!=="\\"||n[i]===`
|
|
18
18
|
`&&e!=="`")&&(e=null),l&&(n[i]==="/"&&n[i-1]!=="\\"||n[i]===`
|
|
19
19
|
`)&&(l=!1),t&&n[i-1]==="/"&&n[i-2]==="*"&&(t=!1),o&&n[i]===`
|
|
20
|
-
`&&(o=!1)),!t&&!o&&(c+=n[i]);else c=n;return c},"removeCodeComments"),Zn=(0,Bt.default)(1e4)(n=>Qn(n).replace(/\n\s*/g,"").trim()),to=a(function(n,e){let t=e.slice(0,e.indexOf("{")),o=e.slice(e.indexOf("{"));if(t.includes("=>")||t.includes("function"))return e;let l=t;return l=l.replace(n,"function"),l+o},"convertShorthandMethods2"),eo=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z$/,J=a(n=>n.match(/^[\[\{\"\}].*[\]\}\"]$/),"isJSON");function qt(n){if(!it(n))return n;let e=n,t=!1;return typeof Event<"u"&&n instanceof Event&&(e=Pt(e),t=!0),e=Object.keys(e).reduce((o,l)=>{try{e[l]&&e[l].toJSON,o[l]=e[l]}catch{t=!0}return o},{}),t?e:n}a(qt,"convertUnconventionalData");var ro=a(function(n){let e,t,o,l;return a(function(c,i){try{if(c==="")return l=[],e=new Map([[i,"[]"]]),t=new Map,o=[],i;let u=t.get(this)||this;for(;o.length&&u!==o[0];)o.shift(),l.pop();if(typeof i=="boolean")return i;if(i===void 0)return n.allowUndefined?"_undefined_":void 0;if(i===null)return null;if(typeof i=="number")return i===-1/0?"_-Infinity_":i===1/0?"_Infinity_":Number.isNaN(i)?"_NaN_":i;if(typeof i=="bigint")return`_bigint_${i.toString()}`;if(typeof i=="string")return eo.test(i)?n.allowDate?`_date_${i}`:void 0:i;if((0,Ne.default)(i))return n.allowRegExp?`_regexp_${i.flags}|${i.source}`:void 0;if((0,je.default)(i)){if(!n.allowFunction)return;let{name:p}=i,m=i.toString();return m.match(/(\[native code\]|WEBPACK_IMPORTED_MODULE|__webpack_exports__|__webpack_require__)/)?`_function_${p}|${(()=>{}).toString()}`:`_function_${p}|${Zn(to(c,m))}`}if((0,Le.default)(i)){if(!n.allowSymbol)return;let p=Symbol.keyFor(i);return p!==void 0?`_gsymbol_${p}`:`_symbol_${i.toString().slice(7,-1)}`}if(o.length>=n.maxDepth)return Array.isArray(i)?`[Array(${i.length})]`:"[Object]";if(i===this)return`_duplicate_${JSON.stringify(l)}`;if(i instanceof Error&&n.allowError)return{__isConvertedError__:!0,errorProperties:{...i.cause?{cause:i.cause}:{},...i,name:i.name,message:i.message,stack:i.stack,"_constructor-name_":i.constructor.name}};if(i.constructor&&i.constructor.name&&i.constructor.name!=="Object"&&!Array.isArray(i)&&!n.allowClass)return;let y=e.get(i);if(!y){let p=Array.isArray(i)?i:qt(i);if(i.constructor&&i.constructor.name&&i.constructor.name!=="Object"&&!Array.isArray(i)&&n.allowClass)try{Object.assign(p,{"_constructor-name_":i.constructor.name})}catch{}return l.push(c),o.unshift(p),e.set(i,JSON.stringify(l)),i!==p&&t.set(i,p),p}return`_duplicate_${y}`}catch{return}},"replace")},"replacer2"),no=a(function reviver(options){let refs=[],root;return a(function revive(key,value){if(key===""&&(root=value,refs.forEach(({target:n,container:e,replacement:t})=>{let o=J(t)?JSON.parse(t):t.split(".");o.length===0?e[n]=root:e[n]=Xn(root,o)})),key==="_constructor-name_")return value;if(it(value)&&value.__isConvertedError__){let{message:n,...e}=value.errorProperties,t=new Error(n);return Object.assign(t,e),t}if(it(value)&&value["_constructor-name_"]&&options.allowFunction){let n=value["_constructor-name_"];if(n!=="Object"){let e=new Function(`return function ${n.replace(/[^a-zA-Z0-9$_]+/g,"")}(){}`)();Object.setPrototypeOf(value,new e)}return delete value["_constructor-name_"],value}if(typeof value=="string"&&value.startsWith("_function_")&&options.allowFunction){let[,name,source]=value.match(/_function_([^|]*)\|(.*)/)||[],sourceSanitized=source.replace(/[(\(\))|\\| |\]|`]*$/,"");if(!options.lazyEval)return eval(`(${sourceSanitized})`);let result=a((...args)=>{let f=eval(`(${sourceSanitized})`);return f(...args)},"result");return Object.defineProperty(result,"toString",{value:a(()=>sourceSanitized,"value")}),Object.defineProperty(result,"name",{value:name}),result}if(typeof value=="string"&&value.startsWith("_regexp_")&&options.allowRegExp){let[,n,e]=value.match(/_regexp_([^|]*)\|(.*)/)||[];return new RegExp(e,n)}return typeof value=="string"&&value.startsWith("_date_")&&options.allowDate?new Date(value.replace("_date_","")):typeof value=="string"&&value.startsWith("_duplicate_")?(refs.push({target:key,container:this,replacement:value.replace(/^_duplicate_/,"")}),null):typeof value=="string"&&value.startsWith("_symbol_")&&options.allowSymbol?Symbol(value.replace("_symbol_","")):typeof value=="string"&&value.startsWith("_gsymbol_")&&options.allowSymbol?Symbol.for(value.replace("_gsymbol_","")):typeof value=="string"&&value==="_-Infinity_"?-1/0:typeof value=="string"&&value==="_Infinity_"?1/0:typeof value=="string"&&value==="_NaN_"?NaN:typeof value=="string"&&value.startsWith("_bigint_")&&typeof BigInt=="function"?BigInt(value.replace("_bigint_","")):value},"revive")},"reviver"),Vt={maxDepth:10,space:void 0,allowFunction:!0,allowRegExp:!0,allowDate:!0,allowClass:!0,allowError:!0,allowUndefined:!0,allowSymbol:!0,lazyEval:!0},lt=a((n,e={})=>{let t={...Vt,...e};return JSON.stringify(qt(n),ro(t),e.space)},"stringify"),oo=a(()=>{let n=new Map;return a(function e(t){it(t)&&Object.entries(t).forEach(([o,l])=>{l==="_undefined_"?t[o]=void 0:n.get(l)||(n.set(l,!0),e(l))}),Array.isArray(t)&&t.forEach((o,l)=>{o==="_undefined_"?(n.set(o,!0),t[l]=void 0):n.get(o)||(n.set(o,!0),e(o))})},"mutateUndefined")},"mutator"),ct=a((n,e={})=>{let t={...Vt,...e},o=JSON.parse(n,no(t));return oo()(o),o},"parse"),St="Invariant failed";function K(n,e){if(!n){var t=typeof e=="function"?e():e,o=t?"".concat(St,": ").concat(t):St;throw new Error(o)}}a(K,"invariant");var Jt=a(n=>{let e=Array.from(document.querySelectorAll("iframe[data-is-storybook]")),[t,...o]=e.filter(c=>{var y,p;try{return((y=c.contentWindow)==null?void 0:y.location.origin)===n.source.location.origin&&((p=c.contentWindow)==null?void 0:p.location.pathname)===n.source.location.pathname}catch{}try{return c.contentWindow===n.source}catch{}let i=c.getAttribute("src"),u;try{if(!i)return!1;({origin:u}=new URL(i,document.location.toString()))}catch{return!1}return u===n.origin}),l=t==null?void 0:t.getAttribute("src");if(l&&o.length===0){let{protocol:c,host:i,pathname:u}=new URL(l,document.location.toString());return`${c}//${i}${u}`}return o.length>0&&s.error("found multiple candidates for event source"),null},"getEventSourceUrl"),{document:_t,location:Tt}=S,Xt="storybook-channel",lo={allowFunction:!1,maxDepth:25},At=class{constructor(e){if(this.config=e,this.connected=!1,this.buffer=[],typeof(S==null?void 0:S.addEventListener)=="function"&&S.addEventListener("message",this.handleEvent.bind(this),!1),e.page!=="manager"&&e.page!=="preview")throw new Error(`postmsg-channel: "config.page" cannot be "${e.page}"`)}setHandler(e){this.handler=(...t)=>{e.apply(this,t),!this.connected&&this.getLocalFrame().length&&(this.flush(),this.connected=!0)}}send(e,t){let{target:o,allowRegExp:l,allowFunction:c,allowSymbol:i,allowDate:u,allowError:y,allowUndefined:p,allowClass:m,maxDepth:g,space:d,lazyEval:E}=t||{},b=Object.fromEntries(Object.entries({allowRegExp:l,allowFunction:c,allowSymbol:i,allowDate:u,allowError:y,allowUndefined:p,allowClass:m,maxDepth:g,space:d,lazyEval:E}).filter(([N,R])=>typeof R<"u")),_={...lo,...S.CHANNEL_OPTIONS||{},...b},L=this.getFrames(o),O=new URLSearchParams((Tt==null?void 0:Tt.search)||""),D=lt({key:Xt,event:e,refId:O.get("refId")},_);return L.length?(this.buffer.length&&this.flush(),L.forEach(N=>{try{N.postMessage(D,"*")}catch{s.error("sending over postmessage fail")}}),Promise.resolve(null)):new Promise((N,R)=>{this.buffer.push({event:e,resolve:N,reject:R})})}flush(){let{buffer:e}=this;this.buffer=[],e.forEach(t=>{this.send(t.event).then(t.resolve).catch(t.reject)})}getFrames(e){if(this.config.page==="manager"){let t=Array.from(_t.querySelectorAll("iframe[data-is-storybook][data-is-loaded]")).flatMap(o=>{try{return o.contentWindow&&o.dataset.isStorybook!==void 0&&o.id===e?[o.contentWindow]:[]}catch{return[]}});return t!=null&&t.length?t:this.getCurrentFrames()}return S&&S.parent&&S.parent!==S.self?[S.parent]:[]}getCurrentFrames(){return this.config.page==="manager"?Array.from(_t.querySelectorAll('[data-is-storybook="true"]')).flatMap(e=>e.contentWindow?[e.contentWindow]:[]):S&&S.parent?[S.parent]:[]}getLocalFrame(){return this.config.page==="manager"?Array.from(_t.querySelectorAll("#storybook-preview-iframe")).flatMap(e=>e.contentWindow?[e.contentWindow]:[]):S&&S.parent?[S.parent]:[]}handleEvent(e){try{let{data:t}=e,{key:o,event:l,refId:c}=typeof t=="string"&&J(t)?ct(t,S.CHANNEL_OPTIONS||{}):t;if(o===Xt){let i=this.config.page==="manager"?'<span style="color: #37D5D3; background: black"> manager </span>':'<span style="color: #1EA7FD; background: black"> preview </span>',u=Object.values(index).includes(l.type)?`<span style="color: #FF4785">${l.type}</span>`:`<span style="color: #FFAE00">${l.type}</span>`;if(c&&(l.refId=c),l.source=this.config.page==="preview"?e.origin:Jt(e),!l.source){r.error(`${i} received ${u} but was unable to determine the source of the event`);return}let y=`${i} received ${u} (${t.length})`;r.debug(Tt.origin!==l.source?y:`${y} <span style="color: gray">(on ${Tt.origin} from ${l.source})</span>`,...l.args),K(this.handler,"ChannelHandler should be set"),this.handler(l)}}catch(t){s.error(t)}}};a(At,"PostMessageTransport");var Y=At,{WebSocket:co}=S,Zt=15e3,te=5e3,wt=class{constructor({url:e,onError:t,page:o}){this.buffer=[],this.isReady=!1,this.isClosed=!1,this.pingTimeout=0,this.socket=new co(e),this.socket.onopen=()=>{this.isReady=!0,this.heartbeat(),this.flush()},this.socket.onmessage=({data:l})=>{let c=typeof l=="string"&&J(l)?ct(l):l;K(this.handler,"WebsocketTransport handler should be set"),this.handler(c),c.type==="ping"&&(this.heartbeat(),this.send({type:"pong"}))},this.socket.onerror=l=>{t&&t(l)},this.socket.onclose=l=>{K(this.handler,"WebsocketTransport handler should be set"),this.handler({type:S$1,args:[{reason:l.reason,code:l.code}],from:o||"preview"}),this.isClosed=!0,clearTimeout(this.pingTimeout)}}heartbeat(){clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{this.socket.close(3008,"timeout")},Zt+te)}setHandler(e){this.handler=e}send(e){this.isClosed||(this.isReady?this.sendNow(e):this.sendLater(e))}sendLater(e){this.buffer.push(e)}sendNow(e){let t=lt(e,{maxDepth:15,allowFunction:!1,...S.CHANNEL_OPTIONS});this.socket.send(t)}flush(){let{buffer:e}=this;this.buffer=[],e.forEach(t=>this.send(t))}};a(wt,"WebsocketTransport");var X=wt,{CONFIG_TYPE:po}=S;function Qo({page:n,extraTransports:e=[]}){let t=[new Y({page:n}),...e];if(po==="DEVELOPMENT"){let l=window.location.protocol==="http:"?"ws":"wss",{hostname:c,port:i}=window.location,u=`${l}://${c}:${i}/storybook-server-channel`;t.push(new X({url:u,onError:a(()=>{},"onError"),page:n}))}let o=new B({transports:t});return $.__prepare(o,n==="manager"?$.Environment.MANAGER:$.Environment.PREVIEW),o}a(Qo,"createBrowserChannel");export{B as Channel,Zt as HEARTBEAT_INTERVAL,te as HEARTBEAT_MAX_LATENCY,Y as PostMessageTransport,X as WebsocketTransport,Qo as createBrowserChannel};
|
|
20
|
+
`&&(o=!1)),!t&&!o&&(c+=n[i]);else c=n;return c},"removeCodeComments"),Zn=(0,Bt.default)(1e4)(n=>Qn(n).replace(/\n\s*/g,"").trim()),to=a(function(n,e){let t=e.slice(0,e.indexOf("{")),o=e.slice(e.indexOf("{"));if(t.includes("=>")||t.includes("function"))return e;let l=t;return l=l.replace(n,"function"),l+o},"convertShorthandMethods2"),eo=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z$/,J=a(n=>n.match(/^[\[\{\"\}].*[\]\}\"]$/),"isJSON");function qt(n){if(!it(n))return n;let e=n,t=!1;return typeof Event<"u"&&n instanceof Event&&(e=Pt(e),t=!0),e=Object.keys(e).reduce((o,l)=>{try{e[l]&&e[l].toJSON,o[l]=e[l]}catch{t=!0}return o},{}),t?e:n}a(qt,"convertUnconventionalData");var ro=a(function(n){let e,t,o,l;return a(function(c,i){try{if(c==="")return l=[],e=new Map([[i,"[]"]]),t=new Map,o=[],i;let u=t.get(this)||this;for(;o.length&&u!==o[0];)o.shift(),l.pop();if(typeof i=="boolean")return i;if(i===void 0)return n.allowUndefined?"_undefined_":void 0;if(i===null)return null;if(typeof i=="number")return i===-1/0?"_-Infinity_":i===1/0?"_Infinity_":Number.isNaN(i)?"_NaN_":i;if(typeof i=="bigint")return`_bigint_${i.toString()}`;if(typeof i=="string")return eo.test(i)?n.allowDate?`_date_${i}`:void 0:i;if((0,Ne.default)(i))return n.allowRegExp?`_regexp_${i.flags}|${i.source}`:void 0;if((0,je.default)(i)){if(!n.allowFunction)return;let{name:p}=i,E=i.toString();return E.match(/(\[native code\]|WEBPACK_IMPORTED_MODULE|__webpack_exports__|__webpack_require__)/)?`_function_${p}|${(()=>{}).toString()}`:`_function_${p}|${Zn(to(c,E))}`}if((0,Le.default)(i)){if(!n.allowSymbol)return;let p=Symbol.keyFor(i);return p!==void 0?`_gsymbol_${p}`:`_symbol_${i.toString().slice(7,-1)}`}if(o.length>=n.maxDepth)return Array.isArray(i)?`[Array(${i.length})]`:"[Object]";if(i===this)return`_duplicate_${JSON.stringify(l)}`;if(i instanceof Error&&n.allowError)return{__isConvertedError__:!0,errorProperties:{...i.cause?{cause:i.cause}:{},...i,name:i.name,message:i.message,stack:i.stack,"_constructor-name_":i.constructor.name}};if(i.constructor&&i.constructor.name&&i.constructor.name!=="Object"&&!Array.isArray(i)&&!n.allowClass)return;let y=e.get(i);if(!y){let p=Array.isArray(i)?i:qt(i);if(i.constructor&&i.constructor.name&&i.constructor.name!=="Object"&&!Array.isArray(i)&&n.allowClass)try{Object.assign(p,{"_constructor-name_":i.constructor.name})}catch{}return l.push(c),o.unshift(p),e.set(i,JSON.stringify(l)),i!==p&&t.set(i,p),p}return`_duplicate_${y}`}catch{return}},"replace")},"replacer2"),no=a(function reviver(options){let refs=[],root;return a(function revive(key,value){if(key===""&&(root=value,refs.forEach(({target:n,container:e,replacement:t})=>{let o=J(t)?JSON.parse(t):t.split(".");o.length===0?e[n]=root:e[n]=Xn(root,o)})),key==="_constructor-name_")return value;if(it(value)&&value.__isConvertedError__){let{message:n,...e}=value.errorProperties,t=new Error(n);return Object.assign(t,e),t}if(it(value)&&value["_constructor-name_"]&&options.allowFunction){let n=value["_constructor-name_"];if(n!=="Object"){let e=new Function(`return function ${n.replace(/[^a-zA-Z0-9$_]+/g,"")}(){}`)();Object.setPrototypeOf(value,new e)}return delete value["_constructor-name_"],value}if(typeof value=="string"&&value.startsWith("_function_")&&options.allowFunction){let[,name,source]=value.match(/_function_([^|]*)\|(.*)/)||[],sourceSanitized=source.replace(/[(\(\))|\\| |\]|`]*$/,"");if(!options.lazyEval)return eval(`(${sourceSanitized})`);let result=a((...args)=>{let f=eval(`(${sourceSanitized})`);return f(...args)},"result");return Object.defineProperty(result,"toString",{value:a(()=>sourceSanitized,"value")}),Object.defineProperty(result,"name",{value:name}),result}if(typeof value=="string"&&value.startsWith("_regexp_")&&options.allowRegExp){let[,n,e]=value.match(/_regexp_([^|]*)\|(.*)/)||[];return new RegExp(e,n)}return typeof value=="string"&&value.startsWith("_date_")&&options.allowDate?new Date(value.replace("_date_","")):typeof value=="string"&&value.startsWith("_duplicate_")?(refs.push({target:key,container:this,replacement:value.replace(/^_duplicate_/,"")}),null):typeof value=="string"&&value.startsWith("_symbol_")&&options.allowSymbol?Symbol(value.replace("_symbol_","")):typeof value=="string"&&value.startsWith("_gsymbol_")&&options.allowSymbol?Symbol.for(value.replace("_gsymbol_","")):typeof value=="string"&&value==="_-Infinity_"?-1/0:typeof value=="string"&&value==="_Infinity_"?1/0:typeof value=="string"&&value==="_NaN_"?NaN:typeof value=="string"&&value.startsWith("_bigint_")&&typeof BigInt=="function"?BigInt(value.replace("_bigint_","")):value},"revive")},"reviver"),Vt={maxDepth:10,space:void 0,allowFunction:!0,allowRegExp:!0,allowDate:!0,allowClass:!0,allowError:!0,allowUndefined:!0,allowSymbol:!0,lazyEval:!0},lt=a((n,e={})=>{let t={...Vt,...e};return JSON.stringify(qt(n),ro(t),e.space)},"stringify"),oo=a(()=>{let n=new Map;return a(function e(t){it(t)&&Object.entries(t).forEach(([o,l])=>{l==="_undefined_"?t[o]=void 0:n.get(l)||(n.set(l,!0),e(l))}),Array.isArray(t)&&t.forEach((o,l)=>{o==="_undefined_"?(n.set(o,!0),t[l]=void 0):n.get(o)||(n.set(o,!0),e(o))})},"mutateUndefined")},"mutator"),ct=a((n,e={})=>{let t={...Vt,...e},o=JSON.parse(n,no(t));return oo()(o),o},"parse"),St="Invariant failed";function K(n,e){if(!n){var t=typeof e=="function"?e():e,o=t?"".concat(St,": ").concat(t):St;throw new Error(o)}}a(K,"invariant");var Jt=a(n=>{let e=Array.from(document.querySelectorAll("iframe[data-is-storybook]")),[t,...o]=e.filter(c=>{try{return c.contentWindow?.location.origin===n.source.location.origin&&c.contentWindow?.location.pathname===n.source.location.pathname}catch{}try{return c.contentWindow===n.source}catch{}let i=c.getAttribute("src"),u;try{if(!i)return!1;({origin:u}=new URL(i,document.location.toString()))}catch{return!1}return u===n.origin}),l=t?.getAttribute("src");if(l&&o.length===0){let{protocol:c,host:i,pathname:u}=new URL(l,document.location.toString());return`${c}//${i}${u}`}return o.length>0&&s.error("found multiple candidates for event source"),null},"getEventSourceUrl"),{document:_t,location:Tt}=S,Xt="storybook-channel",lo={allowFunction:!1,maxDepth:25},At=class{constructor(e){if(this.config=e,this.connected=!1,this.buffer=[],typeof S?.addEventListener=="function"&&S.addEventListener("message",this.handleEvent.bind(this),!1),e.page!=="manager"&&e.page!=="preview")throw new Error(`postmsg-channel: "config.page" cannot be "${e.page}"`)}setHandler(e){this.handler=(...t)=>{e.apply(this,t),!this.connected&&this.getLocalFrame().length&&(this.flush(),this.connected=!0)}}send(e,t){let{target:o,allowRegExp:l,allowFunction:c,allowSymbol:i,allowDate:u,allowError:y,allowUndefined:p,allowClass:E,maxDepth:g,space:d,lazyEval:m}=t||{},b=Object.fromEntries(Object.entries({allowRegExp:l,allowFunction:c,allowSymbol:i,allowDate:u,allowError:y,allowUndefined:p,allowClass:E,maxDepth:g,space:d,lazyEval:m}).filter(([N,R])=>typeof R<"u")),_={...lo,...S.CHANNEL_OPTIONS||{},...b},L=this.getFrames(o),O=new URLSearchParams(Tt?.search||""),D=lt({key:Xt,event:e,refId:O.get("refId")},_);return L.length?(this.buffer.length&&this.flush(),L.forEach(N=>{try{N.postMessage(D,"*")}catch{s.error("sending over postmessage fail")}}),Promise.resolve(null)):new Promise((N,R)=>{this.buffer.push({event:e,resolve:N,reject:R})})}flush(){let{buffer:e}=this;this.buffer=[],e.forEach(t=>{this.send(t.event).then(t.resolve).catch(t.reject)})}getFrames(e){if(this.config.page==="manager"){let t=Array.from(_t.querySelectorAll("iframe[data-is-storybook][data-is-loaded]")).flatMap(o=>{try{return o.contentWindow&&o.dataset.isStorybook!==void 0&&o.id===e?[o.contentWindow]:[]}catch{return[]}});return t?.length?t:this.getCurrentFrames()}return S&&S.parent&&S.parent!==S.self?[S.parent]:[]}getCurrentFrames(){return this.config.page==="manager"?Array.from(_t.querySelectorAll('[data-is-storybook="true"]')).flatMap(e=>e.contentWindow?[e.contentWindow]:[]):S&&S.parent?[S.parent]:[]}getLocalFrame(){return this.config.page==="manager"?Array.from(_t.querySelectorAll("#storybook-preview-iframe")).flatMap(e=>e.contentWindow?[e.contentWindow]:[]):S&&S.parent?[S.parent]:[]}handleEvent(e){try{let{data:t}=e,{key:o,event:l,refId:c}=typeof t=="string"&&J(t)?ct(t,S.CHANNEL_OPTIONS||{}):t;if(o===Xt){let i=this.config.page==="manager"?'<span style="color: #37D5D3; background: black"> manager </span>':'<span style="color: #1EA7FD; background: black"> preview </span>',u=Object.values(index).includes(l.type)?`<span style="color: #FF4785">${l.type}</span>`:`<span style="color: #FFAE00">${l.type}</span>`;if(c&&(l.refId=c),l.source=this.config.page==="preview"?e.origin:Jt(e),!l.source){r.error(`${i} received ${u} but was unable to determine the source of the event`);return}let y=`${i} received ${u} (${t.length})`;r.debug(Tt.origin!==l.source?y:`${y} <span style="color: gray">(on ${Tt.origin} from ${l.source})</span>`,...l.args),K(this.handler,"ChannelHandler should be set"),this.handler(l)}}catch(t){s.error(t)}}};a(At,"PostMessageTransport");var Y=At,{WebSocket:co}=S,Zt=15e3,te=5e3,wt=class{constructor({url:e,onError:t,page:o}){this.buffer=[],this.isReady=!1,this.isClosed=!1,this.pingTimeout=0,this.socket=new co(e),this.socket.onopen=()=>{this.isReady=!0,this.heartbeat(),this.flush()},this.socket.onmessage=({data:l})=>{let c=typeof l=="string"&&J(l)?ct(l):l;K(this.handler,"WebsocketTransport handler should be set"),this.handler(c),c.type==="ping"&&(this.heartbeat(),this.send({type:"pong"}))},this.socket.onerror=l=>{t&&t(l)},this.socket.onclose=l=>{K(this.handler,"WebsocketTransport handler should be set"),this.handler({type:S$1,args:[{reason:l.reason,code:l.code}],from:o||"preview"}),this.isClosed=!0,clearTimeout(this.pingTimeout)}}heartbeat(){clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{this.socket.close(3008,"timeout")},Zt+te)}setHandler(e){this.handler=e}send(e){this.isClosed||(this.isReady?this.sendNow(e):this.sendLater(e))}sendLater(e){this.buffer.push(e)}sendNow(e){let t=lt(e,{maxDepth:15,allowFunction:!1,...S.CHANNEL_OPTIONS});this.socket.send(t)}flush(){let{buffer:e}=this;this.buffer=[],e.forEach(t=>this.send(t))}};a(wt,"WebsocketTransport");var X=wt,{CONFIG_TYPE:po}=S;function Qo({page:n,extraTransports:e=[]}){let t=[new Y({page:n}),...e];if(po==="DEVELOPMENT"){let l=window.location.protocol==="http:"?"ws":"wss",{hostname:c,port:i}=window.location,u=`${l}://${c}:${i}/storybook-server-channel`;t.push(new X({url:u,onError:a(()=>{},"onError"),page:n}))}let o=new B({transports:t});return $.__prepare(o,n==="manager"?$.Environment.MANAGER:$.Environment.PREVIEW),o}a(Qo,"createBrowserChannel");export{B as Channel,Zt as HEARTBEAT_INTERVAL,te as HEARTBEAT_MAX_LATENCY,Y as PostMessageTransport,X as WebsocketTransport,Qo as createBrowserChannel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{normalizeProjectAnnotations as $,composeConfigs as _}from"../preview-api/index.js";var P=Object.create,d=Object.defineProperty,x=Object.getOwnPropertyDescriptor,E=Object.getOwnPropertyNames,U=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty,u=(e,t)=>d(e,"name",{value:t,configurable:!0}),I=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),C=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of E(t))!z.call(e,n)&&n!==r&&d(e,n,{get:()=>t[n],enumerable:!(a=x(t,n))||a.enumerable});return e},M=(e,t,r)=>(r=e!=null?P(U(e)):{},C(d(r,"default",{value:e,enumerable:!0}),e)),N=I(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isEqual=function(){var t=Object.prototype.toString,r=Object.getPrototypeOf,a=Object.getOwnPropertySymbols?function(n){return Object.keys(n).concat(Object.getOwnPropertySymbols(n))}:Object.keys;return function(n,l){return u(function c(o,i,f){var p,y,s,m=t.call(o),j=t.call(i);if(o===i)return!0;if(o==null||i==null)return!1;if(f.indexOf(o)>-1&&f.indexOf(i)>-1)return!0;if(f.push(o,i),m!=j||(p=a(o),y=a(i),p.length!=y.length||p.some(function(b){return!c(o[b],i[b],f)})))return!1;switch(m.slice(8,-1)){case"Symbol":return o.valueOf()==i.valueOf();case"Date":case"Number":return+o==+i||+o!=+o&&+i!=+i;case"RegExp":case"Function":case"String":case"Boolean":return""+o==""+i;case"Set":case"Map":p=o.entries(),y=i.entries();do if(!c((s=p.next()).value,y.next().value,f))return!1;while(!s.done);return!0;case"ArrayBuffer":o=new Uint8Array(o),i=new Uint8Array(i);case"DataView":o=new Uint8Array(o.buffer),i=new Uint8Array(i.buffer);case"Float32Array":case"Float64Array":case"Int8Array":case"Int16Array":case"Int32Array":case"Uint8Array":case"Uint16Array":case"Uint32Array":case"Uint8ClampedArray":case"Arguments":case"Array":if(o.length!=i.length)return!1;for(s=0;s<o.length;s++)if((s in o||s in i)&&(s in o!=s in i||!c(o[s],i[s],f)))return!1;return!0;case"Object":return c(r(o),r(i),f);default:return!1}},"n")(n,l,[])}}()});function O(e){return e.replace(/_/g," ").replace(/-/g," ").replace(/\./g," ").replace(/([^\n])([A-Z])([a-z])/g,(t,r,a,n)=>`${r} ${a}${n}`).replace(/([a-z])([A-Z])/g,(t,r,a)=>`${r} ${a}`).replace(/([a-z])([0-9])/gi,(t,r,a)=>`${r} ${a}`).replace(/([0-9])([a-z])/gi,(t,r,a)=>`${r} ${a}`).replace(/(\s|^)(\w)/g,(t,r,a)=>`${r}${a.toUpperCase()}`).replace(/ +/g," ").trim()}u(O,"toStartCaseStr");var v=M(N()),h=u(e=>e.map(t=>typeof t<"u").filter(Boolean).length,"count"),q=u((e,t)=>{let{exists:r,eq:a,neq:n,truthy:l}=e;if(h([r,a,n,l])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:r,eq:a,neq:n})}`);if(typeof a<"u")return(0,v.isEqual)(t,a);if(typeof n<"u")return!(0,v.isEqual)(t,n);if(typeof r<"u"){let c=typeof t<"u";return r?c:!c}return typeof l>"u"||l?!!t:!t},"testValue"),R=u((e,t,r)=>{if(!e.if)return!0;let{arg:a,global:n}=e.if;if(h([a,n])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:a,global:n})}`);let l=a?t[a]:r[n];return q(e.if,l)},"includeConditionalArg");function F(e){let t,r={_tag:"Preview",input:e,get composed(){if(t)return t;let{addons:a,...n}=e;return t=$(_([...a??[],n])),t},meta(a){return A(a,this)}};return globalThis.globalProjectAnnotations=r.composed,r}u(F,"__definePreview");function D(e){return e!=null&&typeof e=="object"&&"_tag"in e&&
|
|
1
|
+
import{normalizeProjectAnnotations as $,composeConfigs as _}from"../preview-api/index.js";var P=Object.create,d=Object.defineProperty,x=Object.getOwnPropertyDescriptor,E=Object.getOwnPropertyNames,U=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty,u=(e,t)=>d(e,"name",{value:t,configurable:!0}),I=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),C=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of E(t))!z.call(e,n)&&n!==r&&d(e,n,{get:()=>t[n],enumerable:!(a=x(t,n))||a.enumerable});return e},M=(e,t,r)=>(r=e!=null?P(U(e)):{},C(d(r,"default",{value:e,enumerable:!0}),e)),N=I(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isEqual=function(){var t=Object.prototype.toString,r=Object.getPrototypeOf,a=Object.getOwnPropertySymbols?function(n){return Object.keys(n).concat(Object.getOwnPropertySymbols(n))}:Object.keys;return function(n,l){return u(function c(o,i,f){var p,y,s,m=t.call(o),j=t.call(i);if(o===i)return!0;if(o==null||i==null)return!1;if(f.indexOf(o)>-1&&f.indexOf(i)>-1)return!0;if(f.push(o,i),m!=j||(p=a(o),y=a(i),p.length!=y.length||p.some(function(b){return!c(o[b],i[b],f)})))return!1;switch(m.slice(8,-1)){case"Symbol":return o.valueOf()==i.valueOf();case"Date":case"Number":return+o==+i||+o!=+o&&+i!=+i;case"RegExp":case"Function":case"String":case"Boolean":return""+o==""+i;case"Set":case"Map":p=o.entries(),y=i.entries();do if(!c((s=p.next()).value,y.next().value,f))return!1;while(!s.done);return!0;case"ArrayBuffer":o=new Uint8Array(o),i=new Uint8Array(i);case"DataView":o=new Uint8Array(o.buffer),i=new Uint8Array(i.buffer);case"Float32Array":case"Float64Array":case"Int8Array":case"Int16Array":case"Int32Array":case"Uint8Array":case"Uint16Array":case"Uint32Array":case"Uint8ClampedArray":case"Arguments":case"Array":if(o.length!=i.length)return!1;for(s=0;s<o.length;s++)if((s in o||s in i)&&(s in o!=s in i||!c(o[s],i[s],f)))return!1;return!0;case"Object":return c(r(o),r(i),f);default:return!1}},"n")(n,l,[])}}()});function O(e){return e.replace(/_/g," ").replace(/-/g," ").replace(/\./g," ").replace(/([^\n])([A-Z])([a-z])/g,(t,r,a,n)=>`${r} ${a}${n}`).replace(/([a-z])([A-Z])/g,(t,r,a)=>`${r} ${a}`).replace(/([a-z])([0-9])/gi,(t,r,a)=>`${r} ${a}`).replace(/([0-9])([a-z])/gi,(t,r,a)=>`${r} ${a}`).replace(/(\s|^)(\w)/g,(t,r,a)=>`${r}${a.toUpperCase()}`).replace(/ +/g," ").trim()}u(O,"toStartCaseStr");var v=M(N()),h=u(e=>e.map(t=>typeof t<"u").filter(Boolean).length,"count"),q=u((e,t)=>{let{exists:r,eq:a,neq:n,truthy:l}=e;if(h([r,a,n,l])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:r,eq:a,neq:n})}`);if(typeof a<"u")return(0,v.isEqual)(t,a);if(typeof n<"u")return!(0,v.isEqual)(t,n);if(typeof r<"u"){let c=typeof t<"u";return r?c:!c}return typeof l>"u"||l?!!t:!t},"testValue"),R=u((e,t,r)=>{if(!e.if)return!0;let{arg:a,global:n}=e.if;if(h([a,n])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:a,global:n})}`);let l=a?t[a]:r[n];return q(e.if,l)},"includeConditionalArg");function F(e){let t,r={_tag:"Preview",input:e,get composed(){if(t)return t;let{addons:a,...n}=e;return t=$(_([...a??[],n])),t},meta(a){return A(a,this)}};return globalThis.globalProjectAnnotations=r.composed,r}u(F,"__definePreview");function D(e){return e!=null&&typeof e=="object"&&"_tag"in e&&e?._tag==="Preview"}u(D,"isPreview");function T(e){return e!=null&&typeof e=="object"&&"_tag"in e&&e?._tag==="Meta"}u(T,"isMeta");function A(e,t){return{_tag:"Meta",input:e,preview:t,get composed(){throw new Error("Not implemented")},story(r){return S(r,this)}}}u(A,"defineMeta");function S(e,t){return{_tag:"Story",input:e,meta:t,get composed(){throw new Error("Not implemented")}}}u(S,"defineStory");function k(e){return e!=null&&typeof e=="object"&&"_tag"in e&&e?._tag==="Story"}u(k,"isStory");var B=u(e=>e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),"sanitize"),w=u((e,t)=>{let r=B(e);if(r==="")throw new Error(`Invalid ${t} '${e}', must include alphanumeric characters`);return r},"sanitizeSafe"),V=u((e,t)=>`${w(e,"kind")}${t?`--${w(t,"name")}`:""}`,"toId"),W=u(e=>O(e),"storyNameFromExport");function g(e,t){return Array.isArray(t)?t.includes(e):e.match(t)}u(g,"matches");function J(e,{includeStories:t,excludeStories:r}){return e!=="__esModule"&&(!t||g(e,t))&&(!r||!g(e,r))}u(J,"isExportStory");var Z=u((...e)=>{let t=e.reduce((r,a)=>(a.startsWith("!")?r.delete(a.slice(1)):r.add(a),r),new Set);return Array.from(t)},"combineTags");export{F as __definePreview,Z as combineTags,R as includeConditionalArg,J as isExportStory,T as isMeta,D as isPreview,k as isStory,B as sanitize,W as storyNameFromExport,V as toId};
|