@ncino/web-components 4.0.1-preview.1 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index_html.js +1 -1
- package/dist/components/avatar/avatar.js +1 -1
- package/dist/components/avatar/gator/avatar.gator.js +15 -10
- package/dist/components/input/gator/dropdown/input-dropdown.gator.js +1 -1
- package/dist/components/input/gator/input-date/input-date.gator.js +1 -1
- package/dist/components/input/gator/input-file/file-uploaded-preview/file-upload-preview.gator.js +10 -5
- package/dist/components/input/gator/input-file/input-file.gator.js +22 -20
- package/dist/components/input/gator/input-time/input-time.gator.js +1 -1
- package/dist/components/menu/base/gator/menu.gator.js +1 -1
- package/dist/components/popover/gator/popover.gator.js +1 -1
- package/dist/components/tooltip/gator/tooltip.gator.js +1 -1
- package/dist/components/tooltip/slds/tooltip.slds.js +1 -1
- package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.2 → @figma_code-connect@1.3.3}/node_modules/@figma/code-connect/dist/common/fetch.js +1 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.3/node_modules/@figma/code-connect/package.json.js +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.1/node_modules/@floating-ui/core/dist/floating-ui.core.js +1 -0
- package/dist/node_modules/.pnpm/{@floating-ui_dom@1.7.0 → @floating-ui_dom@1.7.1}/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +1 -1
- package/dist/node_modules/.pnpm/{@vitest_expect@3.1.4 → @vitest_expect@3.2.0}/node_modules/@vitest/expect/dist/index.js +17 -17
- package/dist/node_modules/.pnpm/@vitest_runner@3.2.0/node_modules/@vitest/runner/dist/chunk-hooks.js +5 -0
- package/dist/node_modules/.pnpm/{@vitest_snapshot@3.1.4 → @vitest_snapshot@3.2.0}/node_modules/@vitest/snapshot/dist/index.js +5 -5
- package/dist/node_modules/.pnpm/@vitest_spy@3.2.0/node_modules/@vitest/spy/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/{@vitest_utils@3.1.4 → @vitest_utils@3.2.0}/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +1 -1
- package/dist/node_modules/.pnpm/{@vitest_utils@3.1.4 → @vitest_utils@3.2.0}/node_modules/@vitest/utils/dist/diff.js +1 -1
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.0/node_modules/@vitest/utils/dist/error.js +2 -0
- package/dist/node_modules/.pnpm/safe-buffer@5.1.2/node_modules/safe-buffer/index.js +1 -0
- package/dist/node_modules/.pnpm/{string_decoder@1.3.0 → string_decoder@1.1.1}/node_modules/string_decoder/lib/string_decoder.js +1 -1
- package/dist/node_modules/.pnpm/tinyspy@4.0.3/node_modules/tinyspy/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/index.js +1 -0
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/util.js +1 -0
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/headers.js +1 -0
- package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/fileapi/util.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/pool.js +1 -0
- package/dist/node_modules/.pnpm/{vitest@3.1.4_@types_debug@4.1.12_@types_node@22.15.29_@vitest_browser@3.1.4_@vitest_ui@_d0ae304dca34f8d8a069ed58c3715569/node_modules/vitest/dist/chunks/utils.CgTj3MsC.js → vitest@3.2.0_@types_debug@4.1.12_@types_node@22.15.29_@vitest_browser@3.2.0_@vitest_ui@_380928fb48d45118a64498d466bac5bf/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js} +1 -1
- package/dist/node_modules/.pnpm/{vitest@3.1.4_@types_debug@4.1.12_@types_node@22.15.29_@vitest_browser@3.1.4_@vitest_ui@_d0ae304dca34f8d8a069ed58c3715569/node_modules/vitest/dist/chunks/vi.ClIskdbk.js → vitest@3.2.0_@types_debug@4.1.12_@types_node@22.15.29_@vitest_browser@3.2.0_@vitest_ui@_380928fb48d45118a64498d466bac5bf/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js} +5 -5
- package/dist/packages/web-components/src/components/avatar/gator/avatar.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/button-group/gator/button-group.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/input/gator/input-file/file-uploaded-preview/file-upload-preview.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/input/gator/input-file/input-file.gator.scss.js +1 -1
- package/dist/types/components/avatar/avatar.d.ts +21 -4
- package/dist/types/components/avatar/gator/avatar.gator.d.ts +4 -1
- package/dist/types/components/input/gator/input-file/file-uploaded-preview/file-upload-preview.gator.d.ts +8 -0
- package/dist/types/components/input/gator/input-file/input-file.gator.d.ts +18 -7
- package/dist/utils/vitest-a11y-utils.js +1 -1
- package/package.json +28 -28
- package/web-types.json +52 -11
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.2/node_modules/@figma/code-connect/package.json.js +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.0/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -1
- package/dist/node_modules/.pnpm/@vitest_runner@3.1.4/node_modules/@vitest/runner/dist/chunk-tasks.js +0 -1
- package/dist/node_modules/.pnpm/@vitest_runner@3.1.4/node_modules/@vitest/runner/dist/index.js +0 -4
- package/dist/node_modules/.pnpm/@vitest_spy@3.1.4/node_modules/@vitest/spy/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@vitest_utils@3.1.4/node_modules/@vitest/utils/dist/error.js +0 -2
- package/dist/node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js +0 -1
- package/dist/node_modules/.pnpm/tinyspy@3.0.2/node_modules/tinyspy/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.28.5/node_modules/undici/lib/cookies/index.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.28.5/node_modules/undici/lib/cookies/util.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.28.5/node_modules/undici/lib/fetch/headers.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.28.5/node_modules/undici/lib/pool.js +0 -1
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.2 → @figma_code-connect@1.3.3}/node_modules/@figma/code-connect/dist/client/external.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.2 → @figma_code-connect@1.3.3}/node_modules/@figma/code-connect/dist/client/figma_client.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.2 → @figma_code-connect@1.3.3}/node_modules/@figma/code-connect/dist/common/logging.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.2 → @figma_code-connect@1.3.3}/node_modules/@figma/code-connect/dist/common/updates.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.2 → @figma_code-connect@1.3.3}/node_modules/@figma/code-connect/dist/connect/external_types.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.2 → @figma_code-connect@1.3.3}/node_modules/@figma/code-connect/dist/connect/figma_rest_api.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.2 → @figma_code-connect@1.3.3}/node_modules/@figma/code-connect/dist/connect/helpers.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.2 → @figma_code-connect@1.3.3}/node_modules/@figma/code-connect/dist/connect/index_common.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.2 → @figma_code-connect@1.3.3}/node_modules/@figma/code-connect/dist/html/external.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.2 → @figma_code-connect@1.3.3}/node_modules/@figma/code-connect/dist/html/index_html.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.2 → @figma_code-connect@1.3.3}/node_modules/@figma/code-connect/dist/html/template_literal.js +0 -0
- /package/dist/node_modules/.pnpm/{@vitest_browser@3.1.4_msw@2.7.3_@types_node@22.15.29_typescript@5.8.3__playwright@1.52._65062dc9a55a6735cb61161760810601 → @vitest_browser@3.2.0_msw@2.7.3_@types_node@22.15.29_typescript@5.8.3__playwright@1.52._b8e25df0066052f4b376435335cc964b}/node_modules/@vitest/browser/context.js +0 -0
- /package/dist/node_modules/.pnpm/{@vitest_pretty-format@3.1.4 → @vitest_pretty-format@3.2.0}/node_modules/@vitest/pretty-format/dist/index.js +0 -0
- /package/dist/node_modules/.pnpm/{@vitest_utils@3.1.4 → @vitest_utils@3.2.0}/node_modules/@vitest/utils/dist/helpers.js +0 -0
- /package/dist/node_modules/.pnpm/{@vitest_utils@3.1.4 → @vitest_utils@3.2.0}/node_modules/@vitest/utils/dist/index.js +0 -0
- /package/dist/node_modules/.pnpm/{@vitest_utils@3.1.4 → @vitest_utils@3.2.0}/node_modules/@vitest/utils/dist/source-map.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/index.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/agent.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/api/abort-signal.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/api/api-connect.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/api/api-pipeline.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/api/api-request.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/api/api-stream.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/api/api-upgrade.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/api/index.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/api/readable.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/api/util.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/balanced-pool.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/cache/cache.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/cache/cachestorage.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/cache/symbols.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/cache/util.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/client.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/compat/dispatcher-weakref.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/cookies/constants.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/cookies/parse.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/core/connect.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/core/constants.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/core/errors.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/core/request.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/core/symbols.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/core/util.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/dispatcher-base.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/dispatcher.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/fetch/body.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/fetch/constants.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/fetch/dataURL.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/fetch/file.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/fetch/formdata.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/fetch/global.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/fetch/index.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/fetch/request.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/fetch/response.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/fetch/symbols.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/fetch/util.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/fetch/webidl.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/fileapi/encoding.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/fileapi/filereader.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/fileapi/progressevent.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/fileapi/symbols.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/global.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/handler/DecoratorHandler.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/handler/RedirectHandler.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/handler/RetryHandler.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/interceptor/redirectInterceptor.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/llhttp/constants.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/llhttp/llhttp-wasm.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/llhttp/utils.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/mock/mock-agent.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/mock/mock-client.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/mock/mock-errors.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/mock/mock-interceptor.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/mock/mock-pool.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/mock/mock-symbols.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/mock/mock-utils.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/mock/pending-interceptors-formatter.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/mock/pluralizer.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/node/fixed-queue.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/pool-base.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/pool-stats.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/proxy-agent.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/timers.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/websocket/connection.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/websocket/constants.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/websocket/events.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/websocket/frame.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/websocket/receiver.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/websocket/symbols.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/websocket/util.js +0 -0
- /package/dist/node_modules/.pnpm/{undici@5.28.5 → undici@5.29.0}/node_modules/undici/lib/websocket/websocket.js +0 -0
- /package/dist/node_modules/.pnpm/{vitest@3.1.4_@types_debug@4.1.12_@types_node@22.15.29_@vitest_browser@3.1.4_@vitest_ui@_d0ae304dca34f8d8a069ed58c3715569 → vitest@3.2.0_@types_debug@4.1.12_@types_node@22.15.29_@vitest_browser@3.2.0_@vitest_ui@_380928fb48d45118a64498d466bac5bf}/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js +0 -0
- /package/dist/node_modules/.pnpm/{vitest@3.1.4_@types_debug@4.1.12_@types_node@22.15.29_@vitest_browser@3.1.4_@vitest_ui@_d0ae304dca34f8d8a069ed58c3715569/node_modules/vitest/dist/chunks/date.CDOsz-HY.js → vitest@3.2.0_@types_debug@4.1.12_@types_node@22.15.29_@vitest_browser@3.2.0_@vitest_ui@_380928fb48d45118a64498d466bac5bf/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as w}from"../../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import _ from"../../../../packages/web-components/src/components/menu/base/gator/menu.gator.scss.js";import v from"../../../../packages/web-components/src/components/menu/menu.tokens.scss.js";import{customElement as y}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import{NjcMenu as x}from"../menu.js";import{handleDataTestid as u}from"../../../../utils/datatestid-utils.js";import{autoUpdate as A,computePosition as I}from"../../../../node_modules/.pnpm/@floating-ui_dom@1.7.
|
|
1
|
+
import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as w}from"../../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import _ from"../../../../packages/web-components/src/components/menu/base/gator/menu.gator.scss.js";import v from"../../../../packages/web-components/src/components/menu/menu.tokens.scss.js";import{customElement as y}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import{NjcMenu as x}from"../menu.js";import{handleDataTestid as u}from"../../../../utils/datatestid-utils.js";import{autoUpdate as A,computePosition as I}from"../../../../node_modules/.pnpm/@floating-ui_dom@1.7.1/node_modules/@floating-ui/dom/dist/floating-ui.dom.js";import{ref as g}from"../../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js";import"../../menu-item/gator/menu-item.gator.js";import{unsafeCSS as b}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var R=Object.getOwnPropertyDescriptor,k=(t,e,o,n)=>{for(var s=n>1?void 0:n?R(e,o):e,i=t.length-1,a;i>=0;i--)(a=t[i])&&(s=a(s)||s);return s};let l=class extends x{constructor(){super(...arguments),this._dropdownRef=g()}render(){return w`
|
|
2
2
|
<div class="gator-dropdown-trigger" @focusout=${this._topLevelFocusOut}>
|
|
3
3
|
<slot @slotchange="${this.handleTriggerSlotChange}" name="trigger"></slot>
|
|
4
4
|
<div class="gator-dropdown" ${g(this._dropdownRef)}>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{NjcPopover as g}from"../popover.js";import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as p,nothing as u}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import{LitElement as v}from"../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import{ref as b}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js";import{customElement as _}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import y from"../../../packages/web-components/src/components/popover/gator/popover.gator.scss.js";import P from"../../../packages/web-components/src/components/popover/popover.scss.js";import E from"../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import k from"../../../packages/web-components/src/tokens/semantic.tokens.scss.js";import{autoUpdate as w,computePosition as O,autoPlacement as S}from"../../../node_modules/.pnpm/@floating-ui_dom@1.7.
|
|
1
|
+
import{NjcPopover as g}from"../popover.js";import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as p,nothing as u}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import{LitElement as v}from"../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import{ref as b}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js";import{customElement as _}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import y from"../../../packages/web-components/src/components/popover/gator/popover.gator.scss.js";import P from"../../../packages/web-components/src/components/popover/popover.scss.js";import E from"../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import k from"../../../packages/web-components/src/tokens/semantic.tokens.scss.js";import{autoUpdate as w,computePosition as O,autoPlacement as S}from"../../../node_modules/.pnpm/@floating-ui_dom@1.7.1/node_modules/@floating-ui/dom/dist/floating-ui.dom.js";import $ from"../../../packages/web-components/public/styles/gator/gator-global-styles.css.js";import{KEY_CONSTANTS as l}from"../../../consts/key-constants.js";import{msg as x}from"../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import"../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js";import{unsafeCSS as h}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var R=Object.getOwnPropertyDescriptor,C=(t,e,i,r)=>{for(var o=r>1?void 0:r?R(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(o=n(o)||o);return o};let m=class extends g{render(){return p`
|
|
2
2
|
<div
|
|
3
3
|
${b(this._popoverRef)}
|
|
4
4
|
id="${this.popoverId}"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{NjcTooltip as f}from"../tooltip.js";import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as a}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import{LitElement as m}from"../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import{ref as u}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js";import{customElement as c}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import h from"../../../packages/web-components/src/components/tooltip/gator/tooltip.gator.scss.js";import g from"../../../packages/web-components/src/components/tooltip/tooltip.scss.js";import b from"../../../packages/web-components/src/components/tooltip/tooltip.tokens.scss.js";import d from"../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import _ from"../../../packages/web-components/src/tokens/semantic.tokens.scss.js";import{autoUpdate as v,computePosition as O}from"../../../node_modules/.pnpm/@floating-ui_dom@1.7.
|
|
1
|
+
import{NjcTooltip as f}from"../tooltip.js";import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as a}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import{LitElement as m}from"../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import{ref as u}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js";import{customElement as c}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import h from"../../../packages/web-components/src/components/tooltip/gator/tooltip.gator.scss.js";import g from"../../../packages/web-components/src/components/tooltip/tooltip.scss.js";import b from"../../../packages/web-components/src/components/tooltip/tooltip.tokens.scss.js";import d from"../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import _ from"../../../packages/web-components/src/tokens/semantic.tokens.scss.js";import{autoUpdate as v,computePosition as O}from"../../../node_modules/.pnpm/@floating-ui_dom@1.7.1/node_modules/@floating-ui/dom/dist/floating-ui.dom.js";import{unsafeCSS as o}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var y=Object.getOwnPropertyDescriptor,x=(t,e,r,l)=>{for(var i=l>1?void 0:l?y(e,r):e,n=t.length-1,p;n>=0;n--)(p=t[n])&&(i=p(i)||i);return i};let s=class extends f{render(){return a`
|
|
2
2
|
<div ${u(this._tooltipRef)} class="gator-tooltip ${this.nubbinPositionClass}" role="tooltip" id="${this.tooltipId}">
|
|
3
3
|
<div class="gator-tooltip-body">
|
|
4
4
|
<slot></slot>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{NjcTooltip as u}from"../tooltip.js";import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as a}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import"../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import{ref as f}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js";import{customElement as c}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import m from"../../../packages/web-components/src/index.slds.scss.js";import b from"../../../packages/web-components/src/components/tooltip/tooltip.scss.js";import{autoUpdate as d,computePosition as h}from"../../../node_modules/.pnpm/@floating-ui_dom@1.7.
|
|
1
|
+
import{NjcTooltip as u}from"../tooltip.js";import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as a}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import"../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import{ref as f}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js";import{customElement as c}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import m from"../../../packages/web-components/src/index.slds.scss.js";import b from"../../../packages/web-components/src/components/tooltip/tooltip.scss.js";import{autoUpdate as d,computePosition as h}from"../../../node_modules/.pnpm/@floating-ui_dom@1.7.1/node_modules/@floating-ui/dom/dist/floating-ui.dom.js";import{unsafeCSS as p}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var _=Object.getOwnPropertyDescriptor,v=(t,e,o,n)=>{for(var s=n>1?void 0:n?_(e,o):e,i=t.length-1,l;i>=0;i--)(l=t[i])&&(s=l(s)||s);return s};let r=class extends u{render(){return a`
|
|
2
2
|
<div data-id="tooltip" ${f(this._tooltipRef)} class="slds-popover slds-popover_tooltip ${this.nubbinPositionClass}" role="tooltip">
|
|
3
3
|
<div class="slds-popover__body">
|
|
4
4
|
<slot></slot>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__exports as n}from"../../../../../../../../_virtual/fetch.js";import{__require as E}from"../../../../../../undici@5.
|
|
1
|
+
import{__exports as n}from"../../../../../../../../_virtual/fetch.js";import{__require as E}from"../../../../../../undici@5.29.0/node_modules/undici/index.js";var x;function g(){if(x)return n;x=1;var c={};Object.defineProperty(n,"__esModule",{value:!0}),n.request=n.isFetchError=void 0,n.getProxyUrl=f;const o=E();class u extends Error{constructor(t,r){super(),this.response=t,this.data=r}}const P=e=>e instanceof u;n.isFetchError=P;function f(){return c.HTTPS_PROXY||c.HTTP_PROXY||c.https_proxy||c.http_proxy}const h=f(),d=h?new o.ProxyAgent({uri:h}):void 0;d&&(0,o.setGlobalDispatcher)(d);async function i(e,t,r={},_){const p=new URL(e);r!=null&&r.query&&Object.entries(r.query).forEach(([a,l])=>{p.searchParams.append(a,l)}),e=p.toString(),_&&(r.body=JSON.stringify(_));const s=await fetch(e,{...r,method:t});if(!s.ok){let a;try{a=await s.json()}catch{a=void 0}throw new u(s,a)}const y=await s.text(),q=y?JSON.parse(y):{};return{response:s,data:q}}return n.request={get:(e,t={})=>i(e,"GET",t),post:(e,t,r={})=>i(e,"POST",r,t),put:(e,t,r={})=>i(e,"PUT",r,t),delete:(e,t,r={})=>i(e,"DELETE",r,t)},n}export{g as __require};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e="1.3.3",o={version:e};export{o as default,e as version};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getSideAxis as L,getAlignmentAxis as H,getSide as F,getAlignment as C,getAxisLength as J,evaluate as _,getOppositePlacement as K,getExpandedPlacements as N,getOppositeAxisPlacements as Q,getAlignmentSides as q,getPaddingObject as U,rectToClientRect as I,placements as X,getOppositeAlignmentPlacement as W}from"../../../../../@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.js";function Y(n,l,f){let{reference:t,floating:e}=n;const i=L(l),c=H(l),a=J(c),w=F(l),p=i==="y",g=t.x+t.width/2-e.width/2,r=t.y+t.height/2-e.height/2,d=t[a]/2-e[a]/2;let o;switch(w){case"top":o={x:g,y:t.y-e.height};break;case"bottom":o={x:g,y:t.y+t.height};break;case"right":o={x:t.x+t.width,y:r};break;case"left":o={x:t.x-e.width,y:r};break;default:o={x:t.x,y:t.y}}switch(C(l)){case"start":o[c]-=d*(f&&p?-1:1);break;case"end":o[c]+=d*(f&&p?-1:1);break}return o}const te=async(n,l,f)=>{const{placement:t="bottom",strategy:e="absolute",middleware:i=[],platform:c}=f,a=i.filter(Boolean),w=await(c.isRTL==null?void 0:c.isRTL(l));let p=await c.getElementRects({reference:n,floating:l,strategy:e}),{x:g,y:r}=Y(p,t,w),d=t,o={},x=0;for(let h=0;h<a.length;h++){const{name:y,fn:v}=a[h],{x:u,y:P,data:b,reset:s}=await v({x:g,y:r,initialPlacement:t,placement:d,strategy:e,middlewareData:o,rects:p,platform:c,elements:{reference:n,floating:l}});g=u??g,r=P??r,o={...o,[y]:{...o[y],...b}},s&&x<=50&&(x++,typeof s=="object"&&(s.placement&&(d=s.placement),s.rects&&(p=s.rects===!0?await c.getElementRects({reference:n,floating:l,strategy:e}):s.rects),{x:g,y:r}=Y(p,d,w)),h=-1)}return{x:g,y:r,placement:d,strategy:e,middlewareData:o}};async function z(n,l){var f;l===void 0&&(l={});const{x:t,y:e,platform:i,rects:c,elements:a,strategy:w}=n,{boundary:p="clippingAncestors",rootBoundary:g="viewport",elementContext:r="floating",altBoundary:d=!1,padding:o=0}=_(l,n),x=U(o),y=a[d?r==="floating"?"reference":"floating":r],v=I(await i.getClippingRect({element:(f=await(i.isElement==null?void 0:i.isElement(y)))==null||f?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:p,rootBoundary:g,strategy:w})),u=r==="floating"?{x:t,y:e,width:c.floating.width,height:c.floating.height}:c.reference,P=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),b=await(i.isElement==null?void 0:i.isElement(P))?await(i.getScale==null?void 0:i.getScale(P))||{x:1,y:1}:{x:1,y:1},s=I(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:u,offsetParent:P,strategy:w}):u);return{top:(v.top-s.top+x.top)/b.y,bottom:(s.bottom-v.bottom+x.bottom)/b.y,left:(v.left-s.left+x.left)/b.x,right:(s.right-v.right+x.right)/b.x}}function Z(n,l,f){return(n?[...f.filter(e=>C(e)===n),...f.filter(e=>C(e)!==n)]:f.filter(e=>F(e)===e)).filter(e=>n?C(e)===n||(l?W(e)!==e:!1):!0)}const ne=function(n){return n===void 0&&(n={}),{name:"autoPlacement",options:n,async fn(l){var f,t,e;const{rects:i,middlewareData:c,placement:a,platform:w,elements:p}=l,{crossAxis:g=!1,alignment:r,allowedPlacements:d=X,autoAlignment:o=!0,...x}=_(n,l),h=r!==void 0||d===X?Z(r||null,o,d):d,y=await z(l,x),v=((f=c.autoPlacement)==null?void 0:f.index)||0,u=h[v];if(u==null)return{};const P=q(u,i,await(w.isRTL==null?void 0:w.isRTL(p.floating)));if(a!==u)return{reset:{placement:h[0]}};const b=[y[F(u)],y[P[0]],y[P[1]]],s=[...((t=c.autoPlacement)==null?void 0:t.overflows)||[],{placement:u,overflows:b}],T=h[v+1];if(T)return{data:{index:v+1,overflows:s},reset:{placement:T}};const B=s.map(m=>{const O=C(m.placement);return[m.placement,O&&g?m.overflows.slice(0,2).reduce((j,M)=>j+M,0):m.overflows[0],m.overflows]}).sort((m,O)=>m[1]-O[1]),S=((e=B.filter(m=>m[2].slice(0,C(m[0])?2:3).every(O=>O<=0))[0])==null?void 0:e[0])||B[0][0];return S!==a?{data:{index:v+1,overflows:s},reset:{placement:S}}:{}}}},le=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(l){var f,t;const{placement:e,middlewareData:i,rects:c,initialPlacement:a,platform:w,elements:p}=l,{mainAxis:g=!0,crossAxis:r=!0,fallbackPlacements:d,fallbackStrategy:o="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:h=!0,...y}=_(n,l);if((f=i.arrow)!=null&&f.alignmentOffset)return{};const v=F(e),u=L(a),P=F(a)===a,b=await(w.isRTL==null?void 0:w.isRTL(p.floating)),s=d||(P||!h?[K(a)]:N(a)),T=x!=="none";!d&&T&&s.push(...Q(a,h,x,b));const B=[a,...s],$=await z(l,y),S=[];let m=((t=i.flip)==null?void 0:t.overflows)||[];if(g&&S.push($[v]),r){const k=q(e,c,b);S.push($[k[0]],$[k[1]])}if(m=[...m,{placement:e,overflows:S}],!S.every(k=>k<=0)){var O,j;const k=(((O=i.flip)==null?void 0:O.index)||0)+1,V=B[k];if(V&&(!(r==="alignment"?u!==L(V):!1)||m.every(A=>A.overflows[0]>0&&L(A.placement)===u)))return{data:{index:k,overflows:m},reset:{placement:V}};let D=(j=m.filter(E=>E.overflows[0]<=0).sort((E,A)=>E.overflows[1]-A.overflows[1])[0])==null?void 0:j.placement;if(!D)switch(o){case"bestFit":{var M;const E=(M=m.filter(A=>{if(T){const R=L(A.placement);return R===u||R==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(R=>R>0).reduce((R,G)=>R+G,0)]).sort((A,R)=>A[1]-R[1])[0])==null?void 0:M[0];E&&(D=E);break}case"initialPlacement":D=a;break}if(e!==D)return{reset:{placement:D}}}return{}}}};export{ne as autoPlacement,te as computePosition,z as detectOverflow,le as flip,I as rectToClientRect};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{computePosition as ot,flip as st,autoPlacement as rt}from"../../../../../@floating-ui_core@1.7.
|
|
1
|
+
import{computePosition as ot,flip as st,autoPlacement as rt}from"../../../../../@floating-ui_core@1.7.1/node_modules/@floating-ui/core/dist/floating-ui.core.js";import{createCoords as w,rectToClientRect as J,floor as A,max as E,round as H,min as z}from"../../../../../@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.js";import{getOverflowAncestors as M,isElement as v,getDocumentElement as O,getWindow as L,getFrameElement as K,getComputedStyle as R,isHTMLElement as b,isWebKit as Q,isTopLayer as S,getParentNode as W,isLastTraversableNode as N,isTableElement as ct,isContainingBlock as Y,getContainingBlock as lt,getNodeName as _,isOverflowElement as P,getNodeScroll as I}from"../../../../../@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js";function Z(t){const e=R(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const o=b(t),r=o?t.offsetWidth:n,s=o?t.offsetHeight:i,c=H(n)!==r||H(i)!==s;return c&&(n=r,i=s),{width:n,height:i,$:c}}function $(t){return v(t)?t:t.contextElement}function F(t){const e=$(t);if(!b(e))return w(1);const n=e.getBoundingClientRect(),{width:i,height:o,$:r}=Z(e);let s=(r?H(n.width):n.width)/i,c=(r?H(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const ft=w(0);function X(t){const e=L(t);return!Q()||!e.visualViewport?ft:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ut(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==L(t)?!1:e}function T(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),r=$(t);let s=w(1);e&&(i?v(i)&&(s=F(i)):s=F(t));const c=ut(r,n,i)?X(r):w(0);let l=(o.left+c.x)/s.x,f=(o.top+c.y)/s.y,u=o.width/s.x,h=o.height/s.y;if(r){const p=L(r),a=i&&v(i)?L(i):i;let y=p,g=K(y);for(;g&&i&&a!==y;){const m=F(g),d=g.getBoundingClientRect(),x=R(g),C=d.left+(g.clientLeft+parseFloat(x.paddingLeft))*m.x,B=d.top+(g.clientTop+parseFloat(x.paddingTop))*m.y;l*=m.x,f*=m.y,u*=m.x,h*=m.y,l+=C,f+=B,y=L(g),g=K(y)}}return J({width:u,height:h,x:l,y:f})}function q(t,e){const n=I(t).scrollLeft;return e?e.left+n:T(O(t)).left+n}function tt(t,e,n){n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=i.left+e.scrollLeft-(n?0:q(t,i)),r=i.top+e.scrollTop;return{x:o,y:r}}function ht(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t;const r=o==="fixed",s=O(i),c=e?S(e.floating):!1;if(i===s||c&&r)return n;let l={scrollLeft:0,scrollTop:0},f=w(1);const u=w(0),h=b(i);if((h||!h&&!r)&&((_(i)!=="body"||P(s))&&(l=I(i)),b(i))){const a=T(i);f=F(i),u.x=a.x+i.clientLeft,u.y=a.y+i.clientTop}const p=s&&!h&&!r?tt(s,l,!0):w(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-l.scrollLeft*f.x+u.x+p.x,y:n.y*f.y-l.scrollTop*f.y+u.y+p.y}}function at(t){return Array.from(t.getClientRects())}function dt(t){const e=O(t),n=I(t),i=t.ownerDocument.body,o=E(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),r=E(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let s=-n.scrollLeft+q(t);const c=-n.scrollTop;return R(i).direction==="rtl"&&(s+=E(e.clientWidth,i.clientWidth)-o),{width:o,height:r,x:s,y:c}}function gt(t,e){const n=L(t),i=O(t),o=n.visualViewport;let r=i.clientWidth,s=i.clientHeight,c=0,l=0;if(o){r=o.width,s=o.height;const f=Q();(!f||f&&e==="fixed")&&(c=o.offsetLeft,l=o.offsetTop)}return{width:r,height:s,x:c,y:l}}function pt(t,e){const n=T(t,!0,e==="fixed"),i=n.top+t.clientTop,o=n.left+t.clientLeft,r=b(t)?F(t):w(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,l=o*r.x,f=i*r.y;return{width:s,height:c,x:l,y:f}}function j(t,e,n){let i;if(e==="viewport")i=gt(t,n);else if(e==="document")i=dt(O(t));else if(v(e))i=pt(e,n);else{const o=X(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return J(i)}function et(t,e){const n=W(t);return n===e||!v(n)||N(n)?!1:R(n).position==="fixed"||et(n,e)}function mt(t,e){const n=e.get(t);if(n)return n;let i=M(t,[],!1).filter(c=>v(c)&&_(c)!=="body"),o=null;const r=R(t).position==="fixed";let s=r?W(t):t;for(;v(s)&&!N(s);){const c=R(s),l=Y(s);!l&&c.position==="fixed"&&(o=null),(r?!l&&!o:!l&&c.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||P(s)&&!l&&et(t,s))?i=i.filter(u=>u!==s):o=c,s=W(s)}return e.set(t,i),i}function wt(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t;const s=[...n==="clippingAncestors"?S(e)?[]:mt(e,this._c):[].concat(n),i],c=s[0],l=s.reduce((f,u)=>{const h=j(e,u,o);return f.top=E(h.top,f.top),f.right=z(h.right,f.right),f.bottom=z(h.bottom,f.bottom),f.left=E(h.left,f.left),f},j(e,c,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function yt(t){const{width:e,height:n}=Z(t);return{width:e,height:n}}function xt(t,e,n){const i=b(e),o=O(e),r=n==="fixed",s=T(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const l=w(0);function f(){l.x=q(o)}if(i||!i&&!r)if((_(e)!=="body"||P(o))&&(c=I(e)),i){const a=T(e,!0,r,e);l.x=a.x+e.clientLeft,l.y=a.y+e.clientTop}else o&&f();r&&!i&&o&&f();const u=o&&!i&&!r?tt(o,c):w(0),h=s.left+c.scrollLeft-l.x-u.x,p=s.top+c.scrollTop-l.y-u.y;return{x:h,y:p,width:s.width,height:s.height}}function V(t){return R(t).position==="static"}function G(t,e){if(!b(t)||R(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return O(t)===n&&(n=n.ownerDocument.body),n}function nt(t,e){const n=L(t);if(S(t))return n;if(!b(t)){let o=W(t);for(;o&&!N(o);){if(v(o)&&!V(o))return o;o=W(o)}return n}let i=G(t,e);for(;i&&ct(i)&&V(i);)i=G(i,e);return i&&N(i)&&V(i)&&!Y(i)?n:i||lt(t)||n}const vt=async function(t){const e=this.getOffsetParent||nt,n=this.getDimensions,i=await n(t.floating);return{reference:xt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Rt(t){return R(t).direction==="rtl"}const Ot={convertOffsetParentRelativeRectToViewportRelativeRect:ht,getDocumentElement:O,getClippingRect:wt,getOffsetParent:nt,getElementRects:vt,getClientRects:at,getDimensions:yt,getScale:F,isElement:v,isRTL:Rt};function it(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function bt(t,e){let n=null,i;const o=O(t);function r(){var c;clearTimeout(i),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),r();const f=t.getBoundingClientRect(),{left:u,top:h,width:p,height:a}=f;if(c||e(),!p||!a)return;const y=A(h),g=A(o.clientWidth-(u+p)),m=A(o.clientHeight-(h+a)),d=A(u),C={rootMargin:-y+"px "+-g+"px "+-m+"px "+-d+"px",threshold:E(0,z(1,l))||1};let B=!0;function k(U){const D=U[0].intersectionRatio;if(D!==l){if(!B)return s();D?s(!1,D):i=setTimeout(()=>{s(!1,1e-7)},1e3)}D===1&&!it(f,t.getBoundingClientRect())&&s(),B=!1}try{n=new IntersectionObserver(k,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,C)}n.observe(t)}return s(!0),r}function Et(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,f=$(t),u=o||r?[...f?M(f):[],...M(e)]:[];u.forEach(d=>{o&&d.addEventListener("scroll",n,{passive:!0}),r&&d.addEventListener("resize",n)});const h=f&&c?bt(f,n):null;let p=-1,a=null;s&&(a=new ResizeObserver(d=>{let[x]=d;x&&x.target===f&&a&&(a.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var C;(C=a)==null||C.observe(e)})),n()}),f&&!l&&a.observe(f),a.observe(e));let y,g=l?T(t):null;l&&m();function m(){const d=T(t);g&&!it(g,d)&&n(),g=d,y=requestAnimationFrame(m)}return n(),()=>{var d;u.forEach(x=>{o&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),h==null||h(),(d=a)==null||d.disconnect(),a=null,l&&cancelAnimationFrame(y)}}const Ft=rt,Wt=st,Bt=(t,e,n)=>{const i=new Map,o={platform:Ot,...n},r={...o.platform,_c:i};return ot(t,e,{...o,platform:r})};export{Ft as autoPlacement,Et as autoUpdate,Bt as computePosition,Wt as flip,M as getOverflowAncestors,Ot as platform};
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
var xt=Object.defineProperty;var vt=(e,t,r)=>t in e?xt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var H=(e,t,r)=>vt(e,typeof t!="symbol"?t+"":t,r);import{diff as S,printDiffOrStringify as
|
|
1
|
+
var xt=Object.defineProperty;var vt=(e,t,r)=>t in e?xt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var H=(e,t,r)=>vt(e,typeof t!="symbol"?t+"":t,r);import{diff as S,printDiffOrStringify as Tt}from"../../../../../@vitest_utils@3.2.0/node_modules/@vitest/utils/dist/diff.js";import E from"../../../../../tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/browser.js";import{isMockFunction as V}from"../../../../../@vitest_spy@3.2.0/node_modules/@vitest/spy/dist/index.js";import{processError as Nt}from"../../../../../@vitest_utils@3.2.0/node_modules/@vitest/utils/dist/error.js";import{use as Ot,util as R}from"../../../../../chai@5.2.0/node_modules/chai/chai.js";import{getType as ut,isObject as q,assertTypes as N}from"../../../../../@vitest_utils@3.2.0/node_modules/@vitest/utils/dist/helpers.js";import{s as M}from"../../../../../@vitest_utils@3.2.0/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js";const k=Symbol.for("matchers-object"),B=Symbol.for("$$jest-matchers-object"),ft=Symbol.for("expect-global"),ht=Symbol.for("asymmetric-matchers-object"),ce={toSatisfy(e,t,r){const{printReceived:c,printExpected:a,matcherHint:h}=this.utils,u=t(e);return{pass:u,message:()=>u?`${h(".not.toSatisfy","received","")}
|
|
2
2
|
|
|
3
3
|
Expected value to not satisfy:
|
|
4
|
-
${r||
|
|
4
|
+
${r||a(t)}
|
|
5
5
|
Received:
|
|
6
|
-
${
|
|
6
|
+
${c(e)}`:`${h(".toSatisfy","received","")}
|
|
7
7
|
|
|
8
8
|
Expected value to satisfy:
|
|
9
|
-
${r||
|
|
9
|
+
${r||a(t)}
|
|
10
10
|
|
|
11
11
|
Received:
|
|
12
|
-
${
|
|
12
|
+
${c(e)}`}},toBeOneOf(e,t){const{equals:r,customTesters:c}=this,{printReceived:a,printExpected:h,matcherHint:u}=this.utils;if(!Array.isArray(t))throw new TypeError(`You must provide an array to ${u(".toBeOneOf")}, not '${typeof t}'.`);const d=t.length===0||t.some(m=>r(m,e,c));return{pass:d,message:()=>d?`${u(".not.toBeOneOf","received","")}
|
|
13
13
|
|
|
14
14
|
Expected value to not be one of:
|
|
15
15
|
${h(t)}
|
|
16
16
|
Received:
|
|
17
|
-
${
|
|
17
|
+
${a(e)}`:`${u(".toBeOneOf","received","")}
|
|
18
18
|
|
|
19
19
|
Expected value to be one of:
|
|
20
20
|
${h(t)}
|
|
21
21
|
|
|
22
22
|
Received:
|
|
23
|
-
${
|
|
24
|
-
`:"",h=`${e} has value: ${r(t)}`;return
|
|
23
|
+
${a(e)}`}}},D=E.green,J=E.red,jt=E.inverse,Mt=E.bold,j=E.dim;function Ct(e,t="received",r="expected",c={}){const{comment:a="",isDirectExpectCall:h=!1,isNot:u=!1,promise:d="",secondArgument:m="",expectedColor:n=D,receivedColor:o=J,secondArgumentColor:s=D}=c;let i="",l="expect";return!h&&t!==""&&(i+=j(`${l}(`)+o(t),l=")"),d!==""&&(i+=j(`${l}.`)+d,l=""),u&&(i+=`${j(`${l}.`)}not`,l=""),e.includes(".")?l+=e:(i+=j(`${l}.`)+e,l=""),r===""?l+="()":(i+=j(`${l}(`)+n(r),m&&(i+=j(", ")+s(m)),l=")"),a!==""&&(l+=` // ${a}`),l!==""&&(i+=j(l)),i}const _t="·";function pt(e){return e.replace(/\s+$/gm,t=>_t.repeat(t.length))}function At(e){return J(pt(M(e)))}function It(e){return D(pt(M(e)))}function dt(){return{EXPECTED_COLOR:D,RECEIVED_COLOR:J,INVERTED_COLOR:jt,BOLD_WEIGHT:Mt,DIM_COLOR:j,diff:S,matcherHint:Ct,printReceived:At,printExpected:It,printDiffOrStringify:Tt,printWithType:St}}function St(e,t,r){const c=ut(t),a=c!=="null"&&c!=="undefined"?`${e} has type: ${c}
|
|
24
|
+
`:"",h=`${e} has value: ${r(t)}`;return a+h}function le(e){if(!Array.isArray(e))throw new TypeError(`expect.customEqualityTesters: Must be set to an array of Testers. Was given "${ut(e)}"`);globalThis[B].customEqualityTesters.push(...e)}function G(){return globalThis[B].customEqualityTesters}function g(e,t,r,c){return r=r||[],A(e,t,[],[],r,c?mt:Rt)}function K(e){return!!e&&typeof e=="object"&&"asymmetricMatch"in e&&v("Function",e.asymmetricMatch)}function Bt(e,t){const r=K(e),c=K(t);if(!(r&&c)){if(r)return e.asymmetricMatch(t);if(c)return t.asymmetricMatch(e)}}function A(e,t,r,c,a,h){let u=!0;const d=Bt(e,t);if(d!==void 0)return d;const m={equals:g};for(let f=0;f<a.length;f++){const p=a[f].call(m,e,t,a);if(p!==void 0)return p}if(typeof URL=="function"&&e instanceof URL&&t instanceof URL)return e.href===t.href;if(Object.is(e,t))return!0;if(e===null||t===null)return e===t;const n=Object.prototype.toString.call(e);if(n!==Object.prototype.toString.call(t))return!1;switch(n){case"[object Boolean]":case"[object String]":case"[object Number]":return typeof e!=typeof t?!1:typeof e!="object"&&typeof t!="object"?Object.is(e,t):Object.is(e.valueOf(),t.valueOf());case"[object Date]":{const f=+e,p=+t;return f===p||Number.isNaN(f)&&Number.isNaN(p)}case"[object RegExp]":return e.source===t.source&&e.flags===t.flags;case"[object Temporal.Instant]":case"[object Temporal.ZonedDateTime]":case"[object Temporal.PlainDateTime]":case"[object Temporal.PlainDate]":case"[object Temporal.PlainTime]":case"[object Temporal.PlainYearMonth]":case"[object Temporal.PlainMonthDay]":return e.equals(t);case"[object Temporal.Duration]":return e.toString()===t.toString()}if(typeof e!="object"||typeof t!="object")return!1;if(Z(e)&&Z(t))return e.isEqualNode(t);let o=r.length;for(;o--;){if(r[o]===e)return c[o]===t;if(c[o]===t)return!1}if(r.push(e),c.push(t),n==="[object Array]"&&e.length!==t.length)return!1;if(e instanceof Error&&t instanceof Error)try{return Pt(e,t,r,c,a,h)}finally{r.pop(),c.pop()}const s=X(e,h);let i,l=s.length;if(X(t,h).length!==l)return!1;for(;l--;)if(i=s[l],u=h(t,i)&&A(e[i],t[i],r,c,a,h),!u)return!1;return r.pop(),c.pop(),u}function Pt(e,t,r,c,a,h){let u=Object.getPrototypeOf(e)===Object.getPrototypeOf(t)&&e.name===t.name&&e.message===t.message;return typeof t.cause<"u"&&u&&(u=A(e.cause,t.cause,r,c,a,h)),e instanceof AggregateError&&t instanceof AggregateError&&u&&(u=A(e.errors,t.errors,r,c,a,h)),u&&(u=A({...e},{...t},r,c,a,h)),u}function X(e,t){const r=[];for(const c in e)t(e,c)&&r.push(c);return r.concat(Object.getOwnPropertySymbols(e).filter(c=>Object.getOwnPropertyDescriptor(e,c).enumerable))}function Rt(e,t){return mt(e,t)&&e[t]!==void 0}function mt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function v(e,t){return Object.prototype.toString.apply(t)===`[object ${e}]`}function Z(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"&&"nodeName"in e&&typeof e.nodeName=="string"&&"isEqualNode"in e&&typeof e.isEqualNode=="function"}const gt="@@__IMMUTABLE_KEYED__@@",yt="@@__IMMUTABLE_SET__@@",qt="@@__IMMUTABLE_LIST__@@",L="@@__IMMUTABLE_ORDERED__@@",kt="@@__IMMUTABLE_RECORD__@@";function Dt(e){return!!(e&&e[gt]&&!e[L])}function Lt(e){return!!(e&&e[yt]&&!e[L])}function W(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function Wt(e){return!!(e&&W(e)&&e[qt])}function Ht(e){return!!(e&&W(e)&&e[gt]&&e[L])}function Vt(e){return!!(e&&W(e)&&e[yt]&&e[L])}function Ft(e){return!!(e&&W(e)&&e[kt])}const bt=Symbol.iterator;function Q(e){return!!(e!=null&&e[bt])}function w(e,t,r=[],c=[],a=[]){if(typeof e!="object"||typeof t!="object"||Array.isArray(e)||Array.isArray(t)||!Q(e)||!Q(t))return;if(e.constructor!==t.constructor)return!1;let h=c.length;for(;h--;)if(c[h]===e)return a[h]===t;c.push(e),a.push(t);const u=[...r.filter(n=>n!==w),d];function d(n,o){return w(n,o,[...r],[...c],[...a])}if(e.size!==void 0){if(e.size!==t.size)return!1;if(v("Set",e)||Lt(e)){let n=!0;for(const o of e)if(!t.has(o)){let s=!1;for(const i of t)g(o,i,u)===!0&&(s=!0);if(s===!1){n=!1;break}}return c.pop(),a.pop(),n}else if(v("Map",e)||Dt(e)){let n=!0;for(const o of e)if(!t.has(o[0])||!g(o[1],t.get(o[0]),u)){let s=!1;for(const i of t){const l=g(o[0],i[0],u);let f=!1;l===!0&&(f=g(o[1],i[1],u)),f===!0&&(s=!0)}if(s===!1){n=!1;break}}return c.pop(),a.pop(),n}}const m=t[bt]();for(const n of e){const o=m.next();if(o.done||!g(n,o.value,u))return!1}if(!m.next().done)return!1;if(!Wt(e)&&!Ht(e)&&!Vt(e)&&!Ft(e)){const n=Object.entries(e),o=Object.entries(t);if(!g(n,o,u))return!1}return c.pop(),a.pop(),!0}function z(e,t){return!e||typeof e!="object"||e===Object.prototype?!1:Object.prototype.hasOwnProperty.call(e,t)||z(Object.getPrototypeOf(e),t)}function Yt(e){return q(e)&&!(e instanceof Error)&&!Array.isArray(e)&&!(e instanceof Date)}function P(e,t,r=[]){const c=r.filter(h=>h!==P),a=(h=new WeakMap)=>(u,d)=>{if(Yt(d))return Object.keys(d).every(m=>{if(d[m]!=null&&typeof d[m]=="object"){if(h.has(d[m]))return g(u[m],d[m],c);h.set(d[m],!0)}const n=u!=null&&z(u,m)&&g(u[m],d[m],[...c,a(h)]);return h.delete(d[m]),n})};return a()(e,t)}function tt(e,t){if(!(e==null||t==null||e.constructor===t.constructor))return!1}function et(e,t){let r=e,c=t;if(!(e instanceof DataView&&t instanceof DataView)){if(!(e instanceof ArrayBuffer)||!(t instanceof ArrayBuffer))return;try{r=new DataView(e),c=new DataView(t)}catch{return}}if(r.byteLength!==c.byteLength)return!1;for(let a=0;a<r.byteLength;a++)if(r.getUint8(a)!==c.getUint8(a))return!1;return!0}function U(e,t,r=[]){if(!Array.isArray(e)||!Array.isArray(t))return;const c=Object.keys(e),a=Object.keys(t),h=r.filter(u=>u!==U);return g(e,t,h,!0)&&g(c,a)}function Ut(e,t="#{this}",r="#{exp}"){const c=`expected ${t} to be ${r} // Object.is equality`;return["toStrictEqual","toEqual"].includes(e)?`${c}
|
|
25
25
|
|
|
26
26
|
If it should pass with deep equality, replace "toBe" with "${e}"
|
|
27
27
|
|
|
28
28
|
Expected: ${t}
|
|
29
29
|
Received: serializes to the same string
|
|
30
|
-
`:
|
|
31
|
-
`,m].join(""))}}),{then(u,d){return h=!0,t.then(u,d)},catch(u){return t.catch(u)},finally(u){return t.finally(u)},[Symbol.toStringTag]:"Promise"}}return t}function Et(e,t,r){return function(...
|
|
32
|
-
(${f} matching ${f===1?"property":"properties"} omitted from actual)`;throw new r(y,{showDiff:!0,expected:n,actual:l})}}),c("toMatch",function(n){const o=this._obj;if(typeof o!="string")throw new TypeError(`.toMatch() expects to receive a string, but got ${typeof o}`);return this.assert(typeof n=="string"?o.includes(n):o.match(n),"expected #{this} to match #{exp}","expected #{this} not to match #{exp}",n,o)}),c("toContain",function(n){const o=this._obj;if(typeof Node<"u"&&o instanceof Node){if(!(n instanceof Node))throw new TypeError(`toContain() expected a DOM node as the argument, but got ${typeof n}`);return this.assert(o.contains(n),"expected #{this} to contain element #{exp}","expected #{this} not to contain element #{exp}",n,o)}if(typeof DOMTokenList<"u"&&o instanceof DOMTokenList){O(n,"class name",["string"]);const i=t.flag(this,"negate")?o.value.replace(n,"").trim():`${o.value} ${n}`;return this.assert(o.contains(n),`expected "${o.value}" to contain "${n}"`,`expected "${o.value}" not to contain "${n}"`,i,o.value)}return typeof o=="string"&&typeof n=="string"?this.assert(o.includes(n),"expected #{this} to contain #{exp}","expected #{this} not to contain #{exp}",n,o):(o!=null&&typeof o!="string"&&t.flag(this,"object",Array.from(o)),this.contain(n))}),c("toContainEqual",function(n){const o=t.flag(this,"object"),s=Array.from(o).findIndex(i=>g(i,n,a));this.assert(s!==-1,"expected #{this} to deep equally contain #{exp}","expected #{this} to not deep equally contain #{exp}",n)}),c("toBeTruthy",function(){const n=t.flag(this,"object");this.assert(!!n,"expected #{this} to be truthy","expected #{this} to not be truthy",!0,n)}),c("toBeFalsy",function(){const n=t.flag(this,"object");this.assert(!n,"expected #{this} to be falsy","expected #{this} to not be falsy",!1,n)}),c("toBeGreaterThan",function(n){const o=this._obj;return O(o,"actual",["number","bigint"]),O(n,"expected",["number","bigint"]),this.assert(o>n,`expected ${o} to be greater than ${n}`,`expected ${o} to be not greater than ${n}`,n,o,!1)}),c("toBeGreaterThanOrEqual",function(n){const o=this._obj;return O(o,"actual",["number","bigint"]),O(n,"expected",["number","bigint"]),this.assert(o>=n,`expected ${o} to be greater than or equal to ${n}`,`expected ${o} to be not greater than or equal to ${n}`,n,o,!1)}),c("toBeLessThan",function(n){const o=this._obj;return O(o,"actual",["number","bigint"]),O(n,"expected",["number","bigint"]),this.assert(o<n,`expected ${o} to be less than ${n}`,`expected ${o} to be not less than ${n}`,n,o,!1)}),c("toBeLessThanOrEqual",function(n){const o=this._obj;return O(o,"actual",["number","bigint"]),O(n,"expected",["number","bigint"]),this.assert(o<=n,`expected ${o} to be less than or equal to ${n}`,`expected ${o} to be not less than or equal to ${n}`,n,o,!1)}),c("toBeNaN",function(){const n=t.flag(this,"object");this.assert(Number.isNaN(n),"expected #{this} to be NaN","expected #{this} not to be NaN",Number.NaN,n)}),c("toBeUndefined",function(){const n=t.flag(this,"object");this.assert(n===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined",void 0,n)}),c("toBeNull",function(){const n=t.flag(this,"object");this.assert(n===null,"expected #{this} to be null","expected #{this} not to be null",null,n)}),c("toBeDefined",function(){const n=t.flag(this,"object");this.assert(typeof n<"u","expected #{this} to be defined","expected #{this} to be undefined",n)}),c("toBeTypeOf",function(n){const o=typeof this._obj,s=n===o;return this.assert(s,"expected #{this} to be type of #{exp}","expected #{this} not to be type of #{exp}",n,o)}),c("toBeInstanceOf",function(n){return this.instanceOf(n)}),c("toHaveLength",function(n){return this.have.length(n)}),c("toHaveProperty",function(...n){Array.isArray(n[0])&&(n[0]=n[0].map($=>String($).replace(/([.[\]])/g,"\\$1")).join("."));const o=this._obj,[s,i]=n,l=()=>Object.prototype.hasOwnProperty.call(o,s)?{value:o[s],exists:!0}:t.getPathInfo(o,s),{value:f,exists:p}=l(),y=p&&(n.length===1||g(i,f,a)),b=n.length===1?"":` with value ${t.objDisplay(i)}`;return this.assert(y,`expected #{this} to have property "${s}"${b}`,`expected #{this} to not have property "${s}"${b}`,i,p?f:void 0)}),c("toBeCloseTo",function(n,o=2){const s=this._obj;let i=!1,l=0,f=0;return n===Number.POSITIVE_INFINITY&&s===Number.POSITIVE_INFINITY||n===Number.NEGATIVE_INFINITY&&s===Number.NEGATIVE_INFINITY?i=!0:(l=10**-o/2,f=Math.abs(s-n),i=f<l),this.assert(i,`expected #{this} to be close to #{exp}, received difference is ${f}, but expected ${l}`,`expected #{this} to not be close to #{exp}, received difference is ${f}, but expected ${l}`,n,s,!1)});function h(n){if(!V(n._obj))throw new TypeError(`${t.inspect(n._obj)} is not a spy or a call to a spy!`)}function u(n){return h(n),n._obj}c(["toHaveBeenCalledTimes","toBeCalledTimes"],function(n){const o=u(this),s=o.getMockName(),i=o.mock.calls.length;return this.assert(i===n,`expected "${s}" to be called #{exp} times, but got ${i} times`,`expected "${s}" to not be called #{exp} times`,n,i,!1)}),c("toHaveBeenCalledOnce",function(){const n=u(this),o=n.getMockName(),s=n.mock.calls.length;return this.assert(s===1,`expected "${o}" to be called once, but got ${s} times`,`expected "${o}" to not be called once`,1,s,!1)}),c(["toHaveBeenCalled","toBeCalled"],function(){const n=u(this),o=n.getMockName(),s=n.mock.calls.length,i=s>0,l=t.flag(this,"negate");let f=t.getMessage(this,[i,`expected "${o}" to be called at least once`,`expected "${o}" to not be called at all, but actually been called ${s} times`,!0,i]);if(i&&l&&(f=Y(n,f)),i&&l||!i&&!l)throw new r(f)});function d(n,o){return n.length===o.length&&n.every((s,i)=>g(s,o[i],[...a,w]))}c(["toHaveBeenCalledWith","toBeCalledWith"],function(...n){const o=u(this),s=o.getMockName(),i=o.mock.calls.some(p=>d(p,n)),l=t.flag(this,"negate"),f=t.getMessage(this,[i,`expected "${s}" to be called with arguments: #{exp}`,`expected "${s}" to not be called with arguments: #{exp}`,n]);if(i&&l||!i&&!l)throw new r(Y(o,f,n))}),c("toHaveBeenCalledExactlyOnceWith",function(...n){const o=u(this),s=o.getMockName(),i=o.mock.calls.length,f=o.mock.calls.some(b=>d(b,n))&&i===1,p=t.flag(this,"negate"),y=t.getMessage(this,[f,`expected "${s}" to be called once with arguments: #{exp}`,`expected "${s}" to not be called once with arguments: #{exp}`,n]);if(f&&p||!f&&!p)throw new r(Y(o,y,n))}),c(["toHaveBeenNthCalledWith","nthCalledWith"],function(n,...o){const s=u(this),i=s.getMockName(),l=s.mock.calls[n-1],f=s.mock.calls.length,p=n<=f;this.assert(l&&d(l,o),`expected ${I(n)} "${i}" call to have been called with #{exp}${p?"":`, but called only ${f} times`}`,`expected ${I(n)} "${i}" call to not have been called with #{exp}`,o,l,p)}),c(["toHaveBeenLastCalledWith","lastCalledWith"],function(...n){const o=u(this),s=o.getMockName(),i=o.mock.calls[o.mock.calls.length-1];this.assert(i&&d(i,n),`expected last "${s}" call to have been called with #{exp}`,`expected last "${s}" call to not have been called with #{exp}`,n,i)});function m(n,o,s){const i=n.mock.invocationCallOrder,l=o.mock.invocationCallOrder;return i.length===0?!s:l.length===0?!1:i[0]<l[0]}c(["toHaveBeenCalledBefore"],function(n,o=!0){const s=u(this);if(!V(n))throw new TypeError(`${t.inspect(n)} is not a spy or a call to a spy`);this.assert(m(s,n,o),`expected "${s.getMockName()}" to have been called before "${n.getMockName()}"`,`expected "${s.getMockName()}" to not have been called before "${n.getMockName()}"`,n,s)}),c(["toHaveBeenCalledAfter"],function(n,o=!0){const s=u(this);if(!V(n))throw new TypeError(`${t.inspect(n)} is not a spy or a call to a spy`);this.assert(m(n,s,o),`expected "${s.getMockName()}" to have been called after "${n.getMockName()}"`,`expected "${s.getMockName()}" to not have been called after "${n.getMockName()}"`,n,s)}),c(["toThrow","toThrowError"],function(n){if(typeof n=="string"||typeof n>"u"||n instanceof RegExp)return this.throws(n===""?/^$/:n);const o=this._obj,s=t.flag(this,"promise"),i=t.flag(this,"negate");let l=null;if(s==="rejects")l=o;else if(s==="resolves"&&typeof o!="function"){if(i)return;{const f=t.flag(this,"message")||"expected promise to throw an error, but it didn't",p={showDiff:!1};throw new r(f,p,t.flag(this,"ssfi"))}}else{let f=!1;try{o()}catch(p){f=!0,l=p}if(!f&&!i){const p=t.flag(this,"message")||"expected function to throw an error, but it didn't",y={showDiff:!1};throw new r(p,y,t.flag(this,"ssfi"))}}if(typeof n=="function"){const f=n.name||n.prototype.constructor.name;return this.assert(l&&l instanceof n,`expected error to be instance of ${f}`,`expected error not to be instance of ${f}`,n,l)}if(n instanceof Error){const f=g(l,n,[...a,w]);return this.assert(f,"expected a thrown error to be #{exp}","expected a thrown error not to be #{exp}",n,l)}if(typeof n=="object"&&"asymmetricMatch"in n&&typeof n.asymmetricMatch=="function"){const f=n;return this.assert(l&&f.asymmetricMatch(l),"expected error to match asymmetric matcher","expected error not to match asymmetric matcher",f,l)}throw new Error(`"toThrow" expects string, RegExp, function, Error instance or asymmetric matcher, got "${typeof n}"`)}),[{name:"toHaveResolved",condition:n=>n.mock.settledResults.length>0&&n.mock.settledResults.some(({type:o})=>o==="fulfilled"),action:"resolved"},{name:["toHaveReturned","toReturn"],condition:n=>n.mock.calls.length>0&&n.mock.results.some(({type:o})=>o!=="throw"),action:"called"}].forEach(({name:n,condition:o,action:s})=>{c(n,function(){const i=u(this),l=i.getMockName(),f=o(i);this.assert(f,`expected "${l}" to be successfully ${s} at least once`,`expected "${l}" to not be successfully ${s}`,f,!f,!1)})}),[{name:"toHaveResolvedTimes",condition:(n,o)=>n.mock.settledResults.reduce((s,{type:i})=>i==="fulfilled"?++s:s,0)===o,action:"resolved"},{name:["toHaveReturnedTimes","toReturnTimes"],condition:(n,o)=>n.mock.results.reduce((s,{type:i})=>i==="throw"?s:++s,0)===o,action:"called"}].forEach(({name:n,condition:o,action:s})=>{c(n,function(i){const l=u(this),f=l.getMockName(),p=o(l,i);this.assert(p,`expected "${f}" to be successfully ${s} ${i} times`,`expected "${f}" to not be successfully ${s} ${i} times`,`expected resolved times: ${i}`,`received resolved times: ${p}`,!1)})}),[{name:"toHaveResolvedWith",condition:(n,o)=>n.mock.settledResults.some(({type:s,value:i})=>s==="fulfilled"&&g(o,i)),action:"resolve"},{name:["toHaveReturnedWith","toReturnWith"],condition:(n,o)=>n.mock.results.some(({type:s,value:i})=>s==="return"&&g(o,i)),action:"return"}].forEach(({name:n,condition:o,action:s})=>{c(n,function(i){const l=u(this),f=o(l,i),p=t.flag(this,"negate");if(f&&p||!f&&!p){const y=l.getMockName(),b=t.getMessage(this,[f,`expected "${y}" to ${s} with: #{exp} at least once`,`expected "${y}" to not ${s} with: #{exp}`,i]),$=s==="return"?l.mock.results:l.mock.settledResults;throw new r(Xt(l,$,b,i))}})}),[{name:"toHaveLastResolvedWith",condition:(n,o)=>{const s=n.mock.settledResults[n.mock.settledResults.length-1];return s&&s.type==="fulfilled"&&g(s.value,o)},action:"resolve"},{name:["toHaveLastReturnedWith","lastReturnedWith"],condition:(n,o)=>{const s=n.mock.results[n.mock.results.length-1];return s&&s.type==="return"&&g(s.value,o)},action:"return"}].forEach(({name:n,condition:o,action:s})=>{c(n,function(i){const l=u(this),f=s==="return"?l.mock.results:l.mock.settledResults,p=f[f.length-1],y=l.getMockName();this.assert(o(l,i),`expected last "${y}" call to ${s} #{exp}`,`expected last "${y}" call to not ${s} #{exp}`,i,p==null?void 0:p.value)})}),[{name:"toHaveNthResolvedWith",condition:(n,o,s)=>{const i=n.mock.settledResults[o-1];return i&&i.type==="fulfilled"&&g(i.value,s)},action:"resolve"},{name:["toHaveNthReturnedWith","nthReturnedWith"],condition:(n,o,s)=>{const i=n.mock.results[o-1];return i&&i.type==="return"&&g(i.value,s)},action:"return"}].forEach(({name:n,condition:o,action:s})=>{c(n,function(i,l){const f=u(this),p=f.getMockName(),b=(s==="return"?f.mock.results:f.mock.settledResults)[i-1],$=`${I(i)} call`;this.assert(o(f,i,l),`expected ${$} "${p}" call to ${s} #{exp}`,`expected ${$} "${p}" call to not ${s} #{exp}`,l,b==null?void 0:b.value)})}),c("withContext",function(n){for(const o in n)t.flag(this,o,n[o]);return this}),t.addProperty(e.Assertion.prototype,"resolves",function(){const o=new Error("resolves");t.flag(this,"promise","resolves"),t.flag(this,"error",o);const s=t.flag(this,"vitest-test"),i=t.flag(this,"object");if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .resolves");if(typeof(i==null?void 0:i.then)!="function")throw new TypeError(`You must provide a Promise to expect() when using .resolves, not '${typeof i}'.`);const l=new Proxy(this,{get:(f,p,y)=>{const b=Reflect.get(f,p,y);return typeof b!="function"?b instanceof e.Assertion?l:b:(...$)=>{t.flag(this,"_name",p);const C=i.then(N=>(t.flag(this,"object",N),b.call(this,...$)),N=>{const x=new r(`promise rejected "${t.inspect(N)}" instead of resolving`,{showDiff:!1});throw x.cause=N,x.stack=o.stack.replace(o.message,x.message),x});return at(s,C,ct(t,this,!!$.length),o)}}});return l}),t.addProperty(e.Assertion.prototype,"rejects",function(){const o=new Error("rejects");t.flag(this,"promise","rejects"),t.flag(this,"error",o);const s=t.flag(this,"vitest-test"),i=t.flag(this,"object"),l=typeof i=="function"?i():i;if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .rejects");if(typeof(l==null?void 0:l.then)!="function")throw new TypeError(`You must provide a Promise to expect() when using .rejects, not '${typeof l}'.`);const f=new Proxy(this,{get:(p,y,b)=>{const $=Reflect.get(p,y,b);return typeof $!="function"?$ instanceof e.Assertion?f:$:(...C)=>{t.flag(this,"_name",y);const N=l.then(x=>{const _=new r(`promise resolved "${t.inspect(x)}" instead of rejecting`,{showDiff:!0,expected:new Error("rejected promise"),actual:x});throw _.stack=o.stack.replace(o.message,_.message),_},x=>(t.flag(this,"object",x),$.call(this,...C)));return at(s,N,ct(t,this,!!C.length),o)}}});return f})};function I(e){const t=e%10,r=e%100;return t===1&&r!==11?`${e}st`:t===2&&r!==12?`${e}nd`:t===3&&r!==13?`${e}rd`:`${e}th`}function Y(e,t,r){return e.mock.calls.length&&(t+=E.gray(`
|
|
30
|
+
`:c}function Jt(e,t){return`${t} ${e}${t===1?"":"s"}`}function F(e){return[...Object.keys(e),...Object.getOwnPropertySymbols(e).filter(t=>{var r;return(r=Object.getOwnPropertyDescriptor(e,t))===null||r===void 0?void 0:r.enumerable})]}function Gt(e,t,r){let c=0;const a=(h=new WeakMap)=>(u,d)=>{if(Array.isArray(u)){if(Array.isArray(d)&&d.length===u.length)return d.map((m,n)=>a(h)(u[n],m))}else{if(u instanceof Date)return u;if(q(u)&&q(d)){if(g(u,d,[...r,w,P]))return d;const m={};h.set(u,m),typeof u.constructor=="function"&&typeof u.constructor.name=="string"&&Object.defineProperty(m,"constructor",{enumerable:!1,value:u.constructor});for(const n of F(u))z(d,n)?m[n]=h.has(u[n])?h.get(u[n]):a(h)(u[n],d[n]):h.has(u[n])||(c+=1,q(u[n])&&(c+=F(u[n]).length),a(h)(u[n],d[n]));if(F(m).length>0)return m}}return u};return{subset:a()(e,t),stripped:c}}if(!Object.prototype.hasOwnProperty.call(globalThis,k)){const e=new WeakMap,t=Object.create(null),r=[],c=Object.create(null);Object.defineProperty(globalThis,k,{get:()=>e}),Object.defineProperty(globalThis,B,{configurable:!0,get:()=>({state:e.get(globalThis[ft]),matchers:t,customEqualityTesters:r})}),Object.defineProperty(globalThis,ht,{get:()=>c})}function $t(e){return globalThis[k].get(e)}function ue(e,t){const r=globalThis[k],c=r.get(t)||{},a=Object.defineProperties(c,{...Object.getOwnPropertyDescriptors(c),...Object.getOwnPropertyDescriptors(e)});r.set(t,a)}class O{constructor(t,r=!1){H(this,"$$typeof",Symbol.for("jest.asymmetricMatcher"));this.sample=t,this.inverse=r}getMatcherContext(t){return{...$t(t||globalThis[ft]),equals:g,isNot:this.inverse,customTesters:G(),utils:{...dt(),diff:S,stringify:M,iterableEquality:w,subsetEquality:P}}}}O.prototype[Symbol.for("chai/inspect")]=function(e){const t=M(this,e.depth,{min:!0});return t.length<=e.truncate?t:`${this.toString()}{…}`};class nt extends O{constructor(t,r=!1){if(!v("String",t))throw new Error("Expected is not a string");super(t,r)}asymmetricMatch(t){const r=v("String",t)&&t.includes(this.sample);return this.inverse?!r:r}toString(){return`String${this.inverse?"Not":""}Containing`}getExpectedType(){return"string"}}class zt extends O{asymmetricMatch(t){return t!=null}toString(){return"Anything"}toAsymmetricMatcher(){return"Anything"}}class ot extends O{constructor(t,r=!1){super(t,r)}getPrototype(t){return Object.getPrototypeOf?Object.getPrototypeOf(t):t.constructor.prototype===t?null:t.constructor.prototype}hasProperty(t,r){return t?Object.prototype.hasOwnProperty.call(t,r)?!0:this.hasProperty(this.getPrototype(t),r):!1}asymmetricMatch(t){if(typeof this.sample!="object")throw new TypeError(`You must provide an object to ${this.toString()}, not '${typeof this.sample}'.`);let r=!0;const c=this.getMatcherContext();for(const a in this.sample)if(!this.hasProperty(t,a)||!g(this.sample[a],t[a],c.customTesters)){r=!1;break}return this.inverse?!r:r}toString(){return`Object${this.inverse?"Not":""}Containing`}getExpectedType(){return"object"}}class rt extends O{constructor(t,r=!1){super(t,r)}asymmetricMatch(t){if(!Array.isArray(this.sample))throw new TypeError(`You must provide an array to ${this.toString()}, not '${typeof this.sample}'.`);const r=this.getMatcherContext(),c=this.sample.length===0||Array.isArray(t)&&this.sample.every(a=>t.some(h=>g(a,h,r.customTesters)));return this.inverse?!c:c}toString(){return`Array${this.inverse?"Not":""}Containing`}getExpectedType(){return"array"}}class Kt extends O{constructor(t){if(typeof t>"u")throw new TypeError("any() expects to be passed a constructor function. Please pass one or use anything() to match any object.");super(t)}fnNameFor(t){if(t.name)return t.name;const c=Function.prototype.toString.call(t).match(/^(?:async)?\s*function\s*(?:\*\s*)?([\w$]+)\s*\(/);return c?c[1]:"<anonymous>"}asymmetricMatch(t){return this.sample===String?typeof t=="string"||t instanceof String:this.sample===Number?typeof t=="number"||t instanceof Number:this.sample===Function?typeof t=="function"||typeof t=="function":this.sample===Boolean?typeof t=="boolean"||t instanceof Boolean:this.sample===BigInt?typeof t=="bigint"||t instanceof BigInt:this.sample===Symbol?typeof t=="symbol"||t instanceof Symbol:this.sample===Object?typeof t=="object":t instanceof this.sample}toString(){return"Any"}getExpectedType(){return this.sample===String?"string":this.sample===Number?"number":this.sample===Function?"function":this.sample===Object?"object":this.sample===Boolean?"boolean":this.fnNameFor(this.sample)}toAsymmetricMatcher(){return`Any<${this.fnNameFor(this.sample)}>`}}class st extends O{constructor(t,r=!1){if(!v("String",t)&&!v("RegExp",t))throw new Error("Expected is not a String or a RegExp");super(new RegExp(t),r)}asymmetricMatch(t){const r=v("String",t)&&this.sample.test(t);return this.inverse?!r:r}toString(){return`String${this.inverse?"Not":""}Matching`}getExpectedType(){return"string"}}class it extends O{constructor(r,c=2,a=!1){if(!v("Number",r))throw new Error("Expected is not a Number");if(!v("Number",c))throw new Error("Precision is not a Number");super(r);H(this,"precision");this.inverse=a,this.precision=c}asymmetricMatch(r){if(!v("Number",r))return!1;let c=!1;return r===Number.POSITIVE_INFINITY&&this.sample===Number.POSITIVE_INFINITY||r===Number.NEGATIVE_INFINITY&&this.sample===Number.NEGATIVE_INFINITY?c=!0:c=Math.abs(this.sample-r)<10**-this.precision/2,this.inverse?!c:c}toString(){return`Number${this.inverse?"Not":""}CloseTo`}getExpectedType(){return"number"}toAsymmetricMatcher(){return[this.toString(),this.sample,`(${Jt("digit",this.precision)})`].join(" ")}}const fe=(e,t)=>{t.addMethod(e.expect,"anything",()=>new zt),t.addMethod(e.expect,"any",r=>new Kt(r)),t.addMethod(e.expect,"stringContaining",r=>new nt(r)),t.addMethod(e.expect,"objectContaining",r=>new ot(r)),t.addMethod(e.expect,"arrayContaining",r=>new rt(r)),t.addMethod(e.expect,"stringMatching",r=>new st(r)),t.addMethod(e.expect,"closeTo",(r,c)=>new it(r,c)),e.expect.not={stringContaining:r=>new nt(r,!0),objectContaining:r=>new ot(r,!0),arrayContaining:r=>new rt(r,!0),stringMatching:r=>new st(r,!0),closeTo:(r,c)=>new it(r,c,!0)}};function at(e,t,r){const c=e.flag(t,"negate")?"not.":"",a=`${e.flag(t,"_name")}(${r?"expected":""})`,h=e.flag(t,"promise");return`expect(actual)${h?`.${h}`:""}.${c}${a}`}function ct(e,t,r,c){const a=e;if(a&&t instanceof Promise){t=t.finally(()=>{if(!a.promises)return;const u=a.promises.indexOf(t);u!==-1&&a.promises.splice(u,1)}),a.promises||(a.promises=[]),a.promises.push(t);let h=!1;return a.onFinished??(a.onFinished=[]),a.onFinished.push(()=>{if(!h){var u;const m=(((u=globalThis.__vitest_worker__)===null||u===void 0?void 0:u.onFilterStackTrace)||(n=>n||""))(c.stack);console.warn([`Promise returned by \`${r}\` was not awaited. `,"Vitest currently auto-awaits hanging assertions at the end of the test, but this will cause the test to fail in Vitest 3. ",`Please remember to await the assertion.
|
|
31
|
+
`,m].join(""))}}),{then(u,d){return h=!0,t.then(u,d)},catch(u){return t.catch(u)},finally(u){return t.finally(u)},[Symbol.toStringTag]:"Promise"}}return t}function Et(e,t,r){return function(...c){if(t!=="withTest"&&e.flag(this,"_name",t),!e.flag(this,"soft"))return r.apply(this,c);const a=e.flag(this,"vitest-test");if(!a)throw new Error("expect.soft() can only be used inside a test");try{return r.apply(this,c)}catch(u){var h;a.result||(a.result={state:"fail"}),a.result.state="fail",(h=a.result).errors||(h.errors=[]),a.result.errors.push(Nt(u))}}}const he=(e,t)=>{const{AssertionError:r}=e,c=G();function a(n,o){const s=i=>{const l=Et(t,i,o);t.addMethod(e.Assertion.prototype,i,l),t.addMethod(globalThis[B].matchers,i,l)};Array.isArray(n)?n.forEach(i=>s(i)):s(n)}["throw","throws","Throw"].forEach(n=>{t.overwriteMethod(e.Assertion.prototype,n,o=>function(...s){const i=t.flag(this,"promise"),l=t.flag(this,"object"),f=t.flag(this,"negate");if(i==="rejects")t.flag(this,"object",()=>{throw l});else if(i==="resolves"&&typeof l!="function"){if(f)return;{const p=t.flag(this,"message")||"expected promise to throw an error, but it didn't",y={showDiff:!1};throw new r(p,y,t.flag(this,"ssfi"))}}o.apply(this,s)})}),a("withTest",function(n){return t.flag(this,"vitest-test",n),this}),a("toEqual",function(n){const o=t.flag(this,"object"),s=g(o,n,[...c,w]);return this.assert(s,"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",n,o)}),a("toStrictEqual",function(n){const o=t.flag(this,"object"),s=g(o,n,[...c,w,tt,U,et],!0);return this.assert(s,"expected #{this} to strictly equal #{exp}","expected #{this} to not strictly equal #{exp}",n,o)}),a("toBe",function(n){const o=this._obj,s=Object.is(o,n);let i="";return s||(g(o,n,[...c,w,tt,U,et],!0)?i="toStrictEqual":g(o,n,[...c,w])&&(i="toEqual")),this.assert(s,Ut(i),"expected #{this} not to be #{exp} // Object.is equality",n,o)}),a("toMatchObject",function(n){const o=this._obj,s=g(o,n,[...c,w,P]),i=t.flag(this,"negate"),{subset:l,stripped:f}=Gt(o,n,c);if(s&&i||!s&&!i){const p=t.getMessage(this,[s,"expected #{this} to match object #{exp}","expected #{this} to not match object #{exp}",n,l,!1]),y=f===0?p:`${p}
|
|
32
|
+
(${f} matching ${f===1?"property":"properties"} omitted from actual)`;throw new r(y,{showDiff:!0,expected:n,actual:l})}}),a("toMatch",function(n){const o=this._obj;if(typeof o!="string")throw new TypeError(`.toMatch() expects to receive a string, but got ${typeof o}`);return this.assert(typeof n=="string"?o.includes(n):o.match(n),"expected #{this} to match #{exp}","expected #{this} not to match #{exp}",n,o)}),a("toContain",function(n){const o=this._obj;if(typeof Node<"u"&&o instanceof Node){if(!(n instanceof Node))throw new TypeError(`toContain() expected a DOM node as the argument, but got ${typeof n}`);return this.assert(o.contains(n),"expected #{this} to contain element #{exp}","expected #{this} not to contain element #{exp}",n,o)}if(typeof DOMTokenList<"u"&&o instanceof DOMTokenList){N(n,"class name",["string"]);const i=t.flag(this,"negate")?o.value.replace(n,"").trim():`${o.value} ${n}`;return this.assert(o.contains(n),`expected "${o.value}" to contain "${n}"`,`expected "${o.value}" not to contain "${n}"`,i,o.value)}return typeof o=="string"&&typeof n=="string"?this.assert(o.includes(n),"expected #{this} to contain #{exp}","expected #{this} not to contain #{exp}",n,o):(o!=null&&typeof o!="string"&&t.flag(this,"object",Array.from(o)),this.contain(n))}),a("toContainEqual",function(n){const o=t.flag(this,"object"),s=Array.from(o).findIndex(i=>g(i,n,c));this.assert(s!==-1,"expected #{this} to deep equally contain #{exp}","expected #{this} to not deep equally contain #{exp}",n)}),a("toBeTruthy",function(){const n=t.flag(this,"object");this.assert(!!n,"expected #{this} to be truthy","expected #{this} to not be truthy",!0,n)}),a("toBeFalsy",function(){const n=t.flag(this,"object");this.assert(!n,"expected #{this} to be falsy","expected #{this} to not be falsy",!1,n)}),a("toBeGreaterThan",function(n){const o=this._obj;return N(o,"actual",["number","bigint"]),N(n,"expected",["number","bigint"]),this.assert(o>n,`expected ${o} to be greater than ${n}`,`expected ${o} to be not greater than ${n}`,n,o,!1)}),a("toBeGreaterThanOrEqual",function(n){const o=this._obj;return N(o,"actual",["number","bigint"]),N(n,"expected",["number","bigint"]),this.assert(o>=n,`expected ${o} to be greater than or equal to ${n}`,`expected ${o} to be not greater than or equal to ${n}`,n,o,!1)}),a("toBeLessThan",function(n){const o=this._obj;return N(o,"actual",["number","bigint"]),N(n,"expected",["number","bigint"]),this.assert(o<n,`expected ${o} to be less than ${n}`,`expected ${o} to be not less than ${n}`,n,o,!1)}),a("toBeLessThanOrEqual",function(n){const o=this._obj;return N(o,"actual",["number","bigint"]),N(n,"expected",["number","bigint"]),this.assert(o<=n,`expected ${o} to be less than or equal to ${n}`,`expected ${o} to be not less than or equal to ${n}`,n,o,!1)}),a("toBeNaN",function(){const n=t.flag(this,"object");this.assert(Number.isNaN(n),"expected #{this} to be NaN","expected #{this} not to be NaN",Number.NaN,n)}),a("toBeUndefined",function(){const n=t.flag(this,"object");this.assert(n===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined",void 0,n)}),a("toBeNull",function(){const n=t.flag(this,"object");this.assert(n===null,"expected #{this} to be null","expected #{this} not to be null",null,n)}),a("toBeDefined",function(){const n=t.flag(this,"object");this.assert(typeof n<"u","expected #{this} to be defined","expected #{this} to be undefined",n)}),a("toBeTypeOf",function(n){const o=typeof this._obj,s=n===o;return this.assert(s,"expected #{this} to be type of #{exp}","expected #{this} not to be type of #{exp}",n,o)}),a("toBeInstanceOf",function(n){return this.instanceOf(n)}),a("toHaveLength",function(n){return this.have.length(n)}),a("toHaveProperty",function(...n){Array.isArray(n[0])&&(n[0]=n[0].map($=>String($).replace(/([.[\]])/g,"\\$1")).join("."));const o=this._obj,[s,i]=n,l=()=>Object.prototype.hasOwnProperty.call(o,s)?{value:o[s],exists:!0}:t.getPathInfo(o,s),{value:f,exists:p}=l(),y=p&&(n.length===1||g(i,f,c)),b=n.length===1?"":` with value ${t.objDisplay(i)}`;return this.assert(y,`expected #{this} to have property "${s}"${b}`,`expected #{this} to not have property "${s}"${b}`,i,p?f:void 0)}),a("toBeCloseTo",function(n,o=2){const s=this._obj;let i=!1,l=0,f=0;return n===Number.POSITIVE_INFINITY&&s===Number.POSITIVE_INFINITY||n===Number.NEGATIVE_INFINITY&&s===Number.NEGATIVE_INFINITY?i=!0:(l=10**-o/2,f=Math.abs(s-n),i=f<l),this.assert(i,`expected #{this} to be close to #{exp}, received difference is ${f}, but expected ${l}`,`expected #{this} to not be close to #{exp}, received difference is ${f}, but expected ${l}`,n,s,!1)});function h(n){if(!V(n._obj))throw new TypeError(`${t.inspect(n._obj)} is not a spy or a call to a spy!`)}function u(n){return h(n),n._obj}a(["toHaveBeenCalledTimes","toBeCalledTimes"],function(n){const o=u(this),s=o.getMockName(),i=o.mock.calls.length;return this.assert(i===n,`expected "${s}" to be called #{exp} times, but got ${i} times`,`expected "${s}" to not be called #{exp} times`,n,i,!1)}),a("toHaveBeenCalledOnce",function(){const n=u(this),o=n.getMockName(),s=n.mock.calls.length;return this.assert(s===1,`expected "${o}" to be called once, but got ${s} times`,`expected "${o}" to not be called once`,1,s,!1)}),a(["toHaveBeenCalled","toBeCalled"],function(){const n=u(this),o=n.getMockName(),s=n.mock.calls.length,i=s>0,l=t.flag(this,"negate");let f=t.getMessage(this,[i,`expected "${o}" to be called at least once`,`expected "${o}" to not be called at all, but actually been called ${s} times`,!0,i]);if(i&&l&&(f=Y(n,f)),i&&l||!i&&!l)throw new r(f)});function d(n,o){return n.length===o.length&&n.every((s,i)=>g(s,o[i],[...c,w]))}a(["toHaveBeenCalledWith","toBeCalledWith"],function(...n){const o=u(this),s=o.getMockName(),i=o.mock.calls.some(p=>d(p,n)),l=t.flag(this,"negate"),f=t.getMessage(this,[i,`expected "${s}" to be called with arguments: #{exp}`,`expected "${s}" to not be called with arguments: #{exp}`,n]);if(i&&l||!i&&!l)throw new r(Y(o,f,n))}),a("toHaveBeenCalledExactlyOnceWith",function(...n){const o=u(this),s=o.getMockName(),i=o.mock.calls.length,f=o.mock.calls.some(b=>d(b,n))&&i===1,p=t.flag(this,"negate"),y=t.getMessage(this,[f,`expected "${s}" to be called once with arguments: #{exp}`,`expected "${s}" to not be called once with arguments: #{exp}`,n]);if(f&&p||!f&&!p)throw new r(Y(o,y,n))}),a(["toHaveBeenNthCalledWith","nthCalledWith"],function(n,...o){const s=u(this),i=s.getMockName(),l=s.mock.calls[n-1],f=s.mock.calls.length,p=n<=f;this.assert(l&&d(l,o),`expected ${I(n)} "${i}" call to have been called with #{exp}${p?"":`, but called only ${f} times`}`,`expected ${I(n)} "${i}" call to not have been called with #{exp}`,o,l,p)}),a(["toHaveBeenLastCalledWith","lastCalledWith"],function(...n){const o=u(this),s=o.getMockName(),i=o.mock.calls[o.mock.calls.length-1];this.assert(i&&d(i,n),`expected last "${s}" call to have been called with #{exp}`,`expected last "${s}" call to not have been called with #{exp}`,n,i)});function m(n,o,s){const i=n.mock.invocationCallOrder,l=o.mock.invocationCallOrder;return i.length===0?!s:l.length===0?!1:i[0]<l[0]}a(["toHaveBeenCalledBefore"],function(n,o=!0){const s=u(this);if(!V(n))throw new TypeError(`${t.inspect(n)} is not a spy or a call to a spy`);this.assert(m(s,n,o),`expected "${s.getMockName()}" to have been called before "${n.getMockName()}"`,`expected "${s.getMockName()}" to not have been called before "${n.getMockName()}"`,n,s)}),a(["toHaveBeenCalledAfter"],function(n,o=!0){const s=u(this);if(!V(n))throw new TypeError(`${t.inspect(n)} is not a spy or a call to a spy`);this.assert(m(n,s,o),`expected "${s.getMockName()}" to have been called after "${n.getMockName()}"`,`expected "${s.getMockName()}" to not have been called after "${n.getMockName()}"`,n,s)}),a(["toThrow","toThrowError"],function(n){if(typeof n=="string"||typeof n>"u"||n instanceof RegExp)return this.throws(n===""?/^$/:n);const o=this._obj,s=t.flag(this,"promise"),i=t.flag(this,"negate");let l=null;if(s==="rejects")l=o;else if(s==="resolves"&&typeof o!="function"){if(i)return;{const f=t.flag(this,"message")||"expected promise to throw an error, but it didn't",p={showDiff:!1};throw new r(f,p,t.flag(this,"ssfi"))}}else{let f=!1;try{o()}catch(p){f=!0,l=p}if(!f&&!i){const p=t.flag(this,"message")||"expected function to throw an error, but it didn't",y={showDiff:!1};throw new r(p,y,t.flag(this,"ssfi"))}}if(typeof n=="function"){const f=n.name||n.prototype.constructor.name;return this.assert(l&&l instanceof n,`expected error to be instance of ${f}`,`expected error not to be instance of ${f}`,n,l)}if(n instanceof Error){const f=g(l,n,[...c,w]);return this.assert(f,"expected a thrown error to be #{exp}","expected a thrown error not to be #{exp}",n,l)}if(typeof n=="object"&&"asymmetricMatch"in n&&typeof n.asymmetricMatch=="function"){const f=n;return this.assert(l&&f.asymmetricMatch(l),"expected error to match asymmetric matcher","expected error not to match asymmetric matcher",f,l)}throw new Error(`"toThrow" expects string, RegExp, function, Error instance or asymmetric matcher, got "${typeof n}"`)}),[{name:"toHaveResolved",condition:n=>n.mock.settledResults.length>0&&n.mock.settledResults.some(({type:o})=>o==="fulfilled"),action:"resolved"},{name:["toHaveReturned","toReturn"],condition:n=>n.mock.calls.length>0&&n.mock.results.some(({type:o})=>o!=="throw"),action:"called"}].forEach(({name:n,condition:o,action:s})=>{a(n,function(){const i=u(this),l=i.getMockName(),f=o(i);this.assert(f,`expected "${l}" to be successfully ${s} at least once`,`expected "${l}" to not be successfully ${s}`,f,!f,!1)})}),[{name:"toHaveResolvedTimes",condition:(n,o)=>n.mock.settledResults.reduce((s,{type:i})=>i==="fulfilled"?++s:s,0)===o,action:"resolved"},{name:["toHaveReturnedTimes","toReturnTimes"],condition:(n,o)=>n.mock.results.reduce((s,{type:i})=>i==="throw"?s:++s,0)===o,action:"called"}].forEach(({name:n,condition:o,action:s})=>{a(n,function(i){const l=u(this),f=l.getMockName(),p=o(l,i);this.assert(p,`expected "${f}" to be successfully ${s} ${i} times`,`expected "${f}" to not be successfully ${s} ${i} times`,`expected resolved times: ${i}`,`received resolved times: ${p}`,!1)})}),[{name:"toHaveResolvedWith",condition:(n,o)=>n.mock.settledResults.some(({type:s,value:i})=>s==="fulfilled"&&g(o,i)),action:"resolve"},{name:["toHaveReturnedWith","toReturnWith"],condition:(n,o)=>n.mock.results.some(({type:s,value:i})=>s==="return"&&g(o,i)),action:"return"}].forEach(({name:n,condition:o,action:s})=>{a(n,function(i){const l=u(this),f=o(l,i),p=t.flag(this,"negate");if(f&&p||!f&&!p){const y=l.getMockName(),b=t.getMessage(this,[f,`expected "${y}" to ${s} with: #{exp} at least once`,`expected "${y}" to not ${s} with: #{exp}`,i]),$=s==="return"?l.mock.results:l.mock.settledResults;throw new r(Xt(l,$,b,i))}})}),[{name:"toHaveLastResolvedWith",condition:(n,o)=>{const s=n.mock.settledResults[n.mock.settledResults.length-1];return s&&s.type==="fulfilled"&&g(s.value,o)},action:"resolve"},{name:["toHaveLastReturnedWith","lastReturnedWith"],condition:(n,o)=>{const s=n.mock.results[n.mock.results.length-1];return s&&s.type==="return"&&g(s.value,o)},action:"return"}].forEach(({name:n,condition:o,action:s})=>{a(n,function(i){const l=u(this),f=s==="return"?l.mock.results:l.mock.settledResults,p=f[f.length-1],y=l.getMockName();this.assert(o(l,i),`expected last "${y}" call to ${s} #{exp}`,`expected last "${y}" call to not ${s} #{exp}`,i,p==null?void 0:p.value)})}),[{name:"toHaveNthResolvedWith",condition:(n,o,s)=>{const i=n.mock.settledResults[o-1];return i&&i.type==="fulfilled"&&g(i.value,s)},action:"resolve"},{name:["toHaveNthReturnedWith","nthReturnedWith"],condition:(n,o,s)=>{const i=n.mock.results[o-1];return i&&i.type==="return"&&g(i.value,s)},action:"return"}].forEach(({name:n,condition:o,action:s})=>{a(n,function(i,l){const f=u(this),p=f.getMockName(),b=(s==="return"?f.mock.results:f.mock.settledResults)[i-1],$=`${I(i)} call`;this.assert(o(f,i,l),`expected ${$} "${p}" call to ${s} #{exp}`,`expected ${$} "${p}" call to not ${s} #{exp}`,l,b==null?void 0:b.value)})}),a("withContext",function(n){for(const o in n)t.flag(this,o,n[o]);return this}),t.addProperty(e.Assertion.prototype,"resolves",function(){const o=new Error("resolves");t.flag(this,"promise","resolves"),t.flag(this,"error",o);const s=t.flag(this,"vitest-test"),i=t.flag(this,"object");if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .resolves");if(typeof(i==null?void 0:i.then)!="function")throw new TypeError(`You must provide a Promise to expect() when using .resolves, not '${typeof i}'.`);const l=new Proxy(this,{get:(f,p,y)=>{const b=Reflect.get(f,p,y);return typeof b!="function"?b instanceof e.Assertion?l:b:(...$)=>{t.flag(this,"_name",p);const C=i.then(T=>(t.flag(this,"object",T),b.call(this,...$)),T=>{const x=new r(`promise rejected "${t.inspect(T)}" instead of resolving`,{showDiff:!1});throw x.cause=T,x.stack=o.stack.replace(o.message,x.message),x});return ct(s,C,at(t,this,!!$.length),o)}}});return l}),t.addProperty(e.Assertion.prototype,"rejects",function(){const o=new Error("rejects");t.flag(this,"promise","rejects"),t.flag(this,"error",o);const s=t.flag(this,"vitest-test"),i=t.flag(this,"object"),l=typeof i=="function"?i():i;if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .rejects");if(typeof(l==null?void 0:l.then)!="function")throw new TypeError(`You must provide a Promise to expect() when using .rejects, not '${typeof l}'.`);const f=new Proxy(this,{get:(p,y,b)=>{const $=Reflect.get(p,y,b);return typeof $!="function"?$ instanceof e.Assertion?f:$:(...C)=>{t.flag(this,"_name",y);const T=l.then(x=>{const _=new r(`promise resolved "${t.inspect(x)}" instead of rejecting`,{showDiff:!0,expected:new Error("rejected promise"),actual:x});throw _.stack=o.stack.replace(o.message,_.message),_},x=>(t.flag(this,"object",x),$.call(this,...C)));return ct(s,T,at(t,this,!!C.length),o)}}});return f})};function I(e){const t=e%10,r=e%100;return t===1&&r!==11?`${e}st`:t===2&&r!==12?`${e}nd`:t===3&&r!==13?`${e}rd`:`${e}th`}function Y(e,t,r){return e.mock.calls.length&&(t+=E.gray(`
|
|
33
33
|
|
|
34
34
|
Received:
|
|
35
35
|
|
|
36
|
-
${e.mock.calls.map((a
|
|
36
|
+
${e.mock.calls.map((c,a)=>{let h=E.bold(` ${I(a+1)} ${e.getMockName()} call:
|
|
37
37
|
|
|
38
|
-
`);return r?h+=S(r,
|
|
38
|
+
`);return r?h+=S(r,c,{omitAnnotationLines:!0}):h+=M(c).split(`
|
|
39
39
|
`).map(u=>` ${u}`).join(`
|
|
40
40
|
`),h+=`
|
|
41
41
|
`,h}).join(`
|
|
42
42
|
`)}`)),t+=E.gray(`
|
|
43
43
|
|
|
44
44
|
Number of calls: ${E.bold(e.mock.calls.length)}
|
|
45
|
-
`),t}function Xt(e,t,r,
|
|
45
|
+
`),t}function Xt(e,t,r,c){return t.length&&(r+=E.gray(`
|
|
46
46
|
|
|
47
47
|
Received:
|
|
48
48
|
|
|
49
|
-
${t.map((
|
|
49
|
+
${t.map((a,h)=>{let u=E.bold(` ${I(h+1)} ${e.getMockName()} call return:
|
|
50
50
|
|
|
51
|
-
`);return
|
|
51
|
+
`);return c?u+=S(c,a.value,{omitAnnotationLines:!0}):u+=M(a).split(`
|
|
52
52
|
`).map(d=>` ${d}`).join(`
|
|
53
53
|
`),u+=`
|
|
54
54
|
`,u}).join(`
|
|
55
55
|
`)}`)),r+=E.gray(`
|
|
56
56
|
|
|
57
57
|
Number of calls: ${E.bold(e.mock.calls.length)}
|
|
58
|
-
`),r}function
|
|
58
|
+
`),r}function Zt(e,t){const r=e._obj,c=R.flag(e,"negate"),a=R.flag(e,"promise")||"",h={...dt(),diff:S,stringify:M,iterableEquality:w,subsetEquality:P};return{state:{...$t(t),customTesters:G(),isNot:c,utils:h,promise:a,equals:g,suppressedErrors:[],soft:R.flag(e,"soft"),poll:R.flag(e,"poll")},isNot:c,obj:r}}class lt extends Error{constructor(t,r,c){super(t),this.actual=r,this.expected=c}}function Qt(e,t,r){return(c,a)=>{Object.entries(r).forEach(([h,u])=>{function d(...s){const{state:i,isNot:l,obj:f}=Zt(this,t),p=u.call(i,f,...s);if(p&&typeof p=="object"&&p instanceof Promise)return p.then(({pass:T,message:x,actual:_,expected:wt})=>{if(T&&l||!T&&!l)throw new lt(x(),_,wt)});const{pass:y,message:b,actual:$,expected:C}=p;if(y&&l||!y&&!l)throw new lt(b(),$,C)}const m=Et(a,h,d);a.addMethod(globalThis[B].matchers,h,m),a.addMethod(e.Assertion.prototype,h,m);class n extends O{constructor(i=!1,...l){super(l,i)}asymmetricMatch(i){const{pass:l}=u.call(this.getMatcherContext(t),i,...this.sample);return this.inverse?!l:l}toString(){return`${this.inverse?"not.":""}${h}`}getExpectedType(){return"any"}toAsymmetricMatcher(){return`${this.toString()}<${this.sample.map(i=>M(i)).join(", ")}>`}}const o=(...s)=>new n(!1,...s);Object.defineProperty(t,h,{configurable:!0,enumerable:!0,value:o,writable:!0}),Object.defineProperty(t.not,h,{configurable:!0,enumerable:!0,value:(...s)=>new n(!0,...s),writable:!0}),Object.defineProperty(globalThis[ht],h,{configurable:!0,enumerable:!0,value:o,writable:!0})})}}const pe=(e,t)=>{t.addMethod(e.expect,"extend",(r,c)=>{Ot(Qt(e,r,c))})};export{ht as ASYMMETRIC_MATCHERS_OBJECT,Kt as Any,zt as Anything,rt as ArrayContaining,O as AsymmetricMatcher,ft as GLOBAL_EXPECT,B as JEST_MATCHERS_OBJECT,fe as JestAsymmetricMatchers,he as JestChaiExpect,pe as JestExtend,k as MATCHERS_OBJECT,ot as ObjectContaining,nt as StringContaining,st as StringMatching,le as addCustomEqualityTesters,et as arrayBufferEquality,ce as customMatchers,g as equals,Ut as generateToBeMessage,F as getObjectKeys,Gt as getObjectSubset,$t as getState,v as isA,K as isAsymmetric,Dt as isImmutableUnorderedKeyed,Lt as isImmutableUnorderedSet,w as iterableEquality,Jt as pluralize,ue as setState,U as sparseArrayEquality,P as subsetEquality,tt as typeEquality};
|
package/dist/node_modules/.pnpm/@vitest_runner@3.2.0/node_modules/@vitest/runner/dist/chunk-hooks.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
var ue=Object.defineProperty;var le=(t,e,r)=>e in t?ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var q=(t,e,r)=>le(t,typeof e!="symbol"?e+"":e,r);import{getSafeTimers as fe}from"../../../../../@vitest_utils@3.2.0/node_modules/@vitest/utils/dist/index.js";import{parseSingleStack as Q}from"../../../../../@vitest_utils@3.2.0/node_modules/@vitest/utils/dist/source-map.js";import{isNegativeNaN as he,isObject as Z,objectAttr as X,toArray as O,createDefer as B}from"../../../../../@vitest_utils@3.2.0/node_modules/@vitest/utils/dist/helpers.js";import{f as de,o as pe}from"../../../../../@vitest_utils@3.2.0/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js";class ge extends Error{constructor(r,i,n){super(r);q(this,"code","VITEST_PENDING");q(this,"taskId");this.message=r,this.note=n,this.taskId=i.id}}const me=new WeakMap,ee=new WeakMap,te=new WeakMap;function ye(t,e){me.set(t,e)}function ve(t,e){ee.set(t,e)}function we(t){return ee.get(t)}function Te(t,e){te.set(t,e)}function ke(t){return te.get(t)}function be(t,e){const r=e.reduce((s,o)=>(s[o.prop]=o,s),{}),i={};t.forEach(s=>{const o=r[s.prop]||{...s};i[o.prop]=o});for(const s in i){var n;const o=i[s];o.deps=(n=o.deps)===null||n===void 0?void 0:n.map(c=>i[c.prop])}return Object.values(i)}function ne(t,e,r){const i=["auto","injected","scope"],n=Object.entries(t).map(([s,o])=>{const c={value:o};if(Array.isArray(o)&&o.length>=2&&Z(o[1])&&Object.keys(o[1]).some(a=>i.includes(a))){var u;Object.assign(c,o[1]);const a=o[0];c.value=c.injected?((u=r.injectValue)===null||u===void 0?void 0:u.call(r,s))??a:a}return c.scope=c.scope||"test",c.scope==="worker"&&!r.getWorkerContext&&(c.scope="file"),c.prop=s,c.isFn=typeof c.value=="function",c});return Array.isArray(e.fixtures)?e.fixtures=e.fixtures.concat(n):e.fixtures=n,n.forEach(s=>{if(s.isFn){const c=oe(s.value);if(c.length&&(s.deps=e.fixtures.filter(({prop:u})=>u!==s.prop&&c.includes(u))),s.scope!=="test"){var o;(o=s.deps)===null||o===void 0||o.forEach(u=>{if(u.isFn&&!(s.scope==="worker"&&u.scope==="worker")&&!(s.scope==="file"&&u.scope!=="test"))throw new SyntaxError(`cannot use the ${u.scope} fixture "${u.prop}" inside the ${s.scope} fixture "${s.prop}"`)})}}}),e}const M=new Map,A=new Map;function Ce(t,e,r){return i=>{const n=i||r;if(!n)return e({});const s=we(n);if(!(s!=null&&s.length))return e(n);const o=oe(e),c=s.some(({auto:h})=>h);if(!o.length&&!c)return e(n);M.get(n)||M.set(n,new Map);const u=M.get(n);A.has(n)||A.set(n,[]);const a=A.get(n),l=s.filter(({prop:h,auto:m})=>m||o.includes(h)),p=re(l);if(!p.length)return e(n);async function d(){for(const h of p){if(u.has(h))continue;const m=await _e(t,h,n,a);n[h.prop]=m,u.set(h,m),h.scope==="test"&&a.unshift(()=>{u.delete(h)})}}return d().then(()=>e(n))}}const R=new WeakMap;function _e(t,e,r,i){var n;const s=Le(r.task.file),o=(n=t.getWorkerContext)===null||n===void 0?void 0:n.call(t);if(!e.isFn){var c;if(s[c=e.prop]??(s[c]=e.value),o){var u;o[u=e.prop]??(o[u]=e.value)}return e.value}if(e.scope==="test")return H(e.value,r,i);if(R.has(e))return R.get(e);let a;if(e.scope==="worker"){if(!o)throw new TypeError("[@vitest/runner] The worker context is not available in the current test runner. Please, provide the `getWorkerContext` method when initiating the runner.");a=o}else a=s;if(e.prop in a)return a[e.prop];A.has(a)||A.set(a,[]);const l=A.get(a),p=H(e.value,a,l).then(d=>(a[e.prop]=d,R.delete(e),d));return R.set(e,p),p}async function H(t,e,r){const i=B();let n=!1;const s=t(e,async o=>{n=!0,i.resolve(o);const c=B();r.push(async()=>{c.resolve(),await s}),await c}).catch(o=>{if(!n){i.reject(o);return}throw o});return i}function re(t,e=new Set,r=[]){return t.forEach(i=>{if(!r.includes(i)){if(!i.isFn||!i.deps){r.push(i);return}if(e.has(i))throw new Error(`Circular fixture dependency detected: ${i.prop} <- ${[...e].reverse().map(n=>n.prop).join(" <- ")}`);e.add(i),re(i.deps,e,r),r.push(i),e.clear()}}),r}function oe(t){let e=t.toString();/__async\((?:this|null), (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(e)&&(e=e.split(/__async\((?:this|null),/)[1]);const r=e.match(/[^(]*\(([^)]*)/);if(!r)return[];const i=z(r[1]);if(!i.length)return[];let n=i[0];if("__VITEST_FIXTURE_INDEX__"in t&&(n=i[t.__VITEST_FIXTURE_INDEX__],!n))return[];if(!(n.startsWith("{")&&n.endsWith("}")))throw new Error(`The first argument inside a fixture must use object destructuring pattern, e.g. ({ test } => {}). Instead, received "${n}".`);const s=n.slice(1,-1).replace(/\s/g,""),o=z(s).map(u=>u.replace(/:.*|=.*/g,"")),c=o.at(-1);if(c&&c.startsWith("..."))throw new Error(`Rest parameters are not supported in fixtures, received "${c}".`);return o}function z(t){const e=[],r=[];let i=0;for(let s=0;s<t.length;s++)if(t[s]==="{"||t[s]==="[")r.push(t[s]==="{"?"}":"]");else if(t[s]===r[r.length-1])r.pop();else if(!r.length&&t[s]===","){const o=t.substring(i,s).trim();o&&e.push(o),i=s+1}const n=t.substring(i).trim();return n&&e.push(n),e}function ie(t,e){function r(n){const s=function(...o){return e.apply(n,o)};Object.assign(s,e),s.withContext=()=>s.bind(n),s.setContext=(o,c)=>{n[o]=c},s.mergeContext=o=>{Object.assign(n,o)};for(const o of t)Object.defineProperty(s,o,{get(){return r({...n,[o]:!0})}});return s}const i=r({});return i.fn=e,i}const F=Ie();U(function(t,e,r){N().test.fn.call(this,_(t),e,r)});let b,se,Ee;function ce(t,e){if(!t)throw new Error(`Vitest failed to find ${e}. This is a bug in Vitest. Please, open an issue with reproduction.`)}function Ae(){return Ee}function Se(){return ce(b,"the runner"),b}function N(){const t=E.currentSuite||se;return ce(t,"the current suite"),t}function Fe(){return{beforeAll:[],afterAll:[],beforeEach:[],afterEach:[]}}function S(t,e){let r={},i=()=>{};if(typeof e=="object"){if(typeof t=="object")throw new TypeError("Cannot use two objects as arguments. Please provide options and a function callback in that order.");console.warn("Using an object as a third argument is deprecated. Vitest 4 will throw an error if the third argument is not a timeout number. Please use the second argument for options. See more at https://vitest.dev/guide/migration"),r=e}else typeof e=="number"?r={timeout:e}:typeof t=="object"&&(r=t);if(typeof t=="function"){if(typeof e=="function")throw new TypeError("Cannot use two functions as arguments. Please use the second argument for options.");i=t}else typeof e=="function"&&(i=e);return{options:r,handler:i}}function je(t,e=()=>{},r,i,n,s){const o=[];let c;h();const u=function(y="",f={}){var g;const w=(f==null?void 0:f.timeout)??b.config.testTimeout,T={id:"",name:y,suite:(g=E.currentSuite)===null||g===void 0?void 0:g.suite,each:f.each,fails:f.fails,context:void 0,type:"test",file:void 0,timeout:w,retry:f.retry??b.config.retry,repeats:f.repeats,mode:f.only?"only":f.skip?"skip":f.todo?"todo":"run",meta:f.meta??Object.create(null),annotations:[]},j=f.handler;(f.concurrent||!f.sequential&&b.config.sequence.concurrent)&&(T.concurrent=!0),T.shuffle=n==null?void 0:n.shuffle;const x=De(T,b);Object.defineProperty(T,"context",{value:x,enumerable:!1}),ve(x,f.fixtures);const ae=Error.stackTraceLimit;Error.stackTraceLimit=15;const K=new Error("STACK_TRACE_ERROR");if(Error.stackTraceLimit=ae,j&&ye(T,V(xe(Ce(b,j,x),T),w,!1,K,(L,I)=>Ne([x],I))),b.config.includeTaskLocation){const L=K.stack,I=$e(L,T.each??!1);I&&(T.location=I)}return o.push(T),T},a=U(function(y,f,g){let{options:w,handler:T}=S(f,g);typeof n=="object"&&(w=Object.assign({},n,w)),w.concurrent=this.concurrent||!this.sequential&&(w==null?void 0:w.concurrent),w.sequential=this.sequential||!this.concurrent&&(w==null?void 0:w.sequential);const j=u(_(y),{...this,...w,handler:T});j.type="test"});let l=s;const p={type:"collector",name:t,mode:r,suite:c,options:n,test:a,tasks:o,collect:v,task:u,clear:m,on:d,fixtures(){return l},scoped(y){const f=ne(y,{fixtures:l},b);f.fixtures&&(l=f.fixtures)}};function d(y,...f){ke(c)[y].push(...f)}function h(y){var f;typeof n=="number"&&(n={timeout:n}),c={id:"",type:"suite",name:t,suite:(f=E.currentSuite)===null||f===void 0?void 0:f.suite,mode:r,each:i,file:void 0,shuffle:n==null?void 0:n.shuffle,tasks:[],meta:Object.create(null),concurrent:n==null?void 0:n.concurrent},Te(c,Fe())}function m(){o.length=0,h()}async function v(y){if(!y)throw new TypeError("File is required to collect tasks.");e&&await We(p,()=>e(a));const f=[];for(const g of o)f.push(g.type==="collector"?await g.collect(y):g);return c.file=y,c.tasks=f,f.forEach(g=>{g.file=y}),c}return Me(p),p}function xe(t,e){return async(...r)=>{const i=await t(...r);if(e.promises){const s=(await Promise.allSettled(e.promises)).map(o=>o.status==="rejected"?o.reason:void 0).filter(Boolean);if(s.length)throw s}return i}}function Ie(){function t(e,r,i){var n;const s=this.only?"only":this.skip?"skip":this.todo?"todo":"run",o=E.currentSuite||se;let{options:c,handler:u}=S(r,i);const a=c.concurrent||this.concurrent||c.sequential===!1,l=c.sequential||this.sequential||c.concurrent===!1;c={...o==null?void 0:o.options,...c,shuffle:this.shuffle??c.shuffle??(o==null||(n=o.options)===null||n===void 0?void 0:n.shuffle)??void 0};const p=a||c.concurrent&&!l,d=l||c.sequential&&!a;return c.concurrent=p&&!d,c.sequential=d&&!p,je(_(e),u,s,this.each,c,o==null?void 0:o.fixtures())}return t.each=function(e,...r){const i=this.withContext();return this.setContext("each",!0),Array.isArray(e)&&r.length&&(e=P(e,r)),(n,s,o)=>{const c=_(n),u=e.every(Array.isArray),{options:a,handler:l}=S(s,o),p=typeof s=="function"&&typeof o=="object";e.forEach((d,h)=>{const m=Array.isArray(d)?d:[d];p?u?i(C(c,m,h),()=>l(...m),a):i(C(c,m,h),()=>l(d),a):u?i(C(c,m,h),a,()=>l(...m)):i(C(c,m,h),a,()=>l(d))}),this.setContext("each",void 0)}},t.for=function(e,...r){return Array.isArray(e)&&r.length&&(e=P(e,r)),(i,n,s)=>{const o=_(i),{options:c,handler:u}=S(n,s);e.forEach((a,l)=>{F(C(o,O(a),l),c,()=>u(a))})}},t.skipIf=e=>e?F.skip:F,t.runIf=e=>e?F:F.skip,ie(["concurrent","sequential","shuffle","skip","only","todo"],t)}function Re(t,e){const r=t;r.each=function(n,...s){const o=this.withContext();return this.setContext("each",!0),Array.isArray(n)&&s.length&&(n=P(n,s)),(c,u,a)=>{const l=_(c),p=n.every(Array.isArray),{options:d,handler:h}=S(u,a),m=typeof u=="function"&&typeof a=="object";n.forEach((v,y)=>{const f=Array.isArray(v)?v:[v];m?p?o(C(l,f,y),()=>h(...f),d):o(C(l,f,y),()=>h(v),d):p?o(C(l,f,y),d,()=>h(...f)):o(C(l,f,y),d,()=>h(v))}),this.setContext("each",void 0)}},r.for=function(n,...s){const o=this.withContext();return Array.isArray(n)&&s.length&&(n=P(n,s)),(c,u,a)=>{const l=_(c),{options:p,handler:d}=S(u,a);n.forEach((h,m)=>{const v=y=>d(h,y);v.__VITEST_FIXTURE_INDEX__=1,v.toString=()=>d.toString(),o(C(l,O(h),m),p,v)})}},r.skipIf=function(n){return n?this.skip:this},r.runIf=function(n){return n?this:this.skip},r.scoped=function(n){N().scoped(n)},r.extend=function(n){const s=ne(n,e||{},b);return U(function(c,u,a){const l=N(),p=l.fixtures(),d={...this};p&&(d.fixtures=be(d.fixtures||[],p)),l.test.fn.call(d,_(c),u,a)},s)};const i=ie(["concurrent","sequential","skip","only","todo","fails"],r);return e&&i.mergeContext(e),i}function U(t,e){return Re(t,e)}function _(t){return typeof t=="string"?t:typeof t=="function"?t.name||"<anonymous>":String(t)}function C(t,e,r){(t.includes("%#")||t.includes("%$"))&&(t=t.replace(/%%/g,"__vitest_escaped_%__").replace(/%#/g,`${r}`).replace(/%\$/g,`${r+1}`).replace(/__vitest_escaped_%__/g,"%%"));const i=t.split("%").length-1;t.includes("%f")&&(t.match(/%f/g)||[]).forEach((c,u)=>{if(he(e[u])||Object.is(e[u],-0)){let a=0;t=t.replace(/%f/g,l=>(a++,a===u+1?"-%f":l))}});let n=de(t,...e.slice(0,i));const s=Z(e[0]);return n=n.replace(/\$([$\w.]+)/g,(o,c)=>{const u=/^\d+$/.test(c);if(!s&&!u)return`$${c}`;const a=u?X(e,c):void 0,l=s?X(e[0],c,a):a;return pe(l,{truncate:void 0})}),n}function P(t,e){const r=t.join("").trim().replace(/ /g,"").split(`
|
|
2
|
+
`).map(n=>n.split("|"))[0],i=[];for(let n=0;n<Math.floor(e.length/r.length);n++){const s={};for(let o=0;o<r.length;o++)s[r[o]]=e[n*r.length+o];i.push(s)}return i}function $e(t,e){const r=t.split(`
|
|
3
|
+
`).slice(1);for(const i of r){const n=Q(i);if(n&&n.file===Ae())return{line:n.line,column:e?n.column+1:n.column}}}globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;function Je(t){const e=[t.name];let r=t;for(;r!=null&&r.suite;)r=r.suite,r!=null&&r.name&&e.unshift(r.name);return r!==t.file&&e.unshift(t.file.name),e}globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;const W=new Map,G=[],$=[];function Pe(t){if(W.size){var e;const r=Array.from(W).map(([n,s])=>[n,s[0],s[1]]),i=(e=t.onTaskUpdate)===null||e===void 0?void 0:e.call(t,r,G);i&&($.push(i),i.then(()=>$.splice($.indexOf(i),1),()=>{})),G.length=0,W.clear()}}async function qe(t){Pe(t),await Promise.all($)}const Y=Date.now,E={currentSuite:null};function Me(t){var e;(e=E.currentSuite)===null||e===void 0||e.tasks.push(t)}async function We(t,e){const r=E.currentSuite;E.currentSuite=t,await e(),E.currentSuite=r}function V(t,e,r=!1,i,n){if(e<=0||e===Number.POSITIVE_INFINITY)return t;const{setTimeout:s,clearTimeout:o}=fe();return function(...u){const a=Y(),l=Se();return l._currentTaskStartTime=a,l._currentTaskTimeout=e,new Promise((p,d)=>{var h;const m=s(()=>{o(m),v()},e);(h=m.unref)===null||h===void 0||h.call(m);function v(){const g=Ue(r,e,i);n==null||n(u,g),d(g)}function y(g){if(l._currentTaskStartTime=void 0,l._currentTaskTimeout=void 0,o(m),Y()-a>=e){v();return}p(g)}function f(g){l._currentTaskStartTime=void 0,l._currentTaskTimeout=void 0,o(m),d(g)}try{const g=t(...u);typeof g=="object"&&g!=null&&typeof g.then=="function"?g.then(y,f):y(g)}catch(g){f(g)}})}}const D=new WeakMap;function Ne([t],e){t&&Ve(t,e)}function Ve(t,e){const r=D.get(t);r==null||r.abort(e)}function De(t,e){var r;const i=function(){throw new Error("done() callback is deprecated, use promise instead")};let n=D.get(i);n||(n=new AbortController,D.set(i,n)),i.signal=n.signal,i.task=t,i.skip=(o,c)=>{if(o!==!1)throw t.result??(t.result={state:"skip"}),t.result.pending=!0,new ge("test is skipped; abort execution",t,typeof o=="string"?o:c)};async function s(o,c,u,a){const l={message:o,type:u||"notice"};if(a){if(!a.body&&!a.path)throw new TypeError("Test attachment requires body or path to be set. Both are missing.");if(a.body&&a.path)throw new TypeError('Test attachment requires only one of "body" or "path" to be set. Both are specified.');l.attachment=a,a.body instanceof Uint8Array&&(a.body=Xe(a.body))}if(c&&(l.location=c),!e.onTestAnnotate)throw new Error("Test runner doesn't support test annotations.");await qe(e);const p=await e.onTestAnnotate(t,l);return t.annotations.push(p),p}return i.annotate=(o,c,u)=>{if(t.result&&t.result.state!=="run")throw new Error(`Cannot annotate tests outside of the test run. The test "${t.name}" finished running with the "${t.result.state}" state already.`);let a;const l=new Error("STACK_TRACE").stack,p=l.includes("STACK_TRACE")?2:1,d=l.split(`
|
|
4
|
+
`)[p],h=Q(d);return h&&(a={file:h.file,line:h.line,column:h.column}),typeof c=="object"?J(t,s(o,a,void 0,c)):J(t,s(o,a,c,u))},i.onTestFailed=(o,c)=>{t.onFailed||(t.onFailed=[]),t.onFailed.push(V(o,c??e.config.hookTimeout,!0,new Error("STACK_TRACE_ERROR"),(u,a)=>n.abort(a)))},i.onTestFinished=(o,c)=>{t.onFinished||(t.onFinished=[]),t.onFinished.push(V(o,c??e.config.hookTimeout,!0,new Error("STACK_TRACE_ERROR"),(u,a)=>n.abort(a)))},((r=e.extendTaskContext)===null||r===void 0?void 0:r.call(e,i))||i}function Ue(t,e,r){const i=`${t?"Hook":"Test"} timed out in ${e}ms.
|
|
5
|
+
If this is a long-running ${t?"hook":"test"}, pass a timeout value as the last argument or configure it globally with "${t?"hookTimeout":"testTimeout"}".`,n=new Error(i);return r!=null&&r.stack&&(n.stack=r.stack.replace(n.message,r.message)),n}const Ke=new WeakMap;function Le(t){const e=Ke.get(t);if(!e)throw new Error(`Cannot find file context for ${t.name}`);return e}const k=[];for(let t=65;t<91;t++)k.push(String.fromCharCode(t));for(let t=97;t<123;t++)k.push(String.fromCharCode(t));for(let t=0;t<10;t++)k.push(t.toString(10));function Xe(t){let e="";const r=t.byteLength;for(let i=0;i<r;i+=3)if(r===i+1){const n=(t[i]&252)>>2,s=(t[i]&3)<<4;e+=k[n],e+=k[s],e+="=="}else if(r===i+2){const n=(t[i]&252)>>2,s=(t[i]&3)<<4|(t[i+1]&240)>>4,o=(t[i+1]&15)<<2;e+=k[n],e+=k[s],e+=k[o],e+="="}else{const n=(t[i]&252)>>2,s=(t[i]&3)<<4|(t[i+1]&240)>>4,o=(t[i+1]&15)<<2|(t[i+2]&192)>>6,c=t[i+2]&63;e+=k[n],e+=k[s],e+=k[o],e+=k[c]}return e}function J(t,e){return e=e.finally(()=>{if(!t.promises)return;const r=t.promises.indexOf(e);r!==-1&&t.promises.splice(r,1)}),t.promises||(t.promises=[]),t.promises.push(e),e}export{Je as E,ke as f,Te as h,Re as j,N as l,F as n,ie as r,ye as s};
|