xv-webcomponents 1.25.1 → 2.0.0-beta.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +249 -129
- package/dist/angular/angular-component-lib/utils.d.ts +9 -0
- package/dist/angular/angular-component-lib/utils.js +58 -0
- package/dist/angular/index.d.ts +4 -0
- package/dist/angular/index.js +56 -0
- package/dist/angular/proxies.d.ts +696 -0
- package/dist/angular/proxies.js +1642 -0
- package/dist/angular/web-components.module.d.ts +7 -0
- package/dist/angular/web-components.module.js +168 -0
- package/dist/cjs/_vars-DMytunQw.js +26 -0
- package/dist/cjs/{index-Cb30DBqk.js → index-DaTpiyaU.js} +2 -0
- package/dist/cjs/{index-DpLAFt0R.js → index-Dwhgrew8.js} +401 -1805
- package/dist/cjs/index.cjs.js +4 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/maplibre-gl-BIvnXGyX.js +884 -0
- package/dist/cjs/{xv-accordion-v2_50.cjs.entry.js → xv-accordion-v2_49.cjs.entry.js} +2046 -694
- package/dist/cjs/xv-header-next.cjs.entry.js +10 -89
- package/dist/cjs/xv-mega-menu-next.cjs.entry.js +4 -4
- package/dist/cjs/xv-webcomponents.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/xv-accordion/xv-accordion.js +1 -1
- package/dist/collection/components/xv-accordion-item/xv-accordion-item.js +1 -1
- package/dist/collection/components/xv-breadcrumbs/xv-breadcrumbs.js +1 -1
- package/dist/collection/components/xv-button/xv-button.js +2 -1
- package/dist/collection/components/xv-button-group/xv-button-group.js +3 -3
- package/dist/collection/components/xv-card/xv-card.js +1 -1
- package/dist/collection/components/xv-checkbox/xv-checkbox.js +4 -3
- package/dist/collection/components/xv-content-switcher/xv-content-switcher-item/xv-content-switcher-item.js +1 -1
- package/dist/collection/components/xv-content-switcher/xv-content-switcher.js +7 -6
- package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.js +5 -3
- package/dist/collection/components/xv-data-table/xv-data-table-row/xv-data-table-row.js +4 -3
- package/dist/collection/components/xv-data-table/xv-data-table.js +5 -3
- package/dist/collection/components/xv-date-picker/xv-date-picker.js +16 -8
- package/dist/collection/components/xv-datepicker/xv-datepicker.js +5 -4
- package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.js +9 -5
- package/dist/collection/components/xv-dropdown/xv-dropdown.js +9 -5
- package/dist/collection/components/xv-file-uploader/xv-file-uploader.css +3 -3
- package/dist/collection/components/xv-file-uploader/xv-file-uploader.js +6 -4
- package/dist/collection/components/xv-footer/xv-footer.js +1 -1
- package/dist/collection/components/xv-geo-map/xv-geo-map.css +43 -67
- package/dist/collection/components/xv-geo-map/xv-geo-map.js +10 -10
- package/dist/collection/components/xv-header/xv-header.js +7 -88
- package/dist/collection/components/xv-header-next/xv-header-next.js +10 -91
- package/dist/collection/components/xv-link/xv-link.js +1 -1
- package/dist/collection/components/xv-loader/xv-loader.js +2 -1
- package/dist/collection/components/xv-login-modal/xv-login-modal.css +7 -7
- package/dist/collection/components/xv-mega-menu/xv-mega-menu.js +2 -2
- package/dist/collection/components/xv-mega-menu-next/xv-mega-menu-next.js +5 -4
- package/dist/collection/components/xv-modal/xv-modal.js +3 -2
- package/dist/collection/components/xv-notification/xv-notification.js +3 -2
- package/dist/collection/components/xv-number-input/xv-number-input.js +4 -3
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js +7 -4
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js +14 -11
- package/dist/collection/components/xv-pagination/xv-pagination.css +2 -2
- package/dist/collection/components/xv-pagination/xv-pagination.js +7 -4
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.js +3 -2
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js +6 -5
- package/dist/collection/components/xv-radio/xv-radio.js +4 -3
- package/dist/collection/components/xv-slider/xv-slider.js +1 -1
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.css +129 -61
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js +279 -78
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.css +138 -24
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js +334 -162
- package/dist/collection/components/xv-table/xv-table.css +240 -99
- package/dist/collection/components/xv-table/xv-table.js +2058 -64
- package/dist/collection/components/xv-table/xv-table.model.js +10 -0
- package/dist/collection/components/xv-table/xv-table.utils.js +243 -0
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js +1 -1
- package/dist/collection/components/xv-tabs/xv-tabs.js +2 -1
- package/dist/collection/components/xv-tag/xv-tag.js +1 -1
- package/dist/collection/components/xv-tag-combobox/xv-tag-combobox.js +6 -4
- package/dist/collection/components/xv-text-input/xv-text-input.js +4 -3
- package/dist/collection/components/xv-textarea/xv-textarea.js +4 -3
- package/dist/collection/components/xv-tile/xv-tile.css +1 -1
- package/dist/collection/components/xv-tile/xv-tile.js +2 -2
- package/dist/collection/components/xv-toggle/xv-toggle.js +3 -2
- package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.js +3 -2
- package/dist/collection/components/xv-tooltip/xv-tooltip.js +4 -3
- package/dist/collection/index.js +3 -0
- package/dist/collection/utils/table-layout.js +130 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/p-A3B7AR96.js +9 -0
- package/dist/components/p-B0kwaJ8n.js +1 -0
- package/dist/components/p-B9zHwwFm.js +1 -0
- package/dist/components/p-BEoh0dZI.js +1 -0
- package/dist/components/p-BaZ-srfu.js +1 -0
- package/dist/components/p-Bej2l-wN.js +1 -0
- package/dist/components/p-BfP9ezJQ.js +1 -0
- package/dist/components/p-BfhvpeQh.js +1 -0
- package/dist/components/p-BiiqsbVQ.js +1 -0
- package/dist/components/p-CSYnNMKb.js +1 -0
- package/dist/components/p-CspyoLL9.js +1 -0
- package/dist/components/p-CvgDDcjp.js +1 -0
- package/dist/components/p-D4FwGeDJ.js +1 -0
- package/dist/components/p-DCvH_Br_.js +1 -0
- package/dist/components/p-DFe9Mtw_.js +1 -0
- package/dist/components/p-DFtMwE-h.js +1 -0
- package/dist/components/p-DIvi4fI3.js +1 -0
- package/dist/components/p-DNRISLNf.js +1 -0
- package/dist/components/p-DPnvoOYj.js +1 -0
- package/dist/components/p-Dwbe941A.js +1 -0
- package/dist/components/p-HjYAjHna.js +1 -0
- package/dist/components/p-JClekcEh.js +1 -0
- package/dist/components/p-NoM9oIJn.js +1 -0
- package/dist/components/p-SvgdO2VS.js +1 -0
- package/dist/components/p-XEk4dHG3.js +1 -0
- package/dist/components/p-e0i0f6QA.js +1 -0
- package/dist/components/p-i7_81si-.js +1 -0
- package/dist/components/p-i82EFiq6.js +1 -0
- package/dist/components/p-jD7nSJaM.js +1 -0
- package/dist/components/xv-accordion-v2-item.d.ts +11 -0
- package/dist/components/xv-accordion-v2-item.js +1 -0
- package/dist/components/xv-accordion-v2.d.ts +11 -0
- package/dist/components/xv-accordion-v2.js +1 -0
- package/dist/components/xv-breadcrumbs-v2.d.ts +11 -0
- package/dist/components/xv-breadcrumbs-v2.js +1 -0
- package/dist/components/xv-button-group-v2.d.ts +11 -0
- package/dist/components/xv-button-group-v2.js +1 -0
- package/dist/components/xv-button-v2.d.ts +11 -0
- package/dist/components/xv-button-v2.js +1 -0
- package/dist/components/xv-card-v2.d.ts +11 -0
- package/dist/components/xv-card-v2.js +1 -0
- package/dist/components/xv-checkbox-v2.d.ts +11 -0
- package/dist/components/xv-checkbox-v2.js +1 -0
- package/dist/components/xv-content-switcher-item-v2.d.ts +11 -0
- package/dist/components/xv-content-switcher-item-v2.js +1 -0
- package/dist/components/xv-content-switcher-v2.d.ts +11 -0
- package/dist/components/xv-content-switcher-v2.js +1 -0
- package/dist/components/xv-data-table-cell.d.ts +11 -0
- package/dist/components/xv-data-table-cell.js +1 -0
- package/dist/components/xv-data-table-collapse.d.ts +11 -0
- package/dist/components/xv-data-table-collapse.js +1 -0
- package/dist/components/xv-data-table-row.d.ts +11 -0
- package/dist/components/xv-data-table-row.js +1 -0
- package/dist/components/xv-data-table.d.ts +11 -0
- package/dist/components/xv-data-table.js +7 -0
- package/dist/components/xv-date-picker.d.ts +11 -0
- package/dist/components/xv-date-picker.js +1 -0
- package/dist/components/xv-datepicker.d.ts +11 -0
- package/dist/components/xv-datepicker.js +1 -0
- package/dist/components/xv-dropdown-v2-item.d.ts +11 -0
- package/dist/components/xv-dropdown-v2-item.js +1 -0
- package/dist/components/xv-dropdown-v2.d.ts +11 -0
- package/dist/components/xv-dropdown-v2.js +1 -0
- package/dist/components/xv-file-uploader.d.ts +11 -0
- package/dist/components/xv-file-uploader.js +1 -0
- package/dist/components/xv-footer.d.ts +11 -0
- package/dist/components/xv-footer.js +1 -0
- package/dist/components/xv-geo-map-v2.d.ts +11 -0
- package/dist/components/xv-geo-map-v2.js +1 -0
- package/dist/components/xv-header-next.d.ts +11 -0
- package/dist/components/xv-header-next.js +1 -0
- package/dist/components/xv-header.d.ts +11 -0
- package/dist/components/xv-header.js +1 -0
- package/dist/components/xv-image-viewer.d.ts +11 -0
- package/dist/components/xv-image-viewer.js +1 -0
- package/dist/components/xv-link-v2.d.ts +11 -0
- package/dist/components/xv-link-v2.js +1 -0
- package/dist/components/xv-loader-v2.d.ts +11 -0
- package/dist/components/xv-loader-v2.js +1 -0
- package/dist/components/xv-login-modal.d.ts +11 -0
- package/dist/components/xv-login-modal.js +1 -0
- package/dist/components/xv-mega-menu-next.d.ts +11 -0
- package/dist/components/xv-mega-menu-next.js +1 -0
- package/dist/components/xv-mega-menu.d.ts +11 -0
- package/dist/components/xv-mega-menu.js +1 -0
- package/dist/components/xv-modal-v2.d.ts +11 -0
- package/dist/components/xv-modal-v2.js +1 -0
- package/dist/components/xv-notification-v2.d.ts +11 -0
- package/dist/components/xv-notification-v2.js +1 -0
- package/dist/components/xv-number-input-v2.d.ts +11 -0
- package/dist/components/xv-number-input-v2.js +1 -0
- package/dist/components/xv-overflow-menu-v2-item.d.ts +11 -0
- package/dist/components/xv-overflow-menu-v2-item.js +1 -0
- package/dist/components/xv-overflow-menu-v2.d.ts +11 -0
- package/dist/components/xv-overflow-menu-v2.js +1 -0
- package/dist/components/xv-pagination.d.ts +11 -0
- package/dist/components/xv-pagination.js +1 -0
- package/dist/components/xv-progress-indicator-v2-item.d.ts +11 -0
- package/dist/components/xv-progress-indicator-v2-item.js +1 -0
- package/dist/components/xv-progress-indicator-v2.d.ts +11 -0
- package/dist/components/xv-progress-indicator-v2.js +1 -0
- package/dist/components/xv-radio-v2.d.ts +11 -0
- package/dist/components/xv-radio-v2.js +1 -0
- package/dist/components/xv-slider-v2.d.ts +11 -0
- package/dist/components/xv-slider-v2.js +1 -0
- package/dist/components/xv-tab-v2.d.ts +11 -0
- package/dist/components/xv-tab-v2.js +1 -0
- package/dist/components/xv-table-cell.d.ts +11 -0
- package/dist/components/xv-table-cell.js +1 -0
- package/dist/components/xv-table-row.d.ts +11 -0
- package/dist/components/xv-table-row.js +1 -0
- package/dist/components/xv-table.d.ts +11 -0
- package/dist/components/xv-table.js +1 -0
- package/dist/components/xv-tabs-v2.d.ts +11 -0
- package/dist/components/xv-tabs-v2.js +1 -0
- package/dist/components/xv-tag-combobox.d.ts +11 -0
- package/dist/components/xv-tag-combobox.js +1 -0
- package/dist/components/xv-tag-v2.d.ts +11 -0
- package/dist/components/xv-tag-v2.js +1 -0
- package/dist/components/xv-text-input-v2.d.ts +11 -0
- package/dist/components/xv-text-input-v2.js +1 -0
- package/dist/components/xv-textarea.d.ts +11 -0
- package/dist/components/xv-textarea.js +1 -0
- package/dist/components/xv-tile.d.ts +11 -0
- package/dist/components/xv-tile.js +1 -0
- package/dist/components/xv-toggle-tip.d.ts +11 -0
- package/dist/components/xv-toggle-tip.js +1 -0
- package/dist/components/xv-toggle.d.ts +11 -0
- package/dist/components/xv-toggle.js +1 -0
- package/dist/components/xv-tooltip-v2.d.ts +11 -0
- package/dist/components/xv-tooltip-v2.js +1 -0
- package/dist/custom-elements.json +11561 -0
- package/dist/docs.d.ts +480 -0
- package/dist/docs.json +17181 -0
- package/dist/esm/_vars-CDEU4jkD.js +23 -0
- package/dist/esm/{index-CQm2sRKT.js → index-ClusqSO5.js} +2 -0
- package/dist/esm/{index-DmxA2ysB.js → index-DJC3-dS3.js} +400 -1806
- package/dist/esm/index.js +2 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/maplibre-gl-A3B7AR96.js +826 -0
- package/dist/esm/maplibre-gl-shared.mjs +2 -2
- package/dist/esm/maplibre-gl-worker.mjs +2 -2
- package/dist/esm/{xv-accordion-v2_50.entry.js → xv-accordion-v2_49.entry.js} +2044 -691
- package/dist/esm/xv-header-next.entry.js +10 -89
- package/dist/esm/xv-mega-menu-next.entry.js +4 -4
- package/dist/esm/xv-webcomponents.js +4 -4
- package/dist/react/components.d.ts +55 -0
- package/dist/react/components.js +56 -0
- package/dist/react/create-component.d.ts +24 -0
- package/dist/react/runtime.d.ts +2 -0
- package/dist/react/runtime.js +43 -0
- package/dist/react/tag-transformer.d.ts +3 -0
- package/dist/react/tag-transformer.js +12 -0
- package/dist/react/xv-accordion-v2-item.d.ts +12 -0
- package/dist/react/xv-accordion-v2-item.js +14 -0
- package/dist/react/xv-accordion-v2.d.ts +15 -0
- package/dist/react/xv-accordion-v2.js +14 -0
- package/dist/react/xv-breadcrumbs-v2.d.ts +9 -0
- package/dist/react/xv-breadcrumbs-v2.js +14 -0
- package/dist/react/xv-button-group-v2.d.ts +12 -0
- package/dist/react/xv-button-group-v2.js +14 -0
- package/dist/react/xv-button-v2.d.ts +9 -0
- package/dist/react/xv-button-v2.js +14 -0
- package/dist/react/xv-card-v2.d.ts +9 -0
- package/dist/react/xv-card-v2.js +14 -0
- package/dist/react/xv-checkbox-v2.d.ts +15 -0
- package/dist/react/xv-checkbox-v2.js +19 -0
- package/dist/react/xv-content-switcher-item-v2.d.ts +9 -0
- package/dist/react/xv-content-switcher-item-v2.js +14 -0
- package/dist/react/xv-content-switcher-v2.d.ts +12 -0
- package/dist/react/xv-content-switcher-v2.js +14 -0
- package/dist/react/xv-data-table-cell.d.ts +12 -0
- package/dist/react/xv-data-table-cell.js +14 -0
- package/dist/react/xv-data-table-collapse.d.ts +12 -0
- package/dist/react/xv-data-table-collapse.js +14 -0
- package/dist/react/xv-data-table-row.d.ts +12 -0
- package/dist/react/xv-data-table-row.js +14 -0
- package/dist/react/xv-data-table.d.ts +12 -0
- package/dist/react/xv-data-table.js +14 -0
- package/dist/react/xv-date-picker.d.ts +14 -0
- package/dist/react/xv-date-picker.js +18 -0
- package/dist/react/xv-datepicker.d.ts +13 -0
- package/dist/react/xv-datepicker.js +17 -0
- package/dist/react/xv-dropdown-v2-item.d.ts +12 -0
- package/dist/react/xv-dropdown-v2-item.js +14 -0
- package/dist/react/xv-dropdown-v2.d.ts +13 -0
- package/dist/react/xv-dropdown-v2.js +17 -0
- package/dist/react/xv-file-uploader.d.ts +13 -0
- package/dist/react/xv-file-uploader.js +17 -0
- package/dist/react/xv-footer.d.ts +9 -0
- package/dist/react/xv-footer.js +14 -0
- package/dist/react/xv-geo-map-v2.d.ts +13 -0
- package/dist/react/xv-geo-map-v2.js +17 -0
- package/dist/react/xv-header-next.d.ts +12 -0
- package/dist/react/xv-header-next.js +14 -0
- package/dist/react/xv-header.d.ts +12 -0
- package/dist/react/xv-header.js +14 -0
- package/dist/react/xv-image-viewer.d.ts +12 -0
- package/dist/react/xv-image-viewer.js +14 -0
- package/dist/react/xv-link-v2.d.ts +9 -0
- package/dist/react/xv-link-v2.js +14 -0
- package/dist/react/xv-loader-v2.d.ts +9 -0
- package/dist/react/xv-loader-v2.js +14 -0
- package/dist/react/xv-login-modal.d.ts +12 -0
- package/dist/react/xv-login-modal.js +14 -0
- package/dist/react/xv-mega-menu-next.d.ts +12 -0
- package/dist/react/xv-mega-menu-next.js +14 -0
- package/dist/react/xv-mega-menu.d.ts +12 -0
- package/dist/react/xv-mega-menu.js +14 -0
- package/dist/react/xv-modal-v2.d.ts +12 -0
- package/dist/react/xv-modal-v2.js +14 -0
- package/dist/react/xv-notification-v2.d.ts +12 -0
- package/dist/react/xv-notification-v2.js +14 -0
- package/dist/react/xv-number-input-v2.d.ts +12 -0
- package/dist/react/xv-number-input-v2.js +14 -0
- package/dist/react/xv-overflow-menu-v2-item.d.ts +12 -0
- package/dist/react/xv-overflow-menu-v2-item.js +14 -0
- package/dist/react/xv-overflow-menu-v2.d.ts +13 -0
- package/dist/react/xv-overflow-menu-v2.js +17 -0
- package/dist/react/xv-pagination.d.ts +15 -0
- package/dist/react/xv-pagination.js +14 -0
- package/dist/react/xv-progress-indicator-v2-item.d.ts +9 -0
- package/dist/react/xv-progress-indicator-v2-item.js +14 -0
- package/dist/react/xv-progress-indicator-v2.d.ts +9 -0
- package/dist/react/xv-progress-indicator-v2.js +14 -0
- package/dist/react/xv-radio-v2.d.ts +9 -0
- package/dist/react/xv-radio-v2.js +14 -0
- package/dist/react/xv-slider-v2.d.ts +12 -0
- package/dist/react/xv-slider-v2.js +14 -0
- package/dist/react/xv-tab-v2.d.ts +9 -0
- package/dist/react/xv-tab-v2.js +14 -0
- package/dist/react/xv-table-cell.d.ts +9 -0
- package/dist/react/xv-table-cell.js +14 -0
- package/dist/react/xv-table-row.d.ts +9 -0
- package/dist/react/xv-table-row.js +14 -0
- package/dist/react/xv-table.d.ts +18 -0
- package/dist/react/xv-table.js +22 -0
- package/dist/react/xv-tabs-v2.d.ts +12 -0
- package/dist/react/xv-tabs-v2.js +14 -0
- package/dist/react/xv-tag-combobox.d.ts +13 -0
- package/dist/react/xv-tag-combobox.js +17 -0
- package/dist/react/xv-tag-v2.d.ts +12 -0
- package/dist/react/xv-tag-v2.js +14 -0
- package/dist/react/xv-text-input-v2.d.ts +12 -0
- package/dist/react/xv-text-input-v2.js +14 -0
- package/dist/react/xv-textarea.d.ts +12 -0
- package/dist/react/xv-textarea.js +14 -0
- package/dist/react/xv-tile.d.ts +15 -0
- package/dist/react/xv-tile.js +14 -0
- package/dist/react/xv-toggle-tip.d.ts +12 -0
- package/dist/react/xv-toggle-tip.js +14 -0
- package/dist/react/xv-toggle.d.ts +12 -0
- package/dist/react/xv-toggle.js +14 -0
- package/dist/react/xv-tooltip-v2.d.ts +9 -0
- package/dist/react/xv-tooltip-v2.js +14 -0
- package/dist/types/components/xv-header/xv-header.d.ts +13 -29
- package/dist/types/components/xv-header-next/xv-header-next.d.ts +13 -29
- package/dist/types/components/xv-table/xv-table-cell/xv-table-cell.d.ts +43 -8
- package/dist/types/components/xv-table/xv-table-row/xv-table-row.d.ts +57 -18
- package/dist/types/components/xv-table/xv-table.d.ts +298 -9
- package/dist/types/components/xv-table/xv-table.model.d.ts +78 -0
- package/dist/types/components/xv-table/xv-table.utils.d.ts +47 -0
- package/dist/types/components.d.ts +1498 -209
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +126 -57
- package/dist/types/utils/table-layout.d.ts +7 -0
- package/dist/vscode-data.json +3293 -0
- package/dist/xv-webcomponents/index.esm.js +1 -1
- package/dist/xv-webcomponents/{p-fe9b38f8.entry.js → p-0c30d09f.entry.js} +1 -1
- package/dist/xv-webcomponents/p-6b58979e.entry.js +8 -0
- package/dist/xv-webcomponents/p-A3B7AR96.js +9 -0
- package/dist/xv-webcomponents/p-CDEU4jkD.js +1 -0
- package/dist/xv-webcomponents/p-DJC3-dS3.js +3 -0
- package/dist/xv-webcomponents/p-DSFVdw3w.js +1 -0
- package/dist/xv-webcomponents/p-c4173686.entry.js +1 -0
- package/dist/xv-webcomponents/xv-webcomponents.css +6 -6
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -1
- package/loader/index.d.ts +1 -1
- package/package.json +139 -61
- package/dist/cjs/_vars-Cyrk3TAl.js +0 -3423
- package/dist/cjs/maplibre-gl-CCZS3Rg5.js +0 -900
- package/dist/collection/components/xv-header/_vars.js +0 -51
- package/dist/collection/components/xv-table/_vars.js +0 -2
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.css +0 -58
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js +0 -75
- package/dist/esm/_vars-BkYBzv3h.js +0 -3413
- package/dist/esm/maplibre-gl-CS4Eagm9.js +0 -813
- package/dist/types/components/xv-header/_vars.d.ts +0 -47
- package/dist/types/components/xv-table/_vars.d.ts +0 -15
- package/dist/types/components/xv-table/xv-table-expand/xv-table-expand.d.ts +0 -8
- package/dist/xv-webcomponents/p-7832549c.entry.js +0 -8
- package/dist/xv-webcomponents/p-BkYBzv3h.js +0 -1
- package/dist/xv-webcomponents/p-CQm2sRKT.js +0 -1
- package/dist/xv-webcomponents/p-CS4Eagm9.js +0 -10
- package/dist/xv-webcomponents/p-DmxA2ysB.js +0 -2
- package/dist/xv-webcomponents/p-f46bb687.entry.js +0 -1
|
@@ -2,261 +2,29 @@ const NAMESPACE = 'xv-webcomponents';
|
|
|
2
2
|
const BUILD = /* xv-webcomponents */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, slotRelocation: true, state: true, updatable: true};
|
|
3
3
|
|
|
4
4
|
const globalScripts = () => {};
|
|
5
|
-
const globalStyles = ".xv-container{width:100%;max-width:1170px;margin-inline:auto}@media (min-width: 576px){.xv-container{max-width:540px}}@media (min-width: 768px){.xv-container{max-width:720px}}@media (min-width: 992px){.xv-container{max-width:960px;padding-inline:var(--bs-gutter-x, 0.75rem)}}@media (min-width: 1200px){.xv-container{max-width:1140px}}@media (min-width: 1400px){.xv-container{max-width:1320px}}.xv-tooltip[role=tooltip]{position:absolute;background-color:var(--background-inverse, #333333);color:var(--text-on-color);padding:var(--spacing-03) var(--spacing-04);border-radius:3px;font-size:var(--fz-sm);z-index:999;min-width:min(150px, 90vw);max-width:min(400px, 90vw)}.xv-tooltip[role=tooltip]::after{content:\"\";position:absolute;width:0;height:0;border-style:solid}.xv-tooltip[role=tooltip][data-popper-placement=top]::after{bottom:-5px;left:50%;transform:translateX(-50%);border-width:5px 5px 0 5px;border-color:var(--background-inverse, black) transparent transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=top-start]::after{bottom:-5px;left:12px;border-width:5px 5px 0 5px;border-color:var(--background-inverse, black) transparent transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=top-end]::after{bottom:-5px;right:12px;border-width:5px 5px 0 5px;border-color:var(--background-inverse, black) transparent transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=bottom]::after{top:-5px;left:50%;transform:translateX(-50%);border-width:0 5px 5px 5px;border-color:transparent transparent var(--background-inverse, black) transparent}.xv-tooltip[role=tooltip][data-popper-placement=bottom-start]::after{top:-5px;left:12px;border-width:0 5px 5px 5px;border-color:transparent transparent var(--background-inverse, black) transparent}.xv-tooltip[role=tooltip][data-popper-placement=bottom-end]::after{top:-5px;right:12px;border-width:0 5px 5px 5px;border-color:transparent transparent var(--background-inverse, black) transparent}.xv-tooltip[role=tooltip][data-popper-placement=left]::after{top:50%;right:-5px;transform:translateY(-50%);border-width:5px 0 5px 5px;border-color:transparent transparent transparent var(--background-inverse, black)}.xv-tooltip[role=tooltip][data-popper-placement=left-start]::after{top:12px;right:-5px;border-width:5px 0 5px 5px;border-color:transparent transparent transparent var(--background-inverse, black)}.xv-tooltip[role=tooltip][data-popper-placement=left-end]::after{bottom:12px;right:-5px;border-width:5px 0 5px 5px;border-color:transparent transparent transparent var(--background-inverse, black)}.xv-tooltip[role=tooltip][data-popper-placement=right]::after{top:50%;left:-5px;transform:translateY(-50%);border-width:5px 5px 5px 0;border-color:transparent var(--background-inverse, black) transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=right-start]::after{top:12px;left:-5px;border-width:5px 5px 5px 0;border-color:transparent var(--background-inverse, black) transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=right-end]::after{bottom:12px;left:-5px;border-width:5px 5px 5px 0;border-color:transparent var(--background-inverse, black) transparent transparent}.fa,.fas,.far,.fal,.fad,.fab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.3333333333em;line-height:0.75em;vertical-align:-0.0667em}.fa-xs{font-size:0.75em}.fa-sm{font-size:0.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:solid 0.08em #eee;border-radius:0.1em;padding:0.2em 0.25em 0.15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fas.fa-pull-left,.far.fa-pull-left,.fal.fa-pull-left,.fab.fa-pull-left{margin-right:0.3em}.fa.fa-pull-right,.fas.fa-pull-right,.far.fa-pull-right,.fal.fa-pull-right,.fab.fa-pull-right{margin-left:0.3em}.fa-spin{animation:fa-spin 2s infinite linear}.fa-pulse{animation:fa-spin 1s infinite steps(8)}@keyframes fa-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.fa-rotate-90{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)\";transform:rotate(90deg)}.fa-rotate-180{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)\";transform:rotate(180deg)}.fa-rotate-270{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)\";transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)\";transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\";transform:scale(1, -1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\";transform:scale(-1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-flip-both{filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.sr-only{border:0;clip:rect(0, 0, 0, 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}/*!\n
|
|
5
|
+
const globalStyles = ".xv-container{width:100%;max-width:1170px;margin-inline:auto}@media (min-width: 576px){.xv-container{max-width:540px}}@media (min-width: 768px){.xv-container{max-width:720px}}@media (min-width: 992px){.xv-container{max-width:960px;padding-inline:var(--bs-gutter-x, 0.75rem)}}@media (min-width: 1200px){.xv-container{max-width:1140px}}@media (min-width: 1400px){.xv-container{max-width:1320px}}.xv-tooltip[role=tooltip]{position:absolute;background-color:var(--background-inverse, #333333);color:var(--text-on-color);padding:var(--spacing-03) var(--spacing-04);border-radius:3px;font-size:var(--fz-sm);z-index:999;min-width:min(150px, 90vw);max-width:min(400px, 90vw)}.xv-tooltip[role=tooltip]::after{content:\"\";position:absolute;width:0;height:0;border-style:solid}.xv-tooltip[role=tooltip][data-popper-placement=top]::after{bottom:-5px;left:50%;transform:translateX(-50%);border-width:5px 5px 0 5px;border-color:var(--background-inverse, black) transparent transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=top-start]::after{bottom:-5px;left:12px;border-width:5px 5px 0 5px;border-color:var(--background-inverse, black) transparent transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=top-end]::after{bottom:-5px;right:12px;border-width:5px 5px 0 5px;border-color:var(--background-inverse, black) transparent transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=bottom]::after{top:-5px;left:50%;transform:translateX(-50%);border-width:0 5px 5px 5px;border-color:transparent transparent var(--background-inverse, black) transparent}.xv-tooltip[role=tooltip][data-popper-placement=bottom-start]::after{top:-5px;left:12px;border-width:0 5px 5px 5px;border-color:transparent transparent var(--background-inverse, black) transparent}.xv-tooltip[role=tooltip][data-popper-placement=bottom-end]::after{top:-5px;right:12px;border-width:0 5px 5px 5px;border-color:transparent transparent var(--background-inverse, black) transparent}.xv-tooltip[role=tooltip][data-popper-placement=left]::after{top:50%;right:-5px;transform:translateY(-50%);border-width:5px 0 5px 5px;border-color:transparent transparent transparent var(--background-inverse, black)}.xv-tooltip[role=tooltip][data-popper-placement=left-start]::after{top:12px;right:-5px;border-width:5px 0 5px 5px;border-color:transparent transparent transparent var(--background-inverse, black)}.xv-tooltip[role=tooltip][data-popper-placement=left-end]::after{bottom:12px;right:-5px;border-width:5px 0 5px 5px;border-color:transparent transparent transparent var(--background-inverse, black)}.xv-tooltip[role=tooltip][data-popper-placement=right]::after{top:50%;left:-5px;transform:translateY(-50%);border-width:5px 5px 5px 0;border-color:transparent var(--background-inverse, black) transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=right-start]::after{top:12px;left:-5px;border-width:5px 5px 5px 0;border-color:transparent var(--background-inverse, black) transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=right-end]::after{bottom:12px;left:-5px;border-width:5px 5px 5px 0;border-color:transparent var(--background-inverse, black) transparent transparent}.fa,.fas,.far,.fal,.fad,.fab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.3333333333em;line-height:0.75em;vertical-align:-0.0667em}.fa-xs{font-size:0.75em}.fa-sm{font-size:0.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:solid 0.08em #eee;border-radius:0.1em;padding:0.2em 0.25em 0.15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fas.fa-pull-left,.far.fa-pull-left,.fal.fa-pull-left,.fab.fa-pull-left{margin-right:0.3em}.fa.fa-pull-right,.fas.fa-pull-right,.far.fa-pull-right,.fal.fa-pull-right,.fab.fa-pull-right{margin-left:0.3em}.fa-spin{animation:fa-spin 2s infinite linear}.fa-pulse{animation:fa-spin 1s infinite steps(8)}@keyframes fa-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.fa-rotate-90{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)\";transform:rotate(90deg)}.fa-rotate-180{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)\";transform:rotate(180deg)}.fa-rotate-270{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)\";transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)\";transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\";transform:scale(1, -1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\";transform:scale(-1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-flip-both{filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.sr-only{border:0;clip:rect(0, 0, 0, 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}/*!\n* Font Awesome Pro 5.15.4 by @fontawesome - https://fontawesome.com\n* License - https://fontawesome.com/license (Commercial License)\n*/@font-face{font-family:\"Font Awesome 5 Pro\";font-style:normal;font-weight:900;font-display:block;src:url(\"https://crossvertise.blob.core.windows.net/assets/fonts/fa-solid-900.eot\");src:url(\"https://crossvertise.blob.core.windows.net/assets/fonts/fa-solid-900.eot?#iefix\") format(\"embedded-opentype\"), url(\"https://crossvertise.blob.core.windows.net/assets/fonts/fa-solid-900.woff2\") format(\"woff2\"), url(\"https://crossvertise.blob.core.windows.net/assets/fonts/fa-solid-900.woff\") format(\"woff\"), url(\"https://crossvertise.blob.core.windows.net/assets/fonts/fa-solid-900.ttf\") format(\"truetype\"), url(\"https://crossvertise.blob.core.windows.net/assets/fonts/fa-solid-900.svg#fontawesome\") format(\"svg\")}.fa,.fas{font-family:\"Font Awesome 5 Pro\";font-weight:900}/*!\n* Font Awesome Pro 5.15.4 by @fontawesome - https://fontawesome.com\n* License - https://fontawesome.com/license (Commercial License)\n*/@font-face{font-family:\"Font Awesome 5 Pro\";font-style:normal;font-weight:400;font-display:block;src:url(\"https://crossvertise.blob.core.windows.net/assets/fonts/fa-regular-400.eot\");src:url(\"https://crossvertise.blob.core.windows.net/assets/fonts/fa-regular-400.eot?#iefix\") format(\"embedded-opentype\"), url(\"https://crossvertise.blob.core.windows.net/assets/fonts/fa-regular-400.woff2\") format(\"woff2\"), url(\"https://crossvertise.blob.core.windows.net/assets/fonts/fa-regular-400.woff\") format(\"woff\"), url(\"https://crossvertise.blob.core.windows.net/assets/fonts/fa-regular-400.ttf\") format(\"truetype\"), url(\"https://crossvertise.blob.core.windows.net/assets/fonts/fa-regular-400.svg#fontawesome\") format(\"svg\")}.far{font-family:\"Font Awesome 5 Pro\";font-weight:400}.fa-bars:before{content:\"\\f0c9\"}.fa-bell:before{content:\"\\f0f3\"}.fa-check:before{content:\"\\f00c\"}.fa-circle:before{content:\"\\f111\"}.fa-clock:before{content:\"\\f017\"}.fa-envelope:before{content:\"\\f0e0\"}.fa-question-circle:before{content:\"\\f059\"}.fa-search:before{content:\"\\f002\"}.fa-shopping-cart:before{content:\"\\f07a\"}.fa-square:before{content:\"\\f0c8\"}.fa-times:before{content:\"\\f00d\"}.fa-times-circle:before{content:\"\\f057\"}.fa-triangle:before{content:\"\\f2ec\"}.fa-user:before{content:\"\\f007\"}";
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Platform v4.
|
|
8
|
+
Stencil Client Platform v4.45.0 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
|
-
var __create = Object.create;
|
|
11
|
-
var __defProp = Object.defineProperty;
|
|
12
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
-
var __typeError = (msg) => {
|
|
17
|
-
throw TypeError(msg);
|
|
18
|
-
};
|
|
19
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
21
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
22
|
-
};
|
|
23
|
-
var __export = (target, all) => {
|
|
24
|
-
for (var name in all)
|
|
25
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
26
|
-
};
|
|
27
|
-
var __copyProps = (to, from, except, desc) => {
|
|
28
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
29
|
-
for (let key of __getOwnPropNames(from))
|
|
30
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
31
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
32
|
-
}
|
|
33
|
-
return to;
|
|
34
|
-
};
|
|
35
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
36
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
37
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
38
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
39
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
40
|
-
__defProp(target, "default", { value: mod, enumerable: true }) ,
|
|
41
|
-
mod
|
|
42
|
-
));
|
|
43
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
|
44
|
-
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
45
|
-
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
46
|
-
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);
|
|
47
|
-
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
|
|
48
|
-
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
49
10
|
|
|
50
|
-
// node_modules/balanced-match/index.js
|
|
51
|
-
var require_balanced_match = __commonJS({
|
|
52
|
-
"node_modules/balanced-match/index.js"(exports, module) {
|
|
53
|
-
module.exports = balanced;
|
|
54
|
-
function balanced(a, b, str) {
|
|
55
|
-
if (a instanceof RegExp) a = maybeMatch(a, str);
|
|
56
|
-
if (b instanceof RegExp) b = maybeMatch(b, str);
|
|
57
|
-
var r = range(a, b, str);
|
|
58
|
-
return r && {
|
|
59
|
-
start: r[0],
|
|
60
|
-
end: r[1],
|
|
61
|
-
pre: str.slice(0, r[0]),
|
|
62
|
-
body: str.slice(r[0] + a.length, r[1]),
|
|
63
|
-
post: str.slice(r[1] + b.length)
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
function maybeMatch(reg, str) {
|
|
67
|
-
var m = str.match(reg);
|
|
68
|
-
return m ? m[0] : null;
|
|
69
|
-
}
|
|
70
|
-
balanced.range = range;
|
|
71
|
-
function range(a, b, str) {
|
|
72
|
-
var begs, beg, left, right, result;
|
|
73
|
-
var ai = str.indexOf(a);
|
|
74
|
-
var bi = str.indexOf(b, ai + 1);
|
|
75
|
-
var i2 = ai;
|
|
76
|
-
if (ai >= 0 && bi > 0) {
|
|
77
|
-
if (a === b) {
|
|
78
|
-
return [ai, bi];
|
|
79
|
-
}
|
|
80
|
-
begs = [];
|
|
81
|
-
left = str.length;
|
|
82
|
-
while (i2 >= 0 && !result) {
|
|
83
|
-
if (i2 == ai) {
|
|
84
|
-
begs.push(i2);
|
|
85
|
-
ai = str.indexOf(a, i2 + 1);
|
|
86
|
-
} else if (begs.length == 1) {
|
|
87
|
-
result = [begs.pop(), bi];
|
|
88
|
-
} else {
|
|
89
|
-
beg = begs.pop();
|
|
90
|
-
if (beg < left) {
|
|
91
|
-
left = beg;
|
|
92
|
-
right = bi;
|
|
93
|
-
}
|
|
94
|
-
bi = str.indexOf(b, i2 + 1);
|
|
95
|
-
}
|
|
96
|
-
i2 = ai < bi && ai >= 0 ? ai : bi;
|
|
97
|
-
}
|
|
98
|
-
if (begs.length) {
|
|
99
|
-
result = [left, right];
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
return result;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
// node_modules/brace-expansion/index.js
|
|
108
|
-
var require_brace_expansion = __commonJS({
|
|
109
|
-
"node_modules/brace-expansion/index.js"(exports, module) {
|
|
110
|
-
var balanced = require_balanced_match();
|
|
111
|
-
module.exports = expandTop;
|
|
112
|
-
var escSlash = "\0SLASH" + Math.random() + "\0";
|
|
113
|
-
var escOpen = "\0OPEN" + Math.random() + "\0";
|
|
114
|
-
var escClose = "\0CLOSE" + Math.random() + "\0";
|
|
115
|
-
var escComma = "\0COMMA" + Math.random() + "\0";
|
|
116
|
-
var escPeriod = "\0PERIOD" + Math.random() + "\0";
|
|
117
|
-
function numeric(str) {
|
|
118
|
-
return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
|
|
119
|
-
}
|
|
120
|
-
function escapeBraces(str) {
|
|
121
|
-
return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
|
|
122
|
-
}
|
|
123
|
-
function unescapeBraces(str) {
|
|
124
|
-
return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
|
|
125
|
-
}
|
|
126
|
-
function parseCommaParts(str) {
|
|
127
|
-
if (!str)
|
|
128
|
-
return [""];
|
|
129
|
-
var parts = [];
|
|
130
|
-
var m = balanced("{", "}", str);
|
|
131
|
-
if (!m)
|
|
132
|
-
return str.split(",");
|
|
133
|
-
var pre = m.pre;
|
|
134
|
-
var body = m.body;
|
|
135
|
-
var post = m.post;
|
|
136
|
-
var p = pre.split(",");
|
|
137
|
-
p[p.length - 1] += "{" + body + "}";
|
|
138
|
-
var postParts = parseCommaParts(post);
|
|
139
|
-
if (post.length) {
|
|
140
|
-
p[p.length - 1] += postParts.shift();
|
|
141
|
-
p.push.apply(p, postParts);
|
|
142
|
-
}
|
|
143
|
-
parts.push.apply(parts, p);
|
|
144
|
-
return parts;
|
|
145
|
-
}
|
|
146
|
-
function expandTop(str) {
|
|
147
|
-
if (!str)
|
|
148
|
-
return [];
|
|
149
|
-
if (str.substr(0, 2) === "{}") {
|
|
150
|
-
str = "\\{\\}" + str.substr(2);
|
|
151
|
-
}
|
|
152
|
-
return expand2(escapeBraces(str), true).map(unescapeBraces);
|
|
153
|
-
}
|
|
154
|
-
function embrace(str) {
|
|
155
|
-
return "{" + str + "}";
|
|
156
|
-
}
|
|
157
|
-
function isPadded(el) {
|
|
158
|
-
return /^-?0\d/.test(el);
|
|
159
|
-
}
|
|
160
|
-
function lte(i2, y) {
|
|
161
|
-
return i2 <= y;
|
|
162
|
-
}
|
|
163
|
-
function gte(i2, y) {
|
|
164
|
-
return i2 >= y;
|
|
165
|
-
}
|
|
166
|
-
function expand2(str, isTop) {
|
|
167
|
-
var expansions = [];
|
|
168
|
-
var m = balanced("{", "}", str);
|
|
169
|
-
if (!m) return [str];
|
|
170
|
-
var pre = m.pre;
|
|
171
|
-
var post = m.post.length ? expand2(m.post, false) : [""];
|
|
172
|
-
if (/\$$/.test(m.pre)) {
|
|
173
|
-
for (var k = 0; k < post.length; k++) {
|
|
174
|
-
var expansion = pre + "{" + m.body + "}" + post[k];
|
|
175
|
-
expansions.push(expansion);
|
|
176
|
-
}
|
|
177
|
-
} else {
|
|
178
|
-
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
|
179
|
-
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
|
180
|
-
var isSequence = isNumericSequence || isAlphaSequence;
|
|
181
|
-
var isOptions = m.body.indexOf(",") >= 0;
|
|
182
|
-
if (!isSequence && !isOptions) {
|
|
183
|
-
if (m.post.match(/,(?!,).*\}/)) {
|
|
184
|
-
str = m.pre + "{" + m.body + escClose + m.post;
|
|
185
|
-
return expand2(str);
|
|
186
|
-
}
|
|
187
|
-
return [str];
|
|
188
|
-
}
|
|
189
|
-
var n;
|
|
190
|
-
if (isSequence) {
|
|
191
|
-
n = m.body.split(/\.\./);
|
|
192
|
-
} else {
|
|
193
|
-
n = parseCommaParts(m.body);
|
|
194
|
-
if (n.length === 1) {
|
|
195
|
-
n = expand2(n[0], false).map(embrace);
|
|
196
|
-
if (n.length === 1) {
|
|
197
|
-
return post.map(function(p) {
|
|
198
|
-
return m.pre + n[0] + p;
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
var N;
|
|
204
|
-
if (isSequence) {
|
|
205
|
-
var x = numeric(n[0]);
|
|
206
|
-
var y = numeric(n[1]);
|
|
207
|
-
var width = Math.max(n[0].length, n[1].length);
|
|
208
|
-
var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
|
|
209
|
-
var test = lte;
|
|
210
|
-
var reverse = y < x;
|
|
211
|
-
if (reverse) {
|
|
212
|
-
incr *= -1;
|
|
213
|
-
test = gte;
|
|
214
|
-
}
|
|
215
|
-
var pad = n.some(isPadded);
|
|
216
|
-
N = [];
|
|
217
|
-
for (var i2 = x; test(i2, y); i2 += incr) {
|
|
218
|
-
var c;
|
|
219
|
-
if (isAlphaSequence) {
|
|
220
|
-
c = String.fromCharCode(i2);
|
|
221
|
-
if (c === "\\")
|
|
222
|
-
c = "";
|
|
223
|
-
} else {
|
|
224
|
-
c = String(i2);
|
|
225
|
-
if (pad) {
|
|
226
|
-
var need = width - c.length;
|
|
227
|
-
if (need > 0) {
|
|
228
|
-
var z = new Array(need + 1).join("0");
|
|
229
|
-
if (i2 < 0)
|
|
230
|
-
c = "-" + z + c.slice(1);
|
|
231
|
-
else
|
|
232
|
-
c = z + c;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
N.push(c);
|
|
237
|
-
}
|
|
238
|
-
} else {
|
|
239
|
-
N = [];
|
|
240
|
-
for (var j = 0; j < n.length; j++) {
|
|
241
|
-
N.push.apply(N, expand2(n[j], false));
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
for (var j = 0; j < N.length; j++) {
|
|
245
|
-
for (var k = 0; k < post.length; k++) {
|
|
246
|
-
var expansion = pre + N[j] + post[k];
|
|
247
|
-
if (!isTop || isSequence || expansion)
|
|
248
|
-
expansions.push(expansion);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
return expansions;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
});
|
|
256
11
|
|
|
257
12
|
// src/utils/constants.ts
|
|
258
13
|
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
259
14
|
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
15
|
+
|
|
16
|
+
// src/utils/get-prop-descriptor.ts
|
|
17
|
+
function getPropertyDescriptor(obj, memberName, getOnly) {
|
|
18
|
+
const stopAt = typeof HTMLElement !== "undefined" ? HTMLElement.prototype : null;
|
|
19
|
+
while (obj && obj !== stopAt) {
|
|
20
|
+
const desc = Object.getOwnPropertyDescriptor(obj, memberName);
|
|
21
|
+
if (desc && (!getOnly || desc.get)) return desc;
|
|
22
|
+
obj = Object.getPrototypeOf(obj);
|
|
23
|
+
}
|
|
24
|
+
return void 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// src/utils/es2022-rewire-class-members.ts
|
|
260
28
|
var reWireGetterSetter = (instance, hostRef) => {
|
|
261
29
|
var _a;
|
|
262
30
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
@@ -264,7 +32,7 @@ var reWireGetterSetter = (instance, hostRef) => {
|
|
|
264
32
|
members.map(([memberName, [memberFlags]]) => {
|
|
265
33
|
if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
|
|
266
34
|
const ogValue = instance[memberName];
|
|
267
|
-
const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName) || Object.getOwnPropertyDescriptor(instance, memberName);
|
|
35
|
+
const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName, true) || Object.getOwnPropertyDescriptor(instance, memberName);
|
|
268
36
|
if (ogDescriptor) {
|
|
269
37
|
Object.defineProperty(instance, memberName, {
|
|
270
38
|
get() {
|
|
@@ -277,18 +45,14 @@ var reWireGetterSetter = (instance, hostRef) => {
|
|
|
277
45
|
enumerable: true
|
|
278
46
|
});
|
|
279
47
|
}
|
|
280
|
-
|
|
48
|
+
if (hostRef.$instanceValues$.has(memberName)) {
|
|
49
|
+
instance[memberName] = hostRef.$instanceValues$.get(memberName);
|
|
50
|
+
} else if (ogValue !== void 0) {
|
|
51
|
+
instance[memberName] = ogValue;
|
|
52
|
+
}
|
|
281
53
|
}
|
|
282
54
|
});
|
|
283
55
|
};
|
|
284
|
-
function getPropertyDescriptor(obj, memberName) {
|
|
285
|
-
while (obj) {
|
|
286
|
-
const desc = Object.getOwnPropertyDescriptor(obj, memberName);
|
|
287
|
-
if (desc == null ? void 0 : desc.get) return desc;
|
|
288
|
-
obj = Object.getPrototypeOf(obj);
|
|
289
|
-
}
|
|
290
|
-
return void 0;
|
|
291
|
-
}
|
|
292
56
|
|
|
293
57
|
// src/client/client-host-ref.ts
|
|
294
58
|
var getHostRef = (ref) => {
|
|
@@ -333,7 +97,9 @@ var consoleError = (e, el) => (0, console.error)(e, el);
|
|
|
333
97
|
|
|
334
98
|
// src/client/client-load-module.ts
|
|
335
99
|
var cmpModules = /* @__PURE__ */ new Map();
|
|
100
|
+
var failedLoadAttempts = /* @__PURE__ */ new Map();
|
|
336
101
|
var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
102
|
+
var _a;
|
|
337
103
|
const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
|
|
338
104
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
339
105
|
if (!bundleId) {
|
|
@@ -343,21 +109,28 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
343
109
|
if (module) {
|
|
344
110
|
return module[exportName];
|
|
345
111
|
}
|
|
112
|
+
const retryCount = (_a = failedLoadAttempts.get(bundleId)) != null ? _a : 0;
|
|
113
|
+
const cacheBustParams = [
|
|
114
|
+
retryCount > 0 ? `s-retry=${retryCount}` : "",
|
|
115
|
+
""
|
|
116
|
+
].filter(Boolean).join("&");
|
|
346
117
|
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
347
118
|
return import(
|
|
348
119
|
/* @vite-ignore */
|
|
349
120
|
/* webpackInclude: /\.entry\.js$/ */
|
|
350
121
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
351
122
|
/* webpackMode: "lazy" */
|
|
352
|
-
`./${bundleId}.entry.js${""}`
|
|
123
|
+
`./${bundleId}.entry.js${cacheBustParams ? "?" + cacheBustParams : ""}`
|
|
353
124
|
).then(
|
|
354
125
|
(importedModule) => {
|
|
355
126
|
{
|
|
127
|
+
failedLoadAttempts.delete(bundleId);
|
|
356
128
|
cmpModules.set(bundleId, importedModule);
|
|
357
129
|
}
|
|
358
130
|
return importedModule[exportName];
|
|
359
131
|
},
|
|
360
132
|
(e) => {
|
|
133
|
+
failedLoadAttempts.set(bundleId, retryCount + 1);
|
|
361
134
|
consoleError(e, hostRef.$hostElement$);
|
|
362
135
|
}
|
|
363
136
|
);
|
|
@@ -367,6 +140,8 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
367
140
|
var styles = /* @__PURE__ */ new Map();
|
|
368
141
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
369
142
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
143
|
+
var MAX_LAZY_LOAD_RETRIES = 3;
|
|
144
|
+
var LAZY_LOAD_RETRY_INTERVAL_MS = 1e3;
|
|
370
145
|
var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
|
|
371
146
|
"formAssociatedCallback",
|
|
372
147
|
"formResetCallback",
|
|
@@ -416,6 +191,10 @@ var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @_
|
|
|
416
191
|
var queuePending = false;
|
|
417
192
|
var queueDomReads = [];
|
|
418
193
|
var queueDomWrites = [];
|
|
194
|
+
var scheduleFlush = () => {
|
|
195
|
+
var _a;
|
|
196
|
+
return ((_a = win.document) == null ? void 0 : _a.hidden) ? nextTick(flush) : plt.raf(flush);
|
|
197
|
+
};
|
|
419
198
|
var queueTask = (queue, write) => (cb) => {
|
|
420
199
|
queue.push(cb);
|
|
421
200
|
if (!queuePending) {
|
|
@@ -423,7 +202,7 @@ var queueTask = (queue, write) => (cb) => {
|
|
|
423
202
|
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
424
203
|
nextTick(flush);
|
|
425
204
|
} else {
|
|
426
|
-
|
|
205
|
+
scheduleFlush();
|
|
427
206
|
}
|
|
428
207
|
}
|
|
429
208
|
};
|
|
@@ -442,1433 +221,13 @@ var flush = () => {
|
|
|
442
221
|
{
|
|
443
222
|
consume(queueDomWrites);
|
|
444
223
|
if (queuePending = queueDomReads.length > 0) {
|
|
445
|
-
|
|
224
|
+
scheduleFlush();
|
|
446
225
|
}
|
|
447
226
|
}
|
|
448
227
|
};
|
|
449
228
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
450
229
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
451
230
|
|
|
452
|
-
// src/utils/helpers.ts
|
|
453
|
-
var isDef = (v) => v != null && v !== void 0;
|
|
454
|
-
var isComplexType = (o) => {
|
|
455
|
-
o = typeof o;
|
|
456
|
-
return o === "object" || o === "function";
|
|
457
|
-
};
|
|
458
|
-
|
|
459
|
-
// node_modules/minimatch/dist/esm/index.js
|
|
460
|
-
var import_brace_expansion = __toESM(require_brace_expansion());
|
|
461
|
-
|
|
462
|
-
// node_modules/minimatch/dist/esm/assert-valid-pattern.js
|
|
463
|
-
var MAX_PATTERN_LENGTH = 1024 * 64;
|
|
464
|
-
var assertValidPattern = (pattern) => {
|
|
465
|
-
if (typeof pattern !== "string") {
|
|
466
|
-
throw new TypeError("invalid pattern");
|
|
467
|
-
}
|
|
468
|
-
if (pattern.length > MAX_PATTERN_LENGTH) {
|
|
469
|
-
throw new TypeError("pattern is too long");
|
|
470
|
-
}
|
|
471
|
-
};
|
|
472
|
-
|
|
473
|
-
// node_modules/minimatch/dist/esm/brace-expressions.js
|
|
474
|
-
var posixClasses = {
|
|
475
|
-
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
|
|
476
|
-
"[:alpha:]": ["\\p{L}\\p{Nl}", true],
|
|
477
|
-
"[:ascii:]": ["\\x00-\\x7f", false],
|
|
478
|
-
"[:blank:]": ["\\p{Zs}\\t", true],
|
|
479
|
-
"[:cntrl:]": ["\\p{Cc}", true],
|
|
480
|
-
"[:digit:]": ["\\p{Nd}", true],
|
|
481
|
-
"[:graph:]": ["\\p{Z}\\p{C}", true, true],
|
|
482
|
-
"[:lower:]": ["\\p{Ll}", true],
|
|
483
|
-
"[:print:]": ["\\p{C}", true],
|
|
484
|
-
"[:punct:]": ["\\p{P}", true],
|
|
485
|
-
"[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true],
|
|
486
|
-
"[:upper:]": ["\\p{Lu}", true],
|
|
487
|
-
"[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true],
|
|
488
|
-
"[:xdigit:]": ["A-Fa-f0-9", false]
|
|
489
|
-
};
|
|
490
|
-
var braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&");
|
|
491
|
-
var regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
492
|
-
var rangesToString = (ranges) => ranges.join("");
|
|
493
|
-
var parseClass = (glob, position) => {
|
|
494
|
-
const pos = position;
|
|
495
|
-
if (glob.charAt(pos) !== "[") {
|
|
496
|
-
throw new Error("not in a brace expression");
|
|
497
|
-
}
|
|
498
|
-
const ranges = [];
|
|
499
|
-
const negs = [];
|
|
500
|
-
let i2 = pos + 1;
|
|
501
|
-
let sawStart = false;
|
|
502
|
-
let uflag = false;
|
|
503
|
-
let escaping = false;
|
|
504
|
-
let negate = false;
|
|
505
|
-
let endPos = pos;
|
|
506
|
-
let rangeStart = "";
|
|
507
|
-
WHILE: while (i2 < glob.length) {
|
|
508
|
-
const c = glob.charAt(i2);
|
|
509
|
-
if ((c === "!" || c === "^") && i2 === pos + 1) {
|
|
510
|
-
negate = true;
|
|
511
|
-
i2++;
|
|
512
|
-
continue;
|
|
513
|
-
}
|
|
514
|
-
if (c === "]" && sawStart && !escaping) {
|
|
515
|
-
endPos = i2 + 1;
|
|
516
|
-
break;
|
|
517
|
-
}
|
|
518
|
-
sawStart = true;
|
|
519
|
-
if (c === "\\") {
|
|
520
|
-
if (!escaping) {
|
|
521
|
-
escaping = true;
|
|
522
|
-
i2++;
|
|
523
|
-
continue;
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
if (c === "[" && !escaping) {
|
|
527
|
-
for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
|
|
528
|
-
if (glob.startsWith(cls, i2)) {
|
|
529
|
-
if (rangeStart) {
|
|
530
|
-
return ["$.", false, glob.length - pos, true];
|
|
531
|
-
}
|
|
532
|
-
i2 += cls.length;
|
|
533
|
-
if (neg)
|
|
534
|
-
negs.push(unip);
|
|
535
|
-
else
|
|
536
|
-
ranges.push(unip);
|
|
537
|
-
uflag = uflag || u;
|
|
538
|
-
continue WHILE;
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
escaping = false;
|
|
543
|
-
if (rangeStart) {
|
|
544
|
-
if (c > rangeStart) {
|
|
545
|
-
ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c));
|
|
546
|
-
} else if (c === rangeStart) {
|
|
547
|
-
ranges.push(braceEscape(c));
|
|
548
|
-
}
|
|
549
|
-
rangeStart = "";
|
|
550
|
-
i2++;
|
|
551
|
-
continue;
|
|
552
|
-
}
|
|
553
|
-
if (glob.startsWith("-]", i2 + 1)) {
|
|
554
|
-
ranges.push(braceEscape(c + "-"));
|
|
555
|
-
i2 += 2;
|
|
556
|
-
continue;
|
|
557
|
-
}
|
|
558
|
-
if (glob.startsWith("-", i2 + 1)) {
|
|
559
|
-
rangeStart = c;
|
|
560
|
-
i2 += 2;
|
|
561
|
-
continue;
|
|
562
|
-
}
|
|
563
|
-
ranges.push(braceEscape(c));
|
|
564
|
-
i2++;
|
|
565
|
-
}
|
|
566
|
-
if (endPos < i2) {
|
|
567
|
-
return ["", false, 0, false];
|
|
568
|
-
}
|
|
569
|
-
if (!ranges.length && !negs.length) {
|
|
570
|
-
return ["$.", false, glob.length - pos, true];
|
|
571
|
-
}
|
|
572
|
-
if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate) {
|
|
573
|
-
const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
|
|
574
|
-
return [regexpEscape(r), false, endPos - pos, false];
|
|
575
|
-
}
|
|
576
|
-
const sranges = "[" + (negate ? "^" : "") + rangesToString(ranges) + "]";
|
|
577
|
-
const snegs = "[" + (negate ? "" : "^") + rangesToString(negs) + "]";
|
|
578
|
-
const comb = ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs;
|
|
579
|
-
return [comb, uflag, endPos - pos, true];
|
|
580
|
-
};
|
|
581
|
-
|
|
582
|
-
// node_modules/minimatch/dist/esm/unescape.js
|
|
583
|
-
var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
584
|
-
return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
|
|
585
|
-
};
|
|
586
|
-
|
|
587
|
-
// node_modules/minimatch/dist/esm/ast.js
|
|
588
|
-
var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
|
|
589
|
-
var isExtglobType = (c) => types.has(c);
|
|
590
|
-
var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
|
|
591
|
-
var startNoDot = "(?!\\.)";
|
|
592
|
-
var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
|
|
593
|
-
var justDots = /* @__PURE__ */ new Set(["..", "."]);
|
|
594
|
-
var reSpecials = new Set("().*{}+?[]^$\\!");
|
|
595
|
-
var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
596
|
-
var qmark = "[^/]";
|
|
597
|
-
var star = qmark + "*?";
|
|
598
|
-
var starNoEmpty = qmark + "+?";
|
|
599
|
-
var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, partsToRegExp_fn, parseGlob_fn;
|
|
600
|
-
var _AST = class _AST {
|
|
601
|
-
constructor(type, parent, options = {}) {
|
|
602
|
-
__privateAdd(this, _AST_instances);
|
|
603
|
-
__publicField(this, "type");
|
|
604
|
-
__privateAdd(this, _root);
|
|
605
|
-
__privateAdd(this, _hasMagic);
|
|
606
|
-
__privateAdd(this, _uflag, false);
|
|
607
|
-
__privateAdd(this, _parts, []);
|
|
608
|
-
__privateAdd(this, _parent);
|
|
609
|
-
__privateAdd(this, _parentIndex);
|
|
610
|
-
__privateAdd(this, _negs);
|
|
611
|
-
__privateAdd(this, _filledNegs, false);
|
|
612
|
-
__privateAdd(this, _options);
|
|
613
|
-
__privateAdd(this, _toString);
|
|
614
|
-
// set to true if it's an extglob with no children
|
|
615
|
-
// (which really means one child of '')
|
|
616
|
-
__privateAdd(this, _emptyExt, false);
|
|
617
|
-
this.type = type;
|
|
618
|
-
if (type)
|
|
619
|
-
__privateSet(this, _hasMagic, true);
|
|
620
|
-
__privateSet(this, _parent, parent);
|
|
621
|
-
__privateSet(this, _root, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _root) : this);
|
|
622
|
-
__privateSet(this, _options, __privateGet(this, _root) === this ? options : __privateGet(__privateGet(this, _root), _options));
|
|
623
|
-
__privateSet(this, _negs, __privateGet(this, _root) === this ? [] : __privateGet(__privateGet(this, _root), _negs));
|
|
624
|
-
if (type === "!" && !__privateGet(__privateGet(this, _root), _filledNegs))
|
|
625
|
-
__privateGet(this, _negs).push(this);
|
|
626
|
-
__privateSet(this, _parentIndex, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0);
|
|
627
|
-
}
|
|
628
|
-
get hasMagic() {
|
|
629
|
-
if (__privateGet(this, _hasMagic) !== void 0)
|
|
630
|
-
return __privateGet(this, _hasMagic);
|
|
631
|
-
for (const p of __privateGet(this, _parts)) {
|
|
632
|
-
if (typeof p === "string")
|
|
633
|
-
continue;
|
|
634
|
-
if (p.type || p.hasMagic)
|
|
635
|
-
return __privateSet(this, _hasMagic, true);
|
|
636
|
-
}
|
|
637
|
-
return __privateGet(this, _hasMagic);
|
|
638
|
-
}
|
|
639
|
-
// reconstructs the pattern
|
|
640
|
-
toString() {
|
|
641
|
-
if (__privateGet(this, _toString) !== void 0)
|
|
642
|
-
return __privateGet(this, _toString);
|
|
643
|
-
if (!this.type) {
|
|
644
|
-
return __privateSet(this, _toString, __privateGet(this, _parts).map((p) => String(p)).join(""));
|
|
645
|
-
} else {
|
|
646
|
-
return __privateSet(this, _toString, this.type + "(" + __privateGet(this, _parts).map((p) => String(p)).join("|") + ")");
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
push(...parts) {
|
|
650
|
-
for (const p of parts) {
|
|
651
|
-
if (p === "")
|
|
652
|
-
continue;
|
|
653
|
-
if (typeof p !== "string" && !(p instanceof _AST && __privateGet(p, _parent) === this)) {
|
|
654
|
-
throw new Error("invalid part: " + p);
|
|
655
|
-
}
|
|
656
|
-
__privateGet(this, _parts).push(p);
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
toJSON() {
|
|
660
|
-
var _a;
|
|
661
|
-
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())];
|
|
662
|
-
if (this.isStart() && !this.type)
|
|
663
|
-
ret.unshift([]);
|
|
664
|
-
if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")) {
|
|
665
|
-
ret.push({});
|
|
666
|
-
}
|
|
667
|
-
return ret;
|
|
668
|
-
}
|
|
669
|
-
isStart() {
|
|
670
|
-
var _a;
|
|
671
|
-
if (__privateGet(this, _root) === this)
|
|
672
|
-
return true;
|
|
673
|
-
if (!((_a = __privateGet(this, _parent)) == null ? void 0 : _a.isStart()))
|
|
674
|
-
return false;
|
|
675
|
-
if (__privateGet(this, _parentIndex) === 0)
|
|
676
|
-
return true;
|
|
677
|
-
const p = __privateGet(this, _parent);
|
|
678
|
-
for (let i2 = 0; i2 < __privateGet(this, _parentIndex); i2++) {
|
|
679
|
-
const pp = __privateGet(p, _parts)[i2];
|
|
680
|
-
if (!(pp instanceof _AST && pp.type === "!")) {
|
|
681
|
-
return false;
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
return true;
|
|
685
|
-
}
|
|
686
|
-
isEnd() {
|
|
687
|
-
var _a, _b, _c;
|
|
688
|
-
if (__privateGet(this, _root) === this)
|
|
689
|
-
return true;
|
|
690
|
-
if (((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")
|
|
691
|
-
return true;
|
|
692
|
-
if (!((_b = __privateGet(this, _parent)) == null ? void 0 : _b.isEnd()))
|
|
693
|
-
return false;
|
|
694
|
-
if (!this.type)
|
|
695
|
-
return (_c = __privateGet(this, _parent)) == null ? void 0 : _c.isEnd();
|
|
696
|
-
const pl = __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0;
|
|
697
|
-
return __privateGet(this, _parentIndex) === pl - 1;
|
|
698
|
-
}
|
|
699
|
-
copyIn(part) {
|
|
700
|
-
if (typeof part === "string")
|
|
701
|
-
this.push(part);
|
|
702
|
-
else
|
|
703
|
-
this.push(part.clone(this));
|
|
704
|
-
}
|
|
705
|
-
clone(parent) {
|
|
706
|
-
const c = new _AST(this.type, parent);
|
|
707
|
-
for (const p of __privateGet(this, _parts)) {
|
|
708
|
-
c.copyIn(p);
|
|
709
|
-
}
|
|
710
|
-
return c;
|
|
711
|
-
}
|
|
712
|
-
static fromGlob(pattern, options = {}) {
|
|
713
|
-
var _a;
|
|
714
|
-
const ast = new _AST(null, void 0, options);
|
|
715
|
-
__privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, pattern, ast, 0, options);
|
|
716
|
-
return ast;
|
|
717
|
-
}
|
|
718
|
-
// returns the regular expression if there's magic, or the unescaped
|
|
719
|
-
// string if not.
|
|
720
|
-
toMMPattern() {
|
|
721
|
-
if (this !== __privateGet(this, _root))
|
|
722
|
-
return __privateGet(this, _root).toMMPattern();
|
|
723
|
-
const glob = this.toString();
|
|
724
|
-
const [re, body, hasMagic, uflag] = this.toRegExpSource();
|
|
725
|
-
const anyMagic = hasMagic || __privateGet(this, _hasMagic) || __privateGet(this, _options).nocase && !__privateGet(this, _options).nocaseMagicOnly && glob.toUpperCase() !== glob.toLowerCase();
|
|
726
|
-
if (!anyMagic) {
|
|
727
|
-
return body;
|
|
728
|
-
}
|
|
729
|
-
const flags = (__privateGet(this, _options).nocase ? "i" : "") + (uflag ? "u" : "");
|
|
730
|
-
return Object.assign(new RegExp(`^${re}$`, flags), {
|
|
731
|
-
_src: re,
|
|
732
|
-
_glob: glob
|
|
733
|
-
});
|
|
734
|
-
}
|
|
735
|
-
get options() {
|
|
736
|
-
return __privateGet(this, _options);
|
|
737
|
-
}
|
|
738
|
-
// returns the string match, the regexp source, whether there's magic
|
|
739
|
-
// in the regexp (so a regular expression is required) and whether or
|
|
740
|
-
// not the uflag is needed for the regular expression (for posix classes)
|
|
741
|
-
// TODO: instead of injecting the start/end at this point, just return
|
|
742
|
-
// the BODY of the regexp, along with the start/end portions suitable
|
|
743
|
-
// for binding the start/end in either a joined full-path makeRe context
|
|
744
|
-
// (where we bind to (^|/), or a standalone matchPart context (where
|
|
745
|
-
// we bind to ^, and not /). Otherwise slashes get duped!
|
|
746
|
-
//
|
|
747
|
-
// In part-matching mode, the start is:
|
|
748
|
-
// - if not isStart: nothing
|
|
749
|
-
// - if traversal possible, but not allowed: ^(?!\.\.?$)
|
|
750
|
-
// - if dots allowed or not possible: ^
|
|
751
|
-
// - if dots possible and not allowed: ^(?!\.)
|
|
752
|
-
// end is:
|
|
753
|
-
// - if not isEnd(): nothing
|
|
754
|
-
// - else: $
|
|
755
|
-
//
|
|
756
|
-
// In full-path matching mode, we put the slash at the START of the
|
|
757
|
-
// pattern, so start is:
|
|
758
|
-
// - if first pattern: same as part-matching mode
|
|
759
|
-
// - if not isStart(): nothing
|
|
760
|
-
// - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
|
|
761
|
-
// - if dots allowed or not possible: /
|
|
762
|
-
// - if dots possible and not allowed: /(?!\.)
|
|
763
|
-
// end is:
|
|
764
|
-
// - if last pattern, same as part-matching mode
|
|
765
|
-
// - else nothing
|
|
766
|
-
//
|
|
767
|
-
// Always put the (?:$|/) on negated tails, though, because that has to be
|
|
768
|
-
// there to bind the end of the negated pattern portion, and it's easier to
|
|
769
|
-
// just stick it in now rather than try to inject it later in the middle of
|
|
770
|
-
// the pattern.
|
|
771
|
-
//
|
|
772
|
-
// We can just always return the same end, and leave it up to the caller
|
|
773
|
-
// to know whether it's going to be used joined or in parts.
|
|
774
|
-
// And, if the start is adjusted slightly, can do the same there:
|
|
775
|
-
// - if not isStart: nothing
|
|
776
|
-
// - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
|
|
777
|
-
// - if dots allowed or not possible: (?:/|^)
|
|
778
|
-
// - if dots possible and not allowed: (?:/|^)(?!\.)
|
|
779
|
-
//
|
|
780
|
-
// But it's better to have a simpler binding without a conditional, for
|
|
781
|
-
// performance, so probably better to return both start options.
|
|
782
|
-
//
|
|
783
|
-
// Then the caller just ignores the end if it's not the first pattern,
|
|
784
|
-
// and the start always gets applied.
|
|
785
|
-
//
|
|
786
|
-
// But that's always going to be $ if it's the ending pattern, or nothing,
|
|
787
|
-
// so the caller can just attach $ at the end of the pattern when building.
|
|
788
|
-
//
|
|
789
|
-
// So the todo is:
|
|
790
|
-
// - better detect what kind of start is needed
|
|
791
|
-
// - return both flavors of starting pattern
|
|
792
|
-
// - attach $ at the end of the pattern when creating the actual RegExp
|
|
793
|
-
//
|
|
794
|
-
// Ah, but wait, no, that all only applies to the root when the first pattern
|
|
795
|
-
// is not an extglob. If the first pattern IS an extglob, then we need all
|
|
796
|
-
// that dot prevention biz to live in the extglob portions, because eg
|
|
797
|
-
// +(*|.x*) can match .xy but not .yx.
|
|
798
|
-
//
|
|
799
|
-
// So, return the two flavors if it's #root and the first child is not an
|
|
800
|
-
// AST, otherwise leave it to the child AST to handle it, and there,
|
|
801
|
-
// use the (?:^|/) style of start binding.
|
|
802
|
-
//
|
|
803
|
-
// Even simplified further:
|
|
804
|
-
// - Since the start for a join is eg /(?!\.) and the start for a part
|
|
805
|
-
// is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
|
|
806
|
-
// or start or whatever) and prepend ^ or / at the Regexp construction.
|
|
807
|
-
toRegExpSource(allowDot) {
|
|
808
|
-
var _a;
|
|
809
|
-
const dot = allowDot != null ? allowDot : !!__privateGet(this, _options).dot;
|
|
810
|
-
if (__privateGet(this, _root) === this)
|
|
811
|
-
__privateMethod(this, _AST_instances, fillNegs_fn).call(this);
|
|
812
|
-
if (!this.type) {
|
|
813
|
-
const noEmpty = this.isStart() && this.isEnd();
|
|
814
|
-
const src = __privateGet(this, _parts).map((p) => {
|
|
815
|
-
var _a2;
|
|
816
|
-
const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a2 = _AST, _AST_static, parseGlob_fn).call(_a2, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
|
|
817
|
-
__privateSet(this, _hasMagic, __privateGet(this, _hasMagic) || hasMagic);
|
|
818
|
-
__privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
|
|
819
|
-
return re;
|
|
820
|
-
}).join("");
|
|
821
|
-
let start2 = "";
|
|
822
|
-
if (this.isStart()) {
|
|
823
|
-
if (typeof __privateGet(this, _parts)[0] === "string") {
|
|
824
|
-
const dotTravAllowed = __privateGet(this, _parts).length === 1 && justDots.has(__privateGet(this, _parts)[0]);
|
|
825
|
-
if (!dotTravAllowed) {
|
|
826
|
-
const aps = addPatternStart;
|
|
827
|
-
const needNoTrav = (
|
|
828
|
-
// dots are allowed, and the pattern starts with [ or .
|
|
829
|
-
dot && aps.has(src.charAt(0)) || // the pattern starts with \., and then [ or .
|
|
830
|
-
src.startsWith("\\.") && aps.has(src.charAt(2)) || // the pattern starts with \.\., and then [ or .
|
|
831
|
-
src.startsWith("\\.\\.") && aps.has(src.charAt(4))
|
|
832
|
-
);
|
|
833
|
-
const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
|
|
834
|
-
start2 = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : "";
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
|
-
}
|
|
838
|
-
let end = "";
|
|
839
|
-
if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!") {
|
|
840
|
-
end = "(?:$|\\/)";
|
|
841
|
-
}
|
|
842
|
-
const final2 = start2 + src + end;
|
|
843
|
-
return [
|
|
844
|
-
final2,
|
|
845
|
-
unescape(src),
|
|
846
|
-
__privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
|
|
847
|
-
__privateGet(this, _uflag)
|
|
848
|
-
];
|
|
849
|
-
}
|
|
850
|
-
const repeated = this.type === "*" || this.type === "+";
|
|
851
|
-
const start = this.type === "!" ? "(?:(?!(?:" : "(?:";
|
|
852
|
-
let body = __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, dot);
|
|
853
|
-
if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
|
|
854
|
-
const s = this.toString();
|
|
855
|
-
__privateSet(this, _parts, [s]);
|
|
856
|
-
this.type = null;
|
|
857
|
-
__privateSet(this, _hasMagic, void 0);
|
|
858
|
-
return [s, unescape(this.toString()), false, false];
|
|
859
|
-
}
|
|
860
|
-
let bodyDotAllowed = !repeated || allowDot || dot || false ? "" : __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, true);
|
|
861
|
-
if (bodyDotAllowed === body) {
|
|
862
|
-
bodyDotAllowed = "";
|
|
863
|
-
}
|
|
864
|
-
if (bodyDotAllowed) {
|
|
865
|
-
body = `(?:${body})(?:${bodyDotAllowed})*?`;
|
|
866
|
-
}
|
|
867
|
-
let final = "";
|
|
868
|
-
if (this.type === "!" && __privateGet(this, _emptyExt)) {
|
|
869
|
-
final = (this.isStart() && !dot ? startNoDot : "") + starNoEmpty;
|
|
870
|
-
} else {
|
|
871
|
-
const close = this.type === "!" ? (
|
|
872
|
-
// !() must match something,but !(x) can match ''
|
|
873
|
-
"))" + (this.isStart() && !dot && !allowDot ? startNoDot : "") + star + ")"
|
|
874
|
-
) : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && bodyDotAllowed ? ")" : this.type === "*" && bodyDotAllowed ? `)?` : `)${this.type}`;
|
|
875
|
-
final = start + body + close;
|
|
876
|
-
}
|
|
877
|
-
return [
|
|
878
|
-
final,
|
|
879
|
-
unescape(body),
|
|
880
|
-
__privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
|
|
881
|
-
__privateGet(this, _uflag)
|
|
882
|
-
];
|
|
883
|
-
}
|
|
884
|
-
};
|
|
885
|
-
_root = new WeakMap();
|
|
886
|
-
_hasMagic = new WeakMap();
|
|
887
|
-
_uflag = new WeakMap();
|
|
888
|
-
_parts = new WeakMap();
|
|
889
|
-
_parent = new WeakMap();
|
|
890
|
-
_parentIndex = new WeakMap();
|
|
891
|
-
_negs = new WeakMap();
|
|
892
|
-
_filledNegs = new WeakMap();
|
|
893
|
-
_options = new WeakMap();
|
|
894
|
-
_toString = new WeakMap();
|
|
895
|
-
_emptyExt = new WeakMap();
|
|
896
|
-
_AST_instances = new WeakSet();
|
|
897
|
-
fillNegs_fn = function() {
|
|
898
|
-
if (this !== __privateGet(this, _root))
|
|
899
|
-
throw new Error("should only call on root");
|
|
900
|
-
if (__privateGet(this, _filledNegs))
|
|
901
|
-
return this;
|
|
902
|
-
this.toString();
|
|
903
|
-
__privateSet(this, _filledNegs, true);
|
|
904
|
-
let n;
|
|
905
|
-
while (n = __privateGet(this, _negs).pop()) {
|
|
906
|
-
if (n.type !== "!")
|
|
907
|
-
continue;
|
|
908
|
-
let p = n;
|
|
909
|
-
let pp = __privateGet(p, _parent);
|
|
910
|
-
while (pp) {
|
|
911
|
-
for (let i2 = __privateGet(p, _parentIndex) + 1; !pp.type && i2 < __privateGet(pp, _parts).length; i2++) {
|
|
912
|
-
for (const part of __privateGet(n, _parts)) {
|
|
913
|
-
if (typeof part === "string") {
|
|
914
|
-
throw new Error("string part in extglob AST??");
|
|
915
|
-
}
|
|
916
|
-
part.copyIn(__privateGet(pp, _parts)[i2]);
|
|
917
|
-
}
|
|
918
|
-
}
|
|
919
|
-
p = pp;
|
|
920
|
-
pp = __privateGet(p, _parent);
|
|
921
|
-
}
|
|
922
|
-
}
|
|
923
|
-
return this;
|
|
924
|
-
};
|
|
925
|
-
_AST_static = new WeakSet();
|
|
926
|
-
parseAST_fn = function(str, ast, pos, opt) {
|
|
927
|
-
var _a, _b;
|
|
928
|
-
let escaping = false;
|
|
929
|
-
let inBrace = false;
|
|
930
|
-
let braceStart = -1;
|
|
931
|
-
let braceNeg = false;
|
|
932
|
-
if (ast.type === null) {
|
|
933
|
-
let i3 = pos;
|
|
934
|
-
let acc2 = "";
|
|
935
|
-
while (i3 < str.length) {
|
|
936
|
-
const c = str.charAt(i3++);
|
|
937
|
-
if (escaping || c === "\\") {
|
|
938
|
-
escaping = !escaping;
|
|
939
|
-
acc2 += c;
|
|
940
|
-
continue;
|
|
941
|
-
}
|
|
942
|
-
if (inBrace) {
|
|
943
|
-
if (i3 === braceStart + 1) {
|
|
944
|
-
if (c === "^" || c === "!") {
|
|
945
|
-
braceNeg = true;
|
|
946
|
-
}
|
|
947
|
-
} else if (c === "]" && !(i3 === braceStart + 2 && braceNeg)) {
|
|
948
|
-
inBrace = false;
|
|
949
|
-
}
|
|
950
|
-
acc2 += c;
|
|
951
|
-
continue;
|
|
952
|
-
} else if (c === "[") {
|
|
953
|
-
inBrace = true;
|
|
954
|
-
braceStart = i3;
|
|
955
|
-
braceNeg = false;
|
|
956
|
-
acc2 += c;
|
|
957
|
-
continue;
|
|
958
|
-
}
|
|
959
|
-
if (!opt.noext && isExtglobType(c) && str.charAt(i3) === "(") {
|
|
960
|
-
ast.push(acc2);
|
|
961
|
-
acc2 = "";
|
|
962
|
-
const ext2 = new _AST(c, ast);
|
|
963
|
-
i3 = __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, str, ext2, i3, opt);
|
|
964
|
-
ast.push(ext2);
|
|
965
|
-
continue;
|
|
966
|
-
}
|
|
967
|
-
acc2 += c;
|
|
968
|
-
}
|
|
969
|
-
ast.push(acc2);
|
|
970
|
-
return i3;
|
|
971
|
-
}
|
|
972
|
-
let i2 = pos + 1;
|
|
973
|
-
let part = new _AST(null, ast);
|
|
974
|
-
const parts = [];
|
|
975
|
-
let acc = "";
|
|
976
|
-
while (i2 < str.length) {
|
|
977
|
-
const c = str.charAt(i2++);
|
|
978
|
-
if (escaping || c === "\\") {
|
|
979
|
-
escaping = !escaping;
|
|
980
|
-
acc += c;
|
|
981
|
-
continue;
|
|
982
|
-
}
|
|
983
|
-
if (inBrace) {
|
|
984
|
-
if (i2 === braceStart + 1) {
|
|
985
|
-
if (c === "^" || c === "!") {
|
|
986
|
-
braceNeg = true;
|
|
987
|
-
}
|
|
988
|
-
} else if (c === "]" && !(i2 === braceStart + 2 && braceNeg)) {
|
|
989
|
-
inBrace = false;
|
|
990
|
-
}
|
|
991
|
-
acc += c;
|
|
992
|
-
continue;
|
|
993
|
-
} else if (c === "[") {
|
|
994
|
-
inBrace = true;
|
|
995
|
-
braceStart = i2;
|
|
996
|
-
braceNeg = false;
|
|
997
|
-
acc += c;
|
|
998
|
-
continue;
|
|
999
|
-
}
|
|
1000
|
-
if (isExtglobType(c) && str.charAt(i2) === "(") {
|
|
1001
|
-
part.push(acc);
|
|
1002
|
-
acc = "";
|
|
1003
|
-
const ext2 = new _AST(c, part);
|
|
1004
|
-
part.push(ext2);
|
|
1005
|
-
i2 = __privateMethod(_b = _AST, _AST_static, parseAST_fn).call(_b, str, ext2, i2, opt);
|
|
1006
|
-
continue;
|
|
1007
|
-
}
|
|
1008
|
-
if (c === "|") {
|
|
1009
|
-
part.push(acc);
|
|
1010
|
-
acc = "";
|
|
1011
|
-
parts.push(part);
|
|
1012
|
-
part = new _AST(null, ast);
|
|
1013
|
-
continue;
|
|
1014
|
-
}
|
|
1015
|
-
if (c === ")") {
|
|
1016
|
-
if (acc === "" && __privateGet(ast, _parts).length === 0) {
|
|
1017
|
-
__privateSet(ast, _emptyExt, true);
|
|
1018
|
-
}
|
|
1019
|
-
part.push(acc);
|
|
1020
|
-
acc = "";
|
|
1021
|
-
ast.push(...parts, part);
|
|
1022
|
-
return i2;
|
|
1023
|
-
}
|
|
1024
|
-
acc += c;
|
|
1025
|
-
}
|
|
1026
|
-
ast.type = null;
|
|
1027
|
-
__privateSet(ast, _hasMagic, void 0);
|
|
1028
|
-
__privateSet(ast, _parts, [str.substring(pos - 1)]);
|
|
1029
|
-
return i2;
|
|
1030
|
-
};
|
|
1031
|
-
partsToRegExp_fn = function(dot) {
|
|
1032
|
-
return __privateGet(this, _parts).map((p) => {
|
|
1033
|
-
if (typeof p === "string") {
|
|
1034
|
-
throw new Error("string type in extglob ast??");
|
|
1035
|
-
}
|
|
1036
|
-
const [re, _, _hasMagic2, uflag] = p.toRegExpSource(dot);
|
|
1037
|
-
__privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
|
|
1038
|
-
return re;
|
|
1039
|
-
}).filter((p) => !(this.isStart() && this.isEnd()) || !!p).join("|");
|
|
1040
|
-
};
|
|
1041
|
-
parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
|
|
1042
|
-
let escaping = false;
|
|
1043
|
-
let re = "";
|
|
1044
|
-
let uflag = false;
|
|
1045
|
-
for (let i2 = 0; i2 < glob.length; i2++) {
|
|
1046
|
-
const c = glob.charAt(i2);
|
|
1047
|
-
if (escaping) {
|
|
1048
|
-
escaping = false;
|
|
1049
|
-
re += (reSpecials.has(c) ? "\\" : "") + c;
|
|
1050
|
-
continue;
|
|
1051
|
-
}
|
|
1052
|
-
if (c === "\\") {
|
|
1053
|
-
if (i2 === glob.length - 1) {
|
|
1054
|
-
re += "\\\\";
|
|
1055
|
-
} else {
|
|
1056
|
-
escaping = true;
|
|
1057
|
-
}
|
|
1058
|
-
continue;
|
|
1059
|
-
}
|
|
1060
|
-
if (c === "[") {
|
|
1061
|
-
const [src, needUflag, consumed, magic] = parseClass(glob, i2);
|
|
1062
|
-
if (consumed) {
|
|
1063
|
-
re += src;
|
|
1064
|
-
uflag = uflag || needUflag;
|
|
1065
|
-
i2 += consumed - 1;
|
|
1066
|
-
hasMagic = hasMagic || magic;
|
|
1067
|
-
continue;
|
|
1068
|
-
}
|
|
1069
|
-
}
|
|
1070
|
-
if (c === "*") {
|
|
1071
|
-
if (noEmpty && glob === "*")
|
|
1072
|
-
re += starNoEmpty;
|
|
1073
|
-
else
|
|
1074
|
-
re += star;
|
|
1075
|
-
hasMagic = true;
|
|
1076
|
-
continue;
|
|
1077
|
-
}
|
|
1078
|
-
if (c === "?") {
|
|
1079
|
-
re += qmark;
|
|
1080
|
-
hasMagic = true;
|
|
1081
|
-
continue;
|
|
1082
|
-
}
|
|
1083
|
-
re += regExpEscape(c);
|
|
1084
|
-
}
|
|
1085
|
-
return [re, unescape(glob), !!hasMagic, uflag];
|
|
1086
|
-
};
|
|
1087
|
-
__privateAdd(_AST, _AST_static);
|
|
1088
|
-
var AST = _AST;
|
|
1089
|
-
|
|
1090
|
-
// node_modules/minimatch/dist/esm/escape.js
|
|
1091
|
-
var escape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
1092
|
-
return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
|
|
1093
|
-
};
|
|
1094
|
-
|
|
1095
|
-
// node_modules/minimatch/dist/esm/index.js
|
|
1096
|
-
var minimatch = (p, pattern, options = {}) => {
|
|
1097
|
-
assertValidPattern(pattern);
|
|
1098
|
-
if (!options.nocomment && pattern.charAt(0) === "#") {
|
|
1099
|
-
return false;
|
|
1100
|
-
}
|
|
1101
|
-
return new Minimatch(pattern, options).match(p);
|
|
1102
|
-
};
|
|
1103
|
-
var starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
|
|
1104
|
-
var starDotExtTest = (ext2) => (f) => !f.startsWith(".") && f.endsWith(ext2);
|
|
1105
|
-
var starDotExtTestDot = (ext2) => (f) => f.endsWith(ext2);
|
|
1106
|
-
var starDotExtTestNocase = (ext2) => {
|
|
1107
|
-
ext2 = ext2.toLowerCase();
|
|
1108
|
-
return (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext2);
|
|
1109
|
-
};
|
|
1110
|
-
var starDotExtTestNocaseDot = (ext2) => {
|
|
1111
|
-
ext2 = ext2.toLowerCase();
|
|
1112
|
-
return (f) => f.toLowerCase().endsWith(ext2);
|
|
1113
|
-
};
|
|
1114
|
-
var starDotStarRE = /^\*+\.\*+$/;
|
|
1115
|
-
var starDotStarTest = (f) => !f.startsWith(".") && f.includes(".");
|
|
1116
|
-
var starDotStarTestDot = (f) => f !== "." && f !== ".." && f.includes(".");
|
|
1117
|
-
var dotStarRE = /^\.\*+$/;
|
|
1118
|
-
var dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith(".");
|
|
1119
|
-
var starRE = /^\*+$/;
|
|
1120
|
-
var starTest = (f) => f.length !== 0 && !f.startsWith(".");
|
|
1121
|
-
var starTestDot = (f) => f.length !== 0 && f !== "." && f !== "..";
|
|
1122
|
-
var qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
|
|
1123
|
-
var qmarksTestNocase = ([$0, ext2 = ""]) => {
|
|
1124
|
-
const noext = qmarksTestNoExt([$0]);
|
|
1125
|
-
if (!ext2)
|
|
1126
|
-
return noext;
|
|
1127
|
-
ext2 = ext2.toLowerCase();
|
|
1128
|
-
return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
|
|
1129
|
-
};
|
|
1130
|
-
var qmarksTestNocaseDot = ([$0, ext2 = ""]) => {
|
|
1131
|
-
const noext = qmarksTestNoExtDot([$0]);
|
|
1132
|
-
if (!ext2)
|
|
1133
|
-
return noext;
|
|
1134
|
-
ext2 = ext2.toLowerCase();
|
|
1135
|
-
return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
|
|
1136
|
-
};
|
|
1137
|
-
var qmarksTestDot = ([$0, ext2 = ""]) => {
|
|
1138
|
-
const noext = qmarksTestNoExtDot([$0]);
|
|
1139
|
-
return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
|
|
1140
|
-
};
|
|
1141
|
-
var qmarksTest = ([$0, ext2 = ""]) => {
|
|
1142
|
-
const noext = qmarksTestNoExt([$0]);
|
|
1143
|
-
return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
|
|
1144
|
-
};
|
|
1145
|
-
var qmarksTestNoExt = ([$0]) => {
|
|
1146
|
-
const len = $0.length;
|
|
1147
|
-
return (f) => f.length === len && !f.startsWith(".");
|
|
1148
|
-
};
|
|
1149
|
-
var qmarksTestNoExtDot = ([$0]) => {
|
|
1150
|
-
const len = $0.length;
|
|
1151
|
-
return (f) => f.length === len && f !== "." && f !== "..";
|
|
1152
|
-
};
|
|
1153
|
-
var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
1154
|
-
var path = {
|
|
1155
|
-
win32: { sep: "\\" },
|
|
1156
|
-
posix: { sep: "/" }
|
|
1157
|
-
};
|
|
1158
|
-
var sep = defaultPlatform === "win32" ? path.win32.sep : path.posix.sep;
|
|
1159
|
-
minimatch.sep = sep;
|
|
1160
|
-
var GLOBSTAR = Symbol("globstar **");
|
|
1161
|
-
minimatch.GLOBSTAR = GLOBSTAR;
|
|
1162
|
-
var qmark2 = "[^/]";
|
|
1163
|
-
var star2 = qmark2 + "*?";
|
|
1164
|
-
var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
|
|
1165
|
-
var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
|
|
1166
|
-
var filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
|
|
1167
|
-
minimatch.filter = filter;
|
|
1168
|
-
var ext = (a, b = {}) => Object.assign({}, a, b);
|
|
1169
|
-
var defaults = (def) => {
|
|
1170
|
-
if (!def || typeof def !== "object" || !Object.keys(def).length) {
|
|
1171
|
-
return minimatch;
|
|
1172
|
-
}
|
|
1173
|
-
const orig = minimatch;
|
|
1174
|
-
const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
|
|
1175
|
-
return Object.assign(m, {
|
|
1176
|
-
Minimatch: class Minimatch extends orig.Minimatch {
|
|
1177
|
-
constructor(pattern, options = {}) {
|
|
1178
|
-
super(pattern, ext(def, options));
|
|
1179
|
-
}
|
|
1180
|
-
static defaults(options) {
|
|
1181
|
-
return orig.defaults(ext(def, options)).Minimatch;
|
|
1182
|
-
}
|
|
1183
|
-
},
|
|
1184
|
-
AST: class AST extends orig.AST {
|
|
1185
|
-
/* c8 ignore start */
|
|
1186
|
-
constructor(type, parent, options = {}) {
|
|
1187
|
-
super(type, parent, ext(def, options));
|
|
1188
|
-
}
|
|
1189
|
-
/* c8 ignore stop */
|
|
1190
|
-
static fromGlob(pattern, options = {}) {
|
|
1191
|
-
return orig.AST.fromGlob(pattern, ext(def, options));
|
|
1192
|
-
}
|
|
1193
|
-
},
|
|
1194
|
-
unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
|
|
1195
|
-
escape: (s, options = {}) => orig.escape(s, ext(def, options)),
|
|
1196
|
-
filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
|
|
1197
|
-
defaults: (options) => orig.defaults(ext(def, options)),
|
|
1198
|
-
makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
|
|
1199
|
-
braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
|
|
1200
|
-
match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
|
|
1201
|
-
sep: orig.sep,
|
|
1202
|
-
GLOBSTAR
|
|
1203
|
-
});
|
|
1204
|
-
};
|
|
1205
|
-
minimatch.defaults = defaults;
|
|
1206
|
-
var braceExpand = (pattern, options = {}) => {
|
|
1207
|
-
assertValidPattern(pattern);
|
|
1208
|
-
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
|
|
1209
|
-
return [pattern];
|
|
1210
|
-
}
|
|
1211
|
-
return (0, import_brace_expansion.default)(pattern);
|
|
1212
|
-
};
|
|
1213
|
-
minimatch.braceExpand = braceExpand;
|
|
1214
|
-
var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
|
|
1215
|
-
minimatch.makeRe = makeRe;
|
|
1216
|
-
var match = (list, pattern, options = {}) => {
|
|
1217
|
-
const mm = new Minimatch(pattern, options);
|
|
1218
|
-
list = list.filter((f) => mm.match(f));
|
|
1219
|
-
if (mm.options.nonull && !list.length) {
|
|
1220
|
-
list.push(pattern);
|
|
1221
|
-
}
|
|
1222
|
-
return list;
|
|
1223
|
-
};
|
|
1224
|
-
minimatch.match = match;
|
|
1225
|
-
var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
|
|
1226
|
-
var regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
1227
|
-
var Minimatch = class {
|
|
1228
|
-
options;
|
|
1229
|
-
set;
|
|
1230
|
-
pattern;
|
|
1231
|
-
windowsPathsNoEscape;
|
|
1232
|
-
nonegate;
|
|
1233
|
-
negate;
|
|
1234
|
-
comment;
|
|
1235
|
-
empty;
|
|
1236
|
-
preserveMultipleSlashes;
|
|
1237
|
-
partial;
|
|
1238
|
-
globSet;
|
|
1239
|
-
globParts;
|
|
1240
|
-
nocase;
|
|
1241
|
-
isWindows;
|
|
1242
|
-
platform;
|
|
1243
|
-
windowsNoMagicRoot;
|
|
1244
|
-
regexp;
|
|
1245
|
-
constructor(pattern, options = {}) {
|
|
1246
|
-
assertValidPattern(pattern);
|
|
1247
|
-
options = options || {};
|
|
1248
|
-
this.options = options;
|
|
1249
|
-
this.pattern = pattern;
|
|
1250
|
-
this.platform = options.platform || defaultPlatform;
|
|
1251
|
-
this.isWindows = this.platform === "win32";
|
|
1252
|
-
this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
|
|
1253
|
-
if (this.windowsPathsNoEscape) {
|
|
1254
|
-
this.pattern = this.pattern.replace(/\\/g, "/");
|
|
1255
|
-
}
|
|
1256
|
-
this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
|
|
1257
|
-
this.regexp = null;
|
|
1258
|
-
this.negate = false;
|
|
1259
|
-
this.nonegate = !!options.nonegate;
|
|
1260
|
-
this.comment = false;
|
|
1261
|
-
this.empty = false;
|
|
1262
|
-
this.partial = !!options.partial;
|
|
1263
|
-
this.nocase = !!this.options.nocase;
|
|
1264
|
-
this.windowsNoMagicRoot = options.windowsNoMagicRoot !== void 0 ? options.windowsNoMagicRoot : !!(this.isWindows && this.nocase);
|
|
1265
|
-
this.globSet = [];
|
|
1266
|
-
this.globParts = [];
|
|
1267
|
-
this.set = [];
|
|
1268
|
-
this.make();
|
|
1269
|
-
}
|
|
1270
|
-
hasMagic() {
|
|
1271
|
-
if (this.options.magicalBraces && this.set.length > 1) {
|
|
1272
|
-
return true;
|
|
1273
|
-
}
|
|
1274
|
-
for (const pattern of this.set) {
|
|
1275
|
-
for (const part of pattern) {
|
|
1276
|
-
if (typeof part !== "string")
|
|
1277
|
-
return true;
|
|
1278
|
-
}
|
|
1279
|
-
}
|
|
1280
|
-
return false;
|
|
1281
|
-
}
|
|
1282
|
-
debug(..._) {
|
|
1283
|
-
}
|
|
1284
|
-
make() {
|
|
1285
|
-
const pattern = this.pattern;
|
|
1286
|
-
const options = this.options;
|
|
1287
|
-
if (!options.nocomment && pattern.charAt(0) === "#") {
|
|
1288
|
-
this.comment = true;
|
|
1289
|
-
return;
|
|
1290
|
-
}
|
|
1291
|
-
if (!pattern) {
|
|
1292
|
-
this.empty = true;
|
|
1293
|
-
return;
|
|
1294
|
-
}
|
|
1295
|
-
this.parseNegate();
|
|
1296
|
-
this.globSet = [...new Set(this.braceExpand())];
|
|
1297
|
-
if (options.debug) {
|
|
1298
|
-
this.debug = (...args) => console.error(...args);
|
|
1299
|
-
}
|
|
1300
|
-
this.debug(this.pattern, this.globSet);
|
|
1301
|
-
const rawGlobParts = this.globSet.map((s) => this.slashSplit(s));
|
|
1302
|
-
this.globParts = this.preprocess(rawGlobParts);
|
|
1303
|
-
this.debug(this.pattern, this.globParts);
|
|
1304
|
-
let set = this.globParts.map((s, _, __) => {
|
|
1305
|
-
if (this.isWindows && this.windowsNoMagicRoot) {
|
|
1306
|
-
const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]);
|
|
1307
|
-
const isDrive = /^[a-z]:/i.test(s[0]);
|
|
1308
|
-
if (isUNC) {
|
|
1309
|
-
return [...s.slice(0, 4), ...s.slice(4).map((ss) => this.parse(ss))];
|
|
1310
|
-
} else if (isDrive) {
|
|
1311
|
-
return [s[0], ...s.slice(1).map((ss) => this.parse(ss))];
|
|
1312
|
-
}
|
|
1313
|
-
}
|
|
1314
|
-
return s.map((ss) => this.parse(ss));
|
|
1315
|
-
});
|
|
1316
|
-
this.debug(this.pattern, set);
|
|
1317
|
-
this.set = set.filter((s) => s.indexOf(false) === -1);
|
|
1318
|
-
if (this.isWindows) {
|
|
1319
|
-
for (let i2 = 0; i2 < this.set.length; i2++) {
|
|
1320
|
-
const p = this.set[i2];
|
|
1321
|
-
if (p[0] === "" && p[1] === "" && this.globParts[i2][2] === "?" && typeof p[3] === "string" && /^[a-z]:$/i.test(p[3])) {
|
|
1322
|
-
p[2] = "?";
|
|
1323
|
-
}
|
|
1324
|
-
}
|
|
1325
|
-
}
|
|
1326
|
-
this.debug(this.pattern, this.set);
|
|
1327
|
-
}
|
|
1328
|
-
// various transforms to equivalent pattern sets that are
|
|
1329
|
-
// faster to process in a filesystem walk. The goal is to
|
|
1330
|
-
// eliminate what we can, and push all ** patterns as far
|
|
1331
|
-
// to the right as possible, even if it increases the number
|
|
1332
|
-
// of patterns that we have to process.
|
|
1333
|
-
preprocess(globParts) {
|
|
1334
|
-
if (this.options.noglobstar) {
|
|
1335
|
-
for (let i2 = 0; i2 < globParts.length; i2++) {
|
|
1336
|
-
for (let j = 0; j < globParts[i2].length; j++) {
|
|
1337
|
-
if (globParts[i2][j] === "**") {
|
|
1338
|
-
globParts[i2][j] = "*";
|
|
1339
|
-
}
|
|
1340
|
-
}
|
|
1341
|
-
}
|
|
1342
|
-
}
|
|
1343
|
-
const { optimizationLevel = 1 } = this.options;
|
|
1344
|
-
if (optimizationLevel >= 2) {
|
|
1345
|
-
globParts = this.firstPhasePreProcess(globParts);
|
|
1346
|
-
globParts = this.secondPhasePreProcess(globParts);
|
|
1347
|
-
} else if (optimizationLevel >= 1) {
|
|
1348
|
-
globParts = this.levelOneOptimize(globParts);
|
|
1349
|
-
} else {
|
|
1350
|
-
globParts = this.adjascentGlobstarOptimize(globParts);
|
|
1351
|
-
}
|
|
1352
|
-
return globParts;
|
|
1353
|
-
}
|
|
1354
|
-
// just get rid of adjascent ** portions
|
|
1355
|
-
adjascentGlobstarOptimize(globParts) {
|
|
1356
|
-
return globParts.map((parts) => {
|
|
1357
|
-
let gs = -1;
|
|
1358
|
-
while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
|
|
1359
|
-
let i2 = gs;
|
|
1360
|
-
while (parts[i2 + 1] === "**") {
|
|
1361
|
-
i2++;
|
|
1362
|
-
}
|
|
1363
|
-
if (i2 !== gs) {
|
|
1364
|
-
parts.splice(gs, i2 - gs);
|
|
1365
|
-
}
|
|
1366
|
-
}
|
|
1367
|
-
return parts;
|
|
1368
|
-
});
|
|
1369
|
-
}
|
|
1370
|
-
// get rid of adjascent ** and resolve .. portions
|
|
1371
|
-
levelOneOptimize(globParts) {
|
|
1372
|
-
return globParts.map((parts) => {
|
|
1373
|
-
parts = parts.reduce((set, part) => {
|
|
1374
|
-
const prev = set[set.length - 1];
|
|
1375
|
-
if (part === "**" && prev === "**") {
|
|
1376
|
-
return set;
|
|
1377
|
-
}
|
|
1378
|
-
if (part === "..") {
|
|
1379
|
-
if (prev && prev !== ".." && prev !== "." && prev !== "**") {
|
|
1380
|
-
set.pop();
|
|
1381
|
-
return set;
|
|
1382
|
-
}
|
|
1383
|
-
}
|
|
1384
|
-
set.push(part);
|
|
1385
|
-
return set;
|
|
1386
|
-
}, []);
|
|
1387
|
-
return parts.length === 0 ? [""] : parts;
|
|
1388
|
-
});
|
|
1389
|
-
}
|
|
1390
|
-
levelTwoFileOptimize(parts) {
|
|
1391
|
-
if (!Array.isArray(parts)) {
|
|
1392
|
-
parts = this.slashSplit(parts);
|
|
1393
|
-
}
|
|
1394
|
-
let didSomething = false;
|
|
1395
|
-
do {
|
|
1396
|
-
didSomething = false;
|
|
1397
|
-
if (!this.preserveMultipleSlashes) {
|
|
1398
|
-
for (let i2 = 1; i2 < parts.length - 1; i2++) {
|
|
1399
|
-
const p = parts[i2];
|
|
1400
|
-
if (i2 === 1 && p === "" && parts[0] === "")
|
|
1401
|
-
continue;
|
|
1402
|
-
if (p === "." || p === "") {
|
|
1403
|
-
didSomething = true;
|
|
1404
|
-
parts.splice(i2, 1);
|
|
1405
|
-
i2--;
|
|
1406
|
-
}
|
|
1407
|
-
}
|
|
1408
|
-
if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
|
|
1409
|
-
didSomething = true;
|
|
1410
|
-
parts.pop();
|
|
1411
|
-
}
|
|
1412
|
-
}
|
|
1413
|
-
let dd = 0;
|
|
1414
|
-
while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
|
|
1415
|
-
const p = parts[dd - 1];
|
|
1416
|
-
if (p && p !== "." && p !== ".." && p !== "**") {
|
|
1417
|
-
didSomething = true;
|
|
1418
|
-
parts.splice(dd - 1, 2);
|
|
1419
|
-
dd -= 2;
|
|
1420
|
-
}
|
|
1421
|
-
}
|
|
1422
|
-
} while (didSomething);
|
|
1423
|
-
return parts.length === 0 ? [""] : parts;
|
|
1424
|
-
}
|
|
1425
|
-
// First phase: single-pattern processing
|
|
1426
|
-
// <pre> is 1 or more portions
|
|
1427
|
-
// <rest> is 1 or more portions
|
|
1428
|
-
// <p> is any portion other than ., .., '', or **
|
|
1429
|
-
// <e> is . or ''
|
|
1430
|
-
//
|
|
1431
|
-
// **/.. is *brutal* for filesystem walking performance, because
|
|
1432
|
-
// it effectively resets the recursive walk each time it occurs,
|
|
1433
|
-
// and ** cannot be reduced out by a .. pattern part like a regexp
|
|
1434
|
-
// or most strings (other than .., ., and '') can be.
|
|
1435
|
-
//
|
|
1436
|
-
// <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}
|
|
1437
|
-
// <pre>/<e>/<rest> -> <pre>/<rest>
|
|
1438
|
-
// <pre>/<p>/../<rest> -> <pre>/<rest>
|
|
1439
|
-
// **/**/<rest> -> **/<rest>
|
|
1440
|
-
//
|
|
1441
|
-
// **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow
|
|
1442
|
-
// this WOULD be allowed if ** did follow symlinks, or * didn't
|
|
1443
|
-
firstPhasePreProcess(globParts) {
|
|
1444
|
-
let didSomething = false;
|
|
1445
|
-
do {
|
|
1446
|
-
didSomething = false;
|
|
1447
|
-
for (let parts of globParts) {
|
|
1448
|
-
let gs = -1;
|
|
1449
|
-
while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
|
|
1450
|
-
let gss = gs;
|
|
1451
|
-
while (parts[gss + 1] === "**") {
|
|
1452
|
-
gss++;
|
|
1453
|
-
}
|
|
1454
|
-
if (gss > gs) {
|
|
1455
|
-
parts.splice(gs + 1, gss - gs);
|
|
1456
|
-
}
|
|
1457
|
-
let next = parts[gs + 1];
|
|
1458
|
-
const p = parts[gs + 2];
|
|
1459
|
-
const p2 = parts[gs + 3];
|
|
1460
|
-
if (next !== "..")
|
|
1461
|
-
continue;
|
|
1462
|
-
if (!p || p === "." || p === ".." || !p2 || p2 === "." || p2 === "..") {
|
|
1463
|
-
continue;
|
|
1464
|
-
}
|
|
1465
|
-
didSomething = true;
|
|
1466
|
-
parts.splice(gs, 1);
|
|
1467
|
-
const other = parts.slice(0);
|
|
1468
|
-
other[gs] = "**";
|
|
1469
|
-
globParts.push(other);
|
|
1470
|
-
gs--;
|
|
1471
|
-
}
|
|
1472
|
-
if (!this.preserveMultipleSlashes) {
|
|
1473
|
-
for (let i2 = 1; i2 < parts.length - 1; i2++) {
|
|
1474
|
-
const p = parts[i2];
|
|
1475
|
-
if (i2 === 1 && p === "" && parts[0] === "")
|
|
1476
|
-
continue;
|
|
1477
|
-
if (p === "." || p === "") {
|
|
1478
|
-
didSomething = true;
|
|
1479
|
-
parts.splice(i2, 1);
|
|
1480
|
-
i2--;
|
|
1481
|
-
}
|
|
1482
|
-
}
|
|
1483
|
-
if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
|
|
1484
|
-
didSomething = true;
|
|
1485
|
-
parts.pop();
|
|
1486
|
-
}
|
|
1487
|
-
}
|
|
1488
|
-
let dd = 0;
|
|
1489
|
-
while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
|
|
1490
|
-
const p = parts[dd - 1];
|
|
1491
|
-
if (p && p !== "." && p !== ".." && p !== "**") {
|
|
1492
|
-
didSomething = true;
|
|
1493
|
-
const needDot = dd === 1 && parts[dd + 1] === "**";
|
|
1494
|
-
const splin = needDot ? ["."] : [];
|
|
1495
|
-
parts.splice(dd - 1, 2, ...splin);
|
|
1496
|
-
if (parts.length === 0)
|
|
1497
|
-
parts.push("");
|
|
1498
|
-
dd -= 2;
|
|
1499
|
-
}
|
|
1500
|
-
}
|
|
1501
|
-
}
|
|
1502
|
-
} while (didSomething);
|
|
1503
|
-
return globParts;
|
|
1504
|
-
}
|
|
1505
|
-
// second phase: multi-pattern dedupes
|
|
1506
|
-
// {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest>
|
|
1507
|
-
// {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest>
|
|
1508
|
-
// {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest>
|
|
1509
|
-
//
|
|
1510
|
-
// {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest>
|
|
1511
|
-
// ^-- not valid because ** doens't follow symlinks
|
|
1512
|
-
secondPhasePreProcess(globParts) {
|
|
1513
|
-
for (let i2 = 0; i2 < globParts.length - 1; i2++) {
|
|
1514
|
-
for (let j = i2 + 1; j < globParts.length; j++) {
|
|
1515
|
-
const matched = this.partsMatch(globParts[i2], globParts[j], !this.preserveMultipleSlashes);
|
|
1516
|
-
if (!matched)
|
|
1517
|
-
continue;
|
|
1518
|
-
globParts[i2] = matched;
|
|
1519
|
-
globParts[j] = [];
|
|
1520
|
-
}
|
|
1521
|
-
}
|
|
1522
|
-
return globParts.filter((gs) => gs.length);
|
|
1523
|
-
}
|
|
1524
|
-
partsMatch(a, b, emptyGSMatch = false) {
|
|
1525
|
-
let ai = 0;
|
|
1526
|
-
let bi = 0;
|
|
1527
|
-
let result = [];
|
|
1528
|
-
let which = "";
|
|
1529
|
-
while (ai < a.length && bi < b.length) {
|
|
1530
|
-
if (a[ai] === b[bi]) {
|
|
1531
|
-
result.push(which === "b" ? b[bi] : a[ai]);
|
|
1532
|
-
ai++;
|
|
1533
|
-
bi++;
|
|
1534
|
-
} else if (emptyGSMatch && a[ai] === "**" && b[bi] === a[ai + 1]) {
|
|
1535
|
-
result.push(a[ai]);
|
|
1536
|
-
ai++;
|
|
1537
|
-
} else if (emptyGSMatch && b[bi] === "**" && a[ai] === b[bi + 1]) {
|
|
1538
|
-
result.push(b[bi]);
|
|
1539
|
-
bi++;
|
|
1540
|
-
} else if (a[ai] === "*" && b[bi] && (this.options.dot || !b[bi].startsWith(".")) && b[bi] !== "**") {
|
|
1541
|
-
if (which === "b")
|
|
1542
|
-
return false;
|
|
1543
|
-
which = "a";
|
|
1544
|
-
result.push(a[ai]);
|
|
1545
|
-
ai++;
|
|
1546
|
-
bi++;
|
|
1547
|
-
} else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
|
|
1548
|
-
if (which === "a")
|
|
1549
|
-
return false;
|
|
1550
|
-
which = "b";
|
|
1551
|
-
result.push(b[bi]);
|
|
1552
|
-
ai++;
|
|
1553
|
-
bi++;
|
|
1554
|
-
} else {
|
|
1555
|
-
return false;
|
|
1556
|
-
}
|
|
1557
|
-
}
|
|
1558
|
-
return a.length === b.length && result;
|
|
1559
|
-
}
|
|
1560
|
-
parseNegate() {
|
|
1561
|
-
if (this.nonegate)
|
|
1562
|
-
return;
|
|
1563
|
-
const pattern = this.pattern;
|
|
1564
|
-
let negate = false;
|
|
1565
|
-
let negateOffset = 0;
|
|
1566
|
-
for (let i2 = 0; i2 < pattern.length && pattern.charAt(i2) === "!"; i2++) {
|
|
1567
|
-
negate = !negate;
|
|
1568
|
-
negateOffset++;
|
|
1569
|
-
}
|
|
1570
|
-
if (negateOffset)
|
|
1571
|
-
this.pattern = pattern.slice(negateOffset);
|
|
1572
|
-
this.negate = negate;
|
|
1573
|
-
}
|
|
1574
|
-
// set partial to true to test if, for example,
|
|
1575
|
-
// "/a/b" matches the start of "/*/b/*/d"
|
|
1576
|
-
// Partial means, if you run out of file before you run
|
|
1577
|
-
// out of pattern, then that's fine, as long as all
|
|
1578
|
-
// the parts match.
|
|
1579
|
-
matchOne(file, pattern, partial = false) {
|
|
1580
|
-
const options = this.options;
|
|
1581
|
-
if (this.isWindows) {
|
|
1582
|
-
const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
|
|
1583
|
-
const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
|
|
1584
|
-
const patternDrive = typeof pattern[0] === "string" && /^[a-z]:$/i.test(pattern[0]);
|
|
1585
|
-
const patternUNC = !patternDrive && pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
|
|
1586
|
-
const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
|
|
1587
|
-
const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
|
|
1588
|
-
if (typeof fdi === "number" && typeof pdi === "number") {
|
|
1589
|
-
const [fd, pd] = [file[fdi], pattern[pdi]];
|
|
1590
|
-
if (fd.toLowerCase() === pd.toLowerCase()) {
|
|
1591
|
-
pattern[pdi] = fd;
|
|
1592
|
-
if (pdi > fdi) {
|
|
1593
|
-
pattern = pattern.slice(pdi);
|
|
1594
|
-
} else if (fdi > pdi) {
|
|
1595
|
-
file = file.slice(fdi);
|
|
1596
|
-
}
|
|
1597
|
-
}
|
|
1598
|
-
}
|
|
1599
|
-
}
|
|
1600
|
-
const { optimizationLevel = 1 } = this.options;
|
|
1601
|
-
if (optimizationLevel >= 2) {
|
|
1602
|
-
file = this.levelTwoFileOptimize(file);
|
|
1603
|
-
}
|
|
1604
|
-
this.debug("matchOne", this, { file, pattern });
|
|
1605
|
-
this.debug("matchOne", file.length, pattern.length);
|
|
1606
|
-
for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
1607
|
-
this.debug("matchOne loop");
|
|
1608
|
-
var p = pattern[pi];
|
|
1609
|
-
var f = file[fi];
|
|
1610
|
-
this.debug(pattern, p, f);
|
|
1611
|
-
if (p === false) {
|
|
1612
|
-
return false;
|
|
1613
|
-
}
|
|
1614
|
-
if (p === GLOBSTAR) {
|
|
1615
|
-
this.debug("GLOBSTAR", [pattern, p, f]);
|
|
1616
|
-
var fr = fi;
|
|
1617
|
-
var pr = pi + 1;
|
|
1618
|
-
if (pr === pl) {
|
|
1619
|
-
this.debug("** at the end");
|
|
1620
|
-
for (; fi < fl; fi++) {
|
|
1621
|
-
if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
|
|
1622
|
-
return false;
|
|
1623
|
-
}
|
|
1624
|
-
return true;
|
|
1625
|
-
}
|
|
1626
|
-
while (fr < fl) {
|
|
1627
|
-
var swallowee = file[fr];
|
|
1628
|
-
this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
|
|
1629
|
-
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
|
|
1630
|
-
this.debug("globstar found match!", fr, fl, swallowee);
|
|
1631
|
-
return true;
|
|
1632
|
-
} else {
|
|
1633
|
-
if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
|
|
1634
|
-
this.debug("dot detected!", file, fr, pattern, pr);
|
|
1635
|
-
break;
|
|
1636
|
-
}
|
|
1637
|
-
this.debug("globstar swallow a segment, and continue");
|
|
1638
|
-
fr++;
|
|
1639
|
-
}
|
|
1640
|
-
}
|
|
1641
|
-
if (partial) {
|
|
1642
|
-
this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
|
|
1643
|
-
if (fr === fl) {
|
|
1644
|
-
return true;
|
|
1645
|
-
}
|
|
1646
|
-
}
|
|
1647
|
-
return false;
|
|
1648
|
-
}
|
|
1649
|
-
let hit;
|
|
1650
|
-
if (typeof p === "string") {
|
|
1651
|
-
hit = f === p;
|
|
1652
|
-
this.debug("string match", p, f, hit);
|
|
1653
|
-
} else {
|
|
1654
|
-
hit = p.test(f);
|
|
1655
|
-
this.debug("pattern match", p, f, hit);
|
|
1656
|
-
}
|
|
1657
|
-
if (!hit)
|
|
1658
|
-
return false;
|
|
1659
|
-
}
|
|
1660
|
-
if (fi === fl && pi === pl) {
|
|
1661
|
-
return true;
|
|
1662
|
-
} else if (fi === fl) {
|
|
1663
|
-
return partial;
|
|
1664
|
-
} else if (pi === pl) {
|
|
1665
|
-
return fi === fl - 1 && file[fi] === "";
|
|
1666
|
-
} else {
|
|
1667
|
-
throw new Error("wtf?");
|
|
1668
|
-
}
|
|
1669
|
-
}
|
|
1670
|
-
braceExpand() {
|
|
1671
|
-
return braceExpand(this.pattern, this.options);
|
|
1672
|
-
}
|
|
1673
|
-
parse(pattern) {
|
|
1674
|
-
assertValidPattern(pattern);
|
|
1675
|
-
const options = this.options;
|
|
1676
|
-
if (pattern === "**")
|
|
1677
|
-
return GLOBSTAR;
|
|
1678
|
-
if (pattern === "")
|
|
1679
|
-
return "";
|
|
1680
|
-
let m;
|
|
1681
|
-
let fastTest = null;
|
|
1682
|
-
if (m = pattern.match(starRE)) {
|
|
1683
|
-
fastTest = options.dot ? starTestDot : starTest;
|
|
1684
|
-
} else if (m = pattern.match(starDotExtRE)) {
|
|
1685
|
-
fastTest = (options.nocase ? options.dot ? starDotExtTestNocaseDot : starDotExtTestNocase : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]);
|
|
1686
|
-
} else if (m = pattern.match(qmarksRE)) {
|
|
1687
|
-
fastTest = (options.nocase ? options.dot ? qmarksTestNocaseDot : qmarksTestNocase : options.dot ? qmarksTestDot : qmarksTest)(m);
|
|
1688
|
-
} else if (m = pattern.match(starDotStarRE)) {
|
|
1689
|
-
fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
|
|
1690
|
-
} else if (m = pattern.match(dotStarRE)) {
|
|
1691
|
-
fastTest = dotStarTest;
|
|
1692
|
-
}
|
|
1693
|
-
const re = AST.fromGlob(pattern, this.options).toMMPattern();
|
|
1694
|
-
if (fastTest && typeof re === "object") {
|
|
1695
|
-
Reflect.defineProperty(re, "test", { value: fastTest });
|
|
1696
|
-
}
|
|
1697
|
-
return re;
|
|
1698
|
-
}
|
|
1699
|
-
makeRe() {
|
|
1700
|
-
if (this.regexp || this.regexp === false)
|
|
1701
|
-
return this.regexp;
|
|
1702
|
-
const set = this.set;
|
|
1703
|
-
if (!set.length) {
|
|
1704
|
-
this.regexp = false;
|
|
1705
|
-
return this.regexp;
|
|
1706
|
-
}
|
|
1707
|
-
const options = this.options;
|
|
1708
|
-
const twoStar = options.noglobstar ? star2 : options.dot ? twoStarDot : twoStarNoDot;
|
|
1709
|
-
const flags = new Set(options.nocase ? ["i"] : []);
|
|
1710
|
-
let re = set.map((pattern) => {
|
|
1711
|
-
const pp = pattern.map((p) => {
|
|
1712
|
-
if (p instanceof RegExp) {
|
|
1713
|
-
for (const f of p.flags.split(""))
|
|
1714
|
-
flags.add(f);
|
|
1715
|
-
}
|
|
1716
|
-
return typeof p === "string" ? regExpEscape2(p) : p === GLOBSTAR ? GLOBSTAR : p._src;
|
|
1717
|
-
});
|
|
1718
|
-
pp.forEach((p, i2) => {
|
|
1719
|
-
const next = pp[i2 + 1];
|
|
1720
|
-
const prev = pp[i2 - 1];
|
|
1721
|
-
if (p !== GLOBSTAR || prev === GLOBSTAR) {
|
|
1722
|
-
return;
|
|
1723
|
-
}
|
|
1724
|
-
if (prev === void 0) {
|
|
1725
|
-
if (next !== void 0 && next !== GLOBSTAR) {
|
|
1726
|
-
pp[i2 + 1] = "(?:\\/|" + twoStar + "\\/)?" + next;
|
|
1727
|
-
} else {
|
|
1728
|
-
pp[i2] = twoStar;
|
|
1729
|
-
}
|
|
1730
|
-
} else if (next === void 0) {
|
|
1731
|
-
pp[i2 - 1] = prev + "(?:\\/|" + twoStar + ")?";
|
|
1732
|
-
} else if (next !== GLOBSTAR) {
|
|
1733
|
-
pp[i2 - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
|
|
1734
|
-
pp[i2 + 1] = GLOBSTAR;
|
|
1735
|
-
}
|
|
1736
|
-
});
|
|
1737
|
-
return pp.filter((p) => p !== GLOBSTAR).join("/");
|
|
1738
|
-
}).join("|");
|
|
1739
|
-
const [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
|
|
1740
|
-
re = "^" + open + re + close + "$";
|
|
1741
|
-
if (this.negate)
|
|
1742
|
-
re = "^(?!" + re + ").+$";
|
|
1743
|
-
try {
|
|
1744
|
-
this.regexp = new RegExp(re, [...flags].join(""));
|
|
1745
|
-
} catch (ex) {
|
|
1746
|
-
this.regexp = false;
|
|
1747
|
-
}
|
|
1748
|
-
return this.regexp;
|
|
1749
|
-
}
|
|
1750
|
-
slashSplit(p) {
|
|
1751
|
-
if (this.preserveMultipleSlashes) {
|
|
1752
|
-
return p.split("/");
|
|
1753
|
-
} else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
|
|
1754
|
-
return ["", ...p.split(/\/+/)];
|
|
1755
|
-
} else {
|
|
1756
|
-
return p.split(/\/+/);
|
|
1757
|
-
}
|
|
1758
|
-
}
|
|
1759
|
-
match(f, partial = this.partial) {
|
|
1760
|
-
this.debug("match", f, this.pattern);
|
|
1761
|
-
if (this.comment) {
|
|
1762
|
-
return false;
|
|
1763
|
-
}
|
|
1764
|
-
if (this.empty) {
|
|
1765
|
-
return f === "";
|
|
1766
|
-
}
|
|
1767
|
-
if (f === "/" && partial) {
|
|
1768
|
-
return true;
|
|
1769
|
-
}
|
|
1770
|
-
const options = this.options;
|
|
1771
|
-
if (this.isWindows) {
|
|
1772
|
-
f = f.split("\\").join("/");
|
|
1773
|
-
}
|
|
1774
|
-
const ff = this.slashSplit(f);
|
|
1775
|
-
this.debug(this.pattern, "split", ff);
|
|
1776
|
-
const set = this.set;
|
|
1777
|
-
this.debug(this.pattern, "set", set);
|
|
1778
|
-
let filename = ff[ff.length - 1];
|
|
1779
|
-
if (!filename) {
|
|
1780
|
-
for (let i2 = ff.length - 2; !filename && i2 >= 0; i2--) {
|
|
1781
|
-
filename = ff[i2];
|
|
1782
|
-
}
|
|
1783
|
-
}
|
|
1784
|
-
for (let i2 = 0; i2 < set.length; i2++) {
|
|
1785
|
-
const pattern = set[i2];
|
|
1786
|
-
let file = ff;
|
|
1787
|
-
if (options.matchBase && pattern.length === 1) {
|
|
1788
|
-
file = [filename];
|
|
1789
|
-
}
|
|
1790
|
-
const hit = this.matchOne(file, pattern, partial);
|
|
1791
|
-
if (hit) {
|
|
1792
|
-
if (options.flipNegate) {
|
|
1793
|
-
return true;
|
|
1794
|
-
}
|
|
1795
|
-
return !this.negate;
|
|
1796
|
-
}
|
|
1797
|
-
}
|
|
1798
|
-
if (options.flipNegate) {
|
|
1799
|
-
return false;
|
|
1800
|
-
}
|
|
1801
|
-
return this.negate;
|
|
1802
|
-
}
|
|
1803
|
-
static defaults(def) {
|
|
1804
|
-
return minimatch.defaults(def).Minimatch;
|
|
1805
|
-
}
|
|
1806
|
-
};
|
|
1807
|
-
minimatch.AST = AST;
|
|
1808
|
-
minimatch.Minimatch = Minimatch;
|
|
1809
|
-
minimatch.escape = escape;
|
|
1810
|
-
minimatch.unescape = unescape;
|
|
1811
|
-
|
|
1812
|
-
// src/utils/query-nonce-meta-tag-content.ts
|
|
1813
|
-
function queryNonceMetaTagContent(doc) {
|
|
1814
|
-
var _a, _b, _c;
|
|
1815
|
-
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;
|
|
1816
|
-
}
|
|
1817
|
-
|
|
1818
|
-
// src/utils/regular-expression.ts
|
|
1819
|
-
var escapeRegExpSpecialCharacters = (text) => {
|
|
1820
|
-
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1821
|
-
};
|
|
1822
|
-
|
|
1823
|
-
// src/utils/result.ts
|
|
1824
|
-
var result_exports = {};
|
|
1825
|
-
__export(result_exports, {
|
|
1826
|
-
err: () => err,
|
|
1827
|
-
map: () => map,
|
|
1828
|
-
ok: () => ok,
|
|
1829
|
-
unwrap: () => unwrap,
|
|
1830
|
-
unwrapErr: () => unwrapErr
|
|
1831
|
-
});
|
|
1832
|
-
var ok = (value) => ({
|
|
1833
|
-
isOk: true,
|
|
1834
|
-
isErr: false,
|
|
1835
|
-
value
|
|
1836
|
-
});
|
|
1837
|
-
var err = (value) => ({
|
|
1838
|
-
isOk: false,
|
|
1839
|
-
isErr: true,
|
|
1840
|
-
value
|
|
1841
|
-
});
|
|
1842
|
-
function map(result, fn) {
|
|
1843
|
-
if (result.isOk) {
|
|
1844
|
-
const val = fn(result.value);
|
|
1845
|
-
if (val instanceof Promise) {
|
|
1846
|
-
return val.then((newVal) => ok(newVal));
|
|
1847
|
-
} else {
|
|
1848
|
-
return ok(val);
|
|
1849
|
-
}
|
|
1850
|
-
}
|
|
1851
|
-
if (result.isErr) {
|
|
1852
|
-
const value = result.value;
|
|
1853
|
-
return err(value);
|
|
1854
|
-
}
|
|
1855
|
-
throw "should never get here";
|
|
1856
|
-
}
|
|
1857
|
-
var unwrap = (result) => {
|
|
1858
|
-
if (result.isOk) {
|
|
1859
|
-
return result.value;
|
|
1860
|
-
} else {
|
|
1861
|
-
throw result.value;
|
|
1862
|
-
}
|
|
1863
|
-
};
|
|
1864
|
-
var unwrapErr = (result) => {
|
|
1865
|
-
if (result.isErr) {
|
|
1866
|
-
return result.value;
|
|
1867
|
-
} else {
|
|
1868
|
-
throw result.value;
|
|
1869
|
-
}
|
|
1870
|
-
};
|
|
1871
|
-
|
|
1872
231
|
// src/utils/style.ts
|
|
1873
232
|
function createStyleSheetIfNeededAndSupported(styles2) {
|
|
1874
233
|
if (!supportsConstructableStylesheets) return void 0;
|
|
@@ -1933,10 +292,11 @@ function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
|
1933
292
|
let childNode;
|
|
1934
293
|
for (; i2 < childNodes.length; i2++) {
|
|
1935
294
|
childNode = childNodes[i2];
|
|
1936
|
-
if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0)) {
|
|
295
|
+
if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0 || getSlotName(childNode) === slotName)) {
|
|
1937
296
|
slottedNodes.push(childNode);
|
|
297
|
+
if (typeof slotName !== "undefined") return slottedNodes;
|
|
1938
298
|
}
|
|
1939
|
-
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode
|
|
299
|
+
slottedNodes = [...slottedNodes, ...getHostSlotNodes(internalCall(childNode, "childNodes"), hostName, slotName)];
|
|
1940
300
|
}
|
|
1941
301
|
return slottedNodes;
|
|
1942
302
|
}
|
|
@@ -1992,6 +352,18 @@ function patchSlotNode(node) {
|
|
|
1992
352
|
node.assignedElements = assignedFactory(true);
|
|
1993
353
|
node.assignedNodes = assignedFactory(false);
|
|
1994
354
|
}
|
|
355
|
+
function dispatchSlotChangeEvent(elm) {
|
|
356
|
+
elm.dispatchEvent(new CustomEvent("slotchange", { bubbles: false, cancelable: false, composed: false }));
|
|
357
|
+
}
|
|
358
|
+
function findSlotFromSlottedNode(slottedNode, parentHost) {
|
|
359
|
+
var _a;
|
|
360
|
+
parentHost = parentHost || ((_a = slottedNode["s-ol"]) == null ? void 0 : _a.parentElement);
|
|
361
|
+
if (!parentHost) return { slotNode: null, slotName: "" };
|
|
362
|
+
const slotName = slottedNode["s-sn"] = getSlotName(slottedNode) || "";
|
|
363
|
+
const childNodes = internalCall(parentHost, "childNodes");
|
|
364
|
+
const slotNode = getHostSlotNodes(childNodes, parentHost.tagName, slotName)[0];
|
|
365
|
+
return { slotNode, slotName };
|
|
366
|
+
}
|
|
1995
367
|
function internalCall(node, method) {
|
|
1996
368
|
if ("__" + method in node) {
|
|
1997
369
|
const toReturn = node["__" + method];
|
|
@@ -2016,6 +388,14 @@ var uniqueTime = (key, measureText) => {
|
|
|
2016
388
|
};
|
|
2017
389
|
}
|
|
2018
390
|
};
|
|
391
|
+
|
|
392
|
+
// src/utils/query-nonce-meta-tag-content.ts
|
|
393
|
+
function queryNonceMetaTagContent(doc) {
|
|
394
|
+
var _a, _b, _c;
|
|
395
|
+
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;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
// src/runtime/styles.ts
|
|
2019
399
|
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
2020
400
|
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
2021
401
|
let style = styles.get(scopeId2);
|
|
@@ -2049,7 +429,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2049
429
|
}
|
|
2050
430
|
if (!appliedStyles.has(scopeId2)) {
|
|
2051
431
|
styleElm = win.document.createElement("style");
|
|
2052
|
-
styleElm.
|
|
432
|
+
styleElm.textContent = style;
|
|
2053
433
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
2054
434
|
if (nonce != null) {
|
|
2055
435
|
styleElm.setAttribute("nonce", nonce);
|
|
@@ -2074,8 +454,8 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2074
454
|
}
|
|
2075
455
|
} else {
|
|
2076
456
|
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
2077
|
-
if (existingStyleContainer) {
|
|
2078
|
-
existingStyleContainer.
|
|
457
|
+
if (existingStyleContainer && true) {
|
|
458
|
+
existingStyleContainer.textContent = style + existingStyleContainer.textContent;
|
|
2079
459
|
} else {
|
|
2080
460
|
styleContainerNode.prepend(styleElm);
|
|
2081
461
|
}
|
|
@@ -2088,7 +468,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2088
468
|
styleContainerNode.insertBefore(styleElm, null);
|
|
2089
469
|
}
|
|
2090
470
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
2091
|
-
styleElm.
|
|
471
|
+
styleElm.textContent += SLOT_FB_CSS;
|
|
2092
472
|
}
|
|
2093
473
|
if (appliedStyles) {
|
|
2094
474
|
appliedStyles.add(scopeId2);
|
|
@@ -2136,6 +516,15 @@ var attachStyles = (hostRef) => {
|
|
|
2136
516
|
endAttachStyles();
|
|
2137
517
|
};
|
|
2138
518
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
519
|
+
|
|
520
|
+
// src/utils/helpers.ts
|
|
521
|
+
var isDef = (v) => v != null && v !== void 0;
|
|
522
|
+
var isComplexType = (o) => {
|
|
523
|
+
o = typeof o;
|
|
524
|
+
return o === "object" || o === "function";
|
|
525
|
+
};
|
|
526
|
+
|
|
527
|
+
// src/runtime/vdom/h.ts
|
|
2139
528
|
var h = (nodeName, vnodeData, ...children) => {
|
|
2140
529
|
if (typeof nodeName === "string") {
|
|
2141
530
|
nodeName = transformTag(nodeName);
|
|
@@ -2154,6 +543,11 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
2154
543
|
} else if (child != null && typeof child !== "boolean") {
|
|
2155
544
|
if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
|
|
2156
545
|
child = String(child);
|
|
546
|
+
} else if (typeof nodeName !== "function" && child.$flags$ === void 0) {
|
|
547
|
+
{
|
|
548
|
+
consoleError("Invalid vNode child");
|
|
549
|
+
}
|
|
550
|
+
continue;
|
|
2157
551
|
}
|
|
2158
552
|
if (simple && lastSimple) {
|
|
2159
553
|
vNodeChildren[vNodeChildren.length - 1].$text$ += child;
|
|
@@ -2203,7 +597,8 @@ var newVNode = (tag, text) => {
|
|
|
2203
597
|
const vnode = {
|
|
2204
598
|
$flags$: 0,
|
|
2205
599
|
$tag$: tag,
|
|
2206
|
-
|
|
600
|
+
// Normalize undefined to null to prevent rendering "undefined" as text
|
|
601
|
+
$text$: text != null ? text : null,
|
|
2207
602
|
$elm$: null,
|
|
2208
603
|
$children$: null
|
|
2209
604
|
};
|
|
@@ -2250,18 +645,33 @@ var convertToPrivate = (node) => {
|
|
|
2250
645
|
vnode.$name$ = node.vname;
|
|
2251
646
|
return vnode;
|
|
2252
647
|
};
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
)
|
|
648
|
+
|
|
649
|
+
// src/runtime/normalize-watchers.ts
|
|
650
|
+
var normalizeWatchers = (raw) => {
|
|
651
|
+
if (!raw) return void 0;
|
|
652
|
+
const keys = Object.keys(raw);
|
|
653
|
+
if (keys.length === 0) return void 0;
|
|
654
|
+
let hasLegacy = false;
|
|
655
|
+
for (const propName of keys) {
|
|
656
|
+
if (hasLegacy) break;
|
|
657
|
+
for (const h2 of raw[propName]) {
|
|
658
|
+
if (typeof h2 === "string") {
|
|
659
|
+
hasLegacy = true;
|
|
660
|
+
break;
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
if (!hasLegacy) return raw;
|
|
665
|
+
const out = {};
|
|
666
|
+
for (const propName of keys) {
|
|
667
|
+
out[propName] = raw[propName].map(
|
|
668
|
+
(h2) => typeof h2 === "string" ? { [h2]: 0 } : h2
|
|
669
|
+
);
|
|
670
|
+
}
|
|
671
|
+
return out;
|
|
2261
672
|
};
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
createSupportsRuleRe(":host-context");
|
|
673
|
+
|
|
674
|
+
// src/runtime/parse-property-value.ts
|
|
2265
675
|
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
2266
676
|
if (propValue != null && !isComplexType(propValue)) {
|
|
2267
677
|
if (propType & 4 /* Boolean */) {
|
|
@@ -2342,7 +752,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2342
752
|
}
|
|
2343
753
|
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
2344
754
|
if (newValue) {
|
|
2345
|
-
newValue
|
|
755
|
+
queueRefAttachment(newValue, elm);
|
|
2346
756
|
}
|
|
2347
757
|
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
2348
758
|
if (memberName[2] === "-") {
|
|
@@ -2362,6 +772,36 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2362
772
|
plt.ael(elm, memberName, newValue, capture);
|
|
2363
773
|
}
|
|
2364
774
|
}
|
|
775
|
+
} else if (memberName[0] === "a" && memberName.startsWith("attr:")) {
|
|
776
|
+
const propName = memberName.slice(5);
|
|
777
|
+
let attrName;
|
|
778
|
+
{
|
|
779
|
+
const hostRef = getHostRef(elm);
|
|
780
|
+
if (hostRef && hostRef.$cmpMeta$ && hostRef.$cmpMeta$.$members$) {
|
|
781
|
+
const memberMeta = hostRef.$cmpMeta$.$members$[propName];
|
|
782
|
+
if (memberMeta && memberMeta[1]) {
|
|
783
|
+
attrName = memberMeta[1];
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
if (!attrName) {
|
|
788
|
+
attrName = propName.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
789
|
+
}
|
|
790
|
+
if (newValue == null || newValue === false) {
|
|
791
|
+
if (newValue !== false || elm.getAttribute(attrName) === "") {
|
|
792
|
+
elm.removeAttribute(attrName);
|
|
793
|
+
}
|
|
794
|
+
} else {
|
|
795
|
+
elm.setAttribute(attrName, newValue === true ? "" : newValue);
|
|
796
|
+
}
|
|
797
|
+
return;
|
|
798
|
+
} else if (memberName[0] === "p" && memberName.startsWith("prop:")) {
|
|
799
|
+
const propName = memberName.slice(5);
|
|
800
|
+
try {
|
|
801
|
+
elm[propName] = newValue;
|
|
802
|
+
} catch (e) {
|
|
803
|
+
}
|
|
804
|
+
return;
|
|
2365
805
|
} else {
|
|
2366
806
|
const isComplex = isComplexType(newValue);
|
|
2367
807
|
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
@@ -2370,7 +810,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2370
810
|
const n = newValue == null ? "" : newValue;
|
|
2371
811
|
if (memberName === "list") {
|
|
2372
812
|
isProp = false;
|
|
2373
|
-
} else if (oldValue == null || elm[memberName]
|
|
813
|
+
} else if (oldValue == null || elm[memberName] !== n) {
|
|
2374
814
|
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
2375
815
|
elm[memberName] = n;
|
|
2376
816
|
} else {
|
|
@@ -2384,7 +824,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2384
824
|
}
|
|
2385
825
|
}
|
|
2386
826
|
if (newValue == null || newValue === false) {
|
|
2387
|
-
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
827
|
+
if (newValue !== false || elm.getAttribute(memberName) === "" || flags & 4 /* isHost */ && !isEnumeratedAttribute(memberName)) {
|
|
2388
828
|
{
|
|
2389
829
|
elm.removeAttribute(memberName);
|
|
2390
830
|
}
|
|
@@ -2397,6 +837,8 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2397
837
|
}
|
|
2398
838
|
}
|
|
2399
839
|
};
|
|
840
|
+
var ENUMERATED_ATTRIBUTES = /* @__PURE__ */ new Set(["draggable", "contenteditable", "spellcheck"]);
|
|
841
|
+
var isEnumeratedAttribute = (attrName) => ENUMERATED_ATTRIBUTES.has(attrName) || attrName.startsWith("aria-");
|
|
2400
842
|
var parseClassListRegex = /\s/;
|
|
2401
843
|
var parseClassList = (value) => {
|
|
2402
844
|
if (typeof value === "object" && value && "baseVal" in value) {
|
|
@@ -2456,6 +898,8 @@ var useNativeShadowDom = false;
|
|
|
2456
898
|
var checkSlotFallbackVisibility = false;
|
|
2457
899
|
var checkSlotRelocate = false;
|
|
2458
900
|
var isSvgMode = false;
|
|
901
|
+
var refCallbacksToRemove = [];
|
|
902
|
+
var refCallbacksToAttach = [];
|
|
2459
903
|
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
2460
904
|
var _a;
|
|
2461
905
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
@@ -2478,7 +922,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2478
922
|
);
|
|
2479
923
|
}
|
|
2480
924
|
}
|
|
2481
|
-
if (newVNode2.$text$
|
|
925
|
+
if (newVNode2.$text$ != null) {
|
|
2482
926
|
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
2483
927
|
} else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
2484
928
|
elm = newVNode2.$elm$ = win.document.createTextNode("");
|
|
@@ -2490,9 +934,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2490
934
|
isSvgMode = newVNode2.$tag$ === "svg";
|
|
2491
935
|
}
|
|
2492
936
|
if (!win.document) {
|
|
2493
|
-
throw new Error(
|
|
2494
|
-
"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."
|
|
2495
|
-
);
|
|
937
|
+
throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");
|
|
2496
938
|
}
|
|
2497
939
|
elm = newVNode2.$elm$ = win.document.createElementNS(
|
|
2498
940
|
isSvgMode ? SVG_NS : HTML_NS,
|
|
@@ -2534,9 +976,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2534
976
|
patchSlotNode(elm);
|
|
2535
977
|
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
2536
978
|
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
2537
|
-
|
|
2538
|
-
putBackInOriginalLocation(oldParentVNode.$elm$, false);
|
|
2539
|
-
}
|
|
979
|
+
relocateToHostRoot(oldParentVNode.$elm$);
|
|
2540
980
|
}
|
|
2541
981
|
{
|
|
2542
982
|
addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
|
|
@@ -2545,9 +985,37 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2545
985
|
}
|
|
2546
986
|
return elm;
|
|
2547
987
|
};
|
|
988
|
+
var relocateToHostRoot = (parentElm) => {
|
|
989
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
990
|
+
const host = parentElm.closest(hostTagName.toLowerCase());
|
|
991
|
+
if (host != null) {
|
|
992
|
+
const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
|
|
993
|
+
(ref) => ref["s-cr"]
|
|
994
|
+
);
|
|
995
|
+
const childNodeArray = Array.from(
|
|
996
|
+
parentElm.__childNodes || parentElm.childNodes
|
|
997
|
+
);
|
|
998
|
+
for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
|
|
999
|
+
if (childNode["s-sh"] != null) {
|
|
1000
|
+
insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
|
|
1001
|
+
childNode["s-sh"] = void 0;
|
|
1002
|
+
checkSlotRelocate = true;
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
1007
|
+
};
|
|
2548
1008
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
2549
1009
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
2550
1010
|
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
1011
|
+
if (parentElm["s-sr"]) {
|
|
1012
|
+
let node = parentElm;
|
|
1013
|
+
while (node = node.nextSibling) {
|
|
1014
|
+
if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
|
|
1015
|
+
oldSlotChildNodes.push(node);
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
2551
1019
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
2552
1020
|
const childNode = oldSlotChildNodes[i2];
|
|
2553
1021
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
@@ -2662,7 +1130,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
2662
1130
|
if (idxInOld >= 0) {
|
|
2663
1131
|
elmToMove = oldCh[idxInOld];
|
|
2664
1132
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
2665
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2,
|
|
1133
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
2666
1134
|
} else {
|
|
2667
1135
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
2668
1136
|
oldCh[idxInOld] = void 0;
|
|
@@ -2720,11 +1188,17 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
2720
1188
|
const tag = newVNode2.$tag$;
|
|
2721
1189
|
const text = newVNode2.$text$;
|
|
2722
1190
|
let defaultHolder;
|
|
2723
|
-
if (text
|
|
1191
|
+
if (text == null) {
|
|
2724
1192
|
{
|
|
2725
1193
|
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
2726
1194
|
}
|
|
2727
1195
|
{
|
|
1196
|
+
if (tag === "slot" && !useNativeShadowDom) {
|
|
1197
|
+
if (oldVNode.$name$ !== newVNode2.$name$) {
|
|
1198
|
+
newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
|
|
1199
|
+
relocateToHostRoot(newVNode2.$elm$.parentElement);
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
2728
1202
|
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
2729
1203
|
}
|
|
2730
1204
|
if (oldChildren !== null && newChildren !== null) {
|
|
@@ -2761,7 +1235,10 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
2761
1235
|
const slotName = childNode["s-sn"];
|
|
2762
1236
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
2763
1237
|
node = hostContentNodes[j];
|
|
2764
|
-
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] &&
|
|
1238
|
+
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && // let an exact named-slot match override a stale default-slot claim. Skip this for
|
|
1239
|
+
// `slotName === ''` itself - a matched default node's cached `s-sn` is `''` too, which
|
|
1240
|
+
// would trivially "match" on every re-render and force pointless re-insertion.
|
|
1241
|
+
(!node["s-sh"] || node["s-sh"] !== childNode["s-hn"] || slotName !== "" && getSlotName(node) === slotName)) {
|
|
2765
1242
|
if (isNodeLocatedInSlot(node, slotName)) {
|
|
2766
1243
|
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
2767
1244
|
checkSlotFallbackVisibility = true;
|
|
@@ -2801,15 +1278,39 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
2801
1278
|
};
|
|
2802
1279
|
var nullifyVNodeRefs = (vNode) => {
|
|
2803
1280
|
{
|
|
2804
|
-
vNode.$attrs$ && vNode.$attrs$.ref
|
|
1281
|
+
if (vNode.$attrs$ && vNode.$attrs$.ref) {
|
|
1282
|
+
refCallbacksToRemove.push(() => vNode.$attrs$.ref(null));
|
|
1283
|
+
}
|
|
2805
1284
|
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
2806
1285
|
}
|
|
2807
1286
|
};
|
|
2808
|
-
var
|
|
2809
|
-
|
|
2810
|
-
|
|
1287
|
+
var queueRefAttachment = (refCallback, elm) => {
|
|
1288
|
+
{
|
|
1289
|
+
refCallbacksToAttach.push(() => refCallback(elm));
|
|
1290
|
+
}
|
|
1291
|
+
};
|
|
1292
|
+
var flushQueuedRefCallbacks = () => {
|
|
1293
|
+
{
|
|
1294
|
+
refCallbacksToRemove.forEach((cb) => cb());
|
|
1295
|
+
refCallbacksToRemove.length = 0;
|
|
1296
|
+
refCallbacksToAttach.forEach((cb) => cb());
|
|
1297
|
+
refCallbacksToAttach.length = 0;
|
|
2811
1298
|
}
|
|
1299
|
+
};
|
|
1300
|
+
var insertBefore = (parent, newNode, reference, isInitialLoad) => {
|
|
2812
1301
|
{
|
|
1302
|
+
if (typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
|
|
1303
|
+
addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
|
|
1304
|
+
} else if (typeof newNode["s-sn"] === "string") {
|
|
1305
|
+
parent.insertBefore(newNode, reference);
|
|
1306
|
+
const { slotNode } = findSlotFromSlottedNode(newNode);
|
|
1307
|
+
if (slotNode && !isInitialLoad) dispatchSlotChangeEvent(slotNode);
|
|
1308
|
+
return newNode;
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
if ((parent == null ? void 0 : parent.__insertBefore)) {
|
|
1312
|
+
return parent.__insertBefore(newNode, reference);
|
|
1313
|
+
} else {
|
|
2813
1314
|
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
2814
1315
|
}
|
|
2815
1316
|
};
|
|
@@ -2835,7 +1336,7 @@ function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
|
|
|
2835
1336
|
}
|
|
2836
1337
|
}
|
|
2837
1338
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
2838
|
-
var _a, _b, _c, _d;
|
|
1339
|
+
var _a, _b, _c, _d, _e;
|
|
2839
1340
|
const hostElm = hostRef.$hostElement$;
|
|
2840
1341
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
2841
1342
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
@@ -2879,7 +1380,12 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2879
1380
|
if (!nodeToRelocate["s-ol"] && win.document) {
|
|
2880
1381
|
const orgLocationNode = win.document.createTextNode("");
|
|
2881
1382
|
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
2882
|
-
insertBefore(
|
|
1383
|
+
insertBefore(
|
|
1384
|
+
nodeToRelocate.parentNode,
|
|
1385
|
+
nodeToRelocate["s-ol"] = orgLocationNode,
|
|
1386
|
+
nodeToRelocate,
|
|
1387
|
+
isInitialLoad
|
|
1388
|
+
);
|
|
2883
1389
|
}
|
|
2884
1390
|
}
|
|
2885
1391
|
for (const relocateData of relocateNodes) {
|
|
@@ -2891,7 +1397,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2891
1397
|
if (slotRefNode) {
|
|
2892
1398
|
const parentNodeRef = slotRefNode.parentNode;
|
|
2893
1399
|
let insertBeforeNode = slotRefNode.nextSibling;
|
|
2894
|
-
{
|
|
1400
|
+
if (insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
|
|
2895
1401
|
let orgLocationNode = (_b = nodeToRelocate["s-ol"]) == null ? void 0 : _b.previousSibling;
|
|
2896
1402
|
while (orgLocationNode) {
|
|
2897
1403
|
let refNode = (_c = orgLocationNode["s-nr"]) != null ? _c : null;
|
|
@@ -2912,10 +1418,18 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2912
1418
|
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
2913
1419
|
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
2914
1420
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
2915
|
-
|
|
2916
|
-
|
|
1421
|
+
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode, isInitialLoad);
|
|
1422
|
+
if (nodeToRelocate.nodeType === 8 /* CommentNode */ && nodeToRelocate.nodeValue.startsWith("s-nt-")) {
|
|
1423
|
+
const textNode = win.document.createTextNode(nodeToRelocate.nodeValue.replace(/^s-nt-/, ""));
|
|
1424
|
+
textNode["s-hn"] = nodeToRelocate["s-hn"];
|
|
1425
|
+
textNode["s-sn"] = nodeToRelocate["s-sn"];
|
|
1426
|
+
textNode["s-sh"] = nodeToRelocate["s-sh"];
|
|
1427
|
+
textNode["s-sr"] = nodeToRelocate["s-sr"];
|
|
1428
|
+
textNode["s-ol"] = nodeToRelocate["s-ol"];
|
|
1429
|
+
textNode["s-ol"]["s-nr"] = textNode;
|
|
1430
|
+
insertBefore(nodeToRelocate.parentNode, textNode, nodeToRelocate, isInitialLoad);
|
|
1431
|
+
nodeToRelocate.parentNode.removeChild(nodeToRelocate);
|
|
2917
1432
|
}
|
|
2918
|
-
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
2919
1433
|
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
2920
1434
|
nodeToRelocate.hidden = (_d = nodeToRelocate["s-ih"]) != null ? _d : false;
|
|
2921
1435
|
}
|
|
@@ -2933,7 +1447,26 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2933
1447
|
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
2934
1448
|
relocateNodes.length = 0;
|
|
2935
1449
|
}
|
|
1450
|
+
if (!useNativeShadowDom && !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && hostElm["s-cr"]) {
|
|
1451
|
+
const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
|
|
1452
|
+
for (const childNode of children) {
|
|
1453
|
+
if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
|
|
1454
|
+
if (isInitialLoad && childNode["s-ih"] == null) {
|
|
1455
|
+
childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
|
|
1456
|
+
}
|
|
1457
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1458
|
+
childNode.hidden = true;
|
|
1459
|
+
} else if (childNode.nodeType === 3 /* TextNode */ && !!childNode.nodeValue.trim()) {
|
|
1460
|
+
const textCommentNode = win.document.createComment("s-nt-" + childNode.nodeValue);
|
|
1461
|
+
textCommentNode["s-sn"] = childNode["s-sn"];
|
|
1462
|
+
insertBefore(childNode.parentNode, textCommentNode, childNode, isInitialLoad);
|
|
1463
|
+
childNode.parentNode.removeChild(childNode);
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
2936
1468
|
contentRef = void 0;
|
|
1469
|
+
flushQueuedRefCallbacks();
|
|
2937
1470
|
};
|
|
2938
1471
|
|
|
2939
1472
|
// src/runtime/update-component.ts
|
|
@@ -2979,6 +1512,10 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
2979
1512
|
let maybePromise;
|
|
2980
1513
|
if (isInitialLoad) {
|
|
2981
1514
|
{
|
|
1515
|
+
if (hostRef.$deferredConnectedCallback$) {
|
|
1516
|
+
hostRef.$deferredConnectedCallback$ = false;
|
|
1517
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
1518
|
+
}
|
|
2982
1519
|
{
|
|
2983
1520
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
2984
1521
|
if (hostRef.$queuedListeners$) {
|
|
@@ -2998,8 +1535,8 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
2998
1535
|
endSchedule();
|
|
2999
1536
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
3000
1537
|
};
|
|
3001
|
-
var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((
|
|
3002
|
-
console.error(
|
|
1538
|
+
var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err) => {
|
|
1539
|
+
console.error(err);
|
|
3003
1540
|
fn();
|
|
3004
1541
|
}) : fn();
|
|
3005
1542
|
var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
|
|
@@ -3027,7 +1564,7 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
3027
1564
|
if (childrenPromises.length === 0) {
|
|
3028
1565
|
postUpdate();
|
|
3029
1566
|
} else {
|
|
3030
|
-
Promise.all(childrenPromises).then(postUpdate);
|
|
1567
|
+
Promise.all(childrenPromises).then(postUpdate).catch(postUpdate);
|
|
3031
1568
|
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
3032
1569
|
childrenPromises.length = 0;
|
|
3033
1570
|
}
|
|
@@ -3156,18 +1693,22 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
3156
1693
|
});
|
|
3157
1694
|
}
|
|
3158
1695
|
}
|
|
3159
|
-
if (
|
|
1696
|
+
if (flags & 2 /* hasRendered */) {
|
|
3160
1697
|
if (instance.componentShouldUpdate) {
|
|
3161
|
-
|
|
1698
|
+
const shouldUpdate = instance.componentShouldUpdate(newVal, oldVal, propName);
|
|
1699
|
+
if (shouldUpdate === false && !(flags & 16 /* isQueuedForUpdate */)) {
|
|
3162
1700
|
return;
|
|
3163
1701
|
}
|
|
3164
1702
|
}
|
|
3165
|
-
|
|
1703
|
+
if (!(flags & 16 /* isQueuedForUpdate */)) {
|
|
1704
|
+
scheduleUpdate(hostRef, false);
|
|
1705
|
+
}
|
|
3166
1706
|
}
|
|
3167
1707
|
}
|
|
3168
1708
|
};
|
|
3169
1709
|
|
|
3170
1710
|
// src/runtime/proxy-component.ts
|
|
1711
|
+
var reflectedAttrValue = (propValue) => propValue == null || propValue === false ? null : propValue === true ? "" : String(propValue);
|
|
3171
1712
|
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
3172
1713
|
var _a, _b;
|
|
3173
1714
|
const prototype = Cstr.prototype;
|
|
@@ -3194,7 +1735,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3194
1735
|
if (cmpMeta.$members$ || BUILD.propChangeCallback) {
|
|
3195
1736
|
{
|
|
3196
1737
|
if (Cstr.watchers && !cmpMeta.$watchers$) {
|
|
3197
|
-
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1738
|
+
cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
|
|
3198
1739
|
}
|
|
3199
1740
|
if (Cstr.deserializers && !cmpMeta.$deserializers$) {
|
|
3200
1741
|
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
@@ -3206,7 +1747,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3206
1747
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
3207
1748
|
members.map(([memberName, [memberFlags]]) => {
|
|
3208
1749
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
3209
|
-
const { get: origGetter, set: origSetter } =
|
|
1750
|
+
const { get: origGetter, set: origSetter } = getPropertyDescriptor(prototype, memberName) || {};
|
|
3210
1751
|
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
3211
1752
|
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
3212
1753
|
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
@@ -3260,23 +1801,28 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3260
1801
|
}
|
|
3261
1802
|
return;
|
|
3262
1803
|
}
|
|
3263
|
-
const
|
|
1804
|
+
const parsedValue = parsePropertyValue(
|
|
1805
|
+
newValue,
|
|
1806
|
+
memberFlags,
|
|
1807
|
+
!!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
1808
|
+
);
|
|
1809
|
+
const setterSetVal = (val) => {
|
|
3264
1810
|
const currentValue = ref.$lazyInstance$[memberName];
|
|
3265
1811
|
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
3266
1812
|
ref.$instanceValues$.set(memberName, currentValue);
|
|
3267
1813
|
}
|
|
3268
|
-
ref.$lazyInstance$[memberName] =
|
|
3269
|
-
newValue,
|
|
3270
|
-
memberFlags,
|
|
3271
|
-
!!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
3272
|
-
);
|
|
1814
|
+
ref.$lazyInstance$[memberName] = val;
|
|
3273
1815
|
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
3274
1816
|
};
|
|
3275
1817
|
if (ref.$lazyInstance$) {
|
|
3276
|
-
setterSetVal();
|
|
1818
|
+
setterSetVal(parsedValue);
|
|
3277
1819
|
} else {
|
|
1820
|
+
ref.$instanceValues$.set(memberName, parsedValue);
|
|
3278
1821
|
ref.$fetchedCbList$.push(() => {
|
|
3279
|
-
|
|
1822
|
+
const pendingValue = ref.$instanceValues$.get(memberName);
|
|
1823
|
+
if (ref.$lazyInstance$[memberName] !== pendingValue) {
|
|
1824
|
+
setterSetVal(pendingValue);
|
|
1825
|
+
}
|
|
3280
1826
|
});
|
|
3281
1827
|
}
|
|
3282
1828
|
}
|
|
@@ -3324,11 +1870,19 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3324
1870
|
return;
|
|
3325
1871
|
}
|
|
3326
1872
|
const propFlags = members.find(([m]) => m === propName);
|
|
3327
|
-
|
|
1873
|
+
const propMemberFlags = propFlags ? propFlags[1][0] : 0;
|
|
1874
|
+
const isBooleanTarget = propMemberFlags & 4 /* Boolean */;
|
|
1875
|
+
if (propMemberFlags & 512 /* ReflectAttr */ && propMemberFlags & 8 /* Any */ && // a complex value is never written to an attribute, so a change while the prop holds
|
|
1876
|
+
// one is always external
|
|
1877
|
+
!isComplexType(this[propName]) && reflectedAttrValue(this[propName]) === newValue) {
|
|
1878
|
+
return;
|
|
1879
|
+
}
|
|
1880
|
+
const isSpuriousBooleanRemoval = isBooleanTarget && newValue === null && this[propName] === void 0;
|
|
1881
|
+
if (isBooleanTarget) {
|
|
3328
1882
|
newValue = newValue === null || newValue === "false" ? false : true;
|
|
3329
1883
|
}
|
|
3330
1884
|
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
3331
|
-
if (newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1885
|
+
if (!isSpuriousBooleanRemoval && newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
3332
1886
|
this[propName] = newValue;
|
|
3333
1887
|
}
|
|
3334
1888
|
});
|
|
@@ -3354,72 +1908,95 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3354
1908
|
|
|
3355
1909
|
// src/runtime/initialize-component.ts
|
|
3356
1910
|
var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
1911
|
+
var _a;
|
|
3357
1912
|
let Cstr;
|
|
3358
|
-
|
|
3359
|
-
hostRef.$flags$
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
const
|
|
3363
|
-
if (
|
|
3364
|
-
const
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
1913
|
+
try {
|
|
1914
|
+
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1915
|
+
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1916
|
+
hostRef.$flags$ &= -1025 /* hasFailedLoad */;
|
|
1917
|
+
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1918
|
+
if (bundleId) {
|
|
1919
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1920
|
+
if (CstrImport && "then" in CstrImport) {
|
|
1921
|
+
const endLoad = uniqueTime();
|
|
1922
|
+
Cstr = await CstrImport;
|
|
1923
|
+
endLoad();
|
|
1924
|
+
} else {
|
|
1925
|
+
Cstr = CstrImport;
|
|
1926
|
+
}
|
|
1927
|
+
if (!Cstr) {
|
|
1928
|
+
hostRef.$flags$ &= -33 /* hasInitializedComponent */;
|
|
1929
|
+
hostRef.$loadRetryCount$ = ((_a = hostRef.$loadRetryCount$) != null ? _a : 0) + 1;
|
|
1930
|
+
if (hostRef.$loadRetryCount$ < MAX_LAZY_LOAD_RETRIES) {
|
|
1931
|
+
hostRef.$flags$ |= 1024 /* hasFailedLoad */;
|
|
1932
|
+
}
|
|
1933
|
+
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
1934
|
+
}
|
|
1935
|
+
if (!Cstr.isProxied) {
|
|
1936
|
+
{
|
|
1937
|
+
cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
|
|
1938
|
+
cmpMeta.$serializers$ = Cstr.serializers;
|
|
1939
|
+
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
1940
|
+
}
|
|
1941
|
+
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
1942
|
+
Cstr.isProxied = true;
|
|
1943
|
+
}
|
|
1944
|
+
const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
|
|
3374
1945
|
{
|
|
3375
|
-
|
|
3376
|
-
cmpMeta.$serializers$ = Cstr.serializers;
|
|
3377
|
-
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
1946
|
+
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
3378
1947
|
}
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
1948
|
+
try {
|
|
1949
|
+
new Cstr(hostRef);
|
|
1950
|
+
} catch (e) {
|
|
1951
|
+
consoleError(e, elm);
|
|
1952
|
+
}
|
|
1953
|
+
{
|
|
1954
|
+
hostRef.$flags$ &= -9 /* isConstructingInstance */;
|
|
1955
|
+
}
|
|
1956
|
+
{
|
|
1957
|
+
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1958
|
+
}
|
|
1959
|
+
endNewInstance();
|
|
1960
|
+
const needsDeferredCallback = cmpMeta.$flags$ & 4 /* hasSlotRelocation */;
|
|
1961
|
+
if (!needsDeferredCallback) {
|
|
1962
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1963
|
+
} else {
|
|
1964
|
+
hostRef.$deferredConnectedCallback$ = true;
|
|
1965
|
+
}
|
|
1966
|
+
} else {
|
|
1967
|
+
Cstr = elm.constructor;
|
|
1968
|
+
const cmpTag = elm.localName;
|
|
1969
|
+
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
3393
1970
|
}
|
|
3394
|
-
{
|
|
3395
|
-
|
|
1971
|
+
if (Cstr && Cstr.style) {
|
|
1972
|
+
let style;
|
|
1973
|
+
if (typeof Cstr.style === "string") {
|
|
1974
|
+
style = Cstr.style;
|
|
1975
|
+
}
|
|
1976
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
1977
|
+
if (!styles.has(scopeId2) || BUILD.hotModuleReplacement) {
|
|
1978
|
+
const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
|
|
1979
|
+
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
1980
|
+
endRegisterStyles();
|
|
1981
|
+
}
|
|
3396
1982
|
}
|
|
3397
|
-
|
|
3398
|
-
|
|
1983
|
+
}
|
|
1984
|
+
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1985
|
+
const schedule = () => scheduleUpdate(hostRef, true);
|
|
1986
|
+
if (ancestorComponent && ancestorComponent["s-rc"]) {
|
|
1987
|
+
ancestorComponent["s-rc"].push(schedule);
|
|
3399
1988
|
} else {
|
|
3400
|
-
|
|
3401
|
-
const cmpTag = elm.localName;
|
|
3402
|
-
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1989
|
+
schedule();
|
|
3403
1990
|
}
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
3413
|
-
endRegisterStyles();
|
|
3414
|
-
}
|
|
1991
|
+
} catch (e) {
|
|
1992
|
+
consoleError(e, elm);
|
|
1993
|
+
if (hostRef.$onRenderResolve$) {
|
|
1994
|
+
hostRef.$onRenderResolve$();
|
|
1995
|
+
hostRef.$onRenderResolve$ = void 0;
|
|
1996
|
+
}
|
|
1997
|
+
if (hostRef.$onReadyResolve$ && !(hostRef.$flags$ & 1024 /* hasFailedLoad */)) {
|
|
1998
|
+
hostRef.$onReadyResolve$(elm);
|
|
3415
1999
|
}
|
|
3416
|
-
}
|
|
3417
|
-
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
3418
|
-
const schedule = () => scheduleUpdate(hostRef, true);
|
|
3419
|
-
if (ancestorComponent && ancestorComponent["s-rc"]) {
|
|
3420
|
-
ancestorComponent["s-rc"].push(schedule);
|
|
3421
|
-
} else {
|
|
3422
|
-
schedule();
|
|
3423
2000
|
}
|
|
3424
2001
|
};
|
|
3425
2002
|
var fireConnectedCallback = (instance, elm) => {
|
|
@@ -3456,7 +2033,7 @@ var connectedCallback = (elm) => {
|
|
|
3456
2033
|
}
|
|
3457
2034
|
if (cmpMeta.$members$) {
|
|
3458
2035
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
3459
|
-
if (memberFlags & 31 /* Prop */ &&
|
|
2036
|
+
if (memberFlags & 31 /* Prop */ && Object.prototype.hasOwnProperty.call(elm, memberName)) {
|
|
3460
2037
|
const value = elm[memberName];
|
|
3461
2038
|
delete elm[memberName];
|
|
3462
2039
|
elm[memberName] = value;
|
|
@@ -3470,6 +2047,8 @@ var connectedCallback = (elm) => {
|
|
|
3470
2047
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
3471
2048
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
3472
2049
|
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
2050
|
+
} else if (hostRef.$flags$ & 1024 /* hasFailedLoad */) {
|
|
2051
|
+
setTimeout(() => initializeComponent(elm, hostRef, cmpMeta), LAZY_LOAD_RETRY_INTERVAL_MS);
|
|
3473
2052
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
3474
2053
|
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
3475
2054
|
}
|
|
@@ -3537,7 +2116,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3537
2116
|
let hasSlotRelocation = false;
|
|
3538
2117
|
lazyBundles.map((lazyBundle) => {
|
|
3539
2118
|
lazyBundle[1].map((compactMeta) => {
|
|
3540
|
-
var _a2, _b
|
|
2119
|
+
var _a2, _b;
|
|
3541
2120
|
const cmpMeta = {
|
|
3542
2121
|
$flags$: compactMeta[0],
|
|
3543
2122
|
$tagName$: compactMeta[1],
|
|
@@ -3557,16 +2136,18 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3557
2136
|
cmpMeta.$attrsToReflect$ = [];
|
|
3558
2137
|
}
|
|
3559
2138
|
{
|
|
3560
|
-
cmpMeta.$watchers$ = (
|
|
3561
|
-
cmpMeta.$serializers$ = (
|
|
3562
|
-
cmpMeta.$deserializers$ = (
|
|
2139
|
+
cmpMeta.$watchers$ = normalizeWatchers(compactMeta[4]);
|
|
2140
|
+
cmpMeta.$serializers$ = (_a2 = compactMeta[5]) != null ? _a2 : {};
|
|
2141
|
+
cmpMeta.$deserializers$ = (_b = compactMeta[6]) != null ? _b : {};
|
|
3563
2142
|
}
|
|
3564
2143
|
const tagName = transformTag(cmpMeta.$tagName$);
|
|
3565
2144
|
const HostElement = class extends HTMLElement {
|
|
2145
|
+
["s-p"];
|
|
2146
|
+
["s-rc"];
|
|
2147
|
+
hasRegisteredEventListeners = false;
|
|
3566
2148
|
// StencilLazyHost
|
|
3567
2149
|
constructor(self) {
|
|
3568
2150
|
super(self);
|
|
3569
|
-
this.hasRegisteredEventListeners = false;
|
|
3570
2151
|
self = this;
|
|
3571
2152
|
registerHost(self, cmpMeta);
|
|
3572
2153
|
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
@@ -3604,7 +2185,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3604
2185
|
}
|
|
3605
2186
|
disconnectedCallback() {
|
|
3606
2187
|
plt.jmp(() => disconnectedCallback(this));
|
|
3607
|
-
|
|
2188
|
+
nextTick(() => {
|
|
3608
2189
|
var _a3;
|
|
3609
2190
|
const hostRef = getHostRef(this);
|
|
3610
2191
|
if (!hostRef) {
|
|
@@ -3710,8 +2291,21 @@ var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
|
3710
2291
|
|
|
3711
2292
|
// src/runtime/nonce.ts
|
|
3712
2293
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
2294
|
+
|
|
2295
|
+
// src/runtime/tag-transform.ts
|
|
2296
|
+
var tagTransformer = void 0;
|
|
3713
2297
|
function transformTag(tag) {
|
|
3714
|
-
return tag;
|
|
2298
|
+
if (!tagTransformer) return tag;
|
|
2299
|
+
return tagTransformer(tag);
|
|
2300
|
+
}
|
|
2301
|
+
function setTagTransformer(transformer) {
|
|
2302
|
+
if (tagTransformer) {
|
|
2303
|
+
console.warn(`
|
|
2304
|
+
A tagTransformer has already been set.
|
|
2305
|
+
Overwriting it may lead to error and unexpected results if your components have already been defined.
|
|
2306
|
+
`);
|
|
2307
|
+
}
|
|
2308
|
+
tagTransformer = transformer;
|
|
3715
2309
|
}
|
|
3716
2310
|
|
|
3717
|
-
export { Fragment as F, Host as H, getElement as a, bootstrapLazy as b, createEvent as c, globalScripts as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
2311
|
+
export { Fragment as F, Host as H, getElement as a, bootstrapLazy as b, createEvent as c, setTagTransformer as d, globalScripts as g, h, promiseResolve as p, registerInstance as r, setNonce as s, transformTag as t };
|