@mgdis/mg-components 6.22.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.
Files changed (125) hide show
  1. package/dist/cjs/{index-C2viYwrR.js → index-Dz2LAZQT.js} +325 -1789
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/{mg-action-more_37.cjs.entry.js → mg-action-more_36.cjs.entry.js} +109 -130
  4. package/dist/cjs/mg-alert.cjs.entry.js +2 -2
  5. package/dist/cjs/mg-breadcrumb.cjs.entry.js +2 -2
  6. package/dist/cjs/mg-components.cjs.js +3 -3
  7. package/dist/cjs/mg-fieldset.cjs.entry.js +2 -2
  8. package/dist/cjs/mg-input-combobox.cjs.entry.js +2 -2
  9. package/dist/cjs/mg-input-file.cjs.entry.js +3 -3
  10. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +2498 -2474
  11. package/dist/cjs/mg-loader.cjs.entry.js +2 -2
  12. package/dist/cjs/mg-progress.cjs.entry.js +2 -2
  13. package/dist/collection/collection-manifest.json +2 -2
  14. package/dist/collection/components/atoms/mg-badge/mg-badge.js +2 -1
  15. package/dist/collection/components/atoms/mg-button/mg-button.js +6 -3
  16. package/dist/collection/components/atoms/mg-card/mg-card.js +2 -1
  17. package/dist/collection/components/atoms/mg-icon/mg-icon.js +8 -4
  18. package/dist/collection/components/atoms/mg-tag/mg-tag.js +2 -1
  19. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +2 -1
  20. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +4 -2
  21. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.js +38 -0
  22. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +3 -2
  23. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +47 -26
  24. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +13 -7
  25. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +3 -2
  26. package/dist/collection/components/molecules/inputs/mg-input-file/mg-input-file.js +4 -3
  27. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +9 -5
  28. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +5 -3
  29. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +5 -3
  30. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +7 -4
  31. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +22 -8
  32. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +11 -6
  33. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +5 -3
  34. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +7 -4
  35. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +5 -3
  36. package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +5 -3
  37. package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +4 -2
  38. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +11 -7
  39. package/dist/collection/components/molecules/mg-alert/mg-alert.js +5 -3
  40. package/dist/collection/components/molecules/mg-breadcrumb/mg-breadcrumb.js +3 -2
  41. package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
  42. package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +3 -2
  43. package/dist/collection/components/molecules/mg-form/mg-form.js +5 -3
  44. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +5 -3
  45. package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
  46. package/dist/collection/components/molecules/mg-message/mg-message.js +6 -4
  47. package/dist/collection/components/molecules/mg-modal/mg-modal.js +4 -3
  48. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +2 -1
  49. package/dist/collection/components/molecules/mg-panel/mg-panel.js +5 -3
  50. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
  51. package/dist/collection/components/molecules/mg-popover/mg-popover.js +3 -2
  52. package/dist/collection/components/molecules/mg-progress/mg-progress.js +3 -2
  53. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +3 -2
  54. package/dist/collection/components/molecules/mg-table/mg-table.js +4 -2
  55. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +3 -2
  56. package/dist/components/index2.js +1 -1
  57. package/dist/components/mg-action-more.js +1 -1
  58. package/dist/components/mg-alert.js +1 -1
  59. package/dist/components/mg-breadcrumb.js +1 -1
  60. package/dist/components/mg-details.js +1 -1
  61. package/dist/components/mg-fieldset.js +1 -1
  62. package/dist/components/mg-form.js +1 -1
  63. package/dist/components/mg-illustrated-message.js +1 -1
  64. package/dist/components/mg-input-checkbox.js +1 -1
  65. package/dist/components/mg-input-combobox.js +1 -1
  66. package/dist/components/mg-input-date.js +1 -1
  67. package/dist/components/mg-input-file.js +1 -1
  68. package/dist/components/mg-input-numeric.js +1 -1
  69. package/dist/components/mg-input-password.js +1 -1
  70. package/dist/components/mg-input-radio.js +1 -1
  71. package/dist/components/mg-input-rich-text-editor.js +2 -2
  72. package/dist/components/mg-input-select2.js +1 -1
  73. package/dist/components/mg-input-text2.js +1 -1
  74. package/dist/components/mg-input-textarea.js +1 -1
  75. package/dist/components/mg-input-toggle.js +1 -1
  76. package/dist/components/mg-item-more2.js +1 -1
  77. package/dist/components/mg-loader2.js +1 -1
  78. package/dist/components/mg-message2.js +1 -1
  79. package/dist/components/mg-modal.js +1 -1
  80. package/dist/components/mg-panel.js +1 -1
  81. package/dist/components/mg-popover-content2.js +1 -1
  82. package/dist/components/mg-popover2.js +1 -1
  83. package/dist/components/mg-progress.js +1 -1
  84. package/dist/components/mg-skip-links.js +1 -1
  85. package/dist/components/mg-tabs2.js +1 -1
  86. package/dist/esm/{index-DFwaH2hS.js → index-C3jUhxdI.js} +325 -1789
  87. package/dist/esm/loader.js +3 -3
  88. package/dist/esm/{mg-action-more_37.entry.js → mg-action-more_36.entry.js} +111 -131
  89. package/dist/esm/mg-alert.entry.js +2 -2
  90. package/dist/esm/mg-breadcrumb.entry.js +2 -2
  91. package/dist/esm/mg-components.js +4 -4
  92. package/dist/esm/mg-fieldset.entry.js +2 -2
  93. package/dist/esm/mg-input-combobox.entry.js +2 -2
  94. package/dist/esm/mg-input-file.entry.js +3 -3
  95. package/dist/esm/mg-input-rich-text-editor.entry.js +2498 -2474
  96. package/dist/esm/mg-loader.entry.js +2 -2
  97. package/dist/esm/mg-progress.entry.js +2 -2
  98. package/dist/mg-components/mg-components.esm.js +1 -1
  99. package/dist/mg-components/{p-2ee92f38.entry.js → p-06fbdb2f.entry.js} +1 -1
  100. package/dist/mg-components/{p-3b653226.entry.js → p-188b9ca9.entry.js} +1 -1
  101. package/dist/mg-components/p-4667078d.entry.js +1 -0
  102. package/dist/mg-components/{p-c63f97f0.entry.js → p-5a859ecf.entry.js} +2 -2
  103. package/dist/mg-components/{p-d5e69c95.entry.js → p-661da56b.entry.js} +1 -1
  104. package/dist/mg-components/{p-adec7fcc.entry.js → p-8e256086.entry.js} +1 -1
  105. package/dist/mg-components/p-C3jUhxdI.js +2 -0
  106. package/dist/mg-components/{p-cc793586.entry.js → p-b0b8c58f.entry.js} +1 -1
  107. package/dist/mg-components/{p-5745fbea.entry.js → p-bbcef41c.entry.js} +1 -1
  108. package/dist/mg-components/{p-c8c8cfc1.entry.js → p-c1aeb277.entry.js} +1 -1
  109. package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.d.ts +2 -2
  110. package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.d.ts +8 -0
  111. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +16 -8
  112. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +15 -5
  113. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +1 -1
  114. package/dist/types/components.d.ts +525 -170
  115. package/dist/types/stencil-public-runtime.d.ts +52 -2
  116. package/ide/intellij/web-types.json +7 -7
  117. package/ide/vscode/html-custom-data.json +3 -3
  118. package/package.json +19 -19
  119. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +0 -245
  120. package/dist/components/mg-input-checkbox-paginated.d.ts +0 -11
  121. package/dist/components/mg-input-checkbox-paginated.js +0 -1
  122. package/dist/components/mg-input-checkbox-paginated2.js +0 -1
  123. package/dist/mg-components/p-0482eb9f.entry.js +0 -1
  124. package/dist/mg-components/p-DFwaH2hS.js +0 -2
  125. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +0 -77
@@ -25,254 +25,22 @@ const globalScripts = () => {};
25
25
  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}";
26
26
 
27
27
  /*
28
- Stencil Client Platform v4.40.1 | MIT Licensed | https://stenciljs.com
28
+ Stencil Client Platform v4.43.4 | MIT Licensed | https://stenciljs.com
29
29
  */
30
- var __create = Object.create;
31
- var __defProp = Object.defineProperty;
32
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
33
- var __getOwnPropNames = Object.getOwnPropertyNames;
34
- var __getProtoOf = Object.getPrototypeOf;
35
- var __hasOwnProp = Object.prototype.hasOwnProperty;
36
- var __typeError = (msg) => {
37
- throw TypeError(msg);
38
- };
39
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
40
- var __commonJS = (cb, mod) => function __require() {
41
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
42
- };
43
- var __export = (target, all) => {
44
- for (var name in all)
45
- __defProp(target, name, { get: all[name], enumerable: true });
46
- };
47
- var __copyProps = (to, from, except, desc) => {
48
- if (from && typeof from === "object" || typeof from === "function") {
49
- for (let key of __getOwnPropNames(from))
50
- if (!__hasOwnProp.call(to, key) && key !== except)
51
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
52
- }
53
- return to;
54
- };
55
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
56
- // If the importer is in node compatibility mode or this is not an ESM
57
- // file that has been converted to a CommonJS file using a Babel-
58
- // compatible transform (i.e. "__esModule" has not been set), then set
59
- // "default" to the CommonJS "module.exports" for node compatibility.
60
- __defProp(target, "default", { value: mod, enumerable: true }) ,
61
- mod
62
- ));
63
- var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
64
- var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
65
- var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
66
- 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);
67
- var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
68
- var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
69
30
 
70
- // node_modules/balanced-match/index.js
71
- var require_balanced_match = __commonJS({
72
- "node_modules/balanced-match/index.js"(exports, module) {
73
- module.exports = balanced;
74
- function balanced(a, b, str) {
75
- if (a instanceof RegExp) a = maybeMatch(a, str);
76
- if (b instanceof RegExp) b = maybeMatch(b, str);
77
- var r = range(a, b, str);
78
- return r && {
79
- start: r[0],
80
- end: r[1],
81
- pre: str.slice(0, r[0]),
82
- body: str.slice(r[0] + a.length, r[1]),
83
- post: str.slice(r[1] + b.length)
84
- };
85
- }
86
- function maybeMatch(reg, str) {
87
- var m = str.match(reg);
88
- return m ? m[0] : null;
89
- }
90
- balanced.range = range;
91
- function range(a, b, str) {
92
- var begs, beg, left, right, result;
93
- var ai = str.indexOf(a);
94
- var bi = str.indexOf(b, ai + 1);
95
- var i2 = ai;
96
- if (ai >= 0 && bi > 0) {
97
- if (a === b) {
98
- return [ai, bi];
99
- }
100
- begs = [];
101
- left = str.length;
102
- while (i2 >= 0 && !result) {
103
- if (i2 == ai) {
104
- begs.push(i2);
105
- ai = str.indexOf(a, i2 + 1);
106
- } else if (begs.length == 1) {
107
- result = [begs.pop(), bi];
108
- } else {
109
- beg = begs.pop();
110
- if (beg < left) {
111
- left = beg;
112
- right = bi;
113
- }
114
- bi = str.indexOf(b, i2 + 1);
115
- }
116
- i2 = ai < bi && ai >= 0 ? ai : bi;
117
- }
118
- if (begs.length) {
119
- result = [left, right];
120
- }
121
- }
122
- return result;
123
- }
124
- }
125
- });
126
31
 
127
- // node_modules/brace-expansion/index.js
128
- var require_brace_expansion = __commonJS({
129
- "node_modules/brace-expansion/index.js"(exports, module) {
130
- var balanced = require_balanced_match();
131
- module.exports = expandTop;
132
- var escSlash = "\0SLASH" + Math.random() + "\0";
133
- var escOpen = "\0OPEN" + Math.random() + "\0";
134
- var escClose = "\0CLOSE" + Math.random() + "\0";
135
- var escComma = "\0COMMA" + Math.random() + "\0";
136
- var escPeriod = "\0PERIOD" + Math.random() + "\0";
137
- function numeric(str) {
138
- return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
139
- }
140
- function escapeBraces(str) {
141
- return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
142
- }
143
- function unescapeBraces(str) {
144
- return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
145
- }
146
- function parseCommaParts(str) {
147
- if (!str)
148
- return [""];
149
- var parts = [];
150
- var m = balanced("{", "}", str);
151
- if (!m)
152
- return str.split(",");
153
- var pre = m.pre;
154
- var body = m.body;
155
- var post = m.post;
156
- var p = pre.split(",");
157
- p[p.length - 1] += "{" + body + "}";
158
- var postParts = parseCommaParts(post);
159
- if (post.length) {
160
- p[p.length - 1] += postParts.shift();
161
- p.push.apply(p, postParts);
162
- }
163
- parts.push.apply(parts, p);
164
- return parts;
165
- }
166
- function expandTop(str) {
167
- if (!str)
168
- return [];
169
- if (str.substr(0, 2) === "{}") {
170
- str = "\\{\\}" + str.substr(2);
171
- }
172
- return expand2(escapeBraces(str), true).map(unescapeBraces);
173
- }
174
- function embrace(str) {
175
- return "{" + str + "}";
176
- }
177
- function isPadded(el) {
178
- return /^-?0\d/.test(el);
179
- }
180
- function lte(i2, y) {
181
- return i2 <= y;
182
- }
183
- function gte(i2, y) {
184
- return i2 >= y;
185
- }
186
- function expand2(str, isTop) {
187
- var expansions = [];
188
- var m = balanced("{", "}", str);
189
- if (!m) return [str];
190
- var pre = m.pre;
191
- var post = m.post.length ? expand2(m.post, false) : [""];
192
- if (/\$$/.test(m.pre)) {
193
- for (var k = 0; k < post.length; k++) {
194
- var expansion = pre + "{" + m.body + "}" + post[k];
195
- expansions.push(expansion);
196
- }
197
- } else {
198
- var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
199
- var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
200
- var isSequence = isNumericSequence || isAlphaSequence;
201
- var isOptions = m.body.indexOf(",") >= 0;
202
- if (!isSequence && !isOptions) {
203
- if (m.post.match(/,(?!,).*\}/)) {
204
- str = m.pre + "{" + m.body + escClose + m.post;
205
- return expand2(str);
206
- }
207
- return [str];
208
- }
209
- var n;
210
- if (isSequence) {
211
- n = m.body.split(/\.\./);
212
- } else {
213
- n = parseCommaParts(m.body);
214
- if (n.length === 1) {
215
- n = expand2(n[0], false).map(embrace);
216
- if (n.length === 1) {
217
- return post.map(function(p) {
218
- return m.pre + n[0] + p;
219
- });
220
- }
221
- }
222
- }
223
- var N;
224
- if (isSequence) {
225
- var x = numeric(n[0]);
226
- var y = numeric(n[1]);
227
- var width = Math.max(n[0].length, n[1].length);
228
- var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
229
- var test = lte;
230
- var reverse = y < x;
231
- if (reverse) {
232
- incr *= -1;
233
- test = gte;
234
- }
235
- var pad = n.some(isPadded);
236
- N = [];
237
- for (var i2 = x; test(i2, y); i2 += incr) {
238
- var c;
239
- if (isAlphaSequence) {
240
- c = String.fromCharCode(i2);
241
- if (c === "\\")
242
- c = "";
243
- } else {
244
- c = String(i2);
245
- if (pad) {
246
- var need = width - c.length;
247
- if (need > 0) {
248
- var z = new Array(need + 1).join("0");
249
- if (i2 < 0)
250
- c = "-" + z + c.slice(1);
251
- else
252
- c = z + c;
253
- }
254
- }
255
- }
256
- N.push(c);
257
- }
258
- } else {
259
- N = [];
260
- for (var j = 0; j < n.length; j++) {
261
- N.push.apply(N, expand2(n[j], false));
262
- }
263
- }
264
- for (var j = 0; j < N.length; j++) {
265
- for (var k = 0; k < post.length; k++) {
266
- var expansion = pre + N[j] + post[k];
267
- if (!isTop || isSequence || expansion)
268
- expansions.push(expansion);
269
- }
270
- }
271
- }
272
- return expansions;
273
- }
32
+ // src/utils/get-prop-descriptor.ts
33
+ function getPropertyDescriptor(obj, memberName, getOnly) {
34
+ const stopAt = typeof HTMLElement !== "undefined" ? HTMLElement.prototype : null;
35
+ while (obj && obj !== stopAt) {
36
+ const desc = Object.getOwnPropertyDescriptor(obj, memberName);
37
+ if (desc && (!getOnly || desc.get)) return desc;
38
+ obj = Object.getPrototypeOf(obj);
274
39
  }
275
- });
40
+ return void 0;
41
+ }
42
+
43
+ // src/utils/es2022-rewire-class-members.ts
276
44
  var reWireGetterSetter = (instance, hostRef) => {
277
45
  var _a;
278
46
  const cmpMeta = hostRef.$cmpMeta$;
@@ -280,7 +48,7 @@ var reWireGetterSetter = (instance, hostRef) => {
280
48
  members.map(([memberName, [memberFlags]]) => {
281
49
  if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
282
50
  const ogValue = instance[memberName];
283
- const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName) || Object.getOwnPropertyDescriptor(instance, memberName);
51
+ const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName, true) || Object.getOwnPropertyDescriptor(instance, memberName);
284
52
  if (ogDescriptor) {
285
53
  Object.defineProperty(instance, memberName, {
286
54
  get() {
@@ -293,18 +61,14 @@ var reWireGetterSetter = (instance, hostRef) => {
293
61
  enumerable: true
294
62
  });
295
63
  }
296
- instance[memberName] = hostRef.$instanceValues$.has(memberName) ? hostRef.$instanceValues$.get(memberName) : ogValue;
64
+ if (hostRef.$instanceValues$.has(memberName)) {
65
+ instance[memberName] = hostRef.$instanceValues$.get(memberName);
66
+ } else if (ogValue !== void 0) {
67
+ instance[memberName] = ogValue;
68
+ }
297
69
  }
298
70
  });
299
71
  };
300
- function getPropertyDescriptor(obj, memberName) {
301
- while (obj) {
302
- const desc = Object.getOwnPropertyDescriptor(obj, memberName);
303
- if (desc == null ? void 0 : desc.get) return desc;
304
- obj = Object.getPrototypeOf(obj);
305
- }
306
- return void 0;
307
- }
308
72
 
309
73
  // src/client/client-host-ref.ts
310
74
  var getHostRef = (ref) => {
@@ -395,10 +159,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
395
159
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
396
160
  /* webpackMode: "lazy" */
397
161
  './mg-progress.cjs.entry.js')); }).then(processMod, consoleError);
398
- case 'mg-action-more_37.cjs':
162
+ case 'mg-action-more_36.cjs':
399
163
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
400
164
  /* webpackMode: "lazy" */
401
- './mg-action-more_37.cjs.entry.js')); }).then(processMod, consoleError);
165
+ './mg-action-more_36.cjs.entry.js')); }).then(processMod, consoleError);
402
166
  case 'mg-input-rich-text-editor.cjs':
403
167
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
404
168
  /* webpackMode: "lazy" */
@@ -505,1426 +269,6 @@ var flush = () => {
505
269
  var nextTick = (cb) => promiseResolve().then(cb);
506
270
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
507
271
 
508
- // src/utils/helpers.ts
509
- var isDef = (v) => v != null && v !== void 0;
510
- var isComplexType = (o) => {
511
- o = typeof o;
512
- return o === "object" || o === "function";
513
- };
514
-
515
- // node_modules/minimatch/dist/esm/index.js
516
- var import_brace_expansion = __toESM(require_brace_expansion());
517
-
518
- // node_modules/minimatch/dist/esm/assert-valid-pattern.js
519
- var MAX_PATTERN_LENGTH = 1024 * 64;
520
- var assertValidPattern = (pattern) => {
521
- if (typeof pattern !== "string") {
522
- throw new TypeError("invalid pattern");
523
- }
524
- if (pattern.length > MAX_PATTERN_LENGTH) {
525
- throw new TypeError("pattern is too long");
526
- }
527
- };
528
-
529
- // node_modules/minimatch/dist/esm/brace-expressions.js
530
- var posixClasses = {
531
- "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
532
- "[:alpha:]": ["\\p{L}\\p{Nl}", true],
533
- "[:ascii:]": ["\\x00-\\x7f", false],
534
- "[:blank:]": ["\\p{Zs}\\t", true],
535
- "[:cntrl:]": ["\\p{Cc}", true],
536
- "[:digit:]": ["\\p{Nd}", true],
537
- "[:graph:]": ["\\p{Z}\\p{C}", true, true],
538
- "[:lower:]": ["\\p{Ll}", true],
539
- "[:print:]": ["\\p{C}", true],
540
- "[:punct:]": ["\\p{P}", true],
541
- "[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true],
542
- "[:upper:]": ["\\p{Lu}", true],
543
- "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true],
544
- "[:xdigit:]": ["A-Fa-f0-9", false]
545
- };
546
- var braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&");
547
- var regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
548
- var rangesToString = (ranges) => ranges.join("");
549
- var parseClass = (glob, position) => {
550
- const pos = position;
551
- if (glob.charAt(pos) !== "[") {
552
- throw new Error("not in a brace expression");
553
- }
554
- const ranges = [];
555
- const negs = [];
556
- let i2 = pos + 1;
557
- let sawStart = false;
558
- let uflag = false;
559
- let escaping = false;
560
- let negate = false;
561
- let endPos = pos;
562
- let rangeStart = "";
563
- WHILE: while (i2 < glob.length) {
564
- const c = glob.charAt(i2);
565
- if ((c === "!" || c === "^") && i2 === pos + 1) {
566
- negate = true;
567
- i2++;
568
- continue;
569
- }
570
- if (c === "]" && sawStart && !escaping) {
571
- endPos = i2 + 1;
572
- break;
573
- }
574
- sawStart = true;
575
- if (c === "\\") {
576
- if (!escaping) {
577
- escaping = true;
578
- i2++;
579
- continue;
580
- }
581
- }
582
- if (c === "[" && !escaping) {
583
- for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
584
- if (glob.startsWith(cls, i2)) {
585
- if (rangeStart) {
586
- return ["$.", false, glob.length - pos, true];
587
- }
588
- i2 += cls.length;
589
- if (neg)
590
- negs.push(unip);
591
- else
592
- ranges.push(unip);
593
- uflag = uflag || u;
594
- continue WHILE;
595
- }
596
- }
597
- }
598
- escaping = false;
599
- if (rangeStart) {
600
- if (c > rangeStart) {
601
- ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c));
602
- } else if (c === rangeStart) {
603
- ranges.push(braceEscape(c));
604
- }
605
- rangeStart = "";
606
- i2++;
607
- continue;
608
- }
609
- if (glob.startsWith("-]", i2 + 1)) {
610
- ranges.push(braceEscape(c + "-"));
611
- i2 += 2;
612
- continue;
613
- }
614
- if (glob.startsWith("-", i2 + 1)) {
615
- rangeStart = c;
616
- i2 += 2;
617
- continue;
618
- }
619
- ranges.push(braceEscape(c));
620
- i2++;
621
- }
622
- if (endPos < i2) {
623
- return ["", false, 0, false];
624
- }
625
- if (!ranges.length && !negs.length) {
626
- return ["$.", false, glob.length - pos, true];
627
- }
628
- if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate) {
629
- const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
630
- return [regexpEscape(r), false, endPos - pos, false];
631
- }
632
- const sranges = "[" + (negate ? "^" : "") + rangesToString(ranges) + "]";
633
- const snegs = "[" + (negate ? "" : "^") + rangesToString(negs) + "]";
634
- const comb = ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs;
635
- return [comb, uflag, endPos - pos, true];
636
- };
637
-
638
- // node_modules/minimatch/dist/esm/unescape.js
639
- var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
640
- return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
641
- };
642
-
643
- // node_modules/minimatch/dist/esm/ast.js
644
- var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
645
- var isExtglobType = (c) => types.has(c);
646
- var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
647
- var startNoDot = "(?!\\.)";
648
- var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
649
- var justDots = /* @__PURE__ */ new Set(["..", "."]);
650
- var reSpecials = new Set("().*{}+?[]^$\\!");
651
- var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
652
- var qmark = "[^/]";
653
- var star = qmark + "*?";
654
- var starNoEmpty = qmark + "+?";
655
- var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, partsToRegExp_fn, parseGlob_fn;
656
- var _AST = class _AST {
657
- constructor(type, parent, options = {}) {
658
- __privateAdd(this, _AST_instances);
659
- __publicField(this, "type");
660
- __privateAdd(this, _root);
661
- __privateAdd(this, _hasMagic);
662
- __privateAdd(this, _uflag, false);
663
- __privateAdd(this, _parts, []);
664
- __privateAdd(this, _parent);
665
- __privateAdd(this, _parentIndex);
666
- __privateAdd(this, _negs);
667
- __privateAdd(this, _filledNegs, false);
668
- __privateAdd(this, _options);
669
- __privateAdd(this, _toString);
670
- // set to true if it's an extglob with no children
671
- // (which really means one child of '')
672
- __privateAdd(this, _emptyExt, false);
673
- this.type = type;
674
- if (type)
675
- __privateSet(this, _hasMagic, true);
676
- __privateSet(this, _parent, parent);
677
- __privateSet(this, _root, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _root) : this);
678
- __privateSet(this, _options, __privateGet(this, _root) === this ? options : __privateGet(__privateGet(this, _root), _options));
679
- __privateSet(this, _negs, __privateGet(this, _root) === this ? [] : __privateGet(__privateGet(this, _root), _negs));
680
- if (type === "!" && !__privateGet(__privateGet(this, _root), _filledNegs))
681
- __privateGet(this, _negs).push(this);
682
- __privateSet(this, _parentIndex, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0);
683
- }
684
- get hasMagic() {
685
- if (__privateGet(this, _hasMagic) !== void 0)
686
- return __privateGet(this, _hasMagic);
687
- for (const p of __privateGet(this, _parts)) {
688
- if (typeof p === "string")
689
- continue;
690
- if (p.type || p.hasMagic)
691
- return __privateSet(this, _hasMagic, true);
692
- }
693
- return __privateGet(this, _hasMagic);
694
- }
695
- // reconstructs the pattern
696
- toString() {
697
- if (__privateGet(this, _toString) !== void 0)
698
- return __privateGet(this, _toString);
699
- if (!this.type) {
700
- return __privateSet(this, _toString, __privateGet(this, _parts).map((p) => String(p)).join(""));
701
- } else {
702
- return __privateSet(this, _toString, this.type + "(" + __privateGet(this, _parts).map((p) => String(p)).join("|") + ")");
703
- }
704
- }
705
- push(...parts) {
706
- for (const p of parts) {
707
- if (p === "")
708
- continue;
709
- if (typeof p !== "string" && !(p instanceof _AST && __privateGet(p, _parent) === this)) {
710
- throw new Error("invalid part: " + p);
711
- }
712
- __privateGet(this, _parts).push(p);
713
- }
714
- }
715
- toJSON() {
716
- var _a;
717
- 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())];
718
- if (this.isStart() && !this.type)
719
- ret.unshift([]);
720
- if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")) {
721
- ret.push({});
722
- }
723
- return ret;
724
- }
725
- isStart() {
726
- var _a;
727
- if (__privateGet(this, _root) === this)
728
- return true;
729
- if (!((_a = __privateGet(this, _parent)) == null ? void 0 : _a.isStart()))
730
- return false;
731
- if (__privateGet(this, _parentIndex) === 0)
732
- return true;
733
- const p = __privateGet(this, _parent);
734
- for (let i2 = 0; i2 < __privateGet(this, _parentIndex); i2++) {
735
- const pp = __privateGet(p, _parts)[i2];
736
- if (!(pp instanceof _AST && pp.type === "!")) {
737
- return false;
738
- }
739
- }
740
- return true;
741
- }
742
- isEnd() {
743
- var _a, _b, _c;
744
- if (__privateGet(this, _root) === this)
745
- return true;
746
- if (((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")
747
- return true;
748
- if (!((_b = __privateGet(this, _parent)) == null ? void 0 : _b.isEnd()))
749
- return false;
750
- if (!this.type)
751
- return (_c = __privateGet(this, _parent)) == null ? void 0 : _c.isEnd();
752
- const pl = __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0;
753
- return __privateGet(this, _parentIndex) === pl - 1;
754
- }
755
- copyIn(part) {
756
- if (typeof part === "string")
757
- this.push(part);
758
- else
759
- this.push(part.clone(this));
760
- }
761
- clone(parent) {
762
- const c = new _AST(this.type, parent);
763
- for (const p of __privateGet(this, _parts)) {
764
- c.copyIn(p);
765
- }
766
- return c;
767
- }
768
- static fromGlob(pattern, options = {}) {
769
- var _a;
770
- const ast = new _AST(null, void 0, options);
771
- __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, pattern, ast, 0, options);
772
- return ast;
773
- }
774
- // returns the regular expression if there's magic, or the unescaped
775
- // string if not.
776
- toMMPattern() {
777
- if (this !== __privateGet(this, _root))
778
- return __privateGet(this, _root).toMMPattern();
779
- const glob = this.toString();
780
- const [re, body, hasMagic, uflag] = this.toRegExpSource();
781
- const anyMagic = hasMagic || __privateGet(this, _hasMagic) || __privateGet(this, _options).nocase && !__privateGet(this, _options).nocaseMagicOnly && glob.toUpperCase() !== glob.toLowerCase();
782
- if (!anyMagic) {
783
- return body;
784
- }
785
- const flags = (__privateGet(this, _options).nocase ? "i" : "") + (uflag ? "u" : "");
786
- return Object.assign(new RegExp(`^${re}$`, flags), {
787
- _src: re,
788
- _glob: glob
789
- });
790
- }
791
- get options() {
792
- return __privateGet(this, _options);
793
- }
794
- // returns the string match, the regexp source, whether there's magic
795
- // in the regexp (so a regular expression is required) and whether or
796
- // not the uflag is needed for the regular expression (for posix classes)
797
- // TODO: instead of injecting the start/end at this point, just return
798
- // the BODY of the regexp, along with the start/end portions suitable
799
- // for binding the start/end in either a joined full-path makeRe context
800
- // (where we bind to (^|/), or a standalone matchPart context (where
801
- // we bind to ^, and not /). Otherwise slashes get duped!
802
- //
803
- // In part-matching mode, the start is:
804
- // - if not isStart: nothing
805
- // - if traversal possible, but not allowed: ^(?!\.\.?$)
806
- // - if dots allowed or not possible: ^
807
- // - if dots possible and not allowed: ^(?!\.)
808
- // end is:
809
- // - if not isEnd(): nothing
810
- // - else: $
811
- //
812
- // In full-path matching mode, we put the slash at the START of the
813
- // pattern, so start is:
814
- // - if first pattern: same as part-matching mode
815
- // - if not isStart(): nothing
816
- // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
817
- // - if dots allowed or not possible: /
818
- // - if dots possible and not allowed: /(?!\.)
819
- // end is:
820
- // - if last pattern, same as part-matching mode
821
- // - else nothing
822
- //
823
- // Always put the (?:$|/) on negated tails, though, because that has to be
824
- // there to bind the end of the negated pattern portion, and it's easier to
825
- // just stick it in now rather than try to inject it later in the middle of
826
- // the pattern.
827
- //
828
- // We can just always return the same end, and leave it up to the caller
829
- // to know whether it's going to be used joined or in parts.
830
- // And, if the start is adjusted slightly, can do the same there:
831
- // - if not isStart: nothing
832
- // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
833
- // - if dots allowed or not possible: (?:/|^)
834
- // - if dots possible and not allowed: (?:/|^)(?!\.)
835
- //
836
- // But it's better to have a simpler binding without a conditional, for
837
- // performance, so probably better to return both start options.
838
- //
839
- // Then the caller just ignores the end if it's not the first pattern,
840
- // and the start always gets applied.
841
- //
842
- // But that's always going to be $ if it's the ending pattern, or nothing,
843
- // so the caller can just attach $ at the end of the pattern when building.
844
- //
845
- // So the todo is:
846
- // - better detect what kind of start is needed
847
- // - return both flavors of starting pattern
848
- // - attach $ at the end of the pattern when creating the actual RegExp
849
- //
850
- // Ah, but wait, no, that all only applies to the root when the first pattern
851
- // is not an extglob. If the first pattern IS an extglob, then we need all
852
- // that dot prevention biz to live in the extglob portions, because eg
853
- // +(*|.x*) can match .xy but not .yx.
854
- //
855
- // So, return the two flavors if it's #root and the first child is not an
856
- // AST, otherwise leave it to the child AST to handle it, and there,
857
- // use the (?:^|/) style of start binding.
858
- //
859
- // Even simplified further:
860
- // - Since the start for a join is eg /(?!\.) and the start for a part
861
- // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
862
- // or start or whatever) and prepend ^ or / at the Regexp construction.
863
- toRegExpSource(allowDot) {
864
- var _a;
865
- const dot = allowDot != null ? allowDot : !!__privateGet(this, _options).dot;
866
- if (__privateGet(this, _root) === this)
867
- __privateMethod(this, _AST_instances, fillNegs_fn).call(this);
868
- if (!this.type) {
869
- const noEmpty = this.isStart() && this.isEnd();
870
- const src = __privateGet(this, _parts).map((p) => {
871
- var _a2;
872
- const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a2 = _AST, _AST_static, parseGlob_fn).call(_a2, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
873
- __privateSet(this, _hasMagic, __privateGet(this, _hasMagic) || hasMagic);
874
- __privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
875
- return re;
876
- }).join("");
877
- let start2 = "";
878
- if (this.isStart()) {
879
- if (typeof __privateGet(this, _parts)[0] === "string") {
880
- const dotTravAllowed = __privateGet(this, _parts).length === 1 && justDots.has(__privateGet(this, _parts)[0]);
881
- if (!dotTravAllowed) {
882
- const aps = addPatternStart;
883
- const needNoTrav = (
884
- // dots are allowed, and the pattern starts with [ or .
885
- dot && aps.has(src.charAt(0)) || // the pattern starts with \., and then [ or .
886
- src.startsWith("\\.") && aps.has(src.charAt(2)) || // the pattern starts with \.\., and then [ or .
887
- src.startsWith("\\.\\.") && aps.has(src.charAt(4))
888
- );
889
- const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
890
- start2 = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : "";
891
- }
892
- }
893
- }
894
- let end = "";
895
- if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!") {
896
- end = "(?:$|\\/)";
897
- }
898
- const final2 = start2 + src + end;
899
- return [
900
- final2,
901
- unescape(src),
902
- __privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
903
- __privateGet(this, _uflag)
904
- ];
905
- }
906
- const repeated = this.type === "*" || this.type === "+";
907
- const start = this.type === "!" ? "(?:(?!(?:" : "(?:";
908
- let body = __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, dot);
909
- if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
910
- const s = this.toString();
911
- __privateSet(this, _parts, [s]);
912
- this.type = null;
913
- __privateSet(this, _hasMagic, void 0);
914
- return [s, unescape(this.toString()), false, false];
915
- }
916
- let bodyDotAllowed = !repeated || allowDot || dot || false ? "" : __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, true);
917
- if (bodyDotAllowed === body) {
918
- bodyDotAllowed = "";
919
- }
920
- if (bodyDotAllowed) {
921
- body = `(?:${body})(?:${bodyDotAllowed})*?`;
922
- }
923
- let final = "";
924
- if (this.type === "!" && __privateGet(this, _emptyExt)) {
925
- final = (this.isStart() && !dot ? startNoDot : "") + starNoEmpty;
926
- } else {
927
- const close = this.type === "!" ? (
928
- // !() must match something,but !(x) can match ''
929
- "))" + (this.isStart() && !dot && !allowDot ? startNoDot : "") + star + ")"
930
- ) : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && bodyDotAllowed ? ")" : this.type === "*" && bodyDotAllowed ? `)?` : `)${this.type}`;
931
- final = start + body + close;
932
- }
933
- return [
934
- final,
935
- unescape(body),
936
- __privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
937
- __privateGet(this, _uflag)
938
- ];
939
- }
940
- };
941
- _root = new WeakMap();
942
- _hasMagic = new WeakMap();
943
- _uflag = new WeakMap();
944
- _parts = new WeakMap();
945
- _parent = new WeakMap();
946
- _parentIndex = new WeakMap();
947
- _negs = new WeakMap();
948
- _filledNegs = new WeakMap();
949
- _options = new WeakMap();
950
- _toString = new WeakMap();
951
- _emptyExt = new WeakMap();
952
- _AST_instances = new WeakSet();
953
- fillNegs_fn = function() {
954
- if (this !== __privateGet(this, _root))
955
- throw new Error("should only call on root");
956
- if (__privateGet(this, _filledNegs))
957
- return this;
958
- this.toString();
959
- __privateSet(this, _filledNegs, true);
960
- let n;
961
- while (n = __privateGet(this, _negs).pop()) {
962
- if (n.type !== "!")
963
- continue;
964
- let p = n;
965
- let pp = __privateGet(p, _parent);
966
- while (pp) {
967
- for (let i2 = __privateGet(p, _parentIndex) + 1; !pp.type && i2 < __privateGet(pp, _parts).length; i2++) {
968
- for (const part of __privateGet(n, _parts)) {
969
- if (typeof part === "string") {
970
- throw new Error("string part in extglob AST??");
971
- }
972
- part.copyIn(__privateGet(pp, _parts)[i2]);
973
- }
974
- }
975
- p = pp;
976
- pp = __privateGet(p, _parent);
977
- }
978
- }
979
- return this;
980
- };
981
- _AST_static = new WeakSet();
982
- parseAST_fn = function(str, ast, pos, opt) {
983
- var _a, _b;
984
- let escaping = false;
985
- let inBrace = false;
986
- let braceStart = -1;
987
- let braceNeg = false;
988
- if (ast.type === null) {
989
- let i3 = pos;
990
- let acc2 = "";
991
- while (i3 < str.length) {
992
- const c = str.charAt(i3++);
993
- if (escaping || c === "\\") {
994
- escaping = !escaping;
995
- acc2 += c;
996
- continue;
997
- }
998
- if (inBrace) {
999
- if (i3 === braceStart + 1) {
1000
- if (c === "^" || c === "!") {
1001
- braceNeg = true;
1002
- }
1003
- } else if (c === "]" && !(i3 === braceStart + 2 && braceNeg)) {
1004
- inBrace = false;
1005
- }
1006
- acc2 += c;
1007
- continue;
1008
- } else if (c === "[") {
1009
- inBrace = true;
1010
- braceStart = i3;
1011
- braceNeg = false;
1012
- acc2 += c;
1013
- continue;
1014
- }
1015
- if (!opt.noext && isExtglobType(c) && str.charAt(i3) === "(") {
1016
- ast.push(acc2);
1017
- acc2 = "";
1018
- const ext2 = new _AST(c, ast);
1019
- i3 = __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, str, ext2, i3, opt);
1020
- ast.push(ext2);
1021
- continue;
1022
- }
1023
- acc2 += c;
1024
- }
1025
- ast.push(acc2);
1026
- return i3;
1027
- }
1028
- let i2 = pos + 1;
1029
- let part = new _AST(null, ast);
1030
- const parts = [];
1031
- let acc = "";
1032
- while (i2 < str.length) {
1033
- const c = str.charAt(i2++);
1034
- if (escaping || c === "\\") {
1035
- escaping = !escaping;
1036
- acc += c;
1037
- continue;
1038
- }
1039
- if (inBrace) {
1040
- if (i2 === braceStart + 1) {
1041
- if (c === "^" || c === "!") {
1042
- braceNeg = true;
1043
- }
1044
- } else if (c === "]" && !(i2 === braceStart + 2 && braceNeg)) {
1045
- inBrace = false;
1046
- }
1047
- acc += c;
1048
- continue;
1049
- } else if (c === "[") {
1050
- inBrace = true;
1051
- braceStart = i2;
1052
- braceNeg = false;
1053
- acc += c;
1054
- continue;
1055
- }
1056
- if (isExtglobType(c) && str.charAt(i2) === "(") {
1057
- part.push(acc);
1058
- acc = "";
1059
- const ext2 = new _AST(c, part);
1060
- part.push(ext2);
1061
- i2 = __privateMethod(_b = _AST, _AST_static, parseAST_fn).call(_b, str, ext2, i2, opt);
1062
- continue;
1063
- }
1064
- if (c === "|") {
1065
- part.push(acc);
1066
- acc = "";
1067
- parts.push(part);
1068
- part = new _AST(null, ast);
1069
- continue;
1070
- }
1071
- if (c === ")") {
1072
- if (acc === "" && __privateGet(ast, _parts).length === 0) {
1073
- __privateSet(ast, _emptyExt, true);
1074
- }
1075
- part.push(acc);
1076
- acc = "";
1077
- ast.push(...parts, part);
1078
- return i2;
1079
- }
1080
- acc += c;
1081
- }
1082
- ast.type = null;
1083
- __privateSet(ast, _hasMagic, void 0);
1084
- __privateSet(ast, _parts, [str.substring(pos - 1)]);
1085
- return i2;
1086
- };
1087
- partsToRegExp_fn = function(dot) {
1088
- return __privateGet(this, _parts).map((p) => {
1089
- if (typeof p === "string") {
1090
- throw new Error("string type in extglob ast??");
1091
- }
1092
- const [re, _, _hasMagic2, uflag] = p.toRegExpSource(dot);
1093
- __privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
1094
- return re;
1095
- }).filter((p) => !(this.isStart() && this.isEnd()) || !!p).join("|");
1096
- };
1097
- parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
1098
- let escaping = false;
1099
- let re = "";
1100
- let uflag = false;
1101
- for (let i2 = 0; i2 < glob.length; i2++) {
1102
- const c = glob.charAt(i2);
1103
- if (escaping) {
1104
- escaping = false;
1105
- re += (reSpecials.has(c) ? "\\" : "") + c;
1106
- continue;
1107
- }
1108
- if (c === "\\") {
1109
- if (i2 === glob.length - 1) {
1110
- re += "\\\\";
1111
- } else {
1112
- escaping = true;
1113
- }
1114
- continue;
1115
- }
1116
- if (c === "[") {
1117
- const [src, needUflag, consumed, magic] = parseClass(glob, i2);
1118
- if (consumed) {
1119
- re += src;
1120
- uflag = uflag || needUflag;
1121
- i2 += consumed - 1;
1122
- hasMagic = hasMagic || magic;
1123
- continue;
1124
- }
1125
- }
1126
- if (c === "*") {
1127
- if (noEmpty && glob === "*")
1128
- re += starNoEmpty;
1129
- else
1130
- re += star;
1131
- hasMagic = true;
1132
- continue;
1133
- }
1134
- if (c === "?") {
1135
- re += qmark;
1136
- hasMagic = true;
1137
- continue;
1138
- }
1139
- re += regExpEscape(c);
1140
- }
1141
- return [re, unescape(glob), !!hasMagic, uflag];
1142
- };
1143
- __privateAdd(_AST, _AST_static);
1144
- var AST = _AST;
1145
-
1146
- // node_modules/minimatch/dist/esm/escape.js
1147
- var escape = (s, { windowsPathsNoEscape = false } = {}) => {
1148
- return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
1149
- };
1150
-
1151
- // node_modules/minimatch/dist/esm/index.js
1152
- var minimatch = (p, pattern, options = {}) => {
1153
- assertValidPattern(pattern);
1154
- if (!options.nocomment && pattern.charAt(0) === "#") {
1155
- return false;
1156
- }
1157
- return new Minimatch(pattern, options).match(p);
1158
- };
1159
- var starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
1160
- var starDotExtTest = (ext2) => (f) => !f.startsWith(".") && f.endsWith(ext2);
1161
- var starDotExtTestDot = (ext2) => (f) => f.endsWith(ext2);
1162
- var starDotExtTestNocase = (ext2) => {
1163
- ext2 = ext2.toLowerCase();
1164
- return (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext2);
1165
- };
1166
- var starDotExtTestNocaseDot = (ext2) => {
1167
- ext2 = ext2.toLowerCase();
1168
- return (f) => f.toLowerCase().endsWith(ext2);
1169
- };
1170
- var starDotStarRE = /^\*+\.\*+$/;
1171
- var starDotStarTest = (f) => !f.startsWith(".") && f.includes(".");
1172
- var starDotStarTestDot = (f) => f !== "." && f !== ".." && f.includes(".");
1173
- var dotStarRE = /^\.\*+$/;
1174
- var dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith(".");
1175
- var starRE = /^\*+$/;
1176
- var starTest = (f) => f.length !== 0 && !f.startsWith(".");
1177
- var starTestDot = (f) => f.length !== 0 && f !== "." && f !== "..";
1178
- var qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
1179
- var qmarksTestNocase = ([$0, ext2 = ""]) => {
1180
- const noext = qmarksTestNoExt([$0]);
1181
- if (!ext2)
1182
- return noext;
1183
- ext2 = ext2.toLowerCase();
1184
- return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
1185
- };
1186
- var qmarksTestNocaseDot = ([$0, ext2 = ""]) => {
1187
- const noext = qmarksTestNoExtDot([$0]);
1188
- if (!ext2)
1189
- return noext;
1190
- ext2 = ext2.toLowerCase();
1191
- return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
1192
- };
1193
- var qmarksTestDot = ([$0, ext2 = ""]) => {
1194
- const noext = qmarksTestNoExtDot([$0]);
1195
- return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
1196
- };
1197
- var qmarksTest = ([$0, ext2 = ""]) => {
1198
- const noext = qmarksTestNoExt([$0]);
1199
- return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
1200
- };
1201
- var qmarksTestNoExt = ([$0]) => {
1202
- const len = $0.length;
1203
- return (f) => f.length === len && !f.startsWith(".");
1204
- };
1205
- var qmarksTestNoExtDot = ([$0]) => {
1206
- const len = $0.length;
1207
- return (f) => f.length === len && f !== "." && f !== "..";
1208
- };
1209
- var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
1210
- var path = {
1211
- win32: { sep: "\\" },
1212
- posix: { sep: "/" }
1213
- };
1214
- var sep = defaultPlatform === "win32" ? path.win32.sep : path.posix.sep;
1215
- minimatch.sep = sep;
1216
- var GLOBSTAR = Symbol("globstar **");
1217
- minimatch.GLOBSTAR = GLOBSTAR;
1218
- var qmark2 = "[^/]";
1219
- var star2 = qmark2 + "*?";
1220
- var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
1221
- var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
1222
- var filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
1223
- minimatch.filter = filter;
1224
- var ext = (a, b = {}) => Object.assign({}, a, b);
1225
- var defaults = (def) => {
1226
- if (!def || typeof def !== "object" || !Object.keys(def).length) {
1227
- return minimatch;
1228
- }
1229
- const orig = minimatch;
1230
- const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
1231
- return Object.assign(m, {
1232
- Minimatch: class Minimatch extends orig.Minimatch {
1233
- constructor(pattern, options = {}) {
1234
- super(pattern, ext(def, options));
1235
- }
1236
- static defaults(options) {
1237
- return orig.defaults(ext(def, options)).Minimatch;
1238
- }
1239
- },
1240
- AST: class AST extends orig.AST {
1241
- /* c8 ignore start */
1242
- constructor(type, parent, options = {}) {
1243
- super(type, parent, ext(def, options));
1244
- }
1245
- /* c8 ignore stop */
1246
- static fromGlob(pattern, options = {}) {
1247
- return orig.AST.fromGlob(pattern, ext(def, options));
1248
- }
1249
- },
1250
- unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
1251
- escape: (s, options = {}) => orig.escape(s, ext(def, options)),
1252
- filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
1253
- defaults: (options) => orig.defaults(ext(def, options)),
1254
- makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
1255
- braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
1256
- match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
1257
- sep: orig.sep,
1258
- GLOBSTAR
1259
- });
1260
- };
1261
- minimatch.defaults = defaults;
1262
- var braceExpand = (pattern, options = {}) => {
1263
- assertValidPattern(pattern);
1264
- if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
1265
- return [pattern];
1266
- }
1267
- return (0, import_brace_expansion.default)(pattern);
1268
- };
1269
- minimatch.braceExpand = braceExpand;
1270
- var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
1271
- minimatch.makeRe = makeRe;
1272
- var match = (list, pattern, options = {}) => {
1273
- const mm = new Minimatch(pattern, options);
1274
- list = list.filter((f) => mm.match(f));
1275
- if (mm.options.nonull && !list.length) {
1276
- list.push(pattern);
1277
- }
1278
- return list;
1279
- };
1280
- minimatch.match = match;
1281
- var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
1282
- var regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
1283
- var Minimatch = class {
1284
- options;
1285
- set;
1286
- pattern;
1287
- windowsPathsNoEscape;
1288
- nonegate;
1289
- negate;
1290
- comment;
1291
- empty;
1292
- preserveMultipleSlashes;
1293
- partial;
1294
- globSet;
1295
- globParts;
1296
- nocase;
1297
- isWindows;
1298
- platform;
1299
- windowsNoMagicRoot;
1300
- regexp;
1301
- constructor(pattern, options = {}) {
1302
- assertValidPattern(pattern);
1303
- options = options || {};
1304
- this.options = options;
1305
- this.pattern = pattern;
1306
- this.platform = options.platform || defaultPlatform;
1307
- this.isWindows = this.platform === "win32";
1308
- this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
1309
- if (this.windowsPathsNoEscape) {
1310
- this.pattern = this.pattern.replace(/\\/g, "/");
1311
- }
1312
- this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
1313
- this.regexp = null;
1314
- this.negate = false;
1315
- this.nonegate = !!options.nonegate;
1316
- this.comment = false;
1317
- this.empty = false;
1318
- this.partial = !!options.partial;
1319
- this.nocase = !!this.options.nocase;
1320
- this.windowsNoMagicRoot = options.windowsNoMagicRoot !== void 0 ? options.windowsNoMagicRoot : !!(this.isWindows && this.nocase);
1321
- this.globSet = [];
1322
- this.globParts = [];
1323
- this.set = [];
1324
- this.make();
1325
- }
1326
- hasMagic() {
1327
- if (this.options.magicalBraces && this.set.length > 1) {
1328
- return true;
1329
- }
1330
- for (const pattern of this.set) {
1331
- for (const part of pattern) {
1332
- if (typeof part !== "string")
1333
- return true;
1334
- }
1335
- }
1336
- return false;
1337
- }
1338
- debug(..._) {
1339
- }
1340
- make() {
1341
- const pattern = this.pattern;
1342
- const options = this.options;
1343
- if (!options.nocomment && pattern.charAt(0) === "#") {
1344
- this.comment = true;
1345
- return;
1346
- }
1347
- if (!pattern) {
1348
- this.empty = true;
1349
- return;
1350
- }
1351
- this.parseNegate();
1352
- this.globSet = [...new Set(this.braceExpand())];
1353
- if (options.debug) {
1354
- this.debug = (...args) => console.error(...args);
1355
- }
1356
- this.debug(this.pattern, this.globSet);
1357
- const rawGlobParts = this.globSet.map((s) => this.slashSplit(s));
1358
- this.globParts = this.preprocess(rawGlobParts);
1359
- this.debug(this.pattern, this.globParts);
1360
- let set = this.globParts.map((s, _, __) => {
1361
- if (this.isWindows && this.windowsNoMagicRoot) {
1362
- const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]);
1363
- const isDrive = /^[a-z]:/i.test(s[0]);
1364
- if (isUNC) {
1365
- return [...s.slice(0, 4), ...s.slice(4).map((ss) => this.parse(ss))];
1366
- } else if (isDrive) {
1367
- return [s[0], ...s.slice(1).map((ss) => this.parse(ss))];
1368
- }
1369
- }
1370
- return s.map((ss) => this.parse(ss));
1371
- });
1372
- this.debug(this.pattern, set);
1373
- this.set = set.filter((s) => s.indexOf(false) === -1);
1374
- if (this.isWindows) {
1375
- for (let i2 = 0; i2 < this.set.length; i2++) {
1376
- const p = this.set[i2];
1377
- if (p[0] === "" && p[1] === "" && this.globParts[i2][2] === "?" && typeof p[3] === "string" && /^[a-z]:$/i.test(p[3])) {
1378
- p[2] = "?";
1379
- }
1380
- }
1381
- }
1382
- this.debug(this.pattern, this.set);
1383
- }
1384
- // various transforms to equivalent pattern sets that are
1385
- // faster to process in a filesystem walk. The goal is to
1386
- // eliminate what we can, and push all ** patterns as far
1387
- // to the right as possible, even if it increases the number
1388
- // of patterns that we have to process.
1389
- preprocess(globParts) {
1390
- if (this.options.noglobstar) {
1391
- for (let i2 = 0; i2 < globParts.length; i2++) {
1392
- for (let j = 0; j < globParts[i2].length; j++) {
1393
- if (globParts[i2][j] === "**") {
1394
- globParts[i2][j] = "*";
1395
- }
1396
- }
1397
- }
1398
- }
1399
- const { optimizationLevel = 1 } = this.options;
1400
- if (optimizationLevel >= 2) {
1401
- globParts = this.firstPhasePreProcess(globParts);
1402
- globParts = this.secondPhasePreProcess(globParts);
1403
- } else if (optimizationLevel >= 1) {
1404
- globParts = this.levelOneOptimize(globParts);
1405
- } else {
1406
- globParts = this.adjascentGlobstarOptimize(globParts);
1407
- }
1408
- return globParts;
1409
- }
1410
- // just get rid of adjascent ** portions
1411
- adjascentGlobstarOptimize(globParts) {
1412
- return globParts.map((parts) => {
1413
- let gs = -1;
1414
- while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
1415
- let i2 = gs;
1416
- while (parts[i2 + 1] === "**") {
1417
- i2++;
1418
- }
1419
- if (i2 !== gs) {
1420
- parts.splice(gs, i2 - gs);
1421
- }
1422
- }
1423
- return parts;
1424
- });
1425
- }
1426
- // get rid of adjascent ** and resolve .. portions
1427
- levelOneOptimize(globParts) {
1428
- return globParts.map((parts) => {
1429
- parts = parts.reduce((set, part) => {
1430
- const prev = set[set.length - 1];
1431
- if (part === "**" && prev === "**") {
1432
- return set;
1433
- }
1434
- if (part === "..") {
1435
- if (prev && prev !== ".." && prev !== "." && prev !== "**") {
1436
- set.pop();
1437
- return set;
1438
- }
1439
- }
1440
- set.push(part);
1441
- return set;
1442
- }, []);
1443
- return parts.length === 0 ? [""] : parts;
1444
- });
1445
- }
1446
- levelTwoFileOptimize(parts) {
1447
- if (!Array.isArray(parts)) {
1448
- parts = this.slashSplit(parts);
1449
- }
1450
- let didSomething = false;
1451
- do {
1452
- didSomething = false;
1453
- if (!this.preserveMultipleSlashes) {
1454
- for (let i2 = 1; i2 < parts.length - 1; i2++) {
1455
- const p = parts[i2];
1456
- if (i2 === 1 && p === "" && parts[0] === "")
1457
- continue;
1458
- if (p === "." || p === "") {
1459
- didSomething = true;
1460
- parts.splice(i2, 1);
1461
- i2--;
1462
- }
1463
- }
1464
- if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
1465
- didSomething = true;
1466
- parts.pop();
1467
- }
1468
- }
1469
- let dd = 0;
1470
- while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
1471
- const p = parts[dd - 1];
1472
- if (p && p !== "." && p !== ".." && p !== "**") {
1473
- didSomething = true;
1474
- parts.splice(dd - 1, 2);
1475
- dd -= 2;
1476
- }
1477
- }
1478
- } while (didSomething);
1479
- return parts.length === 0 ? [""] : parts;
1480
- }
1481
- // First phase: single-pattern processing
1482
- // <pre> is 1 or more portions
1483
- // <rest> is 1 or more portions
1484
- // <p> is any portion other than ., .., '', or **
1485
- // <e> is . or ''
1486
- //
1487
- // **/.. is *brutal* for filesystem walking performance, because
1488
- // it effectively resets the recursive walk each time it occurs,
1489
- // and ** cannot be reduced out by a .. pattern part like a regexp
1490
- // or most strings (other than .., ., and '') can be.
1491
- //
1492
- // <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}
1493
- // <pre>/<e>/<rest> -> <pre>/<rest>
1494
- // <pre>/<p>/../<rest> -> <pre>/<rest>
1495
- // **/**/<rest> -> **/<rest>
1496
- //
1497
- // **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow
1498
- // this WOULD be allowed if ** did follow symlinks, or * didn't
1499
- firstPhasePreProcess(globParts) {
1500
- let didSomething = false;
1501
- do {
1502
- didSomething = false;
1503
- for (let parts of globParts) {
1504
- let gs = -1;
1505
- while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
1506
- let gss = gs;
1507
- while (parts[gss + 1] === "**") {
1508
- gss++;
1509
- }
1510
- if (gss > gs) {
1511
- parts.splice(gs + 1, gss - gs);
1512
- }
1513
- let next = parts[gs + 1];
1514
- const p = parts[gs + 2];
1515
- const p2 = parts[gs + 3];
1516
- if (next !== "..")
1517
- continue;
1518
- if (!p || p === "." || p === ".." || !p2 || p2 === "." || p2 === "..") {
1519
- continue;
1520
- }
1521
- didSomething = true;
1522
- parts.splice(gs, 1);
1523
- const other = parts.slice(0);
1524
- other[gs] = "**";
1525
- globParts.push(other);
1526
- gs--;
1527
- }
1528
- if (!this.preserveMultipleSlashes) {
1529
- for (let i2 = 1; i2 < parts.length - 1; i2++) {
1530
- const p = parts[i2];
1531
- if (i2 === 1 && p === "" && parts[0] === "")
1532
- continue;
1533
- if (p === "." || p === "") {
1534
- didSomething = true;
1535
- parts.splice(i2, 1);
1536
- i2--;
1537
- }
1538
- }
1539
- if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
1540
- didSomething = true;
1541
- parts.pop();
1542
- }
1543
- }
1544
- let dd = 0;
1545
- while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
1546
- const p = parts[dd - 1];
1547
- if (p && p !== "." && p !== ".." && p !== "**") {
1548
- didSomething = true;
1549
- const needDot = dd === 1 && parts[dd + 1] === "**";
1550
- const splin = needDot ? ["."] : [];
1551
- parts.splice(dd - 1, 2, ...splin);
1552
- if (parts.length === 0)
1553
- parts.push("");
1554
- dd -= 2;
1555
- }
1556
- }
1557
- }
1558
- } while (didSomething);
1559
- return globParts;
1560
- }
1561
- // second phase: multi-pattern dedupes
1562
- // {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest>
1563
- // {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest>
1564
- // {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest>
1565
- //
1566
- // {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest>
1567
- // ^-- not valid because ** doens't follow symlinks
1568
- secondPhasePreProcess(globParts) {
1569
- for (let i2 = 0; i2 < globParts.length - 1; i2++) {
1570
- for (let j = i2 + 1; j < globParts.length; j++) {
1571
- const matched = this.partsMatch(globParts[i2], globParts[j], !this.preserveMultipleSlashes);
1572
- if (!matched)
1573
- continue;
1574
- globParts[i2] = matched;
1575
- globParts[j] = [];
1576
- }
1577
- }
1578
- return globParts.filter((gs) => gs.length);
1579
- }
1580
- partsMatch(a, b, emptyGSMatch = false) {
1581
- let ai = 0;
1582
- let bi = 0;
1583
- let result = [];
1584
- let which = "";
1585
- while (ai < a.length && bi < b.length) {
1586
- if (a[ai] === b[bi]) {
1587
- result.push(which === "b" ? b[bi] : a[ai]);
1588
- ai++;
1589
- bi++;
1590
- } else if (emptyGSMatch && a[ai] === "**" && b[bi] === a[ai + 1]) {
1591
- result.push(a[ai]);
1592
- ai++;
1593
- } else if (emptyGSMatch && b[bi] === "**" && a[ai] === b[bi + 1]) {
1594
- result.push(b[bi]);
1595
- bi++;
1596
- } else if (a[ai] === "*" && b[bi] && (this.options.dot || !b[bi].startsWith(".")) && b[bi] !== "**") {
1597
- if (which === "b")
1598
- return false;
1599
- which = "a";
1600
- result.push(a[ai]);
1601
- ai++;
1602
- bi++;
1603
- } else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
1604
- if (which === "a")
1605
- return false;
1606
- which = "b";
1607
- result.push(b[bi]);
1608
- ai++;
1609
- bi++;
1610
- } else {
1611
- return false;
1612
- }
1613
- }
1614
- return a.length === b.length && result;
1615
- }
1616
- parseNegate() {
1617
- if (this.nonegate)
1618
- return;
1619
- const pattern = this.pattern;
1620
- let negate = false;
1621
- let negateOffset = 0;
1622
- for (let i2 = 0; i2 < pattern.length && pattern.charAt(i2) === "!"; i2++) {
1623
- negate = !negate;
1624
- negateOffset++;
1625
- }
1626
- if (negateOffset)
1627
- this.pattern = pattern.slice(negateOffset);
1628
- this.negate = negate;
1629
- }
1630
- // set partial to true to test if, for example,
1631
- // "/a/b" matches the start of "/*/b/*/d"
1632
- // Partial means, if you run out of file before you run
1633
- // out of pattern, then that's fine, as long as all
1634
- // the parts match.
1635
- matchOne(file, pattern, partial = false) {
1636
- const options = this.options;
1637
- if (this.isWindows) {
1638
- const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
1639
- const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
1640
- const patternDrive = typeof pattern[0] === "string" && /^[a-z]:$/i.test(pattern[0]);
1641
- const patternUNC = !patternDrive && pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
1642
- const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
1643
- const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
1644
- if (typeof fdi === "number" && typeof pdi === "number") {
1645
- const [fd, pd] = [file[fdi], pattern[pdi]];
1646
- if (fd.toLowerCase() === pd.toLowerCase()) {
1647
- pattern[pdi] = fd;
1648
- if (pdi > fdi) {
1649
- pattern = pattern.slice(pdi);
1650
- } else if (fdi > pdi) {
1651
- file = file.slice(fdi);
1652
- }
1653
- }
1654
- }
1655
- }
1656
- const { optimizationLevel = 1 } = this.options;
1657
- if (optimizationLevel >= 2) {
1658
- file = this.levelTwoFileOptimize(file);
1659
- }
1660
- this.debug("matchOne", this, { file, pattern });
1661
- this.debug("matchOne", file.length, pattern.length);
1662
- for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
1663
- this.debug("matchOne loop");
1664
- var p = pattern[pi];
1665
- var f = file[fi];
1666
- this.debug(pattern, p, f);
1667
- if (p === false) {
1668
- return false;
1669
- }
1670
- if (p === GLOBSTAR) {
1671
- this.debug("GLOBSTAR", [pattern, p, f]);
1672
- var fr = fi;
1673
- var pr = pi + 1;
1674
- if (pr === pl) {
1675
- this.debug("** at the end");
1676
- for (; fi < fl; fi++) {
1677
- if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
1678
- return false;
1679
- }
1680
- return true;
1681
- }
1682
- while (fr < fl) {
1683
- var swallowee = file[fr];
1684
- this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
1685
- if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
1686
- this.debug("globstar found match!", fr, fl, swallowee);
1687
- return true;
1688
- } else {
1689
- if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
1690
- this.debug("dot detected!", file, fr, pattern, pr);
1691
- break;
1692
- }
1693
- this.debug("globstar swallow a segment, and continue");
1694
- fr++;
1695
- }
1696
- }
1697
- if (partial) {
1698
- this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
1699
- if (fr === fl) {
1700
- return true;
1701
- }
1702
- }
1703
- return false;
1704
- }
1705
- let hit;
1706
- if (typeof p === "string") {
1707
- hit = f === p;
1708
- this.debug("string match", p, f, hit);
1709
- } else {
1710
- hit = p.test(f);
1711
- this.debug("pattern match", p, f, hit);
1712
- }
1713
- if (!hit)
1714
- return false;
1715
- }
1716
- if (fi === fl && pi === pl) {
1717
- return true;
1718
- } else if (fi === fl) {
1719
- return partial;
1720
- } else if (pi === pl) {
1721
- return fi === fl - 1 && file[fi] === "";
1722
- } else {
1723
- throw new Error("wtf?");
1724
- }
1725
- }
1726
- braceExpand() {
1727
- return braceExpand(this.pattern, this.options);
1728
- }
1729
- parse(pattern) {
1730
- assertValidPattern(pattern);
1731
- const options = this.options;
1732
- if (pattern === "**")
1733
- return GLOBSTAR;
1734
- if (pattern === "")
1735
- return "";
1736
- let m;
1737
- let fastTest = null;
1738
- if (m = pattern.match(starRE)) {
1739
- fastTest = options.dot ? starTestDot : starTest;
1740
- } else if (m = pattern.match(starDotExtRE)) {
1741
- fastTest = (options.nocase ? options.dot ? starDotExtTestNocaseDot : starDotExtTestNocase : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]);
1742
- } else if (m = pattern.match(qmarksRE)) {
1743
- fastTest = (options.nocase ? options.dot ? qmarksTestNocaseDot : qmarksTestNocase : options.dot ? qmarksTestDot : qmarksTest)(m);
1744
- } else if (m = pattern.match(starDotStarRE)) {
1745
- fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
1746
- } else if (m = pattern.match(dotStarRE)) {
1747
- fastTest = dotStarTest;
1748
- }
1749
- const re = AST.fromGlob(pattern, this.options).toMMPattern();
1750
- if (fastTest && typeof re === "object") {
1751
- Reflect.defineProperty(re, "test", { value: fastTest });
1752
- }
1753
- return re;
1754
- }
1755
- makeRe() {
1756
- if (this.regexp || this.regexp === false)
1757
- return this.regexp;
1758
- const set = this.set;
1759
- if (!set.length) {
1760
- this.regexp = false;
1761
- return this.regexp;
1762
- }
1763
- const options = this.options;
1764
- const twoStar = options.noglobstar ? star2 : options.dot ? twoStarDot : twoStarNoDot;
1765
- const flags = new Set(options.nocase ? ["i"] : []);
1766
- let re = set.map((pattern) => {
1767
- const pp = pattern.map((p) => {
1768
- if (p instanceof RegExp) {
1769
- for (const f of p.flags.split(""))
1770
- flags.add(f);
1771
- }
1772
- return typeof p === "string" ? regExpEscape2(p) : p === GLOBSTAR ? GLOBSTAR : p._src;
1773
- });
1774
- pp.forEach((p, i2) => {
1775
- const next = pp[i2 + 1];
1776
- const prev = pp[i2 - 1];
1777
- if (p !== GLOBSTAR || prev === GLOBSTAR) {
1778
- return;
1779
- }
1780
- if (prev === void 0) {
1781
- if (next !== void 0 && next !== GLOBSTAR) {
1782
- pp[i2 + 1] = "(?:\\/|" + twoStar + "\\/)?" + next;
1783
- } else {
1784
- pp[i2] = twoStar;
1785
- }
1786
- } else if (next === void 0) {
1787
- pp[i2 - 1] = prev + "(?:\\/|" + twoStar + ")?";
1788
- } else if (next !== GLOBSTAR) {
1789
- pp[i2 - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
1790
- pp[i2 + 1] = GLOBSTAR;
1791
- }
1792
- });
1793
- return pp.filter((p) => p !== GLOBSTAR).join("/");
1794
- }).join("|");
1795
- const [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
1796
- re = "^" + open + re + close + "$";
1797
- if (this.negate)
1798
- re = "^(?!" + re + ").+$";
1799
- try {
1800
- this.regexp = new RegExp(re, [...flags].join(""));
1801
- } catch (ex) {
1802
- this.regexp = false;
1803
- }
1804
- return this.regexp;
1805
- }
1806
- slashSplit(p) {
1807
- if (this.preserveMultipleSlashes) {
1808
- return p.split("/");
1809
- } else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
1810
- return ["", ...p.split(/\/+/)];
1811
- } else {
1812
- return p.split(/\/+/);
1813
- }
1814
- }
1815
- match(f, partial = this.partial) {
1816
- this.debug("match", f, this.pattern);
1817
- if (this.comment) {
1818
- return false;
1819
- }
1820
- if (this.empty) {
1821
- return f === "";
1822
- }
1823
- if (f === "/" && partial) {
1824
- return true;
1825
- }
1826
- const options = this.options;
1827
- if (this.isWindows) {
1828
- f = f.split("\\").join("/");
1829
- }
1830
- const ff = this.slashSplit(f);
1831
- this.debug(this.pattern, "split", ff);
1832
- const set = this.set;
1833
- this.debug(this.pattern, "set", set);
1834
- let filename = ff[ff.length - 1];
1835
- if (!filename) {
1836
- for (let i2 = ff.length - 2; !filename && i2 >= 0; i2--) {
1837
- filename = ff[i2];
1838
- }
1839
- }
1840
- for (let i2 = 0; i2 < set.length; i2++) {
1841
- const pattern = set[i2];
1842
- let file = ff;
1843
- if (options.matchBase && pattern.length === 1) {
1844
- file = [filename];
1845
- }
1846
- const hit = this.matchOne(file, pattern, partial);
1847
- if (hit) {
1848
- if (options.flipNegate) {
1849
- return true;
1850
- }
1851
- return !this.negate;
1852
- }
1853
- }
1854
- if (options.flipNegate) {
1855
- return false;
1856
- }
1857
- return this.negate;
1858
- }
1859
- static defaults(def) {
1860
- return minimatch.defaults(def).Minimatch;
1861
- }
1862
- };
1863
- minimatch.AST = AST;
1864
- minimatch.Minimatch = Minimatch;
1865
- minimatch.escape = escape;
1866
- minimatch.unescape = unescape;
1867
-
1868
- // src/utils/query-nonce-meta-tag-content.ts
1869
- function queryNonceMetaTagContent(doc) {
1870
- var _a, _b, _c;
1871
- 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;
1872
- }
1873
-
1874
- // src/utils/regular-expression.ts
1875
- var escapeRegExpSpecialCharacters = (text) => {
1876
- return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1877
- };
1878
-
1879
- // src/utils/result.ts
1880
- var result_exports = {};
1881
- __export(result_exports, {
1882
- err: () => err,
1883
- map: () => map,
1884
- ok: () => ok,
1885
- unwrap: () => unwrap,
1886
- unwrapErr: () => unwrapErr
1887
- });
1888
- var ok = (value) => ({
1889
- isOk: true,
1890
- isErr: false,
1891
- value
1892
- });
1893
- var err = (value) => ({
1894
- isOk: false,
1895
- isErr: true,
1896
- value
1897
- });
1898
- function map(result, fn) {
1899
- if (result.isOk) {
1900
- const val = fn(result.value);
1901
- if (val instanceof Promise) {
1902
- return val.then((newVal) => ok(newVal));
1903
- } else {
1904
- return ok(val);
1905
- }
1906
- }
1907
- if (result.isErr) {
1908
- const value = result.value;
1909
- return err(value);
1910
- }
1911
- throw "should never get here";
1912
- }
1913
- var unwrap = (result) => {
1914
- if (result.isOk) {
1915
- return result.value;
1916
- } else {
1917
- throw result.value;
1918
- }
1919
- };
1920
- var unwrapErr = (result) => {
1921
- if (result.isErr) {
1922
- return result.value;
1923
- } else {
1924
- throw result.value;
1925
- }
1926
- };
1927
-
1928
272
  // src/utils/style.ts
1929
273
  function createStyleSheetIfNeededAndSupported(styles2) {
1930
274
  if (!supportsConstructableStylesheets) return void 0;
@@ -1989,8 +333,9 @@ function getHostSlotNodes(childNodes, hostName, slotName) {
1989
333
  let childNode;
1990
334
  for (; i2 < childNodes.length; i2++) {
1991
335
  childNode = childNodes[i2];
1992
- if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0)) {
336
+ if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0 || getSlotName(childNode) === slotName)) {
1993
337
  slottedNodes.push(childNode);
338
+ if (typeof slotName !== "undefined") return slottedNodes;
1994
339
  }
1995
340
  slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
1996
341
  }
@@ -2048,6 +393,18 @@ function patchSlotNode(node) {
2048
393
  node.assignedElements = assignedFactory(true);
2049
394
  node.assignedNodes = assignedFactory(false);
2050
395
  }
396
+ function dispatchSlotChangeEvent(elm) {
397
+ elm.dispatchEvent(new CustomEvent("slotchange", { bubbles: false, cancelable: false, composed: false }));
398
+ }
399
+ function findSlotFromSlottedNode(slottedNode, parentHost) {
400
+ var _a;
401
+ parentHost = parentHost || ((_a = slottedNode["s-ol"]) == null ? void 0 : _a.parentElement);
402
+ if (!parentHost) return { slotNode: null, slotName: "" };
403
+ const slotName = slottedNode["s-sn"] = getSlotName(slottedNode) || "";
404
+ const childNodes = internalCall(parentHost, "childNodes");
405
+ const slotNode = getHostSlotNodes(childNodes, parentHost.tagName, slotName)[0];
406
+ return { slotNode, slotName };
407
+ }
2051
408
  function internalCall(node, method) {
2052
409
  if ("__" + method in node) {
2053
410
  const toReturn = node["__" + method];
@@ -2072,6 +429,14 @@ var uniqueTime = (key, measureText) => {
2072
429
  };
2073
430
  }
2074
431
  };
432
+
433
+ // src/utils/query-nonce-meta-tag-content.ts
434
+ function queryNonceMetaTagContent(doc) {
435
+ var _a, _b, _c;
436
+ 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;
437
+ }
438
+
439
+ // src/runtime/styles.ts
2075
440
  var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
2076
441
  var registerStyle = (scopeId2, cssText, allowCS) => {
2077
442
  let style = styles.get(scopeId2);
@@ -2105,7 +470,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
2105
470
  }
2106
471
  if (!appliedStyles.has(scopeId2)) {
2107
472
  styleElm = win.document.createElement("style");
2108
- styleElm.innerHTML = style;
473
+ styleElm.textContent = style;
2109
474
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
2110
475
  if (nonce != null) {
2111
476
  styleElm.setAttribute("nonce", nonce);
@@ -2130,8 +495,8 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
2130
495
  }
2131
496
  } else {
2132
497
  const existingStyleContainer = styleContainerNode.querySelector("style");
2133
- if (existingStyleContainer) {
2134
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
498
+ if (existingStyleContainer && true) {
499
+ existingStyleContainer.textContent = style + existingStyleContainer.textContent;
2135
500
  } else {
2136
501
  styleContainerNode.prepend(styleElm);
2137
502
  }
@@ -2144,7 +509,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
2144
509
  styleContainerNode.insertBefore(styleElm, null);
2145
510
  }
2146
511
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
2147
- styleElm.innerHTML += SLOT_FB_CSS;
512
+ styleElm.textContent += SLOT_FB_CSS;
2148
513
  }
2149
514
  if (appliedStyles) {
2150
515
  appliedStyles.add(scopeId2);
@@ -2192,6 +557,15 @@ var attachStyles = (hostRef) => {
2192
557
  endAttachStyles();
2193
558
  };
2194
559
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
560
+
561
+ // src/utils/helpers.ts
562
+ var isDef = (v) => v != null && v !== void 0;
563
+ var isComplexType = (o) => {
564
+ o = typeof o;
565
+ return o === "object" || o === "function";
566
+ };
567
+
568
+ // src/runtime/vdom/h.ts
2195
569
  var h = (nodeName, vnodeData, ...children) => {
2196
570
  if (typeof nodeName === "string") {
2197
571
  nodeName = transformTag(nodeName);
@@ -2259,7 +633,8 @@ var newVNode = (tag, text) => {
2259
633
  const vnode = {
2260
634
  $flags$: 0,
2261
635
  $tag$: tag,
2262
- $text$: text,
636
+ // Normalize undefined to null to prevent rendering "undefined" as text
637
+ $text$: text != null ? text : null,
2263
638
  $elm$: null,
2264
639
  $children$: null
2265
640
  };
@@ -2306,18 +681,33 @@ var convertToPrivate = (node) => {
2306
681
  vnode.$name$ = node.vname;
2307
682
  return vnode;
2308
683
  };
2309
- var createSupportsRuleRe = (selector) => {
2310
- const safeSelector2 = escapeRegExpSpecialCharacters(selector);
2311
- return new RegExp(
2312
- // First capture group: match any context before the selector that's not inside @supports selector()
2313
- // Using negative lookahead to avoid matching inside @supports selector(...) condition
2314
- `(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
2315
- "g"
2316
- );
684
+
685
+ // src/runtime/normalize-watchers.ts
686
+ var normalizeWatchers = (raw) => {
687
+ if (!raw) return void 0;
688
+ const keys = Object.keys(raw);
689
+ if (keys.length === 0) return void 0;
690
+ let hasLegacy = false;
691
+ for (const propName of keys) {
692
+ if (hasLegacy) break;
693
+ for (const h2 of raw[propName]) {
694
+ if (typeof h2 === "string") {
695
+ hasLegacy = true;
696
+ break;
697
+ }
698
+ }
699
+ }
700
+ if (!hasLegacy) return raw;
701
+ const out = {};
702
+ for (const propName of keys) {
703
+ out[propName] = raw[propName].map(
704
+ (h2) => typeof h2 === "string" ? { [h2]: 0 } : h2
705
+ );
706
+ }
707
+ return out;
2317
708
  };
2318
- createSupportsRuleRe("::slotted");
2319
- createSupportsRuleRe(":host");
2320
- createSupportsRuleRe(":host-context");
709
+
710
+ // src/runtime/parse-property-value.ts
2321
711
  var parsePropertyValue = (propValue, propType, isFormAssociated) => {
2322
712
  if (propValue != null && !isComplexType(propValue)) {
2323
713
  if (propType & 4 /* Boolean */) {
@@ -2396,7 +786,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
2396
786
  }
2397
787
  } else if (memberName === "key") ; else if (memberName === "ref") {
2398
788
  if (newValue) {
2399
- newValue(elm);
789
+ queueRefAttachment(newValue, elm);
2400
790
  }
2401
791
  } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
2402
792
  if (memberName[2] === "-") {
@@ -2416,15 +806,45 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
2416
806
  plt.ael(elm, memberName, newValue, capture);
2417
807
  }
2418
808
  }
809
+ } else if (memberName[0] === "a" && memberName.startsWith("attr:")) {
810
+ const propName = memberName.slice(5);
811
+ let attrName;
812
+ {
813
+ const hostRef = getHostRef(elm);
814
+ if (hostRef && hostRef.$cmpMeta$ && hostRef.$cmpMeta$.$members$) {
815
+ const memberMeta = hostRef.$cmpMeta$.$members$[propName];
816
+ if (memberMeta && memberMeta[1]) {
817
+ attrName = memberMeta[1];
818
+ }
819
+ }
820
+ }
821
+ if (!attrName) {
822
+ attrName = propName.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
823
+ }
824
+ if (newValue == null || newValue === false) {
825
+ if (newValue !== false || elm.getAttribute(attrName) === "") {
826
+ elm.removeAttribute(attrName);
827
+ }
828
+ } else {
829
+ elm.setAttribute(attrName, newValue === true ? "" : newValue);
830
+ }
831
+ return;
832
+ } else if (memberName[0] === "p" && memberName.startsWith("prop:")) {
833
+ const propName = memberName.slice(5);
834
+ try {
835
+ elm[propName] = newValue;
836
+ } catch (e) {
837
+ }
838
+ return;
2419
839
  } else {
2420
840
  const isComplex = isComplexType(newValue);
2421
- if ((isProp || isComplex && newValue !== null) && true) {
841
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
2422
842
  try {
2423
843
  if (!elm.tagName.includes("-")) {
2424
844
  const n = newValue == null ? "" : newValue;
2425
845
  if (memberName === "list") {
2426
846
  isProp = false;
2427
- } else if (oldValue == null || elm[memberName] != n) {
847
+ } else if (oldValue == null || elm[memberName] !== n) {
2428
848
  if (typeof elm.__lookupSetter__(memberName) === "function") {
2429
849
  elm[memberName] = n;
2430
850
  } else {
@@ -2521,6 +941,8 @@ var useNativeShadowDom = false;
2521
941
  var checkSlotFallbackVisibility = false;
2522
942
  var checkSlotRelocate = false;
2523
943
  var isSvgMode = false;
944
+ var refCallbacksToRemove = [];
945
+ var refCallbacksToAttach = [];
2524
946
  var createElm = (oldParentVNode, newParentVNode, childIndex) => {
2525
947
  var _a;
2526
948
  const newVNode2 = newParentVNode.$children$[childIndex];
@@ -2543,7 +965,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
2543
965
  );
2544
966
  }
2545
967
  }
2546
- if (newVNode2.$text$ !== null) {
968
+ if (newVNode2.$text$ != null) {
2547
969
  elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
2548
970
  } else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
2549
971
  elm = newVNode2.$elm$ = win.document.createTextNode("");
@@ -2552,9 +974,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
2552
974
  }
2553
975
  } else {
2554
976
  if (!win.document) {
2555
- throw new Error(
2556
- "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."
2557
- );
977
+ throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");
2558
978
  }
2559
979
  elm = newVNode2.$elm$ = win.document.createElement(
2560
980
  !useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
@@ -2585,9 +1005,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
2585
1005
  patchSlotNode(elm);
2586
1006
  oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
2587
1007
  if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
2588
- {
2589
- putBackInOriginalLocation(oldParentVNode.$elm$, false);
2590
- }
1008
+ relocateToHostRoot(oldParentVNode.$elm$);
2591
1009
  }
2592
1010
  {
2593
1011
  addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
@@ -2596,9 +1014,37 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
2596
1014
  }
2597
1015
  return elm;
2598
1016
  };
1017
+ var relocateToHostRoot = (parentElm) => {
1018
+ plt.$flags$ |= 1 /* isTmpDisconnected */;
1019
+ const host = parentElm.closest(hostTagName.toLowerCase());
1020
+ if (host != null) {
1021
+ const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
1022
+ (ref) => ref["s-cr"]
1023
+ );
1024
+ const childNodeArray = Array.from(
1025
+ parentElm.__childNodes || parentElm.childNodes
1026
+ );
1027
+ for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
1028
+ if (childNode["s-sh"] != null) {
1029
+ insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
1030
+ childNode["s-sh"] = void 0;
1031
+ checkSlotRelocate = true;
1032
+ }
1033
+ }
1034
+ }
1035
+ plt.$flags$ &= -2 /* isTmpDisconnected */;
1036
+ };
2599
1037
  var putBackInOriginalLocation = (parentElm, recursive) => {
2600
1038
  plt.$flags$ |= 1 /* isTmpDisconnected */;
2601
1039
  const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
1040
+ if (parentElm["s-sr"]) {
1041
+ let node = parentElm;
1042
+ while (node = node.nextSibling) {
1043
+ if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
1044
+ oldSlotChildNodes.push(node);
1045
+ }
1046
+ }
1047
+ }
2602
1048
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
2603
1049
  const childNode = oldSlotChildNodes[i2];
2604
1050
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
@@ -2768,10 +1214,17 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
2768
1214
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
2769
1215
  const oldChildren = oldVNode.$children$;
2770
1216
  const newChildren = newVNode2.$children$;
1217
+ const tag = newVNode2.$tag$;
2771
1218
  const text = newVNode2.$text$;
2772
1219
  let defaultHolder;
2773
- if (text === null) {
1220
+ if (text == null) {
2774
1221
  {
1222
+ if (tag === "slot" && !useNativeShadowDom) {
1223
+ if (oldVNode.$name$ !== newVNode2.$name$) {
1224
+ newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
1225
+ relocateToHostRoot(newVNode2.$elm$.parentElement);
1226
+ }
1227
+ }
2775
1228
  updateElement(oldVNode, newVNode2, isSvgMode);
2776
1229
  }
2777
1230
  if (oldChildren !== null && newChildren !== null) {
@@ -2805,7 +1258,7 @@ var markSlotContentForRelocation = (elm) => {
2805
1258
  const slotName = childNode["s-sn"];
2806
1259
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
2807
1260
  node = hostContentNodes[j];
2808
- if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (true)) {
1261
+ if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
2809
1262
  if (isNodeLocatedInSlot(node, slotName)) {
2810
1263
  let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
2811
1264
  checkSlotFallbackVisibility = true;
@@ -2845,15 +1298,39 @@ var markSlotContentForRelocation = (elm) => {
2845
1298
  };
2846
1299
  var nullifyVNodeRefs = (vNode) => {
2847
1300
  {
2848
- vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
1301
+ if (vNode.$attrs$ && vNode.$attrs$.ref) {
1302
+ refCallbacksToRemove.push(() => vNode.$attrs$.ref(null));
1303
+ }
2849
1304
  vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
2850
1305
  }
2851
1306
  };
2852
- var insertBefore = (parent, newNode, reference) => {
2853
- if (typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
2854
- addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
1307
+ var queueRefAttachment = (refCallback, elm) => {
1308
+ {
1309
+ refCallbacksToAttach.push(() => refCallback(elm));
2855
1310
  }
1311
+ };
1312
+ var flushQueuedRefCallbacks = () => {
2856
1313
  {
1314
+ refCallbacksToRemove.forEach((cb) => cb());
1315
+ refCallbacksToRemove.length = 0;
1316
+ refCallbacksToAttach.forEach((cb) => cb());
1317
+ refCallbacksToAttach.length = 0;
1318
+ }
1319
+ };
1320
+ var insertBefore = (parent, newNode, reference, isInitialLoad) => {
1321
+ {
1322
+ if (typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
1323
+ addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
1324
+ } else if (typeof newNode["s-sn"] === "string") {
1325
+ parent.insertBefore(newNode, reference);
1326
+ const { slotNode } = findSlotFromSlottedNode(newNode);
1327
+ if (slotNode && !isInitialLoad) dispatchSlotChangeEvent(slotNode);
1328
+ return newNode;
1329
+ }
1330
+ }
1331
+ if (parent.__insertBefore) {
1332
+ return parent.__insertBefore(newNode, reference);
1333
+ } else {
2857
1334
  return parent == null ? void 0 : parent.insertBefore(newNode, reference);
2858
1335
  }
2859
1336
  };
@@ -2879,7 +1356,7 @@ function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
2879
1356
  }
2880
1357
  }
2881
1358
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
2882
- var _a, _b, _c, _d;
1359
+ var _a, _b, _c, _d, _e;
2883
1360
  const hostElm = hostRef.$hostElement$;
2884
1361
  const cmpMeta = hostRef.$cmpMeta$;
2885
1362
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
@@ -2923,7 +1400,12 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
2923
1400
  if (!nodeToRelocate["s-ol"] && win.document) {
2924
1401
  const orgLocationNode = win.document.createTextNode("");
2925
1402
  orgLocationNode["s-nr"] = nodeToRelocate;
2926
- insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
1403
+ insertBefore(
1404
+ nodeToRelocate.parentNode,
1405
+ nodeToRelocate["s-ol"] = orgLocationNode,
1406
+ nodeToRelocate,
1407
+ isInitialLoad
1408
+ );
2927
1409
  }
2928
1410
  }
2929
1411
  for (const relocateData of relocateNodes) {
@@ -2935,7 +1417,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
2935
1417
  if (slotRefNode) {
2936
1418
  const parentNodeRef = slotRefNode.parentNode;
2937
1419
  let insertBeforeNode = slotRefNode.nextSibling;
2938
- {
1420
+ if (insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
2939
1421
  let orgLocationNode = (_b = nodeToRelocate["s-ol"]) == null ? void 0 : _b.previousSibling;
2940
1422
  while (orgLocationNode) {
2941
1423
  let refNode = (_c = orgLocationNode["s-nr"]) != null ? _c : null;
@@ -2956,10 +1438,18 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
2956
1438
  const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
2957
1439
  if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
2958
1440
  if (nodeToRelocate !== insertBeforeNode) {
2959
- if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
2960
- nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
1441
+ insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode, isInitialLoad);
1442
+ if (nodeToRelocate.nodeType === 8 /* CommentNode */ && nodeToRelocate.nodeValue.startsWith("s-nt-")) {
1443
+ const textNode = win.document.createTextNode(nodeToRelocate.nodeValue.replace(/^s-nt-/, ""));
1444
+ textNode["s-hn"] = nodeToRelocate["s-hn"];
1445
+ textNode["s-sn"] = nodeToRelocate["s-sn"];
1446
+ textNode["s-sh"] = nodeToRelocate["s-sh"];
1447
+ textNode["s-sr"] = nodeToRelocate["s-sr"];
1448
+ textNode["s-ol"] = nodeToRelocate["s-ol"];
1449
+ textNode["s-ol"]["s-nr"] = textNode;
1450
+ insertBefore(nodeToRelocate.parentNode, textNode, nodeToRelocate, isInitialLoad);
1451
+ nodeToRelocate.parentNode.removeChild(nodeToRelocate);
2961
1452
  }
2962
- insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
2963
1453
  if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
2964
1454
  nodeToRelocate.hidden = (_d = nodeToRelocate["s-ih"]) != null ? _d : false;
2965
1455
  }
@@ -2977,7 +1467,26 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
2977
1467
  plt.$flags$ &= -2 /* isTmpDisconnected */;
2978
1468
  relocateNodes.length = 0;
2979
1469
  }
1470
+ if (!useNativeShadowDom && !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && hostElm["s-cr"]) {
1471
+ const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
1472
+ for (const childNode of children) {
1473
+ if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
1474
+ if (isInitialLoad && childNode["s-ih"] == null) {
1475
+ childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
1476
+ }
1477
+ if (childNode.nodeType === 1 /* ElementNode */) {
1478
+ childNode.hidden = true;
1479
+ } else if (childNode.nodeType === 3 /* TextNode */ && !!childNode.nodeValue.trim()) {
1480
+ const textCommentNode = win.document.createComment("s-nt-" + childNode.nodeValue);
1481
+ textCommentNode["s-sn"] = childNode["s-sn"];
1482
+ insertBefore(childNode.parentNode, textCommentNode, childNode, isInitialLoad);
1483
+ childNode.parentNode.removeChild(childNode);
1484
+ }
1485
+ }
1486
+ }
1487
+ }
2980
1488
  contentRef = void 0;
1489
+ flushQueuedRefCallbacks();
2981
1490
  };
2982
1491
 
2983
1492
  // src/runtime/update-component.ts
@@ -3023,6 +1532,10 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
3023
1532
  let maybePromise;
3024
1533
  if (isInitialLoad) {
3025
1534
  {
1535
+ if (hostRef.$deferredConnectedCallback$) {
1536
+ hostRef.$deferredConnectedCallback$ = false;
1537
+ safeCall(instance, "connectedCallback", void 0, elm);
1538
+ }
3026
1539
  {
3027
1540
  hostRef.$flags$ |= 256 /* isListenReady */;
3028
1541
  if (hostRef.$queuedListeners$) {
@@ -3042,8 +1555,8 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
3042
1555
  endSchedule();
3043
1556
  return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
3044
1557
  };
3045
- var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err2) => {
3046
- console.error(err2);
1558
+ var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err) => {
1559
+ console.error(err);
3047
1560
  fn();
3048
1561
  }) : fn();
3049
1562
  var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
@@ -3071,7 +1584,7 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
3071
1584
  if (childrenPromises.length === 0) {
3072
1585
  postUpdate();
3073
1586
  } else {
3074
- Promise.all(childrenPromises).then(postUpdate);
1587
+ Promise.all(childrenPromises).then(postUpdate).catch(postUpdate);
3075
1588
  hostRef.$flags$ |= 4 /* isWaitingForChildren */;
3076
1589
  childrenPromises.length = 0;
3077
1590
  }
@@ -3209,13 +1722,16 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
3209
1722
  });
3210
1723
  }
3211
1724
  }
3212
- if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1725
+ if (flags & 2 /* hasRendered */) {
3213
1726
  if (instance.componentShouldUpdate) {
3214
- if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
1727
+ const shouldUpdate = instance.componentShouldUpdate(newVal, oldVal, propName);
1728
+ if (shouldUpdate === false && !(flags & 16 /* isQueuedForUpdate */)) {
3215
1729
  return;
3216
1730
  }
3217
1731
  }
3218
- scheduleUpdate(hostRef, false);
1732
+ if (!(flags & 16 /* isQueuedForUpdate */)) {
1733
+ scheduleUpdate(hostRef, false);
1734
+ }
3219
1735
  }
3220
1736
  }
3221
1737
  };
@@ -3227,7 +1743,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
3227
1743
  if (cmpMeta.$members$ || BUILD.propChangeCallback) {
3228
1744
  {
3229
1745
  if (Cstr.watchers && !cmpMeta.$watchers$) {
3230
- cmpMeta.$watchers$ = Cstr.watchers;
1746
+ cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
3231
1747
  }
3232
1748
  if (Cstr.deserializers && !cmpMeta.$deserializers$) {
3233
1749
  cmpMeta.$deserializers$ = Cstr.deserializers;
@@ -3239,7 +1755,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
3239
1755
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
3240
1756
  members.map(([memberName, [memberFlags]]) => {
3241
1757
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
3242
- const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
1758
+ const { get: origGetter, set: origSetter } = getPropertyDescriptor(prototype, memberName) || {};
3243
1759
  if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
3244
1760
  if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
3245
1761
  if (flags & 1 /* isElementConstructor */ || !origGetter) {
@@ -3353,11 +1869,13 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
3353
1869
  return;
3354
1870
  }
3355
1871
  const propFlags = members.find(([m]) => m === propName);
3356
- if (propFlags && propFlags[1][0] & 4 /* Boolean */) {
1872
+ const isBooleanTarget = propFlags && propFlags[1][0] & 4 /* Boolean */;
1873
+ const isSpuriousBooleanRemoval = isBooleanTarget && newValue === null && this[propName] === void 0;
1874
+ if (isBooleanTarget) {
3357
1875
  newValue = newValue === null || newValue === "false" ? false : true;
3358
1876
  }
3359
1877
  const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
3360
- if (newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
1878
+ if (!isSpuriousBooleanRemoval && newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
3361
1879
  this[propName] = newValue;
3362
1880
  }
3363
1881
  });
@@ -3384,71 +1902,87 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
3384
1902
  // src/runtime/initialize-component.ts
3385
1903
  var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
3386
1904
  let Cstr;
3387
- if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
3388
- hostRef.$flags$ |= 32 /* hasInitializedComponent */;
3389
- const bundleId = cmpMeta.$lazyBundleId$;
3390
- if (bundleId) {
3391
- const CstrImport = loadModule(cmpMeta, hostRef);
3392
- if (CstrImport && "then" in CstrImport) {
3393
- const endLoad = uniqueTime();
3394
- Cstr = await CstrImport;
3395
- endLoad();
3396
- } else {
3397
- Cstr = CstrImport;
3398
- }
3399
- if (!Cstr) {
3400
- throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
3401
- }
3402
- if (!Cstr.isProxied) {
1905
+ try {
1906
+ if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1907
+ hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1908
+ const bundleId = cmpMeta.$lazyBundleId$;
1909
+ if (bundleId) {
1910
+ const CstrImport = loadModule(cmpMeta, hostRef);
1911
+ if (CstrImport && "then" in CstrImport) {
1912
+ const endLoad = uniqueTime();
1913
+ Cstr = await CstrImport;
1914
+ endLoad();
1915
+ } else {
1916
+ Cstr = CstrImport;
1917
+ }
1918
+ if (!Cstr) {
1919
+ throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
1920
+ }
1921
+ if (!Cstr.isProxied) {
1922
+ {
1923
+ cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
1924
+ cmpMeta.$serializers$ = Cstr.serializers;
1925
+ cmpMeta.$deserializers$ = Cstr.deserializers;
1926
+ }
1927
+ proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
1928
+ Cstr.isProxied = true;
1929
+ }
1930
+ const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
3403
1931
  {
3404
- cmpMeta.$watchers$ = Cstr.watchers;
3405
- cmpMeta.$serializers$ = Cstr.serializers;
3406
- cmpMeta.$deserializers$ = Cstr.deserializers;
1932
+ hostRef.$flags$ |= 8 /* isConstructingInstance */;
3407
1933
  }
3408
- proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
3409
- Cstr.isProxied = true;
3410
- }
3411
- const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
3412
- {
3413
- hostRef.$flags$ |= 8 /* isConstructingInstance */;
3414
- }
3415
- try {
3416
- new Cstr(hostRef);
3417
- } catch (e) {
3418
- consoleError(e, elm);
3419
- }
3420
- {
3421
- hostRef.$flags$ &= -9 /* isConstructingInstance */;
1934
+ try {
1935
+ new Cstr(hostRef);
1936
+ } catch (e) {
1937
+ consoleError(e, elm);
1938
+ }
1939
+ {
1940
+ hostRef.$flags$ &= -9 /* isConstructingInstance */;
1941
+ }
1942
+ {
1943
+ hostRef.$flags$ |= 128 /* isWatchReady */;
1944
+ }
1945
+ endNewInstance();
1946
+ const needsDeferredCallback = cmpMeta.$flags$ & 4 /* hasSlotRelocation */;
1947
+ if (!needsDeferredCallback) {
1948
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1949
+ } else {
1950
+ hostRef.$deferredConnectedCallback$ = true;
1951
+ }
1952
+ } else {
1953
+ Cstr = elm.constructor;
1954
+ const cmpTag = elm.localName;
1955
+ customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
3422
1956
  }
3423
- {
3424
- hostRef.$flags$ |= 128 /* isWatchReady */;
1957
+ if (Cstr && Cstr.style) {
1958
+ let style;
1959
+ if (typeof Cstr.style === "string") {
1960
+ style = Cstr.style;
1961
+ }
1962
+ const scopeId2 = getScopeId(cmpMeta);
1963
+ if (!styles.has(scopeId2) || BUILD.hotModuleReplacement) {
1964
+ const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
1965
+ registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
1966
+ endRegisterStyles();
1967
+ }
3425
1968
  }
3426
- endNewInstance();
3427
- fireConnectedCallback(hostRef.$lazyInstance$, elm);
1969
+ }
1970
+ const ancestorComponent = hostRef.$ancestorComponent$;
1971
+ const schedule = () => scheduleUpdate(hostRef, true);
1972
+ if (ancestorComponent && ancestorComponent["s-rc"]) {
1973
+ ancestorComponent["s-rc"].push(schedule);
3428
1974
  } else {
3429
- Cstr = elm.constructor;
3430
- const cmpTag = elm.localName;
3431
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1975
+ schedule();
3432
1976
  }
3433
- if (Cstr && Cstr.style) {
3434
- let style;
3435
- if (typeof Cstr.style === "string") {
3436
- style = Cstr.style;
3437
- }
3438
- const scopeId2 = getScopeId(cmpMeta);
3439
- if (!styles.has(scopeId2) || BUILD.hotModuleReplacement) {
3440
- const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
3441
- registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
3442
- endRegisterStyles();
3443
- }
1977
+ } catch (e) {
1978
+ consoleError(e, elm);
1979
+ if (hostRef.$onRenderResolve$) {
1980
+ hostRef.$onRenderResolve$();
1981
+ hostRef.$onRenderResolve$ = void 0;
1982
+ }
1983
+ if (hostRef.$onReadyResolve$) {
1984
+ hostRef.$onReadyResolve$(elm);
3444
1985
  }
3445
- }
3446
- const ancestorComponent = hostRef.$ancestorComponent$;
3447
- const schedule = () => scheduleUpdate(hostRef, true);
3448
- if (ancestorComponent && ancestorComponent["s-rc"]) {
3449
- ancestorComponent["s-rc"].push(schedule);
3450
- } else {
3451
- schedule();
3452
1986
  }
3453
1987
  };
3454
1988
  var fireConnectedCallback = (instance, elm) => {
@@ -3485,7 +2019,7 @@ var connectedCallback = (elm) => {
3485
2019
  }
3486
2020
  if (cmpMeta.$members$) {
3487
2021
  Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
3488
- if (memberFlags & 31 /* Prop */ && memberName in elm && elm[memberName] !== Object.prototype[memberName]) {
2022
+ if (memberFlags & 31 /* Prop */ && Object.prototype.hasOwnProperty.call(elm, memberName)) {
3489
2023
  const value = elm[memberName];
3490
2024
  delete elm[memberName];
3491
2025
  elm[memberName] = value;
@@ -3566,7 +2100,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3566
2100
  let hasSlotRelocation = false;
3567
2101
  lazyBundles.map((lazyBundle) => {
3568
2102
  lazyBundle[1].map((compactMeta) => {
3569
- var _a2, _b, _c;
2103
+ var _a2, _b;
3570
2104
  const cmpMeta = {
3571
2105
  $flags$: compactMeta[0],
3572
2106
  $tagName$: compactMeta[1],
@@ -3586,16 +2120,18 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3586
2120
  cmpMeta.$attrsToReflect$ = [];
3587
2121
  }
3588
2122
  {
3589
- cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
3590
- cmpMeta.$serializers$ = (_b = compactMeta[5]) != null ? _b : {};
3591
- cmpMeta.$deserializers$ = (_c = compactMeta[6]) != null ? _c : {};
2123
+ cmpMeta.$watchers$ = normalizeWatchers(compactMeta[4]);
2124
+ cmpMeta.$serializers$ = (_a2 = compactMeta[5]) != null ? _a2 : {};
2125
+ cmpMeta.$deserializers$ = (_b = compactMeta[6]) != null ? _b : {};
3592
2126
  }
3593
2127
  const tagName = transformTag(cmpMeta.$tagName$);
3594
2128
  const HostElement = class extends HTMLElement {
2129
+ ["s-p"];
2130
+ ["s-rc"];
2131
+ hasRegisteredEventListeners = false;
3595
2132
  // StencilLazyHost
3596
2133
  constructor(self) {
3597
2134
  super(self);
3598
- this.hasRegisteredEventListeners = false;
3599
2135
  self = this;
3600
2136
  registerHost(self, cmpMeta);
3601
2137
  if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {