@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
|
@@ -26,254 +26,9 @@ const NAMESPACE = 'postnord-web-components';
|
|
|
26
26
|
const BUILD = /* postnord-web-components */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, shadowDom: false, slotRelocation: true, state: true, updatable: true};
|
|
27
27
|
|
|
28
28
|
/*
|
|
29
|
-
Stencil Client Platform v4.41.
|
|
29
|
+
Stencil Client Platform v4.41.3 | MIT Licensed | https://stenciljs.com
|
|
30
30
|
*/
|
|
31
|
-
var __create = Object.create;
|
|
32
|
-
var __defProp = Object.defineProperty;
|
|
33
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
34
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
35
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
36
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
37
|
-
var __typeError = (msg) => {
|
|
38
|
-
throw TypeError(msg);
|
|
39
|
-
};
|
|
40
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
41
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
42
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
43
|
-
};
|
|
44
|
-
var __export = (target, all) => {
|
|
45
|
-
for (var name in all)
|
|
46
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
47
|
-
};
|
|
48
|
-
var __copyProps = (to, from, except, desc) => {
|
|
49
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
50
|
-
for (let key of __getOwnPropNames(from))
|
|
51
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
52
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
53
|
-
}
|
|
54
|
-
return to;
|
|
55
|
-
};
|
|
56
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
57
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
58
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
59
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
60
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
61
|
-
__defProp(target, "default", { value: mod, enumerable: true }) ,
|
|
62
|
-
mod
|
|
63
|
-
));
|
|
64
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
|
65
|
-
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
66
|
-
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
67
|
-
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
68
|
-
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
|
|
69
|
-
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
70
31
|
|
|
71
|
-
// node_modules/balanced-match/index.js
|
|
72
|
-
var require_balanced_match = __commonJS({
|
|
73
|
-
"node_modules/balanced-match/index.js"(exports, module) {
|
|
74
|
-
module.exports = balanced;
|
|
75
|
-
function balanced(a, b, str) {
|
|
76
|
-
if (a instanceof RegExp) a = maybeMatch(a, str);
|
|
77
|
-
if (b instanceof RegExp) b = maybeMatch(b, str);
|
|
78
|
-
var r = range(a, b, str);
|
|
79
|
-
return r && {
|
|
80
|
-
start: r[0],
|
|
81
|
-
end: r[1],
|
|
82
|
-
pre: str.slice(0, r[0]),
|
|
83
|
-
body: str.slice(r[0] + a.length, r[1]),
|
|
84
|
-
post: str.slice(r[1] + b.length)
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
function maybeMatch(reg, str) {
|
|
88
|
-
var m = str.match(reg);
|
|
89
|
-
return m ? m[0] : null;
|
|
90
|
-
}
|
|
91
|
-
balanced.range = range;
|
|
92
|
-
function range(a, b, str) {
|
|
93
|
-
var begs, beg, left, right, result;
|
|
94
|
-
var ai = str.indexOf(a);
|
|
95
|
-
var bi = str.indexOf(b, ai + 1);
|
|
96
|
-
var i2 = ai;
|
|
97
|
-
if (ai >= 0 && bi > 0) {
|
|
98
|
-
if (a === b) {
|
|
99
|
-
return [ai, bi];
|
|
100
|
-
}
|
|
101
|
-
begs = [];
|
|
102
|
-
left = str.length;
|
|
103
|
-
while (i2 >= 0 && !result) {
|
|
104
|
-
if (i2 == ai) {
|
|
105
|
-
begs.push(i2);
|
|
106
|
-
ai = str.indexOf(a, i2 + 1);
|
|
107
|
-
} else if (begs.length == 1) {
|
|
108
|
-
result = [begs.pop(), bi];
|
|
109
|
-
} else {
|
|
110
|
-
beg = begs.pop();
|
|
111
|
-
if (beg < left) {
|
|
112
|
-
left = beg;
|
|
113
|
-
right = bi;
|
|
114
|
-
}
|
|
115
|
-
bi = str.indexOf(b, i2 + 1);
|
|
116
|
-
}
|
|
117
|
-
i2 = ai < bi && ai >= 0 ? ai : bi;
|
|
118
|
-
}
|
|
119
|
-
if (begs.length) {
|
|
120
|
-
result = [left, right];
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
return result;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
// node_modules/brace-expansion/index.js
|
|
129
|
-
var require_brace_expansion = __commonJS({
|
|
130
|
-
"node_modules/brace-expansion/index.js"(exports, module) {
|
|
131
|
-
var balanced = require_balanced_match();
|
|
132
|
-
module.exports = expandTop;
|
|
133
|
-
var escSlash = "\0SLASH" + Math.random() + "\0";
|
|
134
|
-
var escOpen = "\0OPEN" + Math.random() + "\0";
|
|
135
|
-
var escClose = "\0CLOSE" + Math.random() + "\0";
|
|
136
|
-
var escComma = "\0COMMA" + Math.random() + "\0";
|
|
137
|
-
var escPeriod = "\0PERIOD" + Math.random() + "\0";
|
|
138
|
-
function numeric(str) {
|
|
139
|
-
return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
|
|
140
|
-
}
|
|
141
|
-
function escapeBraces(str) {
|
|
142
|
-
return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
|
|
143
|
-
}
|
|
144
|
-
function unescapeBraces(str) {
|
|
145
|
-
return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
|
|
146
|
-
}
|
|
147
|
-
function parseCommaParts(str) {
|
|
148
|
-
if (!str)
|
|
149
|
-
return [""];
|
|
150
|
-
var parts = [];
|
|
151
|
-
var m = balanced("{", "}", str);
|
|
152
|
-
if (!m)
|
|
153
|
-
return str.split(",");
|
|
154
|
-
var pre = m.pre;
|
|
155
|
-
var body = m.body;
|
|
156
|
-
var post = m.post;
|
|
157
|
-
var p = pre.split(",");
|
|
158
|
-
p[p.length - 1] += "{" + body + "}";
|
|
159
|
-
var postParts = parseCommaParts(post);
|
|
160
|
-
if (post.length) {
|
|
161
|
-
p[p.length - 1] += postParts.shift();
|
|
162
|
-
p.push.apply(p, postParts);
|
|
163
|
-
}
|
|
164
|
-
parts.push.apply(parts, p);
|
|
165
|
-
return parts;
|
|
166
|
-
}
|
|
167
|
-
function expandTop(str) {
|
|
168
|
-
if (!str)
|
|
169
|
-
return [];
|
|
170
|
-
if (str.substr(0, 2) === "{}") {
|
|
171
|
-
str = "\\{\\}" + str.substr(2);
|
|
172
|
-
}
|
|
173
|
-
return expand2(escapeBraces(str), true).map(unescapeBraces);
|
|
174
|
-
}
|
|
175
|
-
function embrace(str) {
|
|
176
|
-
return "{" + str + "}";
|
|
177
|
-
}
|
|
178
|
-
function isPadded(el) {
|
|
179
|
-
return /^-?0\d/.test(el);
|
|
180
|
-
}
|
|
181
|
-
function lte(i2, y) {
|
|
182
|
-
return i2 <= y;
|
|
183
|
-
}
|
|
184
|
-
function gte(i2, y) {
|
|
185
|
-
return i2 >= y;
|
|
186
|
-
}
|
|
187
|
-
function expand2(str, isTop) {
|
|
188
|
-
var expansions = [];
|
|
189
|
-
var m = balanced("{", "}", str);
|
|
190
|
-
if (!m) return [str];
|
|
191
|
-
var pre = m.pre;
|
|
192
|
-
var post = m.post.length ? expand2(m.post, false) : [""];
|
|
193
|
-
if (/\$$/.test(m.pre)) {
|
|
194
|
-
for (var k = 0; k < post.length; k++) {
|
|
195
|
-
var expansion = pre + "{" + m.body + "}" + post[k];
|
|
196
|
-
expansions.push(expansion);
|
|
197
|
-
}
|
|
198
|
-
} else {
|
|
199
|
-
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
|
200
|
-
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
|
201
|
-
var isSequence = isNumericSequence || isAlphaSequence;
|
|
202
|
-
var isOptions = m.body.indexOf(",") >= 0;
|
|
203
|
-
if (!isSequence && !isOptions) {
|
|
204
|
-
if (m.post.match(/,(?!,).*\}/)) {
|
|
205
|
-
str = m.pre + "{" + m.body + escClose + m.post;
|
|
206
|
-
return expand2(str);
|
|
207
|
-
}
|
|
208
|
-
return [str];
|
|
209
|
-
}
|
|
210
|
-
var n;
|
|
211
|
-
if (isSequence) {
|
|
212
|
-
n = m.body.split(/\.\./);
|
|
213
|
-
} else {
|
|
214
|
-
n = parseCommaParts(m.body);
|
|
215
|
-
if (n.length === 1) {
|
|
216
|
-
n = expand2(n[0], false).map(embrace);
|
|
217
|
-
if (n.length === 1) {
|
|
218
|
-
return post.map(function(p) {
|
|
219
|
-
return m.pre + n[0] + p;
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
var N;
|
|
225
|
-
if (isSequence) {
|
|
226
|
-
var x = numeric(n[0]);
|
|
227
|
-
var y = numeric(n[1]);
|
|
228
|
-
var width = Math.max(n[0].length, n[1].length);
|
|
229
|
-
var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
|
|
230
|
-
var test = lte;
|
|
231
|
-
var reverse = y < x;
|
|
232
|
-
if (reverse) {
|
|
233
|
-
incr *= -1;
|
|
234
|
-
test = gte;
|
|
235
|
-
}
|
|
236
|
-
var pad = n.some(isPadded);
|
|
237
|
-
N = [];
|
|
238
|
-
for (var i2 = x; test(i2, y); i2 += incr) {
|
|
239
|
-
var c;
|
|
240
|
-
if (isAlphaSequence) {
|
|
241
|
-
c = String.fromCharCode(i2);
|
|
242
|
-
if (c === "\\")
|
|
243
|
-
c = "";
|
|
244
|
-
} else {
|
|
245
|
-
c = String(i2);
|
|
246
|
-
if (pad) {
|
|
247
|
-
var need = width - c.length;
|
|
248
|
-
if (need > 0) {
|
|
249
|
-
var z = new Array(need + 1).join("0");
|
|
250
|
-
if (i2 < 0)
|
|
251
|
-
c = "-" + z + c.slice(1);
|
|
252
|
-
else
|
|
253
|
-
c = z + c;
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
N.push(c);
|
|
258
|
-
}
|
|
259
|
-
} else {
|
|
260
|
-
N = [];
|
|
261
|
-
for (var j = 0; j < n.length; j++) {
|
|
262
|
-
N.push.apply(N, expand2(n[j], false));
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
for (var j = 0; j < N.length; j++) {
|
|
266
|
-
for (var k = 0; k < post.length; k++) {
|
|
267
|
-
var expansion = pre + N[j] + post[k];
|
|
268
|
-
if (!isTop || isSequence || expansion)
|
|
269
|
-
expansions.push(expansion);
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
return expansions;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
});
|
|
277
32
|
|
|
278
33
|
// src/utils/constants.ts
|
|
279
34
|
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
@@ -595,1625 +350,105 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
595
350
|
}
|
|
596
351
|
return importedModule[exportName];
|
|
597
352
|
},
|
|
598
|
-
(e) => {
|
|
599
|
-
consoleError(e, hostRef.$hostElement$);
|
|
600
|
-
}
|
|
601
|
-
);
|
|
602
|
-
};
|
|
603
|
-
|
|
604
|
-
// src/client/client-style.ts
|
|
605
|
-
var styles = /* @__PURE__ */ new Map();
|
|
606
|
-
|
|
607
|
-
// src/runtime/runtime-constants.ts
|
|
608
|
-
var CONTENT_REF_ID = "r";
|
|
609
|
-
var ORG_LOCATION_ID = "o";
|
|
610
|
-
var SLOT_NODE_ID = "s";
|
|
611
|
-
var TEXT_NODE_ID = "t";
|
|
612
|
-
var COMMENT_NODE_ID = "c";
|
|
613
|
-
var HYDRATE_ID = "s-id";
|
|
614
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
|
615
|
-
var HYDRATE_CHILD_ID = "c-id";
|
|
616
|
-
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
617
|
-
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
618
|
-
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
619
|
-
var win = typeof window !== "undefined" ? window : {};
|
|
620
|
-
var H = win.HTMLElement || class {
|
|
621
|
-
};
|
|
622
|
-
var plt = {
|
|
623
|
-
$flags$: 0,
|
|
624
|
-
$resourcesUrl$: "",
|
|
625
|
-
jmp: (h2) => h2(),
|
|
626
|
-
raf: (h2) => requestAnimationFrame(h2),
|
|
627
|
-
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
628
|
-
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
629
|
-
ce: (eventName, opts) => new CustomEvent(eventName, opts)
|
|
630
|
-
};
|
|
631
|
-
var supportsShadow = BUILD.shadowDom;
|
|
632
|
-
var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
633
|
-
var _a;
|
|
634
|
-
let supportsListenerOptions2 = false;
|
|
635
|
-
try {
|
|
636
|
-
(_a = win.document) == null ? void 0 : _a.addEventListener(
|
|
637
|
-
"e",
|
|
638
|
-
null,
|
|
639
|
-
Object.defineProperty({}, "passive", {
|
|
640
|
-
get() {
|
|
641
|
-
supportsListenerOptions2 = true;
|
|
642
|
-
}
|
|
643
|
-
})
|
|
644
|
-
);
|
|
645
|
-
} catch (e) {
|
|
646
|
-
}
|
|
647
|
-
return supportsListenerOptions2;
|
|
648
|
-
})();
|
|
649
|
-
var promiseResolve = (v) => Promise.resolve(v);
|
|
650
|
-
var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
|
|
651
|
-
try {
|
|
652
|
-
if (!win.document.adoptedStyleSheets) {
|
|
653
|
-
return false;
|
|
654
|
-
}
|
|
655
|
-
new CSSStyleSheet();
|
|
656
|
-
return typeof new CSSStyleSheet().replaceSync === "function";
|
|
657
|
-
} catch (e) {
|
|
658
|
-
}
|
|
659
|
-
return false;
|
|
660
|
-
})() ;
|
|
661
|
-
var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
|
|
662
|
-
var queuePending = false;
|
|
663
|
-
var queueDomReads = [];
|
|
664
|
-
var queueDomWrites = [];
|
|
665
|
-
var queueTask = (queue, write) => (cb) => {
|
|
666
|
-
queue.push(cb);
|
|
667
|
-
if (!queuePending) {
|
|
668
|
-
queuePending = true;
|
|
669
|
-
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
670
|
-
nextTick(flush);
|
|
671
|
-
} else {
|
|
672
|
-
plt.raf(flush);
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
};
|
|
676
|
-
var consume = (queue) => {
|
|
677
|
-
for (let i2 = 0; i2 < queue.length; i2++) {
|
|
678
|
-
try {
|
|
679
|
-
queue[i2](performance.now());
|
|
680
|
-
} catch (e) {
|
|
681
|
-
consoleError(e);
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
queue.length = 0;
|
|
685
|
-
};
|
|
686
|
-
var flush = () => {
|
|
687
|
-
consume(queueDomReads);
|
|
688
|
-
{
|
|
689
|
-
consume(queueDomWrites);
|
|
690
|
-
if (queuePending = queueDomReads.length > 0) {
|
|
691
|
-
plt.raf(flush);
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
};
|
|
695
|
-
var nextTick = (cb) => promiseResolve().then(cb);
|
|
696
|
-
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
697
|
-
var isComplexType = (o) => {
|
|
698
|
-
o = typeof o;
|
|
699
|
-
return o === "object" || o === "function";
|
|
700
|
-
};
|
|
701
|
-
|
|
702
|
-
// node_modules/minimatch/dist/esm/index.js
|
|
703
|
-
var import_brace_expansion = __toESM(require_brace_expansion());
|
|
704
|
-
|
|
705
|
-
// node_modules/minimatch/dist/esm/assert-valid-pattern.js
|
|
706
|
-
var MAX_PATTERN_LENGTH = 1024 * 64;
|
|
707
|
-
var assertValidPattern = (pattern) => {
|
|
708
|
-
if (typeof pattern !== "string") {
|
|
709
|
-
throw new TypeError("invalid pattern");
|
|
710
|
-
}
|
|
711
|
-
if (pattern.length > MAX_PATTERN_LENGTH) {
|
|
712
|
-
throw new TypeError("pattern is too long");
|
|
713
|
-
}
|
|
714
|
-
};
|
|
715
|
-
|
|
716
|
-
// node_modules/minimatch/dist/esm/brace-expressions.js
|
|
717
|
-
var posixClasses = {
|
|
718
|
-
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
|
|
719
|
-
"[:alpha:]": ["\\p{L}\\p{Nl}", true],
|
|
720
|
-
"[:ascii:]": ["\\x00-\\x7f", false],
|
|
721
|
-
"[:blank:]": ["\\p{Zs}\\t", true],
|
|
722
|
-
"[:cntrl:]": ["\\p{Cc}", true],
|
|
723
|
-
"[:digit:]": ["\\p{Nd}", true],
|
|
724
|
-
"[:graph:]": ["\\p{Z}\\p{C}", true, true],
|
|
725
|
-
"[:lower:]": ["\\p{Ll}", true],
|
|
726
|
-
"[:print:]": ["\\p{C}", true],
|
|
727
|
-
"[:punct:]": ["\\p{P}", true],
|
|
728
|
-
"[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true],
|
|
729
|
-
"[:upper:]": ["\\p{Lu}", true],
|
|
730
|
-
"[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true],
|
|
731
|
-
"[:xdigit:]": ["A-Fa-f0-9", false]
|
|
732
|
-
};
|
|
733
|
-
var braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&");
|
|
734
|
-
var regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
735
|
-
var rangesToString = (ranges) => ranges.join("");
|
|
736
|
-
var parseClass = (glob, position) => {
|
|
737
|
-
const pos = position;
|
|
738
|
-
if (glob.charAt(pos) !== "[") {
|
|
739
|
-
throw new Error("not in a brace expression");
|
|
740
|
-
}
|
|
741
|
-
const ranges = [];
|
|
742
|
-
const negs = [];
|
|
743
|
-
let i2 = pos + 1;
|
|
744
|
-
let sawStart = false;
|
|
745
|
-
let uflag = false;
|
|
746
|
-
let escaping = false;
|
|
747
|
-
let negate = false;
|
|
748
|
-
let endPos = pos;
|
|
749
|
-
let rangeStart = "";
|
|
750
|
-
WHILE: while (i2 < glob.length) {
|
|
751
|
-
const c = glob.charAt(i2);
|
|
752
|
-
if ((c === "!" || c === "^") && i2 === pos + 1) {
|
|
753
|
-
negate = true;
|
|
754
|
-
i2++;
|
|
755
|
-
continue;
|
|
756
|
-
}
|
|
757
|
-
if (c === "]" && sawStart && !escaping) {
|
|
758
|
-
endPos = i2 + 1;
|
|
759
|
-
break;
|
|
760
|
-
}
|
|
761
|
-
sawStart = true;
|
|
762
|
-
if (c === "\\") {
|
|
763
|
-
if (!escaping) {
|
|
764
|
-
escaping = true;
|
|
765
|
-
i2++;
|
|
766
|
-
continue;
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
if (c === "[" && !escaping) {
|
|
770
|
-
for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
|
|
771
|
-
if (glob.startsWith(cls, i2)) {
|
|
772
|
-
if (rangeStart) {
|
|
773
|
-
return ["$.", false, glob.length - pos, true];
|
|
774
|
-
}
|
|
775
|
-
i2 += cls.length;
|
|
776
|
-
if (neg)
|
|
777
|
-
negs.push(unip);
|
|
778
|
-
else
|
|
779
|
-
ranges.push(unip);
|
|
780
|
-
uflag = uflag || u;
|
|
781
|
-
continue WHILE;
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
escaping = false;
|
|
786
|
-
if (rangeStart) {
|
|
787
|
-
if (c > rangeStart) {
|
|
788
|
-
ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c));
|
|
789
|
-
} else if (c === rangeStart) {
|
|
790
|
-
ranges.push(braceEscape(c));
|
|
791
|
-
}
|
|
792
|
-
rangeStart = "";
|
|
793
|
-
i2++;
|
|
794
|
-
continue;
|
|
795
|
-
}
|
|
796
|
-
if (glob.startsWith("-]", i2 + 1)) {
|
|
797
|
-
ranges.push(braceEscape(c + "-"));
|
|
798
|
-
i2 += 2;
|
|
799
|
-
continue;
|
|
800
|
-
}
|
|
801
|
-
if (glob.startsWith("-", i2 + 1)) {
|
|
802
|
-
rangeStart = c;
|
|
803
|
-
i2 += 2;
|
|
804
|
-
continue;
|
|
805
|
-
}
|
|
806
|
-
ranges.push(braceEscape(c));
|
|
807
|
-
i2++;
|
|
808
|
-
}
|
|
809
|
-
if (endPos < i2) {
|
|
810
|
-
return ["", false, 0, false];
|
|
811
|
-
}
|
|
812
|
-
if (!ranges.length && !negs.length) {
|
|
813
|
-
return ["$.", false, glob.length - pos, true];
|
|
814
|
-
}
|
|
815
|
-
if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate) {
|
|
816
|
-
const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
|
|
817
|
-
return [regexpEscape(r), false, endPos - pos, false];
|
|
818
|
-
}
|
|
819
|
-
const sranges = "[" + (negate ? "^" : "") + rangesToString(ranges) + "]";
|
|
820
|
-
const snegs = "[" + (negate ? "" : "^") + rangesToString(negs) + "]";
|
|
821
|
-
const comb = ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs;
|
|
822
|
-
return [comb, uflag, endPos - pos, true];
|
|
823
|
-
};
|
|
824
|
-
|
|
825
|
-
// node_modules/minimatch/dist/esm/unescape.js
|
|
826
|
-
var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
827
|
-
return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
|
|
828
|
-
};
|
|
829
|
-
|
|
830
|
-
// node_modules/minimatch/dist/esm/ast.js
|
|
831
|
-
var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
|
|
832
|
-
var isExtglobType = (c) => types.has(c);
|
|
833
|
-
var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
|
|
834
|
-
var startNoDot = "(?!\\.)";
|
|
835
|
-
var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
|
|
836
|
-
var justDots = /* @__PURE__ */ new Set(["..", "."]);
|
|
837
|
-
var reSpecials = new Set("().*{}+?[]^$\\!");
|
|
838
|
-
var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
839
|
-
var qmark = "[^/]";
|
|
840
|
-
var star = qmark + "*?";
|
|
841
|
-
var starNoEmpty = qmark + "+?";
|
|
842
|
-
var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, partsToRegExp_fn, parseGlob_fn;
|
|
843
|
-
var _AST = class _AST {
|
|
844
|
-
constructor(type, parent, options = {}) {
|
|
845
|
-
__privateAdd(this, _AST_instances);
|
|
846
|
-
__publicField(this, "type");
|
|
847
|
-
__privateAdd(this, _root);
|
|
848
|
-
__privateAdd(this, _hasMagic);
|
|
849
|
-
__privateAdd(this, _uflag, false);
|
|
850
|
-
__privateAdd(this, _parts, []);
|
|
851
|
-
__privateAdd(this, _parent);
|
|
852
|
-
__privateAdd(this, _parentIndex);
|
|
853
|
-
__privateAdd(this, _negs);
|
|
854
|
-
__privateAdd(this, _filledNegs, false);
|
|
855
|
-
__privateAdd(this, _options);
|
|
856
|
-
__privateAdd(this, _toString);
|
|
857
|
-
// set to true if it's an extglob with no children
|
|
858
|
-
// (which really means one child of '')
|
|
859
|
-
__privateAdd(this, _emptyExt, false);
|
|
860
|
-
this.type = type;
|
|
861
|
-
if (type)
|
|
862
|
-
__privateSet(this, _hasMagic, true);
|
|
863
|
-
__privateSet(this, _parent, parent);
|
|
864
|
-
__privateSet(this, _root, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _root) : this);
|
|
865
|
-
__privateSet(this, _options, __privateGet(this, _root) === this ? options : __privateGet(__privateGet(this, _root), _options));
|
|
866
|
-
__privateSet(this, _negs, __privateGet(this, _root) === this ? [] : __privateGet(__privateGet(this, _root), _negs));
|
|
867
|
-
if (type === "!" && !__privateGet(__privateGet(this, _root), _filledNegs))
|
|
868
|
-
__privateGet(this, _negs).push(this);
|
|
869
|
-
__privateSet(this, _parentIndex, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0);
|
|
870
|
-
}
|
|
871
|
-
get hasMagic() {
|
|
872
|
-
if (__privateGet(this, _hasMagic) !== void 0)
|
|
873
|
-
return __privateGet(this, _hasMagic);
|
|
874
|
-
for (const p of __privateGet(this, _parts)) {
|
|
875
|
-
if (typeof p === "string")
|
|
876
|
-
continue;
|
|
877
|
-
if (p.type || p.hasMagic)
|
|
878
|
-
return __privateSet(this, _hasMagic, true);
|
|
879
|
-
}
|
|
880
|
-
return __privateGet(this, _hasMagic);
|
|
881
|
-
}
|
|
882
|
-
// reconstructs the pattern
|
|
883
|
-
toString() {
|
|
884
|
-
if (__privateGet(this, _toString) !== void 0)
|
|
885
|
-
return __privateGet(this, _toString);
|
|
886
|
-
if (!this.type) {
|
|
887
|
-
return __privateSet(this, _toString, __privateGet(this, _parts).map((p) => String(p)).join(""));
|
|
888
|
-
} else {
|
|
889
|
-
return __privateSet(this, _toString, this.type + "(" + __privateGet(this, _parts).map((p) => String(p)).join("|") + ")");
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
push(...parts) {
|
|
893
|
-
for (const p of parts) {
|
|
894
|
-
if (p === "")
|
|
895
|
-
continue;
|
|
896
|
-
if (typeof p !== "string" && !(p instanceof _AST && __privateGet(p, _parent) === this)) {
|
|
897
|
-
throw new Error("invalid part: " + p);
|
|
898
|
-
}
|
|
899
|
-
__privateGet(this, _parts).push(p);
|
|
900
|
-
}
|
|
901
|
-
}
|
|
902
|
-
toJSON() {
|
|
903
|
-
var _a;
|
|
904
|
-
const ret = this.type === null ? __privateGet(this, _parts).slice().map((p) => typeof p === "string" ? p : p.toJSON()) : [this.type, ...__privateGet(this, _parts).map((p) => p.toJSON())];
|
|
905
|
-
if (this.isStart() && !this.type)
|
|
906
|
-
ret.unshift([]);
|
|
907
|
-
if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")) {
|
|
908
|
-
ret.push({});
|
|
909
|
-
}
|
|
910
|
-
return ret;
|
|
911
|
-
}
|
|
912
|
-
isStart() {
|
|
913
|
-
var _a;
|
|
914
|
-
if (__privateGet(this, _root) === this)
|
|
915
|
-
return true;
|
|
916
|
-
if (!((_a = __privateGet(this, _parent)) == null ? void 0 : _a.isStart()))
|
|
917
|
-
return false;
|
|
918
|
-
if (__privateGet(this, _parentIndex) === 0)
|
|
919
|
-
return true;
|
|
920
|
-
const p = __privateGet(this, _parent);
|
|
921
|
-
for (let i2 = 0; i2 < __privateGet(this, _parentIndex); i2++) {
|
|
922
|
-
const pp = __privateGet(p, _parts)[i2];
|
|
923
|
-
if (!(pp instanceof _AST && pp.type === "!")) {
|
|
924
|
-
return false;
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
return true;
|
|
928
|
-
}
|
|
929
|
-
isEnd() {
|
|
930
|
-
var _a, _b, _c;
|
|
931
|
-
if (__privateGet(this, _root) === this)
|
|
932
|
-
return true;
|
|
933
|
-
if (((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")
|
|
934
|
-
return true;
|
|
935
|
-
if (!((_b = __privateGet(this, _parent)) == null ? void 0 : _b.isEnd()))
|
|
936
|
-
return false;
|
|
937
|
-
if (!this.type)
|
|
938
|
-
return (_c = __privateGet(this, _parent)) == null ? void 0 : _c.isEnd();
|
|
939
|
-
const pl = __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0;
|
|
940
|
-
return __privateGet(this, _parentIndex) === pl - 1;
|
|
941
|
-
}
|
|
942
|
-
copyIn(part) {
|
|
943
|
-
if (typeof part === "string")
|
|
944
|
-
this.push(part);
|
|
945
|
-
else
|
|
946
|
-
this.push(part.clone(this));
|
|
947
|
-
}
|
|
948
|
-
clone(parent) {
|
|
949
|
-
const c = new _AST(this.type, parent);
|
|
950
|
-
for (const p of __privateGet(this, _parts)) {
|
|
951
|
-
c.copyIn(p);
|
|
952
|
-
}
|
|
953
|
-
return c;
|
|
954
|
-
}
|
|
955
|
-
static fromGlob(pattern, options = {}) {
|
|
956
|
-
var _a;
|
|
957
|
-
const ast = new _AST(null, void 0, options);
|
|
958
|
-
__privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, pattern, ast, 0, options);
|
|
959
|
-
return ast;
|
|
960
|
-
}
|
|
961
|
-
// returns the regular expression if there's magic, or the unescaped
|
|
962
|
-
// string if not.
|
|
963
|
-
toMMPattern() {
|
|
964
|
-
if (this !== __privateGet(this, _root))
|
|
965
|
-
return __privateGet(this, _root).toMMPattern();
|
|
966
|
-
const glob = this.toString();
|
|
967
|
-
const [re, body, hasMagic, uflag] = this.toRegExpSource();
|
|
968
|
-
const anyMagic = hasMagic || __privateGet(this, _hasMagic) || __privateGet(this, _options).nocase && !__privateGet(this, _options).nocaseMagicOnly && glob.toUpperCase() !== glob.toLowerCase();
|
|
969
|
-
if (!anyMagic) {
|
|
970
|
-
return body;
|
|
971
|
-
}
|
|
972
|
-
const flags = (__privateGet(this, _options).nocase ? "i" : "") + (uflag ? "u" : "");
|
|
973
|
-
return Object.assign(new RegExp(`^${re}$`, flags), {
|
|
974
|
-
_src: re,
|
|
975
|
-
_glob: glob
|
|
976
|
-
});
|
|
977
|
-
}
|
|
978
|
-
get options() {
|
|
979
|
-
return __privateGet(this, _options);
|
|
980
|
-
}
|
|
981
|
-
// returns the string match, the regexp source, whether there's magic
|
|
982
|
-
// in the regexp (so a regular expression is required) and whether or
|
|
983
|
-
// not the uflag is needed for the regular expression (for posix classes)
|
|
984
|
-
// TODO: instead of injecting the start/end at this point, just return
|
|
985
|
-
// the BODY of the regexp, along with the start/end portions suitable
|
|
986
|
-
// for binding the start/end in either a joined full-path makeRe context
|
|
987
|
-
// (where we bind to (^|/), or a standalone matchPart context (where
|
|
988
|
-
// we bind to ^, and not /). Otherwise slashes get duped!
|
|
989
|
-
//
|
|
990
|
-
// In part-matching mode, the start is:
|
|
991
|
-
// - if not isStart: nothing
|
|
992
|
-
// - if traversal possible, but not allowed: ^(?!\.\.?$)
|
|
993
|
-
// - if dots allowed or not possible: ^
|
|
994
|
-
// - if dots possible and not allowed: ^(?!\.)
|
|
995
|
-
// end is:
|
|
996
|
-
// - if not isEnd(): nothing
|
|
997
|
-
// - else: $
|
|
998
|
-
//
|
|
999
|
-
// In full-path matching mode, we put the slash at the START of the
|
|
1000
|
-
// pattern, so start is:
|
|
1001
|
-
// - if first pattern: same as part-matching mode
|
|
1002
|
-
// - if not isStart(): nothing
|
|
1003
|
-
// - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
|
|
1004
|
-
// - if dots allowed or not possible: /
|
|
1005
|
-
// - if dots possible and not allowed: /(?!\.)
|
|
1006
|
-
// end is:
|
|
1007
|
-
// - if last pattern, same as part-matching mode
|
|
1008
|
-
// - else nothing
|
|
1009
|
-
//
|
|
1010
|
-
// Always put the (?:$|/) on negated tails, though, because that has to be
|
|
1011
|
-
// there to bind the end of the negated pattern portion, and it's easier to
|
|
1012
|
-
// just stick it in now rather than try to inject it later in the middle of
|
|
1013
|
-
// the pattern.
|
|
1014
|
-
//
|
|
1015
|
-
// We can just always return the same end, and leave it up to the caller
|
|
1016
|
-
// to know whether it's going to be used joined or in parts.
|
|
1017
|
-
// And, if the start is adjusted slightly, can do the same there:
|
|
1018
|
-
// - if not isStart: nothing
|
|
1019
|
-
// - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
|
|
1020
|
-
// - if dots allowed or not possible: (?:/|^)
|
|
1021
|
-
// - if dots possible and not allowed: (?:/|^)(?!\.)
|
|
1022
|
-
//
|
|
1023
|
-
// But it's better to have a simpler binding without a conditional, for
|
|
1024
|
-
// performance, so probably better to return both start options.
|
|
1025
|
-
//
|
|
1026
|
-
// Then the caller just ignores the end if it's not the first pattern,
|
|
1027
|
-
// and the start always gets applied.
|
|
1028
|
-
//
|
|
1029
|
-
// But that's always going to be $ if it's the ending pattern, or nothing,
|
|
1030
|
-
// so the caller can just attach $ at the end of the pattern when building.
|
|
1031
|
-
//
|
|
1032
|
-
// So the todo is:
|
|
1033
|
-
// - better detect what kind of start is needed
|
|
1034
|
-
// - return both flavors of starting pattern
|
|
1035
|
-
// - attach $ at the end of the pattern when creating the actual RegExp
|
|
1036
|
-
//
|
|
1037
|
-
// Ah, but wait, no, that all only applies to the root when the first pattern
|
|
1038
|
-
// is not an extglob. If the first pattern IS an extglob, then we need all
|
|
1039
|
-
// that dot prevention biz to live in the extglob portions, because eg
|
|
1040
|
-
// +(*|.x*) can match .xy but not .yx.
|
|
1041
|
-
//
|
|
1042
|
-
// So, return the two flavors if it's #root and the first child is not an
|
|
1043
|
-
// AST, otherwise leave it to the child AST to handle it, and there,
|
|
1044
|
-
// use the (?:^|/) style of start binding.
|
|
1045
|
-
//
|
|
1046
|
-
// Even simplified further:
|
|
1047
|
-
// - Since the start for a join is eg /(?!\.) and the start for a part
|
|
1048
|
-
// is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
|
|
1049
|
-
// or start or whatever) and prepend ^ or / at the Regexp construction.
|
|
1050
|
-
toRegExpSource(allowDot) {
|
|
1051
|
-
var _a;
|
|
1052
|
-
const dot = allowDot != null ? allowDot : !!__privateGet(this, _options).dot;
|
|
1053
|
-
if (__privateGet(this, _root) === this)
|
|
1054
|
-
__privateMethod(this, _AST_instances, fillNegs_fn).call(this);
|
|
1055
|
-
if (!this.type) {
|
|
1056
|
-
const noEmpty = this.isStart() && this.isEnd();
|
|
1057
|
-
const src = __privateGet(this, _parts).map((p) => {
|
|
1058
|
-
var _a2;
|
|
1059
|
-
const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a2 = _AST, _AST_static, parseGlob_fn).call(_a2, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
|
|
1060
|
-
__privateSet(this, _hasMagic, __privateGet(this, _hasMagic) || hasMagic);
|
|
1061
|
-
__privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
|
|
1062
|
-
return re;
|
|
1063
|
-
}).join("");
|
|
1064
|
-
let start2 = "";
|
|
1065
|
-
if (this.isStart()) {
|
|
1066
|
-
if (typeof __privateGet(this, _parts)[0] === "string") {
|
|
1067
|
-
const dotTravAllowed = __privateGet(this, _parts).length === 1 && justDots.has(__privateGet(this, _parts)[0]);
|
|
1068
|
-
if (!dotTravAllowed) {
|
|
1069
|
-
const aps = addPatternStart;
|
|
1070
|
-
const needNoTrav = (
|
|
1071
|
-
// dots are allowed, and the pattern starts with [ or .
|
|
1072
|
-
dot && aps.has(src.charAt(0)) || // the pattern starts with \., and then [ or .
|
|
1073
|
-
src.startsWith("\\.") && aps.has(src.charAt(2)) || // the pattern starts with \.\., and then [ or .
|
|
1074
|
-
src.startsWith("\\.\\.") && aps.has(src.charAt(4))
|
|
1075
|
-
);
|
|
1076
|
-
const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
|
|
1077
|
-
start2 = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : "";
|
|
1078
|
-
}
|
|
1079
|
-
}
|
|
1080
|
-
}
|
|
1081
|
-
let end = "";
|
|
1082
|
-
if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!") {
|
|
1083
|
-
end = "(?:$|\\/)";
|
|
1084
|
-
}
|
|
1085
|
-
const final2 = start2 + src + end;
|
|
1086
|
-
return [
|
|
1087
|
-
final2,
|
|
1088
|
-
unescape(src),
|
|
1089
|
-
__privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
|
|
1090
|
-
__privateGet(this, _uflag)
|
|
1091
|
-
];
|
|
1092
|
-
}
|
|
1093
|
-
const repeated = this.type === "*" || this.type === "+";
|
|
1094
|
-
const start = this.type === "!" ? "(?:(?!(?:" : "(?:";
|
|
1095
|
-
let body = __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, dot);
|
|
1096
|
-
if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
|
|
1097
|
-
const s = this.toString();
|
|
1098
|
-
__privateSet(this, _parts, [s]);
|
|
1099
|
-
this.type = null;
|
|
1100
|
-
__privateSet(this, _hasMagic, void 0);
|
|
1101
|
-
return [s, unescape(this.toString()), false, false];
|
|
1102
|
-
}
|
|
1103
|
-
let bodyDotAllowed = !repeated || allowDot || dot || false ? "" : __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, true);
|
|
1104
|
-
if (bodyDotAllowed === body) {
|
|
1105
|
-
bodyDotAllowed = "";
|
|
1106
|
-
}
|
|
1107
|
-
if (bodyDotAllowed) {
|
|
1108
|
-
body = `(?:${body})(?:${bodyDotAllowed})*?`;
|
|
1109
|
-
}
|
|
1110
|
-
let final = "";
|
|
1111
|
-
if (this.type === "!" && __privateGet(this, _emptyExt)) {
|
|
1112
|
-
final = (this.isStart() && !dot ? startNoDot : "") + starNoEmpty;
|
|
1113
|
-
} else {
|
|
1114
|
-
const close = this.type === "!" ? (
|
|
1115
|
-
// !() must match something,but !(x) can match ''
|
|
1116
|
-
"))" + (this.isStart() && !dot && !allowDot ? startNoDot : "") + star + ")"
|
|
1117
|
-
) : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && bodyDotAllowed ? ")" : this.type === "*" && bodyDotAllowed ? `)?` : `)${this.type}`;
|
|
1118
|
-
final = start + body + close;
|
|
1119
|
-
}
|
|
1120
|
-
return [
|
|
1121
|
-
final,
|
|
1122
|
-
unescape(body),
|
|
1123
|
-
__privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
|
|
1124
|
-
__privateGet(this, _uflag)
|
|
1125
|
-
];
|
|
1126
|
-
}
|
|
1127
|
-
};
|
|
1128
|
-
_root = new WeakMap();
|
|
1129
|
-
_hasMagic = new WeakMap();
|
|
1130
|
-
_uflag = new WeakMap();
|
|
1131
|
-
_parts = new WeakMap();
|
|
1132
|
-
_parent = new WeakMap();
|
|
1133
|
-
_parentIndex = new WeakMap();
|
|
1134
|
-
_negs = new WeakMap();
|
|
1135
|
-
_filledNegs = new WeakMap();
|
|
1136
|
-
_options = new WeakMap();
|
|
1137
|
-
_toString = new WeakMap();
|
|
1138
|
-
_emptyExt = new WeakMap();
|
|
1139
|
-
_AST_instances = new WeakSet();
|
|
1140
|
-
fillNegs_fn = function() {
|
|
1141
|
-
if (this !== __privateGet(this, _root))
|
|
1142
|
-
throw new Error("should only call on root");
|
|
1143
|
-
if (__privateGet(this, _filledNegs))
|
|
1144
|
-
return this;
|
|
1145
|
-
this.toString();
|
|
1146
|
-
__privateSet(this, _filledNegs, true);
|
|
1147
|
-
let n;
|
|
1148
|
-
while (n = __privateGet(this, _negs).pop()) {
|
|
1149
|
-
if (n.type !== "!")
|
|
1150
|
-
continue;
|
|
1151
|
-
let p = n;
|
|
1152
|
-
let pp = __privateGet(p, _parent);
|
|
1153
|
-
while (pp) {
|
|
1154
|
-
for (let i2 = __privateGet(p, _parentIndex) + 1; !pp.type && i2 < __privateGet(pp, _parts).length; i2++) {
|
|
1155
|
-
for (const part of __privateGet(n, _parts)) {
|
|
1156
|
-
if (typeof part === "string") {
|
|
1157
|
-
throw new Error("string part in extglob AST??");
|
|
1158
|
-
}
|
|
1159
|
-
part.copyIn(__privateGet(pp, _parts)[i2]);
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1162
|
-
p = pp;
|
|
1163
|
-
pp = __privateGet(p, _parent);
|
|
1164
|
-
}
|
|
1165
|
-
}
|
|
1166
|
-
return this;
|
|
1167
|
-
};
|
|
1168
|
-
_AST_static = new WeakSet();
|
|
1169
|
-
parseAST_fn = function(str, ast, pos, opt) {
|
|
1170
|
-
var _a, _b;
|
|
1171
|
-
let escaping = false;
|
|
1172
|
-
let inBrace = false;
|
|
1173
|
-
let braceStart = -1;
|
|
1174
|
-
let braceNeg = false;
|
|
1175
|
-
if (ast.type === null) {
|
|
1176
|
-
let i3 = pos;
|
|
1177
|
-
let acc2 = "";
|
|
1178
|
-
while (i3 < str.length) {
|
|
1179
|
-
const c = str.charAt(i3++);
|
|
1180
|
-
if (escaping || c === "\\") {
|
|
1181
|
-
escaping = !escaping;
|
|
1182
|
-
acc2 += c;
|
|
1183
|
-
continue;
|
|
1184
|
-
}
|
|
1185
|
-
if (inBrace) {
|
|
1186
|
-
if (i3 === braceStart + 1) {
|
|
1187
|
-
if (c === "^" || c === "!") {
|
|
1188
|
-
braceNeg = true;
|
|
1189
|
-
}
|
|
1190
|
-
} else if (c === "]" && !(i3 === braceStart + 2 && braceNeg)) {
|
|
1191
|
-
inBrace = false;
|
|
1192
|
-
}
|
|
1193
|
-
acc2 += c;
|
|
1194
|
-
continue;
|
|
1195
|
-
} else if (c === "[") {
|
|
1196
|
-
inBrace = true;
|
|
1197
|
-
braceStart = i3;
|
|
1198
|
-
braceNeg = false;
|
|
1199
|
-
acc2 += c;
|
|
1200
|
-
continue;
|
|
1201
|
-
}
|
|
1202
|
-
if (!opt.noext && isExtglobType(c) && str.charAt(i3) === "(") {
|
|
1203
|
-
ast.push(acc2);
|
|
1204
|
-
acc2 = "";
|
|
1205
|
-
const ext2 = new _AST(c, ast);
|
|
1206
|
-
i3 = __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, str, ext2, i3, opt);
|
|
1207
|
-
ast.push(ext2);
|
|
1208
|
-
continue;
|
|
1209
|
-
}
|
|
1210
|
-
acc2 += c;
|
|
1211
|
-
}
|
|
1212
|
-
ast.push(acc2);
|
|
1213
|
-
return i3;
|
|
1214
|
-
}
|
|
1215
|
-
let i2 = pos + 1;
|
|
1216
|
-
let part = new _AST(null, ast);
|
|
1217
|
-
const parts = [];
|
|
1218
|
-
let acc = "";
|
|
1219
|
-
while (i2 < str.length) {
|
|
1220
|
-
const c = str.charAt(i2++);
|
|
1221
|
-
if (escaping || c === "\\") {
|
|
1222
|
-
escaping = !escaping;
|
|
1223
|
-
acc += c;
|
|
1224
|
-
continue;
|
|
1225
|
-
}
|
|
1226
|
-
if (inBrace) {
|
|
1227
|
-
if (i2 === braceStart + 1) {
|
|
1228
|
-
if (c === "^" || c === "!") {
|
|
1229
|
-
braceNeg = true;
|
|
1230
|
-
}
|
|
1231
|
-
} else if (c === "]" && !(i2 === braceStart + 2 && braceNeg)) {
|
|
1232
|
-
inBrace = false;
|
|
1233
|
-
}
|
|
1234
|
-
acc += c;
|
|
1235
|
-
continue;
|
|
1236
|
-
} else if (c === "[") {
|
|
1237
|
-
inBrace = true;
|
|
1238
|
-
braceStart = i2;
|
|
1239
|
-
braceNeg = false;
|
|
1240
|
-
acc += c;
|
|
1241
|
-
continue;
|
|
1242
|
-
}
|
|
1243
|
-
if (isExtglobType(c) && str.charAt(i2) === "(") {
|
|
1244
|
-
part.push(acc);
|
|
1245
|
-
acc = "";
|
|
1246
|
-
const ext2 = new _AST(c, part);
|
|
1247
|
-
part.push(ext2);
|
|
1248
|
-
i2 = __privateMethod(_b = _AST, _AST_static, parseAST_fn).call(_b, str, ext2, i2, opt);
|
|
1249
|
-
continue;
|
|
1250
|
-
}
|
|
1251
|
-
if (c === "|") {
|
|
1252
|
-
part.push(acc);
|
|
1253
|
-
acc = "";
|
|
1254
|
-
parts.push(part);
|
|
1255
|
-
part = new _AST(null, ast);
|
|
1256
|
-
continue;
|
|
1257
|
-
}
|
|
1258
|
-
if (c === ")") {
|
|
1259
|
-
if (acc === "" && __privateGet(ast, _parts).length === 0) {
|
|
1260
|
-
__privateSet(ast, _emptyExt, true);
|
|
1261
|
-
}
|
|
1262
|
-
part.push(acc);
|
|
1263
|
-
acc = "";
|
|
1264
|
-
ast.push(...parts, part);
|
|
1265
|
-
return i2;
|
|
1266
|
-
}
|
|
1267
|
-
acc += c;
|
|
1268
|
-
}
|
|
1269
|
-
ast.type = null;
|
|
1270
|
-
__privateSet(ast, _hasMagic, void 0);
|
|
1271
|
-
__privateSet(ast, _parts, [str.substring(pos - 1)]);
|
|
1272
|
-
return i2;
|
|
1273
|
-
};
|
|
1274
|
-
partsToRegExp_fn = function(dot) {
|
|
1275
|
-
return __privateGet(this, _parts).map((p) => {
|
|
1276
|
-
if (typeof p === "string") {
|
|
1277
|
-
throw new Error("string type in extglob ast??");
|
|
1278
|
-
}
|
|
1279
|
-
const [re, _, _hasMagic2, uflag] = p.toRegExpSource(dot);
|
|
1280
|
-
__privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
|
|
1281
|
-
return re;
|
|
1282
|
-
}).filter((p) => !(this.isStart() && this.isEnd()) || !!p).join("|");
|
|
1283
|
-
};
|
|
1284
|
-
parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
|
|
1285
|
-
let escaping = false;
|
|
1286
|
-
let re = "";
|
|
1287
|
-
let uflag = false;
|
|
1288
|
-
for (let i2 = 0; i2 < glob.length; i2++) {
|
|
1289
|
-
const c = glob.charAt(i2);
|
|
1290
|
-
if (escaping) {
|
|
1291
|
-
escaping = false;
|
|
1292
|
-
re += (reSpecials.has(c) ? "\\" : "") + c;
|
|
1293
|
-
continue;
|
|
1294
|
-
}
|
|
1295
|
-
if (c === "\\") {
|
|
1296
|
-
if (i2 === glob.length - 1) {
|
|
1297
|
-
re += "\\\\";
|
|
1298
|
-
} else {
|
|
1299
|
-
escaping = true;
|
|
1300
|
-
}
|
|
1301
|
-
continue;
|
|
1302
|
-
}
|
|
1303
|
-
if (c === "[") {
|
|
1304
|
-
const [src, needUflag, consumed, magic] = parseClass(glob, i2);
|
|
1305
|
-
if (consumed) {
|
|
1306
|
-
re += src;
|
|
1307
|
-
uflag = uflag || needUflag;
|
|
1308
|
-
i2 += consumed - 1;
|
|
1309
|
-
hasMagic = hasMagic || magic;
|
|
1310
|
-
continue;
|
|
1311
|
-
}
|
|
1312
|
-
}
|
|
1313
|
-
if (c === "*") {
|
|
1314
|
-
if (noEmpty && glob === "*")
|
|
1315
|
-
re += starNoEmpty;
|
|
1316
|
-
else
|
|
1317
|
-
re += star;
|
|
1318
|
-
hasMagic = true;
|
|
1319
|
-
continue;
|
|
1320
|
-
}
|
|
1321
|
-
if (c === "?") {
|
|
1322
|
-
re += qmark;
|
|
1323
|
-
hasMagic = true;
|
|
1324
|
-
continue;
|
|
1325
|
-
}
|
|
1326
|
-
re += regExpEscape(c);
|
|
1327
|
-
}
|
|
1328
|
-
return [re, unescape(glob), !!hasMagic, uflag];
|
|
1329
|
-
};
|
|
1330
|
-
__privateAdd(_AST, _AST_static);
|
|
1331
|
-
var AST = _AST;
|
|
1332
|
-
|
|
1333
|
-
// node_modules/minimatch/dist/esm/escape.js
|
|
1334
|
-
var escape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
1335
|
-
return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
|
|
1336
|
-
};
|
|
1337
|
-
|
|
1338
|
-
// node_modules/minimatch/dist/esm/index.js
|
|
1339
|
-
var minimatch = (p, pattern, options = {}) => {
|
|
1340
|
-
assertValidPattern(pattern);
|
|
1341
|
-
if (!options.nocomment && pattern.charAt(0) === "#") {
|
|
1342
|
-
return false;
|
|
1343
|
-
}
|
|
1344
|
-
return new Minimatch(pattern, options).match(p);
|
|
1345
|
-
};
|
|
1346
|
-
var starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
|
|
1347
|
-
var starDotExtTest = (ext2) => (f) => !f.startsWith(".") && f.endsWith(ext2);
|
|
1348
|
-
var starDotExtTestDot = (ext2) => (f) => f.endsWith(ext2);
|
|
1349
|
-
var starDotExtTestNocase = (ext2) => {
|
|
1350
|
-
ext2 = ext2.toLowerCase();
|
|
1351
|
-
return (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext2);
|
|
1352
|
-
};
|
|
1353
|
-
var starDotExtTestNocaseDot = (ext2) => {
|
|
1354
|
-
ext2 = ext2.toLowerCase();
|
|
1355
|
-
return (f) => f.toLowerCase().endsWith(ext2);
|
|
1356
|
-
};
|
|
1357
|
-
var starDotStarRE = /^\*+\.\*+$/;
|
|
1358
|
-
var starDotStarTest = (f) => !f.startsWith(".") && f.includes(".");
|
|
1359
|
-
var starDotStarTestDot = (f) => f !== "." && f !== ".." && f.includes(".");
|
|
1360
|
-
var dotStarRE = /^\.\*+$/;
|
|
1361
|
-
var dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith(".");
|
|
1362
|
-
var starRE = /^\*+$/;
|
|
1363
|
-
var starTest = (f) => f.length !== 0 && !f.startsWith(".");
|
|
1364
|
-
var starTestDot = (f) => f.length !== 0 && f !== "." && f !== "..";
|
|
1365
|
-
var qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
|
|
1366
|
-
var qmarksTestNocase = ([$0, ext2 = ""]) => {
|
|
1367
|
-
const noext = qmarksTestNoExt([$0]);
|
|
1368
|
-
if (!ext2)
|
|
1369
|
-
return noext;
|
|
1370
|
-
ext2 = ext2.toLowerCase();
|
|
1371
|
-
return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
|
|
1372
|
-
};
|
|
1373
|
-
var qmarksTestNocaseDot = ([$0, ext2 = ""]) => {
|
|
1374
|
-
const noext = qmarksTestNoExtDot([$0]);
|
|
1375
|
-
if (!ext2)
|
|
1376
|
-
return noext;
|
|
1377
|
-
ext2 = ext2.toLowerCase();
|
|
1378
|
-
return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
|
|
1379
|
-
};
|
|
1380
|
-
var qmarksTestDot = ([$0, ext2 = ""]) => {
|
|
1381
|
-
const noext = qmarksTestNoExtDot([$0]);
|
|
1382
|
-
return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
|
|
1383
|
-
};
|
|
1384
|
-
var qmarksTest = ([$0, ext2 = ""]) => {
|
|
1385
|
-
const noext = qmarksTestNoExt([$0]);
|
|
1386
|
-
return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
|
|
1387
|
-
};
|
|
1388
|
-
var qmarksTestNoExt = ([$0]) => {
|
|
1389
|
-
const len = $0.length;
|
|
1390
|
-
return (f) => f.length === len && !f.startsWith(".");
|
|
1391
|
-
};
|
|
1392
|
-
var qmarksTestNoExtDot = ([$0]) => {
|
|
1393
|
-
const len = $0.length;
|
|
1394
|
-
return (f) => f.length === len && f !== "." && f !== "..";
|
|
1395
|
-
};
|
|
1396
|
-
var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
1397
|
-
var path = {
|
|
1398
|
-
win32: { sep: "\\" },
|
|
1399
|
-
posix: { sep: "/" }
|
|
1400
|
-
};
|
|
1401
|
-
var sep = defaultPlatform === "win32" ? path.win32.sep : path.posix.sep;
|
|
1402
|
-
minimatch.sep = sep;
|
|
1403
|
-
var GLOBSTAR = Symbol("globstar **");
|
|
1404
|
-
minimatch.GLOBSTAR = GLOBSTAR;
|
|
1405
|
-
var qmark2 = "[^/]";
|
|
1406
|
-
var star2 = qmark2 + "*?";
|
|
1407
|
-
var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
|
|
1408
|
-
var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
|
|
1409
|
-
var filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
|
|
1410
|
-
minimatch.filter = filter;
|
|
1411
|
-
var ext = (a, b = {}) => Object.assign({}, a, b);
|
|
1412
|
-
var defaults = (def) => {
|
|
1413
|
-
if (!def || typeof def !== "object" || !Object.keys(def).length) {
|
|
1414
|
-
return minimatch;
|
|
1415
|
-
}
|
|
1416
|
-
const orig = minimatch;
|
|
1417
|
-
const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
|
|
1418
|
-
return Object.assign(m, {
|
|
1419
|
-
Minimatch: class Minimatch extends orig.Minimatch {
|
|
1420
|
-
constructor(pattern, options = {}) {
|
|
1421
|
-
super(pattern, ext(def, options));
|
|
1422
|
-
}
|
|
1423
|
-
static defaults(options) {
|
|
1424
|
-
return orig.defaults(ext(def, options)).Minimatch;
|
|
1425
|
-
}
|
|
1426
|
-
},
|
|
1427
|
-
AST: class AST extends orig.AST {
|
|
1428
|
-
/* c8 ignore start */
|
|
1429
|
-
constructor(type, parent, options = {}) {
|
|
1430
|
-
super(type, parent, ext(def, options));
|
|
1431
|
-
}
|
|
1432
|
-
/* c8 ignore stop */
|
|
1433
|
-
static fromGlob(pattern, options = {}) {
|
|
1434
|
-
return orig.AST.fromGlob(pattern, ext(def, options));
|
|
1435
|
-
}
|
|
1436
|
-
},
|
|
1437
|
-
unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
|
|
1438
|
-
escape: (s, options = {}) => orig.escape(s, ext(def, options)),
|
|
1439
|
-
filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
|
|
1440
|
-
defaults: (options) => orig.defaults(ext(def, options)),
|
|
1441
|
-
makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
|
|
1442
|
-
braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
|
|
1443
|
-
match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
|
|
1444
|
-
sep: orig.sep,
|
|
1445
|
-
GLOBSTAR
|
|
1446
|
-
});
|
|
1447
|
-
};
|
|
1448
|
-
minimatch.defaults = defaults;
|
|
1449
|
-
var braceExpand = (pattern, options = {}) => {
|
|
1450
|
-
assertValidPattern(pattern);
|
|
1451
|
-
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
|
|
1452
|
-
return [pattern];
|
|
1453
|
-
}
|
|
1454
|
-
return (0, import_brace_expansion.default)(pattern);
|
|
1455
|
-
};
|
|
1456
|
-
minimatch.braceExpand = braceExpand;
|
|
1457
|
-
var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
|
|
1458
|
-
minimatch.makeRe = makeRe;
|
|
1459
|
-
var match = (list, pattern, options = {}) => {
|
|
1460
|
-
const mm = new Minimatch(pattern, options);
|
|
1461
|
-
list = list.filter((f) => mm.match(f));
|
|
1462
|
-
if (mm.options.nonull && !list.length) {
|
|
1463
|
-
list.push(pattern);
|
|
1464
|
-
}
|
|
1465
|
-
return list;
|
|
1466
|
-
};
|
|
1467
|
-
minimatch.match = match;
|
|
1468
|
-
var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
|
|
1469
|
-
var regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
1470
|
-
var Minimatch = class {
|
|
1471
|
-
options;
|
|
1472
|
-
set;
|
|
1473
|
-
pattern;
|
|
1474
|
-
windowsPathsNoEscape;
|
|
1475
|
-
nonegate;
|
|
1476
|
-
negate;
|
|
1477
|
-
comment;
|
|
1478
|
-
empty;
|
|
1479
|
-
preserveMultipleSlashes;
|
|
1480
|
-
partial;
|
|
1481
|
-
globSet;
|
|
1482
|
-
globParts;
|
|
1483
|
-
nocase;
|
|
1484
|
-
isWindows;
|
|
1485
|
-
platform;
|
|
1486
|
-
windowsNoMagicRoot;
|
|
1487
|
-
regexp;
|
|
1488
|
-
constructor(pattern, options = {}) {
|
|
1489
|
-
assertValidPattern(pattern);
|
|
1490
|
-
options = options || {};
|
|
1491
|
-
this.options = options;
|
|
1492
|
-
this.pattern = pattern;
|
|
1493
|
-
this.platform = options.platform || defaultPlatform;
|
|
1494
|
-
this.isWindows = this.platform === "win32";
|
|
1495
|
-
this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
|
|
1496
|
-
if (this.windowsPathsNoEscape) {
|
|
1497
|
-
this.pattern = this.pattern.replace(/\\/g, "/");
|
|
1498
|
-
}
|
|
1499
|
-
this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
|
|
1500
|
-
this.regexp = null;
|
|
1501
|
-
this.negate = false;
|
|
1502
|
-
this.nonegate = !!options.nonegate;
|
|
1503
|
-
this.comment = false;
|
|
1504
|
-
this.empty = false;
|
|
1505
|
-
this.partial = !!options.partial;
|
|
1506
|
-
this.nocase = !!this.options.nocase;
|
|
1507
|
-
this.windowsNoMagicRoot = options.windowsNoMagicRoot !== void 0 ? options.windowsNoMagicRoot : !!(this.isWindows && this.nocase);
|
|
1508
|
-
this.globSet = [];
|
|
1509
|
-
this.globParts = [];
|
|
1510
|
-
this.set = [];
|
|
1511
|
-
this.make();
|
|
1512
|
-
}
|
|
1513
|
-
hasMagic() {
|
|
1514
|
-
if (this.options.magicalBraces && this.set.length > 1) {
|
|
1515
|
-
return true;
|
|
1516
|
-
}
|
|
1517
|
-
for (const pattern of this.set) {
|
|
1518
|
-
for (const part of pattern) {
|
|
1519
|
-
if (typeof part !== "string")
|
|
1520
|
-
return true;
|
|
1521
|
-
}
|
|
1522
|
-
}
|
|
1523
|
-
return false;
|
|
1524
|
-
}
|
|
1525
|
-
debug(..._) {
|
|
1526
|
-
}
|
|
1527
|
-
make() {
|
|
1528
|
-
const pattern = this.pattern;
|
|
1529
|
-
const options = this.options;
|
|
1530
|
-
if (!options.nocomment && pattern.charAt(0) === "#") {
|
|
1531
|
-
this.comment = true;
|
|
1532
|
-
return;
|
|
1533
|
-
}
|
|
1534
|
-
if (!pattern) {
|
|
1535
|
-
this.empty = true;
|
|
1536
|
-
return;
|
|
1537
|
-
}
|
|
1538
|
-
this.parseNegate();
|
|
1539
|
-
this.globSet = [...new Set(this.braceExpand())];
|
|
1540
|
-
if (options.debug) {
|
|
1541
|
-
this.debug = (...args) => console.error(...args);
|
|
1542
|
-
}
|
|
1543
|
-
this.debug(this.pattern, this.globSet);
|
|
1544
|
-
const rawGlobParts = this.globSet.map((s) => this.slashSplit(s));
|
|
1545
|
-
this.globParts = this.preprocess(rawGlobParts);
|
|
1546
|
-
this.debug(this.pattern, this.globParts);
|
|
1547
|
-
let set = this.globParts.map((s, _, __) => {
|
|
1548
|
-
if (this.isWindows && this.windowsNoMagicRoot) {
|
|
1549
|
-
const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]);
|
|
1550
|
-
const isDrive = /^[a-z]:/i.test(s[0]);
|
|
1551
|
-
if (isUNC) {
|
|
1552
|
-
return [...s.slice(0, 4), ...s.slice(4).map((ss) => this.parse(ss))];
|
|
1553
|
-
} else if (isDrive) {
|
|
1554
|
-
return [s[0], ...s.slice(1).map((ss) => this.parse(ss))];
|
|
1555
|
-
}
|
|
1556
|
-
}
|
|
1557
|
-
return s.map((ss) => this.parse(ss));
|
|
1558
|
-
});
|
|
1559
|
-
this.debug(this.pattern, set);
|
|
1560
|
-
this.set = set.filter((s) => s.indexOf(false) === -1);
|
|
1561
|
-
if (this.isWindows) {
|
|
1562
|
-
for (let i2 = 0; i2 < this.set.length; i2++) {
|
|
1563
|
-
const p = this.set[i2];
|
|
1564
|
-
if (p[0] === "" && p[1] === "" && this.globParts[i2][2] === "?" && typeof p[3] === "string" && /^[a-z]:$/i.test(p[3])) {
|
|
1565
|
-
p[2] = "?";
|
|
1566
|
-
}
|
|
1567
|
-
}
|
|
1568
|
-
}
|
|
1569
|
-
this.debug(this.pattern, this.set);
|
|
1570
|
-
}
|
|
1571
|
-
// various transforms to equivalent pattern sets that are
|
|
1572
|
-
// faster to process in a filesystem walk. The goal is to
|
|
1573
|
-
// eliminate what we can, and push all ** patterns as far
|
|
1574
|
-
// to the right as possible, even if it increases the number
|
|
1575
|
-
// of patterns that we have to process.
|
|
1576
|
-
preprocess(globParts) {
|
|
1577
|
-
if (this.options.noglobstar) {
|
|
1578
|
-
for (let i2 = 0; i2 < globParts.length; i2++) {
|
|
1579
|
-
for (let j = 0; j < globParts[i2].length; j++) {
|
|
1580
|
-
if (globParts[i2][j] === "**") {
|
|
1581
|
-
globParts[i2][j] = "*";
|
|
1582
|
-
}
|
|
1583
|
-
}
|
|
1584
|
-
}
|
|
1585
|
-
}
|
|
1586
|
-
const { optimizationLevel = 1 } = this.options;
|
|
1587
|
-
if (optimizationLevel >= 2) {
|
|
1588
|
-
globParts = this.firstPhasePreProcess(globParts);
|
|
1589
|
-
globParts = this.secondPhasePreProcess(globParts);
|
|
1590
|
-
} else if (optimizationLevel >= 1) {
|
|
1591
|
-
globParts = this.levelOneOptimize(globParts);
|
|
1592
|
-
} else {
|
|
1593
|
-
globParts = this.adjascentGlobstarOptimize(globParts);
|
|
1594
|
-
}
|
|
1595
|
-
return globParts;
|
|
1596
|
-
}
|
|
1597
|
-
// just get rid of adjascent ** portions
|
|
1598
|
-
adjascentGlobstarOptimize(globParts) {
|
|
1599
|
-
return globParts.map((parts) => {
|
|
1600
|
-
let gs = -1;
|
|
1601
|
-
while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
|
|
1602
|
-
let i2 = gs;
|
|
1603
|
-
while (parts[i2 + 1] === "**") {
|
|
1604
|
-
i2++;
|
|
1605
|
-
}
|
|
1606
|
-
if (i2 !== gs) {
|
|
1607
|
-
parts.splice(gs, i2 - gs);
|
|
1608
|
-
}
|
|
1609
|
-
}
|
|
1610
|
-
return parts;
|
|
1611
|
-
});
|
|
1612
|
-
}
|
|
1613
|
-
// get rid of adjascent ** and resolve .. portions
|
|
1614
|
-
levelOneOptimize(globParts) {
|
|
1615
|
-
return globParts.map((parts) => {
|
|
1616
|
-
parts = parts.reduce((set, part) => {
|
|
1617
|
-
const prev = set[set.length - 1];
|
|
1618
|
-
if (part === "**" && prev === "**") {
|
|
1619
|
-
return set;
|
|
1620
|
-
}
|
|
1621
|
-
if (part === "..") {
|
|
1622
|
-
if (prev && prev !== ".." && prev !== "." && prev !== "**") {
|
|
1623
|
-
set.pop();
|
|
1624
|
-
return set;
|
|
1625
|
-
}
|
|
1626
|
-
}
|
|
1627
|
-
set.push(part);
|
|
1628
|
-
return set;
|
|
1629
|
-
}, []);
|
|
1630
|
-
return parts.length === 0 ? [""] : parts;
|
|
1631
|
-
});
|
|
1632
|
-
}
|
|
1633
|
-
levelTwoFileOptimize(parts) {
|
|
1634
|
-
if (!Array.isArray(parts)) {
|
|
1635
|
-
parts = this.slashSplit(parts);
|
|
1636
|
-
}
|
|
1637
|
-
let didSomething = false;
|
|
1638
|
-
do {
|
|
1639
|
-
didSomething = false;
|
|
1640
|
-
if (!this.preserveMultipleSlashes) {
|
|
1641
|
-
for (let i2 = 1; i2 < parts.length - 1; i2++) {
|
|
1642
|
-
const p = parts[i2];
|
|
1643
|
-
if (i2 === 1 && p === "" && parts[0] === "")
|
|
1644
|
-
continue;
|
|
1645
|
-
if (p === "." || p === "") {
|
|
1646
|
-
didSomething = true;
|
|
1647
|
-
parts.splice(i2, 1);
|
|
1648
|
-
i2--;
|
|
1649
|
-
}
|
|
1650
|
-
}
|
|
1651
|
-
if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
|
|
1652
|
-
didSomething = true;
|
|
1653
|
-
parts.pop();
|
|
1654
|
-
}
|
|
1655
|
-
}
|
|
1656
|
-
let dd = 0;
|
|
1657
|
-
while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
|
|
1658
|
-
const p = parts[dd - 1];
|
|
1659
|
-
if (p && p !== "." && p !== ".." && p !== "**") {
|
|
1660
|
-
didSomething = true;
|
|
1661
|
-
parts.splice(dd - 1, 2);
|
|
1662
|
-
dd -= 2;
|
|
1663
|
-
}
|
|
1664
|
-
}
|
|
1665
|
-
} while (didSomething);
|
|
1666
|
-
return parts.length === 0 ? [""] : parts;
|
|
1667
|
-
}
|
|
1668
|
-
// First phase: single-pattern processing
|
|
1669
|
-
// <pre> is 1 or more portions
|
|
1670
|
-
// <rest> is 1 or more portions
|
|
1671
|
-
// <p> is any portion other than ., .., '', or **
|
|
1672
|
-
// <e> is . or ''
|
|
1673
|
-
//
|
|
1674
|
-
// **/.. is *brutal* for filesystem walking performance, because
|
|
1675
|
-
// it effectively resets the recursive walk each time it occurs,
|
|
1676
|
-
// and ** cannot be reduced out by a .. pattern part like a regexp
|
|
1677
|
-
// or most strings (other than .., ., and '') can be.
|
|
1678
|
-
//
|
|
1679
|
-
// <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}
|
|
1680
|
-
// <pre>/<e>/<rest> -> <pre>/<rest>
|
|
1681
|
-
// <pre>/<p>/../<rest> -> <pre>/<rest>
|
|
1682
|
-
// **/**/<rest> -> **/<rest>
|
|
1683
|
-
//
|
|
1684
|
-
// **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow
|
|
1685
|
-
// this WOULD be allowed if ** did follow symlinks, or * didn't
|
|
1686
|
-
firstPhasePreProcess(globParts) {
|
|
1687
|
-
let didSomething = false;
|
|
1688
|
-
do {
|
|
1689
|
-
didSomething = false;
|
|
1690
|
-
for (let parts of globParts) {
|
|
1691
|
-
let gs = -1;
|
|
1692
|
-
while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
|
|
1693
|
-
let gss = gs;
|
|
1694
|
-
while (parts[gss + 1] === "**") {
|
|
1695
|
-
gss++;
|
|
1696
|
-
}
|
|
1697
|
-
if (gss > gs) {
|
|
1698
|
-
parts.splice(gs + 1, gss - gs);
|
|
1699
|
-
}
|
|
1700
|
-
let next = parts[gs + 1];
|
|
1701
|
-
const p = parts[gs + 2];
|
|
1702
|
-
const p2 = parts[gs + 3];
|
|
1703
|
-
if (next !== "..")
|
|
1704
|
-
continue;
|
|
1705
|
-
if (!p || p === "." || p === ".." || !p2 || p2 === "." || p2 === "..") {
|
|
1706
|
-
continue;
|
|
1707
|
-
}
|
|
1708
|
-
didSomething = true;
|
|
1709
|
-
parts.splice(gs, 1);
|
|
1710
|
-
const other = parts.slice(0);
|
|
1711
|
-
other[gs] = "**";
|
|
1712
|
-
globParts.push(other);
|
|
1713
|
-
gs--;
|
|
1714
|
-
}
|
|
1715
|
-
if (!this.preserveMultipleSlashes) {
|
|
1716
|
-
for (let i2 = 1; i2 < parts.length - 1; i2++) {
|
|
1717
|
-
const p = parts[i2];
|
|
1718
|
-
if (i2 === 1 && p === "" && parts[0] === "")
|
|
1719
|
-
continue;
|
|
1720
|
-
if (p === "." || p === "") {
|
|
1721
|
-
didSomething = true;
|
|
1722
|
-
parts.splice(i2, 1);
|
|
1723
|
-
i2--;
|
|
1724
|
-
}
|
|
1725
|
-
}
|
|
1726
|
-
if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
|
|
1727
|
-
didSomething = true;
|
|
1728
|
-
parts.pop();
|
|
1729
|
-
}
|
|
1730
|
-
}
|
|
1731
|
-
let dd = 0;
|
|
1732
|
-
while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
|
|
1733
|
-
const p = parts[dd - 1];
|
|
1734
|
-
if (p && p !== "." && p !== ".." && p !== "**") {
|
|
1735
|
-
didSomething = true;
|
|
1736
|
-
const needDot = dd === 1 && parts[dd + 1] === "**";
|
|
1737
|
-
const splin = needDot ? ["."] : [];
|
|
1738
|
-
parts.splice(dd - 1, 2, ...splin);
|
|
1739
|
-
if (parts.length === 0)
|
|
1740
|
-
parts.push("");
|
|
1741
|
-
dd -= 2;
|
|
1742
|
-
}
|
|
1743
|
-
}
|
|
1744
|
-
}
|
|
1745
|
-
} while (didSomething);
|
|
1746
|
-
return globParts;
|
|
1747
|
-
}
|
|
1748
|
-
// second phase: multi-pattern dedupes
|
|
1749
|
-
// {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest>
|
|
1750
|
-
// {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest>
|
|
1751
|
-
// {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest>
|
|
1752
|
-
//
|
|
1753
|
-
// {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest>
|
|
1754
|
-
// ^-- not valid because ** doens't follow symlinks
|
|
1755
|
-
secondPhasePreProcess(globParts) {
|
|
1756
|
-
for (let i2 = 0; i2 < globParts.length - 1; i2++) {
|
|
1757
|
-
for (let j = i2 + 1; j < globParts.length; j++) {
|
|
1758
|
-
const matched = this.partsMatch(globParts[i2], globParts[j], !this.preserveMultipleSlashes);
|
|
1759
|
-
if (!matched)
|
|
1760
|
-
continue;
|
|
1761
|
-
globParts[i2] = matched;
|
|
1762
|
-
globParts[j] = [];
|
|
1763
|
-
}
|
|
1764
|
-
}
|
|
1765
|
-
return globParts.filter((gs) => gs.length);
|
|
1766
|
-
}
|
|
1767
|
-
partsMatch(a, b, emptyGSMatch = false) {
|
|
1768
|
-
let ai = 0;
|
|
1769
|
-
let bi = 0;
|
|
1770
|
-
let result = [];
|
|
1771
|
-
let which = "";
|
|
1772
|
-
while (ai < a.length && bi < b.length) {
|
|
1773
|
-
if (a[ai] === b[bi]) {
|
|
1774
|
-
result.push(which === "b" ? b[bi] : a[ai]);
|
|
1775
|
-
ai++;
|
|
1776
|
-
bi++;
|
|
1777
|
-
} else if (emptyGSMatch && a[ai] === "**" && b[bi] === a[ai + 1]) {
|
|
1778
|
-
result.push(a[ai]);
|
|
1779
|
-
ai++;
|
|
1780
|
-
} else if (emptyGSMatch && b[bi] === "**" && a[ai] === b[bi + 1]) {
|
|
1781
|
-
result.push(b[bi]);
|
|
1782
|
-
bi++;
|
|
1783
|
-
} else if (a[ai] === "*" && b[bi] && (this.options.dot || !b[bi].startsWith(".")) && b[bi] !== "**") {
|
|
1784
|
-
if (which === "b")
|
|
1785
|
-
return false;
|
|
1786
|
-
which = "a";
|
|
1787
|
-
result.push(a[ai]);
|
|
1788
|
-
ai++;
|
|
1789
|
-
bi++;
|
|
1790
|
-
} else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
|
|
1791
|
-
if (which === "a")
|
|
1792
|
-
return false;
|
|
1793
|
-
which = "b";
|
|
1794
|
-
result.push(b[bi]);
|
|
1795
|
-
ai++;
|
|
1796
|
-
bi++;
|
|
1797
|
-
} else {
|
|
1798
|
-
return false;
|
|
1799
|
-
}
|
|
1800
|
-
}
|
|
1801
|
-
return a.length === b.length && result;
|
|
1802
|
-
}
|
|
1803
|
-
parseNegate() {
|
|
1804
|
-
if (this.nonegate)
|
|
1805
|
-
return;
|
|
1806
|
-
const pattern = this.pattern;
|
|
1807
|
-
let negate = false;
|
|
1808
|
-
let negateOffset = 0;
|
|
1809
|
-
for (let i2 = 0; i2 < pattern.length && pattern.charAt(i2) === "!"; i2++) {
|
|
1810
|
-
negate = !negate;
|
|
1811
|
-
negateOffset++;
|
|
1812
|
-
}
|
|
1813
|
-
if (negateOffset)
|
|
1814
|
-
this.pattern = pattern.slice(negateOffset);
|
|
1815
|
-
this.negate = negate;
|
|
1816
|
-
}
|
|
1817
|
-
// set partial to true to test if, for example,
|
|
1818
|
-
// "/a/b" matches the start of "/*/b/*/d"
|
|
1819
|
-
// Partial means, if you run out of file before you run
|
|
1820
|
-
// out of pattern, then that's fine, as long as all
|
|
1821
|
-
// the parts match.
|
|
1822
|
-
matchOne(file, pattern, partial = false) {
|
|
1823
|
-
const options = this.options;
|
|
1824
|
-
if (this.isWindows) {
|
|
1825
|
-
const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
|
|
1826
|
-
const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
|
|
1827
|
-
const patternDrive = typeof pattern[0] === "string" && /^[a-z]:$/i.test(pattern[0]);
|
|
1828
|
-
const patternUNC = !patternDrive && pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
|
|
1829
|
-
const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
|
|
1830
|
-
const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
|
|
1831
|
-
if (typeof fdi === "number" && typeof pdi === "number") {
|
|
1832
|
-
const [fd, pd] = [file[fdi], pattern[pdi]];
|
|
1833
|
-
if (fd.toLowerCase() === pd.toLowerCase()) {
|
|
1834
|
-
pattern[pdi] = fd;
|
|
1835
|
-
if (pdi > fdi) {
|
|
1836
|
-
pattern = pattern.slice(pdi);
|
|
1837
|
-
} else if (fdi > pdi) {
|
|
1838
|
-
file = file.slice(fdi);
|
|
1839
|
-
}
|
|
1840
|
-
}
|
|
1841
|
-
}
|
|
1842
|
-
}
|
|
1843
|
-
const { optimizationLevel = 1 } = this.options;
|
|
1844
|
-
if (optimizationLevel >= 2) {
|
|
1845
|
-
file = this.levelTwoFileOptimize(file);
|
|
1846
|
-
}
|
|
1847
|
-
this.debug("matchOne", this, { file, pattern });
|
|
1848
|
-
this.debug("matchOne", file.length, pattern.length);
|
|
1849
|
-
for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
1850
|
-
this.debug("matchOne loop");
|
|
1851
|
-
var p = pattern[pi];
|
|
1852
|
-
var f = file[fi];
|
|
1853
|
-
this.debug(pattern, p, f);
|
|
1854
|
-
if (p === false) {
|
|
1855
|
-
return false;
|
|
1856
|
-
}
|
|
1857
|
-
if (p === GLOBSTAR) {
|
|
1858
|
-
this.debug("GLOBSTAR", [pattern, p, f]);
|
|
1859
|
-
var fr = fi;
|
|
1860
|
-
var pr = pi + 1;
|
|
1861
|
-
if (pr === pl) {
|
|
1862
|
-
this.debug("** at the end");
|
|
1863
|
-
for (; fi < fl; fi++) {
|
|
1864
|
-
if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
|
|
1865
|
-
return false;
|
|
1866
|
-
}
|
|
1867
|
-
return true;
|
|
1868
|
-
}
|
|
1869
|
-
while (fr < fl) {
|
|
1870
|
-
var swallowee = file[fr];
|
|
1871
|
-
this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
|
|
1872
|
-
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
|
|
1873
|
-
this.debug("globstar found match!", fr, fl, swallowee);
|
|
1874
|
-
return true;
|
|
1875
|
-
} else {
|
|
1876
|
-
if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
|
|
1877
|
-
this.debug("dot detected!", file, fr, pattern, pr);
|
|
1878
|
-
break;
|
|
1879
|
-
}
|
|
1880
|
-
this.debug("globstar swallow a segment, and continue");
|
|
1881
|
-
fr++;
|
|
1882
|
-
}
|
|
1883
|
-
}
|
|
1884
|
-
if (partial) {
|
|
1885
|
-
this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
|
|
1886
|
-
if (fr === fl) {
|
|
1887
|
-
return true;
|
|
1888
|
-
}
|
|
1889
|
-
}
|
|
1890
|
-
return false;
|
|
1891
|
-
}
|
|
1892
|
-
let hit;
|
|
1893
|
-
if (typeof p === "string") {
|
|
1894
|
-
hit = f === p;
|
|
1895
|
-
this.debug("string match", p, f, hit);
|
|
1896
|
-
} else {
|
|
1897
|
-
hit = p.test(f);
|
|
1898
|
-
this.debug("pattern match", p, f, hit);
|
|
1899
|
-
}
|
|
1900
|
-
if (!hit)
|
|
1901
|
-
return false;
|
|
1902
|
-
}
|
|
1903
|
-
if (fi === fl && pi === pl) {
|
|
1904
|
-
return true;
|
|
1905
|
-
} else if (fi === fl) {
|
|
1906
|
-
return partial;
|
|
1907
|
-
} else if (pi === pl) {
|
|
1908
|
-
return fi === fl - 1 && file[fi] === "";
|
|
1909
|
-
} else {
|
|
1910
|
-
throw new Error("wtf?");
|
|
1911
|
-
}
|
|
1912
|
-
}
|
|
1913
|
-
braceExpand() {
|
|
1914
|
-
return braceExpand(this.pattern, this.options);
|
|
1915
|
-
}
|
|
1916
|
-
parse(pattern) {
|
|
1917
|
-
assertValidPattern(pattern);
|
|
1918
|
-
const options = this.options;
|
|
1919
|
-
if (pattern === "**")
|
|
1920
|
-
return GLOBSTAR;
|
|
1921
|
-
if (pattern === "")
|
|
1922
|
-
return "";
|
|
1923
|
-
let m;
|
|
1924
|
-
let fastTest = null;
|
|
1925
|
-
if (m = pattern.match(starRE)) {
|
|
1926
|
-
fastTest = options.dot ? starTestDot : starTest;
|
|
1927
|
-
} else if (m = pattern.match(starDotExtRE)) {
|
|
1928
|
-
fastTest = (options.nocase ? options.dot ? starDotExtTestNocaseDot : starDotExtTestNocase : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]);
|
|
1929
|
-
} else if (m = pattern.match(qmarksRE)) {
|
|
1930
|
-
fastTest = (options.nocase ? options.dot ? qmarksTestNocaseDot : qmarksTestNocase : options.dot ? qmarksTestDot : qmarksTest)(m);
|
|
1931
|
-
} else if (m = pattern.match(starDotStarRE)) {
|
|
1932
|
-
fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
|
|
1933
|
-
} else if (m = pattern.match(dotStarRE)) {
|
|
1934
|
-
fastTest = dotStarTest;
|
|
1935
|
-
}
|
|
1936
|
-
const re = AST.fromGlob(pattern, this.options).toMMPattern();
|
|
1937
|
-
if (fastTest && typeof re === "object") {
|
|
1938
|
-
Reflect.defineProperty(re, "test", { value: fastTest });
|
|
1939
|
-
}
|
|
1940
|
-
return re;
|
|
1941
|
-
}
|
|
1942
|
-
makeRe() {
|
|
1943
|
-
if (this.regexp || this.regexp === false)
|
|
1944
|
-
return this.regexp;
|
|
1945
|
-
const set = this.set;
|
|
1946
|
-
if (!set.length) {
|
|
1947
|
-
this.regexp = false;
|
|
1948
|
-
return this.regexp;
|
|
1949
|
-
}
|
|
1950
|
-
const options = this.options;
|
|
1951
|
-
const twoStar = options.noglobstar ? star2 : options.dot ? twoStarDot : twoStarNoDot;
|
|
1952
|
-
const flags = new Set(options.nocase ? ["i"] : []);
|
|
1953
|
-
let re = set.map((pattern) => {
|
|
1954
|
-
const pp = pattern.map((p) => {
|
|
1955
|
-
if (p instanceof RegExp) {
|
|
1956
|
-
for (const f of p.flags.split(""))
|
|
1957
|
-
flags.add(f);
|
|
1958
|
-
}
|
|
1959
|
-
return typeof p === "string" ? regExpEscape2(p) : p === GLOBSTAR ? GLOBSTAR : p._src;
|
|
1960
|
-
});
|
|
1961
|
-
pp.forEach((p, i2) => {
|
|
1962
|
-
const next = pp[i2 + 1];
|
|
1963
|
-
const prev = pp[i2 - 1];
|
|
1964
|
-
if (p !== GLOBSTAR || prev === GLOBSTAR) {
|
|
1965
|
-
return;
|
|
1966
|
-
}
|
|
1967
|
-
if (prev === void 0) {
|
|
1968
|
-
if (next !== void 0 && next !== GLOBSTAR) {
|
|
1969
|
-
pp[i2 + 1] = "(?:\\/|" + twoStar + "\\/)?" + next;
|
|
1970
|
-
} else {
|
|
1971
|
-
pp[i2] = twoStar;
|
|
1972
|
-
}
|
|
1973
|
-
} else if (next === void 0) {
|
|
1974
|
-
pp[i2 - 1] = prev + "(?:\\/|" + twoStar + ")?";
|
|
1975
|
-
} else if (next !== GLOBSTAR) {
|
|
1976
|
-
pp[i2 - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
|
|
1977
|
-
pp[i2 + 1] = GLOBSTAR;
|
|
1978
|
-
}
|
|
1979
|
-
});
|
|
1980
|
-
return pp.filter((p) => p !== GLOBSTAR).join("/");
|
|
1981
|
-
}).join("|");
|
|
1982
|
-
const [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
|
|
1983
|
-
re = "^" + open + re + close + "$";
|
|
1984
|
-
if (this.negate)
|
|
1985
|
-
re = "^(?!" + re + ").+$";
|
|
1986
|
-
try {
|
|
1987
|
-
this.regexp = new RegExp(re, [...flags].join(""));
|
|
1988
|
-
} catch (ex) {
|
|
1989
|
-
this.regexp = false;
|
|
1990
|
-
}
|
|
1991
|
-
return this.regexp;
|
|
1992
|
-
}
|
|
1993
|
-
slashSplit(p) {
|
|
1994
|
-
if (this.preserveMultipleSlashes) {
|
|
1995
|
-
return p.split("/");
|
|
1996
|
-
} else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
|
|
1997
|
-
return ["", ...p.split(/\/+/)];
|
|
1998
|
-
} else {
|
|
1999
|
-
return p.split(/\/+/);
|
|
2000
|
-
}
|
|
2001
|
-
}
|
|
2002
|
-
match(f, partial = this.partial) {
|
|
2003
|
-
this.debug("match", f, this.pattern);
|
|
2004
|
-
if (this.comment) {
|
|
2005
|
-
return false;
|
|
2006
|
-
}
|
|
2007
|
-
if (this.empty) {
|
|
2008
|
-
return f === "";
|
|
2009
|
-
}
|
|
2010
|
-
if (f === "/" && partial) {
|
|
2011
|
-
return true;
|
|
2012
|
-
}
|
|
2013
|
-
const options = this.options;
|
|
2014
|
-
if (this.isWindows) {
|
|
2015
|
-
f = f.split("\\").join("/");
|
|
2016
|
-
}
|
|
2017
|
-
const ff = this.slashSplit(f);
|
|
2018
|
-
this.debug(this.pattern, "split", ff);
|
|
2019
|
-
const set = this.set;
|
|
2020
|
-
this.debug(this.pattern, "set", set);
|
|
2021
|
-
let filename = ff[ff.length - 1];
|
|
2022
|
-
if (!filename) {
|
|
2023
|
-
for (let i2 = ff.length - 2; !filename && i2 >= 0; i2--) {
|
|
2024
|
-
filename = ff[i2];
|
|
2025
|
-
}
|
|
2026
|
-
}
|
|
2027
|
-
for (let i2 = 0; i2 < set.length; i2++) {
|
|
2028
|
-
const pattern = set[i2];
|
|
2029
|
-
let file = ff;
|
|
2030
|
-
if (options.matchBase && pattern.length === 1) {
|
|
2031
|
-
file = [filename];
|
|
2032
|
-
}
|
|
2033
|
-
const hit = this.matchOne(file, pattern, partial);
|
|
2034
|
-
if (hit) {
|
|
2035
|
-
if (options.flipNegate) {
|
|
2036
|
-
return true;
|
|
2037
|
-
}
|
|
2038
|
-
return !this.negate;
|
|
2039
|
-
}
|
|
2040
|
-
}
|
|
2041
|
-
if (options.flipNegate) {
|
|
2042
|
-
return false;
|
|
2043
|
-
}
|
|
2044
|
-
return this.negate;
|
|
2045
|
-
}
|
|
2046
|
-
static defaults(def) {
|
|
2047
|
-
return minimatch.defaults(def).Minimatch;
|
|
2048
|
-
}
|
|
2049
|
-
};
|
|
2050
|
-
minimatch.AST = AST;
|
|
2051
|
-
minimatch.Minimatch = Minimatch;
|
|
2052
|
-
minimatch.escape = escape;
|
|
2053
|
-
minimatch.unescape = unescape;
|
|
2054
|
-
|
|
2055
|
-
// src/utils/query-nonce-meta-tag-content.ts
|
|
2056
|
-
function queryNonceMetaTagContent(doc) {
|
|
2057
|
-
var _a, _b, _c;
|
|
2058
|
-
return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
|
|
2059
|
-
}
|
|
2060
|
-
|
|
2061
|
-
// src/utils/regular-expression.ts
|
|
2062
|
-
var escapeRegExpSpecialCharacters = (text) => {
|
|
2063
|
-
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
2064
|
-
};
|
|
2065
|
-
|
|
2066
|
-
// src/utils/remote-value.ts
|
|
2067
|
-
var RemoteValue = class _RemoteValue {
|
|
2068
|
-
/**
|
|
2069
|
-
* Deserializes a LocalValue serialized object back to its original JavaScript representation
|
|
2070
|
-
*
|
|
2071
|
-
* @param serialized The serialized LocalValue object
|
|
2072
|
-
* @returns The original JavaScript value/object
|
|
2073
|
-
*/
|
|
2074
|
-
static fromLocalValue(serialized) {
|
|
2075
|
-
const type = serialized[TYPE_CONSTANT];
|
|
2076
|
-
const value = VALUE_CONSTANT in serialized ? serialized[VALUE_CONSTANT] : void 0;
|
|
2077
|
-
switch (type) {
|
|
2078
|
-
case "string" /* String */:
|
|
2079
|
-
return value;
|
|
2080
|
-
case "boolean" /* Boolean */:
|
|
2081
|
-
return value;
|
|
2082
|
-
case "bigint" /* BigInt */:
|
|
2083
|
-
return BigInt(value);
|
|
2084
|
-
case "undefined" /* Undefined */:
|
|
2085
|
-
return void 0;
|
|
2086
|
-
case "null" /* Null */:
|
|
2087
|
-
return null;
|
|
2088
|
-
case "number" /* Number */:
|
|
2089
|
-
if (value === "NaN") return NaN;
|
|
2090
|
-
if (value === "-0") return -0;
|
|
2091
|
-
if (value === "Infinity") return Infinity;
|
|
2092
|
-
if (value === "-Infinity") return -Infinity;
|
|
2093
|
-
return value;
|
|
2094
|
-
case "array" /* Array */:
|
|
2095
|
-
return value.map((item) => _RemoteValue.fromLocalValue(item));
|
|
2096
|
-
case "date" /* Date */:
|
|
2097
|
-
return new Date(value);
|
|
2098
|
-
case "map" /* Map */:
|
|
2099
|
-
const map2 = /* @__PURE__ */ new Map();
|
|
2100
|
-
for (const [key, val] of value) {
|
|
2101
|
-
const deserializedKey = typeof key === "object" && key !== null ? _RemoteValue.fromLocalValue(key) : key;
|
|
2102
|
-
const deserializedValue = _RemoteValue.fromLocalValue(val);
|
|
2103
|
-
map2.set(deserializedKey, deserializedValue);
|
|
2104
|
-
}
|
|
2105
|
-
return map2;
|
|
2106
|
-
case "object" /* Object */:
|
|
2107
|
-
const obj = {};
|
|
2108
|
-
for (const [key, val] of value) {
|
|
2109
|
-
obj[key] = _RemoteValue.fromLocalValue(val);
|
|
2110
|
-
}
|
|
2111
|
-
return obj;
|
|
2112
|
-
case "regexp" /* RegularExpression */:
|
|
2113
|
-
const { pattern, flags } = value;
|
|
2114
|
-
return new RegExp(pattern, flags);
|
|
2115
|
-
case "set" /* Set */:
|
|
2116
|
-
const set = /* @__PURE__ */ new Set();
|
|
2117
|
-
for (const item of value) {
|
|
2118
|
-
set.add(_RemoteValue.fromLocalValue(item));
|
|
2119
|
-
}
|
|
2120
|
-
return set;
|
|
2121
|
-
case "symbol" /* Symbol */:
|
|
2122
|
-
return Symbol(value);
|
|
2123
|
-
default:
|
|
2124
|
-
throw new Error(`Unsupported type: ${type}`);
|
|
353
|
+
(e) => {
|
|
354
|
+
consoleError(e, hostRef.$hostElement$);
|
|
2125
355
|
}
|
|
356
|
+
);
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
// src/client/client-style.ts
|
|
360
|
+
var styles = /* @__PURE__ */ new Map();
|
|
361
|
+
|
|
362
|
+
// src/runtime/runtime-constants.ts
|
|
363
|
+
var CONTENT_REF_ID = "r";
|
|
364
|
+
var ORG_LOCATION_ID = "o";
|
|
365
|
+
var SLOT_NODE_ID = "s";
|
|
366
|
+
var TEXT_NODE_ID = "t";
|
|
367
|
+
var COMMENT_NODE_ID = "c";
|
|
368
|
+
var HYDRATE_ID = "s-id";
|
|
369
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
370
|
+
var HYDRATE_CHILD_ID = "c-id";
|
|
371
|
+
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
372
|
+
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
373
|
+
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
374
|
+
var win = typeof window !== "undefined" ? window : {};
|
|
375
|
+
var H = win.HTMLElement || class {
|
|
376
|
+
};
|
|
377
|
+
var plt = {
|
|
378
|
+
$flags$: 0,
|
|
379
|
+
$resourcesUrl$: "",
|
|
380
|
+
jmp: (h2) => h2(),
|
|
381
|
+
raf: (h2) => requestAnimationFrame(h2),
|
|
382
|
+
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
383
|
+
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
384
|
+
ce: (eventName, opts) => new CustomEvent(eventName, opts)
|
|
385
|
+
};
|
|
386
|
+
var supportsShadow = BUILD.shadowDom;
|
|
387
|
+
var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
388
|
+
var _a;
|
|
389
|
+
let supportsListenerOptions2 = false;
|
|
390
|
+
try {
|
|
391
|
+
(_a = win.document) == null ? void 0 : _a.addEventListener(
|
|
392
|
+
"e",
|
|
393
|
+
null,
|
|
394
|
+
Object.defineProperty({}, "passive", {
|
|
395
|
+
get() {
|
|
396
|
+
supportsListenerOptions2 = true;
|
|
397
|
+
}
|
|
398
|
+
})
|
|
399
|
+
);
|
|
400
|
+
} catch (e) {
|
|
2126
401
|
}
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
static fromLocalValueArray(serializedValues) {
|
|
2134
|
-
return serializedValues.map((value) => _RemoteValue.fromLocalValue(value));
|
|
2135
|
-
}
|
|
2136
|
-
/**
|
|
2137
|
-
* Verifies if the given object matches the structure of a serialized LocalValue
|
|
2138
|
-
*
|
|
2139
|
-
* @param obj Object to verify
|
|
2140
|
-
* @returns boolean indicating if the object has LocalValue structure
|
|
2141
|
-
*/
|
|
2142
|
-
static isLocalValueObject(obj) {
|
|
2143
|
-
if (typeof obj !== "object" || obj === null) {
|
|
2144
|
-
return false;
|
|
2145
|
-
}
|
|
2146
|
-
if (!obj.hasOwnProperty(TYPE_CONSTANT)) {
|
|
2147
|
-
return false;
|
|
2148
|
-
}
|
|
2149
|
-
const type = obj[TYPE_CONSTANT];
|
|
2150
|
-
const hasTypeProperty = Object.values({ ...PrimitiveType, ...NonPrimitiveType }).includes(type);
|
|
2151
|
-
if (!hasTypeProperty) {
|
|
402
|
+
return supportsListenerOptions2;
|
|
403
|
+
})();
|
|
404
|
+
var promiseResolve = (v) => Promise.resolve(v);
|
|
405
|
+
var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
|
|
406
|
+
try {
|
|
407
|
+
if (!win.document.adoptedStyleSheets) {
|
|
2152
408
|
return false;
|
|
2153
409
|
}
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
return true;
|
|
410
|
+
new CSSStyleSheet();
|
|
411
|
+
return typeof new CSSStyleSheet().replaceSync === "function";
|
|
412
|
+
} catch (e) {
|
|
2158
413
|
}
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
var
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
isOk: true,
|
|
2172
|
-
isErr: false,
|
|
2173
|
-
value
|
|
2174
|
-
});
|
|
2175
|
-
var err = (value) => ({
|
|
2176
|
-
isOk: false,
|
|
2177
|
-
isErr: true,
|
|
2178
|
-
value
|
|
2179
|
-
});
|
|
2180
|
-
function map(result, fn) {
|
|
2181
|
-
if (result.isOk) {
|
|
2182
|
-
const val = fn(result.value);
|
|
2183
|
-
if (val instanceof Promise) {
|
|
2184
|
-
return val.then((newVal) => ok(newVal));
|
|
414
|
+
return false;
|
|
415
|
+
})() ;
|
|
416
|
+
var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
|
|
417
|
+
var queuePending = false;
|
|
418
|
+
var queueDomReads = [];
|
|
419
|
+
var queueDomWrites = [];
|
|
420
|
+
var queueTask = (queue, write) => (cb) => {
|
|
421
|
+
queue.push(cb);
|
|
422
|
+
if (!queuePending) {
|
|
423
|
+
queuePending = true;
|
|
424
|
+
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
425
|
+
nextTick(flush);
|
|
2185
426
|
} else {
|
|
2186
|
-
|
|
427
|
+
plt.raf(flush);
|
|
2187
428
|
}
|
|
2188
429
|
}
|
|
2189
|
-
if (result.isErr) {
|
|
2190
|
-
const value = result.value;
|
|
2191
|
-
return err(value);
|
|
2192
|
-
}
|
|
2193
|
-
throw "should never get here";
|
|
2194
|
-
}
|
|
2195
|
-
var unwrap = (result) => {
|
|
2196
|
-
if (result.isOk) {
|
|
2197
|
-
return result.value;
|
|
2198
|
-
} else {
|
|
2199
|
-
throw result.value;
|
|
2200
|
-
}
|
|
2201
430
|
};
|
|
2202
|
-
var
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
431
|
+
var consume = (queue) => {
|
|
432
|
+
for (let i2 = 0; i2 < queue.length; i2++) {
|
|
433
|
+
try {
|
|
434
|
+
queue[i2](performance.now());
|
|
435
|
+
} catch (e) {
|
|
436
|
+
consoleError(e);
|
|
437
|
+
}
|
|
2207
438
|
}
|
|
439
|
+
queue.length = 0;
|
|
2208
440
|
};
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
441
|
+
var flush = () => {
|
|
442
|
+
consume(queueDomReads);
|
|
443
|
+
{
|
|
444
|
+
consume(queueDomWrites);
|
|
445
|
+
if (queuePending = queueDomReads.length > 0) {
|
|
446
|
+
plt.raf(flush);
|
|
447
|
+
}
|
|
2214
448
|
}
|
|
2215
|
-
|
|
2216
|
-
|
|
449
|
+
};
|
|
450
|
+
var nextTick = (cb) => promiseResolve().then(cb);
|
|
451
|
+
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
2217
452
|
var updateFallbackSlotVisibility = (elm) => {
|
|
2218
453
|
const childNodes = internalCall(elm, "childNodes");
|
|
2219
454
|
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
@@ -2481,6 +716,14 @@ var uniqueTime = (key, measureText) => {
|
|
|
2481
716
|
};
|
|
2482
717
|
}
|
|
2483
718
|
};
|
|
719
|
+
|
|
720
|
+
// src/utils/query-nonce-meta-tag-content.ts
|
|
721
|
+
function queryNonceMetaTagContent(doc) {
|
|
722
|
+
var _a, _b, _c;
|
|
723
|
+
return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
// src/runtime/styles.ts
|
|
2484
727
|
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
2485
728
|
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
2486
729
|
let style = styles.get(scopeId2);
|
|
@@ -2514,10 +757,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2514
757
|
}
|
|
2515
758
|
const existingStyleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`);
|
|
2516
759
|
if (existingStyleElm) {
|
|
2517
|
-
existingStyleElm.
|
|
760
|
+
existingStyleElm.textContent = style;
|
|
2518
761
|
} else if (!appliedStyles.has(scopeId2)) {
|
|
2519
762
|
styleElm = win.document.createElement("style");
|
|
2520
|
-
styleElm.
|
|
763
|
+
styleElm.textContent = style;
|
|
2521
764
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
2522
765
|
if (nonce != null) {
|
|
2523
766
|
styleElm.setAttribute("nonce", nonce);
|
|
@@ -2543,7 +786,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2543
786
|
} else {
|
|
2544
787
|
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
2545
788
|
if (existingStyleContainer) {
|
|
2546
|
-
existingStyleContainer.
|
|
789
|
+
existingStyleContainer.textContent = style + existingStyleContainer.textContent;
|
|
2547
790
|
} else {
|
|
2548
791
|
styleContainerNode.prepend(styleElm);
|
|
2549
792
|
}
|
|
@@ -2556,7 +799,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2556
799
|
styleContainerNode.insertBefore(styleElm, null);
|
|
2557
800
|
}
|
|
2558
801
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
2559
|
-
styleElm.
|
|
802
|
+
styleElm.textContent += SLOT_FB_CSS;
|
|
2560
803
|
}
|
|
2561
804
|
if (appliedStyles) {
|
|
2562
805
|
appliedStyles.add(scopeId2);
|
|
@@ -2599,6 +842,12 @@ var attachStyles = (hostRef) => {
|
|
|
2599
842
|
endAttachStyles();
|
|
2600
843
|
};
|
|
2601
844
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
845
|
+
var isComplexType = (o) => {
|
|
846
|
+
o = typeof o;
|
|
847
|
+
return o === "object" || o === "function";
|
|
848
|
+
};
|
|
849
|
+
|
|
850
|
+
// src/runtime/vdom/h.ts
|
|
2602
851
|
var h = (nodeName, vnodeData, ...children) => {
|
|
2603
852
|
if (typeof nodeName === "string") {
|
|
2604
853
|
nodeName = transformTag(nodeName);
|
|
@@ -2666,7 +915,8 @@ var newVNode = (tag, text) => {
|
|
|
2666
915
|
const vnode = {
|
|
2667
916
|
$flags$: 0,
|
|
2668
917
|
$tag$: tag,
|
|
2669
|
-
|
|
918
|
+
// Normalize undefined to null to prevent rendering "undefined" as text
|
|
919
|
+
$text$: text != null ? text : null,
|
|
2670
920
|
$elm$: null,
|
|
2671
921
|
$children$: null
|
|
2672
922
|
};
|
|
@@ -2760,7 +1010,7 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
2760
1010
|
cmpMeta.$cmpMeta$);
|
|
2761
1011
|
const styleSheet = win.document.querySelector(`style[sty-id="${scopeId3}"]`);
|
|
2762
1012
|
if (styleSheet) {
|
|
2763
|
-
|
|
1013
|
+
shadowRootNodes.unshift(styleSheet.cloneNode(true));
|
|
2764
1014
|
}
|
|
2765
1015
|
}
|
|
2766
1016
|
}
|
|
@@ -3060,18 +1310,111 @@ var findCorrespondingNode = (node, type) => {
|
|
|
3060
1310
|
} while (sibling && (sibling.nodeType !== type || !sibling.nodeValue));
|
|
3061
1311
|
return sibling;
|
|
3062
1312
|
};
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
1313
|
+
|
|
1314
|
+
// src/utils/remote-value.ts
|
|
1315
|
+
var RemoteValue = class _RemoteValue {
|
|
1316
|
+
/**
|
|
1317
|
+
* Deserializes a LocalValue serialized object back to its original JavaScript representation
|
|
1318
|
+
*
|
|
1319
|
+
* @param serialized The serialized LocalValue object
|
|
1320
|
+
* @returns The original JavaScript value/object
|
|
1321
|
+
*/
|
|
1322
|
+
static fromLocalValue(serialized) {
|
|
1323
|
+
const type = serialized[TYPE_CONSTANT];
|
|
1324
|
+
const value = VALUE_CONSTANT in serialized ? serialized[VALUE_CONSTANT] : void 0;
|
|
1325
|
+
switch (type) {
|
|
1326
|
+
case "string" /* String */:
|
|
1327
|
+
return value;
|
|
1328
|
+
case "boolean" /* Boolean */:
|
|
1329
|
+
return value;
|
|
1330
|
+
case "bigint" /* BigInt */:
|
|
1331
|
+
return BigInt(value);
|
|
1332
|
+
case "undefined" /* Undefined */:
|
|
1333
|
+
return void 0;
|
|
1334
|
+
case "null" /* Null */:
|
|
1335
|
+
return null;
|
|
1336
|
+
case "number" /* Number */:
|
|
1337
|
+
if (value === "NaN") return NaN;
|
|
1338
|
+
if (value === "-0") return -0;
|
|
1339
|
+
if (value === "Infinity") return Infinity;
|
|
1340
|
+
if (value === "-Infinity") return -Infinity;
|
|
1341
|
+
return value;
|
|
1342
|
+
case "array" /* Array */:
|
|
1343
|
+
return value.map((item) => _RemoteValue.fromLocalValue(item));
|
|
1344
|
+
case "date" /* Date */:
|
|
1345
|
+
return new Date(value);
|
|
1346
|
+
case "map" /* Map */:
|
|
1347
|
+
const map = /* @__PURE__ */ new Map();
|
|
1348
|
+
for (const [key, val] of value) {
|
|
1349
|
+
const deserializedKey = typeof key === "object" && key !== null ? _RemoteValue.fromLocalValue(key) : key;
|
|
1350
|
+
const deserializedValue = _RemoteValue.fromLocalValue(val);
|
|
1351
|
+
map.set(deserializedKey, deserializedValue);
|
|
1352
|
+
}
|
|
1353
|
+
return map;
|
|
1354
|
+
case "object" /* Object */:
|
|
1355
|
+
const obj = {};
|
|
1356
|
+
for (const [key, val] of value) {
|
|
1357
|
+
obj[key] = _RemoteValue.fromLocalValue(val);
|
|
1358
|
+
}
|
|
1359
|
+
return obj;
|
|
1360
|
+
case "regexp" /* RegularExpression */:
|
|
1361
|
+
const { pattern, flags } = value;
|
|
1362
|
+
return new RegExp(pattern, flags);
|
|
1363
|
+
case "set" /* Set */:
|
|
1364
|
+
const set = /* @__PURE__ */ new Set();
|
|
1365
|
+
for (const item of value) {
|
|
1366
|
+
set.add(_RemoteValue.fromLocalValue(item));
|
|
1367
|
+
}
|
|
1368
|
+
return set;
|
|
1369
|
+
case "symbol" /* Symbol */:
|
|
1370
|
+
return Symbol(value);
|
|
1371
|
+
default:
|
|
1372
|
+
throw new Error(`Unsupported type: ${type}`);
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
/**
|
|
1376
|
+
* Utility method to deserialize multiple LocalValues at once
|
|
1377
|
+
*
|
|
1378
|
+
* @param serializedValues Array of serialized LocalValue objects
|
|
1379
|
+
* @returns Array of deserialized JavaScript values
|
|
1380
|
+
*/
|
|
1381
|
+
static fromLocalValueArray(serializedValues) {
|
|
1382
|
+
return serializedValues.map((value) => _RemoteValue.fromLocalValue(value));
|
|
1383
|
+
}
|
|
1384
|
+
/**
|
|
1385
|
+
* Verifies if the given object matches the structure of a serialized LocalValue
|
|
1386
|
+
*
|
|
1387
|
+
* @param obj Object to verify
|
|
1388
|
+
* @returns boolean indicating if the object has LocalValue structure
|
|
1389
|
+
*/
|
|
1390
|
+
static isLocalValueObject(obj) {
|
|
1391
|
+
if (typeof obj !== "object" || obj === null) {
|
|
1392
|
+
return false;
|
|
1393
|
+
}
|
|
1394
|
+
if (!obj.hasOwnProperty(TYPE_CONSTANT)) {
|
|
1395
|
+
return false;
|
|
1396
|
+
}
|
|
1397
|
+
const type = obj[TYPE_CONSTANT];
|
|
1398
|
+
const hasTypeProperty = Object.values({ ...PrimitiveType, ...NonPrimitiveType }).includes(type);
|
|
1399
|
+
if (!hasTypeProperty) {
|
|
1400
|
+
return false;
|
|
1401
|
+
}
|
|
1402
|
+
if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
|
|
1403
|
+
return obj.hasOwnProperty(VALUE_CONSTANT);
|
|
1404
|
+
}
|
|
1405
|
+
return true;
|
|
1406
|
+
}
|
|
3071
1407
|
};
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
1408
|
+
|
|
1409
|
+
// src/utils/serialize.ts
|
|
1410
|
+
function deserializeProperty(value) {
|
|
1411
|
+
if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
|
|
1412
|
+
return value;
|
|
1413
|
+
}
|
|
1414
|
+
return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
// src/runtime/parse-property-value.ts
|
|
3075
1418
|
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
3076
1419
|
if (typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
|
|
3077
1420
|
propValue = deserializeProperty(propValue);
|
|
@@ -3162,7 +1505,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
3162
1505
|
}
|
|
3163
1506
|
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
3164
1507
|
if (newValue) {
|
|
3165
|
-
newValue
|
|
1508
|
+
queueRefAttachment(newValue, elm);
|
|
3166
1509
|
}
|
|
3167
1510
|
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
3168
1511
|
if (memberName[2] === "-") {
|
|
@@ -3288,6 +1631,8 @@ var useNativeShadowDom = false;
|
|
|
3288
1631
|
var checkSlotFallbackVisibility = false;
|
|
3289
1632
|
var checkSlotRelocate = false;
|
|
3290
1633
|
var isSvgMode = false;
|
|
1634
|
+
var refCallbacksToRemove = [];
|
|
1635
|
+
var refCallbacksToAttach = [];
|
|
3291
1636
|
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
3292
1637
|
var _a;
|
|
3293
1638
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
@@ -3310,7 +1655,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
3310
1655
|
);
|
|
3311
1656
|
}
|
|
3312
1657
|
}
|
|
3313
|
-
if (newVNode2.$text$
|
|
1658
|
+
if (newVNode2.$text$ != null) {
|
|
3314
1659
|
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
3315
1660
|
} else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
3316
1661
|
elm = newVNode2.$elm$ = win.document.createTextNode("");
|
|
@@ -3322,9 +1667,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
3322
1667
|
isSvgMode = newVNode2.$tag$ === "svg";
|
|
3323
1668
|
}
|
|
3324
1669
|
if (!win.document) {
|
|
3325
|
-
throw new Error(
|
|
3326
|
-
"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."
|
|
3327
|
-
);
|
|
1670
|
+
throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");
|
|
3328
1671
|
}
|
|
3329
1672
|
elm = newVNode2.$elm$ = win.document.createElementNS(
|
|
3330
1673
|
isSvgMode ? SVG_NS : HTML_NS,
|
|
@@ -3569,7 +1912,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
3569
1912
|
const tag = newVNode2.$tag$;
|
|
3570
1913
|
const text = newVNode2.$text$;
|
|
3571
1914
|
let defaultHolder;
|
|
3572
|
-
if (text
|
|
1915
|
+
if (text == null) {
|
|
3573
1916
|
{
|
|
3574
1917
|
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
3575
1918
|
}
|
|
@@ -3658,16 +2001,33 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
3658
2001
|
};
|
|
3659
2002
|
var nullifyVNodeRefs = (vNode) => {
|
|
3660
2003
|
{
|
|
3661
|
-
vNode.$attrs$ && vNode.$attrs$.ref
|
|
2004
|
+
if (vNode.$attrs$ && vNode.$attrs$.ref) {
|
|
2005
|
+
refCallbacksToRemove.push(() => vNode.$attrs$.ref(null));
|
|
2006
|
+
}
|
|
3662
2007
|
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
3663
2008
|
}
|
|
3664
2009
|
};
|
|
2010
|
+
var queueRefAttachment = (refCallback, elm) => {
|
|
2011
|
+
{
|
|
2012
|
+
refCallbacksToAttach.push(() => refCallback(elm));
|
|
2013
|
+
}
|
|
2014
|
+
};
|
|
2015
|
+
var flushQueuedRefCallbacks = () => {
|
|
2016
|
+
{
|
|
2017
|
+
refCallbacksToRemove.forEach((cb) => cb());
|
|
2018
|
+
refCallbacksToRemove.length = 0;
|
|
2019
|
+
refCallbacksToAttach.forEach((cb) => cb());
|
|
2020
|
+
refCallbacksToAttach.length = 0;
|
|
2021
|
+
}
|
|
2022
|
+
};
|
|
3665
2023
|
var insertBefore = (parent, newNode, reference, isInitialLoad) => {
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
2024
|
+
{
|
|
2025
|
+
if (typeof newNode["s-sn"] === "string") {
|
|
2026
|
+
parent.insertBefore(newNode, reference);
|
|
2027
|
+
const { slotNode } = findSlotFromSlottedNode(newNode);
|
|
2028
|
+
if (slotNode && !isInitialLoad) dispatchSlotChangeEvent(slotNode);
|
|
2029
|
+
return newNode;
|
|
2030
|
+
}
|
|
3671
2031
|
}
|
|
3672
2032
|
if (parent.__insertBefore) {
|
|
3673
2033
|
return parent.__insertBefore(newNode, reference);
|
|
@@ -3803,6 +2163,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
3803
2163
|
}
|
|
3804
2164
|
}
|
|
3805
2165
|
contentRef = void 0;
|
|
2166
|
+
flushQueuedRefCallbacks();
|
|
3806
2167
|
};
|
|
3807
2168
|
|
|
3808
2169
|
// src/runtime/update-component.ts
|
|
@@ -3871,8 +2232,8 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
3871
2232
|
endSchedule();
|
|
3872
2233
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
3873
2234
|
};
|
|
3874
|
-
var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((
|
|
3875
|
-
console.error(
|
|
2235
|
+
var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err) => {
|
|
2236
|
+
console.error(err);
|
|
3876
2237
|
fn();
|
|
3877
2238
|
}) : fn();
|
|
3878
2239
|
var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
|