@globalpayments/vega 2.102.0 → 2.104.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 (413) hide show
  1. package/dist/cjs/{app-globals-49c2a999.js → app-globals-bc84b09b.js} +10 -10
  2. package/dist/cjs/{code-block-06e6591f.js → code-block-7340d2b7.js} +80 -1
  3. package/dist/cjs/{component-value-history-controller-slimmer.abstract-f29908f8.js → component-value-history-controller-slimmer.abstract-dd834f8d.js} +3 -3
  4. package/dist/cjs/{content-state-8c862e5e.js → content-state-dde1253f.js} +38 -5
  5. package/dist/cjs/{date-required-rule-b672c432.js → date-required-rule-5e6777cf.js} +1 -1
  6. package/dist/cjs/{design-token-351ffd2c.js → design-token-b28d222d.js} +3 -3
  7. package/dist/cjs/{element-appender-slimmer-f932b166.js → element-appender-slimmer-a87bc0ce.js} +2 -2
  8. package/dist/cjs/{form-field-controller-slimmer-5adb86ae.js → form-field-controller-slimmer-007d10db.js} +1 -1
  9. package/dist/cjs/{image-annotation-action-25907d6b.js → image-annotation-action-715bece3.js} +2 -2
  10. package/dist/cjs/{image-extension-1cf84f27.js → image-extension-cc8f36a1.js} +247 -5
  11. package/dist/cjs/index.cjs.js +17 -17
  12. package/dist/cjs/{inject-keyboard-manager-84d33920.js → inject-keyboard-manager-1a113d04.js} +1 -1
  13. package/dist/cjs/{internal-calendar-period-factory-3c5236be.js → internal-calendar-period-factory-bf5e8294.js} +1 -1
  14. package/dist/cjs/{internal-translation-controller-eae8a8de.js → internal-translation-controller-b5bbefc9.js} +5 -0
  15. package/dist/cjs/{keyboard-manager-baa83a61.js → keyboard-manager-d0271450.js} +1 -1
  16. package/dist/cjs/{keyboard-manager-slimmer-d1974b28.js → keyboard-manager-slimmer-5a4c0e4c.js} +1 -1
  17. package/dist/cjs/{legend-input-processor-ce9b38f8.js → legend-input-processor-bd36a794.js} +28 -0
  18. package/dist/cjs/{link-extension-2a6133b7.js → link-extension-953fb2a0.js} +3 -3
  19. package/dist/cjs/loader.cjs.js +12 -12
  20. package/dist/cjs/{month-view-generator-a6827548.js → month-view-generator-b68bcf4b.js} +1 -1
  21. package/dist/cjs/{public-rules-7f26e0ae.js → public-rules-8bfc6de7.js} +7 -7
  22. package/dist/cjs/{range-518b95a2.js → range-4060b238.js} +1 -1
  23. package/dist/cjs/{responsive-format-facade-95c54444.js → responsive-format-facade-fed434ed.js} +1 -1
  24. package/dist/cjs/{rich-text-editor-required-rule-5d0c76ec.js → rich-text-editor-required-rule-16e74e91.js} +1 -1
  25. package/dist/cjs/{split-cell-operation-28f6f8d9.js → split-cell-operation-430e9f27.js} +3 -3
  26. package/dist/cjs/{state-border-formatter-6c284859.js → state-border-formatter-b469de2f.js} +1 -1
  27. package/dist/cjs/{string-format-strategy.abstract-f15b6196.js → string-format-strategy.abstract-b3174863.js} +1 -1
  28. package/dist/cjs/{string-input-formatter-slimmer-5a3f1b55.js → string-input-formatter-slimmer-ceb678e9.js} +1 -1
  29. package/dist/cjs/{string-mask-strategy-af6f3ba0.js → string-mask-strategy-5f84e2f6.js} +2 -2
  30. package/dist/cjs/{style-formatter-324211fd.js → style-formatter-e98caf3c.js} +2 -2
  31. package/dist/cjs/{time-required-rule-9e714442.js → time-required-rule-249cb6b6.js} +1 -1
  32. package/dist/cjs/{token-extension-86723cad.js → token-extension-f074902b.js} +1011 -767
  33. package/dist/cjs/{translation-slimmer-0227ee24.js → translation-slimmer-b60d598e.js} +1 -1
  34. package/dist/cjs/{type-guard-29e01bd4.js → type-guard-8eb40609.js} +1 -1
  35. package/dist/cjs/{valid-credit-card-number-rule-4ec364af.js → valid-credit-card-number-rule-f5d2b2c6.js} +1 -1
  36. package/dist/cjs/vega-accordion.cjs.entry.js +6 -6
  37. package/dist/cjs/vega-app-header-button.cjs.entry.js +5 -5
  38. package/dist/cjs/vega-bar-chart.cjs.entry.js +2 -2
  39. package/dist/cjs/vega-box.cjs.entry.js +6 -6
  40. package/dist/cjs/vega-button-circle.cjs.entry.js +5 -5
  41. package/dist/cjs/vega-button.cjs.entry.js +3 -3
  42. package/dist/cjs/vega-calendar_5.cjs.entry.js +7 -7
  43. package/dist/cjs/vega-card.cjs.entry.js +5 -5
  44. package/dist/cjs/vega-carousel.cjs.entry.js +3 -3
  45. package/dist/cjs/vega-checkbox_2.cjs.entry.js +2 -2
  46. package/dist/cjs/vega-chip.cjs.entry.js +5 -5
  47. package/dist/cjs/vega-code-block.cjs.entry.js +8 -8
  48. package/dist/cjs/vega-color-picker.cjs.entry.js +2 -2
  49. package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +3 -3
  50. package/dist/cjs/vega-color-swatch.cjs.entry.js +2 -2
  51. package/dist/cjs/vega-combo-box.cjs.entry.js +8 -8
  52. package/dist/cjs/vega-date-picker_2.cjs.entry.js +13 -13
  53. package/dist/cjs/vega-dialog_2.cjs.entry.js +10 -5
  54. package/dist/cjs/vega-divider.cjs.entry.js +5 -5
  55. package/dist/cjs/vega-dropdown_5.cjs.entry.js +7 -7
  56. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  57. package/dist/cjs/vega-field-label.cjs.entry.js +2 -2
  58. package/dist/cjs/vega-file-uploader.cjs.entry.js +3 -3
  59. package/dist/cjs/vega-flag-icon.cjs.entry.js +5 -5
  60. package/dist/cjs/vega-flex.cjs.entry.js +6 -6
  61. package/dist/cjs/vega-font.cjs.entry.js +5 -5
  62. package/dist/cjs/vega-form.cjs.entry.js +2 -2
  63. package/dist/cjs/vega-grid.cjs.entry.js +5 -5
  64. package/dist/cjs/vega-icon.cjs.entry.js +5 -5
  65. package/dist/cjs/vega-image-uploader.cjs.entry.js +21 -12
  66. package/dist/cjs/vega-input-credit-card.cjs.entry.js +6 -6
  67. package/dist/cjs/vega-input-numeric.cjs.entry.js +12 -14
  68. package/dist/cjs/vega-input-passcode.cjs.entry.js +5 -5
  69. package/dist/cjs/vega-input-phone-number.cjs.entry.js +4 -4
  70. package/dist/cjs/vega-input-range.cjs.entry.js +3 -3
  71. package/dist/cjs/vega-input-select.cjs.entry.js +5 -5
  72. package/dist/cjs/vega-input.cjs.entry.js +31 -27
  73. package/dist/cjs/vega-left-nav_5.cjs.entry.js +7 -7
  74. package/dist/cjs/vega-line-chart.cjs.entry.js +2 -2
  75. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
  76. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +2 -2
  77. package/dist/cjs/vega-pagination.cjs.entry.js +4 -4
  78. package/dist/cjs/vega-pie-chart.cjs.entry.js +1 -1
  79. package/dist/cjs/vega-popover_2.cjs.entry.js +8 -8
  80. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +3 -3
  81. package/dist/cjs/vega-radio_2.cjs.entry.js +5 -5
  82. package/dist/cjs/vega-rich-text-bookmark-editor.cjs.entry.js +2 -2
  83. package/dist/cjs/vega-rich-text-content.cjs.entry.js +6 -6
  84. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +474 -207
  85. package/dist/cjs/vega-rich-text-find-replace-panel.cjs.entry.js +1 -1
  86. package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +5 -5
  87. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +8 -8
  88. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +4 -4
  89. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +2 -2
  90. package/dist/cjs/vega-sidenav_3.cjs.entry.js +3 -3
  91. package/dist/cjs/vega-signature-capture.cjs.entry.js +7 -7
  92. package/dist/cjs/vega-stepper.cjs.entry.js +2 -2
  93. package/dist/cjs/vega-tab-group_2.cjs.entry.js +6 -6
  94. package/dist/cjs/vega-table_11.cjs.entry.js +4 -4
  95. package/dist/cjs/vega-textarea.cjs.entry.js +2 -2
  96. package/dist/cjs/vega-time-picker_2.cjs.entry.js +9 -9
  97. package/dist/cjs/vega-toggle-switch.cjs.entry.js +2 -2
  98. package/dist/cjs/vega-tooltip_2.cjs.entry.js +6 -6
  99. package/dist/cjs/vega.cjs.js +12 -12
  100. package/dist/cjs/{y-axis-input-processor-d3a3839c.js → y-axis-input-processor-9ba96716.js} +1 -1
  101. package/dist/collection/components/vega-dialog/vega-dialog.js +7 -2
  102. package/dist/collection/components/vega-image-uploader/slimmers/controllers/vega-image-uploader-remove-controller.js +6 -3
  103. package/dist/collection/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-actions-renderer.js +6 -3
  104. package/dist/collection/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-uploading-content-renderer.js +4 -1
  105. package/dist/collection/components/vega-input/slimmers/controllers/vega-input-state-controller.js +0 -14
  106. package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-container-renderer.js +11 -2
  107. package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-renderer.js +11 -1
  108. package/dist/collection/components/vega-input/vega-input.js +52 -8
  109. package/dist/collection/components/vega-input-numeric/slimmers/renderers/vega-input-numeric-renderer.js +7 -1
  110. package/dist/collection/components/vega-input-numeric/vega-input-numeric.js +0 -8
  111. package/dist/collection/components/vega-rich-text-editor/constants/constant.js +4 -0
  112. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/sequential-composition-strategy.js +31 -0
  113. package/dist/collection/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.js +1 -0
  114. package/dist/collection/components/vega-rich-text-editor/dto/actions/sequential-composition-action.js +14 -0
  115. package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +4 -1
  116. package/dist/collection/components/vega-rich-text-editor/dto/flush-changes-payload.js +1 -0
  117. package/dist/collection/components/vega-rich-text-editor/dto/nodes/image-node.js +3 -2
  118. package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/function-block.js +30 -0
  119. package/dist/collection/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-to-function-block-strategy.js +1 -0
  120. package/dist/collection/components/vega-rich-text-editor/extensions/paste/controllers/chooser-positioner.js +107 -0
  121. package/dist/collection/components/vega-rich-text-editor/extensions/paste/controllers/paste-chooser-controller.js +91 -0
  122. package/dist/collection/components/vega-rich-text-editor/extensions/paste/controllers/paste-event-interceptor.js +47 -0
  123. package/dist/collection/components/vega-rich-text-editor/extensions/paste/controllers/selection-snapshot-service.js +54 -0
  124. package/dist/collection/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/image-extractor.js +17 -0
  125. package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-chooser-ui.js +3 -1
  126. package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-extension.js +41 -354
  127. package/dist/collection/components/vega-rich-text-editor/extensions/paste/pipeline/data-transfer-builder.js +36 -0
  128. package/dist/collection/components/vega-rich-text-editor/extensions/paste/pipeline/paste-dispatcher.js +23 -0
  129. package/dist/collection/components/vega-rich-text-editor/extensions/paste/pipeline/paste-processing-pipeline.js +30 -0
  130. package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/paste-processing-strategy.abstract.js +34 -0
  131. package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/paste-strategy-selector.js +19 -0
  132. package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/plain-paste-strategy.js +74 -0
  133. package/dist/collection/components/vega-rich-text-editor/extensions/paste/type.js +1 -0
  134. package/dist/collection/components/vega-rich-text-editor/helpers/utils.js +67 -0
  135. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/abstract-delete-content-handler.js +67 -11
  136. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/backward-delete-content-handler.js +4 -17
  137. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/base-handler.js +34 -1
  138. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/forward-delete-content-handler.js +13 -32
  139. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-line-break-handler.js +60 -25
  140. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paragraph-handler.js +55 -19
  141. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.js +165 -59
  142. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-text-handler.js +55 -21
  143. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.js +2 -16
  144. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/value-controller.js +11 -1
  145. package/dist/collection/components/vega-rich-text-editor/utils/html-to-plain-text-utils.js +240 -0
  146. package/dist/collection/helpers/translation/locales/en.js +5 -0
  147. package/dist/collection/polyfill/d3/d3-shape-polyfill.js +28 -0
  148. package/dist/esm/{app-globals-da5c83c2.js → app-globals-8541b3dc.js} +10 -10
  149. package/dist/esm/{code-block-d8f83d85.js → code-block-c16c69a5.js} +74 -2
  150. package/dist/esm/{component-value-history-controller-slimmer.abstract-642e7147.js → component-value-history-controller-slimmer.abstract-1cea9add.js} +3 -3
  151. package/dist/esm/{content-state-486eae1d.js → content-state-73664d93.js} +38 -5
  152. package/dist/esm/{date-required-rule-08695d25.js → date-required-rule-14131e09.js} +1 -1
  153. package/dist/esm/{design-token-df3331d9.js → design-token-4b81bae7.js} +3 -3
  154. package/dist/esm/{element-appender-slimmer-f02a227f.js → element-appender-slimmer-9094aa07.js} +2 -2
  155. package/dist/esm/{form-field-controller-slimmer-a7c0a0f8.js → form-field-controller-slimmer-aaea8aaf.js} +1 -1
  156. package/dist/esm/{image-annotation-action-df744ba5.js → image-annotation-action-86052c2e.js} +2 -2
  157. package/dist/esm/{image-extension-20b39140.js → image-extension-04843995.js} +246 -6
  158. package/dist/esm/index.js +17 -17
  159. package/dist/esm/{inject-keyboard-manager-399ed867.js → inject-keyboard-manager-1a950408.js} +1 -1
  160. package/dist/esm/{internal-calendar-period-factory-7b866c3b.js → internal-calendar-period-factory-14c000cf.js} +1 -1
  161. package/dist/esm/{internal-translation-controller-4a7ee4d5.js → internal-translation-controller-6eb30c39.js} +5 -0
  162. package/dist/esm/{keyboard-manager-f5d13a34.js → keyboard-manager-e7add1f3.js} +1 -1
  163. package/dist/esm/{keyboard-manager-slimmer-f40dcb54.js → keyboard-manager-slimmer-ffe6588a.js} +1 -1
  164. package/dist/esm/{legend-input-processor-3b2de4b7.js → legend-input-processor-bd91524a.js} +28 -0
  165. package/dist/esm/{link-extension-3f93d70d.js → link-extension-caabb7d8.js} +3 -3
  166. package/dist/esm/loader.js +12 -12
  167. package/dist/esm/{month-view-generator-0c665987.js → month-view-generator-0dad54d9.js} +1 -1
  168. package/dist/esm/{public-rules-470a1dac.js → public-rules-76247d91.js} +7 -7
  169. package/dist/esm/{range-8e89fb54.js → range-c0aec697.js} +1 -1
  170. package/dist/esm/{responsive-format-facade-55131a33.js → responsive-format-facade-1a9177b9.js} +1 -1
  171. package/dist/esm/{rich-text-editor-required-rule-06caf383.js → rich-text-editor-required-rule-65e18ef0.js} +1 -1
  172. package/dist/esm/{split-cell-operation-e158366a.js → split-cell-operation-814641f5.js} +3 -3
  173. package/dist/esm/{state-border-formatter-2b73fa08.js → state-border-formatter-31f3145a.js} +1 -1
  174. package/dist/esm/{string-format-strategy.abstract-8c7937e3.js → string-format-strategy.abstract-a8612297.js} +1 -1
  175. package/dist/esm/{string-input-formatter-slimmer-681c6b71.js → string-input-formatter-slimmer-8f2aa95a.js} +1 -1
  176. package/dist/esm/{string-mask-strategy-b8cceee6.js → string-mask-strategy-e8bad1c6.js} +2 -2
  177. package/dist/esm/{style-formatter-fcd70869.js → style-formatter-42e87858.js} +2 -2
  178. package/dist/esm/{time-required-rule-ce50859b.js → time-required-rule-fcab062e.js} +1 -1
  179. package/dist/esm/{token-extension-2401e753.js → token-extension-f001f08e.js} +1011 -767
  180. package/dist/esm/{translation-slimmer-b3f3cf65.js → translation-slimmer-5fa762dc.js} +1 -1
  181. package/dist/esm/{type-guard-08c82e08.js → type-guard-87bdc930.js} +1 -1
  182. package/dist/esm/{valid-credit-card-number-rule-66bad519.js → valid-credit-card-number-rule-5dc557f1.js} +1 -1
  183. package/dist/esm/vega-accordion.entry.js +6 -6
  184. package/dist/esm/vega-app-header-button.entry.js +5 -5
  185. package/dist/esm/vega-bar-chart.entry.js +2 -2
  186. package/dist/esm/vega-box.entry.js +6 -6
  187. package/dist/esm/vega-button-circle.entry.js +5 -5
  188. package/dist/esm/vega-button.entry.js +3 -3
  189. package/dist/esm/vega-calendar_5.entry.js +7 -7
  190. package/dist/esm/vega-card.entry.js +5 -5
  191. package/dist/esm/vega-carousel.entry.js +3 -3
  192. package/dist/esm/vega-checkbox_2.entry.js +2 -2
  193. package/dist/esm/vega-chip.entry.js +5 -5
  194. package/dist/esm/vega-code-block.entry.js +8 -8
  195. package/dist/esm/vega-color-picker.entry.js +2 -2
  196. package/dist/esm/vega-color-swatch-picker.entry.js +3 -3
  197. package/dist/esm/vega-color-swatch.entry.js +2 -2
  198. package/dist/esm/vega-combo-box.entry.js +8 -8
  199. package/dist/esm/vega-date-picker_2.entry.js +13 -13
  200. package/dist/esm/vega-dialog_2.entry.js +10 -5
  201. package/dist/esm/vega-divider.entry.js +5 -5
  202. package/dist/esm/vega-dropdown_5.entry.js +7 -7
  203. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  204. package/dist/esm/vega-field-label.entry.js +2 -2
  205. package/dist/esm/vega-file-uploader.entry.js +3 -3
  206. package/dist/esm/vega-flag-icon.entry.js +5 -5
  207. package/dist/esm/vega-flex.entry.js +6 -6
  208. package/dist/esm/vega-font.entry.js +5 -5
  209. package/dist/esm/vega-form.entry.js +2 -2
  210. package/dist/esm/vega-grid.entry.js +5 -5
  211. package/dist/esm/vega-icon.entry.js +5 -5
  212. package/dist/esm/vega-image-uploader.entry.js +21 -12
  213. package/dist/esm/vega-input-credit-card.entry.js +6 -6
  214. package/dist/esm/vega-input-numeric.entry.js +12 -14
  215. package/dist/esm/vega-input-passcode.entry.js +5 -5
  216. package/dist/esm/vega-input-phone-number.entry.js +4 -4
  217. package/dist/esm/vega-input-range.entry.js +3 -3
  218. package/dist/esm/vega-input-select.entry.js +5 -5
  219. package/dist/esm/vega-input.entry.js +31 -27
  220. package/dist/esm/vega-left-nav_5.entry.js +7 -7
  221. package/dist/esm/vega-line-chart.entry.js +2 -2
  222. package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
  223. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +2 -2
  224. package/dist/esm/vega-pagination.entry.js +4 -4
  225. package/dist/esm/vega-pie-chart.entry.js +1 -1
  226. package/dist/esm/vega-popover_2.entry.js +8 -8
  227. package/dist/esm/vega-progress-tracker_2.entry.js +3 -3
  228. package/dist/esm/vega-radio_2.entry.js +5 -5
  229. package/dist/esm/vega-rich-text-bookmark-editor.entry.js +2 -2
  230. package/dist/esm/vega-rich-text-content.entry.js +6 -6
  231. package/dist/esm/vega-rich-text-editor_4.entry.js +474 -207
  232. package/dist/esm/vega-rich-text-find-replace-panel.entry.js +1 -1
  233. package/dist/esm/vega-rich-text-special-characters-panel.entry.js +5 -5
  234. package/dist/esm/vega-rich-text-table-properties_3.entry.js +8 -8
  235. package/dist/esm/vega-selection-chip_2.entry.js +4 -4
  236. package/dist/esm/vega-selection-tile_2.entry.js +2 -2
  237. package/dist/esm/vega-sidenav_3.entry.js +3 -3
  238. package/dist/esm/vega-signature-capture.entry.js +7 -7
  239. package/dist/esm/vega-stepper.entry.js +2 -2
  240. package/dist/esm/vega-tab-group_2.entry.js +6 -6
  241. package/dist/esm/vega-table_11.entry.js +4 -4
  242. package/dist/esm/vega-textarea.entry.js +2 -2
  243. package/dist/esm/vega-time-picker_2.entry.js +9 -9
  244. package/dist/esm/vega-toggle-switch.entry.js +2 -2
  245. package/dist/esm/vega-tooltip_2.entry.js +6 -6
  246. package/dist/esm/vega.js +12 -12
  247. package/dist/esm/{y-axis-input-processor-c6b2a914.js → y-axis-input-processor-dd574c2e.js} +1 -1
  248. package/dist/sri/vega-sri-manifest.json +338 -338
  249. package/dist/types/components/vega-dialog/vega-dialog.d.ts +2 -0
  250. package/dist/types/components/vega-image-uploader/slimmers/controllers/vega-image-uploader-remove-controller.d.ts +1 -0
  251. package/dist/types/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-actions-renderer.d.ts +1 -0
  252. package/dist/types/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-uploading-content-renderer.d.ts +1 -0
  253. package/dist/types/components/vega-input/slimmers/controllers/vega-input-state-controller.d.ts +0 -2
  254. package/dist/types/components/vega-input/slimmers/renderers/vega-input-input-container-renderer.d.ts +4 -0
  255. package/dist/types/components/vega-input/slimmers/renderers/vega-input-input-renderer.d.ts +2 -0
  256. package/dist/types/components/vega-input/vega-input.d.ts +15 -3
  257. package/dist/types/components/vega-input-numeric/slimmers/renderers/vega-input-numeric-renderer.d.ts +2 -0
  258. package/dist/types/components/vega-input-numeric/vega-input-numeric.d.ts +0 -2
  259. package/dist/types/components/vega-rich-text-editor/constants/constant.d.ts +4 -0
  260. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/sequential-composition-strategy.d.ts +14 -0
  261. package/dist/types/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.d.ts +4 -1
  262. package/dist/types/components/vega-rich-text-editor/dto/actions/sequential-composition-action.d.ts +30 -0
  263. package/dist/types/components/vega-rich-text-editor/dto/flush-changes-payload.d.ts +16 -0
  264. package/dist/types/components/vega-rich-text-editor/extensions/functions/dto/function-block.d.ts +7 -0
  265. package/dist/types/components/vega-rich-text-editor/extensions/paste/controllers/chooser-positioner.d.ts +33 -0
  266. package/dist/types/components/vega-rich-text-editor/extensions/paste/controllers/paste-chooser-controller.d.ts +43 -0
  267. package/dist/types/components/vega-rich-text-editor/extensions/paste/controllers/paste-event-interceptor.d.ts +22 -0
  268. package/dist/types/components/vega-rich-text-editor/extensions/paste/controllers/selection-snapshot-service.d.ts +29 -0
  269. package/dist/types/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/image-extractor.d.ts +13 -0
  270. package/dist/types/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/paste-image-parser.d.ts +1 -1
  271. package/dist/types/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/pending-image-registry.d.ts +1 -1
  272. package/dist/types/components/vega-rich-text-editor/extensions/paste/paste-chooser-ui.d.ts +1 -0
  273. package/dist/types/components/vega-rich-text-editor/extensions/paste/paste-extension.d.ts +28 -93
  274. package/dist/types/components/vega-rich-text-editor/extensions/paste/pipeline/data-transfer-builder.d.ts +10 -0
  275. package/dist/types/components/vega-rich-text-editor/extensions/paste/pipeline/paste-dispatcher.d.ts +8 -0
  276. package/dist/types/components/vega-rich-text-editor/extensions/paste/pipeline/paste-processing-pipeline.d.ts +18 -0
  277. package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/paste-processing-strategy.abstract.d.ts +28 -6
  278. package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/paste-strategy-selector.d.ts +13 -0
  279. package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/plain-paste-strategy.d.ts +29 -0
  280. package/dist/types/components/vega-rich-text-editor/extensions/paste/type.d.ts +35 -0
  281. package/dist/types/components/vega-rich-text-editor/helpers/utils.d.ts +47 -0
  282. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/abstract-delete-content-handler.d.ts +17 -6
  283. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/backward-delete-content-handler.d.ts +5 -1
  284. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/base-handler.d.ts +30 -1
  285. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/forward-delete-content-handler.d.ts +5 -1
  286. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-line-break-handler.d.ts +21 -4
  287. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paragraph-handler.d.ts +12 -4
  288. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.d.ts +38 -5
  289. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-text-handler.d.ts +7 -2
  290. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.d.ts +2 -0
  291. package/dist/types/components/vega-rich-text-editor/utils/html-to-plain-text-utils.d.ts +31 -0
  292. package/dist/types/components.d.ts +24 -0
  293. package/dist/types/helpers/translation/interface.d.ts +5 -0
  294. package/dist/types/types/public-api.d.ts +2 -1
  295. package/dist/vega/index.esm.js +1 -1
  296. package/dist/vega/{p-3ce7521e.entry.js → p-017f0314.entry.js} +1 -1
  297. package/dist/vega/{p-1b97e751.entry.js → p-06a0c795.entry.js} +1 -1
  298. package/dist/vega/p-09ed519b.entry.js +1 -0
  299. package/dist/vega/p-0a8e82f1.js +1 -0
  300. package/dist/vega/{p-7d748545.entry.js → p-0c8f8d88.entry.js} +1 -1
  301. package/dist/vega/{p-b48caf90.entry.js → p-0cd81963.entry.js} +1 -1
  302. package/dist/vega/{p-8a4cc7c2.entry.js → p-0cda0b10.entry.js} +1 -1
  303. package/dist/vega/{p-b68f55e2.js → p-146abbc7.js} +1 -1
  304. package/dist/vega/{p-7044bb48.js → p-1c7dc9c6.js} +1 -1
  305. package/dist/vega/{p-d8a0e3e0.entry.js → p-1ccf0a96.entry.js} +1 -1
  306. package/dist/vega/{p-85a940c0.entry.js → p-1f0b99ac.entry.js} +1 -1
  307. package/dist/vega/p-24b6f3ee.js +1 -0
  308. package/dist/vega/{p-85695819.js → p-25d8b416.js} +1 -1
  309. package/dist/vega/{p-197388a5.entry.js → p-26fdf04e.entry.js} +1 -1
  310. package/dist/vega/{p-dffe47db.js → p-2a501c55.js} +1 -1
  311. package/dist/vega/p-2e847194.js +1 -0
  312. package/dist/vega/p-3040c091.js +1 -0
  313. package/dist/vega/{p-7dfb1481.entry.js → p-3437ff39.entry.js} +1 -1
  314. package/dist/vega/p-347d664e.js +1 -0
  315. package/dist/vega/{p-4c6989ae.entry.js → p-35de277a.entry.js} +1 -1
  316. package/dist/vega/{p-527c3211.entry.js → p-377a5330.entry.js} +1 -1
  317. package/dist/vega/{p-25e51acb.js → p-37eb020f.js} +1 -1
  318. package/dist/vega/{p-2256eb09.entry.js → p-3a153581.entry.js} +1 -1
  319. package/dist/vega/p-46d34326.js +1 -0
  320. package/dist/vega/{p-effbfc50.entry.js → p-48470109.entry.js} +1 -1
  321. package/dist/vega/p-4a2e040f.entry.js +1 -0
  322. package/dist/vega/p-4ad6da8f.js +1 -0
  323. package/dist/vega/{p-277aab9b.js → p-4cd198b9.js} +1 -1
  324. package/dist/vega/{p-bf0b46c1.js → p-4f24f262.js} +1 -1
  325. package/dist/vega/{p-48100d38.entry.js → p-5025f7b6.entry.js} +1 -1
  326. package/dist/vega/p-53838cd1.entry.js +1 -0
  327. package/dist/vega/{p-557b64bd.js → p-53c1b195.js} +1 -1
  328. package/dist/vega/{p-cb68a43a.entry.js → p-54c21aa8.entry.js} +1 -1
  329. package/dist/vega/{p-408c3ad4.entry.js → p-568d4da6.entry.js} +1 -1
  330. package/dist/vega/{p-109f0e33.entry.js → p-5bdc1ff3.entry.js} +1 -1
  331. package/dist/vega/{p-a0c87e88.entry.js → p-5ccdfd46.entry.js} +1 -1
  332. package/dist/vega/{p-03efc67a.entry.js → p-5cd6b840.entry.js} +1 -1
  333. package/dist/vega/p-5cfe82e7.js +1 -0
  334. package/dist/vega/{p-e577dda8.entry.js → p-5f04fb23.entry.js} +1 -1
  335. package/dist/vega/p-5f377954.js +1 -1
  336. package/dist/vega/p-68e70f75.js +3 -0
  337. package/dist/vega/{p-bec31ffc.entry.js → p-6902bcaf.entry.js} +1 -1
  338. package/dist/vega/{p-dd673eb4.entry.js → p-6a13ba24.entry.js} +1 -1
  339. package/dist/vega/{p-83f5ef3a.entry.js → p-6c0d4f69.entry.js} +1 -1
  340. package/dist/vega/{p-3bfb53e3.js → p-6c46ea86.js} +1 -1
  341. package/dist/vega/{p-6096ffc3.js → p-6d0947e2.js} +1 -1
  342. package/dist/vega/{p-c6419eb3.entry.js → p-6ec65f72.entry.js} +1 -1
  343. package/dist/vega/{p-049e64b1.entry.js → p-701ac71a.entry.js} +1 -1
  344. package/dist/vega/{p-efef0dfe.entry.js → p-70659d97.entry.js} +1 -1
  345. package/dist/vega/p-7157dd20.entry.js +1 -0
  346. package/dist/vega/{p-3d060d2f.entry.js → p-74b54dcc.entry.js} +1 -1
  347. package/dist/vega/{p-f9f96030.entry.js → p-776123f8.entry.js} +1 -1
  348. package/dist/vega/{p-cf5c5515.js → p-78a2802f.js} +1 -1
  349. package/dist/vega/{p-46be74fc.entry.js → p-7e262cb3.entry.js} +1 -1
  350. package/dist/vega/{p-f0b49ae4.entry.js → p-88ada88b.entry.js} +1 -1
  351. package/dist/vega/{p-0338f621.entry.js → p-892f3e98.entry.js} +1 -1
  352. package/dist/vega/{p-92efdbf0.entry.js → p-8a9e80ac.entry.js} +1 -1
  353. package/dist/vega/{p-4d20a56f.js → p-8e3c1c81.js} +1 -1
  354. package/dist/vega/{p-ca60a74b.entry.js → p-8e59892d.entry.js} +1 -1
  355. package/dist/vega/{p-d8fa2f19.entry.js → p-9960ffde.entry.js} +1 -1
  356. package/dist/vega/{p-381d8781.js → p-9b571551.js} +1 -1
  357. package/dist/vega/{p-c66c6fd2.entry.js → p-a50b8c9f.entry.js} +1 -1
  358. package/dist/vega/{p-553510d8.entry.js → p-a54a2def.entry.js} +1 -1
  359. package/dist/vega/{p-23781e76.js → p-a6346186.js} +1 -1
  360. package/dist/vega/{p-7f711049.js → p-a7ed55d8.js} +1 -1
  361. package/dist/vega/{p-f0c6e9c5.entry.js → p-ab6c13d9.entry.js} +1 -1
  362. package/dist/vega/p-afa8a9af.entry.js +1 -0
  363. package/dist/vega/{p-30cc31dd.entry.js → p-b4e4b938.entry.js} +1 -1
  364. package/dist/vega/{p-f5f26b44.entry.js → p-b63af0ae.entry.js} +1 -1
  365. package/dist/vega/{p-dd273d89.entry.js → p-ba971f6a.entry.js} +1 -1
  366. package/dist/vega/{p-d7e59f31.js → p-c0eddde0.js} +1 -1
  367. package/dist/vega/{p-76135e80.entry.js → p-c11b20c0.entry.js} +1 -1
  368. package/dist/vega/{p-75c7f8ea.entry.js → p-c3532738.entry.js} +1 -1
  369. package/dist/vega/{p-d86e0b01.js → p-c576f76b.js} +1 -1
  370. package/dist/vega/{p-18ddc6a4.entry.js → p-c6cfaa2f.entry.js} +1 -1
  371. package/dist/vega/{p-be0eb72f.js → p-c73cce9b.js} +1 -1
  372. package/dist/vega/{p-816064f2.entry.js → p-c8c2e940.entry.js} +1 -1
  373. package/dist/vega/{p-6beaf1c8.entry.js → p-c968f8cf.entry.js} +1 -1
  374. package/dist/vega/p-cef58d27.js +1 -0
  375. package/dist/vega/p-d5ab92a5.entry.js +1 -0
  376. package/dist/vega/{p-741e064e.entry.js → p-d9c2aa77.entry.js} +1 -1
  377. package/dist/vega/{p-a5fa260b.js → p-da94bcda.js} +1 -1
  378. package/dist/vega/{p-634b138c.entry.js → p-dcdd7098.entry.js} +1 -1
  379. package/dist/vega/{p-2f5c4b61.entry.js → p-dcf4f31f.entry.js} +1 -1
  380. package/dist/vega/{p-4503f5b9.entry.js → p-e11987d3.entry.js} +1 -1
  381. package/dist/vega/p-e1aa78db.js +1 -0
  382. package/dist/vega/p-e2168481.js +1 -0
  383. package/dist/vega/{p-1d8a8507.entry.js → p-e67ef7a1.entry.js} +1 -1
  384. package/dist/vega/{p-061a76c3.entry.js → p-ea97ec60.entry.js} +1 -1
  385. package/dist/vega/{p-325b804d.entry.js → p-ebc1e0da.entry.js} +1 -1
  386. package/dist/vega/{p-c6b6987e.js → p-f2193656.js} +1 -1
  387. package/dist/vega/{p-a261a675.entry.js → p-f5f78884.entry.js} +1 -1
  388. package/dist/vega/p-f839e009.entry.js +1 -0
  389. package/dist/vega/{p-ff9090af.entry.js → p-fa970e96.entry.js} +1 -1
  390. package/dist/vega/{p-b1e1c7d0.js → p-fc07ed1e.js} +1 -1
  391. package/dist/vega/{p-5c6d36ef.entry.js → p-fdb6f4f0.entry.js} +1 -1
  392. package/dist/vega/{p-5a347a15.js → p-fffc1f47.js} +1 -1
  393. package/dist/vega/vega.esm.js +1 -1
  394. package/package.json +1 -1
  395. package/dist/vega/p-040bd9ca.js +0 -1
  396. package/dist/vega/p-087240db.js +0 -1
  397. package/dist/vega/p-0e0e66c9.entry.js +0 -1
  398. package/dist/vega/p-15052b2e.entry.js +0 -1
  399. package/dist/vega/p-27c9c2a5.entry.js +0 -1
  400. package/dist/vega/p-28c16885.js +0 -1
  401. package/dist/vega/p-3ec4d710.js +0 -1
  402. package/dist/vega/p-43ea1e86.js +0 -1
  403. package/dist/vega/p-7228088b.entry.js +0 -1
  404. package/dist/vega/p-7b9ed949.js +0 -1
  405. package/dist/vega/p-7fd15dd1.js +0 -1
  406. package/dist/vega/p-8e1f30ec.entry.js +0 -1
  407. package/dist/vega/p-9680dfe6.js +0 -1
  408. package/dist/vega/p-9a0e17b2.entry.js +0 -1
  409. package/dist/vega/p-ae12cc3f.js +0 -3
  410. package/dist/vega/p-c0823f32.js +0 -1
  411. package/dist/vega/p-c0eb8c58.js +0 -1
  412. package/dist/vega/p-c5af2ecc.entry.js +0 -1
  413. package/dist/vega/p-fa43272c.js +0 -1
@@ -1 +1 @@
1
- import{r as e,c as i,h as t,H as a,g as n}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{C as o}from"./p-590fd123.js";import{C as s}from"./p-2d0d575f.js";import{C as h,g as c,F as l,h as d}from"./p-cb378636.js";import{O as p}from"./p-331a62d5.js";import{f as g,a as x}from"./p-aa135628.js";import{c as b,M as v,V as f,I as m}from"./p-6e1ab235.js";import{V as u,I as k}from"./p-5c8e4e8f.js";import{F as w}from"./p-5a347a15.js";import{c as y}from"./p-3b6a6f08.js";import{c as j,s as z}from"./p-a83cef5a.js";import{i as C}from"./p-53e3f259.js";import{d as I}from"./p-36a57431.js";import{C as R}from"./p-abad8ffd.js";import{A as V}from"./p-68744e7e.js";import{R as O}from"./p-8bc15ed0.js";import{C as E}from"./p-75b58efe.js";import{C as D}from"./p-6eedbc4f.js";import{i as F}from"./p-d27ae9ff.js";import"./p-abd7aeaa.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-c0eb8c58.js";import"./p-cc569b54.js";import"./p-b75ee3ba.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-71909102.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-7d3419c7.js";import"./p-29584bb5.js";import"./p-5f377954.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-262ec334.js";var A=function(e,i,t,a){var n,r=arguments.length,o=r<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(r<3?n(o):r>3?n(i,t,o):n(i,t))||o);return r>3&&o&&Object.defineProperty(i,t,o),o};class G extends f{connectedCallback(){this.checkboxGroup=g(this.host,"vega-checkbox-group")||g(this.host,"vega-selection-tile-group"),this.fieldErrorObserver=new p(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),s.register(I.getSubject(this.checkboxGroup||this.host,C),this.fieldErrorObserver)}disconnectedCallback(){s.unregister(I.getSubject(this.checkboxGroup||this.host,C),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}A([b({writable:!0})],G.prototype,"showError",void 0),A([b()],G.prototype,"host",void 0),A([v("connectedCallback")],G.prototype,"connectedCallback",null),A([v("disconnectedCallback")],G.prototype,"disconnectedCallback",null);var P=function(e,i,t,a){var n,r=arguments.length,o=r<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(r<3?n(o):r>3?n(i,t,o):n(i,t))||o);return r>3&&o&&Object.defineProperty(i,t,o),o};const U=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.vegaUserChange=i(this,"vegaUserChange",7),this.userChange=i(this,"userChange",7),this.change=i(this,"change",7),this.globalSlimmers=new Map,this.vegaCheckboxShowErrorController=new G,this.ariaAttributesValueMapper=new V((()=>this.host.shadowRoot.querySelector("input")),{"aria-label":{dependency:["data-aria-label","identifier"],defaultValue:"No label defined"}}),this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new o:null}],defaultValue:e=>""!==e.identifier&&"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>[this.inputRef]}),this.changeEventEmitter=y(U,j),this.userChangeEventEmitter=y(U,z),this.dropdownEventPrevent=new R([j,z],(()=>this.host),{customPreventHandle:e=>{e.stopPropagation()}}),this.vegaComponentUsageRuntimeMetricsSlimmer=new u,this.labelClickPending=!1,this.isUserInteraction=!1,this.groupDisabled=!1,this.showError=!1,this.identifier="",this.value=""!==this.identifier&&"",this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.size="default",this.required=!1,this.name="",this.isValid=null,this.onCheckBoxChange=e=>{this.indeterminate&&(this.indeterminate=!1),this.isUserInteraction=!0,this.checked=e.currentTarget.checked,this.isUserInteraction=!1},this.onInputKeyDown=e=>{"Enter"===e.key&&(e.preventDefault(),this.isDisabled()||(this.indeterminate&&(this.indeterminate=!1),this.isUserInteraction=!0,this.checked=!this.checked,this.isUserInteraction=!1))},this.onLabelClick=e=>{e.target!==this.inputRef?(this.labelClickPending=!0,setTimeout((()=>{this.labelClickPending=!1}),0)):this.labelClickPending&&(e.stopPropagation(),this.labelClickPending=!1)},this.onSelectedIconClick=e=>{e.stopPropagation()}}watchValueChange(e){this.checked=""!==this.identifier?e===this.identifier:!0===e}watchCheckedChange(){const e=this.isUserInteraction;this.isUserInteraction=!1,this.initValue(),this.changeEventEmitter.emit(this.value),e&&(this.userChangeEventEmitter.emit(this.value),s.notify(h,{host:this.host,detail:this.value})),s.notify(c,{host:this.host,detail:this.value}),s.notify(l,{host:this.host,detail:this.value})}disconnectedCallback(){this.unRegisterGroupDisabledObserver()}componentWillLoad(){!this.checked&&(""!==this.identifier?this.value===this.identifier:!0===this.value||"true"===this.value)&&(this.checked=!0),this.initValue(),this.initAndRegisterGroupDisabledObserver()}componentShouldUpdate(e,i,t){return"checked"!==t||e!==i}componentDidRender(){""===this.host.innerHTML.trim()&&this.labelElement.classList.add("vega-hidden"),this.syncNativeIndeterminate()}async setValue(e){this.checked=this.identifier?e===this.identifier:!0===e}render(){var e;const i="VEGA-CHECKBOX-GROUP"==(null===(e=this.host.parentElement)||void 0===e?void 0:e.nodeName);return r(t(a,{class:{"vega-flex-shrink-0 v-min-w-min":i,checked:this.checked,indeterminate:this.indeterminate,disabled:this.isDisabled()}},t("label",{class:x(["vega-checkbox-container",this.showError&&"error",this.size&&`size-${this.size}`]),ref:e=>this.inputContainerRef=e,onClick:this.onLabelClick},t("input",{ref:e=>this.inputRef=e,type:"checkbox",checked:this.checked,value:this.identifier,name:this.name,onChange:this.onCheckBoxChange,"aria-label":this.identifier||"No label defined","aria-checked":this.indeterminate?"mixed":void 0,disabled:this.isDisabled(),tabIndex:0,onKeyDown:this.onInputKeyDown}),t("span",{class:"vega-checkbox-icon",onClick:this.onSelectedIconClick,tabIndex:-1,"aria-hidden":"true"},this.renderIconDom()),t("div",{class:"vega-checkbox-label-container",ref:e=>this.labelElement=e},this.renderLabelDom(),this.renderRequireDom()))),this.host)}renderIconDom(){return this.indeterminate?t("vega-icon",{icon:"minus-sign",size:"small"===this.size?"size-12":"size-16"}):this.checked?t("vega-icon",{icon:"checkmark",size:"small"===this.size?"size-12":"size-16"}):null}renderLabelDom(){return t("span",{class:"vega-checkbox-label"},t("slot",null))}renderRequireDom(){return t("span",{class:{"vega-require":this.required}},this.required?"*":"")}initValue(){this.value=""!==this.identifier?this.checked?this.identifier:"":this.checked}syncNativeIndeterminate(){this.inputRef&&(this.inputRef.indeterminate=this.indeterminate)}isDisabled(){return this.disabled||this.groupDisabled}canAcceptGroupDisabledObserver(e){return g(this.host,"vega-checkbox-group")===e.host}groupDisabledObserverListener(e){this.groupDisabled=e.host.disabled}initAndRegisterGroupDisabledObserver(){g(this.host,"vega-checkbox-group")&&(this.groupDisabledObserver=new p(this.canAcceptGroupDisabledObserver.bind(this),this.groupDisabledObserverListener.bind(this)),s.register(d,this.groupDisabledObserver))}unRegisterGroupDisabledObserver(){this.groupDisabledObserver&&s.unregister(d,this.groupDisabledObserver)}get host(){return n(this)}static get watchers(){return{value:["watchValueChange"],checked:["watchCheckedChange"]}}};P([k()],U.prototype,"globalSlimmers",void 0),P([m()],U.prototype,"vegaCheckboxShowErrorController",void 0),P([m()],U.prototype,"ariaAttributesValueMapper",void 0),P([m()],U.prototype,"formFieldController",void 0),P([m()],U.prototype,"changeEventEmitter",void 0),P([m()],U.prototype,"userChangeEventEmitter",void 0),P([m()],U.prototype,"dropdownEventPrevent",void 0),P([m()],U.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),U.style=':host{display:inline-block;vertical-align:middle}.vega-checkbox-container{position:relative;display:flex;-webkit-tap-highlight-color:transparent}.vega-checkbox-container>input[type=checkbox]{position:absolute;left:0px;top:0px;opacity:0;width:24px;height:24px;padding:0px;margin:0px}.vega-checkbox-container>.vega-checkbox-icon{display:inline-block;box-sizing:border-box;width:24px;height:24px;border-style:solid;border-width:2px;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1));position:relative;left:0px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:4px;min-width:24px;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon,:host(.indeterminate) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));display:inline-flex;align-items:center;justify-content:center}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:hover,:host(.indeterminate) .vega-checkbox-container>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.vega-checkbox-container>input[type=checkbox]:focus-visible+.vega-checkbox-icon{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px}.vega-checkbox-container>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:active,:host(.indeterminate) .vega-checkbox-container>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}:host(.disabled) .vega-checkbox-container{cursor:not-allowed}:host(:not(.disabled)) .vega-checkbox-container{cursor:pointer}.vega-checkbox-container .vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px;vertical-align:middle}.vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon,:host(.indeterminate) .vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-danger, 189, 41, 71, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:hover,:host(.indeterminate) .vega-checkbox-container.error>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-danger-hover, 233, 71, 104, 1))}.vega-checkbox-container.error>input[type=checkbox]:focus-visible+.vega-checkbox-icon{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:active,:host(.indeterminate) .vega-checkbox-container.error>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-danger-active, 230, 50, 87, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-danger-active, 189, 41, 71, 1))}:host(.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon,:host(.indeterminate.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon>vega-icon,:host(.indeterminate.disabled) .vega-checkbox-container>.vega-checkbox-icon>vega-icon{color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-label-container{display:inline-block;margin-left:12px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-checkbox-container>.vega-checkbox-label-container{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){.vega-checkbox-container>.vega-checkbox-label-container{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){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host(.disabled) .vega-checkbox-container>.vega-checkbox-label-container{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.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){.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){.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){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-checkbox-label-container.vega-hidden{display:none}.vega-hidden{display:none}.size-default input[type=checkbox]{width:24px;height:24px}.size-default .vega-checkbox-icon{width:24px;height:24px;min-width:24px;border-radius:4px}.size-default .vega-checkbox-label-container{margin-left:12px;font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.size-default .vega-checkbox-label-container{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){.size-default .vega-checkbox-label-container{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){.size-default .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.size-small input[type=checkbox]{width:16px;height:16px}.size-small .vega-checkbox-icon{width:16px;height:16px;min-width:16px;border-radius:2px}.size-small .vega-checkbox-label-container{margin-left:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.size-small .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.size-small .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.size-small .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}';var S=function(e,i,t,a){var n,r=arguments.length,o=r<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(r<3?n(o):r>3?n(i,t,o):n(i,t))||o);return r>3&&o&&Object.defineProperty(i,t,o),o};const q=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.vegaUserChange=i(this,"vegaUserChange",7),this.userChange=i(this,"userChange",7),this.change=i(this,"change",7),this.globalSlimmers=new Map,this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new O:null}],defaultValue:[],validationRulesName:"validationRules",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>this.touchableAreaGetter()}),this.checkboxValueChangeObserver=new D(c,(e=>this.childCheckboxValueChange(e))),this.checkboxUserInteractionObserver=new D(h,(()=>{this.userInteractionPending=!0})),this.checkboxEventPrevent=new R([j,z],(()=>this.vegaFlexElement)),this.changeEventEmitter=y(q,j),this.userChangeEventEmitter=y(q,z),this.vegaComponentUsageRuntimeMetricsSlimmer=new u,this.userInteractionPending=!1,this.label="",this.value=[],this.vegaFlexProp={},this.disabled=!1,this.required=!1,this.optional=!1,this.name="",this.hint="",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.childCheckboxValueChange=e=>{this.syncCheckboxItemsValue(e.detail,e.host.identifier)},this.touchableAreaGetter=()=>{const e=[];return this.vegaCheckboxArray&&this.vegaCheckboxArray.forEach((async i=>{e.push(i.shadowRoot.querySelector("input"))})),e}}async watchValue(e,i){const t=this.userInteractionPending;this.userInteractionPending=!1,F(e,i,!0)||(this.initCheckboxArray(),this.changeEventEmitter.emit(this.value),t&&this.userChangeEventEmitter.emit(this.value),s.notify(l,{host:this.host,detail:this.value}))}watchVegaFlexProp(){this.setVegaFlexProperty()}async watchDisabled(){this.notifyGroupDisabledChange()}watchValidationRules(){}componentDidLoad(){this.setVegaFlexProperty(),this.initCheckboxArray(),this.notifyGroupDisabledChange()}componentShouldUpdate(e,i,t){return!("value"===t&&Array.isArray(e)&&Array.isArray(i)&&F(e,i,!0))}render(){return r(t(a,null,this.renderLabelDom(),t("div",{class:"vega-checkbox-group-container",ref:e=>this.inputContainerRef=e},t("vega-flex",{ref:e=>{this.vegaFlexElement=e}},t("slot",null))),this.renderHintDom()),this.host)}renderLabelDom(){return this.label&&t("vega-field-label",{label:this.label,isFieldRequired:this.required,optional:this.optional,disabled:this.disabled})}renderHintDom(){return this.hint&&t("div",{class:"vega-hint"},t("label",null,this.hint))}setVegaFlexProperty(){this.vegaFlexProp&&Object.assign(this.vegaFlexElement,{gap:"size-16",direction:"col"},this.vegaFlexProp)}syncCheckboxItemsValue(e,i){e&&!this.value.includes(i)?this.value=[...this.value,i]:!e&&this.value.includes(i)&&(this.value=[...this.value.filter((e=>e!==i))])}initCheckboxArray(){this.vegaCheckboxArray=Array.from(this.host.querySelectorAll("vega-checkbox")),this.vegaCheckboxArray.forEach((e=>{e.checked=!!(this.value&&this.value.length>0)&&this.value.includes(e.identifier)}))}notifyGroupDisabledChange(){s.notify(d,{host:this.host})}get host(){return n(this)}static get watchers(){return{value:["watchValue"],vegaFlexProp:["watchVegaFlexProp"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};S([k()],q.prototype,"globalSlimmers",void 0),S([m()],q.prototype,"formFieldController",void 0),S([m()],q.prototype,"checkboxValueChangeObserver",void 0),S([m()],q.prototype,"checkboxUserInteractionObserver",void 0),S([m()],q.prototype,"checkboxEventPrevent",void 0),S([m()],q.prototype,"changeEventEmitter",void 0),S([m()],q.prototype,"userChangeEventEmitter",void 0),S([m()],q.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),S([E()],q.prototype,"watchVegaFlexProp",null),q.style=':host{display:block;text-align:left;line-height:normal}.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){.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){.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){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}vega-field-label{margin-bottom:16px;display:block}vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:18px;font-weight:500;line-height:30px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}vega-field-label::part(label){word-break:normal}.vega-hint{padding-top:12px}.vega-hint>label{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){.vega-hint>label{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){.vega-hint>label{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){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}';export{U as vega_checkbox,q as vega_checkbox_group}
1
+ import{r as e,c as i,h as t,H as a,g as n}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{C as o}from"./p-590fd123.js";import{C as s}from"./p-2d0d575f.js";import{C as h,g as c,F as l,h as d}from"./p-cb378636.js";import{O as p}from"./p-331a62d5.js";import{f as g,a as x}from"./p-aa135628.js";import{c as b,M as v,V as f,I as m}from"./p-6e1ab235.js";import{V as u,I as k}from"./p-5c8e4e8f.js";import{F as w}from"./p-fffc1f47.js";import{c as y}from"./p-3b6a6f08.js";import{c as j,s as z}from"./p-a83cef5a.js";import{i as C}from"./p-53e3f259.js";import{d as I}from"./p-36a57431.js";import{C as R}from"./p-abad8ffd.js";import{A as V}from"./p-68744e7e.js";import{R as O}from"./p-8bc15ed0.js";import{C as E}from"./p-75b58efe.js";import{C as D}from"./p-6eedbc4f.js";import{i as F}from"./p-d27ae9ff.js";import"./p-abd7aeaa.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-347d664e.js";import"./p-cc569b54.js";import"./p-b75ee3ba.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-71909102.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-7d3419c7.js";import"./p-29584bb5.js";import"./p-5f377954.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-262ec334.js";var A=function(e,i,t,a){var n,r=arguments.length,o=r<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(r<3?n(o):r>3?n(i,t,o):n(i,t))||o);return r>3&&o&&Object.defineProperty(i,t,o),o};class G extends f{connectedCallback(){this.checkboxGroup=g(this.host,"vega-checkbox-group")||g(this.host,"vega-selection-tile-group"),this.fieldErrorObserver=new p(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),s.register(I.getSubject(this.checkboxGroup||this.host,C),this.fieldErrorObserver)}disconnectedCallback(){s.unregister(I.getSubject(this.checkboxGroup||this.host,C),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}A([b({writable:!0})],G.prototype,"showError",void 0),A([b()],G.prototype,"host",void 0),A([v("connectedCallback")],G.prototype,"connectedCallback",null),A([v("disconnectedCallback")],G.prototype,"disconnectedCallback",null);var P=function(e,i,t,a){var n,r=arguments.length,o=r<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(r<3?n(o):r>3?n(i,t,o):n(i,t))||o);return r>3&&o&&Object.defineProperty(i,t,o),o};const U=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.vegaUserChange=i(this,"vegaUserChange",7),this.userChange=i(this,"userChange",7),this.change=i(this,"change",7),this.globalSlimmers=new Map,this.vegaCheckboxShowErrorController=new G,this.ariaAttributesValueMapper=new V((()=>this.host.shadowRoot.querySelector("input")),{"aria-label":{dependency:["data-aria-label","identifier"],defaultValue:"No label defined"}}),this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new o:null}],defaultValue:e=>""!==e.identifier&&"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>[this.inputRef]}),this.changeEventEmitter=y(U,j),this.userChangeEventEmitter=y(U,z),this.dropdownEventPrevent=new R([j,z],(()=>this.host),{customPreventHandle:e=>{e.stopPropagation()}}),this.vegaComponentUsageRuntimeMetricsSlimmer=new u,this.labelClickPending=!1,this.isUserInteraction=!1,this.groupDisabled=!1,this.showError=!1,this.identifier="",this.value=""!==this.identifier&&"",this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.size="default",this.required=!1,this.name="",this.isValid=null,this.onCheckBoxChange=e=>{this.indeterminate&&(this.indeterminate=!1),this.isUserInteraction=!0,this.checked=e.currentTarget.checked,this.isUserInteraction=!1},this.onInputKeyDown=e=>{"Enter"===e.key&&(e.preventDefault(),this.isDisabled()||(this.indeterminate&&(this.indeterminate=!1),this.isUserInteraction=!0,this.checked=!this.checked,this.isUserInteraction=!1))},this.onLabelClick=e=>{e.target!==this.inputRef?(this.labelClickPending=!0,setTimeout((()=>{this.labelClickPending=!1}),0)):this.labelClickPending&&(e.stopPropagation(),this.labelClickPending=!1)},this.onSelectedIconClick=e=>{e.stopPropagation()}}watchValueChange(e){this.checked=""!==this.identifier?e===this.identifier:!0===e}watchCheckedChange(){const e=this.isUserInteraction;this.isUserInteraction=!1,this.initValue(),this.changeEventEmitter.emit(this.value),e&&(this.userChangeEventEmitter.emit(this.value),s.notify(h,{host:this.host,detail:this.value})),s.notify(c,{host:this.host,detail:this.value}),s.notify(l,{host:this.host,detail:this.value})}disconnectedCallback(){this.unRegisterGroupDisabledObserver()}componentWillLoad(){!this.checked&&(""!==this.identifier?this.value===this.identifier:!0===this.value||"true"===this.value)&&(this.checked=!0),this.initValue(),this.initAndRegisterGroupDisabledObserver()}componentShouldUpdate(e,i,t){return"checked"!==t||e!==i}componentDidRender(){""===this.host.innerHTML.trim()&&this.labelElement.classList.add("vega-hidden"),this.syncNativeIndeterminate()}async setValue(e){this.checked=this.identifier?e===this.identifier:!0===e}render(){var e;const i="VEGA-CHECKBOX-GROUP"==(null===(e=this.host.parentElement)||void 0===e?void 0:e.nodeName);return r(t(a,{class:{"vega-flex-shrink-0 v-min-w-min":i,checked:this.checked,indeterminate:this.indeterminate,disabled:this.isDisabled()}},t("label",{class:x(["vega-checkbox-container",this.showError&&"error",this.size&&`size-${this.size}`]),ref:e=>this.inputContainerRef=e,onClick:this.onLabelClick},t("input",{ref:e=>this.inputRef=e,type:"checkbox",checked:this.checked,value:this.identifier,name:this.name,onChange:this.onCheckBoxChange,"aria-label":this.identifier||"No label defined","aria-checked":this.indeterminate?"mixed":void 0,disabled:this.isDisabled(),tabIndex:0,onKeyDown:this.onInputKeyDown}),t("span",{class:"vega-checkbox-icon",onClick:this.onSelectedIconClick,tabIndex:-1,"aria-hidden":"true"},this.renderIconDom()),t("div",{class:"vega-checkbox-label-container",ref:e=>this.labelElement=e},this.renderLabelDom(),this.renderRequireDom()))),this.host)}renderIconDom(){return this.indeterminate?t("vega-icon",{icon:"minus-sign",size:"small"===this.size?"size-12":"size-16"}):this.checked?t("vega-icon",{icon:"checkmark",size:"small"===this.size?"size-12":"size-16"}):null}renderLabelDom(){return t("span",{class:"vega-checkbox-label"},t("slot",null))}renderRequireDom(){return t("span",{class:{"vega-require":this.required}},this.required?"*":"")}initValue(){this.value=""!==this.identifier?this.checked?this.identifier:"":this.checked}syncNativeIndeterminate(){this.inputRef&&(this.inputRef.indeterminate=this.indeterminate)}isDisabled(){return this.disabled||this.groupDisabled}canAcceptGroupDisabledObserver(e){return g(this.host,"vega-checkbox-group")===e.host}groupDisabledObserverListener(e){this.groupDisabled=e.host.disabled}initAndRegisterGroupDisabledObserver(){g(this.host,"vega-checkbox-group")&&(this.groupDisabledObserver=new p(this.canAcceptGroupDisabledObserver.bind(this),this.groupDisabledObserverListener.bind(this)),s.register(d,this.groupDisabledObserver))}unRegisterGroupDisabledObserver(){this.groupDisabledObserver&&s.unregister(d,this.groupDisabledObserver)}get host(){return n(this)}static get watchers(){return{value:["watchValueChange"],checked:["watchCheckedChange"]}}};P([k()],U.prototype,"globalSlimmers",void 0),P([m()],U.prototype,"vegaCheckboxShowErrorController",void 0),P([m()],U.prototype,"ariaAttributesValueMapper",void 0),P([m()],U.prototype,"formFieldController",void 0),P([m()],U.prototype,"changeEventEmitter",void 0),P([m()],U.prototype,"userChangeEventEmitter",void 0),P([m()],U.prototype,"dropdownEventPrevent",void 0),P([m()],U.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),U.style=':host{display:inline-block;vertical-align:middle}.vega-checkbox-container{position:relative;display:flex;-webkit-tap-highlight-color:transparent}.vega-checkbox-container>input[type=checkbox]{position:absolute;left:0px;top:0px;opacity:0;width:24px;height:24px;padding:0px;margin:0px}.vega-checkbox-container>.vega-checkbox-icon{display:inline-block;box-sizing:border-box;width:24px;height:24px;border-style:solid;border-width:2px;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1));position:relative;left:0px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:4px;min-width:24px;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon,:host(.indeterminate) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));display:inline-flex;align-items:center;justify-content:center}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:hover,:host(.indeterminate) .vega-checkbox-container>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.vega-checkbox-container>input[type=checkbox]:focus-visible+.vega-checkbox-icon{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px}.vega-checkbox-container>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:active,:host(.indeterminate) .vega-checkbox-container>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}:host(.disabled) .vega-checkbox-container{cursor:not-allowed}:host(:not(.disabled)) .vega-checkbox-container{cursor:pointer}.vega-checkbox-container .vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px;vertical-align:middle}.vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon,:host(.indeterminate) .vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-danger, 189, 41, 71, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:hover,:host(.indeterminate) .vega-checkbox-container.error>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-danger-hover, 233, 71, 104, 1))}.vega-checkbox-container.error>input[type=checkbox]:focus-visible+.vega-checkbox-icon{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:active,:host(.indeterminate) .vega-checkbox-container.error>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-danger-active, 230, 50, 87, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-danger-active, 189, 41, 71, 1))}:host(.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon,:host(.indeterminate.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon>vega-icon,:host(.indeterminate.disabled) .vega-checkbox-container>.vega-checkbox-icon>vega-icon{color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-label-container{display:inline-block;margin-left:12px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-checkbox-container>.vega-checkbox-label-container{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){.vega-checkbox-container>.vega-checkbox-label-container{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){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host(.disabled) .vega-checkbox-container>.vega-checkbox-label-container{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.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){.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){.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){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-checkbox-label-container.vega-hidden{display:none}.vega-hidden{display:none}.size-default input[type=checkbox]{width:24px;height:24px}.size-default .vega-checkbox-icon{width:24px;height:24px;min-width:24px;border-radius:4px}.size-default .vega-checkbox-label-container{margin-left:12px;font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.size-default .vega-checkbox-label-container{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){.size-default .vega-checkbox-label-container{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){.size-default .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.size-small input[type=checkbox]{width:16px;height:16px}.size-small .vega-checkbox-icon{width:16px;height:16px;min-width:16px;border-radius:2px}.size-small .vega-checkbox-label-container{margin-left:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.size-small .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.size-small .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.size-small .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}';var S=function(e,i,t,a){var n,r=arguments.length,o=r<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(r<3?n(o):r>3?n(i,t,o):n(i,t))||o);return r>3&&o&&Object.defineProperty(i,t,o),o};const q=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.vegaUserChange=i(this,"vegaUserChange",7),this.userChange=i(this,"userChange",7),this.change=i(this,"change",7),this.globalSlimmers=new Map,this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new O:null}],defaultValue:[],validationRulesName:"validationRules",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>this.touchableAreaGetter()}),this.checkboxValueChangeObserver=new D(c,(e=>this.childCheckboxValueChange(e))),this.checkboxUserInteractionObserver=new D(h,(()=>{this.userInteractionPending=!0})),this.checkboxEventPrevent=new R([j,z],(()=>this.vegaFlexElement)),this.changeEventEmitter=y(q,j),this.userChangeEventEmitter=y(q,z),this.vegaComponentUsageRuntimeMetricsSlimmer=new u,this.userInteractionPending=!1,this.label="",this.value=[],this.vegaFlexProp={},this.disabled=!1,this.required=!1,this.optional=!1,this.name="",this.hint="",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.childCheckboxValueChange=e=>{this.syncCheckboxItemsValue(e.detail,e.host.identifier)},this.touchableAreaGetter=()=>{const e=[];return this.vegaCheckboxArray&&this.vegaCheckboxArray.forEach((async i=>{e.push(i.shadowRoot.querySelector("input"))})),e}}async watchValue(e,i){const t=this.userInteractionPending;this.userInteractionPending=!1,F(e,i,!0)||(this.initCheckboxArray(),this.changeEventEmitter.emit(this.value),t&&this.userChangeEventEmitter.emit(this.value),s.notify(l,{host:this.host,detail:this.value}))}watchVegaFlexProp(){this.setVegaFlexProperty()}async watchDisabled(){this.notifyGroupDisabledChange()}watchValidationRules(){}componentDidLoad(){this.setVegaFlexProperty(),this.initCheckboxArray(),this.notifyGroupDisabledChange()}componentShouldUpdate(e,i,t){return!("value"===t&&Array.isArray(e)&&Array.isArray(i)&&F(e,i,!0))}render(){return r(t(a,null,this.renderLabelDom(),t("div",{class:"vega-checkbox-group-container",ref:e=>this.inputContainerRef=e},t("vega-flex",{ref:e=>{this.vegaFlexElement=e}},t("slot",null))),this.renderHintDom()),this.host)}renderLabelDom(){return this.label&&t("vega-field-label",{label:this.label,isFieldRequired:this.required,optional:this.optional,disabled:this.disabled})}renderHintDom(){return this.hint&&t("div",{class:"vega-hint"},t("label",null,this.hint))}setVegaFlexProperty(){this.vegaFlexProp&&Object.assign(this.vegaFlexElement,{gap:"size-16",direction:"col"},this.vegaFlexProp)}syncCheckboxItemsValue(e,i){e&&!this.value.includes(i)?this.value=[...this.value,i]:!e&&this.value.includes(i)&&(this.value=[...this.value.filter((e=>e!==i))])}initCheckboxArray(){this.vegaCheckboxArray=Array.from(this.host.querySelectorAll("vega-checkbox")),this.vegaCheckboxArray.forEach((e=>{e.checked=!!(this.value&&this.value.length>0)&&this.value.includes(e.identifier)}))}notifyGroupDisabledChange(){s.notify(d,{host:this.host})}get host(){return n(this)}static get watchers(){return{value:["watchValue"],vegaFlexProp:["watchVegaFlexProp"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};S([k()],q.prototype,"globalSlimmers",void 0),S([m()],q.prototype,"formFieldController",void 0),S([m()],q.prototype,"checkboxValueChangeObserver",void 0),S([m()],q.prototype,"checkboxUserInteractionObserver",void 0),S([m()],q.prototype,"checkboxEventPrevent",void 0),S([m()],q.prototype,"changeEventEmitter",void 0),S([m()],q.prototype,"userChangeEventEmitter",void 0),S([m()],q.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),S([E()],q.prototype,"watchVegaFlexProp",null),q.style=':host{display:block;text-align:left;line-height:normal}.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){.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){.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){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}vega-field-label{margin-bottom:16px;display:block}vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:18px;font-weight:500;line-height:30px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}vega-field-label::part(label){word-break:normal}.vega-hint{padding-top:12px}.vega-hint>label{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){.vega-hint>label{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){.vega-hint>label{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){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}';export{U as vega_checkbox,q as vega_checkbox_group}
@@ -1 +1 @@
1
- import{U as e}from"./p-4d20a56f.js";import{I as r}from"./p-abd7aeaa.js";class t extends r{constructor(e){super(),this.config=e}evaluate(r){if(!this.isAcceptedInputType(r))throw new Error(`Invalid date value ${r} for mode ${this.config.mode}`);let t;switch(this.config.mode){case"single":t=e(r);break;case"range":t=Array.isArray(r)&&2===r.length&&r.every(e)}return{isValid:t,message:t?"":"This field is required"}}canEvaluate(e,r){return r?this.isAcceptedInputType(e)&&!r.disabled&&r.visible:this.isAcceptedInputType(e)}shouldShowError(e){return!e.disabled&&e.visible&&(e.touched||e.modified)}isAcceptedInputType(e){if(null==e)return!0;if(!this.config.mode)throw new Error(`Unexpected type of mode: ${this.config.mode}`);switch(this.config.mode){case"single":return"string"==typeof e;case"range":return Array.isArray(e);default:return!1}}}export{t as D}
1
+ import{U as e}from"./p-8e3c1c81.js";import{I as r}from"./p-abd7aeaa.js";class t extends r{constructor(e){super(),this.config=e}evaluate(r){if(!this.isAcceptedInputType(r))throw new Error(`Invalid date value ${r} for mode ${this.config.mode}`);let t;switch(this.config.mode){case"single":t=e(r);break;case"range":t=Array.isArray(r)&&2===r.length&&r.every(e)}return{isValid:t,message:t?"":"This field is required"}}canEvaluate(e,r){return r?this.isAcceptedInputType(e)&&!r.disabled&&r.visible:this.isAcceptedInputType(e)}shouldShowError(e){return!e.disabled&&e.visible&&(e.touched||e.modified)}isAcceptedInputType(e){if(null==e)return!0;if(!this.config.mode)throw new Error(`Unexpected type of mode: ${this.config.mode}`);switch(this.config.mode){case"single":return"string"==typeof e;case"range":return Array.isArray(e);default:return!1}}}export{t as D}
@@ -0,0 +1 @@
1
+ import{i as o}from"./p-8e3c1c81.js";import{R as e}from"./p-fc07ed1e.js";function f(f,i,r,s){return o(f)?{flex:`${e.formatCustom(f)}`}:{flexGrow:o(i)?`${e.formatCustom(i)}`:void 0,flexShrink:o(r)?`${e.formatCustom(r)}`:void 0,flexBasis:o(s)?`${e.formatCustom(s)}`:void 0}}export{f}
@@ -0,0 +1 @@
1
+ import{C as t}from"./p-2d0d575f.js";import{d as e}from"./p-36a57431.js";import{e as n,f as s}from"./p-53e3f259.js";import{d as r,c as i}from"./p-02841589.js";import{L as o}from"./p-6e1ab235.js";import{i as c}from"./p-8e3c1c81.js";import{T as a}from"./p-b438e68b.js";import{D as l}from"./p-5c285374.js";import{g as u}from"./p-8b5d3a52.js";import{V as h}from"./p-d1f47512.js";import{c as d}from"./p-a841cf13.js";import{f}from"./p-aa135628.js";var p,g;!function(t){t.SELECTION_RANGE="SELECTION_RANGE",t.CLEAR_FORMATTING="CLEAR_FORMATTING",t.LINK_GROUP="LINK_GROUP"}(p||(p={}));class w{get isFormattingOnly(){return!1}}!function(t){t.ALIGNMENT="ALIGNMENT",t.TEXT_STYLE="TEXT_STYLE",t.INDENT="INDENT",t.LIST="LIST",t.INTERNAL_WRAPPER="INTERNAL_WRAPPER"}(g||(g={}));class m extends w{}const A=new class{constructor(){this.domToEntity=new WeakMap,this.entityToDOM=new WeakMap,this.contentEntityToRootDom=new Map,this.rootDomToContentEntity=new WeakMap}register(t,e){this.isVegaRTEContent(e)?this.registerRootDomAndContentEntity(t,e):(this.domToEntity.set(t,e),this.entityToDOM.set(e,t))}getEntityByDOM(t){return this.domToEntity.get(t)}getDOMByEntity(t){return this.isVegaRTEContent(t)?this.contentEntityToRootDom.get(t):this.entityToDOM.get(t)}removeDirtyDomRef(t){this.domToEntity.delete(t)}registerRootDomAndContentEntity(t,e){const n=this.rootDomToContentEntity.get(t);n&&n!==e&&this.contentEntityToRootDom.delete(n),this.rootDomToContentEntity.set(t,e),this.contentEntityToRootDom.set(e,t)}isVegaRTEContent(t){return t&&"VegaRTEContent"===t.typeName}};var x;!function(t){t.DELETE_CHILDREN="DELETE_CHILDREN",t.DELETE_NEST_LIST="DELETE_NEST_LIST",t.UPDATE_TEXT="UPDATE_TEXT",t.REPLACE_SELECTED_TEXT="REPLACE_SELECTED_TEXT",t.APPEND_CHILDREN="APPEND_CHILDREN",t.INSERT_CHILDREN_AFTER="INSERT_CHILDREN_AFTER",t.INSERT_CHILDREN_BEFORE="INSERT_CHILDREN_BEFORE",t.SPLIT_BLOCK_WITH_NODE="SPLIT_BLOCK_WITH_NODE",t.REPLACE_CHILD_NODES="REPLACE_CHILD_NODES",t.REPLACE_NEST_LIST="REPLACE_NEST_LIST",t.MERGE_TWO_BLOCKS_NODES="MERGE_TWO_BLOCKS_NODES",t.INSERT_NEW_PARAGRAPH="INSERT_NEW_PARAGRAPH",t.LINE_BREAK_SINGLE_BLOCK="LINE_BREAK_SINGLE_BLOCK",t.LINE_BREAK_MULTIPLE_BLOCKS="LINE_BREAK_MULTIPLE_BLOCKS",t.TRANSFORM_LIST_BLOCK="TRANSFORM_LIST_BLOCK",t.TRANSFORM_PARAGRAPH_BLOCK="TRANSFORM_PARAGRAPH_BLOCK",t.NEST_LIST_ITEMS="NEST_LIST_ITEMS",t.UNNEST_LIST_ITEMS="UNNEST_LIST_ITEMS",t.DELETE_BLOCK_CONTENT="DELETE_BLOCK_CONTENT",t.INSERT_IMAGE_TO_BLOCK="INSERT_IMAGE_TO_BLOCK",t.UPDATE_IMAGE_NODE_URL="UPDATE_IMAGE_NODE_URL",t.TRANSFORM_TO_CODE_BLOCK="TRANSFORM_TO_CODE_BLOCK",t.UPDATE_CODE_BLOCK="UPDATE_CODE_BLOCK",t.SWITCH_OUT_FROM_CODE_BLOCK="SWITCH_OUT_FROM_CODE_BLOCK",t.DELETE_CODE_BLOCK="DELETE_CODE_BLOCK",t.UNLINK_LINK_GROUP="UNLINK_LINK_GROUP",t.LINK_GROUP_NODE_SPLIT="LINK_GROUP_NODE_SPLIT",t.DELETE_LINK_GROUP="DELETE_LINK_GROUP",t.UPDATE_CURSOR_POSITION="UPDATE_CURSOR_POSITION",t.INSERT_TEXT_TO_DECORATOR_NODE="INSERT_TEXT_TO_DECORATOR_NODE",t.INSERT_NODE_TO_NEAREST_ROOT="INSERT_NODE_TO_NEAREST_ROOT",t.PASTE_CONTENT="PASTE_CONTENT",t.DELETE_SELECTED_CONTENT="DELETE_SELECTED_CONTENT",t.SEQUENTIAL_COMPOSITION="SEQUENTIAL_COMPOSITION"}(x||(x={}));class S{constructor(){this.isFlushable=!1}}function y(t){const e={},n=t.getAttribute("style");if(!n)return e;const s=function(t){const e=[];let n="",s=0;for(let r=0;r<t.length;r++){const i=t[r];"("===i?(s++,n+=i):")"===i?(s--,n+=i):";"===i&&0===s?(e.push(n),n=""):n+=i}return n&&e.push(n),e}(n);for(const t of s){const n=t.trim(),s=n.indexOf(":"),i=n.substring(0,s).trim(),o=n.substring(s+1).trim();e[r(i)]=o}return e}function O(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function T(t){return O(t).replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function E(t){return t.replace(/&(?!(?:[a-zA-Z][a-zA-Z0-9]+|#[0-9]+|#x[a-fA-F0-9]+);)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function v(t){return t.replace(/\r\n?/g,"\n").split("\n")}const N="",b="";function C(t,e=!1){return v(t).map((t=>{const n=t.includes("")||t.includes("")?t:t.trim();return e?function(t){return t.split("").join(" ").split("").join("\t")}(n):n}))}function L(t){return t.map((t=>`<p>${T(t)}</p>`)).join("")}class k{constructor(){this.classNameToBeAdded=""}filterAnnotations(t){const e=t.customStyle;return e?(this.extractAndDeleteMatchedStyles(e),0===Object.keys(e).length&&delete t.customStyle,t):t}filterAndDeleteStyles(t,e,n){const s=new Set(e);return this.extractAndDeleteMatchedStyles(t)&&this.classNameToBeAdded&&s.add(this.classNameToBeAdded),{styles:t,classNames:Array.from(s)}}refillStyles(t){this.classNameToBeAdded&&t.classList.remove(this.classNameToBeAdded);const e=y(t),n=Object.assign(Object.assign({},this.stylesToBeFiltered),e),s=Object.entries(Object.assign({},n)).map((([t,e])=>`${i(t)}: ${e};`)).join("");t.setAttribute("style",s)}canFilter(t){return!1}canRefill(t,e){return!1}toCssText(){return""}get alwaysFilter(){return!1}extractAndDeleteMatchedStyles(t){let e=!1;const n=this.stylesToBeFiltered;if(t&&n){const s=Object.keys(n);for(const r of s)t[r]===n[r]&&(delete t[r],e=!0)}return e}buildCssTextForStyles(t,e){return`${`.${k.RTE_CONTENT_CONTAINER_CLASS_NAME}`+(e?` .${e}`:` ${t}`)} { ${Object.entries(this.stylesToBeFiltered).map((([t,e])=>`${i(t)}: ${e};`)).join(" ")} }`}convertStylesMapToCssText(t){return Object.entries(t||this.stylesToBeFiltered).map((([t,e])=>`${i(t)}: ${e};`)).join(" ")}isBlockOrNodeStylesMatchFilterStyles(t,e){const n=t.getStyles({standalone:!0});return this.isMatchFilterStyles(n,e)}isMatchFilterStyles(t,e){return(e&&e.length>0?e:Object.keys(this.stylesToBeFiltered)).every((e=>t[e]===this.stylesToBeFiltered[e]))}}var R,j,_;k.RTE_CONTENT_CONTAINER_CLASS_NAME="vega-rte-content",function(t){t.BOLD="BOLD",t.ITALIC="ITALIC",t.UNDERLINE="UNDERLINE",t.STRIKETHROUGH="STRIKETHROUGH",t.SELECTION_RANGE="SELECTION_RANGE",t.IMAGE="IMAGE",t.CODE="CODE",t.TEXT_COLOR="TEXT_COLOR",t.LINK="LINK",t.INLINE_HTML="INLINE_HTML",t.PLAIN_TEXT="PLAIN_TEXT"}(R||(R={}));class $ extends w{}class I{static isTextBlock(t){return t===this.RTE_TEXT_BLOCK_CLASS_NAME}static isCodeBlock(t){return"RTECodeBlock"===t}static isListBlock(t){return"RTEListBlock"===t}static isListItemBlock(t){return"RTEListItemBlock"===t}static isTextNode(t){return t===this.RTE_TEXT_NODE_CLASS_NAME}static isLinkNode(t){return this.isTextNode(t.typeName)&&!!t.getAnnotationByType(R.LINK)}static isCodeNode(t){if(this.isTextNode(t.typeName)){const e=t.getAnnotationByType(R.CODE);return!!e&&e.code}return!1}static isImageNode(t){return"RTEImageNode"===t.typeName}static isCodeBlockNode(t){return"RTECodeBlockNode"===t.typeName}}I.RTE_TEXT_NODE_CLASS_NAME="RTETextNode",I.RTE_TEXT_BLOCK_CLASS_NAME="RTETextBlock";class B extends k{constructor(){super(...arguments),this.stylesToBeFiltered=D.getDefaultStyles(),this.elementTagName="a"}filterAnnotations(t){const e=t.link;return(null==e?void 0:e.customStyle)?(this.extractAndDeleteMatchedStyles(e.customStyle),0===Object.keys(e.customStyle).length&&delete e.customStyle,t):t}canFilter(t){return I.isLinkNode(t)}canRefill(t,e){return"RTETextNode"===t&&e.matches(this.elementTagName)}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}filterLinkGroupInlineStyles(t){const e=t.style,n=t.class?t.class.split(" "):[],s=this.filterAndDeleteStyles(e,n);return s.styles&&Object.keys(s.styles).length>0&&(t.style=s.styles),s.classNames&&s.classNames.length>0&&(t.class=s.classNames.join(" ")),t.style&&0===Object.keys(t.style).length&&delete t.style,t}}class D extends w{constructor(t){super(),this.type=p.LINK_GROUP,this.linkGroups=new Map,this.linkGroups=new Map([[t,[]]])}static getDefaultStyles(){return{color:"rgba(var(--v-text-link, 19, 98, 226, 1))"}}clone(){const t=new D("");return this.linkGroups.forEach(((e,n)=>{t.linkGroups.set(n,e.map((t=>t.clone(t.parent))))})),t}toString(t,e){let n=this.toJsx(t,e);return(null==e?void 0:e.filterInlineStyles)&&(n=D.linkGroupFilterStylesStrategy.filterLinkGroupInlineStyles(n)),Object.entries(n).map((([t,e])=>{const n="string"==typeof e?e:this.formatStyleToString(e);return`${i(t)}="${n}"`})).join(" ")}toJsx(t,e){const n=this.getStyle(t,e),s=this.getClass(t,e),r=this.getAttribute(t);return s.length>0&&(r.class=s.join(" ")),n&&Object.keys(n).length>0&&(r.style=n),r}getClass(t,e){const n=[];return t.link.customClass&&n.push(...t.link.customClass),!(null==e?void 0:e.standalone)&&t.useInternalStyle&&n.push("v-rte--link"),n}getStyle(t,e){const n={};return t.link.customStyle&&Object.assign(n,t.link.customStyle),(null==e?void 0:e.standalone)&&t.useInternalStyle&&Object.assign(n,D.getDefaultStyles()),n}getAttribute(t){const{href:e,customAttribute:n={}}=t.link,s=t.useInternalStyle,r=(null==e?void 0:e.startsWith("#"))?"_self":n.target||(s?"_blank":"");return Object.assign(Object.assign(Object.assign({},n),e||s?{href:e}:{}),r?{target:r}:{})}formatStyleToString(t){return Object.entries(t).map((([t,e])=>`${i(t)}: ${e};`)).join(" ")}}D.linkGroupFilterStylesStrategy=new B;class M extends m{constructor(t){super(),this.type=g.ALIGNMENT,this.textAlign=t}static from(t){return[g.ALIGNMENT,new M(t)]}static getDefaultStyles(t){switch(t){case"right":case"center":case"justify":return{textAlign:t};case"left":default:return{textAlign:"left"}}}toJSON(){return{textAlign:this.textAlign}}renderClass(t){if(null==t?void 0:t.standalone)return null;switch(this.textAlign){case"right":case"center":case"justify":return`v-rte--horizontal-alignment-${this.textAlign}`;case"left":default:return"v-rte--horizontal-alignment-left"}}clone(){return new M(this.textAlign)}renderStyle(t){return(null==t?void 0:t.standalone)?M.getDefaultStyles(this.textAlign):null}}class F extends m{constructor(t){super(),this.type=g.INDENT,this.indent=Math.max(0,t)}static from(t){return[g.INDENT,new F(t)]}toJSON(){return this.indent>0?{indent:this.indent}:null}clone(){return new F(this.indent)}renderClass(){return null}renderStyle(){return this.indent>0?{marginLeft:16*this.indent+"px"}:null}}class P{static register(t,e,n){this.registry.has(e)||this.registry.set(e,new Map),this.registry.get(e).has(t)||this.registry.get(e).set(t,new Set),this.registry.get(e).get(t).add(n)}static unregister(t,e,n){const s=this.registry.get(e);if(s){const e=s.get(t);e&&e.delete(n)}}static get(t,e){const n=t instanceof S?t.type:t.typeName,s=this.registry.get(e.typeName);if(s){const r=s.get(n);if(r&&r.size>0)return Array.from(r).find((n=>n.canIntercept(t,e)))}}}P.registry=new Map;class H{static register(t,e,n){this.registry.has(e)||this.registry.set(e,new Map),this.registry.get(e).set(t,n)}static unregister(t,e){const n=this.registry.get(e);n&&n.delete(t)}static get(t,e){const n=this.registry.get(e);if(n)return n.get(t)}static executeTheStrategy(t,e){const n=P.get(t,e),s=()=>{const n=t instanceof S?t.type:t.typeName,s=H.get(n,e.typeName);if(s)return t.executedFlag=!0,s.execute(t,e);o.warn(`Type ${n} action handle strategy is not registered in class ${e.typeName}`)};return n?n.intercept(s,t,e):s()}static canHandle(t,e){return!!H.get(t,e.typeName)}}H.registry=new Map,function(t){t.CUSTOM_ATTRIBUTE="CUSTOM_ATTRIBUTE",t.CUSTOM_CLASS="CUSTOM_CLASS",t.CUSTOM_STYLE="CUSTOM_STYLE"}(j||(j={}));class J extends w{}class K extends J{constructor(t){super(),this.type=j.CUSTOM_ATTRIBUTE,this.BOOLEAN_ATTRS=new Set(["controls","disabled","checked","readonly","multiple","required","autoplay","muted"]),this.customAttribute=t}static from(t){return[j.CUSTOM_ATTRIBUTE,new K(t)]}toJSON(){return{customAttribute:this.customAttribute}}clone(){return new K(this.customAttribute)}toString(t=[]){const e=t.map((t=>t.split("=")[0]));return Object.keys(this.customAttribute).map((t=>e.includes(t)?null:`${t}="${this.customAttribute[t]}"`)).filter(c)}render(t={}){var e;const n=Object.assign({},this.customAttribute);return null===(e=t.filterAttributes)||void 0===e||e.forEach((t=>delete n[t])),Object.keys(n).forEach((t=>{this.BOOLEAN_ATTRS.has(t)&&""===n[t]&&(n[t]="true")})),n}}class U extends J{constructor(t){super(),this.type=j.CUSTOM_CLASS,this.customClass=t}static from(t){return[j.CUSTOM_CLASS,new U(t)]}toJSON(){return{customClass:this.customClass}}clone(){return new U(this.customClass)}toString(){return`class="${this.customClass.join(" ")}"`}renderClass(){return this.customClass}}class G extends J{constructor(t){super(),this.type=j.CUSTOM_STYLE,this.customStyle=t}static from(t){return[j.CUSTOM_STYLE,new G(t)]}toJSON(){return{customStyle:this.customStyle}}clone(){return new G(this.customStyle)}renderStyle(){return this.customStyle}removeStyles(t){const e=Object.assign({},this.customStyle);return t.forEach((t=>delete e[t])),e}toString(){return`style="${E(Object.entries(this.customStyle).map((([t,e])=>`${t}: ${e};`)).join(" "))}"`}}class z extends m{constructor(t){super(),this.type=g.INTERNAL_WRAPPER,this.internalWrapper=t}static from(t){return[g.INTERNAL_WRAPPER,new z(t)]}clone(){return new z(this.internalWrapper)}renderClass(){}renderStyle(){}toJSON(){return this.internalWrapper?{internalWrapper:this.internalWrapper}:void 0}}class W{constructor(t){this.dtoName=t instanceof Y?"block":"node",this.annotationMap=t.annotationMap}toCssText(t={standalone:!1},e,n){return n=n||this.toJSON(t,e),Object.entries(Object.assign({},n)).map((([t,e])=>`${i(t)}: ${e};`)).join("")}toJSON(t={standalone:!1},e){const n=Array.from(this.annotationMap.values()).filter((t=>this.filterAnnotation(t)||t instanceof G)).map((e=>e.renderStyle(t))).filter(c);return e&&e.length>0?this.mergeAnnotationStyles(n,e):n.reduce(((t,e)=>Object.assign(Object.assign({},t),e)),{})}filterAnnotation(t){return"block"===this.dtoName?t instanceof m:t instanceof $}mergeAnnotationStyles(t,e){const n={};for(const s of t)for(const t in s){const r=s[t],i=n[t];n[t]="string"==typeof i&&"string"==typeof r&&e.includes(t)?Array.from(new Set(`${i} ${r}`.split(/\s+/).filter(Boolean))).join(" "):r}return n}}class V{static register(t,e){var n;const s=null!==(n=this.registry.get(t))&&void 0!==n?n:new Set;s.add(e),this.registry.set(t,s)}static getStrategies(t){var e;return Array.from(null!==(e=this.registry.get(t))&&void 0!==e?e:[])}static executeTheStrategyFilterAction(t,e,n){return this.getStrategies(t.typeName).filter((e=>e.canFilter(t))).reduce(((e,n)=>n.filterAndDeleteStyles(e.styles,e.classNames,t)),{styles:e,classNames:n})}static executeTheStrategyRefillAction(t,e){this.getStrategies(t).filter((n=>n.canRefill(t,e))).forEach((t=>{t.refillStyles(e)}))}static generateAllStylesContent(t=!1){const e=[];return t&&(e.push("/* Font-face imports begin */\n"),e.push(Object.keys(a).map((t=>`@import url('${a[t].url}');\n`)).join(" ")),e.push("/* Font-face imports end */\n")),this.registry.forEach((t=>{t.forEach((t=>{const n=t.toCssText();n&&!e.includes(n)&&e.push(n)}))})),e.join(" ")}}V.registry=new Map,function(t){t.TEXT="TEXT",t.IMAGE="IMAGE",t.CODE_BLOCK_NODE="CODE_BLOCK_NODE"}(_||(_={}));class X extends l{constructor(t,e){super(),this.annotationMap=new Map,this.id=t,e&&(this.annotationMap=e)}static from(t,e,n){throw new Error(`[Vega] ${this.typeName}.from(${JSON.stringify(t)}, ${e}, ${n}) is not implemented. Please implement this method in the subclass.`)}static createAnnotationEntity(t,e){switch(t){case"customAttribute":return K.from(e);case"customClass":return U.from(e);case"customStyle":return G.from(e)}}getAnnotationByType(t){return this.annotationMap.get(t)}deleteAnnotationByType(t){this.annotationMap.delete(t),this.flushChange()}apply(t){return this.doApply(t),t.isFlushable&&this.flushChange(),this}getStyles(t={standalone:!1}){return new W(this).toJSON(t,["textDecoration"])}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof $||t instanceof U)).map((e=>e.renderClass(t))).filter(c).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(j.CUSTOM_ATTRIBUTE)}isTextNode(){return!1}getPlainText(){return""}getElementRef(){return A.getDOMByEntity(this)}generateAttributeString(t,...e){var n;const s=new W(this),r=s.toJSON({standalone:!0},["textDecoration"]),i=this.annotationMap.get(j.CUSTOM_CLASS);let o=r,a=null==i?void 0:i.renderClass();if(t&&t.filterInlineStyles){const t=V.executeTheStrategyFilterAction(this,r,a);o=t.styles,a=t.classNames}const l=[...(null===(n=this.getCustomAttributesAnnotation())||void 0===n?void 0:n.toString(e))||[],a&&a.length>0?`class="${a.join(" ")}"`:null,o&&Object.keys(o).length>0?`style="${E(s.toCssText({standalone:!0},void 0,o))}"`:null,...e].filter(c);return l.length?` ${l.join(" ")}`:""}doApply(t){t instanceof S?this.doModifyActionApply(t):this.doAnnotationActionApply(t)}flushChange(){const s=A.getDOMByEntity(this);if(s){const r=e.getSubjectFromParentNodeByEventId(s,n);r&&t.notify(r,{})}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}doAnnotationActionApply(t){}doModifyActionApply(t){}}X.typeName="RTENode";const q=new class{constructor(){this.RTE_BLOCK_DTO_CLASS_MAP=new Map,this.RTE_NODE_DTO_CLASS_MAP=new Map}registerRTEDTOClass(t,e){if(e.prototype instanceof Y)this.RTE_BLOCK_DTO_CLASS_MAP.set(t,e);else{if(!(e.prototype instanceof X))throw new Error(`Invalid RTE DTO class type: ${t}`);this.RTE_NODE_DTO_CLASS_MAP.set(t,e)}}getRTEBlockClass(t){return this.RTE_BLOCK_DTO_CLASS_MAP.get(t)}getRTENodeClass(t){return this.RTE_NODE_DTO_CLASS_MAP.get(t)}};class Y extends l{constructor(t){super(),this.annotationMap=new Map,this.id=t}static from(t,e){throw new Error(`[Vega] ${this.typeName}.from(${JSON.stringify(t)}, ${e}) is not implemented. Please implement this method in the subclass.`)}static generateBlockChildren(t,e,n){return t.map((t=>{const s=q.getRTEBlockClass(t.type);if(s){const r=s.from(t,e);return r.parent=n,r}})).filter(c)}static createAnnotationEntity(t,e){switch(t){case"textAlign":return M.from(e);case"indent":return F.from(e);case"customAttribute":return K.from(e);case"customClass":return U.from(e);case"customStyle":return G.from(e);case"internalWrapper":return z.from(e)}}static convertAnnotationsToMap(t,e){Object.entries(e).forEach((([e,n])=>{const s=this.createAnnotationEntity(e,n);c(s)&&t.set(...s)}))}shouldRenderAsInternalWrapper(){const t=this.getAnnotationByType(g.INTERNAL_WRAPPER);return!!t&&t.internalWrapper&&0===Array.from(this.annotationMap.values()).filter((t=>!(t instanceof D||t instanceof z))).length}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof m||t instanceof J)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{})}getAnnotationByType(t){return this.annotationMap.get(t)}apply(s){if(this.doApply(s),s.isFlushable){const s=A.getDOMByEntity(this);if(s){const r=e.getSubjectFromParentNodeByEventId(s,n);r&&t.notify(r,{})}}}allowsCaretDescend(){return!0}getFirstNode(){if(!this.children||!this.children[0])return null;const t=this.children[0];return t instanceof Y?t.getFirstNode():t}getPlainText(){var t;return(null!==(t=this.children)&&void 0!==t?t:[]).map((t=>t.getPlainText())).join("")}isListItemBlock(){return"list-item"===this.type}getStyles(t={standalone:!1}){const e=new W(this).toJSON(t);return Object.assign(Object.assign({},e),this.shouldRenderAsInternalWrapper()?{display:"contents"}:{})}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof m||t instanceof U)).map((e=>e.renderClass(t))).filter(c).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(j.CUSTOM_ATTRIBUTE)}generateAttributeString(t,...e){var n;const s=new W(this),r=s.toJSON({standalone:!0}),i=this.annotationMap.get(j.CUSTOM_CLASS);let o=r,a=null==i?void 0:i.renderClass();if(t&&t.filterInlineStyles){const t=V.executeTheStrategyFilterAction(this,r,a);o=t.styles,a=t.classNames}const l=[...(null===(n=this.getCustomAttributesAnnotation())||void 0===n?void 0:n.toString(e))||[],a&&a.length>0?`class="${a.join(" ")}"`:null,o&&Object.keys(o).length>0?`style="${E(s.toCssText({standalone:!0},void 0,o))}"`:null,...e].filter(c);return l.length?` ${l.join(" ")}`:""}doApply(t){t instanceof S?H.executeTheStrategy(t,this):this.applyAnnotationAction(t)}applyAnnotationAction(t){const e=t.toAnnotation();if(e instanceof D||this.annotationMap.set(e.type,e),"function"==typeof this.doAnnotationActionApply)this.doAnnotationActionApply(t);else{const e=H.get(t.typeName,this.typeName);e&&e.execute(t,this)}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}}Y.typeName="RTEBlock";class Z extends S{constructor(t){super(),this.type=x.APPEND_CHILDREN,this.entityToBeAppended=t}}const Q="500",tt={fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",minHeight:"22px",fontWeight:"500"},et=Object.assign(Object.assign({},tt),{marginTop:"0px",marginBottom:"0px"}),nt={paragraph:et,title:Object.assign(Object.assign({},tt),{fontSize:"36px",lineHeight:"40px",minHeight:"40px"}),subtitle:Object.assign(Object.assign({},tt),{fontSize:"28px",lineHeight:"32px",minHeight:"32px"}),"heading-1":Object.assign(Object.assign({},et),{fontSize:"22px",lineHeight:"24px",minHeight:"24px"}),"heading-2":Object.assign(Object.assign({},et),{fontSize:"20px",lineHeight:"24px",minHeight:"24px"}),"heading-3":Object.assign(Object.assign({},et),{fontSize:"18px"}),"heading-4":Object.assign({},et),"heading-5":Object.assign(Object.assign({},et),{fontSize:"14px"}),"heading-6":Object.assign(Object.assign({},et),{fontSize:"12px"})};class st extends m{constructor(t){super(),this.type=g.TEXT_STYLE,this.textStyle=t}static from(t){return[g.TEXT_STYLE,new st(t)]}static getDefaultStyles(t){return t?nt[t]:null}toJSON(){return{textStyle:this.textStyle}}clone(){return new st(this.textStyle)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.textStyle?`v-rte--text-style-${this.textStyle}`:null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.textStyle?st.getDefaultStyles(this.textStyle):null}}class rt extends l{}rt.typeName="AnnotationAction";class it extends rt{constructor(t,e){super(),this.isFlushable=!0,this.textStyle=t,this.bold=e}toAnnotation(){return new st(this.textStyle)}}it.typeName="TextStyleAnnotationAction";class ot extends ${constructor(t,e=!0){super(),this.type=R.LINK,this.link=t,this.useInternalStyle=e}static from(t,e=!0){return[R.LINK,new ot(t,e)]}toJSON(){return{link:this.link}}clone(){return new ot(this.link,this.useInternalStyle)}toEqual(t){return this.link.groupKey===t.link.groupKey}renderClass(){return null}renderStyle(){return null}}class ct extends rt{constructor(){super(...arguments),this.doSplit=!0}}ct.typeName="TextSplittableAction";class at extends ct{constructor({link:t,newText:e,needMergeNode:n,doSplit:s,type:r}){super(),this.isFlushable=!0,this.link=t,this.needMergeNode=n,this.newText=e,this.type=r,c(s)&&(this.doSplit=s)}toAnnotation(){return new ot(this.link)}}at.typeName="LinkAnnotationAction";class lt extends rt{constructor(t,e,n){super(),this.isFlushable=!1,this.groupKey=t,this.nodes=e,this.type=n}toAnnotation(){return new D(this.groupKey)}}lt.typeName="LinkGroupAnnotationAction";const ut="700",ht="bold",dt="italic",ft="underline",pt="line-through";class gt extends ${constructor(t){super(),this.type=R.BOLD,this.bold=t}static from(t){return[R.BOLD,new gt(t)]}get isFormattingOnly(){return!0}toJSON(){return{bold:this.bold}}clone(){return new gt(this.bold)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.bold?"v-rte--bold":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.bold?{fontWeight:"700"}:null}}class wt extends ct{constructor(t){super(),this.isFlushable=!0,this.bold=t}toAnnotation(){return new gt(this.bold)}}wt.typeName="BoldAnnotationAction";class mt extends rt{constructor(t){super(),this.isFlushable=!0,this.annotationType=t}toAnnotation(){}}mt.typeName="DeleteNodeAnnotationAction";class At{execute(t,e){return o.log(`Executing action ${t instanceof S?t.type:t.typeName} on ${e.typeName} ${e.id}`),this.handleAction(t,e)}updateCustomStyleAnnotation(t,e){const n=t.annotationMap.get(j.CUSTOM_STYLE);n&&this.isCustomStyle(n,e)&&t.annotationMap.set(n.type,new G(n.removeStyles(e)))}createNewParagraph(t){const e=q.getRTEBlockClass("paragraph");if(e)return e.from({id:u(),type:"paragraph",nodes:[{id:u(),type:"text",text:t}]})}getRootContent(t){const e=t.parent;if(e)return"VegaRTEContent"===e.typeName?e:this.getRootContent(e)}isCaretPositionAtBlockStart(t,e,n){return e===t.children[0]&&0===n}isCaretPositionAtBlockEnd(t,e,n){return e.isContentEditable()?this.isCaretPositionAtTextBlockEnd(t,e,n):this.isCaretPositionAtDecoratorBlockEnd(t,e,n)}getDOMByEntity(t){return A.getDOMByEntity(t)}isCaretPositionAtTextBlockEnd(t,e,n){const s=t.children[t.children.length-1];return e===s&&(e.isEmpty()||n===s.text.length)}isCaretPositionAtDecoratorBlockEnd(t,e,n){return e===t.children[t.children.length-1]&&0!==n}isCustomStyle(t,e){return e.some((e=>Object.keys(t.customStyle).includes(e)))}}class xt extends At{handleAction(t,e){"list-item"!==e.type&&(e.type=t.textStyle),e.children.forEach(t.bold?t=>{const e=new wt(!0);e.doSplit=!1,t.apply(e)}:t=>{t.apply(new mt(R.BOLD))}),this.updateCustomStyleAnnotation(e,["fontFamily","lineHeight","fontWeight","fontSize"])}}class St extends S{constructor(t,...e){super(),this.type=x.INSERT_CHILDREN_AFTER,this.referChildren=t,this.childrenToBeInserted=e}}class yt extends S{constructor(t){super(),this.type=x.REPLACE_CHILD_NODES,this.newChildNodes=t}}class Ot extends At{handleAction(t,e){t.newBlock=this.splitTextNodeBlock(t.splitPointNode,t.startOffsetOfNode,e)}splitTextNodeBlock(t,e,n){if(t){const s=t.text.slice(0,e),r=t.text.slice(e),i=n.children.indexOf(t);if(i>-1){const o=n.children.slice(0,i),c=n.children.slice(i+1);t.isContentEditable()?(s&&o.push(t.cloneWithText(s)),r&&c.unshift(t.cloneWithText(r))):e>0?o.push(t):c.unshift(t),n.apply(new yt(o));const a=n.cloneWithNodes(c);return n.parent.apply(new St(n,a)),a}}}}class Tt extends At{handleAction(t,e){e.children=[],e.apply(new Z(t.newChildNodes))}}class Et extends S{constructor(t){super(),this.type=x.DELETE_CHILDREN,this.entityToBeRemoved=t}}class vt extends w{constructor(t){super(),this.type=p.SELECTION_RANGE,this.range=t}get isFormattingOnly(){return!0}clone(){return new vt(this.range)}}class Nt extends ${constructor(t){super(),this.type=R.STRIKETHROUGH,this.strikethrough=t}static from(t){return[R.STRIKETHROUGH,new Nt(t)]}get isFormattingOnly(){return!0}toJSON(){return{strikethrough:this.strikethrough}}clone(){return new Nt(this.strikethrough)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.strikethrough?"v-rte--strikethrough":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.strikethrough?{textDecoration:"line-through"}:null}}class bt extends ${constructor(t){super(),this.type=R.UNDERLINE,this.underline=t}static from(t){return[R.UNDERLINE,new bt(t)]}get isFormattingOnly(){return!0}toJSON(){return{underline:this.underline}}clone(){return new bt(this.underline)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.underline?"v-rte--underline":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.underline?{textDecoration:"underline"}:null}}class Ct extends ${constructor(t){super(),this.type=R.ITALIC,this.italic=t}static from(t){return[R.ITALIC,new Ct(t)]}get isFormattingOnly(){return!0}toJSON(){return{italic:this.italic}}clone(){return new Ct(this.italic)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.italic?"v-rte--italic":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.italic?{fontStyle:"italic"}:null}}class Lt extends ${constructor(t,e=!0){super(),this.type=R.CODE,this.code=t,this.useInternalStyle=e}static from(t,e){return[R.CODE,new Lt(t,e)]}static getDefaultStyles(){return{fontFamily:"Roboto Mono",whiteSpace:"pre-wrap"}}get isFormattingOnly(){return!0}toJSON(){return{code:this.code}}clone(){return new Lt(this.code,this.useInternalStyle)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.code&&this.useInternalStyle?"v-rte--code":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.code&&this.useInternalStyle?Lt.getDefaultStyles():null}}const kt={key:"black",light:"#111128",dark:"#E3E3E8"},Rt=[kt,{key:"gray",light:"#5E5E6D",dark:"#B9B9C1"},{key:"green",light:"#01801F",dark:"#59D977"},{key:"red",light:"#BD2947",dark:"#FFB2B5"},{key:"purple",light:"#563D82",dark:"#BEB2FF"},{key:"teal",light:"#17758F",dark:"#4CD8FF"}],jt="​";var _t;!function(t){t.Default="default",t.Composition="composition"}(_t||(_t={}));const $t="__updateSource",It=[{key:"title"},{key:"subtitle"},{key:"heading-1"},{key:"heading-2"},{key:"heading-3"},{key:"paragraph"}],Bt=[["textStyles"],["bold","italic","underline","strikethrough","code"],["textColor"],["horizontalAlignment","bulletsNumbers"],["moreIndent","lessIndent"],["link"],["image"],["clearStyle"]],Dt=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Mt=22,Ft="url",Pt="email",Ht=["url","email"],Jt="data-vega-rte-block-boundary",Kt="application/x-vega-rte-paste-mode",Ut="application/x-vega-rte-preserved-whitespace",Gt="word",zt="rte-word-count",Wt="plain";class Vt extends ${constructor(t){super(),this.type=R.TEXT_COLOR,this.textColor=this.formatTextColor(t)}static from(t){return[R.TEXT_COLOR,new Vt(t)]}get isFormattingOnly(){return!0}toJSON(){return{textColor:this.textColor.key}}clone(){return new Vt(this.textColor.key)}renderClass(){return null}renderStyle(){return{color:h.isDarkMode()?this.textColor.dark:this.textColor.light}}formatTextColor(t){return Rt.find((e=>e.key===t))||Rt[0]}}class Xt extends rt{constructor(){super(),this.isFlushable=!1}toAnnotation(){return null}}Xt.typeName="SyncUpSelectionAction";class qt extends S{constructor(t){super(),this.type=x.LINK_GROUP_NODE_SPLIT,this.splittedTextNodes=t}}class Yt extends At{constructor(){super(...arguments),this.applyTargetNode=null}handleAction(t,e){const n=e.getAnnotationByType(p.SELECTION_RANGE);if(this.setApplyTargetNode(null),t instanceof ct&&t.doSplit&&n){const{startContainer:t,endContainer:s,startOffset:r,endOffset:i}=n.range,o=t===s&&r===i;e.parent.children=e.parent.children.flatMap((t=>{if(t.id===e.id){if(o)return this.insertNewNode(r,e);if(this.shouldSplitSelection(n.range)&&e.isContentEditable()){const s=this.splitTextNode(n.range,e);return t.annotationMap.has("LINK")&&t.apply(new qt(s)),s}return this.setApplyTargetNode(e),e}return t}))}return this.applyTargetNode}insertNewNode(t,e){const n=e.cloneWithText("");this.setApplyTargetNode(n);const s=e.parent.children.findIndex((t=>t===e));return 0===t||!e.isContentEditable()&&t===s?[n,e]:t===e.text.length||!e.isContentEditable()&&t===s+1?[e,n]:[e.cloneWithText(e.text.substring(0,t)),n,e.cloneWithText(e.text.substring(t))]}shouldSplitSelection(t){const{startContainer:e,endContainer:n,startOffset:s,endOffset:r}=t;return e!==n||s>0||r<(n.textContent?n.textContent.length:0)}splitTextNode(t,e){const{startContainer:n,endContainer:s,startOffset:r}=t,i=n.parentElement,o=s.parentElement,c=(t,n,s)=>{const r=t.substring(0,n),i=t.substring(n,s),o=t.substring(s);return[e.cloneWithText(r),e.cloneWithText(i),e.cloneWithText(o)]},a=i&&A.getEntityByDOM(i),l=o&&A.getEntityByDOM(o);if(a&&a.id===e.id){const i=n===s?t.endOffset:e.text.length,[o,a,l]=c(e.text,r,i);return this.setApplyTargetNode(a),[o,a,l].filter((t=>!!t.text))}if(l&&l.id===e.id){const[n,s,r]=c(e.text,0,t.endOffset);return this.setApplyTargetNode(s),[n,s,r].filter((t=>!!t.text))}return this.setApplyTargetNode(e),e}setApplyTargetNode(t){this.applyTargetNode=t}}class Zt extends w{constructor(){super(...arguments),this.type=p.CLEAR_FORMATTING,this.items=[R.BOLD,R.ITALIC,R.UNDERLINE,R.STRIKETHROUGH,R.TEXT_COLOR,R.CODE,j.CUSTOM_STYLE]}}class Qt extends ct{constructor(){super(...arguments),this.isFlushable=!0}toAnnotation(){return new Zt}}Qt.typeName="ClearFormattingAnnotationAction";class te extends ct{constructor(t){super(),this.isFlushable=!0,this.code=t}toAnnotation(){return new Lt(this.code)}}te.typeName="CodeAnnotationAction";class ee extends ct{constructor(t){super(),this.isFlushable=!0,this.italic=t}toAnnotation(){return new Ct(this.italic)}}ee.typeName="ItalicAnnotationAction";class ne extends ct{constructor(t){super(),this.isFlushable=!0,this.strikethrough=t}toAnnotation(){return new Nt(this.strikethrough)}}ne.typeName="StrikethroughAnnotationAction";class se extends ct{constructor(t){super(),this.isFlushable=!0,this.underline=t}toAnnotation(){return new bt(this.underline)}}se.typeName="UnderlineAnnotationAction";class re extends At{handleAction(t,e){const n=t.toAnnotation();if(t instanceof mt)e.annotationMap.delete(t.annotationType);else{if(!(n instanceof Zt))return n instanceof $||n instanceof vt?(t instanceof at&&(c(t.newText)&&(e.text=t.newText),e.parent.apply(new lt(t.link.groupKey,[e],t.type))),t instanceof te&&this.handleAction(new Qt,e),t instanceof wt&&this.updateCustomStyleAnnotation(e,["fontWeight"]),t instanceof ee&&this.updateCustomStyleAnnotation(e,["fontStyle"]),(t instanceof se||t instanceof ne)&&this.updateCustomStyleAnnotation(e,["textDecoration"]),void e.annotationMap.set(n.type,n)):void 0;n.items.forEach((t=>{e.deleteAnnotationByType(t)}))}}}class ie extends S{constructor(){super(...arguments),this.type=x.DELETE_LINK_GROUP}}class oe extends At{handleAction(t,e){e.text=t.newTextContent,!e.text&&e.annotationMap.has("LINK")&&e.apply(new ie)}}class ce extends S{constructor(t){super(),this.type=x.UPDATE_TEXT,this.newTextContent="",this.newTextContent=t}}class ae extends At{handleAction(t,e){this.replaceSelectedText(t.textToBeInsert,t.currentRange,e)}replaceSelectedText(t,e,n){if(e&&e.startContainer&&e.endContainer){const{startContainer:s,endContainer:r,startOffset:i,endOffset:o}=e;let c=n.text;if(s===r&&i===o&&t)c=n.text.slice(0,i)+t+n.text.slice(i);else{const e=s.parentElement,a=r.parentElement,l=e&&A.getEntityByDOM(e),u=a&&A.getEntityByDOM(a);let h=0,d=n.text.length;l&&l===n?(h=i,d=s===r?o:d):u&&u===n&&(d=o),c=n.text.slice(0,h)+t+n.text.slice(d)}n.apply(new ce(c))}}}class le extends w{constructor(t){super(),this.type=R.INLINE_HTML,this.htmlTag=t}static from(t){const{htmlTag:e,child:n,customStyle:s,customClass:r,customAttribute:i}=t,o=new le(e);return o.groupId=t.groupId,o.child=n?le.from(n)[1]:void 0,o.customAttribute=i?K.from(i)[1]:void 0,o.customClass=r?U.from(r)[1]:void 0,o.customStyle=s?G.from(s)[1]:void 0,[R.INLINE_HTML,o]}clone(){var t,e,n,s;const r=new le(this.htmlTag);return r.groupId=this.groupId,r.child=null===(t=this.child)||void 0===t?void 0:t.clone(),r.customAttribute=null===(e=this.customAttribute)||void 0===e?void 0:e.clone(),r.customClass=null===(n=this.customClass)||void 0===n?void 0:n.clone(),r.customStyle=null===(s=this.customStyle)||void 0===s?void 0:s.clone(),r}renderProps(){var t,e,n;return Object.assign(Object.assign({},null===(t=this.customAttribute)||void 0===t?void 0:t.render()),{style:null===(e=this.customStyle)||void 0===e?void 0:e.renderStyle(),class:null===(n=this.customClass)||void 0===n?void 0:n.renderClass().join(" ")})}toJSON(){var t,e,n,s;return{inlineHtml:d({htmlTag:this.htmlTag,groupId:this.groupId,child:null===(t=this.child)||void 0===t?void 0:t.toJSON().inlineHtml,customAttribute:null===(e=this.customAttribute)||void 0===e?void 0:e.toJSON().customAttribute,customClass:null===(n=this.customClass)||void 0===n?void 0:n.toJSON().customClass,customStyle:null===(s=this.customStyle)||void 0===s?void 0:s.toJSON().customStyle})}}}class ue extends At{handleAction(t,e){const n=e.parent.getAnnotationByType(p.LINK_GROUP);if(n){const s=e.annotationMap.get("LINK").link.groupKey,r=n.linkGroups.get(s);if(r){const i=r.indexOf(e);-1!==i&&(r.splice(i,1,...Array.isArray(t.splittedTextNodes)?t.splittedTextNodes:[t.splittedTextNodes]),n.linkGroups.set(s,r))}}}}class he extends At{handleAction(t,e){const n=e.parent.getAnnotationByType(p.LINK_GROUP);if(n){const t=e.annotationMap.get(R.LINK).link.groupKey,s=n.linkGroups.get(t);if(s){const r=s.indexOf(e);-1!==r&&s.splice(r,1),0===s.length&&n.linkGroups.delete(t),0===n.linkGroups.size&&e.parent.annotationMap.delete(p.LINK_GROUP)}}e.annotationMap.delete(R.LINK)}}class de extends ${constructor(t){super(),this.type=R.PLAIN_TEXT,this.plainText=!0,this.plainText=t}static from(t){return[R.PLAIN_TEXT,new de(t)]}get isFormattingOnly(){return!0}clone(){return new de(this.plainText)}renderClass(){}renderStyle(){}toJSON(){return this.plainText?{plainText:this.plainText}:void 0}}class fe extends ct{constructor(t){super(),this.isFlushable=!0,this.textColor=t}toAnnotation(){return new Vt(this.textColor)}}fe.typeName="TextColorAnnotationAction";class pe extends X{constructor(t,e,n,s){super(t,s),this.type=_.TEXT,this.parent=n,this.text=e,this.registerModifyStrategy()}static supportsHtmlTag(t){return["span","code"].includes(t)}static from(t,e,n={autoMatchFormat:!0}){const s=new pe(t.id,t.text,e),{annotations:r}=t;return r&&(s.annotationMap=this.generateTextAnnotationMap(r,n,e,s)),s}static generateTextAnnotationMap(t,e,n,s){return new Map(Object.keys(t).map((r=>("link"===r&&t.link&&n&&s&&n.apply(new lt(t.link.groupKey,[s],"link")),this.createAnnotationEntity(r,t[r],e)))).filter(c))}static createAnnotationEntity(t,e,n){const s=!(!n||!n.autoMatchFormat);switch(t){case"bold":return gt.from(e);case"italic":return Ct.from(e);case"underline":return bt.from(e);case"strikethrough":return Nt.from(e);case"code":return Lt.from(e,s);case"textColor":return Vt.from(e);case"link":return ot.from(e,s);case"inlineHtml":return le.from(e);case"plainText":return de.from(e)}return X.createAnnotationEntity(t,e)}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof $||t instanceof J||t instanceof le)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"text",text:this.text})}toHtml(t){const e=this.getAnnotationByType(R.INLINE_HTML);return e?this.renderWithWrapperStr(e,t):this.renderTextStr(t)}cloneWithText(t){return new pe(u(),t,this.parent,super.cloneAnnotations())}clone(t){return new pe(this.id,this.text,t,super.cloneAnnotations())}isEmpty(){return!(this.getAnnotationByType(R.INLINE_HTML)||this.text&&"​"!==this.text&&"\n"!==this.text)}isTextNode(){return!0}getRangeEndOffset(){return!this.isContentEditable()&&this.parent?this.parent.children.indexOf(this)+1:"\n"===this.text?0:this.text.length}getRangeContainer(){const t=this.getElementRef();if(t)return this.isContentEditable()?t.firstChild:t.parentElement}isContentEditable(){return!0}getPlainText(){return this.text}getInlineHtmlTagAtDepth(t){const e=this.getInlineHtmlAnnotationAtDepth(t);return e?Dt.has(e.htmlTag)?null:{htmlTag:e.htmlTag,attrStr:this.annotationAttrStr(e),groupId:e.groupId,annotation:e}:null}renderHtmlFromDepth(t,e){if(0===t)return this.toHtml(e);const n=this.getInlineHtmlAnnotationAtDepth(t);return n?this.renderWithWrapperStr(n,e):this.renderTextStr(e)}getInlineHtmlAnnotationAtDepth(t){let e=this.getAnnotationByType(R.INLINE_HTML);for(let n=0;n<t&&e;n++)e=e.child;return e}registerModifyStrategy(){const t=this.typeName;pe.registerActionStrategyStatus[t]||(this.isContentEditable()&&(H.register(x.UPDATE_TEXT,t,new oe),H.register(x.REPLACE_SELECTED_TEXT,t,new ae),H.register(x.LINK_GROUP_NODE_SPLIT,t,new ue),H.register(at.typeName,t,new re)),H.register(ct.typeName,t,new Yt),H.register(x.DELETE_LINK_GROUP,t,new he),H.register(wt.typeName,t,new re),H.register(Qt.typeName,t,new re),H.register(ee.typeName,t,new re),H.register(se.typeName,t,new re),H.register(fe.typeName,t,new re),H.register(ne.typeName,t,new re),H.register(te.typeName,t,new re),H.register(rt.typeName,t,new re),pe.registerActionStrategyStatus[t]=!0)}doAnnotationActionApply(t){const e=this.getAnnotationByType(p.SELECTION_RANGE);if(t instanceof ct&&t.doSplit&&e){const e=H.get(ct.typeName,this.typeName);if(e){const n=e.execute(t,this);n&&this.applyActionToNode(n,t)}}else this.applyActionToNode(this,t);"function"==typeof this.parent.mergeNodes&&this.parent.mergeNodes(t)}doModifyActionApply(t){H.executeTheStrategy(t,this)}applyActionToNode(t,e){const n=e.toAnnotation();if(e instanceof Xt)return void this.syncUpSelectedNodes(t);n instanceof vt||this.syncUpSelectedNodes(t);const s=H.get(e.typeName,t.typeName);if(s)return void s.execute(e,t);const r=H.get(rt.typeName,pe.typeName);r&&r.execute(e,t)}syncUpSelectedNodes(n){const r=this.getElementRef();if(r){const i=e.getSubjectFromParentNodeByEventId(r,s);i&&t.notify(i,{node:n})}}renderWithWrapperStr(t,e){const{htmlTag:n,child:s}=t,r=this.annotationAttrStr(t);return s?`<${n}${r}>${this.renderWithWrapperStr(s,e)}</${n}>`:Dt.has(n)?`<${n}${r}>`:this.text?`<${n}${r}>${this.renderTextStr(e)}</${n}>`:`<${n}${r}></${n}>`}annotationAttrStr(t){const{customAttribute:e,customClass:n,customStyle:s}=t,r=[...(null==e?void 0:e.toString())||[],null==n?void 0:n.toString(),null==s?void 0:s.toString()].filter(c);return r.length>0?` ${r.join(" ")}`:""}renderTextStr(t){var e;const n=(null===(e=this.getAnnotationByType(R.CODE))||void 0===e?void 0:e.code)?"code":"span",s=super.generateAttributeString(t);return"\n"===this.text?"<br>":this.shouldSkipEmptyFormattingMarker()?"":this.shouldRenderAsPlainText()?this.text:`<${n}${s}>${"code"===n?T(this.text):this.text}</${n}>`}shouldSkipEmptyFormattingMarker(){return""===this.text&&this.annotationMap.size>0&&Array.from(this.annotationMap.values()).every((t=>t.isFormattingOnly))}shouldRenderAsPlainText(){const t=super.getAnnotationByType(R.PLAIN_TEXT);return!!t&&t.plainText&&0===Array.from(this.annotationMap.values()).filter((t=>t instanceof $&&!(t instanceof ot)&&!(t instanceof de)||t instanceof J)).length}}pe.registerActionStrategyStatus={},pe.htmlTag="span",pe.typeName="RTETextNode";class ge extends At{handleAction(t,e){const n=t.blockNeedToBeMerged;if(e.type===n.type||"image"!==e.type&&"image"!==n.type){let t=n.children;"image"!==n.type&&(t=n.children.filter((t=>t.text))),e.apply(new Z(t)),"image"!==e.type&&this.transferLinkGroups(t,e),n.parent.apply(new Et(n))}}transferLinkGroups(t,e){t.forEach((t=>{if(!(t instanceof pe))return;const n=t.getAnnotationByType(R.LINK);n&&e.apply(new lt(n.link.groupKey,[t],"link"))}))}}class we extends At{handleAction(t,e){t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset,e)}lineBreakSingleBlock(t,e,n){if(t){const s=new pe(u(),"\n",n),r=t.text.slice(0,e),i=t.text.slice(e),o=n.children.indexOf(t);if(o>-1){const c=n.children.slice(0,o),a=n.children.slice(o+1);t.isContentEditable()?(r&&c.push(t.cloneWithText(r)),i&&a.unshift(t.cloneWithText(i))):e>0?c.push(t):a.unshift(t),this.mergeLineBreakNodes(c,s,a,n)}return s}}mergeLineBreakNodes(t,e,n,s){if(0===n.length||n[0]&&""===n[0].text){const e=t[t.length-1];n.push(new pe(u(),"\n",s,e&&new Map(e.annotationMap)))}s.apply(new yt([...t,e,...n]))}}class me extends At{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,e){const n=e.children,s=new pe(u(),"\n",e),r=this.concatBlocksNodes(t.slice(1));return this.mergeLineBreakNodes(n,s,r,e),s}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new Et(t)))})),e}mergeLineBreakNodes(t,e,n,s){(0===n.length||n[0]&&""===n[0].text)&&n.push(new pe(u(),"\n",s,t[t.length-1]&&t[t.length-1].annotationMap)),s.apply(new yt([...t,e,...n]))}}class Ae extends S{constructor(t,...e){super(),this.type=x.INSERT_CHILDREN_BEFORE,this.referChildren=t,this.childrenToBeInserted=e}}class xe extends S{constructor(t,e){super(),this.type=x.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=t,this.startOffsetOfNode=e}}function Se(t,e){const n=new Set(t.filter((t=>"RTEListItemBlock"===t.typeName)));return t.filter((t=>{if("RTEListItemBlock"!==t.typeName)return!0;let s=t.parent;for(;s.parent&&"RTEListItemBlock"===s.parent.typeName;){const r=s.parent;if(n.has(r))return t.parent.type=e,!1;s=r.parent}return!0}))}class ye extends rt{constructor(t){super(),this.isFlushable=!0,this.textAlign=t}toAnnotation(){return new M(this.textAlign)}}ye.typeName="HorizontalAlignmentAnnotationAction";class Oe extends At{handleAction(t,e){this.updateCustomStyleAnnotation(e,["textAlign"])}}class Te extends rt{constructor(t){super(),this.isFlushable=!0,this.indent=t}toAnnotation(){return new F(this.indent)}}Te.typeName="IndentAnnotationAction";class Ee extends Y{constructor(t,e,n){super(t),this.children=[],this.type=e;const{autoMatchFormat:s}=n||{autoMatchFormat:!0};s&&(this.annotationMap=Ee.isAcceptableTextStyle(e)?new Map([st.from(e)]):new Map([st.from("paragraph")]))}static from(t,e={autoMatchFormat:!0}){var n,s;const r=new Ee(t.id,t.type,e),i=e.autoMatchFormat?Object.assign(Object.assign({},t.annotations),{textStyle:null!==(s=null===(n=t.annotations)||void 0===n?void 0:n.textStyle)&&void 0!==s?s:r.type}):t.annotations;return r.children=Ee.convertNodes(t.nodes,r,e),i&&super.convertAnnotationsToMap(r.annotationMap,i),r}static convertNodes(t,e,n){return t.map((t=>{const s=q.getRTENodeClass(t.type);if(s)return s.from(t,e,n)})).filter(c)}static createAnnotationEntity(t,e){return"textStyle"===t?st.from(e):super.createAnnotationEntity(t,e)}static isAcceptableTextStyle(t){return["title","subtitle","paragraph","heading-1","heading-2","heading-3","heading-4","heading-5","heading-6"].includes(t)}mergeNodes(t){this.children=this.children.reduce(((e,n)=>{const s=e.at(-1);if(t instanceof at&&t.needMergeNode){const t=null==s?void 0:s.getAnnotationByType(R.LINK),r=n.getAnnotationByType(R.LINK);if(t&&r&&t.toEqual(r))return e}return[...e,n]}),[])}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,nodes:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=this.getBlockTag(),n=super.generateAttributeString(t),s=this.getChildrenHtml(t);return super.shouldRenderAsInternalWrapper()?s:[`<${e}${n}>`,s,`</${e}>`].join("")}cloneWithNodes(t){const e=new Ee(u(),this.type);return e.annotationMap=super.cloneAnnotations(),e.apply(new Z(t)),e}clone(t){const e=new Ee(this.id,this.type);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}isNotEmpty(){return this.children.length>0&&this.children.some((t=>!t.isEmpty()))}getLastNode(){return this.children[this.children.length-1]}getBlockTag(){switch(this.type){case"title":case"subtitle":return"div";case"heading-1":return"h1";case"heading-2":return"h2";case"heading-3":return"h3";case"heading-4":return"h4";case"heading-5":return"h5";case"heading-6":return"h6";case"paragraph":default:return"p"}}getChildrenHtml(t){if(!this.isNotEmpty())return"<br>";const e=this.getAnnotationByType(p.LINK_GROUP);let n=this.renderGroupedNodesAtDepth(this.children,0,t);return e&&this.children.length>0&&(n=this.generateLinkHtml(e,n,t)),n}doAnnotationActionApply(t){const e=H.get(t.typeName,Ee.typeName);e&&e.execute(t,this)}renderGroupedNodesAtDepth(t,e,n){var s;let r="",i=0;for(;i<t.length;){const o=t[i].getInlineHtmlTagAtDepth(e);if(!(null==o?void 0:o.groupId)){r+=t[i].renderHtmlFromDepth(e,n),i++;continue}let c=i+1;for(;c<t.length&&(null===(s=t[c].getInlineHtmlTagAtDepth(e))||void 0===s?void 0:s.groupId)===o.groupId;)c++;if(c===i+1)r+=t[i].renderHtmlFromDepth(e,n);else{const s=this.renderGroupedNodesAtDepth(t.slice(i,c),e+1,n);r+=`<${o.htmlTag}${o.attrStr}>${s}</${o.htmlTag}>`}i=c}return r}generateLinkHtml(t,e,n){e="";let s=[];for(let r=0;r<this.children.length;r++){const i=this.children[r].getAnnotationByType(R.LINK),o=this.children[r+1]?this.children[r+1].getAnnotationByType(R.LINK):null;if(i){if(s.push(this.children[r]),!o||i.link.groupKey!==o.link.groupKey){const r=t.toString(i,{standalone:!0,filterInlineStyles:null==n?void 0:n.filterInlineStyles});e+=[`<a${r?` ${r}`:""}>`,this.renderGroupedNodesAtDepth(s,0,n),"</a>"].join(""),s=[]}}else e+=this.children[r].toHtml(n)}return e}}Ee.typeName="RTETextBlock",H.register(it.typeName,Ee.typeName,new xt),H.register(ye.typeName,Ee.typeName,new Oe),H.register(Te.typeName,Ee.typeName,new class extends At{handleAction(t,e){this.updateCustomStyleAnnotation(e,["marginLeft"])}}),H.register(lt.typeName,Ee.typeName,new class extends At{handleAction(t,e){let n=e.getAnnotationByType(p.LINK_GROUP);if("update_link"===t.type){if(n){const e=n.linkGroups.get(t.groupKey);e&&n.linkGroups.set(t.groupKey,[e[0]])}}else{if(n){const e=n.linkGroups.get(t.groupKey)||[];n.linkGroups.set(t.groupKey,[...e,...t.nodes])}else n=t.toAnnotation(),n.linkGroups.set(t.groupKey,[...t.nodes]);e.annotationMap.set(p.LINK_GROUP,n)}}}),H.register(x.UNLINK_LINK_GROUP,Ee.typeName,new class extends At{handleAction(t,e){const n=e.getAnnotationByType(p.LINK_GROUP);n&&(n.linkGroups.size>1?n.linkGroups.delete(t.groupKey):e.annotationMap.delete(p.LINK_GROUP))}}),H.register(x.SPLIT_BLOCK_WITH_NODE,Ee.typeName,new Ot),H.register(x.REPLACE_CHILD_NODES,Ee.typeName,new Tt),H.register(x.MERGE_TWO_BLOCKS_NODES,Ee.typeName,new ge),H.register(x.LINE_BREAK_SINGLE_BLOCK,Ee.typeName,new we),H.register(x.LINE_BREAK_MULTIPLE_BLOCKS,Ee.typeName,new me),H.register(x.INSERT_IMAGE_TO_BLOCK,Ee.typeName,new class extends At{handleAction(t,e){const n=t.splitPointNode,s=t.startOffsetOfNode,r=t.imageBlockToBeInserted;if(this.isCaretPositionAtBlockEnd(e,n,s))e.parent.apply(new St(e,r));else if(this.isCaretPositionAtBlockStart(e,n,s))e.parent.apply(new Ae(e,r));else{const t=new xe(n,s);e.apply(t),e.parent.apply(new St(e,r))}}}),H.register(x.TRANSFORM_LIST_BLOCK,Ee.typeName,new class extends At{handleAction(t,e){const n=this.getRootContent(e);if(!n)return;const s=e.parent,r=n.createList(t.listType),i=Se(t.selectedBlocks,t.listType),o=i.map((t=>n.toListItem(t)));r.apply(new Z(o)),s.apply(new St(t.selectedBlocks[0],r)),i.forEach((t=>{t.parent.apply(new Et(t))}))}});class ve extends At{copyListAnnotations(t,e){t.annotationMap.forEach(((t,n)=>{e.annotationMap.set(n,t.clone())}))}haveSameListAnnotations(t,e){var n,s;const r=Array.from(t.annotationMap.keys()).sort(),i=Array.from(e.annotationMap.keys()).sort();return JSON.stringify(r)===JSON.stringify(i)&&JSON.stringify(this.normalizeAnnotationValue(null!==(n=t.toJSON().annotations)&&void 0!==n?n:{}))===JSON.stringify(this.normalizeAnnotationValue(null!==(s=e.toJSON().annotations)&&void 0!==s?s:{}))}normalizeAnnotationValue(t){if(Array.isArray(t))return t.map((t=>this.normalizeAnnotationValue(t)));if(t&&"object"==typeof t){const e=t;return Object.keys(e).sort().reduce(((t,n)=>(t[n]=this.normalizeAnnotationValue(e[n]),t)),{})}return t}}class Ne extends Ee{constructor(t,e,n){super(t,"list-item",n),this.nestList=[],this.nestList=e}static from(t,e={autoMatchFormat:!0}){const n=new Ne(t.id,void 0,e);n.children=Ne.convertNodes(t.nodes,n,e),t.children&&(n.nestList=t.children.map((t=>{const s=_e.from(t,e);return s.parent=n,s})));const{annotations:s}=t;return s&&Object.entries(s).forEach((([t,e])=>{const s=this.createAnnotationEntity(t,e);c(s)&&n.annotationMap.set(...s)})),n}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){var e;const n=super.generateAttributeString(t),s=(null===(e=this.nestList)||void 0===e?void 0:e.length)?this.nestList.map((e=>e.toHtml(t))).join(""):"";return[`<li${n}>`,this.getChildrenHtml(t),s,"</li>"].join("")}cloneWithNodes(t){const e=new Ne(u());return e.children=[],e.apply(new Z(t)),e}getLastNode(){return this.nestList&&this.nestList.length>0?this.nestList[this.nestList.length-1].getLastNode():super.getLastNode()}getPlainText(){var t;const e=(null!==(t=this.nestList)&&void 0!==t?t:[]).map((t=>t.getPlainText())).join("");return super.getPlainText()+e}createNewListItem(){return new Ne(u())}clone(t){var e;const n=new Ne(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}}Ne.typeName="RTEListItemBlock",H.register(it.typeName,Ne.typeName,new xt),H.register(ye.typeName,Ne.typeName,new Oe),H.register(x.LINE_BREAK_SINGLE_BLOCK,Ne.typeName,new we),H.register(x.LINE_BREAK_MULTIPLE_BLOCKS,Ne.typeName,new me),H.register(x.DELETE_NEST_LIST,Ne.typeName,new class extends At{handleAction(t,e){e.nestList&&(e.nestList=e.nestList.length>1?e.nestList.filter((e=>e!==t.nestListBlockToBeRemoved)):void 0)}}),H.register(x.SPLIT_BLOCK_WITH_NODE,Ne.typeName,new Ot),H.register(x.REPLACE_CHILD_NODES,Ne.typeName,new Tt),H.register(x.REPLACE_NEST_LIST,Ne.typeName,new class extends ve{handleAction(t,e){const n=this.mergeAdjacentSameType(t.newList);n.forEach((t=>{t.parent=e})),e.nestList=n}mergeAdjacentSameType(t){if(t.length<=1)return t;const e=[t[0]];for(let n=1;n<t.length;n++){const s=e[e.length-1],r=t[n];s.type===r.type&&this.haveSameListAnnotations(s,r)?(r.children.forEach((t=>{t.parent=s})),s.children=s.children.concat(r.children)):e.push(r)}return e}}),H.register(x.MERGE_TWO_BLOCKS_NODES,Ne.typeName,new ge),H.register(x.INSERT_IMAGE_TO_BLOCK,Ne.typeName,new class extends At{handleAction(t,e){e.parent.apply(t)}});class be extends S{constructor(t){super(),this.type=x.REPLACE_NEST_LIST,this.newList=t}}class Ce extends S{constructor(t){super(),this.type=x.TRANSFORM_PARAGRAPH_BLOCK,this.isFlushable=!0,this.selectedBlocks=t}}class Le extends Y{constructor(t,e){super(t),this.type="html-block",this.children=[],this.htmlTag=e}static from(t,e){const n=new Le(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 Le(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 Dt.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()))})}}Le.typeName="RTEHtmlBlock";class ke extends At{getOrderedContiguousItems(t,e){const n=[...e].sort(((e,n)=>t.children.indexOf(e)-t.children.indexOf(n))),s=t.children.indexOf(n[0]);return s<0?[]:t.children.slice(s,s+n.length).every(((t,e)=>t===n[e]))?n:[]}}class Re extends S{constructor(t){super(),this.type=x.DELETE_NEST_LIST,this.nestListBlockToBeRemoved=t}}class je extends m{constructor(){super(...arguments),this.type=g.LIST}static getDefaultStyles(){return{paddingLeft:"8px",marginLeft:"16px"}}static getDefaultMarkerStyles(){return{fontSize:"16px"}}renderStyle(t){return(null==t?void 0:t.standalone)?je.getDefaultStyles():null}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte--list"}clone(){return new je}toJSON(){}}class _e extends Y{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(g.LIST,new je)}static from(t,e={autoMatchFormat:!0}){const n=new _e(t.id,t.type,e),{annotations:s}=t;return s&&Object.entries(s).forEach((([t,e])=>{const s=this.createAnnotationEntity(t,e);c(s)&&n.annotationMap.set(...s)})),n.children=t.blocks.map((t=>{const s=Ne.from(t,e);return s.parent=n,s})),n}static createAnnotationEntity(t,e){switch(t){case"customAttribute":return K.from(e);case"customClass":return U.from(e);case"customStyle":return G.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 _e(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"}}_e.typeName="RTEListBlock",H.register(x.TRANSFORM_LIST_BLOCK,_e.typeName,new class extends ve{handleAction(t,e){var n;const s=t.selectedBlocks,r=s.every((t=>t.parent===e)),i=this.getRootContent(e);if(!i)return;if(e.parent instanceof Ne){if(r){const r=this.createListFromSource(i,e,t.listType);r.apply(new Z(e.children));const o=e.parent,c=(null!==(n=o.nestList)&&void 0!==n?n:[]).map((t=>t===e?r:t));o.apply(new be(c)),s.forEach((t=>t.children.map((t=>t.apply(new Xt)))))}else this.handleCrossListTransform(t,e);return}if(!r&&s.every((t=>t instanceof Ne))){const e=new Set(s.map((t=>t.parent))),n=new Set;e.forEach((e=>{e.type!==t.listType&&this.convertListTypeInPlace(e,t.listType)}));const r=new Set;return s.forEach((t=>{const e=t.parent;e.parent instanceof Ne||(n.add(e),r.add(e.parent))})),r.forEach((t=>{for(let e=0;e<t.children.length-1;){const s=t.children[e],r=t.children[e+1];s instanceof _e&&r instanceof _e&&s.type===r.type&&this.haveSameListAnnotations(s,r)&&n.has(s)&&n.has(r)?(s.apply(new Z([...r.children])),t.apply(new Et(r)),n.delete(r)):e++}})),void s.forEach((t=>t.children.map((t=>t.apply(new Xt)))))}const o=this.createListFromSource(i,e,t.listType),c=e.parent;if(r)o.apply(new Z(e.children)),c.apply(new St(e,o)),c.apply(new Et(e)),s.forEach((t=>t.children.map((t=>t.apply(new Xt)))));else{const n=Se(t.selectedBlocks,t.listType),s=n.map((t=>i.toListItem(t)));o.apply(new Z(s)),c.apply(new St(e,o)),n.forEach((t=>{t.parent.apply(new Et(t))})),0===e.children.length&&c.apply(new Et(e))}}convertListTypeInPlace(t,e){var n;const s=this.getRootContent(t);if(!s)return;const r=t.parent,i=this.createListFromSource(s,t,e);if(i.apply(new Z([...t.children])),r instanceof Ne){const e=(null!==(n=r.nestList)&&void 0!==n?n:[]).map((e=>e===t?i:e));r.apply(new be(e))}else r.apply(new St(t,i)),r.apply(new Et(t))}handleCrossListTransform(t,e){if(!(e.parent instanceof Ne))return;const n=this.getRootContent(e);if(!n)return;const s=e.parent,r=s.nestList,i=new Set(t.selectedBlocks.filter((t=>t instanceof Ne)).map((t=>t.parent)).filter((t=>r.includes(t))));if(!i.size)return;const o=r.map((e=>{if(!i.has(e))return e;const s=this.createListFromSource(n,e,t.listType);return s.apply(new Z(e.children)),s}));s.apply(new be(o)),t.selectedBlocks.forEach((t=>t.children.map((t=>t.apply(new Xt)))))}createListFromSource(t,e,n){const s=t.createList(n);return this.copyListAnnotations(e,s),s}}),H.register(x.TRANSFORM_PARAGRAPH_BLOCK,_e.typeName,new class extends ve{handleAction(t,e){const n=this.getSelectedSegments(t.selectedBlocks);0!==n.length&&this.hasConsistentTargetAndRoot(n,e)&&(this.syncSelection(n),[...n].reverse().forEach((t=>this.transformSegment(t))))}hasConsistentTargetAndRoot(t,e){if(t[0][0].parent!==e)return!1;const n=this.getRootContent(e);return Boolean(n&&t.every((t=>t.every((t=>this.getRootContent(t)===n)))))}syncSelection(t){t.forEach((t=>{t.forEach((t=>{t.children.forEach((t=>t.apply(new Xt)))}))}))}transformSegment(t){const e=t[0].parent,n=new Ce(t);e.parent instanceof Ne?this.handleNestedListCase(n,e):this.handleRootListCase(n,e)}handleRootListCase(t,e){const n=this.getRootContent(e);let s=!1,r=!1;const i=t.selectedBlocks,o=[];if(i.forEach((t=>{var n;t===e.children[0]&&(s=!0),t===e.children[e.children.length-1]&&(r=!0),o.push(this.toParagraph(t));for(const e of null!==(n=t.nestList)&&void 0!==n?n:[])this.appendListBlock(o,e)})),s)e.parent.apply(new Ae(e,...o));else if(r)e.parent.apply(new St(e,...o));else{const t=e.children.indexOf(i[0]),s=e.children.indexOf(i[i.length-1]),r=this.createListFromSource(n,e);r.apply(new Z(e.children.slice(0,t)));const c=this.createListFromSource(n,e);c.apply(new Z(e.children.slice(s+1)));const a=o[o.length-1];a instanceof _e&&c.children.length>0&&a.type===c.type&&this.haveSameListAnnotations(a,c)?(a.apply(new Z(c.children)),e.parent.apply(new Ae(e,r,...o))):e.parent.apply(new Ae(e,r,...o,c)),e.parent.apply(new Et(e))}if(i.map((t=>{t.nestList=[],e.apply(new Et(t))})),0===e.children.length)e.parent.apply(new Et(e));else if(s){const t=o[o.length-1];t instanceof _e&&t.type===e.type&&this.haveSameListAnnotations(t,e)&&(t.apply(new Z([...e.children])),e.parent.apply(new Et(e)))}}handleNestedListCase(t,e){const n=t.selectedBlocks,s=this.getRootContent(e),r=e.children.indexOf(n[0]),i=[];n.forEach((t=>{var e;i.push(this.toParagraph(t));for(const n of null!==(e=t.nestList)&&void 0!==e?e:[])this.appendListBlock(i,n)}));const o=e.children.indexOf(n[n.length-1]),c=e.children.slice(o+1),a=[];let l=e;for(;l.parent instanceof Ne;){const t=l.parent,e=t.parent,n=e.children.indexOf(t),s=t.nestList,r=s.indexOf(l),i=s.slice(r+1);a.push({list:e,ancestorIndex:n,trailingNestLists:i}),l=e}const u=l,h=u.parent,d=[];c.length>0&&d.push({items:c,sourceList:e});for(const t of a){for(const e of t.trailingNestLists)e.children.length>0&&d.push({items:[...e.children],sourceList:e});const e=t.list.children.slice(t.ancestorIndex+1);e.length>0&&d.push({items:e,sourceList:t.list})}const f=[];for(const t of d){const e=f[f.length-1];e&&e.sourceList.type===t.sourceList.type&&this.haveSameListAnnotations(e.sourceList,t.sourceList)?e.items.push(...t.items):f.push({items:[...t.items],sourceList:t.sourceList})}f.map((t=>{const e=this.createListFromSource(s,t.sourceList);return e.apply(new Z(t.items)),e})).forEach((t=>this.appendListBlock(i,t))),e.children=e.children.slice(0,r);const p=e.parent,g=p.nestList,w=g.indexOf(e);let m=g.slice(0,w+1);0===e.children.length&&(m=m.filter((t=>t!==e))),p.apply(new be(m));for(const t of a)if(t.list.children=t.list.children.slice(0,t.ancestorIndex+1),t.trailingNestLists.length>0){const e=t.list.children[t.ancestorIndex],n=e.nestList,s=n.indexOf(t.trailingNestLists[0]);if(s>=0){const t=n.slice(0,s);e.apply(new be(t))}}h.apply(new St(u,...i))}getSelectedSegments(t){const e=Array.from(new Set(t.filter((t=>t instanceof Ne)))).map((t=>({item:t,path:this.getStructuralPath(t)}))).filter((t=>null!==t.path)).sort(((t,e)=>this.compareStructuralPaths(t.path,e.path))).map((t=>t.item)),n=[];for(const t of e){const e=n[n.length-1],s=null==e?void 0:e[e.length-1];(null==s?void 0:s.parent)===t.parent&&t.parent.children.indexOf(t)-t.parent.children.indexOf(s)==1?e.push(t):n.push([t])}return n}getStructuralPath(t){var e;const n=[],s=new Set;let r=t,i=t.parent;for(;!s.has(i);){s.add(i);const t=i.children.indexOf(r);if(t<0)return null;if(n.unshift(t),"VegaRTEContent"===i.parent.typeName||"RTEHtmlBlock"===i.parent.typeName){const t=this.getContainerPath(i);return t?[...t,...n]:null}if(!(i.parent instanceof Ne))return null;const o=i.parent,c=(null!==(e=o.nestList)&&void 0!==e?e:[]).indexOf(i);if(c<0)return null;n.unshift(c),r=o,i=o.parent}return null}getContainerPath(t){const e=[],n=new Set;let s=t,r=t.parent;for(;r instanceof Le;){if(n.has(r))return null;n.add(r);const t=r.children.indexOf(s);if(t<0)return null;e.unshift(t),s=r,r=r.parent}const i=r.children.indexOf(s);return i<0?null:(e.unshift(i),e)}compareStructuralPaths(t,e){const n=Math.min(t.length,e.length);for(let s=0;s<n;s++)if(t[s]!==e[s])return t[s]-e[s];return t.length-e.length}appendListBlock(t,e){const n=t[t.length-1];n instanceof _e&&n.type===e.type&&this.haveSameListAnnotations(n,e)?n.apply(new Z([...e.children])):t.push(e)}createListFromSource(t,e){const n=t.createList(e.type);return this.copyListAnnotations(e,n),n}toParagraph(t){const e=new Ee(u(),"paragraph");return e.apply(new Z(t.children)),e.annotationMap=t.annotationMap,e}}),H.register(x.INSERT_IMAGE_TO_BLOCK,_e.typeName,new class extends At{handleAction(t,e){e.parent.apply("list-item"!==e.parent.type?new St(e,t.imageBlockToBeInserted):t)}}),H.register(x.NEST_LIST_ITEMS,_e.typeName,new class extends ke{handleAction(t,e){var n,s;const r=this.getOrderedContiguousItems(e,t.selectedBlocks);if(!r.length)return;const i=e.children.indexOf(r[0]);if(i<=0)return;const o=e.children[i-1],c=new Set(r);let a=null===(n=o.nestList)||void 0===n?void 0:n[o.nestList.length-1];a||(a=new _e(u(),e.type),o.apply(new be([...null!==(s=o.nestList)&&void 0!==s?s:[],a]))),e.children=e.children.filter((t=>!c.has(t))),a.children=a.children.concat(r),r.forEach((t=>{var e;t.parent=a,(null===(e=t.nestList)||void 0===e?void 0:e.length)&&this.unifyDescendantNestLists(t,t.nestList[0].type),t.children.forEach((t=>t.apply(new Xt)))}))}unifyDescendantNestLists(t,e){var n;if(!(null===(n=t.nestList)||void 0===n?void 0:n.length))return;let s=!1;for(const n of t.nestList){n.type!==e&&(n.type=e,s=!0);for(const t of n.children)this.unifyDescendantNestLists(t,e)}s&&t.apply(new be([...t.nestList]))}}),H.register(x.UNNEST_LIST_ITEMS,_e.typeName,new class extends ke{handleAction(t,e){var n;const s=this.getOrderedContiguousItems(e,t.selectedBlocks),r=e.parent;if(!(s.length&&r instanceof Ne))return;const i=e.children.indexOf(s[0]),o=e.children.indexOf(s[s.length-1]);if(i<0||o<i)return;const c=r,a=c.parent,l=a.children.indexOf(c);if(l<0)return;const h=e.children.slice(o+1),d=new Set(s);if(e.children=e.children.filter((t=>!d.has(t))),a.children=[...a.children.slice(0,l+1),...s,...a.children.slice(l+1)],s.forEach((t=>{t.parent=a,t.children.forEach((t=>t.apply(new Xt)))})),h.length>0){const t=new Set(h);e.children=e.children.filter((e=>!t.has(e)));const r=s[s.length-1];let i=null===(n=r.nestList)||void 0===n?void 0:n[r.nestList.length-1];if(i&&i.type!==e.type&&(i=null),!i){i=new _e(u(),e.type);const t=Array.isArray(r.nestList)?r.nestList:[];r.apply(new be([...t,i]))}i.children=i.children.concat(h),h.forEach((t=>{t.parent=i}))}const f=this.collectTrailingNestLists(c,e);if(f.length>0){const t=s[s.length-1],e=Array.isArray(t.nestList)?t.nestList:[];t.apply(new be([...e,...f]))}0===e.children.length&&c.apply(new Re(e))}collectTrailingNestLists(t,e){var n;const s=null!==(n=t.nestList)&&void 0!==n?n:[],r=s.indexOf(e);if(r<0||r>=s.length-1)return[];const i=s.slice(r+1);return t.apply(new be(s.slice(0,r+1))),i}});class $e extends At{getPreviousNode(t){var e;const n=t.parent,s=n.children.indexOf(t);if(s>0)return n.children[s-1];if(n.parent){if(n.isListItemBlock()&&0===n.parent.children.indexOf(n)&&n.parent.parent instanceof Ne){const t=n.parent.parent;if(0!==(null!==(e=t.nestList)&&void 0!==e?e:[]).indexOf(n.parent)){const t=this.getPreviousBlock(n);return t?this.getBlockLastNode(t):null}const s=t.children;return s.length>0?s[s.length-1]:null}const t=this.getPreviousBlock(n);if(t)return this.getBlockLastNode(t)}}getNextNode(t){const e=t.parent,n=e.children.indexOf(t);if(e.children[n+1])return e.children[n+1];if(e.parent){const t=this.getNextBlock(e);if(t)return this.getBlockFirstNode(t)}}isContentFirstNode(t){const e=t.parent,n=e.children.indexOf(t),s=e.parent;if(e.isListItemBlock()){const t=s.parent;return 0===n&&Array.isArray(s.children)&&s.children[0]===e&&"list-item"!==t.type&&Array.isArray(t.children)&&t.children[0]===s}return 0===n&&Array.isArray(s.children)&&s.children[0]===e}getPreviousBlock(t){var e;if(t.parent instanceof Ne){const n=null!==(e=t.parent.nestList)&&void 0!==e?e:[],s=n.indexOf(t);if(s>0)return n[s-1];if(0===s)return t.parent}if(t&&t.parent&&t.parent.children){const e=t.parent.children.indexOf(t);if(e>0)return t.parent.children[e-1];if(this.isRTEBlock(t.parent)&&0===e)return this.getPreviousBlock(t.parent)}}getBlockLastNode(t){return t.getLastNode()}getBlockFirstNode(t){if("number-list"===t.type||"bullet-list"===t.type){if(t.children)return this.getBlockFirstNode(t.children[0])}else if(t.children)return t.children[0]}getNextBlock(t){if(t&&t.parent&&t.parent.children){const e=t.parent.children.indexOf(t);if(t.parent.children[e+1])return t.parent.children[e+1];if("list-item"===t.type&&t.parent.children.length===e+1)return this.getNextBlock(t.parent)}}isRTEBlock(t){return t&&"VegaRTEContent"!==t.typeName}}class Ie extends S{constructor(t,e){super(),this.isFlushable=!0,this.type=x.UPDATE_CODE_BLOCK,this.content=t,this.language=e}}class Be extends rt{constructor(t){super(),this.isFlushable=!1,this.range=t}toAnnotation(){return new vt(this.range)}}Be.typeName="SelectionChangeAction";class De extends X{constructor(){super(...arguments),this.type="decorator-node",this.isSelected=!1}static isDecoratorNodeContainerElement(t){return t&&t.classList.contains(De.DECORATOR_CONTAINER_CLASS)}static getDecoratorNodeElement(t){return t.querySelector(`.${De.DECORATOR_NODE_CLASS}`)}getRangeEndOffset(){return 1}getRangeContainer(){const t=this.getElementRef();if(t)return f(t,`.${De.DECORATOR_CONTAINER_CLASS}`)}isContentEditable(){return!1}}De.typeName="RTEDecoratorNode",De.DECORATOR_CONTAINER_CLASS="v-internal-decorator-container",De.DECORATOR_NODE_CLASS="v-internal-decorator-node";class Me extends k{constructor(){super(...arguments),this.stylesToBeFiltered=Me.STYLES,this.elementTagName="pre code"}canFilter(t){return I.isCodeBlockNode(t)}canRefill(t,e){return!1}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}Me.STYLES={boxSizing:"border-box",color:"rgba(var(--v-text-primary, 32, 54, 69, 1))",textAlign:"left",fontFamily:"'Roboto Mono'",fontWeight:"400",lineHeight:"22px",fontSize:"16px",whiteSpace:"pre-wrap",minHeight:"22px",tabSize:"2px"};class Fe extends De{constructor(t,e,n,s){super(t),this.type=_.CODE_BLOCK_NODE,this.text="",this.annotationMap=new Map,this.text=e,this.parent=s,this.language=n,this.annotationMap.set(j.CUSTOM_STYLE,new G(Me.STYLES))}toJSON(){return{id:this.id,type:"text",text:this.text,language:this.language}}getPlainText(){return this.text}toHtml(t){return`<code${this.generateAttributeString(t)}>${O(this.text)}</code>`}clone(t){return new Fe(this.id,this.text,this.language,t)}doAnnotationActionApply(t){H.executeTheStrategy(t,this)}doModifyActionApply(t){H.executeTheStrategy(t,this)}}Fe.typeName="RTECodeBlockNode",H.register(x.UPDATE_CODE_BLOCK,Fe.typeName,new class extends At{handleAction(t,e){const{content:n,language:s}=t;e.language=s,e.text=n}}),H.register(Be.typeName,Fe.typeName,new class extends At{handleAction(t,e){e.annotationMap.set(p.SELECTION_RANGE,t.toAnnotation())}});var Pe;!function(t){t.CSS="css",t.HTML="html",t.JavaScript="js",t.JSX="jsx",t["Plain Text"]="plainText",t.TypeScript="ts",t.TSX="tsx"}(Pe||(Pe={}));class He extends At{handleAction(t,e){e.children=e.children.filter((e=>e!==t.entityToBeRemoved)),0===e.children.length&&"parent"in e&&e.parent&&(e.isListItemBlock()&&e.nestList&&e.nestList.length||e.parent.apply(new Et(e)))}}class Je extends k{constructor(){super(...arguments),this.stylesToBeFiltered=Je.STYLES,this.elementTagName="pre"}canFilter(t){return I.isCodeBlock(t.typeName)}canRefill(t,e){return!1}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}Je.STYLES={backgroundColor:"rgba(var(--v-bg-secondary, 245, 247, 247, 1))",padding:"12px"};class Ke extends Y{constructor(t,e,n){super(t),this.type="code-block",this.annotationMap=new Map([G.from(Je.STYLES)]),this.children=[new Fe(`${t}-1`,e,n,this)]}static from(t){return new Ke(t.id,t.content,t.language)}toJSON(){const{language:t,text:e}=this.children[0];return{id:this.id,type:"code-block",content:e,language:t}}toHtml(t){const{language:e=Pe["Plain Text"]}=this.children[0];return`<pre data-language="${e}"${super.generateAttributeString(t)}>${this.children.map((e=>e.toHtml(t)))}</pre>`}clone(t){const e=Ke.from(this.toJSON());return e.parent=t,e}apply(s){if(s instanceof S&&H.executeTheStrategy(s,this),s.isFlushable){const s=A.getDOMByEntity(this);if(s){const r=e.getSubjectFromParentNodeByEventId(s,n);r&&t.notify(r,{})}}}isNotEmpty(){return!!this.children.length}getLastNode(){return this.children[0]}isSelected(){return this.children[0].annotationMap.has(p.SELECTION_RANGE)}}Ke.typeName="RTECodeBlock",H.register(x.DELETE_CODE_BLOCK,Ke.typeName,new class extends $e{handleAction(t,e){const n=e.children[0],s=e.parent;if(s){let t=this.getPreviousNode(n),r=this.getRTENodeEndOffset(t);t||(t=this.getNextNode(n),r=0),s.apply(new Et(e));const i=t?A.getDOMByEntity(t):null;if(0===s.children.length){const n=Ee.from({id:u(),type:"paragraph",nodes:[{id:u(),type:"text",text:""}]});e.parent.apply(new Z([n])),t=n.children[0],r=0}this.notifyUpdateSelection(t,i,r,e)}}notifyUpdateSelection(n,r,i,o){const c=A.getDOMByEntity(o);if(c){const o=e.getSubjectFromParentNodeByEventId(c,s);o&&t.notify(o,{node:n,updateDirectly:!!r,offset:i})}}getRTENodeEndOffset(t){return t?t.getRangeEndOffset():0}}),H.register(x.DELETE_CHILDREN,Ke.typeName,new He),H.register(x.SWITCH_OUT_FROM_CODE_BLOCK,Ke.typeName,new class extends At{handleAction(n,r){const{content:i,language:o}=n,c=i.split("\n"),a=new Ie(c.slice(0,c.length-2).join("\n"),o);a.isFlushable=!1,r.children[0].apply(a);const l=Ee.from({id:u(),type:"paragraph",nodes:[{id:u(),text:"",type:"text"}]});r.parent.apply(new St(r,l));const h=A.getDOMByEntity(r);if(h){const n=e.getSubjectFromParentNodeByEventId(h,s);n&&t.notify(n,{node:l.children[0]})}}}),H.register(x.INSERT_IMAGE_TO_BLOCK,Ke.typeName,new class extends At{handleAction(t,e){e.parent.apply(new St(e,t.imageBlockToBeInserted))}}),Ke.CODE_BLOCK_PLACEHOLDER_CLASS_NAME="code-block-placeholder-element";export{ut as $,H as A,m as B,j as C,zt as D,$ as E,_ as F,J as G,Dt as H,St as I,T as J,yt as K,ge as L,S as M,R as N,Tt as O,ye as P,Oe as Q,pe as R,xe as S,$e as T,ce as U,Bt as V,He as W,Re as X,be as Y,_e as Z,ht as _,X as a,y as a0,Rt as a1,kt as a2,dt as a3,pt as a4,ft as a5,st as a6,Le as a7,I as a8,je as a9,gt as aA,g as aB,Qt as aC,te as aD,ne as aE,Te as aF,Ce as aG,_t as aH,$t as aI,Wt as aJ,Gt as aK,Pt as aL,Ft as aM,Ht as aN,M as aa,Lt as ab,Q as ac,B as ad,Je as ae,Me as af,Xt as ag,E as ah,wt as ai,mt as aj,v as ak,N as al,b as am,P as an,Pe as ao,U as ap,It as aq,jt as ar,at as as,Ie as at,Be as au,fe as av,Mt as aw,ee as ax,se as ay,it as az,Y as b,Ee as c,Jt as d,W as e,At as f,Z as g,Ae as h,p as i,x as j,rt as k,Et as l,K as m,q as n,k as o,De as p,Ke as q,Ne as r,A as s,Fe as t,G as u,V as v,L as w,C as x,Ut as y,Kt as z}
@@ -1 +1 @@
1
- import{h as e,r as t,H as i,g as s}from"./p-6b2342e0.js";import{c as o,V as r,I as a}from"./p-6e1ab235.js";import{V as n,I as l}from"./p-5c8e4e8f.js";import{s as c}from"./p-519a7d55.js";import{T as p}from"./p-7f711049.js";import{V as d}from"./p-c0eb8c58.js";import{D as f,d as h}from"./p-36a57431.js";import{d as m}from"./p-a83cef5a.js";import{f as v}from"./p-aa135628.js";import{C as g}from"./p-2d0d575f.js";import{t as b}from"./p-53e3f259.js";import{i as u,n as j,s as S,P as y}from"./p-9dcecdd3.js";import"./p-cb378636.js";import"./p-331a62d5.js";var R=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};class w extends r{render(){return"pageSizeSelectorMobile"===this.type?this.renderPageSizeSelectorMobile():this.renderPageSizeSelectorMobileAndCurrentPageLabel()}renderPageSizeSelectorMobile(){const e=d.tWithPreservedBlocks("Show [{0} items / page]",w.clickableReg,this.pageSize);return this.renderTranslatedMessage(e)}renderPageSizeSelectorMobileAndCurrentPageLabel(){const e=this.total>0?this.pageSize*(this.current-1)+1:0,t=Math.min(this.current*this.pageSize,this.total),i=d.tWithPreservedBlocks("Viewing [{0}-{1}] of {2}",w.clickableReg,e,t,this.total);return this.renderTranslatedMessage(i)}renderTranslatedMessage(t){return e("vega-flex",{alignItems:"center",justifyContent:"center",gap:"size-4"},t.map((t=>t.isPreserved?this.pageSizeSelectorMobileDropdownRenderer.render(e("vega-button-link",{label:t.content})):e("vega-font",{variant:"font-field-label",color:"text-primary"},t.content))))}}w.clickableReg=/(\[[^\]]*\])/g,R([o()],w.prototype,"translationSlimmer",void 0),R([o()],w.prototype,"type",void 0),R([o()],w.prototype,"pageSize",void 0),R([o()],w.prototype,"total",void 0),R([o()],w.prototype,"current",void 0),R([o()],w.prototype,"pageSizeSelectorMobileDropdownRenderer",void 0);var z=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};class M extends r{render(t){var i;const s=(this.isAllActive||u(this.pageSizeSelectorOptions,this.pageSize)?this.pageSizeSelectorOptions:[...this.pageSizeSelectorOptions,this.pageSize]).map(j),o=S(s),r=this.translationSlimmer.t("Items Per Page");return e("vega-dropdown",{trigger:"click",selectType:"single",alignment:"center",minWidth:160,selectedSourceKey:(this.isAllActive?y:this.pageSize).toString(),source:[{key:"items-per-page",label:r,children:[...o.map((e=>({key:e.value.toString(),label:e.label})))]}],ref:e=>{f.addUniqueObserverToNode(e,m,(e=>{this.notifyParentPagination(e.detail)}))},isScreenPosition:null===(i=this.dropdownProps)||void 0===i?void 0:i.isScreenPosition},t)}notifyParentPagination(e){const t=v(this.host,"vega-pagination");t&&g.notify(h.getSubject(t,b),{host:this.host,detail:e})}}z([o()],M.prototype,"host",void 0),z([o()],M.prototype,"translationSlimmer",void 0),z([o()],M.prototype,"pageSizeSelectorOptions",void 0),z([o({writable:!0})],M.prototype,"pageSize",void 0),z([o()],M.prototype,"dropdownProps",void 0),z([o()],M.prototype,"total",void 0),z([o()],M.prototype,"isAllActive",void 0);var P=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};const O=class{constructor(e){t(this,e),this.globalSlimmers=new Map,this.translationSlimmer=new p,this.vegaComponentUsageRuntimeMetricsSlimmer=new n,this.pageSizeSelectorMobileRenderer=new w,this.pageSizeSelectorMobileDropdownRenderer=new M,this.pageSize=10,this.pageSizeSelectorOptions=[10,20,50,100],this.total=0,this.current=1,this.isAllActive=!1}render(){return c(e(i,null,this.pageSizeSelectorMobileRenderer.render()),this.host)}get host(){return s(this)}};P([l()],O.prototype,"globalSlimmers",void 0),P([a()],O.prototype,"translationSlimmer",void 0),P([a()],O.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),P([a()],O.prototype,"pageSizeSelectorMobileRenderer",void 0),P([a()],O.prototype,"pageSizeSelectorMobileDropdownRenderer",void 0),O.style=":host{display:inline-block}";export{O as vega_pagination_page_size_selector_mobile}
1
+ import{h as e,r as t,H as i,g as s}from"./p-6b2342e0.js";import{c as o,V as r,I as a}from"./p-6e1ab235.js";import{V as n,I as l}from"./p-5c8e4e8f.js";import{s as c}from"./p-519a7d55.js";import{T as p}from"./p-a7ed55d8.js";import{V as d}from"./p-347d664e.js";import{D as f,d as h}from"./p-36a57431.js";import{d as m}from"./p-a83cef5a.js";import{f as v}from"./p-aa135628.js";import{C as g}from"./p-2d0d575f.js";import{t as u}from"./p-53e3f259.js";import{i as b,n as j,s as S,P as y}from"./p-9dcecdd3.js";import"./p-cb378636.js";import"./p-331a62d5.js";var R=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};class w extends r{render(){return"pageSizeSelectorMobile"===this.type?this.renderPageSizeSelectorMobile():this.renderPageSizeSelectorMobileAndCurrentPageLabel()}renderPageSizeSelectorMobile(){const e=d.tWithPreservedBlocks("Show [{0} items / page]",w.clickableReg,this.pageSize);return this.renderTranslatedMessage(e)}renderPageSizeSelectorMobileAndCurrentPageLabel(){const e=this.total>0?this.pageSize*(this.current-1)+1:0,t=Math.min(this.current*this.pageSize,this.total),i=d.tWithPreservedBlocks("Viewing [{0}-{1}] of {2}",w.clickableReg,e,t,this.total);return this.renderTranslatedMessage(i)}renderTranslatedMessage(t){return e("vega-flex",{alignItems:"center",justifyContent:"center",gap:"size-4"},t.map((t=>t.isPreserved?this.pageSizeSelectorMobileDropdownRenderer.render(e("vega-button-link",{label:t.content})):e("vega-font",{variant:"font-field-label",color:"text-primary"},t.content))))}}w.clickableReg=/(\[[^\]]*\])/g,R([o()],w.prototype,"translationSlimmer",void 0),R([o()],w.prototype,"type",void 0),R([o()],w.prototype,"pageSize",void 0),R([o()],w.prototype,"total",void 0),R([o()],w.prototype,"current",void 0),R([o()],w.prototype,"pageSizeSelectorMobileDropdownRenderer",void 0);var z=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};class M extends r{render(t){var i;const s=(this.isAllActive||b(this.pageSizeSelectorOptions,this.pageSize)?this.pageSizeSelectorOptions:[...this.pageSizeSelectorOptions,this.pageSize]).map(j),o=S(s),r=this.translationSlimmer.t("Items Per Page");return e("vega-dropdown",{trigger:"click",selectType:"single",alignment:"center",minWidth:160,selectedSourceKey:(this.isAllActive?y:this.pageSize).toString(),source:[{key:"items-per-page",label:r,children:[...o.map((e=>({key:e.value.toString(),label:e.label})))]}],ref:e=>{f.addUniqueObserverToNode(e,m,(e=>{this.notifyParentPagination(e.detail)}))},isScreenPosition:null===(i=this.dropdownProps)||void 0===i?void 0:i.isScreenPosition},t)}notifyParentPagination(e){const t=v(this.host,"vega-pagination");t&&g.notify(h.getSubject(t,u),{host:this.host,detail:e})}}z([o()],M.prototype,"host",void 0),z([o()],M.prototype,"translationSlimmer",void 0),z([o()],M.prototype,"pageSizeSelectorOptions",void 0),z([o({writable:!0})],M.prototype,"pageSize",void 0),z([o()],M.prototype,"dropdownProps",void 0),z([o()],M.prototype,"total",void 0),z([o()],M.prototype,"isAllActive",void 0);var P=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};const O=class{constructor(e){t(this,e),this.globalSlimmers=new Map,this.translationSlimmer=new p,this.vegaComponentUsageRuntimeMetricsSlimmer=new n,this.pageSizeSelectorMobileRenderer=new w,this.pageSizeSelectorMobileDropdownRenderer=new M,this.pageSize=10,this.pageSizeSelectorOptions=[10,20,50,100],this.total=0,this.current=1,this.isAllActive=!1}render(){return c(e(i,null,this.pageSizeSelectorMobileRenderer.render()),this.host)}get host(){return s(this)}};P([l()],O.prototype,"globalSlimmers",void 0),P([a()],O.prototype,"translationSlimmer",void 0),P([a()],O.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),P([a()],O.prototype,"pageSizeSelectorMobileRenderer",void 0),P([a()],O.prototype,"pageSizeSelectorMobileDropdownRenderer",void 0),O.style=":host{display:inline-block}";export{O as vega_pagination_page_size_selector_mobile}
@@ -0,0 +1 @@
1
+ import{L as e}from"./p-6e1ab235.js";import{C as t}from"./p-2d0d575f.js";import{U as a}from"./p-cb378636.js";const n={"This field is required":"This field is required","The minimum input value is {0}":"The minimum input value is {0}","The maximum input value is {0}":"The maximum input value is {0}","The end value should be greater than the start value":"The end value should be greater than the start value","The end date should be later than start date":"The end date should be later than start date","Credit card number is invalid":"Credit card number is invalid","Please enter the correct email format.":"Please enter the correct email format.","The maximum input length is {0}":"The maximum input length is {0}","The start date should be later than {0}":"The start date should be later than {0}","The start date should be earlier than {0}":"The start date should be earlier than {0}","The end date should be earlier than {0}":"The end date should be earlier than {0}","The date should be later than {0}":"The date should be later than {0}","The date should be earlier than {0}":"The date should be earlier than {0}","The minimum input length is {0}":"The minimum input length is {0}","The end time should be later than start time":"The end time should be later than start time","Phone number is not valid":"Phone number is not valid","Phone number is valid but it belongs to country {0}, not country {1}":"Phone number is valid but it belongs to country {0}, not country {1}","The value does not exist in the source":"The value does not exist in the source","There are values that do not exist in the source":"There are values that do not exist in the source",Viewing:"Viewing",Show:"Show","Go To":"Go To","Viewing {0}-{1} of {2}":"Viewing {0}-{1} of {2}","Viewing [{0}-{1}] of {2}":"Viewing [{0}-{1}] of {2}","Show [{0} items / page]":"Show [{0} items / page]","Items Per Page":"Items Per Page",Upload:"Upload",Clear:"Clear",Today:"Today","Previous month":"Previous month","Next month":"Next month",Day:"Day",Week:"Week",Month:"Month",Sun:"Sun",Mon:"Mon",Tue:"Tue",Wed:"Wed",Thu:"Thu",Fri:"Fri",Sat:"Sat","Sun-short":"S","Mon-short":"M","Tue-short":"T","Wed-short":"W","Thu-short":"T","Fri-short":"F","Sat-short":"S","Sun-full":"Sunday","Mon-full":"Monday","Tue-full":"Tuesday","Wed-full":"Wednesday","Thu-full":"Thursday","Fri-full":"Friday","Sat-full":"Saturday",January:"January",February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",Jan:"Jan",Feb:"Feb",Mar:"Mar",Apr:"Apr",Jun:"Jun",Jul:"Jul",Aug:"Aug",Sep:"Sep",Oct:"Oct",Nov:"Nov",Dec:"Dec","All Day":"All Day","Select or drop your file here":"Select or drop your file here","Please sign here":"Please sign here","Clear Signature":"Clear Signature","Start Date":"Start Date","End Date":"End Date","Please select":"Please select","Select All":"Select All","No options":"No options","No results found":"No results found",Minimum:"Minimum",Maximum:"Maximum","Select Time":"Select Time","Start Time":"Start Time","End Time":"End Time","There is no data to display":"There is no data to display","Text Styles":"Text Styles",Bold:"Bold",Italic:"Italic",Underline:"Underline",Strikethrough:"Strikethrough",Code:"Code","Text Color":"Text Color","Left Align":"Left Align","Center Align":"Center Align","Right Align":"Right Align",Justified:"Justified","Line Height":"Line Height",Bullets:"Bullets",Numbers:"Numbers","More Indent":"More Indent","Less Indent":"Less Indent",Link:"Link",Image:"Image",Delete:"Delete",Preview:"Preview","Are you sure you want to delete this image?":"Are you sure you want to delete this image?",OK:"OK","Upload from computer":"Upload from computer","Insert via URL":"Insert via URL","Image via URL":"Image via URL",Insert:"Insert","Clear Style":"Clear Style","Find and replace":"Find and replace","Find in text":"Find in text","Previous match":"Previous match","Next match":"Next match",Find:"Find",Close:"Close","Replace with":"Replace with",Replace:"Replace","Replace All":"Replace All","Whole words":"Whole words","Match case":"Match case","Advanced options":"Advanced options","Link Type":"Link Type",URL:"URL",Email:"Email","E-Mail Address":"E-Mail Address","Message Subject":"Message Subject","Message Body":"Message Body",Text:"Text",Cancel:"Cancel",Submit:"Submit",Edit:"Edit",Unlink:"Unlink",Size:"Size","Alt Text":"Alt Text","Delete Image":"Delete Image",Sm:"Sm",Md:"Md",Lg:"Lg",Title:"Title",Subtitle:"Subtitle","Heading 1":"Heading 1","Heading 2":"Heading 2","Heading 3":"Heading 3",Paragraph:"Paragraph","Reset Selection":"Reset Selection","Select Language":"Select Language","Select language":"Select language",Tokens:"Tokens","Insert token":"Insert token",Save:"Save",Bookmark:"Bookmark","Select a bookmark":"Select a bookmark","No bookmarks available":"No bookmarks available","Bookmark name":"Bookmark name","Remove bookmark":"Remove bookmark","Edit bookmark":"Edit bookmark","Bookmark name cannot be empty":"Bookmark name cannot be empty","Bookmark name cannot contain spaces":"Bookmark name cannot contain spaces","Bookmark name already exists":"Bookmark name already exists",Functions:"Functions","Insert function":"Insert function",Conditional:"Conditional",Foreach:"Foreach","Delete Code":"Delete Code","Copy Code":"Copy Code","Code Block":"Code Block",Copied:"Copied","Repeat every {0} days":"Repeat every {0} days","Repeat daily":"Repeat daily","Repeat every {0} weeks on {1}":"Repeat every {0} weeks on {1}","Repeat weekly on {0}":"Repeat weekly on {0}","Repeat every {0} months on day {1}":"Repeat every {0} months on day {1}","Repeat monthly on day {0}":"Repeat monthly on day {0}","Repeat every {0} years on {1} {2}":"Repeat every {0} years on {1} {2}","Repeat yearly on {0} {1}":"Repeat yearly on {0} {1}","until {0}":"until {0}","after {0} occurrences":"after {0} occurrences",Sunday:"Sunday",Monday:"Monday",Tuesday:"Tuesday",Wednesday:"Wednesday",Thursday:"Thursday",Friday:"Friday",Saturday:"Saturday",am:"am",pm:"pm","{0} Selected":"{0} Selected","date picker":"Date Picker",notification:"notification","Selected result":"Selected result","Close event preview detail":"Close event preview detail","Edit event":"Edit event","Delete event":"Delete event","More actions":"More actions","Expand accordion":"Expand accordion","Collapse accordion":"Collapse accordion","Expand {0} accordion":"Expand {0} accordion","Collapse {0} accordion":"Collapse {0} accordion","Clear color":"Clear color","Color swatch":"Color swatch","Color {0}":"Color {0}",Apply:"Apply","Enter color":"Enter color","Horizontal line":"Horizontal line","Enter fullscreen mode":"Enter fullscreen mode","Exit fullscreen mode":"Exit fullscreen mode","Block quote":"Block quote","Special Characters":"Special Characters",All:"All",Latin:"Latin",Mathematical:"Mathematical",Arrows:"Arrows",Currency:"Currency","Use rich text":"Use rich text","Rich Text Editor. Editing area: main. ":"Rich Text Editor. Editing area: main. ","Use plain text":"Use plain text","Paste options":"Paste options",Required:"Required",Disabled:"Disabled",Optional:"Optional",Previous:"Previous",Next:"Next",Copy:"Copy",Cut:"Cut","Use Word":"Use Word","Table tools":"Table tools","Table properties":"Table properties","Cell properties":"Cell properties","Align table left":"Align table left","Align table center":"Align table center","Align table right":"Align table right","Align text left":"Align text left","Align text center":"Align text center","Align text right":"Align text right","Justify text":"Justify text","Align vertically top":"Align vertically top","Align vertically middle":"Align vertically middle","Align vertically bottom":"Align vertically bottom"};class o{constructor(){this.resources={en:n},this._currentLanguage="en"}get currentLanguage(){return this._currentLanguage}init({resources:o,language:i}){o&&Object.keys(o).length>0?this.resources=o:(e.warn('Resources are empty. Falling back to default language "en".'),this.resources={en:n}),i&&i in this.resources?this._currentLanguage=i:(e.warn(`Language "${i}" not found in resources. Falling back to default language "en".`),this._currentLanguage="en"),t.notify(a,{})}changeLanguage(n){this.resources[n]?(this._currentLanguage=n,t.notify(a,{})):e.warn(`Language "${n}" not found in resources.`)}t(e,...t){return t.reduce(((e,t,a)=>e.replace(new RegExp(`\\{${a}\\}`,"g"),String(t))),this.resources[this._currentLanguage][e]||n[e]||e)}registerComponent(e){const t=o.connectedComponents.get(e.tagName);t?t.add(e):o.connectedComponents.set(e.tagName,new Set([e]))}unRegisterComponent(e){const t=o.connectedComponents.get(e.tagName);t&&t.delete(e)}getConnectedComponents(){return o.connectedComponents}tWithPreservedBlocks(e,t=/(\[[^\]]*\])/g,...a){return this.t(e,...a).split(t).map((e=>{const a=t.test(e);return{content:a?e.substring(1,e.length-1):e,isPreserved:a}}))}}o.connectedComponents=new Map;const i=new o;export{i as V,n as s}
@@ -1 +1 @@
1
- import{h as t,H as e,r as i,c as s,g as r}from"./p-6b2342e0.js";import{c as a,M as o,V as n,I as h}from"./p-6e1ab235.js";import{V as p,I as l}from"./p-5c8e4e8f.js";import{s as d}from"./p-519a7d55.js";import{N as u,O as c,c as m,Q as f,R as v}from"./p-a83cef5a.js";import{D as g}from"./p-36a57431.js";import{F as b}from"./p-cb378636.js";import{C as x}from"./p-2d0d575f.js";import{c as w}from"./p-3b6a6f08.js";import{K as j}from"./p-23781e76.js";import{C as y}from"./p-abad8ffd.js";import{F as I}from"./p-5a347a15.js";import{R}from"./p-8bc15ed0.js";import"./p-331a62d5.js";import"./p-aa135628.js";import"./p-6a334573.js";import"./p-29584bb5.js";import"./p-b75ee3ba.js";import"./p-d86e0b01.js";import"./p-4d20a56f.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-c0eb8c58.js";import"./p-5f377954.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-53e3f259.js";import"./p-cc569b54.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-abd7aeaa.js";import"./p-71909102.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-7d3419c7.js";var V=function(t,e,i,s){var r,a=arguments.length,o=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(a<3?r(o):a>3?r(e,i,o):r(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o};class C extends n{constructor(){super(...arguments),this.vegaInputRefs=[],this.focusInputPasscode=()=>{this.vegaInputRefs[0]&&this.vegaInputRefs[0].doFocus()},this.handleVegaFocus=t=>()=>{0!==t&&(this.vegaInputRefs[t].tabIndex=null);const e=this.vegaInputValues.get(t)?t:this.valueController.getFirstEmptyIndex(),i=-1===e?this.length-1:e;this.currentIndex=i,this.vegaInputRefs[i].doFocus()},this.handleVegaBlur=t=>()=>{0!==t&&(this.vegaInputRefs[t].tabIndex=-1)},this.handleVegaChange=t=>e=>{var i;const s=e.detail||"";if(2===s.length||1===s.length&&!this.vegaInputValues.get(t)){const e=this.generateNewInputValue(t,s);this.vegaInputValues.set(t,e),null===(i=this.vegaInputRefs[t+1])||void 0===i||i.doFocus()}},this.handleVegaPaste=()=>t=>{t.preventDefault();const e=t.detail.getData("text");this.valueController.setValuesArray(e),this.vegaInputRefs[this.value.length<this.length?this.value.length:this.length-1].doFocus()}}watchLengthAndInputType(){this.valueController.setValuesArray(this.value)}getVegaInputRefs(){return this.vegaInputRefs}getCurrentIndex(){return this.currentIndex}getInputPasscodeContainerRef(){return this.inputPasscodeContainerRef}render(){const i=Array.from({length:this.length}).map(((e,i)=>t("vega-input",{class:"small"===this.size?"small":"medium",key:i,"data-tabindex":0!==i?-1:0,showClearIcon:!1,disabled:this.disabled,"data-aria-hidden":String(!this.isInputAccessibleForScreenReader(i)),"data-aria-label":`Passcode input ${i+1} of ${this.length}`,value:this.vegaInputValues.get(i)||"",autocomplete:0===i?"one-time-code":"off",inputmode:"text"===this.inputType?"text":"numeric",ref:t=>{this.vegaInputRefs[i]=t,g.addUniqueObserverToNode(t,u,this.handleVegaFocus(i)),g.addUniqueObserverToNode(t,c,this.handleVegaBlur(i)),g.addUniqueObserverToNode(t,m,this.handleVegaChange(i)),g.addUniqueObserverToNode(t,f,this.handleVegaPaste())},maskConfig:{type:"custom-formatter",formatter:t=>this.valueController.valueValidationFilter(t)}})));return t(e,null,this.label&&this.renderLabel(),t("vega-flex",{class:"vega-input-passcode-container",direction:"row",gap:"size-8",role:"group","aria-label":this.label||"One-time password input",ref:t=>this.inputPasscodeContainerRef=t},i),this.hint&&t("vega-hint",null,this.hint))}renderLabel(){return t("vega-field-label",{onClick:this.focusInputPasscode,isFieldRequired:this.required,disabled:this.disabled,optional:this.optional,label:this.label})}getFirstEmptyIndexForRender(t){for(let e=0;e<t;e++)if(!this.vegaInputValues.get(e))return e;return-1}isInputAccessibleForScreenReader(t){const e=this.getFirstEmptyIndexForRender(this.length);return-1===e||t<=e}generateNewInputValue(t,e){if(2===e.length){for(let i=0;i<e.length;i++)if(e[i]!==this.vegaInputValues.get(t))return e[i];return this.vegaInputValues.get(t)}return e}}V([a()],C.prototype,"host",void 0),V([a()],C.prototype,"value",void 0),V([a()],C.prototype,"label",void 0),V([a()],C.prototype,"required",void 0),V([a()],C.prototype,"length",void 0),V([a()],C.prototype,"disabled",void 0),V([a()],C.prototype,"hint",void 0),V([a()],C.prototype,"size",void 0),V([a()],C.prototype,"inputType",void 0),V([a()],C.prototype,"vegaInputValues",void 0),V([a()],C.prototype,"valueController",void 0),V([a()],C.prototype,"optional",void 0),V([o("watchLengthAndInputType")],C.prototype,"watchLengthAndInputType",null);var A=function(t,e,i,s){var r,a=arguments.length,o=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(a<3?r(o):a>3?r(e,i,o):r(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o};class k extends n{componentWillLoad(){this.setValuesArray(this.value),this.value=this.vegaInputValues.join("")}watchValue(){this.setValuesArray(this.value),this.changeEventEmitter.emit(this.value),x.notify(b,{host:this.host,detail:this.value}),this.value.length===this.length&&this.completeEventEmitter.emit(this.value)}watchVegaInputValues(){for(let t=0;t<this.length;t++)this.inputPasscodeRenderer.getVegaInputRefs()[t]&&(this.inputPasscodeRenderer.getVegaInputRefs()[t].value=this.vegaInputValues.get(t)||"");this.value=this.vegaInputValues.join("")}setValuesArray(t){const e=this.valueValidationFilter(t).slice(0,this.length).split("");this.vegaInputValues.setAll(e)}valueValidationFilter(t){return t.replace("text"===this.inputType?/\s/g:/\D/g,"")}getFirstEmptyIndex(){var t;const{length:e}=this;return null!==(t=Array.from({length:e},((t,e)=>this.vegaInputValues.get(e)||"")).findIndex((t=>!t||""===t)))&&void 0!==t?t:-1}}A([a()],k.prototype,"host",void 0),A([a({writable:!0})],k.prototype,"value",void 0),A([a({writable:!0})],k.prototype,"vegaInputValues",void 0),A([a()],k.prototype,"length",void 0),A([a()],k.prototype,"inputType",void 0),A([a()],k.prototype,"inputPasscodeRenderer",void 0),A([a()],k.prototype,"changeEventEmitter",void 0),A([a()],k.prototype,"completeEventEmitter",void 0),A([o("componentWillLoad")],k.prototype,"componentWillLoad",null),A([o("watchValue")],k.prototype,"watchValue",null),A([o("watchVegaInputValues")],k.prototype,"watchVegaInputValues",null);var E=function(t,e,i,s){var r,a=arguments.length,o=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(a<3?r(o):a>3?r(e,i,o):r(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o};class L extends j{constructor(){super((t=>[{keyCode:"Backspace",activeElementInScope:[this.inputPasscodeRenderer.getInputPasscodeContainerRef()],eventName:"keydown",callback:e=>{t.deletePasscode(e)}},{keyCode:["ArrowLeft","ArrowRight"],activeElementInScope:[this.inputPasscodeRenderer.getInputPasscodeContainerRef()],eventName:"keydown",callback:e=>{t.controlDirectionByKeyboard(e)}}])),this.deletePasscode=t=>{t.preventDefault();const e=this.inputPasscodeRenderer.getCurrentIndex();this.vegaInputValues.get(e)?this.vegaInputValues.withMutation((t=>{for(let i=e;i<this.length-1;i++)t[i]=t[i+1];t[this.length-1]=""})):!this.vegaInputValues.get(e)&&e>0&&(this.vegaInputValues.set(e-1,""),this.inputPasscodeRenderer.getVegaInputRefs()[e-1].doFocus())}}controlDirectionByKeyboard(t){t.preventDefault();const e=this.inputPasscodeRenderer.getCurrentIndex(),i=this.inputPasscodeRenderer.getVegaInputRefs();"ArrowLeft"===t.key&&e>0&&i[e-1].doFocus(),"ArrowRight"===t.key&&this.vegaInputValues.get(e)&&e<this.length-1&&i[e+1].doFocus()}}E([a()],L.prototype,"value",void 0),E([a()],L.prototype,"length",void 0),E([a()],L.prototype,"vegaInputValues",void 0),E([a()],L.prototype,"valueController",void 0),E([a()],L.prototype,"inputPasscodeRenderer",void 0);class F{constructor(t,e){this.length=0,this.array=[],t&&(this.array=t,this.length=t.length),e&&(this.onMutate=e)}onMutate(t){}push(...t){return this.withMutation((e=>{e.push(...t)}))}pop(){return this.withMutation((t=>{t.length>0&&t.pop()}))}set(t,e){return this.withMutation((i=>{t>=0&&(i[t]=e)}))}setAll(t){return this.withMutation((e=>{e.length=0;for(let i=0;i<t.length;i++)e[i]=t[i]}))}clear(){return this.withMutation((t=>{t.length=0}))}withMutation(t){const e=[...this.array];t(e);const i=new F(e,this.onMutate);return this.onMutate(i),i}get(t){return this.array[t]}join(t){return this.array.join(t)}toArray(){return this.array}}var O=function(t,e,i,s){var r,a=arguments.length,o=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(a<3?r(o):a>3?r(e,i,o):r(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o};const T=class{constructor(t){i(this,t),this.vegaChange=s(this,"vegaChange",7),this.change=s(this,"change",7),this.vegaComplete=s(this,"vegaComplete",7),this.complete=s(this,"complete",7),this.globalSlimmers=new Map,this.formFieldController=new I({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new R:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputPasscodeRenderer.getInputPasscodeContainerRef(),touchableAreaGetter:()=>[...this.inputPasscodeRenderer.getVegaInputRefs()]}),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.keyboardController=new L,this.valueController=new k,this.inputPasscodeRenderer=new C,this.changeEventEmitter=w(T,m),this.completeEventEmitter=w(T,v),this.eventPreventSlimmer=new y([m],(()=>this.host),{useCapture:!0}),this.vegaInputValues=new F(new Array,(t=>{this.vegaInputValues=t})),this.label="",this.disabled=!1,this.size="medium",this.hint="",this.length=4,this.inputType="numeric",this.value="",this.required=!1,this.optional=!1,this.name="",this.validationRules=[],this.autoValidation=!0,this.isValid=null}watchVegaInputValues(){}watchLengthAndInputType(){}watchValue(){}watchValidationRules(){}render(){return d(this.inputPasscodeRenderer.render(),this.host)}get host(){return r(this)}static get watchers(){return{vegaInputValues:["watchVegaInputValues"],length:["watchLengthAndInputType"],inputType:["watchLengthAndInputType"],value:["watchValue"],validationRules:["watchValidationRules"]}}};O([l()],T.prototype,"globalSlimmers",void 0),O([h()],T.prototype,"formFieldController",void 0),O([h()],T.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),O([h()],T.prototype,"keyboardController",void 0),O([h()],T.prototype,"valueController",void 0),O([h()],T.prototype,"inputPasscodeRenderer",void 0),O([h()],T.prototype,"changeEventEmitter",void 0),O([h()],T.prototype,"completeEventEmitter",void 0),O([h()],T.prototype,"eventPreventSlimmer",void 0),T.style=':host{display:inline-block}:host vega-field-label{margin-bottom:8px}:host vega-input::part(input-container){padding-left:0px;padding-right:0px}:host vega-input.small{width:38px;height:42px;box-sizing:border-box}:host vega-input.medium{width:42px;height:50px;box-sizing:border-box}:host vega-input::part(input){text-align:center}:host vega-input.small::part(input-container){padding-top:8px;padding-bottom:8px}:host vega-input.medium::part(input-container){padding-top:12px;padding-bottom:12px}:host .vega-input-passcode-container.error vega-input::part(input-container){border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-input-passcode-container.error vega-input::part(input-container):hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-input-passcode-container.error vega-input::part(input-container):focus-within{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));box-shadow:0 0 0}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:8px;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}';export{T as vega_input_passcode}
1
+ import{h as t,H as e,r as i,c as s,g as r}from"./p-6b2342e0.js";import{c as o,M as a,V as n,I as h}from"./p-6e1ab235.js";import{V as p,I as l}from"./p-5c8e4e8f.js";import{s as d}from"./p-519a7d55.js";import{N as u,O as c,c as f,Q as m,R as v}from"./p-a83cef5a.js";import{D as g}from"./p-36a57431.js";import{F as b}from"./p-cb378636.js";import{C as x}from"./p-2d0d575f.js";import{c as w}from"./p-3b6a6f08.js";import{K as j}from"./p-a6346186.js";import{C as y}from"./p-abad8ffd.js";import{F as I}from"./p-fffc1f47.js";import{R}from"./p-8bc15ed0.js";import"./p-331a62d5.js";import"./p-aa135628.js";import"./p-6a334573.js";import"./p-29584bb5.js";import"./p-b75ee3ba.js";import"./p-c576f76b.js";import"./p-8e3c1c81.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-347d664e.js";import"./p-5f377954.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-53e3f259.js";import"./p-cc569b54.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-abd7aeaa.js";import"./p-71909102.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-7d3419c7.js";var V=function(t,e,i,s){var r,o=arguments.length,a=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(a=(o<3?r(a):o>3?r(e,i,a):r(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class C extends n{constructor(){super(...arguments),this.vegaInputRefs=[],this.focusInputPasscode=()=>{this.vegaInputRefs[0]&&this.vegaInputRefs[0].doFocus()},this.handleVegaFocus=t=>()=>{0!==t&&(this.vegaInputRefs[t].tabIndex=null);const e=this.vegaInputValues.get(t)?t:this.valueController.getFirstEmptyIndex(),i=-1===e?this.length-1:e;this.currentIndex=i,this.vegaInputRefs[i].doFocus()},this.handleVegaBlur=t=>()=>{0!==t&&(this.vegaInputRefs[t].tabIndex=-1)},this.handleVegaChange=t=>e=>{var i;const s=e.detail||"";if(2===s.length||1===s.length&&!this.vegaInputValues.get(t)){const e=this.generateNewInputValue(t,s);this.vegaInputValues.set(t,e),null===(i=this.vegaInputRefs[t+1])||void 0===i||i.doFocus()}},this.handleVegaPaste=()=>t=>{t.preventDefault();const e=t.detail.getData("text");this.valueController.setValuesArray(e),this.vegaInputRefs[this.value.length<this.length?this.value.length:this.length-1].doFocus()}}watchLengthAndInputType(){this.valueController.setValuesArray(this.value)}getVegaInputRefs(){return this.vegaInputRefs}getCurrentIndex(){return this.currentIndex}getInputPasscodeContainerRef(){return this.inputPasscodeContainerRef}render(){const i=Array.from({length:this.length}).map(((e,i)=>t("vega-input",{class:"small"===this.size?"small":"medium",key:i,"data-tabindex":0!==i?-1:0,showClearIcon:!1,disabled:this.disabled,"data-aria-hidden":String(!this.isInputAccessibleForScreenReader(i)),"data-aria-label":`Passcode input ${i+1} of ${this.length}`,value:this.vegaInputValues.get(i)||"",autocomplete:0===i?"one-time-code":"off",inputmode:"text"===this.inputType?"text":"numeric",ref:t=>{this.vegaInputRefs[i]=t,g.addUniqueObserverToNode(t,u,this.handleVegaFocus(i)),g.addUniqueObserverToNode(t,c,this.handleVegaBlur(i)),g.addUniqueObserverToNode(t,f,this.handleVegaChange(i)),g.addUniqueObserverToNode(t,m,this.handleVegaPaste())},maskConfig:{type:"custom-formatter",formatter:t=>this.valueController.valueValidationFilter(t)}})));return t(e,null,this.label&&this.renderLabel(),t("vega-flex",{class:"vega-input-passcode-container",direction:"row",gap:"size-8",role:"group","aria-label":this.label||"One-time password input",ref:t=>this.inputPasscodeContainerRef=t},i),this.hint&&t("vega-hint",null,this.hint))}renderLabel(){return t("vega-field-label",{onClick:this.focusInputPasscode,isFieldRequired:this.required,disabled:this.disabled,optional:this.optional,label:this.label})}getFirstEmptyIndexForRender(t){for(let e=0;e<t;e++)if(!this.vegaInputValues.get(e))return e;return-1}isInputAccessibleForScreenReader(t){const e=this.getFirstEmptyIndexForRender(this.length);return-1===e||t<=e}generateNewInputValue(t,e){if(2===e.length){for(let i=0;i<e.length;i++)if(e[i]!==this.vegaInputValues.get(t))return e[i];return this.vegaInputValues.get(t)}return e}}V([o()],C.prototype,"host",void 0),V([o()],C.prototype,"value",void 0),V([o()],C.prototype,"label",void 0),V([o()],C.prototype,"required",void 0),V([o()],C.prototype,"length",void 0),V([o()],C.prototype,"disabled",void 0),V([o()],C.prototype,"hint",void 0),V([o()],C.prototype,"size",void 0),V([o()],C.prototype,"inputType",void 0),V([o()],C.prototype,"vegaInputValues",void 0),V([o()],C.prototype,"valueController",void 0),V([o()],C.prototype,"optional",void 0),V([a("watchLengthAndInputType")],C.prototype,"watchLengthAndInputType",null);var A=function(t,e,i,s){var r,o=arguments.length,a=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(a=(o<3?r(a):o>3?r(e,i,a):r(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class k extends n{componentWillLoad(){this.setValuesArray(this.value),this.value=this.vegaInputValues.join("")}watchValue(){this.setValuesArray(this.value),this.changeEventEmitter.emit(this.value),x.notify(b,{host:this.host,detail:this.value}),this.value.length===this.length&&this.completeEventEmitter.emit(this.value)}watchVegaInputValues(){for(let t=0;t<this.length;t++)this.inputPasscodeRenderer.getVegaInputRefs()[t]&&(this.inputPasscodeRenderer.getVegaInputRefs()[t].value=this.vegaInputValues.get(t)||"");this.value=this.vegaInputValues.join("")}setValuesArray(t){const e=this.valueValidationFilter(t).slice(0,this.length).split("");this.vegaInputValues.setAll(e)}valueValidationFilter(t){return t.replace("text"===this.inputType?/\s/g:/\D/g,"")}getFirstEmptyIndex(){var t;const{length:e}=this;return null!==(t=Array.from({length:e},((t,e)=>this.vegaInputValues.get(e)||"")).findIndex((t=>!t||""===t)))&&void 0!==t?t:-1}}A([o()],k.prototype,"host",void 0),A([o({writable:!0})],k.prototype,"value",void 0),A([o({writable:!0})],k.prototype,"vegaInputValues",void 0),A([o()],k.prototype,"length",void 0),A([o()],k.prototype,"inputType",void 0),A([o()],k.prototype,"inputPasscodeRenderer",void 0),A([o()],k.prototype,"changeEventEmitter",void 0),A([o()],k.prototype,"completeEventEmitter",void 0),A([a("componentWillLoad")],k.prototype,"componentWillLoad",null),A([a("watchValue")],k.prototype,"watchValue",null),A([a("watchVegaInputValues")],k.prototype,"watchVegaInputValues",null);var E=function(t,e,i,s){var r,o=arguments.length,a=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(a=(o<3?r(a):o>3?r(e,i,a):r(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class L extends j{constructor(){super((t=>[{keyCode:"Backspace",activeElementInScope:[this.inputPasscodeRenderer.getInputPasscodeContainerRef()],eventName:"keydown",callback:e=>{t.deletePasscode(e)}},{keyCode:["ArrowLeft","ArrowRight"],activeElementInScope:[this.inputPasscodeRenderer.getInputPasscodeContainerRef()],eventName:"keydown",callback:e=>{t.controlDirectionByKeyboard(e)}}])),this.deletePasscode=t=>{t.preventDefault();const e=this.inputPasscodeRenderer.getCurrentIndex();this.vegaInputValues.get(e)?this.vegaInputValues.withMutation((t=>{for(let i=e;i<this.length-1;i++)t[i]=t[i+1];t[this.length-1]=""})):!this.vegaInputValues.get(e)&&e>0&&(this.vegaInputValues.set(e-1,""),this.inputPasscodeRenderer.getVegaInputRefs()[e-1].doFocus())}}controlDirectionByKeyboard(t){t.preventDefault();const e=this.inputPasscodeRenderer.getCurrentIndex(),i=this.inputPasscodeRenderer.getVegaInputRefs();"ArrowLeft"===t.key&&e>0&&i[e-1].doFocus(),"ArrowRight"===t.key&&this.vegaInputValues.get(e)&&e<this.length-1&&i[e+1].doFocus()}}E([o()],L.prototype,"value",void 0),E([o()],L.prototype,"length",void 0),E([o()],L.prototype,"vegaInputValues",void 0),E([o()],L.prototype,"valueController",void 0),E([o()],L.prototype,"inputPasscodeRenderer",void 0);class F{constructor(t,e){this.length=0,this.array=[],t&&(this.array=t,this.length=t.length),e&&(this.onMutate=e)}onMutate(t){}push(...t){return this.withMutation((e=>{e.push(...t)}))}pop(){return this.withMutation((t=>{t.length>0&&t.pop()}))}set(t,e){return this.withMutation((i=>{t>=0&&(i[t]=e)}))}setAll(t){return this.withMutation((e=>{e.length=0;for(let i=0;i<t.length;i++)e[i]=t[i]}))}clear(){return this.withMutation((t=>{t.length=0}))}withMutation(t){const e=[...this.array];t(e);const i=new F(e,this.onMutate);return this.onMutate(i),i}get(t){return this.array[t]}join(t){return this.array.join(t)}toArray(){return this.array}}var O=function(t,e,i,s){var r,o=arguments.length,a=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(a=(o<3?r(a):o>3?r(e,i,a):r(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};const T=class{constructor(t){i(this,t),this.vegaChange=s(this,"vegaChange",7),this.change=s(this,"change",7),this.vegaComplete=s(this,"vegaComplete",7),this.complete=s(this,"complete",7),this.globalSlimmers=new Map,this.formFieldController=new I({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new R:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputPasscodeRenderer.getInputPasscodeContainerRef(),touchableAreaGetter:()=>[...this.inputPasscodeRenderer.getVegaInputRefs()]}),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.keyboardController=new L,this.valueController=new k,this.inputPasscodeRenderer=new C,this.changeEventEmitter=w(T,f),this.completeEventEmitter=w(T,v),this.eventPreventSlimmer=new y([f],(()=>this.host),{useCapture:!0}),this.vegaInputValues=new F(new Array,(t=>{this.vegaInputValues=t})),this.label="",this.disabled=!1,this.size="medium",this.hint="",this.length=4,this.inputType="numeric",this.value="",this.required=!1,this.optional=!1,this.name="",this.validationRules=[],this.autoValidation=!0,this.isValid=null}watchVegaInputValues(){}watchLengthAndInputType(){}watchValue(){}watchValidationRules(){}render(){return d(this.inputPasscodeRenderer.render(),this.host)}get host(){return r(this)}static get watchers(){return{vegaInputValues:["watchVegaInputValues"],length:["watchLengthAndInputType"],inputType:["watchLengthAndInputType"],value:["watchValue"],validationRules:["watchValidationRules"]}}};O([l()],T.prototype,"globalSlimmers",void 0),O([h()],T.prototype,"formFieldController",void 0),O([h()],T.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),O([h()],T.prototype,"keyboardController",void 0),O([h()],T.prototype,"valueController",void 0),O([h()],T.prototype,"inputPasscodeRenderer",void 0),O([h()],T.prototype,"changeEventEmitter",void 0),O([h()],T.prototype,"completeEventEmitter",void 0),O([h()],T.prototype,"eventPreventSlimmer",void 0),T.style=':host{display:inline-block}:host vega-field-label{margin-bottom:8px}:host vega-input::part(input-container){padding-left:0px;padding-right:0px}:host vega-input.small{width:38px;height:42px;box-sizing:border-box}:host vega-input.medium{width:42px;height:50px;box-sizing:border-box}:host vega-input::part(input){text-align:center}:host vega-input.small::part(input-container){padding-top:8px;padding-bottom:8px}:host vega-input.medium::part(input-container){padding-top:12px;padding-bottom:12px}:host .vega-input-passcode-container.error vega-input::part(input-container){border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-input-passcode-container.error vega-input::part(input-container):hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-input-passcode-container.error vega-input::part(input-container):focus-within{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));box-shadow:0 0 0}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:8px;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}';export{T as vega_input_passcode}