@postnord/pn-marketweb-components 4.1.1 → 4.1.2
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/cjs/loader.cjs.js +1 -1
- package/cjs/pn-dropdown-choice-adds-row.cjs.entry.js +17 -3
- package/cjs/pn-dropdown-choice-adds-row.cjs.entry.js.map +1 -1
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.js +53 -3
- package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.js.map +1 -1
- package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.stories.js +4 -0
- package/components/pn-dropdown-choice-adds-row.js +19 -3
- package/components/pn-dropdown-choice-adds-row.js.map +1 -1
- package/esm/loader.js +1 -1
- package/esm/pn-dropdown-choice-adds-row.entry.js +17 -3
- package/esm/pn-dropdown-choice-adds-row.entry.js.map +1 -1
- package/esm/pn-market-web-components.js +1 -1
- package/package.json +1 -1
- package/pn-market-web-components/p-62ce6700.entry.js +2 -0
- package/pn-market-web-components/p-62ce6700.entry.js.map +1 -0
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/pn-market-web-components/pn-market-web-components.esm.js.map +1 -1
- package/types/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.d.ts +2 -0
- package/types/components.d.ts +4 -0
- package/umd/modules/@postnord/web-components/cjs/{index-BNXSyZmU.js → index-CNdVg5VI.js} +1 -1
- package/umd/modules/@postnord/web-components/cjs/{index-CAMqnx70.js → index-CfUQZtlH.js} +245 -1884
- package/umd/modules/@postnord/web-components/cjs/index.cjs.js +8 -5
- package/umd/modules/@postnord/web-components/cjs/loader.cjs.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-accordion-row.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-accordion.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-action-menu.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-button-dropdown.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-button_2.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-card.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-checkbox.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-choice-chip.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-counter.cjs.entry.js +13 -15
- package/umd/modules/@postnord/web-components/cjs/pn-date-picker.cjs.entry.js +12 -6
- package/umd/modules/@postnord/web-components/cjs/pn-fieldset.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-file-upload.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-footer.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-header.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-icon_2.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-illustration.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-input.cjs.entry.js +33 -16
- package/umd/modules/@postnord/web-components/cjs/pn-modal.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-multiselect.cjs.entry.js +16 -5
- package/umd/modules/@postnord/web-components/cjs/pn-ocr-search.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-page-nav-dropdown-item.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-page-nav-item.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-page-nav.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-pagination.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-progress-bar.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-progress-indicator-step.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-progress-indicator.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-progress-stepper.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-radio-button.cjs.entry.js +3 -3
- package/umd/modules/@postnord/web-components/cjs/pn-range.cjs.entry.js +3 -3
- package/umd/modules/@postnord/web-components/cjs/pn-read-only-button.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-search-field.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-segment.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-segmented-control.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-select.cjs.entry.js +10 -3
- package/umd/modules/@postnord/web-components/cjs/pn-tab.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-table.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-tablist.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-text-link.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-textarea.cjs.entry.js +19 -9
- package/umd/modules/@postnord/web-components/cjs/pn-tile.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-toast.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-toggle-switch.cjs.entry.js +3 -3
- package/umd/modules/@postnord/web-components/cjs/pn-tooltip.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-wizard.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-zipcode-search.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/postnord-web-components.cjs.js +3 -3
- package/umd/modules/@postnord/web-components/collection/collection-manifest.json +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-counter/pn-counter.css +69 -27
- package/umd/modules/@postnord/web-components/collection/components/input/pn-counter/pn-counter.js +34 -13
- package/umd/modules/@postnord/web-components/collection/components/input/pn-date-picker/pn-date-picker.css +38 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-date-picker/pn-date-picker.js +32 -3
- package/umd/modules/@postnord/web-components/collection/components/input/pn-fieldset/pn-fieldset.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-file-upload/pn-file-upload.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-input/pn-input.css +48 -9
- package/umd/modules/@postnord/web-components/collection/components/input/pn-input/pn-input.js +55 -15
- package/umd/modules/@postnord/web-components/collection/components/input/pn-multiselect/pn-multiselect.css +63 -22
- package/umd/modules/@postnord/web-components/collection/components/input/pn-multiselect/pn-multiselect.js +36 -2
- package/umd/modules/@postnord/web-components/collection/components/input/pn-radio-button/pn-radio-button.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-range/pn-range.css +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-range/pn-range.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-search-field/pn-search-field.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-segmented-control/pn-segmented-control.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-segmented-control/segment/pn-segment.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-select/pn-select.css +53 -14
- package/umd/modules/@postnord/web-components/collection/components/input/pn-select/pn-select.js +31 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-textarea/pn-textarea.css +54 -5
- package/umd/modules/@postnord/web-components/collection/components/input/pn-textarea/pn-textarea.js +45 -13
- package/umd/modules/@postnord/web-components/collection/components/input/pn-toggle-switch/pn-toggle-switch.css +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-toggle-switch/pn-toggle-switch.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/layout/pn-header/pn-header.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-card/pn-card.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-footer/pn-footer.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-page-nav/dropdown-item/pn-page-nav-dropdown-item.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-page-nav/item/pn-page-nav-item.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-page-nav/menu/pn-page-nav.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-pagination/pn-pagination.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-tablist/pn-tablist.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-tablist/tab/pn-tab.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-text-link/pn-text-link.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-tile/pn-tile.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/web-components/pn-ocr-search/pn-ocr-search.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/web-components/pn-zipcode-search/pn-zipcode-search.js +1 -1
- package/umd/modules/@postnord/web-components/components/helpers.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-card.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-counter.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-date-picker.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-fieldset.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-file-upload.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-footer.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-header.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-input2.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-multiselect.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-ocr-search.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-page-nav-dropdown-item.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-page-nav-item.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-page-nav.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-pagination.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-radio-button.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-range.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-search-field2.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-segment.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-segmented-control.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-select2.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-tab.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-tablist.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-text-link2.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-textarea.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-tile.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-toggle-switch.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-zipcode-search.js +1 -1
- package/umd/modules/@postnord/web-components/esm/{index-DWsprozV.js → index-CAEP792y.js} +245 -1884
- package/umd/modules/@postnord/web-components/esm/{index-BhpZuCL7.js → index-CosyroON.js} +1 -1
- package/umd/modules/@postnord/web-components/esm/index.js +9 -6
- package/umd/modules/@postnord/web-components/esm/loader.js +3 -3
- package/umd/modules/@postnord/web-components/esm/pn-accordion-row.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-accordion.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-action-menu.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-button-dropdown.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-button_2.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-card.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-checkbox.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-choice-chip.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-counter.entry.js +13 -15
- package/umd/modules/@postnord/web-components/esm/pn-date-picker.entry.js +12 -6
- package/umd/modules/@postnord/web-components/esm/pn-fieldset.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-file-upload.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-footer.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-header.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-icon_2.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-illustration.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-input.entry.js +33 -16
- package/umd/modules/@postnord/web-components/esm/pn-modal.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-multiselect.entry.js +16 -5
- package/umd/modules/@postnord/web-components/esm/pn-ocr-search.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-page-nav-dropdown-item.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-page-nav-item.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-page-nav.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-pagination.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-progress-bar.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-progress-indicator-step.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-progress-indicator.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-progress-stepper.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-radio-button.entry.js +3 -3
- package/umd/modules/@postnord/web-components/esm/pn-range.entry.js +3 -3
- package/umd/modules/@postnord/web-components/esm/pn-read-only-button.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-search-field.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-segment.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-segmented-control.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-select.entry.js +10 -3
- package/umd/modules/@postnord/web-components/esm/pn-tab.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-table.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-tablist.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-text-link.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-textarea.entry.js +19 -9
- package/umd/modules/@postnord/web-components/esm/pn-tile.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-toast.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-toggle-switch.entry.js +3 -3
- package/umd/modules/@postnord/web-components/esm/pn-tooltip.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-wizard.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-zipcode-search.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/postnord-web-components.js +4 -4
- package/umd/modules/@postnord/web-components/hydrate/index.js +3597 -3562
- package/umd/modules/@postnord/web-components/hydrate/index.mjs +3597 -3562
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.cjs +1 -18
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.js +1 -18
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/stencil.js +70 -12
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/index.js +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/connector.html +2 -2
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/index.js +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/server-process.js +2 -19
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-data/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-globals/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/index.js +214 -1832
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/patch-browser.js +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/shadow-css.js +3 -3
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/index.js +5172 -5086
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/runner.js +234 -263
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-public-compiler.d.ts +10 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/index.js +113 -74
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/jsx-dev-runtime.d.ts +2 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/jsx-dev-runtime.js +8 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/jsx-runtime.d.ts +2 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/jsx-runtime.js +9 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.cjs +13 -25
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.d.ts +4 -3
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.js +13 -25
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/package.json +13 -2
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/index.js +1 -18
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/pixel-match.js +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/index.js +34 -34
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/worker.js +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/index.js +19 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/package.json +1 -1
- package/umd/modules/@postnord/web-components/package.json +19 -19
- package/umd/modules/@postnord/web-components/postnord-web-components/index.esm.js +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-215a8bab.entry.js → p-01ac1c67.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-0dd15cc3.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-f94947bd.entry.js → p-0e94a4dd.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-511bdc31.entry.js → p-0ed2ee53.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-e545c35d.entry.js → p-109ba1fc.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-9d3890d0.entry.js → p-1a3c49ba.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-c9b8ed0a.entry.js → p-2610f8ab.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-267c323e.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-dfa861a7.entry.js → p-2a364778.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-5cbd90c0.entry.js → p-2a682ff9.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-b54f1a65.entry.js → p-2cce8a9f.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-44a6fe18.entry.js → p-2f4ad4a4.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-c867fce9.entry.js → p-306ec758.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-1d7b9fe8.entry.js → p-38e44ed0.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-66b77e7e.entry.js → p-3c96cb61.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-7ec29574.entry.js → p-3d2cac86.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-499ce292.entry.js → p-3d459401.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-795f8d58.entry.js → p-3deb5a9e.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-41c09d4d.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-484dfaa4.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-61af0540.entry.js → p-50116c0d.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-b8b5201d.entry.js → p-502b8430.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-96871fc2.entry.js → p-5b7c1333.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-3bc56c7f.entry.js → p-67f55491.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-cc1291a6.entry.js → p-838c17b9.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-e221d65e.entry.js → p-849d48c6.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-584c2057.entry.js → p-89aaa3c8.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-2becf18d.entry.js → p-8b2b6f5d.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-93db2b9e.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-99d7a33d.entry.js → p-97ffc4b3.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-0j4cY0b7.js → p-BlM_xfdt.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-CAEP792y.js +6 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-26233654.entry.js → p-b0710b87.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-b3c4e3e8.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-e5d0281b.entry.js → p-b8c4423b.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-ba59528f.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-92aa5cfa.entry.js → p-c0ae367c.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-c3e851f9.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-ddc430a5.entry.js → p-c4c4c75b.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-c843ae5e.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-323e7706.entry.js → p-d1e27524.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-190d83cf.entry.js → p-d214e930.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-66fdb323.entry.js → p-d7091312.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-8f732dd9.entry.js → p-db2b7e5d.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-e3fb693e.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-10cb744b.entry.js → p-e83de0b1.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-bde90f4f.entry.js → p-ea50ecd2.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-1c376e6a.entry.js → p-edc28eee.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/postnord-web-components.esm.js +1 -1
- package/umd/modules/@postnord/web-components/types/components/input/pn-counter/pn-counter.d.ts +27 -26
- package/umd/modules/@postnord/web-components/types/components/input/pn-input/pn-input.d.ts +9 -0
- package/umd/modules/@postnord/web-components/types/components/input/pn-select/pn-select.d.ts +3 -0
- package/umd/modules/@postnord/web-components/types/components/input/pn-textarea/pn-textarea.d.ts +10 -8
- package/umd/modules/@postnord/web-components/types/components.d.ts +72 -0
- package/umd/modules/@postnord/web-components/vscode-data.json +24 -0
- package/vscode-data.json +8 -0
- package/pn-market-web-components/p-22a8fd6e.entry.js +0 -2
- package/pn-market-web-components/p-22a8fd6e.entry.js.map +0 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-1bd12040.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-5a36a4ce.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-5ca4200c.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-8751c301.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-DWsprozV.js +0 -6
- package/umd/modules/@postnord/web-components/postnord-web-components/p-a6363f85.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-b46922c6.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-de3ae08d.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-e6c7e352.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-ee6a305b.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-f667cb91.entry.js +0 -5
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* By PostNord.
|
|
4
|
-
*/
|
|
5
|
-
import{t as e,r as i,c as t,g as l,h as n,a as s}from"./p-DWsprozV.js";import{uuidv4 as a,getBytesFromHumanReadableFileSize as o,awaitTopbar as r,ripple as d,en as p}from"./index.esm.js";import{a as c}from"./p-B88w-Zxn.js";import{c as h}from"./p-BpI8peGn.js";class f extends Error{element;code;data;constructor(e,i,t="INVALID",l=null){super(e),this.name="PNFileUploadError",this.element=i,this.code=t,this.data=l}}const u={CLICKORDRAG:{sv:"Klicka eller dra en fil hit",en:"Click or drag a file here",da:"Klik eller træk en fil hertil",fi:"Klikkaa tai vedä tiedosto tähän",no:"Klikk eller dra en fil hit"},ACCEPTEDFORMATS:{sv:"Filformat som stöds",en:"Supported formats",da:"Støttede filformater",fi:"Tuetut tiedostomuodot",no:"Understøttede filformater"},MAXFILESIZE:{sv:"Max filstorlek",en:"Max filesize",da:"Max filstørrelse",fi:"Maksimitiedostokoko",no:"Maks filstørrelse"},REMOVE_FILE:{sv:"Ta bort filen",en:"Remove file",da:"Fjern fil",fi:"Poista tiedosto",no:"Fjern fil"}},m=class{constructor(e){i(this,e),this.filesAdded=t(this,"filesAdded"),this.update=t(this,"update"),this.fileuploaderror=t(this,"fileuploaderror"),this.valid=t(this,"valid"),this.uploadFile=t(this,"uploadFile"),this.uploadCancelled=t(this,"uploadCancelled"),this.uploadCompleted=t(this,"uploadCompleted")}id=`pn-file-upload-${a()}`;idFileUpload=`${this.id}-label`;idHelpertext=`${this.id}-helpertext`;idAccepttext=`${this.id}-accept`;fileInputElement;invalid=!1;maxSizeInBytes=0;get hostElement(){return l(this)}files=[];isHovering=!1;label;helpertext;language=null;hideProgress=!1;name;accept;maxSize="";capture;limit=1;multiple;required=!1;disabled=!1;handleLimit(){this.multiple=this.limit>1}handleMaxBytes(){this.maxSizeInBytes=o(this.maxSize)}filesAdded;update;fileuploaderror;valid;uploadFile;uploadCancelled;uploadCompleted;async componentWillLoad(){this.handleLimit(),this.handleMaxBytes(),null===this.language&&await r(this.hostElement)}async startUpload(){if(!this.files.length)return;this.files=this.files.map(((e,i)=>("queue"===e.status&&(e.status="start",this.uploadFile.emit({file:e,index:i,uploader:this})),e)));const e=this.files.map((e=>e.xhrPromise().catch((()=>{}))));return Promise.all(e).then((e=>{const i=e.filter((e=>e));this.uploadCompleted.emit(i)}))}async clearUpload(){this.files=[],this.fileInputElement.value="",this.invalid=!1,this.filesAdded.emit([])}async removeFile(e){let i=!0;const t=[];for(const l in this.files){const n=this.files[l];if(n.filename)if(n.uuid!==e.uuid){try{this._validateFileSize(n),this._validateFileType(n),i=!0}catch(e){i=!1,n.error=e,n.progress=0,n.status="error"}t.push(n)}else"start"===n.status&&(n.xhr.abort(),this.uploadCancelled.emit(n))}this.filesAdded.emit(t),this.files=t,this.invalid=!i||!this._isNotGreaterThanLimit(),this._checkValidity(),this._emitUpdateEvent()}async updateFile(e,i=null){let t=this.files;if(null===i)for(const l in t)if(t[l].uuid===e.uuid){i=l;break}t[i]&&(e.progress>=100?(e.progress=100,e.status="completed"):e.progress<0&&(e.status="start",e.progress=0),e.error&&(e.progress=0,e.status="error",e.errorMessage=e.errorMessage||"There was an error uploading your file, please try again"),t[i]=e),this.files=[...t]}async _addFilesFromFileList(e){if(this.disabled||this.invalid)return;const i=Array.from(e),t=[];if(this.multiple)i.forEach((e=>t.push(this._addFile(e))));else{const e=i[0];1===this.limit?(this.files=[],t.push(this._addFile(e))):t.push(this._addFile(e))}return Promise.all(t).then((()=>{this.filesAdded.emit(this.files),this._isNotGreaterThanLimit(),this._checkValidity(),this._emitUpdateEvent()}))}async _onAddFile(){const e=this.fileInputElement.files;return await this._addFilesFromFileList(e)}_onDragOverFile(e){e.preventDefault(),e.stopPropagation(),this.isHovering=!0}_onDragLeaveFile(e){e.preventDefault(),e.stopPropagation(),this.isHovering=!1}_onDropFile(e){e.preventDefault(),e.stopPropagation(),this.isHovering=!1,d(e,this.hostElement,".pn-dropzone-inner"),this._addFilesFromFileList(e.dataTransfer.files)}_validateFileType(e){const i=this.accept?this.accept.split(","):[];if(i.length){let t=!1;for(const l of i){const i=l.trim().toLowerCase(),n=/^\w+\/[a-z\.\-]+$/i,s=e.filename.match(/\.\w{3,4}($|\?)/)?.[0]?.toLowerCase();if(n.test(i)&&e.contentType===i||s===i){t=!0;break}}if(!t){const i=new f("Invalid file type.",this.hostElement,"INVALID_FILE_TYPE",e);throw this.invalid=!0,this.fileuploaderror.emit(i),i}}}_validateFileSize(e){if(this.maxSizeInBytes>0&&e.filesize>this.maxSizeInBytes){const i=new f(`You can only add up to ${this.maxSize}.`,this.hostElement,"MAX_FILE_SIZE",e);throw this.invalid=!0,this.fileuploaderror.emit(i),i}}_validateLimit(){if(this.limit&&this.files.length>this.limit){const e=new f(`You can only add up to ${this.limit} files.`,this.hostElement,"MAX_LIMIT",this.files);throw this.invalid=!0,this.fileuploaderror.emit(e),e}}_isNotGreaterThanLimit(){try{return this._validateLimit(),!0}catch(e){return!1}}_checkValidity(){return this.invalid||this.valid.emit(this),!this.invalid}_createBase64FromFile(e){return new Promise(((i,t)=>{const l=new FileReader;l.onload=()=>i(l.result),l.onerror=e=>t(e),l.onabort=()=>t("ABORTED"),l.readAsDataURL(e)}))}async _addFile(e){return this._createBase64FromFile(e).then((i=>{const t=i.split(","),l=t[1],n=t[0].split(":")[1].split(";")[0],s=new XMLHttpRequest,o={uuid:a(),filename:e.name,filesize:e.size,progress:0,status:"queue",base64:l,contentType:n,error:null,errorMessage:"",file:e,xhr:s};try{this._validateFileSize(o),this._validateFileType(o)}catch(e){o.error=e,o.progress=0,o.status="error"}return o.xhrPromise=()=>new Promise(((e,i)=>{s.responseType="json",s.addEventListener("progress",(e=>{e.lengthComputable?(o.progress=e.loaded/e.total*100,this.updateFile(o)):(o.progress=100,this.updateFile(o))})),s.addEventListener("load",(i=>e(i.target.response))),s.addEventListener("error",(e=>{o.error=e,o.errorMessage="There was an error uploading your file, please try again",this.updateFile(o);const t=new f("There was an error uploading your file, please try again",this.hostElement,"UPLOAD_SERVER_ERROR",o);this.fileuploaderror.emit(t),i(e)}))})),this.files=[...this.files,o],o}))}_emitUpdateEvent(){this.update.emit({files:this.files,element:this.hostElement})}translate(e){return u?.[e]?.[this.language||p]||e}isLoading(e){return"start"===e.status}getFileItemClass=e=>{let i="files-list-item";return e.error&&(i+=" files-list-item-error"),i};getFileIcon(e){return e.error?c:100===e.progress?h:'<svg class="pn-icon-svg" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path fill="#000" fill-rule="evenodd" d="M9 7.5a4.5 4.5 0 1 1 9 0V16a6 6 0 0 1-12 0v-3a1 1 0 1 1 2 0v3a4 4 0 0 0 8 0V7.5a2.5 2.5 0 0 0-5 0V16a1 1 0 1 0 2 0v-6a1 1 0 1 1 2 0v6a3 3 0 1 1-6 0zM7 9a1 1 0 0 1 1 1v.1a1 1 0 1 1-2 0V10a1 1 0 0 1 1-1" clip-rule="evenodd"/></svg>'}getFileColor(e){return e.error?"warning":100===e.progress?"green700":"gray900"}describedBy(){const e=[this.accept&&this.idAccepttext,this.helpertext&&this.idHelpertext].filter(Boolean);return e.length?e.join(","):null}render(){return n(s,{key:"1c7df13d284805a69618cac9130a3599dac09afa"},n("div",{key:"e6f37c7ac6e0283c06049562b3e20b11cf89f1c3",class:"pn-file-upload-container"},n("div",{key:"7647d0f6afdccef876e8c86b084b7b1106715764",class:"pn-dropzone-container"},n("input",{key:"a5cc41ce25c13ef1d4046b0fb9c45372da932b86",id:this.idFileUpload,class:"pn-file-upload-input",type:"file",name:this.name,multiple:this.multiple,accept:this.accept,capture:this.capture,disabled:this.disabled,required:this.required,"aria-describedby":this.describedBy(),"aria-invalid":this.invalid?.toString(),onClick:e=>d(e,this.hostElement,".pn-dropzone-inner"),onChange:()=>this._onAddFile(),onDragOver:e=>this._onDragOverFile(e),onDragLeave:e=>this._onDragLeaveFile(e),onDrop:e=>this._onDropFile(e),ref:e=>this.fileInputElement=e}),n("div",{key:"ccd799f14663e8d645fcea967e526a4be89324dd",class:"pn-dropzone-inner","data-hover":this.isHovering,"data-invalid":this.invalid},n("pn-icon",{key:"42c98b09e804d9fa8747c16cfe20773dfecd286c",class:"pn-file-upload-icon-element",icon:'<svg class="pn-icon-svg" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path fill="#000" fill-rule="evenodd" d="M3 8a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v7a3 3 0 0 1-3 3h-2a1 1 0 1 1 0-2h2a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h2a1 1 0 1 1 0 2H6a3 3 0 0 1-3-3zm9 0a1 1 0 0 1 .707.293l4 4a1 1 0 0 1-1.414 1.414L13 11.414V17a1 1 0 1 1-2 0v-5.586l-2.293 2.293a1 1 0 0 1-1.414-1.414l4-4A1 1 0 0 1 12 8m-1 12.1V20a1 1 0 1 1 2 0v.1a1 1 0 1 1-2 0" clip-rule="evenodd"/></svg>',color:"blue700"}),n("label",{key:"d4c0d0d127830a82cc6c05e6b2bdb7007b87384c",htmlFor:this.idFileUpload,class:"pn-file-upload-title"},this.label||this.translate("CLICKORDRAG")),this.helpertext&&n("p",{key:"7dc83f69dd408af25194e644075ab7d852da4564",id:this.idHelpertext,class:"pn-file-upload-subtitle"},this.helpertext),this.accept&&n("p",{key:"64ba6ca78c6b2c9b626e7c4d4ca45074bbd0a6c7",id:this.idAccepttext,class:"pn-file-upload-subtitle"},this.translate("ACCEPTEDFORMATS"),": ",this.accept,this.maxSize&&n("span",{key:"1bf59a1291145d6adc7e9c6c2516f98e4b1522b2"}," ","(",this.translate("MAXFILESIZE"),": ",this.maxSize,")")))),!!this.files.length&&n("ul",{key:"06a0f4c327edee2c192e8b8fb38eb9ce5ab7e51a",class:"files-list"},this.files.map((e=>n("li",{class:"files-list-item-container",key:e.uuid},n("div",{class:this.getFileItemClass(e)},n("div",{class:"file-list-item-title"},n("pn-icon",{icon:this.getFileIcon(e),color:this.getFileColor(e)}),this.hideProgress||0===e.progress?n("div",{class:"filename"},e.filename):n("pn-progress-bar",{label:e.filename,progress:e.progress,error:e.error&&e.errorMessage})),n("pn-button",{small:!0,variant:"borderless",arialabel:`${this.translate("REMOVE_FILE")} ${e.filename}`,appearance:e.error?"warning":"light",icon:'<svg class="pn-icon-svg" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path fill="#000" fill-rule="evenodd" d="M10.5 4a1 1 0 0 0-1 1h5a1 1 0 0 0-1-1zm6 1a3 3 0 0 0-3-3h-3a3 3 0 0 0-3 3h-2A2.5 2.5 0 0 0 5 9.95V19a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3V9.95A2.5 2.5 0 0 0 18.5 5zm.5 5H7v9a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1zM5.5 7a.5.5 0 0 0 0 1h13a.5.5 0 0 0 0-1zm4.5 5a1 1 0 0 1 1 1v4a1 1 0 1 1-2 0v-4a1 1 0 0 1 1-1m4 0a1 1 0 0 1 1 1v4a1 1 0 1 1-2 0v-4a1 1 0 0 1 1-1" clip-rule="evenodd"/></svg>',iconOnly:!0,tooltip:this.translate("REMOVE_FILE"),loading:this.isLoading(e),onClick:()=>this.removeFile(e)})),e.error?n("div",{class:"files-list-item-text-error"},e.errorMessage||e.error.message):null)))),n("slot",{key:"38c1a1703b7d2c418ecc76823f32248c5d8b1ec7"})))}static get watchers(){return{limit:[{handleLimit:0}],maxSize:[{handleMaxBytes:0}]}}};m.style=`${e("pn-file-upload")}.hover .pn-file-upload-container .pn-dropzone-container{background-color:#e0f8ff}${e("pn-file-upload")} .pn-file-upload-input{position:absolute;z-index:1;left:0;top:0;opacity:0;height:100%;width:100%;-webkit-tap-highlight-color:transparent}${e("pn-file-upload")} .pn-file-upload-input:hover{cursor:pointer}${e("pn-file-upload")} .pn-file-upload-input:hover+.pn-dropzone-inner{border-color:#005d92;background-color:#e0f8ff}${e("pn-file-upload")} .pn-file-upload-input:focus-visible+.pn-dropzone-inner{border-color:#005d92;outline-color:#005d92}${e("pn-file-upload")} .pn-file-upload-input:disabled{pointer-events:none}${e("pn-file-upload")} .pn-file-upload-input:disabled+.pn-dropzone-inner{pointer-events:none;background-color:#f3f2f2;border-color:#2d2013}${e("pn-file-upload")} .pn-file-upload-input:disabled+.pn-dropzone-inner .headline a{color:#5e554a}${e("pn-file-upload")} .pn-file-upload-input:disabled+.pn-dropzone-inner .pn-icon-svg path{fill:#5e554a}${e("pn-file-upload")} .pn-file-upload-container{position:relative;display:flex;flex-direction:column;gap:1em}${e("pn-file-upload")} .pn-file-upload-container .pn-dropzone-container{position:relative}${e("pn-file-upload")} .pn-file-upload-container .pn-dropzone-inner{position:relative;text-align:center;overflow:hidden;padding:2.5em;border:0.0625em #969087 dashed;border-radius:0.5em;display:flex;flex-direction:column;align-items:center;gap:0.5em;outline:0.2rem solid transparent;outline-offset:0.2rem;transition-property:background-color, outline-color, border-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-file-upload")} .pn-file-upload-container .pn-dropzone-inner{transition-duration:0s;transition-delay:0s}}${e("pn-file-upload")} .pn-file-upload-container .pn-dropzone-inner .pn-ripple{animation:ripple 0.4s cubic-bezier(0.7, 0, 0.3, 1);position:absolute;border-radius:50%;background-color:#005d92;transform:translate(-50%, -50%) scale(0);opacity:0.1;pointer-events:none;z-index:3}@keyframes ripple{to{transform:translate(-50%, -50%) scale(1);opacity:0}}${e("pn-file-upload")} .pn-file-upload-container .pn-dropzone-inner[data-hover]{background-color:#e0f8ff;border-color:#005d92}${e("pn-file-upload")} .pn-file-upload-container .pn-dropzone-inner[data-invalid]{border-color:#a70707}${e("pn-file-upload")} .pn-file-upload-container .pn-dropzone-inner .pn-file-upload-dropzone{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:0.5em}${e("pn-file-upload")} .files-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:1em}${e("pn-file-upload")} .files-list .filename{font-weight:400;font-size:0.75em}${e("pn-file-upload")} .files-list .files-list-item{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;align-items:center;background:#f9f8f8;padding:1em;border-radius:0.5em}${e("pn-file-upload")} .files-list .files-list-item .file-list-item-title{display:flex;align-items:center;gap:0.5em;margin-right:0.5em}${e("pn-file-upload")} .files-list .files-list-item>${e("pn-progress-bar")}{margin-right:25em;flex:1}${e("pn-file-upload")} .files-list .files-list-item.files-list-item-error{color:#a70707;background-color:#fdefee}${e("pn-file-upload")} .files-list .files-list-item-text-error{color:#a70707;font-size:0.875em;font-weight:300;margin-top:0.25em}${e("pn-file-upload")} .pn-file-upload-title{color:#2d2013}${e("pn-file-upload")} .pn-file-upload-subtitle{color:#5e554a;font-size:0.75em}`;export{m as pn_file_upload}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* By PostNord.
|
|
4
|
-
*/
|
|
5
|
-
import{t,M as e,r as i,c as n,g as l,h as o,a as s}from"./p-DWsprozV.js";import{a as c}from"./p-0j4cY0b7.js";import{a as r}from"./p-B88w-Zxn.js";import{c as p}from"./p-DrYFvs2M.js";import{c as a}from"./p-BvuWkoyY.js";import{uuidv4 as u,awaitTopbar as d,ripple as h,getTotalHeightOffset as m,en as b}from"./index.esm.js";const f={SELECT_AN_OPTION:{en:"Select an option",sv:"Välj ett alternativ",da:"Vælg en mulighed",fi:"Valitse vaihtoehto",no:"Velg et alternativ"},SELECT_ALL_OPTIONS:{en:"Select all options",sv:"Välj alla alternativ",da:"Vælg alle muligheder",fi:"Valitse kaikki vaihtoehdot",no:"Velg alle alternativer"},SELECT_FOUND_OPTIONS:{en:"Select {number} options",sv:"Välj {number} alternativ",da:"Vælg {number} muligheder",fi:"Valitse {number} vaihtoehtoa",no:"Velg {number} alternativer"},SELECTED_OPTIONS:{en:"Selected options.",sv:"Valda alternativ.",da:"Valgte muligheder.",fi:"Valitut vaihtoehdot.",no:"Valgte alternativer."},BUTTON_OPEN:{en:"Open list",sv:"Öppna listan",da:"Open list",fi:"Open list",no:"Open list"},BUTTON_CLOSE:{en:"Close list",sv:"Stäng listan",da:"Close list",fi:"Close list",no:"Close list"},REMOVE:{en:"Remove",sv:"Ta bort",da:"Remove",fi:"Remove",no:"Remove"},REMOVED:{en:"Removed",sv:"Tog bort",da:"Fjernet",fi:"Poistettu",no:"Fjernet"},MORE_OPTION:{en:"more option.",sv:"alternativ till.",da:"mulighed mere.",fi:"vaihtoehto lisää.",no:"alternativ til."},MORE_OPTIONS:{en:"more options.",sv:"fler alternativ.",da:"more options.",fi:"more options.",no:"more options."},SEARCH:{en:"Search",sv:"Sök",da:"Søg",fi:"Hae",no:"Søk"},RESULTS_FOUND:{en:"options found",sv:"alternativ hittades",da:"muligheder fundet",fi:"vaihtoehtoja löytyi",no:"alternativer funnet"},NO_SEARCH_RESULTS:{en:"No options found",sv:"Inga alternativ hittades",da:"Ingen muligheder fundet",fi:"Vaihtoehtoja ei löytynyt",no:"Finner ingen alternativer"},NO_OPTIONS:{en:"No options available",sv:"Inga alternativ tillgängliga",da:"Ingen tilgængelige muligheder",fi:"Ei vaihtoehtoja",no:"Ingen tilgjengelige alternativer"}},g=class extends(e(c)){constructor(t){super(),i(this,t),this.toggleSelect=n(this,"toggleSelect"),this.allOptions=n(this,"allOptions"),this.selectedOption=n(this,"selectedOption"),this.selectedAllOptions=n(this,"selectedAllOptions"),this.searchInput=n(this,"searchInput")}id=`pn-multiselect-${u()}`;idLegend=`${this.id}-legend`;idButton=`${this.id}-button`;idOptions=`${this.id}-options`;idHelper=`${this.id}-text`;idChips=`${this.id}-chips`;idSr=`${this.id}-sr`;elGroup;elButton;elInput;elList;elChips;srTimer;get hostElement(){return l(this)}isSearching=!1;open=!1;upwards=!1;srMessage;label;helpertext;placeholder;name;selectId=this.id;selectName;icon;language=null;options;selectAll=!1;allValue="pn_multiselect_all";search=!1;searchQuery="";itemCount=5;maxHeight;top=!1;bottom=!1;required=!1;disabled=!1;invalid=!1;error;handleOpen(){this.open?(this.addGlobalEventListeners(),this.handleDirection(),this.handleMaxHeight(),this.handleWidth()):this.removeGlobalEventListeners(),this.dropdownHandler()}handleSearch(){this.search||(this.options=[...this.options.map((t=>{const e={...t,hide:!1};return e?.group?.length&&e.group.map((t=>({...t,hide:!1}))),e}))])}handleSearchQuery(){this.search&&"string"==typeof this.searchQuery&&this.handleInputSearch()}handleSelectId(){const t=this.selectId;this.idLegend=`${t}-legend`,this.idButton=`${t}-button`,this.idOptions=`${t}-options`,this.idHelper=`${t}-text`,this.idChips=`${t}-chips`,this.idSr=`${t}-sr`}handleResize(){this.open&&(this.toggleOpen(!1),this.elList.style.removeProperty("--pn-select-options-width"),this.elList.style.removeProperty("--pn-select-max-height"))}toggleSelect;allOptions;selectedOption;selectedAllOptions;searchInput;async componentWillLoad(){this.handleSelectId(),null===this.language&&await d(this.hostElement)}componentDidLoad(){this.searchQuery?.length&&this.handleSearchQuery()}globalEvents=t=>{const e=t.target,i=e?.closest(this.hostElement.localName);i||this.toggleOpen(!1)};addGlobalEventListeners(){this.hostElement.getRootNode().addEventListener("click",this.globalEvents)}removeGlobalEventListeners(){this.hostElement.getRootNode().removeEventListener("click",this.globalEvents)}dropdownHandler(){this.open?this.openDropdown(this.elList):this.closeDropdown(this.elList)}emitEvents(t,e){if(this.allOptions.emit(this.options),t)return this.selectedOption.emit(t);const i={checked:e,searching:this.isSearching};this.search&&this.optionsTotal()!==this.optionsSearch().length&&(i.query=this.searchQuery,i.found=this.optionsSearch()),this.selectedAllOptions.emit(i)}optionsChecked(){const t=this.options?.reduce(((t,e)=>{const i=e.group?[...e.group.filter((({checked:t})=>t))]:[];return e.checked&&t.push(e),i?.length&&t.push(...i),t}),[]);return t}optionsTotal(){return this.options?.reduce(((t,e)=>t+(e?.group?.length?e.group.length+1:1)),0)}optionsIndex(t){const e=({group:e=[]})=>e?.findIndex((({value:e})=>e===t)),i=this.options.findIndex((i=>i.value===t||-1!==e(i)));return{indexGroup:i,indexNested:e(this.options?.[i])}}optionsCheckedTotal(){return this.optionsChecked()?.length}optionsCheckedPreview(){return this.optionsChecked()?.slice(0,this.itemCount)}optionsCheckedLabels(){return this.optionsChecked()?.map((({label:t})=>t))?.join(", ")}optionsSearch(){const t=this.options?.reduce(((t,e)=>{const i=e.group?[...e.group.filter((({hide:t})=>!t))]:[];return e.hide||t.push(e),i?.length&&t.push(...i),t}),[]);return t}noResults(){return 0===this.optionsSearch()?.length}isIndeterminate(t){const e=this.options?.[t];if(e?.group?.length){const t=e.group.every((({checked:t})=>t)),i=e.group.every((({checked:t})=>!t));return!(t||i)}return!1}optionSelect({val:t,checked:e,chip:i}){if(t===this.allValue)return this.optionSelectAll(e);const n=this.options,{indexGroup:l,indexNested:o}=this.optionsIndex(t),s=n[l]?.group,c=s?.[o];if(c?.value){n[l].group[o].checked=e;const t=s?.every((({checked:t})=>t));n[l].checked=!!t}else n[l].checked=e,s?.length&&(n[l].group=s?.map((t=>({...t,checked:e}))));const r=-1===o?n[l]:n[l].group[o];this.emitEvents(r),this.options=[...n],"number"==typeof i&&(this.handleSrMesssage(`${this.translate("REMOVED")} ${r.label}`),requestAnimationFrame((()=>{const t=i===this.optionsCheckedTotal()?i-1:i,e=Array.from(this.elChips.children)?.[t];e?.querySelector("button").focus({preventScroll:!0})})))}optionSelectAll(t){this.options=[...this.options.map((e=>{const i={...e,checked:this.isSearching&&e.hide?e.checked:t};i.group&&(i.group=[...i.group.map((e=>({...e,checked:this.isSearching&&e.hide?e.checked:t})))]);const n=i?.group?.every((({checked:t})=>t));return i?.group?.length&&(i.checked=n),i}))],this.emitEvents(null,t)}optionSelected(t){return!!this.optionsChecked()?.find((({value:e,checked:i})=>e===t&&i))}translate(t){const e=f?.[t]?.[this.language||b];return e.includes("{number}")?e.replace("{number}",this.optionsSearch().length):e}getRect(t){return t?.getBoundingClientRect()}ripple({clientX:t,clientY:e,target:i}){const n=0===t&&0===e,l=i.nextElementSibling,{x:o,width:s,y:c,top:r}=this.getRect(l);h(n?{clientX:o+s-24,clientY:c-r}:{clientX:t,clientY:e},l)}handleSrMesssage(t){this.srMessage=t,clearTimeout(this.srTimer),this.srTimer=setTimeout((()=>this.srMessage=null),2e3)}handleDirection(){if(this.top)return this.upwards=!0;if(this.bottom)return this.upwards=!1;const{bottom:t,top:e}=this.getRect(this.elInput),i=window.innerHeight-t-16;this.upwards=(e-16)/2>i}handleMaxHeight(){if(this.maxHeight)return this.elGroup.style.setProperty("--pn-select-max-height",this.maxHeight);const{bottom:t,top:e}=this.getRect(this.elInput),i=this.upwards?e:t,n=m(),l=this.upwards?n+16:16,o=this.upwards?i-l:window.innerHeight-i-l;this.elGroup.style.setProperty("--pn-select-max-height",`${Math.ceil(o)}px`)}handleWidth(){const{width:t}=this.getRect(this.elInput);this.elGroup.style.setProperty("--pn-select-options-width",`${Math.ceil(t)}px`)}setFocus(){this.search?this.elInput.focus({preventScroll:!0}):this.elButton.focus({preventScroll:!0})}hasError(){return this.invalid||!!this.error}hasMessage(){return!!this.helpertext||!!this.error}toggleOpen(t){"boolean"==typeof t&&t===this.open||(this.open=t??!this.open,this.toggleSelect.emit({open:this.open}))}handleInputKeyboard(t){t.stopImmediatePropagation();const{code:e}=t;if("Escape"===e)return this.toggleOpen(!1);!this.open&&e.match(/^(Space|Enter)$|Arrow|^Key.*$/)&&this.toggleOpen()}setSearchQuery(t){this.open||this.toggleOpen(!0),this.searchQuery=t}handleInputSearch(){if(this.isEmpty())return;const t=this.searchQuery,e=({label:e,helpertext:i,value:n})=>`${e} ${i} ${n}`.trim().toLowerCase().includes(t.toLowerCase()),i=this.options.map((t=>{const i=t?.group?.map((t=>({...t,hide:!e(t)})))||[],n=e(t)||i?.some((({hide:t})=>!t));return t.hide=!n,t?.group?.length&&(t.group=[...i]),t}));this.isSearching=""!==t,this.options=[...i],this.searchInput.emit({query:t,found:this.optionsSearch()})}getListItem(t){const{value:e}=this.options[t];return this.elList.querySelector(`.pn-multiselect-option-input[value='${e}']`)}getOptionIndex(t,e,i){const n=this.optionsTotal()-1;if("End"===i)return n;if("Home"===i)return 0;const l=this.options.findIndex((({value:e})=>e===t))+e.find((t=>"number"==typeof t));return l>=n?n:l<=0?0:l}checkboxNav(t,e){const{code:i}=t,n="Tab"===i,l="Space"===i,o="Enter"===i,s="Escape"===i,c=["ArrowUp"===i&&-1,"ArrowDown"===i&&1,"PageUp"===i&&-10,"PageDown"===i&&10,"Home"===i&&0,"End"===i&&this.optionsTotal()-1,n,l,o,s];if(!c.some((t=>"number"==typeof t||t)))return;if(n||l||o)return;if(t.stopImmediatePropagation(),t.preventDefault(),s)return this.setFocus(),this.toggleOpen(!1);const r=this.getOptionIndex(e,c,i);return this.getListItem(r)?.focus()}handleBlur(t){const e=t.target,i=t.relatedTarget;"pn-multiselect-chip-button"===(i||e)?.className&&this.toggleOpen(!1)}handleLabel(){this.disabled||this.setFocus()}isEmpty(){return 0===(this.options?.length||0)}showSelectAll(){return this.selectAll&&!this.isEmpty()&&!this.noResults()}showEmptyOption(){return this.isSearching&&this.noResults()||this.isEmpty()}getPlaceholder(){return this.placeholder||this.translate(this.search?"SEARCH":"SELECT_AN_OPTION")}handleChange({target:t}){const{value:e,checked:i}=t;this.optionSelect({val:e,checked:i})}additonalOptions(){const t=this.optionsCheckedTotal()-this.itemCount;return`${t} ${this.translate("MORE_OPTION"+(1===t?"":"S"))}`}describedBy(){const t=[this.search&&this.idChips,this.srMessage&&this.idSr,!!this.helpertext&&this.idHelper].filter(Boolean);return t.length?t.join(" "):null}renderOption({label:t,value:e,checked:i,helpertext:n,icon:l,id:s=`${this.selectId}-${e||t}`,invalid:c,disabled:r,hide:p,group:a},u,d){return o("li",{class:"pn-multiselect-option",key:s,hidden:p},o("input",{type:"checkbox",id:s,class:"pn-multiselect-option-input",checked:i??this.optionSelected(e),indeterminate:void 0===d&&this.isIndeterminate(u),name:this.name,value:e,disabled:this.disabled||r,required:this.required,"aria-invalid":c?"true":null,"aria-describedby":n?`${s}-helper`:null,onClick:t=>this.ripple(t),onKeyDown:t=>this.checkboxNav(t,e),onBlur:t=>this.handleBlur(t)}),o("div",{class:"pn-multiselect-option-content"},!!l&&o("pn-icon",{icon:l,color:"blue900"}),o("div",{class:"pn-multiselect-option-text"},o("label",{class:"pn-multiselect-option-label",htmlFor:s},o("span",null,t)),n&&o("p",{class:"pn-multiselect-option-helper",id:`${s}-helper`},n)),o("div",{class:"pn-multiselect-option-checkbox"},o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none"},o("polyline",{class:"pn-multiselect-option-checkbox-checkmark-path",points:"4,12 9,17 20,6","stroke-width":"3"}),o("polyline",{class:"pn-multiselect-option-checkbox-indeterminate-path",points:"4,12 20,12","stroke-width":"3"})))),a?.length&&o("ul",{class:"pn-multiselect-optgroup"},a?.map(((t,e)=>this.renderOption(t,u,e)))))}renderOptions(){return o("ul",{id:this.idOptions,class:"pn-multiselect-options","data-open":this.open,"data-upwards":this.upwards,onChange:t=>this.handleChange(t),style:{height:"0px"},ref:t=>this.elList=t},this.showSelectAll()&&this.renderOption({label:this.translate(`SELECT_${this.isSearching?"FOUND":"ALL"}_OPTIONS`),value:this.allValue,checked:this.optionsTotal()===this.optionsCheckedTotal()}),this.options?.map(((t,e)=>this.renderOption(t,e))),this.showEmptyOption()&&o("li",{class:"pn-multiselect-option"},o("div",{class:"pn-multiselect-option-content",role:"alert"},o("div",{class:"pn-multiselect-option-text"},o("span",{class:"pn-multiselect-option-label"},this.translate(this.isEmpty()?"NO_OPTIONS":"NO_SEARCH_RESULTS"))))))}renderChips(){return o("ul",{id:this.idChips,class:"pn-multiselect-chips","aria-label":this.translate("SELECTED_OPTIONS"),ref:t=>this.elChips=t},this.optionsCheckedPreview()?.map((({label:t,value:e},i)=>o("li",{class:"pn-multiselect-chip","aria-setsize":this.optionsCheckedTotal(),"aria-posinset":i+1,key:`${t}-${e}`},o("span",{class:"pn-multiselect-chip-label"},t),o("button",{type:"button",class:"pn-multiselect-chip-button","aria-label":`${this.translate("REMOVE")} ${t}`,onClick:()=>this.optionSelect({val:e,checked:!1,chip:i})},o("pn-icon",{icon:a,small:!0,color:"blue700"}))))),this.optionsCheckedTotal()>this.itemCount&&o("li",{class:"pn-multiselect-chip","data-count":!0},o("span",{class:"pn-multiselect-chip-label"},"+ ",this.additonalOptions())))}render(){return o(s,{key:"9b25af2f368c47c8820ae000ed1389215cd952a2"},o("fieldset",{key:"3aa70d5b8d62ee84616afe853c2ea746c991fc67",class:"pn-multiselect","data-icon":!!this.icon,"data-error":this.hasError(),disabled:this.disabled},this.label&&o("legend",{key:"2e1bd83a8c6cb64bc9da287c70abcffccb334cbb",id:this.idLegend,class:"pn-multiselect-label",onClick:()=>this.handleLabel()},o("span",{key:"1d3073c63643320b9b9fde625832d89e41edaa35"},this.label),!!this.optionsChecked()?.length&&o("span",{key:"316c9d892808df273840dcac243971e5fb5d2b62"},this.optionsCheckedTotal(),"/",this.optionsTotal())),o("div",{key:"f79e79c0406ca659a6380902a6c8296df89bde97",class:"pn-multiselect-group",ref:t=>this.elGroup=t},o("div",{key:"73bc49a104f3846a41fa65f4e6e2623dba0806c2",class:"pn-multiselect-input"},!!this.icon&&o("pn-icon",{key:"a68a06de67861057dd6d853ab53b7a34d76ca7ee",class:"pn-multiselect-icon","data-custom":!0,icon:this.icon}),o("input",{key:"5df7e2ededf6e196ae47053ce650628391bc282d",tabindex:this.search?null:"-1",type:this.search?"search":"input",id:this.selectId,class:"pn-multiselect-element",value:this.search?this.searchQuery:this.optionsCheckedLabels(),name:this.selectName,placeholder:this.getPlaceholder(),required:this.search?null:this.required,"aria-labelledby":this.idLegend,"aria-describedby":this.describedBy(),"aria-controls":`${this.idOptions} ${this.search?this.idChips:""}`,"aria-invalid":this.hasError()?.toString(),disabled:this.disabled,readonly:!this.search,onClick:()=>this.search&&this.open?null:this.toggleOpen(),onKeyDown:t=>this.handleInputKeyboard(t),onBlur:t=>this.handleBlur(t),onInput:t=>this.search&&this.setSearchQuery(t.target.value),ref:t=>this.elInput=t}),this.hasError()&&o("pn-icon",{key:"5204a96efe2e88fee5d762a89b0623b1f8a163ce",class:"pn-multiselect-icon","data-error":!0,icon:r,color:"warning"}),o("button",{key:"78a487b3afc8c91e588d7922f3a2b490e9173d2f",id:this.idButton,type:"button",class:"pn-multiselect-button","aria-label":this.translate("BUTTON_"+(this.open?"CLOSE":"OPEN")),"aria-describedby":this.search?null:this.selectId,"aria-controls":this.idOptions,"aria-expanded":this.open.toString(),onClick:()=>this.toggleOpen(),ref:t=>this.elButton=t},o("pn-icon",{key:"061e6c886b21d559c439d2e689cfc02b328d87c9",class:"pn-multiselect-icon",icon:p,color:"blue700"}))),this.renderOptions()),this.hasMessage()&&o("p",{key:"a1c3cdabb02dfc2403dbe55cc4ce2fb38f71578c",id:this.idHelper,class:"pn-multiselect-description",role:this.error?"alert":null},o("span",{key:"3f9428b50a5d440866462e52181e13aa3b894e6a"},this.error||this.helpertext)),this.search&&this.renderChips(),o("slot",{key:"74dc717f4f662fbc53b0e73f0690a10a13feeb22"}),this.search&&o("p",{key:"85126ac7f1b59b4f2fd988bff08b5b2bcb561cbb",id:this.idSr,class:"pn-multiselect-sr-only",role:"alert","aria-live":"assertive"},this.srMessage&&o("span",{key:"45615fbfb30b133134d06c6fbee20a75a1dd61bd"},this.srMessage))))}static get watchers(){return{open:[{handleOpen:0}],search:[{handleSearch:0}],searchQuery:[{handleSearchQuery:0}],selectId:[{handleSelectId:0}]}}};g.style=`${t("pn-multiselect")}{display:inline-block}${t("pn-multiselect")} .pn-multiselect{border:0;margin:0;padding:0}${t("pn-multiselect")} .pn-multiselect[data-icon] .pn-multiselect-element{padding-left:3em}${t("pn-multiselect")} .pn-multiselect[data-error] .pn-multiselect-element{padding-right:5.5em;border-color:#a70707}${t("pn-multiselect")} .pn-multiselect[data-error] .pn-multiselect-element:hover{border-color:#500715}${t("pn-multiselect")} .pn-multiselect[data-error] .pn-multiselect-element:focus-visible{background-color:#ffffff;border-color:#a70707;outline-color:#a70707}${t("pn-multiselect")} .pn-multiselect-label{cursor:pointer;display:flex;justify-content:space-between;align-items:flex-end;font-weight:400;color:#2d2013;margin:0 0 0.25em 0;gap:0.5em;-webkit-tap-highlight-color:transparent;transition-property:color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${t("pn-multiselect")} .pn-multiselect-label{transition-duration:0s;transition-delay:0s}}${t("pn-multiselect")} .pn-multiselect-label>span{font-size:0.875em}${t("pn-multiselect")} .pn-multiselect-label{width:100%}${t("pn-multiselect")} .pn-multiselect-sr-only{position:absolute;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);margin:-1px;white-space:nowrap}${t("pn-multiselect")} .pn-multiselect-group{position:relative;padding:0;margin:0}${t("pn-multiselect")} .pn-multiselect-input{position:relative}${t("pn-multiselect")} .pn-multiselect-input>${t("pn-icon")}{pointer-events:none;position:absolute;top:0.75em;right:3.5em}${t("pn-multiselect")} .pn-multiselect-input>${t("pn-icon")}[data-custom]{left:0.75em;right:unset}${t("pn-multiselect")} .pn-multiselect-button{cursor:pointer;position:absolute;right:0.75em;top:50%;transform:translateY(-50%);padding:0;margin:0;border:0;width:2em;height:2em;font-size:1em;border-radius:50%;background-color:transparent;-webkit-tap-highlight-color:transparent;transition-property:background-color, outline-color, border-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${t("pn-multiselect")} .pn-multiselect-button{transition-duration:0s;transition-delay:0s}}${t("pn-multiselect")} .pn-multiselect-button{outline:0.2rem solid transparent;outline-offset:0.2rem}${t("pn-multiselect")} .pn-multiselect-button:focus-visible{outline-color:#005d92;background-color:#ffffff;border-color:#005d92}${t("pn-multiselect")} .pn-multiselect-button>${t("pn-icon")}>svg>path{transition-property:transform;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${t("pn-multiselect")} .pn-multiselect-button>${t("pn-icon")}>svg>path{transition-duration:0s;transition-delay:0s}}${t("pn-multiselect")} .pn-multiselect-button>${t("pn-icon")}>svg>path{transition-delay:0.2s;transform-origin:center;transform:rotate(0deg)}${t("pn-multiselect")} .pn-multiselect-button:hover{background-color:#effbff}${t("pn-multiselect")} .pn-multiselect-button[aria-expanded=true]{background-color:#effbff}${t("pn-multiselect")} .pn-multiselect-button[aria-expanded=true]>${t("pn-icon")}>svg>path{transform:rotate(180deg);transition-delay:0s}${t("pn-multiselect")} .pn-multiselect-element{color:#2d2013;background-color:#ffffff;border:0.0625em solid #969087;border-radius:0.5em;padding:0.75em;font-family:inherit;font-size:1em;font-weight:500;line-height:1.5em;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}${t("pn-multiselect")} .pn-multiselect-element:-webkit-autofill,${t("pn-multiselect")} .pn-multiselect-element:-webkit-autofill:hover,${t("pn-multiselect")} .pn-multiselect-element:-webkit-autofill:focus,${t("pn-multiselect")} .pn-multiselect-element:-webkit-autofill:active{-webkit-box-shadow:0 0 0 10em #e0f8ff inset;-webkit-text-fill-color:#2d2013}${t("pn-multiselect")} .pn-multiselect-element{outline:0.2rem solid transparent;outline-offset:0.2rem}${t("pn-multiselect")} .pn-multiselect-element:focus-visible{outline-color:#005d92;background-color:#ffffff;border-color:#005d92}${t("pn-multiselect")} .pn-multiselect-element{transition-property:outline-color, background-color, border-color, color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${t("pn-multiselect")} .pn-multiselect-element{transition-duration:0s;transition-delay:0s}}${t("pn-multiselect")} .pn-multiselect-element::placeholder{color:#5e554a;font-weight:normal}${t("pn-multiselect")} .pn-multiselect-element:hover{border-color:#005d92}${t("pn-multiselect")} .pn-multiselect-element:disabled{color:#5e554a;background-color:#f3f2f2;border-color:#f3f2f2}${t("pn-multiselect")} .pn-multiselect-element{cursor:text;text-align:left;transition-delay:0.1s, 0.1s, 0s;width:100%;padding-right:3.5em;display:flex;align-items:center;justify-content:space-between;gap:0.5em;overflow:hidden;text-overflow:ellipsis}${t("pn-multiselect")} .pn-multiselect-element:disabled{color:#5e554a;background-color:#f3f2f2;border-color:#f3f2f2;pointer-events:none}${t("pn-multiselect")} .pn-multiselect-element:disabled+.pn-multiselect-button{pointer-events:none}${t("pn-multiselect")} .pn-multiselect-element:disabled+.pn-multiselect-button path{fill:#5e554a}${t("pn-multiselect")} .pn-multiselect-element:placeholder{color:#5e554a;font-weight:normal}${t("pn-multiselect")} .pn-multiselect-element[type=input]:hover{cursor:pointer;color:#2d2013;background-color:#effbff;transition-delay:0s}${t("pn-multiselect")} .pn-multiselect-element[type=input]:hover[aria-invalid=true]{background-color:#fdefee}${t("pn-multiselect")} .pn-multiselect-element:focus-visible{transition-delay:0s}${t("pn-multiselect")} .pn-multiselect-element::-webkit-search-cancel-button,${t("pn-multiselect")} .pn-multiselect-element::-webkit-search-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}${t("pn-multiselect")} .pn-multiselect-options{scroll-behavior:smooth;position:absolute;z-index:10;top:calc(100% + 0.5em);left:0;right:0;background-color:#ffffff;box-shadow:0em 0.075em 0.225em 0em rgba(0, 0, 0, 0.1), 0em 0.4em 0.9em 0em rgba(0, 0, 0, 0.13);border-radius:0.5em;list-style:none;margin:0;padding:0;width:var(--pn-select-options-width);max-height:var(--pn-select-max-height);overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;visibility:hidden;transform-origin:top left}${t("pn-multiselect")} .pn-multiselect-options[data-open]{visibility:visible}${t("pn-multiselect")} .pn-multiselect-options[data-upwards]{top:unset;bottom:calc(100% + 0.5em);transform-origin:bottom left;box-shadow:0 -0.0625em 0.125em rgba(0, 0, 0, 0.2)}${t("pn-multiselect")} .pn-multiselect-options[data-moving]{overflow:hidden;visibility:visible}${t("pn-multiselect")} .pn-multiselect-options::-webkit-scrollbar{background-color:#ffffff;width:0.875em;border-radius:0.5em}${t("pn-multiselect")} .pn-multiselect-options::-webkit-scrollbar-track{background-color:#ffffff;border-radius:0.5em}${t("pn-multiselect")} .pn-multiselect-options::-webkit-scrollbar-thumb{cursor:pointer;background-color:#969087;border-radius:1em;border:0.25em solid #ffffff}${t("pn-multiselect")} .pn-multiselect-options::-webkit-scrollbar-thumb:hover{background-color:#5e554a}${t("pn-multiselect")} .pn-multiselect-options::-webkit-scrollbar-corner,${t("pn-multiselect")} .pn-multiselect-options::-webkit-scrollbar-button{display:none}${t("pn-multiselect")} .pn-multiselect-options>${t("pn-input")}{padding:0.5em}${t("pn-multiselect")} .pn-multiselect-optgroup{list-style:none;padding:0}${t("pn-multiselect")} .pn-multiselect-optgroup>.pn-multiselect-option>.pn-multiselect-option-content{padding-left:2em}${t("pn-multiselect")} .pn-multiselect-chips{list-style:none;display:flex;flex-wrap:wrap;gap:0.5em;padding:0;margin:0.5em 0 0 0;color:#5e554a;font-weight:400}${t("pn-multiselect")} .pn-multiselect-chips:empty{display:none}${t("pn-multiselect")} .pn-multiselect-chip{margin:0;display:inline-flex;align-items:center;gap:0.25em;background-color:#ffffff;border-radius:0.5em;padding:0.125em 0.25em 0.125em 0.5em;line-height:1.5em;border:0.0625em solid #5e554a;outline:0.2rem solid transparent;outline-offset:0.2rem;transition-property:background-color, outline-color, border-color, color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${t("pn-multiselect")} .pn-multiselect-chip{transition-duration:0s;transition-delay:0s}}${t("pn-multiselect")} .pn-multiselect-chip:focus-within{color:#005d92;outline-color:#005d92;background-color:#effbff;border-color:#005d92}${t("pn-multiselect")} .pn-multiselect-chip[data-count]{pointer-events:none;border:0;padding-left:0;padding-right:0;background-color:unset}${t("pn-multiselect")} .pn-multiselect-chip-label{font-size:0.875em;white-space:nowrap}${t("pn-multiselect")} .pn-multiselect-chip-button{cursor:pointer;font-size:1em;padding:0.25em;height:1.5em;width:1.5em;border:0;background-color:unset;border-radius:50%;transition-property:background-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${t("pn-multiselect")} .pn-multiselect-chip-button{transition-duration:0s;transition-delay:0s}}${t("pn-multiselect")} .pn-multiselect-chip-button{-webkit-tap-highlight-color:transparent}${t("pn-multiselect")} .pn-multiselect-chip-button:hover{background-color:#8eddf9}${t("pn-multiselect")} .pn-multiselect-chip-button:focus{outline:0}${t("pn-multiselect")} .pn-multiselect-no-results{margin:0;padding:0.75em}${t("pn-multiselect")} .pn-multiselect-description{color:#5e554a;font-size:0.875em;font-weight:400;margin:0.25em 0 0 0;display:flex;flex-direction:column;gap:0.25em}${t("pn-multiselect")} .pn-multiselect-description[role=alert]{color:#a70707}${t("pn-multiselect")} .pn-multiselect-option{position:relative;margin:0;padding:0}${t("pn-multiselect")} .pn-multiselect-option .pn-ripple{animation:ripple 0.4s cubic-bezier(0.7, 0, 0.3, 1);position:absolute;border-radius:50%;background-color:#005d92;transform:translate(-50%, -50%) scale(0);opacity:0.1;pointer-events:none;z-index:3}@keyframes ripple{to{transform:translate(-50%, -50%) scale(1);opacity:0}}${t("pn-multiselect")} .pn-multiselect-option-input{cursor:pointer;position:absolute;opacity:0;left:0;top:0;height:100%;width:100%;margin:0;-webkit-tap-highlight-color:transparent}${t("pn-multiselect")} .pn-multiselect-option-input:disabled{pointer-events:none}${t("pn-multiselect")} .pn-multiselect-option-input:disabled+.pn-multiselect-option-content{color:#5e554a;background-color:#f3f2f2;border-color:#f3f2f2;pointer-events:none}${t("pn-multiselect")} .pn-multiselect-option-input:disabled+.pn-multiselect-option-content .pn-multiselect-option-checkbox{background-color:#f3f2f2;border-color:#969087}${t("pn-multiselect")} .pn-multiselect-option-input:disabled+.pn-multiselect-option-content path{fill:#5e554a}${t("pn-multiselect")} .pn-multiselect-option-input:disabled:checked+.pn-multiselect-option-content{color:#5e554a;background-color:#f3f2f2;border-color:#f3f2f2}${t("pn-multiselect")} .pn-multiselect-option-input:disabled:checked+.pn-multiselect-option-content .pn-multiselect-option-checkbox{background-color:#969087;border-color:#969087}${t("pn-multiselect")} .pn-multiselect-option-input:disabled:checked+.pn-multiselect-option-content path{fill:#5e554a}${t("pn-multiselect")} .pn-multiselect-option-input[aria-invalid=true]+.pn-multiselect-option-content .pn-multiselect-option-checkbox{border-color:#a70707}${t("pn-multiselect")} .pn-multiselect-option-input[aria-invalid=true]+.pn-multiselect-option-content .pn-ripple{background-color:#a70707}${t("pn-multiselect")} .pn-multiselect-option-input[aria-invalid=true]:checked+.pn-multiselect-option-content{background-color:#fdefee}${t("pn-multiselect")} .pn-multiselect-option-input[aria-invalid=true]:checked+.pn-multiselect-option-content .pn-multiselect-option-checkbox{background-color:#a70707;border-color:#a70707}${t("pn-multiselect")} .pn-multiselect-option-input[aria-invalid=true]:checked:focus-visible+.pn-multiselect-option-content{background-color:#fdefee}${t("pn-multiselect")} .pn-multiselect-option-input[aria-invalid=true]:checked:focus-visible+.pn-multiselect-option-content .pn-multiselect-option-checkbox{background-color:#500715;border-color:#500715}${t("pn-multiselect")} .pn-multiselect-option-input[aria-invalid=true]:checked:hover+.pn-multiselect-option-content{background-color:#fef7f6}${t("pn-multiselect")} .pn-multiselect-option-input[aria-invalid=true]:checked:hover+.pn-multiselect-option-content .pn-multiselect-option-checkbox{background-color:#500715;border-color:#500715}${t("pn-multiselect")} .pn-multiselect-option-input[aria-invalid=true]:hover+.pn-multiselect-option-content{background-color:#fef7f6}${t("pn-multiselect")} .pn-multiselect-option-input[aria-invalid=true]:hover+.pn-multiselect-option-content .pn-multiselect-option-checkbox{background-color:#fdefee;border-color:#a70707}${t("pn-multiselect")} .pn-multiselect-option-input[aria-invalid=true]:focus-visible+.pn-multiselect-option-content .pn-multiselect-option-checkbox{outline-color:#a70707;background-color:#fdefee;border-color:#a70707}${t("pn-multiselect")} .pn-multiselect-option-input:hover+.pn-multiselect-option-content{background-color:#effbff}${t("pn-multiselect")} .pn-multiselect-option-input:hover+.pn-multiselect-option-content .pn-multiselect-option-checkbox{border-color:#005d92;background-color:#e0f8ff}${t("pn-multiselect")} .pn-multiselect-option-input:focus-visible+.pn-multiselect-option-content .pn-multiselect-option-checkbox{outline-color:#005d92;background-color:#e0f8ff;border-color:#005d92}${t("pn-multiselect")} .pn-multiselect-option-input:checked+.pn-multiselect-option-content{background-color:#e0f8ff}${t("pn-multiselect")} .pn-multiselect-option-input:checked+.pn-multiselect-option-content .pn-multiselect-option-checkbox{border-color:#005d92;background-color:#005d92}${t("pn-multiselect")} .pn-multiselect-option-input:checked+.pn-multiselect-option-content .pn-multiselect-option-checkbox svg polyline.pn-multiselect-option-checkbox-checkmark-path{transition-delay:0.2s;stroke-dashoffset:0}${t("pn-multiselect")} .pn-multiselect-option-input:checked:hover+.pn-multiselect-option-content{background-color:#effbff}${t("pn-multiselect")} .pn-multiselect-option-input:checked:hover+.pn-multiselect-option-content .pn-multiselect-option-checkbox{border-color:#0d234b;background-color:#0d234b}${t("pn-multiselect")} .pn-multiselect-option-input:checked:focus-visible+.pn-multiselect-option-content{background-color:#e0f8ff}${t("pn-multiselect")} .pn-multiselect-option-input:checked:focus-visible+.pn-multiselect-option-content .pn-multiselect-option-checkbox{border-color:#0d234b;background-color:#0d234b}${t("pn-multiselect")} .pn-multiselect-option-input:indeterminate+.pn-multiselect-option-content .pn-multiselect-option-checkbox{background-color:#005d92;border-color:#005d92}${t("pn-multiselect")} .pn-multiselect-option-input:indeterminate+.pn-multiselect-option-content svg .pn-multiselect-option-checkbox-checkmark-path{stroke-dashoffset:23}${t("pn-multiselect")} .pn-multiselect-option-input:indeterminate+.pn-multiselect-option-content svg .pn-multiselect-option-checkbox-indeterminate-path{stroke-dashoffset:0}${t("pn-multiselect")} .pn-multiselect-option-input:indeterminate:hover+.pn-multiselect-option-content .pn-multiselect-option-checkbox{background-color:#0d234b;border-color:#0d234b}${t("pn-multiselect")} .pn-multiselect-option-content{position:relative;overflow:hidden;z-index:-1;display:flex;align-items:center;padding:0.75em 1em;gap:0.5em;background-color:#ffffff;transition-property:background-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${t("pn-multiselect")} .pn-multiselect-option-content{transition-duration:0s;transition-delay:0s}}${t("pn-multiselect")} .pn-multiselect-option-text{flex:1;text-overflow:ellipsis;overflow:hidden}${t("pn-multiselect")} .pn-multiselect-option-label{color:#2d2013;font-weight:400}${t("pn-multiselect")} .pn-multiselect-option-helper{color:#5e554a;margin:0}${t("pn-multiselect")} .pn-multiselect-option-checkbox{background-color:#ffffff;flex:0 0 1.5em;width:1.5em;height:1.5em;border:0.0625em solid #969087;border-radius:0.25em;outline:0.2rem solid transparent;outline-offset:0.2rem;transition-property:background-color, border-color, outline-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${t("pn-multiselect")} .pn-multiselect-option-checkbox{transition-duration:0s;transition-delay:0s}}${t("pn-multiselect")} .pn-multiselect-option-checkbox svg polyline{stroke:#ffffff;stroke-linecap:round;stroke-dasharray:23;transition-property:stroke-dashoffset;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${t("pn-multiselect")} .pn-multiselect-option-checkbox svg polyline{transition-duration:0s;transition-delay:0s}}${t("pn-multiselect")} .pn-multiselect-option-checkbox svg polyline{transition-delay:0s}${t("pn-multiselect")} .pn-multiselect-option-checkbox svg polyline.pn-multiselect-option-checkbox-checkmark-path{stroke-dashoffset:23}${t("pn-multiselect")} .pn-multiselect-option-checkbox svg polyline.pn-multiselect-option-checkbox-indeterminate-path{stroke-dashoffset:23}`;export{g as pn_multiselect}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* By PostNord.
|
|
4
|
-
*/
|
|
5
|
-
import{t as e,r as t,g as a,h as r,a as n}from"./p-DWsprozV.js";import{uuidv4 as o}from"./index.esm.js";const i=class{constructor(e){t(this,e)}id=`pn-textarea-${o()}`;idHelper=`${this.id}-text`;get hostElement(){return a(this)}content;label;value="";helpertext;textareaid=this.id;name;form;rows=2;cols=20;wrap="soft";maxlength;autocomplete="off";spellcheck=!1;placeholder;resize=!1;required=!1;valid=!1;invalid=!1;error;disabled=!1;readonly=!1;componentWillLoad(){this.textareaid!==this.id&&(this.idHelper=`${this.textareaid}-helper`)}setVal(e){this.value=e.target.value}hasError(){return this.invalid||!!this.error}hasMessage(){return!(!this.helpertext?.length&&!this.error?.length)}render(){return r(n,{key:"c568c2ad0a3b3afe84f455684c747d9fcc152ea5"},r("div",{key:"08708e20ab42d72385744f877d0d9a7e2e9a7725",class:"pn-textarea","data-valid":this.valid,"data-error":this.hasError(),"data-resize":this.resize},r("label",{key:"01a8257a0bc3bab14d08c167f833a4aa1d8077bd",class:"pn-textarea-label",htmlFor:this.textareaid},r("span",{key:"627d6e4b22a344372a834e79382146b127c3a495"},this.label),this.maxlength>=1&&r("span",{key:"a33a760b4e1491922fc6a333cdd98fabace1ca1c"},`${this.value?.length||0}/${this.maxlength}`)),r("textarea",{key:"4ea874aac0a2e3a3cfd6850e3fbd8415fbd659d8",class:"pn-textarea-element",id:this.textareaid,name:this.name,rows:this.rows,cols:this.cols,wrap:this.wrap,autocomplete:this.autocomplete,spellcheck:this.spellcheck,placeholder:this.placeholder,maxlength:this.maxlength,required:this.required,disabled:this.disabled,readonly:this.readonly,"aria-describedby":this.hasMessage()?this.idHelper:null,"aria-invalid":this.hasError().toString(),onInput:e=>this.setVal(e),value:this.value}),this.hasMessage()&&r("p",{key:"de47982ee3125cfdb5651ebb50715d03df9459e1",id:this.idHelper,class:"pn-textarea-text",role:this.error?.length?"alert":null},r("span",{key:"dc885dee87a3e715f26fa950dfce7d68131edeae"},this.error||this.helpertext))))}};i.style=`${e("pn-textarea")}{display:inline-flex;flex-direction:column}${e("pn-textarea")} .pn-textarea-label{cursor:pointer;display:flex;justify-content:space-between;align-items:flex-end;font-weight:400;color:#2d2013;margin:0 0 0.25em 0;gap:0.5em;-webkit-tap-highlight-color:transparent;transition-property:color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-textarea")} .pn-textarea-label{transition-duration:0s;transition-delay:0s}}${e("pn-textarea")} .pn-textarea-label>span{font-size:0.875em}${e("pn-textarea")} .pn-textarea-text{color:#5e554a;font-size:0.875em;font-weight:400;margin:0.25em 0 0 0;display:flex;flex-direction:column;gap:0.25em}${e("pn-textarea")} .pn-textarea-text>${e("pn-icon")}{margin-right:0.25em}${e("pn-textarea")} .pn-textarea-element{color:#2d2013;background-color:#ffffff;border:0.0625em solid #969087;border-radius:0.5em;padding:0.75em;font-family:inherit;font-size:1em;font-weight:500;line-height:1.5em;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}${e("pn-textarea")} .pn-textarea-element:-webkit-autofill,${e("pn-textarea")} .pn-textarea-element:-webkit-autofill:hover,${e("pn-textarea")} .pn-textarea-element:-webkit-autofill:focus,${e("pn-textarea")} .pn-textarea-element:-webkit-autofill:active{-webkit-box-shadow:0 0 0 10em #e0f8ff inset;-webkit-text-fill-color:#2d2013}${e("pn-textarea")} .pn-textarea-element{outline:0.2rem solid transparent;outline-offset:0.2rem}${e("pn-textarea")} .pn-textarea-element:focus-visible{outline-color:#005d92;background-color:#ffffff;border-color:#005d92}${e("pn-textarea")} .pn-textarea-element{transition-property:outline-color, background-color, border-color, color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-textarea")} .pn-textarea-element{transition-duration:0s;transition-delay:0s}}${e("pn-textarea")} .pn-textarea-element::placeholder{color:#5e554a;font-weight:normal}${e("pn-textarea")} .pn-textarea-element:hover{border-color:#005d92}${e("pn-textarea")} .pn-textarea-element:disabled{color:#5e554a;background-color:#f3f2f2;border-color:#f3f2f2}${e("pn-textarea")} .pn-textarea-element::-webkit-scrollbar{background-color:#ffffff;width:0.875em;border-radius:0.5em}${e("pn-textarea")} .pn-textarea-element::-webkit-scrollbar-track{background-color:#ffffff;border-radius:0.5em}${e("pn-textarea")} .pn-textarea-element::-webkit-scrollbar-thumb{cursor:pointer;background-color:#969087;border-radius:1em;border:0.25em solid #ffffff}${e("pn-textarea")} .pn-textarea-element::-webkit-scrollbar-thumb:hover{background-color:#5e554a}${e("pn-textarea")} .pn-textarea-element::-webkit-scrollbar-corner,${e("pn-textarea")} .pn-textarea-element::-webkit-scrollbar-button{display:none}${e("pn-textarea")} .pn-textarea-element{width:100%;resize:none}${e("pn-textarea")} .pn-textarea-element:read-only{border-color:#ffffff}${e("pn-textarea")} .pn-textarea-element::-webkit-resizer{background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%3E%0A%20%20%3Cpath%20d%3D%22M7%2017L17%207M12%2017L17%2012%22%20stroke%3D%22%23005D92%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%2F%3E%0A%3C%2Fsvg%3E");background-repeat:no-repeat;background-position:center}${e("pn-textarea")} .pn-textarea[data-valid]>.pn-textarea-label{color:#005e41}${e("pn-textarea")} .pn-textarea[data-valid]>.pn-textarea-element{border-color:#005e41}${e("pn-textarea")} .pn-textarea[data-valid]>.pn-textarea-element:hover{border-color:#002f24}${e("pn-textarea")} .pn-textarea[data-valid]>.pn-textarea-element:focus-visible{background-color:#ffffff;border-color:#005e41;outline-color:#005e41}${e("pn-textarea")} .pn-textarea[data-error]>.pn-textarea-label{color:#a70707}${e("pn-textarea")} .pn-textarea[data-error]>.pn-textarea-element{border-color:#a70707}${e("pn-textarea")} .pn-textarea[data-error]>.pn-textarea-element:hover{border-color:#500715}${e("pn-textarea")} .pn-textarea[data-error]>.pn-textarea-element:focus-visible{background-color:#ffffff;border-color:#a70707;outline-color:#a70707}${e("pn-textarea")} .pn-textarea[data-error]>.pn-textarea-text[role=alert]{color:#a70707}${e("pn-textarea")} .pn-textarea[data-resize]>.pn-textarea-element{resize:vertical}`;export{i as pn_textarea}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* By PostNord.
|
|
4
|
-
*/
|
|
5
|
-
import{t as e,r as n,c as t,g as a,f as r,h as i,F as s,a as o}from"./p-DWsprozV.js";import{uuidv4 as p}from"./index.esm.js";const l=class{constructor(e){n(this,e),this.rangeSelected=t(this,"rangeSelected")}id=`pn-range-${p()}`;idEnd=`${this.id}-end`;idInput=`${this.id}-input`;idInputEnd=`${this.idEnd}-input`;idInputHidden=`${this.id}-hidden`;idHelpertext=`${this.id}-helpertext`;idError=`${this.id}-error`;idDatalist=`${this.id}-data`;mo;rangeTimeout;tooltipDefault="{value}";get hostElement(){return a(this)}showHelperSlot=!1;showErrorSlot=!1;isPressing=!1;pressControl=null;label;labelEnd;helpertext=null;markers=[];textPrefix=null;textSuffix=null;icon=null;iconEnd=null;pnId=this.id;pnIdEnd=this.idEnd;name;nameEnd;min=0;max=100;value=0;valueEnd=0;step="";multiple=!1;input=!1;tooltipHide=!1;tooltipTemplate=this.tooltipDefault;disabled=!1;error=null;invalid=!1;handleValue(){this.multiple&&this.value>this.valueEnd&&(this.valueEnd=this.value);const e=this.calcPercentage(this.value);requestAnimationFrame((()=>this.hostElement.style.setProperty("--pn-range-progress",`${e}%`)))}handleValueEnd(){if(!this.multiple)return;this.value>this.valueEnd&&(this.value=this.valueEnd);const e=this.calcPercentage(this.valueEnd);requestAnimationFrame((()=>this.hostElement.style.setProperty("--pn-range-progress-end",`${e}%`)))}handleId(){this.idHelpertext=`${this.pnId}-helpertext`,this.idError=`${this.pnId}-error`,this.idDatalist=`${this.pnId}-data`}handleMessage(){this.checkSlottedHelper(),this.checkSlottedError()}handleMultiple(){this.isPressing=!0,requestAnimationFrame((()=>this.isPressing=!1))}rangeSelected;connectedCallback(){this.mo=new MutationObserver((()=>r(this.hostElement))),this.mo.observe(this.hostElement,{childList:!0,subtree:!0})}disconnectedCallback(){this.mo&&this.mo.disconnect()}tooltipDirection(e=!1){if(this.multiple){const n=this.hostElement.offsetWidth<384,t=this.calcPercentage(this.value),a=this.calcPercentage(this.valueEnd);if(Math.abs(a-t)<(n?30:20))return e?"left":"right";if(!e&&this.value<=this.min+(this.max-this.min)*(n?.3:.2))return"left";if(e&&this.valueEnd>this.max*(n?.75:.8))return"right"}return"center"}isActiveMarker(e){const n=this.value===e;return this.multiple?n||this.valueEnd===e:n}hasHelperText(){return this.helpertext?.length>0||this.showHelperSlot}hasErrorMessage(){return this.error?.length>0||this.showErrorSlot}hasError(){return this.hasErrorMessage()||this.invalid||this.showErrorSlot}checkSlottedHelper(){const e=this.hostElement.querySelector("[slot=helpertext]")?.textContent;this.showHelperSlot=!!e?.length}checkSlottedError(){const e=this.hostElement.querySelector("[slot=error]")?.textContent;this.showErrorSlot=!!e?.length}calcPercentage(e){return(e-this.min)/(this.max-this.min)*100}setValue(e,n=!1){if(!(e>=this.min&&e<=this.max))return;n?this.valueEnd=e:this.value=e;const t=Number((this.valueEnd-this.value).toPrecision(4)),a=this.calcPercentage(this.value),r=this.calcPercentage(this.valueEnd),i=Number((this.multiple?r-a:a).toPrecision(4));this.rangeSelected.emit({value:this.value,percentage:i,...this.multiple?{valueEnd:this.valueEnd,difference:t}:{}})}getTooltipLabel(e=!1){return this.tooltipTemplate?.replace(this.tooltipDefault,(e?this.valueEnd:this.value)?.toString())}getMarkerLabel({value:e,label:n}){return null===n||""===n?"":(n||e).toString()}ariaDescribedby(){const e=[];return this.hasErrorMessage()?e.push(this.idError):this.hasHelperText()&&e.push(this.idHelpertext),e.length?e.join(" "):null}handleChange(e){const n=e.target,{id:t,valueAsNumber:a,type:r}=n,i=isNaN(a)?0:a;this.setValue(i,"range"===r?t===this.pnIdEnd:t===this.idInputEnd)}setListeners(e=!1){return{onInput:n=>e?this.handleOverlayInput(n):this.handleChange(n),onTouchStart:e=>this.handlePress(e),onTouchEnd:()=>this.handleRelease(),onMouseDown:e=>this.handlePress(e),onMouseUp:()=>this.handleRelease()}}handlePress(e){this.rangeTimeout=setTimeout((()=>{this.isPressing=!0}),"touchstart"===e.type?200:100)}handleRelease(){clearTimeout(this.rangeTimeout),this.isPressing=!1,this.pressControl=null}commonAttrs(){return{step:this.step,min:this.min,max:this.max,list:this.markers?.length?this.idDatalist:null,disabled:this.disabled}}renderPrefix(){return this.input?this.renderNumberInput():this.icon?i("pn-icon",{class:"pn-range-icon",icon:this.icon}):this.textPrefix&&!this.input?i("span",{class:"pn-range-text"},this.textPrefix):null}renderSuffix(){return this.input&&this.multiple?this.renderNumberInput(!0):this.iconEnd?i("pn-icon",{class:"pn-range-icon",icon:this.iconEnd}):this.textSuffix&&!this.input?i("span",{class:"pn-range-text"},this.textSuffix):null}renderNumberInput(e=!1){const n=e?this.valueEnd:this.value,t=e?this.idInputEnd:this.idInput;return i("pn-input",{class:"pn-range-field",label:e?this.labelEnd:this.label,type:"number",name:`${e?this.nameEnd:this.name}-input`,...this.commonAttrs(),icon:e?this.iconEnd:this.icon,textPrefix:this.textPrefix,textSuffix:this.textSuffix,value:n?.toString(),inputid:t,invalid:this.hasError(),"data-single":!this.multiple,...this.setListeners()})}renderRangeInput(e=!1){const n=e?this.valueEnd:this.value,t=this.tooltipDefault!==this.tooltipTemplate;return i("input",{id:e?this.pnIdEnd:this.pnId,class:"pn-range-input",type:"range",name:e?this.nameEnd:this.name,...this.commonAttrs(),value:n,"aria-valuetext":t?this.getTooltipLabel(e):null,"aria-describedby":this.ariaDescribedby(),"aria-invalid":this.hasError().toString(),"data-start":!e||null,"data-end":!!e||null,...this.setListeners()})}renderTooltip(e=!1){return i("div",{class:"pn-range-thumb","data-start":!e||null,"data-end":!!e||null,"data-align":this.tooltipDirection(e),"aria-hidden":"true"},!this.tooltipHide&&i("div",{class:"pn-range-tooltip"},i("span",{class:"pn-range-tooltip-label"},this.getTooltipLabel(e))))}handleOverlayInput(e){const n=e.target,{valueAsNumber:t}=n,a=isNaN(t)?0:t;this.pressControl||(this.pressControl=Math.abs(a-this.value)<=Math.abs(a-this.valueEnd)?"start":"end"),this.setValue(a,"end"===this.pressControl)}render(){return i(o,{key:"3fb29dad425cdec9cf63a5c47d8b5a894fe31077"},i("div",{key:"d43cf9db9b5859e81bba494fbffd9831e6a0cab5",class:"pn-range","data-markers":!!this.markers?.length,"data-input":this.input},i("div",{key:"01a90e9f422c24c1def8032653b5d91190eb09d2",class:"pn-range-header","data-input":this.input},i("label",{key:"2d17dd42e062345a82d8a80aa6730acf18d12a03",htmlFor:this.pnId,class:"pn-range-label"},i("span",{key:"9edc3ef4d5306daa9c818fe11550119301c71411"},this.label)),this.multiple&&i("label",{key:"ccbf685eace815dd0f93e381d3f344e2c3ec7225",htmlFor:this.pnIdEnd,class:"pn-range-label"},i("span",{key:"fa03f509c3ca1becaf0e156f8e66a0801cafbfea"},this.labelEnd))),this.renderPrefix(),i("div",{key:"0da637b2c62b397006f768d54e84e69589fb0809",class:"pn-range-group","data-pressing":this.isPressing},this.renderRangeInput(),this.multiple&&i(s,{key:"892251abffc5b5ada620c989485438e8c6b8e05a"},this.renderRangeInput(!0),i("input",{key:"530640c98705e13bf8b33bdc6185500501736479",id:this.idInputHidden,type:"range",class:"pn-range-overlay-input",...this.commonAttrs(),"aria-invalid":this.hasError().toString(),hidden:!0,tabIndex:-1,...this.setListeners(!0)})),i("div",{key:"303070d848910e18c00b807bfc3c860c462a7a81",class:"pn-range-track","data-multiple":this.multiple,"aria-hidden":"true"}),this.renderTooltip(),this.multiple&&this.renderTooltip(!0),!!this.markers?.length&&i("ul",{key:"1df390f7454d1bff788870ab1f22787357041f38","aria-hidden":"true",class:"pn-range-markers"},this.markers.map((({label:e,value:n})=>i("li",{class:"pn-range-markers-item","data-min":this.calcPercentage(n)===this.min,"data-max":this.calcPercentage(n)===this.max,style:{"--pn-range-marker-position":`${this.calcPercentage(n)}%`}},i("span",{class:"pn-range-markers-label","data-active":this.isActiveMarker(n)},this.getMarkerLabel({value:n,label:e}))))))),this.renderSuffix(),!!this.markers?.length&&i("datalist",{key:"068f03a5c753db20cae5dc05cd2a9e6f75933e80",id:this.idDatalist},this.markers.map((({label:e,value:n})=>i("option",{value:n,label:null===e?null:e})))),i("p",{key:"f75f04fb920645f40434bda7039a2fed64453187",id:this.idHelpertext,class:"pn-range-message",hidden:!this.hasHelperText()||this.hasError()},i("span",{key:"94fa7a8d8fc243a8633424e4bf3b0e1deb0580e9"},this.helpertext),i("slot",{key:"2ca0738617bb4e157c139eefe2fcad3b314a4206",name:"helpertext"})),i("p",{key:"59d078f5a58f1e5ce9e055747387ab4e0eca1ea2",id:this.idError,class:"pn-range-message pn-range-error",role:"alert",hidden:!this.hasErrorMessage()},i("span",{key:"569ae4a5b75336a3f787ca723938e48ad653659a"},this.error),i("slot",{key:"5cb3f9fa5a3483b4c7100c86e230da837ce3aa12",name:"error"}))))}static get watchers(){return{value:[{handleValue:1}],valueEnd:[{handleValueEnd:1}],pnId:[{handleId:1}],helpertext:[{handleMessage:1}],error:[{handleMessage:0}],multiple:[{handleMultiple:0}]}}};l.style=`${e("pn-range")}{display:block}${e("pn-range")} .pn-range{color:#2d2013;display:flex;flex-direction:row;flex-wrap:wrap;gap:clamp(0.25em, 5vw, 0.75em);align-items:center;container-type:inline-size}@container (max-width: 24em){${e("pn-range")} .pn-range .pn-range-header[data-input]{position:absolute;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);margin:-1px;white-space:nowrap}${e("pn-range")} .pn-range>${e("pn-input")}{flex:1 1 100%}${e("pn-range")} .pn-range>${e("pn-input")} .pn-input-label{position:unset;height:unset;width:unset;overflow:unset;clip:unset;margin:0 0 0.25em 0;white-space:unset}}${e("pn-range")} .pn-range[data-markers]{margin-bottom:1em}${e("pn-range")} .pn-range[data-markers][data-input]{margin-bottom:0.5em}${e("pn-range")} .pn-range-header{display:flex;justify-content:space-between;flex:1 1 100%;width:100%}${e("pn-range")} .pn-range-label{cursor:pointer;display:flex;justify-content:space-between;align-items:flex-end;font-weight:400;color:#2d2013;margin:0 0 0.25em 0;gap:0.5em;-webkit-tap-highlight-color:transparent;transition-property:color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-range")} .pn-range-label{transition-duration:0s;transition-delay:0s}}${e("pn-range")} .pn-range-label>span{font-size:0.875em}${e("pn-range")} .pn-range-message{color:#5e554a;font-size:0.875em;font-weight:400;margin:0.25em 0 0 0;display:flex;flex-direction:column;gap:0.25em;text-align:left;flex:1 1 100%;width:100%}${e("pn-range")} .pn-range-message[hidden],${e("pn-range")} .pn-range-message>span[hidden]{display:none}${e("pn-range")} .pn-range-error{color:#a70707}${e("pn-range")} .pn-range-field{flex:0 0 auto}${e("pn-range")} .pn-range-field .pn-input-label{position:absolute;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);margin:-1px;white-space:nowrap}${e("pn-range")} .pn-range-group{position:relative;min-height:0.75em;padding:0.75em 0;flex:1 1 auto}${e("pn-range")} .pn-range-group[data-pressing] *,${e("pn-range")} .pn-range-group[data-pressing] *:before,${e("pn-range")} .pn-range-group[data-pressing] *:after{transition-duration:0s}${e("pn-range")} .pn-range-text{font-weight:400;font-size:0.875em;color:#2d2013}${e("pn-range")} .pn-range-input{z-index:1;position:absolute;top:0;left:0;height:100%;width:100%;margin:0;opacity:0;cursor:pointer;-webkit-tap-highlight-color:transparent}${e("pn-range")} .pn-range-input:focus~.pn-range-thumb:before,${e("pn-range")} .pn-range-input:hover~.pn-range-thumb:before{background-color:#0d234b}${e("pn-range")} .pn-range-input:focus~.pn-range-thumb .pn-range-tooltip,${e("pn-range")} .pn-range-input:hover~.pn-range-thumb .pn-range-tooltip{opacity:1;transform:translateX(50%) translateY(0%);transition-delay:0s}${e("pn-range")} .pn-range-input:focus-visible[data-single]~.pn-range-thumb:before{outline-color:#005d92}${e("pn-range")} .pn-range-input:focus-visible[data-start]~.pn-range-thumb[data-start]:before,${e("pn-range")} .pn-range-input:focus-visible[data-end]~.pn-range-thumb[data-end]:before{outline-color:#005d92}${e("pn-range")} .pn-range-input[aria-invalid=true]~.pn-range-thumb:before{background-color:#a70707}${e("pn-range")} .pn-range-input[aria-invalid=true]~.pn-range-thumb .pn-range-tooltip{background-color:#500715}${e("pn-range")} .pn-range-input[aria-invalid=true]~.pn-range-track:before{background-color:#a70707}${e("pn-range")} .pn-range-input[aria-invalid=true]:focus-visible[data-start]~.pn-range-thumb[data-start]:before,${e("pn-range")} .pn-range-input[aria-invalid=true]:focus-visible[data-end]~.pn-range-thumb[data-end]:before{outline-color:#a70707}${e("pn-range")} .pn-range-input[aria-invalid=true]:hover~.pn-range-thumb:before{background-color:#500715}${e("pn-range")} .pn-range-input:disabled{cursor:not-allowed}${e("pn-range")} .pn-range-input:disabled+.pn-range-track:before{background-color:#969087}${e("pn-range")} .pn-range-input:disabled~.pn-range-thumb:before{background-color:#5e554a}${e("pn-range")} .pn-range-input:disabled~.pn-range-thumb .pn-range-tooltip{background-color:#2d2013}${e("pn-range")} .pn-range-overlay-input{z-index:5;cursor:pointer;position:absolute;appearance:none;top:0;left:0;height:100%;width:100%;margin:0;padding:0;border:0;outline:0;opacity:0;display:block;-webkit-tap-highlight-color:transparent}${e("pn-range")} .pn-range-overlay-input:focus~.pn-range-thumb:before,${e("pn-range")} .pn-range-overlay-input:focus-visible~.pn-range-thumb:before,${e("pn-range")} .pn-range-overlay-input:hover~.pn-range-thumb:before{background-color:#0d234b}${e("pn-range")} .pn-range-overlay-input:focus~.pn-range-thumb[data-align=right] .pn-range-tooltip,${e("pn-range")} .pn-range-overlay-input:focus-visible~.pn-range-thumb[data-align=right] .pn-range-tooltip,${e("pn-range")} .pn-range-overlay-input:hover~.pn-range-thumb[data-align=right] .pn-range-tooltip{transform:translateX(0%) translateY(0%);border-bottom-right-radius:0em}${e("pn-range")} .pn-range-overlay-input:focus~.pn-range-thumb[data-align=left] .pn-range-tooltip,${e("pn-range")} .pn-range-overlay-input:focus-visible~.pn-range-thumb[data-align=left] .pn-range-tooltip,${e("pn-range")} .pn-range-overlay-input:hover~.pn-range-thumb[data-align=left] .pn-range-tooltip{transform:translateX(100%) translateY(0%);border-bottom-left-radius:0em}${e("pn-range")} .pn-range-overlay-input:focus~.pn-range-thumb .pn-range-tooltip,${e("pn-range")} .pn-range-overlay-input:focus-visible~.pn-range-thumb .pn-range-tooltip,${e("pn-range")} .pn-range-overlay-input:hover~.pn-range-thumb .pn-range-tooltip{opacity:1;transform:translateX(50%) translateY(0%);transition-delay:0s}${e("pn-range")} .pn-range-overlay-input[aria-invalid=true]:focus~.pn-range-thumb:before,${e("pn-range")} .pn-range-overlay-input[aria-invalid=true]:focus-visible~.pn-range-thumb:before,${e("pn-range")} .pn-range-overlay-input[aria-invalid=true]:hover~.pn-range-thumb:before{background-color:#500715}${e("pn-range")} .pn-range-track{pointer-events:none;position:relative;min-height:inherit;display:block;background-color:#d3cecb;border-radius:2em;overflow:hidden}${e("pn-range")} .pn-range-track:before,${e("pn-range")} .pn-range-track:after{content:"";z-index:0;position:absolute;right:100%;pointer-events:none;height:100%;width:100%;background-color:#005d92;transform:translateX(var(--pn-range-progress));transition-property:transform, background-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-range")} .pn-range-track:before,${e("pn-range")} .pn-range-track:after{transition-duration:0s;transition-delay:0s}}${e("pn-range")} .pn-range-track:after{display:none}${e("pn-range")} .pn-range-track:before{background-color:#005d92;transform:translateX(var(--pn-range-progress))}${e("pn-range")} .pn-range-track[data-multiple]:before{transform:translateX(var(--pn-range-progress-end))}${e("pn-range")} .pn-range-track[data-multiple]:after{display:unset;background-color:#d3cecb;transform:translateX(var(--pn-range-progress))}${e("pn-range")} .pn-range-thumb{pointer-events:none;position:absolute;height:100%;width:calc(100% - 1em);top:0;right:calc(100% - 0.5em);transform:translateX(var(--pn-range-progress));transition-property:transform, border-radius;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-range")} .pn-range-thumb{transition-duration:0s;transition-delay:0s}}${e("pn-range")} .pn-range-thumb[data-end]{transform:translateX(var(--pn-range-progress-end))}${e("pn-range")} .pn-range-thumb[data-align=right] .pn-range-tooltip{transform:translateX(0%) translateY(10%)}${e("pn-range")} .pn-range-thumb[data-align=right] .pn-range-tooltip:before{transform:translateX(50%) translateY(-50%) rotate(0deg)}${e("pn-range")} .pn-range-thumb[data-align=left] .pn-range-tooltip{transform:translateX(100%) translateY(10%)}${e("pn-range")} .pn-range-thumb[data-align=left] .pn-range-tooltip:before{transform:translateX(50%) translateY(-50%) rotate(0deg)}${e("pn-range")} .pn-range-thumb:before{content:"";position:absolute;top:0.5em;right:-0.65625em;height:1.3125em;width:1.3125em;background-color:#005d92;border-radius:5em;outline:0.2rem solid transparent;outline-offset:0.2rem;transition-property:background-color, outline-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-range")} .pn-range-thumb:before{transition-duration:0s;transition-delay:0s}}${e("pn-range")} .pn-range-tooltip{position:absolute;z-index:10;top:-85%;right:0;text-align:center;line-height:1.25em;white-space:nowrap;height:1.75em;min-width:2em;padding:0.25em 0.5em;border-radius:0.5em;background-color:#0d234b;color:#ffffff;transform:translateX(50%) translateY(10%);opacity:0;transition-property:opacity, transform, border-radius, background-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-range")} .pn-range-tooltip{transition-duration:0s;transition-delay:0s}}${e("pn-range")} .pn-range-tooltip{transition-delay:0.4s}${e("pn-range")} .pn-range-tooltip-label{font-size:0.875em;font-weight:400}${e("pn-range")} .pn-range-tooltip:before{content:"";z-index:-1;position:absolute;left:50%;bottom:-0.25em;height:0.5em;width:0.5em;background-color:inherit;transform:translateX(-50%) translateY(0%) rotate(45deg);transition-property:left, transform;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-range")} .pn-range-tooltip:before{transition-duration:0s;transition-delay:0s}}${e("pn-range")} .pn-range-markers{position:absolute;top:100%;left:0.5em;min-height:1em;width:calc(100% - 1em);padding:0;margin:0;list-style:none;display:flex;flex-direction:row;flex-wrap:nowrap}${e("pn-range")} .pn-range-markers-item{position:relative;left:var(--pn-range-marker-position)}${e("pn-range")} .pn-range-markers-item[data-min] .pn-range-markers-label{left:-0.0625em;transform:translateX(0%)}${e("pn-range")} .pn-range-markers-item[data-max] .pn-range-markers-label{left:unset;right:0;transform:translateX(0%)}${e("pn-range")} .pn-range-markers-item:before{content:"";position:absolute;left:0;top:-100%;border-left:0.0625em solid #d3cecb;height:1em;z-index:-1}${e("pn-range")} .pn-range-markers-label{position:absolute;top:0;left:50%;transform:translateX(-50%);font-weight:400;font-size:0.875em;color:#5e554a;transition-property:color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-range")} .pn-range-markers-label{transition-duration:0s;transition-delay:0s}}${e("pn-range")} .pn-range-markers-label[data-active]{color:#2d2013}`;export{l as pn_range}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* By PostNord.
|
|
4
|
-
*/
|
|
5
|
-
var t,e,n,s,i,r,o,l,c,u,f,a,h,d,p,v,b,$=Object.create,m=Object.defineProperty,g=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,y=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty,j=t=>{throw TypeError(t)},S=(t,e)=>function(){return e||(0,t[w(t)[0]])((e={exports:{}}).exports,e),e.exports},k=(t,e,n)=>e.has(t)||j("Cannot "+n),x=(t,e,n)=>(k(t,e,"read from private field"),n?n.call(t):e.get(t)),E=(t,e,n)=>e.has(t)?j("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),M=(t,e,n)=>(k(t,e,"write to private field"),e.set(t,n),n),N=(t,e,n)=>(k(t,e,"access private method"),n),C=S({"node_modules/balanced-match/index.js"(t,e){function n(t,e,n){t instanceof RegExp&&(t=s(t,n)),e instanceof RegExp&&(e=s(e,n));var r=i(t,e,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+t.length,r[1]),post:n.slice(r[1]+e.length)}}function s(t,e){var n=e.match(t);return n?n[0]:null}function i(t,e,n){var s,i,r,o,l,c=n.indexOf(t),u=n.indexOf(e,c+1),f=c;if(c>=0&&u>0){if(t===e)return[c,u];for(s=[],r=n.length;f>=0&&!l;)f==c?(s.push(f),c=n.indexOf(t,f+1)):1==s.length?l=[s.pop(),u]:((i=s.pop())<r&&(r=i,o=u),u=n.indexOf(e,f+1)),f=c<u&&c>=0?c:u;s.length&&(l=[r,o])}return l}e.exports=n,n.range=i}}),R=S({"node_modules/brace-expansion/index.js"(t,e){var n=C();e.exports=function(t){return t?("{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2)),v(function(t){return t.split("\\\\").join(s).split("\\{").join(i).split("\\}").join(r).split("\\,").join(o).split("\\.").join(l)}(t),!0).map(u)):[]};var s="\0SLASH"+Math.random()+"\0",i="\0OPEN"+Math.random()+"\0",r="\0CLOSE"+Math.random()+"\0",o="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function c(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function u(t){return t.split(s).join("\\").split(i).join("{").split(r).join("}").split(o).join(",").split(l).join(".")}function f(t){if(!t)return[""];var e=[],s=n("{","}",t);if(!s)return t.split(",");var i=s.body,r=s.post,o=s.pre.split(",");o[o.length-1]+="{"+i+"}";var l=f(r);return r.length&&(o[o.length-1]+=l.shift(),o.push.apply(o,l)),e.push.apply(e,o),e}function a(t){return"{"+t+"}"}function h(t){return/^-?0\d/.test(t)}function d(t,e){return t<=e}function p(t,e){return t>=e}function v(t,e){var s=[],i=n("{","}",t);if(!i)return[t];var o=i.pre,l=i.post.length?v(i.post,!1):[""];if(/\$$/.test(i.pre))for(var u=0;u<l.length;u++)s.push(A=o+"{"+i.body+"}"+l[u]);else{var b,$,m=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),g=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),w=m||g,y=i.body.indexOf(",")>=0;if(!w&&!y)return i.post.match(/,(?!,).*\}/)?v(t=i.pre+"{"+i.body+r+i.post):[t];if(w)b=i.body.split(/\.\./);else if(1===(b=f(i.body)).length&&1===(b=v(b[0],!1).map(a)).length)return l.map((function(t){return i.pre+b[0]+t}));if(w){var O=c(b[0]),j=c(b[1]),S=Math.max(b[0].length,b[1].length),k=3==b.length?Math.abs(c(b[2])):1,x=d;j<O&&(k*=-1,x=p);var E=b.some(h);$=[];for(var M=O;x(M,j);M+=k){var N;if(g)"\\"===(N=String.fromCharCode(M))&&(N="");else if(N=M+"",E){var C=S-N.length;if(C>0){var R=Array(C+1).join("0");N=M<0?"-"+R+N.slice(1):R+N}}$.push(N)}}else{$=[];for(var P=0;P<b.length;P++)$.push.apply($,v(b[P],!1))}for(P=0;P<$.length;P++)for(u=0;u<l.length;u++){var A=o+$[P]+l[u];(!e||w||A)&&s.push(A)}}return s}}}),P=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(P||{}),A=(t=>(t.Array="array",t.Date="date",t.Map="map",t.Object="object",t.RegularExpression="regexp",t.Set="set",t.Channel="channel",t.Symbol="symbol",t))(A||{}),L="type",W="value",T="serialized:",z=(t,e)=>{var n;Object.entries(null!=(n=e.i.t)?n:{}).map((([n,[s]])=>{if(31&s||32&s){const s=t[n],i=function(t,e){for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(null==n?void 0:n.get)return n;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),n)||Object.getOwnPropertyDescriptor(t,n);i&&Object.defineProperty(t,n,{get(){return i.get.call(this)},set(t){i.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.o.has(n)?e.o.get(n):s}}))},I=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},_=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.l=t,512&e.i.u&&z(t,e))},F=(t,e)=>e in t,D=(t,e)=>(0,console.error)(t,e),B=new Map,G=new Map,U="s-id",V="c-id",Z="slot-fb{display:contents}slot-fb[hidden]{display:none}",H="http://www.w3.org/1999/xlink",q="undefined"!=typeof window?window:{},J=q.HTMLElement||class{},Y={u:0,h:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,s)=>t.addEventListener(e,n,s),rel:(t,e,n,s)=>t.removeEventListener(e,n,s),ce:(t,e)=>new CustomEvent(t,e)},K=t=>Promise.resolve(t),Q=(()=>{try{return!!q.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),X=!!Q&&(()=>!!q.document&&Object.getOwnPropertyDescriptor(q.document.adoptedStyleSheets,"length").writable)(),tt=!1,et=[],nt=[],st=(t,e)=>n=>{t.push(n),tt||(tt=!0,e&&4&Y.u?ot(rt):Y.raf(rt))},it=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){D(t)}t.length=0},rt=()=>{it(et),it(nt),(tt=et.length>0)&&Y.raf(rt)},ot=t=>K().then(t),lt=st(nt,!0),ct=t=>"object"==(t=typeof t)||"function"===t,ut=((t,e,n)=>(n=null!=t?$(y(t)):{},((t,e,n,s)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let n of w(e))O.call(t,n)||undefined===n||m(t,n,{get:()=>e[n],enumerable:!(s=g(e,n))||s.enumerable});return t})(m(n,"default",{value:t,enumerable:!0}),t)))(R()),ft=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},at={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ht=t=>t.replace(/[[\]\\-]/g,"\\$&"),dt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),pt=t=>t.join(""),vt=(t,e)=>{const n=e;if("["!==t.charAt(n))throw Error("not in a brace expression");const s=[],i=[];let r=n+1,o=!1,l=!1,c=!1,u=!1,f=n,a="";t:for(;r<t.length;){const e=t.charAt(r);if("!"!==e&&"^"!==e||r!==n+1){if("]"===e&&o&&!c){f=r+1;break}if(o=!0,"\\"!==e||c){if("["===e&&!c)for(const[e,[o,c,u]]of Object.entries(at))if(t.startsWith(e,r)){if(a)return["$.",!1,t.length-n,!0];r+=e.length,u?i.push(o):s.push(o),l=l||c;continue t}c=!1,a?(e>a?s.push(ht(a)+"-"+ht(e)):e===a&&s.push(ht(e)),a="",r++):t.startsWith("-]",r+1)?(s.push(ht(e+"-")),r+=2):t.startsWith("-",r+1)?(a=e,r+=2):(s.push(ht(e)),r++)}else c=!0,r++}else u=!0,r++}if(f<r)return["",!1,0,!1];if(!s.length&&!i.length)return["$.",!1,t.length-n,!0];if(0===i.length&&1===s.length&&/^\\?.$/.test(s[0])&&!u){const t=2===s[0].length?s[0].slice(-1):s[0];return[dt(t),!1,f-n,!1]}const h="["+(u?"^":"")+pt(s)+"]",d="["+(u?"":"^")+pt(i)+"]";return[s.length&&i.length?"("+h+"|"+d+")":s.length?h:d,l,f-n,!0]},bt=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),$t=new Set(["!","?","+","*","@"]),mt=t=>$t.has(t),gt="(?!\\.)",wt=new Set(["[","."]),yt=new Set(["..","."]),Ot=new Set("().*{}+?[]^$\\!"),jt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),St="[^/]",kt=St+"*?",xt=St+"+?",Et=class ${constructor(h,d,p={}){E(this,a),((t,e,n)=>{((t,e,n)=>{e in t?m(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(t,e+"",n)})(this,"type"),E(this,t),E(this,e),E(this,n,!1),E(this,s,[]),E(this,i),E(this,r),E(this,o),E(this,l,!1),E(this,c),E(this,u),E(this,f,!1),this.type=h,h&&M(this,e,!0),M(this,i,d),M(this,t,x(this,i)?x(x(this,i),t):this),M(this,c,x(this,t)===this?p:x(x(this,t),c)),M(this,o,x(this,t)===this?[]:x(x(this,t),o)),"!"!==h||x(x(this,t),l)||x(this,o).push(this),M(this,r,x(this,i)?x(x(this,i),s).length:0)}get hasMagic(){if(void 0!==x(this,e))return x(this,e);for(const t of x(this,s))if("string"!=typeof t&&(t.type||t.hasMagic))return M(this,e,!0);return x(this,e)}toString(){return void 0!==x(this,u)?x(this,u):M(this,u,this.type?this.type+"("+x(this,s).map((t=>t+"")).join("|")+")":x(this,s).map((t=>t+"")).join(""))}push(...t){for(const e of t)if(""!==e){if("string"!=typeof e&&!(e instanceof $&&x(e,i)===this))throw Error("invalid part: "+e);x(this,s).push(e)}}toJSON(){var e;const n=null===this.type?x(this,s).slice().map((t=>"string"==typeof t?t:t.toJSON())):[this.type,...x(this,s).map((t=>t.toJSON()))];return this.isStart()&&!this.type&&n.unshift([]),this.isEnd()&&(this===x(this,t)||x(x(this,t),l)&&"!"===(null==(e=x(this,i))?void 0:e.type))&&n.push({}),n}isStart(){var e;if(x(this,t)===this)return!0;if(!(null==(e=x(this,i))?void 0:e.isStart()))return!1;if(0===x(this,r))return!0;const n=x(this,i);for(let t=0;t<x(this,r);t++){const e=x(n,s)[t];if(!(e instanceof $&&"!"===e.type))return!1}return!0}isEnd(){var e,n,o;if(x(this,t)===this)return!0;if("!"===(null==(e=x(this,i))?void 0:e.type))return!0;if(!(null==(n=x(this,i))?void 0:n.isEnd()))return!1;if(!this.type)return null==(o=x(this,i))?void 0:o.isEnd();const l=x(this,i)?x(x(this,i),s).length:0;return x(this,r)===l-1}copyIn(t){this.push("string"==typeof t?t:t.clone(this))}clone(t){const e=new $(this.type,t);for(const t of x(this,s))e.copyIn(t);return e}static fromGlob(t,e={}){var n;const s=new $(null,void 0,e);return N(n=$,d,p).call(n,t,s,0,e),s}toMMPattern(){if(this!==x(this,t))return x(this,t).toMMPattern();const n=""+this,[s,i,r,o]=this.toRegExpSource();if(!(r||x(this,e)||x(this,c).nocase&&!x(this,c).nocaseMagicOnly&&n.toUpperCase()!==n.toLowerCase()))return i;const l=(x(this,c).nocase?"i":"")+(o?"u":"");return Object.assign(RegExp(`^${s}$`,l),{_src:s,_glob:n})}get options(){return x(this,c)}toRegExpSource(r){var o;const u=null!=r?r:!!x(this,c).dot;if(x(this,t)===this&&N(this,a,h).call(this),!this.type){const c=this.isStart()&&this.isEnd(),f=x(this,s).map((t=>{var s;const[i,o,l,u]="string"==typeof t?N(s=$,d,b).call(s,t,x(this,e),c):t.toRegExpSource(r);return M(this,e,x(this,e)||l),M(this,n,x(this,n)||u),i})).join("");let a="";if(this.isStart()&&"string"==typeof x(this,s)[0]&&(1!==x(this,s).length||!yt.has(x(this,s)[0]))){const t=wt,e=u&&t.has(f.charAt(0))||f.startsWith("\\.")&&t.has(f.charAt(2))||f.startsWith("\\.\\.")&&t.has(f.charAt(4)),n=!u&&!r&&t.has(f.charAt(0));a=e?"(?!(?:^|/)\\.\\.?(?:$|/))":n?gt:""}let h="";return this.isEnd()&&x(x(this,t),l)&&"!"===(null==(o=x(this,i))?void 0:o.type)&&(h="(?:$|\\/)"),[a+f+h,bt(f),M(this,e,!!x(this,e)),x(this,n)]}const p="*"===this.type||"+"===this.type,m="!"===this.type?"(?:(?!(?:":"(?:";let g=N(this,a,v).call(this,u);if(this.isStart()&&this.isEnd()&&!g&&"!"!==this.type){const t=""+this;return M(this,s,[t]),this.type=null,M(this,e,void 0),[t,bt(""+this),!1,!1]}let w=!p||r||u?"":N(this,a,v).call(this,!0);w===g&&(w=""),w&&(g=`(?:${g})(?:${w})*?`);let y="";return y="!"===this.type&&x(this,f)?(this.isStart()&&!u?gt:"")+xt:m+g+("!"===this.type?"))"+(!this.isStart()||u||r?"":gt)+kt+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&w?")":"*"===this.type&&w?")?":")"+this.type),[y,bt(g),M(this,e,!!x(this,e)),x(this,n)]}};t=new WeakMap,e=new WeakMap,n=new WeakMap,s=new WeakMap,i=new WeakMap,r=new WeakMap,o=new WeakMap,l=new WeakMap,c=new WeakMap,u=new WeakMap,f=new WeakMap,a=new WeakSet,h=function(){if(this!==x(this,t))throw Error("should only call on root");if(x(this,l))return this;let e;for(M(this,l,!0);e=x(this,o).pop();){if("!"!==e.type)continue;let t=e,n=x(t,i);for(;n;){for(let i=x(t,r)+1;!n.type&&i<x(n,s).length;i++)for(const t of x(e,s)){if("string"==typeof t)throw Error("string part in extglob AST??");t.copyIn(x(n,s)[i])}t=n,n=x(t,i)}}return this},d=new WeakSet,p=function(t,n,i,r){var o,l;let c=!1,u=!1,a=-1,h=!1;if(null===n.type){let e=i,s="";for(;e<t.length;){const i=t.charAt(e++);if(c||"\\"===i)c=!c,s+=i;else if(u)e===a+1?"^"!==i&&"!"!==i||(h=!0):"]"!==i||e===a+2&&h||(u=!1),s+=i;else if("["!==i)if(r.noext||!mt(i)||"("!==t.charAt(e))s+=i;else{n.push(s),s="";const l=new Et(i,n);e=N(o=Et,d,p).call(o,t,l,e,r),n.push(l)}else u=!0,a=e,h=!1,s+=i}return n.push(s),e}let v=i+1,b=new Et(null,n);const $=[];let m="";for(;v<t.length;){const e=t.charAt(v++);if(c||"\\"===e)c=!c,m+=e;else if(u)v===a+1?"^"!==e&&"!"!==e||(h=!0):"]"!==e||v===a+2&&h||(u=!1),m+=e;else if("["!==e)if(mt(e)&&"("===t.charAt(v)){b.push(m),m="";const n=new Et(e,b);b.push(n),v=N(l=Et,d,p).call(l,t,n,v,r)}else if("|"!==e){if(")"===e)return""===m&&0===x(n,s).length&&M(n,f,!0),b.push(m),m="",n.push(...$,b),v;m+=e}else b.push(m),m="",$.push(b),b=new Et(null,n);else u=!0,a=v,h=!1,m+=e}return n.type=null,M(n,e,void 0),M(n,s,[t.substring(i-1)]),v},v=function(t){return x(this,s).map((e=>{if("string"==typeof e)throw Error("string type in extglob ast??");const[s,i,r,o]=e.toRegExpSource(t);return M(this,n,x(this,n)||o),s})).filter((t=>!(this.isStart()&&this.isEnd()&&!t))).join("|")},b=function(t,e,n=!1){let s=!1,i="",r=!1;for(let o=0;o<t.length;o++){const l=t.charAt(o);if(s)s=!1,i+=(Ot.has(l)?"\\":"")+l;else if("\\"!==l){if("["===l){const[n,s,l,c]=vt(t,o);if(l){i+=n,r=r||s,o+=l-1,e=e||c;continue}}"*"!==l?"?"!==l?i+=jt(l):(i+=St,e=!0):(i+=n&&"*"===t?xt:kt,e=!0)}else o===t.length-1?i+="\\\\":s=!0}return[i,bt(t),!!e,r]},E(Et,d);var Mt=Et,Nt=(t,e,n={})=>(ft(e),!(!n.nocomment&&"#"===e.charAt(0))&&new ee(e,n).match(t)),Ct=/^\*+([^+@!?\*\[\(]*)$/,Rt=t=>e=>!e.startsWith(".")&&e.endsWith(t),Pt=t=>e=>e.endsWith(t),At=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),Lt=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),Wt=/^\*+\.\*+$/,Tt=t=>!t.startsWith(".")&&t.includes("."),zt=t=>"."!==t&&".."!==t&&t.includes("."),It=/^\.\*+$/,_t=t=>"."!==t&&".."!==t&&t.startsWith("."),Ft=/^\*+$/,Dt=t=>0!==t.length&&!t.startsWith("."),Bt=t=>0!==t.length&&"."!==t&&".."!==t,Gt=/^\?+([^+@!?\*\[\(]*)?$/,Ut=([t,e=""])=>{const n=qt([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Vt=([t,e=""])=>{const n=Jt([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Zt=([t,e=""])=>{const n=Jt([t]);return e?t=>n(t)&&t.endsWith(e):n},Ht=([t,e=""])=>{const n=qt([t]);return e?t=>n(t)&&t.endsWith(e):n},qt=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")},Jt=([t])=>{const e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},Yt="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";Nt.sep="win32"===Yt?"\\":"/";var Kt=Symbol("globstar **");Nt.GLOBSTAR=Kt,Nt.filter=(t,e={})=>n=>Nt(n,t,e);var Qt=(t,e={})=>Object.assign({},t,e);Nt.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return Nt;const e=Nt;return Object.assign(((n,s,i={})=>e(n,s,Qt(t,i))),{Minimatch:class extends e.Minimatch{constructor(e,n={}){super(e,Qt(t,n))}static defaults(n){return e.defaults(Qt(t,n)).Minimatch}},AST:class extends e.AST{constructor(e,n,s={}){super(e,n,Qt(t,s))}static fromGlob(n,s={}){return e.AST.fromGlob(n,Qt(t,s))}},unescape:(n,s={})=>e.unescape(n,Qt(t,s)),escape:(n,s={})=>e.escape(n,Qt(t,s)),filter:(n,s={})=>e.filter(n,Qt(t,s)),defaults:n=>e.defaults(Qt(t,n)),makeRe:(n,s={})=>e.makeRe(n,Qt(t,s)),braceExpand:(n,s={})=>e.braceExpand(n,Qt(t,s)),match:(n,s,i={})=>e.match(n,s,Qt(t,i)),sep:e.sep,GLOBSTAR:Kt})};var Xt=(t,e={})=>(ft(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,ut.default)(t));Nt.braceExpand=Xt,Nt.makeRe=(t,e={})=>new ee(t,e).makeRe(),Nt.match=(t,e,n={})=>{const s=new ee(e,n);return t=t.filter((t=>s.match(t))),s.options.nonull&&!t.length&&t.push(e),t};var te=/[?*]|[+@!]\(.*?\)|\[|\]/,ee=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){ft(t),this.options=e=e||{},this.pattern=t,this.platform=e.platform||Yt,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==e.windowsNoMagicRoot?e.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if("string"!=typeof e)return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...t)=>console.error(...t)),this.debug(this.pattern,this.globSet);const n=this.globSet.map((t=>this.slashSplit(t)));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let s=this.globParts.map((t=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=!(""!==t[0]||""!==t[1]||"?"!==t[2]&&te.test(t[2])||te.test(t[3])),n=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map((t=>this.parse(t)))];if(n)return[t[0],...t.slice(1).map((t=>this.parse(t)))]}return t.map((t=>this.parse(t)))}));if(this.debug(this.pattern,s),this.set=s.filter((t=>-1===t.indexOf(!1))),this.isWindows)for(let t=0;t<this.set.length;t++){const e=this.set[t];""===e[0]&&""===e[1]&&"?"===this.globParts[t][2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])&&(e[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let e=0;e<t.length;e++)for(let n=0;n<t[e].length;n++)"**"===t[e][n]&&(t[e][n]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((t=>{let e=-1;for(;-1!==(e=t.indexOf("**",e+1));){let n=e;for(;"**"===t[n+1];)n++;n!==e&&t.splice(e,n-e)}return t}))}levelOneOptimize(t){return t.map((t=>0===(t=t.reduce(((t,e)=>{const n=t[t.length-1];return"**"===e&&"**"===n?t:".."===e&&n&&".."!==n&&"."!==n&&"**"!==n?(t.pop(),t):(t.push(e),t)}),[])).length?[""]:t))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){const s=t[n];1===n&&""===s&&""===t[0]||"."!==s&&""!==s||(e=!0,t.splice(n,1),n--)}"."!==t[0]||2!==t.length||"."!==t[1]&&""!==t[1]||(e=!0,t.pop())}let n=0;for(;-1!==(n=t.indexOf("..",n+1));){const s=t[n-1];s&&"."!==s&&".."!==s&&"**"!==s&&(e=!0,t.splice(n-1,2),n-=2)}}while(e);return 0===t.length?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let n of t){let s=-1;for(;-1!==(s=n.indexOf("**",s+1));){let i=s;for(;"**"===n[i+1];)i++;i>s&&n.splice(s+1,i-s);const r=n[s+2],o=n[s+3];if(".."!==n[s+1])continue;if(!r||"."===r||".."===r||!o||"."===o||".."===o)continue;e=!0,n.splice(s,1);const l=n.slice(0);l[s]="**",t.push(l),s--}if(!this.preserveMultipleSlashes){for(let t=1;t<n.length-1;t++){const s=n[t];1===t&&""===s&&""===n[0]||"."!==s&&""!==s||(e=!0,n.splice(t,1),t--)}"."!==n[0]||2!==n.length||"."!==n[1]&&""!==n[1]||(e=!0,n.pop())}let i=0;for(;-1!==(i=n.indexOf("..",i+1));){const t=n[i-1];t&&"."!==t&&".."!==t&&"**"!==t&&(e=!0,n.splice(i-1,2,...1===i&&"**"===n[i+1]?["."]:[]),0===n.length&&n.push(""),i-=2)}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let n=e+1;n<t.length;n++){const s=this.partsMatch(t[e],t[n],!this.preserveMultipleSlashes);s&&(t[e]=s,t[n]=[])}return t.filter((t=>t.length))}partsMatch(t,e,n=!1){let s=0,i=0,r=[],o="";for(;s<t.length&&i<e.length;)if(t[s]===e[i])r.push("b"===o?e[i]:t[s]),s++,i++;else if(n&&"**"===t[s]&&e[i]===t[s+1])r.push(t[s]),s++;else if(n&&"**"===e[i]&&t[s]===e[i+1])r.push(e[i]),i++;else if("*"!==t[s]||!e[i]||!this.options.dot&&e[i].startsWith(".")||"**"===e[i]){if("*"!==e[i]||!t[s]||!this.options.dot&&t[s].startsWith(".")||"**"===t[s])return!1;if("a"===o)return!1;o="b",r.push(e[i]),s++,i++}else{if("b"===o)return!1;o="a",r.push(t[s]),s++,i++}return t.length===e.length&&r}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,n=0;for(let s=0;s<t.length&&"!"===t.charAt(s);s++)e=!e,n++;n&&(this.pattern=t.slice(n)),this.negate=e}matchOne(t,e,n=!1){const s=this.options;if(this.isWindows){const n="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),s=!n&&""===t[0]&&""===t[1]&&"?"===t[2]&&/^[a-z]:$/i.test(t[3]),i="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),r=s?3:n?0:void 0,o=!i&&""===e[0]&&""===e[1]&&"?"===e[2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])?3:i?0:void 0;if("number"==typeof r&&"number"==typeof o){const[n,s]=[t[r],e[o]];n.toLowerCase()===s.toLowerCase()&&(e[o]=n,o>r?e=e.slice(o):r>o&&(t=t.slice(r)))}}const{optimizationLevel:i=1}=this.options;i>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var r=0,o=0,l=t.length,c=e.length;r<l&&o<c;r++,o++){this.debug("matchOne loop");var u=e[o],f=t[r];if(this.debug(e,u,f),!1===u)return!1;if(u===Kt){this.debug("GLOBSTAR",[e,u,f]);var a=r,h=o+1;if(h===c){for(this.debug("** at the end");r<l;r++)if("."===t[r]||".."===t[r]||!s.dot&&"."===t[r].charAt(0))return!1;return!0}for(;a<l;){var d=t[a];if(this.debug("\nglobstar while",t,a,e,h,d),this.matchOne(t.slice(a),e.slice(h),n))return this.debug("globstar found match!",a,l,d),!0;if("."===d||".."===d||!s.dot&&"."===d.charAt(0)){this.debug("dot detected!",t,a,e,h);break}this.debug("globstar swallow a segment, and continue"),a++}return!(!n||(this.debug("\n>>> no match, partial?",t,a,e,h),a!==l))}let i;if("string"==typeof u?(i=f===u,this.debug("string match",u,f,i)):(i=u.test(f),this.debug("pattern match",u,f,i)),!i)return!1}if(r===l&&o===c)return!0;if(r===l)return n;if(o===c)return r===l-1&&""===t[r];throw Error("wtf?")}braceExpand(){return Xt(this.pattern,this.options)}parse(t){ft(t);const e=this.options;if("**"===t)return Kt;if(""===t)return"";let n,s=null;(n=t.match(Ft))?s=e.dot?Bt:Dt:(n=t.match(Ct))?s=(e.nocase?e.dot?Lt:At:e.dot?Pt:Rt)(n[1]):(n=t.match(Gt))?s=(e.nocase?e.dot?Vt:Ut:e.dot?Zt:Ht)(n):(n=t.match(Wt))?s=e.dot?zt:Tt:(n=t.match(It))&&(s=_t);const i=Mt.fromGlob(t,this.options).toMMPattern();return s&&"object"==typeof i&&Reflect.defineProperty(i,"test",{value:s}),i}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,n=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",s=new Set(e.nocase?["i"]:[]);let i=t.map((t=>{const e=t.map((t=>{if(t instanceof RegExp)for(const e of t.flags.split(""))s.add(e);return"string"==typeof t?(t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"))(t):t===Kt?Kt:t._src}));return e.forEach(((t,s)=>{const i=e[s+1],r=e[s-1];t===Kt&&r!==Kt&&(void 0===r?void 0!==i&&i!==Kt?e[s+1]="(?:\\/|"+n+"\\/)?"+i:e[s]=n:void 0===i?e[s-1]=r+"(?:\\/|"+n+")?":i!==Kt&&(e[s-1]=r+"(?:\\/|\\/"+n+"\\/)"+i,e[s+1]=Kt))})),e.filter((t=>t!==Kt)).join("/")})).join("|");const[r,o]=t.length>1?["(?:",")"]:["",""];i="^"+r+i+o+"$",this.negate&&(i="^(?!"+i+").+$");try{this.regexp=RegExp(i,[...s].join(""))}catch(t){this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const s=this.slashSplit(t);this.debug(this.pattern,"split",s);const i=this.set;this.debug(this.pattern,"set",i);let r=s[s.length-1];if(!r)for(let t=s.length-2;!r&&t>=0;t--)r=s[t];for(let t=0;t<i.length;t++){const o=i[t];let l=s;if(n.matchBase&&1===o.length&&(l=[r]),this.matchOne(l,o,e))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(t){return Nt.defaults(t).Minimatch}};function ne(t){var e,n,s;return null!=(s=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?s:void 0}Nt.AST=Mt,Nt.Minimatch=ee,Nt.escape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),Nt.unescape=bt;var se=class t{static fromLocalValue(e){const n=e[L],s=W in e?e[W]:void 0;switch(n){case"string":case"boolean":return s;case"bigint":return BigInt(s);case"undefined":return;case"null":return null;case"number":return"NaN"===s?NaN:"-0"===s?-0:"Infinity"===s?1/0:"-Infinity"===s?-1/0:s;case"array":return s.map((e=>t.fromLocalValue(e)));case"date":return new Date(s);case"map":const e=new Map;for(const[n,i]of s){const s="object"==typeof n&&null!==n?t.fromLocalValue(n):n,r=t.fromLocalValue(i);e.set(s,r)}return e;case"object":const i={};for(const[e,n]of s)i[e]=t.fromLocalValue(n);return i;case"regexp":const{pattern:r,flags:o}=s;return RegExp(r,o);case"set":const l=new Set;for(const e of s)l.add(t.fromLocalValue(e));return l;case"symbol":return Symbol(s);default:throw Error("Unsupported type: "+n)}}static fromLocalValueArray(e){return e.map((e=>t.fromLocalValue(e)))}static isLocalValueObject(t){if("object"!=typeof t||null===t)return!1;if(!t.hasOwnProperty(L))return!1;const e=t[L];return!!Object.values({...P,...A}).includes(e)&&("null"===e||"undefined"===e||t.hasOwnProperty(W))}};((t,e)=>{for(var n in e)m(t,n,{get:e[n],enumerable:!0})})({},{err:()=>re,map:()=>oe,ok:()=>ie,unwrap:()=>le,unwrapErr:()=>ce});var ie=t=>({isOk:!0,isErr:!1,value:t}),re=t=>({isOk:!1,isErr:!0,value:t});function oe(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>ie(t))):ie(n)}if(t.isErr)return re(t.value);throw"should never get here"}var le=t=>{if(t.isOk)return t.value;throw t.value},ce=t=>{if(t.isErr)return t.value;throw t.value},ue=t=>{const e=Oe(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&ae(e,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!he(t,ve(t),!1).length)}));let n=0;for(n=0;n<e.length;n++){const t=e[n];1===t.nodeType&&Oe(t,"childNodes").length&&ue(t)}},fe=t=>{const e=[];for(let n=0;n<t.length;n++){const s=t[n]["s-nr"]||void 0;s&&s.isConnected&&e.push(s)}return e};function ae(t,e,n){let s,i=0,r=[];for(;i<t.length;i++){if(s=t[i],s["s-sr"]&&(!e||s["s-hn"]===e)&&(void 0===n||ve(s)===n)&&(r.push(s),void 0!==n))return r;r=[...r,...ae(s.childNodes,e,n)]}return r}var he=(t,e,n=!0)=>{const s=[];(n&&t["s-sr"]||!t["s-sr"])&&s.push(t);let i=t;for(;i=i.nextSibling;)ve(i)!==e||!n&&i["s-sr"]||s.push(i);return s},de=(t,e)=>1===t.nodeType?null===t.getAttribute("slot")&&""===e||t.getAttribute("slot")===e:t["s-sn"]===e||""===e,pe=(t,e,n,s)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const i=document.createTextNode("");if(i["s-nr"]=t,!e["s-cr"]||!e["s-cr"].parentNode)return;const r=e["s-cr"].parentNode,o=Oe(r,"appendChild");if(void 0!==s){i["s-oo"]=s;const t=Oe(r,"childNodes"),e=[i];t.forEach((t=>{t["s-nr"]&&e.push(t)})),e.sort(((t,e)=>!t["s-oo"]||t["s-oo"]<(e["s-oo"]||0)?-1:!e["s-oo"]||e["s-oo"]<t["s-oo"]?1:0)),e.forEach((t=>o.call(r,t)))}else o.call(r,i);t["s-ol"]=i,t["s-sh"]=e["s-hn"]},ve=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function be(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const e=e=>function(t){const n=[],s=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const i=this["s-cr"].parentElement;return(i.__childNodes?i.childNodes:fe(i.childNodes)).forEach((t=>{s===ve(t)&&n.push(t)})),e?n.filter((t=>1===t.nodeType)):n}.bind(t);t.assignedElements=e(!0),t.assignedNodes=e(!1)}var $e=t=>{if(t.__cloneNode)return;const e=t.__cloneNode=t.cloneNode;t.cloneNode=function(t){const n=e.call(this,!1);if(t){let t,e,s=0;const i=["s-id","s-cr","s-lr","s-rc","s-sc","s-p","s-cn","s-sr","s-sn","s-hn","s-ol","s-nr","s-si","s-rf","s-scs"],r=this.__childNodes||this.childNodes;for(;s<r.length;s++)t=r[s]["s-nr"],e=i.every((t=>!r[s][t])),t&&n.appendChild(t.cloneNode(!0)),e&&n.appendChild(r[s].cloneNode(!0))}return n}},me=t=>{class e extends Array{item(t){return this[t]}}ye("children",t),Object.defineProperty(t,"children",{get(){return this.childNodes.filter((t=>1===t.nodeType))}}),Object.defineProperty(t,"childElementCount",{get(){return this.children.length}}),ye("firstChild",t),Object.defineProperty(t,"firstChild",{get(){return this.childNodes[0]}}),ye("lastChild",t),Object.defineProperty(t,"lastChild",{get(){return this.childNodes[this.childNodes.length-1]}}),ye("childNodes",t),Object.defineProperty(t,"childNodes",{get(){const t=new e;return t.push(...fe(this.__childNodes)),t}})},ge=["children","nextElementSibling","previousElementSibling"],we=["childNodes","firstChild","lastChild","nextSibling","previousSibling","textContent","parentNode"];function ye(t,e){if(!globalThis.Node||!globalThis.Element)return;let n;ge.includes(t)?n=Object.getOwnPropertyDescriptor(Element.prototype,t):we.includes(t)&&(n=Object.getOwnPropertyDescriptor(Node.prototype,t)),n||(n=Object.getOwnPropertyDescriptor(e,t)),n&&Object.defineProperty(e,"__"+t,n)}function Oe(t,e){if("__"+e in t){const n=t["__"+e];return"function"!=typeof n?n:n.bind(t)}return"function"!=typeof t[e]?t[e]:t[e].bind(t)}var je=new WeakMap,Se=t=>"sc-"+t.p,ke=(t,e,...n)=>{"string"==typeof t&&(t=Bn(t));let s=null,i=null,r=null,o=!1,l=!1;const c=[],u=e=>{for(let n=0;n<e.length;n++)s=e[n],Array.isArray(s)?u(s):null!=s&&"boolean"!=typeof s&&((o="function"!=typeof t&&!ct(s))&&(s+=""),o&&l?c[c.length-1].v+=s:c.push(o?xe(null,s):s),l=o)};if(u(n),e){e.key&&(i=e.key),e.name&&(r=e.name);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,c,Me);const f=xe(t,null);return f.$=e,c.length>0&&(f.m=c),f.O=i,f.j=r,f},xe=(t,e)=>({u:0,S:t,v:e,k:null,m:null,$:null,O:null,j:null}),Ee={},Me={forEach:(t,e)=>t.map(Ne).forEach(e),map:(t,e)=>t.map(Ne).map(e).map(Ce)},Ne=t=>({vattrs:t.$,vchildren:t.m,vkey:t.O,vname:t.j,vtag:t.S,vtext:t.v}),Ce=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),ke(t.vtag,e,...t.vchildren||[])}const e=xe(t.vtag,t.vtext);return e.$=t.vattrs,e.m=t.vchildren,e.O=t.vkey,e.j=t.vname,e},Re=(t,e,n,s,i,r,o,l=[])=>{let c,u,f,a;if(1===r.nodeType){if(c=r.getAttribute(V),c&&(u=c.split("."),u[0]===o||"0"===u[0])){f=Ae({u:0,M:u[0],N:u[1],C:u[2],R:u[3],S:r.tagName.toLowerCase(),k:r,$:{class:r.className||""}}),e.push(f),r.removeAttribute(V),t.m||(t.m=[]);const s=f.k.getAttribute("s-sn");"string"==typeof s&&("slot-fb"===f.S&&Le(s,u[2],f,r,t,e,n,0,l),f.k["s-sn"]=s,f.k.removeAttribute("s-sn")),void 0!==f.R&&(t.m[f.R]=f),t=f}if(r.shadowRoot)for(a=r.shadowRoot.childNodes.length-1;a>=0;a--)Re(t,e,n,s,i,r.shadowRoot.childNodes[a],o,l);const h=r.__childNodes||r.childNodes;for(a=h.length-1;a>=0;a--)Re(t,e,n,s,i,h[a],o,l)}else if(8===r.nodeType)u=r.nodeValue.split("."),(u[1]===o||"0"===u[1])&&(c=u[0],f=Ae({M:u[1],N:u[2],C:u[3],R:u[4]||"0",k:r,$:null,m:null,O:null,j:null,S:null,v:null}),"t"===c?(f.k=Te(r,3),f.k&&3===f.k.nodeType&&(f.v=f.k.textContent,e.push(f),r.remove(),o===f.M&&(t.m||(t.m=[]),t.m[f.R]=f))):"c"===c?(f.k=Te(r,8),f.k&&8===f.k.nodeType&&(e.push(f),r.remove())):f.M===o&&("s"===c?Le(r["s-sn"]=u[5]||"",u[2],f,r,t,e,n,0,l):"r"===c&&(i["s-cr"]=r,r["s-cn"]=!0)));else if(t&&"style"===t.S){const e=xe(null,r.textContent);e.k=r,e.R="0",t.m=[e]}return t},Pe=(t,e)=>{if(1===t.nodeType){const n=t[U]||t.getAttribute(U);n&&e.set(n,t);let s=0;if(t.shadowRoot)for(;s<t.shadowRoot.childNodes.length;s++)Pe(t.shadowRoot.childNodes[s],e);const i=t.__childNodes||t.childNodes;for(s=0;s<i.length;s++)Pe(i[s],e)}else if(8===t.nodeType){const n=t.nodeValue.split(".");"o"===n[0]&&(e.set(n[1]+"."+n[2],t),t.nodeValue="",t["s-en"]=n[3])}},Ae=t=>({u:0,M:null,N:null,C:null,R:"0",k:null,$:null,m:null,O:null,j:null,S:null,v:null,...t});function Le(t,e,n,s,i,r,o,l,c){s["s-sr"]=!0,n.j=t||null,n.S="slot";const u=(null==i?void 0:i.k)?i.k["s-id"]||i.k.getAttribute("s-id"):"";{const r=n.k,o=u&&u!==n.M&&i.k.shadowRoot;We(c,e,t,s,o?u:n.M),be(s),o&&i.k.insertBefore(r,i.k.children[0])}r.push(n),o.push(n),i.m||(i.m=[]),i.m[n.R]=n}var We=(t,e,n,s,i)=>{var r,o;let l=s.nextSibling;if(t[e]=t[e]||[],l&&!(null==(r=l.nodeValue)?void 0:r.startsWith("s.")))do{!l||(l.getAttribute&&l.getAttribute("slot")||l["s-sn"])!==n&&(""!==n||l["s-sn"]||l.getAttribute&&l.getAttribute("slot")||8!==l.nodeType&&3!==l.nodeType)||(l["s-sn"]=n,t[e].push({slot:s,node:l,hostId:i})),l=null==l?void 0:l.nextSibling}while(l&&!(null==(o=l.nodeValue)?void 0:o.startsWith("s.")))},Te=(t,e)=>{let n=t;do{n=n.nextSibling}while(n&&(n.nodeType!==e||!n.nodeValue));return n},ze=t=>{const e=(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};ze("::slotted"),ze(":host"),ze(":host-context");var Ie,_e,Fe=(t,e)=>"string"==typeof t&&t.startsWith(T)?t=function(t){return"string"==typeof t&&t.startsWith(T)?se.fromLocalValue(JSON.parse(atob(t.slice(11)))):t}(t):null==t||ct(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,De=t=>{var e;return null==(e=I(t))?void 0:e.$hostElement$},Be=(t,e)=>{const n=De(t);return{emit:t=>Ge(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},Ge=(t,e,n)=>{const s=Y.ce(e,n);return t.dispatchEvent(s),s},Ue=(t,e,n,s,i,r,o)=>{if(n===s)return;let l=F(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,i=Ze(n);let r=Ze(s);if((t["s-si"]||t["s-sc"])&&o){const n=t["s-sc"]||t["s-si"];r.push(n),i.forEach((t=>{t.startsWith(n)&&r.push(t)})),r=[...new Set(r)].filter((t=>t)),e.add(...r)}else e.remove(...i.filter((t=>t&&!r.includes(t)))),e.add(...r.filter((t=>t&&!i.includes(t))))}else if("style"===e){for(const e in n)s&&null!=s[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in s)n&&s[e]===n[e]||(e.includes("-")?t.style.setProperty(e,s[e]):t.style[e]=s[e])}else if("key"===e);else if("ref"===e)s&&s(t);else if(l||"o"!==e[0]||"n"!==e[1]){const o=ct(s);if((l||o&&null!==s)&&!i)try{if(t.tagName.includes("-"))t[e]!==s&&(t[e]=s);else{const i=null==s?"":s;"list"===e?l=!1:null!=n&&t[e]==i||("function"==typeof t.__lookupSetter__(e)?t[e]=i:t.setAttribute(e,i))}}catch(t){}let u=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(e=c,u=!0),null==s||!1===s?!1===s&&""!==t.getAttribute(e)||(u?t.removeAttributeNS(H,e):t.removeAttribute(e)):(!l||4&r||i)&&!o&&1===t.nodeType&&(s=!0===s?"":s,u?t.setAttributeNS(H,e,s):t.setAttribute(e,s))}else if(e="-"===e[2]?e.slice(3):F(q,c)?c.slice(2):c[2]+e.slice(3),n||s){const i=e.endsWith(He);e=e.replace(qe,""),n&&Y.rel(t,e,n,i),s&&Y.ael(t,e,s,i)}},Ve=/\s/,Ze=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(Ve):[]),He="Capture",qe=RegExp(He+"$"),Je=(t,e,n,s)=>{const i=11===e.k.nodeType&&e.k.host?e.k.host:e.k,r=t&&t.$||{},o=e.$||{};for(const t of Ye(Object.keys(r)))t in o||Ue(i,t,r[t],void 0,n,e.u,s);for(const t of Ye(Object.keys(o)))Ue(i,t,r[t],o[t],n,e.u,s)};function Ye(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var Ke=!1,Qe=!1,Xe=!1,tn=!1,en=(t,e,n)=>{var s;const i=e.m[n];let r,o,l,c=0;if(Ke||(Xe=!0,"slot"===i.S&&(i.u|=i.m?2:1)),null!==i.v)r=i.k=q.document.createTextNode(i.v);else if(1&i.u)r=i.k=q.document.createTextNode(""),Je(null,i,tn);else{if(tn||(tn="svg"===i.S),!q.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(r=i.k=q.document.createElementNS(tn?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!Ke&&2&i.u?"slot-fb":i.S),tn&&"foreignObject"===i.S&&(tn=!1),Je(null,i,tn),i.m){const e="template"===i.S?r.content:r;for(c=0;c<i.m.length;++c)o=en(t,i,c),o&&e.appendChild(o)}"svg"===i.S?tn=!1:"foreignObject"===r.tagName&&(tn=!0)}return r["s-hn"]=_e,3&i.u&&(r["s-sr"]=!0,r["s-cr"]=Ie,r["s-sn"]=i.j||"",r["s-rf"]=null==(s=i.$)?void 0:s.ref,be(r),l=t&&t.m&&t.m[n],l&&l.S===i.S&&t.k&&nn(t.k)),r},nn=t=>{Y.u|=1;const e=t.closest(_e.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),s=Array.from(t.__childNodes||t.childNodes);for(const t of n?s.reverse():s)null!=t["s-sh"]&&(dn(e,t,null!=n?n:null),t["s-sh"]=void 0,Xe=!0)}Y.u&=-2},sn=(t,e)=>{Y.u|=1;const n=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let e=t;for(;e=e.nextSibling;)e&&e["s-sn"]===t["s-sn"]&&e["s-sh"]===_e&&n.push(e)}for(let t=n.length-1;t>=0;t--){const s=n[t];s["s-hn"]!==_e&&s["s-ol"]&&(dn(cn(s).parentNode,s,cn(s)),s["s-ol"].remove(),s["s-ol"]=void 0,s["s-sh"]=void 0,Xe=!0),e&&sn(s,e)}Y.u&=-2},rn=(t,e,n,s,i,r)=>{let o,l=t["s-cr"]&&t["s-cr"].parentNode||t;for("template"===n.S&&(l=l.content);i<=r;++i)s[i]&&(o=en(null,n,i),o&&(s[i].k=o,dn(l,o,cn(e))))},on=(t,e,n)=>{for(let s=e;s<=n;++s){const e=t[s];if(e){const t=e.k;hn(e),t&&(Qe=!0,t["s-ol"]?t["s-ol"].remove():sn(t,!0),t.remove())}}},ln=(t,e,n=!1)=>t.S===e.S&&("slot"===t.S?t.j===e.j:n?(n&&!t.O&&e.O&&(t.O=e.O),!0):t.O===e.O),cn=t=>t&&t["s-ol"]||t,un=(t,e,n=!1)=>{const s=e.k=t.k,i=t.m,r=e.m,o=e.S,l=e.v;let c;null===l?(tn="svg"===o||"foreignObject"!==o&&tn,"slot"!==o||Ke||t.j!==e.j&&(e.k["s-sn"]=e.j||"",nn(e.k.parentElement)),Je(t,e,tn,n),null!==i&&null!==r?((t,e,n,s,i=!1)=>{let r,o,l=0,c=0,u=0,f=0,a=e.length-1,h=e[0],d=e[a],p=s.length-1,v=s[0],b=s[p];const $="template"===n.S?t.content:t;for(;l<=a&&c<=p;)if(null==h)h=e[++l];else if(null==d)d=e[--a];else if(null==v)v=s[++c];else if(null==b)b=s[--p];else if(ln(h,v,i))un(h,v,i),h=e[++l],v=s[++c];else if(ln(d,b,i))un(d,b,i),d=e[--a],b=s[--p];else if(ln(h,b,i))"slot"!==h.S&&"slot"!==b.S||sn(h.k.parentNode,!1),un(h,b,i),dn($,h.k,d.k.nextSibling),h=e[++l],b=s[--p];else if(ln(d,v,i))"slot"!==h.S&&"slot"!==b.S||sn(d.k.parentNode,!1),un(d,v,i),dn($,d.k,h.k),d=e[--a],v=s[++c];else{for(u=-1,f=l;f<=a;++f)if(e[f]&&null!==e[f].O&&e[f].O===v.O){u=f;break}u>=0?(o=e[u],o.S!==v.S?r=en(e&&e[c],n,u):(un(o,v,i),e[u]=void 0,r=o.k),v=s[++c]):(r=en(e&&e[c],n,c),v=s[++c]),r&&dn(cn(h.k).parentNode,r,cn(h.k))}l>a?rn(t,null==s[p+1]?null:s[p+1].k,n,s,c,p):c>p&&on(e,l,a)})(s,i,e,r,n):null!==r?(null!==t.v&&(s.textContent=""),rn(s,null,e,r,0,r.length-1)):n||null===i?n&&null!==i&&null===r&&(e.m=i):on(i,0,i.length-1),tn&&"svg"===o&&(tn=!1)):(c=s["s-cr"])?c.parentNode.textContent=l:t.v!==l&&(s.data=l)},fn=[],an=t=>{let e,n,s;const i=t.__childNodes||t.childNodes;for(const t of i){if(t["s-sr"]&&(e=t["s-cr"])&&e.parentNode){n=e.parentNode.__childNodes||e.parentNode.childNodes;const i=t["s-sn"];for(s=n.length-1;s>=0;s--)if(e=n[s],!(e["s-cn"]||e["s-nr"]||e["s-hn"]===t["s-hn"]||e["s-sh"]&&e["s-sh"]===t["s-hn"]))if(de(e,i)){let n=fn.find((t=>t.P===e));Qe=!0,e["s-sn"]=e["s-sn"]||i,n?(n.P["s-sh"]=t["s-hn"],n.A=t):(e["s-sh"]=t["s-hn"],fn.push({A:t,P:e})),e["s-sr"]&&fn.map((t=>{de(t.P,e["s-sn"])&&(n=fn.find((t=>t.P===e)),n&&!t.A&&(t.A=n.A))}))}else fn.some((t=>t.P===e))||fn.push({P:e})}1===t.nodeType&&an(t)}},hn=t=>{t.$&&t.$.ref&&t.$.ref(null),t.m&&t.m.map(hn)},dn=(t,e,n,s)=>{if("string"==typeof e["s-sn"]){t.insertBefore(e,n);const{slotNode:i}=function(t,e){var n;if(!(e=e||(null==(n=t["s-ol"])?void 0:n.parentElement)))return{slotNode:null,slotName:""};const s=t["s-sn"]=ve(t)||"";return{slotNode:ae(Oe(e,"childNodes"),e.tagName,s)[0],slotName:s}}(e);return i&&!s&&function(t){t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1}))}(i),e}return t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n)},pn=(t,e)=>{if(e&&!t.L&&e["s-p"]){const n=e["s-p"].push(new Promise((s=>t.L=()=>{e["s-p"].splice(n-1,1),s()})))}},vn=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);pn(t,t.W);const n=()=>bn(t,e);if(!e)return lt(n);queueMicrotask((()=>{n()}))},bn=(t,e)=>{const n=t.$hostElement$,s=t.l;if(!s)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let i;return e?(t.T&&(t.T=!1,Sn(s,"connectedCallback",void 0,n)),t.u|=256,t.I&&(t.I.map((([t,e])=>Sn(s,t,e,n))),t.I=void 0),t._.length&&t._.forEach((t=>t(n))),i=Sn(s,"componentWillLoad",void 0,n)):i=Sn(s,"componentWillUpdate",void 0,n),i=$n(i,(()=>Sn(s,"componentWillRender",void 0,n))),$n(i,(()=>gn(t,s,e)))},$n=(t,e)=>mn(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),mn=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,gn=async(t,e,n)=>{var s;const i=t.$hostElement$,r=i["s-rc"];n&&(t=>{const e=t.i;((t,e)=>{var n,s,i;const r=Se(e),o=G.get(r);if(!q.document)return r;if(t=11===t.nodeType?t:q.document,o)if("string"==typeof o){let i,l=je.get(t=t.head||t);l||je.set(t,l=new Set);const c=t.querySelector(`[sty-id="${r}"]`);if(c)c.innerHTML=o;else if(!l.has(r)){i=q.document.createElement("style"),i.innerHTML=o;const c=null!=(n=Y.F)?n:ne(q.document);if(null!=c&&i.setAttribute("nonce",c),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(i,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(Q){const e=new(null!=(s=t.defaultView)?s:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(o),X?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=o+e.innerHTML:t.prepend(i)}else t.append(i);1&e.u&&t.insertBefore(i,null),4&e.u&&(i.innerHTML+=Z),l&&l.add(r)}}else{let e=je.get(t);if(e||je.set(t,e=new Set),!e.has(r)){const n=null!=(i=t.defaultView)?i:t.ownerDocument.defaultView;let s;if(o.constructor===n.CSSStyleSheet)s=o;else{s=new n.CSSStyleSheet;for(let t=0;t<o.cssRules.length;t++)s.insertRule(o.cssRules[t].cssText,t)}X?t.adoptedStyleSheets.push(s):t.adoptedStyleSheets=[...t.adoptedStyleSheets,s],e.add(r)}}})(t.$hostElement$.getRootNode(),e)})(t);wn(t,e,i,n),r&&(r.map((t=>t())),i["s-rc"]=void 0);{const e=null!=(s=i["s-p"])?s:[],n=()=>yn(t);0===e.length?n():(Promise.all(e).then(n),t.u|=4,e.length=0)}},wn=(t,e,n,s)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{var s,i,r,o,l;const c=t.$hostElement$,u=t.i,f=t.D||xe(null,null),a=(t=>t&&t.S===Ee)(e)?e:ke(null,null,e);if(_e=c.tagName,u.B&&(a.$=a.$||{},u.B.forEach((([t,e])=>{a.$[e]=c[t]}))),n&&a.$)for(const t of Object.keys(a.$))c.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(a.$[t]=c[t]);if(a.S=null,a.u|=4,t.D=a,a.k=f.k=c,Ke=!1,Ie=c["s-cr"],Qe=!1,un(f,a,n),Y.u|=1,Xe){an(a.k);for(const t of fn){const e=t.P;if(!e["s-ol"]&&q.document){const t=q.document.createTextNode("");t["s-nr"]=e,dn(e.parentNode,e["s-ol"]=t,e,n)}}for(const t of fn){const e=t.P,l=t.A;if(1===e.nodeType&&n&&(e["s-ih"]=null!=(s=e.hidden)&&s),l){const t=l.parentNode;let s=l.nextSibling;if(s&&1===s.nodeType){let n=null==(i=e["s-ol"])?void 0:i.previousSibling;for(;n;){let i=null!=(r=n["s-nr"])?r:null;if(i&&i["s-sn"]===e["s-sn"]&&t===(i.__parentNode||i.parentNode)){for(i=i.nextSibling;i===e||(null==i?void 0:i["s-sr"]);)i=null==i?void 0:i.nextSibling;if(!i||!i["s-nr"]){s=i;break}}n=n.previousSibling}}if((!s&&t!==(e.__parentNode||e.parentNode)||(e.__nextSibling||e.nextSibling)!==s)&&e!==s){if(dn(t,e,s,n),8===e.nodeType&&e.nodeValue.startsWith("s-nt-")){const t=q.document.createTextNode(e.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=e["s-hn"],t["s-sn"]=e["s-sn"],t["s-sh"]=e["s-sh"],t["s-sr"]=e["s-sr"],t["s-ol"]=e["s-ol"],t["s-ol"]["s-nr"]=t,dn(e.parentNode,t,e,n),e.parentNode.removeChild(e)}1===e.nodeType&&"SLOT-FB"!==e.tagName&&(e.hidden=null!=(o=e["s-ih"])&&o)}e&&"function"==typeof l["s-rf"]&&l["s-rf"](l)}else 1===e.nodeType&&(e.hidden=!0)}}if(Qe&&ue(a.k),Y.u&=-2,fn.length=0,!Ke&&!(1&u.u)&&c["s-cr"]){const t=a.k.__childNodes||a.k.childNodes;for(const e of t)if(e["s-hn"]!==_e&&!e["s-sh"])if(n&&null==e["s-ih"]&&(e["s-ih"]=null!=(l=e.hidden)&&l),1===e.nodeType)e.hidden=!0;else if(3===e.nodeType&&e.nodeValue.trim()){const t=q.document.createComment("s-nt-"+e.nodeValue);t["s-sn"]=e["s-sn"],dn(e.parentNode,t,e,n),e.parentNode.removeChild(e)}}Ie=void 0})(t,e,s)}catch(e){D(e,t.$hostElement$)}return null},yn=t=>{const e=t.$hostElement$,n=t.l,s=t.W;Sn(n,"componentDidRender",void 0,e),64&t.u?Sn(n,"componentDidUpdate",void 0,e):(t.u|=64,kn(e),Sn(n,"componentDidLoad",void 0,e),t.G(e),s||jn()),t.U(e),t.L&&(t.L(),t.L=void 0),512&t.u&&ot((()=>vn(t,!1))),t.u&=-517},On=t=>{var e;{const n=I(t),s=null==(e=null==n?void 0:n.$hostElement$)?void 0:e.isConnected;return s&&2==(18&n.u)&&vn(n,!1),s}},jn=()=>{var t;ot((()=>Ge(q,"appload",{detail:{namespace:"postnord-web-components"}}))),(null==(t=Y.V)?void 0:t.size)&&Y.V.clear()},Sn=(t,e,n,s)=>{if(t&&t[e])try{return t[e](n)}catch(t){D(t,s)}},kn=t=>t.classList.add("hydrated"),xn=(t,e,n,s)=>{const i=I(t);if(!i)return;if(!i)throw Error(`Couldn't find host element for "${s.p}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=i.$hostElement$,o=i.o.get(e),l=i.u,c=i.l;if(n=Fe(n,s.t[e][0]),!(8&l&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n))){if(i.o.set(e,n),s.Z){const t=s.Z[e];t&&t.map((t=>{try{const[[s,r]]=Object.entries(t);(128&l||1&r)&&(c?c[s](n,o,e):i._.push((()=>{i.l[s](n,o,e)})))}catch(t){D(t,r)}}))}if(2==(18&l)){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(n,o,e))return;vn(i,!1)}}},En=(t,e,n)=>{var s,i;const r=t.prototype;{t.watchers&&!e.Z&&(e.Z=t.watchers),t.deserializers&&!e.H&&(e.H=t.deserializers),t.serializers&&!e.q&&(e.q=t.serializers);const o=Object.entries(null!=(s=e.t)?s:{});if(o.map((([t,[s]])=>{if(31&s||2&n&&32&s){const{get:i,set:o}=Object.getOwnPropertyDescriptor(r,t)||{};i&&(e.t[t][0]|=2048),o&&(e.t[t][0]|=4096),(1&n||!i)&&Object.defineProperty(r,t,{get(){{if(!(2048&e.t[t][0]))return((t,e)=>I(this).o.get(e))(0,t);const n=I(this),s=n?n.l:r;if(!s)return;return s[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(r,t,{set(i){const r=I(this);if(r){if(o)return void 0===(32&s?this[t]:r.$hostElement$[t])&&r.o.get(t)&&(i=r.o.get(t)),o.call(this,Fe(i,s)),void xn(this,t,i=32&s?this[t]:r.$hostElement$[t],e);{if(!(1&n&&4096&e.t[t][0]))return xn(this,t,i,e),void(1&n&&!r.l&&r._.push((()=>{4096&e.t[t][0]&&r.l[t]!==r.o.get(t)&&(r.l[t]=i)})));const o=()=>{const n=r.l[t];!r.o.get(t)&&n&&r.o.set(t,n),r.l[t]=Fe(i,s),xn(this,t,r.l[t],e)};r.l?o():r._.push((()=>{o()}))}}}})}else 1&n&&64&s&&Object.defineProperty(r,t,{value(...e){var n;const s=I(this);return null==(n=null==s?void 0:s.J)?void 0:n.then((()=>{var n;return null==(n=s.l)?void 0:n[t](...e)}))}})})),1&n){const n=new Map;r.attributeChangedCallback=function(t,s,i){Y.jmp((()=>{var l;const c=n.get(t),u=I(this);if(this.hasOwnProperty(c)&&(i=this[c],delete this[c]),r.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==i)return;if(null==c){const n=null==u?void 0:u.u;if(u&&n&&!(8&n)&&i!==s){const r=u.l,o=null==(l=e.Z)?void 0:l[t];null==o||o.forEach((e=>{const[[o,l]]=Object.entries(e);null!=r[o]&&(128&n||1&l)&&r[o].call(r,i,s,t)}))}return}const f=o.find((([t])=>t===c));f&&4&f[1][0]&&(i=null!==i&&"false"!==i);const a=Object.getOwnPropertyDescriptor(r,c);i==this[c]||a.get&&!a.set||(this[c]=i)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=e.Z)?i:{}),...o.filter((([t,e])=>31&e[0])).map((([t,s])=>{var i;const r=s[1]||t;return n.set(r,t),512&s[0]&&(null==(i=e.B)||i.push([t,r])),r}))]))}}return t},Mn=(t,e)=>{Sn(t,"connectedCallback",void 0,e)},Nn=t=>{if(!(1&Y.u)){const e=I(t);if(!e)return;const n=e.i,s=()=>{};if(1&e.u)Ln(t,e,n.Y),(null==e?void 0:e.l)?Mn(e.l,t):(null==e?void 0:e.K)&&e.K.then((()=>Mn(e.l,t)));else{let s;e.u|=1,s=t.getAttribute(U),s&&((t,e,n,s)=>{var i,r,o,l;const c=t.shadowRoot,u=[],f=[],a=xe(e,null);a.k=t,!q.document||Y.V&&Y.V.size||Pe(q.document.body,Y.V=new Map),t[U]=n,t.removeAttribute(U),s.D=Re(a,u,[],null,t,t,n,f);let h=0;const d=u.length;let p;for(;h<d;h++){p=u[h];const n=p.M+"."+p.N,s=Y.V.get(n),r=p.k;if(c){if((null==(i=p.S)?void 0:(""+i).includes("-"))&&"slot-fb"!==p.S&&!p.k.shadowRoot){const e=I(p.k);if(e){const n=Se(e.i),s=q.document.querySelector(`style[sty-id="${n}"]`);s&&t.shadowRoot.append(s.cloneNode(!0))}}}else r["s-hn"]=Bn(e).toUpperCase(),"slot"===p.S&&(r["s-cr"]=t["s-cr"]);"slot"===p.S&&(p.j=p.k["s-sn"]||p.k.name||null,p.m?(p.u|=2,p.k.childNodes.length||p.m.forEach((t=>{p.k.appendChild(t.k)}))):p.u|=1),s&&s.isConnected&&(s.parentElement.shadowRoot&&""===s["s-en"]&&s.parentNode.insertBefore(r,s.nextSibling),s.parentNode.removeChild(s),c||(r["s-oo"]=parseInt(p.N))),s&&!s["s-id"]&&Y.V.delete(n)}const v=[],b=f.length;let $,m,g,w,y=0,O=0;for(;y<b;y++)if($=f[y],$&&$.length)for(g=$.length,m=0;m<g;m++){if(w=$[m],v[w.hostId]||(v[w.hostId]=Y.V.get(w.hostId)),!v[w.hostId])continue;const t=v[w.hostId];t.shadowRoot&&w.node.parentElement!==t&&t.insertBefore(w.node,null==(o=null==(r=$[m-1])?void 0:r.node)?void 0:o.nextSibling),t.shadowRoot&&c||(w.slot["s-cr"]||(w.slot["s-cr"]=t["s-cr"],w.slot["s-cr"]=!w.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),pe(w.node,w.slot,0,w.node["s-oo"]||O),(null==(l=w.node.parentElement)?void 0:l.shadowRoot)&&w.node.getAttribute&&w.node.getAttribute("slot")&&w.node.removeAttribute("slot")),O=(w.node["s-oo"]||O)+1}s.$hostElement$=t})(t,n.p,s,e),s||12&n.u&&Cn(t);{let n=t;for(;n=n.parentNode||n.host;)if(1===n.nodeType&&n.hasAttribute("s-id")&&n["s-p"]||n["s-p"]){pn(e,e.W=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&e in t&&t[e]!==Object.prototype[e]){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let s;if(!(32&e.u)){if(e.u|=32,n.X){const i=((t,e)=>{const n=t.p.replace(/-/g,"_"),s=t.X;if(!s)return;const i=B.get(s);return i?i[n]:import(`./${s}.entry.js`).then((t=>(B.set(s,t),t[n])),(t=>{D(t,e.$hostElement$)}))
|
|
6
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(i&&"then"in i){const t=()=>{};s=await i,t()}else s=i;if(!s)throw Error(`Constructor for "${n.p}#${e.tt}" was not found`);s.isProxied||(n.Z=s.watchers,n.q=s.serializers,n.H=s.deserializers,En(s,n,2),s.isProxied=!0);const r=()=>{};e.u|=8;try{new s(e)}catch(e){D(e,t)}e.u&=-9,e.u|=128,r(),4&n.u?e.T=!0:Mn(e.l,t)}else s=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(s&&s.style){let t;"string"==typeof s.style&&(t=s.style);const e=Se(n);if(!G.has(e)){const s=()=>{};((t,e,n)=>{let s=G.get(t);Q&&n?(s=s||new CSSStyleSheet,"string"==typeof s?s=e:s.replaceSync(e)):s=e,G.set(t,s)})(e,t,!!(1&n.u)),s()}}}const i=e.W,r=()=>vn(e,!0);i&&i["s-rc"]?i["s-rc"].push(r):r()})(t,e,n)}s()}},Cn=t=>{if(!q.document)return;const e=t["s-cr"]=q.document.createComment("");e["s-cn"]=!0,dn(t,e,t.firstChild)},Rn=(t,e)=>{Sn(t,"disconnectedCallback",void 0,e||t)},Pn=(t,e={})=>{var n;if(!q.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const s=[],i=e.exclude||[],r=q.customElements,o=q.document.head,l=o.querySelector("meta[charset]"),c=q.document.createElement("style"),u=[];let f,a=!0;Object.assign(Y,e),Y.h=new URL(e.resourcesUrl||"./",q.document.baseURI).href,Y.u|=2;let h=!1;if(t.map((t=>{t[1].map((n=>{var o,l,c;const d={u:n[0],p:n[1],t:n[2],Y:n[3]};4&d.u&&(h=!0),d.t=n[2],d.Y=n[3],d.B=[],d.Z=null!=(o=n[4])?o:{},d.q=null!=(l=n[5])?l:{},d.H=null!=(c=n[6])?c:{};const p=e.transformTagName?e.transformTagName(d.p):Bn(d.p),v=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){super(t),((t,e)=>{const n={u:0,$hostElement$:t,i:e,o:new Map,et:new Map};n.J=new Promise((t=>n.U=t)),n.K=new Promise((t=>n.G=t)),t["s-p"]=[],t["s-rc"]=[],n._=[];const s=n;t.__stencil__getHostRef=()=>s})(t=this,d)}connectedCallback(){const t=I(this);t&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,Ln(this,t,d.Y)),f&&(clearTimeout(f),f=null),a?u.push(this):Y.jmp((()=>Nn(this))))}disconnectedCallback(){Y.jmp((()=>(async t=>{if(!(1&Y.u)){const e=I(t);(null==e?void 0:e.nt)&&(e.nt.map((t=>t())),e.nt=void 0),(null==e?void 0:e.l)?Rn(e.l,t):(null==e?void 0:e.K)&&e.K.then((()=>Rn(e.l,t)))}je.has(t)&&je.delete(t),t.shadowRoot&&je.has(t.shadowRoot)&&je.delete(t.shadowRoot)})(this))),Y.raf((()=>{var t;const e=I(this);if(!e)return;const n=u.findIndex((t=>t===this));n>-1&&u.splice(n,1),(null==(t=null==e?void 0:e.D)?void 0:t.k)instanceof Node&&!e.D.k.isConnected&&delete e.D.k}))}componentOnReady(){var t;return null==(t=I(this))?void 0:t.K}};!(1&d.u)&&256&d.u?(me(v.prototype),$e(v.prototype)):$e(v.prototype),d.X=t[0],i.includes(p)||r.get(p)||(s.push(p),r.define(p,En(v,d,1)))}))})),s.length>0&&(h&&(c.textContent+=Z),c.textContent+=s.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",c.innerHTML.length)){c.setAttribute("data-styles","");const t=null!=(n=Y.F)?n:ne(q.document);null!=t&&c.setAttribute("nonce",t),o.insertBefore(c,l?l.nextSibling:o.firstChild)}a=!1,u.length?u.map((t=>t.connectedCallback())):Y.jmp((()=>f=setTimeout(jn,30)))},An=(t,e)=>e,Ln=(t,e,n)=>{n&&q.document&&n.map((([n,s,i])=>{const r=Tn(q.document,t,n),o=Wn(e,i),l=zn(n);Y.ael(r,s,o,l),(e.nt=e.nt||[]).push((()=>Y.rel(r,s,o,l)))}))},Wn=(t,e)=>n=>{var s;try{256&t.u?null==(s=t.l)||s[e](n):(t.I=t.I||[]).push([e,n])}catch(e){D(e,t.$hostElement$)}},Tn=(t,e,n)=>8&n?q:e,zn=t=>({passive:!!(1&t),capture:!!(2&t)}),In=class{};function _n(...t){return t.reduceRight(((t,e)=>e(t)),In)}var Fn=t=>Y.F=t,Dn=void 0;function Bn(t){return Dn?Dn(t):t}function Gn(t){Dn&&console.warn("\n A tagTransformer has already been set. \n Overwriting it may lead to error and unexpected results if your components have already been defined.\n "),Dn=t}export{An as F,J as H,_n as M,Ee as a,Pn as b,Be as c,Gn as d,On as f,De as g,ke as h,K as p,_ as r,Fn as s,Bn as t}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* By PostNord.
|
|
4
|
-
*/
|
|
5
|
-
import{t as e,r as t,g as n,f as l,h as s,a as o}from"./p-DWsprozV.js";import{a as c}from"./p-B88w-Zxn.js";import{c as r}from"./p-DrYFvs2M.js";import{uuidv4 as i}from"./index.esm.js";const a=class{constructor(e){t(this,e)}id=`pn-select-${i()}`;idHelpertext=`${this.id}-text`;select;mo;get hostElement(){return n(this)}label;helpertext;selectId=this.id;icon;name;form;autocomplete;required=!1;disabled=!1;invalid=!1;error;componentDidLoad(){this.mo&&this.mo.disconnect(),this.mo=new MutationObserver((()=>l(this.hostElement))),this.mo.observe(this.hostElement,{childList:!0,subtree:!0})}hasError(){return this.invalid||!!this.error}hasMessage(){return!!this.helpertext||!!this.error}render(){return s(o,{key:"bace0ffbe4d9bb8bfe73ed8d55a9d95cc5d8fe35"},s("div",{key:"8d6c5e7c9271c0f9a9350c4c6daa31bf21e6bc9a",class:"pn-select","data-error":this.hasError()},this.label&&s("label",{key:"ce8ef956e612931988c880bc852675cf2e8a1359",htmlFor:this.selectId,class:"pn-select-label"},s("span",{key:"512d5e9a84249de9bd673a612e272497e5555121"},this.label)),s("div",{key:"b124744c213b35fb95b3acdcf148c2956125273b",class:"pn-select-input"},this.icon&&s("pn-icon",{key:"2eb0536a37b49f6ff54cf469f435d2fc0f35585a",class:"pn-select-icon",icon:this.icon,"data-custom":!0,"aria-hidden":"true"}),this.hasError()&&s("pn-icon",{key:"8ed4eb8ea34b1e235da8b674c9e0398dc76ce112",class:"pn-select-icon",icon:c,color:"warning","data-error":!0,"aria-hidden":"true"}),s("select",{key:"1f1c8e999880212f089281ecf0758ec358221856",id:this.selectId,class:"pn-select-element",name:this.name,form:this.form,autocomplete:this.autocomplete,"aria-describedby":this.hasMessage()&&this.idHelpertext,"aria-invalid":this.hasError().toString(),disabled:this.disabled,"data-placeholder":""===this.select?.value,ref:e=>this.select=e},s("slot",{key:"d13553a20c6117e102da282ec5b8a4112180a958"})),s("pn-icon",{key:"c44848a4a579f536b3b6cc05eef0a9823b5b82af",class:"pn-select-icon",icon:r,color:"blue700","data-default":!0,"aria-hidden":"true"})),this.hasMessage()&&s("p",{key:"841cd7f201d4e241da35501eae265dd440028472",id:this.idHelpertext,class:"pn-select-helper",role:this.error?"alert":null},s("span",{key:"307f5c9193f94cdf172f9d0a4bea34f96c8051e2"},this.error||this.helpertext))))}};a.style=`${e("pn-select")}{display:inline-block}${e("pn-select")} .pn-select-label{cursor:pointer;display:flex;justify-content:space-between;align-items:flex-end;font-weight:400;color:#2d2013;margin:0 0 0.25em 0;gap:0.5em;-webkit-tap-highlight-color:transparent;transition-property:color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-select")} .pn-select-label{transition-duration:0s;transition-delay:0s}}${e("pn-select")} .pn-select-label>span{font-size:0.875em}${e("pn-select")} .pn-select-input{position:relative}${e("pn-select")} .pn-select-icon{pointer-events:none;position:absolute;top:50%;transform:translateY(-50%);width:1.5em;height:1.5em;border-radius:50%;background-color:transparent}${e("pn-select")} .pn-select-icon[data-default]{right:0.75em}${e("pn-select")} .pn-select-icon[data-custom]{left:0.75em}${e("pn-select")} .pn-select-icon[data-custom]~.pn-select-element{padding-left:3em}${e("pn-select")} .pn-select-icon[data-error]{right:3em}${e("pn-select")} .pn-select-icon[data-error]~.pn-select-element{padding-right:5em}${e("pn-select")} .pn-select-icon>.pn-icon-svg{transition-property:transform;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-select")} .pn-select-icon>.pn-icon-svg{transition-duration:0s;transition-delay:0s}}${e("pn-select")} .pn-select-element{cursor:pointer;color:#2d2013;background-color:#ffffff;border:0.0625em solid #969087;border-radius:0.5em;padding:0.75em;font-family:inherit;font-size:1em;font-weight:500;line-height:1.5em;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}${e("pn-select")} .pn-select-element:-webkit-autofill,${e("pn-select")} .pn-select-element:-webkit-autofill:hover,${e("pn-select")} .pn-select-element:-webkit-autofill:focus,${e("pn-select")} .pn-select-element:-webkit-autofill:active{-webkit-box-shadow:0 0 0 10em #e0f8ff inset;-webkit-text-fill-color:#2d2013}${e("pn-select")} .pn-select-element{outline:0.2rem solid transparent;outline-offset:0.2rem}${e("pn-select")} .pn-select-element:focus-visible{outline-color:#005d92;background-color:#ffffff;border-color:#005d92}${e("pn-select")} .pn-select-element{transition-property:outline-color, background-color, border-color, color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-select")} .pn-select-element{transition-duration:0s;transition-delay:0s}}${e("pn-select")} .pn-select-element::placeholder{color:#5e554a;font-weight:normal}${e("pn-select")} .pn-select-element:hover{border-color:#005d92}${e("pn-select")} .pn-select-element:disabled{color:#5e554a;background-color:#f3f2f2;border-color:#f3f2f2}${e("pn-select")} .pn-select-element{width:100%;padding-right:3em;-webkit-appearance:none;-moz-appearance:none;appearance:none}${e("pn-select")} .pn-select-element:open+${e("pn-icon")} .pn-icon-svg{transform:rotate(180deg)}${e("pn-select")} .pn-select-element:disabled{color:#5e554a;background-color:#f3f2f2;border-color:#f3f2f2}${e("pn-select")} .pn-select-element[data-placeholder]{color:#5e554a;font-weight:normal}${e("pn-select")} .pn-select-element:hover{color:#2d2013;background-color:#effbff}${e("pn-select")} .pn-select-no-results{margin:0;padding:0.75em}${e("pn-select")} .pn-select-helper{color:#5e554a;font-size:0.875em;font-weight:400;margin:0.25em 0 0 0;display:flex;flex-direction:column;gap:0.25em}${e("pn-select")} .pn-select-helper[role=alert]{color:#a70707}${e("pn-select")} .pn-select[data-error]>.pn-select-label{color:#a70707}${e("pn-select")} .pn-select[data-error]>.pn-select-input>.pn-select-element{border-color:#a70707}${e("pn-select")} .pn-select[data-error]>.pn-select-input>.pn-select-element:hover{border-color:#500715}${e("pn-select")} .pn-select[data-error]>.pn-select-input>.pn-select-element:focus-visible{background-color:#ffffff;border-color:#a70707;outline-color:#a70707}${e("pn-select")} .pn-select[data-error]>.pn-select-input>.pn-select-element:hover{background-color:#fdefee}`;export{a as pn_select}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* By PostNord.
|
|
4
|
-
*/
|
|
5
|
-
import{t as e,r as t,c as n,g as i,h as r,a as s}from"./p-DWsprozV.js";import{uuidv4 as o,awaitTopbar as a,en as c}from"./index.esm.js";const u={DECREASE:{en:"Decrease",sv:"Minska",da:"Reducere",fi:"Vähentää",no:"Redusere"},INCREASE:{en:"Increase",sv:"Öka",da:"Øge",fi:"Lisääntyä",no:"Øke"},MAX_VALUE_MESSAGE:{en:"Maximum value is ",sv:"Högsta värde är ",da:"Højeste værdi er",fi:"Korkein arvo on",no:"Høyeste verdi er"},MIN_VALUE_MESSAGE:{en:"Minimum value is ",sv:"Lägsta värde är ",da:"Laveste værdi er ",fi:"Pienin arvo on ",no:"Laveste verdi er "}},p=class{constructor(e){t(this,e),this.counterInput=n(this,"counterInput")}id=`pn-counter-${o()}`;idLabel=`${this.id}-label`;idText=`${this.id}-text`;idAmount=`${this.id}-count`;counterElement;get hostElement(){return i(this)}clearAriaTimer;displaySrValue=!1;showMinMaxMessage=!1;lastDispatchedValue;interactType;label;helpertext;value=0;counterid=this.id;language=null;labelDecrease;labelIncrease;minMessage;maxMessage;name;min;max;step=1;list;required=!1;readonly=!1;disabled=!1;counterInput;watchValue(){this.showSrContent(),this.showMinMaxMessage=!1,this.hasMin()&&this.value<this.min&&(this.setMin(),this.showMinMaxMessage=!0),this.hasMax()&&this.value>this.max&&(this.setMax(),this.showMinMaxMessage=!0),this.lastDispatchedValue!==this.value&&this.counterInput.emit({value:this.value,input:"input"===this.interactType,decrease:"decrease"===this.interactType,increase:"increase"===this.interactType}),this.lastDispatchedValue=this.value,this.handleInputLength()}handleId(){this.idLabel=`${this.counterid}-label`,this.idText=`${this.counterid}-text`,this.idAmount=`${this.counterid}-count`}async componentWillLoad(){this.handleId(),this.language||await a(this.hostElement)}componentDidLoad(){this.counterElement=this.hostElement.querySelector(".pn-counter-input"),this.handleInputLength()}setVal(e){const{valueAsNumber:t}=e.target;isNaN(t)||(this.interactType="input",this.value=t)}setMin(){this.hasMin()&&(this.value=this.min)}setMax(){this.hasMax()&&(this.value=this.max)}hasMin(){return"number"==typeof this.min}hasMax(){return"number"==typeof this.max}decreaseAmount(){this.hasMin()&&this.value<=this.min&&(this.showMinMaxMessage=!0),this.interactType="decrease",this.value=this.value-this.step}increaseAmount(){this.hasMax()&&this.value>=this.max&&(this.showMinMaxMessage=!0),this.interactType="increase",this.value=this.value+this.step}keyBoardInput(e){e.stopImmediatePropagation(),/^(Home|End)$/.test(e.key)&&(e.preventDefault(),this.interactType="input","Home"===e.key&&this.setMin(),"End"===e.key&&this.setMax())}showSrContent(){this.clearAriaTimer&&clearTimeout(this.clearAriaTimer),this.displaySrValue=!0,this.clearAriaTimer=setTimeout((()=>{this.displaySrValue=!1}),4e3)}toggleMinMaxMessage(){const e=this.value===this.max,t=this.translate((e?"MAX":"MIN")+"_VALUE_MESSAGE")+`${e?this.max:this.min}`.toString();return e?this.maxMessage||t:this.minMessage||t}getTextMessage(e=!1){return this.showMinMaxMessage?this.toggleMinMaxMessage():e?this.value.toString():this.helpertext}describedbyIds(){const e=[];return this.helpertext&&e.push(this.idText),this.displaySrValue&&e.push(this.idAmount),0===e.length?null:e.join(" ")}translate(e){return u?.[e]?.[this.language||c]}noButtons(){return this.disabled||this.readonly}handleInputLength(){const e=this.max?this.max.toString():this.value.toString();this.counterElement.style.setProperty("--pn-counter-ch",e.length>3?e.length-3+"ch":"0ch")}render(){return r(s,{key:"4ebc9597343d24473f745ae6f847a6b48a8f6af0"},r("div",{key:"bed20d505ebe5490787413a5d1573b4fe2bbc6ed",class:"pn-counter",role:"group","aria-labelledby":this.idLabel,"aria-describedby":this.describedbyIds()},r("label",{key:"12dac33ecc76369b7777dcc189c79555b5882e13",htmlFor:this.counterid,class:"pn-counter-label",id:this.idLabel},r("span",{key:"5f1448379b2592a92f928beffa0bd8861cc32726"},this.label)),r("div",{key:"bf75b3d6dfb3fc2a9dd79c5255dd6cacaeba7670",class:"pn-counter-items","data-hidebuttons":this.noButtons()},r("pn-button",{key:"a3559366cacdf27bf5fb7572a55c51c3f3fa14cf","data-decrease":!0,appearance:"light",variant:"outlined","no-tab":this.noButtons(),icon:'<svg class="pn-icon-svg" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path fill="#000" fill-rule="evenodd" d="M2 12a1 1 0 0 1 1-1h18a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1" clip-rule="evenodd"/></svg>',iconOnly:!0,arialabel:this.labelDecrease||this.translate("DECREASE"),onClick:()=>this.decreaseAmount()}),r("input",{key:"bd0d56f4ea78128ea8259966edf6c345c45e06a0",id:this.counterid,class:"pn-counter-input",type:"number",min:this.min,max:this.max,step:this.step,value:this.value,name:this.name,required:this.required,readonly:this.readonly,disabled:this.disabled,"aria-describedby":this.describedbyIds(),onInput:e=>this.setVal(e),onKeyDown:e=>this.keyBoardInput(e)}),r("pn-button",{key:"770b62d7b3ff6c27ce7e4c0349e49236f65be054","data-increase":!0,appearance:"light",variant:"outlined","no-tab":this.noButtons(),icon:'<svg class="pn-icon-svg" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path fill="#000" fill-rule="evenodd" d="M12 2a1 1 0 0 1 1 1v8h8a1 1 0 1 1 0 2h-8v8a1 1 0 1 1-2 0v-8H3a1 1 0 1 1 0-2h8V3a1 1 0 0 1 1-1" clip-rule="evenodd"/></svg>',iconOnly:!0,arialabel:this.labelIncrease||this.translate("INCREASE"),onClick:()=>this.increaseAmount()})),!!this.getTextMessage()&&r("p",{key:"7a0f9cc0838545dcf7ae1b20798e0eeabbec19b9",id:this.idText,class:"pn-counter-helpertext"},r("span",{key:"343fa6cef1e44da4ceb69f3f8e650a210b0aa76e"},this.getTextMessage())),r("p",{key:"defe5fda110e1079b11c4b58bbc9cec1e326f163",id:this.idAmount,class:"pn-counter-sr-only","aria-live":"assertive"},this.displaySrValue?this.getTextMessage(!0):"")))}static get watchers(){return{value:[{watchValue:0}],counterid:[{handleId:0}]}}};p.style=`${e("pn-counter")}{display:inline-block}${e("pn-counter")} .pn-counter{display:inline-flex;flex-direction:column}${e("pn-counter")} .pn-counter-label{cursor:pointer;display:flex;justify-content:space-between;align-items:flex-end;font-weight:400;color:#2d2013;margin:0 0 0.25em 0;gap:0.5em;-webkit-tap-highlight-color:transparent;transition-property:color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-counter")} .pn-counter-label{transition-duration:0s;transition-delay:0s}}${e("pn-counter")} .pn-counter-label>span{font-size:0.875em}${e("pn-counter")} .pn-counter-input{--pn-counter-ch:0ch;color:#2d2013;background-color:#ffffff;border:0.0625em solid #969087;border-radius:0.5em;padding:0.75em;font-family:inherit;font-size:1em;font-weight:500;line-height:1.5em;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}${e("pn-counter")} .pn-counter-input:-webkit-autofill,${e("pn-counter")} .pn-counter-input:-webkit-autofill:hover,${e("pn-counter")} .pn-counter-input:-webkit-autofill:focus,${e("pn-counter")} .pn-counter-input:-webkit-autofill:active{-webkit-box-shadow:0 0 0 10em #e0f8ff inset;-webkit-text-fill-color:#2d2013}${e("pn-counter")} .pn-counter-input{outline:0.2rem solid transparent;outline-offset:0.2rem}${e("pn-counter")} .pn-counter-input:focus-visible{outline-color:#005d92;background-color:#ffffff;border-color:#005d92}${e("pn-counter")} .pn-counter-input{transition-property:outline-color, background-color, border-color, color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-counter")} .pn-counter-input{transition-duration:0s;transition-delay:0s}}${e("pn-counter")} .pn-counter-input::placeholder{color:#5e554a;font-weight:normal}${e("pn-counter")} .pn-counter-input:hover{border-color:#005d92}${e("pn-counter")} .pn-counter-input:disabled{color:#5e554a;background-color:#f3f2f2;border-color:#f3f2f2}${e("pn-counter")} .pn-counter-input{text-align:center;width:100%;max-width:calc(3.5em + var(--pn-counter-ch));outline:0.2rem solid transparent;outline-offset:0.2rem}${e("pn-counter")} .pn-counter-input:focus-visible{outline-color:#005d92}${e("pn-counter")} .pn-counter-input:read-only{border-color:#ffffff}${e("pn-counter")} .pn-counter-input:disabled{color:#5e554a;background-color:#f3f2f2;border-color:#f3f2f2}${e("pn-counter")} .pn-counter-input::-webkit-inner-spin-button,${e("pn-counter")} .pn-counter-input::-webkit-outer-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none}${e("pn-counter")} .pn-counter-input[type=number]{appearance:textfield}${e("pn-counter")} .pn-counter-items{display:inline-flex;flex-direction:row;gap:0.5em;transition-property:gap;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-counter")} .pn-counter-items{transition-duration:0s;transition-delay:0s}}${e("pn-counter")} .pn-counter-items[data-hidebuttons]{gap:0}${e("pn-counter")} .pn-counter-items[data-hidebuttons]>${e("pn-button")}{transform:scale(0) translateZ(0);width:0}${e("pn-counter")} .pn-counter-items>${e("pn-button")}{transform:scale(1) translateZ(0);transform-origin:center center;width:3em;transition-property:transform, width;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-counter")} .pn-counter-items>${e("pn-button")}{transition-duration:0s;transition-delay:0s}}${e("pn-counter")} .pn-counter-helpertext{color:#5e554a;font-size:0.875em;font-weight:400;margin:0.25em 0 0 0;display:flex;flex-direction:column;gap:0.25em}${e("pn-counter")} .pn-counter-sr-only{position:absolute;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);margin:-1px;white-space:nowrap}`;export{p as pn_counter}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* By PostNord.
|
|
4
|
-
*/
|
|
5
|
-
import{t as i,M as o,r as t,g as a,h as n,a as e}from"./p-DWsprozV.js";import{uuidv4 as r}from"./index.esm.js";import{a as d}from"./p-0j4cY0b7.js";const p=class extends(o(d)){constructor(i){super(),t(this,i)}id=`pn-radio-${r()}`;idHelpertext=`${this.id}-helpertext`;contentArea;radioInput;get hostElement(){return a(this)}label;helpertext;value;name;checked=!1;radioid=this.id;required=!1;disabled=!1;invalid=!1;tile=!1;expand=!1;icon=null;handleId(){this.idHelpertext=`${this.radioid}-helpertext`}handleChecked(i){this.checked=i??this.radioInput.checked,this.displayContent()&&(this.checked?(this.openDropdown(this.contentArea),this.uncheckOtherRadios()):this.closeDropdown(this.contentArea))}handleChange(i){const o=i.target,{name:t}=o;t===this.name&&(this.checked=o===this.radioInput&&o.checked)}componentWillLoad(){this.handleId()}componentDidLoad(){requestAnimationFrame((()=>this.displayContent()&&this.checked&&this.openDropdown(this.contentArea)))}uncheckOtherRadios(){if(!this.name)return;const i=document.querySelectorAll(`pn-radio-button[name="${this.name}"]`);Array.from(i).forEach((i=>i!==this.hostElement&&(i.checked=!1)))}isInvalid(){return this.invalid&&!this.disabled}displayText(){return this.displayLabel()||this.displayHelpertext()}displayLabel(){return!!this.label}displayHelpertext(){return!(!this.helpertext&&!this.hostElement.querySelector('[slot="helpertext"]')?.textContent)}displayIcon(){return this.tile&&!!this.icon}displayContent(){return this.tile&&this.expand}render(){return n(e,{key:"d9dbe33df6c0844b6c747285996a6a2886ef4fbd"},n("input",{key:"131acc3ca2b53a29e32243ad4910d57847d35a76",type:"radio",id:this.radioid,class:"pn-radio-input",value:this.value,name:this.name,disabled:this.disabled,checked:this.checked,required:this.required,"aria-invalid":this.isInvalid()?.toString(),"aria-describedby":this.displayHelpertext()?this.idHelpertext:null,"data-tile":this.tile,"data-expand":this.expand,ref:i=>this.radioInput=i}),n("div",{key:"e63874e20e8cd6e3ba25314e2777723fc1d09a9b",class:"pn-radio","data-tile":this.tile,"data-expand":this.expand,"data-invalid":this.isInvalid()},n("div",{key:"6af4d9f83ecae41248fd142d8a1dfdbee1e86fd3",class:"pn-radio-button"},n("div",{key:"8ea822e3b27a36c79795ad51231f306c9feeb439",class:"pn-radio-outer"},n("div",{key:"ea69cef2c0276512a0917852681ee07b696e0e69",class:"pn-radio-inner"}))),n("p",{key:"ac0e72d695546b716c061b57ca246f2304ebc29c",class:"pn-radio-content",hidden:!this.displayText()},n("label",{key:"af6e10051b6df5eb25a4c705e7934fb7efd0927a",htmlFor:this.radioid,class:"pn-radio-label",hidden:!this.displayLabel()},this.label),n("span",{key:"3daec2ddd84dbc6ffb0ab22c2d8dcaa29c7dbfc5",id:this.idHelpertext,class:"pn-radio-helpertext",hidden:!this.displayHelpertext()},this.helpertext,n("slot",{key:"09037832097ae5ad1f5d02e71e179d990d7cf3c0",name:"helpertext"})),n("slot",{key:"d77fefcc1fed9e5386360501d666ff7f4adc7204"})),this.displayIcon()&&n("pn-icon",{key:"b8c8294fb100ad921278b378e317c95d2702806b",icon:this.icon,color:"gray900"}),n("div",{key:"8eac1b2c621bb8fad7cb89bd226ae0ce13842fc6",class:"pn-radio-container","data-open":this.checked,hidden:!this.displayContent(),style:{height:"0px"},ref:i=>this.contentArea=i},n("div",{key:"f12c0a60214a8d0adf93e587e909994ad06800e9",class:"pn-radio-area"},n("slot",{key:"a67c2b5bee945a044aa5910544fa77f1034985ca",name:"content"})))))}static get watchers(){return{radioid:[{handleId:0}],checked:[{handleChecked:0}]}}};p.style=`${i("pn-radio-button")}{position:relative;display:inline-block}${i("pn-radio-button")} .pn-radio{position:relative;display:flex;flex-wrap:wrap;flex-direction:row}${i("pn-radio-button")} .pn-radio-label{cursor:pointer;color:#2d2013;-webkit-tap-highlight-color:transparent}${i("pn-radio-button")} .pn-radio-helpertext{color:#5e554a;margin:0 0 0.5em 0}${i("pn-radio-button")} .pn-radio-helpertext:last-child{margin:0}${i("pn-radio-button")} .pn-radio-content{display:flex;flex-direction:column;align-items:flex-start;font-weight:400;line-height:1.5;flex:1;margin:0 0 0 0.75em}${i("pn-radio-button")} .pn-radio-button{display:flex;gap:0.75em;padding:0}${i("pn-radio-button")} .pn-radio-outer{background-color:#ffffff;border:0.0625em solid #969087;border-radius:50%;height:1.5em;width:1.5em;display:flex;justify-content:center;align-items:center;outline:0.2rem solid transparent;outline-offset:0.2rem;transition-property:border-color, background-color, outline-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${i("pn-radio-button")} .pn-radio-outer{transition-duration:0s;transition-delay:0s}}${i("pn-radio-button")} .pn-radio-inner{height:0.75em;width:0.75em;background-color:#005d92;border-radius:50%;transform:scale(0);transform-origin:center center;transition-property:background-color, transform;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${i("pn-radio-button")} .pn-radio-inner{transition-duration:0s;transition-delay:0s}}${i("pn-radio-button")} .pn-radio[data-tile]{padding:1em;border:0.0625em solid #969087;border-radius:0.5em;background-color:#ffffff;outline:0.2rem solid transparent;outline-offset:0.2rem;transition-property:border-color, background-color, outline-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${i("pn-radio-button")} .pn-radio[data-tile]{transition-duration:0s;transition-delay:0s}}${i("pn-radio-button")} .pn-radio[data-tile] .pn-radio-outer{outline:none}${i("pn-radio-button")} .pn-radio[data-invalid]{border-color:#a70707}${i("pn-radio-button")} .pn-radio[data-invalid] .pn-radio-outer{border-color:#a70707}${i("pn-radio-button")} .pn-radio[data-invalid] .pn-radio-inner{background-color:#a70707}${i("pn-radio-button")} .pn-radio-container{flex:1 1 100%;overflow:hidden;visibility:hidden}${i("pn-radio-button")} .pn-radio-container[data-open]{visibility:visible;overflow:unset}${i("pn-radio-button")} .pn-radio-container[data-moving]{visibility:visible;overflow:hidden}${i("pn-radio-button")} .pn-radio-area{padding:0.75em 0 0 2.25em;display:flex;flex-direction:column;flex-wrap:nowrap;gap:1em}${i("pn-radio-button")} .pn-radio>${i("pn-icon")}{margin-left:0.75em}${i("pn-radio-button")}>input[type=radio]{cursor:pointer;opacity:0;position:absolute;margin:0;z-index:1;top:0;left:0;font-size:1em;width:1.5em;height:1.5em;-webkit-tap-highlight-color:transparent}${i("pn-radio-button")}>input[type=radio][data-tile]:not([data-expand]){width:100%;height:100%}${i("pn-radio-button")}>input[type=radio][data-expand]{top:1em;left:1em}${i("pn-radio-button")}>input[type=radio][aria-describedby]+.pn-radio[data-tile] .pn-radio-label{font-weight:500}${i("pn-radio-button")}>input[type=radio]:hover+.pn-radio[data-tile]{border-color:#005d92;background-color:#e0f8ff}${i("pn-radio-button")}>input[type=radio]:hover+.pn-radio[data-tile] .pn-radio-outer{background-color:#e0f8ff}${i("pn-radio-button")}>input[type=radio]:hover+.pn-radio[data-tile][data-invalid]{border-color:#a70707;background-color:#fdefee}${i("pn-radio-button")}>input[type=radio]:hover+.pn-radio[data-tile][data-invalid] .pn-radio-outer{background-color:#fdefee}${i("pn-radio-button")}>input[type=radio]:hover+.pn-radio[data-invalid] .pn-radio-outer{border-color:#a70707;background-color:#fdefee}${i("pn-radio-button")}>input[type=radio]:hover+.pn-radio .pn-radio-outer{border-color:#005d92;background-color:#e0f8ff}${i("pn-radio-button")}>input[type=radio]:checked:hover+.pn-radio[data-tile][data-invalid]{border-color:#500715}${i("pn-radio-button")}>input[type=radio]:checked:hover+.pn-radio[data-invalid]>.pn-radio-button>.pn-radio-outer{border-color:#500715}${i("pn-radio-button")}>input[type=radio]:focus-visible+.pn-radio .pn-radio-outer{outline-color:#005d92}${i("pn-radio-button")}>input[type=radio]:focus-visible+.pn-radio[data-invalid] .pn-radio-outer{outline-color:#a70707}${i("pn-radio-button")}>input[type=radio]:focus-visible+.pn-radio[data-tile]{outline-color:#005d92;border-color:#005d92}${i("pn-radio-button")}>input[type=radio]:focus-visible+.pn-radio[data-tile][data-invalid]{outline-color:#a70707;border-color:#a70707}${i("pn-radio-button")}>input[type=radio]:focus-visible+.pn-radio[data-tile]>.pn-radio-button>.pn-radio-outer{outline:none}${i("pn-radio-button")}>input[type=radio]:checked+.pn-radio[data-tile]{border-color:#005d92;background-color:#e0f8ff}${i("pn-radio-button")}>input[type=radio]:checked+.pn-radio[data-tile][data-invalid]{border-color:#a70707;background-color:#fdefee}${i("pn-radio-button")}>input[type=radio]:checked+.pn-radio>.pn-radio-button>.pn-radio-outer{border-color:#005d92}${i("pn-radio-button")}>input[type=radio]:checked+.pn-radio>.pn-radio-button>.pn-radio-outer>.pn-radio-inner{transform:scale(1);background-color:#005d92}${i("pn-radio-button")}>input[type=radio]:checked+.pn-radio[data-invalid]>.pn-radio-button>.pn-radio-outer{border-color:#a70707}${i("pn-radio-button")}>input[type=radio]:checked+.pn-radio[data-invalid]>.pn-radio-button>.pn-radio-outer>.pn-radio-inner{background-color:#a70707}${i("pn-radio-button")}>input[type=radio]:disabled{pointer-events:none}${i("pn-radio-button")}>input[type=radio]:disabled+.pn-radio .pn-radio-label{pointer-events:none}${i("pn-radio-button")}>input[type=radio]:disabled+.pn-radio[data-tile]{background-color:#f3f2f2;border-color:#f3f2f2}${i("pn-radio-button")}>input[type=radio]:disabled+.pn-radio[data-tile]>${i("pn-icon")}>.pn-icon-svg path{fill:#5e554a}${i("pn-radio-button")}>input[type=radio]:disabled+.pn-radio[data-tile]>.pn-radio-content>.pn-radio-label{color:#5e554a}${i("pn-radio-button")}>input[type=radio]:disabled+.pn-radio>.pn-radio-button>.pn-radio-outer{background-color:#f3f2f2;border-color:#969087;outline:none}${i("pn-radio-button")}>input[type=radio]:disabled+.pn-radio>.pn-radio-button>.pn-radio-outer>.pn-radio-inner{background-color:#969087}`;export{p as pn_radio_button}
|