@globalpayments/vega 2.38.0 → 2.39.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 (262) hide show
  1. package/dist/cjs/{app-globals-7087f121.js → app-globals-dd3e7925.js} +2 -3
  2. package/dist/cjs/content-state-c5b47ca1.js +6644 -0
  3. package/dist/cjs/{image-annotation-action-7d82f7e1.js → image-annotation-action-75b9c0d3.js} +5 -6
  4. package/dist/cjs/index.cjs.js +13 -14
  5. package/dist/cjs/loader.cjs.js +8 -9
  6. package/dist/cjs/vega-date-picker_2.cjs.entry.js +1 -1
  7. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  8. package/dist/cjs/vega-input-phone-number.cjs.entry.js +31 -7
  9. package/dist/cjs/vega-popover_2.cjs.entry.js +14 -0
  10. package/dist/cjs/vega-rich-text-content.cjs.entry.js +18 -19
  11. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +75 -79
  12. package/dist/cjs/vega.cjs.js +8 -9
  13. package/dist/collection/components/vega-input-phone-number/slimmers/controllers/vega-input-phone-number-value-controller.js +18 -2
  14. package/dist/collection/components/vega-input-phone-number/vega-input-phone-number.js +7 -4
  15. package/dist/collection/components/vega-popover/slimmers/controllers/vega-popover-appender-controller.js +4 -0
  16. package/dist/collection/components/vega-popover/vega-popover.js +37 -0
  17. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy-registry.js +52 -0
  18. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.js +63 -0
  19. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/block-update-link-group-strategy.js +21 -0
  20. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/block-update-text-style-strategy.js +32 -0
  21. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/image-set-annotation-map-strategy.js +13 -0
  22. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/node-split-text-strategy.js +134 -0
  23. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/node-update-annotation-map-strategy.js +47 -0
  24. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-append-blocks-strategy.js +19 -0
  25. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-append-nodes-strategy.js +21 -0
  26. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-image-strategy.js +54 -0
  27. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-node-content-strategy.js +152 -0
  28. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-text-content-strategy.js +99 -0
  29. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-blocks-after-strategy.js +15 -0
  30. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-blocks-before-strategy.js +38 -0
  31. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-image-into-text-strategy.js +31 -0
  32. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-strategy.js +57 -0
  33. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-with-blocks-strategy.js +60 -0
  34. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-new-paragraph-strategy.js +55 -0
  35. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-nodes-after-node-strategy.js +14 -0
  36. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-nodes-before-node-strategy.js +14 -0
  37. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-merge-nodes-strategy.js +25 -0
  38. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-remove-child-block-strategy.js +15 -0
  39. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-remove-node-strategy.js +21 -0
  40. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-replace-node-with-nodes-strategy.js +28 -0
  41. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-replace-nodes-strategy.js +17 -0
  42. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-split-with-image-node-strategy.js +48 -0
  43. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-split-with-text-node-strategy.js +43 -0
  44. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-transform-to-list-strategy.js +26 -0
  45. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-block-insert-image-strategy.js +32 -0
  46. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-line-break-strategy.js +21 -0
  47. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-line-break-with-blocks-strategy.js +55 -0
  48. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-new-paragraph-strategy.js +44 -0
  49. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-update-url-strategy.js +12 -0
  50. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-insert-image-strategy.js +22 -0
  51. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-delete-text-content-strategy.js +20 -0
  52. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-insert-image-strategy.js +15 -0
  53. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-insert-new-paragraph-strategy.js +92 -0
  54. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-remove-nest-list-strategy.js +22 -0
  55. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-remove-node-strategy.js +19 -0
  56. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-replace-nest-list-strategy.js +15 -0
  57. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-remove-list-item-strategy.js +27 -0
  58. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-list-strategy.js +36 -0
  59. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-paragraph-strategy.js +63 -0
  60. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/node-replace-selected-text-strategy.js +46 -0
  61. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/node-update-text-strategy.js +20 -0
  62. package/dist/collection/components/vega-rich-text-editor/dto/actions/image-update-url-action.js +13 -0
  63. package/dist/collection/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.js +1 -1
  64. package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +3 -215
  65. package/dist/collection/components/vega-rich-text-editor/dto/blocks/image-block.js +31 -244
  66. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-block.js +17 -155
  67. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +33 -184
  68. package/dist/collection/components/vega-rich-text-editor/dto/blocks/text-block.js +40 -352
  69. package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +13 -23
  70. package/dist/collection/components/vega-rich-text-editor/dto/nodes/image-node.js +14 -6
  71. package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +23 -182
  72. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/image-toolbar-button-slimmer.js +2 -1
  73. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/action-handle-strategy-registry.test.js +41 -0
  74. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/block-insert-line-break-with-blocks-strategy.test.js +24 -0
  75. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/content-state-strategy-registry.test.js +14 -0
  76. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-block-strategy-register.test.js +30 -0
  77. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-set-annotation-map-strategy.test.js +11 -0
  78. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-update-url-strategy.test.js +16 -0
  79. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-block-strategy-register.test.js +20 -0
  80. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-item-strategy-register.test.js +31 -0
  81. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-split-text-strategy.test.js +31 -0
  82. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-update-annotation-map-strategy.test.js +17 -0
  83. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/text-block-strategy-register.test.js +55 -0
  84. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/update-selected-text-strategy.test.js +23 -0
  85. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +2 -2
  86. package/dist/collection/helpers/validator/rules/valid-phone-number-rule.js +7 -2
  87. package/dist/collection/helpers/validator/test/rules/valid-phone-number-rule.test.js +8 -0
  88. package/dist/esm/{app-globals-4cca4a96.js → app-globals-c954167a.js} +2 -3
  89. package/dist/esm/content-state-2edba4ec.js +6600 -0
  90. package/dist/esm/{form-field-controller-slimmer-3535e76a.js → form-field-controller-slimmer-7a9f2b2e.js} +1 -1
  91. package/dist/esm/{image-annotation-action-3da42221.js → image-annotation-action-b6668f48.js} +1 -2
  92. package/dist/esm/{index-6e05b241.js → index-d172bafa.js} +1 -1
  93. package/dist/esm/index.js +5 -6
  94. package/dist/esm/loader.js +9 -10
  95. package/dist/esm/{string-input-formatter-slimmer-d4132497.js → string-input-formatter-slimmer-418b54f0.js} +2 -2
  96. package/dist/esm/{sub-state-notify-slimmer-51151fc3.js → sub-state-notify-slimmer-b36fd081.js} +1 -1
  97. package/dist/esm/{sub-state-observer-slimmer-d77a1c46.js → sub-state-observer-slimmer-09452523.js} +1 -1
  98. package/dist/esm/vega-button-group_2.entry.js +3 -3
  99. package/dist/esm/vega-calendar_3.entry.js +3 -3
  100. package/dist/esm/vega-checkbox_2.entry.js +2 -2
  101. package/dist/esm/vega-color-picker.entry.js +2 -2
  102. package/dist/esm/vega-combo-box.entry.js +2 -2
  103. package/dist/esm/vega-date-picker_2.entry.js +5 -5
  104. package/dist/esm/vega-dropdown_5.entry.js +3 -3
  105. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  106. package/dist/esm/vega-file-uploader.entry.js +2 -2
  107. package/dist/esm/vega-form.entry.js +2 -2
  108. package/dist/esm/vega-image-uploader.entry.js +2 -2
  109. package/dist/esm/vega-input-credit-card.entry.js +2 -2
  110. package/dist/esm/vega-input-numeric.entry.js +3 -3
  111. package/dist/esm/vega-input-phone-number.entry.js +33 -9
  112. package/dist/esm/vega-input-range.entry.js +2 -2
  113. package/dist/esm/vega-input-select.entry.js +2 -2
  114. package/dist/esm/vega-input.entry.js +5 -5
  115. package/dist/esm/{vega-internal-event-id-d0690d0d.js → vega-internal-event-id-f269c42f.js} +1 -1
  116. package/dist/esm/vega-left-nav_5.entry.js +3 -3
  117. package/dist/esm/vega-popover_2.entry.js +15 -1
  118. package/dist/esm/vega-radio_2.entry.js +2 -2
  119. package/dist/esm/vega-rich-text-content.entry.js +6 -7
  120. package/dist/esm/vega-rich-text-editor_4.entry.js +21 -25
  121. package/dist/esm/vega-selection-chip_2.entry.js +4 -4
  122. package/dist/esm/vega-selection-tile_2.entry.js +4 -4
  123. package/dist/esm/vega-sidenav_3.entry.js +3 -3
  124. package/dist/esm/vega-signature-capture.entry.js +2 -2
  125. package/dist/esm/vega-stepper.entry.js +2 -2
  126. package/dist/esm/vega-table_8.entry.js +3 -3
  127. package/dist/esm/vega-textarea.entry.js +2 -2
  128. package/dist/esm/vega-time-picker_2.entry.js +2 -2
  129. package/dist/esm/vega-toggle-switch.entry.js +2 -2
  130. package/dist/esm/vega.js +9 -10
  131. package/dist/types/components/vega-input-phone-number/slimmers/controllers/vega-input-phone-number-value-controller.d.ts +7 -0
  132. package/dist/types/components/vega-popover/slimmers/controllers/vega-popover-appender-controller.d.ts +1 -0
  133. package/dist/types/components/vega-popover/vega-popover.d.ts +10 -0
  134. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy-registry.d.ts +37 -0
  135. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.d.ts +66 -0
  136. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/block-update-link-group-strategy.d.ts +15 -0
  137. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/block-update-text-style-strategy.d.ts +15 -0
  138. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/image-set-annotation-map-strategy.d.ts +13 -0
  139. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/node-split-text-strategy.d.ts +47 -0
  140. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/node-update-annotation-map-strategy.d.ts +15 -0
  141. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-append-blocks-strategy.d.ts +13 -0
  142. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-append-nodes-strategy.d.ts +16 -0
  143. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-image-strategy.d.ts +19 -0
  144. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-node-content-strategy.d.ts +61 -0
  145. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-text-content-strategy.d.ts +19 -0
  146. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-blocks-after-strategy.d.ts +13 -0
  147. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-blocks-before-strategy.d.ts +23 -0
  148. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-image-into-text-strategy.d.ts +15 -0
  149. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-strategy.d.ts +30 -0
  150. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-with-blocks-strategy.d.ts +36 -0
  151. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-new-paragraph-strategy.d.ts +29 -0
  152. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-nodes-after-node-strategy.d.ts +13 -0
  153. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-nodes-before-node-strategy.d.ts +13 -0
  154. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-merge-nodes-strategy.d.ts +16 -0
  155. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-remove-child-block-strategy.d.ts +13 -0
  156. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-remove-node-strategy.d.ts +17 -0
  157. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-replace-node-with-nodes-strategy.d.ts +20 -0
  158. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-replace-nodes-strategy.d.ts +16 -0
  159. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-split-with-image-node-strategy.d.ts +30 -0
  160. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-split-with-text-node-strategy.d.ts +24 -0
  161. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-transform-to-list-strategy.d.ts +15 -0
  162. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-block-insert-image-strategy.d.ts +12 -0
  163. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-line-break-strategy.d.ts +15 -0
  164. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-line-break-with-blocks-strategy.d.ts +27 -0
  165. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-new-paragraph-strategy.d.ts +21 -0
  166. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-update-url-strategy.d.ts +12 -0
  167. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-insert-image-strategy.d.ts +15 -0
  168. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-delete-text-content-strategy.d.ts +15 -0
  169. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-insert-image-strategy.d.ts +15 -0
  170. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-insert-new-paragraph-strategy.d.ts +38 -0
  171. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-remove-nest-list-strategy.d.ts +15 -0
  172. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-remove-node-strategy.d.ts +15 -0
  173. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-replace-nest-list-strategy.d.ts +12 -0
  174. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-remove-list-item-strategy.d.ts +15 -0
  175. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-list-strategy.d.ts +12 -0
  176. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-paragraph-strategy.d.ts +19 -0
  177. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/node-replace-selected-text-strategy.d.ts +20 -0
  178. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/node-update-text-strategy.d.ts +15 -0
  179. package/dist/types/components/vega-rich-text-editor/dto/actions/image-update-url-action.d.ts +11 -0
  180. package/dist/types/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.d.ts +2 -2
  181. package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +1 -79
  182. package/dist/types/components/vega-rich-text-editor/dto/blocks/image-block.d.ts +3 -77
  183. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-block.d.ts +0 -38
  184. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +3 -58
  185. package/dist/types/components/vega-rich-text-editor/dto/blocks/text-block.d.ts +5 -93
  186. package/dist/types/components/vega-rich-text-editor/dto/content-state.d.ts +1 -2
  187. package/dist/types/components/vega-rich-text-editor/dto/nodes/text-node.d.ts +0 -43
  188. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/action-handle-strategy-registry.test.d.ts +1 -0
  189. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/block-insert-line-break-with-blocks-strategy.test.d.ts +1 -0
  190. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/content-state-strategy-registry.test.d.ts +1 -0
  191. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-block-strategy-register.test.d.ts +1 -0
  192. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-set-annotation-map-strategy.test.d.ts +1 -0
  193. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-update-url-strategy.test.d.ts +1 -0
  194. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-block-strategy-register.test.d.ts +1 -0
  195. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-item-strategy-register.test.d.ts +1 -0
  196. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-split-text-strategy.test.d.ts +1 -0
  197. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-update-annotation-map-strategy.test.d.ts +1 -0
  198. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/text-block-strategy-register.test.d.ts +1 -0
  199. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/update-selected-text-strategy.test.d.ts +1 -0
  200. package/dist/types/components.d.ts +14 -0
  201. package/dist/types/helpers/validator/rules/valid-phone-number-rule.d.ts +3 -1
  202. package/dist/vega/index.esm.js +1 -1
  203. package/dist/vega/{p-ba077ca8.entry.js → p-073beb31.entry.js} +1 -1
  204. package/dist/vega/{p-6419e13e.entry.js → p-0b697841.entry.js} +1 -1
  205. package/dist/vega/p-0cc1ad76.js +1 -0
  206. package/dist/vega/{p-29d6ec6c.js → p-239bae84.js} +1 -1
  207. package/dist/vega/{p-7198d675.entry.js → p-24ac5151.entry.js} +1 -1
  208. package/dist/vega/{p-cb4fd6e1.entry.js → p-257b1bc2.entry.js} +1 -1
  209. package/dist/vega/{p-ba2833c0.entry.js → p-3c85a11b.entry.js} +1 -1
  210. package/dist/vega/{p-b517ed15.js → p-49bf2b3a.js} +1 -1
  211. package/dist/vega/p-4a8db510.entry.js +1 -0
  212. package/dist/vega/p-4b19706c.entry.js +1 -0
  213. package/dist/vega/{p-bf4996d5.entry.js → p-4e436842.entry.js} +1 -1
  214. package/dist/vega/{p-12fe63c1.entry.js → p-59834ea4.entry.js} +1 -1
  215. package/dist/vega/{p-50eabdca.entry.js → p-59cfed37.entry.js} +1 -1
  216. package/dist/vega/p-5f377954.js +1 -1
  217. package/dist/vega/p-60e1ebe1.entry.js +1 -0
  218. package/dist/vega/{p-23fd9401.entry.js → p-629bd266.entry.js} +1 -1
  219. package/dist/vega/p-6408d3dc.entry.js +1 -0
  220. package/dist/vega/{p-3e8f9fcf.entry.js → p-64e0c944.entry.js} +1 -1
  221. package/dist/vega/{p-b9a0f136.entry.js → p-64e49394.entry.js} +1 -1
  222. package/dist/vega/p-6e5db02b.js +1 -0
  223. package/dist/vega/{p-9689ad99.entry.js → p-74ff73d6.entry.js} +1 -1
  224. package/dist/vega/{p-b809f3d7.entry.js → p-8120e7a1.entry.js} +1 -1
  225. package/dist/vega/p-894c067a.entry.js +1 -0
  226. package/dist/vega/{p-e9785742.entry.js → p-989b36a2.entry.js} +1 -1
  227. package/dist/vega/{p-a2a34239.entry.js → p-9ee23f34.entry.js} +1 -1
  228. package/dist/vega/{p-34bd9204.js → p-a9e1123a.js} +1 -1
  229. package/dist/vega/{p-267cde46.entry.js → p-b071be5c.entry.js} +1 -1
  230. package/dist/vega/{p-1b67c443.entry.js → p-b6bffdf3.entry.js} +1 -1
  231. package/dist/vega/{p-20326c64.js → p-bd0116f9.js} +1 -1
  232. package/dist/vega/{p-a7e078ac.entry.js → p-bf6d3c00.entry.js} +1 -1
  233. package/dist/vega/{p-ecaf4cfa.entry.js → p-c00fde35.entry.js} +1 -1
  234. package/dist/vega/{p-7baa4fae.entry.js → p-c2e96537.entry.js} +1 -1
  235. package/dist/vega/{p-3cb90bdf.entry.js → p-ce94a9c5.entry.js} +1 -1
  236. package/dist/vega/{p-904b489a.entry.js → p-d03945cb.entry.js} +1 -1
  237. package/dist/vega/p-d2e6090a.js +1 -0
  238. package/dist/vega/{p-348e95ba.js → p-d2ff56d8.js} +1 -1
  239. package/dist/vega/p-e0d3ca2d.js +1 -0
  240. package/dist/vega/{p-ee2e4bff.entry.js → p-ea78ddfa.entry.js} +1 -1
  241. package/dist/vega/{p-e9a5bd12.entry.js → p-f1ebe86b.entry.js} +1 -1
  242. package/dist/vega/{p-497f2f86.entry.js → p-fc49a98e.entry.js} +1 -1
  243. package/dist/vega/vega.esm.js +1 -1
  244. package/package.json +1 -1
  245. package/dist/cjs/content-state-f97d3278.js +0 -2990
  246. package/dist/cjs/node-annotation.abstract-4f6df9cf.js +0 -3223
  247. package/dist/collection/components/vega-rich-text-editor/dto/actions/clear-child-nodes-action.js +0 -12
  248. package/dist/collection/components/vega-rich-text-editor/dto/helper/block-base-operator.js +0 -47
  249. package/dist/esm/content-state-ccf5f960.js +0 -2954
  250. package/dist/esm/node-annotation.abstract-b2e36bc4.js +0 -3214
  251. package/dist/types/components/vega-rich-text-editor/dto/actions/clear-child-nodes-action.d.ts +0 -9
  252. package/dist/types/components/vega-rich-text-editor/dto/helper/block-base-operator.d.ts +0 -24
  253. package/dist/vega/p-0461e318.js +0 -1
  254. package/dist/vega/p-1d93b3a9.js +0 -1
  255. package/dist/vega/p-2fecbcf9.entry.js +0 -1
  256. package/dist/vega/p-52a8a4f8.js +0 -1
  257. package/dist/vega/p-7edcb8d0.entry.js +0 -1
  258. package/dist/vega/p-9728d571.entry.js +0 -1
  259. package/dist/vega/p-a7f40a65.entry.js +0 -1
  260. package/dist/vega/p-a8b16ff2.js +0 -1
  261. package/dist/vega/p-aed80794.entry.js +0 -1
  262. package/dist/vega/p-f86ec91b.js +0 -1
@@ -1,9 +0,0 @@
1
- import { ModifyContentAction, ModifyContentActionType } from './modify-content-action.abstract';
2
- /**
3
- * Clear child nodes from the block
4
- *
5
- * @example block.apply(new ClearChildNodesAction())
6
- */
7
- export declare class ClearChildNodesAction extends ModifyContentAction {
8
- type: ModifyContentActionType;
9
- }
@@ -1,24 +0,0 @@
1
- import { RTEBlock } from '../blocks/block.abstract';
2
- /** The class contains some common method to modify the blocks property */
3
- export declare class BlockBaseOperator {
4
- blocks?: RTEBlock[];
5
- /**
6
- * Replaces a specific block with an array of blocks within a RTEContentBlock array.
7
- *
8
- * @param {RTEBlock} referBlock - Used as a reference block to identify the block that needs to be replaced in the `blocks` array.
9
- * @param {RTEBlock[]} blocks - An array of RTEBlock objects that you want to replace the `referBlock` with in the `blocks` array.
10
- */
11
- protected replaceBlockWithBlocks(referBlock: RTEBlock, blocks: RTEBlock[]): void;
12
- /**
13
- * Appends new blocks to an array and sets their parent property to a specific type.
14
- *
15
- * @param {RTEBlock[]} newBlocks - An array of `RTEBlock` objects that are being passed to the `appendChildBlocks` method.
16
- */
17
- protected appendChildBlocks(newBlocks: RTEBlock[]): void;
18
- /**
19
- * Removes a specified RTEBlock from an array of blocks.
20
- *
21
- * @param {RTEBlock} blockToBeRemoved - The block that needs to be removed from the `blocks` array.
22
- */
23
- protected removeChildBlock(blockToBeRemoved: RTEBlock): void;
24
- }
@@ -1 +0,0 @@
1
- import{c as e,a as r}from"./p-112455b1.js";import{D as t}from"./p-5dce8dfe.js";import{C as n}from"./p-2d0d575f.js";import{O as o}from"./p-331a62d5.js";import"./p-6e1ab235.js";import{I as i,c as a}from"./p-33b62194.js";import{d}from"./p-7c37e5bb.js";import{V as c}from"./p-348e95ba.js";var l=e((function(e){e.exports=function(){const e=/^\s+/,r=/\s+$/;function t(n,o){if(o=o||{},(n=n||"")instanceof t)return n;if(!(this instanceof t))return new t(n,o);var i=function(t){var n={r:0,g:0,b:0},o=1,i=null,a=null,d=null,c=!1,l=!1;return"string"==typeof t&&(t=function(t){t=t.replace(e,"").replace(r,"").toLowerCase();var n,o=!1;if(y[t])t=y[t],o=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};return(n=I.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=I.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=I.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=I.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=I.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=I.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=I.hex8.exec(t))?{r:A(n[1]),g:A(n[2]),b:A(n[3]),a:_(n[4]),format:o?"name":"hex8"}:(n=I.hex6.exec(t))?{r:A(n[1]),g:A(n[2]),b:A(n[3]),format:o?"name":"hex"}:(n=I.hex4.exec(t))?{r:A(n[1]+""+n[1]),g:A(n[2]+""+n[2]),b:A(n[3]+""+n[3]),a:_(n[4]+""+n[4]),format:o?"name":"hex8"}:!!(n=I.hex3.exec(t))&&{r:A(n[1]+""+n[1]),g:A(n[2]+""+n[2]),b:A(n[3]+""+n[3]),format:o?"name":"hex"}}(t)),"object"==typeof t&&(R(t.r)&&R(t.g)&&R(t.b)?(s=t.r,u=t.g,b=t.b,n={r:255*M(s,255),g:255*M(u,255),b:255*M(b,255)},c=!0,l="%"===String(t.r).substr(-1)?"prgb":"rgb"):R(t.h)&&R(t.s)&&R(t.v)?(i=w(t.s),a=w(t.v),n=function(e,r,t){e=6*M(e,360),r=M(r,100),t=M(t,100);var n=Math.floor(e),o=e-n,i=t*(1-r),a=t*(1-o*r),d=t*(1-(1-o)*r),c=n%6;return{r:255*[t,a,i,i,d,t][c],g:255*[d,t,t,a,i,i][c],b:255*[i,i,d,t,t,a][c]}}(t.h,i,a),c=!0,l="hsv"):R(t.h)&&R(t.s)&&R(t.l)&&(i=w(t.s),d=w(t.l),n=function(e,r,t){var n,o,i;function a(e,r,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+6*(r-e)*t:t<.5?r:t<2/3?e+(r-e)*(2/3-t)*6:e}if(e=M(e,360),r=M(r,100),t=M(t,100),0===r)n=o=i=t;else{var d=t<.5?t*(1+r):t+r-t*r,c=2*t-d;n=a(c,d,e+1/3),o=a(c,d,e),i=a(c,d,e-1/3)}return{r:255*n,g:255*o,b:255*i}}(t.h,i,d),c=!0,l="hsl"),t.hasOwnProperty("a")&&(o=t.a)),o=k(o),{ok:c,format:t.format||l,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:o};var s,u,b}(n);this._originalInput=n,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=Math.round(100*this._a)/100,this._format=o.format||i.format,this._gradientType=o.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=i.ok}function n(e,r,t){e=M(e,255),r=M(r,255),t=M(t,255);var n,o,i=Math.max(e,r,t),a=Math.min(e,r,t),d=(i+a)/2;if(i==a)n=o=0;else{var c=i-a;switch(o=d>.5?c/(2-i-a):c/(i+a),i){case e:n=(r-t)/c+(r<t?6:0);break;case r:n=(t-e)/c+2;break;case t:n=(e-r)/c+4}n/=6}return{h:n,s:o,l:d}}function o(e,r,t){e=M(e,255),r=M(r,255),t=M(t,255);var n,o,i=Math.max(e,r,t),a=Math.min(e,r,t),d=i,c=i-a;if(o=0===i?0:c/i,i==a)n=0;else{switch(i){case e:n=(r-t)/c+(r<t?6:0);break;case r:n=(t-e)/c+2;break;case t:n=(e-r)/c+4}n/=6}return{h:n,s:o,v:d}}function i(e,r,t,n){var o=[T(Math.round(e).toString(16)),T(Math.round(r).toString(16)),T(Math.round(t).toString(16))];return n&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function a(e,r,t,n){return[T(G(n)),T(Math.round(e).toString(16)),T(Math.round(r).toString(16)),T(Math.round(t).toString(16))].join("")}function d(e,r){r=0===r?0:r||10;var n=t(e).toHsl();return n.s-=r/100,n.s=E(n.s),t(n)}function c(e,r){r=0===r?0:r||10;var n=t(e).toHsl();return n.s+=r/100,n.s=E(n.s),t(n)}function l(e){return t(e).desaturate(100)}function s(e,r){r=0===r?0:r||10;var n=t(e).toHsl();return n.l+=r/100,n.l=E(n.l),t(n)}function u(e,r){r=0===r?0:r||10;var n=t(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-r/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-r/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-r/100*255))),t(n)}function b(e,r){r=0===r?0:r||10;var n=t(e).toHsl();return n.l-=r/100,n.l=E(n.l),t(n)}function f(e,r){var n=t(e).toHsl(),o=(n.h+r)%360;return n.h=o<0?360+o:o,t(n)}function v(e){var r=t(e).toHsl();return r.h=(r.h+180)%360,t(r)}function h(e,r){if(isNaN(r)||r<=0)throw new Error("Argument to polyad must be a positive number");for(var n=t(e).toHsl(),o=[t(e)],i=360/r,a=1;a<r;a++)o.push(t({h:(n.h+a*i)%360,s:n.s,l:n.l}));return o}function g(e){var r=t(e).toHsl(),n=r.h;return[t(e),t({h:(n+72)%360,s:r.s,l:r.l}),t({h:(n+216)%360,s:r.s,l:r.l})]}function p(e,r,n){r=r||6,n=n||30;var o=t(e).toHsl(),i=360/n,a=[t(e)];for(o.h=(o.h-(i*r>>1)+720)%360;--r;)o.h=(o.h+i)%360,a.push(t(o));return a}function m(e,r){r=r||6;for(var n=t(e).toHsv(),o=n.h,i=n.s,a=n.v,d=[],c=1/r;r--;)d.push(t({h:o,s:i,v:a})),a=(a+c)%1;return d}t.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,r,t,n=this.toRgb();return r=n.g/255,t=n.b/255,.2126*((e=n.r/255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))},setAlpha:function(e){return this._a=k(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=o(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=o(this._r,this._g,this._b),r=Math.round(360*e.h),t=Math.round(100*e.s),n=Math.round(100*e.v);return 1==this._a?"hsv("+r+", "+t+"%, "+n+"%)":"hsva("+r+", "+t+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=n(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=n(this._r,this._g,this._b),r=Math.round(360*e.h),t=Math.round(100*e.s),o=Math.round(100*e.l);return 1==this._a?"hsl("+r+", "+t+"%, "+o+"%)":"hsla("+r+", "+t+"%, "+o+"%, "+this._roundA+")"},toHex:function(e){return i(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,r,t,n,o){var i=[T(Math.round(e).toString(16)),T(Math.round(r).toString(16)),T(Math.round(t).toString(16)),T(G(n))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*M(this._r,255))+"%",g:Math.round(100*M(this._g,255))+"%",b:Math.round(100*M(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*M(this._r,255))+"%, "+Math.round(100*M(this._g,255))+"%, "+Math.round(100*M(this._b,255))+"%)":"rgba("+Math.round(100*M(this._r,255))+"%, "+Math.round(100*M(this._g,255))+"%, "+Math.round(100*M(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(x[i(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var r="#"+a(this._r,this._g,this._b,this._a),n=r,o=this._gradientType?"GradientType = 1, ":"";if(e){var i=t(e);n="#"+a(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+r+",endColorstr="+n+")"},toString:function(e){var r=!!e;e=e||this._format;var t=!1;return r||!(this._a<1&&this._a>=0)||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(t=this.toRgbString()),"prgb"===e&&(t=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(t=this.toHexString()),"hex3"===e&&(t=this.toHexString(!0)),"hex4"===e&&(t=this.toHex8String(!0)),"hex8"===e&&(t=this.toHex8String()),"name"===e&&(t=this.toName()),"hsl"===e&&(t=this.toHslString()),"hsv"===e&&(t=this.toHsvString()),t||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return t(this.toString())},_applyModification:function(e,r){var t=e.apply(null,[this].concat([].slice.call(r)));return this._r=t._r,this._g=t._g,this._b=t._b,this.setAlpha(t._a),this},lighten:function(){return this._applyModification(s,arguments)},brighten:function(){return this._applyModification(u,arguments)},darken:function(){return this._applyModification(b,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(c,arguments)},greyscale:function(){return this._applyModification(l,arguments)},spin:function(){return this._applyModification(f,arguments)},_applyCombination:function(e,r){return e.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(p,arguments)},complement:function(){return this._applyCombination(v,arguments)},monochromatic:function(){return this._applyCombination(m,arguments)},splitcomplement:function(){return this._applyCombination(g,arguments)},triad:function(){return this._applyCombination(h,[3])},tetrad:function(){return this._applyCombination(h,[4])}},t.fromRatio=function(e,r){if("object"==typeof e){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]="a"===o?e[o]:w(e[o]));e=n}return t(e,r)},t.equals=function(e,r){return!(!e||!r)&&t(e).toRgbString()==t(r).toRgbString()},t.random=function(){return t.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},t.mix=function(e,r,n){n=0===n?0:n||50;var o=t(e).toRgb(),i=t(r).toRgb(),a=n/100;return t({r:(i.r-o.r)*a+o.r,g:(i.g-o.g)*a+o.g,b:(i.b-o.b)*a+o.b,a:(i.a-o.a)*a+o.a})},t.readability=function(e,r){var n=t(e),o=t(r);return(Math.max(n.getLuminance(),o.getLuminance())+.05)/(Math.min(n.getLuminance(),o.getLuminance())+.05)},t.isReadable=function(e,r,n){var o,i,a,d,c,l=t.readability(e,r);switch(i=!1,(a=n,"AA"!==(d=((a=a||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==d&&(d="AA"),"small"!==(c=(a.size||"small").toLowerCase())&&"large"!==c&&(c="small"),o={level:d,size:c}).level+o.size){case"AAsmall":case"AAAlarge":i=l>=4.5;break;case"AAlarge":i=l>=3;break;case"AAAsmall":i=l>=7}return i},t.mostReadable=function(e,r,n){var o,i,a,d,c=null,l=0;i=(n=n||{}).includeFallbackColors,a=n.level,d=n.size;for(var s=0;s<r.length;s++)(o=t.readability(e,r[s]))>l&&(l=o,c=t(r[s]));return t.isReadable(e,c,{level:a,size:d})||!i?c:(n.includeFallbackColors=!1,t.mostReadable(e,["#fff","#000"],n))};var y=t.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},x=t.hexNames=function(e){var r={};for(var t in e)e.hasOwnProperty(t)&&(r[e[t]]=t);return r}(y);function k(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function M(e,r){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var t=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(r,Math.max(0,parseFloat(e))),t&&(e=parseInt(e*r,10)/100),Math.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function E(e){return Math.min(1,Math.max(0,e))}function A(e){return parseInt(e,16)}function T(e){return 1==e.length?"0"+e:""+e}function w(e){return e<=1&&(e=100*e+"%"),e}function G(e){return Math.round(255*parseFloat(e)).toString(16)}function _(e){return A(e)/255}var O,D,L,I=(D="[\\s|\\(]+("+(O="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+O+")[,|\\s]+("+O+")\\s*\\)?",L="[\\s|\\(]+("+O+")[,|\\s]+("+O+")[,|\\s]+("+O+")[,|\\s]+("+O+")\\s*\\)?",{CSS_UNIT:new RegExp(O),rgb:new RegExp("rgb"+D),rgba:new RegExp("rgba"+L),hsl:new RegExp("hsl"+D),hsla:new RegExp("hsla"+L),hsv:new RegExp("hsv"+D),hsva:new RegExp("hsva"+L),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function R(e){return!!I.CSS_UNIT.exec(e)}return t}()}));const s=e=>{if(!e)return"";const{r,g:t,b:n,a:o}=e.toRgb();return`${r} ${t} ${n} / ${o}`},u=[{name:"bg-action",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return s(o)}},{name:"dark-bg-action"},{name:"bg-action-hover",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?null==o?void 0:o.lighten(10):null==o?void 0:o.lighten(-10),s(o)}},{name:"dark-bg-action-hover"},{name:"bg-action-focus",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return s(o)}},{name:"dark-bg-action-focus"},{name:"bg-action-active",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?null==o?void 0:o.lighten(15):null==o?void 0:o.lighten(-15),s(o)}},{name:"dark-bg-action-active"},{name:"bg-action-secondary-hover",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?null==o?void 0:o.lighten(10):null==o?void 0:o.lighten(-10),o=null==o?void 0:o.setAlpha(.15),s(o)}},{name:"dark-bg-action-secondary-hover"},{name:"bg-action-secondary-active",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?null==o?void 0:o.lighten(20):null==o?void 0:o.lighten(-20),o=null==o?void 0:o.setAlpha(.15),s(o)}},{name:"dark-bg-action-secondary-active"},{name:"bg-divider",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=null==o?void 0:o.setAlpha(.6),s(o)}},{name:"dark-bg-divider"},{name:"bg-keypad-btn-active",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=null==o?void 0:o.setAlpha(.3),s(o)}},{name:"dark-bg-keypad-btn-active"},{name:"bg-selected",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?null==o?void 0:o.lighten(10):null==o?void 0:o.lighten(-10),o=null==o?void 0:o.setAlpha(.25),s(o)}},{name:"dark-bg-selected"},{name:"bg-sidebar",overrideGetter:(e,r)=>{const t=e.sidebarColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return s(o)}},{name:"dark-bg-sidebar"},{name:"bg-sidebar-item-hover",overrideGetter:(e,r)=>{const t=e.sidebarColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?r({a:.9,r:255,b:255,g:255}):r({a:.86,r:15,b:15,g:15}),s(o)}},{name:"dark-bg-sidebar-item-hover"},{name:"bg-sidebar-item-selected",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=null==o?void 0:o.setAlpha(.4),s(o)}},{name:"dark-bg-sidebar-item-selected"},{name:"bg-table-selected-row",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=null==o?void 0:o.setAlpha(.2),s(o)}},{name:"dark-bg-table-selected-row"},{name:"bg-toggle-switch-selected-disabled",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=null==o?void 0:o.setAlpha(.5),s(o)}},{name:"dark-bg-toggle-switch-selected-disabled"},{name:"bg-date-picker-range",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?null==o?void 0:o.lighten(10):null==o?void 0:o.lighten(-10),o=null==o?void 0:o.setAlpha(.15),s(o)}},{name:"dark-bg-date-picker-range"},{name:"text-link",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return s(o)}},{name:"dark-text-link"},{name:"text-link-hover",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?null==o?void 0:o.lighten(10):null==o?void 0:o.lighten(-10),s(o)}},{name:"dark-text-link-hover"},{name:"text-link-active",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?null==o?void 0:o.lighten(15):null==o?void 0:o.lighten(-15),s(o)}},{name:"dark-text-link-active"},{name:"text-link-focus",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?null==o?void 0:o.lighten(10):null==o?void 0:o.lighten(-10),s(o)}},{name:"dark-text-link-focus"},{name:"text-link-visited",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?null==o?void 0:o.lighten(20):null==o?void 0:o.lighten(-22),s(o)}},{name:"dark-text-link-visited"},{name:"text-sidebar-link",overrideGetter:(e,r)=>{const t=e.sidebarColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?r({a:.9,b:255,r:255,g:255}):r({a:.86,b:15,r:15,g:15}),s(o)}},{name:"dark-text-sidebar-link"},{name:"text-sidebar-link-hover",overrideGetter:(e,r)=>{const t=e.sidebarColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?r({a:.86,r:15,b:15,g:15}):r({a:.9,r:255,b:255,g:255}),s(o)}},{name:"dark-text-sidebar-link-hover"},{name:"text-sidebar-link-selected",overrideGetter:(e,r)=>{const t=e.sidebarColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?r({a:.9,r:255,b:255,g:255}):r({a:.86,b:15,r:15,g:15}),s(o)}},{name:"dark-text-sidebar-link-selected"},{name:"border-color-action",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return s(o)}},{name:"dark-border-color-action"},{name:"border-color-action-hover",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?null==o?void 0:o.lighten(10):null==o?void 0:o.lighten(-10),s(o)}},{name:"dark-border-color-action-hover"},{name:"border-color-action-active",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?null==o?void 0:o.lighten(15):null==o?void 0:o.lighten(-15),s(o)}},{name:"dark-border-color-action-active"},{name:"border-color-divider",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=null==o?void 0:o.setAlpha(.6),s(o)}},{name:"dark-border-color-divider"},{name:"border-color-divider-secondary",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?null==o?void 0:o.lighten(15):null==o?void 0:o.lighten(-15),o=null==o?void 0:o.setAlpha(.4),s(o)}},{name:"dark-border-color-divider-secondary"},{name:"border-color-input-field",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=null==o?void 0:o.setAlpha(.6),s(o)}},{name:"dark-border-color-input-field"},{name:"border-color-input-field-hover",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?null==o?void 0:o.lighten(10):null==o?void 0:o.lighten(-10),o=null==o?void 0:o.setAlpha(.6),s(o)}},{name:"dark-border-color-input-field-hover"},{name:"border-color-input-field-focus",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?null==o?void 0:o.lighten(15):null==o?void 0:o.lighten(-15),o=null==o?void 0:o.setAlpha(.6),s(o)}},{name:"dark-border-color-input-field-focus"},{name:"border-color-input-field-disabled",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=r({a:.2,r:15,b:15,g:15}),s(o)}},{name:"dark-border-color-input-field-disabled"},{name:"border-color-tile-focus",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return s(o)}},{name:"dark-border-color-tile-focus"},{name:"border-color-tile-selected-focus",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?null==o?void 0:o.lighten(15):null==o?void 0:o.lighten(-15),o=null==o?void 0:o.setAlpha(.6),s(o)}},{name:"dark-border-color-tile-selected-focus"},{name:"border-color-tile-selected",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return s(o)}},{name:"dark-border-color-tile-selected"},{name:"border-color-tile-selected-hover",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?null==o?void 0:o.lighten(10):null==o?void 0:o.lighten(-10),s(o)}},{name:"dark-border-color-tile-selected-hover"}],b=e=>{if(!e)return"";const{r,g:t,b:n,a:o}=e.toRgb();return`${r} ${t} ${n} / ${o}`},f=[{name:"border-secondary-btn",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return b(o)}},{name:"dark-border-secondary-btn"},{name:"border-secondary-btn-hover",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?null==o?void 0:o.lighten(10):null==o?void 0:o.lighten(-10),b(o)}},{name:"dark-border-secondary-btn-hover"},{name:"border-secondary-btn-active",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?null==o?void 0:o.lighten(15):null==o?void 0:o.lighten(-15),b(o)}},{name:"dark-border-secondary-btn-active"},{name:"border-input-field",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=null==o?void 0:o.setAlpha(.6),b(o)}},{name:"dark-border-input-field"},{name:"border-input-field-hover",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?null==o?void 0:o.lighten(10):null==o?void 0:o.lighten(-10),o=null==o?void 0:o.setAlpha(.6),b(o)}},{name:"dark-border-input-field-hover"},{name:"border-input-field-focus",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?null==o?void 0:o.lighten(15):null==o?void 0:o.lighten(-15),o=null==o?void 0:o.setAlpha(.6),b(o)}},{name:"dark-border-input-field-focus"},{name:"border-input-field-disabled",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=r({a:.2,r:15,b:15,g:15}),b(o)}},{name:"dark-border-input-field-disabled"},{name:"border-divider",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=null==o?void 0:o.setAlpha(.6),b(o)}},{name:"dark-border-divider"},{name:"border-divider-secondary",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?null==o?void 0:o.lighten(15):null==o?void 0:o.lighten(-15),o=null==o?void 0:o.setAlpha(.4),b(o)}},{name:"dark-border-divider-secondary"},{name:"border-tile-selected",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return b(o)}},{name:"dark-border-tile-selected"},{name:"border-tile-selected-hover",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?null==o?void 0:o.lighten(10):null==o?void 0:o.lighten(-10),b(o)}},{name:"dark-border-tile-selected-hover"},{name:"border-tile-focus",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return b(o)}},{name:"dark-border-tile-focus"},{name:"border-tile-selected-focus",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=(null==n?void 0:n.isDark())?null==o?void 0:o.lighten(15):null==o?void 0:o.lighten(-15),o=null==o?void 0:o.setAlpha(.6),b(o)}},{name:"dark-border-tile-selected-focus"}],v=e=>{if(!e)return"";const{r,g:t,b:n,a:o}=e.toRgb();return`${r} ${t} ${n} / ${o}`},h=[{name:"ring-input-focus",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=null==o?void 0:o.setAlpha(.25),v(o)}},{name:"dark-ring-input-focus"},{name:"ring-action-focus",overrideGetter:(e,r)=>{const t=e.actionColor;if(!t)return"";const n=t?r(t):void 0;let o=n?n.clone():void 0;return o=null==o?void 0:o.setAlpha(.25),v(o)}},{name:"dark-ring-action-focus"}],g=new class{generateOverrideThemes(e){return this.getOverridableTokens().map((r=>({name:r.name,value:this.parseCssVarValue(r,e)})))}applyTheme(e){this.getOverrideThemeContainer().innerHTML=`\n:root {\n\t\t${e.filter((e=>!!e.value)).map((e=>`--v-${e.name}: ${e.value};`)).join("\n\t\t")}\n}\n\t\t\t\t`}getOverrideThemeContainer(){let e=document.head.querySelector("#vegaCustomOverrideTheme");return e||(e=document.createElement("style"),e.id="vegaCustomOverrideTheme",document.head.append(e)),e}getOverridableTokens(){return[...u,...f,...h]}parseCssVarValue(e,r){var t;return null===(t=e.overrideGetter)||void 0===t?void 0:t.call(e,r,l)}},p={"bg-brand":"176, 180, 181, 1","bg-page":"24, 24, 48, 1","bg-primary":"4, 4, 28, 1","bg-secondary":"18, 18, 39, 1","bg-tertiary":"24, 24, 48, 1","bg-quaternary":"70, 71, 101, 1","bg-inverted-primary":"252, 252, 252, 1","bg-inverted-secondary":"247, 247, 247, 1","bg-inverted-tertiary":"240, 243, 247, 1","bg-inverted-quaternary":"241, 248, 251, 1","bg-action":"0, 187, 255, 1","bg-action-hover":"0, 204, 255, 1","bg-action-focus":"0, 187, 255, 1","bg-action-active":"4, 165, 245, 1","bg-action-quaternary":"51, 57, 61, 1","bg-action-quaternary-hover":"89, 96, 99, 1","bg-action-quaternary-active":"24, 24, 48, 1","bg-action-secondary":"0, 0, 0, 0","bg-action-secondary-hover":"0, 204, 255, 0.2","bg-action-secondary-active":"4, 165, 245, 0.2","bg-action-tertiary":"0, 0, 0, 0","bg-action-tertiary-hover":"252, 252, 252, 0.2","bg-action-tertiary-active":"252, 252, 252, 0.1","bg-app-header":"24, 24, 48, 0.92","bg-backdrop-modal":"70, 71, 101, 0.8","bg-backdrop-popover":"70, 71, 101, 0.56","bg-backdrop-sidebar":"70, 71, 101, 0.8","bg-chip":"252, 252, 252, 0.1","bg-chip-hover":"252, 252, 252, 0.2","bg-chip-active":"252, 252, 252, 0.06","bg-danger":"255, 56, 97, 1","bg-danger-hover":"255, 71, 123, 1","bg-danger-focus":"255, 56, 97, 1","bg-danger-active":"230, 50, 87, 1","bg-danger-tertiary":"0, 0, 0, 0","bg-danger-tertiary-hover":"255, 71, 123, 0.2","bg-danger-tertiary-active":"230, 50, 87, 0.2","bg-disabled":"70, 71, 101, 1","bg-divider":"32, 54, 69, 1","bg-divider-secondary":"51, 57, 61, 1","bg-keypad-btn-active":"45, 76, 97, 1","bg-loading-progress":"4, 165, 245, 1","bg-loading-track":"142, 223, 249, 1","bg-segment-hover":"70, 71, 101, 1","bg-segment-control":"210, 208, 223, 0.1","bg-selected":"85, 218, 255, 0.3","bg-sidebar":"18, 18, 39, 1","bg-sidebar-icon":"188, 186, 213, 1","bg-sidebar-icon-hover":"18, 18, 39, 1","bg-sidebar-icon-selected":"252, 252, 252, 1","bg-sidebar-item-hover":"252, 252, 252, 1","bg-sidebar-item-selected":"0, 187, 255, 0.4","bg-site-footer":"51, 57, 61, 1","bg-site-footer-action":"171, 198, 216, 1","bg-site-footer-action-hover":"199, 217, 229, 1","bg-site-footer-action-active":"143, 179, 203, 1","bg-site-footer-field":"89, 96, 99, 1","bg-slider-handle":"252, 252, 252, 1","bg-status-error":"189, 41, 71, 1","bg-status-info":"252, 252, 252, 1","bg-status-success":"123, 242, 151, 1","bg-status-warning":"255, 212, 105, 1","bg-tab":"51, 57, 61, 1","bg-tab-hover":"89, 96, 99, 1","bg-tab-selected":"240, 243, 247, 1","bg-table-alt-row":"18, 18, 39, 1","bg-table-header":"24, 24, 48, 1","bg-table-row-hover":"70, 71, 101, 1","bg-table-row-selected-expanded":"32, 54, 69, 1","bg-table-selected-row":"45, 76, 97, 1","bg-textarea-count":"252, 252, 252, 0.5","bg-tile":"4, 4, 28, 1","bg-tile-hover":"24, 24, 48, 1","bg-tile-selected":"32, 54, 69, 1","bg-tile-selected-hover":"45, 76, 97, 1","bg-toggle-switch":"210, 208, 223, 1","bg-toggle-switch-hover":"188, 186, 213, 1","bg-toggle-switch-selected-disabled":"0, 75, 128, 1","bg-transparent":"0, 0, 0, 0","bg-accent1-primary":"109, 217, 202, 1","bg-accent1-secondary":"174, 234, 226, 1","bg-accent1-tertiary":"223, 247, 243, 1","bg-accent2-primary":"95, 56, 206, 1","bg-accent2-secondary":"184, 167, 233, 1","bg-accent2-tertiary":"219, 211, 244, 1","bg-accent3-primary":"255, 203, 105, 1","bg-accent3-secondary":"251, 226, 185, 1","bg-accent3-tertiary":"255, 243, 222, 1","bg-accent4-primary":"255, 129, 87, 1","bg-accent4-secondary":"255, 185, 162, 1","bg-accent4-tertiary":"255, 227, 218, 1","bg-accent5-primary":"4, 165, 245, 1","bg-accent5-secondary":"85, 218, 255, 1","bg-accent5-tertiary":"227, 247, 253, 1","bg-accent6-primary":"255, 84, 165, 1","bg-accent6-secondary":"255, 179, 215, 1","bg-accent6-tertiary":"255, 217, 235, 1","bg-accent7-primary":"37, 159, 159, 1","bg-accent7-secondary":"155, 212, 214, 1","bg-accent7-tertiary":"208, 239, 239, 1","bg-accent8-primary":"86, 61, 130, 1","bg-accent8-secondary":"199, 162, 204, 1","bg-accent8-tertiary":"230, 214, 234, 1","bg-accent9-primary":"255, 191, 63, 1","bg-accent9-secondary":"254, 215, 142, 1","bg-accent9-tertiary":"251, 226, 185, 1","bg-accent10-primary":"237, 122, 35, 1","bg-accent10-secondary":"241, 146, 85, 1","bg-accent10-tertiary":"245, 187, 148, 1","bg-date-picker-range":"32, 54, 69, 1","text-primary":"252, 252, 252, 1","text-secondary":"188, 186, 213, 1","text-inverted-primary":"4, 4, 28, 1","text-inverted-secondary":"107, 116, 125, 1","text-black":"32, 54, 69, 1","text-white":"252, 252, 252, 1","text-brand":"176, 180, 181, 1","text-danger-link":"255, 56, 97, 1","text-danger-link-hover":"255, 71, 123, 1","text-danger-link-active":"230, 50, 87, 1","text-danger-link-focus":"255, 82, 136, 1","text-danger-link-visited":"255, 56, 97, 1","text-disabled":"70, 71, 101, 1","text-error":"255, 56, 97, 1","text-input-disabled":"176, 180, 181, 1","text-input-placeholder":"89, 96, 99, 1","text-link":"0, 187, 255, 1","text-link-hover":"0, 204, 255, 1","text-link-active":"4, 165, 245, 1","text-link-focus":"0, 204, 255, 1","text-link-visited":"128, 107, 255, 1","text-on-action":"4, 4, 28, 1","text-on-danger":"4, 4, 28, 1","text-on-disabled":"4, 4, 28, 1","text-sidebar-link":"188, 186, 213, 1","text-sidebar-link-hover":"18, 18, 39, 1","text-sidebar-link-selected":"252, 252, 252, 1","text-site-footer-link":"171, 198, 216, 1","text-site-footer-link-hover":"199, 217, 229, 1","text-site-footer-link-active":"143, 179, 203, 1","text-success":"89, 217, 119, 1","text-inverted-success":"1, 128, 31, 1","text-accent1-primary":"109, 217, 202, 1","text-accent2-primary":"95, 56, 206, 1","text-accent3-primary":"255, 203, 105, 1","text-accent4-primary":"255, 129, 87, 1","text-accent5-primary":"4, 165, 245, 1","text-accent6-primary":"255, 71, 123, 1","text-accent7-primary":"37, 159, 159, 1","text-accent8-primary":"86, 61, 130, 1","text-accent9-primary":"255, 191, 63, 1","text-accent10-primary":"237, 122, 35, 1","border-color-action":"0, 187, 255, 1","border-color-action-hover":"0, 204, 255, 1","border-color-action-active":"4, 165, 245, 1","border-color-chip":"107, 116, 125, 1","border-color-danger":"255, 56, 97, 1","border-color-danger-hover":"255, 71, 123, 1","border-color-danger-active":"230, 50, 87, 1","border-color-divider":"32, 54, 69, 1","border-color-divider-secondary":"51, 57, 61, 1","border-color-input-field":"32, 54, 69, 1","border-color-input-field-hover":"58, 98, 125, 1","border-color-input-field-focus":"0, 187, 255, 1","border-color-input-field-danger":"255, 56, 97, 1","border-color-input-field-danger-hover":"255, 71, 123, 1","border-color-input-field-danger-focus":"255, 56, 97, 1","border-color-input-field-disabled":"4, 4, 28, 1","border-color-secondary-btn-disabled":"70, 71, 101, 1","border-color-sidebar-item-focus":"0, 187, 255, 1","border-color-slider-handle":"107, 116, 125, 1","border-color-success":"89, 217, 119, 1","border-color-table-divider":"32, 54, 69, 1","border-color-tile":"32, 54, 69, 1","border-color-tile-hover":"58, 98, 125, 1","border-color-tile-focus":"0, 187, 255, 1","border-color-tile-selected-focus":"153, 192, 255, 1","border-color-tile-selected":"153, 192, 255, 1","border-color-tile-selected-hover":"178, 208, 255, 1","border-color-notification-btn":"252, 252, 252, 1","border-color-notification-btn-dark":"32, 54, 69, 1"},m={"border-secondary-btn":"0, 187, 255, 1","border-secondary-btn-hover":"0, 204, 255, 1","border-secondary-danger-btn":"255, 56, 97, 1","border-secondary-btn-active":"4, 165, 245, 1","border-secondary-danger-btn-hover":"255, 71, 123, 1","border-secondary-danger-btn-active":"230, 50, 87, 1","border-input-field":"32, 54, 69, 1","border-input-field-hover":"58, 98, 125, 1","border-input-field-focus":"0, 187, 255, 1","border-input-field-danger":"255, 56, 97, 1","border-input-field-danger-hover":"255, 71, 123, 1","border-input-field-danger-focus":"255, 56, 97, 1","border-sidebar-item-focus":"0, 187, 255, 1","border-input-field-disabled":"4, 4, 28, 1","border-success":"89, 217, 119, 1","border-secondary-btn-disabled":"70, 71, 101, 1","border-chip":"107, 116, 125, 1","border-divider":"32, 54, 69, 1","border-divider-secondary":"51, 57, 61, 1","border-tile-selected":"153, 192, 255, 1","border-tile-selected-hover":"178, 208, 255, 1","border-table-divider":"32, 54, 69, 1","border-slider-handle":"107, 116, 125, 1","border-tile":"32, 54, 69, 1","border-tile-hover":"58, 98, 125, 1","border-tile-focus":"0, 187, 255, 1","border-tile-selected-focus":"153, 192, 255, 1","border-notification-btn":"252, 252, 252, 1","border-notification-btn-black":"32, 54, 69, 1"},y={"shadow-card":"0px 2px 10px 0px rgba(0, 0, 0, 0.18), 0px 2px 4px 0px rgba(0, 0, 0, 0.1)","shadow-modal":"0px 6px 40px 0px rgba(2, 2, 15, 0.14), 0px 4px 24px 0px rgba(2, 2, 15, 0.28), 0px 8px 80px 0px rgba(2, 2, 15, 0.26)","shadow-popover":"0px 0px 88px 0px rgba(2, 2, 15, 0.08), 0px 0px 32px 0px rgba(2, 2, 15, 0.1), 0px 4px 72px 0px rgba(2, 2, 15, 0.16)","shadow-form-field":"0px 1px 2px 0px rgba(170, 170, 170, 0.06), 0px 1px 3px 0px rgba(170, 170, 170, 0.1)","shadow-dropdown-menu":"0px 2px 4px -2px rgba(0, 0, 0, 0.14), 0px 4px 6px -1px rgba(0, 0, 0, 0.16)","shadow-app-header":"0px 1px 0px 0px rgba(188, 186, 213, 0.25)","shadow-modal-header":"0px 1px 0px 0px rgba(188, 186, 213, 0.25)","shadow-modal-footer":"0px -2px 8px 0px rgba(188, 186, 213, 0.4), 0px -1px 0px 0px rgba(188, 186, 213, 0.25)","shadow-modal-footer-no-scroll":"0px -1px 0px 0px rgba(188, 186, 213, 0.25)"},x={"ring-input-focus":"0, 187, 255, 0.25","ring-input-danger-focus":"255, 56, 97, 0.25","ring-action-focus":"0, 187, 255, 0.25","ring-action-danger-focus":"255, 56, 97, 0.25"},k={"bg-backdrop-loading":"0, 0, 0, 0.5","text-page-notification-content":p["text-inverted-primary"],"bg-textarea-counter-exceed-max-length":"255, 87, 114","bg-date-picker-range":"32, 54, 69, 1","regular-credit-card-bg":"252, 252, 252, 1","regular-credit-card-top":"4, 4, 28, 1","regular-credit-card-bottom":"255, 255, 255, 1"},M=new class{constructor(){this.dynamicCustomDarkModeColor={},this.darkModeColorAllTokens={},this.observer=new o(this.isAcceptObserver.bind(this),(e=>{e?this.generateDarkModeStyle():this.removeDarkModeStyleContainer()})),n.register(t,this.observer)}registerCustomDarkModeColor(e){this.dynamicCustomDarkModeColor=Object.assign(Object.assign({},this.dynamicCustomDarkModeColor),e),this.generateDarkModeStyle()}generateDarkModeStyle(){this.darkModeColorAllTokens=Object.assign(p,m,x,y,k,this.dynamicCustomDarkModeColor);const e=Object.keys(this.darkModeColorAllTokens);this.getDarkModeStyleContainer().innerHTML=`\nhtml.dark {\n\t\t${e.map((e=>`--v-${e}: ${this.darkModeColorAllTokens[e]};`)).join("\n\t\t")}}`}getDarkModeStyleContainer(){let e=document.head.querySelector("#vegaDarkModeStyle");return e||(e=document.createElement("style"),e.id="vegaDarkModeStyle",document.head.append(e)),e}removeDarkModeStyleContainer(){const e=document.head.querySelector("#vegaDarkModeStyle");e&&e.remove()}isAcceptObserver(){return!0}},E=[{payloadKey:"IS_OVERRIDECOLORS_METHOD_CALLED",payloadDescription:"Indicate if the method overrideColors of public API ThemeManager is called",canAccept:(e,r)=>"ThemeManager"===e&&"overrideColors"===r,payloadValue:()=>!0},{payloadKey:"IS_RESET_METHOD_CALLED",payloadDescription:"Indicate if the method reset of public API ThemeManager is called",canAccept:(e,r)=>"ThemeManager"===e&&"reset"===r,payloadValue:()=>!0},{payloadKey:"IS_TOGGLEDARKMODE_METHOD_CALLED",payloadDescription:"Indicate if the method toggleDarkMode of public API ThemeManager is called",canAccept:(e,r)=>"ThemeManager"===e&&"toggleDarkMode"===r,payloadValue:()=>!0},{payloadKey:"IS_ISDARKMODE_METHOD_CALLED",payloadDescription:"Indicate if the method isDarkMode of public API ThemeManager is called",canAccept:(e,r)=>"ThemeManager"===e&&"isDarkMode"===r,payloadValue:()=>!0}];class A{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=a(A,["overrideColors","reset","toggleDarkMode","isDarkMode"],E)}async overrideColors(e){const r=g.generateOverrideThemes(e);g.applyTheme(r)}async reset(){g.getOverrideThemeContainer().innerHTML=""}toggleDarkMode(e){e?(document.documentElement.classList.add("dark"),M.generateDarkModeStyle()):document.documentElement.classList.remove("dark"),n.notify(t,e)}isDarkMode(){return document.documentElement.classList.contains("dark")}}!function(e,r,t,n){var o,i=arguments.length,a=i<3?r:null===n?n=Object.getOwnPropertyDescriptor(r,t):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,r,t,n);else for(var d=e.length-1;d>=0;d--)(o=e[d])&&(a=(i<3?o(a):i>3?o(r,t,a):o(r,t))||a);i>3&&a&&Object.defineProperty(r,t,a)}([i()],A.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const T=new A;var w,G;!function(e){e.SELECTION_RANGE="SELECTION_RANGE",e.CLEAR_FORMATTING="CLEAR_FORMATTING",e.LINK_GROUP="LINK_GROUP"}(w||(w={}));class _{}!function(e){e.ALIGNMENT="ALIGNMENT",e.TEXT_STYLE="TEXT_STYLE",e.INDENT="INDENT"}(G||(G={}));class O extends _{}const D=new class{constructor(){this.domToEntity=new WeakMap,this.entityToDOM=new WeakMap}register(e,r){this.domToEntity.set(e,r),this.entityToDOM.set(r,e)}getEntityByDOM(e){return this.domToEntity.get(e)}getDOMByEntity(e){return this.entityToDOM.get(e)}};var L,I,R;!function(e){e.DELETE_CHILD="DELETE_CHILD",e.DELETE_NEST_LIST="DELETE_NEST_LIST",e.UPDATE_TEXT="UPDATE_TEXT",e.REPLACE_SELECTED_TEXT="REPLACE_SELECTED_TEXT",e.APPEND_CHILD_NODES="APPEND_CHILD_NODES",e.CLEAR_CHILD_NODES="CLEAR_CHILD_NODES",e.INSERT_BLOCKS_AFTER="INSERT_BLOCKS_AFTER",e.INSERT_BLOCKS_BEFORE="INSERT_BLOCKS_BEFORE",e.INSERT_NODES_AFTER="INSERT_NODES_AFTER",e.INSERT_NODES_BEFORE="INSERT_NODES_BEFORE",e.SPLIT_BLOCK_WITH_NODE="SPLIT_BLOCK_WITH_NODE",e.REPLACE_CHILD_NODES="REPLACE_CHILD_NODES",e.REPLACE_NEST_LIST="REPLACE_NEST_LIST",e.MERGE_TWO_BLOCKS_NODES="MERGE_TWO_BLOCKS_NODES",e.BREAK_SINGLE_BLOCK="BREAK_SINGLE_BLOCK",e.LINE_BREAK_SINGLE_BLOCK="LINE_BREAK_SINGLE_BLOCK",e.LINE_BREAK_MULTIPLE_BLOCKS="LINE_BREAK_MULTIPLE_BLOCKS",e.TRANSFORM_LIST_BLOCK="TRANSFORM_LIST_BLOCK",e.TRANSFORM_PARAGRAPH_BLOCK="TRANSFORM_PARAGRAPH_BLOCK",e.DELETE_BLOCK_CONTENT="DELETE_BLOCK_CONTENT",e.INSERT_IMAGE_TO_BLOCK="INSERT_IMAGE_TO_BLOCK"}(L||(L={}));class S{constructor(){this.isFlushable=!1}}!function(e){e.TEXT="TEXT",e.IMAGE="IMAGE"}(I||(I={}));class C{constructor(e,r){this.annotationMap=new Map,this.id=e,r&&(this.annotationMap=r)}getAnnotationByType(e){return this.annotationMap.get(e)}deleteAnnotationByType(e){this.annotationMap.delete(e),this.flushChange()}apply(e){return this.doApply(e),e.isFlushable&&this.flushChange(),this}doApply(e){e instanceof S?this.doModifyActionApply(e):this.doAnnotationActionApply(e)}flushChange(){const e=D.getDOMByEntity(this);if(e){const r=d.getSubjectFromParentNodeByEventId(e,c);r&&n.notify(r,{})}}}!function(e){e.BOLD="BOLD",e.ITALIC="ITALIC",e.UNDERLINE="UNDERLINE",e.STRIKETHROUGH="STRIKETHROUGH",e.SELECTION_RANGE="SELECTION_RANGE",e.IMAGE="IMAGE",e.CODE="CODE",e.TEXT_COLOR="TEXT_COLOR",e.LINK="LINK"}(R||(R={}));class N extends _{}export{_ as A,O as B,w as I,S as M,N,C as R,T as V,G as a,L as b,R as c,I as d,M as e,D as s}
@@ -1 +0,0 @@
1
- import{F as s}from"./p-ff4bafa3.js";import{V as o,a as t,b as a,c as l,d as i}from"./p-76a8ccbb.js";import{V as c}from"./p-0461e318.js";import{M as e,V as n,s as r,G as f}from"./p-6e1ab235.js";import{V as p}from"./p-149d2801.js";import{v as b}from"./p-5f377954.js";import{V as h}from"./p-032df16f.js";import{w as m}from"./p-f86ec91b.js";import"./p-79ec5d69.js";import{V as d,a as T,s as u}from"./p-483c483a.js";import{T as j}from"./p-d884c644.js";import{V as g}from"./p-74958b1a.js";import{V as C}from"./p-52a8a4f8.js";import{U as O}from"./p-5dce8dfe.js";import{C as E}from"./p-2d0d575f.js";import{O as _}from"./p-331a62d5.js";import{f as R}from"./p-1c298d5a.js";var V=function(s,o,t,a){var l,i=arguments.length,c=i<3?o:null===a?a=Object.getOwnPropertyDescriptor(o,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(s,o,t,a);else for(var e=s.length-1;e>=0;e--)(l=s[e])&&(c=(i<3?l(c):i>3?l(o,t,c):l(o,t))||c);return i>3&&c&&Object.defineProperty(o,t,c),c};class A extends n{constructor(o){super(),this.originalWatchers=new Map,this.hasDisconnected=!1,this.isEnabled=s.isEnabled("VEGA_REACT.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD")&&s.isEnabled("VEGA_FRAMEWORK.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD"),this.component=o.component}connectedCallback(){if(!this.isEnabled)return;if(this.hasDisconnected)return;const s=this.component.constructor.watchers;for(const o in s)s[o].forEach((s=>{this.originalWatchers.has(s)||(this.originalWatchers.set(s,this.component[s]),this.component[s]=function(){})}))}disconnectedCallback(){this.isEnabled&&(this.hasDisconnected=!0)}componentDidLoad(){this.isEnabled&&this.originalWatchers.forEach(((s,o)=>{const t=s;this.component[o]=function(...s){return t.apply(this,s)}}))}}V([e("connectedCallback")],A.prototype,"connectedCallback",null),V([e("disconnectedCallback")],A.prototype,"disconnectedCallback",null),V([e("componentDidLoad")],A.prototype,"componentDidLoad",null);class k extends n{constructor(s){super(),this.component=s.component}connectedCallback(){const s=new _(this.isAcceptable.bind(this),(()=>{R(this.component)}));E.register(O,s)}isAcceptable(){var s;const o=this.component.host;return null===(s=d.getConnectedComponents().get(o.tagName))||void 0===s?void 0:s.has(o)}}!function(s,o,t,a){var l,i=arguments.length,c=i<3?o:null===a?a=Object.getOwnPropertyDescriptor(o,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(s,o,t,a);else for(var e=s.length-1;e>=0;e--)(l=s[e])&&(c=(i<3?l(c):i>3?l(o,t,c):l(o,t))||c);i>3&&c&&Object.defineProperty(o,t,c)}([e("connectedCallback")],k.prototype,"connectedCallback",null);const v=function(){globalThis.VegaDisabledFeatureKeys&&s.disable(...globalThis.VegaDisabledFeatureKeys),globalThis.VegaEnabledFeatureKeys&&s.enable(...globalThis.VegaEnabledFeatureKeys),globalThis.VegaLoader=o,globalThis.VegaNotify=t,globalThis.VegaThemeManager=c,globalThis.setVegaLogLevel=r,globalThis.VegaDialog=p,f.register([A,k]),globalThis.VegaEventManager=a,Object.keys(j).forEach((s=>{const{url:o}=j[s],t="vega-typography-"+s;if(!document.querySelector("#"+t)){const s=document.createElement("link");s.id=t,s.href=o,s.rel="stylesheet",document.head.append(s)}})),globalThis.VegaIconManager=h,globalThis.VegaZIndexManager=l,globalThis.ValidCreditCardNumberRule=g,globalThis.VegaEnvInfo=b.getVegaEnv(),import("./p-7a40e033.js").then((o=>{o.default.init(s)})),globalThis.waitForVega=m,globalThis.VegaSkeletonLoader=i,globalThis.VegaTranslation=T,globalThis.VegaTranslationResourceEN=u,globalThis.VegaRTEContent=C};export{v as g}
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as e,H as h,g as s}from"./p-1c298d5a.js";import{F as l}from"./p-ff4bafa3.js";import{V as a,M as r,A as o,D as c}from"./p-3a0a4d15.js";import{R as p}from"./p-3152031c.js";import{V as d}from"./p-74958b1a.js";import{s as n}from"./p-9b797118.js";import{I as v}from"./p-6e1ab235.js";import{V as m,I as f}from"./p-4387d550.js";import{F as u}from"./p-b517ed15.js";import{b as g}from"./p-5dce8dfe.js";import{C as _}from"./p-2d0d575f.js";import{c as A}from"./p-57669fd6.js";import{C as M}from"./p-ac608edc.js";import{D as E}from"./p-d7219734.js";import{f as w,A as Z,z as b}from"./p-7c37e5bb.js";import{V as j}from"./p-8284a445.js";import"./p-7a40e033.js";import"./p-112455b1.js";import"./p-262ec334.js";import"./p-0bb29d98.js";import"./p-331a62d5.js";import"./p-79ec5d69.js";import"./p-33b62194.js";import"./p-6a334573.js";import"./p-348e95ba.js";import"./p-483c483a.js";import"./p-5f589974.js";import"./p-4bcd6612.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-987fbbd0.js";import"./p-a9354a5c.js";import"./p-b0502d01.js";import"./p-1b860f90.js";import"./p-5f377954.js";import"./p-032df16f.js";const I=[{type:"visa",iconName:"visa",pattern:a,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999 999",slot:"9",accept:/\d/,triggerAtInit:l.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"mastercard",iconName:"mastercard",pattern:r,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999",slot:"9",accept:/\d/,triggerAtInit:l.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"amex",iconName:"amex",pattern:o,maskConfig:{type:"custom",options:{mask:"9999 999999 99999",slot:"9",accept:/\d/,triggerAtInit:l.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"discover",iconName:"discover",pattern:c,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999",slot:"9",accept:/\d/,triggerAtInit:l.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}}],D=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether the user's input in the credit card field should be automatically validated",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether the user's input in the credit card field should be automatically validated",payloadValue:t=>!1===t.autoValidation}];var R=function(t,i,e,h){var s,l=arguments.length,a=l<3?i:null===h?h=Object.getOwnPropertyDescriptor(i,e):h;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,e,h);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(l<3?s(a):l>3?s(i,e,a):s(i,e))||a);return l>3&&a&&Object.defineProperty(i,e,a),a};const y=class{constructor(h){t(this,h),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.globalSlimmers={},this.formFieldController=new u({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new p:null},{propertyName:"",ruleFactory:()=>new d}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerGetter(),touchableAreaGetter:()=>this.touchableAreaGetter()}),this.changeEventEmitter=A(y,w),this.blurEventEmitter=A(y,Z),this.focusEventEmitter=A(y,b),this.inputCreditCardEventPrevent=new M([w,b,Z],(()=>this.host),!0),this.vegaComponentUsageRuntimeMetricsSlimmer=new m(D),this.maskConfig={type:"custom",options:{mask:"",slot:"9",accept:/[\d\s]/,insertMode:!1,triggerAtInit:l.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")},trigger:"blur"},this.required=!1,this.disabled=!1,this.label="",this.hint="",this.size="default",this.placeholder="",this.hideCardNumberOnBlur=!0,this.autoValidation=!0,this.validationRules=[],this.isValid=null,this.value="",this.renderInputContainer=()=>{var t;const i=(null===(t=this.getCreditCardType(this.value))||void 0===t?void 0:t.iconName)||"regular-credit-card";return e("vega-input",{label:this.label,type:"number",prefixIcon:j.getIconKey(i),maskConfig:this.getMaskConfig(),placeholder:this.placeholder,disabled:this.disabled,size:this.size,value:this.value,hint:this.hint,required:this.required,showClearIcon:!1,ref:t=>{this.inputRef=t,E.addUniqueObserverToNode(t,w,(t=>{this.handleVegaChange(t)})),E.addUniqueObserverToNode(t,Z,(()=>{this.handleVegaBlur()})),E.addUniqueObserverToNode(t,b,(()=>{this.handleVegaFocus()}))}})},this.handleVegaChange=t=>{this.value=t.detail},this.handleVegaBlur=()=>{this.blurEventEmitter.emit()},this.handleVegaFocus=()=>{this.focusEventEmitter.emit()},this.inputContainerGetter=()=>this.inputRef.shadowRoot.querySelector(".vega-input-container"),this.touchableAreaGetter=()=>Array.from(this.inputRef.shadowRoot.querySelectorAll("input"))}watchValidationRules(){}watchValue(t){this.changeEventEmitter.emit(t),_.notify(g,{host:this.host,detail:t})}componentDidLoad(){l.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")&&this.hideCardNumberOnBlur&&this.inputRef.value&&this.value!==this.inputRef.value&&(this.value=this.inputRef.value)}render(){return n(e(h,null,this.renderInputContainer()),this.host)}getCreditCardType(t){return I.filter((i=>i.pattern.test(t)))[0]}getMaskConfig(){const t=[],i=this.getCreditCardType(this.value);return i&&(t.push(i.maskConfig),this.hideCardNumberOnBlur&&this.value.trim().includes(" ")&&(this.maskConfig.options.mask=this.generateDynamicMask(),t.push(this.maskConfig))),t}generateDynamicMask(){const t=this.value.trim().split(" ");return this.maskCardNumber(t).join(" ")}maskCardNumber(t){return t.map(((i,e)=>(e===t.length-1?"9":"X").repeat(i.length)))}get host(){return s(this)}static get watchers(){return{validationRules:["watchValidationRules"],value:["watchValue"]}}};j.register({visa:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#00579F" rx="2"/><path fill="#fff" d="M15.474 15.792h-1.979l1.238-7.653h1.979l-1.238 7.653ZM22.647 8.326A4.877 4.877 0 0 0 20.872 8c-1.954 0-3.33 1.042-3.339 2.532-.016 1.1.986 1.71 1.735 2.076.765.375 1.026.62 1.026.953-.008.513-.619.75-1.189.75-.79 0-1.213-.123-1.857-.408l-.26-.122-.277 1.718c.464.211 1.32.4 2.207.407 2.076 0 3.428-1.026 3.444-2.613.008-.872-.52-1.54-1.66-2.085-.693-.35-1.117-.586-1.117-.944.008-.326.359-.66 1.14-.66a3.362 3.362 0 0 1 1.474.293l.18.082.268-1.653ZM25.279 13.08l.79-2.14c-.008.016.162-.448.26-.733l.138.66s.375 1.831.457 2.214h-1.645ZM27.72 8.14h-1.53c-.472 0-.831.138-1.035.635l-2.94 7.018h2.077l.416-1.148h2.54c.057.269.237 1.148.237 1.148h1.832L27.72 8.14ZM11.842 8.139l-1.938 5.219-.212-1.059c-.358-1.221-1.482-2.548-2.736-3.208l1.775 6.693h2.093l3.11-7.645h-2.092Z"/><path fill="#FAA61A" d="M8.104 8.139H4.92l-.032.154c2.483.635 4.128 2.166 4.804 4.007L9 8.782c-.114-.489-.464-.627-.896-.643Z"/></svg>',autoSize:!0},mastercard:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#000" rx="2"/><path fill="#ED0006" fill-rule="evenodd" d="M18.25 17.157a6.75 6.75 0 0 1-4.426 1.649c-3.769 0-6.824-3.09-6.824-6.903C7 8.091 10.055 5 13.824 5a6.75 6.75 0 0 1 4.426 1.649A6.75 6.75 0 0 1 22.676 5c3.769 0 6.824 3.09 6.824 6.903 0 3.812-3.055 6.903-6.824 6.903a6.75 6.75 0 0 1-4.426-1.65Z" clip-rule="evenodd"/><path fill="#F9A000" fill-rule="evenodd" d="M18.25 17.157a6.92 6.92 0 0 0 2.398-5.254 6.92 6.92 0 0 0-2.398-5.254A6.75 6.75 0 0 1 22.676 5c3.769 0 6.824 3.09 6.824 6.903 0 3.812-3.055 6.903-6.824 6.903a6.75 6.75 0 0 1-4.426-1.65Z" clip-rule="evenodd"/><path fill="#FF5E00" fill-rule="evenodd" d="M18.25 6.65a6.92 6.92 0 0 1 2.398 5.253 6.92 6.92 0 0 1-2.398 5.254 6.92 6.92 0 0 1-2.398-5.254A6.92 6.92 0 0 1 18.25 6.65Z" clip-rule="evenodd"/></svg>',autoSize:!0},amex:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><g clip-path="url(#a)"><rect width="36" height="24" fill="#016FD0" rx="2"/><path fill="#fff" d="M6.99 18.549v-5.654h5.986l.643.838.663-.838h21.729v5.264s-.569.384-1.226.39H22.754l-.724-.891v.891h-2.373v-1.521s-.325.212-1.025.212h-.808v1.309h-3.593l-.641-.855-.651.855H6.99ZM0 8.634l1.35-3.147h2.334l.767 1.763V5.487h2.902l.456 1.274.442-1.274h13.027v.64s.685-.64 1.81-.64l4.227.015.753 1.74V5.487h2.428l.669 1v-1h2.45v5.654h-2.45l-.64-1.003v1.003h-3.569l-.359-.892h-.959l-.353.892h-2.42c-.968 0-1.587-.628-1.587-.628v.628H17.63l-.725-.892v.892H3.34l-.359-.892h-.956l-.356.892H0V8.634Z"/><path fill="#016FD0" d="M1.827 6.184.006 10.417h1.185l.336-.847H3.48l.335.847h1.211L3.207 6.184h-1.38Zm.673.985.596 1.482H1.903L2.5 7.169ZM5.151 10.416V6.183l1.685.006.98 2.73.956-2.736h1.671v4.233H9.385v-3.12l-1.122 3.12h-.928L6.21 7.296v3.12H5.15ZM11.168 10.416V6.183h3.454v.947h-2.384v.724h2.328v.891h-2.328v.752h2.384v.92h-3.454ZM15.233 6.184v4.233h1.059V8.913h.445l1.27 1.504H19.3l-1.393-1.56a1.29 1.29 0 0 0 1.161-1.3c0-.89-.7-1.373-1.48-1.373h-2.355Zm1.059.947h1.21c.29 0 .5.227.5.446 0 .28-.273.445-.485.445h-1.225v-.891ZM20.582 10.416h-1.08V6.183h1.08v4.233ZM23.144 10.416h-.233c-1.129 0-1.814-.889-1.814-2.1 0-1.24.678-2.133 2.103-2.133h1.17v1.003h-1.213c-.578 0-.988.451-.988 1.141 0 .82.468 1.165 1.142 1.165h.279l-.446.924ZM25.448 6.184l-1.82 4.233h1.185l.336-.847h1.953l.334.847h1.211l-1.819-4.233h-1.38Zm.674.985.595 1.482h-1.192l.597-1.482ZM28.77 10.416V6.183h1.345l1.718 2.66v-2.66h1.059v4.233H31.59l-1.762-2.73v2.73H28.77ZM7.715 17.825v-4.233h3.453v.947H8.784v.724h2.329v.89H8.784v.753h2.384v.919H7.715ZM24.636 17.825v-4.233h3.454v.947h-2.384v.724h2.317v.89h-2.317v.753h2.384v.919h-3.454ZM11.303 17.825l1.681-2.09-1.721-2.143h1.333l1.025 1.324 1.029-1.324h1.281l-1.699 2.116 1.685 2.117h-1.333l-.996-1.304-.971 1.304h-1.314ZM16.041 13.592v4.233h1.086v-1.337h1.114c.943 0 1.658-.5 1.658-1.472 0-.806-.56-1.424-1.52-1.424H16.04Zm1.086.957h1.174c.304 0 .522.187.522.488 0 .282-.217.487-.526.487h-1.17v-.975ZM20.359 13.592v4.233h1.058V16.32h.446l1.269 1.504h1.293l-1.393-1.56a1.29 1.29 0 0 0 1.162-1.3c0-.89-.7-1.373-1.48-1.373h-2.355Zm1.058.947h1.21c.29 0 .501.226.501.445 0 .281-.273.446-.486.446h-1.225v-.891ZM28.58 17.825v-.92H30.7c.313 0 .449-.169.449-.354 0-.178-.136-.358-.45-.358h-.957c-.831 0-1.295-.507-1.295-1.268 0-.679.424-1.333 1.66-1.333h2.062l-.446.952H29.94c-.341 0-.446.179-.446.35 0 .175.13.369.39.369h1.003c.927 0 1.33.526 1.33 1.215 0 .74-.449 1.347-1.38 1.347H28.58ZM32.464 17.825v-.92h2.118c.313 0 .45-.169.45-.354 0-.178-.136-.358-.45-.358h-.957c-.832 0-1.295-.507-1.295-1.268 0-.679.424-1.333 1.66-1.333h2.02l-.404.952h-1.783c-.34 0-.446.179-.446.35 0 .175.13.369.39.369h1.003c.927 0 1.33.526 1.33 1.215 0 .74-.449 1.347-1.38 1.347h-2.256Z"/></g><defs><clipPath id="a"><rect width="36" height="24" fill="#fff" rx="2"/></clipPath></defs></svg>',autoSize:!0},discover:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#232342" rx="2"/><path fill="#fff" fill-rule="evenodd" d="M30.686 9.61c1.086 0 1.684.484 1.684 1.398a1.307 1.307 0 0 1-1.087 1.397l1.467 1.988h-1.14l-1.25-1.935h-.109v1.935h-.924V9.61h1.359Zm-.435 2.204h.272c.597 0 .869-.269.869-.752 0-.43-.272-.699-.87-.699h-.27v1.45Zm-4.129 2.579h2.608v-.806h-1.684v-1.29h1.63v-.806h-1.63v-1.074h1.684V9.61h-2.608v4.781Zm-2.716-1.559-1.25-3.223h-.978l2.01 4.889h.49l2.01-4.89h-.978l-1.304 3.225Zm-11.029-.805c0 1.343 1.087 2.471 2.445 2.471.435 0 .815-.107 1.195-.269v-1.074c-.271.322-.652.537-1.086.537-.87 0-1.576-.645-1.576-1.504v-.108c-.054-.86.652-1.612 1.521-1.665.435 0 .87.215 1.141.537V9.879c-.326-.214-.76-.268-1.14-.268-1.413-.108-2.5 1.02-2.5 2.418Zm-1.684-.591c-.543-.215-.706-.323-.706-.591.054-.323.326-.591.652-.538.271 0 .543.162.76.376l.49-.644c-.381-.323-.87-.538-1.359-.538-.76-.053-1.412.538-1.467 1.29v.054c0 .644.272 1.02 1.141 1.289.217.054.435.161.652.269a.563.563 0 0 1 .272.483c0 .376-.326.699-.652.699h-.055c-.434 0-.814-.269-.977-.645l-.598.59c.326.592.978.914 1.63.914.869.054 1.575-.59 1.63-1.45v-.162c-.055-.644-.326-.967-1.413-1.396Zm-3.15 2.954h.923V9.611h-.924v4.781ZM3.25 9.611H4.88c1.304.054 2.336 1.128 2.282 2.418 0 .698-.326 1.343-.87 1.826-.488.376-1.086.591-1.684.538H3.25V9.61Zm1.195 3.976c.435.053.924-.108 1.25-.376.326-.323.489-.753.489-1.236 0-.43-.163-.86-.49-1.182-.325-.269-.814-.43-1.249-.376h-.271v3.17h.271Z" clip-rule="evenodd"/><path fill="#FD6020" fill-rule="evenodd" d="M18.788 9.5c-1.358 0-2.499 1.075-2.499 2.471 0 1.344 1.087 2.472 2.5 2.526 1.412.053 2.498-1.075 2.553-2.472C21.287 10.628 20.2 9.5 18.788 9.5Z" clip-rule="evenodd"/></svg>',autoSize:!0},"regular-credit-card":{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" rx="2" style=\'fill: rgba(var(--v-regular-credit-card-bg, 205, 209, 211, 1))\'/><g clip-path="url(#a)"><path style="fill: rgba(var(--v-regular-credit-card-top, 252, 252, 252, 1))" d="M11 5c-1.103 0-2 .897-2 2v1h18V7c0-1.103-.897-2-2-2H11Zm16 6H9v6c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2v-6Zm-14.5 4h2c.275 0 .5.225.5.5s-.225.5-.5.5h-2a.501.501 0 0 1-.5-.5c0-.275.225-.5.5-.5Zm3.5.5c0-.275.225-.5.5-.5h4c.275 0 .5.225.5.5s-.225.5-.5.5h-4a.501.501 0 0 1-.5-.5Z"/></g><defs><clipPath id="a"><path d="M9 4h18v16H9z" style=\'fill: rgba(var(--v-regular-credit-card-bottom, 255, 255, 255, 1))\'/></clipPath></defs></svg>',autoSize:!0}}),R([f()],y.prototype,"globalSlimmers",void 0),R([v()],y.prototype,"formFieldController",void 0),R([v()],y.prototype,"changeEventEmitter",void 0),R([v()],y.prototype,"blurEventEmitter",void 0),R([v()],y.prototype,"focusEventEmitter",void 0),R([v()],y.prototype,"inputCreditCardEventPrevent",void 0),R([v()],y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),y.style=":host{display:inline-block;width:100%;text-align:left;line-height:normal}";export{y as vega_input_credit_card}
@@ -1 +0,0 @@
1
- import{B as t,a as s,M as e,b as i,s as n,N as r,c as h,R as o,d as a,A as c,I as u,V as l}from"./p-0461e318.js";import{C as d}from"./p-2d0d575f.js";import{d as p}from"./p-7c37e5bb.js";import{V as f,b as w}from"./p-348e95ba.js";import{i as b}from"./p-b1f65b13.js";import"./p-6e1ab235.js";import{g as k}from"./p-33b62194.js";class m extends t{constructor(t){super(),this.type=s.ALIGNMENT,this.textAlign=t}static from(t){return[s.ALIGNMENT,new m(t)]}toJSON(){return{textAlign:this.textAlign}}renderClass(){return`v-rte--horizontal-alignment-${this.textAlign}`}render(){return null}}class g extends t{constructor(t){super(),this.type=s.INDENT,this.indent=Math.max(0,t)}static from(t){return[s.INDENT,new g(t)]}toJSON(){return this.indent>0?{indent:this.indent}:null}render(){return this.indent>0?{"margin-left":16*this.indent+"px"}:null}}class x{replaceBlockWithBlocks(t,s){this.blocks&&(s.forEach((t=>{t.parent=this})),this.blocks=this.blocks.flatMap((e=>e===t?s:e)))}appendChildBlocks(t){this.blocks&&(t.forEach((t=>{t.parent=this})),this.blocks=this.blocks.concat(t))}removeChildBlock(t){this.blocks&&(this.blocks=this.blocks.filter((s=>s!==t)))}}class y extends e{constructor(t){super(),this.type=i.APPEND_CHILD_NODES,this.entityToBeAppended=t}}class N extends e{constructor(t){super(),this.type=i.DELETE_CHILD,this.entityToBeRemoved=t}}const O=[{key:"black",light:"#111128",dark:"#E3E3E8"},{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"}],A="​";class S extends x{constructor(t){super(),this.annotationMap=new Map,this.id=t}static createAnnotationEntity(t,s){switch(t){case"textAlign":return m.from(s);case"indent":return g.from(s)}}toJSON(){const s=Array.from(this.annotationMap.values()).filter((s=>s instanceof t)).reduce(((t,s)=>Object.assign(Object.assign({},t),s.toJSON())),{});return Object.assign({id:this.id},Object.keys(s).length>0?{annotations:s}:{})}getAnnotationByType(t){return this.annotationMap.get(t)}apply(t){if(this.doApply(t),t.isFlushable){const t=n.getDOMByEntity(this);if(t){const s=p.getSubjectFromParentNodeByEventId(t,f);s&&d.notify(s,{})}}}doApply(t){t instanceof e?this.doModifyActionApply(t):this.applyAnnotationAction(t)}applyAnnotationAction(t){const s=t.toAnnotation();this.annotationMap.set(s.type,s),"function"==typeof this.doAnnotationActionApply&&this.doAnnotationActionApply(t)}appendChildNodes(t){t.forEach((t=>{t.parentBlock=this})),this.nodes=this.nodes.concat(t)}mergeTwoBlocksNodes(t){if(this.type===t.type||"image"!==this.type&&"image"!==t.type){let s=t.nodes;"image"!==this.type&&(s=t.nodes.filter((t=>t.text&&"​"!==t.text))),this.apply(new y(s)),t.parent.apply(new N(t))}}concatBlocksNodes(t){const s=[];return t.map((t=>{"image"!==t.type&&(s.push(...t.nodes),t.parent.apply(new N(t)))})),s}getPreviousNode(t){const s=t.parentBlock,e=s.nodes.indexOf(t);if(e>0)return s.nodes[e-1];if(s.parent){const t=this.getPreviousBlock(s);if(t)return this.getBlockLastNode(t)}}getNextNode(t){const s=t.parentBlock,e=s.nodes.indexOf(t);if(s.nodes[e+1])return s.nodes[e+1];if(s.parent){const t=this.getNextBlock(s);if(t)return this.getBlockFirstNode(t)}}isContentFirstNode(t){const s=t.parentBlock,e=s.nodes.indexOf(t),i=s.parent;if("list-item"===s.type){const t=i.parent;return 0===e&&Array.isArray(i.blocks)&&i.blocks[0]===s&&"list-item"!==t.type&&Array.isArray(t.blocks)&&t.blocks[0]===i}return 0===e&&Array.isArray(i.blocks)&&i.blocks[0]===s}getBlockLastNode(t){if("list-item"===t.type)return t.children&&t.children.length>0?this.getBlockLastNode(t.children[t.children.length-1]):t.nodes[t.nodes.length-1];if("number-list"===t.type||"bullet-list"===t.type){if(t.blocks)return this.getBlockLastNode(t.blocks[t.blocks.length-1])}else if(t.nodes)return t.nodes[t.nodes.length-1]}getBlockFirstNode(t){if("number-list"===t.type||"bullet-list"===t.type){if(t.blocks)return this.getBlockFirstNode(t.blocks[0])}else if(t.nodes)return t.nodes[0]}getPreviousBlock(t){if(t&&t.parent&&t.parent.blocks){const s=t.parent.blocks.indexOf(t);if(s>0)return t.parent.blocks[s-1];if(("number-list"===t.parent.type||"bullet-list"===t.parent.type)&&0===s)return this.getPreviousBlock(t.parent)}}getNextBlock(t){if(t&&t.parent&&t.parent.blocks){const s=t.parent.blocks.indexOf(t);if(t.parent.blocks[s+1])return t.parent.blocks[s+1];if("list-item"===t.type&&t.parent.blocks.length===s+1)return this.getNextBlock(t.parent)}}replaceNodeWithNodes(t,s){this.nodes&&(s.forEach((t=>{t.parentBlock=this})),this.nodes=this.nodes.flatMap((e=>e===t?s:e)))}}class B extends r{constructor(t="md",s){super(),this.type=h.IMAGE,this.size=t,this.alt=s}static from(t,s){return[h.IMAGE,new B(t,s)]}toJSON(){return b(this.alt)?{size:this.size,alt:this.alt}:{size:this.size}}render(){switch(this.size){case"sm":return{width:"25%"};case"md":return{width:"50%"};case"lg":return{width:"100%"}}}}class C extends o{constructor(t,s,e,i){super(t,i),this.type=a.IMAGE,this.url=s,this.parentBlock=e}static from(t,s){const e=new C(t.id,t.url,s);let i;return i=t.annotations&&0!==Object.keys(t.annotations).length?t.annotations:{size:"md"},e.annotationMap=new Map(Object.keys(i).map((()=>B.from(i.size,i.alt))).filter(b)),e}toJSON(){const t=this.annotationMap.get(h.IMAGE),s={};return(null==t?void 0:t.size)&&(s.size=t.size),(null==t?void 0:t.alt)&&(s.alt=t.alt),Object.assign(Object.assign({id:this.id},Object.keys(s).length>0?{annotations:s}:{}),{type:"image",url:this.url})}doAnnotationActionApply(t){const s=t.toAnnotation();this.annotationMap.set(s.type,s)}doModifyActionApply(t){}}class j extends e{constructor(t){super(),this.type=i.REPLACE_CHILD_NODES,this.newChildNodes=t}}class v extends e{constructor(t,...s){super(),this.type=i.INSERT_BLOCKS_AFTER,this.referBlock=t,this.blocksToBeInserted=s}}class L extends e{constructor(t,s){super(),this.type=i.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=t,this.startOffsetOfNode=s}}class E{}class I extends E{constructor(){super(...arguments),this.doSplit=!0}}class J extends c{constructor(t){super(),this.type=u.SELECTION_RANGE,this.range=t}}class M extends r{constructor(t){super(),this.type=h.STRIKETHROUGH,this.strikethrough=t}static from(t){return[h.STRIKETHROUGH,new M(t)]}toJSON(){return{strikethrough:this.strikethrough}}renderClass(){return this.strikethrough?"v-rte--strikethrough":null}render(){return null}}class T extends r{constructor(t){super(),this.type=h.UNDERLINE,this.underline=t}static from(t){return[h.UNDERLINE,new T(t)]}toJSON(){return{underline:this.underline}}renderClass(){return this.underline?"v-rte--underline":null}render(){return null}}class F extends r{constructor(t){super(),this.type=h.ITALIC,this.italic=t}static from(t){return[h.ITALIC,new F(t)]}toJSON(){return{italic:this.italic}}render(){return this.italic?{"font-style":"italic"}:null}}class W extends r{constructor(t){super(),this.type=h.BOLD,this.bold=t}static from(t){return[h.BOLD,new W(t)]}toJSON(){return{bold:this.bold}}render(){return this.bold?{"font-weight":"700"}:null}}class z extends c{constructor(){super(...arguments),this.type=u.CLEAR_FORMATTING,this.items=[h.BOLD,h.ITALIC,h.UNDERLINE,h.STRIKETHROUGH,h.TEXT_COLOR,h.CODE]}}class P extends r{constructor(t){super(),this.type=h.CODE,this.code=t}static from(t){return[h.CODE,new P(t)]}toJSON(){return{code:this.code}}renderClass(){return this.code?"v-rte--code":null}render(){return null}}class H extends r{constructor(t){super(),this.type=h.TEXT_COLOR,this.textColor=this.formatTextColor(t)}static from(t){return[h.TEXT_COLOR,new H(t)]}toJSON(){return{textColor:this.textColor.key}}renderClass(){return null}render(){return{color:l.isDarkMode()?this.textColor.dark:this.textColor.light}}formatTextColor(t){return O.find((s=>s.key===t))||O[0]}}class D extends r{constructor(t){super(),this.type=h.LINK,this.link=t}static from(t){return[h.LINK,new D({href:t.href,groupKey:t.groupKey})]}toJSON(){return{link:{href:this.link.href,groupKey:this.link.groupKey}}}toEqual(t){return this.link.groupKey===t.link.groupKey}render(){return null}}class V extends I{constructor({link:t,newText:s,needMergeNode:e,doSplit:i}){super(),this.isFlushable=!0,this.link=t,this.needMergeNode=e,this.newText=s,b(i)&&(this.doSplit=i)}toAnnotation(){return new D(this.link)}}class K extends I{constructor(t){super(),this.isFlushable=!0,this.code=t}toAnnotation(){return new P(this.code)}}class U extends I{constructor(){super(...arguments),this.isFlushable=!0}toAnnotation(){return new z}}class q extends e{constructor(t){super(),this.type=i.UPDATE_TEXT,this.newTextContent="",this.newTextContent=t}}class R extends c{constructor(t){super(),this.type=u.LINK_GROUP,this.linkGroups=new Map,this.linkGroups=new Map([[t,[]]])}}class $ extends E{constructor(t,s){super(),this.isFlushable=!1,this.groupKey=t,this.nodes=s}toAnnotation(){return new R(this.groupKey)}}class Z extends E{constructor(){super(),this.isFlushable=!1}toAnnotation(){return null}}class G extends E{constructor(t){super(),this.isFlushable=!0,this.annotationType=t}toAnnotation(){}}class Q extends o{constructor(t,s,e,i){super(t,i),this.type=a.TEXT,this.parentBlock=e,this.text=s}static from(t,s){const e=new Q(t.id,t.text,s),{annotations:i}=t;return i&&(e.annotationMap=new Map(Object.keys(i).map((t=>(i.link&&s.apply(new $(i.link.groupKey,[e])),this.createAnnotationEntity(t,i[t])))).filter(b))),e}static createAnnotationEntity(t,s){switch(t){case"bold":return W.from(s);case"italic":return F.from(s);case"underline":return T.from(s);case"strikethrough":return M.from(s);case"code":return P.from(s);case"textColor":return H.from(s);case"link":return D.from(s)}}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof r)).reduce(((t,s)=>Object.assign(Object.assign({},t),s.toJSON())),{});return Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"text",text:this.text})}cloneWithText(t){return new Q(k(),t,this.parentBlock,new Map(this.annotationMap))}isEmpty(){return!this.text||"​"===this.text||"\n"===this.text}doAnnotationActionApply(t){const s=this.getAnnotationByType(u.SELECTION_RANGE);if(t instanceof I&&t.doSplit&&s){const{startContainer:e,endContainer:i,startOffset:n,endOffset:r}=s.range,h=e===i&&n===r;this.parentBlock.nodes=this.parentBlock.nodes.flatMap((e=>e.id===this.id?h?this.insertNewNode(n,t):this.shouldSplitSelection(s.range)?this.splitTextNode(t,s.range):(this.applyActionToNode(this,t),this):e))}else this.applyActionToNode(this,t);this.parentBlock.mergeNodes(t)}doModifyActionApply(t){switch(t.type){case i.UPDATE_TEXT:this.updateText(t.newTextContent);break;case i.REPLACE_SELECTED_TEXT:this.replaceSelectedText(t.textToBeInsert,t.currentRange)}}splitTextNode(t,s){const{startContainer:e,endContainer:i,startOffset:r}=s,h=e.parentElement,o=i.parentElement,a=(t,s,e)=>{const i=t.substring(0,s),n=t.substring(s,e),r=t.substring(e);return[this.cloneWithText(i),this.cloneWithText(n),this.cloneWithText(r)]},c=h&&n.getEntityByDOM(h),u=o&&n.getEntityByDOM(o);if(c&&c.id===this.id){const n=e===i?s.endOffset:this.text.length,[h,o,c]=a(this.text,r,n);return this.applyActionToNode(o,t),[h,o,c].filter((t=>!!t.text))}if(u&&u.id===this.id){const[e,i,n]=a(this.text,0,s.endOffset);return this.applyActionToNode(i,t),[e,i,n].filter((t=>!!t.text))}return this.applyActionToNode(this,t),this}applyActionToNode(t,s){const e=s.toAnnotation();if(s instanceof Z)this.syncUpSelectedNodes(t);else if(e instanceof J||this.syncUpSelectedNodes(t),s instanceof G)this.annotationMap.delete(s.annotationType);else{if(!(e instanceof z))return e instanceof r||e instanceof J?(s instanceof V&&(b(s.newText)&&(t.text=s.newText),this.parentBlock.apply(new $(s.link.groupKey,[t]))),s instanceof K&&this.applyActionToNode(t,new U),void t.annotationMap.set(e.type,e)):void 0;e.items.forEach((s=>{t.deleteAnnotationByType(s)}))}}replaceSelectedText(t,s){if(s&&s.startContainer&&s.endContainer){const{startContainer:e,endContainer:i,startOffset:r,endOffset:h}=s,o=e.parentElement,a=i.parentElement,c=o&&n.getEntityByDOM(o),u=a&&n.getEntityByDOM(a);let l=0,d=this.text.length;c&&c===this?(l=r,d=e===i?h:d):u&&u===this&&(d=h),this.apply(new q(this.text.slice(0,l)+t+this.text.slice(d)))}}updateText(t){this.text=t,!this.text&&this.isLinkNode()&&this.annotationMap.delete(h.LINK)}isLinkNode(){return this.annotationMap.has("LINK")}shouldSplitSelection(t){const{startContainer:s,endContainer:e,startOffset:i,endOffset:n}=t;return s!==e||i>0||n<(e.textContent?e.textContent.length:0)}syncUpSelectedNodes(t){const s=n.getDOMByEntity(this);if(s){const e=p.getSubjectFromParentNodeByEventId(s,w);e&&d.notify(e,{node:t})}}insertNewNode(t,s){if(0===t){const t=this.cloneWithText("");return this.applyActionToNode(t,s),[t,this]}if(t===this.text.length){const t=this.cloneWithText("");return this.applyActionToNode(t,s),[this,t]}const e=this.cloneWithText(this.text.substring(0,t)),i=this.cloneWithText(""),n=this.cloneWithText(this.text.substring(t));return this.applyActionToNode(i,s),[e,i,n]}}class X extends t{constructor(t){super(),this.type=s.TEXT_STYLE,this.textStyle=t}static from(t){return[s.TEXT_STYLE,new X(t)]}toJSON(){return{textStyle:this.textStyle}}render(){const t={fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",fontWeight:"500"};switch(this.textStyle){case"paragraph":return t;case"title":return{fontFamily:"Inter",fontSize:"36px",lineHeight:"40px",fontWeight:"500"};case"subtitle":return{fontFamily:"Inter",fontSize:"28px",lineHeight:"32px",fontWeight:"500"};case"heading-1":return{fontFamily:"Inter",fontSize:"22px",lineHeight:"24px",fontWeight:"500"};case"heading-2":return{fontFamily:"Inter",fontSize:"20px",lineHeight:"24px",fontWeight:"500"};case"heading-3":return{fontFamily:"Inter",fontSize:"18px",lineHeight:"22px",fontWeight:"500"}}}}class Y extends E{constructor(t,s){super(),this.isFlushable=!0,this.textStyle=t,this.bold=s}toAnnotation(){return new X(this.textStyle)}}class _ extends I{constructor(t){super(),this.isFlushable=!0,this.bold=t}toAnnotation(){return new W(this.bold)}}class tt extends e{constructor(t){super(),this.type=i.MERGE_TWO_BLOCKS_NODES,this.blockNeedToBeMerged=t}}class st extends e{constructor(t,...s){super(),this.type=i.INSERT_BLOCKS_BEFORE,this.referBlock=t,this.blocksToBeInserted=s}}class et extends S{constructor(t,s){super(t),this.nodes=[],this.type=s,this.annotationMap=et.isAcceptableTextStyle(s)?new Map([X.from(s)]):new Map([X.from("paragraph")])}static from(t){const s=new et(t.id,t.type),{annotations:e}=t;return s.nodes=t.nodes.map((t=>Q.from(t,s))),e&&Object.entries(e).forEach((([t,e])=>{const i=this.createAnnotationEntity(t,e);b(i)&&s.annotationMap.set(...i)})),s}static createAnnotationEntity(t,s){return"textStyle"===t?X.from(s):super.createAnnotationEntity(t,s)}static isAcceptableTextStyle(t){return["title","subtitle","paragraph","heading-1","heading-2","heading-3"].includes(t)}mergeNodes(t){this.nodes=this.nodes.reduce(((s,e)=>{const i=s.at(-1);if(t instanceof V&&t.needMergeNode){const t=null==i?void 0:i.getAnnotationByType(h.LINK),n=e.getAnnotationByType(h.LINK);if(t&&n&&t.toEqual(n))return s}return[...s,e]}),[])}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,nodes:this.nodes.map((t=>t.toJSON()))})}cloneWithNodes(t){const s=new et(k(),this.type);return s.nodes=[],s.apply(new y(t)),s}isNotEmpty(){return this.nodes.length>0&&this.nodes.some((t=>!t.isEmpty()))}getLastNode(){return this.nodes[this.nodes.length-1]}doAnnotationActionApply(t){if(t instanceof Y)return"list-item"!==this.type&&(this.type=t.textStyle),void this.nodes.forEach(t.bold?t=>{const s=new _(!0);s.doSplit=!1,t.apply(s)}:t=>{t.apply(new G(h.BOLD))});if(t instanceof $){const s=this.getAnnotationByType(u.LINK_GROUP);if(s){const e=s.linkGroups.get(t.groupKey);s.linkGroups.set(t.groupKey,[...e,...t.nodes]),this.annotationMap.set(u.LINK_GROUP,s)}}}doModifyActionApply(t){switch(t.type){case i.DELETE_CHILD:this.removeChildNode(t);break;case i.APPEND_CHILD_NODES:this.appendChildNodes(t.entityToBeAppended);break;case i.CLEAR_CHILD_NODES:this.nodes=[];break;case i.SPLIT_BLOCK_WITH_NODE:t.newBlock=this.splitTextNodeBlock(t.splitPointNode,t.startOffsetOfNode);break;case i.REPLACE_CHILD_NODES:this.nodes=[],this.appendChildNodes(t.newChildNodes);break;case i.MERGE_TWO_BLOCKS_NODES:this.mergeTwoBlocksNodes(t.blockNeedToBeMerged);break;case i.BREAK_SINGLE_BLOCK:t.newBlock=this.breakSingleTextBlock(t.startContainerNode,t.startOffset);break;case i.LINE_BREAK_SINGLE_BLOCK:t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset);break;case i.LINE_BREAK_MULTIPLE_BLOCKS:t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks);break;case i.TRANSFORM_LIST_BLOCK:this.convertParagraphToList(t);break;case i.DELETE_BLOCK_CONTENT:this.deleteNodeContent(t);break;case i.INSERT_IMAGE_TO_BLOCK:this.insertImage(t);break;case i.INSERT_NODES_BEFORE:this.replaceNodeWithNodes(t.referNode,[...t.nodesToBeInserted,t.referNode])}}splitTextNodeBlock(t,s){if(t){const e=t.text.slice(0,s),i=t.text.slice(s),n=this.nodes.indexOf(t);if(n>-1){const s=this.nodes.slice(0,n),r=this.nodes.slice(n+1);e&&s.push(t.cloneWithText(e)),i&&r.unshift(t.cloneWithText(i)),this.apply(new j(s));const h=this.cloneWithNodes(r);return this.parent.apply(new v(this,h)),h}}}isCaretPositionAtStart(t,s){return t===this.nodes[0]&&0===s}isCaretPositionAtEnd(t,s){const e=this.nodes[this.nodes.length-1];return t===e&&(t.isEmpty()||s===e.text.length)}lineBreakSingleBlock(t,s){if(t){const e=new Q(k(),"\n",this),i=t.text.slice(0,s),n=t.text.slice(s),r=this.nodes.indexOf(t);if(r>-1){const s=this.nodes.slice(0,r),h=this.nodes.slice(r+1);i&&s.push(t.cloneWithText(i)),n&&h.unshift(t.cloneWithText(n)),this.mergeLineBreakNodes(s,e,h)}return e}}lineBreakMultipleBlocks(t){const s=this.nodes,e=new Q(k(),"\n",this),i=this.concatBlocksNodes(t.slice(1));return this.mergeLineBreakNodes(s,e,i),e}deleteNodeContent(t){const s=t.startContainerNode,e=t.startOffset;if(0!==e&&!s.isEmpty()){const i=s.text.slice(0,e-1)+s.text.slice(e);if(s.apply(new q(i)),i)return void(t.previousNode=s);{const e=this.getPreviousNode(s);return e&&e.parentBlock===this&&"\n"===e.text||1===this.nodes.length?void(t.previousNode=s):(this.apply(new N(s)),void(t.previousNode=e))}}{let e=this.getPreviousNode(s),i=null;if(this.nodes.length&&e&&e.parentBlock!==this)s.isEmpty()&&this.apply(new N(s)),e.parentBlock.apply(new tt(this));else if(this.isContentFirstNode(s)&&s.isEmpty()&&(i=this.getNextNode(s)),s.isEmpty()&&this.apply(new N(s)),e instanceof Q&&e.isEmpty()){const t=e;e=this.getPreviousNode(e),t.parentBlock.apply(new N(t)),e||(i=s)}0===this.nodes.length&&this.parent.apply(new N(this)),e?t.previousNode=e:i&&(t.nextNode=i)}}removeChildNode(t){this.nodes=this.nodes.filter((s=>s!==t.entityToBeRemoved)),0===this.nodes.length&&this.parent.apply(new N(this))}mergeLineBreakNodes(t,s,e){(0===e.length||e[0]&&""===e[0].text)&&e.push(new Q(k(),"\n",this,t[t.length-1]&&t[t.length-1].annotationMap)),this.apply(new j([...t,s,...e]))}breakSingleTextBlock(t,s){const e=this.copyInlineStyleToNewParagraph(t);if(this.isCaretPositionAtEnd(t,s))this.parent.apply(new v(this,e));else{if(!this.isCaretPositionAtStart(t,s)){const e=new L(t,s);return this.apply(e),e.newBlock}this.parent.apply(new st(this,e))}return e}convertParagraphToList(t){const s=this.parent.createList(t.listType),e=t.selectedBlocks.map((t=>this.parent.toListItem(t)));s.apply(new y(e)),this.parent.apply(new v(t.selectedBlocks[0],s)),t.selectedBlocks.forEach((t=>{t.parent.apply(new N(t))}))}insertImage(t){const s=t.splitPointNode,e=t.startOffsetOfNode,i=t.imageBlockToBeInserted;if(this.isCaretPositionAtEnd(s,e))this.parent.apply(new v(this,i));else if(this.isCaretPositionAtStart(s,e))this.parent.apply(new st(this,i));else{const t=new L(s,e);this.apply(t),this.parent.apply(new v(this,i))}}copyInlineStyleToNewParagraph(t){const s=t.cloneWithText("");s.annotationMap.delete(h.LINK);const e=new et(k(),"paragraph");return e.apply(new y([s])),e}}class it extends S{constructor(t){super(t),this.type="image",this.nodes=[]}static from(t){const s=new it(t.id),{annotations:e}=t;return s.nodes=t.nodes.map((t=>C.from(t,s))),e&&Object.entries(e).forEach((([t,e])=>{const i=this.createAnnotationEntity(t,e);b(i)&&s.annotationMap.set(...i)})),s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:"image",nodes:this.nodes.map((t=>t.toJSON()))})}isNotEmpty(){return this.nodes.length>0&&this.nodes.some((t=>t.url.length>0))}getLastNode(){return this.nodes[this.nodes.length-1]}doModifyActionApply(t){switch(t.type){case i.DELETE_CHILD:this.removeChildNode(t);break;case i.CLEAR_CHILD_NODES:this.nodes=[];break;case i.APPEND_CHILD_NODES:this.appendChildNodes(t.entityToBeAppended);break;case i.REPLACE_CHILD_NODES:this.nodes=[],this.appendChildNodes(t.newChildNodes);break;case i.SPLIT_BLOCK_WITH_NODE:t.newBlock=this.splitImageNodes(t.splitPointNode,t.startOffsetOfNode);break;case i.MERGE_TWO_BLOCKS_NODES:this.mergeTwoBlocksNodes(t.blockNeedToBeMerged);break;case i.BREAK_SINGLE_BLOCK:t.newBlock=this.breakSingleBlock(t.startContainerNode,t.startOffset);break;case i.LINE_BREAK_SINGLE_BLOCK:t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset);break;case i.LINE_BREAK_MULTIPLE_BLOCKS:t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks);break;case i.DELETE_BLOCK_CONTENT:this.deleteNodeContent(t);break;case i.INSERT_IMAGE_TO_BLOCK:this.insertImage(t);break;case i.INSERT_NODES_AFTER:this.replaceNodeWithNodes(t.referNode,[t.referNode,...t.nodesToBeInserted]);break;case i.INSERT_NODES_BEFORE:this.replaceNodeWithNodes(t.referNode,[...t.nodesToBeInserted,t.referNode])}}removeChildNode(t){this.nodes=this.nodes.filter((s=>s!==t.entityToBeRemoved)),0===this.nodes.length&&this.parent.apply(new N(this))}splitImageNodes(t,s){const e=this.nodes.indexOf(t);if(e>-1){const t=this.nodes.slice(0,e+s),i=this.nodes.slice(e+s);this.apply(new j(t));const n=this.cloneWithNodes(i);return this.parent.apply(new v(this,n)),n}}cloneWithNodes(t){const s=new it(k());return s.nodes=[],s.apply(new y(t)),s}breakSingleBlock(t,s){const e=et.from({id:k(),type:"paragraph",nodes:[{id:k(),type:"text",text:""}]});if(this.isCaretPositionAtEnd(t,s))this.parent.apply(new v(this,e));else{if(!this.isCaretPositionAtStart(t,s)){const e=new L(t,s);return this.apply(e),e.newBlock}this.parent.apply(new st(this,e))}return e}lineBreakSingleBlock(t,s){const e=this.breakSingleBlock(t,s);if(e)return e.nodes[0]}isCaretPositionAtStart(t,s){return t===this.nodes[0]&&0===s}isCaretPositionAtEnd(t,s){return t===this.nodes[this.nodes.length-1]&&1===s}lineBreakMultipleBlocks(t){const s=et.from({id:k(),type:"paragraph",nodes:[{id:k(),type:"text",text:"\n"}]});this.parent.apply(new v(this,s));const e=this.concatBlocksNodes(t.slice(1));return(0===e.length||e[0]&&""===e[0].text)&&e.push(new Q(k(),"\n",s)),s.apply(new y(e)),s.nodes[0]}deleteNodeContent(t){const s=t.startContainerNode,e=t.startOffset;let i=this.getPreviousNode(s),n=null;if(1===e){const t=s.parentBlock;this.isContentFirstNode(s)&&(n=this.getNextNode(s)),1===t.nodes.length?t.parent.apply(new N(t)):s.parentBlock.apply(new N(s))}else{const e=i;e&&e instanceof C&&(i=this.getPreviousNode(e),e.parentBlock.apply(new N(e)),i||(t.nextNode=s))}i?t.previousNode=i:n&&(t.nextNode=n)}insertImage(t){const s=t.splitPointNode,e=t.startOffsetOfNode,i=t.imageBlockToBeInserted;this.nodes.length<1?this.apply(new y(t.imageBlockToBeInserted.nodes)):this.isCaretPositionAtEnd(s,e)?this.parent.apply(new v(this,i)):this.isCaretPositionAtStart(s,e)?this.parent.apply(new st(this,i)):(this.apply(new L(s,e)),this.parent.apply(new v(this,i)))}}class nt extends et{constructor(t,s){super(t,"list-item"),this.children=[],this.children=s}static from(t){const s=new nt(t.id);s.nodes=t.nodes.map((t=>Q.from(t,s))),t.children&&(s.children=t.children.map((t=>{const e=ht.from(t);return e.parent=s,e})));const{annotations:e}=t;return e&&Object.entries(e).forEach((([t,e])=>{const i=this.createAnnotationEntity(t,e);b(i)&&s.annotationMap.set(...i)})),s}toJSON(){var t;return Object.assign(Object.assign({},super.toJSON()),{type:"list-item",children:null===(t=this.children)||void 0===t?void 0:t.map((t=>t.toJSON()))})}cloneWithNodes(t){const s=new nt(k());return s.nodes=[],s.apply(new y(t)),s}isNotEmpty(){return this.children?super.isNotEmpty()||this.children.some((t=>t.isNotEmpty())):super.isNotEmpty()}getLastNode(){return this.children&&this.children.length>0?this.children[this.children.length-1].getLastNode():super.getLastNode()}doModifyActionApply(t){switch(t.type){case i.DELETE_CHILD:this.removeListChildNode(t);break;case i.DELETE_NEST_LIST:this.removeNestList(t);break;case i.APPEND_CHILD_NODES:this.appendChildNodes(t.entityToBeAppended);break;case i.CLEAR_CHILD_NODES:this.nodes=[];break;case i.SPLIT_BLOCK_WITH_NODE:this.splitListItemBlock(t);break;case i.REPLACE_CHILD_NODES:this.nodes=[],this.appendChildNodes(t.newChildNodes);break;case i.REPLACE_NEST_LIST:this.replaceNestList(t.newList);break;case i.MERGE_TWO_BLOCKS_NODES:this.mergeTwoBlocksNodes(t.blockNeedToBeMerged);break;case i.BREAK_SINGLE_BLOCK:t.newBlock=this.breakSingleListItemBlock(t.startContainerNode,t.startOffset);break;case i.LINE_BREAK_SINGLE_BLOCK:t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset);break;case i.LINE_BREAK_MULTIPLE_BLOCKS:t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks);break;case i.DELETE_BLOCK_CONTENT:this.deleteListNodeContent(t);break;case i.INSERT_IMAGE_TO_BLOCK:this.parent.apply(t);break;case i.INSERT_NODES_BEFORE:this.replaceNodeWithNodes(t.referNode,[...t.nodesToBeInserted,t.referNode])}}removeListChildNode(t){this.nodes=this.nodes.filter((s=>s!==t.entityToBeRemoved)),0!==this.nodes.length||this.children&&this.children.length||this.parent.apply(new N(this))}removeNestList(t){this.children&&(this.children=this.children.length>1?this.children.filter((s=>s!==t.nestListBlockToBeRemoved)):void 0)}replaceNestList(t){t.forEach((t=>{t.parent=this})),this.children=t}splitListItemBlock(t){t.newBlock=this.splitTextNodeBlock(t.splitPointNode,t.startOffsetOfNode)}breakSingleListItemBlock(t,s){const e=new nt(k()),i=this.copyInlineStyleToNewNode(t);if(e.apply(new y([i])),this.isCaretPositionAtEnd(t,s))return this.breakListItemAtEnd(e);if(!this.isCaretPositionAtStart(t,s)){const e=new L(t,s);return this.apply(e),e.newBlock}return this.parent.apply(new st(this,e)),e}breakListItemAtEnd(t){const s=this.parent.blocks[this.parent.blocks.length-1],e=1===this.nodes.length&&this.nodes[0].isEmpty();if(this===s&&e){const s=this.parent.parent;if("list-item"!==s.type){const e=et.from({id:k(),type:"paragraph",nodes:[]});return e.apply(new y(t.nodes)),s.apply(new v(this.parent,e)),this.parent.apply(new N(this)),e}s.parent.apply(new v(s,t)),this.parent.apply(new N(this))}else this.parent.apply(new v(this,t));return t}deleteListNodeContent(t){const s=t.startContainerNode.parentBlock.parent;this.deleteNodeContent(t),0===s.blocks.length&&s.parent.apply(new N(s))}copyInlineStyleToNewNode(t){const s=t.cloneWithText("");return s.annotationMap.delete(h.LINK),s}}class rt extends e{constructor(t){super(),this.type=i.DELETE_NEST_LIST,this.nestListBlockToBeRemoved=t}}class ht extends S{constructor(t,s){super(t),this.type="bullet-list",this.blocks=[],this.type=s}static from(t){const s=new ht(t.id,t.type);return s.blocks=t.blocks.map((t=>{const e=nt.from(t);return e.parent=s,e})),s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,blocks:this.blocks.map((t=>t.toJSON()))})}isNotEmpty(){return this.blocks.length>0&&this.blocks.some((t=>t.isNotEmpty()))}getLastNode(){return this.blocks[this.blocks.length-1].getLastNode()}doModifyActionApply(t){switch(t.type){case i.DELETE_CHILD:this.removeListItemBlock(t.entityToBeRemoved);break;case i.INSERT_BLOCKS_AFTER:this.replaceBlockWithBlocks(t.referBlock,[t.referBlock,...t.blocksToBeInserted]);break;case i.INSERT_BLOCKS_BEFORE:this.replaceBlockWithBlocks(t.referBlock,[...t.blocksToBeInserted,t.referBlock]);break;case i.APPEND_CHILD_NODES:this.appendChildBlocks(t.entityToBeAppended);break;case i.TRANSFORM_LIST_BLOCK:this.convertToList(t);break;case i.TRANSFORM_PARAGRAPH_BLOCK:this.convertToParagraph(t);break;case i.INSERT_IMAGE_TO_BLOCK:this.insertImage(t)}}toParagraph(t){const s=new et(k(),"paragraph");return s.apply(new y(t.nodes)),s.annotationMap=t.annotationMap,s}convertToList(t){const s=t.selectedBlocks,e=this.parent.createList(t.listType);if(s.every((t=>t.parent===this)))e.apply(new y(this.blocks)),this.parent.apply(new v(this,e)),this.parent.apply(new N(this)),s.forEach((t=>t.nodes.map((t=>t.apply(new Z)))));else{const s=t.selectedBlocks.map((t=>this.parent.toListItem(t)));e.apply(new y(s)),this.parent.apply(new v(this,e)),t.selectedBlocks.forEach((t=>{t.parent.apply(new N(t))})),0===this.blocks.length&&this.parent.apply(new N(this))}}convertToParagraph(t){let s=!1,e=!1;const i=t.selectedBlocks,n=i.map((t=>(t.nodes.map((t=>t.apply(new Z))),t===this.blocks[0]&&(s=!0),t===this.blocks[this.blocks.length-1]&&(e=!0),this.toParagraph(t))));if(s)this.parent.apply(new st(this,...n));else if(e)this.parent.apply(new v(this,...n));else{const t=this.blocks.indexOf(i[0]),s=this.blocks.indexOf(i[i.length-1]),e=this.parent.createList(this.type);e.apply(new y(this.blocks.slice(0,t)));const r=this.parent.createList(this.type);r.apply(new y(this.blocks.slice(s+1))),this.parent.apply(new st(this,e,...n,r)),this.parent.apply(new N(this))}i.map((t=>{this.apply(new N(t))})),0===this.blocks.length&&this.parent.apply(new N(this))}insertImage(t){this.parent.apply("list-item"!==this.parent.type?new v(this,t.imageBlockToBeInserted):t)}removeListItemBlock(t){super.removeChildBlock(t),0===this.blocks.length&&this.parent&&this.parent.apply(this.parent instanceof nt?new rt(this):new N(this))}}class ot extends x{constructor(t){super(),t.forEach((t=>{t.parent=this})),this.blocks=t}static fromJSON(t){const s=t.map((t=>{switch(t.type){case"paragraph":case"title":case"subtitle":case"heading-1":case"heading-2":case"heading-3":return et.from(t);case"image":return it.from(t);case"bullet-list":case"number-list":return ht.from(t);default:throw new Error(`[Vega] Unknown block type: ${t.type}`)}}));return new ot(s)}static createEmptyContent(){return ot.fromJSON([{id:k(),type:"paragraph",nodes:[{id:k(),type:"text",text:""}]}])}clone(){return new ot([...this.blocks])}toJSON(){return this.blocks.map((t=>t.toJSON()))}apply(t){switch(t.type){case i.DELETE_CHILD:this.removeChildBlock(t.entityToBeRemoved);break;case i.APPEND_CHILD_NODES:this.appendChildBlocks(t.entityToBeAppended);break;case i.INSERT_BLOCKS_AFTER:this.replaceBlockWithBlocks(t.referBlock,[t.referBlock,...t.blocksToBeInserted]);break;case i.INSERT_BLOCKS_BEFORE:this.replaceBlockWithBlocks(t.referBlock,[...t.blocksToBeInserted,t.referBlock])}}toListItem(t){t.nodes.map((t=>t.apply(new Z)));const s=new nt(k());return s.apply(new y(t.nodes)),s.annotationMap=t.annotationMap,s}createList(t){return new ht(k(),t)}}export{E as A,_ as B,U as C,m as H,B as I,V as L,tt as M,et as R,M as S,I as T,T as U,ot as V,A as Z,it as a,nt as b,ht as c,S as d,C as e,Q as f,H as g,O as h,F as i,Y as j,X as k,W as l,K as m,J as n,g as o,y as p,q,L as r,N as s,j as t,st as u,v}
@@ -1 +0,0 @@
1
- import{h as e,H as t,r as i,c as o,g as a}from"./p-1c298d5a.js";import{s as r}from"./p-9b797118.js";import{R as n}from"./p-3152031c.js";import{c as s,V as l,M as d,I as p}from"./p-6e1ab235.js";import{R as c}from"./p-7f2441d6.js";import{m as h}from"./p-6bd5c49b.js";import{V as g,I as v}from"./p-4387d550.js";import{D as m}from"./p-d7219734.js";import{a as u,f,s as b,y as x}from"./p-7c37e5bb.js";import{b as w}from"./p-5dce8dfe.js";import{C as y}from"./p-2d0d575f.js";import{c as j}from"./p-86194314.js";import{V as R}from"./p-149d2801.js";import{F as I}from"./p-b517ed15.js";import{f as C,d as k}from"./p-79ec5d69.js";import{C as U}from"./p-ac608edc.js";import{c as O}from"./p-57669fd6.js";import{T as z}from"./p-9ab547b0.js";import"./p-b1f65b13.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-4bcd6612.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-331a62d5.js";import"./p-33b62194.js";import"./p-6a334573.js";import"./p-0bb29d98.js";import"./p-348e95ba.js";import"./p-483c483a.js";import"./p-5f589974.js";import"./p-987fbbd0.js";import"./p-a9354a5c.js";import"./p-b0502d01.js";import"./p-1b860f90.js";import"./p-5f377954.js";import"./p-ff4bafa3.js";import"./p-7a40e033.js";import"./p-112455b1.js";var V=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class F extends l{getImageUploaderContainer(){return this.imageUploaderContainerRef}render(){return e(t,{class:{disabled:this.disabled}},this.renderLabelDom(),e("div",{ref:e=>this.imageUploaderContainerRef=e,class:{"vega-image-uploader-select":!0,"disabled-border":this.disabled&&!this.value},style:{width:this.getSize(this.width),height:this.getSize(this.height)}},this.renderContentByStatus()),this.inputRenderer.render(),this.renderHint())}renderLabelDom(){return e("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,label:this.label})}renderContentByStatus(){if("uploading"===this.status)return this.uploadingContentRenderer.render();{const e=this.previewController.getImagePreviewURL();return e?this.previewContentRenderer.render(e):this.defaultContentRenderer.render()}}renderHint(){return this.hint&&e("div",{class:"vega-hint"},e("label",null,this.hint))}getSize(e){if(e){const t=c.format(e,"size");return"number"==typeof t?`${t}px`:`${t}`}}}V([s({componentFieldName:"vegaImageUploaderInputRenderer"})],F.prototype,"inputRenderer",void 0),V([s({componentFieldName:"vegaImageUploaderDefaultContentRenderer"})],F.prototype,"defaultContentRenderer",void 0),V([s({componentFieldName:"vegaImageUploaderPreviewContentRenderer"})],F.prototype,"previewContentRenderer",void 0),V([s({componentFieldName:"vegaImageUploaderUploadingContentRenderer"})],F.prototype,"uploadingContentRenderer",void 0),V([s({componentFieldName:"vegaImageUploaderPreviewController"})],F.prototype,"previewController",void 0),V([s()],F.prototype,"value",void 0),V([s()],F.prototype,"disabled",void 0),V([s()],F.prototype,"status",void 0),V([s()],F.prototype,"label",void 0),V([s()],F.prototype,"required",void 0),V([s()],F.prototype,"width",void 0),V([s()],F.prototype,"height",void 0),V([s()],F.prototype,"hint",void 0);var N=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class D extends l{constructor(){super(...arguments),this.handleFileInputChange=e=>{e.stopPropagation();const t=e.target;t.files.length&&this.valueController.setValue(t.files[0])}}getFileInputRef(){return this.fileInputRef}render(){return e("input",{type:"file",accept:this.accept,class:"v-hidden",ref:e=>this.fileInputRef=e,onChange:this.handleFileInputChange})}}N([s({componentFieldName:"vegaImageUploaderValueController"})],D.prototype,"valueController",void 0),N([s()],D.prototype,"accept",void 0);var E=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class A extends l{triggerInputClick(){this.disabled||this.inputRenderer.getFileInputRef().click()}resetInput(){this.inputRenderer.getFileInputRef().value=""}}E([s({componentFieldName:"vegaImageUploaderInputRenderer"})],A.prototype,"inputRenderer",void 0),E([s()],A.prototype,"disabled",void 0);var P=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class S extends l{constructor(){super(...arguments),this.renderActionButton=t=>{const i=this.getButtonOptions(t);return e("vega-button-circle",Object.assign({size:"small",variant:"icon-only",iconColor:"text-inverted-primary",role:"menuitem",ref:e=>{m.addUniqueObserverToNode(e,u,(()=>{this.handleClick(t)}))}},i))}}handleClick(e){switch(e){case"Preview":this.previewController.showPreview();break;case"Delete":this.removeController.showRemoveDialog();break;case"Replace":this.inputController.triggerInputClick()}}render(){return this.showRemoveButton||this.showPreviewButton||this.showReplaceButton?e("span",{class:"actions"},this.showPreviewButton&&this.renderActionButton("Preview"),this.showReplaceButton&&!this.disabled&&this.renderActionButton("Replace"),this.showRemoveButton&&!this.disabled&&this.renderActionButton("Delete")):null}getButtonOptions(e){let t;switch(e){case"Preview":t={icon:"zoom-in",label:e};break;case"Delete":t={icon:"delete-bin",label:e};break;case"Replace":t={icon:"photo",label:e}}return t}}P([s({componentFieldName:"vegaImageUploaderInputController"})],S.prototype,"inputController",void 0),P([s({componentFieldName:"vegaImageUploaderValueController"})],S.prototype,"valueController",void 0),P([s({componentFieldName:"vegaImageUploaderPreviewController"})],S.prototype,"previewController",void 0),P([s({componentFieldName:"vegaImageUploaderRemoveController"})],S.prototype,"removeController",void 0),P([s()],S.prototype,"disabled",void 0),P([s()],S.prototype,"showPreviewButton",void 0),P([s()],S.prototype,"showRemoveButton",void 0),P([s()],S.prototype,"showReplaceButton",void 0),P([s()],S.prototype,"removeEventEmitter",void 0);var L=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class T extends l{handleValueChange(){this.value||this.inputController.resetInput(),this.changeEventEmitter.emit(this.value),y.notify(w,{host:this.host,detail:this.value})}setValue(e){this.value=e}}L([s({writable:!0})],T.prototype,"value",void 0),L([s()],T.prototype,"changeEventEmitter",void 0),L([s()],T.prototype,"host",void 0),L([s({componentFieldName:"vegaImageUploaderInputController"})],T.prototype,"inputController",void 0),L([d("watchValue")],T.prototype,"handleValueChange",null);var _=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class B extends l{constructor(){super(...arguments),this.getImagePreviewURL=e=>{if(e=e||this.value)return e.url||URL.createObjectURL(e)},this.generatePreviewModal=e=>{const t=document.createElement("vega-modal");return this.value&&this.value.name&&(t.modalTitle=this.value.name),t.innerHTML=`\n <div style='text-align: center'>\n <img style='width: 100%' class="preview-image" src="${e}" alt="" />\n </div>\n `,this.previewModalRef=t,document.body.append(t),t}}disconnectedCallback(){var e;null===(e=this.previewModalRef)||void 0===e||e.remove()}showPreview(){const e=this.getImagePreviewURL();if(this.previewModalRef){const t=this.previewModalRef.querySelector(".preview-image");t&&e&&(t.src=e),this.value&&this.value.name&&(this.previewModalRef.modalTitle=this.value.name),this.previewModalRef.modal("show")}else this.generatePreviewModal(e).modal("show")}}_([s()],B.prototype,"value",void 0),_([d("disconnectedCallback")],B.prototype,"disconnectedCallback",null),_([d("getContentURL")],B.prototype,"getImagePreviewURL",void 0);class K extends l{render(t){const i=this.actionsRenderer.render();return e("div",{class:{"image-preview-container":!0,"actions-backdrop":!!i},tabIndex:0,role:"menu"},e("img",{src:t,alt:""}),i)}}!function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);r>3&&n&&Object.defineProperty(t,i,n)}([s({componentFieldName:"vegaImageUploaderActionsRenderer"})],K.prototype,"actionsRenderer",void 0);var $=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class q extends l{constructor(){super(...arguments),this.handleCancelUploading=e=>{e.stopPropagation(),this.status=void 0,this.removeController.handleRemoveFile(),this.cancelEventEmitter.emit()}}render(){return e("div",{class:"action-wrapper",role:"button",tabIndex:0,onClick:this.handleCancelUploading,onKeyDown:j()},e("span",{class:"action-loading"}),e("div",{class:"vega-image-uploader-text cancel-action"},"Cancel"))}}$([s({componentFieldName:"vegaImageUploaderRemoveController"})],q.prototype,"removeController",void 0),$([s({writable:!0})],q.prototype,"status",void 0),$([s()],q.prototype,"cancelEventEmitter",void 0);var G=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class H extends l{constructor(){super(...arguments),this.handleUploaderClick=e=>{e.stopPropagation(),this.inputController.triggerInputClick()}}render(){return e("div",{class:"action-wrapper",role:"button",tabIndex:0,onClick:this.handleUploaderClick,onKeyDown:j()},e("vega-icon",{icon:"plus-sign",size:"size-24"}),e("div",{class:"vega-image-uploader-text"},this.translationSlimmer.t(this.actionTitle)),this.renderSubtitle())}renderSubtitle(){return this.actionSubTitle&&e("div",{class:"sub-title"},this.actionSubTitle)}}G([s({componentFieldName:"vegaImageUploaderInputController"})],H.prototype,"inputController",void 0),G([s()],H.prototype,"actionTitle",void 0),G([s()],H.prototype,"actionSubTitle",void 0),G([s()],H.prototype,"translationSlimmer",void 0);var M=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class J extends l{constructor(){super(...arguments),this.showRemoveDialog=()=>{this.removeDialogRef=R.open({type:"danger",title:"Delete Image",content:"Are you sure you want to delete this image?",handleOk:()=>(this.handleRemoveFile(),!0),okButton:{label:"Delete"}})},this.handleRemoveFile=()=>{this.valueController.setValue(null),this.removeEventEmitter.emit()}}disconnectedCallback(){var e;null===(e=this.removeDialogRef)||void 0===e||e.remove()}}M([s({componentFieldName:"vegaImageUploaderValueController"})],J.prototype,"valueController",void 0),M([s()],J.prototype,"removeEventEmitter",void 0),M([d("disconnectedCallback")],J.prototype,"disconnectedCallback",null);var Q=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class W extends l{handleValueChange(){this.value&&this.hideBackDropAndActions()}hideBackDropAndActions(){const e=k();e&&C(e,"vega-image-uploader")===this.host&&e.blur()}}Q([s()],W.prototype,"host",void 0),Q([s()],W.prototype,"value",void 0),Q([d("watchValue")],W.prototype,"handleValueChange",null);const X=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented for image uploads",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented for image uploads",payloadValue:e=>!1===e.autoValidation}];var Y=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};const Z=["jpg","png","jpeg"],ee=class{constructor(e){i(this,e),this.vegaChange=o(this,"vegaChange",7),this.change=o(this,"change",7),this.vegaRemove=o(this,"vegaRemove",7),this.remove=o(this,"remove",7),this.vegaCancel=o(this,"vegaCancel",7),this.cancel=o(this,"cancel",7),this.globalSlimmers={},this.translationSlimmer=new z,this.vegaImageUploaderRenderer=new F,this.vegaImageUploaderUploadingContentRenderer=new q,this.vegaImageUploaderPreviewContentRenderer=new K,this.vegaImageUploaderDefaultContentRenderer=new H,this.vegaImageUploaderInputRenderer=new D,this.vegaImageUploaderActionsRenderer=new S,this.vegaImageUploaderInputController=new A,this.vegaImageUploaderValueController=new T,this.vegaImageUploaderPreviewController=new B,this.vegaImageUploaderRemoveController=new J,this.actionsVisibilityController=new W,this.formFieldController=new I({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new n:null}],validationRulesName:"validationRules",defaultValue:null,attributeGetter:e=>this[e],inputContainerGetter:()=>this.vegaImageUploaderRenderer.getImageUploaderContainer(),touchableAreaGetter:()=>[this.vegaImageUploaderInputRenderer.getFileInputRef()]}),this.changeEventEmitter=O(ee,f),this.removeEventEmitter=O(ee,b),this.cancelEventEmitter=O(ee,x),this.buttonCircleEventPrevent=new U([u],(()=>this.vegaImageUploaderRenderer.getImageUploaderContainer())),this.vegaComponentUsageRuntimeMetricsSlimmer=new g(X),this.value=null,this.accept=Z.map((e=>`.${e}`)).join(","),this.showPreviewButton=!0,this.showRemoveButton=!0,this.showReplaceButton=!0,this.disabled=!1,this.required=!1,this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.label="",this.actionTitle="Upload",this.width=120,this.height=120}watchValue(){}watchValidationRules(){}disconnectedCallback(){}async getContentURL(e){return h(e)}render(){return r(this.vegaImageUploaderRenderer.render(),this.host)}get host(){return a(this)}static get watchers(){return{value:["watchValue"],validationRules:["watchValidationRules"]}}};Y([v()],ee.prototype,"globalSlimmers",void 0),Y([p()],ee.prototype,"translationSlimmer",void 0),Y([p()],ee.prototype,"vegaImageUploaderRenderer",void 0),Y([p()],ee.prototype,"vegaImageUploaderUploadingContentRenderer",void 0),Y([p()],ee.prototype,"vegaImageUploaderPreviewContentRenderer",void 0),Y([p()],ee.prototype,"vegaImageUploaderDefaultContentRenderer",void 0),Y([p()],ee.prototype,"vegaImageUploaderInputRenderer",void 0),Y([p()],ee.prototype,"vegaImageUploaderActionsRenderer",void 0),Y([p()],ee.prototype,"vegaImageUploaderInputController",void 0),Y([p()],ee.prototype,"vegaImageUploaderValueController",void 0),Y([p()],ee.prototype,"vegaImageUploaderPreviewController",void 0),Y([p()],ee.prototype,"vegaImageUploaderRemoveController",void 0),Y([p()],ee.prototype,"actionsVisibilityController",void 0),Y([p()],ee.prototype,"formFieldController",void 0),Y([p()],ee.prototype,"changeEventEmitter",void 0),Y([p()],ee.prototype,"removeEventEmitter",void 0),Y([p()],ee.prototype,"cancelEventEmitter",void 0),Y([p()],ee.prototype,"buttonCircleEventPrevent",void 0),Y([p()],ee.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),ee.style=':host{display:inline-block;vertical-align:middle}:host .vega-image-uploader-select{box-sizing:border-box;background-color:rgba(var(--v-bg-tertiary, 240, 243, 247, 1));border-radius:8px;border-color:rgba(var(--v-border-color-input-field, 171, 198, 216, 1));display:flex;flex-direction:row;align-items:center;border-width:1px;border-style:dashed;min-width:120px;min-height:120px}:host .vega-image-uploader-select .action-wrapper{display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:8px;width:100%;height:100%;padding:12px;box-sizing:border-box;cursor:pointer;flex-grow:1;outline:none}:host(.disabled) .vega-image-uploader-select.disabled-border{border-color:rgba(var(--v-border-color-input-field-disabled, 222, 225, 227, 1))}:host(:not(.disabled)) .vega-image-uploader-select:hover{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border-color:rgba(var(--v-border-color-input-field-hover, 115, 160, 190, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}:host(:not(.disabled)) .vega-image-uploader-select:hover .vega-image-uploader-text{color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}:host(:not(.disabled)) .vega-image-uploader-select .action-wrapper:focus-visible{box-shadow:0 0 0 4px rgba(var(--v-ring-input-focus, 19, 98, 226, 0.25))}:host(:not(.disabled)) .vega-image-uploader-select .actions-backdrop:focus-visible{box-shadow:0 0 0 4px rgba(var(--v-ring-input-focus, 19, 98, 226, 0.25))}:host(:not(.disabled)) .vega-image-uploader-select .error .action-wrapper:focus-visible{box-shadow:0 0 0 4px rgba(var(--v-ring-input-danger-focus, 230, 50, 87, 0.25))}:host(.disabled) .vega-image-uploader-select .action-wrapper{cursor:not-allowed}:host(.disabled) .vega-image-uploader-select .action-wrapper vega-icon{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host(.disabled) .vega-image-uploader-select .action-wrapper .vega-image-uploader-text{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-image-uploader-select .vega-image-uploader-text{padding-top:20px;color:rgba(var(--v-text-link, 19, 98, 226, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px;text-align:center}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-image-uploader-select .vega-image-uploader-text{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-image-uploader-select .vega-image-uploader-text{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-image-uploader-select .vega-image-uploader-text{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;letter-spacing:0px}}:host .vega-image-uploader-select .action-wrapper vega-icon{color:rgba(var(--v-text-link, 19, 98, 226, 1))}:host(:not(.disabled)) .vega-image-uploader-select:not(.error):focus-within{border-color:rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1))}:host .image-preview-container{display:flex;align-items:center;justify-content:center;position:relative;height:100%;width:100%;border-radius:8px;outline:none}:host .image-preview-container img{width:100%;height:100%;border-radius:8px;object-fit:contain}:host .image-preview-container.actions-backdrop::before{width:100%;height:100%;border-radius:8px;position:absolute;top:0px;right:0px;bottom:0px;left:0px;opacity:0;transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;background-color:rgba(0, 0, 0, 0.6);content:" "}:host .vega-image-uploader-select .actions{position:absolute;top:0px;right:0px;bottom:0px;left:0px;opacity:0;transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;display:flex;align-items:center;justify-content:center;gap:2px;pointer-events:none}:host .image-preview-container.actions-backdrop:hover::before{opacity:1;pointer-events:auto}:host .image-preview-container:hover .actions{opacity:1;pointer-events:auto}:host .vega-image-uploader-select .actions-backdrop:focus-visible::before{opacity:1;pointer-events:auto}:host .vega-image-uploader-select .actions-backdrop:focus-visible .actions{opacity:1;pointer-events:auto}:host .vega-image-uploader-select .actions-backdrop:focus-within::before{opacity:1;pointer-events:auto}:host .vega-image-uploader-select .actions-backdrop:focus-within .actions{opacity:1;pointer-events:auto}:host .vega-image-uploader-select .action-loading{position:relative;display:inline-block;width:24px;height:24px}:host .vega-image-uploader-select .action-loading::before{content:" ";display:block;border-radius:9999px;position:absolute;top:0px;right:0px;bottom:0px;left:0px;border:4px solid rgb(229, 239, 255)}:host .vega-image-uploader-select .action-loading::after{display:block;border-radius:9999px;position:absolute;top:0px;right:0px;bottom:0px;left:0px;content:" ";border-style:solid;border-width:4px;border-color:rgb(153, 192, 255) transparent transparent transparent;animation:loading 1.2s linear infinite}@keyframes loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host .vega-image-uploader-select .action-wrapper .cancel-action{color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}:host vega-input{display:none}:host input[type=file]{display:none}:host .vega-error{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));display:block;padding-top:12px;padding-right:8px;padding-left:8px}@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-image-uploader-select.error{border-color:rgba(var(--v-border-color-input-field-danger, 230, 50, 87, 1))}:host .vega-image-uploader-select.error:hover{border-color:rgba(var(--v-border-color-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-image-uploader-select.error .action-wrapper:focus-within{box-shadow:0 0 0 4px rgba(var(--v-ring-input-danger-focus, 230, 50, 87, 0.25))}:host .vega-image-uploader-select.error .actions-backdrop:focus-visible{box-shadow:0 0 0 4px rgba(var(--v-ring-input-danger-focus, 230, 50, 87, 0.25))}:host .vega-hidden{display:none}:host vega-field-label{margin-bottom:8px}:host .sub-title{padding-top:4px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;text-align:center}@media screen and (min-width: 768px) and (max-width: 1023px){:host .sub-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .sub-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .sub-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}:host .vega-hint{padding-left:8px;padding-right:8px;padding-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}';export{ee as vega_image_uploader}