@mgdis/mg-components 6.21.0 → 6.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-CCsGMNyq.js → index-BxB20_Vw.js} +8 -0
- package/dist/cjs/{index-C2viYwrR.js → index-Dz2LAZQT.js} +329 -1789
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{mg-action-more_37.cjs.entry.js → mg-action-more_36.cjs.entry.js} +200 -242
- package/dist/cjs/mg-alert.cjs.entry.js +3 -3
- package/dist/cjs/mg-breadcrumb.cjs.entry.js +63 -0
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/cjs/mg-fieldset.cjs.entry.js +2 -2
- package/dist/cjs/mg-input-combobox.cjs.entry.js +4 -4
- package/dist/cjs/mg-input-file.cjs.entry.js +4 -4
- package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +40095 -15808
- package/dist/cjs/mg-loader.cjs.entry.js +3 -3
- package/dist/cjs/mg-progress.cjs.entry.js +2 -2
- package/dist/collection/assets/icons/index.js +1 -1
- package/dist/collection/collection-manifest.json +4 -3
- package/dist/collection/components/atoms/internals/mg-character-left/mg-character-left.js +1 -1
- package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +1 -1
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +2 -1
- package/dist/collection/components/atoms/mg-button/mg-button.js +6 -3
- package/dist/collection/components/atoms/mg-card/mg-card.js +3 -2
- package/dist/collection/components/atoms/mg-divider/mg-divider.js +1 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +10 -6
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +3 -2
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +1 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +3 -2
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +5 -3
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +2 -2
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.js +38 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +3 -2
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +47 -26
- package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +13 -7
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +3 -2
- package/dist/collection/components/molecules/inputs/mg-input-file/mg-input-file.js +4 -3
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +9 -5
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +6 -4
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +5 -3
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/custom-properties.scss +212 -0
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/editor.conf.js +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/index.js +300 -94
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.conf.js +29 -0
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +164 -51
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +22 -8
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +12 -7
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +5 -3
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +7 -4
- package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +7 -38
- package/dist/collection/components/molecules/menus/mg-menu/mg-menu.conf.js +0 -4
- package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +24 -44
- package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +69 -40
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +11 -7
- package/dist/collection/components/molecules/mg-alert/mg-alert.js +5 -3
- package/dist/collection/components/molecules/mg-breadcrumb/mg-breadcrumb.conf.js +1 -0
- package/dist/collection/components/molecules/mg-breadcrumb/mg-breadcrumb.js +93 -0
- package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
- package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +3 -2
- package/dist/collection/components/molecules/mg-form/mg-form.js +5 -3
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +5 -3
- package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
- package/dist/collection/components/molecules/mg-message/mg-message.js +6 -4
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +4 -3
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +2 -1
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +5 -3
- package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +3 -2
- package/dist/collection/components/molecules/mg-progress/mg-progress.js +3 -2
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +3 -2
- package/dist/collection/components/molecules/mg-table/mg-table.js +41 -2
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +0 -4
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +15 -34
- package/dist/collection/locales/en/messages.json +3 -0
- package/dist/collection/locales/fr/messages.json +3 -0
- package/dist/components/index2.js +1 -1
- package/dist/components/index3.js +1 -1
- package/dist/components/mg-action-more.js +1 -1
- package/dist/components/mg-alert.js +1 -1
- package/dist/components/mg-breadcrumb.d.ts +11 -0
- package/dist/components/mg-breadcrumb.js +1 -0
- package/dist/components/mg-card2.js +1 -1
- package/dist/components/mg-character-left2.js +1 -1
- package/dist/components/mg-details.js +1 -1
- package/dist/components/mg-divider2.js +1 -1
- package/dist/components/mg-fieldset.js +1 -1
- package/dist/components/mg-form.js +1 -1
- package/dist/components/mg-icon2.js +1 -1
- package/dist/components/mg-illustrated-message.js +1 -1
- package/dist/components/mg-input-checkbox.js +1 -1
- package/dist/components/mg-input-combobox.js +1 -1
- package/dist/components/mg-input-date.js +1 -1
- package/dist/components/mg-input-file.js +1 -1
- package/dist/components/mg-input-numeric.js +1 -1
- package/dist/components/mg-input-password.js +1 -1
- package/dist/components/mg-input-radio.js +1 -1
- package/dist/components/mg-input-rich-text-editor.js +1663 -1
- package/dist/components/mg-input-select2.js +1 -1
- package/dist/components/mg-input-text2.js +1 -1
- package/dist/components/mg-input-textarea.js +1 -1
- package/dist/components/mg-input-title2.js +1 -1
- package/dist/components/mg-input-toggle.js +1 -1
- package/dist/components/mg-input2.js +1 -1
- package/dist/components/mg-item-more2.js +1 -1
- package/dist/components/mg-loader2.js +1 -1
- package/dist/components/mg-menu-item2.js +1 -1
- package/dist/components/mg-message2.js +1 -1
- package/dist/components/mg-modal.js +1 -1
- package/dist/components/mg-panel.js +1 -1
- package/dist/components/mg-popover-content2.js +1 -1
- package/dist/components/mg-popover2.js +1 -1
- package/dist/components/mg-progress.js +1 -1
- package/dist/components/mg-skip-links.js +1 -1
- package/dist/components/mg-table.js +1 -1
- package/dist/components/mg-tabs2.js +1 -1
- package/dist/components/mg-tag.js +1 -1
- package/dist/components/mg-tooltip-content2.js +1 -1
- package/dist/components/mg-tooltip2.js +1 -1
- package/dist/esm/{index-DFwaH2hS.js → index-C3jUhxdI.js} +329 -1789
- package/dist/esm/{index-D-uaxCxH.js → index-DSEloqPn.js} +8 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{mg-action-more_37.entry.js → mg-action-more_36.entry.js} +202 -243
- package/dist/esm/mg-alert.entry.js +3 -3
- package/dist/esm/mg-breadcrumb.entry.js +61 -0
- package/dist/esm/mg-components.js +4 -4
- package/dist/esm/mg-fieldset.entry.js +2 -2
- package/dist/esm/mg-input-combobox.entry.js +4 -4
- package/dist/esm/mg-input-file.entry.js +4 -4
- package/dist/esm/mg-input-rich-text-editor.entry.js +40082 -15795
- package/dist/esm/mg-loader.entry.js +3 -3
- package/dist/esm/mg-progress.entry.js +2 -2
- package/dist/mg-components/locales/en/messages.json +3 -0
- package/dist/mg-components/locales/fr/messages.json +3 -0
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/{p-6b57f249.entry.js → p-06fbdb2f.entry.js} +1 -1
- package/dist/mg-components/{p-c3d116b9.entry.js → p-188b9ca9.entry.js} +1 -1
- package/dist/mg-components/p-4667078d.entry.js +1 -0
- package/dist/mg-components/p-5a859ecf.entry.js +1658 -0
- package/dist/mg-components/p-661da56b.entry.js +1 -0
- package/dist/mg-components/{p-988c282e.entry.js → p-8e256086.entry.js} +1 -1
- package/dist/mg-components/p-C3jUhxdI.js +2 -0
- package/dist/mg-components/p-DSEloqPn.js +1 -0
- package/dist/mg-components/{p-6b655830.entry.js → p-b0b8c58f.entry.js} +1 -1
- package/dist/mg-components/{p-dd1934f4.entry.js → p-bbcef41c.entry.js} +1 -1
- package/dist/mg-components/{p-4175dcbe.entry.js → p-c1aeb277.entry.js} +1 -1
- package/dist/types/assets/icons/index.d.ts +2 -0
- package/dist/types/components/molecules/inputs/mg-input/mg-input.conf.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.d.ts +2 -2
- package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.d.ts +8 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +16 -8
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +15 -5
- package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/editor/editor.conf.d.ts +17 -0
- package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/editor/index.d.ts +27 -19
- package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.conf.d.ts +3 -0
- package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.d.ts +48 -14
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +1 -1
- package/dist/types/components/molecules/internals/mg-item-more/mg-item-more.conf.d.ts +0 -5
- package/dist/types/components/molecules/internals/mg-item-more/mg-item-more.d.ts +1 -6
- package/dist/types/components/molecules/menus/mg-menu/mg-menu.conf.d.ts +2 -10
- package/dist/types/components/molecules/menus/mg-menu/mg-menu.d.ts +7 -7
- package/dist/types/components/molecules/menus/mg-menu-item/mg-menu-item.d.ts +12 -8
- package/dist/types/components/molecules/mg-breadcrumb/mg-breadcrumb.conf.d.ts +18 -0
- package/dist/types/components/molecules/mg-breadcrumb/mg-breadcrumb.d.ts +34 -0
- package/dist/types/components/molecules/mg-table/mg-table.d.ts +6 -0
- package/dist/types/components/molecules/mg-tabs/mg-tabs.conf.d.ts +1 -9
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +4 -4
- package/dist/types/components.d.ts +617 -207
- package/dist/types/stencil-public-runtime.d.ts +52 -2
- package/ide/intellij/web-types.json +143 -55
- package/ide/vscode/css-custom-data.json +10 -2
- package/ide/vscode/html-custom-data.json +113 -34
- package/package.json +24 -23
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +0 -245
- package/dist/components/mg-input-checkbox-paginated.d.ts +0 -11
- package/dist/components/mg-input-checkbox-paginated.js +0 -1
- package/dist/components/mg-input-checkbox-paginated2.js +0 -1
- package/dist/mg-components/p-08fa327b.entry.js +0 -1
- package/dist/mg-components/p-D-uaxCxH.js +0 -1
- package/dist/mg-components/p-DFwaH2hS.js +0 -2
- package/dist/mg-components/p-a79b1f19.entry.js +0 -1
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +0 -77
|
@@ -5,254 +5,22 @@ const globalScripts = () => {};
|
|
|
5
5
|
const globalStyles = ":root{--mg-b-size-4:0.4rem;--mg-b-size-8:0.8rem;--mg-b-size-12:1.2rem;--mg-b-size-16:1.6rem;--mg-b-size-20:2rem;--mg-b-size-24:2.4rem;--mg-b-size-32:3.2rem;--mg-b-size-40:4rem;--mg-b-size-48:4.8rem;--mg-b-size-56:5.6rem;--mg-b-size-64:6.4rem;--mg-b-size-72:7.2rem;--mg-b-size-120:12rem;--mg-b-size-border:0.1rem;--mg-b-size-radius:var(--mg-b-size-4);--mg-b-size-floating-element-max-width:40rem;--mg-b-size-min-height:3.5rem;--mg-b-spacing-actions:var(--mg-b-size-8);--mg-b-color-blue-10:rgb(227, 244, 255);--mg-b-color-blue-20:rgb(209, 237, 255);--mg-b-color-blue-30:rgb(166, 219, 255);--mg-b-color-blue-40:rgb(106, 195, 255);--mg-b-color-blue-50:rgb(64, 179, 255);--mg-b-color-blue-60:rgb(22, 162, 255);--mg-b-color-blue-70:rgb(0, 132, 220);--mg-b-color-blue-80:rgb(0, 94, 156);--mg-b-color-blue-90:rgb(0, 67, 111);--mg-b-color-blue-100:rgb(0, 39, 66);--mg-b-color-green-10:rgb(234, 251, 244);--mg-b-color-green-20:rgb(212, 247, 234);--mg-b-color-green-30:rgb(181, 240, 219);--mg-b-color-green-40:rgb(144, 232, 202);--mg-b-color-green-50:rgb(97, 223, 179);--mg-b-color-green-60:rgb(50, 213, 156);--mg-b-color-green-70:rgb(46, 194, 142);--mg-b-color-green-80:rgb(36, 151, 111);--mg-b-color-green-90:rgb(21, 89, 66);--mg-b-color-green-100:rgb(13, 54, 40);--mg-b-color-red-10:rgb(251, 233, 234);--mg-b-color-red-20:rgb(248, 216, 217);--mg-b-color-red-30:rgb(242, 174, 178);--mg-b-color-red-40:rgb(236, 134, 139);--mg-b-color-red-50:rgb(229, 96, 103);--mg-b-color-red-60:rgb(221, 42, 52);--mg-b-color-red-70:rgb(219, 31, 41);--mg-b-color-red-80:rgb(152, 21, 28);--mg-b-color-red-90:rgb(120, 17, 23);--mg-b-color-red-100:rgb(92, 13, 13);--mg-b-color-yellow-10:rgb(255, 247, 230);--mg-b-color-yellow-20:rgb(255, 240, 207);--mg-b-color-yellow-30:rgb(255, 226, 162);--mg-b-color-yellow-40:rgb(255, 212, 118);--mg-b-color-yellow-50:rgb(255, 195, 62);--mg-b-color-yellow-60:rgb(232, 177, 56);--mg-b-color-yellow-70:rgb(181, 138, 44);--mg-b-color-yellow-80:rgb(140, 107, 34);--mg-b-color-yellow-90:rgb(86, 66, 21);--mg-b-color-yellow-100:rgb(53, 41, 13);--mg-b-color-neutral-0:rgb(255, 255, 255);--mg-b-color-neutral-10:rgb(250, 251, 251);--mg-b-color-neutral-20:rgb(236, 238, 238);--mg-b-color-neutral-30:rgb(225, 227, 228);--mg-b-color-neutral-40:rgb(197, 201, 203);--mg-b-color-neutral-50:rgb(182, 188, 190);--mg-b-color-neutral-60:rgb(157, 165, 167);--mg-b-color-neutral-70:rgb(129, 139, 142);--mg-b-color-neutral-80:rgb(101, 113, 117);--mg-b-color-neutral-90:rgb(75, 89, 94);--mg-b-color-neutral-100:rgb(47, 64, 69);--mg-b-color-neutral-110:rgb(21, 40, 46);--mg-b-color-neutral-120:rgb(5, 9, 11);--mg-b-color-dark:var(--mg-b-color-neutral-110);--mg-b-color-light:var(--mg-b-color-neutral-0);--mg-b-color-danger:var(--mg-b-color-red-70);--mg-b-color-text-on-danger:var(--mg-b-color-light);--mg-b-color-info:var(--mg-b-color-blue-80);--mg-b-color-text-on-info:var(--mg-b-color-light);--mg-b-color-success:var(--mg-b-color-green-60);--mg-b-color-text-on-success:var(--mg-b-color-dark);--mg-b-color-warning:var(--mg-b-color-yellow-50);--mg-b-color-text-on-warning:var(--mg-b-color-dark);--mg-b-color-app:var(--mg-b-color-blue-80);--mg-b-color-primary:var(--mg-b-color-neutral-110);--mg-b-color-text-on-primary:var(--mg-b-color-light);--mg-b-color-secondary:var(--mg-b-color-neutral-10);--mg-b-color-text-on-secondary:var(--mg-b-color-dark);--mg-b-font-size:1.3rem;--mg-b-font-size-small:1.17rem;--mg-b-font-size-h1:calc(var(--mg-b-font-size) * 1.85);--mg-b-font-size-h2:calc(var(--mg-b-font-size) * 1.65);--mg-b-font-size-h3:calc(var(--mg-b-font-size) * 1.35);--mg-b-font-size-h4:calc(var(--mg-b-font-size) * 1.2);--mg-b-font-size-h5:calc(var(--mg-b-font-size) * 1.1);--mg-b-font-size-h6:calc(var(--mg-b-font-size) * 0.8);--mg-b-small-font-size:0.9em;--mg-b-font-family:'Open Sans', sans-serif;--mg-b-font-family-heading:var(--mg-b-font-family);--mg-b-line-height:1.4;--mg-b-box-shadow:0 0.3rem 0.8rem 0 color-mix(in srgb, var(--mg-b-color-dark), transparent 85%);--mg-b-opacity-element-disabled:0.4}:root{--mg-c-badge-size:var(--mg-b-size-16);--mg-c-badge-font-size:var(--mg-b-font-size-small);--mg-c-button-border-radius:var(--mg-b-size-radius);--mg-c-button-icon-border-radius:var(--mg-b-size-min-height);--mg-c-button-color-background-danger:var(--mg-b-color-danger);--mg-c-button-color-border-danger:var(--mg-b-color-red-80);--mg-c-button-color-gradient-danger:var(--mg-b-color-red-80);--mg-c-button-color-text-danger:var(--mg-b-color-text-on-danger);--mg-c-button-color-background-info:var(--mg-b-color-info);--mg-c-button-color-border-info:var(--mg-b-color-blue-90);--mg-c-button-color-gradient-info:var(--mg-b-color-blue-90);--mg-c-button-color-text-info:var(--mg-b-color-text-on-info);--mg-c-button-color-background-success:var(--mg-b-color-success);--mg-c-button-color-border-success:var(--mg-b-color-green-70);--mg-c-button-color-gradient-success:var(--mg-b-color-green-70);--mg-c-button-color-text-success:var(--mg-b-color-text-on-success);--mg-c-button-color-background-warning:var(--mg-b-color-warning);--mg-c-button-color-border-warning:var(--mg-b-color-yellow-60);--mg-c-button-color-gradient-warning:var(--mg-b-color-yellow-60);--mg-c-button-color-text-warning:var(--mg-b-color-text-on-warning);--mg-c-button-color-background-primary:var(--mg-b-color-primary);--mg-c-button-color-border-primary:var(--mg-b-color-neutral-120);--mg-c-button-color-gradient-primary:var(--mg-b-color-neutral-120);--mg-c-button-color-text-primary:var(--mg-b-color-text-on-primary);--mg-c-button-color-background-secondary:var(--mg-b-color-secondary);--mg-c-button-color-border-secondary:var(--mg-b-color-neutral-20);--mg-c-button-color-gradient-secondary:var(--mg-b-color-neutral-20);--mg-c-button-color-text-secondary:var(--mg-b-color-text-on-secondary);--mg-c-button-color-background-danger-alt:var(--mg-b-color-neutral-10);--mg-c-button-color-border-danger-alt:var(--mg-b-color-neutral-20);--mg-c-button-color-gradient-danger-alt:var(--mg-b-color-neutral-20);--mg-c-button-color-text-danger-alt:var(--mg-b-color-danger);--mg-c-card-spacing-default:var(--mg-b-size-16);--mg-c-card-border-radius-default:var(--mg-b-size-12);--mg-c-card-color-background-default:var(--mg-b-color-light);--mg-c-card-border-default:var(--mg-b-size-border) solid var(--mg-b-color-neutral-30);--mg-c-card-box-shadow-default:var(--mg-b-box-shadow);--mg-c-divider-color-background:color-mix(in srgb, var(--mg-b-color-dark), transparent 85%);--mg-c-divider-thickness:var(--mg-b-size-border);--mg-c-divider-spacing-vertical:var(--mg-b-size-40);--mg-c-icon-border-radius:50%;--mg-c-tag-height:var(--mg-b-size-24);--mg-c-tag-border-radius:var(--mg-b-size-radius);--mg-c-tag-font-size:var(--mg-b-font-size-small);--mg-c-tooltip-border-radius:var(--mg-b-size-radius);--mg-c-tooltip-color-background:var(--mg-b-color-dark);--mg-c-tooltip-color-text:var(--mg-b-color-light);--mg-c-details-spacing:var(--mg-b-size-8);--mg-c-illustrated-message-spacing-vertical:var(--mg-b-size-40);--mg-c-input-border-width:var(--mg-b-size-border);--mg-c-input-border-radius:var(--mg-b-size-radius);--mg-c-input-color-border:rgb(181 194 201);--mg-c-input-placeholder-color-text:rgb(181 194 201);--mg-c-input-color-icon:rgb(181 194 201);--mg-c-input-color-box-shadow-focus:rgb(0 221 255 / 50%);--mg-c-input-error-color-background:color-mix(in srgb, var(--mg-b-color-danger), white 95%);--mg-c-input-toggle-border-radius-ratio:2;--mg-c-input-check-size:var(--mg-b-size-16);--mg-c-menu-item-color:var(--mg-b-color-app);--mg-c-message-border-radius:var(--mg-b-size-radius);--mg-c-modal-border-radius:var(--mg-c-card-border-radius-default);--mg-c-modal-title-font-size:var(--mg-b-font-size-h3);--mg-c-panel-border-radius:var(--mg-c-card-border-radius-default);--mg-c-panel-box-shadow:var(--mg-b-box-shadow);--mg-c-panel-content-spacing:var(--mg-b-size-16);--mg-c-popover-border-radius:var(--mg-c-card-border-radius-default);--mg-c-popover-color-background:var(--mg-b-color-light);--mg-c-popover-color-text:var(--mg-b-color-dark);--mg-c-popover-title-font-size:var(--mg-b-font-size-h5);--mg-c-popover-max-width:var(--mg-b-size-floating-element-max-width);--mg-c-progress-size:var(--mg-b-size-8);--mg-c-progress-border-color:var(--mg-b-color-neutral-80);--mg-c-progress-bar-color-background:var(--mg-b-color-neutral-30);--mg-c-progress-fill-color-background:var(--mg-b-color-app);--mg-c-tabs-color:var(--mg-b-color-app)}html{font-size:62.5%}body{font-family:var(--mg-b-font-family);font-size:var(--mg-b-font-size);-webkit-font-smoothing:antialiased;line-height:var(--mg-b-line-height)}:root{--mg-b-font-family:system-ui, sans-serif}";
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Platform v4.
|
|
8
|
+
Stencil Client Platform v4.43.4 | 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
11
|
|
|
107
|
-
//
|
|
108
|
-
|
|
109
|
-
"
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
}
|
|
12
|
+
// src/utils/get-prop-descriptor.ts
|
|
13
|
+
function getPropertyDescriptor(obj, memberName, getOnly) {
|
|
14
|
+
const stopAt = typeof HTMLElement !== "undefined" ? HTMLElement.prototype : null;
|
|
15
|
+
while (obj && obj !== stopAt) {
|
|
16
|
+
const desc = Object.getOwnPropertyDescriptor(obj, memberName);
|
|
17
|
+
if (desc && (!getOnly || desc.get)) return desc;
|
|
18
|
+
obj = Object.getPrototypeOf(obj);
|
|
254
19
|
}
|
|
255
|
-
|
|
20
|
+
return void 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// src/utils/es2022-rewire-class-members.ts
|
|
256
24
|
var reWireGetterSetter = (instance, hostRef) => {
|
|
257
25
|
var _a;
|
|
258
26
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
@@ -260,7 +28,7 @@ var reWireGetterSetter = (instance, hostRef) => {
|
|
|
260
28
|
members.map(([memberName, [memberFlags]]) => {
|
|
261
29
|
if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
|
|
262
30
|
const ogValue = instance[memberName];
|
|
263
|
-
const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName) || Object.getOwnPropertyDescriptor(instance, memberName);
|
|
31
|
+
const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName, true) || Object.getOwnPropertyDescriptor(instance, memberName);
|
|
264
32
|
if (ogDescriptor) {
|
|
265
33
|
Object.defineProperty(instance, memberName, {
|
|
266
34
|
get() {
|
|
@@ -273,18 +41,14 @@ var reWireGetterSetter = (instance, hostRef) => {
|
|
|
273
41
|
enumerable: true
|
|
274
42
|
});
|
|
275
43
|
}
|
|
276
|
-
|
|
44
|
+
if (hostRef.$instanceValues$.has(memberName)) {
|
|
45
|
+
instance[memberName] = hostRef.$instanceValues$.get(memberName);
|
|
46
|
+
} else if (ogValue !== void 0) {
|
|
47
|
+
instance[memberName] = ogValue;
|
|
48
|
+
}
|
|
277
49
|
}
|
|
278
50
|
});
|
|
279
51
|
};
|
|
280
|
-
function getPropertyDescriptor(obj, memberName) {
|
|
281
|
-
while (obj) {
|
|
282
|
-
const desc = Object.getOwnPropertyDescriptor(obj, memberName);
|
|
283
|
-
if (desc == null ? void 0 : desc.get) return desc;
|
|
284
|
-
obj = Object.getPrototypeOf(obj);
|
|
285
|
-
}
|
|
286
|
-
return void 0;
|
|
287
|
-
}
|
|
288
52
|
|
|
289
53
|
// src/client/client-host-ref.ts
|
|
290
54
|
var getHostRef = (ref) => {
|
|
@@ -351,6 +115,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
351
115
|
return import(
|
|
352
116
|
/* webpackMode: "lazy" */
|
|
353
117
|
'./mg-fieldset.entry.js').then(processMod, consoleError);
|
|
118
|
+
case 'mg-breadcrumb':
|
|
119
|
+
return import(
|
|
120
|
+
/* webpackMode: "lazy" */
|
|
121
|
+
'./mg-breadcrumb.entry.js').then(processMod, consoleError);
|
|
354
122
|
case 'mg-input-combobox':
|
|
355
123
|
return import(
|
|
356
124
|
/* webpackMode: "lazy" */
|
|
@@ -371,10 +139,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
371
139
|
return import(
|
|
372
140
|
/* webpackMode: "lazy" */
|
|
373
141
|
'./mg-progress.entry.js').then(processMod, consoleError);
|
|
374
|
-
case 'mg-action-
|
|
142
|
+
case 'mg-action-more_36':
|
|
375
143
|
return import(
|
|
376
144
|
/* webpackMode: "lazy" */
|
|
377
|
-
'./mg-action-
|
|
145
|
+
'./mg-action-more_36.entry.js').then(processMod, consoleError);
|
|
378
146
|
case 'mg-input-rich-text-editor':
|
|
379
147
|
return import(
|
|
380
148
|
/* webpackMode: "lazy" */
|
|
@@ -481,1426 +249,6 @@ var flush = () => {
|
|
|
481
249
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
482
250
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
483
251
|
|
|
484
|
-
// src/utils/helpers.ts
|
|
485
|
-
var isDef = (v) => v != null && v !== void 0;
|
|
486
|
-
var isComplexType = (o) => {
|
|
487
|
-
o = typeof o;
|
|
488
|
-
return o === "object" || o === "function";
|
|
489
|
-
};
|
|
490
|
-
|
|
491
|
-
// node_modules/minimatch/dist/esm/index.js
|
|
492
|
-
var import_brace_expansion = __toESM(require_brace_expansion());
|
|
493
|
-
|
|
494
|
-
// node_modules/minimatch/dist/esm/assert-valid-pattern.js
|
|
495
|
-
var MAX_PATTERN_LENGTH = 1024 * 64;
|
|
496
|
-
var assertValidPattern = (pattern) => {
|
|
497
|
-
if (typeof pattern !== "string") {
|
|
498
|
-
throw new TypeError("invalid pattern");
|
|
499
|
-
}
|
|
500
|
-
if (pattern.length > MAX_PATTERN_LENGTH) {
|
|
501
|
-
throw new TypeError("pattern is too long");
|
|
502
|
-
}
|
|
503
|
-
};
|
|
504
|
-
|
|
505
|
-
// node_modules/minimatch/dist/esm/brace-expressions.js
|
|
506
|
-
var posixClasses = {
|
|
507
|
-
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
|
|
508
|
-
"[:alpha:]": ["\\p{L}\\p{Nl}", true],
|
|
509
|
-
"[:ascii:]": ["\\x00-\\x7f", false],
|
|
510
|
-
"[:blank:]": ["\\p{Zs}\\t", true],
|
|
511
|
-
"[:cntrl:]": ["\\p{Cc}", true],
|
|
512
|
-
"[:digit:]": ["\\p{Nd}", true],
|
|
513
|
-
"[:graph:]": ["\\p{Z}\\p{C}", true, true],
|
|
514
|
-
"[:lower:]": ["\\p{Ll}", true],
|
|
515
|
-
"[:print:]": ["\\p{C}", true],
|
|
516
|
-
"[:punct:]": ["\\p{P}", true],
|
|
517
|
-
"[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true],
|
|
518
|
-
"[:upper:]": ["\\p{Lu}", true],
|
|
519
|
-
"[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true],
|
|
520
|
-
"[:xdigit:]": ["A-Fa-f0-9", false]
|
|
521
|
-
};
|
|
522
|
-
var braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&");
|
|
523
|
-
var regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
524
|
-
var rangesToString = (ranges) => ranges.join("");
|
|
525
|
-
var parseClass = (glob, position) => {
|
|
526
|
-
const pos = position;
|
|
527
|
-
if (glob.charAt(pos) !== "[") {
|
|
528
|
-
throw new Error("not in a brace expression");
|
|
529
|
-
}
|
|
530
|
-
const ranges = [];
|
|
531
|
-
const negs = [];
|
|
532
|
-
let i2 = pos + 1;
|
|
533
|
-
let sawStart = false;
|
|
534
|
-
let uflag = false;
|
|
535
|
-
let escaping = false;
|
|
536
|
-
let negate = false;
|
|
537
|
-
let endPos = pos;
|
|
538
|
-
let rangeStart = "";
|
|
539
|
-
WHILE: while (i2 < glob.length) {
|
|
540
|
-
const c = glob.charAt(i2);
|
|
541
|
-
if ((c === "!" || c === "^") && i2 === pos + 1) {
|
|
542
|
-
negate = true;
|
|
543
|
-
i2++;
|
|
544
|
-
continue;
|
|
545
|
-
}
|
|
546
|
-
if (c === "]" && sawStart && !escaping) {
|
|
547
|
-
endPos = i2 + 1;
|
|
548
|
-
break;
|
|
549
|
-
}
|
|
550
|
-
sawStart = true;
|
|
551
|
-
if (c === "\\") {
|
|
552
|
-
if (!escaping) {
|
|
553
|
-
escaping = true;
|
|
554
|
-
i2++;
|
|
555
|
-
continue;
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
if (c === "[" && !escaping) {
|
|
559
|
-
for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
|
|
560
|
-
if (glob.startsWith(cls, i2)) {
|
|
561
|
-
if (rangeStart) {
|
|
562
|
-
return ["$.", false, glob.length - pos, true];
|
|
563
|
-
}
|
|
564
|
-
i2 += cls.length;
|
|
565
|
-
if (neg)
|
|
566
|
-
negs.push(unip);
|
|
567
|
-
else
|
|
568
|
-
ranges.push(unip);
|
|
569
|
-
uflag = uflag || u;
|
|
570
|
-
continue WHILE;
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
escaping = false;
|
|
575
|
-
if (rangeStart) {
|
|
576
|
-
if (c > rangeStart) {
|
|
577
|
-
ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c));
|
|
578
|
-
} else if (c === rangeStart) {
|
|
579
|
-
ranges.push(braceEscape(c));
|
|
580
|
-
}
|
|
581
|
-
rangeStart = "";
|
|
582
|
-
i2++;
|
|
583
|
-
continue;
|
|
584
|
-
}
|
|
585
|
-
if (glob.startsWith("-]", i2 + 1)) {
|
|
586
|
-
ranges.push(braceEscape(c + "-"));
|
|
587
|
-
i2 += 2;
|
|
588
|
-
continue;
|
|
589
|
-
}
|
|
590
|
-
if (glob.startsWith("-", i2 + 1)) {
|
|
591
|
-
rangeStart = c;
|
|
592
|
-
i2 += 2;
|
|
593
|
-
continue;
|
|
594
|
-
}
|
|
595
|
-
ranges.push(braceEscape(c));
|
|
596
|
-
i2++;
|
|
597
|
-
}
|
|
598
|
-
if (endPos < i2) {
|
|
599
|
-
return ["", false, 0, false];
|
|
600
|
-
}
|
|
601
|
-
if (!ranges.length && !negs.length) {
|
|
602
|
-
return ["$.", false, glob.length - pos, true];
|
|
603
|
-
}
|
|
604
|
-
if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate) {
|
|
605
|
-
const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
|
|
606
|
-
return [regexpEscape(r), false, endPos - pos, false];
|
|
607
|
-
}
|
|
608
|
-
const sranges = "[" + (negate ? "^" : "") + rangesToString(ranges) + "]";
|
|
609
|
-
const snegs = "[" + (negate ? "" : "^") + rangesToString(negs) + "]";
|
|
610
|
-
const comb = ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs;
|
|
611
|
-
return [comb, uflag, endPos - pos, true];
|
|
612
|
-
};
|
|
613
|
-
|
|
614
|
-
// node_modules/minimatch/dist/esm/unescape.js
|
|
615
|
-
var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
616
|
-
return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
|
|
617
|
-
};
|
|
618
|
-
|
|
619
|
-
// node_modules/minimatch/dist/esm/ast.js
|
|
620
|
-
var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
|
|
621
|
-
var isExtglobType = (c) => types.has(c);
|
|
622
|
-
var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
|
|
623
|
-
var startNoDot = "(?!\\.)";
|
|
624
|
-
var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
|
|
625
|
-
var justDots = /* @__PURE__ */ new Set(["..", "."]);
|
|
626
|
-
var reSpecials = new Set("().*{}+?[]^$\\!");
|
|
627
|
-
var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
628
|
-
var qmark = "[^/]";
|
|
629
|
-
var star = qmark + "*?";
|
|
630
|
-
var starNoEmpty = qmark + "+?";
|
|
631
|
-
var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, partsToRegExp_fn, parseGlob_fn;
|
|
632
|
-
var _AST = class _AST {
|
|
633
|
-
constructor(type, parent, options = {}) {
|
|
634
|
-
__privateAdd(this, _AST_instances);
|
|
635
|
-
__publicField(this, "type");
|
|
636
|
-
__privateAdd(this, _root);
|
|
637
|
-
__privateAdd(this, _hasMagic);
|
|
638
|
-
__privateAdd(this, _uflag, false);
|
|
639
|
-
__privateAdd(this, _parts, []);
|
|
640
|
-
__privateAdd(this, _parent);
|
|
641
|
-
__privateAdd(this, _parentIndex);
|
|
642
|
-
__privateAdd(this, _negs);
|
|
643
|
-
__privateAdd(this, _filledNegs, false);
|
|
644
|
-
__privateAdd(this, _options);
|
|
645
|
-
__privateAdd(this, _toString);
|
|
646
|
-
// set to true if it's an extglob with no children
|
|
647
|
-
// (which really means one child of '')
|
|
648
|
-
__privateAdd(this, _emptyExt, false);
|
|
649
|
-
this.type = type;
|
|
650
|
-
if (type)
|
|
651
|
-
__privateSet(this, _hasMagic, true);
|
|
652
|
-
__privateSet(this, _parent, parent);
|
|
653
|
-
__privateSet(this, _root, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _root) : this);
|
|
654
|
-
__privateSet(this, _options, __privateGet(this, _root) === this ? options : __privateGet(__privateGet(this, _root), _options));
|
|
655
|
-
__privateSet(this, _negs, __privateGet(this, _root) === this ? [] : __privateGet(__privateGet(this, _root), _negs));
|
|
656
|
-
if (type === "!" && !__privateGet(__privateGet(this, _root), _filledNegs))
|
|
657
|
-
__privateGet(this, _negs).push(this);
|
|
658
|
-
__privateSet(this, _parentIndex, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0);
|
|
659
|
-
}
|
|
660
|
-
get hasMagic() {
|
|
661
|
-
if (__privateGet(this, _hasMagic) !== void 0)
|
|
662
|
-
return __privateGet(this, _hasMagic);
|
|
663
|
-
for (const p of __privateGet(this, _parts)) {
|
|
664
|
-
if (typeof p === "string")
|
|
665
|
-
continue;
|
|
666
|
-
if (p.type || p.hasMagic)
|
|
667
|
-
return __privateSet(this, _hasMagic, true);
|
|
668
|
-
}
|
|
669
|
-
return __privateGet(this, _hasMagic);
|
|
670
|
-
}
|
|
671
|
-
// reconstructs the pattern
|
|
672
|
-
toString() {
|
|
673
|
-
if (__privateGet(this, _toString) !== void 0)
|
|
674
|
-
return __privateGet(this, _toString);
|
|
675
|
-
if (!this.type) {
|
|
676
|
-
return __privateSet(this, _toString, __privateGet(this, _parts).map((p) => String(p)).join(""));
|
|
677
|
-
} else {
|
|
678
|
-
return __privateSet(this, _toString, this.type + "(" + __privateGet(this, _parts).map((p) => String(p)).join("|") + ")");
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
push(...parts) {
|
|
682
|
-
for (const p of parts) {
|
|
683
|
-
if (p === "")
|
|
684
|
-
continue;
|
|
685
|
-
if (typeof p !== "string" && !(p instanceof _AST && __privateGet(p, _parent) === this)) {
|
|
686
|
-
throw new Error("invalid part: " + p);
|
|
687
|
-
}
|
|
688
|
-
__privateGet(this, _parts).push(p);
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
toJSON() {
|
|
692
|
-
var _a;
|
|
693
|
-
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())];
|
|
694
|
-
if (this.isStart() && !this.type)
|
|
695
|
-
ret.unshift([]);
|
|
696
|
-
if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")) {
|
|
697
|
-
ret.push({});
|
|
698
|
-
}
|
|
699
|
-
return ret;
|
|
700
|
-
}
|
|
701
|
-
isStart() {
|
|
702
|
-
var _a;
|
|
703
|
-
if (__privateGet(this, _root) === this)
|
|
704
|
-
return true;
|
|
705
|
-
if (!((_a = __privateGet(this, _parent)) == null ? void 0 : _a.isStart()))
|
|
706
|
-
return false;
|
|
707
|
-
if (__privateGet(this, _parentIndex) === 0)
|
|
708
|
-
return true;
|
|
709
|
-
const p = __privateGet(this, _parent);
|
|
710
|
-
for (let i2 = 0; i2 < __privateGet(this, _parentIndex); i2++) {
|
|
711
|
-
const pp = __privateGet(p, _parts)[i2];
|
|
712
|
-
if (!(pp instanceof _AST && pp.type === "!")) {
|
|
713
|
-
return false;
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
return true;
|
|
717
|
-
}
|
|
718
|
-
isEnd() {
|
|
719
|
-
var _a, _b, _c;
|
|
720
|
-
if (__privateGet(this, _root) === this)
|
|
721
|
-
return true;
|
|
722
|
-
if (((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")
|
|
723
|
-
return true;
|
|
724
|
-
if (!((_b = __privateGet(this, _parent)) == null ? void 0 : _b.isEnd()))
|
|
725
|
-
return false;
|
|
726
|
-
if (!this.type)
|
|
727
|
-
return (_c = __privateGet(this, _parent)) == null ? void 0 : _c.isEnd();
|
|
728
|
-
const pl = __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0;
|
|
729
|
-
return __privateGet(this, _parentIndex) === pl - 1;
|
|
730
|
-
}
|
|
731
|
-
copyIn(part) {
|
|
732
|
-
if (typeof part === "string")
|
|
733
|
-
this.push(part);
|
|
734
|
-
else
|
|
735
|
-
this.push(part.clone(this));
|
|
736
|
-
}
|
|
737
|
-
clone(parent) {
|
|
738
|
-
const c = new _AST(this.type, parent);
|
|
739
|
-
for (const p of __privateGet(this, _parts)) {
|
|
740
|
-
c.copyIn(p);
|
|
741
|
-
}
|
|
742
|
-
return c;
|
|
743
|
-
}
|
|
744
|
-
static fromGlob(pattern, options = {}) {
|
|
745
|
-
var _a;
|
|
746
|
-
const ast = new _AST(null, void 0, options);
|
|
747
|
-
__privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, pattern, ast, 0, options);
|
|
748
|
-
return ast;
|
|
749
|
-
}
|
|
750
|
-
// returns the regular expression if there's magic, or the unescaped
|
|
751
|
-
// string if not.
|
|
752
|
-
toMMPattern() {
|
|
753
|
-
if (this !== __privateGet(this, _root))
|
|
754
|
-
return __privateGet(this, _root).toMMPattern();
|
|
755
|
-
const glob = this.toString();
|
|
756
|
-
const [re, body, hasMagic, uflag] = this.toRegExpSource();
|
|
757
|
-
const anyMagic = hasMagic || __privateGet(this, _hasMagic) || __privateGet(this, _options).nocase && !__privateGet(this, _options).nocaseMagicOnly && glob.toUpperCase() !== glob.toLowerCase();
|
|
758
|
-
if (!anyMagic) {
|
|
759
|
-
return body;
|
|
760
|
-
}
|
|
761
|
-
const flags = (__privateGet(this, _options).nocase ? "i" : "") + (uflag ? "u" : "");
|
|
762
|
-
return Object.assign(new RegExp(`^${re}$`, flags), {
|
|
763
|
-
_src: re,
|
|
764
|
-
_glob: glob
|
|
765
|
-
});
|
|
766
|
-
}
|
|
767
|
-
get options() {
|
|
768
|
-
return __privateGet(this, _options);
|
|
769
|
-
}
|
|
770
|
-
// returns the string match, the regexp source, whether there's magic
|
|
771
|
-
// in the regexp (so a regular expression is required) and whether or
|
|
772
|
-
// not the uflag is needed for the regular expression (for posix classes)
|
|
773
|
-
// TODO: instead of injecting the start/end at this point, just return
|
|
774
|
-
// the BODY of the regexp, along with the start/end portions suitable
|
|
775
|
-
// for binding the start/end in either a joined full-path makeRe context
|
|
776
|
-
// (where we bind to (^|/), or a standalone matchPart context (where
|
|
777
|
-
// we bind to ^, and not /). Otherwise slashes get duped!
|
|
778
|
-
//
|
|
779
|
-
// In part-matching mode, the start is:
|
|
780
|
-
// - if not isStart: nothing
|
|
781
|
-
// - if traversal possible, but not allowed: ^(?!\.\.?$)
|
|
782
|
-
// - if dots allowed or not possible: ^
|
|
783
|
-
// - if dots possible and not allowed: ^(?!\.)
|
|
784
|
-
// end is:
|
|
785
|
-
// - if not isEnd(): nothing
|
|
786
|
-
// - else: $
|
|
787
|
-
//
|
|
788
|
-
// In full-path matching mode, we put the slash at the START of the
|
|
789
|
-
// pattern, so start is:
|
|
790
|
-
// - if first pattern: same as part-matching mode
|
|
791
|
-
// - if not isStart(): nothing
|
|
792
|
-
// - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
|
|
793
|
-
// - if dots allowed or not possible: /
|
|
794
|
-
// - if dots possible and not allowed: /(?!\.)
|
|
795
|
-
// end is:
|
|
796
|
-
// - if last pattern, same as part-matching mode
|
|
797
|
-
// - else nothing
|
|
798
|
-
//
|
|
799
|
-
// Always put the (?:$|/) on negated tails, though, because that has to be
|
|
800
|
-
// there to bind the end of the negated pattern portion, and it's easier to
|
|
801
|
-
// just stick it in now rather than try to inject it later in the middle of
|
|
802
|
-
// the pattern.
|
|
803
|
-
//
|
|
804
|
-
// We can just always return the same end, and leave it up to the caller
|
|
805
|
-
// to know whether it's going to be used joined or in parts.
|
|
806
|
-
// And, if the start is adjusted slightly, can do the same there:
|
|
807
|
-
// - if not isStart: nothing
|
|
808
|
-
// - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
|
|
809
|
-
// - if dots allowed or not possible: (?:/|^)
|
|
810
|
-
// - if dots possible and not allowed: (?:/|^)(?!\.)
|
|
811
|
-
//
|
|
812
|
-
// But it's better to have a simpler binding without a conditional, for
|
|
813
|
-
// performance, so probably better to return both start options.
|
|
814
|
-
//
|
|
815
|
-
// Then the caller just ignores the end if it's not the first pattern,
|
|
816
|
-
// and the start always gets applied.
|
|
817
|
-
//
|
|
818
|
-
// But that's always going to be $ if it's the ending pattern, or nothing,
|
|
819
|
-
// so the caller can just attach $ at the end of the pattern when building.
|
|
820
|
-
//
|
|
821
|
-
// So the todo is:
|
|
822
|
-
// - better detect what kind of start is needed
|
|
823
|
-
// - return both flavors of starting pattern
|
|
824
|
-
// - attach $ at the end of the pattern when creating the actual RegExp
|
|
825
|
-
//
|
|
826
|
-
// Ah, but wait, no, that all only applies to the root when the first pattern
|
|
827
|
-
// is not an extglob. If the first pattern IS an extglob, then we need all
|
|
828
|
-
// that dot prevention biz to live in the extglob portions, because eg
|
|
829
|
-
// +(*|.x*) can match .xy but not .yx.
|
|
830
|
-
//
|
|
831
|
-
// So, return the two flavors if it's #root and the first child is not an
|
|
832
|
-
// AST, otherwise leave it to the child AST to handle it, and there,
|
|
833
|
-
// use the (?:^|/) style of start binding.
|
|
834
|
-
//
|
|
835
|
-
// Even simplified further:
|
|
836
|
-
// - Since the start for a join is eg /(?!\.) and the start for a part
|
|
837
|
-
// is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
|
|
838
|
-
// or start or whatever) and prepend ^ or / at the Regexp construction.
|
|
839
|
-
toRegExpSource(allowDot) {
|
|
840
|
-
var _a;
|
|
841
|
-
const dot = allowDot != null ? allowDot : !!__privateGet(this, _options).dot;
|
|
842
|
-
if (__privateGet(this, _root) === this)
|
|
843
|
-
__privateMethod(this, _AST_instances, fillNegs_fn).call(this);
|
|
844
|
-
if (!this.type) {
|
|
845
|
-
const noEmpty = this.isStart() && this.isEnd();
|
|
846
|
-
const src = __privateGet(this, _parts).map((p) => {
|
|
847
|
-
var _a2;
|
|
848
|
-
const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a2 = _AST, _AST_static, parseGlob_fn).call(_a2, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
|
|
849
|
-
__privateSet(this, _hasMagic, __privateGet(this, _hasMagic) || hasMagic);
|
|
850
|
-
__privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
|
|
851
|
-
return re;
|
|
852
|
-
}).join("");
|
|
853
|
-
let start2 = "";
|
|
854
|
-
if (this.isStart()) {
|
|
855
|
-
if (typeof __privateGet(this, _parts)[0] === "string") {
|
|
856
|
-
const dotTravAllowed = __privateGet(this, _parts).length === 1 && justDots.has(__privateGet(this, _parts)[0]);
|
|
857
|
-
if (!dotTravAllowed) {
|
|
858
|
-
const aps = addPatternStart;
|
|
859
|
-
const needNoTrav = (
|
|
860
|
-
// dots are allowed, and the pattern starts with [ or .
|
|
861
|
-
dot && aps.has(src.charAt(0)) || // the pattern starts with \., and then [ or .
|
|
862
|
-
src.startsWith("\\.") && aps.has(src.charAt(2)) || // the pattern starts with \.\., and then [ or .
|
|
863
|
-
src.startsWith("\\.\\.") && aps.has(src.charAt(4))
|
|
864
|
-
);
|
|
865
|
-
const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
|
|
866
|
-
start2 = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : "";
|
|
867
|
-
}
|
|
868
|
-
}
|
|
869
|
-
}
|
|
870
|
-
let end = "";
|
|
871
|
-
if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!") {
|
|
872
|
-
end = "(?:$|\\/)";
|
|
873
|
-
}
|
|
874
|
-
const final2 = start2 + src + end;
|
|
875
|
-
return [
|
|
876
|
-
final2,
|
|
877
|
-
unescape(src),
|
|
878
|
-
__privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
|
|
879
|
-
__privateGet(this, _uflag)
|
|
880
|
-
];
|
|
881
|
-
}
|
|
882
|
-
const repeated = this.type === "*" || this.type === "+";
|
|
883
|
-
const start = this.type === "!" ? "(?:(?!(?:" : "(?:";
|
|
884
|
-
let body = __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, dot);
|
|
885
|
-
if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
|
|
886
|
-
const s = this.toString();
|
|
887
|
-
__privateSet(this, _parts, [s]);
|
|
888
|
-
this.type = null;
|
|
889
|
-
__privateSet(this, _hasMagic, void 0);
|
|
890
|
-
return [s, unescape(this.toString()), false, false];
|
|
891
|
-
}
|
|
892
|
-
let bodyDotAllowed = !repeated || allowDot || dot || false ? "" : __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, true);
|
|
893
|
-
if (bodyDotAllowed === body) {
|
|
894
|
-
bodyDotAllowed = "";
|
|
895
|
-
}
|
|
896
|
-
if (bodyDotAllowed) {
|
|
897
|
-
body = `(?:${body})(?:${bodyDotAllowed})*?`;
|
|
898
|
-
}
|
|
899
|
-
let final = "";
|
|
900
|
-
if (this.type === "!" && __privateGet(this, _emptyExt)) {
|
|
901
|
-
final = (this.isStart() && !dot ? startNoDot : "") + starNoEmpty;
|
|
902
|
-
} else {
|
|
903
|
-
const close = this.type === "!" ? (
|
|
904
|
-
// !() must match something,but !(x) can match ''
|
|
905
|
-
"))" + (this.isStart() && !dot && !allowDot ? startNoDot : "") + star + ")"
|
|
906
|
-
) : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && bodyDotAllowed ? ")" : this.type === "*" && bodyDotAllowed ? `)?` : `)${this.type}`;
|
|
907
|
-
final = start + body + close;
|
|
908
|
-
}
|
|
909
|
-
return [
|
|
910
|
-
final,
|
|
911
|
-
unescape(body),
|
|
912
|
-
__privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
|
|
913
|
-
__privateGet(this, _uflag)
|
|
914
|
-
];
|
|
915
|
-
}
|
|
916
|
-
};
|
|
917
|
-
_root = new WeakMap();
|
|
918
|
-
_hasMagic = new WeakMap();
|
|
919
|
-
_uflag = new WeakMap();
|
|
920
|
-
_parts = new WeakMap();
|
|
921
|
-
_parent = new WeakMap();
|
|
922
|
-
_parentIndex = new WeakMap();
|
|
923
|
-
_negs = new WeakMap();
|
|
924
|
-
_filledNegs = new WeakMap();
|
|
925
|
-
_options = new WeakMap();
|
|
926
|
-
_toString = new WeakMap();
|
|
927
|
-
_emptyExt = new WeakMap();
|
|
928
|
-
_AST_instances = new WeakSet();
|
|
929
|
-
fillNegs_fn = function() {
|
|
930
|
-
if (this !== __privateGet(this, _root))
|
|
931
|
-
throw new Error("should only call on root");
|
|
932
|
-
if (__privateGet(this, _filledNegs))
|
|
933
|
-
return this;
|
|
934
|
-
this.toString();
|
|
935
|
-
__privateSet(this, _filledNegs, true);
|
|
936
|
-
let n;
|
|
937
|
-
while (n = __privateGet(this, _negs).pop()) {
|
|
938
|
-
if (n.type !== "!")
|
|
939
|
-
continue;
|
|
940
|
-
let p = n;
|
|
941
|
-
let pp = __privateGet(p, _parent);
|
|
942
|
-
while (pp) {
|
|
943
|
-
for (let i2 = __privateGet(p, _parentIndex) + 1; !pp.type && i2 < __privateGet(pp, _parts).length; i2++) {
|
|
944
|
-
for (const part of __privateGet(n, _parts)) {
|
|
945
|
-
if (typeof part === "string") {
|
|
946
|
-
throw new Error("string part in extglob AST??");
|
|
947
|
-
}
|
|
948
|
-
part.copyIn(__privateGet(pp, _parts)[i2]);
|
|
949
|
-
}
|
|
950
|
-
}
|
|
951
|
-
p = pp;
|
|
952
|
-
pp = __privateGet(p, _parent);
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
return this;
|
|
956
|
-
};
|
|
957
|
-
_AST_static = new WeakSet();
|
|
958
|
-
parseAST_fn = function(str, ast, pos, opt) {
|
|
959
|
-
var _a, _b;
|
|
960
|
-
let escaping = false;
|
|
961
|
-
let inBrace = false;
|
|
962
|
-
let braceStart = -1;
|
|
963
|
-
let braceNeg = false;
|
|
964
|
-
if (ast.type === null) {
|
|
965
|
-
let i3 = pos;
|
|
966
|
-
let acc2 = "";
|
|
967
|
-
while (i3 < str.length) {
|
|
968
|
-
const c = str.charAt(i3++);
|
|
969
|
-
if (escaping || c === "\\") {
|
|
970
|
-
escaping = !escaping;
|
|
971
|
-
acc2 += c;
|
|
972
|
-
continue;
|
|
973
|
-
}
|
|
974
|
-
if (inBrace) {
|
|
975
|
-
if (i3 === braceStart + 1) {
|
|
976
|
-
if (c === "^" || c === "!") {
|
|
977
|
-
braceNeg = true;
|
|
978
|
-
}
|
|
979
|
-
} else if (c === "]" && !(i3 === braceStart + 2 && braceNeg)) {
|
|
980
|
-
inBrace = false;
|
|
981
|
-
}
|
|
982
|
-
acc2 += c;
|
|
983
|
-
continue;
|
|
984
|
-
} else if (c === "[") {
|
|
985
|
-
inBrace = true;
|
|
986
|
-
braceStart = i3;
|
|
987
|
-
braceNeg = false;
|
|
988
|
-
acc2 += c;
|
|
989
|
-
continue;
|
|
990
|
-
}
|
|
991
|
-
if (!opt.noext && isExtglobType(c) && str.charAt(i3) === "(") {
|
|
992
|
-
ast.push(acc2);
|
|
993
|
-
acc2 = "";
|
|
994
|
-
const ext2 = new _AST(c, ast);
|
|
995
|
-
i3 = __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, str, ext2, i3, opt);
|
|
996
|
-
ast.push(ext2);
|
|
997
|
-
continue;
|
|
998
|
-
}
|
|
999
|
-
acc2 += c;
|
|
1000
|
-
}
|
|
1001
|
-
ast.push(acc2);
|
|
1002
|
-
return i3;
|
|
1003
|
-
}
|
|
1004
|
-
let i2 = pos + 1;
|
|
1005
|
-
let part = new _AST(null, ast);
|
|
1006
|
-
const parts = [];
|
|
1007
|
-
let acc = "";
|
|
1008
|
-
while (i2 < str.length) {
|
|
1009
|
-
const c = str.charAt(i2++);
|
|
1010
|
-
if (escaping || c === "\\") {
|
|
1011
|
-
escaping = !escaping;
|
|
1012
|
-
acc += c;
|
|
1013
|
-
continue;
|
|
1014
|
-
}
|
|
1015
|
-
if (inBrace) {
|
|
1016
|
-
if (i2 === braceStart + 1) {
|
|
1017
|
-
if (c === "^" || c === "!") {
|
|
1018
|
-
braceNeg = true;
|
|
1019
|
-
}
|
|
1020
|
-
} else if (c === "]" && !(i2 === braceStart + 2 && braceNeg)) {
|
|
1021
|
-
inBrace = false;
|
|
1022
|
-
}
|
|
1023
|
-
acc += c;
|
|
1024
|
-
continue;
|
|
1025
|
-
} else if (c === "[") {
|
|
1026
|
-
inBrace = true;
|
|
1027
|
-
braceStart = i2;
|
|
1028
|
-
braceNeg = false;
|
|
1029
|
-
acc += c;
|
|
1030
|
-
continue;
|
|
1031
|
-
}
|
|
1032
|
-
if (isExtglobType(c) && str.charAt(i2) === "(") {
|
|
1033
|
-
part.push(acc);
|
|
1034
|
-
acc = "";
|
|
1035
|
-
const ext2 = new _AST(c, part);
|
|
1036
|
-
part.push(ext2);
|
|
1037
|
-
i2 = __privateMethod(_b = _AST, _AST_static, parseAST_fn).call(_b, str, ext2, i2, opt);
|
|
1038
|
-
continue;
|
|
1039
|
-
}
|
|
1040
|
-
if (c === "|") {
|
|
1041
|
-
part.push(acc);
|
|
1042
|
-
acc = "";
|
|
1043
|
-
parts.push(part);
|
|
1044
|
-
part = new _AST(null, ast);
|
|
1045
|
-
continue;
|
|
1046
|
-
}
|
|
1047
|
-
if (c === ")") {
|
|
1048
|
-
if (acc === "" && __privateGet(ast, _parts).length === 0) {
|
|
1049
|
-
__privateSet(ast, _emptyExt, true);
|
|
1050
|
-
}
|
|
1051
|
-
part.push(acc);
|
|
1052
|
-
acc = "";
|
|
1053
|
-
ast.push(...parts, part);
|
|
1054
|
-
return i2;
|
|
1055
|
-
}
|
|
1056
|
-
acc += c;
|
|
1057
|
-
}
|
|
1058
|
-
ast.type = null;
|
|
1059
|
-
__privateSet(ast, _hasMagic, void 0);
|
|
1060
|
-
__privateSet(ast, _parts, [str.substring(pos - 1)]);
|
|
1061
|
-
return i2;
|
|
1062
|
-
};
|
|
1063
|
-
partsToRegExp_fn = function(dot) {
|
|
1064
|
-
return __privateGet(this, _parts).map((p) => {
|
|
1065
|
-
if (typeof p === "string") {
|
|
1066
|
-
throw new Error("string type in extglob ast??");
|
|
1067
|
-
}
|
|
1068
|
-
const [re, _, _hasMagic2, uflag] = p.toRegExpSource(dot);
|
|
1069
|
-
__privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
|
|
1070
|
-
return re;
|
|
1071
|
-
}).filter((p) => !(this.isStart() && this.isEnd()) || !!p).join("|");
|
|
1072
|
-
};
|
|
1073
|
-
parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
|
|
1074
|
-
let escaping = false;
|
|
1075
|
-
let re = "";
|
|
1076
|
-
let uflag = false;
|
|
1077
|
-
for (let i2 = 0; i2 < glob.length; i2++) {
|
|
1078
|
-
const c = glob.charAt(i2);
|
|
1079
|
-
if (escaping) {
|
|
1080
|
-
escaping = false;
|
|
1081
|
-
re += (reSpecials.has(c) ? "\\" : "") + c;
|
|
1082
|
-
continue;
|
|
1083
|
-
}
|
|
1084
|
-
if (c === "\\") {
|
|
1085
|
-
if (i2 === glob.length - 1) {
|
|
1086
|
-
re += "\\\\";
|
|
1087
|
-
} else {
|
|
1088
|
-
escaping = true;
|
|
1089
|
-
}
|
|
1090
|
-
continue;
|
|
1091
|
-
}
|
|
1092
|
-
if (c === "[") {
|
|
1093
|
-
const [src, needUflag, consumed, magic] = parseClass(glob, i2);
|
|
1094
|
-
if (consumed) {
|
|
1095
|
-
re += src;
|
|
1096
|
-
uflag = uflag || needUflag;
|
|
1097
|
-
i2 += consumed - 1;
|
|
1098
|
-
hasMagic = hasMagic || magic;
|
|
1099
|
-
continue;
|
|
1100
|
-
}
|
|
1101
|
-
}
|
|
1102
|
-
if (c === "*") {
|
|
1103
|
-
if (noEmpty && glob === "*")
|
|
1104
|
-
re += starNoEmpty;
|
|
1105
|
-
else
|
|
1106
|
-
re += star;
|
|
1107
|
-
hasMagic = true;
|
|
1108
|
-
continue;
|
|
1109
|
-
}
|
|
1110
|
-
if (c === "?") {
|
|
1111
|
-
re += qmark;
|
|
1112
|
-
hasMagic = true;
|
|
1113
|
-
continue;
|
|
1114
|
-
}
|
|
1115
|
-
re += regExpEscape(c);
|
|
1116
|
-
}
|
|
1117
|
-
return [re, unescape(glob), !!hasMagic, uflag];
|
|
1118
|
-
};
|
|
1119
|
-
__privateAdd(_AST, _AST_static);
|
|
1120
|
-
var AST = _AST;
|
|
1121
|
-
|
|
1122
|
-
// node_modules/minimatch/dist/esm/escape.js
|
|
1123
|
-
var escape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
1124
|
-
return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
|
|
1125
|
-
};
|
|
1126
|
-
|
|
1127
|
-
// node_modules/minimatch/dist/esm/index.js
|
|
1128
|
-
var minimatch = (p, pattern, options = {}) => {
|
|
1129
|
-
assertValidPattern(pattern);
|
|
1130
|
-
if (!options.nocomment && pattern.charAt(0) === "#") {
|
|
1131
|
-
return false;
|
|
1132
|
-
}
|
|
1133
|
-
return new Minimatch(pattern, options).match(p);
|
|
1134
|
-
};
|
|
1135
|
-
var starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
|
|
1136
|
-
var starDotExtTest = (ext2) => (f) => !f.startsWith(".") && f.endsWith(ext2);
|
|
1137
|
-
var starDotExtTestDot = (ext2) => (f) => f.endsWith(ext2);
|
|
1138
|
-
var starDotExtTestNocase = (ext2) => {
|
|
1139
|
-
ext2 = ext2.toLowerCase();
|
|
1140
|
-
return (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext2);
|
|
1141
|
-
};
|
|
1142
|
-
var starDotExtTestNocaseDot = (ext2) => {
|
|
1143
|
-
ext2 = ext2.toLowerCase();
|
|
1144
|
-
return (f) => f.toLowerCase().endsWith(ext2);
|
|
1145
|
-
};
|
|
1146
|
-
var starDotStarRE = /^\*+\.\*+$/;
|
|
1147
|
-
var starDotStarTest = (f) => !f.startsWith(".") && f.includes(".");
|
|
1148
|
-
var starDotStarTestDot = (f) => f !== "." && f !== ".." && f.includes(".");
|
|
1149
|
-
var dotStarRE = /^\.\*+$/;
|
|
1150
|
-
var dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith(".");
|
|
1151
|
-
var starRE = /^\*+$/;
|
|
1152
|
-
var starTest = (f) => f.length !== 0 && !f.startsWith(".");
|
|
1153
|
-
var starTestDot = (f) => f.length !== 0 && f !== "." && f !== "..";
|
|
1154
|
-
var qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
|
|
1155
|
-
var qmarksTestNocase = ([$0, ext2 = ""]) => {
|
|
1156
|
-
const noext = qmarksTestNoExt([$0]);
|
|
1157
|
-
if (!ext2)
|
|
1158
|
-
return noext;
|
|
1159
|
-
ext2 = ext2.toLowerCase();
|
|
1160
|
-
return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
|
|
1161
|
-
};
|
|
1162
|
-
var qmarksTestNocaseDot = ([$0, ext2 = ""]) => {
|
|
1163
|
-
const noext = qmarksTestNoExtDot([$0]);
|
|
1164
|
-
if (!ext2)
|
|
1165
|
-
return noext;
|
|
1166
|
-
ext2 = ext2.toLowerCase();
|
|
1167
|
-
return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
|
|
1168
|
-
};
|
|
1169
|
-
var qmarksTestDot = ([$0, ext2 = ""]) => {
|
|
1170
|
-
const noext = qmarksTestNoExtDot([$0]);
|
|
1171
|
-
return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
|
|
1172
|
-
};
|
|
1173
|
-
var qmarksTest = ([$0, ext2 = ""]) => {
|
|
1174
|
-
const noext = qmarksTestNoExt([$0]);
|
|
1175
|
-
return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
|
|
1176
|
-
};
|
|
1177
|
-
var qmarksTestNoExt = ([$0]) => {
|
|
1178
|
-
const len = $0.length;
|
|
1179
|
-
return (f) => f.length === len && !f.startsWith(".");
|
|
1180
|
-
};
|
|
1181
|
-
var qmarksTestNoExtDot = ([$0]) => {
|
|
1182
|
-
const len = $0.length;
|
|
1183
|
-
return (f) => f.length === len && f !== "." && f !== "..";
|
|
1184
|
-
};
|
|
1185
|
-
var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
1186
|
-
var path = {
|
|
1187
|
-
win32: { sep: "\\" },
|
|
1188
|
-
posix: { sep: "/" }
|
|
1189
|
-
};
|
|
1190
|
-
var sep = defaultPlatform === "win32" ? path.win32.sep : path.posix.sep;
|
|
1191
|
-
minimatch.sep = sep;
|
|
1192
|
-
var GLOBSTAR = Symbol("globstar **");
|
|
1193
|
-
minimatch.GLOBSTAR = GLOBSTAR;
|
|
1194
|
-
var qmark2 = "[^/]";
|
|
1195
|
-
var star2 = qmark2 + "*?";
|
|
1196
|
-
var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
|
|
1197
|
-
var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
|
|
1198
|
-
var filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
|
|
1199
|
-
minimatch.filter = filter;
|
|
1200
|
-
var ext = (a, b = {}) => Object.assign({}, a, b);
|
|
1201
|
-
var defaults = (def) => {
|
|
1202
|
-
if (!def || typeof def !== "object" || !Object.keys(def).length) {
|
|
1203
|
-
return minimatch;
|
|
1204
|
-
}
|
|
1205
|
-
const orig = minimatch;
|
|
1206
|
-
const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
|
|
1207
|
-
return Object.assign(m, {
|
|
1208
|
-
Minimatch: class Minimatch extends orig.Minimatch {
|
|
1209
|
-
constructor(pattern, options = {}) {
|
|
1210
|
-
super(pattern, ext(def, options));
|
|
1211
|
-
}
|
|
1212
|
-
static defaults(options) {
|
|
1213
|
-
return orig.defaults(ext(def, options)).Minimatch;
|
|
1214
|
-
}
|
|
1215
|
-
},
|
|
1216
|
-
AST: class AST extends orig.AST {
|
|
1217
|
-
/* c8 ignore start */
|
|
1218
|
-
constructor(type, parent, options = {}) {
|
|
1219
|
-
super(type, parent, ext(def, options));
|
|
1220
|
-
}
|
|
1221
|
-
/* c8 ignore stop */
|
|
1222
|
-
static fromGlob(pattern, options = {}) {
|
|
1223
|
-
return orig.AST.fromGlob(pattern, ext(def, options));
|
|
1224
|
-
}
|
|
1225
|
-
},
|
|
1226
|
-
unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
|
|
1227
|
-
escape: (s, options = {}) => orig.escape(s, ext(def, options)),
|
|
1228
|
-
filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
|
|
1229
|
-
defaults: (options) => orig.defaults(ext(def, options)),
|
|
1230
|
-
makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
|
|
1231
|
-
braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
|
|
1232
|
-
match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
|
|
1233
|
-
sep: orig.sep,
|
|
1234
|
-
GLOBSTAR
|
|
1235
|
-
});
|
|
1236
|
-
};
|
|
1237
|
-
minimatch.defaults = defaults;
|
|
1238
|
-
var braceExpand = (pattern, options = {}) => {
|
|
1239
|
-
assertValidPattern(pattern);
|
|
1240
|
-
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
|
|
1241
|
-
return [pattern];
|
|
1242
|
-
}
|
|
1243
|
-
return (0, import_brace_expansion.default)(pattern);
|
|
1244
|
-
};
|
|
1245
|
-
minimatch.braceExpand = braceExpand;
|
|
1246
|
-
var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
|
|
1247
|
-
minimatch.makeRe = makeRe;
|
|
1248
|
-
var match = (list, pattern, options = {}) => {
|
|
1249
|
-
const mm = new Minimatch(pattern, options);
|
|
1250
|
-
list = list.filter((f) => mm.match(f));
|
|
1251
|
-
if (mm.options.nonull && !list.length) {
|
|
1252
|
-
list.push(pattern);
|
|
1253
|
-
}
|
|
1254
|
-
return list;
|
|
1255
|
-
};
|
|
1256
|
-
minimatch.match = match;
|
|
1257
|
-
var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
|
|
1258
|
-
var regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
1259
|
-
var Minimatch = class {
|
|
1260
|
-
options;
|
|
1261
|
-
set;
|
|
1262
|
-
pattern;
|
|
1263
|
-
windowsPathsNoEscape;
|
|
1264
|
-
nonegate;
|
|
1265
|
-
negate;
|
|
1266
|
-
comment;
|
|
1267
|
-
empty;
|
|
1268
|
-
preserveMultipleSlashes;
|
|
1269
|
-
partial;
|
|
1270
|
-
globSet;
|
|
1271
|
-
globParts;
|
|
1272
|
-
nocase;
|
|
1273
|
-
isWindows;
|
|
1274
|
-
platform;
|
|
1275
|
-
windowsNoMagicRoot;
|
|
1276
|
-
regexp;
|
|
1277
|
-
constructor(pattern, options = {}) {
|
|
1278
|
-
assertValidPattern(pattern);
|
|
1279
|
-
options = options || {};
|
|
1280
|
-
this.options = options;
|
|
1281
|
-
this.pattern = pattern;
|
|
1282
|
-
this.platform = options.platform || defaultPlatform;
|
|
1283
|
-
this.isWindows = this.platform === "win32";
|
|
1284
|
-
this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
|
|
1285
|
-
if (this.windowsPathsNoEscape) {
|
|
1286
|
-
this.pattern = this.pattern.replace(/\\/g, "/");
|
|
1287
|
-
}
|
|
1288
|
-
this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
|
|
1289
|
-
this.regexp = null;
|
|
1290
|
-
this.negate = false;
|
|
1291
|
-
this.nonegate = !!options.nonegate;
|
|
1292
|
-
this.comment = false;
|
|
1293
|
-
this.empty = false;
|
|
1294
|
-
this.partial = !!options.partial;
|
|
1295
|
-
this.nocase = !!this.options.nocase;
|
|
1296
|
-
this.windowsNoMagicRoot = options.windowsNoMagicRoot !== void 0 ? options.windowsNoMagicRoot : !!(this.isWindows && this.nocase);
|
|
1297
|
-
this.globSet = [];
|
|
1298
|
-
this.globParts = [];
|
|
1299
|
-
this.set = [];
|
|
1300
|
-
this.make();
|
|
1301
|
-
}
|
|
1302
|
-
hasMagic() {
|
|
1303
|
-
if (this.options.magicalBraces && this.set.length > 1) {
|
|
1304
|
-
return true;
|
|
1305
|
-
}
|
|
1306
|
-
for (const pattern of this.set) {
|
|
1307
|
-
for (const part of pattern) {
|
|
1308
|
-
if (typeof part !== "string")
|
|
1309
|
-
return true;
|
|
1310
|
-
}
|
|
1311
|
-
}
|
|
1312
|
-
return false;
|
|
1313
|
-
}
|
|
1314
|
-
debug(..._) {
|
|
1315
|
-
}
|
|
1316
|
-
make() {
|
|
1317
|
-
const pattern = this.pattern;
|
|
1318
|
-
const options = this.options;
|
|
1319
|
-
if (!options.nocomment && pattern.charAt(0) === "#") {
|
|
1320
|
-
this.comment = true;
|
|
1321
|
-
return;
|
|
1322
|
-
}
|
|
1323
|
-
if (!pattern) {
|
|
1324
|
-
this.empty = true;
|
|
1325
|
-
return;
|
|
1326
|
-
}
|
|
1327
|
-
this.parseNegate();
|
|
1328
|
-
this.globSet = [...new Set(this.braceExpand())];
|
|
1329
|
-
if (options.debug) {
|
|
1330
|
-
this.debug = (...args) => console.error(...args);
|
|
1331
|
-
}
|
|
1332
|
-
this.debug(this.pattern, this.globSet);
|
|
1333
|
-
const rawGlobParts = this.globSet.map((s) => this.slashSplit(s));
|
|
1334
|
-
this.globParts = this.preprocess(rawGlobParts);
|
|
1335
|
-
this.debug(this.pattern, this.globParts);
|
|
1336
|
-
let set = this.globParts.map((s, _, __) => {
|
|
1337
|
-
if (this.isWindows && this.windowsNoMagicRoot) {
|
|
1338
|
-
const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]);
|
|
1339
|
-
const isDrive = /^[a-z]:/i.test(s[0]);
|
|
1340
|
-
if (isUNC) {
|
|
1341
|
-
return [...s.slice(0, 4), ...s.slice(4).map((ss) => this.parse(ss))];
|
|
1342
|
-
} else if (isDrive) {
|
|
1343
|
-
return [s[0], ...s.slice(1).map((ss) => this.parse(ss))];
|
|
1344
|
-
}
|
|
1345
|
-
}
|
|
1346
|
-
return s.map((ss) => this.parse(ss));
|
|
1347
|
-
});
|
|
1348
|
-
this.debug(this.pattern, set);
|
|
1349
|
-
this.set = set.filter((s) => s.indexOf(false) === -1);
|
|
1350
|
-
if (this.isWindows) {
|
|
1351
|
-
for (let i2 = 0; i2 < this.set.length; i2++) {
|
|
1352
|
-
const p = this.set[i2];
|
|
1353
|
-
if (p[0] === "" && p[1] === "" && this.globParts[i2][2] === "?" && typeof p[3] === "string" && /^[a-z]:$/i.test(p[3])) {
|
|
1354
|
-
p[2] = "?";
|
|
1355
|
-
}
|
|
1356
|
-
}
|
|
1357
|
-
}
|
|
1358
|
-
this.debug(this.pattern, this.set);
|
|
1359
|
-
}
|
|
1360
|
-
// various transforms to equivalent pattern sets that are
|
|
1361
|
-
// faster to process in a filesystem walk. The goal is to
|
|
1362
|
-
// eliminate what we can, and push all ** patterns as far
|
|
1363
|
-
// to the right as possible, even if it increases the number
|
|
1364
|
-
// of patterns that we have to process.
|
|
1365
|
-
preprocess(globParts) {
|
|
1366
|
-
if (this.options.noglobstar) {
|
|
1367
|
-
for (let i2 = 0; i2 < globParts.length; i2++) {
|
|
1368
|
-
for (let j = 0; j < globParts[i2].length; j++) {
|
|
1369
|
-
if (globParts[i2][j] === "**") {
|
|
1370
|
-
globParts[i2][j] = "*";
|
|
1371
|
-
}
|
|
1372
|
-
}
|
|
1373
|
-
}
|
|
1374
|
-
}
|
|
1375
|
-
const { optimizationLevel = 1 } = this.options;
|
|
1376
|
-
if (optimizationLevel >= 2) {
|
|
1377
|
-
globParts = this.firstPhasePreProcess(globParts);
|
|
1378
|
-
globParts = this.secondPhasePreProcess(globParts);
|
|
1379
|
-
} else if (optimizationLevel >= 1) {
|
|
1380
|
-
globParts = this.levelOneOptimize(globParts);
|
|
1381
|
-
} else {
|
|
1382
|
-
globParts = this.adjascentGlobstarOptimize(globParts);
|
|
1383
|
-
}
|
|
1384
|
-
return globParts;
|
|
1385
|
-
}
|
|
1386
|
-
// just get rid of adjascent ** portions
|
|
1387
|
-
adjascentGlobstarOptimize(globParts) {
|
|
1388
|
-
return globParts.map((parts) => {
|
|
1389
|
-
let gs = -1;
|
|
1390
|
-
while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
|
|
1391
|
-
let i2 = gs;
|
|
1392
|
-
while (parts[i2 + 1] === "**") {
|
|
1393
|
-
i2++;
|
|
1394
|
-
}
|
|
1395
|
-
if (i2 !== gs) {
|
|
1396
|
-
parts.splice(gs, i2 - gs);
|
|
1397
|
-
}
|
|
1398
|
-
}
|
|
1399
|
-
return parts;
|
|
1400
|
-
});
|
|
1401
|
-
}
|
|
1402
|
-
// get rid of adjascent ** and resolve .. portions
|
|
1403
|
-
levelOneOptimize(globParts) {
|
|
1404
|
-
return globParts.map((parts) => {
|
|
1405
|
-
parts = parts.reduce((set, part) => {
|
|
1406
|
-
const prev = set[set.length - 1];
|
|
1407
|
-
if (part === "**" && prev === "**") {
|
|
1408
|
-
return set;
|
|
1409
|
-
}
|
|
1410
|
-
if (part === "..") {
|
|
1411
|
-
if (prev && prev !== ".." && prev !== "." && prev !== "**") {
|
|
1412
|
-
set.pop();
|
|
1413
|
-
return set;
|
|
1414
|
-
}
|
|
1415
|
-
}
|
|
1416
|
-
set.push(part);
|
|
1417
|
-
return set;
|
|
1418
|
-
}, []);
|
|
1419
|
-
return parts.length === 0 ? [""] : parts;
|
|
1420
|
-
});
|
|
1421
|
-
}
|
|
1422
|
-
levelTwoFileOptimize(parts) {
|
|
1423
|
-
if (!Array.isArray(parts)) {
|
|
1424
|
-
parts = this.slashSplit(parts);
|
|
1425
|
-
}
|
|
1426
|
-
let didSomething = false;
|
|
1427
|
-
do {
|
|
1428
|
-
didSomething = false;
|
|
1429
|
-
if (!this.preserveMultipleSlashes) {
|
|
1430
|
-
for (let i2 = 1; i2 < parts.length - 1; i2++) {
|
|
1431
|
-
const p = parts[i2];
|
|
1432
|
-
if (i2 === 1 && p === "" && parts[0] === "")
|
|
1433
|
-
continue;
|
|
1434
|
-
if (p === "." || p === "") {
|
|
1435
|
-
didSomething = true;
|
|
1436
|
-
parts.splice(i2, 1);
|
|
1437
|
-
i2--;
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
|
|
1441
|
-
didSomething = true;
|
|
1442
|
-
parts.pop();
|
|
1443
|
-
}
|
|
1444
|
-
}
|
|
1445
|
-
let dd = 0;
|
|
1446
|
-
while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
|
|
1447
|
-
const p = parts[dd - 1];
|
|
1448
|
-
if (p && p !== "." && p !== ".." && p !== "**") {
|
|
1449
|
-
didSomething = true;
|
|
1450
|
-
parts.splice(dd - 1, 2);
|
|
1451
|
-
dd -= 2;
|
|
1452
|
-
}
|
|
1453
|
-
}
|
|
1454
|
-
} while (didSomething);
|
|
1455
|
-
return parts.length === 0 ? [""] : parts;
|
|
1456
|
-
}
|
|
1457
|
-
// First phase: single-pattern processing
|
|
1458
|
-
// <pre> is 1 or more portions
|
|
1459
|
-
// <rest> is 1 or more portions
|
|
1460
|
-
// <p> is any portion other than ., .., '', or **
|
|
1461
|
-
// <e> is . or ''
|
|
1462
|
-
//
|
|
1463
|
-
// **/.. is *brutal* for filesystem walking performance, because
|
|
1464
|
-
// it effectively resets the recursive walk each time it occurs,
|
|
1465
|
-
// and ** cannot be reduced out by a .. pattern part like a regexp
|
|
1466
|
-
// or most strings (other than .., ., and '') can be.
|
|
1467
|
-
//
|
|
1468
|
-
// <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}
|
|
1469
|
-
// <pre>/<e>/<rest> -> <pre>/<rest>
|
|
1470
|
-
// <pre>/<p>/../<rest> -> <pre>/<rest>
|
|
1471
|
-
// **/**/<rest> -> **/<rest>
|
|
1472
|
-
//
|
|
1473
|
-
// **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow
|
|
1474
|
-
// this WOULD be allowed if ** did follow symlinks, or * didn't
|
|
1475
|
-
firstPhasePreProcess(globParts) {
|
|
1476
|
-
let didSomething = false;
|
|
1477
|
-
do {
|
|
1478
|
-
didSomething = false;
|
|
1479
|
-
for (let parts of globParts) {
|
|
1480
|
-
let gs = -1;
|
|
1481
|
-
while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
|
|
1482
|
-
let gss = gs;
|
|
1483
|
-
while (parts[gss + 1] === "**") {
|
|
1484
|
-
gss++;
|
|
1485
|
-
}
|
|
1486
|
-
if (gss > gs) {
|
|
1487
|
-
parts.splice(gs + 1, gss - gs);
|
|
1488
|
-
}
|
|
1489
|
-
let next = parts[gs + 1];
|
|
1490
|
-
const p = parts[gs + 2];
|
|
1491
|
-
const p2 = parts[gs + 3];
|
|
1492
|
-
if (next !== "..")
|
|
1493
|
-
continue;
|
|
1494
|
-
if (!p || p === "." || p === ".." || !p2 || p2 === "." || p2 === "..") {
|
|
1495
|
-
continue;
|
|
1496
|
-
}
|
|
1497
|
-
didSomething = true;
|
|
1498
|
-
parts.splice(gs, 1);
|
|
1499
|
-
const other = parts.slice(0);
|
|
1500
|
-
other[gs] = "**";
|
|
1501
|
-
globParts.push(other);
|
|
1502
|
-
gs--;
|
|
1503
|
-
}
|
|
1504
|
-
if (!this.preserveMultipleSlashes) {
|
|
1505
|
-
for (let i2 = 1; i2 < parts.length - 1; i2++) {
|
|
1506
|
-
const p = parts[i2];
|
|
1507
|
-
if (i2 === 1 && p === "" && parts[0] === "")
|
|
1508
|
-
continue;
|
|
1509
|
-
if (p === "." || p === "") {
|
|
1510
|
-
didSomething = true;
|
|
1511
|
-
parts.splice(i2, 1);
|
|
1512
|
-
i2--;
|
|
1513
|
-
}
|
|
1514
|
-
}
|
|
1515
|
-
if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
|
|
1516
|
-
didSomething = true;
|
|
1517
|
-
parts.pop();
|
|
1518
|
-
}
|
|
1519
|
-
}
|
|
1520
|
-
let dd = 0;
|
|
1521
|
-
while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
|
|
1522
|
-
const p = parts[dd - 1];
|
|
1523
|
-
if (p && p !== "." && p !== ".." && p !== "**") {
|
|
1524
|
-
didSomething = true;
|
|
1525
|
-
const needDot = dd === 1 && parts[dd + 1] === "**";
|
|
1526
|
-
const splin = needDot ? ["."] : [];
|
|
1527
|
-
parts.splice(dd - 1, 2, ...splin);
|
|
1528
|
-
if (parts.length === 0)
|
|
1529
|
-
parts.push("");
|
|
1530
|
-
dd -= 2;
|
|
1531
|
-
}
|
|
1532
|
-
}
|
|
1533
|
-
}
|
|
1534
|
-
} while (didSomething);
|
|
1535
|
-
return globParts;
|
|
1536
|
-
}
|
|
1537
|
-
// second phase: multi-pattern dedupes
|
|
1538
|
-
// {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest>
|
|
1539
|
-
// {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest>
|
|
1540
|
-
// {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest>
|
|
1541
|
-
//
|
|
1542
|
-
// {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest>
|
|
1543
|
-
// ^-- not valid because ** doens't follow symlinks
|
|
1544
|
-
secondPhasePreProcess(globParts) {
|
|
1545
|
-
for (let i2 = 0; i2 < globParts.length - 1; i2++) {
|
|
1546
|
-
for (let j = i2 + 1; j < globParts.length; j++) {
|
|
1547
|
-
const matched = this.partsMatch(globParts[i2], globParts[j], !this.preserveMultipleSlashes);
|
|
1548
|
-
if (!matched)
|
|
1549
|
-
continue;
|
|
1550
|
-
globParts[i2] = matched;
|
|
1551
|
-
globParts[j] = [];
|
|
1552
|
-
}
|
|
1553
|
-
}
|
|
1554
|
-
return globParts.filter((gs) => gs.length);
|
|
1555
|
-
}
|
|
1556
|
-
partsMatch(a, b, emptyGSMatch = false) {
|
|
1557
|
-
let ai = 0;
|
|
1558
|
-
let bi = 0;
|
|
1559
|
-
let result = [];
|
|
1560
|
-
let which = "";
|
|
1561
|
-
while (ai < a.length && bi < b.length) {
|
|
1562
|
-
if (a[ai] === b[bi]) {
|
|
1563
|
-
result.push(which === "b" ? b[bi] : a[ai]);
|
|
1564
|
-
ai++;
|
|
1565
|
-
bi++;
|
|
1566
|
-
} else if (emptyGSMatch && a[ai] === "**" && b[bi] === a[ai + 1]) {
|
|
1567
|
-
result.push(a[ai]);
|
|
1568
|
-
ai++;
|
|
1569
|
-
} else if (emptyGSMatch && b[bi] === "**" && a[ai] === b[bi + 1]) {
|
|
1570
|
-
result.push(b[bi]);
|
|
1571
|
-
bi++;
|
|
1572
|
-
} else if (a[ai] === "*" && b[bi] && (this.options.dot || !b[bi].startsWith(".")) && b[bi] !== "**") {
|
|
1573
|
-
if (which === "b")
|
|
1574
|
-
return false;
|
|
1575
|
-
which = "a";
|
|
1576
|
-
result.push(a[ai]);
|
|
1577
|
-
ai++;
|
|
1578
|
-
bi++;
|
|
1579
|
-
} else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
|
|
1580
|
-
if (which === "a")
|
|
1581
|
-
return false;
|
|
1582
|
-
which = "b";
|
|
1583
|
-
result.push(b[bi]);
|
|
1584
|
-
ai++;
|
|
1585
|
-
bi++;
|
|
1586
|
-
} else {
|
|
1587
|
-
return false;
|
|
1588
|
-
}
|
|
1589
|
-
}
|
|
1590
|
-
return a.length === b.length && result;
|
|
1591
|
-
}
|
|
1592
|
-
parseNegate() {
|
|
1593
|
-
if (this.nonegate)
|
|
1594
|
-
return;
|
|
1595
|
-
const pattern = this.pattern;
|
|
1596
|
-
let negate = false;
|
|
1597
|
-
let negateOffset = 0;
|
|
1598
|
-
for (let i2 = 0; i2 < pattern.length && pattern.charAt(i2) === "!"; i2++) {
|
|
1599
|
-
negate = !negate;
|
|
1600
|
-
negateOffset++;
|
|
1601
|
-
}
|
|
1602
|
-
if (negateOffset)
|
|
1603
|
-
this.pattern = pattern.slice(negateOffset);
|
|
1604
|
-
this.negate = negate;
|
|
1605
|
-
}
|
|
1606
|
-
// set partial to true to test if, for example,
|
|
1607
|
-
// "/a/b" matches the start of "/*/b/*/d"
|
|
1608
|
-
// Partial means, if you run out of file before you run
|
|
1609
|
-
// out of pattern, then that's fine, as long as all
|
|
1610
|
-
// the parts match.
|
|
1611
|
-
matchOne(file, pattern, partial = false) {
|
|
1612
|
-
const options = this.options;
|
|
1613
|
-
if (this.isWindows) {
|
|
1614
|
-
const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
|
|
1615
|
-
const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
|
|
1616
|
-
const patternDrive = typeof pattern[0] === "string" && /^[a-z]:$/i.test(pattern[0]);
|
|
1617
|
-
const patternUNC = !patternDrive && pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
|
|
1618
|
-
const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
|
|
1619
|
-
const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
|
|
1620
|
-
if (typeof fdi === "number" && typeof pdi === "number") {
|
|
1621
|
-
const [fd, pd] = [file[fdi], pattern[pdi]];
|
|
1622
|
-
if (fd.toLowerCase() === pd.toLowerCase()) {
|
|
1623
|
-
pattern[pdi] = fd;
|
|
1624
|
-
if (pdi > fdi) {
|
|
1625
|
-
pattern = pattern.slice(pdi);
|
|
1626
|
-
} else if (fdi > pdi) {
|
|
1627
|
-
file = file.slice(fdi);
|
|
1628
|
-
}
|
|
1629
|
-
}
|
|
1630
|
-
}
|
|
1631
|
-
}
|
|
1632
|
-
const { optimizationLevel = 1 } = this.options;
|
|
1633
|
-
if (optimizationLevel >= 2) {
|
|
1634
|
-
file = this.levelTwoFileOptimize(file);
|
|
1635
|
-
}
|
|
1636
|
-
this.debug("matchOne", this, { file, pattern });
|
|
1637
|
-
this.debug("matchOne", file.length, pattern.length);
|
|
1638
|
-
for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
1639
|
-
this.debug("matchOne loop");
|
|
1640
|
-
var p = pattern[pi];
|
|
1641
|
-
var f = file[fi];
|
|
1642
|
-
this.debug(pattern, p, f);
|
|
1643
|
-
if (p === false) {
|
|
1644
|
-
return false;
|
|
1645
|
-
}
|
|
1646
|
-
if (p === GLOBSTAR) {
|
|
1647
|
-
this.debug("GLOBSTAR", [pattern, p, f]);
|
|
1648
|
-
var fr = fi;
|
|
1649
|
-
var pr = pi + 1;
|
|
1650
|
-
if (pr === pl) {
|
|
1651
|
-
this.debug("** at the end");
|
|
1652
|
-
for (; fi < fl; fi++) {
|
|
1653
|
-
if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
|
|
1654
|
-
return false;
|
|
1655
|
-
}
|
|
1656
|
-
return true;
|
|
1657
|
-
}
|
|
1658
|
-
while (fr < fl) {
|
|
1659
|
-
var swallowee = file[fr];
|
|
1660
|
-
this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
|
|
1661
|
-
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
|
|
1662
|
-
this.debug("globstar found match!", fr, fl, swallowee);
|
|
1663
|
-
return true;
|
|
1664
|
-
} else {
|
|
1665
|
-
if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
|
|
1666
|
-
this.debug("dot detected!", file, fr, pattern, pr);
|
|
1667
|
-
break;
|
|
1668
|
-
}
|
|
1669
|
-
this.debug("globstar swallow a segment, and continue");
|
|
1670
|
-
fr++;
|
|
1671
|
-
}
|
|
1672
|
-
}
|
|
1673
|
-
if (partial) {
|
|
1674
|
-
this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
|
|
1675
|
-
if (fr === fl) {
|
|
1676
|
-
return true;
|
|
1677
|
-
}
|
|
1678
|
-
}
|
|
1679
|
-
return false;
|
|
1680
|
-
}
|
|
1681
|
-
let hit;
|
|
1682
|
-
if (typeof p === "string") {
|
|
1683
|
-
hit = f === p;
|
|
1684
|
-
this.debug("string match", p, f, hit);
|
|
1685
|
-
} else {
|
|
1686
|
-
hit = p.test(f);
|
|
1687
|
-
this.debug("pattern match", p, f, hit);
|
|
1688
|
-
}
|
|
1689
|
-
if (!hit)
|
|
1690
|
-
return false;
|
|
1691
|
-
}
|
|
1692
|
-
if (fi === fl && pi === pl) {
|
|
1693
|
-
return true;
|
|
1694
|
-
} else if (fi === fl) {
|
|
1695
|
-
return partial;
|
|
1696
|
-
} else if (pi === pl) {
|
|
1697
|
-
return fi === fl - 1 && file[fi] === "";
|
|
1698
|
-
} else {
|
|
1699
|
-
throw new Error("wtf?");
|
|
1700
|
-
}
|
|
1701
|
-
}
|
|
1702
|
-
braceExpand() {
|
|
1703
|
-
return braceExpand(this.pattern, this.options);
|
|
1704
|
-
}
|
|
1705
|
-
parse(pattern) {
|
|
1706
|
-
assertValidPattern(pattern);
|
|
1707
|
-
const options = this.options;
|
|
1708
|
-
if (pattern === "**")
|
|
1709
|
-
return GLOBSTAR;
|
|
1710
|
-
if (pattern === "")
|
|
1711
|
-
return "";
|
|
1712
|
-
let m;
|
|
1713
|
-
let fastTest = null;
|
|
1714
|
-
if (m = pattern.match(starRE)) {
|
|
1715
|
-
fastTest = options.dot ? starTestDot : starTest;
|
|
1716
|
-
} else if (m = pattern.match(starDotExtRE)) {
|
|
1717
|
-
fastTest = (options.nocase ? options.dot ? starDotExtTestNocaseDot : starDotExtTestNocase : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]);
|
|
1718
|
-
} else if (m = pattern.match(qmarksRE)) {
|
|
1719
|
-
fastTest = (options.nocase ? options.dot ? qmarksTestNocaseDot : qmarksTestNocase : options.dot ? qmarksTestDot : qmarksTest)(m);
|
|
1720
|
-
} else if (m = pattern.match(starDotStarRE)) {
|
|
1721
|
-
fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
|
|
1722
|
-
} else if (m = pattern.match(dotStarRE)) {
|
|
1723
|
-
fastTest = dotStarTest;
|
|
1724
|
-
}
|
|
1725
|
-
const re = AST.fromGlob(pattern, this.options).toMMPattern();
|
|
1726
|
-
if (fastTest && typeof re === "object") {
|
|
1727
|
-
Reflect.defineProperty(re, "test", { value: fastTest });
|
|
1728
|
-
}
|
|
1729
|
-
return re;
|
|
1730
|
-
}
|
|
1731
|
-
makeRe() {
|
|
1732
|
-
if (this.regexp || this.regexp === false)
|
|
1733
|
-
return this.regexp;
|
|
1734
|
-
const set = this.set;
|
|
1735
|
-
if (!set.length) {
|
|
1736
|
-
this.regexp = false;
|
|
1737
|
-
return this.regexp;
|
|
1738
|
-
}
|
|
1739
|
-
const options = this.options;
|
|
1740
|
-
const twoStar = options.noglobstar ? star2 : options.dot ? twoStarDot : twoStarNoDot;
|
|
1741
|
-
const flags = new Set(options.nocase ? ["i"] : []);
|
|
1742
|
-
let re = set.map((pattern) => {
|
|
1743
|
-
const pp = pattern.map((p) => {
|
|
1744
|
-
if (p instanceof RegExp) {
|
|
1745
|
-
for (const f of p.flags.split(""))
|
|
1746
|
-
flags.add(f);
|
|
1747
|
-
}
|
|
1748
|
-
return typeof p === "string" ? regExpEscape2(p) : p === GLOBSTAR ? GLOBSTAR : p._src;
|
|
1749
|
-
});
|
|
1750
|
-
pp.forEach((p, i2) => {
|
|
1751
|
-
const next = pp[i2 + 1];
|
|
1752
|
-
const prev = pp[i2 - 1];
|
|
1753
|
-
if (p !== GLOBSTAR || prev === GLOBSTAR) {
|
|
1754
|
-
return;
|
|
1755
|
-
}
|
|
1756
|
-
if (prev === void 0) {
|
|
1757
|
-
if (next !== void 0 && next !== GLOBSTAR) {
|
|
1758
|
-
pp[i2 + 1] = "(?:\\/|" + twoStar + "\\/)?" + next;
|
|
1759
|
-
} else {
|
|
1760
|
-
pp[i2] = twoStar;
|
|
1761
|
-
}
|
|
1762
|
-
} else if (next === void 0) {
|
|
1763
|
-
pp[i2 - 1] = prev + "(?:\\/|" + twoStar + ")?";
|
|
1764
|
-
} else if (next !== GLOBSTAR) {
|
|
1765
|
-
pp[i2 - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
|
|
1766
|
-
pp[i2 + 1] = GLOBSTAR;
|
|
1767
|
-
}
|
|
1768
|
-
});
|
|
1769
|
-
return pp.filter((p) => p !== GLOBSTAR).join("/");
|
|
1770
|
-
}).join("|");
|
|
1771
|
-
const [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
|
|
1772
|
-
re = "^" + open + re + close + "$";
|
|
1773
|
-
if (this.negate)
|
|
1774
|
-
re = "^(?!" + re + ").+$";
|
|
1775
|
-
try {
|
|
1776
|
-
this.regexp = new RegExp(re, [...flags].join(""));
|
|
1777
|
-
} catch (ex) {
|
|
1778
|
-
this.regexp = false;
|
|
1779
|
-
}
|
|
1780
|
-
return this.regexp;
|
|
1781
|
-
}
|
|
1782
|
-
slashSplit(p) {
|
|
1783
|
-
if (this.preserveMultipleSlashes) {
|
|
1784
|
-
return p.split("/");
|
|
1785
|
-
} else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
|
|
1786
|
-
return ["", ...p.split(/\/+/)];
|
|
1787
|
-
} else {
|
|
1788
|
-
return p.split(/\/+/);
|
|
1789
|
-
}
|
|
1790
|
-
}
|
|
1791
|
-
match(f, partial = this.partial) {
|
|
1792
|
-
this.debug("match", f, this.pattern);
|
|
1793
|
-
if (this.comment) {
|
|
1794
|
-
return false;
|
|
1795
|
-
}
|
|
1796
|
-
if (this.empty) {
|
|
1797
|
-
return f === "";
|
|
1798
|
-
}
|
|
1799
|
-
if (f === "/" && partial) {
|
|
1800
|
-
return true;
|
|
1801
|
-
}
|
|
1802
|
-
const options = this.options;
|
|
1803
|
-
if (this.isWindows) {
|
|
1804
|
-
f = f.split("\\").join("/");
|
|
1805
|
-
}
|
|
1806
|
-
const ff = this.slashSplit(f);
|
|
1807
|
-
this.debug(this.pattern, "split", ff);
|
|
1808
|
-
const set = this.set;
|
|
1809
|
-
this.debug(this.pattern, "set", set);
|
|
1810
|
-
let filename = ff[ff.length - 1];
|
|
1811
|
-
if (!filename) {
|
|
1812
|
-
for (let i2 = ff.length - 2; !filename && i2 >= 0; i2--) {
|
|
1813
|
-
filename = ff[i2];
|
|
1814
|
-
}
|
|
1815
|
-
}
|
|
1816
|
-
for (let i2 = 0; i2 < set.length; i2++) {
|
|
1817
|
-
const pattern = set[i2];
|
|
1818
|
-
let file = ff;
|
|
1819
|
-
if (options.matchBase && pattern.length === 1) {
|
|
1820
|
-
file = [filename];
|
|
1821
|
-
}
|
|
1822
|
-
const hit = this.matchOne(file, pattern, partial);
|
|
1823
|
-
if (hit) {
|
|
1824
|
-
if (options.flipNegate) {
|
|
1825
|
-
return true;
|
|
1826
|
-
}
|
|
1827
|
-
return !this.negate;
|
|
1828
|
-
}
|
|
1829
|
-
}
|
|
1830
|
-
if (options.flipNegate) {
|
|
1831
|
-
return false;
|
|
1832
|
-
}
|
|
1833
|
-
return this.negate;
|
|
1834
|
-
}
|
|
1835
|
-
static defaults(def) {
|
|
1836
|
-
return minimatch.defaults(def).Minimatch;
|
|
1837
|
-
}
|
|
1838
|
-
};
|
|
1839
|
-
minimatch.AST = AST;
|
|
1840
|
-
minimatch.Minimatch = Minimatch;
|
|
1841
|
-
minimatch.escape = escape;
|
|
1842
|
-
minimatch.unescape = unescape;
|
|
1843
|
-
|
|
1844
|
-
// src/utils/query-nonce-meta-tag-content.ts
|
|
1845
|
-
function queryNonceMetaTagContent(doc) {
|
|
1846
|
-
var _a, _b, _c;
|
|
1847
|
-
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;
|
|
1848
|
-
}
|
|
1849
|
-
|
|
1850
|
-
// src/utils/regular-expression.ts
|
|
1851
|
-
var escapeRegExpSpecialCharacters = (text) => {
|
|
1852
|
-
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1853
|
-
};
|
|
1854
|
-
|
|
1855
|
-
// src/utils/result.ts
|
|
1856
|
-
var result_exports = {};
|
|
1857
|
-
__export(result_exports, {
|
|
1858
|
-
err: () => err,
|
|
1859
|
-
map: () => map,
|
|
1860
|
-
ok: () => ok,
|
|
1861
|
-
unwrap: () => unwrap,
|
|
1862
|
-
unwrapErr: () => unwrapErr
|
|
1863
|
-
});
|
|
1864
|
-
var ok = (value) => ({
|
|
1865
|
-
isOk: true,
|
|
1866
|
-
isErr: false,
|
|
1867
|
-
value
|
|
1868
|
-
});
|
|
1869
|
-
var err = (value) => ({
|
|
1870
|
-
isOk: false,
|
|
1871
|
-
isErr: true,
|
|
1872
|
-
value
|
|
1873
|
-
});
|
|
1874
|
-
function map(result, fn) {
|
|
1875
|
-
if (result.isOk) {
|
|
1876
|
-
const val = fn(result.value);
|
|
1877
|
-
if (val instanceof Promise) {
|
|
1878
|
-
return val.then((newVal) => ok(newVal));
|
|
1879
|
-
} else {
|
|
1880
|
-
return ok(val);
|
|
1881
|
-
}
|
|
1882
|
-
}
|
|
1883
|
-
if (result.isErr) {
|
|
1884
|
-
const value = result.value;
|
|
1885
|
-
return err(value);
|
|
1886
|
-
}
|
|
1887
|
-
throw "should never get here";
|
|
1888
|
-
}
|
|
1889
|
-
var unwrap = (result) => {
|
|
1890
|
-
if (result.isOk) {
|
|
1891
|
-
return result.value;
|
|
1892
|
-
} else {
|
|
1893
|
-
throw result.value;
|
|
1894
|
-
}
|
|
1895
|
-
};
|
|
1896
|
-
var unwrapErr = (result) => {
|
|
1897
|
-
if (result.isErr) {
|
|
1898
|
-
return result.value;
|
|
1899
|
-
} else {
|
|
1900
|
-
throw result.value;
|
|
1901
|
-
}
|
|
1902
|
-
};
|
|
1903
|
-
|
|
1904
252
|
// src/utils/style.ts
|
|
1905
253
|
function createStyleSheetIfNeededAndSupported(styles2) {
|
|
1906
254
|
if (!supportsConstructableStylesheets) return void 0;
|
|
@@ -1965,8 +313,9 @@ function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
|
1965
313
|
let childNode;
|
|
1966
314
|
for (; i2 < childNodes.length; i2++) {
|
|
1967
315
|
childNode = childNodes[i2];
|
|
1968
|
-
if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0)) {
|
|
316
|
+
if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0 || getSlotName(childNode) === slotName)) {
|
|
1969
317
|
slottedNodes.push(childNode);
|
|
318
|
+
if (typeof slotName !== "undefined") return slottedNodes;
|
|
1970
319
|
}
|
|
1971
320
|
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
1972
321
|
}
|
|
@@ -2024,6 +373,18 @@ function patchSlotNode(node) {
|
|
|
2024
373
|
node.assignedElements = assignedFactory(true);
|
|
2025
374
|
node.assignedNodes = assignedFactory(false);
|
|
2026
375
|
}
|
|
376
|
+
function dispatchSlotChangeEvent(elm) {
|
|
377
|
+
elm.dispatchEvent(new CustomEvent("slotchange", { bubbles: false, cancelable: false, composed: false }));
|
|
378
|
+
}
|
|
379
|
+
function findSlotFromSlottedNode(slottedNode, parentHost) {
|
|
380
|
+
var _a;
|
|
381
|
+
parentHost = parentHost || ((_a = slottedNode["s-ol"]) == null ? void 0 : _a.parentElement);
|
|
382
|
+
if (!parentHost) return { slotNode: null, slotName: "" };
|
|
383
|
+
const slotName = slottedNode["s-sn"] = getSlotName(slottedNode) || "";
|
|
384
|
+
const childNodes = internalCall(parentHost, "childNodes");
|
|
385
|
+
const slotNode = getHostSlotNodes(childNodes, parentHost.tagName, slotName)[0];
|
|
386
|
+
return { slotNode, slotName };
|
|
387
|
+
}
|
|
2027
388
|
function internalCall(node, method) {
|
|
2028
389
|
if ("__" + method in node) {
|
|
2029
390
|
const toReturn = node["__" + method];
|
|
@@ -2048,6 +409,14 @@ var uniqueTime = (key, measureText) => {
|
|
|
2048
409
|
};
|
|
2049
410
|
}
|
|
2050
411
|
};
|
|
412
|
+
|
|
413
|
+
// src/utils/query-nonce-meta-tag-content.ts
|
|
414
|
+
function queryNonceMetaTagContent(doc) {
|
|
415
|
+
var _a, _b, _c;
|
|
416
|
+
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;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
// src/runtime/styles.ts
|
|
2051
420
|
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
2052
421
|
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
2053
422
|
let style = styles.get(scopeId2);
|
|
@@ -2081,7 +450,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2081
450
|
}
|
|
2082
451
|
if (!appliedStyles.has(scopeId2)) {
|
|
2083
452
|
styleElm = win.document.createElement("style");
|
|
2084
|
-
styleElm.
|
|
453
|
+
styleElm.textContent = style;
|
|
2085
454
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
2086
455
|
if (nonce != null) {
|
|
2087
456
|
styleElm.setAttribute("nonce", nonce);
|
|
@@ -2106,8 +475,8 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2106
475
|
}
|
|
2107
476
|
} else {
|
|
2108
477
|
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
2109
|
-
if (existingStyleContainer) {
|
|
2110
|
-
existingStyleContainer.
|
|
478
|
+
if (existingStyleContainer && true) {
|
|
479
|
+
existingStyleContainer.textContent = style + existingStyleContainer.textContent;
|
|
2111
480
|
} else {
|
|
2112
481
|
styleContainerNode.prepend(styleElm);
|
|
2113
482
|
}
|
|
@@ -2120,7 +489,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2120
489
|
styleContainerNode.insertBefore(styleElm, null);
|
|
2121
490
|
}
|
|
2122
491
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
2123
|
-
styleElm.
|
|
492
|
+
styleElm.textContent += SLOT_FB_CSS;
|
|
2124
493
|
}
|
|
2125
494
|
if (appliedStyles) {
|
|
2126
495
|
appliedStyles.add(scopeId2);
|
|
@@ -2168,6 +537,15 @@ var attachStyles = (hostRef) => {
|
|
|
2168
537
|
endAttachStyles();
|
|
2169
538
|
};
|
|
2170
539
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
540
|
+
|
|
541
|
+
// src/utils/helpers.ts
|
|
542
|
+
var isDef = (v) => v != null && v !== void 0;
|
|
543
|
+
var isComplexType = (o) => {
|
|
544
|
+
o = typeof o;
|
|
545
|
+
return o === "object" || o === "function";
|
|
546
|
+
};
|
|
547
|
+
|
|
548
|
+
// src/runtime/vdom/h.ts
|
|
2171
549
|
var h = (nodeName, vnodeData, ...children) => {
|
|
2172
550
|
if (typeof nodeName === "string") {
|
|
2173
551
|
nodeName = transformTag(nodeName);
|
|
@@ -2235,7 +613,8 @@ var newVNode = (tag, text) => {
|
|
|
2235
613
|
const vnode = {
|
|
2236
614
|
$flags$: 0,
|
|
2237
615
|
$tag$: tag,
|
|
2238
|
-
|
|
616
|
+
// Normalize undefined to null to prevent rendering "undefined" as text
|
|
617
|
+
$text$: text != null ? text : null,
|
|
2239
618
|
$elm$: null,
|
|
2240
619
|
$children$: null
|
|
2241
620
|
};
|
|
@@ -2282,18 +661,33 @@ var convertToPrivate = (node) => {
|
|
|
2282
661
|
vnode.$name$ = node.vname;
|
|
2283
662
|
return vnode;
|
|
2284
663
|
};
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
)
|
|
664
|
+
|
|
665
|
+
// src/runtime/normalize-watchers.ts
|
|
666
|
+
var normalizeWatchers = (raw) => {
|
|
667
|
+
if (!raw) return void 0;
|
|
668
|
+
const keys = Object.keys(raw);
|
|
669
|
+
if (keys.length === 0) return void 0;
|
|
670
|
+
let hasLegacy = false;
|
|
671
|
+
for (const propName of keys) {
|
|
672
|
+
if (hasLegacy) break;
|
|
673
|
+
for (const h2 of raw[propName]) {
|
|
674
|
+
if (typeof h2 === "string") {
|
|
675
|
+
hasLegacy = true;
|
|
676
|
+
break;
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
if (!hasLegacy) return raw;
|
|
681
|
+
const out = {};
|
|
682
|
+
for (const propName of keys) {
|
|
683
|
+
out[propName] = raw[propName].map(
|
|
684
|
+
(h2) => typeof h2 === "string" ? { [h2]: 0 } : h2
|
|
685
|
+
);
|
|
686
|
+
}
|
|
687
|
+
return out;
|
|
2293
688
|
};
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
createSupportsRuleRe(":host-context");
|
|
689
|
+
|
|
690
|
+
// src/runtime/parse-property-value.ts
|
|
2297
691
|
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
2298
692
|
if (propValue != null && !isComplexType(propValue)) {
|
|
2299
693
|
if (propType & 4 /* Boolean */) {
|
|
@@ -2372,7 +766,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2372
766
|
}
|
|
2373
767
|
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
2374
768
|
if (newValue) {
|
|
2375
|
-
newValue
|
|
769
|
+
queueRefAttachment(newValue, elm);
|
|
2376
770
|
}
|
|
2377
771
|
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
2378
772
|
if (memberName[2] === "-") {
|
|
@@ -2392,15 +786,45 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2392
786
|
plt.ael(elm, memberName, newValue, capture);
|
|
2393
787
|
}
|
|
2394
788
|
}
|
|
789
|
+
} else if (memberName[0] === "a" && memberName.startsWith("attr:")) {
|
|
790
|
+
const propName = memberName.slice(5);
|
|
791
|
+
let attrName;
|
|
792
|
+
{
|
|
793
|
+
const hostRef = getHostRef(elm);
|
|
794
|
+
if (hostRef && hostRef.$cmpMeta$ && hostRef.$cmpMeta$.$members$) {
|
|
795
|
+
const memberMeta = hostRef.$cmpMeta$.$members$[propName];
|
|
796
|
+
if (memberMeta && memberMeta[1]) {
|
|
797
|
+
attrName = memberMeta[1];
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
if (!attrName) {
|
|
802
|
+
attrName = propName.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
803
|
+
}
|
|
804
|
+
if (newValue == null || newValue === false) {
|
|
805
|
+
if (newValue !== false || elm.getAttribute(attrName) === "") {
|
|
806
|
+
elm.removeAttribute(attrName);
|
|
807
|
+
}
|
|
808
|
+
} else {
|
|
809
|
+
elm.setAttribute(attrName, newValue === true ? "" : newValue);
|
|
810
|
+
}
|
|
811
|
+
return;
|
|
812
|
+
} else if (memberName[0] === "p" && memberName.startsWith("prop:")) {
|
|
813
|
+
const propName = memberName.slice(5);
|
|
814
|
+
try {
|
|
815
|
+
elm[propName] = newValue;
|
|
816
|
+
} catch (e) {
|
|
817
|
+
}
|
|
818
|
+
return;
|
|
2395
819
|
} else {
|
|
2396
820
|
const isComplex = isComplexType(newValue);
|
|
2397
|
-
if ((isProp || isComplex && newValue !== null) &&
|
|
821
|
+
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
2398
822
|
try {
|
|
2399
823
|
if (!elm.tagName.includes("-")) {
|
|
2400
824
|
const n = newValue == null ? "" : newValue;
|
|
2401
825
|
if (memberName === "list") {
|
|
2402
826
|
isProp = false;
|
|
2403
|
-
} else if (oldValue == null || elm[memberName]
|
|
827
|
+
} else if (oldValue == null || elm[memberName] !== n) {
|
|
2404
828
|
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
2405
829
|
elm[memberName] = n;
|
|
2406
830
|
} else {
|
|
@@ -2497,6 +921,8 @@ var useNativeShadowDom = false;
|
|
|
2497
921
|
var checkSlotFallbackVisibility = false;
|
|
2498
922
|
var checkSlotRelocate = false;
|
|
2499
923
|
var isSvgMode = false;
|
|
924
|
+
var refCallbacksToRemove = [];
|
|
925
|
+
var refCallbacksToAttach = [];
|
|
2500
926
|
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
2501
927
|
var _a;
|
|
2502
928
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
@@ -2519,7 +945,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2519
945
|
);
|
|
2520
946
|
}
|
|
2521
947
|
}
|
|
2522
|
-
if (newVNode2.$text$
|
|
948
|
+
if (newVNode2.$text$ != null) {
|
|
2523
949
|
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
2524
950
|
} else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
2525
951
|
elm = newVNode2.$elm$ = win.document.createTextNode("");
|
|
@@ -2528,9 +954,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2528
954
|
}
|
|
2529
955
|
} else {
|
|
2530
956
|
if (!win.document) {
|
|
2531
|
-
throw new Error(
|
|
2532
|
-
"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."
|
|
2533
|
-
);
|
|
957
|
+
throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");
|
|
2534
958
|
}
|
|
2535
959
|
elm = newVNode2.$elm$ = win.document.createElement(
|
|
2536
960
|
!useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
@@ -2561,9 +985,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2561
985
|
patchSlotNode(elm);
|
|
2562
986
|
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
2563
987
|
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
2564
|
-
|
|
2565
|
-
putBackInOriginalLocation(oldParentVNode.$elm$, false);
|
|
2566
|
-
}
|
|
988
|
+
relocateToHostRoot(oldParentVNode.$elm$);
|
|
2567
989
|
}
|
|
2568
990
|
{
|
|
2569
991
|
addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
|
|
@@ -2572,9 +994,37 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2572
994
|
}
|
|
2573
995
|
return elm;
|
|
2574
996
|
};
|
|
997
|
+
var relocateToHostRoot = (parentElm) => {
|
|
998
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
999
|
+
const host = parentElm.closest(hostTagName.toLowerCase());
|
|
1000
|
+
if (host != null) {
|
|
1001
|
+
const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
|
|
1002
|
+
(ref) => ref["s-cr"]
|
|
1003
|
+
);
|
|
1004
|
+
const childNodeArray = Array.from(
|
|
1005
|
+
parentElm.__childNodes || parentElm.childNodes
|
|
1006
|
+
);
|
|
1007
|
+
for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
|
|
1008
|
+
if (childNode["s-sh"] != null) {
|
|
1009
|
+
insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
|
|
1010
|
+
childNode["s-sh"] = void 0;
|
|
1011
|
+
checkSlotRelocate = true;
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
1016
|
+
};
|
|
2575
1017
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
2576
1018
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
2577
1019
|
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
1020
|
+
if (parentElm["s-sr"]) {
|
|
1021
|
+
let node = parentElm;
|
|
1022
|
+
while (node = node.nextSibling) {
|
|
1023
|
+
if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
|
|
1024
|
+
oldSlotChildNodes.push(node);
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
2578
1028
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
2579
1029
|
const childNode = oldSlotChildNodes[i2];
|
|
2580
1030
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
@@ -2744,10 +1194,17 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
2744
1194
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
2745
1195
|
const oldChildren = oldVNode.$children$;
|
|
2746
1196
|
const newChildren = newVNode2.$children$;
|
|
1197
|
+
const tag = newVNode2.$tag$;
|
|
2747
1198
|
const text = newVNode2.$text$;
|
|
2748
1199
|
let defaultHolder;
|
|
2749
|
-
if (text
|
|
1200
|
+
if (text == null) {
|
|
2750
1201
|
{
|
|
1202
|
+
if (tag === "slot" && !useNativeShadowDom) {
|
|
1203
|
+
if (oldVNode.$name$ !== newVNode2.$name$) {
|
|
1204
|
+
newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
|
|
1205
|
+
relocateToHostRoot(newVNode2.$elm$.parentElement);
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
2751
1208
|
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
2752
1209
|
}
|
|
2753
1210
|
if (oldChildren !== null && newChildren !== null) {
|
|
@@ -2781,7 +1238,7 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
2781
1238
|
const slotName = childNode["s-sn"];
|
|
2782
1239
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
2783
1240
|
node = hostContentNodes[j];
|
|
2784
|
-
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (
|
|
1241
|
+
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
|
|
2785
1242
|
if (isNodeLocatedInSlot(node, slotName)) {
|
|
2786
1243
|
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
2787
1244
|
checkSlotFallbackVisibility = true;
|
|
@@ -2821,15 +1278,39 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
2821
1278
|
};
|
|
2822
1279
|
var nullifyVNodeRefs = (vNode) => {
|
|
2823
1280
|
{
|
|
2824
|
-
vNode.$attrs$ && vNode.$attrs$.ref
|
|
1281
|
+
if (vNode.$attrs$ && vNode.$attrs$.ref) {
|
|
1282
|
+
refCallbacksToRemove.push(() => vNode.$attrs$.ref(null));
|
|
1283
|
+
}
|
|
2825
1284
|
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
2826
1285
|
}
|
|
2827
1286
|
};
|
|
2828
|
-
var
|
|
2829
|
-
|
|
2830
|
-
|
|
1287
|
+
var queueRefAttachment = (refCallback, elm) => {
|
|
1288
|
+
{
|
|
1289
|
+
refCallbacksToAttach.push(() => refCallback(elm));
|
|
2831
1290
|
}
|
|
1291
|
+
};
|
|
1292
|
+
var flushQueuedRefCallbacks = () => {
|
|
2832
1293
|
{
|
|
1294
|
+
refCallbacksToRemove.forEach((cb) => cb());
|
|
1295
|
+
refCallbacksToRemove.length = 0;
|
|
1296
|
+
refCallbacksToAttach.forEach((cb) => cb());
|
|
1297
|
+
refCallbacksToAttach.length = 0;
|
|
1298
|
+
}
|
|
1299
|
+
};
|
|
1300
|
+
var insertBefore = (parent, newNode, reference, isInitialLoad) => {
|
|
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.__insertBefore) {
|
|
1312
|
+
return parent.__insertBefore(newNode, reference);
|
|
1313
|
+
} else {
|
|
2833
1314
|
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
2834
1315
|
}
|
|
2835
1316
|
};
|
|
@@ -2855,7 +1336,7 @@ function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
|
|
|
2855
1336
|
}
|
|
2856
1337
|
}
|
|
2857
1338
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
2858
|
-
var _a, _b, _c, _d;
|
|
1339
|
+
var _a, _b, _c, _d, _e;
|
|
2859
1340
|
const hostElm = hostRef.$hostElement$;
|
|
2860
1341
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
2861
1342
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
@@ -2899,7 +1380,12 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2899
1380
|
if (!nodeToRelocate["s-ol"] && win.document) {
|
|
2900
1381
|
const orgLocationNode = win.document.createTextNode("");
|
|
2901
1382
|
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
2902
|
-
insertBefore(
|
|
1383
|
+
insertBefore(
|
|
1384
|
+
nodeToRelocate.parentNode,
|
|
1385
|
+
nodeToRelocate["s-ol"] = orgLocationNode,
|
|
1386
|
+
nodeToRelocate,
|
|
1387
|
+
isInitialLoad
|
|
1388
|
+
);
|
|
2903
1389
|
}
|
|
2904
1390
|
}
|
|
2905
1391
|
for (const relocateData of relocateNodes) {
|
|
@@ -2911,7 +1397,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2911
1397
|
if (slotRefNode) {
|
|
2912
1398
|
const parentNodeRef = slotRefNode.parentNode;
|
|
2913
1399
|
let insertBeforeNode = slotRefNode.nextSibling;
|
|
2914
|
-
{
|
|
1400
|
+
if (insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
|
|
2915
1401
|
let orgLocationNode = (_b = nodeToRelocate["s-ol"]) == null ? void 0 : _b.previousSibling;
|
|
2916
1402
|
while (orgLocationNode) {
|
|
2917
1403
|
let refNode = (_c = orgLocationNode["s-nr"]) != null ? _c : null;
|
|
@@ -2932,10 +1418,18 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2932
1418
|
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
2933
1419
|
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
2934
1420
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
2935
|
-
|
|
2936
|
-
|
|
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);
|
|
2937
1432
|
}
|
|
2938
|
-
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
2939
1433
|
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
2940
1434
|
nodeToRelocate.hidden = (_d = nodeToRelocate["s-ih"]) != null ? _d : false;
|
|
2941
1435
|
}
|
|
@@ -2953,7 +1447,26 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2953
1447
|
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
2954
1448
|
relocateNodes.length = 0;
|
|
2955
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
|
+
}
|
|
2956
1468
|
contentRef = void 0;
|
|
1469
|
+
flushQueuedRefCallbacks();
|
|
2957
1470
|
};
|
|
2958
1471
|
|
|
2959
1472
|
// src/runtime/update-component.ts
|
|
@@ -2999,6 +1512,10 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
2999
1512
|
let maybePromise;
|
|
3000
1513
|
if (isInitialLoad) {
|
|
3001
1514
|
{
|
|
1515
|
+
if (hostRef.$deferredConnectedCallback$) {
|
|
1516
|
+
hostRef.$deferredConnectedCallback$ = false;
|
|
1517
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
1518
|
+
}
|
|
3002
1519
|
{
|
|
3003
1520
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
3004
1521
|
if (hostRef.$queuedListeners$) {
|
|
@@ -3018,8 +1535,8 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
3018
1535
|
endSchedule();
|
|
3019
1536
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
3020
1537
|
};
|
|
3021
|
-
var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((
|
|
3022
|
-
console.error(
|
|
1538
|
+
var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err) => {
|
|
1539
|
+
console.error(err);
|
|
3023
1540
|
fn();
|
|
3024
1541
|
}) : fn();
|
|
3025
1542
|
var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
|
|
@@ -3047,7 +1564,7 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
3047
1564
|
if (childrenPromises.length === 0) {
|
|
3048
1565
|
postUpdate();
|
|
3049
1566
|
} else {
|
|
3050
|
-
Promise.all(childrenPromises).then(postUpdate);
|
|
1567
|
+
Promise.all(childrenPromises).then(postUpdate).catch(postUpdate);
|
|
3051
1568
|
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
3052
1569
|
childrenPromises.length = 0;
|
|
3053
1570
|
}
|
|
@@ -3185,13 +1702,16 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
3185
1702
|
});
|
|
3186
1703
|
}
|
|
3187
1704
|
}
|
|
3188
|
-
if (
|
|
1705
|
+
if (flags & 2 /* hasRendered */) {
|
|
3189
1706
|
if (instance.componentShouldUpdate) {
|
|
3190
|
-
|
|
1707
|
+
const shouldUpdate = instance.componentShouldUpdate(newVal, oldVal, propName);
|
|
1708
|
+
if (shouldUpdate === false && !(flags & 16 /* isQueuedForUpdate */)) {
|
|
3191
1709
|
return;
|
|
3192
1710
|
}
|
|
3193
1711
|
}
|
|
3194
|
-
|
|
1712
|
+
if (!(flags & 16 /* isQueuedForUpdate */)) {
|
|
1713
|
+
scheduleUpdate(hostRef, false);
|
|
1714
|
+
}
|
|
3195
1715
|
}
|
|
3196
1716
|
}
|
|
3197
1717
|
};
|
|
@@ -3203,7 +1723,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3203
1723
|
if (cmpMeta.$members$ || BUILD.propChangeCallback) {
|
|
3204
1724
|
{
|
|
3205
1725
|
if (Cstr.watchers && !cmpMeta.$watchers$) {
|
|
3206
|
-
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1726
|
+
cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
|
|
3207
1727
|
}
|
|
3208
1728
|
if (Cstr.deserializers && !cmpMeta.$deserializers$) {
|
|
3209
1729
|
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
@@ -3215,7 +1735,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3215
1735
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
3216
1736
|
members.map(([memberName, [memberFlags]]) => {
|
|
3217
1737
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
3218
|
-
const { get: origGetter, set: origSetter } =
|
|
1738
|
+
const { get: origGetter, set: origSetter } = getPropertyDescriptor(prototype, memberName) || {};
|
|
3219
1739
|
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
3220
1740
|
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
3221
1741
|
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
@@ -3329,11 +1849,13 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3329
1849
|
return;
|
|
3330
1850
|
}
|
|
3331
1851
|
const propFlags = members.find(([m]) => m === propName);
|
|
3332
|
-
|
|
1852
|
+
const isBooleanTarget = propFlags && propFlags[1][0] & 4 /* Boolean */;
|
|
1853
|
+
const isSpuriousBooleanRemoval = isBooleanTarget && newValue === null && this[propName] === void 0;
|
|
1854
|
+
if (isBooleanTarget) {
|
|
3333
1855
|
newValue = newValue === null || newValue === "false" ? false : true;
|
|
3334
1856
|
}
|
|
3335
1857
|
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
3336
|
-
if (newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1858
|
+
if (!isSpuriousBooleanRemoval && newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
3337
1859
|
this[propName] = newValue;
|
|
3338
1860
|
}
|
|
3339
1861
|
});
|
|
@@ -3360,71 +1882,87 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3360
1882
|
// src/runtime/initialize-component.ts
|
|
3361
1883
|
var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
3362
1884
|
let Cstr;
|
|
3363
|
-
|
|
3364
|
-
hostRef.$flags$
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
1885
|
+
try {
|
|
1886
|
+
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1887
|
+
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1888
|
+
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1889
|
+
if (bundleId) {
|
|
1890
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1891
|
+
if (CstrImport && "then" in CstrImport) {
|
|
1892
|
+
const endLoad = uniqueTime();
|
|
1893
|
+
Cstr = await CstrImport;
|
|
1894
|
+
endLoad();
|
|
1895
|
+
} else {
|
|
1896
|
+
Cstr = CstrImport;
|
|
1897
|
+
}
|
|
1898
|
+
if (!Cstr) {
|
|
1899
|
+
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
1900
|
+
}
|
|
1901
|
+
if (!Cstr.isProxied) {
|
|
1902
|
+
{
|
|
1903
|
+
cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
|
|
1904
|
+
cmpMeta.$serializers$ = Cstr.serializers;
|
|
1905
|
+
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
1906
|
+
}
|
|
1907
|
+
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
1908
|
+
Cstr.isProxied = true;
|
|
1909
|
+
}
|
|
1910
|
+
const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
|
|
3379
1911
|
{
|
|
3380
|
-
|
|
3381
|
-
cmpMeta.$serializers$ = Cstr.serializers;
|
|
3382
|
-
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
1912
|
+
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
3383
1913
|
}
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
1914
|
+
try {
|
|
1915
|
+
new Cstr(hostRef);
|
|
1916
|
+
} catch (e) {
|
|
1917
|
+
consoleError(e, elm);
|
|
1918
|
+
}
|
|
1919
|
+
{
|
|
1920
|
+
hostRef.$flags$ &= -9 /* isConstructingInstance */;
|
|
1921
|
+
}
|
|
1922
|
+
{
|
|
1923
|
+
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1924
|
+
}
|
|
1925
|
+
endNewInstance();
|
|
1926
|
+
const needsDeferredCallback = cmpMeta.$flags$ & 4 /* hasSlotRelocation */;
|
|
1927
|
+
if (!needsDeferredCallback) {
|
|
1928
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1929
|
+
} else {
|
|
1930
|
+
hostRef.$deferredConnectedCallback$ = true;
|
|
1931
|
+
}
|
|
1932
|
+
} else {
|
|
1933
|
+
Cstr = elm.constructor;
|
|
1934
|
+
const cmpTag = elm.localName;
|
|
1935
|
+
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
3398
1936
|
}
|
|
3399
|
-
{
|
|
3400
|
-
|
|
1937
|
+
if (Cstr && Cstr.style) {
|
|
1938
|
+
let style;
|
|
1939
|
+
if (typeof Cstr.style === "string") {
|
|
1940
|
+
style = Cstr.style;
|
|
1941
|
+
}
|
|
1942
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
1943
|
+
if (!styles.has(scopeId2) || BUILD.hotModuleReplacement) {
|
|
1944
|
+
const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
|
|
1945
|
+
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
1946
|
+
endRegisterStyles();
|
|
1947
|
+
}
|
|
3401
1948
|
}
|
|
3402
|
-
|
|
3403
|
-
|
|
1949
|
+
}
|
|
1950
|
+
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1951
|
+
const schedule = () => scheduleUpdate(hostRef, true);
|
|
1952
|
+
if (ancestorComponent && ancestorComponent["s-rc"]) {
|
|
1953
|
+
ancestorComponent["s-rc"].push(schedule);
|
|
3404
1954
|
} else {
|
|
3405
|
-
|
|
3406
|
-
const cmpTag = elm.localName;
|
|
3407
|
-
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1955
|
+
schedule();
|
|
3408
1956
|
}
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
3418
|
-
endRegisterStyles();
|
|
3419
|
-
}
|
|
1957
|
+
} catch (e) {
|
|
1958
|
+
consoleError(e, elm);
|
|
1959
|
+
if (hostRef.$onRenderResolve$) {
|
|
1960
|
+
hostRef.$onRenderResolve$();
|
|
1961
|
+
hostRef.$onRenderResolve$ = void 0;
|
|
1962
|
+
}
|
|
1963
|
+
if (hostRef.$onReadyResolve$) {
|
|
1964
|
+
hostRef.$onReadyResolve$(elm);
|
|
3420
1965
|
}
|
|
3421
|
-
}
|
|
3422
|
-
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
3423
|
-
const schedule = () => scheduleUpdate(hostRef, true);
|
|
3424
|
-
if (ancestorComponent && ancestorComponent["s-rc"]) {
|
|
3425
|
-
ancestorComponent["s-rc"].push(schedule);
|
|
3426
|
-
} else {
|
|
3427
|
-
schedule();
|
|
3428
1966
|
}
|
|
3429
1967
|
};
|
|
3430
1968
|
var fireConnectedCallback = (instance, elm) => {
|
|
@@ -3461,7 +1999,7 @@ var connectedCallback = (elm) => {
|
|
|
3461
1999
|
}
|
|
3462
2000
|
if (cmpMeta.$members$) {
|
|
3463
2001
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
3464
|
-
if (memberFlags & 31 /* Prop */ &&
|
|
2002
|
+
if (memberFlags & 31 /* Prop */ && Object.prototype.hasOwnProperty.call(elm, memberName)) {
|
|
3465
2003
|
const value = elm[memberName];
|
|
3466
2004
|
delete elm[memberName];
|
|
3467
2005
|
elm[memberName] = value;
|
|
@@ -3542,7 +2080,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3542
2080
|
let hasSlotRelocation = false;
|
|
3543
2081
|
lazyBundles.map((lazyBundle) => {
|
|
3544
2082
|
lazyBundle[1].map((compactMeta) => {
|
|
3545
|
-
var _a2, _b
|
|
2083
|
+
var _a2, _b;
|
|
3546
2084
|
const cmpMeta = {
|
|
3547
2085
|
$flags$: compactMeta[0],
|
|
3548
2086
|
$tagName$: compactMeta[1],
|
|
@@ -3562,16 +2100,18 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3562
2100
|
cmpMeta.$attrsToReflect$ = [];
|
|
3563
2101
|
}
|
|
3564
2102
|
{
|
|
3565
|
-
cmpMeta.$watchers$ = (
|
|
3566
|
-
cmpMeta.$serializers$ = (
|
|
3567
|
-
cmpMeta.$deserializers$ = (
|
|
2103
|
+
cmpMeta.$watchers$ = normalizeWatchers(compactMeta[4]);
|
|
2104
|
+
cmpMeta.$serializers$ = (_a2 = compactMeta[5]) != null ? _a2 : {};
|
|
2105
|
+
cmpMeta.$deserializers$ = (_b = compactMeta[6]) != null ? _b : {};
|
|
3568
2106
|
}
|
|
3569
2107
|
const tagName = transformTag(cmpMeta.$tagName$);
|
|
3570
2108
|
const HostElement = class extends HTMLElement {
|
|
2109
|
+
["s-p"];
|
|
2110
|
+
["s-rc"];
|
|
2111
|
+
hasRegisteredEventListeners = false;
|
|
3571
2112
|
// StencilLazyHost
|
|
3572
2113
|
constructor(self) {
|
|
3573
2114
|
super(self);
|
|
3574
|
-
this.hasRegisteredEventListeners = false;
|
|
3575
2115
|
self = this;
|
|
3576
2116
|
registerHost(self, cmpMeta);
|
|
3577
2117
|
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|