@heartlandone/vega 2.83.0 → 2.85.0

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 (477) hide show
  1. package/dist/cjs/{accessibility-bfa227f6.js → accessibility-a5ef2038.js} +3 -2
  2. package/dist/cjs/{app-globals-40b1b1b2.js → app-globals-54327b0a.js} +7 -7
  3. package/dist/cjs/{child-nodes-event-prevent-slimmer-9b7095a4.js → child-nodes-event-prevent-slimmer-f3979a03.js} +1 -1
  4. package/dist/cjs/{code-block-b1f8aded.js → code-block-6da521e6.js} +24 -40
  5. package/dist/cjs/{component-value-history-controller-slimmer.abstract-99fbd1f2.js → component-value-history-controller-slimmer.abstract-f3f35f94.js} +3 -3
  6. package/dist/cjs/{content-state-648652b4.js → content-state-89fafb3b.js} +2 -2
  7. package/dist/cjs/{date-required-rule-6addf5dd.js → date-required-rule-0dd83683.js} +1 -1
  8. package/dist/cjs/{design-token-93070bb8.js → design-token-4b3509dd.js} +3 -3
  9. package/dist/cjs/{element-appender-slimmer-52c2b455.js → element-appender-slimmer-2b4e0a62.js} +2 -2
  10. package/dist/cjs/{event-emit-slimmer-bcb458b2.js → event-emit-slimmer-80e1c8ca.js} +1 -1
  11. package/dist/cjs/{form-field-controller-slimmer-0f3a028e.js → form-field-controller-slimmer-a07e3de0.js} +1 -1
  12. package/dist/cjs/{image-annotation-action-0339e983.js → image-annotation-action-025389a7.js} +3 -3
  13. package/dist/cjs/{immutable-map-edf24b54.js → immutable-map-d711339d.js} +16 -4
  14. package/dist/cjs/index-58ea899e.js +4 -0
  15. package/dist/cjs/index.cjs.js +17 -17
  16. package/dist/cjs/{inject-keyboard-manager-2d9c4f92.js → inject-keyboard-manager-ff8735b8.js} +1 -1
  17. package/dist/cjs/{internal-translation-controller-fb1532f4.js → internal-translation-controller-8360a89c.js} +2 -0
  18. package/dist/cjs/{internal-vega-event-manager-fef893bf.js → internal-vega-event-manager-7e0d966d.js} +4 -2
  19. package/dist/cjs/{keyboard-manager-5ed6c472.js → keyboard-manager-cc446230.js} +1 -1
  20. package/dist/cjs/{keyboard-manager-slimmer-879ff4f3.js → keyboard-manager-slimmer-a10b7d6f.js} +1 -1
  21. package/dist/cjs/loader.cjs.js +11 -11
  22. package/dist/cjs/{month-view-generator-d262e6ce.js → month-view-generator-41b6c6b6.js} +1 -1
  23. package/dist/cjs/{public-rules-bce88d4e.js → public-rules-fc52d624.js} +7 -7
  24. package/dist/cjs/{range-5bd6d72b.js → range-93cc8ab1.js} +1 -1
  25. package/dist/cjs/{responsive-format-facade-2cab7344.js → responsive-format-facade-5f6cd211.js} +1 -1
  26. package/dist/cjs/{rich-text-editor-required-rule-e8a922be.js → rich-text-editor-required-rule-fd3711fb.js} +1 -1
  27. package/dist/cjs/{split-cell-operation-bb388de6.js → split-cell-operation-532fb9f0.js} +3 -3
  28. package/dist/cjs/{state-border-formatter-4e5e4ed0.js → state-border-formatter-d1c80c1d.js} +1 -1
  29. package/dist/cjs/{string-format-strategy.abstract-9a35e3b4.js → string-format-strategy.abstract-b39da0dd.js} +1 -1
  30. package/dist/cjs/{string-input-formatter-slimmer-1018ddec.js → string-input-formatter-slimmer-127cf2b8.js} +1 -1
  31. package/dist/cjs/{string-mask-strategy-3aa17744.js → string-mask-strategy-524d0f69.js} +2 -2
  32. package/dist/cjs/{style-formatter-2226c869.js → style-formatter-c201e7d0.js} +2 -2
  33. package/dist/cjs/{time-required-rule-970dfdca.js → time-required-rule-ecb45905.js} +1 -1
  34. package/dist/cjs/{token-extension-361273fb.js → token-extension-4f6ed976.js} +268 -223
  35. package/dist/cjs/{translation-slimmer-d0c77ad2.js → translation-slimmer-3cd7d3b2.js} +1 -1
  36. package/dist/cjs/{type-guard-3ec852d7.js → type-guard-2e97fc56.js} +14 -1
  37. package/dist/cjs/{valid-credit-card-number-rule-99d1bb34.js → valid-credit-card-number-rule-2d7d20ce.js} +1 -1
  38. package/dist/cjs/vega-accordion.cjs.entry.js +8 -8
  39. package/dist/cjs/vega-app-header-button.cjs.entry.js +29 -10
  40. package/dist/cjs/vega-banner.cjs.entry.js +4 -4
  41. package/dist/cjs/vega-box.cjs.entry.js +6 -6
  42. package/dist/cjs/vega-breadcrumb.cjs.entry.js +4 -4
  43. package/dist/cjs/vega-button-circle.cjs.entry.js +9 -9
  44. package/dist/cjs/vega-button-group_2.cjs.entry.js +4 -4
  45. package/dist/cjs/vega-button-link.cjs.entry.js +4 -4
  46. package/dist/cjs/vega-button.cjs.entry.js +7 -7
  47. package/dist/cjs/vega-calendar_4.cjs.entry.js +9 -9
  48. package/dist/cjs/vega-card.cjs.entry.js +5 -5
  49. package/dist/cjs/vega-carousel.cjs.entry.js +7 -7
  50. package/dist/cjs/vega-checkbox_2.cjs.entry.js +21 -7
  51. package/dist/cjs/vega-chip.cjs.entry.js +10 -10
  52. package/dist/cjs/vega-code-block.cjs.entry.js +12 -12
  53. package/dist/cjs/vega-color-picker.cjs.entry.js +6 -6
  54. package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +769 -0
  55. package/dist/cjs/vega-color-swatch.cjs.entry.js +12 -12
  56. package/dist/cjs/vega-combo-box.cjs.entry.js +10 -10
  57. package/dist/cjs/vega-date-picker_2.cjs.entry.js +18 -18
  58. package/dist/cjs/vega-dialog_2.cjs.entry.js +191 -86
  59. package/dist/cjs/vega-divider.cjs.entry.js +5 -5
  60. package/dist/cjs/vega-dropdown_5.cjs.entry.js +12 -12
  61. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  62. package/dist/cjs/{vega-event-id-c08ce3d3.js → vega-event-id-d9994eb3.js} +2 -0
  63. package/dist/cjs/vega-field-label.cjs.entry.js +4 -4
  64. package/dist/cjs/vega-file-uploader.cjs.entry.js +7 -7
  65. package/dist/cjs/vega-flag-icon.cjs.entry.js +5 -5
  66. package/dist/cjs/vega-flex.cjs.entry.js +6 -6
  67. package/dist/cjs/vega-font.cjs.entry.js +5 -5
  68. package/dist/cjs/vega-form.cjs.entry.js +8 -8
  69. package/dist/cjs/vega-grid.cjs.entry.js +5 -5
  70. package/dist/cjs/vega-icon.cjs.entry.js +5 -5
  71. package/dist/cjs/vega-image-uploader.cjs.entry.js +10 -10
  72. package/dist/cjs/vega-input-credit-card.cjs.entry.js +10 -10
  73. package/dist/cjs/vega-input-numeric.cjs.entry.js +9 -9
  74. package/dist/cjs/vega-input-passcode.cjs.entry.js +9 -9
  75. package/dist/cjs/vega-input-phone-number.cjs.entry.js +8 -8
  76. package/dist/cjs/vega-input-range.cjs.entry.js +8 -8
  77. package/dist/cjs/vega-input-select.cjs.entry.js +10 -10
  78. package/dist/cjs/vega-input.cjs.entry.js +10 -10
  79. package/dist/cjs/vega-item-toggle.cjs.entry.js +3 -3
  80. package/dist/cjs/vega-left-nav_5.cjs.entry.js +10 -10
  81. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
  82. package/dist/cjs/vega-page-notification_2.cjs.entry.js +2 -2
  83. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +3 -3
  84. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +3 -3
  85. package/dist/cjs/vega-pagination.cjs.entry.js +8 -8
  86. package/dist/cjs/vega-popover_2.cjs.entry.js +11 -11
  87. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +7 -7
  88. package/dist/cjs/vega-radio_2.cjs.entry.js +10 -10
  89. package/dist/cjs/vega-rich-text-content.cjs.entry.js +7 -7
  90. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +32 -17
  91. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +12 -12
  92. package/dist/cjs/vega-segment-control.cjs.entry.js +3 -3
  93. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +9 -9
  94. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +7 -7
  95. package/dist/cjs/vega-sidenav_3.cjs.entry.js +7 -7
  96. package/dist/cjs/vega-signature-capture.cjs.entry.js +10 -10
  97. package/dist/cjs/vega-stepper.cjs.entry.js +6 -6
  98. package/dist/cjs/vega-tab-group_2.cjs.entry.js +5 -5
  99. package/dist/cjs/vega-table_11.cjs.entry.js +1177 -287
  100. package/dist/cjs/vega-text.cjs.entry.js +36 -1
  101. package/dist/cjs/vega-textarea.cjs.entry.js +6 -6
  102. package/dist/cjs/vega-time-picker_2.cjs.entry.js +51 -20
  103. package/dist/cjs/vega-toggle-switch.cjs.entry.js +6 -6
  104. package/dist/cjs/vega-tooltip_2.cjs.entry.js +6 -6
  105. package/dist/cjs/vega.cjs.js +11 -11
  106. package/dist/collection/collection-manifest.json +6 -0
  107. package/dist/collection/components/vega-app-header-button/slimmers/renderers/vega-app-header-button-dropdown-renderer.js +14 -1
  108. package/dist/collection/components/vega-app-header-button/vega-app-header-button.js +46 -3
  109. package/dist/collection/components/vega-checkbox/vega-checkbox.js +16 -0
  110. package/dist/collection/components/vega-color-swatch/slimmers/renderers/vega-color-swatch-renderer.js +2 -2
  111. package/dist/collection/components/vega-color-swatch/vega-color-swatch-picker/assets/hashtag.js +3 -0
  112. package/dist/collection/components/vega-color-swatch/vega-color-swatch-picker/slimmers/controllers/color-swatch-picker-color-format-controller.js +64 -0
  113. package/dist/collection/components/vega-color-swatch/vega-color-swatch-picker/slimmers/controllers/color-swatch-picker-value-controller.js +65 -0
  114. package/dist/collection/components/vega-color-swatch/vega-color-swatch-picker/slimmers/renderers/color-swatch-grid-renderer.js +59 -0
  115. package/dist/collection/components/vega-color-swatch/vega-color-swatch-picker/slimmers/renderers/color-swatch-input-renderer.js +83 -0
  116. package/dist/collection/components/vega-color-swatch/vega-color-swatch-picker/slimmers/renderers/color-swatch-picker-renderer.js +134 -0
  117. package/dist/collection/components/vega-color-swatch/vega-color-swatch-picker/vega-color-swatch-picker.css +67 -0
  118. package/dist/collection/components/vega-color-swatch/vega-color-swatch-picker/vega-color-swatch-picker.js +600 -0
  119. package/dist/collection/components/vega-color-swatch/vega-color-swatch.js +6 -6
  120. package/dist/collection/components/vega-dialog/vega-dialog.css +1 -0
  121. package/dist/collection/components/vega-dialog/vega-dialog.js +1 -1
  122. package/dist/collection/components/vega-grid/vega-grid.js +2 -2
  123. package/dist/collection/components/vega-input/vega-input.js +1 -1
  124. package/dist/collection/components/vega-input-select/vega-input-select.js +1 -1
  125. package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-padding-state-controller.js +43 -0
  126. package/dist/collection/components/vega-modal/slimmers/models/vega-modal-section-padding-state.js +56 -0
  127. package/dist/collection/components/vega-modal/slimmers/renderers/vega-modal-renderer.js +11 -11
  128. package/dist/collection/components/vega-modal/vega-modal.css +20 -21
  129. package/dist/collection/components/vega-modal/vega-modal.js +19 -3
  130. package/dist/collection/components/vega-rich-text-editor/dto/annotations/text-style-annotation.js +4 -39
  131. package/dist/collection/components/vega-rich-text-editor/dto/annotations/text-style-default-styles.js +30 -0
  132. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-dynamic-popover-renderer.js +53 -51
  133. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.js +40 -10
  134. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-setting-popover-renderer.js +75 -62
  135. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-extension.js +1 -0
  136. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/text-styles-toolbar-button-slimmer.js +15 -0
  137. package/dist/collection/components/vega-table/slimmers/controllers/vega-table-expand-row-controller.js +88 -4
  138. package/dist/collection/components/vega-table/slimmers/controllers/vega-table-row-draggable-controller.js +132 -0
  139. package/dist/collection/components/vega-table/slimmers/controllers/vega-table-sort-controller.js +14 -0
  140. package/dist/collection/components/vega-table/slimmers/renderers/vega-table-body-renderer.js +8 -5
  141. package/dist/collection/components/vega-table/slimmers/renderers/vega-table-col-group-renderer.js +6 -2
  142. package/dist/collection/components/vega-table/slimmers/renderers/vega-table-pinned-renderer.js +8 -2
  143. package/dist/collection/components/vega-table/utils.js +4 -3
  144. package/dist/collection/components/vega-table/vega-table-expand-row/slimmers/controllers/vega-table-expand-row-col-span-controller.js +13 -1
  145. package/dist/collection/components/vega-table/vega-table-expand-row/slimmers/controllers/vega-table-expand-row-state-controller.js +7 -0
  146. package/dist/collection/components/vega-table/vega-table-expand-row/vega-table-expand-row.js +7 -0
  147. package/dist/collection/components/vega-table/vega-table-foot-row/slimmers/controllers/vega-table-foot-row-state-controller.js +10 -3
  148. package/dist/collection/components/vega-table/vega-table-foot-row/slimmers/renderers/vega-table-foot-row-renderer.js +9 -2
  149. package/dist/collection/components/vega-table/vega-table-foot-row/vega-table-foot-row.js +4 -3
  150. package/dist/collection/components/vega-table/vega-table-head/vega-table-head.js +5 -0
  151. package/dist/collection/components/vega-table/vega-table-head-row/slimmers/controllers/vega-table-head-row-state-controller.js +10 -3
  152. package/dist/collection/components/vega-table/vega-table-head-row/slimmers/renderers/vega-table-head-row-renderer.js +12 -2
  153. package/dist/collection/components/vega-table/vega-table-head-row/vega-table-head-row.js +5 -4
  154. package/dist/collection/components/vega-table/vega-table-row/slimmers/controllers/vega-table-row-state-controller.js +22 -1
  155. package/dist/collection/components/vega-table/vega-table-row/slimmers/renderers/vega-table-row-renderer.js +19 -4
  156. package/dist/collection/components/vega-table/vega-table-row/vega-table-row.css +6 -0
  157. package/dist/collection/components/vega-table/vega-table-row/vega-table-row.js +11 -1
  158. package/dist/collection/components/vega-table/vega-table.css +5 -0
  159. package/dist/collection/components/vega-table/vega-table.js +135 -11
  160. package/dist/collection/components/vega-text/slimmers/renderers/vega-text-tooltip-renderer.js +36 -1
  161. package/dist/collection/components/vega-time-picker/slimmers/renderers/vega-time-picker-range-clear-button-renderer.js +13 -5
  162. package/dist/collection/components/vega-time-picker/slimmers/renderers/vega-time-picker-single-input-renderer.js +4 -1
  163. package/dist/collection/components/vega-time-picker/vega-time-picker.js +44 -0
  164. package/dist/collection/constants/ui.js +1 -0
  165. package/dist/collection/global/icons/grip-dots-vertical.js +3 -0
  166. package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +4 -2
  167. package/dist/collection/helpers/event-manager/event-id/vega-event-id.js +1 -0
  168. package/dist/collection/helpers/immutable/immutable-map.js +16 -4
  169. package/dist/collection/helpers/slimmers/draggable-element-slimmer.js +508 -0
  170. package/dist/collection/helpers/slimmers/popover-nested-slot-projection-slimmer.js +118 -0
  171. package/dist/collection/helpers/translation/locales/en.js +2 -0
  172. package/dist/collection/types/type-guard.js +12 -0
  173. package/dist/collection/utils/accessibility.js +3 -2
  174. package/dist/collection/value-model-adapters/angular-ng-model-accessor-adapter.js +1 -0
  175. package/dist/collection/value-model-adapters/vue-component-v-model-adaptor.js +1 -0
  176. package/dist/esm/{accessibility-e5fd0fab.js → accessibility-524cabd2.js} +3 -2
  177. package/dist/esm/{app-globals-f67d0eaf.js → app-globals-b1999c09.js} +7 -7
  178. package/dist/esm/{aria-dialog-focusable-trap-slimmer-853a91de.js → aria-dialog-focusable-trap-slimmer-6eb79723.js} +1 -1
  179. package/dist/esm/{child-nodes-event-prevent-slimmer-9c24d4fc.js → child-nodes-event-prevent-slimmer-75f93d85.js} +1 -1
  180. package/dist/esm/{code-block-b8be290a.js → code-block-e43c8120.js} +25 -41
  181. package/dist/esm/{component-value-history-controller-slimmer.abstract-10ccf8e6.js → component-value-history-controller-slimmer.abstract-60c1910e.js} +4 -4
  182. package/dist/esm/{content-state-72b513d1.js → content-state-d363f2ca.js} +3 -3
  183. package/dist/esm/{date-required-rule-891a6a57.js → date-required-rule-a84c21d4.js} +1 -1
  184. package/dist/esm/{design-token-59d07aa2.js → design-token-57de4f4f.js} +3 -3
  185. package/dist/esm/{element-appender-slimmer-29c94a18.js → element-appender-slimmer-05f487d7.js} +3 -3
  186. package/dist/esm/{event-emit-slimmer-32da9d90.js → event-emit-slimmer-1c57093d.js} +1 -1
  187. package/dist/esm/{form-field-controller-slimmer-899864a8.js → form-field-controller-slimmer-ae8478b5.js} +3 -3
  188. package/dist/esm/{image-annotation-action-ebd6c421.js → image-annotation-action-008ca25b.js} +3 -3
  189. package/dist/esm/{immutable-map-612922a2.js → immutable-map-4fe22b11.js} +16 -4
  190. package/dist/esm/index-090d31ca.js +4 -0
  191. package/dist/esm/index.js +17 -17
  192. package/dist/esm/{inject-keyboard-manager-dc1d7135.js → inject-keyboard-manager-1ceb9ee0.js} +1 -1
  193. package/dist/esm/{internal-translation-controller-4fb104b2.js → internal-translation-controller-d7dee4a0.js} +2 -0
  194. package/dist/esm/{internal-vega-event-manager-8a657bac.js → internal-vega-event-manager-7cdf3c28.js} +4 -2
  195. package/dist/esm/{keyboard-manager-6ea9968b.js → keyboard-manager-50a1d90e.js} +1 -1
  196. package/dist/esm/{keyboard-manager-slimmer-7eed4734.js → keyboard-manager-slimmer-3891ee20.js} +1 -1
  197. package/dist/esm/loader.js +12 -12
  198. package/dist/esm/{month-view-generator-aaa27fce.js → month-view-generator-70c597a6.js} +1 -1
  199. package/dist/esm/{public-rules-f2005e11.js → public-rules-1561e357.js} +8 -8
  200. package/dist/esm/{range-ed532278.js → range-784d5ec8.js} +1 -1
  201. package/dist/esm/{responsive-format-facade-e9926018.js → responsive-format-facade-456a9f16.js} +1 -1
  202. package/dist/esm/{rich-text-editor-required-rule-b559cf1a.js → rich-text-editor-required-rule-8768bc8d.js} +1 -1
  203. package/dist/esm/{split-cell-operation-5587f594.js → split-cell-operation-35ce149b.js} +4 -4
  204. package/dist/esm/{state-border-formatter-be51463d.js → state-border-formatter-afac8d33.js} +1 -1
  205. package/dist/esm/{string-format-strategy.abstract-0157b3c5.js → string-format-strategy.abstract-f9907969.js} +1 -1
  206. package/dist/esm/{string-input-formatter-slimmer-33ed3478.js → string-input-formatter-slimmer-4059080b.js} +3 -3
  207. package/dist/esm/{string-mask-strategy-b58891b5.js → string-mask-strategy-5f655300.js} +2 -2
  208. package/dist/esm/{style-formatter-9662ae88.js → style-formatter-ee52d8d0.js} +2 -2
  209. package/dist/esm/{sub-state-notify-slimmer-1f907173.js → sub-state-notify-slimmer-63ecb465.js} +1 -1
  210. package/dist/esm/{sub-state-observer-slimmer-090c500a.js → sub-state-observer-slimmer-2adbbe00.js} +1 -1
  211. package/dist/esm/{time-required-rule-a9dc8473.js → time-required-rule-db873c19.js} +1 -1
  212. package/dist/esm/{token-extension-0710dbc5.js → token-extension-23b5ab65.js} +268 -223
  213. package/dist/esm/{translation-slimmer-4faae5a3.js → translation-slimmer-5e2bff5f.js} +1 -1
  214. package/dist/esm/{type-guard-152070e9.js → type-guard-adc244fd.js} +14 -2
  215. package/dist/esm/{valid-credit-card-number-rule-a7907cb7.js → valid-credit-card-number-rule-a826dd49.js} +1 -1
  216. package/dist/esm/vega-accordion.entry.js +8 -8
  217. package/dist/esm/vega-app-header-button.entry.js +29 -10
  218. package/dist/esm/vega-banner.entry.js +4 -4
  219. package/dist/esm/vega-box.entry.js +6 -6
  220. package/dist/esm/vega-breadcrumb.entry.js +4 -4
  221. package/dist/esm/vega-button-circle.entry.js +10 -10
  222. package/dist/esm/vega-button-group_2.entry.js +7 -7
  223. package/dist/esm/vega-button-link.entry.js +4 -4
  224. package/dist/esm/vega-button.entry.js +8 -8
  225. package/dist/esm/vega-calendar_4.entry.js +12 -12
  226. package/dist/esm/vega-card.entry.js +5 -5
  227. package/dist/esm/vega-carousel.entry.js +7 -7
  228. package/dist/esm/vega-checkbox_2.entry.js +23 -9
  229. package/dist/esm/vega-chip.entry.js +10 -10
  230. package/dist/esm/vega-code-block.entry.js +13 -13
  231. package/dist/esm/vega-color-picker.entry.js +8 -8
  232. package/dist/esm/vega-color-swatch-picker.entry.js +765 -0
  233. package/dist/esm/vega-color-swatch.entry.js +12 -12
  234. package/dist/esm/vega-combo-box.entry.js +12 -12
  235. package/dist/esm/vega-date-picker_2.entry.js +22 -22
  236. package/dist/esm/vega-dialog_2.entry.js +193 -88
  237. package/dist/esm/vega-divider.entry.js +5 -5
  238. package/dist/esm/vega-dropdown_5.entry.js +16 -16
  239. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  240. package/dist/esm/{vega-event-id-4ede557a.js → vega-event-id-a6ccca66.js} +2 -1
  241. package/dist/esm/vega-field-label.entry.js +4 -4
  242. package/dist/esm/vega-file-uploader.entry.js +9 -9
  243. package/dist/esm/vega-flag-icon.entry.js +5 -5
  244. package/dist/esm/vega-flex.entry.js +6 -6
  245. package/dist/esm/vega-font.entry.js +5 -5
  246. package/dist/esm/vega-form.entry.js +11 -11
  247. package/dist/esm/vega-grid.entry.js +5 -5
  248. package/dist/esm/vega-icon.entry.js +5 -5
  249. package/dist/esm/vega-image-uploader.entry.js +12 -12
  250. package/dist/esm/vega-input-credit-card.entry.js +12 -12
  251. package/dist/esm/vega-input-numeric.entry.js +12 -12
  252. package/dist/esm/vega-input-passcode.entry.js +11 -11
  253. package/dist/esm/vega-input-phone-number.entry.js +10 -10
  254. package/dist/esm/vega-input-range.entry.js +10 -10
  255. package/dist/esm/vega-input-select.entry.js +12 -12
  256. package/dist/esm/vega-input.entry.js +13 -13
  257. package/dist/esm/{vega-internal-event-id-194bac82.js → vega-internal-event-id-db974a0d.js} +1 -1
  258. package/dist/esm/vega-item-toggle.entry.js +3 -3
  259. package/dist/esm/vega-left-nav_5.entry.js +13 -13
  260. package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
  261. package/dist/esm/vega-page-notification_2.entry.js +2 -2
  262. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +4 -4
  263. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +4 -4
  264. package/dist/esm/vega-pagination.entry.js +9 -9
  265. package/dist/esm/vega-popover_2.entry.js +13 -13
  266. package/dist/esm/vega-progress-tracker_2.entry.js +10 -10
  267. package/dist/esm/vega-radio_2.entry.js +12 -12
  268. package/dist/esm/vega-rich-text-content.entry.js +10 -10
  269. package/dist/esm/vega-rich-text-editor_4.entry.js +36 -21
  270. package/dist/esm/vega-rich-text-table-properties_3.entry.js +13 -13
  271. package/dist/esm/vega-segment-control.entry.js +3 -3
  272. package/dist/esm/vega-selection-chip_2.entry.js +12 -12
  273. package/dist/esm/vega-selection-tile_2.entry.js +10 -10
  274. package/dist/esm/vega-sidenav_3.entry.js +10 -10
  275. package/dist/esm/vega-signature-capture.entry.js +12 -12
  276. package/dist/esm/vega-stepper.entry.js +8 -8
  277. package/dist/esm/vega-tab-group_2.entry.js +5 -5
  278. package/dist/esm/vega-table_11.entry.js +1180 -290
  279. package/dist/esm/vega-text.entry.js +36 -1
  280. package/dist/esm/vega-textarea.entry.js +8 -8
  281. package/dist/esm/vega-time-picker_2.entry.js +53 -22
  282. package/dist/esm/vega-toggle-switch.entry.js +8 -8
  283. package/dist/esm/vega-tooltip_2.entry.js +7 -7
  284. package/dist/esm/vega.js +12 -12
  285. package/dist/esm/{wait-for-component-did-render-30cde59c.js → wait-for-component-did-render-9a83d343.js} +1 -1
  286. package/dist/sri/vega-sri-manifest.json +369 -365
  287. package/dist/types/components/vega-app-header-button/slimmers/renderers/vega-app-header-button-dropdown-renderer.d.ts +8 -0
  288. package/dist/types/components/vega-app-header-button/types.d.ts +2 -0
  289. package/dist/types/components/vega-app-header-button/vega-app-header-button.d.ts +16 -0
  290. package/dist/types/components/vega-checkbox/vega-checkbox.d.ts +1 -0
  291. package/dist/types/components/vega-color-swatch/vega-color-swatch-picker/assets/hashtag.d.ts +3 -0
  292. package/dist/types/components/vega-color-swatch/vega-color-swatch-picker/slimmers/controllers/color-swatch-picker-color-format-controller.d.ts +32 -0
  293. package/dist/types/components/vega-color-swatch/vega-color-swatch-picker/slimmers/controllers/color-swatch-picker-value-controller.d.ts +31 -0
  294. package/dist/types/components/vega-color-swatch/vega-color-swatch-picker/slimmers/renderers/color-swatch-grid-renderer.d.ts +26 -0
  295. package/dist/types/components/vega-color-swatch/vega-color-swatch-picker/slimmers/renderers/color-swatch-input-renderer.d.ts +25 -0
  296. package/dist/types/components/vega-color-swatch/vega-color-swatch-picker/slimmers/renderers/color-swatch-picker-renderer.d.ts +52 -0
  297. package/dist/types/components/vega-color-swatch/vega-color-swatch-picker/types.d.ts +17 -0
  298. package/dist/types/components/vega-color-swatch/vega-color-swatch-picker/vega-color-swatch-picker.d.ts +155 -0
  299. package/dist/types/components/vega-color-swatch/vega-color-swatch.d.ts +4 -4
  300. package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-padding-state-controller.d.ts +21 -0
  301. package/dist/types/components/vega-modal/slimmers/models/vega-modal-section-padding-state.d.ts +29 -0
  302. package/dist/types/components/vega-modal/slimmers/renderers/vega-modal-renderer.d.ts +1 -1
  303. package/dist/types/components/vega-modal/types.d.ts +11 -0
  304. package/dist/types/components/vega-modal/vega-modal.d.ts +7 -2
  305. package/dist/types/components/vega-rich-text-editor/dto/annotations/text-style-annotation.d.ts +0 -7
  306. package/dist/types/components/vega-rich-text-editor/dto/annotations/text-style-default-styles.d.ts +3 -0
  307. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-dynamic-popover-renderer.d.ts +15 -11
  308. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.d.ts +15 -0
  309. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-setting-popover-renderer.d.ts +25 -22
  310. package/dist/types/components/vega-table/interface.d.ts +2 -0
  311. package/dist/types/components/vega-table/slimmers/controllers/vega-table-expand-row-controller.d.ts +35 -0
  312. package/dist/types/components/vega-table/slimmers/controllers/vega-table-row-draggable-controller.d.ts +52 -0
  313. package/dist/types/components/vega-table/slimmers/controllers/vega-table-sort-controller.d.ts +4 -0
  314. package/dist/types/components/vega-table/slimmers/renderers/vega-table-body-renderer.d.ts +3 -1
  315. package/dist/types/components/vega-table/slimmers/renderers/vega-table-col-group-renderer.d.ts +2 -1
  316. package/dist/types/components/vega-table/utils.d.ts +3 -2
  317. package/dist/types/components/vega-table/vega-table-expand-row/slimmers/controllers/vega-table-expand-row-col-span-controller.d.ts +5 -0
  318. package/dist/types/components/vega-table/vega-table-expand-row/slimmers/controllers/vega-table-expand-row-state-controller.d.ts +1 -0
  319. package/dist/types/components/vega-table/vega-table-expand-row/vega-table-expand-row.d.ts +2 -0
  320. package/dist/types/components/vega-table/vega-table-foot-row/slimmers/controllers/vega-table-foot-row-state-controller.d.ts +2 -1
  321. package/dist/types/components/vega-table/vega-table-foot-row/slimmers/renderers/vega-table-foot-row-renderer.d.ts +3 -1
  322. package/dist/types/components/vega-table/vega-table-foot-row/vega-table-foot-row.d.ts +6 -2
  323. package/dist/types/components/vega-table/vega-table-head/vega-table-head.d.ts +1 -0
  324. package/dist/types/components/vega-table/vega-table-head-row/slimmers/controllers/vega-table-head-row-state-controller.d.ts +2 -1
  325. package/dist/types/components/vega-table/vega-table-head-row/slimmers/renderers/vega-table-head-row-renderer.d.ts +3 -1
  326. package/dist/types/components/vega-table/vega-table-head-row/vega-table-head-row.d.ts +6 -2
  327. package/dist/types/components/vega-table/vega-table-row/slimmers/controllers/vega-table-row-state-controller.d.ts +3 -0
  328. package/dist/types/components/vega-table/vega-table-row/slimmers/renderers/vega-table-row-renderer.d.ts +3 -0
  329. package/dist/types/components/vega-table/vega-table-row/vega-table-row.d.ts +8 -0
  330. package/dist/types/components/vega-table/vega-table.d.ts +40 -5
  331. package/dist/types/components/vega-time-picker/slimmers/renderers/vega-time-picker-range-clear-button-renderer.d.ts +6 -3
  332. package/dist/types/components/vega-time-picker/slimmers/renderers/vega-time-picker-single-input-renderer.d.ts +1 -0
  333. package/dist/types/components/vega-time-picker/vega-time-picker.d.ts +20 -0
  334. package/dist/types/components.d.ts +228 -11
  335. package/dist/types/constants/ui.d.ts +1 -1
  336. package/dist/types/global/icons/grip-dots-vertical.d.ts +3 -0
  337. package/dist/types/helpers/event-manager/event-id/vega-event-id.d.ts +1 -0
  338. package/dist/types/helpers/immutable/immutable-map.d.ts +4 -1
  339. package/dist/types/helpers/slimmers/draggable-element-slimmer.d.ts +260 -0
  340. package/dist/types/helpers/slimmers/popover-nested-slot-projection-slimmer.d.ts +65 -0
  341. package/dist/types/helpers/translation/interface.d.ts +3 -1
  342. package/dist/types/types/components.type.d.ts +8 -1
  343. package/dist/types/types/public-api.d.ts +1 -0
  344. package/dist/types/types/type-guard.d.ts +8 -0
  345. package/dist/types/types/ui.type.d.ts +40 -0
  346. package/dist/types/utils/accessibility.d.ts +6 -1
  347. package/dist/vega/index.esm.js +1 -1
  348. package/dist/vega/{p-fc7ab79d.js → p-031c0cf7.js} +1 -1
  349. package/dist/vega/{p-7d85cc74.entry.js → p-096d186d.entry.js} +1 -1
  350. package/dist/vega/{p-b5497af2.entry.js → p-0b5b0fd2.entry.js} +1 -1
  351. package/dist/vega/{p-ebdb489c.entry.js → p-0bb0b521.entry.js} +1 -1
  352. package/dist/vega/p-13e7f906.entry.js +1 -0
  353. package/dist/vega/{p-2b5cf2b3.js → p-1a869f0e.js} +1 -1
  354. package/dist/vega/{p-116e3963.js → p-1d30cab2.js} +1 -1
  355. package/dist/vega/p-23b38467.entry.js +1 -0
  356. package/dist/vega/{p-30445cd9.entry.js → p-25572ea7.entry.js} +1 -1
  357. package/dist/vega/{p-608f234f.entry.js → p-2ae5acfc.entry.js} +1 -1
  358. package/dist/vega/{p-988401c3.entry.js → p-2fb26f4f.entry.js} +1 -1
  359. package/dist/vega/{p-103d20f5.js → p-34964a53.js} +1 -1
  360. package/dist/vega/{p-da742a7f.entry.js → p-35d77c9c.entry.js} +1 -1
  361. package/dist/vega/{p-e71864ff.js → p-386895e9.js} +1 -1
  362. package/dist/vega/{p-d5531d3c.js → p-3b791b5d.js} +1 -1
  363. package/dist/vega/{p-25ab7a33.entry.js → p-3c456e91.entry.js} +1 -1
  364. package/dist/vega/{p-9c1a48b9.entry.js → p-3d92d2af.entry.js} +1 -1
  365. package/dist/vega/p-3e64fa38.entry.js +1 -0
  366. package/dist/vega/{p-51d2e0ab.entry.js → p-411ea209.entry.js} +1 -1
  367. package/dist/vega/{p-0915a8d3.entry.js → p-423762ae.entry.js} +1 -1
  368. package/dist/vega/p-4530f0e1.entry.js +1 -0
  369. package/dist/vega/{p-3fae8d3f.entry.js → p-45aaaef6.entry.js} +1 -1
  370. package/dist/vega/{p-c36afa21.entry.js → p-487ecdb0.entry.js} +1 -1
  371. package/dist/vega/{p-b28d4f7d.js → p-48e3be6a.js} +1 -1
  372. package/dist/vega/{p-ea564928.entry.js → p-4afafeb3.entry.js} +1 -1
  373. package/dist/vega/{p-085de8fc.js → p-4cefd7fe.js} +1 -1
  374. package/dist/vega/p-5657f768.js +1 -0
  375. package/dist/vega/{p-783531cf.entry.js → p-56c1a8ac.entry.js} +1 -1
  376. package/dist/vega/{p-14de7ba0.entry.js → p-571a6d15.entry.js} +1 -1
  377. package/dist/vega/{p-6572e038.js → p-57f220b5.js} +1 -1
  378. package/dist/vega/{p-d4f1f007.js → p-5904616e.js} +1 -1
  379. package/dist/vega/{p-8da66d41.entry.js → p-59c6dcf7.entry.js} +1 -1
  380. package/dist/vega/{p-ef59f6f0.js → p-5bf3ab33.js} +1 -1
  381. package/dist/vega/p-5e50dbb9.js +1 -0
  382. package/dist/vega/p-5f377954.js +1 -1
  383. package/dist/vega/{p-f020738c.entry.js → p-606d7113.entry.js} +1 -1
  384. package/dist/vega/{p-8583dd34.entry.js → p-64b566be.entry.js} +1 -1
  385. package/dist/vega/{p-e340d58c.entry.js → p-69c11b7b.entry.js} +1 -1
  386. package/dist/vega/p-6ac8e655.js +1 -0
  387. package/dist/vega/{p-44044ed7.js → p-6b5cb920.js} +1 -1
  388. package/dist/vega/{p-aa985d73.js → p-6c43d54a.js} +1 -1
  389. package/dist/vega/{p-19a30f98.entry.js → p-6fadee27.entry.js} +1 -1
  390. package/dist/vega/{p-d456386a.entry.js → p-73c6669e.entry.js} +1 -1
  391. package/dist/vega/{p-475bd8bf.entry.js → p-7702a906.entry.js} +1 -1
  392. package/dist/vega/{p-c8435185.js → p-77300901.js} +1 -1
  393. package/dist/vega/{p-a6dbc63d.entry.js → p-77754d62.entry.js} +1 -1
  394. package/dist/vega/{p-cc18970f.entry.js → p-78099a83.entry.js} +1 -1
  395. package/dist/vega/{p-58b6ac33.entry.js → p-79c12a64.entry.js} +1 -1
  396. package/dist/vega/{p-cc00135a.entry.js → p-7f74cd41.entry.js} +1 -1
  397. package/dist/vega/p-82039afd.entry.js +1 -0
  398. package/dist/vega/p-887b3e2d.entry.js +1 -0
  399. package/dist/vega/{p-b9728ca8.js → p-8d48940d.js} +1 -1
  400. package/dist/vega/{p-d320496e.entry.js → p-9297f4a9.entry.js} +1 -1
  401. package/dist/vega/{p-bb46d8e6.entry.js → p-9763fbbe.entry.js} +1 -1
  402. package/dist/vega/{p-a4738b70.entry.js → p-98a6cd8e.entry.js} +1 -1
  403. package/dist/vega/p-9af0e2e7.js +1 -0
  404. package/dist/vega/{p-f89cf75a.entry.js → p-9e2b7718.entry.js} +1 -1
  405. package/dist/vega/{p-b08a70e6.entry.js → p-9eb00537.entry.js} +1 -1
  406. package/dist/vega/{p-b9a95aca.entry.js → p-9f064488.entry.js} +1 -1
  407. package/dist/vega/{p-0dbd7723.entry.js → p-9f36abf9.entry.js} +1 -1
  408. package/dist/vega/p-9f728e0b.js +1 -0
  409. package/dist/vega/{p-280f63fa.entry.js → p-9fc8bd1f.entry.js} +1 -1
  410. package/dist/vega/{p-cab70b95.entry.js → p-a050c24d.entry.js} +1 -1
  411. package/dist/vega/{p-f7a5746b.js → p-a07c5dae.js} +1 -1
  412. package/dist/vega/{p-ed01657b.entry.js → p-a49c25c2.entry.js} +1 -1
  413. package/dist/vega/{p-9751c801.js → p-a87cb7ac.js} +1 -1
  414. package/dist/vega/{p-8b217c7e.entry.js → p-a9528dbd.entry.js} +1 -1
  415. package/dist/vega/{p-0caf52e0.js → p-a9e10a64.js} +1 -1
  416. package/dist/vega/{p-02467b61.js → p-ae1aa4df.js} +1 -1
  417. package/dist/vega/{p-a0c3968b.js → p-af5cb9bc.js} +1 -1
  418. package/dist/vega/{p-29f42c27.entry.js → p-afd1b519.entry.js} +1 -1
  419. package/dist/vega/{p-ab829745.js → p-b7721666.js} +1 -1
  420. package/dist/vega/{p-d7bd2470.entry.js → p-bc74d7e7.entry.js} +1 -1
  421. package/dist/vega/p-bceee942.entry.js +1 -0
  422. package/dist/vega/{p-54ba35e3.entry.js → p-c15a58b5.entry.js} +1 -1
  423. package/dist/vega/{p-4e95248c.entry.js → p-c2388937.entry.js} +1 -1
  424. package/dist/vega/p-c2e1f33d.entry.js +1 -0
  425. package/dist/vega/p-c31a32f4.js +1 -0
  426. package/dist/vega/{p-42141782.js → p-c347e08a.js} +1 -1
  427. package/dist/vega/p-c51ebb14.entry.js +1 -0
  428. package/dist/vega/{p-c8d41cdc.entry.js → p-c601b331.entry.js} +1 -1
  429. package/dist/vega/p-c74060a7.js +1 -0
  430. package/dist/vega/{p-b7624ce4.js → p-c85e743d.js} +1 -1
  431. package/dist/vega/p-c8fe46fd.entry.js +1 -0
  432. package/dist/vega/{p-b9947846.js → p-c95dbf11.js} +1 -1
  433. package/dist/vega/{p-8559e36f.entry.js → p-cf2838c7.entry.js} +1 -1
  434. package/dist/vega/{p-eda7cd76.entry.js → p-d10ae46a.entry.js} +1 -1
  435. package/dist/vega/{p-efc8c09e.entry.js → p-d37636a5.entry.js} +1 -1
  436. package/dist/vega/{p-eb0ebf50.entry.js → p-d402eb7b.entry.js} +1 -1
  437. package/dist/vega/{p-142f371b.entry.js → p-da8bb883.entry.js} +1 -1
  438. package/dist/vega/{p-a07c0f8c.js → p-dba16739.js} +1 -1
  439. package/dist/vega/p-dffbbc3d.entry.js +1 -0
  440. package/dist/vega/{p-956b170c.js → p-e1d2c60d.js} +1 -1
  441. package/dist/vega/{p-edda10f7.js → p-e27626f6.js} +1 -1
  442. package/dist/vega/{p-90cb665e.entry.js → p-e47b2c4c.entry.js} +1 -1
  443. package/dist/vega/{p-b9386dd0.js → p-e4c4ea35.js} +1 -1
  444. package/dist/vega/{p-597588d0.entry.js → p-ecbb63a5.entry.js} +1 -1
  445. package/dist/vega/p-ed26f4c8.entry.js +1 -0
  446. package/dist/vega/p-effb285f.entry.js +1 -0
  447. package/dist/vega/p-f1c672e4.js +1 -0
  448. package/dist/vega/p-f54fb4e5.js +1 -0
  449. package/dist/vega/{p-158c6a9f.entry.js → p-f604f2c9.entry.js} +1 -1
  450. package/dist/vega/{p-513f51ec.entry.js → p-fa91805b.entry.js} +1 -1
  451. package/dist/vega/{p-5ffdea8e.js → p-fb05335d.js} +1 -1
  452. package/dist/vega/p-fcb0d4d8.js +1 -0
  453. package/dist/vega/{p-d32e83e7.js → p-fcce494e.js} +1 -1
  454. package/dist/vega/vega.esm.js +1 -1
  455. package/package.json +1 -1
  456. package/dist/vega/p-075bb809.entry.js +0 -1
  457. package/dist/vega/p-0bcb2945.entry.js +0 -1
  458. package/dist/vega/p-0bf8743f.js +0 -1
  459. package/dist/vega/p-1b48e8a5.entry.js +0 -1
  460. package/dist/vega/p-1ca95601.entry.js +0 -1
  461. package/dist/vega/p-29d31c98.entry.js +0 -1
  462. package/dist/vega/p-318f0df5.js +0 -1
  463. package/dist/vega/p-337a5e76.js +0 -1
  464. package/dist/vega/p-380abceb.entry.js +0 -1
  465. package/dist/vega/p-38af89b9.js +0 -1
  466. package/dist/vega/p-47611a83.entry.js +0 -1
  467. package/dist/vega/p-596bc4f6.entry.js +0 -1
  468. package/dist/vega/p-5be546c5.js +0 -1
  469. package/dist/vega/p-6e9f832f.js +0 -1
  470. package/dist/vega/p-7df43192.entry.js +0 -1
  471. package/dist/vega/p-81a11dc6.entry.js +0 -1
  472. package/dist/vega/p-85abe824.entry.js +0 -1
  473. package/dist/vega/p-86194314.js +0 -1
  474. package/dist/vega/p-874bf8b2.js +0 -1
  475. package/dist/vega/p-9d854d43.js +0 -1
  476. package/dist/vega/p-c5eb0fa6.js +0 -1
  477. package/dist/vega/p-e00fb667.entry.js +0 -1
@@ -1,3 +1,3 @@
1
- import{g as t,e,c as n,h as s,A as r,T as i,q as o,H as a,r as l,l as c,t as h,u,v as d,w as m,x as w,I as T,n as p,S as g,j as E,B as f,y as k,d as R,z as B,D as x,o as I,E as b,s as O,N as L,F as y,G as N,J as C,K as A,m as H,L as j,M as v,O as S,P as $,Q as D,U as M,W as P,X as F,Y as z,Z as V,_ as U,$ as W,a0 as G,a1 as J,a2 as K,R as Y,a3 as X,p as Q,a4 as Z,a5 as _,a6 as q,b as tt,a7 as et,a8 as nt,a9 as st,aa as rt}from"./p-5ffdea8e.js";import{g as it}from"./p-8b5d3a52.js";import{i as ot}from"./p-b9386dd0.js";import{C as at}from"./p-2d0d575f.js";import{d as lt}from"./p-f28a6074.js";import{c as ct,d as ht}from"./p-aa985d73.js";import{r as ut,i as dt}from"./p-6e70d3cc.js";import{c as mt}from"./p-a841cf13.js";import{L as wt}from"./p-6e1ab235.js";class RTEListItemBlock extends e{constructor(t,e,n){super(t,"list-item",n),this.nestList=[],this.nestList=e}static from(t,e={autoMatchFormat:!0}){const s=new RTEListItemBlock(t.id,void 0,e);s.children=t.nodes.map((t=>n.from(t,s,e))),t.children&&(s.nestList=t.children.map((t=>{const e=RTEListBlock.from(t);return e.parent=s,e})));const{annotations:r}=t;return r&&Object.entries(r).forEach((([t,e])=>{const n=this.createAnnotationEntity(t,e);ot(n)&&s.annotationMap.set(...n)})),s}toJSON(){var t;return Object.assign(Object.assign({},super.toJSON()),{type:"list-item",children:null===(t=this.nestList)||void 0===t?void 0:t.map((t=>t.toJSON()))})}toHtml(t){return[`<li${super.generateAttributeString(t)}>`,this.getChildrenHtml(t),"</li>"].join("")}cloneWithNodes(t){const e=new RTEListItemBlock(it());return e.children=[],e.apply(new s(t)),e}getLastNode(){return this.nestList&&this.nestList.length>0?this.nestList[this.nestList.length-1].getLastNode():super.getLastNode()}createNewListItem(){return new RTEListItemBlock(it())}clone(t){var e;const n=new RTEListItemBlock(this.id);return n.children=this.children.map((t=>t.clone(n))),n.annotationMap=super.cloneAnnotations(),n.nestList=null===(e=this.nestList)||void 0===e?void 0:e.map((t=>t.clone(n))),n.parent=t,n}}r.register(i.name,RTEListItemBlock.name,new o),r.register(a.name,RTEListItemBlock.name,new l),r.register(c.LINE_BREAK_SINGLE_BLOCK,RTEListItemBlock.name,new h),r.register(c.LINE_BREAK_MULTIPLE_BLOCKS,RTEListItemBlock.name,new u),r.register(c.DELETE_NEST_LIST,RTEListItemBlock.name,new class extends t{handleAction(t,e){e.nestList&&(e.nestList=e.nestList.length>1?e.nestList.filter((e=>e!==t.nestListBlockToBeRemoved)):void 0)}}),r.register(c.SPLIT_BLOCK_WITH_NODE,RTEListItemBlock.name,new d),r.register(c.REPLACE_CHILD_NODES,RTEListItemBlock.name,new m),r.register(c.REPLACE_NEST_LIST,RTEListItemBlock.name,new class extends t{handleAction(t,e){t.newList.forEach((t=>{t.parent=e})),e.nestList=t.newList}}),r.register(c.MERGE_TWO_BLOCKS_NODES,RTEListItemBlock.name,new w),r.register(c.INSERT_IMAGE_TO_BLOCK,RTEListItemBlock.name,new class extends t{handleAction(t,e){e.parent.apply(t)}});class Tt extends f{constructor(){super(...arguments),this.type=k.LIST}static getDefaultStyles(){return{paddingLeft:"8px",marginLeft:"16px"}}renderStyle(t){return(null==t?void 0:t.standalone)?Tt.getDefaultStyles():null}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte--list"}clone(){return new Tt}toJSON(){}}class RTEListBlock extends R{constructor(t,e,n){super(t),this.type="bullet-list",this.children=[],this.type=e;const{autoMatchFormat:s}=n||{autoMatchFormat:!0};s&&this.annotationMap.set(k.LIST,new Tt)}static from(t,e={autoMatchFormat:!0}){const n=new RTEListBlock(t.id,t.type,e),{annotations:s}=t;return s&&Object.entries(s).forEach((([t,e])=>{const s=this.createAnnotationEntity(t,e);ot(s)&&n.annotationMap.set(...s)})),n.children=t.blocks.map((t=>{const s=RTEListItemBlock.from(t,e);return s.parent=n,s})),n}static createAnnotationEntity(t,e){switch(t){case"customAttribute":return I.from(e);case"customClass":return x.from(e);case"customStyle":return B.from(e)}}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,blocks:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=this.getBlockTag();return[`<${e}${super.generateAttributeString(t)}>`,this.children.map((e=>e.toHtml(t))).join(""),`</${e}>`].join("")}isNotEmpty(){return this.children.length>0}getLastNode(){return this.children[this.children.length-1].getLastNode()}clone(t){const e=new RTEListBlock(this.id,this.type);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}getBlockTag(){return"number-list"===this.type?"ol":"ul"}}r.register(c.TRANSFORM_LIST_BLOCK,RTEListBlock.name,new class extends t{handleAction(t,e){const n=t.selectedBlocks,r=e.parent.createList(t.listType);if(n.every((t=>t.parent===e)))r.apply(new s(e.children)),e.parent.apply(new T(e,r)),e.parent.apply(new p(e)),n.forEach((t=>t.children.map((t=>t.apply(new g)))));else{const n=t.selectedBlocks.map((t=>e.parent.toListItem(t)));r.apply(new s(n)),e.parent.apply(new T(e,r)),t.selectedBlocks.forEach((t=>{t.parent.apply(new p(t))})),0===e.children.length&&e.parent.apply(new p(e))}}}),r.register(c.TRANSFORM_PARAGRAPH_BLOCK,RTEListBlock.name,new class extends t{handleAction(t,e){let n=!1,r=!1;const i=t.selectedBlocks,o=i.map((t=>(t.children.map((t=>t.apply(new g))),t===e.children[0]&&(n=!0),t===e.children[e.children.length-1]&&(r=!0),this.toParagraph(t))));if(n)e.parent.apply(new E(e,...o));else if(r)e.parent.apply(new T(e,...o));else{const t=e.children.indexOf(i[0]),n=e.children.indexOf(i[i.length-1]),r=e.parent.createList(e.type);r.apply(new s(e.children.slice(0,t)));const a=e.parent.createList(e.type);a.apply(new s(e.children.slice(n+1))),e.parent.apply(new E(e,r,...o,a)),e.parent.apply(new p(e))}i.map((t=>{e.apply(new p(t))})),0===e.children.length&&e.parent.apply(new p(e))}toParagraph(t){const n=new e(it(),"paragraph");return n.apply(new s(t.children)),n.annotationMap=t.annotationMap,n}}),r.register(c.INSERT_IMAGE_TO_BLOCK,RTEListBlock.name,new class extends t{handleAction(t,e){e.parent.apply("list-item"!==e.parent.type?new T(e,t.imageBlockToBeInserted):t)}});class pt{}class gt{constructor(t,e){this.childrenOutput=[],this.currentStrategy=t,this.currentElements=e}setChildrenOutput(t){this.childrenOutput=t}toDto(t={autoMatchFormat:!0,skipCustomAnnotations:!0}){const e=this.currentStrategy.handle(this.currentElements,t);return this.childrenOutput.length>0&&e&&this.currentStrategy.appendChildBlocks(e,this.childrenOutput.map((e=>e.toDto(t))).filter(ot)),e}}const Et=new class{constructor(){this.elementToBlockStrategies=[],this.elementToNodeStrategies=[]}registerElementToBlockStrategy(t){this.hasDuplicateStrategy(t,this.elementToBlockStrategies)||this.elementToBlockStrategies.unshift(t)}registerElementToNodeStrategy(t){this.hasDuplicateStrategy(t,this.elementToNodeStrategies)||this.elementToNodeStrategies.unshift(t)}getElementToBlockStrategies(){return this.elementToBlockStrategies}getElementToNodeStrategies(){return this.elementToNodeStrategies}hasDuplicateStrategy(t,e){return e.includes(t)}},ft=new class{process(t,e={autoMatchFormat:!0,skipCustomAnnotations:!0}){const n=this.getElementToBlockStrategies(),s=[];for(let r=0;r<t.length;r++){if(this.isInvalidElement(t[r],e))continue;let i=0;for(const o of n)if(i=o.canHandle(t,r,e),i>0){const n=t.slice(r,r+i),a=new gt(o,n);1===i&&o.shouldProceedToElementChildren()&&a.setChildrenOutput(this.process(Array.from(n[0].childNodes),e)),s.push(a),r+=i-1;break}if(0===i&&r<t.length){const n=Array.from(t[r].childNodes),i=this.process(Array.from(n),e);i.length>0&&s.push(...i)}}return s}isInvalidElement(t,e){return t.nodeType===Node.COMMENT_NODE||!1!==e.autoMatchFormat&&["META","STYLE"].includes(t.nodeName)}getElementToBlockStrategies(){return Et.getElementToBlockStrategies()}};class kt extends t{handleAction(t,e){const n=t.entityToBeAppended;e.children&&(n.forEach((t=>{t.parent=e})),e.children=e.children.concat(n))}}class Rt extends t{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[...t.childrenToBeInserted,t.referChildren])}replaceElementWithElements(t,e,n){t.children&&(n.forEach((e=>{e.parent=t})),t.children=t.children.flatMap((t=>t===e?n:t)))}}class Bt extends Rt{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[t.referChildren,...t.childrenToBeInserted])}}class xt extends L{constructor(t,e){super(),this.type=y.IMAGE,this.size=t,this.alt=e}static from(t,e){return[y.IMAGE,new xt(t,e)]}static getDefaultStyles(){return{verticalAlign:"bottom"}}toJSON(){return ot(this.alt)?{size:this.size,alt:this.alt}:{size:this.size}}clone(){return new xt(this.size,this.alt)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.size?`v-rte--image-size-${this.size}`:null}renderStyle(t){if(!(null==t?void 0:t.standalone))return null;const e=xt.getDefaultStyles();switch(this.size){case"sm":return Object.assign(Object.assign({},e),{width:"25%"});case"md":return Object.assign(Object.assign({},e),{width:"50%"});case"lg":return Object.assign(Object.assign({},e),{width:"100%"})}}}xt.BASE_STYLES={verticalAlign:"bottom"};class RTEImageNode extends N{constructor(t,e,n,s){super(t,s),this.type=C.IMAGE,this.url=e,this.parent=n}static from(t,e,n={autoMatchFormat:!0}){const s=new RTEImageNode(t.id,t.url,e),r=!!n.autoMatchFormat,i=Object.assign({},t.annotations),{size:o}=i,a=function(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(t);r<s.length;r++)e.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(t,s[r])&&(n[s[r]]=t[s[r]])}return n}(i,["size"]),l=Object.assign(Object.assign({},a),{size:null!=o?o:r?"md":void 0});return s.annotationMap=new Map(Object.keys(l).map((t=>"size"===t||"alt"===t?xt.from(l.size,l.alt):this.createAnnotationEntity(t,l[t]))).filter(ot)),s}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof xt||t instanceof A)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return""==t.alt&&delete t.alt,Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"image",url:this.url})}clone(t){return new RTEImageNode(this.id,this.url,t,super.cloneAnnotations())}toHtml(t){const e=this.getAnnotationByType(y.IMAGE);return`<img${super.generateAttributeString(t,...[e&&e.alt?`alt="${e.alt}"`:null,`src="${this.url}"`,e&&e.size?`data-size="${e.size}"`:null].filter(ot))}>`}doAnnotationActionApply(t){const e=r.get(H.name,RTEImageNode.name);e&&e.execute(t,this)}doModifyActionApply(t){r.executeTheStrategy(t,this)}}r.register(c.UPDATE_IMAGE_NODE_URL,RTEImageNode.name,new class extends t{handleAction(t,e){e.url=t.url}}),r.register(H.name,RTEImageNode.name,new class extends t{handleAction(t,e){const n=t.toAnnotation();e.annotationMap.set(n.type,n)}});class It extends v{constructor(t,e){super(),this.type=c.INSERT_NEW_PARAGRAPH,this.startContainerNode=t,this.startOffset=e}}class RTEImageBlock extends R{constructor(t){super(t),this.type="image",this.children=[]}static from(t,e={autoMatchFormat:!0}){const n=new RTEImageBlock(t.id),{annotations:s}=t;return n.children=t.nodes.map((t=>RTEImageNode.from(t,n,e))),s&&super.convertAnnotationsToMap(n.annotationMap,s),n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:"image",nodes:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=super.generateAttributeString(t),n=this.children.map((e=>e.toHtml(t))).join("");return super.shouldRenderAsInternalWrapper()?n:[`<div${e}>`,n,"</div>"].join("")}isNotEmpty(){return this.children.length>0&&this.children.some((t=>t.url.length>0))}getLastNode(){return this.children[this.children.length-1]}createNewImageBlock(){return new RTEImageBlock(it())}clone(t){const e=new RTEImageBlock(this.id);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}}r.register(c.MERGE_TWO_BLOCKS_NODES,RTEImageBlock.name,new w),r.register(c.REPLACE_CHILD_NODES,RTEImageBlock.name,new m),r.register(c.SPLIT_BLOCK_WITH_NODE,RTEImageBlock.name,new class extends t{handleAction(t,e){t.newBlock=this.splitImageNodes(t.splitPointNode,t.startOffsetOfNode,e)}splitImageNodes(t,e,n){const s=n.children.indexOf(t);if(s>-1){const t=n.children.slice(0,s+e),r=n.children.slice(s+e);n.apply(new j(t));const i=this.cloneWithNodes(r,n);return n.parent.apply(new T(n,i)),i}}cloneWithNodes(t,e){const n=e.createNewImageBlock();return n.children=[],n.apply(new s(t)),n}}),r.register(c.LINE_BREAK_SINGLE_BLOCK,RTEImageBlock.name,new class extends t{handleAction(t,e){const n=new It(t.startContainerNode,t.startOffset);e.apply(n);const s=n.newBlock;s&&(t.lineBreakNode=s.children[0])}}),r.register(c.LINE_BREAK_MULTIPLE_BLOCKS,RTEImageBlock.name,new class extends t{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,r){const i=e.from({id:it(),type:"paragraph",nodes:[{id:it(),type:"text",text:"\n"}]});r.parent.apply(new T(r,i));const o=this.concatBlocksNodes(t.slice(1));return(0===o.length||o[0]&&""===o[0].text)&&o.push(new n(it(),"\n",i)),i.apply(new s(o)),i.children[0]}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new p(t)))})),e}}),r.register(c.INSERT_IMAGE_TO_BLOCK,RTEImageBlock.name,new class extends t{handleAction(t,e){const n=t.splitPointNode,r=t.startOffsetOfNode,i=t.imageBlockToBeInserted;e.children.length<1?e.apply(new s(i.children)):this.isCaretPositionAtBlockEnd(e,n,r)?e.parent.apply(new T(e,i)):this.isCaretPositionAtBlockStart(e,n,r)?e.parent.apply(new E(e,i)):(e.apply(new S(n,r)),e.parent.apply(new T(e,i)))}}),r.register(a.name,RTEImageBlock.name,new l);class RTEHtmlBlock extends R{constructor(t,e){super(t),this.type="html-block",this.children=[],this.htmlTag=e}static from(t,e){const n=new RTEHtmlBlock(t.id,t.htmlTag),{annotations:s}=t;return s&&super.convertAnnotationsToMap(n.annotationMap,s),n.children=this.generateBlockChildren(t.children,e,n),n}clone(t){const e=new RTEHtmlBlock(this.id,this.htmlTag);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return!0}toHtml(t){const e=this.htmlTag,n=super.generateAttributeString(t);return $.has(this.htmlTag)?`<${e}${n}>`:[`<${e}${n}>`,this.children.map((e=>e.toHtml(t))).join(""),`</${e}>`].join("")}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,htmlTag:this.htmlTag,children:this.children.map((t=>t.toJSON()))})}}class bt extends v{constructor(t){super(),this.type=c.MERGE_TWO_BLOCKS_NODES,this.blockNeedToBeMerged=t}}class Ot extends D{handleAction(t,e){const{startContainerNode:n}=t;n.isContentEditable()?n.isTextNode()&&this.deleteTextNodeContent(t,e):this.deleteDecoratorNodeContent(t,e);const s=e.parent;s&&e.isListItemBlock()&&0===s.children.length&&s.parent.apply(new p(s))}deleteTextNodeContent(t,e){const n=t.startContainerNode,s=t.startOffset;if(0!==s&&!n.isEmpty()){const r=n.text.slice(0,s-1)+n.text.slice(s);if(n.apply(new M(r)),r)return void(t.previousNode=n);{const s=this.getPreviousNode(n);return s&&s.parent===e&&"\n"===s.text||1===e.children.length?void(t.previousNode=n):(e.apply(new p(n)),void(t.previousNode=s))}}{let s=this.getPreviousNode(n),r=null;const i=n.isEmpty();if(e.children.length&&s&&s.parent!==e)i&&e.apply(new p(n)),e.type===s.parent.type&&s.parent.apply(new bt(e));else if(this.isContentFirstNode(n)&&i&&(r=this.getNextNode(n)),i&&e.apply(new p(n)),s&&s.isTextNode()&&(s.isEmpty()||!s.isContentEditable()&&s.parent===e)){const t=s;s=this.getPreviousNode(s),t.parent.apply(new p(t)),s||i||(r=n)}0===e.children.length&&e.parent.apply(new p(e)),s?t.previousNode=s:r&&(t.nextNode=r)}}deleteDecoratorNodeContent(t,e){const n=t.startContainerNode,s=t.startOffset;let r=this.getPreviousNode(n),i=null;if(0!==s){const t=e;this.isContentFirstNode(n)&&(i=this.getNextNode(n)),1===t.children.length?t.parent.apply(new p(t)):t.apply(new p(n))}else{const e=r;e&&!e.isContentEditable()&&(r=this.getPreviousNode(e),e.parent.apply(new p(e)),r||(t.nextNode=n))}r?t.previousNode=r:i&&(t.nextNode=i)}}class Lt extends t{handleAction(t,e){const{startContainerNode:n}=t;t.newBlock=this.breakSingleBlock(n,t.startOffset,e)}breakSingleBlock(t,e,n){const s=this.getNewParagraph(t);if(s){if(this.isCaretPositionAtBlockEnd(n,t,e))n.parent.apply(new T(n,s));else{if(!this.isCaretPositionAtBlockStart(n,t,e)){const s=new S(t,e);return n.apply(s),s.newBlock}n.parent.apply(new E(n,s))}return s}}getNewParagraph(t){const e=this.createNewParagraph("");if(e){let n=e.children[0];return t.isTextNode()&&t.isContentEditable()&&(e.children=[],n=t.cloneWithText(""),n.annotationMap.delete(y.LINK),e.apply(new s([n]))),e}}}class yt extends v{constructor(t,e,n=!1){super(),this.isFlushable=!0,this.type=c.UPDATE_CURSOR_POSITION,this.immediatelyRun=!1,this.nextFocusNode=t,this.offset=e,this.immediatelyRun=n,this.immediatelyRun&&(this.isFlushable=!1)}}class Nt extends t{handleAction(t,e){const{rteRange:n,nodeToBeInserted:s}=t,{startNode:r,startOffset:i}=n;if(r){const t=e;if(r.isContentEditable()&&r.isTextNode())if("\n"!==r.text&&r.text&&0!==i){const e=r.text.substring(0,i),n=r.text.substring(i),o=r.cloneWithText(e),a=r.cloneWithText(n),l=[o,s];n&&l.push(a),t.apply(new E(r,...l)),t.apply(new p(r))}else t.apply(new E(r,s));else t.apply(0!==i?new T(r,s):new E(r,s));this.updateCursorPosition(s)}}updateCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new yt(t))}}class Ct extends t{handleAction(t,e){const{text:n,offset:s,decoratorNode:r}=t,i=this.createNewParagraph(n);if(i){const t=i.children[0];e.apply(0!==s?new T(r,t):new E(r,t)),this.setTheCursorPosition(t)}}setTheCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new yt(t))}}class At extends t{handleAction(t,e){t.newBlock=this.breakSingleListItemBlock(t.startContainerNode,t.startOffset,e)}breakSingleListItemBlock(t,e,n){const r=n.createNewListItem(),i=this.copyInlineStyleToNewNode(t);if(r.apply(new s([i])),this.isCaretPositionAtBlockEnd(n,t,e))return this.breakListItemAtEnd(r,n);if(!this.isCaretPositionAtBlockStart(n,t,e)){const s=new S(t,e);return n.apply(s),s.newBlock}return n.parent.apply(new E(n,r)),r}breakListItemAtEnd(t,n){const r=n.parent.children[n.parent.children.length-1],i=1===n.children.length&&n.children[0].isEmpty();if(n===r&&i){const r=n.parent.parent;if("list-item"!==r.type){const i=e.from({id:it(),type:"paragraph",nodes:[]});return i.apply(new s(t.children)),r.apply(new T(n.parent,i)),n.parent.apply(new p(n)),i}r.parent.apply(new T(r,t)),n.parent.apply(new p(n))}else n.parent.apply(new T(n,t));return t}copyInlineStyleToNewNode(t){const e=t.cloneWithText("");return e.annotationMap.delete(y.LINK),e}}class Ht extends v{constructor(t){super(),this.type=c.DELETE_NEST_LIST,this.nestListBlockToBeRemoved=t}}class jt extends P{handleAction(t,e){super.handleAction(t,e);const n=e.parent;0===e.children.length&&n&&n.apply("list-item"===n.type?new Ht(e):new p(e))}}class vt extends t{handleAction(t,e){if(e.parent){const{blocksToBeInserted:n,startNode:s,startOffset:r}=t;let i=e;if(s===e.children[0]&&0===r)e.parent.apply(new E(e,...n));else{const t=new S(s,r);e.apply(t),e.parent.apply(new T(e,...n)),i=t.newBlock}t.futureFocusBlock=i}}}const St=new class{registerBlockBasicStrategies(t){r.register(c.DELETE_CHILDREN,t,t===RTEListBlock.name?new jt:new P),r.register(c.APPEND_CHILDREN,t,new kt),r.register(c.INSERT_CHILDREN_BEFORE,t,new Rt),r.register(c.INSERT_CHILDREN_AFTER,t,new Bt),r.register(c.DELETE_BLOCK_CONTENT,t,new Ot),r.register(c.INSERT_NEW_PARAGRAPH,t,t===RTEListItemBlock.name?new At:new Lt),r.register(c.INSERT_TEXT_TO_DECORATOR_NODE,t,new Ct),r.register(c.INSERT_NODE_TO_NEAREST_ROOT,t,new Nt),r.register(c.PASTE_CONTENT,t,new vt)}};class $t{}class Dt extends $t{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isBold(t)||e.bold?{bold:!0}:{}}isBold(t){return"STRONG"===t.nodeName||"B"===t.nodeName||t.style.fontWeight===F||t.style.fontWeight===z||t.classList.contains("v-rte--bold")}}class Mt extends $t{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.getAttributes(t);return Object.keys(e).length>0?{customAttribute:e}:{}}getAttributes(t){return t.getAttributeNames().filter((t=>"style"!==t&&"class"!==t&&this.isValidAttr(t))).reduce(((e,n)=>(e[n]=t.getAttribute(n),e)),{})}isValidAttr(t){return/^[a-zA-Z_][\w-]*$/.test(t)}}class Pt extends $t{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.getCustomClass(t);return e.length>0?{customClass:e}:{}}getCustomClass(t){return t.classList.toString().split(" ").filter((t=>!t.includes("v-rte")&&""!==t))}}class Ft extends $t{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=V(t);return Object.keys(e).length>0?{customStyle:e}:{}}}class zt extends $t{canHandle(t){return["RTETextBlock","RTEListItemBlock","RTEListBlock"].includes(t.name)}handle(t){const e=this.getIndent(t);return e?{indent:e}:{}}getIndent(t){const e=t.style;let n;if(e.marginLeft)n=e.marginLeft;else{if(!e.margin)return null;{const t=e.margin.split(" ");switch(t.length){case 4:n=t[3];break;case 2:case 3:n=t[1];break;default:n=t[0]}}}const s=Number(n.replace("px",""));return s&&s>=0?Math.floor(s/16):null}}class Vt extends $t{canHandle(t){return["RTETextBlock","RTEListItemBlock","RTEListBlock"].includes(t.name)}handle(t){const e=this.getTextAlign(t);return e?{textAlign:e}:{}}getTextAlign(t){const e=t.classList;if(e.contains("v-rte--horizontal-alignment-left"))return"left";if(e.contains("v-rte--horizontal-alignment-center"))return"center";if(e.contains("v-rte--horizontal-alignment-right"))return"right";if(e.contains("v-rte--horizontal-alignment-justify"))return"justify";switch(t.style.textAlign){case"center":return"center";case"right":return"right";case"justify":return"justify";case"left":return"left";default:return null}}}class Ut extends $t{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isCode(t)||e.code?{code:!0}:{}}isCode(t){return t.classList.contains("v-rte--code")||"CODE"===t.nodeName||"PRE"===t.nodeName||"monospace"===t.style.fontFamily||"Roboto Mono"===t.style.fontFamily.replace(/["']/g,"")}}class Wt extends $t{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){const n=this.getColor(t)||e.textColor;return n?{textColor:n}:{}}getColor(t){var e;const n=null===(e=ut(t.style.color))||void 0===e?void 0:e.toUpperCase();if(n){const t=U.filter((t=>t.key!==W.key)).find((t=>t.light===n||t.dark===n));return t?t.key:null}for(const e of U)if(t.style.color.includes(e.key))return e.key;return null}}class Gt extends $t{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isItalic(t)||e.italic?{italic:!0}:{}}isItalic(t){return"I"===t.nodeName||t.style.fontStyle===G||"EM"===t.nodeName||t.classList.contains("v-rte--italic")}}class Jt extends $t{canHandle(t,e){return!!e.autoMatchFormat&&"RTETextBlock"===t.name}handle(t){const e=this.getTextStyle(t);return e?{textStyle:e}:{}}getTextStyle(t){const e=this.getElementTypeByDataType(t);if(e)return e;const n=this.getElementTypeByNodeName(t);if(n)return n;const s=this.getElementTypeByFontSize(t);if(s)return s;return this.getElementTypeByClassName(t)||null}getElementTypeByDataType(t){return t.nodeType!==Node.TEXT_NODE&&t.hasAttribute("data-type")?t.getAttribute("data-type"):null}getElementTypeByFontSize(t){var e;switch(null===(e=t.style)||void 0===e?void 0:e.fontSize){case"36px":return"title";case"28px":return"subtitle";case"22px":return"heading-1";case"20px":return"heading-2";case"18px":return"heading-3";default:return null}}getElementTypeByNodeName(t){switch(t.nodeName){case"P":return"paragraph";case"H1":return"heading-1";case"H2":return"heading-2";case"H3":return"heading-3";case"H4":return"heading-4";case"H5":return"heading-5";case"H6":return"heading-6";default:return null}}getElementTypeByClassName(t){if(t.className){const e=/\bv-rte-(?:-text-style-)?(title|subtitle|heading-1|heading-2|heading-3|heading-4|heading-5|heading-6|paragraph)\b/.exec(t.className);if(e)return e[1]}return null}}class Kt{static isTitleOrSubtitle(t){if("DIV"===t.nodeName){const e=Kt.textStyleHandler.getTextStyle(t);return"title"===e||"subtitle"===e}return!1}static isLinkElement(t){return"A"===t.nodeName}}Kt.textStyleHandler=new Jt;class Yt extends $t{constructor(){super(...arguments),this.handlers=[new Mt,new Pt,new Ft]}canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return e.link?{link:e.link}:Kt.isLinkElement(t)?{link:this.generateLinkAnnotations(t)}:{}}generateLinkAnnotations(t){const e={href:t.getAttribute("href")||"",groupKey:it()};return this.handlers.forEach((n=>{Object.assign(e,n.handle(t))})),e}}class Xt extends $t{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isStrikethrough(t)||e.strikethrough?{strikethrough:!0}:{}}isStrikethrough(t){return t.style.textDecoration.includes(J)||"S"===t.nodeName||"DEL"===t.nodeName||t.classList.contains("v-rte--strikethrough")}}class Qt extends $t{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isUnderline(t)||e.underline?{underline:!0}:{}}isUnderline(t){return t.style.textDecoration.includes(K)||"U"===t.nodeName||"INS"===t.nodeName||t.classList.contains("v-rte--underline")}}class Zt extends $t{canHandle(t){return"RTEImageNode"===t.name}handle(t){const e=this.getImageSize(t);return e?{size:e}:{}}getImageSize(t){return t.getAttribute("data-size")?t.getAttribute("data-size"):null}}class _t extends $t{canHandle(t){return"RTEImageNode"===t.name}handle(t){return t.hasAttribute("alt")?{alt:t.getAttribute("alt")}:{}}}const qt=new Set(["P","H1","H2","H3","H4","H5","H6","LI"]),te=new Set(["P","H1","H2","H3","H4","H5","H6","LI","UL","OL","IMG","CODE"]),ee=new Set(["BR","VEGA-RICH-TEXT-LINK-EDITOR","CODE","A"]),ne=new Set(["TABLE","THEAD","TBODY","TFOOT","TR","DL"]),se=new Set(["ABBR","B","BDI","BDO","CITE","DEL","DFN","EM","I","INS","KBD","MARK","METER","OUTPUT","PROGRESS","Q","S","SAMP","SMALL","SPAN","STRONG","SUB","SUP","TIME","U","VAR"]);function re(t){return qt.has(t.parentElement.nodeName)}class ie extends $t{constructor(){super(...arguments),this.customAttributeHandler=new Mt,this.customStyleAnnotationHandler=new Ft,this.customClassAnnotationHandler=new Pt}canHandle(t,e){return"RTETextNode"===t.name&&!1===e.autoMatchFormat}handle(t,e){if(te.has(t.nodeName)&&!ee.has(t.nodeName))return{};const n=this.generateInlineHtmlAnnotation(t,Object.assign({},e));return n?{inlineHtml:n}:{}}generateInlineHtmlAnnotation(t,e){let{inlineHtml:s}=e;const r=Array.from(t.childNodes).some((t=>t.nodeType===Node.ELEMENT_NODE));if(!n.supportsHtmlTag(t.nodeName.toLowerCase())||r){const e=Object.assign(Object.assign({htmlTag:t.nodeName.toLowerCase()},r?{groupId:it()}:{}),{customAttribute:this.customAttributeHandler.handle(t).customAttribute,customStyle:this.customStyleAnnotationHandler.handle(t).customStyle,customClass:this.customClassAnnotationHandler.handle(t).customClass});s=s?this.appendToInlineHtmlChain(s,e,t.parentNode):e}return s?Object.assign({},s):null}appendToInlineHtmlChain(t,e,n){return t.child&&n&&t.child.htmlTag===n.nodeName.toLowerCase()?Object.assign(Object.assign({},t),{child:this.appendToInlineHtmlChain(t.child,e,n)}):Object.assign(Object.assign({},t),{child:e})}}const oe=new class{constructor(){this.handlers=[new Vt,new zt,new Dt,new Gt,new Qt,new Xt,new Wt,new Yt,new Ut,new Zt,new _t,new Mt,new Pt,new Ft,new Jt,new ie]}registerHandler(t){this.handlers.unshift(t)}generate(t,e,n={autoMatchFormat:!0}){n&&n.filterInlineStyles&&Y.executeTheStrategyRefillAction(t.name,e);const s=Kt.isLinkElement(e)&&"RTETextNode"===t.name,r=this.handlers.filter((t=>!(!n.autoMatchFormat&&s)||t instanceof Yt)).filter((r=>e.nodeType!==Node.TEXT_NODE&&r.canHandle(t,{skipCustomAnnotations:n.skipCustomAnnotations||s,autoMatchFormat:n.autoMatchFormat}))).reduce(((t,s)=>{const r=s.handle(e,n.parentAnnotations);return Object.assign(Object.assign({},t),r)}),{});this.removeTextStyleDefaultsFromCustomStyle(r);const i=Y.getStrategies(t.name);for(const t of i)(n.autoMatchFormat||t.alwaysFilter)&&t.filterAnnotations(r);return r}removeTextStyleDefaultsFromCustomStyle(t){const e="textStyle"in t?t.textStyle:void 0,n=t.customStyle;if(!e||!n)return t;const s=X.getDefaultStyles(e);if(!s)return t;for(const t of Object.keys(s))n[t]===s[t]&&delete n[t];return 0===Object.keys(n).length&&delete t.customStyle,t}};class ae extends pt{constructor(){super(...arguments),this.annotationHandler=new Jt}generateChildNodes(t,e,s){const r=[],i=!(!s||!1!==s.autoMatchFormat),o=Object.assign({},e);return t.forEach((t=>{const a=Et.getElementToNodeStrategies().find((e=>e.canHandle([t],0,s)>0));let l=null;if(a&&(l=a.handle([t],s,o)),l)r.push(l);else if(dt(t)&&t.childNodes.length>0){const a=oe.generate(n,t,Object.assign({parentAnnotations:i?{inlineHtml:o.inlineHtml,link:o.link,code:o.code}:e},s));r.push(...this.generateChildNodes(Array.from(t.childNodes),a,s))}})),r}matchTextBlockType(t){var e;return null!==(e=this.annotationHandler.handle(t).textStyle)&&void 0!==e?e:"paragraph"}}class le extends ae{canHandle(t,e){return"PRE"!==t[e].tagName&&"CODE"!==t[e].tagName||!t[e].hasAttribute("data-language")?0:1}handle(t){const e=t[0];if(e){const t=e.textContent,n=e.dataset.language;return b.from({id:it(),type:"code-block",content:t,language:n})}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class ce extends ae{createRTEImageBlock(t,e){const n=!(e&&e.autoMatchFormat||!t.parentNode||"DIV"===t.parentNode.nodeName);return RTEImageBlock.from({id:it(),type:"image",nodes:[{id:it(),type:"image",url:t.src,annotations:oe.generate(RTEImageNode,t,e)}],annotations:Object.assign(Object.assign({},oe.generate(RTEImageBlock,t.parentElement,e)),{internalWrapper:n})},e)}}class he extends pt{shouldProceedToElementChildren(){return!1}appendChildBlocks(){}generateTextNode(t,e){return{id:it(),type:"text",text:t,annotations:e}}}class ue extends Q{constructor(){super(...arguments),this.stylesToBeFiltered={}}get alwaysFilter(){return!0}filterAnnotations(t){const{textAlign:e,customStyle:n}=t;return e&&n?(this.stylesToBeFiltered=_.getDefaultStyles(e),super.filterAnnotations(t)):t}}class de extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=X.getDefaultStyles("paragraph"),this.type="paragraph",this.elementTagName="p"}filterAnnotations(t){return t}canFilter(t){return Z.isTextBlock(t.constructor.name)&&t.type===this.type}canRefill(t,e){const n=this.classNameToBeAdded?`.${this.classNameToBeAdded}`:this.elementTagName;return Z.isTextBlock(t)&&e.matches(n)}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}class me extends de{constructor(t){super(),this.type="heading-1",this.elementTagName="h1",this.type=`heading-${t}`,this.elementTagName=`h${t}`,this.stylesToBeFiltered=X.getDefaultStyles(this.type)}}class we extends de{constructor(t){super(),this.type="title",this.elementTagName="div",this.classNameToBeAdded="v-rte-title",this.type=t,this.classNameToBeAdded=`v-rte-${t}`,this.stylesToBeFiltered=X.getDefaultStyles(this.type)}}class Te extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=Te.BOLD_STYLES,this.elementTagName="span",this.parentBlockTypes=["heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","title"],this.parentElementSelectors=["h1","h2","h3","h4","h5","h6",".v-rte-title"],this.toBeCheckedSelector=this.parentElementSelectors.join(",")}filterAnnotations(t){return t}canFilter(t){return Z.isTextNode(t.constructor.name)&&this.parentBlockIsHeadingOrTitle(t)}canRefill(t,e){return Z.isTextNode(t)&&"SPAN"===e.nodeName&&this.isHeadingOrTitleChild(e)}toCssText(){return`${this.parentElementSelectors.map((t=>`.${Te.RTE_CONTENT_CONTAINER_CLASS_NAME} ${t}`)).join(",")} { ${this.convertStylesMapToCssText()} }`}parentBlockIsHeadingOrTitle(t){const e=t.parent;return!!e&&this.parentBlockTypes.includes(e.type)}isHeadingOrTitleChild(t){let e=t.parentElement;for(;e;){if(e.matches(this.toBeCheckedSelector))return!0;if(Te.NON_HEADING_TITLE_ELEMENT_TAGS.includes(e.tagName))return!1;e=e.parentElement}return!1}}Te.BOLD_STYLES={fontWeight:"700"},Te.NON_HEADING_TITLE_ELEMENT_TAGS=["TD","TH","TR","TABLE","THEAD","TBODY","DIV","BODY"];class pe extends me{constructor(t){super(t),this.classNameToBeAdded=`v-rte-h${t}`,this.elementTagName="li"}canFilter(t){return Z.isListItemBlock(t.constructor.name)&&this.isBlockOrNodeStylesMatchFilterStyles(t,["fontSize","lineHeight"])}canRefill(t,e){return Z.isListItemBlock(t)&&e.matches(this.elementTagName)&&e.classList.contains(this.classNameToBeAdded)}}class ge extends we{constructor(t){super(t),this.classNameToBeAdded=`v-rte-${t}`,this.elementTagName="li"}canFilter(t){return Z.isListItemBlock(t.constructor.name)&&this.isBlockOrNodeStylesMatchFilterStyles(t,["fontSize","lineHeight"])}canRefill(t,e){return Z.isListItemBlock(t)&&e.matches(this.elementTagName)&&e.classList.contains(this.classNameToBeAdded)}}tt.registerRTEDTOClass("paragraph",e),tt.registerRTEDTOClass("title",e),tt.registerRTEDTOClass("subtitle",e),tt.registerRTEDTOClass("heading-1",e),tt.registerRTEDTOClass("heading-2",e),tt.registerRTEDTOClass("heading-3",e),tt.registerRTEDTOClass("heading-4",e),tt.registerRTEDTOClass("heading-5",e),tt.registerRTEDTOClass("heading-6",e),tt.registerRTEDTOClass("heading-6",e),tt.registerRTEDTOClass("list-item",RTEListItemBlock),tt.registerRTEDTOClass("bullet-list",RTEListBlock),tt.registerRTEDTOClass("number-list",RTEListBlock),tt.registerRTEDTOClass("image",RTEImageBlock),tt.registerRTEDTOClass("code-block",b),tt.registerRTEDTOClass("html-block",RTEHtmlBlock),tt.registerRTEDTOClass("text",n),tt.registerRTEDTOClass("image",RTEImageNode),St.registerBlockBasicStrategies(e.name),St.registerBlockBasicStrategies(RTEListBlock.name),St.registerBlockBasicStrategies(RTEListItemBlock.name),St.registerBlockBasicStrategies(RTEImageBlock.name),St.registerBlockBasicStrategies(RTEHtmlBlock.name),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e,n){let s=0;for(let r=e;r<t.length&&this.isInlineCandidate(t[r],n);r++)s++;return s}handle(t,s){const r=t[0].parentElement,i=s&&s.autoMatchFormat,o=this.generateChildNodes(t,i?oe.generate(n,r,Object.assign(Object.assign({},s),{skipCustomAnnotations:!0})):{},s),a=i?super.matchTextBlockType(r):this.matchTextBlockTypeByTagName(r),l=!i&&!a;return e.from(Object.assign({id:it(),type:a||"paragraph",nodes:o},l?{annotations:{internalWrapper:l}}:{annotations:oe.generate(e,r,s)}),s)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}matchTextBlockTypeByTagName(t){switch(t.nodeName){case"P":return"paragraph";default:return null}}isInlineCandidate(t,e){return t.nodeType===Node.TEXT_NODE||!!ee.has(t.nodeName)||!this.isDedicatedBlockTag(t.nodeName)&&(!(!1!==e.autoMatchFormat||!re(t))||this.isInlineLeafOrWrapper(t))}isDedicatedBlockTag(t){return te.has(t)&&!ee.has(t)}isInlineLeafOrWrapper(t){return 0===t.childNodes.length?se.has(t.nodeName):this.isTextOnlyElement(t)?se.has(t.nodeName)||ee.has(t.nodeName):this.hasOnlyInlineDescendants(t)}isTextOnlyElement(t){const e=Array.from(t.childNodes);return!e.some((t=>t.nodeType===Node.ELEMENT_NODE))&&e.some((t=>t.nodeType===Node.TEXT_NODE))}hasOnlyInlineDescendants(t){for(let e=0;e<t.children.length;e++){const n=t.children[e];if(this.isDedicatedBlockTag(n.nodeName))return!1;if(!n.hasChildNodes())return!1;if(!this.hasOnlyInlineDescendants(n))return!1}return!0}}),Et.registerElementToBlockStrategy(new class extends ce{canHandle(t,e){const n=t[e];return n.nodeType===Node.ELEMENT_NODE&&""===n.textContent&&n.querySelector("img")?1:0}handle(t,e){const n=t[0].querySelector("img");return this.createRTEImageBlock(n,e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Et.registerElementToBlockStrategy(new class extends ce{canHandle(t,e){return"VEGA-RICH-TEXT-IMAGE-EDITOR"===t[e].tagName?1:0}handle(t,e){const n=t[0],s=n.querySelector("img");if(ot(s))return RTEImageBlock.from({id:it(),type:"image",nodes:[{id:it(),type:"image",url:s.src,annotations:oe.generate(RTEImageNode,n,e)}],annotations:oe.generate(RTEImageBlock,n.parentElement,e)},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Et.registerElementToBlockStrategy(new class extends ce{canHandle(t,e){return"IMG"===t[e].tagName?1:0}handle(t,e){return this.createRTEImageBlock(t[0],e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e){return["heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","title","subtitle"].includes(super.matchTextBlockType(t[e]))?1:0}handle(t,n){const s=this.generateChildNodes(Array.from(t[0].childNodes),{},n);return 0===s.length?null:e.from({id:it(),type:super.matchTextBlockType(t[0]),nodes:s,annotations:oe.generate(e,t[0],n)},n)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e){if(!["UL","OL"].includes(t[e].parentElement.nodeName)&&t.some((t=>"LI"===t.nodeName))){let n=0;for(let s=e;s<t.length&&"LI"===t[s].nodeName;s++)n++;return n}return"LI"===t[e].tagName?1:0}handle(t,e){const n=t[0];return["UL","OL"].includes(n.parentElement.nodeName)?RTEListItemBlock.from(this.generateListItemBlockDTO(n,e),e):this.generateWithListBlock(t,e)}appendChildBlocks(t,e){t.nestList=e.filter((t=>["bullet-list","number-list"].includes(t.type)))}shouldProceedToElementChildren(){return!0}generateWithListBlock(t,e){return RTEListBlock.from({id:it(),type:"bullet-list",blocks:t.map((t=>this.generateListItemBlockDTO(t,e)))},e)}generateListItemBlockDTO(t,e){return{id:it(),type:"list-item",annotations:oe.generate(RTEListItemBlock,t,e),nodes:this.generateChildNodes(Array.from(t.childNodes.length?t.childNodes:[t]).filter((t=>!["UL","OL"].includes(t.nodeName))),oe.generate(n,t,Object.assign(Object.assign({},e),{skipCustomAnnotations:!0})),e)}}}),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e){const n=t[e],s=n.parentElement,r="LI"!==n.nodeName,i=n.nodeType===Node.TEXT_NODE&&""===n.textContent.trim(),o=ot(s)&&["UL","OL"].includes(s.nodeName);return r&&!i&&o?1:0}handle(t,e){const n=this.generateChildNodes(t,{},e);return RTEListItemBlock.from({id:it(),type:"list-item",nodes:n,annotations:{}},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e){return"OL"===t[e].tagName?1:0}handle(t,e){return 0===t[0].childNodes.length?null:RTEListBlock.from({id:it(),type:"number-list",blocks:[],annotations:oe.generate(RTEListBlock,t[0],e)},e)}appendChildBlocks(t,e){t.children=e.filter((t=>t instanceof RTEListItemBlock)),e.forEach((e=>e.parent=t))}shouldProceedToElementChildren(){return!0}}),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e){return"UL"===t[e].tagName?1:0}handle(t,e){return 0===t[0].childNodes.length?null:RTEListBlock.from({id:it(),type:"bullet-list",blocks:[],annotations:oe.generate(RTEListBlock,t[0],e)},e)}appendChildBlocks(t,e){t.children=e.filter((t=>t instanceof RTEListItemBlock)),e.forEach((e=>e.parent=t))}shouldProceedToElementChildren(){return!0}}),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e,n){const s=t[e];return s.nodeType===Node.TEXT_NODE||this.isInlineTagWithoutBlockChildren(s,n)||te.has(s.nodeName)&&!this.shouldFallBackToHtmlBlock(s)||n.autoMatchFormat||!this.isCustomHtmlContainer(s)||Kt.isTitleOrSubtitle(s)?0:1}handle(t,e){return RTEHtmlBlock.from(this.generateHtmlBlock(t[0],e),e)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}isInlineTagWithoutBlockChildren(t,e){if(re(t))return!(0===t.childNodes.length&&""===t.textContent&&!ee.has(t.nodeName)&&!se.has(t.nodeName));const n=Array.from(t.childNodes);return!(n.some((t=>t.nodeType===Node.ELEMENT_NODE))||!n.some((t=>t.nodeType===Node.TEXT_NODE)))&&(!1!==e.autoMatchFormat||!ne.has(t.parentElement.nodeName)&&(se.has(t.nodeName)||ee.has(t.nodeName)))}shouldFallBackToHtmlBlock(t){const e=Array.from(t.childNodes);if(0===e.length)return!1;const n=t.parentElement.nodeName;return"UL"!==n&&"OL"!==n&&e.every((t=>t.nodeType===Node.ELEMENT_NODE&&""===t.textContent&&!ee.has(t.nodeName)&&!se.has(t.nodeName)))}isCustomHtmlContainer(t){return"DIV"!==t.nodeName||t.childNodes.length>0&&"IMG"!==t.childNodes[0].nodeName}generateHtmlBlock(t,e){return{id:it(),type:"html-block",htmlTag:t.nodeName.toLowerCase(),annotations:oe.generate(RTEHtmlBlock,t,e),children:[]}}}),
1
+ import{g as t,e,c as n,h as s,A as r,T as i,q as o,H as a,r as l,l as c,t as h,u,v as d,w as m,x as w,I as T,n as p,S as g,j as E,B as f,y as k,d as R,z as B,D as x,o as I,E as b,s as O,N as L,F as y,G as N,J as C,K as A,m as H,L as j,M as v,O as S,P as $,Q as D,U as M,W as P,X as F,Y as z,Z as V,_ as U,$ as W,a0 as G,a1 as J,a2 as K,R as Y,a3 as X,p as Q,a4 as Z,a5 as _,a6 as q,b as tt,a7 as et,a8 as nt,a9 as st,aa as rt}from"./p-fb05335d.js";import{g as it}from"./p-8b5d3a52.js";import{i as ot}from"./p-e4c4ea35.js";import{C as at}from"./p-2d0d575f.js";import{d as lt}from"./p-f28a6074.js";import{c as ct,d as ht}from"./p-6c43d54a.js";import{r as ut,i as dt}from"./p-6e70d3cc.js";import{c as mt}from"./p-a841cf13.js";import{L as wt}from"./p-6e1ab235.js";class RTEListItemBlock extends e{constructor(t,e,n){super(t,"list-item",n),this.nestList=[],this.nestList=e}static from(t,e={autoMatchFormat:!0}){const s=new RTEListItemBlock(t.id,void 0,e);s.children=t.nodes.map((t=>n.from(t,s,e))),t.children&&(s.nestList=t.children.map((t=>{const e=RTEListBlock.from(t);return e.parent=s,e})));const{annotations:r}=t;return r&&Object.entries(r).forEach((([t,e])=>{const n=this.createAnnotationEntity(t,e);ot(n)&&s.annotationMap.set(...n)})),s}toJSON(){var t;return Object.assign(Object.assign({},super.toJSON()),{type:"list-item",children:null===(t=this.nestList)||void 0===t?void 0:t.map((t=>t.toJSON()))})}toHtml(t){return[`<li${super.generateAttributeString(t)}>`,this.getChildrenHtml(t),"</li>"].join("")}cloneWithNodes(t){const e=new RTEListItemBlock(it());return e.children=[],e.apply(new s(t)),e}getLastNode(){return this.nestList&&this.nestList.length>0?this.nestList[this.nestList.length-1].getLastNode():super.getLastNode()}createNewListItem(){return new RTEListItemBlock(it())}clone(t){var e;const n=new RTEListItemBlock(this.id);return n.children=this.children.map((t=>t.clone(n))),n.annotationMap=super.cloneAnnotations(),n.nestList=null===(e=this.nestList)||void 0===e?void 0:e.map((t=>t.clone(n))),n.parent=t,n}}r.register(i.name,RTEListItemBlock.name,new o),r.register(a.name,RTEListItemBlock.name,new l),r.register(c.LINE_BREAK_SINGLE_BLOCK,RTEListItemBlock.name,new h),r.register(c.LINE_BREAK_MULTIPLE_BLOCKS,RTEListItemBlock.name,new u),r.register(c.DELETE_NEST_LIST,RTEListItemBlock.name,new class extends t{handleAction(t,e){e.nestList&&(e.nestList=e.nestList.length>1?e.nestList.filter((e=>e!==t.nestListBlockToBeRemoved)):void 0)}}),r.register(c.SPLIT_BLOCK_WITH_NODE,RTEListItemBlock.name,new d),r.register(c.REPLACE_CHILD_NODES,RTEListItemBlock.name,new m),r.register(c.REPLACE_NEST_LIST,RTEListItemBlock.name,new class extends t{handleAction(t,e){t.newList.forEach((t=>{t.parent=e})),e.nestList=t.newList}}),r.register(c.MERGE_TWO_BLOCKS_NODES,RTEListItemBlock.name,new w),r.register(c.INSERT_IMAGE_TO_BLOCK,RTEListItemBlock.name,new class extends t{handleAction(t,e){e.parent.apply(t)}});class Tt extends f{constructor(){super(...arguments),this.type=k.LIST}static getDefaultStyles(){return{paddingLeft:"8px",marginLeft:"16px"}}renderStyle(t){return(null==t?void 0:t.standalone)?Tt.getDefaultStyles():null}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte--list"}clone(){return new Tt}toJSON(){}}class RTEListBlock extends R{constructor(t,e,n){super(t),this.type="bullet-list",this.children=[],this.type=e;const{autoMatchFormat:s}=n||{autoMatchFormat:!0};s&&this.annotationMap.set(k.LIST,new Tt)}static from(t,e={autoMatchFormat:!0}){const n=new RTEListBlock(t.id,t.type,e),{annotations:s}=t;return s&&Object.entries(s).forEach((([t,e])=>{const s=this.createAnnotationEntity(t,e);ot(s)&&n.annotationMap.set(...s)})),n.children=t.blocks.map((t=>{const s=RTEListItemBlock.from(t,e);return s.parent=n,s})),n}static createAnnotationEntity(t,e){switch(t){case"customAttribute":return I.from(e);case"customClass":return x.from(e);case"customStyle":return B.from(e)}}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,blocks:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=this.getBlockTag();return[`<${e}${super.generateAttributeString(t)}>`,this.children.map((e=>e.toHtml(t))).join(""),`</${e}>`].join("")}isNotEmpty(){return this.children.length>0}getLastNode(){return this.children[this.children.length-1].getLastNode()}clone(t){const e=new RTEListBlock(this.id,this.type);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}getBlockTag(){return"number-list"===this.type?"ol":"ul"}}r.register(c.TRANSFORM_LIST_BLOCK,RTEListBlock.name,new class extends t{handleAction(t,e){const n=t.selectedBlocks,r=e.parent.createList(t.listType);if(n.every((t=>t.parent===e)))r.apply(new s(e.children)),e.parent.apply(new T(e,r)),e.parent.apply(new p(e)),n.forEach((t=>t.children.map((t=>t.apply(new g)))));else{const n=t.selectedBlocks.map((t=>e.parent.toListItem(t)));r.apply(new s(n)),e.parent.apply(new T(e,r)),t.selectedBlocks.forEach((t=>{t.parent.apply(new p(t))})),0===e.children.length&&e.parent.apply(new p(e))}}}),r.register(c.TRANSFORM_PARAGRAPH_BLOCK,RTEListBlock.name,new class extends t{handleAction(t,e){let n=!1,r=!1;const i=t.selectedBlocks,o=i.map((t=>(t.children.map((t=>t.apply(new g))),t===e.children[0]&&(n=!0),t===e.children[e.children.length-1]&&(r=!0),this.toParagraph(t))));if(n)e.parent.apply(new E(e,...o));else if(r)e.parent.apply(new T(e,...o));else{const t=e.children.indexOf(i[0]),n=e.children.indexOf(i[i.length-1]),r=e.parent.createList(e.type);r.apply(new s(e.children.slice(0,t)));const a=e.parent.createList(e.type);a.apply(new s(e.children.slice(n+1))),e.parent.apply(new E(e,r,...o,a)),e.parent.apply(new p(e))}i.map((t=>{e.apply(new p(t))})),0===e.children.length&&e.parent.apply(new p(e))}toParagraph(t){const n=new e(it(),"paragraph");return n.apply(new s(t.children)),n.annotationMap=t.annotationMap,n}}),r.register(c.INSERT_IMAGE_TO_BLOCK,RTEListBlock.name,new class extends t{handleAction(t,e){e.parent.apply("list-item"!==e.parent.type?new T(e,t.imageBlockToBeInserted):t)}});class pt{}class gt{constructor(t,e){this.childrenOutput=[],this.currentStrategy=t,this.currentElements=e}setChildrenOutput(t){this.childrenOutput=t}toDto(t={autoMatchFormat:!0,skipCustomAnnotations:!0}){const e=this.currentStrategy.handle(this.currentElements,t);return this.childrenOutput.length>0&&e&&this.currentStrategy.appendChildBlocks(e,this.childrenOutput.map((e=>e.toDto(t))).filter(ot)),e}}const Et=new class{constructor(){this.elementToBlockStrategies=[],this.elementToNodeStrategies=[]}registerElementToBlockStrategy(t){this.hasDuplicateStrategy(t,this.elementToBlockStrategies)||this.elementToBlockStrategies.unshift(t)}registerElementToNodeStrategy(t){this.hasDuplicateStrategy(t,this.elementToNodeStrategies)||this.elementToNodeStrategies.unshift(t)}getElementToBlockStrategies(){return this.elementToBlockStrategies}getElementToNodeStrategies(){return this.elementToNodeStrategies}hasDuplicateStrategy(t,e){return e.includes(t)}},ft=new class{process(t,e={autoMatchFormat:!0,skipCustomAnnotations:!0}){const n=this.getElementToBlockStrategies(),s=[];for(let r=0;r<t.length;r++){if(this.isInvalidElement(t[r],e))continue;let i=0;for(const o of n)if(i=o.canHandle(t,r,e),i>0){const n=t.slice(r,r+i),a=new gt(o,n);1===i&&o.shouldProceedToElementChildren()&&a.setChildrenOutput(this.process(Array.from(n[0].childNodes),e)),s.push(a),r+=i-1;break}if(0===i&&r<t.length){const n=Array.from(t[r].childNodes),i=this.process(Array.from(n),e);i.length>0&&s.push(...i)}}return s}isInvalidElement(t,e){return t.nodeType===Node.COMMENT_NODE||!1!==e.autoMatchFormat&&["META","STYLE"].includes(t.nodeName)}getElementToBlockStrategies(){return Et.getElementToBlockStrategies()}};class kt extends t{handleAction(t,e){const n=t.entityToBeAppended;e.children&&(n.forEach((t=>{t.parent=e})),e.children=e.children.concat(n))}}class Rt extends t{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[...t.childrenToBeInserted,t.referChildren])}replaceElementWithElements(t,e,n){t.children&&(n.forEach((e=>{e.parent=t})),t.children=t.children.flatMap((t=>t===e?n:t)))}}class Bt extends Rt{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[t.referChildren,...t.childrenToBeInserted])}}class xt extends L{constructor(t,e){super(),this.type=y.IMAGE,this.size=t,this.alt=e}static from(t,e){return[y.IMAGE,new xt(t,e)]}static getDefaultStyles(){return{verticalAlign:"bottom"}}toJSON(){return ot(this.alt)?{size:this.size,alt:this.alt}:{size:this.size}}clone(){return new xt(this.size,this.alt)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.size?`v-rte--image-size-${this.size}`:null}renderStyle(t){if(!(null==t?void 0:t.standalone))return null;const e=xt.getDefaultStyles();switch(this.size){case"sm":return Object.assign(Object.assign({},e),{width:"25%"});case"md":return Object.assign(Object.assign({},e),{width:"50%"});case"lg":return Object.assign(Object.assign({},e),{width:"100%"})}}}xt.BASE_STYLES={verticalAlign:"bottom"};class RTEImageNode extends N{constructor(t,e,n,s){super(t,s),this.type=C.IMAGE,this.url=e,this.parent=n}static from(t,e,n={autoMatchFormat:!0}){const s=new RTEImageNode(t.id,t.url,e),r=!!n.autoMatchFormat,i=Object.assign({},t.annotations),{size:o}=i,a=function(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(t);r<s.length;r++)e.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(t,s[r])&&(n[s[r]]=t[s[r]])}return n}(i,["size"]),l=Object.assign(Object.assign({},a),{size:null!=o?o:r?"md":void 0});return s.annotationMap=new Map(Object.keys(l).map((t=>"size"===t||"alt"===t?xt.from(l.size,l.alt):this.createAnnotationEntity(t,l[t]))).filter(ot)),s}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof xt||t instanceof A)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return""==t.alt&&delete t.alt,Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"image",url:this.url})}clone(t){return new RTEImageNode(this.id,this.url,t,super.cloneAnnotations())}toHtml(t){const e=this.getAnnotationByType(y.IMAGE);return`<img${super.generateAttributeString(t,...[e&&e.alt?`alt="${e.alt}"`:null,`src="${this.url}"`,e&&e.size?`data-size="${e.size}"`:null].filter(ot))}>`}doAnnotationActionApply(t){const e=r.get(H.name,RTEImageNode.name);e&&e.execute(t,this)}doModifyActionApply(t){r.executeTheStrategy(t,this)}}r.register(c.UPDATE_IMAGE_NODE_URL,RTEImageNode.name,new class extends t{handleAction(t,e){e.url=t.url}}),r.register(H.name,RTEImageNode.name,new class extends t{handleAction(t,e){const n=t.toAnnotation();e.annotationMap.set(n.type,n)}});class It extends v{constructor(t,e){super(),this.type=c.INSERT_NEW_PARAGRAPH,this.startContainerNode=t,this.startOffset=e}}class RTEImageBlock extends R{constructor(t){super(t),this.type="image",this.children=[]}static from(t,e={autoMatchFormat:!0}){const n=new RTEImageBlock(t.id),{annotations:s}=t;return n.children=t.nodes.map((t=>RTEImageNode.from(t,n,e))),s&&super.convertAnnotationsToMap(n.annotationMap,s),n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:"image",nodes:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=super.generateAttributeString(t),n=this.children.map((e=>e.toHtml(t))).join("");return super.shouldRenderAsInternalWrapper()?n:[`<div${e}>`,n,"</div>"].join("")}isNotEmpty(){return this.children.length>0&&this.children.some((t=>t.url.length>0))}getLastNode(){return this.children[this.children.length-1]}createNewImageBlock(){return new RTEImageBlock(it())}clone(t){const e=new RTEImageBlock(this.id);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}}r.register(c.MERGE_TWO_BLOCKS_NODES,RTEImageBlock.name,new w),r.register(c.REPLACE_CHILD_NODES,RTEImageBlock.name,new m),r.register(c.SPLIT_BLOCK_WITH_NODE,RTEImageBlock.name,new class extends t{handleAction(t,e){t.newBlock=this.splitImageNodes(t.splitPointNode,t.startOffsetOfNode,e)}splitImageNodes(t,e,n){const s=n.children.indexOf(t);if(s>-1){const t=n.children.slice(0,s+e),r=n.children.slice(s+e);n.apply(new j(t));const i=this.cloneWithNodes(r,n);return n.parent.apply(new T(n,i)),i}}cloneWithNodes(t,e){const n=e.createNewImageBlock();return n.children=[],n.apply(new s(t)),n}}),r.register(c.LINE_BREAK_SINGLE_BLOCK,RTEImageBlock.name,new class extends t{handleAction(t,e){const n=new It(t.startContainerNode,t.startOffset);e.apply(n);const s=n.newBlock;s&&(t.lineBreakNode=s.children[0])}}),r.register(c.LINE_BREAK_MULTIPLE_BLOCKS,RTEImageBlock.name,new class extends t{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,r){const i=e.from({id:it(),type:"paragraph",nodes:[{id:it(),type:"text",text:"\n"}]});r.parent.apply(new T(r,i));const o=this.concatBlocksNodes(t.slice(1));return(0===o.length||o[0]&&""===o[0].text)&&o.push(new n(it(),"\n",i)),i.apply(new s(o)),i.children[0]}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new p(t)))})),e}}),r.register(c.INSERT_IMAGE_TO_BLOCK,RTEImageBlock.name,new class extends t{handleAction(t,e){const n=t.splitPointNode,r=t.startOffsetOfNode,i=t.imageBlockToBeInserted;e.children.length<1?e.apply(new s(i.children)):this.isCaretPositionAtBlockEnd(e,n,r)?e.parent.apply(new T(e,i)):this.isCaretPositionAtBlockStart(e,n,r)?e.parent.apply(new E(e,i)):(e.apply(new S(n,r)),e.parent.apply(new T(e,i)))}}),r.register(a.name,RTEImageBlock.name,new l);class RTEHtmlBlock extends R{constructor(t,e){super(t),this.type="html-block",this.children=[],this.htmlTag=e}static from(t,e){const n=new RTEHtmlBlock(t.id,t.htmlTag),{annotations:s}=t;return s&&super.convertAnnotationsToMap(n.annotationMap,s),n.children=this.generateBlockChildren(t.children,e,n),n}clone(t){const e=new RTEHtmlBlock(this.id,this.htmlTag);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return!0}toHtml(t){const e=this.htmlTag,n=super.generateAttributeString(t);return $.has(this.htmlTag)?`<${e}${n}>`:[`<${e}${n}>`,this.children.map((e=>e.toHtml(t))).join(""),`</${e}>`].join("")}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,htmlTag:this.htmlTag,children:this.children.map((t=>t.toJSON()))})}}class bt extends v{constructor(t){super(),this.type=c.MERGE_TWO_BLOCKS_NODES,this.blockNeedToBeMerged=t}}class Ot extends D{handleAction(t,e){const{startContainerNode:n}=t;n.isContentEditable()?n.isTextNode()&&this.deleteTextNodeContent(t,e):this.deleteDecoratorNodeContent(t,e);const s=e.parent;s&&e.isListItemBlock()&&0===s.children.length&&s.parent.apply(new p(s))}deleteTextNodeContent(t,e){const n=t.startContainerNode,s=t.startOffset;if(0!==s&&!n.isEmpty()){const r=n.text.slice(0,s-1)+n.text.slice(s);if(n.apply(new M(r)),r)return void(t.previousNode=n);{const s=this.getPreviousNode(n);return s&&s.parent===e&&"\n"===s.text||1===e.children.length?void(t.previousNode=n):(e.apply(new p(n)),void(t.previousNode=s))}}{let s=this.getPreviousNode(n),r=null;const i=n.isEmpty();if(e.children.length&&s&&s.parent!==e)i&&e.apply(new p(n)),e.type===s.parent.type&&s.parent.apply(new bt(e));else if(this.isContentFirstNode(n)&&i&&(r=this.getNextNode(n)),i&&e.apply(new p(n)),s&&s.isTextNode()&&(s.isEmpty()||!s.isContentEditable()&&s.parent===e)){const t=s;s=this.getPreviousNode(s),t.parent.apply(new p(t)),s||i||(r=n)}0===e.children.length&&e.parent.apply(new p(e)),s?t.previousNode=s:r&&(t.nextNode=r)}}deleteDecoratorNodeContent(t,e){const n=t.startContainerNode,s=t.startOffset;let r=this.getPreviousNode(n),i=null;if(0!==s){const t=e;this.isContentFirstNode(n)&&(i=this.getNextNode(n)),1===t.children.length?t.parent.apply(new p(t)):t.apply(new p(n))}else{const e=r;e&&!e.isContentEditable()&&(r=this.getPreviousNode(e),e.parent.apply(new p(e)),r||(t.nextNode=n))}r?t.previousNode=r:i&&(t.nextNode=i)}}class Lt extends t{handleAction(t,e){const{startContainerNode:n}=t;t.newBlock=this.breakSingleBlock(n,t.startOffset,e)}breakSingleBlock(t,e,n){const s=this.getNewParagraph(t);if(s){if(this.isCaretPositionAtBlockEnd(n,t,e))n.parent.apply(new T(n,s));else{if(!this.isCaretPositionAtBlockStart(n,t,e)){const s=new S(t,e);return n.apply(s),s.newBlock}n.parent.apply(new E(n,s))}return s}}getNewParagraph(t){const e=this.createNewParagraph("");if(e){let n=e.children[0];return t.isTextNode()&&t.isContentEditable()&&(e.children=[],n=t.cloneWithText(""),n.annotationMap.delete(y.LINK),e.apply(new s([n]))),e}}}class yt extends v{constructor(t,e,n=!1){super(),this.isFlushable=!0,this.type=c.UPDATE_CURSOR_POSITION,this.immediatelyRun=!1,this.nextFocusNode=t,this.offset=e,this.immediatelyRun=n,this.immediatelyRun&&(this.isFlushable=!1)}}class Nt extends t{handleAction(t,e){const{rteRange:n,nodeToBeInserted:s}=t,{startNode:r,startOffset:i}=n;if(r){const t=e;if(r.isContentEditable()&&r.isTextNode())if("\n"!==r.text&&r.text&&0!==i){const e=r.text.substring(0,i),n=r.text.substring(i),o=r.cloneWithText(e),a=r.cloneWithText(n),l=[o,s];n&&l.push(a),t.apply(new E(r,...l)),t.apply(new p(r))}else t.apply(new E(r,s));else t.apply(0!==i?new T(r,s):new E(r,s));this.updateCursorPosition(s)}}updateCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new yt(t))}}class Ct extends t{handleAction(t,e){const{text:n,offset:s,decoratorNode:r}=t,i=this.createNewParagraph(n);if(i){const t=i.children[0];e.apply(0!==s?new T(r,t):new E(r,t)),this.setTheCursorPosition(t)}}setTheCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new yt(t))}}class At extends t{handleAction(t,e){t.newBlock=this.breakSingleListItemBlock(t.startContainerNode,t.startOffset,e)}breakSingleListItemBlock(t,e,n){const r=n.createNewListItem(),i=this.copyInlineStyleToNewNode(t);if(r.apply(new s([i])),this.isCaretPositionAtBlockEnd(n,t,e))return this.breakListItemAtEnd(r,n);if(!this.isCaretPositionAtBlockStart(n,t,e)){const s=new S(t,e);return n.apply(s),s.newBlock}return n.parent.apply(new E(n,r)),r}breakListItemAtEnd(t,n){const r=n.parent.children[n.parent.children.length-1],i=1===n.children.length&&n.children[0].isEmpty();if(n===r&&i){const r=n.parent.parent;if("list-item"!==r.type){const i=e.from({id:it(),type:"paragraph",nodes:[]});return i.apply(new s(t.children)),r.apply(new T(n.parent,i)),n.parent.apply(new p(n)),i}r.parent.apply(new T(r,t)),n.parent.apply(new p(n))}else n.parent.apply(new T(n,t));return t}copyInlineStyleToNewNode(t){const e=t.cloneWithText("");return e.annotationMap.delete(y.LINK),e}}class Ht extends v{constructor(t){super(),this.type=c.DELETE_NEST_LIST,this.nestListBlockToBeRemoved=t}}class jt extends P{handleAction(t,e){super.handleAction(t,e);const n=e.parent;0===e.children.length&&n&&n.apply("list-item"===n.type?new Ht(e):new p(e))}}class vt extends t{handleAction(t,e){if(e.parent){const{blocksToBeInserted:n,startNode:s,startOffset:r}=t;let i=e;if(s===e.children[0]&&0===r)e.parent.apply(new E(e,...n));else{const t=new S(s,r);e.apply(t),e.parent.apply(new T(e,...n)),i=t.newBlock}t.futureFocusBlock=i}}}const St=new class{registerBlockBasicStrategies(t){r.register(c.DELETE_CHILDREN,t,t===RTEListBlock.name?new jt:new P),r.register(c.APPEND_CHILDREN,t,new kt),r.register(c.INSERT_CHILDREN_BEFORE,t,new Rt),r.register(c.INSERT_CHILDREN_AFTER,t,new Bt),r.register(c.DELETE_BLOCK_CONTENT,t,new Ot),r.register(c.INSERT_NEW_PARAGRAPH,t,t===RTEListItemBlock.name?new At:new Lt),r.register(c.INSERT_TEXT_TO_DECORATOR_NODE,t,new Ct),r.register(c.INSERT_NODE_TO_NEAREST_ROOT,t,new Nt),r.register(c.PASTE_CONTENT,t,new vt)}};class $t{}class Dt extends $t{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isBold(t)||e.bold?{bold:!0}:{}}isBold(t){return"STRONG"===t.nodeName||"B"===t.nodeName||t.style.fontWeight===F||t.style.fontWeight===z||t.classList.contains("v-rte--bold")}}class Mt extends $t{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.getAttributes(t);return Object.keys(e).length>0?{customAttribute:e}:{}}getAttributes(t){return t.getAttributeNames().filter((t=>"style"!==t&&"class"!==t&&this.isValidAttr(t))).reduce(((e,n)=>(e[n]=t.getAttribute(n),e)),{})}isValidAttr(t){return/^[a-zA-Z_][\w-]*$/.test(t)}}class Pt extends $t{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.getCustomClass(t);return e.length>0?{customClass:e}:{}}getCustomClass(t){return t.classList.toString().split(" ").filter((t=>!t.includes("v-rte")&&""!==t))}}class Ft extends $t{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=V(t);return Object.keys(e).length>0?{customStyle:e}:{}}}class zt extends $t{canHandle(t){return["RTETextBlock","RTEListItemBlock","RTEListBlock"].includes(t.name)}handle(t){const e=this.getIndent(t);return e?{indent:e}:{}}getIndent(t){const e=t.style;let n;if(e.marginLeft)n=e.marginLeft;else{if(!e.margin)return null;{const t=e.margin.split(" ");switch(t.length){case 4:n=t[3];break;case 2:case 3:n=t[1];break;default:n=t[0]}}}const s=Number(n.replace("px",""));return s&&s>=0?Math.floor(s/16):null}}class Vt extends $t{canHandle(t){return["RTETextBlock","RTEListItemBlock","RTEListBlock"].includes(t.name)}handle(t){const e=this.getTextAlign(t);return e?{textAlign:e}:{}}getTextAlign(t){const e=t.classList;if(e.contains("v-rte--horizontal-alignment-left"))return"left";if(e.contains("v-rte--horizontal-alignment-center"))return"center";if(e.contains("v-rte--horizontal-alignment-right"))return"right";if(e.contains("v-rte--horizontal-alignment-justify"))return"justify";switch(t.style.textAlign){case"center":return"center";case"right":return"right";case"justify":return"justify";case"left":return"left";default:return null}}}class Ut extends $t{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isCode(t)||e.code?{code:!0}:{}}isCode(t){return t.classList.contains("v-rte--code")||"CODE"===t.nodeName||"PRE"===t.nodeName||"monospace"===t.style.fontFamily||"Roboto Mono"===t.style.fontFamily.replace(/["']/g,"")}}class Wt extends $t{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){const n=this.getColor(t)||e.textColor;return n?{textColor:n}:{}}getColor(t){var e;const n=null===(e=ut(t.style.color))||void 0===e?void 0:e.toUpperCase();if(n){const t=U.filter((t=>t.key!==W.key)).find((t=>t.light===n||t.dark===n));return t?t.key:null}for(const e of U)if(t.style.color.includes(e.key))return e.key;return null}}class Gt extends $t{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isItalic(t)||e.italic?{italic:!0}:{}}isItalic(t){return"I"===t.nodeName||t.style.fontStyle===G||"EM"===t.nodeName||t.classList.contains("v-rte--italic")}}class Jt extends $t{canHandle(t,e){return!!e.autoMatchFormat&&"RTETextBlock"===t.name}handle(t){const e=this.getTextStyle(t);return e?{textStyle:e}:{}}getTextStyle(t){const e=this.getElementTypeByDataType(t);if(e)return e;const n=this.getElementTypeByNodeName(t);if(n)return n;const s=this.getElementTypeByFontSize(t);if(s)return s;return this.getElementTypeByClassName(t)||null}getElementTypeByDataType(t){return t.nodeType!==Node.TEXT_NODE&&t.hasAttribute("data-type")?t.getAttribute("data-type"):null}getElementTypeByFontSize(t){var e;switch(null===(e=t.style)||void 0===e?void 0:e.fontSize){case"36px":return"title";case"28px":return"subtitle";case"22px":return"heading-1";case"20px":return"heading-2";case"18px":return"heading-3";default:return null}}getElementTypeByNodeName(t){switch(t.nodeName){case"P":return"paragraph";case"H1":return"heading-1";case"H2":return"heading-2";case"H3":return"heading-3";case"H4":return"heading-4";case"H5":return"heading-5";case"H6":return"heading-6";default:return null}}getElementTypeByClassName(t){if(t.className){const e=/\bv-rte-(?:-text-style-)?(title|subtitle|heading-1|heading-2|heading-3|heading-4|heading-5|heading-6|paragraph)\b/.exec(t.className);if(e)return e[1]}return null}}class Kt{static isTitleOrSubtitle(t){if("DIV"===t.nodeName){const e=Kt.textStyleHandler.getTextStyle(t);return"title"===e||"subtitle"===e}return!1}static isLinkElement(t){return"A"===t.nodeName}}Kt.textStyleHandler=new Jt;class Yt extends $t{constructor(){super(...arguments),this.handlers=[new Mt,new Pt,new Ft]}canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return e.link?{link:e.link}:Kt.isLinkElement(t)?{link:this.generateLinkAnnotations(t)}:{}}generateLinkAnnotations(t){const e={href:t.getAttribute("href")||"",groupKey:it()};return this.handlers.forEach((n=>{Object.assign(e,n.handle(t))})),e}}class Xt extends $t{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isStrikethrough(t)||e.strikethrough?{strikethrough:!0}:{}}isStrikethrough(t){return t.style.textDecoration.includes(J)||"S"===t.nodeName||"DEL"===t.nodeName||t.classList.contains("v-rte--strikethrough")}}class Qt extends $t{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isUnderline(t)||e.underline?{underline:!0}:{}}isUnderline(t){return t.style.textDecoration.includes(K)||"U"===t.nodeName||"INS"===t.nodeName||t.classList.contains("v-rte--underline")}}class Zt extends $t{canHandle(t){return"RTEImageNode"===t.name}handle(t){const e=this.getImageSize(t);return e?{size:e}:{}}getImageSize(t){return t.getAttribute("data-size")?t.getAttribute("data-size"):null}}class _t extends $t{canHandle(t){return"RTEImageNode"===t.name}handle(t){return t.hasAttribute("alt")?{alt:t.getAttribute("alt")}:{}}}const qt=new Set(["P","H1","H2","H3","H4","H5","H6","LI"]),te=new Set(["P","H1","H2","H3","H4","H5","H6","LI","UL","OL","IMG","CODE"]),ee=new Set(["BR","VEGA-RICH-TEXT-LINK-EDITOR","CODE","A"]),ne=new Set(["TABLE","THEAD","TBODY","TFOOT","TR","DL"]),se=new Set(["ABBR","B","BDI","BDO","CITE","DEL","DFN","EM","I","INS","KBD","MARK","METER","OUTPUT","PROGRESS","Q","S","SAMP","SMALL","SPAN","STRONG","SUB","SUP","TIME","U","VAR"]);function re(t){return qt.has(t.parentElement.nodeName)}class ie extends $t{constructor(){super(...arguments),this.customAttributeHandler=new Mt,this.customStyleAnnotationHandler=new Ft,this.customClassAnnotationHandler=new Pt}canHandle(t,e){return"RTETextNode"===t.name&&!1===e.autoMatchFormat}handle(t,e){if(te.has(t.nodeName)&&!ee.has(t.nodeName))return{};const n=this.generateInlineHtmlAnnotation(t,Object.assign({},e));return n?{inlineHtml:n}:{}}generateInlineHtmlAnnotation(t,e){let{inlineHtml:s}=e;const r=Array.from(t.childNodes).some((t=>t.nodeType===Node.ELEMENT_NODE));if(!n.supportsHtmlTag(t.nodeName.toLowerCase())||r){const e=Object.assign(Object.assign({htmlTag:t.nodeName.toLowerCase()},r?{groupId:it()}:{}),{customAttribute:this.customAttributeHandler.handle(t).customAttribute,customStyle:this.customStyleAnnotationHandler.handle(t).customStyle,customClass:this.customClassAnnotationHandler.handle(t).customClass});s=s?this.appendToInlineHtmlChain(s,e,t.parentNode):e}return s?Object.assign({},s):null}appendToInlineHtmlChain(t,e,n){return t.child&&n&&t.child.htmlTag===n.nodeName.toLowerCase()?Object.assign(Object.assign({},t),{child:this.appendToInlineHtmlChain(t.child,e,n)}):Object.assign(Object.assign({},t),{child:e})}}const oe=new class{constructor(){this.handlers=[new Vt,new zt,new Dt,new Gt,new Qt,new Xt,new Wt,new Yt,new Ut,new Zt,new _t,new Mt,new Pt,new Ft,new Jt,new ie]}registerHandler(t){this.handlers.unshift(t)}generate(t,e,n={autoMatchFormat:!0}){n&&n.filterInlineStyles&&Y.executeTheStrategyRefillAction(t.name,e);const s=Kt.isLinkElement(e)&&"RTETextNode"===t.name,r=this.handlers.filter((t=>!(!n.autoMatchFormat&&s)||t instanceof Yt)).filter((r=>e.nodeType!==Node.TEXT_NODE&&r.canHandle(t,{skipCustomAnnotations:n.skipCustomAnnotations||s,autoMatchFormat:n.autoMatchFormat}))).reduce(((t,s)=>{const r=s.handle(e,n.parentAnnotations);return Object.assign(Object.assign({},t),r)}),{});this.removeTextStyleDefaultsFromCustomStyle(r);const i=Y.getStrategies(t.name);for(const t of i)(n.autoMatchFormat||t.alwaysFilter)&&t.filterAnnotations(r);return r}removeTextStyleDefaultsFromCustomStyle(t){const e="textStyle"in t?t.textStyle:void 0,n=t.customStyle;if(!e||!n)return t;const s=X.getDefaultStyles(e);if(!s)return t;for(const t of Object.keys(s))n[t]===s[t]&&delete n[t];return 0===Object.keys(n).length&&delete t.customStyle,t}};class ae extends pt{constructor(){super(...arguments),this.annotationHandler=new Jt}generateChildNodes(t,e,s){const r=[],i=!(!s||!1!==s.autoMatchFormat),o=Object.assign({},e);return t.forEach((t=>{const a=Et.getElementToNodeStrategies().find((e=>e.canHandle([t],0,s)>0));let l=null;if(a&&(l=a.handle([t],s,o)),l)r.push(l);else if(dt(t)&&t.childNodes.length>0){const a=oe.generate(n,t,Object.assign({parentAnnotations:i?{inlineHtml:o.inlineHtml,link:o.link,code:o.code}:e},s));r.push(...this.generateChildNodes(Array.from(t.childNodes),a,s))}})),r}matchTextBlockType(t){var e;return null!==(e=this.annotationHandler.handle(t).textStyle)&&void 0!==e?e:"paragraph"}}class le extends ae{canHandle(t,e){return"PRE"!==t[e].tagName&&"CODE"!==t[e].tagName||!t[e].hasAttribute("data-language")?0:1}handle(t){const e=t[0];if(e){const t=e.textContent,n=e.dataset.language;return b.from({id:it(),type:"code-block",content:t,language:n})}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class ce extends ae{createRTEImageBlock(t,e){const n=!(e&&e.autoMatchFormat||!t.parentNode||"DIV"===t.parentNode.nodeName);return RTEImageBlock.from({id:it(),type:"image",nodes:[{id:it(),type:"image",url:t.src,annotations:oe.generate(RTEImageNode,t,e)}],annotations:Object.assign(Object.assign({},oe.generate(RTEImageBlock,t.parentElement,e)),{internalWrapper:n})},e)}}class he extends pt{shouldProceedToElementChildren(){return!1}appendChildBlocks(){}generateTextNode(t,e){return{id:it(),type:"text",text:t,annotations:e}}}class ue extends Q{constructor(){super(...arguments),this.stylesToBeFiltered={}}get alwaysFilter(){return!0}filterAnnotations(t){const{textAlign:e,customStyle:n}=t;return e&&n?(this.stylesToBeFiltered=_.getDefaultStyles(e),super.filterAnnotations(t)):t}}class de extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=X.getDefaultStyles("paragraph"),this.type="paragraph",this.elementTagName="p"}filterAnnotations(t){return t}canFilter(t){return Z.isTextBlock(t.constructor.name)&&t.type===this.type}canRefill(t,e){const n=this.classNameToBeAdded?`.${this.classNameToBeAdded}`:this.elementTagName;return Z.isTextBlock(t)&&e.matches(n)}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}class me extends de{constructor(t){super(),this.type="heading-1",this.elementTagName="h1",this.type=`heading-${t}`,this.elementTagName=`h${t}`,this.stylesToBeFiltered=X.getDefaultStyles(this.type)}}class we extends de{constructor(t){super(),this.type="title",this.elementTagName="div",this.classNameToBeAdded="v-rte-title",this.type=t,this.classNameToBeAdded=`v-rte-${t}`,this.stylesToBeFiltered=X.getDefaultStyles(this.type)}}class Te extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=Te.BOLD_STYLES,this.elementTagName="span",this.parentBlockTypes=["heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","title"],this.parentElementSelectors=["h1","h2","h3","h4","h5","h6",".v-rte-title"],this.toBeCheckedSelector=this.parentElementSelectors.join(",")}filterAnnotations(t){return t}canFilter(t){return Z.isTextNode(t.constructor.name)&&this.parentBlockIsHeadingOrTitle(t)}canRefill(t,e){return Z.isTextNode(t)&&"SPAN"===e.nodeName&&this.isHeadingOrTitleChild(e)}toCssText(){return`${this.parentElementSelectors.map((t=>`.${Te.RTE_CONTENT_CONTAINER_CLASS_NAME} ${t}`)).join(",")} { ${this.convertStylesMapToCssText()} }`}parentBlockIsHeadingOrTitle(t){const e=t.parent;return!!e&&this.parentBlockTypes.includes(e.type)}isHeadingOrTitleChild(t){let e=t.parentElement;for(;e;){if(e.matches(this.toBeCheckedSelector))return!0;if(Te.NON_HEADING_TITLE_ELEMENT_TAGS.includes(e.tagName))return!1;e=e.parentElement}return!1}}Te.BOLD_STYLES={fontWeight:"700"},Te.NON_HEADING_TITLE_ELEMENT_TAGS=["TD","TH","TR","TABLE","THEAD","TBODY","DIV","BODY"];class pe extends me{constructor(t){super(t),this.classNameToBeAdded=`v-rte-h${t}`,this.elementTagName="li"}canFilter(t){return Z.isListItemBlock(t.constructor.name)&&this.isBlockOrNodeStylesMatchFilterStyles(t,["fontSize","lineHeight"])}canRefill(t,e){return Z.isListItemBlock(t)&&e.matches(this.elementTagName)&&e.classList.contains(this.classNameToBeAdded)}}class ge extends we{constructor(t){super(t),this.classNameToBeAdded=`v-rte-${t}`,this.elementTagName="li"}canFilter(t){return Z.isListItemBlock(t.constructor.name)&&this.isBlockOrNodeStylesMatchFilterStyles(t,["fontSize","lineHeight"])}canRefill(t,e){return Z.isListItemBlock(t)&&e.matches(this.elementTagName)&&e.classList.contains(this.classNameToBeAdded)}}tt.registerRTEDTOClass("paragraph",e),tt.registerRTEDTOClass("title",e),tt.registerRTEDTOClass("subtitle",e),tt.registerRTEDTOClass("heading-1",e),tt.registerRTEDTOClass("heading-2",e),tt.registerRTEDTOClass("heading-3",e),tt.registerRTEDTOClass("heading-4",e),tt.registerRTEDTOClass("heading-5",e),tt.registerRTEDTOClass("heading-6",e),tt.registerRTEDTOClass("heading-6",e),tt.registerRTEDTOClass("list-item",RTEListItemBlock),tt.registerRTEDTOClass("bullet-list",RTEListBlock),tt.registerRTEDTOClass("number-list",RTEListBlock),tt.registerRTEDTOClass("image",RTEImageBlock),tt.registerRTEDTOClass("code-block",b),tt.registerRTEDTOClass("html-block",RTEHtmlBlock),tt.registerRTEDTOClass("text",n),tt.registerRTEDTOClass("image",RTEImageNode),St.registerBlockBasicStrategies(e.name),St.registerBlockBasicStrategies(RTEListBlock.name),St.registerBlockBasicStrategies(RTEListItemBlock.name),St.registerBlockBasicStrategies(RTEImageBlock.name),St.registerBlockBasicStrategies(RTEHtmlBlock.name),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e,n){let s=0;for(let r=e;r<t.length&&this.isInlineCandidate(t[r],n);r++)s++;return s}handle(t,s){const r=t[0].parentElement,i=s&&s.autoMatchFormat,o=this.generateChildNodes(t,i?oe.generate(n,r,Object.assign(Object.assign({},s),{skipCustomAnnotations:!0})):{},s),a=i?super.matchTextBlockType(r):this.matchTextBlockTypeByTagName(r),l=!i&&!a;return e.from(Object.assign({id:it(),type:a||"paragraph",nodes:o},l?{annotations:{internalWrapper:l}}:{annotations:oe.generate(e,r,s)}),s)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}matchTextBlockTypeByTagName(t){switch(t.nodeName){case"P":return"paragraph";default:return null}}isInlineCandidate(t,e){return t.nodeType===Node.TEXT_NODE||!!ee.has(t.nodeName)||!this.isDedicatedBlockTag(t.nodeName)&&(!(!1!==e.autoMatchFormat||!re(t))||this.isInlineLeafOrWrapper(t))}isDedicatedBlockTag(t){return te.has(t)&&!ee.has(t)}isInlineLeafOrWrapper(t){return 0===t.childNodes.length?se.has(t.nodeName):this.isTextOnlyElement(t)?se.has(t.nodeName)||ee.has(t.nodeName):this.hasOnlyInlineDescendants(t)}isTextOnlyElement(t){const e=Array.from(t.childNodes);return!e.some((t=>t.nodeType===Node.ELEMENT_NODE))&&e.some((t=>t.nodeType===Node.TEXT_NODE))}hasOnlyInlineDescendants(t){for(let e=0;e<t.children.length;e++){const n=t.children[e];if(this.isDedicatedBlockTag(n.nodeName))return!1;if(!n.hasChildNodes())return!1;if(!this.hasOnlyInlineDescendants(n))return!1}return!0}}),Et.registerElementToBlockStrategy(new class extends ce{canHandle(t,e){const n=t[e];return n.nodeType===Node.ELEMENT_NODE&&""===n.textContent&&n.querySelector("img")?1:0}handle(t,e){const n=t[0].querySelector("img");return this.createRTEImageBlock(n,e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Et.registerElementToBlockStrategy(new class extends ce{canHandle(t,e){return"VEGA-RICH-TEXT-IMAGE-EDITOR"===t[e].tagName?1:0}handle(t,e){const n=t[0],s=n.querySelector("img");if(ot(s))return RTEImageBlock.from({id:it(),type:"image",nodes:[{id:it(),type:"image",url:s.src,annotations:oe.generate(RTEImageNode,n,e)}],annotations:oe.generate(RTEImageBlock,n.parentElement,e)},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Et.registerElementToBlockStrategy(new class extends ce{canHandle(t,e){return"IMG"===t[e].tagName?1:0}handle(t,e){return this.createRTEImageBlock(t[0],e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e){return["heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","title","subtitle"].includes(super.matchTextBlockType(t[e]))?1:0}handle(t,n){const s=this.generateChildNodes(Array.from(t[0].childNodes),{},n);return 0===s.length?null:e.from({id:it(),type:super.matchTextBlockType(t[0]),nodes:s,annotations:oe.generate(e,t[0],n)},n)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e){if(!["UL","OL"].includes(t[e].parentElement.nodeName)&&t.some((t=>"LI"===t.nodeName))){let n=0;for(let s=e;s<t.length&&"LI"===t[s].nodeName;s++)n++;return n}return"LI"===t[e].tagName?1:0}handle(t,e){const n=t[0];return["UL","OL"].includes(n.parentElement.nodeName)?RTEListItemBlock.from(this.generateListItemBlockDTO(n,e),e):this.generateWithListBlock(t,e)}appendChildBlocks(t,e){t.nestList=e.filter((t=>["bullet-list","number-list"].includes(t.type)))}shouldProceedToElementChildren(){return!0}generateWithListBlock(t,e){return RTEListBlock.from({id:it(),type:"bullet-list",blocks:t.map((t=>this.generateListItemBlockDTO(t,e)))},e)}generateListItemBlockDTO(t,e){return{id:it(),type:"list-item",annotations:oe.generate(RTEListItemBlock,t,e),nodes:this.generateChildNodes(Array.from(t.childNodes.length?t.childNodes:[t]).filter((t=>!["UL","OL"].includes(t.nodeName))),oe.generate(n,t,Object.assign(Object.assign({},e),{skipCustomAnnotations:!0})),e)}}}),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e){const n=t[e],s=n.parentElement,r="LI"!==n.nodeName,i=n.nodeType===Node.TEXT_NODE&&""===n.textContent.trim(),o=ot(s)&&["UL","OL"].includes(s.nodeName);return r&&!i&&o?1:0}handle(t,e){const n=this.generateChildNodes(t,{},e);return RTEListItemBlock.from({id:it(),type:"list-item",nodes:n,annotations:{}},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e){return"OL"===t[e].tagName?1:0}handle(t,e){return 0===t[0].childNodes.length?null:RTEListBlock.from({id:it(),type:"number-list",blocks:[],annotations:oe.generate(RTEListBlock,t[0],e)},e)}appendChildBlocks(t,e){t.children=e.filter((t=>t instanceof RTEListItemBlock)),e.forEach((e=>e.parent=t))}shouldProceedToElementChildren(){return!0}}),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e){return"UL"===t[e].tagName?1:0}handle(t,e){return 0===t[0].childNodes.length?null:RTEListBlock.from({id:it(),type:"bullet-list",blocks:[],annotations:oe.generate(RTEListBlock,t[0],e)},e)}appendChildBlocks(t,e){t.children=e.filter((t=>t instanceof RTEListItemBlock)),e.forEach((e=>e.parent=t))}shouldProceedToElementChildren(){return!0}}),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e,n){const s=t[e];return s.nodeType===Node.TEXT_NODE||this.isInlineTagWithoutBlockChildren(s,n)||te.has(s.nodeName)&&!this.shouldFallBackToHtmlBlock(s)||n.autoMatchFormat||!this.isCustomHtmlContainer(s)||Kt.isTitleOrSubtitle(s)?0:1}handle(t,e){return RTEHtmlBlock.from(this.generateHtmlBlock(t[0],e),e)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}isInlineTagWithoutBlockChildren(t,e){if(re(t))return!(0===t.childNodes.length&&""===t.textContent&&!ee.has(t.nodeName)&&!se.has(t.nodeName));const n=Array.from(t.childNodes);return!(n.some((t=>t.nodeType===Node.ELEMENT_NODE))||!n.some((t=>t.nodeType===Node.TEXT_NODE)))&&(!1!==e.autoMatchFormat||!ne.has(t.parentElement.nodeName)&&(se.has(t.nodeName)||ee.has(t.nodeName)))}shouldFallBackToHtmlBlock(t){const e=Array.from(t.childNodes);if(0===e.length)return!1;const n=t.parentElement.nodeName;return"UL"!==n&&"OL"!==n&&e.every((t=>t.nodeType===Node.ELEMENT_NODE&&""===t.textContent&&!ee.has(t.nodeName)&&!se.has(t.nodeName)))}isCustomHtmlContainer(t){return"DIV"!==t.nodeName||t.childNodes.length>0&&"IMG"!==t.childNodes[0].nodeName}generateHtmlBlock(t,e){return{id:it(),type:"html-block",htmlTag:t.nodeName.toLowerCase(),annotations:oe.generate(RTEHtmlBlock,t,e),children:[]}}}),
2
2
  //!important: Code block strategies must be registered after HtmlBlockStrategy because registerElementToBlockStrategy uses unshift, giving later registrations higher priority.
3
3
  Et.registerElementToBlockStrategy(new le),Et.registerElementToBlockStrategy(new class extends le{canHandle(t,e){return"VEGA-CODE-BLOCK"===t[e].tagName&&0==!!t[e].querySelector("vega-code-block")||this.isCodeBlockContainer(t[e])?1:0}handle(t){const e=this.isCodeBlockContainer(t[0])?t[0].querySelector("vega-code-block"):t[0],n=e.querySelector("code");if(n)return super.handle([n]);if(e.hasAttribute("data-content")){const t=document.createElement("code");return t.textContent=e.dataset.content,t.dataset.language=e.dataset.language,super.handle([t])}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}isCodeBlockContainer(t){return"PRE"===t.tagName&&t.classList.contains("code-block-container")&&1===t.querySelectorAll("vega-code-block").length}}),Et.registerElementToNodeStrategy(new class extends he{canHandle(t,e){const n=t[e];return!dt(n)||"BR"!==n.nodeName&&0!==n.childNodes.length?0:1}handle(t,e,s){const r=!(!e||!1!==e.autoMatchFormat),i=Object.assign({},s),o=t[0],a=oe.generate(n,o,Object.assign({parentAnnotations:r?{inlineHtml:i.inlineHtml,link:i.link,code:i.code}:s},e));if("BR"===o.nodeName)return this.generateTextNode("\n",a);if(0===o.childNodes.length){const t=r?mt(Object.assign(Object.assign({},n.supportsHtmlTag(o.nodeName.toLowerCase())?a:{}),{inlineHtml:a.inlineHtml})):a;return Object.assign({},this.generateTextNode("",t))}}}),Et.registerElementToNodeStrategy(new class extends he{canHandle(t,e){return t[e].nodeType===Node.TEXT_NODE?1:0}handle(t,e,s){const r=Object.assign({},s),i=!(!e||!1!==e.autoMatchFormat),o=t[0],a=o.parentNode.nodeName.toLowerCase(),l=i&&!n.supportsHtmlTag(a),c=this.generateTextNode(String(o.textContent),i?mt(Object.assign(Object.assign({},"span"===a?r:{link:r.link,code:"code"===a?r.code:void 0}),{inlineHtml:r.inlineHtml,plainText:l||void 0})):r);return Object.assign({},c)}}),Y.register(e.name,new ue),Y.register(RTEListBlock.name,new ue),Y.register(RTEListItemBlock.name,new ue),Y.register(n.name,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered={}}get alwaysFilter(){return!0}filterAnnotations(t){const e=t,n=e.customStyle;if(!n)return t;e.bold&&n.fontWeight===z&&delete n.fontWeight,e.italic&&n.fontStyle===G&&delete n.fontStyle;const s=this.normalizeTextDecoration(n.textDecoration);return s&&this.shouldRemoveTextDecoration(s,e)&&delete n.textDecoration,0===Object.keys(n).length&&delete e.customStyle,t}normalizeTextDecoration(t){if(!t)return;const e=t.trim().toLowerCase().split(/\s+/);return e.some((t=>t!==K&&t!==J))?void 0:Array.from(new Set(e)).sort().join(" ")}shouldRemoveTextDecoration(t,e){const n=[];return e.underline&&n.push(K),e.strikethrough&&n.push(J),0!==n.length&&t===n.sort().join(" ")}}),Y.register(e.name,new de),Y.register(e.name,new me(1)),Y.register(e.name,new me(2)),Y.register(e.name,new me(3)),Y.register(e.name,new me(4)),Y.register(e.name,new me(5)),Y.register(e.name,new me(6)),Y.register(e.name,new we("title")),Y.register(e.name,new we("subtitle")),Y.register(n.name,new Te),Y.register(n.name,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=q.getDefaultStyles(),this.elementTagName="code"}filterAnnotations(t){const{code:e,customStyle:n}=t;return e&&n?super.filterAnnotations(t):t}canFilter(t){return Z.isCodeNode(t)}canRefill(t,e){return Z.isTextNode(t)&&e.matches(this.elementTagName)}toCssText(){return`.${Q.RTE_CONTENT_CONTAINER_CLASS_NAME} ${this.elementTagName} { ${this.convertStylesMapToCssText(Object.assign(Object.assign({},this.stylesToBeFiltered),{fontWeight:"500"}))} }`}}),Y.register(n.name,new et),Y.register(RTEImageNode.name,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=xt.getDefaultStyles(),this.elementTagName="img"}get alwaysFilter(){return!0}canFilter(t){return Z.isImageNode(t)}canRefill(t,e){return e.tagName.toLowerCase()===this.elementTagName}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}),Y.register(b.name,new nt),Y.register(st.name,new rt),Y.register(RTEListBlock.name,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=Tt.getDefaultStyles(),this.elementTagName="ol,ul"}canFilter(t){return Z.isListBlock(t.constructor.name)}canRefill(t,e){return Z.isListBlock(t)&&e.matches(this.elementTagName)}toCssText(){return`${this.elementTagName.split(",").map((t=>`.${Q.RTE_CONTENT_CONTAINER_CLASS_NAME} ${t.trim()}`)).join(", ")} { ${this.convertStylesMapToCssText(this.stylesToBeFiltered)} }`}}),Y.register(RTEListItemBlock.name,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=X.getDefaultStyles("paragraph"),this.elementTagName="li",this.headingOrTitleClassNamePattern=/^v-rte-(h[1-6]|title|subtitle)$/}canFilter(t){const e=!t.getStyles().fontSize||this.isBlockOrNodeStylesMatchFilterStyles(t,["fontSize","lineHeight"]);return Z.isListItemBlock(t.constructor.name)&&e}canRefill(t,e){return Z.isListItemBlock(t)&&e.matches(this.elementTagName)&&this.isElementNotHeadingOrTitle(e)}toCssText(){return this.buildCssTextForStyles(this.elementTagName)}isElementNotHeadingOrTitle(t){return!t.className.split(" ").some((t=>this.headingOrTitleClassNamePattern.test(t.trim())))}}),Y.register(RTEListItemBlock.name,new pe(1)),Y.register(RTEListItemBlock.name,new pe(2)),Y.register(RTEListItemBlock.name,new pe(3)),Y.register(RTEListItemBlock.name,new pe(4)),Y.register(RTEListItemBlock.name,new pe(5)),Y.register(RTEListItemBlock.name,new pe(6)),Y.register(RTEListItemBlock.name,new ge("title")),Y.register(RTEListItemBlock.name,new ge("subtitle"));class Ee{static preserve(t){const e=t.replace(/\s+style=/g," data-style=");return new fe(e)}}class fe{constructor(t){this.processedHtml=t}getProcessedHtml(){return this.processedHtml}restore(t){this.walkNodes(t)}walkNodes(t){t.forEach((t=>{if(dt(t)){const e=t.getAttribute("data-style");e&&(t.style.cssText=e,t.removeAttribute("data-style")),t.children.length>0&&this.walkNodes(Array.from(t.children))}}))}}class ke{process(t){return t.replace(/(<[^>]+>)(\s+)(<[^>]+>)/g,((t,e,n,s)=>{const r=this.extractOpeningTagName(e),i=this.extractClosingTagName(s);return r&&i&&r===i?`${e}${n}${s}`:`${e}${s}`}))}extractOpeningTagName(t){const e=t.match(/<(\w[\w-]*)/);return e?e[1]:null}extractClosingTagName(t){const e=t.match(/<\/(\w[\w-]*)/);return e?e[1]:null}}class Re{process(t){return t.replace(/(>)[\n\t]+(?=.)/g,"$1")}}class Be{process(t){return t.replace(/(.?)[\n\t]+(?=<)/g,"$1")}}class xe{constructor(){this.processors=[new ke,new Re,new Be]}clean(t){if(!t||0===t.trim().length)return t;let e,n=t;do{e=n;for(const t of this.processors)n=t.process(n)}while(n!==e);return n}}class VegaRTEContent{constructor(t){t.forEach((t=>{t.parent=this})),this.children=t}static fromJSON(t,e={autoMatchFormat:!0}){const n=t.map((t=>{const n=tt.getRTEBlockClass(t.type);if(n)return n.from(t,e);throw new Error(`[Vega] Unknown block type: ${t.type}`)}));return new VegaRTEContent(n)}static createEmptyContent(t={autoMatchFormat:!0}){return VegaRTEContent.fromJSON([{id:it(),type:"paragraph",annotations:{internalWrapper:!t.autoMatchFormat},nodes:[{id:it(),annotations:{plainText:!t.autoMatchFormat},type:"text",text:""}]}],t)}static fromHtml(t,e={autoMatchFormat:!0,skipCustomAnnotations:!1}){const n=(new xe).clean(t),s=Ee.preserve(n),r=s.getProcessedHtml(),i=(new DOMParser).parseFromString(r,"text/html").body,o=Array.from(i.childNodes);s.restore(o);const a=ft.process(o,e).filter(ot).map((t=>t.toDto(e))).filter(ot);return new VegaRTEContent(a)}static generateContentStyles(t){return Y.generateAllStylesContent(null==t?void 0:t.enableFontImports)}clone(t=!1){return new VegaRTEContent(t?this.children.map((t=>t.clone(this))):[...this.children])}toJSON(){return this.children.map((t=>t.toJSON()))}toHtml(t){return t&&(ot(t.autoMatchFormat)||ot(t.skipCustomAnnotations))&&wt.warn("The 'options' parameter's properties 'autoMatchFormat' and 'skipCustomAnnotations' in toHtml method are deprecated and will be removed in the future."),this.isEmpty()?"":this.children.map((e=>e.toHtml({filterInlineStyles:null==t?void 0:t.filterInlineStyles}))).join("")}isEmpty(){return 0===this.children.length||1===this.children.length&&!this.children[0].isNotEmpty()}apply(t){if(r.executeTheStrategy(t,this),t.executedFlag&&t.isFlushable){const t=O.getDOMByEntity(this);t&&at.notify(lt.getSubject(t,ht),{})}}getLastNode(){return 0===this.children.length?null:this.children[this.children.length-1].getLastNode()}toListItem(t){t.children.map((t=>t.apply(new g)));const e=new RTEListItemBlock(it());return e.apply(new s(t.children)),e.annotationMap=t.annotationMap,e}createList(t){return new RTEListBlock(it(),t)}findNodeById(t){return this.findNodeInBlocksById(t,this.children)}findNodeInBlocksById(t,e){for(const n of e){if("children"in n)for(const e of n.children)if(e.id===t)return e;if(n instanceof RTEListItemBlock&&n.nestList)for(const e of n.nestList){const n=this.findNodeInBlocksById(t,e.children);if(n)return n}if(n instanceof RTEListBlock&&n.children){const e=this.findNodeInBlocksById(t,n.children);if(e)return e}}return null}}r.register(c.DELETE_CHILDREN,VegaRTEContent.name,new P),r.register(c.APPEND_CHILDREN,VegaRTEContent.name,new kt),r.register(c.INSERT_CHILDREN_BEFORE,VegaRTEContent.name,new Rt),r.register(c.INSERT_CHILDREN_AFTER,VegaRTEContent.name,new Bt),r.register(c.TRANSFORM_TO_CODE_BLOCK,VegaRTEContent.name,new class extends t{handleAction(t,e){const n=t.selectedBlocks,s=new b(it(),this.getCodeContent(n),"plainText");e.apply(new E(n[0],s)),t.newCodeBlock=s,this.removeSelectBlocks(n,e)}getCodeContent(t){return t.filter((t=>"image"!==t.type&&"list-item"!==t.type)).map((t=>t.children.map((t=>t.text)).join(""))).join("\n")}removeSelectBlocks(t,e){for(let n=0;n<t.length;n++)e.apply(new p(t[n]))}}),r.register(c.UPDATE_CURSOR_POSITION,VegaRTEContent.name,new class extends t{handleAction(t,e){const{offset:n,nextFocusNode:s,immediatelyRun:r}=t,i=O.getDOMByEntity(e);i&&at.notify(lt.getSubject(i,ct),{node:s,offset:n,updateDirectly:r})}});export{$t as A,ae as B,Et as E,It as I,bt as M,vt as P,St as R,Ee as S,yt as U,VegaRTEContent as V,pt as a,RTEImageBlock as b,Rt as c,RTEListItemBlock as d,RTEListBlock as e,RTEImageNode as f,xt as g,oe as h,ft as i}
@@ -1 +1 @@
1
- import{h as e,H as t,r as i,c as s,g as o}from"./p-6b2342e0.js";import{R as r}from"./p-280cbcdb.js";import{s as n}from"./p-519a7d55.js";import{g as a}from"./p-49a2e141.js";import{c as l,V as p,M as d,L as h,I as c}from"./p-6e1ab235.js";import{a as v}from"./p-6e70d3cc.js";import{R as u}from"./p-fc7ab79d.js";import{D as f,d as g}from"./p-f28a6074.js";import{x as m,t as x,u as b,V as w,v as y,w as j,e as I,h as S,p as R,M as T,N as C}from"./p-c5eb0fa6.js";import{V as D,I as O}from"./p-4415ad28.js";import{l as E,m as L,n as V}from"./p-aa985d73.js";import{i as z}from"./p-d27ae9ff.js";import{C as k}from"./p-2d0d575f.js";import{F as P}from"./p-a528714c.js";import{c as A}from"./p-86194314.js";import{c as _}from"./p-1ec763ab.js";import{c as N}from"./p-613ddaab.js";import{V as B}from"./p-e1fbfd20.js";import{h as F,l as M}from"./p-f0e828d8.js";import{F as U}from"./p-42141782.js";import{P as G}from"./p-81dd00d0.js";import{c as K}from"./p-44044ed7.js";import{C as W}from"./p-edda10f7.js";import{Z as $,$ as q}from"./p-b9386dd0.js";import{M as H}from"./p-78a57a17.js";import{T as J}from"./p-52b8f2d2.js";import{T as Z}from"./p-6572e038.js";import{r as Q}from"./p-77e64f26.js";import{I as X}from"./p-abd7aeaa.js";import{V as Y}from"./p-d5531d3c.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-18e8d9b7.js";import"./p-5a25014f.js";import"./p-331a62d5.js";import"./p-e6adf829.js";import"./p-593e0f80.js";import"./p-6a334573.js";import"./p-8b5d3a52.js";import"./p-b75ee3ba.js";import"./p-02841589.js";import"./p-a0c3968b.js";import"./p-6e9f832f.js";import"./p-5f377954.js";import"./p-d884c644.js";var ee=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class te extends p{constructor(){super(...arguments),this.renderErrorMessage=()=>e("div",{class:"vega-input-select-error-message"}),this.renderHelpMessage=()=>e("div",{class:"vega-input-select-hint"},this.hint),this.handleLabelButtonClick=()=>{this.labelButtonClickEventEmitter.emit()}}render(){return e(t,{class:v([this.disabled?"vega-input-select-disabled":"",u.formatCustom(this.size)])},this.renderLabel(),this.dropdownRenderer.render(),this.renderErrorMessage(),this.hint&&this.renderHelpMessage())}renderLabel(){return this.label&&e("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,label:this.label,suffixButtonConfig:this.labelSuffixButtonConfig,ref:e=>{f.addUniqueObserverToNode(e,m,this.handleLabelButtonClick)}})}}ee([l()],te.prototype,"disabled",void 0),ee([l()],te.prototype,"size",void 0),ee([l()],te.prototype,"hint",void 0),ee([l()],te.prototype,"label",void 0),ee([l()],te.prototype,"required",void 0),ee([l()],te.prototype,"labelSuffixButtonConfig",void 0),ee([l()],te.prototype,"labelButtonClickEventEmitter",void 0),ee([l({componentFieldName:"vegaInputSelectDropdownRenderer"})],te.prototype,"dropdownRenderer",void 0);var ie=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class se extends p{constructor(){super(...arguments),this.onDropdownShow=()=>{this.isDropdownShow=!0},this.onDropdownHide=()=>{this.isDropdownShow=!1}}addDropdownObserver(e){f.addUniqueObserverToNode(e,x,(e=>{this.onDropdownShow(),this.showEventEmitter.emit(e.detail)})),f.addUniqueObserverToNode(e,b,(e=>{this.onDropdownHide(),this.hideEventEmitter.emit(e.detail)})),f.addUniqueObserverToNode(e,w,(async e=>{this.vegaInputSelectValueController.setValue(await e.host.getSelection())})),f.addUniqueObserverToNode(e,y,(e=>{this.searchEventEmitter.emit(e.detail)})),f.addUniqueObserverToNode(e,j,(e=>{this.searchTriggerEventEmitter.emit(e.detail)})),f.addUniqueObserverToNode(e,E,(e=>{const t=Array.from(e).filter((e=>!this.source.find((t=>t.id===e.itemKey)))).map((e=>({id:e.itemKey,displayName:e.label})));this.sourceController.appendSourceItems(t)})),f.addUniqueObserverToNode(e,I,(async()=>{this.vegaInputSelectValueController.setValue("multiple"===this.selectType?[]:"")}))}}ie([l({writable:!0})],se.prototype,"isDropdownShow",void 0),ie([l()],se.prototype,"vegaSearch",void 0),ie([l()],se.prototype,"searchEventEmitter",void 0),ie([l()],se.prototype,"searchTriggerEventEmitter",void 0),ie([l()],se.prototype,"vegaInputSelectValueController",void 0),ie([l()],se.prototype,"sourceController",void 0),ie([l()],se.prototype,"source",void 0),ie([l()],se.prototype,"showEventEmitter",void 0),ie([l()],se.prototype,"hideEventEmitter",void 0),ie([l()],se.prototype,"selectType",void 0);var oe=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class re extends p{constructor(){super(...arguments),this.handleValueChange=(e,t)=>{if("multiple"===this.selectType){let i;t=t,i=(e=e)?this.vegaDropdownProps.preserveValueIfNotInSource?e:e.filter((e=>this.sourceController.getItem(e))):[],z(i,t,!0)?z(i,e,!0)||this.setValue(i):(this.setValue(i),this.changeEventEmitter.emit(i),k.notify(P,{host:this.host,detail:i}))}else if(e!==t){const t=this.sourceController.getItem(e);this.setValue(this.vegaDropdownProps.preserveValueIfNotInSource?e:t?t.id:""),this.changeEventEmitter.emit(this.value),k.notify(P,{host:this.host,detail:this.value})}}}setValue(e){this.valueGuard(e)&&(this.value=e,this.vegaInputSelectItemController.setSelectedItem())}valueGuard(e){switch(this.selectType){case"single":return null===e||"string"==typeof e;case"multiple":return Array.isArray(e)&&e.every((e=>"string"==typeof e));default:return h.warn(`Invalid input select value ${e} for ${this.selectType} mode`),!1}}}oe([l({writable:!0})],re.prototype,"value",void 0),oe([l()],re.prototype,"selectType",void 0),oe([l()],re.prototype,"changeEventEmitter",void 0),oe([l()],re.prototype,"host",void 0),oe([l()],re.prototype,"sourceController",void 0),oe([l()],re.prototype,"vegaInputSelectItemController",void 0),oe([l()],re.prototype,"vegaDropdownProps",void 0),oe([d("watchValue")],re.prototype,"handleValueChange",void 0);var ne=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class ae extends p{componentWillLoad(){this.setSelectedItem()}watchSelectType(){"multiple"===this.selectType?(this.selectedItem=[],this.vegaInputSelectValueController.setValue([])):(this.selectedItem=null,this.vegaInputSelectValueController.setValue(""))}setSelectedItem(){var e;if("multiple"===this.selectType){const e=this.value.map((e=>this.sourceController.getItem(e))),t=this.selectedItem?this.selectedItem.filter((e=>this.value.includes(null==e?void 0:e.id))):[];this.selectedItem=this.updateSelectedItemUnderMultiple(t,e)}else{const t=this.sourceController.getItem(this.value);this.value&&this.value===(null===(e=this.selectedItem)||void 0===e?void 0:e.id)||(this.selectedItem=null),t&&(this.selectedItem=t)}}updateSelectedItemUnderMultiple(e,t){const i=new Map(e.map((e=>[e.id,e])));return t.forEach((e=>{i.set(null==e?void 0:e.id,e)})),Array.from(i.values())}}ne([l()],ae.prototype,"value",void 0),ne([l()],ae.prototype,"selectType",void 0),ne([l({writable:!0})],ae.prototype,"selectedItem",void 0),ne([l()],ae.prototype,"sourceController",void 0),ne([l()],ae.prototype,"vegaInputSelectValueController",void 0),ne([d("componentWillLoad")],ae.prototype,"componentWillLoad",null),ne([d("watchSelectType")],ae.prototype,"watchSelectType",null);var le=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class pe extends p{constructor(){super(...arguments),this.renderContainer=()=>e("div",{role:"button",class:"vega-input-select-container",ref:e=>this.inputSelectContainer=e,tabIndex:0,"aria-disabled":`${this.disabled}`,onKeyDown:A(),onBlur:this.preventBlur,part:"select-container"},this.renderPrefixIcon(),this.renderSelectContainer(),this.renderToggleIcon()),this.renderPrefixIcon=()=>this.vegaInputSelectPrefixIconRenderer.render(),this.renderToggleIcon=()=>e("div",{class:"vega-input-select-toggle-icon",part:"toggle-icon-container"},e("vega-icon",{part:"toggle-icon",icon:B.getIconKey(this.isDropdownShow?"chevron-up":"chevron-down")})),this.renderSelectContainer=()=>{var t,i;return"function"!=typeof this.selectedLabel&&((null===(t=this.selectedLabel)||void 0===t?void 0:t.single)||(this.selectedLabel.single=(e,t)=>t.displayName),(null===(i=this.selectedLabel)||void 0===i?void 0:i.multiple)||(this.selectedLabel.multiple=e=>`${e.length} Selected`)),e("div",{class:"vega-input-select-select-container"},e("div",{class:"vega-input-select-selected-box"},"multiple"===this.selectType?this.renderMultipleSelected():this.renderSingleSelected()))},this.renderMultipleSelected=()=>{if(this.value.length>0){const t="function"==typeof this.selectedLabel?this.selectedLabel(this.value):this.selectedLabel.multiple(this.value,this.selectedItem);return e("span",{class:"vega-input-select-selected"},e("vega-text",{overflow:"ellipsis",tooltip:this.getSelectedLabelTooltipProps(),key:t},t))}return e("div",{class:"vega-input-select-placeholder"},this.translationSlimmer.t(this.placeholder))},this.renderSingleSelected=()=>{var t,i;const s=this.selectedItem;(null==s?void 0:s.displayName)&&(s.displayName=F.sanitize(s.displayName,M));const o=null===(i=(t=this.selectedLabel).single)||void 0===i?void 0:i.call(t,this.value,s);return"function"==typeof this.selectedLabel&&this.selectedItem||"function"!=typeof this.selectedLabel&&o?e("span",{class:"vega-input-select-selected",part:"selected-box"},"function"==typeof this.selectedLabel?e("vega-text",{overflow:"ellipsis",tooltip:this.getSelectedLabelTooltipProps(),key:s.displayName},s.displayName):e("vega-text",{overflow:"ellipsis",tooltip:this.getSelectedLabelTooltipProps(),key:o},o)):e("div",{class:"vega-input-select-placeholder",part:"placeholder"},this.translationSlimmer.t(this.placeholder))},this.getVegaDropdownProperties=()=>{const e=Object.assign({searchable:!0,caseSensitive:!1},this.vegaDropdownProps);return this.dropdownItemTooltipProps&&Object.keys(this.dropdownItemTooltipProps).length>0&&(e.itemTooltipProps=this.dropdownItemTooltipProps),e},this.getSelectedLabelTooltipProps=()=>Object.assign({placement:"bottom"},this.selectedLabelTooltipProps)}watchVegaDropdownProps(){this.vegaDropdownProps&&void 0!==this.vegaDropdownProps.preserveValueIfNotInSource&&(this.dropdown.preserveValueIfNotInSource=this.vegaDropdownProps.preserveValueIfNotInSource,this.dropdown.selectedSourceKey=this.value)}show(){return this.dropdown.show()}hide(){return this.dropdown.hide()}getDropdownRef(){return this.dropdown}getInputSelectContainerRef(){return this.inputSelectContainer}getItemsSlotRef(){return this.itemsSlotRef}render(){return e("vega-dropdown",Object.assign({trigger:"click",source:this.getDropdownSource(),selectType:this.selectType,selectedSourceKey:this.value,matchTargetWidth:!0},this.getVegaDropdownProperties(),{ref:e=>{this.dropdown=e,this.vegaInputSelectDropdownController.addDropdownObserver(e)},isLazyLoading:this.isLazyLoading}),this.renderContainer(),this.renderItemsSlot())}renderItemsSlot(){return this.host.querySelector("[slot=items]")&&e("div",{slot:"items",ref:e=>{this.itemsSlotRef=e}})}preventBlur(e){e.stopImmediatePropagation()}getDropdownSource(){return this.source.map((e=>({key:e.id,label:e.displayName})))}}B.register({"chevron-up":_,"chevron-down":N}),le([l()],pe.prototype,"value",void 0),le([l()],pe.prototype,"source",void 0),le([l()],pe.prototype,"host",void 0),le([l()],pe.prototype,"selectType",void 0),le([l()],pe.prototype,"isDropdownShow",void 0),le([l()],pe.prototype,"vegaDropdownProps",void 0),le([l()],pe.prototype,"placeholder",void 0),le([l()],pe.prototype,"selectedLabel",void 0),le([l()],pe.prototype,"isLazyLoading",void 0),le([l()],pe.prototype,"vegaInputSelectDropdownController",void 0),le([l()],pe.prototype,"vegaInputSelectPrefixIconRenderer",void 0),le([l()],pe.prototype,"translationSlimmer",void 0),le([l()],pe.prototype,"disabled",void 0),le([l()],pe.prototype,"selectedItem",void 0),le([l()],pe.prototype,"selectedLabelTooltipProps",void 0),le([l()],pe.prototype,"dropdownItemTooltipProps",void 0),le([d("watchVegaDropdownProps")],pe.prototype,"watchVegaDropdownProps",null);var de=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class he extends p{constructor(){super(...arguments),this.hasMore=!0}componentDidLoad(){const e=this.getVirtualScroll();e&&f.addUniqueObserverToNode(e,L,this.onScrollToBottom.bind(this))}getVirtualScroll(){var e,t,i;return null===(i=null===(t=null===(e=this.vegaInputSelectDropdownRenderer.getDropdownRef().shadowRoot)||void 0===e?void 0:e.querySelector("vega-dropdown-content-box"))||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector("vega-virtual-scroll")}async onScrollToBottom(e){if(this.sourceLazyLoadCallback&&this.hasMore){this.isLazyLoading=!0;const t=await this.sourceLazyLoadCallback(e.endIndex);this.hasMore=t.hasMore,t.items.length>0&&this.sourceController.appendSourceItems(t.items),this.isLazyLoading=!1}}}de([l()],he.prototype,"sourceLazyLoadCallback",void 0),de([l({writable:!0})],he.prototype,"isLazyLoading",void 0),de([l()],he.prototype,"sourceController",void 0),de([l()],he.prototype,"vegaInputSelectDropdownRenderer",void 0),de([d("componentDidLoad")],he.prototype,"componentDidLoad",null);const ce=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Specifies whether the system should automatically carry out validation checks on the user's selection in real-time, ensuring that the input adheres to predefined criteria before submission or proceeding further",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Specifies whether the system should automatically carry out validation checks on the user's selection in real-time, ensuring that the input adheres to predefined criteria before submission or proceeding further",payloadValue:e=>!1===e.autoValidation},{payloadKey:"IS_USING_TEMPLATE",payloadDescription:"Contains the data records to be rendered and displayed within the input select",payloadValue:e=>0===e.source.length},{payloadKey:"IS_USING_DATA_SOURCE",payloadDescription:"Contains the data records to be rendered and displayed within the input select",payloadValue:e=>e.source.length>0}];var ve=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class ue extends p{constructor(){super(...arguments),this.handleSourceChange=()=>{this.host.dataset.source=JSON.stringify(this.source),this.source=$(this.source,q)?this.source:[],this.vegaInputSelectItemController.setSelectedItem()}}appendSourceItems(e){this.source=[...this.source,...e]}getItem(e){return this.source.find((t=>t.id===e))}}ve([l()],ue.prototype,"host",void 0),ve([l({writable:!0})],ue.prototype,"source",void 0),ve([l()],ue.prototype,"vegaInputSelectItemController",void 0),ve([d("watchSource")],ue.prototype,"handleSourceChange",void 0);var fe=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class ge extends p{constructor(){super(...arguments),this.mutationObserver=new H({mutationFilter:J("VEGA-DROPDOWN-ITEM"),options:{childList:!0,subtree:!0},callback:()=>this.appendHostItemsToDropdown()})}componentDidLoad(){this.appendHostItemsToDropdown()}appendHostItemsToDropdown(){const e=this.host.querySelector("[slot=items]"),t=this.vegaInputSelectDropdownRenderer.getItemsSlotRef();e&&t&&(t.remove(),this.vegaInputSelectDropdownRenderer.getDropdownRef().append(e))}}fe([c()],ge.prototype,"mutationObserver",void 0),fe([l()],ge.prototype,"host",void 0),fe([l()],ge.prototype,"vegaInputSelectDropdownRenderer",void 0),fe([d("componentDidLoad")],ge.prototype,"componentDidLoad",null);var me=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class xe extends p{connectedCallback(){this.remotePhoneNumberPrefixIconRenderSubject=g.getSubjectFromParentNodeByEventId(this.host,V)}callRemotePrefixIconRender(...e){if(this.remotePhoneNumberPrefixIconRenderSubject){const t=Q.call(this.remotePhoneNumberPrefixIconRenderSubject,...e);if(t)return t}return null}render(){const t=this.callRemotePrefixIconRender(this.prefixIcon);return this.prefixIcon&&e("div",{class:"vega-input-select-prefix-icon"},t||e("vega-icon",{icon:this.prefixIcon,size:"size-16"}))}}me([l()],xe.prototype,"host",void 0),me([l()],xe.prototype,"prefixIcon",void 0),me([d("connectedCallback")],xe.prototype,"connectedCallback",null);class be extends X{constructor(e){super(),this.inputSelectSourceGetter=e,this.invalidResult=e=>({isValid:!1,message:e}),this.validResult=()=>({isValid:!0,message:""})}canEvaluate(e,t){return t?this.isAcceptedInputType(e)&&!t.disabled&&t.visible:this.isAcceptedInputType(e)}evaluate(e){return"string"!=typeof e||this.inputSelectSourceGetter().find((t=>t.id===e))?Array.isArray(e)&&!e.every((e=>this.inputSelectSourceGetter().find((t=>t.id===e))))?this.invalidResult("There are values that do not exist in the source"):this.validResult():this.invalidResult("The value does not exist in the source")}shouldShowError(e){return!e.disabled&&e.visible&&(e.touched||e.modified)}isAcceptedInputType(e){return("string"==typeof e||Array.isArray(e)&&e.every((e=>"string"==typeof e)))&&e.length>0}}var we=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};const ye=class{constructor(e){i(this,e),this.vegaChange=s(this,"vegaChange",7),this.change=s(this,"change",7),this.vegaSearch=s(this,"vegaSearch",7),this.search=s(this,"search",7),this.vegaSearchTrigger=s(this,"vegaSearchTrigger",7),this.searchTrigger=s(this,"searchTrigger",7),this.vegaShow=s(this,"vegaShow",7),this.vegaHide=s(this,"vegaHide",7),this.vegaLabelButtonClick=s(this,"vegaLabelButtonClick",7),this.labelButtonClick=s(this,"labelButtonClick",7),this.globalSlimmers={},this.translationSlimmer=new Z,this.sourceController=new ue,this.vegaInputSelectRenderer=new te,this.vegaInputSelectPrefixIconRenderer=new xe,this.vegaInputSelectDropdownController=new se,this.vegaInputSelectValueController=new re,this.vegaInputSelectDropdownRenderer=new pe,this.vegaInputSelectItemsSlotController=new ge,this.vegaInputSelectItemController=new ae,this.formFieldControllerSlimmer=new U({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new r:null},{propertyName:"data-source",ruleFactory:()=>new be((()=>this.source))}],validationRulesName:"validationRules",defaultValue:e=>"multiple"===e.selectType?[]:"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.vegaInputSelectDropdownRenderer.getDropdownRef(),touchableAreaGetter:()=>[this.vegaInputSelectDropdownRenderer.getInputSelectContainerRef()]}),this.pageResizeObserverSlimmer=new G,this.lazyLoadController=new he,this.changeEventEmitter=K(ye,S),this.searchEventEmitter=K(ye,R),this.searchTriggerEventEmitter=K(ye,j),this.showEventEmitter=K(ye,T),this.hideEventEmitter=K(ye,C),this.labelButtonClickEventEmitter=K(ye,m),this.eventPrevent=new W([R,j,T,C],(()=>this.host),!0),this.vegaComponentUsageRuntimeMetricsSlimmer=new D(ce),this.isDropdownShow=!1,this.currentBreakpoint=a(),this.isLazyLoading=!1,this.label="",this.labelSuffixButtonConfig=null,this.required=!1,this.selectedLabel=e=>Y.t("{0} Selected",e.length),this.selectType="single",this.source=[],this.value="multiple"===this.selectType?[]:"",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.disabled=!1,this.placeholder="Please select",this.vegaDropdownProps={},this.selectedLabelTooltipProps={},this.dropdownItemTooltipProps={},this.size="default"}watchSelectType(){}watchSource(){}watchValue(e,t){}watchValidationRules(){}watchVegaDropdownProps(){}watchSelectedLabelTooltipProps(){}watchDropdownItemTooltipProps(){}componentWillLoad(){}async doClose(){await this.vegaInputSelectDropdownRenderer.hide()}async doOpen(){await this.vegaInputSelectDropdownRenderer.show()}async doChange(e){this.vegaInputSelectValueController.setValue(e)}render(){return n(this.vegaInputSelectRenderer.render(),this.host)}get host(){return o(this)}static get watchers(){return{selectType:["watchSelectType"],source:["watchSource"],value:["watchValue"],validationRules:["watchValidationRules"],vegaDropdownProps:["watchVegaDropdownProps"],selectedLabelTooltipProps:["watchSelectedLabelTooltipProps"],dropdownItemTooltipProps:["watchDropdownItemTooltipProps"]}}};we([O()],ye.prototype,"globalSlimmers",void 0),we([c()],ye.prototype,"translationSlimmer",void 0),we([c()],ye.prototype,"sourceController",void 0),we([c()],ye.prototype,"vegaInputSelectRenderer",void 0),we([c()],ye.prototype,"vegaInputSelectPrefixIconRenderer",void 0),we([c()],ye.prototype,"vegaInputSelectDropdownController",void 0),we([c()],ye.prototype,"vegaInputSelectValueController",void 0),we([c()],ye.prototype,"vegaInputSelectDropdownRenderer",void 0),we([c()],ye.prototype,"vegaInputSelectItemsSlotController",void 0),we([c()],ye.prototype,"vegaInputSelectItemController",void 0),we([c()],ye.prototype,"formFieldControllerSlimmer",void 0),we([c()],ye.prototype,"pageResizeObserverSlimmer",void 0),we([c()],ye.prototype,"lazyLoadController",void 0),we([c()],ye.prototype,"changeEventEmitter",void 0),we([c()],ye.prototype,"searchEventEmitter",void 0),we([c()],ye.prototype,"searchTriggerEventEmitter",void 0),we([c()],ye.prototype,"showEventEmitter",void 0),we([c()],ye.prototype,"hideEventEmitter",void 0),we([c()],ye.prototype,"labelButtonClickEventEmitter",void 0),we([c()],ye.prototype,"eventPrevent",void 0),we([c()],ye.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),ye.style=':host{display:inline-block;width:100%;min-width:0px;text-align:left;line-height:normal}:host(.default) .vega-input-select-container{padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px}:host(.small) .vega-input-select-container{padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px}vega-field-label{margin-bottom:8px}:host .vega-input-select-container{border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:8px;gap:8px;display:block;display:flex;align-items:center;cursor:pointer}:host .vega-input-select-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host .vega-input-select-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1))}:host .error .vega-input-select-container{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .error .vega-input-select-container:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .error .vega-input-select-container:focus{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1))}:host(.vega-input-select-disabled) vega-dropdown{pointer-events:none}:host(.vega-input-select-disabled) .vega-input-select-container{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));--tw-shadow:0 0 #0000;box-shadow:rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px}:host(.vega-input-select-disabled) .vega-input-select-container:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.vega-input-select-disabled) vega-icon{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-input-select-select-container{flex-grow:1;min-width:0px}:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));display:block;min-height:24px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host(.vega-input-select-disabled) .vega-input-select-selected{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-height:24px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host .vega-input-select-prefix-icon{text-align:center;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-size:0px}:host .vega-input-select-toggle-icon{width:16px;height:16px;color:rgba(var(--v-text-link, 19, 98, 226, 1))}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}:host .vega-input-select-hint{padding-left:8px;padding-right:8px;padding-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-input-select-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-input-select-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-input-select-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host vega-dropdown{display:block}';export{ye as vega_input_select}
1
+ import{h as e,H as t,r as i,c as s,g as o}from"./p-6b2342e0.js";import{R as r}from"./p-280cbcdb.js";import{s as n}from"./p-519a7d55.js";import{g as a}from"./p-49a2e141.js";import{c as l,V as p,M as d,L as h,I as c}from"./p-6e1ab235.js";import{a as v}from"./p-6e70d3cc.js";import{R as u}from"./p-031c0cf7.js";import{D as f,d as g}from"./p-f28a6074.js";import{x as m,u as x,v as b,V as w,f as y,w as j,e as I,i as S,q as R,M as T,N as C}from"./p-9af0e2e7.js";import{V as D,I as O}from"./p-4415ad28.js";import{l as E,m as L,n as V}from"./p-6c43d54a.js";import{i as z}from"./p-d27ae9ff.js";import{C as k}from"./p-2d0d575f.js";import{F as P}from"./p-a528714c.js";import{c as A}from"./p-6ac8e655.js";import{c as _}from"./p-1ec763ab.js";import{c as N}from"./p-613ddaab.js";import{V as B}from"./p-e1fbfd20.js";import{h as F,l as M}from"./p-f0e828d8.js";import{F as U}from"./p-c347e08a.js";import{P as G}from"./p-81dd00d0.js";import{c as K}from"./p-6b5cb920.js";import{C as W}from"./p-e27626f6.js";import{Z as $,$ as q}from"./p-e4c4ea35.js";import{M as H}from"./p-78a57a17.js";import{T as J}from"./p-52b8f2d2.js";import{T as Z}from"./p-57f220b5.js";import{r as Q}from"./p-77e64f26.js";import{I as X}from"./p-abd7aeaa.js";import{V as Y}from"./p-3b791b5d.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-18e8d9b7.js";import"./p-5a25014f.js";import"./p-331a62d5.js";import"./p-e6adf829.js";import"./p-593e0f80.js";import"./p-6a334573.js";import"./p-8b5d3a52.js";import"./p-b75ee3ba.js";import"./p-02841589.js";import"./p-af5cb9bc.js";import"./p-f1c672e4.js";import"./p-5f377954.js";import"./p-d884c644.js";var ee=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class te extends p{constructor(){super(...arguments),this.renderErrorMessage=()=>e("div",{class:"vega-input-select-error-message"}),this.renderHelpMessage=()=>e("div",{class:"vega-input-select-hint"},this.hint),this.handleLabelButtonClick=()=>{this.labelButtonClickEventEmitter.emit()}}render(){return e(t,{class:v([this.disabled?"vega-input-select-disabled":"",u.formatCustom(this.size)])},this.renderLabel(),this.dropdownRenderer.render(),this.renderErrorMessage(),this.hint&&this.renderHelpMessage())}renderLabel(){return this.label&&e("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,label:this.label,suffixButtonConfig:this.labelSuffixButtonConfig,ref:e=>{f.addUniqueObserverToNode(e,m,this.handleLabelButtonClick)}})}}ee([l()],te.prototype,"disabled",void 0),ee([l()],te.prototype,"size",void 0),ee([l()],te.prototype,"hint",void 0),ee([l()],te.prototype,"label",void 0),ee([l()],te.prototype,"required",void 0),ee([l()],te.prototype,"labelSuffixButtonConfig",void 0),ee([l()],te.prototype,"labelButtonClickEventEmitter",void 0),ee([l({componentFieldName:"vegaInputSelectDropdownRenderer"})],te.prototype,"dropdownRenderer",void 0);var ie=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class se extends p{constructor(){super(...arguments),this.onDropdownShow=()=>{this.isDropdownShow=!0},this.onDropdownHide=()=>{this.isDropdownShow=!1}}addDropdownObserver(e){f.addUniqueObserverToNode(e,x,(e=>{this.onDropdownShow(),this.showEventEmitter.emit(e.detail)})),f.addUniqueObserverToNode(e,b,(e=>{this.onDropdownHide(),this.hideEventEmitter.emit(e.detail)})),f.addUniqueObserverToNode(e,w,(async e=>{this.vegaInputSelectValueController.setValue(await e.host.getSelection())})),f.addUniqueObserverToNode(e,y,(e=>{this.searchEventEmitter.emit(e.detail)})),f.addUniqueObserverToNode(e,j,(e=>{this.searchTriggerEventEmitter.emit(e.detail)})),f.addUniqueObserverToNode(e,E,(e=>{const t=Array.from(e).filter((e=>!this.source.find((t=>t.id===e.itemKey)))).map((e=>({id:e.itemKey,displayName:e.label})));this.sourceController.appendSourceItems(t)})),f.addUniqueObserverToNode(e,I,(async()=>{this.vegaInputSelectValueController.setValue("multiple"===this.selectType?[]:"")}))}}ie([l({writable:!0})],se.prototype,"isDropdownShow",void 0),ie([l()],se.prototype,"vegaSearch",void 0),ie([l()],se.prototype,"searchEventEmitter",void 0),ie([l()],se.prototype,"searchTriggerEventEmitter",void 0),ie([l()],se.prototype,"vegaInputSelectValueController",void 0),ie([l()],se.prototype,"sourceController",void 0),ie([l()],se.prototype,"source",void 0),ie([l()],se.prototype,"showEventEmitter",void 0),ie([l()],se.prototype,"hideEventEmitter",void 0),ie([l()],se.prototype,"selectType",void 0);var oe=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class re extends p{constructor(){super(...arguments),this.handleValueChange=(e,t)=>{if("multiple"===this.selectType){let i;t=t,i=(e=e)?this.vegaDropdownProps.preserveValueIfNotInSource?e:e.filter((e=>this.sourceController.getItem(e))):[],z(i,t,!0)?z(i,e,!0)||this.setValue(i):(this.setValue(i),this.changeEventEmitter.emit(i),k.notify(P,{host:this.host,detail:i}))}else if(e!==t){const t=this.sourceController.getItem(e);this.setValue(this.vegaDropdownProps.preserveValueIfNotInSource?e:t?t.id:""),this.changeEventEmitter.emit(this.value),k.notify(P,{host:this.host,detail:this.value})}}}setValue(e){this.valueGuard(e)&&(this.value=e,this.vegaInputSelectItemController.setSelectedItem())}valueGuard(e){switch(this.selectType){case"single":return null===e||"string"==typeof e;case"multiple":return Array.isArray(e)&&e.every((e=>"string"==typeof e));default:return h.warn(`Invalid input select value ${e} for ${this.selectType} mode`),!1}}}oe([l({writable:!0})],re.prototype,"value",void 0),oe([l()],re.prototype,"selectType",void 0),oe([l()],re.prototype,"changeEventEmitter",void 0),oe([l()],re.prototype,"host",void 0),oe([l()],re.prototype,"sourceController",void 0),oe([l()],re.prototype,"vegaInputSelectItemController",void 0),oe([l()],re.prototype,"vegaDropdownProps",void 0),oe([d("watchValue")],re.prototype,"handleValueChange",void 0);var ne=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class ae extends p{componentWillLoad(){this.setSelectedItem()}watchSelectType(){"multiple"===this.selectType?(this.selectedItem=[],this.vegaInputSelectValueController.setValue([])):(this.selectedItem=null,this.vegaInputSelectValueController.setValue(""))}setSelectedItem(){var e;if("multiple"===this.selectType){const e=this.value.map((e=>this.sourceController.getItem(e))),t=this.selectedItem?this.selectedItem.filter((e=>this.value.includes(null==e?void 0:e.id))):[];this.selectedItem=this.updateSelectedItemUnderMultiple(t,e)}else{const t=this.sourceController.getItem(this.value);this.value&&this.value===(null===(e=this.selectedItem)||void 0===e?void 0:e.id)||(this.selectedItem=null),t&&(this.selectedItem=t)}}updateSelectedItemUnderMultiple(e,t){const i=new Map(e.map((e=>[e.id,e])));return t.forEach((e=>{i.set(null==e?void 0:e.id,e)})),Array.from(i.values())}}ne([l()],ae.prototype,"value",void 0),ne([l()],ae.prototype,"selectType",void 0),ne([l({writable:!0})],ae.prototype,"selectedItem",void 0),ne([l()],ae.prototype,"sourceController",void 0),ne([l()],ae.prototype,"vegaInputSelectValueController",void 0),ne([d("componentWillLoad")],ae.prototype,"componentWillLoad",null),ne([d("watchSelectType")],ae.prototype,"watchSelectType",null);var le=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class pe extends p{constructor(){super(...arguments),this.renderContainer=()=>e("div",{role:"button",class:"vega-input-select-container",ref:e=>this.inputSelectContainer=e,tabIndex:0,"aria-disabled":`${this.disabled}`,onKeyDown:A(),onBlur:this.preventBlur,part:"select-container"},this.renderPrefixIcon(),this.renderSelectContainer(),this.renderToggleIcon()),this.renderPrefixIcon=()=>this.vegaInputSelectPrefixIconRenderer.render(),this.renderToggleIcon=()=>e("div",{class:"vega-input-select-toggle-icon",part:"toggle-icon-container"},e("vega-icon",{part:"toggle-icon",icon:B.getIconKey(this.isDropdownShow?"chevron-up":"chevron-down")})),this.renderSelectContainer=()=>{var t,i;return"function"!=typeof this.selectedLabel&&((null===(t=this.selectedLabel)||void 0===t?void 0:t.single)||(this.selectedLabel.single=(e,t)=>t.displayName),(null===(i=this.selectedLabel)||void 0===i?void 0:i.multiple)||(this.selectedLabel.multiple=e=>`${e.length} Selected`)),e("div",{class:"vega-input-select-select-container"},e("div",{class:"vega-input-select-selected-box"},"multiple"===this.selectType?this.renderMultipleSelected():this.renderSingleSelected()))},this.renderMultipleSelected=()=>{if(this.value.length>0){const t="function"==typeof this.selectedLabel?this.selectedLabel(this.value):this.selectedLabel.multiple(this.value,this.selectedItem);return e("span",{class:"vega-input-select-selected"},e("vega-text",{overflow:"ellipsis",tooltip:this.getSelectedLabelTooltipProps(),key:t},t))}return e("div",{class:"vega-input-select-placeholder"},this.translationSlimmer.t(this.placeholder))},this.renderSingleSelected=()=>{var t,i;const s=this.selectedItem;(null==s?void 0:s.displayName)&&(s.displayName=F.sanitize(s.displayName,M));const o=null===(i=(t=this.selectedLabel).single)||void 0===i?void 0:i.call(t,this.value,s);return"function"==typeof this.selectedLabel&&this.selectedItem||"function"!=typeof this.selectedLabel&&o?e("span",{class:"vega-input-select-selected",part:"selected-box"},"function"==typeof this.selectedLabel?e("vega-text",{overflow:"ellipsis",tooltip:this.getSelectedLabelTooltipProps(),key:s.displayName},s.displayName):e("vega-text",{overflow:"ellipsis",tooltip:this.getSelectedLabelTooltipProps(),key:o},o)):e("div",{class:"vega-input-select-placeholder",part:"placeholder"},this.translationSlimmer.t(this.placeholder))},this.getVegaDropdownProperties=()=>{const e=Object.assign({searchable:!0,caseSensitive:!1},this.vegaDropdownProps);return this.dropdownItemTooltipProps&&Object.keys(this.dropdownItemTooltipProps).length>0&&(e.itemTooltipProps=this.dropdownItemTooltipProps),e},this.getSelectedLabelTooltipProps=()=>Object.assign({placement:"bottom"},this.selectedLabelTooltipProps)}watchVegaDropdownProps(){this.vegaDropdownProps&&void 0!==this.vegaDropdownProps.preserveValueIfNotInSource&&(this.dropdown.preserveValueIfNotInSource=this.vegaDropdownProps.preserveValueIfNotInSource,this.dropdown.selectedSourceKey=this.value)}show(){return this.dropdown.show()}hide(){return this.dropdown.hide()}getDropdownRef(){return this.dropdown}getInputSelectContainerRef(){return this.inputSelectContainer}getItemsSlotRef(){return this.itemsSlotRef}render(){return e("vega-dropdown",Object.assign({trigger:"click",source:this.getDropdownSource(),selectType:this.selectType,selectedSourceKey:this.value,matchTargetWidth:!0},this.getVegaDropdownProperties(),{ref:e=>{this.dropdown=e,this.vegaInputSelectDropdownController.addDropdownObserver(e)},isLazyLoading:this.isLazyLoading}),this.renderContainer(),this.renderItemsSlot())}renderItemsSlot(){return this.host.querySelector("[slot=items]")&&e("div",{slot:"items",ref:e=>{this.itemsSlotRef=e}})}preventBlur(e){e.stopImmediatePropagation()}getDropdownSource(){return this.source.map((e=>({key:e.id,label:e.displayName})))}}B.register({"chevron-up":_,"chevron-down":N}),le([l()],pe.prototype,"value",void 0),le([l()],pe.prototype,"source",void 0),le([l()],pe.prototype,"host",void 0),le([l()],pe.prototype,"selectType",void 0),le([l()],pe.prototype,"isDropdownShow",void 0),le([l()],pe.prototype,"vegaDropdownProps",void 0),le([l()],pe.prototype,"placeholder",void 0),le([l()],pe.prototype,"selectedLabel",void 0),le([l()],pe.prototype,"isLazyLoading",void 0),le([l()],pe.prototype,"vegaInputSelectDropdownController",void 0),le([l()],pe.prototype,"vegaInputSelectPrefixIconRenderer",void 0),le([l()],pe.prototype,"translationSlimmer",void 0),le([l()],pe.prototype,"disabled",void 0),le([l()],pe.prototype,"selectedItem",void 0),le([l()],pe.prototype,"selectedLabelTooltipProps",void 0),le([l()],pe.prototype,"dropdownItemTooltipProps",void 0),le([d("watchVegaDropdownProps")],pe.prototype,"watchVegaDropdownProps",null);var de=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class he extends p{constructor(){super(...arguments),this.hasMore=!0}componentDidLoad(){const e=this.getVirtualScroll();e&&f.addUniqueObserverToNode(e,L,this.onScrollToBottom.bind(this))}getVirtualScroll(){var e,t,i;return null===(i=null===(t=null===(e=this.vegaInputSelectDropdownRenderer.getDropdownRef().shadowRoot)||void 0===e?void 0:e.querySelector("vega-dropdown-content-box"))||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector("vega-virtual-scroll")}async onScrollToBottom(e){if(this.sourceLazyLoadCallback&&this.hasMore){this.isLazyLoading=!0;const t=await this.sourceLazyLoadCallback(e.endIndex);this.hasMore=t.hasMore,t.items.length>0&&this.sourceController.appendSourceItems(t.items),this.isLazyLoading=!1}}}de([l()],he.prototype,"sourceLazyLoadCallback",void 0),de([l({writable:!0})],he.prototype,"isLazyLoading",void 0),de([l()],he.prototype,"sourceController",void 0),de([l()],he.prototype,"vegaInputSelectDropdownRenderer",void 0),de([d("componentDidLoad")],he.prototype,"componentDidLoad",null);const ce=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Specifies whether the system should automatically carry out validation checks on the user's selection in real-time, ensuring that the input adheres to predefined criteria before submission or proceeding further",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Specifies whether the system should automatically carry out validation checks on the user's selection in real-time, ensuring that the input adheres to predefined criteria before submission or proceeding further",payloadValue:e=>!1===e.autoValidation},{payloadKey:"IS_USING_TEMPLATE",payloadDescription:"Contains the data records to be rendered and displayed within the input select",payloadValue:e=>0===e.source.length},{payloadKey:"IS_USING_DATA_SOURCE",payloadDescription:"Contains the data records to be rendered and displayed within the input select",payloadValue:e=>e.source.length>0}];var ve=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class ue extends p{constructor(){super(...arguments),this.handleSourceChange=()=>{this.host.dataset.source=JSON.stringify(this.source),this.source=$(this.source,q)?this.source:[],this.vegaInputSelectItemController.setSelectedItem()}}appendSourceItems(e){this.source=[...this.source,...e]}getItem(e){return this.source.find((t=>t.id===e))}}ve([l()],ue.prototype,"host",void 0),ve([l({writable:!0})],ue.prototype,"source",void 0),ve([l()],ue.prototype,"vegaInputSelectItemController",void 0),ve([d("watchSource")],ue.prototype,"handleSourceChange",void 0);var fe=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class ge extends p{constructor(){super(...arguments),this.mutationObserver=new H({mutationFilter:J("VEGA-DROPDOWN-ITEM"),options:{childList:!0,subtree:!0},callback:()=>this.appendHostItemsToDropdown()})}componentDidLoad(){this.appendHostItemsToDropdown()}appendHostItemsToDropdown(){const e=this.host.querySelector("[slot=items]"),t=this.vegaInputSelectDropdownRenderer.getItemsSlotRef();e&&t&&(t.remove(),this.vegaInputSelectDropdownRenderer.getDropdownRef().append(e))}}fe([c()],ge.prototype,"mutationObserver",void 0),fe([l()],ge.prototype,"host",void 0),fe([l()],ge.prototype,"vegaInputSelectDropdownRenderer",void 0),fe([d("componentDidLoad")],ge.prototype,"componentDidLoad",null);var me=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class xe extends p{connectedCallback(){this.remotePhoneNumberPrefixIconRenderSubject=g.getSubjectFromParentNodeByEventId(this.host,V)}callRemotePrefixIconRender(...e){if(this.remotePhoneNumberPrefixIconRenderSubject){const t=Q.call(this.remotePhoneNumberPrefixIconRenderSubject,...e);if(t)return t}return null}render(){const t=this.callRemotePrefixIconRender(this.prefixIcon);return this.prefixIcon&&e("div",{class:"vega-input-select-prefix-icon"},t||e("vega-icon",{icon:this.prefixIcon,size:"size-16"}))}}me([l()],xe.prototype,"host",void 0),me([l()],xe.prototype,"prefixIcon",void 0),me([d("connectedCallback")],xe.prototype,"connectedCallback",null);class be extends X{constructor(e){super(),this.inputSelectSourceGetter=e,this.invalidResult=e=>({isValid:!1,message:e}),this.validResult=()=>({isValid:!0,message:""})}canEvaluate(e,t){return t?this.isAcceptedInputType(e)&&!t.disabled&&t.visible:this.isAcceptedInputType(e)}evaluate(e){return"string"!=typeof e||this.inputSelectSourceGetter().find((t=>t.id===e))?Array.isArray(e)&&!e.every((e=>this.inputSelectSourceGetter().find((t=>t.id===e))))?this.invalidResult("There are values that do not exist in the source"):this.validResult():this.invalidResult("The value does not exist in the source")}shouldShowError(e){return!e.disabled&&e.visible&&(e.touched||e.modified)}isAcceptedInputType(e){return("string"==typeof e||Array.isArray(e)&&e.every((e=>"string"==typeof e)))&&e.length>0}}var we=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};const ye=class{constructor(e){i(this,e),this.vegaChange=s(this,"vegaChange",7),this.change=s(this,"change",7),this.vegaSearch=s(this,"vegaSearch",7),this.search=s(this,"search",7),this.vegaSearchTrigger=s(this,"vegaSearchTrigger",7),this.searchTrigger=s(this,"searchTrigger",7),this.vegaShow=s(this,"vegaShow",7),this.vegaHide=s(this,"vegaHide",7),this.vegaLabelButtonClick=s(this,"vegaLabelButtonClick",7),this.labelButtonClick=s(this,"labelButtonClick",7),this.globalSlimmers={},this.translationSlimmer=new Z,this.sourceController=new ue,this.vegaInputSelectRenderer=new te,this.vegaInputSelectPrefixIconRenderer=new xe,this.vegaInputSelectDropdownController=new se,this.vegaInputSelectValueController=new re,this.vegaInputSelectDropdownRenderer=new pe,this.vegaInputSelectItemsSlotController=new ge,this.vegaInputSelectItemController=new ae,this.formFieldControllerSlimmer=new U({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new r:null},{propertyName:"data-source",ruleFactory:()=>new be((()=>this.source))}],validationRulesName:"validationRules",defaultValue:e=>"multiple"===e.selectType?[]:"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.vegaInputSelectDropdownRenderer.getDropdownRef(),touchableAreaGetter:()=>[this.vegaInputSelectDropdownRenderer.getInputSelectContainerRef()]}),this.pageResizeObserverSlimmer=new G,this.lazyLoadController=new he,this.changeEventEmitter=K(ye,S),this.searchEventEmitter=K(ye,R),this.searchTriggerEventEmitter=K(ye,j),this.showEventEmitter=K(ye,T),this.hideEventEmitter=K(ye,C),this.labelButtonClickEventEmitter=K(ye,m),this.eventPrevent=new W([R,j,T,C],(()=>this.host),!0),this.vegaComponentUsageRuntimeMetricsSlimmer=new D(ce),this.isDropdownShow=!1,this.currentBreakpoint=a(),this.isLazyLoading=!1,this.label="",this.labelSuffixButtonConfig=null,this.required=!1,this.selectedLabel=e=>Y.t("{0} Selected",e.length),this.selectType="single",this.source=[],this.value="multiple"===this.selectType?[]:"",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.disabled=!1,this.placeholder="Please select",this.vegaDropdownProps={},this.selectedLabelTooltipProps={},this.dropdownItemTooltipProps={},this.size="default"}watchSelectType(){}watchSource(){}watchValue(e,t){}watchValidationRules(){}watchVegaDropdownProps(){}watchSelectedLabelTooltipProps(){}watchDropdownItemTooltipProps(){}componentWillLoad(){}async doClose(){await this.vegaInputSelectDropdownRenderer.hide()}async doOpen(){await this.vegaInputSelectDropdownRenderer.show()}async doChange(e){this.vegaInputSelectValueController.setValue(e)}render(){return n(this.vegaInputSelectRenderer.render(),this.host)}get host(){return o(this)}static get watchers(){return{selectType:["watchSelectType"],source:["watchSource"],value:["watchValue"],validationRules:["watchValidationRules"],vegaDropdownProps:["watchVegaDropdownProps"],selectedLabelTooltipProps:["watchSelectedLabelTooltipProps"],dropdownItemTooltipProps:["watchDropdownItemTooltipProps"]}}};we([O()],ye.prototype,"globalSlimmers",void 0),we([c()],ye.prototype,"translationSlimmer",void 0),we([c()],ye.prototype,"sourceController",void 0),we([c()],ye.prototype,"vegaInputSelectRenderer",void 0),we([c()],ye.prototype,"vegaInputSelectPrefixIconRenderer",void 0),we([c()],ye.prototype,"vegaInputSelectDropdownController",void 0),we([c()],ye.prototype,"vegaInputSelectValueController",void 0),we([c()],ye.prototype,"vegaInputSelectDropdownRenderer",void 0),we([c()],ye.prototype,"vegaInputSelectItemsSlotController",void 0),we([c()],ye.prototype,"vegaInputSelectItemController",void 0),we([c()],ye.prototype,"formFieldControllerSlimmer",void 0),we([c()],ye.prototype,"pageResizeObserverSlimmer",void 0),we([c()],ye.prototype,"lazyLoadController",void 0),we([c()],ye.prototype,"changeEventEmitter",void 0),we([c()],ye.prototype,"searchEventEmitter",void 0),we([c()],ye.prototype,"searchTriggerEventEmitter",void 0),we([c()],ye.prototype,"showEventEmitter",void 0),we([c()],ye.prototype,"hideEventEmitter",void 0),we([c()],ye.prototype,"labelButtonClickEventEmitter",void 0),we([c()],ye.prototype,"eventPrevent",void 0),we([c()],ye.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),ye.style=':host{display:inline-block;width:100%;min-width:0px;text-align:left;line-height:normal}:host(.default) .vega-input-select-container{padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px}:host(.small) .vega-input-select-container{padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px}vega-field-label{margin-bottom:8px}:host .vega-input-select-container{border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:8px;gap:8px;display:block;display:flex;align-items:center;cursor:pointer}:host .vega-input-select-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host .vega-input-select-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1))}:host .error .vega-input-select-container{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .error .vega-input-select-container:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .error .vega-input-select-container:focus{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1))}:host(.vega-input-select-disabled) vega-dropdown{pointer-events:none}:host(.vega-input-select-disabled) .vega-input-select-container{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));--tw-shadow:0 0 #0000;box-shadow:rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px}:host(.vega-input-select-disabled) .vega-input-select-container:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.vega-input-select-disabled) vega-icon{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-input-select-select-container{flex-grow:1;min-width:0px}:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));display:block;min-height:24px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host(.vega-input-select-disabled) .vega-input-select-selected{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-height:24px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host .vega-input-select-prefix-icon{text-align:center;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-size:0px}:host .vega-input-select-toggle-icon{width:16px;height:16px;color:rgba(var(--v-text-link, 19, 98, 226, 1))}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}:host .vega-input-select-hint{padding-left:8px;padding-right:8px;padding-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-input-select-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-input-select-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-input-select-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host vega-dropdown{display:block}';export{ye as vega_input_select}
@@ -1 +1 @@
1
- import{V as t,M as r,A as s,D as i}from"./p-b9386dd0.js";import{m as e,a,s as d}from"./p-262ec334.js";import{I as n}from"./p-abd7aeaa.js";class o extends n{static validateCreditCardDigits(t){const r=e(t).reverse();return!(r.length<12||r.length>19)&&a(r,(t=>t%2==0)).reduce(d,0)%10==0}evaluate(t){if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const r=this.formatCreditCardNumber(t),s=this.isValidVisaCreditCard(t)||this.isValidAmexCreditCard(t)||this.isValidDiscoverCreditCard(t)||this.isValidMasterCardCreditCard(t)||!this.isSupportedCreditCardType(r)&&o.validateCreditCardDigits(r);return{isValid:s,message:s?"":"Credit card number is invalid"}}canEvaluate(t,r){return r?this.isAcceptedInputType(t)&&!r.disabled&&r.visible:this.isAcceptedInputType(t)}shouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}isValidVisaCreditCard(r){const s=this.formatCreditCardNumber(r);return t.test(s)&&(13===s.length||16===s.length||19===s.length)&&o.validateCreditCardDigits(s)}isValidMasterCardCreditCard(t){const s=this.formatCreditCardNumber(t);return r.test(s)&&16===s.length&&o.validateCreditCardDigits(s)}isValidAmexCreditCard(t){const r=this.formatCreditCardNumber(t);return s.test(r)&&15===r.length&&o.validateCreditCardDigits(r)}isValidDiscoverCreditCard(t){const r=this.formatCreditCardNumber(t);return i.test(r)&&16===r.length&&o.validateCreditCardDigits(r)}isAcceptedInputType(t){return"string"==typeof t}formatCreditCardNumber(t){return t.replace(/\s/g,"")}isSupportedCreditCardType(e){return t.test(e)||r.test(e)||s.test(e)||i.test(e)}}export{o as V}
1
+ import{V as t,M as r,A as s,D as e}from"./p-e4c4ea35.js";import{m as i,a,s as d}from"./p-262ec334.js";import{I as n}from"./p-abd7aeaa.js";class o extends n{static validateCreditCardDigits(t){const r=i(t).reverse();return!(r.length<12||r.length>19)&&a(r,(t=>t%2==0)).reduce(d,0)%10==0}evaluate(t){if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const r=this.formatCreditCardNumber(t),s=this.isValidVisaCreditCard(t)||this.isValidAmexCreditCard(t)||this.isValidDiscoverCreditCard(t)||this.isValidMasterCardCreditCard(t)||!this.isSupportedCreditCardType(r)&&o.validateCreditCardDigits(r);return{isValid:s,message:s?"":"Credit card number is invalid"}}canEvaluate(t,r){return r?this.isAcceptedInputType(t)&&!r.disabled&&r.visible:this.isAcceptedInputType(t)}shouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}isValidVisaCreditCard(r){const s=this.formatCreditCardNumber(r);return t.test(s)&&(13===s.length||16===s.length||19===s.length)&&o.validateCreditCardDigits(s)}isValidMasterCardCreditCard(t){const s=this.formatCreditCardNumber(t);return r.test(s)&&16===s.length&&o.validateCreditCardDigits(s)}isValidAmexCreditCard(t){const r=this.formatCreditCardNumber(t);return s.test(r)&&15===r.length&&o.validateCreditCardDigits(r)}isValidDiscoverCreditCard(t){const r=this.formatCreditCardNumber(t);return e.test(r)&&16===r.length&&o.validateCreditCardDigits(r)}isAcceptedInputType(t){return"string"==typeof t}formatCreditCardNumber(t){return t.replace(/\s/g,"")}isSupportedCreditCardType(i){return t.test(i)||r.test(i)||s.test(i)||e.test(i)}}export{o as V}
@@ -0,0 +1 @@
1
+ import{O as s}from"./p-331a62d5.js";import{C as o}from"./p-2d0d575f.js";import{d as r}from"./p-f28a6074.js";import{s as a}from"./p-6c43d54a.js";const m=async m=>new Promise((n=>{const t=new s(p.bind(null),(()=>{o.unregister(r.getSubject(m,a),t),n(null)}));o.register(r.getSubject(m,a),t)})),p=()=>!0;export{m as w}
@@ -1 +1 @@
1
- var t;!function(t){t.Angular="angular",t.Vue="vue",t.React="react",t.Next="next",t.VanillaJs="vanilla-js"}(t||(t={}));const s=new class{constructor(){this.vegaVersion="2.83.0",this.framework=t.VanillaJs}getVegaEnv(){return{version:this.vegaVersion,framework:this.framework}}setVegaFramework(t){this.framework=t}};export{t as F,s as v}
1
+ var t;!function(t){t.Angular="angular",t.Vue="vue",t.React="react",t.Next="next",t.VanillaJs="vanilla-js"}(t||(t={}));const s=new class{constructor(){this.vegaVersion="2.85.0",this.framework=t.VanillaJs}getVegaEnv(){return{version:this.vegaVersion,framework:this.framework}}setVegaFramework(t){this.framework=t}};export{t as F,s as v}
@@ -1 +1 @@
1
- import{h as i,F as t,r as o,c as n,H as e,g as r}from"./p-6b2342e0.js";import{c as s,V as a,M as c,I as d}from"./p-6e1ab235.js";import{s as l}from"./p-6bd5c49b.js";import{V as p,I as h}from"./p-4415ad28.js";import{s as m}from"./p-519a7d55.js";import{f}from"./p-b7624ce4.js";import{a as b}from"./p-6e70d3cc.js";import{D as v}from"./p-f28a6074.js";import{a as x,d as g}from"./p-c5eb0fa6.js";import{c as u}from"./p-1ec763ab.js";import{c as j}from"./p-613ddaab.js";import{V as k}from"./p-e1fbfd20.js";import{O as w}from"./p-331a62d5.js";import{C as y}from"./p-2d0d575f.js";import{A as E}from"./p-a528714c.js";import{Y as I}from"./p-b9386dd0.js";import{c as z}from"./p-44044ed7.js";import"./p-ed45b3b6.js";import"./p-fc7ab79d.js";import"./p-d4ea8e22.js";import"./p-49a2e141.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-18e8d9b7.js";import"./p-5a25014f.js";import"./p-d884c644.js";import"./p-2b5cf2b3.js";import"./p-e6adf829.js";import"./p-593e0f80.js";import"./p-6a334573.js";import"./p-8b5d3a52.js";import"./p-d5531d3c.js";import"./p-6e9f832f.js";import"./p-b75ee3ba.js";var L=function(i,t,o,n){var e,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(i,t,o,n);else for(var a=i.length-1;a>=0;a--)(e=i[a])&&(s=(r<3?e(s):r>3?e(t,o,s):e(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s};class O extends a{render(){return i("div",{class:{accordion:!0,background:this.drawsBackground,expanded:this.expand,collapsed:!this.expand,"icon-position-center":"center"===this.iconPosition}},this.renderHeader(),this.renderContent())}renderHeader(){const o=i(t,null,this.renderPrefixIcon(),this.accordionTitle?this.renderTitle():this.renderTitleSlot());return i("div",{class:"accordion-header"},i("vega-flex",{gap:"size-8","align-items":"start"},"left"===this.expandIconAlign&&this.renderExpandIcon(),o,"right"===this.expandIconAlign&&this.renderExpandIcon()))}renderPrefixIcon(){return this.prefixIcon&&i("div",{class:"accordion-prefix-icon"},i("vega-icon",{icon:this.prefixIcon,size:"size-24"}))}renderTitle(){return i("div",{class:"accordion-title"},this.accordionTitle)}renderExpandIcon(){const t=["accordion-expand-icon",`accordion-expand-icon-align-${this.expandIconAlign}`,f(this.showExpandIcon,"display")];return i("div",{class:`${b(t)}`},i("vega-button-circle",{size:"small","icon-color":"text-link",variant:"icon-only","data-aria-label":this.expand?"Collapse accordion":"Expand accordion","data-aria-expanded":`${this.expand}`,icon:k.getIconKey("left"===this.expandIconAlign?"chevron-down":"chevron-up"),ref:i=>{v.addUniqueObserverToNode(i,x,(()=>{this.expandController.flipExpand()}))}}))}renderContent(){return i("div",{class:"accordion-content"},i("slot",{name:"content"}),i("slot",{name:"accordion-content"}))}renderTitleSlot(){return i("div",{class:"accordion-title-slot"},i("slot",{name:"title"}),i("slot",{name:"accordion-title"}))}}k.register({"chevron-up":u,"chevron-down":j}),L([s()],O.prototype,"drawsBackground",void 0),L([s()],O.prototype,"prefixIcon",void 0),L([s()],O.prototype,"accordionTitle",void 0),L([s()],O.prototype,"expandIconAlign",void 0),L([s()],O.prototype,"expand",void 0),L([s()],O.prototype,"iconPosition",void 0),L([s()],O.prototype,"showExpandIcon",void 0),L([s()],O.prototype,"expandController",void 0);var R=function(i,t,o,n){var e,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(i,t,o,n);else for(var a=i.length-1;a>=0;a--)(e=i[a])&&(s=(r<3?e(s):r>3?e(t,o,s):e(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s};class S extends a{flipExpand(){this.expand=!this.expand}onExpand(){this.groupId&&this.expand&&y.notify(E,{groupId:this.groupId,element:this.host}),this.expandEventEmitter.emit(this.expand)}registerObserver(){this.observer=new w(I,this.shouldCollapseSelfIfOtherExpand.bind(this)),y.register(E,this.observer)}unregisterObserver(){this.observer&&(y.unregister(E,this.observer),this.observer=null)}shouldCollapseSelfIfOtherExpand(i){this.groupId===i.groupId&&this.host!==i.element&&(this.expand=!1)}}R([s()],S.prototype,"host",void 0),R([s()],S.prototype,"groupId",void 0),R([s({writable:!0})],S.prototype,"expand",void 0),R([s()],S.prototype,"expandEventEmitter",void 0),R([c("watchExpand")],S.prototype,"onExpand",null),R([c("componentWillLoad")],S.prototype,"registerObserver",null),R([c("disconnectedCallback")],S.prototype,"unregisterObserver",null);var C=function(i,t,o,n){var e,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(i,t,o,n);else for(var a=i.length-1;a>=0;a--)(e=i[a])&&(s=(r<3?e(s):r>3?e(t,o,s):e(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s};const M=class{constructor(i){o(this,i),this.vegaExpand=n(this,"vegaExpand",7),this.accordionExpand=n(this,"accordionExpand",7),this.globalSlimmers={},this.renderer=new O,this.expandController=new S,this.expandEventEmitter=z(M,g,"accordionExpand"),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.drawsBackground=!0,this.expandIconAlign="right",this.expand=!0,this.iconPosition="top",this.showExpandIcon=!0}watchExpand(){}render(){return l(i("slot",null)),m(i(e,null,this.renderer.render()),this.host)}get host(){return r(this)}static get watchers(){return{expand:["watchExpand"]}}};C([h()],M.prototype,"globalSlimmers",void 0),C([d()],M.prototype,"renderer",void 0),C([d()],M.prototype,"expandController",void 0),C([d()],M.prototype,"expandEventEmitter",void 0),C([d()],M.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),M.style=':host(.v-block),.v-block{display:block}:host(.v-inline-block),.v-inline-block{display:inline-block}:host(.v-hidden),.v-hidden{display:none}@media (min-width: 320px){:host(.S\\:v-block),.S\\:v-block{display:block}:host(.S\\:v-inline-block),.S\\:v-inline-block{display:inline-block}:host(.S\\:v-hidden),.S\\:v-hidden{display:none}}@media (min-width: 768px){:host(.M\\:v-block),.M\\:v-block{display:block}:host(.M\\:v-inline-block),.M\\:v-inline-block{display:inline-block}:host(.M\\:v-hidden),.M\\:v-hidden{display:none}}@media (min-width: 1024px){:host(.L\\:v-block),.L\\:v-block{display:block}:host(.L\\:v-inline-block),.L\\:v-inline-block{display:inline-block}:host(.L\\:v-hidden),.L\\:v-hidden{display:none}}@media (min-width: 1440px){:host(.XL\\:v-block),.XL\\:v-block{display:block}:host(.XL\\:v-inline-block),.XL\\:v-inline-block{display:inline-block}:host(.XL\\:v-hidden),.XL\\:v-hidden{display:none}}:host{display:block;text-align:left;line-height:normal}.accordion{display:block;border-radius:16px}.accordion-title,.accordion-title-slot{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));overflow:hidden;flex-basis:0;flex-grow:1;padding-top:2px;padding-bottom:2px}@media screen and (min-width: 768px) and (max-width: 1023px){.accordion-title,.accordion-title-slot{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.accordion-title,.accordion-title-slot{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.accordion-title,.accordion-title-slot{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}.accordion-prefix-icon{width:24px;height:32px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));box-sizing:border-box;padding-top:4px;padding-bottom:4px;min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;flex-shrink:0}.icon-position-center .accordion-prefix-icon{align-self:center}.accordion-content{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.accordion.background{padding:24px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}.accordion.expanded .accordion-content{margin-top:24px}.accordion.collapsed .accordion-content{max-height:0px;overflow:hidden;display:none}.accordion.collapsed .accordion-expand-icon-align-left{transform:rotate(-90deg)}.accordion.collapsed .accordion-expand-icon-align-right{transform:rotate(180deg)}.accordion-expand-icon{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;flex-shrink:0}.icon-position-center .accordion-expand-icon{align-self:center}.hidden{display:none}';export{M as vega_accordion}
1
+ import{h as i,F as t,r as o,c as n,H as e,g as r}from"./p-6b2342e0.js";import{c as s,V as a,M as c,I as d}from"./p-6e1ab235.js";import{s as l}from"./p-6bd5c49b.js";import{V as p,I as h}from"./p-4415ad28.js";import{s as m}from"./p-519a7d55.js";import{f}from"./p-c85e743d.js";import{a as v}from"./p-6e70d3cc.js";import{D as b}from"./p-f28a6074.js";import{a as x,d as g}from"./p-9af0e2e7.js";import{c as u}from"./p-1ec763ab.js";import{c as j}from"./p-613ddaab.js";import{V as k}from"./p-e1fbfd20.js";import{O as w}from"./p-331a62d5.js";import{C as y}from"./p-2d0d575f.js";import{A as E}from"./p-a528714c.js";import{Y as I}from"./p-e4c4ea35.js";import{c as z}from"./p-6b5cb920.js";import"./p-ed45b3b6.js";import"./p-031c0cf7.js";import"./p-d4ea8e22.js";import"./p-49a2e141.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-18e8d9b7.js";import"./p-5a25014f.js";import"./p-d884c644.js";import"./p-1a869f0e.js";import"./p-e6adf829.js";import"./p-593e0f80.js";import"./p-6a334573.js";import"./p-8b5d3a52.js";import"./p-3b791b5d.js";import"./p-f1c672e4.js";import"./p-b75ee3ba.js";var L=function(i,t,o,n){var e,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(i,t,o,n);else for(var a=i.length-1;a>=0;a--)(e=i[a])&&(s=(r<3?e(s):r>3?e(t,o,s):e(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s};class O extends a{render(){return i("div",{class:{accordion:!0,background:this.drawsBackground,expanded:this.expand,collapsed:!this.expand,"icon-position-center":"center"===this.iconPosition}},this.renderHeader(),this.renderContent())}renderHeader(){const o=i(t,null,this.renderPrefixIcon(),this.accordionTitle?this.renderTitle():this.renderTitleSlot());return i("div",{class:"accordion-header"},i("vega-flex",{gap:"size-8","align-items":"start"},"left"===this.expandIconAlign&&this.renderExpandIcon(),o,"right"===this.expandIconAlign&&this.renderExpandIcon()))}renderPrefixIcon(){return this.prefixIcon&&i("div",{class:"accordion-prefix-icon"},i("vega-icon",{icon:this.prefixIcon,size:"size-24"}))}renderTitle(){return i("div",{class:"accordion-title"},this.accordionTitle)}renderExpandIcon(){const t=["accordion-expand-icon",`accordion-expand-icon-align-${this.expandIconAlign}`,f(this.showExpandIcon,"display")];return i("div",{class:`${v(t)}`},i("vega-button-circle",{size:"small","icon-color":"text-link",variant:"icon-only","data-aria-label":this.expand?"Collapse accordion":"Expand accordion","data-aria-expanded":`${this.expand}`,icon:k.getIconKey("left"===this.expandIconAlign?"chevron-down":"chevron-up"),ref:i=>{b.addUniqueObserverToNode(i,x,(()=>{this.expandController.flipExpand()}))}}))}renderContent(){return i("div",{class:"accordion-content"},i("slot",{name:"content"}),i("slot",{name:"accordion-content"}))}renderTitleSlot(){return i("div",{class:"accordion-title-slot"},i("slot",{name:"title"}),i("slot",{name:"accordion-title"}))}}k.register({"chevron-up":u,"chevron-down":j}),L([s()],O.prototype,"drawsBackground",void 0),L([s()],O.prototype,"prefixIcon",void 0),L([s()],O.prototype,"accordionTitle",void 0),L([s()],O.prototype,"expandIconAlign",void 0),L([s()],O.prototype,"expand",void 0),L([s()],O.prototype,"iconPosition",void 0),L([s()],O.prototype,"showExpandIcon",void 0),L([s()],O.prototype,"expandController",void 0);var R=function(i,t,o,n){var e,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(i,t,o,n);else for(var a=i.length-1;a>=0;a--)(e=i[a])&&(s=(r<3?e(s):r>3?e(t,o,s):e(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s};class S extends a{flipExpand(){this.expand=!this.expand}onExpand(){this.groupId&&this.expand&&y.notify(E,{groupId:this.groupId,element:this.host}),this.expandEventEmitter.emit(this.expand)}registerObserver(){this.observer=new w(I,this.shouldCollapseSelfIfOtherExpand.bind(this)),y.register(E,this.observer)}unregisterObserver(){this.observer&&(y.unregister(E,this.observer),this.observer=null)}shouldCollapseSelfIfOtherExpand(i){this.groupId===i.groupId&&this.host!==i.element&&(this.expand=!1)}}R([s()],S.prototype,"host",void 0),R([s()],S.prototype,"groupId",void 0),R([s({writable:!0})],S.prototype,"expand",void 0),R([s()],S.prototype,"expandEventEmitter",void 0),R([c("watchExpand")],S.prototype,"onExpand",null),R([c("componentWillLoad")],S.prototype,"registerObserver",null),R([c("disconnectedCallback")],S.prototype,"unregisterObserver",null);var C=function(i,t,o,n){var e,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(i,t,o,n);else for(var a=i.length-1;a>=0;a--)(e=i[a])&&(s=(r<3?e(s):r>3?e(t,o,s):e(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s};const M=class{constructor(i){o(this,i),this.vegaExpand=n(this,"vegaExpand",7),this.accordionExpand=n(this,"accordionExpand",7),this.globalSlimmers={},this.renderer=new O,this.expandController=new S,this.expandEventEmitter=z(M,g,"accordionExpand"),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.drawsBackground=!0,this.expandIconAlign="right",this.expand=!0,this.iconPosition="top",this.showExpandIcon=!0}watchExpand(){}render(){return l(i("slot",null)),m(i(e,null,this.renderer.render()),this.host)}get host(){return r(this)}static get watchers(){return{expand:["watchExpand"]}}};C([h()],M.prototype,"globalSlimmers",void 0),C([d()],M.prototype,"renderer",void 0),C([d()],M.prototype,"expandController",void 0),C([d()],M.prototype,"expandEventEmitter",void 0),C([d()],M.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),M.style=':host(.v-block),.v-block{display:block}:host(.v-inline-block),.v-inline-block{display:inline-block}:host(.v-hidden),.v-hidden{display:none}@media (min-width: 320px){:host(.S\\:v-block),.S\\:v-block{display:block}:host(.S\\:v-inline-block),.S\\:v-inline-block{display:inline-block}:host(.S\\:v-hidden),.S\\:v-hidden{display:none}}@media (min-width: 768px){:host(.M\\:v-block),.M\\:v-block{display:block}:host(.M\\:v-inline-block),.M\\:v-inline-block{display:inline-block}:host(.M\\:v-hidden),.M\\:v-hidden{display:none}}@media (min-width: 1024px){:host(.L\\:v-block),.L\\:v-block{display:block}:host(.L\\:v-inline-block),.L\\:v-inline-block{display:inline-block}:host(.L\\:v-hidden),.L\\:v-hidden{display:none}}@media (min-width: 1440px){:host(.XL\\:v-block),.XL\\:v-block{display:block}:host(.XL\\:v-inline-block),.XL\\:v-inline-block{display:inline-block}:host(.XL\\:v-hidden),.XL\\:v-hidden{display:none}}:host{display:block;text-align:left;line-height:normal}.accordion{display:block;border-radius:16px}.accordion-title,.accordion-title-slot{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));overflow:hidden;flex-basis:0;flex-grow:1;padding-top:2px;padding-bottom:2px}@media screen and (min-width: 768px) and (max-width: 1023px){.accordion-title,.accordion-title-slot{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.accordion-title,.accordion-title-slot{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.accordion-title,.accordion-title-slot{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}.accordion-prefix-icon{width:24px;height:32px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));box-sizing:border-box;padding-top:4px;padding-bottom:4px;min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;flex-shrink:0}.icon-position-center .accordion-prefix-icon{align-self:center}.accordion-content{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.accordion.background{padding:24px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}.accordion.expanded .accordion-content{margin-top:24px}.accordion.collapsed .accordion-content{max-height:0px;overflow:hidden;display:none}.accordion.collapsed .accordion-expand-icon-align-left{transform:rotate(-90deg)}.accordion.collapsed .accordion-expand-icon-align-right{transform:rotate(180deg)}.accordion-expand-icon{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;flex-shrink:0}.icon-position-center .accordion-expand-icon{align-self:center}.hidden{display:none}';export{M as vega_accordion}
@@ -1 +1 @@
1
- import{h as e,r as t,c as i,H as s,g as o}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{c as n,V as a,M as l,I as c}from"./p-6e1ab235.js";import{V as h,I as d}from"./p-4415ad28.js";import{c as p}from"./p-86194314.js";import{c as f}from"./p-44044ed7.js";import{h as v}from"./p-c5eb0fa6.js";import{C as b}from"./p-2d0d575f.js";import{i as g,C as x,R as m,F as u}from"./p-a528714c.js";import{S as w}from"./p-a0c3968b.js";import{h as y}from"./p-aa985d73.js";import{f as j}from"./p-6e70d3cc.js";import{O as k}from"./p-331a62d5.js";import{d as R}from"./p-f28a6074.js";import{C}from"./p-edda10f7.js";import{C as S}from"./p-76063dcb.js";import{c as z}from"./p-874bf8b2.js";import{F as I}from"./p-42141782.js";import{R as E}from"./p-280cbcdb.js";import"./p-6a334573.js";import"./p-6e9f832f.js";import"./p-b75ee3ba.js";import"./p-5f377954.js";import"./p-18e8d9b7.js";import"./p-5a25014f.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-d5531d3c.js";import"./p-f0e828d8.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-abd7aeaa.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";var O=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class T extends a{getSelectorContainerRef(){return this.selectorContainerRef}render(){return e("vega-flex",{"align-items":"start","justify-content":"start",gap:"size-16",class:{"selection-tile":!0,disabled:this.disabled,checked:this.checked,error:this.showError},"aria-label":this.titleText||"No label defined",tabIndex:this.disabled?-1:0,onClick:()=>{"radio"===this.selectType&&this.checked||this.checkedController.onCheck(!this.checked)},onKeyDown:p()},e("div",{class:"vega-flex-grow"},this.renderContent()),this.renderSelect())}renderContent(){return this.hasContentSlot()?e("slot",{name:"content"}):e("vega-flex",{gap:"size-12"},e("vega-flex",{class:"vega-flex-shrink-0"},this.renderPrefixIcon()),e("div",{class:"vega-flex-grow"},this.renderText()))}renderPrefixIcon(){return this.hasPrefixSlot()?e("slot",{name:"prefix"}):this.prefixIcon?e("vega-icon",{icon:this.prefixIcon,size:"size-16",color:this.disabled?"text-secondary":"text-primary",class:"selection-tile-icon"}):void 0}renderText(){return e("vega-flex",{class:"vega-flex-grow",direction:"col","align-items":"start","justify-content":"start"},e("div",{class:"selection-tile-title"},this.titleText),this.note&&e("div",{class:"selection-tile-note"},this.note))}renderSelect(){return e("vega-flex",{"align-items":"start",class:"vega-flex-shrink-0 selection-tile-select",ref:e=>this.selectorContainerRef=e},"checkbox"===this.selectType?this.renderCheckbox():this.renderRadio())}renderCheckbox(){return e("vega-checkbox",{size:"small",disabled:this.disabled,checked:this.checked})}renderRadio(){return e("vega-radio",{size:"small",disabled:this.disabled,checked:this.checked})}hasPrefixSlot(){return null!==this.host.querySelector("[slot=prefix]")}hasContentSlot(){return null!==this.host.querySelector("[slot=content]")}}O([n()],T.prototype,"host",void 0),O([n()],T.prototype,"prefixIcon",void 0),O([n()],T.prototype,"titleText",void 0),O([n()],T.prototype,"note",void 0),O([n()],T.prototype,"selectType",void 0),O([n()],T.prototype,"disabled",void 0),O([n()],T.prototype,"checked",void 0),O([n()],T.prototype,"showError",void 0),O([n()],T.prototype,"checkedController",void 0);var V=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class N extends a{setChecked(e){this.checked=e}onCheck(e){const t=e?this.value:"";this.checked=e,this.changeEventEmitter.emit(t),b.notify(g,{host:this.host,detail:{checked:e,value:this.value}})}}V([n()],N.prototype,"host",void 0),V([n({writable:!0})],N.prototype,"checked",void 0),V([n()],N.prototype,"changeEventEmitter",void 0),V([n()],N.prototype,"value",void 0);var A=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class F extends w{constructor(){super({parent:"vega-selection-tile-group",subStates:[{subStateName:"selectType",parentStateName:"selectType"},{subStateName:"disabled",parentStateName:"disabled",callback:e=>{"boolean"==typeof e&&(this.disabled=e)}},{subStateName:"checked",parentStateName:"value",callback:e=>{this.checkedController.setChecked(Array.isArray(e)?e.includes(this.value):e===this.value)}},{subStateName:"distributeEvenly",parentStateName:"distributeEvenly"}]})}}A([n()],F.prototype,"host",void 0),A([n({writable:!0})],F.prototype,"selectType",void 0),A([n({writable:!0})],F.prototype,"disabled",void 0),A([n()],F.prototype,"checked",void 0),A([n()],F.prototype,"value",void 0),A([n()],F.prototype,"checkedController",void 0),A([n({writable:!0})],F.prototype,"distributeEvenly",void 0);var D=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class q extends a{connectedCallback(){this.selectionTileGroup=j(this.host,"vega-selection-tile-group"),this.fieldErrorObserver=new k(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),b.register(R.getSubject(this.selectionTileGroup||this.host,y),this.fieldErrorObserver)}disconnectedCallback(){b.unregister(R.getSubject(this.selectionTileGroup,y),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}D([n({writable:!0})],q.prototype,"showError",void 0),D([n()],q.prototype,"host",void 0),D([l("connectedCallback")],q.prototype,"connectedCallback",null),D([l("disconnectedCallback")],q.prototype,"disconnectedCallback",null);var G=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};const _=class{constructor(e){t(this,e),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.renderer=new T,this.checkedController=new N,this.stateController=new F,this.showErrorController=new q,this.changeEventEmitter=f(_,v),this.checkboxEventPrevent=new C([v],(()=>this.renderer.getSelectorContainerRef())),this.checkboxValueChangeObserver=new S(x,(e=>this.checkedController.onCheck(e.detail))),this.radioValueChangeObserver=new S(m,(e=>{e.detail&&this.checkedController.onCheck(e.detail)})),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.showError=!1,this.distributeEvenly=!1,this.titleText="",this.disabled=!1,this.selectType="radio"}render(){return r(e(s,{class:{"distribute-evenly":this.distributeEvenly}},this.renderer.render()),this.host)}get host(){return o(this)}};G([d()],_.prototype,"globalSlimmers",void 0),G([c()],_.prototype,"renderer",void 0),G([c()],_.prototype,"checkedController",void 0),G([c()],_.prototype,"stateController",void 0),G([c()],_.prototype,"showErrorController",void 0),G([c()],_.prototype,"changeEventEmitter",void 0),G([c()],_.prototype,"checkboxEventPrevent",void 0),G([c()],_.prototype,"checkboxValueChangeObserver",void 0),G([c()],_.prototype,"radioValueChangeObserver",void 0),G([c()],_.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),_.style=':host::not(.distribute-evenly){display:block}:host(.distribute-evenly){display:flex;width:100%}:host(.distribute-evenly) .selection-tile{flex:1}:host{display:block}:host .selection-tile{padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px;border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:8px;background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));color:rgba(var(--v-text-primary, 32, 54, 69, 1));cursor:pointer;margin:1px}:host .selection-tile:not(.disabled):hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1));background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1))}:host .selection-tile:not(.disabled):focus-visible{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .selection-tile:not(.disabled).checked{background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));border:2px solid rgba(var(--v-border-tile-selected, 19, 98, 226, 1));margin:0px}:host .selection-tile:not(.disabled).checked:hover{border:2px solid rgba(var(--v-border-tile-selected-hover, 4, 112, 236, 1));background-color:rgba(var(--v-bg-tile-selected-hover, 229, 239, 255, 1))}:host .selection-tile:not(.disabled).checked:focus-visible{border:2px solid rgba(var(--v-border-tile-selected, 19, 98, 226, 1));background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .selection-tile:not(.disabled).error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1));background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1))}:host .selection-tile:not(.disabled).error:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1));background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1))}:host .selection-tile:not(.disabled).error:focus-visible{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1));background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}:host .selection-tile.disabled{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));pointer-events:none}:host .selection-tile.disabled .selection-tile-title,:host .selection-tile.disabled .selection-tile-note{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}:host .selection-tile .selection-tile-title{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .selection-tile .selection-tile-title{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .selection-tile .selection-tile-title{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .selection-tile .selection-tile-title{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host .selection-tile .selection-tile-note{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .selection-tile .selection-tile-note{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .selection-tile .selection-tile-note{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .selection-tile .selection-tile-note{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .selection-tile .selection-tile-icon{margin-top:4px;margin-bottom:4px}:host .selection-tile .selection-tile-select{height:24px}:host .selection-tile .selection-tile-select vega-checkbox,:host .selection-tile .selection-tile-select vega-radio{margin-top:4px}';var P=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class L extends a{getGroupContainerRef(){return this.groupContainerRef}render(){return e("div",null,this.renderLabel(),this.renderContainer(),this.renderHint())}renderLabel(){return this.label&&e("div",{class:"vega-label"},e("label",{"aria-label":this.label},this.label,this.renderRequire()))}renderRequire(){return this.required&&e("span",{class:"vega-require"},"*")}renderContainer(){return e("div",{class:"container",ref:e=>this.groupContainerRef=e},e("vega-flex",{direction:"horizontal"===this.layout?"row":"col",gap:"size-12"},e("slot",{onSlotchange:()=>this.itemsController.syncTileArrayAndValue()})))}renderHint(){return this.hint&&e("div",{class:"vega-hint"},e("label",null,this.hint))}}P([n()],L.prototype,"host",void 0),P([n()],L.prototype,"label",void 0),P([n()],L.prototype,"required",void 0),P([n()],L.prototype,"hint",void 0),P([n()],L.prototype,"layout",void 0),P([n()],L.prototype,"selectType",void 0),P([n()],L.prototype,"itemsController",void 0);var M=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class H extends a{watchValue(){this.changeEventEmitter.emit(this.value),b.notify(u,{host:this.host,detail:this.value})}onSelectionTilesChanged(){"checkbox"===this.selectType?this.setValueFromCheckboxItems():this.setValueFromRadioItems()}onSelectionTileChecked(e){"checkbox"===this.selectType?this.setValueFromCheckbox(e):this.setValueFromRadio(e)}setValueFromCheckbox(e){e.checked&&!this.value.includes(e.value)?this.value=[...this.value,e.value]:!e.checked&&this.value.includes(e.value)&&(this.value=[...this.value.filter((t=>t!==e.value))])}setValueFromRadio(e){e.checked&&(this.value=e.value)}setValueFromCheckboxItems(){0===this.value.length&&(this.value=this.itemsController.getSelectionTileArray().filter((e=>e.checked)).map((e=>e.value)))}setValueFromRadioItems(){if(!this.value){const e=this.itemsController.getSelectionTileArray().find((e=>e.checked));e&&(this.value=e.value)}}}M([n()],H.prototype,"host",void 0),M([n({writable:!0})],H.prototype,"value",void 0),M([n()],H.prototype,"selectType",void 0),M([n()],H.prototype,"changeEventEmitter",void 0),M([n()],H.prototype,"itemsController",void 0),M([l("watchValue")],H.prototype,"watchValue",null);var U=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class K extends a{constructor(){super(...arguments),this.selectionTileArray=[]}initSelectionTileArray(){this.syncTileArrayAndValue()}getSelectionTileArray(){return this.selectionTileArray}syncTileArrayAndValue(){this.selectionTileArray=Array.from(this.host.querySelectorAll("vega-selection-tile")),this.valueController.onSelectionTilesChanged()}touchableAreaGetter(){const e="checkbox"===this.selectType?"vega-checkbox":"vega-radio";return this.selectionTileArray.map((t=>t.shadowRoot.querySelector(e).shadowRoot.querySelector("input")))}}U([n()],K.prototype,"host",void 0),U([n()],K.prototype,"selectType",void 0),U([n()],K.prototype,"valueController",void 0),U([l("componentWillLoad")],K.prototype,"initSelectionTileArray",null);var W=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};const B=class{constructor(e){t(this,e),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.renderer=new L,this.itemsController=new K,this.valueController=new H,this.formFieldController=new I({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new E:null}],validationRulesName:"validationRules",inputContainerGetter:()=>this.renderer.getGroupContainerRef(),touchableAreaGetter:()=>this.itemsController.touchableAreaGetter(),defaultValue:e=>"checkbox"===e.selectType?[]:"",attributeGetter:e=>this[e]}),this.changeEventEmitter=f(B,v),this.checkboxEventPrevent=new C([v],(()=>this.renderer.getGroupContainerRef())),this.selectionTileChangeObserver=new S(g,(e=>this.valueController.onSelectionTileChecked(e.detail))),this.selectTypeNotifySlimmer=z(B,"selectType","watchSelectType"),this.disabledNotifySlimmer=z(B,"disabled","watchDisabled"),this.valueNotifySlimmer=z(B,"value","watchValue"),this.distributeEvenlyNotifySlimmer=z(B,"distributeEvenly","watchDistributeEvenly"),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.label="",this.distributeEvenly=!1,this.selectType="radio",this.value="checkbox"===this.selectType?[]:"",this.layout="vertical",this.validationRules=[],this.isValid=null}watchDistributeEvenly(){}watchSelectType(){}watchValue(){}watchDisabled(){}watchValidationRules(){}render(){return r(e(s,null,this.renderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{distributeEvenly:["watchDistributeEvenly"],selectType:["watchSelectType"],value:["watchValue"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};W([d()],B.prototype,"globalSlimmers",void 0),W([c()],B.prototype,"renderer",void 0),W([c()],B.prototype,"itemsController",void 0),W([c()],B.prototype,"valueController",void 0),W([c()],B.prototype,"formFieldController",void 0),W([c()],B.prototype,"changeEventEmitter",void 0),W([c()],B.prototype,"checkboxEventPrevent",void 0),W([c()],B.prototype,"selectionTileChangeObserver",void 0),W([c()],B.prototype,"selectTypeNotifySlimmer",void 0),W([c()],B.prototype,"disabledNotifySlimmer",void 0),W([c()],B.prototype,"valueNotifySlimmer",void 0),W([c()],B.prototype,"distributeEvenlyNotifySlimmer",void 0),W([c()],B.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),B.style=':host{display:block;text-align:left;line-height:normal}:host .vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}:host .vega-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;margin-bottom:16px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host .vega-label label{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}:host .vega-label .vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px}:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-top:12px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}';export{_ as vega_selection_tile,B as vega_selection_tile_group}
1
+ import{h as e,r as t,c as i,H as s,g as o}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{c as n,V as a,M as l,I as c}from"./p-6e1ab235.js";import{V as h,I as d}from"./p-4415ad28.js";import{c as p}from"./p-6ac8e655.js";import{c as f}from"./p-6b5cb920.js";import{i as v}from"./p-9af0e2e7.js";import{C as b}from"./p-2d0d575f.js";import{i as g,C as x,R as m,F as u}from"./p-a528714c.js";import{S as w}from"./p-af5cb9bc.js";import{h as y}from"./p-6c43d54a.js";import{f as j}from"./p-6e70d3cc.js";import{O as k}from"./p-331a62d5.js";import{d as R}from"./p-f28a6074.js";import{C}from"./p-e27626f6.js";import{C as S}from"./p-76063dcb.js";import{c as z}from"./p-c31a32f4.js";import{F as I}from"./p-c347e08a.js";import{R as E}from"./p-280cbcdb.js";import"./p-6a334573.js";import"./p-f1c672e4.js";import"./p-b75ee3ba.js";import"./p-5f377954.js";import"./p-18e8d9b7.js";import"./p-5a25014f.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-3b791b5d.js";import"./p-f0e828d8.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-abd7aeaa.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";var O=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class T extends a{getSelectorContainerRef(){return this.selectorContainerRef}render(){return e("vega-flex",{"align-items":"start","justify-content":"start",gap:"size-16",class:{"selection-tile":!0,disabled:this.disabled,checked:this.checked,error:this.showError},"aria-label":this.titleText||"No label defined",tabIndex:this.disabled?-1:0,onClick:()=>{"radio"===this.selectType&&this.checked||this.checkedController.onCheck(!this.checked)},onKeyDown:p()},e("div",{class:"vega-flex-grow"},this.renderContent()),this.renderSelect())}renderContent(){return this.hasContentSlot()?e("slot",{name:"content"}):e("vega-flex",{gap:"size-12"},e("vega-flex",{class:"vega-flex-shrink-0"},this.renderPrefixIcon()),e("div",{class:"vega-flex-grow"},this.renderText()))}renderPrefixIcon(){return this.hasPrefixSlot()?e("slot",{name:"prefix"}):this.prefixIcon?e("vega-icon",{icon:this.prefixIcon,size:"size-16",color:this.disabled?"text-secondary":"text-primary",class:"selection-tile-icon"}):void 0}renderText(){return e("vega-flex",{class:"vega-flex-grow",direction:"col","align-items":"start","justify-content":"start"},e("div",{class:"selection-tile-title"},this.titleText),this.note&&e("div",{class:"selection-tile-note"},this.note))}renderSelect(){return e("vega-flex",{"align-items":"start",class:"vega-flex-shrink-0 selection-tile-select",ref:e=>this.selectorContainerRef=e},"checkbox"===this.selectType?this.renderCheckbox():this.renderRadio())}renderCheckbox(){return e("vega-checkbox",{size:"small",disabled:this.disabled,checked:this.checked})}renderRadio(){return e("vega-radio",{size:"small",disabled:this.disabled,checked:this.checked})}hasPrefixSlot(){return null!==this.host.querySelector("[slot=prefix]")}hasContentSlot(){return null!==this.host.querySelector("[slot=content]")}}O([n()],T.prototype,"host",void 0),O([n()],T.prototype,"prefixIcon",void 0),O([n()],T.prototype,"titleText",void 0),O([n()],T.prototype,"note",void 0),O([n()],T.prototype,"selectType",void 0),O([n()],T.prototype,"disabled",void 0),O([n()],T.prototype,"checked",void 0),O([n()],T.prototype,"showError",void 0),O([n()],T.prototype,"checkedController",void 0);var V=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class N extends a{setChecked(e){this.checked=e}onCheck(e){const t=e?this.value:"";this.checked=e,this.changeEventEmitter.emit(t),b.notify(g,{host:this.host,detail:{checked:e,value:this.value}})}}V([n()],N.prototype,"host",void 0),V([n({writable:!0})],N.prototype,"checked",void 0),V([n()],N.prototype,"changeEventEmitter",void 0),V([n()],N.prototype,"value",void 0);var A=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class F extends w{constructor(){super({parent:"vega-selection-tile-group",subStates:[{subStateName:"selectType",parentStateName:"selectType"},{subStateName:"disabled",parentStateName:"disabled",callback:e=>{"boolean"==typeof e&&(this.disabled=e)}},{subStateName:"checked",parentStateName:"value",callback:e=>{this.checkedController.setChecked(Array.isArray(e)?e.includes(this.value):e===this.value)}},{subStateName:"distributeEvenly",parentStateName:"distributeEvenly"}]})}}A([n()],F.prototype,"host",void 0),A([n({writable:!0})],F.prototype,"selectType",void 0),A([n({writable:!0})],F.prototype,"disabled",void 0),A([n()],F.prototype,"checked",void 0),A([n()],F.prototype,"value",void 0),A([n()],F.prototype,"checkedController",void 0),A([n({writable:!0})],F.prototype,"distributeEvenly",void 0);var D=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class q extends a{connectedCallback(){this.selectionTileGroup=j(this.host,"vega-selection-tile-group"),this.fieldErrorObserver=new k(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),b.register(R.getSubject(this.selectionTileGroup||this.host,y),this.fieldErrorObserver)}disconnectedCallback(){b.unregister(R.getSubject(this.selectionTileGroup,y),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}D([n({writable:!0})],q.prototype,"showError",void 0),D([n()],q.prototype,"host",void 0),D([l("connectedCallback")],q.prototype,"connectedCallback",null),D([l("disconnectedCallback")],q.prototype,"disconnectedCallback",null);var G=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};const _=class{constructor(e){t(this,e),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.renderer=new T,this.checkedController=new N,this.stateController=new F,this.showErrorController=new q,this.changeEventEmitter=f(_,v),this.checkboxEventPrevent=new C([v],(()=>this.renderer.getSelectorContainerRef())),this.checkboxValueChangeObserver=new S(x,(e=>this.checkedController.onCheck(e.detail))),this.radioValueChangeObserver=new S(m,(e=>{e.detail&&this.checkedController.onCheck(e.detail)})),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.showError=!1,this.distributeEvenly=!1,this.titleText="",this.disabled=!1,this.selectType="radio"}render(){return r(e(s,{class:{"distribute-evenly":this.distributeEvenly}},this.renderer.render()),this.host)}get host(){return o(this)}};G([d()],_.prototype,"globalSlimmers",void 0),G([c()],_.prototype,"renderer",void 0),G([c()],_.prototype,"checkedController",void 0),G([c()],_.prototype,"stateController",void 0),G([c()],_.prototype,"showErrorController",void 0),G([c()],_.prototype,"changeEventEmitter",void 0),G([c()],_.prototype,"checkboxEventPrevent",void 0),G([c()],_.prototype,"checkboxValueChangeObserver",void 0),G([c()],_.prototype,"radioValueChangeObserver",void 0),G([c()],_.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),_.style=':host::not(.distribute-evenly){display:block}:host(.distribute-evenly){display:flex;width:100%}:host(.distribute-evenly) .selection-tile{flex:1}:host{display:block}:host .selection-tile{padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px;border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:8px;background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));color:rgba(var(--v-text-primary, 32, 54, 69, 1));cursor:pointer;margin:1px}:host .selection-tile:not(.disabled):hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1));background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1))}:host .selection-tile:not(.disabled):focus-visible{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .selection-tile:not(.disabled).checked{background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));border:2px solid rgba(var(--v-border-tile-selected, 19, 98, 226, 1));margin:0px}:host .selection-tile:not(.disabled).checked:hover{border:2px solid rgba(var(--v-border-tile-selected-hover, 4, 112, 236, 1));background-color:rgba(var(--v-bg-tile-selected-hover, 229, 239, 255, 1))}:host .selection-tile:not(.disabled).checked:focus-visible{border:2px solid rgba(var(--v-border-tile-selected, 19, 98, 226, 1));background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .selection-tile:not(.disabled).error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1));background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1))}:host .selection-tile:not(.disabled).error:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1));background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1))}:host .selection-tile:not(.disabled).error:focus-visible{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1));background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}:host .selection-tile.disabled{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));pointer-events:none}:host .selection-tile.disabled .selection-tile-title,:host .selection-tile.disabled .selection-tile-note{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}:host .selection-tile .selection-tile-title{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .selection-tile .selection-tile-title{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .selection-tile .selection-tile-title{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .selection-tile .selection-tile-title{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host .selection-tile .selection-tile-note{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .selection-tile .selection-tile-note{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .selection-tile .selection-tile-note{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .selection-tile .selection-tile-note{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .selection-tile .selection-tile-icon{margin-top:4px;margin-bottom:4px}:host .selection-tile .selection-tile-select{height:24px}:host .selection-tile .selection-tile-select vega-checkbox,:host .selection-tile .selection-tile-select vega-radio{margin-top:4px}';var P=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class L extends a{getGroupContainerRef(){return this.groupContainerRef}render(){return e("div",null,this.renderLabel(),this.renderContainer(),this.renderHint())}renderLabel(){return this.label&&e("div",{class:"vega-label"},e("label",{"aria-label":this.label},this.label,this.renderRequire()))}renderRequire(){return this.required&&e("span",{class:"vega-require"},"*")}renderContainer(){return e("div",{class:"container",ref:e=>this.groupContainerRef=e},e("vega-flex",{direction:"horizontal"===this.layout?"row":"col",gap:"size-12"},e("slot",{onSlotchange:()=>this.itemsController.syncTileArrayAndValue()})))}renderHint(){return this.hint&&e("div",{class:"vega-hint"},e("label",null,this.hint))}}P([n()],L.prototype,"host",void 0),P([n()],L.prototype,"label",void 0),P([n()],L.prototype,"required",void 0),P([n()],L.prototype,"hint",void 0),P([n()],L.prototype,"layout",void 0),P([n()],L.prototype,"selectType",void 0),P([n()],L.prototype,"itemsController",void 0);var M=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class H extends a{watchValue(){this.changeEventEmitter.emit(this.value),b.notify(u,{host:this.host,detail:this.value})}onSelectionTilesChanged(){"checkbox"===this.selectType?this.setValueFromCheckboxItems():this.setValueFromRadioItems()}onSelectionTileChecked(e){"checkbox"===this.selectType?this.setValueFromCheckbox(e):this.setValueFromRadio(e)}setValueFromCheckbox(e){e.checked&&!this.value.includes(e.value)?this.value=[...this.value,e.value]:!e.checked&&this.value.includes(e.value)&&(this.value=[...this.value.filter((t=>t!==e.value))])}setValueFromRadio(e){e.checked&&(this.value=e.value)}setValueFromCheckboxItems(){0===this.value.length&&(this.value=this.itemsController.getSelectionTileArray().filter((e=>e.checked)).map((e=>e.value)))}setValueFromRadioItems(){if(!this.value){const e=this.itemsController.getSelectionTileArray().find((e=>e.checked));e&&(this.value=e.value)}}}M([n()],H.prototype,"host",void 0),M([n({writable:!0})],H.prototype,"value",void 0),M([n()],H.prototype,"selectType",void 0),M([n()],H.prototype,"changeEventEmitter",void 0),M([n()],H.prototype,"itemsController",void 0),M([l("watchValue")],H.prototype,"watchValue",null);var U=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class K extends a{constructor(){super(...arguments),this.selectionTileArray=[]}initSelectionTileArray(){this.syncTileArrayAndValue()}getSelectionTileArray(){return this.selectionTileArray}syncTileArrayAndValue(){this.selectionTileArray=Array.from(this.host.querySelectorAll("vega-selection-tile")),this.valueController.onSelectionTilesChanged()}touchableAreaGetter(){const e="checkbox"===this.selectType?"vega-checkbox":"vega-radio";return this.selectionTileArray.map((t=>t.shadowRoot.querySelector(e).shadowRoot.querySelector("input")))}}U([n()],K.prototype,"host",void 0),U([n()],K.prototype,"selectType",void 0),U([n()],K.prototype,"valueController",void 0),U([l("componentWillLoad")],K.prototype,"initSelectionTileArray",null);var W=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};const B=class{constructor(e){t(this,e),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.renderer=new L,this.itemsController=new K,this.valueController=new H,this.formFieldController=new I({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new E:null}],validationRulesName:"validationRules",inputContainerGetter:()=>this.renderer.getGroupContainerRef(),touchableAreaGetter:()=>this.itemsController.touchableAreaGetter(),defaultValue:e=>"checkbox"===e.selectType?[]:"",attributeGetter:e=>this[e]}),this.changeEventEmitter=f(B,v),this.checkboxEventPrevent=new C([v],(()=>this.renderer.getGroupContainerRef())),this.selectionTileChangeObserver=new S(g,(e=>this.valueController.onSelectionTileChecked(e.detail))),this.selectTypeNotifySlimmer=z(B,"selectType","watchSelectType"),this.disabledNotifySlimmer=z(B,"disabled","watchDisabled"),this.valueNotifySlimmer=z(B,"value","watchValue"),this.distributeEvenlyNotifySlimmer=z(B,"distributeEvenly","watchDistributeEvenly"),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.label="",this.distributeEvenly=!1,this.selectType="radio",this.value="checkbox"===this.selectType?[]:"",this.layout="vertical",this.validationRules=[],this.isValid=null}watchDistributeEvenly(){}watchSelectType(){}watchValue(){}watchDisabled(){}watchValidationRules(){}render(){return r(e(s,null,this.renderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{distributeEvenly:["watchDistributeEvenly"],selectType:["watchSelectType"],value:["watchValue"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};W([d()],B.prototype,"globalSlimmers",void 0),W([c()],B.prototype,"renderer",void 0),W([c()],B.prototype,"itemsController",void 0),W([c()],B.prototype,"valueController",void 0),W([c()],B.prototype,"formFieldController",void 0),W([c()],B.prototype,"changeEventEmitter",void 0),W([c()],B.prototype,"checkboxEventPrevent",void 0),W([c()],B.prototype,"selectionTileChangeObserver",void 0),W([c()],B.prototype,"selectTypeNotifySlimmer",void 0),W([c()],B.prototype,"disabledNotifySlimmer",void 0),W([c()],B.prototype,"valueNotifySlimmer",void 0),W([c()],B.prototype,"distributeEvenlyNotifySlimmer",void 0),W([c()],B.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),B.style=':host{display:block;text-align:left;line-height:normal}:host .vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}:host .vega-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;margin-bottom:16px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host .vega-label label{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}:host .vega-label .vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px}:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-top:12px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}';export{_ as vega_selection_tile,B as vega_selection_tile_group}