@globalpayments/vega 2.57.0 → 2.57.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/dist/cjs/card-config-2ee5505e.js +65 -0
  2. package/dist/cjs/{string-input-formatter-slimmer-92ab034f.js → string-input-formatter-slimmer-dc1747ad.js} +20 -1
  3. package/dist/cjs/vega-date-picker_2.cjs.entry.js +1 -1
  4. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  5. package/dist/cjs/vega-input-credit-card.cjs.entry.js +20 -116
  6. package/dist/cjs/vega-input.cjs.entry.js +194 -2
  7. package/dist/collection/components/vega-input/slimmers/controllers/vega-input-mask-config-controller.js +25 -2
  8. package/dist/collection/components/vega-input/vega-input.js +1 -1
  9. package/dist/collection/components/vega-input-credit-card/vega-input-credit-card.js +13 -52
  10. package/dist/collection/components/vega-table/vega-table-head-cell/vega-table-head-cell.js +1 -1
  11. package/dist/collection/components/vega-table/vega-table.js +1 -1
  12. package/dist/collection/constants/card-config.js +4 -4
  13. package/dist/collection/helpers/formatter/string-formatter/credit-card-blur-mask-strategy.js +74 -0
  14. package/dist/collection/helpers/formatter/string-formatter/credit-card-input-mask-strategy.js +34 -0
  15. package/dist/collection/helpers/formatter/string-formatter/credit-card-mask-strategy.abstract.js +63 -0
  16. package/dist/collection/helpers/formatter/string-formatter/string-format-strategy.abstract.js +4 -1
  17. package/dist/collection/helpers/formatter/string-formatter/string-mask-strategy.js +8 -0
  18. package/dist/collection/helpers/slimmers/string-input-formatter-slimmer.js +8 -0
  19. package/dist/esm/{app-globals-366415b3.js → app-globals-ee6a1250.js} +3 -3
  20. package/dist/esm/card-config-d2ad484e.js +63 -0
  21. package/dist/esm/{code-block-73869a3c.js → code-block-7bd4cb87.js} +1 -1
  22. package/dist/esm/{component-value-history-controller-slimmer.abstract-dfe89c93.js → component-value-history-controller-slimmer.abstract-41c58caf.js} +2 -2
  23. package/dist/esm/{content-state-953906e8.js → content-state-a43e703e.js} +1 -1
  24. package/dist/esm/{design-token-28a0a2e6.js → design-token-23522f5c.js} +1 -1
  25. package/dist/esm/{element-appender-slimmer-7b9f4a8e.js → element-appender-slimmer-042df95a.js} +2 -2
  26. package/dist/esm/{form-field-controller-slimmer-707a6da2.js → form-field-controller-slimmer-f0982f11.js} +2 -2
  27. package/dist/esm/{image-annotation-action-5bfda07c.js → image-annotation-action-1e88f5a0.js} +1 -1
  28. package/dist/esm/{index-3e551cbe.js → index-fb3b74bd.js} +1 -1
  29. package/dist/esm/index.js +7 -7
  30. package/dist/esm/loader.js +5 -5
  31. package/dist/esm/{public-rules-c5d2c1e1.js → public-rules-287d4d77.js} +4 -4
  32. package/dist/esm/{responsive-format-facade-60731164.js → responsive-format-facade-d2632288.js} +1 -1
  33. package/dist/esm/{rich-text-editor-required-rule-4429066e.js → rich-text-editor-required-rule-69d5f035.js} +1 -1
  34. package/dist/esm/{string-input-formatter-slimmer-6ab5cad6.js → string-input-formatter-slimmer-09478e0d.js} +23 -4
  35. package/dist/esm/{style-formatter-57fc600a.js → style-formatter-f7951677.js} +1 -1
  36. package/dist/esm/{sub-state-notify-slimmer-1c4d1e78.js → sub-state-notify-slimmer-0a6c3cbb.js} +1 -1
  37. package/dist/esm/{sub-state-observer-slimmer-1e9af9ec.js → sub-state-observer-slimmer-53eec5fb.js} +1 -1
  38. package/dist/esm/vega-accordion.entry.js +5 -5
  39. package/dist/esm/vega-app-header-button.entry.js +5 -5
  40. package/dist/esm/vega-box.entry.js +6 -6
  41. package/dist/esm/vega-button-circle.entry.js +5 -5
  42. package/dist/esm/vega-button-group_2.entry.js +3 -3
  43. package/dist/esm/vega-button.entry.js +4 -4
  44. package/dist/esm/vega-calendar_3.entry.js +3 -3
  45. package/dist/esm/vega-card.entry.js +5 -5
  46. package/dist/esm/vega-carousel.entry.js +4 -4
  47. package/dist/esm/vega-checkbox_2.entry.js +3 -3
  48. package/dist/esm/vega-chip.entry.js +5 -5
  49. package/dist/esm/vega-code-block.entry.js +3 -3
  50. package/dist/esm/vega-color-picker.entry.js +3 -3
  51. package/dist/esm/vega-combo-box.entry.js +3 -3
  52. package/dist/esm/vega-date-picker_2.entry.js +9 -9
  53. package/dist/esm/vega-dialog_2.entry.js +5 -5
  54. package/dist/esm/vega-divider.entry.js +5 -5
  55. package/dist/esm/vega-dropdown_5.entry.js +7 -7
  56. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  57. package/dist/esm/vega-file-uploader.entry.js +3 -3
  58. package/dist/esm/vega-flag-icon.entry.js +5 -5
  59. package/dist/esm/vega-flex.entry.js +6 -6
  60. package/dist/esm/vega-font.entry.js +5 -5
  61. package/dist/esm/vega-form.entry.js +4 -4
  62. package/dist/esm/vega-grid.entry.js +5 -5
  63. package/dist/esm/vega-icon.entry.js +5 -5
  64. package/dist/esm/vega-image-uploader.entry.js +6 -6
  65. package/dist/esm/vega-input-credit-card.entry.js +21 -117
  66. package/dist/esm/vega-input-numeric.entry.js +4 -4
  67. package/dist/esm/vega-input-phone-number.entry.js +5 -5
  68. package/dist/esm/vega-input-range.entry.js +3 -3
  69. package/dist/esm/vega-input-select.entry.js +6 -6
  70. package/dist/esm/vega-input.entry.js +198 -6
  71. package/dist/esm/{vega-internal-event-id-f0ea2bab.js → vega-internal-event-id-4072659b.js} +1 -1
  72. package/dist/esm/vega-left-nav_5.entry.js +7 -7
  73. package/dist/esm/vega-loader-wrapper_2.entry.js +4 -4
  74. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +1 -1
  75. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +1 -1
  76. package/dist/esm/vega-pagination.entry.js +4 -4
  77. package/dist/esm/vega-popover_2.entry.js +5 -5
  78. package/dist/esm/vega-radio_2.entry.js +3 -3
  79. package/dist/esm/vega-rich-text-content.entry.js +6 -6
  80. package/dist/esm/vega-rich-text-editor_4.entry.js +10 -10
  81. package/dist/esm/vega-selection-chip_2.entry.js +7 -7
  82. package/dist/esm/vega-selection-tile_2.entry.js +4 -4
  83. package/dist/esm/vega-sidenav_3.entry.js +6 -6
  84. package/dist/esm/vega-signature-capture.entry.js +7 -7
  85. package/dist/esm/vega-stepper.entry.js +3 -3
  86. package/dist/esm/vega-table_8.entry.js +6 -6
  87. package/dist/esm/vega-textarea.entry.js +3 -3
  88. package/dist/esm/vega-time-picker_2.entry.js +7 -7
  89. package/dist/esm/vega-toggle-switch.entry.js +3 -3
  90. package/dist/esm/vega-tooltip_2.entry.js +5 -5
  91. package/dist/esm/vega.js +5 -5
  92. package/dist/types/components/vega-input/slimmers/controllers/vega-input-mask-config-controller.d.ts +7 -0
  93. package/dist/types/components/vega-input/types.d.ts +10 -1
  94. package/dist/types/components/vega-input-credit-card/vega-input-credit-card.d.ts +1 -13
  95. package/dist/types/components/vega-table/interface.d.ts +18 -11
  96. package/dist/types/components/vega-table/vega-table-head-cell/vega-table-head-cell.d.ts +1 -1
  97. package/dist/types/components/vega-table/vega-table.d.ts +1 -1
  98. package/dist/types/components.d.ts +4 -4
  99. package/dist/types/helpers/formatter/string-formatter/credit-card-blur-mask-strategy.d.ts +28 -0
  100. package/dist/types/helpers/formatter/string-formatter/credit-card-input-mask-strategy.d.ts +21 -0
  101. package/dist/types/helpers/formatter/string-formatter/credit-card-mask-strategy.abstract.d.ts +36 -0
  102. package/dist/types/helpers/formatter/string-formatter/string-format-strategy.abstract.d.ts +1 -1
  103. package/dist/types/helpers/formatter/string-formatter/string-mask-strategy.d.ts +9 -3
  104. package/dist/types/helpers/slimmers/string-input-formatter-slimmer.d.ts +4 -0
  105. package/dist/types/types/public-api.d.ts +1 -0
  106. package/dist/vega/index.esm.js +1 -1
  107. package/dist/vega/{p-f8e0e4f0.entry.js → p-080db42b.entry.js} +1 -1
  108. package/dist/vega/{p-6acf0a51.entry.js → p-083af15f.entry.js} +1 -1
  109. package/dist/vega/{p-75ff12da.entry.js → p-091ab617.entry.js} +1 -1
  110. package/dist/vega/{p-47e89c0e.entry.js → p-0b5330e1.entry.js} +1 -1
  111. package/dist/vega/{p-f4a7acff.entry.js → p-1a4f77de.entry.js} +1 -1
  112. package/dist/vega/{p-21a7530c.entry.js → p-1a6dacc7.entry.js} +1 -1
  113. package/dist/vega/{p-2ebef70f.entry.js → p-1db2ba98.entry.js} +1 -1
  114. package/dist/vega/{p-e277ea73.entry.js → p-1f9a735a.entry.js} +1 -1
  115. package/dist/vega/{p-44880bdf.entry.js → p-24042f0c.entry.js} +1 -1
  116. package/dist/vega/{p-0496f1cb.entry.js → p-27ec0c07.entry.js} +1 -1
  117. package/dist/vega/{p-27dca371.entry.js → p-317920e6.entry.js} +1 -1
  118. package/dist/vega/{p-a2ef3429.entry.js → p-376b3ec7.entry.js} +1 -1
  119. package/dist/vega/{p-dc16e6ba.entry.js → p-394594e9.entry.js} +1 -1
  120. package/dist/vega/{p-07927476.entry.js → p-39906ad2.entry.js} +1 -1
  121. package/dist/vega/{p-8fb5bcb0.entry.js → p-42ec43ef.entry.js} +1 -1
  122. package/dist/vega/{p-6e1b5949.js → p-43263510.js} +1 -1
  123. package/dist/vega/{p-29f4cbed.entry.js → p-435451be.entry.js} +1 -1
  124. package/dist/vega/{p-9481c073.entry.js → p-45eb1e01.entry.js} +1 -1
  125. package/dist/vega/p-472108bd.entry.js +1 -0
  126. package/dist/vega/{p-6131f229.entry.js → p-48ae6f02.entry.js} +1 -1
  127. package/dist/vega/{p-1c4d05de.entry.js → p-48b24fd3.entry.js} +1 -1
  128. package/dist/vega/{p-fb8c99c5.js → p-4a237308.js} +1 -1
  129. package/dist/vega/{p-5dec9bd9.entry.js → p-4ab67150.entry.js} +1 -1
  130. package/dist/vega/{p-d82ceacf.entry.js → p-4c4ac1a5.entry.js} +1 -1
  131. package/dist/vega/p-4fb159d5.js +1 -0
  132. package/dist/vega/p-5bd3487e.js +1 -0
  133. package/dist/vega/p-5f377954.js +1 -1
  134. package/dist/vega/{p-39049341.entry.js → p-5fe47fe8.entry.js} +1 -1
  135. package/dist/vega/{p-d5ab867e.entry.js → p-61ea2d75.entry.js} +1 -1
  136. package/dist/vega/{p-e32efc2e.entry.js → p-63adca7b.entry.js} +1 -1
  137. package/dist/vega/{p-7c0004dc.entry.js → p-699032fc.entry.js} +1 -1
  138. package/dist/vega/{p-0b77c6c9.entry.js → p-710da484.entry.js} +1 -1
  139. package/dist/vega/{p-007bf7df.js → p-71c65f7e.js} +1 -1
  140. package/dist/vega/{p-a92a8172.entry.js → p-81279fea.entry.js} +1 -1
  141. package/dist/vega/{p-ecd032fc.js → p-8782abeb.js} +1 -1
  142. package/dist/vega/p-88e08a33.js +1 -0
  143. package/dist/vega/{p-4f5eb8d5.js → p-8c4f893b.js} +1 -1
  144. package/dist/vega/{p-2873b600.entry.js → p-8f8de5ab.entry.js} +1 -1
  145. package/dist/vega/p-92355996.entry.js +1 -0
  146. package/dist/vega/{p-ce14af16.js → p-9a956a00.js} +1 -1
  147. package/dist/vega/{p-fcb04960.js → p-9afdcf65.js} +1 -1
  148. package/dist/vega/p-9b08ed46.entry.js +1 -0
  149. package/dist/vega/{p-0604563a.entry.js → p-9ca7467d.entry.js} +1 -1
  150. package/dist/vega/{p-b44ebc84.entry.js → p-9ce0bd82.entry.js} +1 -1
  151. package/dist/vega/{p-f8f8e7d2.entry.js → p-a04491cc.entry.js} +1 -1
  152. package/dist/vega/{p-99c4559e.entry.js → p-a1056063.entry.js} +1 -1
  153. package/dist/vega/{p-b449fe9a.entry.js → p-a4a0fcfd.entry.js} +1 -1
  154. package/dist/vega/{p-f79c82c7.entry.js → p-a7042a5a.entry.js} +1 -1
  155. package/dist/vega/p-acf7667e.entry.js +1 -0
  156. package/dist/vega/{p-8ba8a7cc.entry.js → p-b21b128c.entry.js} +1 -1
  157. package/dist/vega/{p-766ed063.entry.js → p-b75a8edb.entry.js} +1 -1
  158. package/dist/vega/{p-1e3f4007.entry.js → p-c21295cf.entry.js} +1 -1
  159. package/dist/vega/{p-5130bb06.entry.js → p-c69a6547.entry.js} +1 -1
  160. package/dist/vega/{p-79c2282c.entry.js → p-c9740710.entry.js} +1 -1
  161. package/dist/vega/{p-f4546425.entry.js → p-ce5a3589.entry.js} +1 -1
  162. package/dist/vega/{p-cd3d468c.js → p-d1355307.js} +1 -1
  163. package/dist/vega/{p-8246f8ae.js → p-d7e0c57a.js} +1 -1
  164. package/dist/vega/p-e1ed78db.js +1 -0
  165. package/dist/vega/{p-34643550.entry.js → p-ef84dc90.entry.js} +1 -1
  166. package/dist/vega/{p-2458ad97.js → p-f229d6d1.js} +1 -1
  167. package/dist/vega/{p-fd2f699b.js → p-f25570f5.js} +1 -1
  168. package/dist/vega/{p-888dc143.entry.js → p-f27fcc7c.entry.js} +1 -1
  169. package/dist/vega/{p-e28fcf04.entry.js → p-f3ab00ad.entry.js} +1 -1
  170. package/dist/vega/{p-f3f7d059.entry.js → p-f543e911.entry.js} +1 -1
  171. package/dist/vega/{p-65d8c2bc.js → p-f5ac60f5.js} +1 -1
  172. package/dist/vega/{p-bdaf1143.entry.js → p-f7b5833d.entry.js} +1 -1
  173. package/dist/vega/p-fc02a67a.js +1 -0
  174. package/dist/vega/{p-a33c6652.entry.js → p-fcb5b40f.entry.js} +1 -1
  175. package/dist/vega/{p-aed3320d.js → p-fda6f8bc.js} +1 -1
  176. package/dist/vega/{p-e5196440.entry.js → p-fe1512f9.entry.js} +1 -1
  177. package/dist/vega/vega.esm.js +1 -1
  178. package/package.json +1 -1
  179. package/dist/vega/p-3a7e897b.entry.js +0 -1
  180. package/dist/vega/p-51297b96.js +0 -1
  181. package/dist/vega/p-51a4dc20.entry.js +0 -1
  182. package/dist/vega/p-53e9595f.js +0 -1
  183. package/dist/vega/p-6ec338b0.entry.js +0 -1
  184. package/dist/vega/p-76818196.entry.js +0 -1
  185. package/dist/vega/p-79a0a06c.js +0 -1
  186. package/dist/vega/p-b8d7d4a9.js +0 -1
@@ -1 +1 @@
1
- import{h as e,F as t,f as n,r as i,c as r,H as a,g as o}from"./p-21d26bb4.js";import{s}from"./p-519a7d55.js";import{c as l,V as d,M as c,L as h,I as v}from"./p-6e1ab235.js";import{V as p,I as f}from"./p-d849e0f5.js";import{D as m}from"./p-e7b00bf0.js";import{a as w,f as u,b as g,d as x,g as b,h as y,i as k}from"./p-6e01f0a2.js";import{V as C}from"./p-f08a4adf.js";import{p as R}from"./p-08835909.js";import{c as j}from"./p-012cbd8f.js";import{C as D}from"./p-d789b291.js";import{t as E}from"./p-65d8c2bc.js";import{c as z}from"./p-86194314.js";import{f as I}from"./p-d27ae9ff.js";import{g as M}from"./p-a4670e23.js";import{P as S}from"./p-7d9cd9c8.js";import{d as T}from"./p-1bc5b3bc.js";import{C as O}from"./p-2d0d575f.js";import{c as V}from"./p-4f5eb8d5.js";import{T as $}from"./p-81ed90d5.js";import{s as P}from"./p-6bd5c49b.js";import{q as B}from"./p-5e2c9e69.js";import{s as N}from"./p-49fd1009.js";import{S as L}from"./p-ecd032fc.js";import{b as A}from"./p-0c667d6a.js";import"./p-331a62d5.js";import"./p-d5776087.js";import"./p-8c46e116.js";import"./p-6a334573.js";import"./p-613ee009.js";import"./p-b75ee3ba.js";import"./p-5f377954.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-112455b1.js";import"./p-262ec334.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-9d6003ef.js";import"./p-5773a9a3.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";var F=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class W extends d{render(){return e(t,null,this.switchPanelRenderer.render(),this.viewRenderer.render())}}F([l()],W.prototype,"switchPanelRenderer",void 0),F([l()],W.prototype,"viewRenderer",void 0);const H=(e=0)=>{const t=[0,1,2,3,4,5,6];return t.concat(t).slice(e,e+7)};class U{constructor(){this.WEEKDAYS_SHORT=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],this.weekdays=H()}getWeekdayNames(){return this.WEEKDAYS_SHORT}generateDates(e){const t=e.startDate.toDate(),n=[];for(let i=0;i<e.count;i++)n.push(new Date(t)),t.setDate(t.getDate()+1);return n}generateWeekHead(){return this.weekdays.map((e=>this.getWeekdayNames()[e]))}}class Y{constructor(e,t){this._weekdays=e,this._dateItems=t}get weekdays(){return this._weekdays}get dateItems(){return this._dateItems}}class _ extends U{generate(e){return new Y([this.generateWeekHead()[e.current.toDate().getDay()]],[[e.current]])}}class q{constructor(e,t,n){this._date=n,this._month=t,this._year=e}static from(e){return new q(e.getFullYear(),e.getMonth()+1,e.getDate())}get year(){return this._year}set year(e){this._year=e}get month(){return this._month}set month(e){this._month=e}get date(){return this._date}set date(e){this._date=e}isToday(){const e=new Date;return e.getFullYear()===this.year&&e.getMonth()+1===this.month&&e.getDate()===this.date}toDate(){return new Date(this.year,this.month-1,this.date)}compare(e){const{year:t,month:n}=e,i={isPreviousMonth:!1,inMonth:!1,isNextMonth:!1};return this.year===t?this.month<n?i.isPreviousMonth=!0:this.month>n?i.isNextMonth=!0:i.inMonth=!0:this.year>t?i.isNextMonth=!0:i.isPreviousMonth=!0,i}equal(e){const{year:t,month:n,date:i}=e;return this._year===t&&this._month===n&&this._date===i}}class K extends U{generate(e){const t=this.generateDates(e),n=e.showWeekends;let i=this.generateWeekHead(),r=[t.map(q.from)];return!1===n&&(i=i.slice(1,6),r=r.map((e=>e.slice(1,6)))),new Y(i,r)}}class X extends U{generate(e){const t=e.showWeekends;let n=[],i=[];this.generateDates(e).forEach(((e,t)=>{t%7||(n[t/7]=i=[]);const r=q.from(e);i.push(r)}));let r=this.generateWeekHead();return!1===t&&(r=r.slice(1,6),n=n.map((e=>e.slice(1,6)))),new Y(r,n)}}class G{constructor(e,t){this._count=e,this._current=t||q.from(new Date),this.calculatePeriod(this._current)}get current(){return this._current}get startDate(){return this._startDate}get endDate(){return this._endDate}get count(){return this._count}get type(){return this._type}get showWeekends(){return this._showWeekends}goTo(e){return this.createBy(e)}now(){return this.createBy(q.from(new Date))}calculatePeriod(e){const t=e.toDate();this.count>1&&t.setDate(t.getDate()-H().indexOf(t.getDay())),this._startDate=q.from(t),t.setDate(t.getDate()+this.count-1),this._endDate=q.from(t)}}class J extends G{constructor(e,t){super(J.DISPLAY_DATE_COUNT,e),this._type="day",this._showWeekends=!0,this._showWeekends=!1!==t}next(){const e=this.current.toDate();e.setDate(e.getDate()+1);let t=q.from(e);return!1===this._showWeekends&&(t=re(t)),this.createBy(t)}previous(){const e=this.current.toDate();e.setDate(e.getDate()-1);let t=q.from(e);return!1===this._showWeekends&&(t=re(t,ee.PREVIOUS)),this.createBy(t)}now(){let e=q.from(new Date);return!1===this._showWeekends&&(e=re(e)),this.createBy(e)}createBy(e){return new J(e,this._showWeekends)}}J.DISPLAY_DATE_COUNT=1;class Q extends G{constructor(e,t){super(Q.DISPLAY_DATE_COUNT,e),this._type="week",this._showWeekends=!0,this._showWeekends=!1!==t}next(){const e=this.current.toDate();return e.setDate(e.getDate()-H().indexOf(e.getDay())+7),this.createBy(q.from(e))}previous(){const e=this.current.toDate();return e.setDate(e.getDate()-H().indexOf(e.getDay())-7),this.createBy(q.from(e))}createBy(e){return new Q(e,this._showWeekends)}}Q.DISPLAY_DATE_COUNT=7;class Z extends G{constructor(e,t){super(Z.DISPLAY_DATE_COUNT,Z.getMonthFirstDay(e)),this._type="month",this._showWeekends=!0,this._showWeekends=!1!==t}static getMonthFirstDay(e){const t=e||q.from(new Date);return new q(t.year,t.month,1)}next(){const e=this.current.toDate();return e.setMonth(e.getMonth()+1),this.createBy(q.from(e))}previous(){const e=this.current.toDate();return e.setMonth(e.getMonth()-1),this.createBy(q.from(e))}createBy(e){return new Z(e,this._showWeekends)}}var ee;function te(e,t=!1){return e.toLocaleDateString("en-US",{month:t?"short":"long"})}function ne(e,t=15){const[n,i]=e.split(":");return Math.round((60*Number(n)+Number(i))/t)}function ie(e){return"vega-calendar-event-slot-"+e}function re(e,t=ee.NEXT){const n=e.toDate().getDay();if(0===n||6===n){let i=0===n?1:2;return t===ee.PREVIOUS&&(i=0===n?-2:-1),q.from(new Date(e.year,e.month-1,e.date+i))}return e}Z.DISPLAY_DATE_COUNT=42,function(e){e.PREVIOUS="-1",e.NEXT="1"}(ee||(ee={}));var ae=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class oe extends d{constructor(){super(...arguments),this.handleViewChange=e=>{this.currentPeriodController.updateCalendarPeriod(e.detail,this.currentPeriod.current)},this.todayButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.now())},this.nextButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.next())},this.prevButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.previous())},this.moreActionMenuClick=e=>{this.moreActionClickEmitter.emit(e.detail)}}getSwitchPanelRef(){return this.switchPanelRef}render(){return e("vega-flex",{direction:"row",gap:"size-16",justifyContent:"space-between",alignItems:"center",class:"calendar-switch-panel",ref:e=>this.switchPanelRef=e},this.renderDateSwitch(),e("div",{class:"calendar-view-switch-container"},this.renderViewSwitch(),this.renderMoreActionMenu()))}renderDateSwitch(){return e("div",{class:"calendar-date-switch-container"},e("vega-button",{variant:"secondary",size:"small",ref:e=>{m.addUniqueObserverToNode(e,w,this.todayButtonClick)},label:this.translationSlimmer.t("Today")}),e("vega-button-circle",{variant:"secondary",size:"small",icon:C.getIconKey("chevron-left"),label:"previous",showTooltip:!1,ref:e=>{m.addUniqueObserverToNode(e,w,this.prevButtonClick)}}),e("vega-button-circle",{variant:"secondary",size:"small",icon:C.getIconKey("chevron-right"),label:"next",showTooltip:!1,ref:e=>{m.addUniqueObserverToNode(e,w,this.nextButtonClick)}}),this.renderCurrentPeriod())}renderCurrentPeriod(){return e("vega-font",{class:"calendar-current-date",variant:"font-field-label",color:"text-primary"},this.getViewDateSummary())}renderViewSwitch(){return e("vega-segment-control",{segments:oe.views.map((e=>Object.assign(Object.assign({},e),{text:this.translationSlimmer.t(e.text)}))),size:"small",variant:"text-only",selected:this.viewMode,ref:e=>{m.addUniqueObserverToNode(e,u,this.handleViewChange)}})}renderMoreActionMenu(){var t,n;if(null===(n=null===(t=this.moreActionDropdownProps)||void 0===t?void 0:t.source)||void 0===n?void 0:n.length)return e("vega-dropdown",Object.assign({alignment:"end",trigger:"click"},this.moreActionDropdownProps,{ref:e=>{m.addUniqueObserverToNode(e,g,this.moreActionMenuClick)}}),e("vega-button-circle",{size:"small",icon:C.getIconKey("ellipsis-vertical"),variant:"icon-only"}))}getViewDateSummary(){const e=this.currentPeriod.current;let t="";switch(this.viewMode){case"day":{const n=this.translationSlimmer.t(te(e.toDate()));t=`${e.date} ${n}, ${e.year}`;break}case"week":{const e=this.calendarView.dateItems[0],n=e[0],i=e[e.length-1],[r,a]=[n,i].map((e=>this.translationSlimmer.t(te(e.toDate()))));t=`${n.date} ${r}${n.year===i.year?"":", "+n.year} - ${i.date} ${a}, ${i.year}`;break}case"month":t=`${this.translationSlimmer.t(te(e.toDate()))}, ${e.year}`}return t}}C.register({"chevron-right":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/></svg>'},"chevron-left":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"/></svg>'},"ellipsis-vertical":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M48 464a48 48 0 1 1 0-96 48 48 0 1 1 0 96zm0-160a48 48 0 1 1 0-96 48 48 0 1 1 0 96zM0 96a48 48 0 1 1 96 0A48 48 0 1 1 0 96z"/></svg>'}}),oe.views=[{text:"Day",key:"day"},{text:"Week",key:"week"},{text:"Month",key:"month"}],ae([l()],oe.prototype,"viewMode",void 0),ae([l()],oe.prototype,"calendarView",void 0),ae([l()],oe.prototype,"currentPeriod",void 0),ae([l()],oe.prototype,"moreActionDropdownProps",void 0),ae([l()],oe.prototype,"moreActionClickEmitter",void 0),ae([l()],oe.prototype,"currentPeriodController",void 0),ae([l()],oe.prototype,"calendarViewController",void 0),ae([l()],oe.prototype,"translationSlimmer",void 0);var se=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class le extends d{getCalendarViewElementRef(){return this.calendarViewElementRef}render(){return e("div",{class:`calendar-view calendar-view-${this.viewMode} ${!1===this.showWeekends?"calendar-hide-weekends":""}`,ref:e=>this.calendarViewElementRef=e},"month"===this.viewMode?this.monthViewRenderer.render():this.viewWithTimeRenderer.render())}}se([l()],le.prototype,"viewMode",void 0),se([l()],le.prototype,"showWeekends",void 0),se([l()],le.prototype,"monthViewRenderer",void 0),se([l()],le.prototype,"viewWithTimeRenderer",void 0);var de=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ce extends d{render(){return e("div",{class:"calendar-view-month-container"},e("div",{class:"calendar-view-row calendar-view-title border-divider-bottom"},this.calendarView.weekdays.map((t=>e("div",{key:t},this.translationSlimmer.t(t))))),this.renderMonthViewContent())}renderMonthViewContent(){const t=this.currentPeriod.current;return this.calendarView.dateItems.map(((n,i)=>{const r=this.monthEventRenderer.getCurrentRowEvents(n),a=this.monthEventRenderer.filterRowDisplayEvents(r);return e("div",{key:i,class:"calendar-view-row border-divider-bottom"},n.map(((n,i)=>{var o;const s=null===(o=this.isDateDisabled)||void 0===o?void 0:o.call(this,n.toDate());return e("div",{class:{"row-cell border-divider-right":!0,"current-month-day":n.compare(t).inMonth,active:n.isToday(),disabled:s},key:`${n.month}-${n.date}`,onDblClick:s?void 0:e=>{this.handleDateBlockClick(e,n)}},this.renderDateBlock(n),this.monthEventRenderer.render(n,r[i],a[i],i))})))}))}renderDateBlock(t){return e("div",{class:"date"},1===t.date&&e("div",{class:"month-block"},te(t.toDate(),!0)),e("div",{role:"button",tabIndex:0,class:"grid-col",onDblClick:e=>this.goToCurrentDayView(e,t)},t.date))}goToCurrentDayView(e,t){e.stopPropagation(),this.currentPeriodController.updateCalendarPeriod("day",t)}handleDateBlockClick(e,t){const{target:n,clientX:i,clientY:r}=e;if(this.isMonthBlockBlankArea(n)){const{year:e,month:n,date:a}=t;this.dateDblClickEmitter.emit({year:e,month:n,date:a,hour:0,mouseEventInfo:{clientX:i,clientY:r}})}}isMonthBlockBlankArea(e){return!e.classList.contains("more-button")&&"VEGA-CALENDAR-EVENT"!==e.tagName}}de([l()],ce.prototype,"viewMode",void 0),de([l()],ce.prototype,"calendarView",void 0),de([l()],ce.prototype,"currentPeriod",void 0),de([l()],ce.prototype,"currentPeriodController",void 0),de([l()],ce.prototype,"monthEventRenderer",void 0),de([l()],ce.prototype,"dateDblClickEmitter",void 0),de([l()],ce.prototype,"translationSlimmer",void 0),de([l()],ce.prototype,"isDateDisabled",void 0);var he=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ve extends d{render(){return e("div",{class:"calendar-view-container"},this.renderViewTitle(),this.renderViewContent())}renderViewTitle(){const t=this.calendarView.dateItems[0],n=this.calendarView.weekdays;return e("div",{class:"calendar-view-title-container"},e("div",{class:"calendar-view-row"},e("div",{class:"time-line-empty"}),e("div",{class:"calendar-view-title"},t.map(((t,i)=>e("div",{key:t.date,class:{active:t.isToday()}},e("div",null,this.translationSlimmer.t(n[i])),e("div",{class:"week-day"},t.date)))))),e("div",{class:"calendar-view-row calendar-view-event-all-container border-divider-bottom"},e("div",{class:"time-line-all"},this.translationSlimmer.t("All Day")),this.dayViewFullDayEventRenderer.render()))}renderViewContent(){const t=this.calendarView.dateItems[0];return e("div",{class:"calendar-view-row calendar-view-day-container"},this.timeLineRenderer.render(),e("div",{class:"calendar-view-content-container"},e("div",{class:"calendar-view-content"},t.map((t=>{var n;const i=null===(n=this.isDateDisabled)||void 0===n?void 0:n.call(this,t.toDate());return e("div",{class:{"grid-col border-divider-left":!0,disabled:i},key:t.date},e("div",{class:"hour-empty border-divider-top"}),this.renderHourBlock(t,i))}))),this.dayViewTimedEventRenderer.render(),this.timeMarkerRenderer.render(t)))}renderHourBlock(t,n){return Array(24).fill("").map(((i,r)=>{var a;let o=!1;if(!n){const e=new Date(t.toDate().setHours(r));o=null===(a=this.isDateDisabled)||void 0===a?void 0:a.call(this,e)}return e("div",{class:{"grid-cell border-divider-top":!0,disabled:n||o},onDblClick:n||o?void 0:e=>this.handleDateBlockClick(t,r,e)})}))}handleDateBlockClick(e,t,n){const{year:i,month:r,date:a}=e,{clientX:o,clientY:s}=n;this.dateDblClickEmitter.emit({year:i,month:r,date:a,hour:t,mouseEventInfo:{clientX:o,clientY:s}})}}he([l()],ve.prototype,"viewMode",void 0),he([l()],ve.prototype,"timeLineRenderer",void 0),he([l()],ve.prototype,"timeMarkerRenderer",void 0),he([l()],ve.prototype,"dayViewTimedEventRenderer",void 0),he([l()],ve.prototype,"dayViewFullDayEventRenderer",void 0),he([l()],ve.prototype,"calendarView",void 0),he([l()],ve.prototype,"dateDblClickEmitter",void 0),he([l()],ve.prototype,"translationSlimmer",void 0),he([l()],ve.prototype,"isDateDisabled",void 0);class pe extends d{render(){const t=this.getTimeLineTitles();return e("div",{class:"time-line"},e("div",{class:"hour-empty"}),t.map(((t,n)=>e("div",{key:t},e("div",{class:"time-text","data-time":0===n?24:n},t)))))}getTimeLineTitles(){const e=[];if("12-hour"===this.timeFormat){e.push("12 AM");for(let t=1;t<12;t++)e.push(`${t} AM`);e.push("12 PM");for(let t=1;t<12;t++)e.push(`${t} PM`)}else for(let t=0;t<24;t++)e.push(`${R(t)}`);return e}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],pe.prototype,"timeFormat",void 0);var fe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class me extends d{constructor(){super(...arguments),this.monthViewGenerator=new X,this.weekViewGenerator=new K,this.dayViewGenerator=new _}initialCalendarView(){this.setCalendarView(this.getCalendarViewByPeriod(this.currentPeriod))}generateCalendarView(e){this.setCalendarView(this.getCalendarViewByPeriod(e))}getCalendarViewByPeriod(e){switch(e.type){case"week":return this.weekViewGenerator.generate(e);case"day":return this.dayViewGenerator.generate(e);default:return this.monthViewGenerator.generate(e)}}setCalendarView(e){this.calendarView=e}}fe([l({writable:!0})],me.prototype,"calendarView",void 0),fe([l()],me.prototype,"currentPeriod",void 0),fe([l()],me.prototype,"showWeekends",void 0),fe([l()],me.prototype,"currentPeriodController",void 0),fe([c("componentWillLoad")],me.prototype,"initialCalendarView",null),fe([c("watchCurrentPeriodChange")],me.prototype,"generateCalendarView",null);var we=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ue extends d{setCurrentPeriod(e){this.currentPeriod=e}updateCalendarPeriod(e,t){switch(e){case"month":this.setCurrentPeriod(new Z(t,this.showWeekends));break;case"week":this.setCurrentPeriod(new Q(t,this.showWeekends));break;case"day":t=!1===this.showWeekends?re(t):t,this.setCurrentPeriod(new J(t,this.showWeekends))}}initialCurrentPeriod(){this.updateCalendarPeriod(this.viewMode,q.from(new Date))}emitChangeEvent(e,t){e&&t&&e.startDate.equal(t.startDate)&&e.endDate.equal(t.endDate)||(e&&e.type!==this.viewMode&&(this.viewMode=e.type),this.changeEventEmitter.emit({viewMode:e.type,currentPeriod:this.getCurrentPeriodSummary()}))}updateCurrentPeriodByViewMode(e){this.currentPeriod&&e!==this.currentPeriod.type&&this.updateCalendarPeriod(e,this.currentPeriod.current)}updateCurrentPeriodAfterHideWeekEndsChange(){this.updateCalendarPeriod(this.viewMode,this.currentPeriod.current)}getCurrentPeriodSummary(){const{current:e,startDate:t,endDate:n}=this.currentPeriod;return{year:e.year,month:e.month,startDate:{date:t.date,month:t.month,year:t.year},endDate:{date:n.date,month:n.month,year:n.year}}}}we([l({writable:!0})],ue.prototype,"currentPeriod",void 0),we([l()],ue.prototype,"changeEventEmitter",void 0),we([l({writable:!0})],ue.prototype,"viewMode",void 0),we([l()],ue.prototype,"showWeekends",void 0),we([c("componentWillLoad")],ue.prototype,"initialCurrentPeriod",null),we([c("watchCurrentPeriodChange")],ue.prototype,"emitChangeEvent",null),we([c("watchViewModeChange")],ue.prototype,"updateCurrentPeriodByViewMode",null),we([c("watchShowWeekendsChange")],ue.prototype,"updateCurrentPeriodAfterHideWeekEndsChange",null);var ge=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class xe extends d{constructor(){super(...arguments),this.maxMonthDisplayEventsCount=2}getCurrentRowEvents(e){const t=[];return e.forEach((e=>{const n=this.calendarEventController.getCurrentDateEvents(e);t.push(n)})),this.fullDayEventLayoutRenderer.sortLongEvents(t)}filterRowDisplayEvents(e){const t=[];return e.forEach((e=>{const n=e.length>this.maxMonthDisplayEventsCount?e.slice(0,this.maxMonthDisplayEventsCount-1):e;t.push(n)})),this.hideTheCutOffEvents(e,t)}getMonthEventContainerRef(){return this.eventContainerRef}render(t,n,i,r){const a=n.slice(i.length).filter((e=>e)).length;return e("div",{class:"events-container",ref:e=>this.eventContainerRef=e},e("div",{class:"event-list"},this.fullDayEventLayoutRenderer.render(i,r)),this.renderMoreButton(n,a,`${t.date} ${te(t.toDate())} ${t.year}`))}addMaxDisplayCountChange(){m.addUniqueObserverToNode(this.host,E,(e=>{this.maxMonthDisplayEventsCount=e.detail,"month"===this.viewMode&&n(this.host)}))}renderMoreButton(t,n,i){if(n){const r=t.filter((e=>e&&(e.isAllDayEvent||e.isGroupEvent()))),a=t.filter((e=>e&&!e.isAllDayEvent&&!e.isGroupEvent()));return e("div",{class:"month-event-more"},e("vega-popover",{trigger:"click",placement:"right"},e("div",{tabIndex:0,slot:"popover-content",role:"button",class:"more-button",onKeyDown:z()},`${n} More`),e("vega-flex",{slot:"popover",direction:"col",gap:"0"},e("vega-font",{textAlign:"center",variant:"font-field-label",color:"text-primary",style:{padding:"4px 0",marginBottom:"8px"}},i),e("vega-flex",{direction:"col",gap:"size-4",style:{paddingBottom:a.length?"4px":"0px"}},r.map((e=>this.eventItemRenderer.render(e,{"month-event":!0,"calendar-event-large-size":!0,"calendar-event-in-popover":!0})))),a.map((e=>this.eventItemRenderer.render(e,{"month-event":!0,"calendar-event-large-size":!0,"calendar-event-in-popover":!0}))))))}}hideTheCutOffEvents(e,t){const n=[],i=[],r=t.map((e=>e[e.length-1])).filter((e=>e&&e.isGroupEvent()));return r.length&&r.forEach((n=>{e.filter((e=>e.includes(n))).length>t.filter((e=>e.includes(n))).length&&i.push(n)})),i.length?(t.forEach((e=>{e.length&&e[e.length-1]&&i.includes(e[e.length-1])?n.push(e.slice(0,e.length-1)):n.push(e)})),n):t}}ge([l()],xe.prototype,"viewMode",void 0),ge([l()],xe.prototype,"host",void 0),ge([l()],xe.prototype,"calendarEventController",void 0),ge([l()],xe.prototype,"eventItemRenderer",void 0),ge([l()],xe.prototype,"fullDayEventLayoutRenderer",void 0),ge([c("componentWillLoad")],xe.prototype,"addMaxDisplayCountChange",null);class be{constructor(e,t,n,i){this.repeatStartDate=e,this.interval=t,this.count=n,this.until=i}getRepeatSeries(e,t=1){return this.generateRepeatDateCacheUntilEndDate(e.endDate),this.cache.filter((n=>this.isSeriesInPeriod(n,t,e)))}isSeriesInPeriod(e,t,n){const i=e.toDate(),r=new Date(e.year,e.month-1,e.date+t-1),{startDate:a,endDate:o}=n,s=a.toDate(),l=o.toDate();return i>=s&&i<=l||r>=s&&r<=l||i<=s&&r>=l}}be.daySeconds=864e5;class ye extends be{constructor(e,t,n,i){super(e,t,n,i),this.initCache()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n.toDate()<e.toDate();){const e=this.getNextRepeatStartDate(n);if(e&&e.toDate()<=n.toDate()){this.cache.pop();break}if(n=e,"number"==typeof this.count&&this.cache.length>=this.count)break}}}initCache(){this.cache=[this.repeatStartDate]}getNextRepeatStartDate(e){const t=new Date(e.year,e.month-1,e.date+this.interval),n=q.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(n),n)}}class ke extends be{constructor(e,t,n,i){super(e,t,n,i),this.byMonthDay=this.repeatStartDate.date,this.initCache()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n.toDate()<e.toDate();){const e=this.getNextRepeatStartDate(n);if(e&&e.toDate()<=n.toDate()){this.cache.pop();break}if(n=e,"number"==typeof this.count&&this.cache.length>=this.count)break}}}initCache(){this.cache=[this.repeatStartDate]}getNextRepeatStartDate(e){const t=this.getNextStartDate(e.year,e.month-1+this.interval),n=q.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(n),n)}getNextStartDate(e,t){const n=new Date(e,t,this.byMonthDay);return n.getDate()===this.byMonthDay?n:this.getNextStartDate(e,t+1)}}class Ce extends be{constructor(e,t,n,i,r){super(e,t,n,i),this.byWeekDay=this.sortWeekDay(r),this.initCache()}getRepeatSeries(e,t=1){return this.generateRepeatDateCacheUntilEndDate(e.endDate),this.getValidCache().filter((n=>this.isSeriesInPeriod(n,t,e)))}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t[0].toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n[0].toDate()<e.toDate();){const e=this.getNextRepeatStartDate(n);if(e&&e[0]&&e[0].toDate()<=n[0].toDate()){this.cache.pop();break}if(n=e,"number"==typeof this.count&&this.getValidCache().length>=this.count)break}}}getNextRepeatStartDate(e){const t=this.getNextStartDates(e);if(0===t.length||"number"==typeof this.count&&this.getValidCache().length>=this.count)return null;{const e=t.map((e=>q.from(e)));return this.cache.push(e),e}}getNextStartDates(e){return e.map((e=>new Date(e.year,e.month-1,e.date+7*this.interval))).filter((e=>!this.until||e<=this.until.toDate()))}initCache(){const e=[],t=this.getCurrentDayIndex(this.repeatStartDate);this.byWeekDay.forEach((n=>{const i=Ce.weekDay.indexOf(n)-t,{year:r,month:a,date:o}=this.repeatStartDate,s=q.from(new Date(r,a-1,o+i));e.push(s)})),this.cache=[e]}sortWeekDay(e){return e&&e.length?e.map((e=>e.toLocaleLowerCase())).sort(((e,t)=>Ce.weekDay.indexOf(e)-Ce.weekDay.indexOf(t))):[Ce.weekDay[this.getCurrentDayIndex(this.repeatStartDate)]]}getCurrentDayIndex(e){return e.toDate().getDay()}getValidCache(){const e=I(this.cache.slice(1));return this.cache[0].filter((e=>e.toDate()>=this.repeatStartDate.toDate())).concat(e).slice(0,"number"==typeof this.count?this.count:void 0)}}Ce.weekDay=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map((e=>e.toLowerCase()));class Re extends be{constructor(e,t,n,i){super(e,t,n,i),this.matchDay=this.repeatStartDate.date,this.matchMonth=this.repeatStartDate.month,this.initCache()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n.toDate()<e.toDate();){const e=this.getNextRepeatStartDate(n);if(e&&e.toDate()<=n.toDate()){this.cache.pop();break}if(n=e,"number"==typeof this.count&&this.cache.length>=this.count)break}}}getNextRepeatStartDate(e){const t=this.getNextStartDate(e.year+this.interval),n=q.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(n),n)}getNextStartDate(e){const t=new Date(e,this.matchMonth-1,this.matchDay);return t.getDate()===this.matchDay&&t.getMonth()+1===this.matchMonth?t:this.getNextStartDate(e+1)}initCache(){this.cache=[this.repeatStartDate]}}const je=new class{getPattern(e,t){const n=q.from(e),{frequency:i,interval:r=1,byWeekDay:a,until:o,count:s}=t,l=this.initDate(o);return this.initRepeatPattern(i,n,r<1?1:r,s,l,a)}initDate(e){if(e&&"object"==typeof e)return q.from(e);if(e&&"string"==typeof e){const[t,n,i]=e.split("/");return new q(Number(i),Number(t),Number(n))}}initRepeatPattern(e,t,n,i,r,a){switch(e){case"daily":return new ye(t,n,i,r);case"weekly":return new Ce(t,n,i,r,a);case"monthly":return new ke(t,n,i,r);default:return new Re(t,n,i,r)}}},De=/^\d{1,2}\/\d{1,2}\/\d{4}/,Ee=/^\d{1,2}:\d{1,2}/;class ze{constructor(e,t){this._eventSpansDays=1,this.repeatPattern=null,this._event=e,this._eventKey=t||M(),this.checkEventRequireField(e),this.initDate(e),this.initEventSpansDays(),this.initRepeatPattern()}get event(){return this._event}get eventKey(){return this._eventKey}get title(){return this._event.title}get disabled(){return!!this._event.disabled}get variant(){return this._event.variant}get color(){return this._event.color}get isAllDayEvent(){return!!this._event.isAllDay}get isRepeatEvent(){return null!==this.repeatPattern}get startDate(){return this._startDate}get endDate(){return this._endDate}get startTime(){return this._startTime}get endTime(){return this._endTime}get eventSpansDays(){return this._eventSpansDays}copyTo(e,t){const n=this._eventSpansDays>1?new Date(t.year,t.month-1,t.date+(this._eventSpansDays-1)):t.toDate();return new ze(Object.assign(Object.assign({},this._event),{startDate:t.toDate(),endDate:n,startTime:this.startTime,endTime:this.endTime}),e)}isGroupEvent(){return this._eventSpansDays>1}isCurrentDayEvent(e){const{startDate:t,endDate:n}=this,i=q.from(t),r=q.from(new Date(n.getFullYear(),n.getMonth(),n.getDate()+1)),a=e.toDate();return i.toDate()<=a&&r.toDate()>a}getEventDuration(){const[e,t]=this.startTime.split(":"),[n,i]=this.endTime.split(":"),r=q.from(new Date),a=new Date(r.year,r.month,r.date,Number(e),Number(t));return(new Date(r.year,r.month,r.date,0===Number(n)&&0!==Number(e)?24:Number(n),Number(i)).valueOf()-a.valueOf())/6e4}getRepeatSeries(e){return this.repeatPattern?this.repeatPattern.getRepeatSeries(e,this._eventSpansDays):[]}convertTimeTo24Hour(e){if((e=e.toLocaleLowerCase()).indexOf("am")>0||e.indexOf("pm")>0){if(e.indexOf("am")>0){e=e.replace("am","").trim();const[t,n]=e.split(":");return`${"12"===t?"00":t}:${n}`}{e=e.replace("pm","").trim();const[t,n]=e.split(":");return`${"12"===t?"12":Number(t)+12}:${n}`}}return e}checkEventRequireField(e){const{title:t,startDate:n,endDate:i,startTime:r,endTime:a}=e;if(n&&"string"==typeof n&&!De.test(n)||i&&"string"==typeof i&&!De.test(i))throw new Error("Invalid calendar event item, the date format should be MM/DD/YYYY!");if(r&&"string"==typeof r&&!Ee.test(r)||a&&"string"==typeof a&&!Ee.test(a))throw new Error("Invalid calendar event item, the time format should be HH:mm!");if(!t||!n||!i&&!a)throw new Error("Invalid calendar event item, the required field should not empty!")}initDate(e){const{startDate:t,startTime:n,endDate:i,endTime:r}=e;if(t&&"object"==typeof t)this._startDate=t;else if(t&&"string"==typeof t){const[e,n,i]=t.split("/");this._startDate=new Date(Number(i),Number(e)-1,Number(n))}if(this._startTime=n?this.convertTimeTo24Hour(n):`${this._startDate.getHours()}:${this._startDate.getMinutes()}`,i&&"object"==typeof i)this._endDate=i;else if(i&&"string"==typeof i){const[e,t,n]=i.split("/");this._endDate=new Date(Number(n),Number(e)-1,Number(t),23,59,59)}else this._endDate=new Date(this._startDate.getFullYear(),this._startDate.getMonth(),this._startDate.getDate(),23,59,59);this._endTime=r?this.convertTimeTo24Hour(r):`${this._endDate.getHours()}:${this._endDate.getMinutes()}`}initRepeatPattern(){this._event.repeatOptions&&this._event.repeatOptions.frequency&&(this.repeatPattern=je.getPattern(this._startDate,this._event.repeatOptions))}initEventSpansDays(){const e=q.from(this.startDate),t=q.from(this.endDate);this._eventSpansDays=(t.toDate().valueOf()-e.toDate().valueOf())/864e5+1}}var Ie=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Me extends d{constructor(){super(...arguments),this.repeatEventMap=new Map}getCurrentDateEvents(e){return this.createRepeatEvents().filter((t=>t.isCurrentDayEvent(e)))}updateAfterEventChange(e){this.initCalendarEvents(e),this.repeatEventMap.clear()}updateWhenComponentWillLoad(){this.initCalendarEvents(this.events)}initCalendarEvents(e){const t=[];e&&e.forEach((e=>{try{const n=new ze(e);t.push(n)}catch(t){h.warn("Invalid calendar event item:",e)}})),this.calendarEvents=t}createRepeatEvents(){const e=[],t=[];return this.calendarEvents.forEach((n=>{n.isRepeatEvent?n.getRepeatSeries(this.currentPeriod).forEach((e=>{t.push(this.generateCalendarEventByRepeatSeries(n,e))})):e.push(n)})),t.concat(e)}generateCalendarEventByRepeatSeries(e,t){const n=`${e.eventKey}-${t.year}${t.month}${t.date}`;if(this.repeatEventMap.has(n))return this.repeatEventMap.get(n);{const i=e.copyTo(n,t);return this.repeatEventMap.set(n,i),i}}}Ie([l({writable:!0})],Me.prototype,"calendarEvents",void 0),Ie([l()],Me.prototype,"currentPeriod",void 0),Ie([l()],Me.prototype,"events",void 0),Ie([c("watchEventsChange")],Me.prototype,"updateAfterEventChange",null),Ie([c("componentWillLoad")],Me.prototype,"updateWhenComponentWillLoad",null);var Se=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Te extends d{render(t,n){return e("vega-calendar-event",{"data-calendar-ref":this.host,key:t.eventKey,calendarEvent:t,class:n,onKeyDown:z(),onClick:()=>this.handleEventClick(t)},!t.isRepeatEvent&&e("slot",{name:ie(t.event.key)}))}handleEventClick(e){this.eventClickEmitter.emit({rawEvent:e.event})}}Te.backgroundColorModeEventHeight=18,Se([l()],Te.prototype,"host",void 0),Se([l()],Te.prototype,"calendarView",void 0),Se([l()],Te.prototype,"eventClickEmitter",void 0);var Oe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Ve extends S{constructor(){super({target:()=>this.host,callback:()=>this.updateMaxDisplayCountWithDebounce()}),this.updateMaxDisplayCountWithDebounce=T(this.updateMaxDisplayCount,500,this)}updateMaxDisplayCount(){try{const e=this.monthEventRenderer.getMonthEventContainerRef();if("month"===this.viewMode&&e&&e.parentElement){const t=e.parentElement.getBoundingClientRect().height,n=Math.floor((t-Ve.monthDateTitleHeight)/Te.backgroundColorModeEventHeight);O.notify(x.getSubject(this.host,E),{host:this.host,detail:n})}}catch(e){}}updateMaxDisplayCountAfterSwitchToMonthView(e){"month"===e&&this.updateMaxDisplayCountWithDebounce()}}Ve.monthDateTitleHeight=26,Oe([l()],Ve.prototype,"host",void 0),Oe([l()],Ve.prototype,"monthEventRenderer",void 0),Oe([l()],Ve.prototype,"viewMode",void 0),Oe([c("componentDidLoad")],Ve.prototype,"updateMaxDisplayCount",null),Oe([c("watchViewModeChange")],Ve.prototype,"updateMaxDisplayCountAfterSwitchToMonthView",null);var $e=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Pe extends d{render(){const t=this.calendarView.dateItems[0],n=t.map((e=>this.calendarEventController.getCurrentDateEvents(e).filter((e=>e.isAllDayEvent||e.isGroupEvent())))),i=this.fullDayEventLayoutRenderer.sortLongEvents(n),r=this.filterDisplayEvents(i);return e("div",{class:"calendar-view-event-all"},t.map(((t,n)=>e("div",{class:"event-all-col border-divider-left",key:t.date},this.renderCurrentFullDayEvents(r[n],n,i[n])))))}renderCurrentFullDayEvents(n,i,r){const a=n.length*Te.backgroundColorModeEventHeight-2,o=r.slice(n.length).filter(Boolean).length;return e(t,null,e("div",{class:"placeholder-block",style:{height:a+"px"}},e("span",null,n.length," events")),this.fullDayEventLayoutRenderer.render(n,i),o>0&&this.dayViewFullDayEventMoreButtonRenderer.render(o))}filterDisplayEvents(e){if(this.showAllEventsInDayOrWeekView)return e;{const t=[],n=Pe.maxDisplayEventLength;return e.forEach((e=>{const i=e.length>n?e.slice(0,n):e;t.push(i)})),t}}}Pe.maxDisplayEventLength=2,$e([l()],Pe.prototype,"calendarView",void 0),$e([l()],Pe.prototype,"calendarEventController",void 0),$e([l()],Pe.prototype,"eventItemRenderer",void 0),$e([l()],Pe.prototype,"fullDayEventLayoutRenderer",void 0),$e([l()],Pe.prototype,"showAllEventsInDayOrWeekView",void 0),$e([l()],Pe.prototype,"dayViewFullDayEventMoreButtonRenderer",void 0);class Be extends d{render(t){const n=[];return t.eventLayoutCells.forEach(((i,r)=>{let a=i.getEventBySlotIndex(0),o=0;for(let s=0;s<Be.totalNumberOfCells;s++){const l=i.getEventBySlotIndex(s);l!==a&&(a&&n.push(e("div",{key:r,class:"time-event-block",style:this.getTimeEventStyle(o,s,r,t.getEventColumnsSpannedCount(a))},this.eventItemRenderer.render(a,{"day-event":!0,"bg-shadow":r>0}))),a=l,o=s)}})),n}getTimeEventStyle(e,t,n,i){const r=n*(1/i);return{position:"absolute",left:100*r+"%",top:100/Be.totalNumberOfCells*e+"%",width:`calc(100% - ${100*r}%)`,height:100/Be.totalNumberOfCells*(t-e)+"%",zIndex:n>0?`${n}`:void 0}}}Be.totalNumberOfCells=96,function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],Be.prototype,"eventItemRenderer",void 0);class Ne{addCurrentEventToLayout(e,t){let n=e.find((e=>!e.hasOverlapEvent(t)));n?n.updateSlots(t):(n=this.createNewLayoutCell(),n.updateSlots(t),e.push(n))}}class Le{get eventLayoutCells(){return this.cells}}class Ae extends Le{constructor(e){super(),this.cells=e}getEventColumnsSpannedCount(e){const t=this.cells.findIndex((t=>t.getEventStartIndex(e)>=0));let n=t+1;return t<this.cells.length-1&&this.cells.slice(t+1).forEach((t=>{t.hasOverlapEvent(e)&&n++})),n}}class Fe{getEventBySlotIndex(e){return this.slots[e]}getEventStartIndex(e){return this.slots.findIndex((t=>t===e))}getEventEndIndex(e){const t=this.getEventStartIndex(e);let n=t;if(t>=0)for(let i=t+1;i<this.slots.length;i++){if(this.slots[i]!==e){n=i-1;break}i===this.slots.length-1&&(n=i)}return n}}class We extends Fe{constructor(){super(...arguments),this.slots=We.defaultSlots}hasOverlapEvent(e){const[t,n]=this.getIndexRangeFromEvent(e);let i=!1;for(let e=t;e<n;e++)if(this.slots[e]){i=!0;break}return i}updateSlots(e){const[t,n]=this.getIndexRangeFromEvent(e);n>t&&(this.slots=this.slots.slice(0,t).concat(Array(n-t).fill(e),this.slots.slice(n)))}getIndexRangeFromEvent(e){const{startTime:t,endTime:n}=e;return[ne(t),ne(n)]}}We.defaultSlots=Array(96).fill(null);class He extends Ne{generate(e){const t=[new We];return e.forEach((e=>{this.addCurrentEventToLayout(t,e)})),new Ae(t)}createNewLayoutCell(){return new We}}class Ue{sort(e,t,n){const i=[],r=[],a=[];for(let t=0;t<e.length;t++){const n=e[t];n&&(n.isGroupEvent()?r.push(n):n.isAllDayEvent?i.push(n):a.push(n))}let o=i.concat(this.sortCalendarEventByTime(a)),s=n.getEventsByIndex(t);const l=s.filter((e=>e));if(o=r.filter((e=>l.findIndex((t=>t===e))<0)).concat(o),s.length>l.length){const e=o.slice(0,s.length-l.length);o=o.slice(s.length-l.length),s=this.insertEventsToEmptyPosition(s,e)}return o=s.concat(o),o}sortCalendarEventByTime(e){return e.sort(((e,t)=>{const n=ne(e.startTime),i=ne(t.startTime);return n===i?ne(t.endTime)-ne(e.endTime):n-i}))}insertEventsToEmptyPosition(e,t){return e.map((e=>{if(t.length&&!e){const e=t[0];return t=t.slice(1),e}return e}))}}var Ye=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class _e extends d{constructor(){super(...arguments),this.calendarEventSorter=new Ue,this.dayViewTimedEventLayoutGenerator=new He}render(){return e("div",{class:"day-event-container"},this.calendarView.dateItems[0].map((t=>e("div",{key:`${t.month}-${t.date}`,class:"day-event-col"},this.renderTimedEvents(t)))))}renderTimedEvents(e){const t=this.calendarEventController.getCurrentDateEvents(e).filter((e=>!e.isAllDayEvent&&!e.isGroupEvent())),n=this.calendarEventSorter.sortCalendarEventByTime(t),i=this.dayViewTimedEventLayoutGenerator.generate(n);return this.dayViewEventLayoutRenderer.render(i)}}Ye([l()],_e.prototype,"calendarView",void 0),Ye([l()],_e.prototype,"calendarEventController",void 0),Ye([l()],_e.prototype,"dayViewEventLayoutRenderer",void 0);class qe extends Le{constructor(e){super(),this.cells=e}getEventRowsIndex(e){return this.cells.findIndex((t=>t.getEventStartIndex(e)>=0))}getEventsByIndex(e){const t=[];let n=0;return this.cells.forEach(((i,r)=>{const a=i.getEventBySlotIndex(e);t.push(a),a&&(n=r)})),t.slice(0,n+1)}}class Ke extends Fe{constructor(){super(...arguments),this.slots=Ke.defaultSlots}updateSlots(e){const{start:t,end:n}=e;this.slots=this.slots.slice(0,t).concat(Array(n-t+1).fill(e.event),this.slots.slice(n+1))}hasOverlapEvent(e){const{start:t,end:n}=e;let i=!1;for(let e=t;e<n+1;e++)if(this.slots[e]){i=!0;break}return i}}Ke.defaultSlots=Array(7).fill(null);class Xe extends Ne{generate(e){const t=this.collectAllShouldOrderLongEvents(e),n=[this.createNewLayoutCell()];return t.forEach((e=>{this.addCurrentEventToLayout(n,e)})),new qe(n)}createNewLayoutCell(){return new Ke}collectAllShouldOrderLongEvents(e){const t={};e.forEach(((e,n)=>{e.filter((e=>e&&e.isGroupEvent())).forEach((e=>{t[e.eventKey]=t[e.eventKey]?Object.assign(Object.assign({},t[e.eventKey]),{end:n,start:n-t[e.eventKey].end!=1?n:t[e.eventKey].start}):{start:n,end:n,event:e}}))}));const n=Object.values(t);return this.sortLongEventViews(n)}sortLongEventViews(e){return e.sort(((e,t)=>{const{startDate:n,endDate:i}=e.event,{startDate:r,endDate:a}=t.event;n.setHours(0,0,0),r.setHours(0,0,0),i.setHours(23,59,59),a.setHours(23,59,59);const o=a.valueOf()-r.valueOf()-(i.valueOf()-n.valueOf());return n.valueOf()!==r.valueOf()?n.valueOf()-r.valueOf():o}))}}var Ge=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Je extends d{constructor(){super(...arguments),this.longEventLayoutGenerator=new Xe,this.calendarEventSorter=new Ue}sortLongEvents(e){return this.fullDayEventLayout=this.longEventLayoutGenerator.generate(e),e.map(((e,t)=>this.calendarEventSorter.sort(e,t,this.fullDayEventLayout)))}render(t,n){return t.map(((t,i)=>{if(t)return e("div",{key:t.eventKey,class:"month"===this.viewMode?"month-event-block":"day-event-block",style:this.getEventStyle(t,n,i,"month"===this.viewMode?Je.monthViewEventOffsetTop:0)},this.eventItemRenderer.render(t,{"month-event":"month"===this.viewMode,"day-event":"month"!==this.viewMode}))}))}getEventStyle(e,t,n,i){const r=this.calendarView.weekdays.length,a=t;let o=t+1;const s=n;let l=!0;const d=this.fullDayEventLayout.getEventRowsIndex(e);if(d>=0){const n=this.fullDayEventLayout.eventLayoutCells[d].getEventStartIndex(e),i=this.fullDayEventLayout.eventLayoutCells[d].getEventEndIndex(e);n===t?o=i+1:l=!1}return{position:"absolute",left:100/r*a+"%",top:`${s*Te.backgroundColorModeEventHeight+i}px`,width:100/r*(o-a)+"%",opacity:l?"1":"0"}}}Je.monthViewEventOffsetTop=26,Ge([l()],Je.prototype,"eventItemRenderer",void 0),Ge([l()],Je.prototype,"viewMode",void 0),Ge([l()],Je.prototype,"calendarView",void 0);var Qe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Ze extends d{constructor(){super(...arguments),this.updateShowAllFlag=e=>{e.stopPropagation(),this.showAllEventsInDayOrWeekView=!0}}render(t){if(!this.showAllEventsInDayOrWeekView)return e("div",{tabIndex:0,role:"button",class:"more-button",onKeyDown:z(),onClick:this.updateShowAllFlag},`${t} More`)}resetShowAllFlag(){this.showAllEventsInDayOrWeekView=!1}}Qe([l({writable:!0})],Ze.prototype,"showAllEventsInDayOrWeekView",void 0),Qe([c("watchViewModeChange")],Ze.prototype,"resetShowAllFlag",null);var et=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class tt extends d{render(t){const n=t.findIndex((e=>e.isToday()))>=0;return e("div",{class:{"time-marker-container":!0,hidden:!n}},e("div",{class:"time-marker",style:{top:this.getTimeMarkerPosition()},ref:e=>this.timeMarkerRef=e},t.map((t=>e("div",{key:t.date,class:{active:t.isToday()}})))))}updateTimeLine(e){this.scrollToTargetTimeBlock(e),this.syncTimeMarkerPosition(e)}clearTimer(){clearInterval(this.timeMarkerPositionTimer)}updateTimeLineIfComponentAddBack(){this.syncTimeMarkerPosition(this.viewMode)}displayCurrentTimeBlockByDefault(){this.scrollToTargetTimeBlock(this.viewMode)}getTimeMarkerPosition(){const e=new Date;return(60*e.getHours()+e.getMinutes())/1440*100+"%"}syncTimeMarkerPosition(e){clearInterval(this.timeMarkerPositionTimer),"month"!==e&&(this.timeMarkerPositionTimer=setInterval((()=>{this.timeMarkerRef&&(this.timeMarkerRef.style.top=this.getTimeMarkerPosition())}),6e4))}scrollToTargetTimeBlock(e){"month"!==e&&setTimeout((()=>{const e=this.viewRenderer.getCalendarViewElementRef(),t=Math.max(0,this.getViewCenterPosition());e&&t&&e.scrollTo({top:t})}),16)}getViewCenterPosition(){const e=this.viewRenderer.getCalendarViewElementRef();if(e){const t=e.querySelector(".calendar-view-title-container").offsetHeight,n=Math.max(e.offsetHeight-t,0)/2,i=e.scrollHeight,r=16,a=Number(this.getTimeMarkerPosition().replace("%",""))/100*Math.max(i-r-t,0);if(!isNaN(n)&&a&&a>n)return a-n+r}return 0}}et([l()],tt.prototype,"viewMode",void 0),et([l()],tt.prototype,"viewRenderer",void 0),et([c("watchViewModeChange")],tt.prototype,"updateTimeLine",null),et([c("disconnectedCallback")],tt.prototype,"clearTimer",null),et([c("connectedCallback")],tt.prototype,"updateTimeLineIfComponentAddBack",null),et([c("componentDidLoad")],tt.prototype,"displayCurrentTimeBlockByDefault",null);var nt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const it=class{constructor(e){i(this,e),this.vegaChange=r(this,"vegaChange",7),this.change=r(this,"change",7),this.vegaEventClick=r(this,"vegaEventClick",7),this.eventClick=r(this,"eventClick",7),this.vegaDateDblClick=r(this,"vegaDateDblClick",7),this.dateDblClick=r(this,"dateDblClick",7),this.vegaMoreActionClick=r(this,"vegaMoreActionClick",7),this.moreActionClick=r(this,"moreActionClick",7),this.globalSlimmer={},this.translationSlimmer=new $,this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.renderer=new W,this.switchPanelRenderer=new oe,this.viewRenderer=new le,this.monthViewRenderer=new ce,this.viewWithTimeRenderer=new ve,this.timeLineRenderer=new pe,this.timeMarkerRenderer=new tt,this.monthEventRenderer=new xe,this.currentPeriodController=new ue,this.calendarViewController=new me,this.dayViewFullDayEventRenderer=new Pe,this.dayViewFullDayEventMoreButtonRenderer=new Ze,this.dayViewTimedEventRenderer=new _e,this.eventItemRenderer=new Te,this.dayViewEventLayoutRenderer=new Be,this.fullDayEventLayoutRenderer=new Je,this.calendarEventController=new Me,this.eventResponsiveController=new Ve,this.changeEventEmitter=j(it,u),this.eventClickEmitter=j(it,b),this.dateDblClickEmitter=j(it,y),this.moreActionClickEmitter=j(it,k),this.changeEventPrevent=new D([u],(()=>this.switchPanelRenderer.getSwitchPanelRef())),this.timeFormatNotifySlimmer=V(it,"timeFormat","watchTimeFormat"),this.showEventColorBarNotifySlimmer=V(it,"showEventColorBar","watchShowEventColorBar"),this.showAllEventsInDayOrWeekView=!1,this.calendarEvents=[],this.viewMode="month",this.timeFormat="24-hour",this.isDateDisabled=()=>!1,this.showEventColorBar=!0,this.showWeekends=!0}watchCurrentPeriodChange(e,t){}watchViewModeChange(e){}watchEventsChange(e){}watchTimeFormat(e){}watchShowEventColorBar(e){}watchShowWeekendsChange(){}render(){return s(e(a,null,this.renderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{currentPeriod:["watchCurrentPeriodChange"],viewMode:["watchViewModeChange"],events:["watchEventsChange"],timeFormat:["watchTimeFormat"],showEventColorBar:["watchShowEventColorBar"],showWeekends:["watchShowWeekendsChange"]}}};nt([f()],it.prototype,"globalSlimmer",void 0),nt([v()],it.prototype,"translationSlimmer",void 0),nt([v()],it.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),nt([v()],it.prototype,"renderer",void 0),nt([v()],it.prototype,"switchPanelRenderer",void 0),nt([v()],it.prototype,"viewRenderer",void 0),nt([v()],it.prototype,"monthViewRenderer",void 0),nt([v()],it.prototype,"viewWithTimeRenderer",void 0),nt([v()],it.prototype,"timeLineRenderer",void 0),nt([v()],it.prototype,"timeMarkerRenderer",void 0),nt([v()],it.prototype,"monthEventRenderer",void 0),nt([v()],it.prototype,"currentPeriodController",void 0),nt([v()],it.prototype,"calendarViewController",void 0),nt([v()],it.prototype,"dayViewFullDayEventRenderer",void 0),nt([v()],it.prototype,"dayViewFullDayEventMoreButtonRenderer",void 0),nt([v()],it.prototype,"dayViewTimedEventRenderer",void 0),nt([v()],it.prototype,"eventItemRenderer",void 0),nt([v()],it.prototype,"dayViewEventLayoutRenderer",void 0),nt([v()],it.prototype,"fullDayEventLayoutRenderer",void 0),nt([v()],it.prototype,"calendarEventController",void 0),nt([v()],it.prototype,"eventResponsiveController",void 0),nt([v()],it.prototype,"changeEventEmitter",void 0),nt([v()],it.prototype,"eventClickEmitter",void 0),nt([v()],it.prototype,"dateDblClickEmitter",void 0),nt([v()],it.prototype,"moreActionClickEmitter",void 0),nt([v()],it.prototype,"changeEventPrevent",void 0),nt([v()],it.prototype,"timeFormatNotifySlimmer",void 0),nt([v()],it.prototype,"showEventColorBarNotifySlimmer",void 0),it.style='.border-divider-top{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-left-width:0px;border-right-width:0px;border-bottom-width:0px}.border-divider-top.disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.border-divider-left{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-right-width:0px;border-bottom-width:0px}.border-divider-left.disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.border-divider-right{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-left-width:0px;border-bottom-width:0px}.border-divider-bottom{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-left-width:0px;border-right-width:0px}:host{display:flex;flex-direction:column;border-radius:12px;border:1px solid rgba(var(--v-border-divider, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));overflow:hidden;width:100%;height:100%;box-sizing:border-box;max-height:1966px}.calendar-switch-panel{padding:24px;border-bottom-width:1px;border-top-width:0px;border-left-width:0px;border-right-width:0px;border-style:solid;border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));flex-shrink:0;width:100%;box-sizing:border-box}.calendar-switch-panel .calendar-date-switch-container{display:flex;gap:8px;align-items:center;flex-direction:row}.calendar-switch-panel .calendar-view-switch-container{display:flex;gap:16px;align-items:center;flex-direction:row}.calendar-switch-panel .calendar-current-date{padding-left:8px}.calendar-view{width:100%;position:relative;flex-grow:1;overflow-y:auto;overflow-x:hidden;--calendar-weekday-columns:7}.calendar-view.calendar-hide-weekends{--calendar-weekday-columns:5}.calendar-view-month .calendar-view-month-container{width:100%;display:grid;min-height:100%;grid-template-rows:43px repeat(6, minmax(64px, 1fr))}.calendar-view-month .calendar-view-title{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));top:0;left:0;z-index:62}.calendar-view-month .calendar-view-title div{padding-top:12px;padding-bottom:12px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;text-align:center}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.calendar-view-month .calendar-view-row{position:relative;display:grid;grid-template-rows:1fr;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-month .calendar-view-row.calendar-view-title{position:sticky}.calendar-view-month .calendar-view-row:last-child{border-bottom-width:0px}.calendar-view-month .calendar-view-row .row-cell{overflow:hidden;display:flex;flex-direction:column;justify-content:space-between}.calendar-view-month .calendar-view-row .row-cell:last-child{border-right-width:0px}.calendar-view-month .calendar-view-row .row-cell .date{padding-top:4px;padding-bottom:4px;padding-right:12px;padding-left:8px}.calendar-view-month .calendar-view-row .row-cell .date>div{display:inline-block;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.calendar-view-month .calendar-view-row .row-cell .date .month-block{margin-right:2px}.calendar-view-month .calendar-view-row .row-cell .date .grid-col{text-align:center;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;cursor:pointer;width:18px;height:18px;line-height:18px}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:hover{background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1))}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:active{background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.calendar-view-month .calendar-view-row .row-cell.current-month-day .date>div{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}.calendar-view-month .calendar-view-row .row-cell.disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.calendar-view-month .calendar-view-row .row-cell.disabled .date>div{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));border-top-left-radius:9999px;border-bottom-left-radius:9999px;color:rgba(var(--v-text-on-action, 252, 252, 252, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.calendar-view-container{width:100%}.calendar-view-container .calendar-view-title-container{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));position:sticky;top:0;left:0;z-index:62}.calendar-view-container .calendar-view-row{box-sizing:border-box;width:100%;display:flex;flex-direction:row}.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{width:72px;text-align:right;padding-right:8px;box-sizing:border-box;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));flex-shrink:0}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.calendar-view-container .calendar-view-title{width:100%}.calendar-view-container .calendar-view-title>div{padding:12px;padding-bottom:8px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;text-align:center;display:flex;flex-direction:column;gap:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.calendar-view-container .calendar-view-title .week-day{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}.calendar-view-container .calendar-view-title .active div{color:rgba(var(--v-text-link, 19, 98, 226, 1))}.calendar-view-container .calendar-view-event-all-container{align-items:center}.calendar-view-container .calendar-view-event-all{display:grid;grid-template-rows:1fr;flex-grow:1;min-height:18px}.calendar-view-container .calendar-view-day-container .time-line{display:grid;grid-template-rows:16px repeat(24, minmax(74px, 1fr))}.calendar-view-container .calendar-view-day-container .time-line .time-text{margin-top:-9px}.calendar-view-container .calendar-view-day-container .calendar-view-content{width:100%}.calendar-view-container .calendar-view-day-container .calendar-view-content .grid-col{display:grid;grid-template-rows:16px repeat(24, minmax(74px, 1fr));grid-template-columns:minmax(64px, 1fr)}.calendar-view-container .calendar-view-day-container .calendar-view-content .grid-col>.border-divider-top:first-child{border-top-width:0px}.calendar-view-container .calendar-view-content-container{width:100%;position:relative}.calendar-view-week .calendar-view-container{min-height:100%}.calendar-view-week .calendar-view-container .calendar-view-title{display:grid;grid-template-rows:1fr;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .calendar-view-container .calendar-view-event-all{grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .calendar-view-container .calendar-view-day-container .calendar-view-content{display:grid;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .time-marker-container .time-marker{display:grid;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .day-event-container{display:grid;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-day .calendar-view-container{min-height:100%}.time-marker-container{position:absolute;min-width:100%;left:0;top:16px;height:calc(100% - 16px);pointer-events:none}.time-marker-container.hidden{display:none}.time-marker-container .time-marker{position:absolute;height:2px;display:grid;min-width:100%;left:0;top:0;z-index:61}.time-marker-container .time-marker div{width:100%;height:2px;background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));opacity:0.3}.time-marker-container .time-marker div.active{opacity:1;position:relative}.time-marker-container .time-marker div.active::before{content:"";display:block;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;position:absolute;width:8px;height:8px;background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));top:-3px;left:-4px}.day-event-container{position:absolute;min-width:100%;left:0;top:16px;height:calc(100% - 16px);pointer-events:none}.day-event-container .day-event-col{height:100%;overflow:hidden}.day-event-container vega-calendar-event{pointer-events:auto;height:100%}.calendar-view-month .month-event-row{position:absolute;width:100%;overflow:hidden;height:calc(100% - 26px);left:0;bottom:0}.calendar-view-month .events-container{width:100%;box-sizing:border-box;overflow:hidden;padding:2px;display:flex;flex-direction:column;gap:2px;justify-content:space-between;flex-grow:1}.calendar-view-month .events-container .event-list{display:flex;flex-direction:column;gap:2px;flex-grow:1}.calendar-view-month .events-container .event-list .month-event-block{box-sizing:border-box;padding-left:2px;padding-right:3px}.calendar-view-month .events-container .month-event-more .more-button{display:inline-block;height:16px;font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1));cursor:pointer;border-radius:2px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}.calendar-view-month .events-container .month-event-more .more-button:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}.calendar-view-container .calendar-view-event-all{position:relative}.calendar-view-container .calendar-view-event-all .placeholder-block{padding-top:2px;padding-bottom:2px;box-sizing:content-box}.calendar-view-container .calendar-view-event-all .placeholder-block span{display:none}.calendar-view-container .calendar-view-event-all .day-event-block{padding-top:2px;padding-right:2px;box-sizing:border-box;padding-left:3px}.calendar-view-container .calendar-view-event-all .more-button{display:inline-block;height:16px;font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1));cursor:pointer;border-radius:2px;margin-left:2px;padding:2px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}.calendar-view-container .calendar-view-event-all .more-button:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}.calendar-view-container .calendar-view-event-all .event-all-col{display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start}.calendar-view-container .day-event-col{position:relative}.calendar-view-container .day-event-col .time-event-block{box-sizing:border-box;padding-right:8px;padding-bottom:2px;padding-top:3px}.calendar-view-container .day-event-col .time-event-block vega-calendar-event.bg-shadow::part(event-container):not(:focus){outline:2px solid rgba(var(--v-bg-primary, 252, 252, 252, 1))}.calendar-view-container .day-event-col .time-event-block:focus-within{z-index:60 !important}.calendar-event-slot-container{display:none}';var rt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class at extends d{getEventTitleContainerRef(){return this.eventTitleContainerRef}getSlotContainerRef(){return this.slotContainerRef}render(){return e(t,null,this.injectBackgroundColorStyle(),this.calendarEventRender())}calendarEventRender(){return this.calendarEvent.isAllDayEvent||this.calendarEvent.isGroupEvent()?this.renderBackgroundModeEvent():this.renderNormalEvent()}renderBackgroundModeEvent(){const t=this.calendarEvent.disabled;return e("div",{role:"button",tabIndex:0,class:{"slot-container":this.slotMode,"background-color-mode":!0,"event-bg-color":!t,"bg-disabled":t},ref:e=>this.slotContainerRef=e},this.slotMode?this.getSlotElement():this.calendarEvent.title)}renderNormalEvent(){const{variant:t,disabled:n}=this.calendarEvent,i=t||"primary",r=!this.host.classList.contains("day-event"),a={"slot-container":this.slotMode,"event-container":!0,disabled:n,[i]:!0};if(r)return e("div",{role:"button",tabIndex:0,class:a,ref:e=>this.slotContainerRef=e},!this.slotMode&&this.renderEventStatus(),this.slotMode?this.getSlotElement():this.defaultNormalMonthEventContentRender());{const t=this.calendarEvent.getEventDuration();return e("div",{part:"event-container",class:Object.assign(Object.assign({},a),{vertical:t>30,"duration-half-an-hour":30===t,"event-bg-color":!n,"bg-disabled":n}),role:"button",tabIndex:0,ref:e=>this.slotContainerRef=e},!this.slotMode&&this.renderEventStatus(),e("div",{class:"cover-block"}),this.slotMode?this.getSlotElement():this.defaultNormalTimedEventContentRender(t))}}renderEventStatus(){if(this.showColorBar){const t=this.calendarEvent.disabled;return e("div",{class:{"event-status":!0,"event-bg-color":!t,"bg-disabled":t}},e("span",{class:{stripe:"secondary"===this.calendarEvent.variant}}))}}defaultNormalMonthEventContentRender(){const{startTime:t,title:n}=this.calendarEvent;return e("div",{class:"event-title"},`${this.formatDisplayTime(t)} ${n}`)}defaultNormalTimedEventContentRender(t){const{startTime:n,endTime:i,title:r}=this.calendarEvent;return e("div",{class:"event-content"},e("div",{class:{"event-title":!0,"title-word-wrap":t>30},ref:e=>this.eventTitleContainerRef=e},r),e("div",{class:"event-time"},e("vega-icon",{size:"size-12",icon:C.getIconKey("clock-three")}),e("span",null,`${this.formatDisplayTime(n)} - ${this.formatDisplayTime(i)}`)))}getSlotElement(){if(!this.calendarEvent.isRepeatEvent)return e("slot",null)}injectBackgroundColorStyle(){return e("style",null,this.colorController.getBackgroundColorStyle())}formatDisplayTime(e){const[t,n]=e.split(":");if("24-hour"===this.timeFormat)return`${t.padStart(2,"0")}:${n.padStart(2,"0")}`;{const e=Number(t),i=e>=12?"pm":"am",r=n.padStart(2,"0");return e>12?`${e-12}:${r} pm`:0===e?`12:${r} am`:`${e}:${r} ${i}`}}}C.register({"clock-three":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 13.3 10.7 24 24 24H360c13.3 0 24-10.7 24-24s-10.7-24-24-24H280V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"/></svg>'}}),rt([l()],at.prototype,"host",void 0),rt([l()],at.prototype,"timeFormat",void 0),rt([l()],at.prototype,"calendarEvent",void 0),rt([l()],at.prototype,"slotMode",void 0),rt([l()],at.prototype,"showColorBar",void 0),rt([l()],at.prototype,"colorController",void 0);class ot extends d{getBackgroundColorStyle(){const e=this.calendarEvent.color||"bg-accent6-primary";return B(e)?`.event-bg-color{${N.formatToken(e)}}`:`.event-bg-color{background-color:${e}}`}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],ot.prototype,"calendarEvent",void 0);var st=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class lt extends L{constructor(){super({parent:()=>this.host["data-calendar-ref"],subStates:[{subStateName:"timeFormat",parentStateName:"timeFormat"},{subStateName:"showColorBar",parentStateName:"showEventColorBar"}]})}}st([l({writable:!0})],lt.prototype,"timeFormat",void 0),st([l({writable:!0})],lt.prototype,"showColorBar",void 0);class dt extends d{setVerticalTitleMaxHeight(){const e=this.renderer.getEventTitleContainerRef();if(e&&e.classList.contains("title-word-wrap")){const t=window.getComputedStyle(e),n=A(t.height),i=A(t.lineHeight),r=Math.max(Math.floor(n/i),1);e.style.maxHeight=r*i+"px"}}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],dt.prototype,"renderer",void 0);var ct=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ht extends d{findTheCalendarEventSlot(){if(this.calendarEvent){const{event:e}=this.calendarEvent,t=this.getParentCalendarElement();if(t){const n=t.querySelector(`vega-calendar-event-slot[event-key='${e.key}']`);n&&(this.slotMode=!0,this.matchSlotElement=n)}}}appendTheRepeatEventSlotToContainer(){const e=this.renderer.getSlotContainerRef();if(this.slotMode&&e&&this.matchSlotElement&&(this.calendarEvent.isRepeatEvent||this.isPopoverContent())){const t=this.matchSlotElement.cloneNode(!0);t.removeAttribute("slot"),e.querySelector("vega-calendar-event-slot")||e.appendChild(t)}}getParentCalendarElement(){return this.host["data-calendar-ref"]}isPopoverContent(){return this.host.classList.contains("calendar-event-in-popover")}}ct([l()],ht.prototype,"host",void 0),ct([l()],ht.prototype,"calendarEvent",void 0),ct([l({writable:!0})],ht.prototype,"slotMode",void 0),ct([l()],ht.prototype,"renderer",void 0),ct([c("componentWillLoad")],ht.prototype,"findTheCalendarEventSlot",null),ct([c("componentDidLoad")],ht.prototype,"appendTheRepeatEventSlotToContainer",null);var vt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const pt=class{constructor(e){i(this,e),this.globalSlimmer={},this.pageResizeObserverSlimmer=new S({target:()=>this.host,callback:()=>this.titleMaxHeightController.setVerticalTitleMaxHeight()}),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.renderer=new at,this.colorController=new ot,this.slotController=new ht,this.subStateController=new lt,this.titleMaxHeightController=new dt,this.timeFormat="24-hour",this.slotMode=!1,this.showColorBar=!0}render(){return P(e("slot",null)),s(e(a,null,this.calendarEvent?this.renderer.render():null),this.host)}get host(){return o(this)}};vt([f()],pt.prototype,"globalSlimmer",void 0),vt([v()],pt.prototype,"pageResizeObserverSlimmer",void 0),vt([v()],pt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),vt([v()],pt.prototype,"renderer",void 0),vt([v()],pt.prototype,"colorController",void 0),vt([v()],pt.prototype,"slotController",void 0),vt([v()],pt.prototype,"subStateController",void 0),vt([v()],pt.prototype,"titleMaxHeightController",void 0),pt.style='.bg-disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host{display:block;box-sizing:border-box;width:100%}:host .background-color-mode{border-radius:2px;color:rgba(var(--v-text-black, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;cursor:pointer;overflow:hidden;white-space:nowrap}@media screen and (min-width: 768px) and (max-width: 1023px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}:host .background-color-mode:not(.slot-container){padding-left:8px;padding-right:8px}:host .background-color-mode:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host .event-container{display:block;width:100%;border-radius:4px;cursor:pointer;box-sizing:border-box;overflow:hidden}:host .background-color-mode.slot-container{height:16px;line-height:16px}:host ::slotted(vega-calendar-event-slot){position:relative;pointer-events:none}:host(.month-event) .event-container{display:flex;flex-direction:row;gap:4px;align-items:center;min-height:16px}:host(.month-event) .event-container:not(.slot-container){padding-left:2px;padding-right:2px}:host(.month-event) .event-container .event-status{width:8px;height:8px;box-sizing:border-box;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;margin-left:2px;flex-shrink:0}:host(.month-event) .event-container .event-status span{display:none;width:100%;height:100%;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px}:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.month-event) .event-container .event-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(.month-event) .event-container .event-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(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}:host(.month-event) .event-container.secondary .event-status span{display:block;background-size:4px 4px;opacity:0.8}:host(.month-event) .event-container.tertiary .event-status{padding:1px}:host(.month-event) .event-container.tertiary .event-status span{display:block;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}:host(.month-event) .event-container.disabled .event-status{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.month-event) .event-container:hover{background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1))}:host(.month-event) .event-container:active{background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}:host(.month-event) .event-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host(.day-event) .event-container{position:relative}:host(.day-event) .event-container:not(.slot-container){padding-left:8px;padding-right:8px}:host(.day-event) .event-container .event-status{position:absolute;width:4px;height:100%;left:0;top:0;z-index:1}:host(.day-event) .event-container .event-status span{display:none}:host(.day-event) .event-container .cover-block{position:absolute;height:100%;width:100%;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:4px;left:0;top:0;opacity:0.7}:host(.day-event) .event-container .event-content,:host(.day-event) .event-container .event-time{display:flex;flex-direction:row;align-items:center}:host(.day-event) .event-container .event-content{gap:8px;position:relative;height:100%;box-sizing:border-box}:host(.day-event) .event-container .event-time{gap: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}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.day-event) .event-container .event-time{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(.day-event) .event-container .event-time{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(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}:host(.day-event) .event-container .event-time vega-icon{flex-shrink:0}:host(.day-event) .event-container .event-time span{white-space:nowrap}:host(.day-event) .event-container .event-title{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}:host(.day-event) .event-container .event-title.title-word-wrap{overflow:hidden}:host(.day-event) .event-container .event-title:not(.title-word-wrap){white-space:nowrap}:host(.day-event) .event-container.duration-half-an-hour{padding-top:8px;padding-bottom:8px}:host(.day-event) .event-container.vertical{height:100%}:host(.day-event) .event-container.vertical .event-content{flex-direction:column;align-items:flex-start;gap:4px;padding-top:8px;padding-bottom:8px}:host(.day-event) .event-container.secondary .event-status span,:host(.day-event) .event-container.tertiary .event-status span{display:block;position:absolute;border-top-left-radius:4px;border-bottom-left-radius:4px}:host(.day-event) .event-container.secondary .cover-block,:host(.day-event) .event-container.tertiary .cover-block{width:calc(100% - 2px);height:calc(100% - 2px);top:1px;left:1px}:host(.day-event) .event-container.secondary .event-status span{width:100%;height:100%;top:0px;left:0px;background-size:4px 4px;opacity:0.8}:host(.day-event) .event-container.secondary .cover-block{opacity:0.9}:host(.day-event) .event-container.tertiary .event-status span{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));width:2px;height:calc(100% - 2px);top:1px;left:1px}:host(.day-event) .event-container.tertiary .cover-block{opacity:1}:host(.day-event) .event-container.disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.day-event) .event-container.disabled .event-status{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.day-event) .event-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host(.day-event) .slot-container{min-height:16px}:host(.month-event.calendar-event-large-size) .background-color-mode{border-radius:4px}:host(.month-event.calendar-event-large-size) .background-color-mode:not(.slot-container){padding-top:4px;padding-bottom:4px}:host(.month-event.calendar-event-large-size) .event-container:not(.slot-container){padding-top:4px;padding-bottom:4px}:host(.month-event.calendar-event-large-size) .slot-container{height:24px;display:flex;align-items:center;line-height:24px}.stripe{background-image:linear-gradient(-45deg, transparent 25%, rgba(var(--v-bg-primary, 252, 252, 252, 1)) 25% 50%, transparent 50% 75%, rgba(var(--v-bg-primary, 252, 252, 252, 1)) 75% 100%)}';var ft=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const mt=class{constructor(e){i(this,e),this.globalSlimmer={},this.vegaComponentUsageRuntimeMetricsSlimmer=new p}render(){return s(e(a,{slot:ie(this.eventKey)},e("slot",null)),this.host)}get host(){return o(this)}};ft([f()],mt.prototype,"globalSlimmer",void 0),ft([v()],mt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),mt.style=":host{width:100%;height:100%;position:relative}";export{it as vega_calendar,pt as vega_calendar_event,mt as vega_calendar_event_slot}
1
+ import{h as e,F as t,f as n,r as i,c as r,H as a,g as o}from"./p-21d26bb4.js";import{s}from"./p-519a7d55.js";import{c as l,V as d,M as c,L as h,I as v}from"./p-6e1ab235.js";import{V as p,I as f}from"./p-d849e0f5.js";import{D as m}from"./p-e7b00bf0.js";import{a as w,f as u,b as g,d as x,g as b,h as y,i as k}from"./p-6e01f0a2.js";import{V as C}from"./p-f08a4adf.js";import{p as R}from"./p-08835909.js";import{c as j}from"./p-012cbd8f.js";import{C as D}from"./p-d789b291.js";import{t as E}from"./p-f5ac60f5.js";import{c as z}from"./p-86194314.js";import{f as I}from"./p-d27ae9ff.js";import{g as M}from"./p-a4670e23.js";import{P as S}from"./p-7d9cd9c8.js";import{d as T}from"./p-1bc5b3bc.js";import{C as O}from"./p-2d0d575f.js";import{c as V}from"./p-8c4f893b.js";import{T as $}from"./p-81ed90d5.js";import{s as P}from"./p-6bd5c49b.js";import{q as B}from"./p-5e2c9e69.js";import{s as N}from"./p-49fd1009.js";import{S as L}from"./p-8782abeb.js";import{b as A}from"./p-0c667d6a.js";import"./p-331a62d5.js";import"./p-d5776087.js";import"./p-8c46e116.js";import"./p-6a334573.js";import"./p-613ee009.js";import"./p-b75ee3ba.js";import"./p-5f377954.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-112455b1.js";import"./p-262ec334.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-9d6003ef.js";import"./p-5773a9a3.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";var F=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class W extends d{render(){return e(t,null,this.switchPanelRenderer.render(),this.viewRenderer.render())}}F([l()],W.prototype,"switchPanelRenderer",void 0),F([l()],W.prototype,"viewRenderer",void 0);const H=(e=0)=>{const t=[0,1,2,3,4,5,6];return t.concat(t).slice(e,e+7)};class U{constructor(){this.WEEKDAYS_SHORT=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],this.weekdays=H()}getWeekdayNames(){return this.WEEKDAYS_SHORT}generateDates(e){const t=e.startDate.toDate(),n=[];for(let i=0;i<e.count;i++)n.push(new Date(t)),t.setDate(t.getDate()+1);return n}generateWeekHead(){return this.weekdays.map((e=>this.getWeekdayNames()[e]))}}class Y{constructor(e,t){this._weekdays=e,this._dateItems=t}get weekdays(){return this._weekdays}get dateItems(){return this._dateItems}}class _ extends U{generate(e){return new Y([this.generateWeekHead()[e.current.toDate().getDay()]],[[e.current]])}}class q{constructor(e,t,n){this._date=n,this._month=t,this._year=e}static from(e){return new q(e.getFullYear(),e.getMonth()+1,e.getDate())}get year(){return this._year}set year(e){this._year=e}get month(){return this._month}set month(e){this._month=e}get date(){return this._date}set date(e){this._date=e}isToday(){const e=new Date;return e.getFullYear()===this.year&&e.getMonth()+1===this.month&&e.getDate()===this.date}toDate(){return new Date(this.year,this.month-1,this.date)}compare(e){const{year:t,month:n}=e,i={isPreviousMonth:!1,inMonth:!1,isNextMonth:!1};return this.year===t?this.month<n?i.isPreviousMonth=!0:this.month>n?i.isNextMonth=!0:i.inMonth=!0:this.year>t?i.isNextMonth=!0:i.isPreviousMonth=!0,i}equal(e){const{year:t,month:n,date:i}=e;return this._year===t&&this._month===n&&this._date===i}}class K extends U{generate(e){const t=this.generateDates(e),n=e.showWeekends;let i=this.generateWeekHead(),r=[t.map(q.from)];return!1===n&&(i=i.slice(1,6),r=r.map((e=>e.slice(1,6)))),new Y(i,r)}}class X extends U{generate(e){const t=e.showWeekends;let n=[],i=[];this.generateDates(e).forEach(((e,t)=>{t%7||(n[t/7]=i=[]);const r=q.from(e);i.push(r)}));let r=this.generateWeekHead();return!1===t&&(r=r.slice(1,6),n=n.map((e=>e.slice(1,6)))),new Y(r,n)}}class G{constructor(e,t){this._count=e,this._current=t||q.from(new Date),this.calculatePeriod(this._current)}get current(){return this._current}get startDate(){return this._startDate}get endDate(){return this._endDate}get count(){return this._count}get type(){return this._type}get showWeekends(){return this._showWeekends}goTo(e){return this.createBy(e)}now(){return this.createBy(q.from(new Date))}calculatePeriod(e){const t=e.toDate();this.count>1&&t.setDate(t.getDate()-H().indexOf(t.getDay())),this._startDate=q.from(t),t.setDate(t.getDate()+this.count-1),this._endDate=q.from(t)}}class J extends G{constructor(e,t){super(J.DISPLAY_DATE_COUNT,e),this._type="day",this._showWeekends=!0,this._showWeekends=!1!==t}next(){const e=this.current.toDate();e.setDate(e.getDate()+1);let t=q.from(e);return!1===this._showWeekends&&(t=re(t)),this.createBy(t)}previous(){const e=this.current.toDate();e.setDate(e.getDate()-1);let t=q.from(e);return!1===this._showWeekends&&(t=re(t,ee.PREVIOUS)),this.createBy(t)}now(){let e=q.from(new Date);return!1===this._showWeekends&&(e=re(e)),this.createBy(e)}createBy(e){return new J(e,this._showWeekends)}}J.DISPLAY_DATE_COUNT=1;class Q extends G{constructor(e,t){super(Q.DISPLAY_DATE_COUNT,e),this._type="week",this._showWeekends=!0,this._showWeekends=!1!==t}next(){const e=this.current.toDate();return e.setDate(e.getDate()-H().indexOf(e.getDay())+7),this.createBy(q.from(e))}previous(){const e=this.current.toDate();return e.setDate(e.getDate()-H().indexOf(e.getDay())-7),this.createBy(q.from(e))}createBy(e){return new Q(e,this._showWeekends)}}Q.DISPLAY_DATE_COUNT=7;class Z extends G{constructor(e,t){super(Z.DISPLAY_DATE_COUNT,Z.getMonthFirstDay(e)),this._type="month",this._showWeekends=!0,this._showWeekends=!1!==t}static getMonthFirstDay(e){const t=e||q.from(new Date);return new q(t.year,t.month,1)}next(){const e=this.current.toDate();return e.setMonth(e.getMonth()+1),this.createBy(q.from(e))}previous(){const e=this.current.toDate();return e.setMonth(e.getMonth()-1),this.createBy(q.from(e))}createBy(e){return new Z(e,this._showWeekends)}}var ee;function te(e,t=!1){return e.toLocaleDateString("en-US",{month:t?"short":"long"})}function ne(e,t=15){const[n,i]=e.split(":");return Math.round((60*Number(n)+Number(i))/t)}function ie(e){return"vega-calendar-event-slot-"+e}function re(e,t=ee.NEXT){const n=e.toDate().getDay();if(0===n||6===n){let i=0===n?1:2;return t===ee.PREVIOUS&&(i=0===n?-2:-1),q.from(new Date(e.year,e.month-1,e.date+i))}return e}Z.DISPLAY_DATE_COUNT=42,function(e){e.PREVIOUS="-1",e.NEXT="1"}(ee||(ee={}));var ae=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class oe extends d{constructor(){super(...arguments),this.handleViewChange=e=>{this.currentPeriodController.updateCalendarPeriod(e.detail,this.currentPeriod.current)},this.todayButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.now())},this.nextButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.next())},this.prevButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.previous())},this.moreActionMenuClick=e=>{this.moreActionClickEmitter.emit(e.detail)}}getSwitchPanelRef(){return this.switchPanelRef}render(){return e("vega-flex",{direction:"row",gap:"size-16",justifyContent:"space-between",alignItems:"center",class:"calendar-switch-panel",ref:e=>this.switchPanelRef=e},this.renderDateSwitch(),e("div",{class:"calendar-view-switch-container"},this.renderViewSwitch(),this.renderMoreActionMenu()))}renderDateSwitch(){return e("div",{class:"calendar-date-switch-container"},e("vega-button",{variant:"secondary",size:"small",ref:e=>{m.addUniqueObserverToNode(e,w,this.todayButtonClick)},label:this.translationSlimmer.t("Today")}),e("vega-button-circle",{variant:"secondary",size:"small",icon:C.getIconKey("chevron-left"),label:"previous",showTooltip:!1,ref:e=>{m.addUniqueObserverToNode(e,w,this.prevButtonClick)}}),e("vega-button-circle",{variant:"secondary",size:"small",icon:C.getIconKey("chevron-right"),label:"next",showTooltip:!1,ref:e=>{m.addUniqueObserverToNode(e,w,this.nextButtonClick)}}),this.renderCurrentPeriod())}renderCurrentPeriod(){return e("vega-font",{class:"calendar-current-date",variant:"font-field-label",color:"text-primary"},this.getViewDateSummary())}renderViewSwitch(){return e("vega-segment-control",{segments:oe.views.map((e=>Object.assign(Object.assign({},e),{text:this.translationSlimmer.t(e.text)}))),size:"small",variant:"text-only",selected:this.viewMode,ref:e=>{m.addUniqueObserverToNode(e,u,this.handleViewChange)}})}renderMoreActionMenu(){var t,n;if(null===(n=null===(t=this.moreActionDropdownProps)||void 0===t?void 0:t.source)||void 0===n?void 0:n.length)return e("vega-dropdown",Object.assign({alignment:"end",trigger:"click"},this.moreActionDropdownProps,{ref:e=>{m.addUniqueObserverToNode(e,g,this.moreActionMenuClick)}}),e("vega-button-circle",{size:"small",icon:C.getIconKey("ellipsis-vertical"),variant:"icon-only"}))}getViewDateSummary(){const e=this.currentPeriod.current;let t="";switch(this.viewMode){case"day":{const n=this.translationSlimmer.t(te(e.toDate()));t=`${e.date} ${n}, ${e.year}`;break}case"week":{const e=this.calendarView.dateItems[0],n=e[0],i=e[e.length-1],[r,a]=[n,i].map((e=>this.translationSlimmer.t(te(e.toDate()))));t=`${n.date} ${r}${n.year===i.year?"":", "+n.year} - ${i.date} ${a}, ${i.year}`;break}case"month":t=`${this.translationSlimmer.t(te(e.toDate()))}, ${e.year}`}return t}}C.register({"chevron-right":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/></svg>'},"chevron-left":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"/></svg>'},"ellipsis-vertical":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M48 464a48 48 0 1 1 0-96 48 48 0 1 1 0 96zm0-160a48 48 0 1 1 0-96 48 48 0 1 1 0 96zM0 96a48 48 0 1 1 96 0A48 48 0 1 1 0 96z"/></svg>'}}),oe.views=[{text:"Day",key:"day"},{text:"Week",key:"week"},{text:"Month",key:"month"}],ae([l()],oe.prototype,"viewMode",void 0),ae([l()],oe.prototype,"calendarView",void 0),ae([l()],oe.prototype,"currentPeriod",void 0),ae([l()],oe.prototype,"moreActionDropdownProps",void 0),ae([l()],oe.prototype,"moreActionClickEmitter",void 0),ae([l()],oe.prototype,"currentPeriodController",void 0),ae([l()],oe.prototype,"calendarViewController",void 0),ae([l()],oe.prototype,"translationSlimmer",void 0);var se=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class le extends d{getCalendarViewElementRef(){return this.calendarViewElementRef}render(){return e("div",{class:`calendar-view calendar-view-${this.viewMode} ${!1===this.showWeekends?"calendar-hide-weekends":""}`,ref:e=>this.calendarViewElementRef=e},"month"===this.viewMode?this.monthViewRenderer.render():this.viewWithTimeRenderer.render())}}se([l()],le.prototype,"viewMode",void 0),se([l()],le.prototype,"showWeekends",void 0),se([l()],le.prototype,"monthViewRenderer",void 0),se([l()],le.prototype,"viewWithTimeRenderer",void 0);var de=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ce extends d{render(){return e("div",{class:"calendar-view-month-container"},e("div",{class:"calendar-view-row calendar-view-title border-divider-bottom"},this.calendarView.weekdays.map((t=>e("div",{key:t},this.translationSlimmer.t(t))))),this.renderMonthViewContent())}renderMonthViewContent(){const t=this.currentPeriod.current;return this.calendarView.dateItems.map(((n,i)=>{const r=this.monthEventRenderer.getCurrentRowEvents(n),a=this.monthEventRenderer.filterRowDisplayEvents(r);return e("div",{key:i,class:"calendar-view-row border-divider-bottom"},n.map(((n,i)=>{var o;const s=null===(o=this.isDateDisabled)||void 0===o?void 0:o.call(this,n.toDate());return e("div",{class:{"row-cell border-divider-right":!0,"current-month-day":n.compare(t).inMonth,active:n.isToday(),disabled:s},key:`${n.month}-${n.date}`,onDblClick:s?void 0:e=>{this.handleDateBlockClick(e,n)}},this.renderDateBlock(n),this.monthEventRenderer.render(n,r[i],a[i],i))})))}))}renderDateBlock(t){return e("div",{class:"date"},1===t.date&&e("div",{class:"month-block"},te(t.toDate(),!0)),e("div",{role:"button",tabIndex:0,class:"grid-col",onDblClick:e=>this.goToCurrentDayView(e,t)},t.date))}goToCurrentDayView(e,t){e.stopPropagation(),this.currentPeriodController.updateCalendarPeriod("day",t)}handleDateBlockClick(e,t){const{target:n,clientX:i,clientY:r}=e;if(this.isMonthBlockBlankArea(n)){const{year:e,month:n,date:a}=t;this.dateDblClickEmitter.emit({year:e,month:n,date:a,hour:0,mouseEventInfo:{clientX:i,clientY:r}})}}isMonthBlockBlankArea(e){return!e.classList.contains("more-button")&&"VEGA-CALENDAR-EVENT"!==e.tagName}}de([l()],ce.prototype,"viewMode",void 0),de([l()],ce.prototype,"calendarView",void 0),de([l()],ce.prototype,"currentPeriod",void 0),de([l()],ce.prototype,"currentPeriodController",void 0),de([l()],ce.prototype,"monthEventRenderer",void 0),de([l()],ce.prototype,"dateDblClickEmitter",void 0),de([l()],ce.prototype,"translationSlimmer",void 0),de([l()],ce.prototype,"isDateDisabled",void 0);var he=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ve extends d{render(){return e("div",{class:"calendar-view-container"},this.renderViewTitle(),this.renderViewContent())}renderViewTitle(){const t=this.calendarView.dateItems[0],n=this.calendarView.weekdays;return e("div",{class:"calendar-view-title-container"},e("div",{class:"calendar-view-row"},e("div",{class:"time-line-empty"}),e("div",{class:"calendar-view-title"},t.map(((t,i)=>e("div",{key:t.date,class:{active:t.isToday()}},e("div",null,this.translationSlimmer.t(n[i])),e("div",{class:"week-day"},t.date)))))),e("div",{class:"calendar-view-row calendar-view-event-all-container border-divider-bottom"},e("div",{class:"time-line-all"},this.translationSlimmer.t("All Day")),this.dayViewFullDayEventRenderer.render()))}renderViewContent(){const t=this.calendarView.dateItems[0];return e("div",{class:"calendar-view-row calendar-view-day-container"},this.timeLineRenderer.render(),e("div",{class:"calendar-view-content-container"},e("div",{class:"calendar-view-content"},t.map((t=>{var n;const i=null===(n=this.isDateDisabled)||void 0===n?void 0:n.call(this,t.toDate());return e("div",{class:{"grid-col border-divider-left":!0,disabled:i},key:t.date},e("div",{class:"hour-empty border-divider-top"}),this.renderHourBlock(t,i))}))),this.dayViewTimedEventRenderer.render(),this.timeMarkerRenderer.render(t)))}renderHourBlock(t,n){return Array(24).fill("").map(((i,r)=>{var a;let o=!1;if(!n){const e=new Date(t.toDate().setHours(r));o=null===(a=this.isDateDisabled)||void 0===a?void 0:a.call(this,e)}return e("div",{class:{"grid-cell border-divider-top":!0,disabled:n||o},onDblClick:n||o?void 0:e=>this.handleDateBlockClick(t,r,e)})}))}handleDateBlockClick(e,t,n){const{year:i,month:r,date:a}=e,{clientX:o,clientY:s}=n;this.dateDblClickEmitter.emit({year:i,month:r,date:a,hour:t,mouseEventInfo:{clientX:o,clientY:s}})}}he([l()],ve.prototype,"viewMode",void 0),he([l()],ve.prototype,"timeLineRenderer",void 0),he([l()],ve.prototype,"timeMarkerRenderer",void 0),he([l()],ve.prototype,"dayViewTimedEventRenderer",void 0),he([l()],ve.prototype,"dayViewFullDayEventRenderer",void 0),he([l()],ve.prototype,"calendarView",void 0),he([l()],ve.prototype,"dateDblClickEmitter",void 0),he([l()],ve.prototype,"translationSlimmer",void 0),he([l()],ve.prototype,"isDateDisabled",void 0);class pe extends d{render(){const t=this.getTimeLineTitles();return e("div",{class:"time-line"},e("div",{class:"hour-empty"}),t.map(((t,n)=>e("div",{key:t},e("div",{class:"time-text","data-time":0===n?24:n},t)))))}getTimeLineTitles(){const e=[];if("12-hour"===this.timeFormat){e.push("12 AM");for(let t=1;t<12;t++)e.push(`${t} AM`);e.push("12 PM");for(let t=1;t<12;t++)e.push(`${t} PM`)}else for(let t=0;t<24;t++)e.push(`${R(t)}`);return e}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],pe.prototype,"timeFormat",void 0);var fe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class me extends d{constructor(){super(...arguments),this.monthViewGenerator=new X,this.weekViewGenerator=new K,this.dayViewGenerator=new _}initialCalendarView(){this.setCalendarView(this.getCalendarViewByPeriod(this.currentPeriod))}generateCalendarView(e){this.setCalendarView(this.getCalendarViewByPeriod(e))}getCalendarViewByPeriod(e){switch(e.type){case"week":return this.weekViewGenerator.generate(e);case"day":return this.dayViewGenerator.generate(e);default:return this.monthViewGenerator.generate(e)}}setCalendarView(e){this.calendarView=e}}fe([l({writable:!0})],me.prototype,"calendarView",void 0),fe([l()],me.prototype,"currentPeriod",void 0),fe([l()],me.prototype,"showWeekends",void 0),fe([l()],me.prototype,"currentPeriodController",void 0),fe([c("componentWillLoad")],me.prototype,"initialCalendarView",null),fe([c("watchCurrentPeriodChange")],me.prototype,"generateCalendarView",null);var we=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ue extends d{setCurrentPeriod(e){this.currentPeriod=e}updateCalendarPeriod(e,t){switch(e){case"month":this.setCurrentPeriod(new Z(t,this.showWeekends));break;case"week":this.setCurrentPeriod(new Q(t,this.showWeekends));break;case"day":t=!1===this.showWeekends?re(t):t,this.setCurrentPeriod(new J(t,this.showWeekends))}}initialCurrentPeriod(){this.updateCalendarPeriod(this.viewMode,q.from(new Date))}emitChangeEvent(e,t){e&&t&&e.startDate.equal(t.startDate)&&e.endDate.equal(t.endDate)||(e&&e.type!==this.viewMode&&(this.viewMode=e.type),this.changeEventEmitter.emit({viewMode:e.type,currentPeriod:this.getCurrentPeriodSummary()}))}updateCurrentPeriodByViewMode(e){this.currentPeriod&&e!==this.currentPeriod.type&&this.updateCalendarPeriod(e,this.currentPeriod.current)}updateCurrentPeriodAfterHideWeekEndsChange(){this.updateCalendarPeriod(this.viewMode,this.currentPeriod.current)}getCurrentPeriodSummary(){const{current:e,startDate:t,endDate:n}=this.currentPeriod;return{year:e.year,month:e.month,startDate:{date:t.date,month:t.month,year:t.year},endDate:{date:n.date,month:n.month,year:n.year}}}}we([l({writable:!0})],ue.prototype,"currentPeriod",void 0),we([l()],ue.prototype,"changeEventEmitter",void 0),we([l({writable:!0})],ue.prototype,"viewMode",void 0),we([l()],ue.prototype,"showWeekends",void 0),we([c("componentWillLoad")],ue.prototype,"initialCurrentPeriod",null),we([c("watchCurrentPeriodChange")],ue.prototype,"emitChangeEvent",null),we([c("watchViewModeChange")],ue.prototype,"updateCurrentPeriodByViewMode",null),we([c("watchShowWeekendsChange")],ue.prototype,"updateCurrentPeriodAfterHideWeekEndsChange",null);var ge=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class xe extends d{constructor(){super(...arguments),this.maxMonthDisplayEventsCount=2}getCurrentRowEvents(e){const t=[];return e.forEach((e=>{const n=this.calendarEventController.getCurrentDateEvents(e);t.push(n)})),this.fullDayEventLayoutRenderer.sortLongEvents(t)}filterRowDisplayEvents(e){const t=[];return e.forEach((e=>{const n=e.length>this.maxMonthDisplayEventsCount?e.slice(0,this.maxMonthDisplayEventsCount-1):e;t.push(n)})),this.hideTheCutOffEvents(e,t)}getMonthEventContainerRef(){return this.eventContainerRef}render(t,n,i,r){const a=n.slice(i.length).filter((e=>e)).length;return e("div",{class:"events-container",ref:e=>this.eventContainerRef=e},e("div",{class:"event-list"},this.fullDayEventLayoutRenderer.render(i,r)),this.renderMoreButton(n,a,`${t.date} ${te(t.toDate())} ${t.year}`))}addMaxDisplayCountChange(){m.addUniqueObserverToNode(this.host,E,(e=>{this.maxMonthDisplayEventsCount=e.detail,"month"===this.viewMode&&n(this.host)}))}renderMoreButton(t,n,i){if(n){const r=t.filter((e=>e&&(e.isAllDayEvent||e.isGroupEvent()))),a=t.filter((e=>e&&!e.isAllDayEvent&&!e.isGroupEvent()));return e("div",{class:"month-event-more"},e("vega-popover",{trigger:"click",placement:"right"},e("div",{tabIndex:0,slot:"popover-content",role:"button",class:"more-button",onKeyDown:z()},`${n} More`),e("vega-flex",{slot:"popover",direction:"col",gap:"0"},e("vega-font",{textAlign:"center",variant:"font-field-label",color:"text-primary",style:{padding:"4px 0",marginBottom:"8px"}},i),e("vega-flex",{direction:"col",gap:"size-4",style:{paddingBottom:a.length?"4px":"0px"}},r.map((e=>this.eventItemRenderer.render(e,{"month-event":!0,"calendar-event-large-size":!0,"calendar-event-in-popover":!0})))),a.map((e=>this.eventItemRenderer.render(e,{"month-event":!0,"calendar-event-large-size":!0,"calendar-event-in-popover":!0}))))))}}hideTheCutOffEvents(e,t){const n=[],i=[],r=t.map((e=>e[e.length-1])).filter((e=>e&&e.isGroupEvent()));return r.length&&r.forEach((n=>{e.filter((e=>e.includes(n))).length>t.filter((e=>e.includes(n))).length&&i.push(n)})),i.length?(t.forEach((e=>{e.length&&e[e.length-1]&&i.includes(e[e.length-1])?n.push(e.slice(0,e.length-1)):n.push(e)})),n):t}}ge([l()],xe.prototype,"viewMode",void 0),ge([l()],xe.prototype,"host",void 0),ge([l()],xe.prototype,"calendarEventController",void 0),ge([l()],xe.prototype,"eventItemRenderer",void 0),ge([l()],xe.prototype,"fullDayEventLayoutRenderer",void 0),ge([c("componentWillLoad")],xe.prototype,"addMaxDisplayCountChange",null);class be{constructor(e,t,n,i){this.repeatStartDate=e,this.interval=t,this.count=n,this.until=i}getRepeatSeries(e,t=1){return this.generateRepeatDateCacheUntilEndDate(e.endDate),this.cache.filter((n=>this.isSeriesInPeriod(n,t,e)))}isSeriesInPeriod(e,t,n){const i=e.toDate(),r=new Date(e.year,e.month-1,e.date+t-1),{startDate:a,endDate:o}=n,s=a.toDate(),l=o.toDate();return i>=s&&i<=l||r>=s&&r<=l||i<=s&&r>=l}}be.daySeconds=864e5;class ye extends be{constructor(e,t,n,i){super(e,t,n,i),this.initCache()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n.toDate()<e.toDate();){const e=this.getNextRepeatStartDate(n);if(e&&e.toDate()<=n.toDate()){this.cache.pop();break}if(n=e,"number"==typeof this.count&&this.cache.length>=this.count)break}}}initCache(){this.cache=[this.repeatStartDate]}getNextRepeatStartDate(e){const t=new Date(e.year,e.month-1,e.date+this.interval),n=q.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(n),n)}}class ke extends be{constructor(e,t,n,i){super(e,t,n,i),this.byMonthDay=this.repeatStartDate.date,this.initCache()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n.toDate()<e.toDate();){const e=this.getNextRepeatStartDate(n);if(e&&e.toDate()<=n.toDate()){this.cache.pop();break}if(n=e,"number"==typeof this.count&&this.cache.length>=this.count)break}}}initCache(){this.cache=[this.repeatStartDate]}getNextRepeatStartDate(e){const t=this.getNextStartDate(e.year,e.month-1+this.interval),n=q.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(n),n)}getNextStartDate(e,t){const n=new Date(e,t,this.byMonthDay);return n.getDate()===this.byMonthDay?n:this.getNextStartDate(e,t+1)}}class Ce extends be{constructor(e,t,n,i,r){super(e,t,n,i),this.byWeekDay=this.sortWeekDay(r),this.initCache()}getRepeatSeries(e,t=1){return this.generateRepeatDateCacheUntilEndDate(e.endDate),this.getValidCache().filter((n=>this.isSeriesInPeriod(n,t,e)))}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t[0].toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n[0].toDate()<e.toDate();){const e=this.getNextRepeatStartDate(n);if(e&&e[0]&&e[0].toDate()<=n[0].toDate()){this.cache.pop();break}if(n=e,"number"==typeof this.count&&this.getValidCache().length>=this.count)break}}}getNextRepeatStartDate(e){const t=this.getNextStartDates(e);if(0===t.length||"number"==typeof this.count&&this.getValidCache().length>=this.count)return null;{const e=t.map((e=>q.from(e)));return this.cache.push(e),e}}getNextStartDates(e){return e.map((e=>new Date(e.year,e.month-1,e.date+7*this.interval))).filter((e=>!this.until||e<=this.until.toDate()))}initCache(){const e=[],t=this.getCurrentDayIndex(this.repeatStartDate);this.byWeekDay.forEach((n=>{const i=Ce.weekDay.indexOf(n)-t,{year:r,month:a,date:o}=this.repeatStartDate,s=q.from(new Date(r,a-1,o+i));e.push(s)})),this.cache=[e]}sortWeekDay(e){return e&&e.length?e.map((e=>e.toLocaleLowerCase())).sort(((e,t)=>Ce.weekDay.indexOf(e)-Ce.weekDay.indexOf(t))):[Ce.weekDay[this.getCurrentDayIndex(this.repeatStartDate)]]}getCurrentDayIndex(e){return e.toDate().getDay()}getValidCache(){const e=I(this.cache.slice(1));return this.cache[0].filter((e=>e.toDate()>=this.repeatStartDate.toDate())).concat(e).slice(0,"number"==typeof this.count?this.count:void 0)}}Ce.weekDay=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map((e=>e.toLowerCase()));class Re extends be{constructor(e,t,n,i){super(e,t,n,i),this.matchDay=this.repeatStartDate.date,this.matchMonth=this.repeatStartDate.month,this.initCache()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n.toDate()<e.toDate();){const e=this.getNextRepeatStartDate(n);if(e&&e.toDate()<=n.toDate()){this.cache.pop();break}if(n=e,"number"==typeof this.count&&this.cache.length>=this.count)break}}}getNextRepeatStartDate(e){const t=this.getNextStartDate(e.year+this.interval),n=q.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(n),n)}getNextStartDate(e){const t=new Date(e,this.matchMonth-1,this.matchDay);return t.getDate()===this.matchDay&&t.getMonth()+1===this.matchMonth?t:this.getNextStartDate(e+1)}initCache(){this.cache=[this.repeatStartDate]}}const je=new class{getPattern(e,t){const n=q.from(e),{frequency:i,interval:r=1,byWeekDay:a,until:o,count:s}=t,l=this.initDate(o);return this.initRepeatPattern(i,n,r<1?1:r,s,l,a)}initDate(e){if(e&&"object"==typeof e)return q.from(e);if(e&&"string"==typeof e){const[t,n,i]=e.split("/");return new q(Number(i),Number(t),Number(n))}}initRepeatPattern(e,t,n,i,r,a){switch(e){case"daily":return new ye(t,n,i,r);case"weekly":return new Ce(t,n,i,r,a);case"monthly":return new ke(t,n,i,r);default:return new Re(t,n,i,r)}}},De=/^\d{1,2}\/\d{1,2}\/\d{4}/,Ee=/^\d{1,2}:\d{1,2}/;class ze{constructor(e,t){this._eventSpansDays=1,this.repeatPattern=null,this._event=e,this._eventKey=t||M(),this.checkEventRequireField(e),this.initDate(e),this.initEventSpansDays(),this.initRepeatPattern()}get event(){return this._event}get eventKey(){return this._eventKey}get title(){return this._event.title}get disabled(){return!!this._event.disabled}get variant(){return this._event.variant}get color(){return this._event.color}get isAllDayEvent(){return!!this._event.isAllDay}get isRepeatEvent(){return null!==this.repeatPattern}get startDate(){return this._startDate}get endDate(){return this._endDate}get startTime(){return this._startTime}get endTime(){return this._endTime}get eventSpansDays(){return this._eventSpansDays}copyTo(e,t){const n=this._eventSpansDays>1?new Date(t.year,t.month-1,t.date+(this._eventSpansDays-1)):t.toDate();return new ze(Object.assign(Object.assign({},this._event),{startDate:t.toDate(),endDate:n,startTime:this.startTime,endTime:this.endTime}),e)}isGroupEvent(){return this._eventSpansDays>1}isCurrentDayEvent(e){const{startDate:t,endDate:n}=this,i=q.from(t),r=q.from(new Date(n.getFullYear(),n.getMonth(),n.getDate()+1)),a=e.toDate();return i.toDate()<=a&&r.toDate()>a}getEventDuration(){const[e,t]=this.startTime.split(":"),[n,i]=this.endTime.split(":"),r=q.from(new Date),a=new Date(r.year,r.month,r.date,Number(e),Number(t));return(new Date(r.year,r.month,r.date,0===Number(n)&&0!==Number(e)?24:Number(n),Number(i)).valueOf()-a.valueOf())/6e4}getRepeatSeries(e){return this.repeatPattern?this.repeatPattern.getRepeatSeries(e,this._eventSpansDays):[]}convertTimeTo24Hour(e){if((e=e.toLocaleLowerCase()).indexOf("am")>0||e.indexOf("pm")>0){if(e.indexOf("am")>0){e=e.replace("am","").trim();const[t,n]=e.split(":");return`${"12"===t?"00":t}:${n}`}{e=e.replace("pm","").trim();const[t,n]=e.split(":");return`${"12"===t?"12":Number(t)+12}:${n}`}}return e}checkEventRequireField(e){const{title:t,startDate:n,endDate:i,startTime:r,endTime:a}=e;if(n&&"string"==typeof n&&!De.test(n)||i&&"string"==typeof i&&!De.test(i))throw new Error("Invalid calendar event item, the date format should be MM/DD/YYYY!");if(r&&"string"==typeof r&&!Ee.test(r)||a&&"string"==typeof a&&!Ee.test(a))throw new Error("Invalid calendar event item, the time format should be HH:mm!");if(!t||!n||!i&&!a)throw new Error("Invalid calendar event item, the required field should not empty!")}initDate(e){const{startDate:t,startTime:n,endDate:i,endTime:r}=e;if(t&&"object"==typeof t)this._startDate=t;else if(t&&"string"==typeof t){const[e,n,i]=t.split("/");this._startDate=new Date(Number(i),Number(e)-1,Number(n))}if(this._startTime=n?this.convertTimeTo24Hour(n):`${this._startDate.getHours()}:${this._startDate.getMinutes()}`,i&&"object"==typeof i)this._endDate=i;else if(i&&"string"==typeof i){const[e,t,n]=i.split("/");this._endDate=new Date(Number(n),Number(e)-1,Number(t),23,59,59)}else this._endDate=new Date(this._startDate.getFullYear(),this._startDate.getMonth(),this._startDate.getDate(),23,59,59);this._endTime=r?this.convertTimeTo24Hour(r):`${this._endDate.getHours()}:${this._endDate.getMinutes()}`}initRepeatPattern(){this._event.repeatOptions&&this._event.repeatOptions.frequency&&(this.repeatPattern=je.getPattern(this._startDate,this._event.repeatOptions))}initEventSpansDays(){const e=q.from(this.startDate),t=q.from(this.endDate);this._eventSpansDays=(t.toDate().valueOf()-e.toDate().valueOf())/864e5+1}}var Ie=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Me extends d{constructor(){super(...arguments),this.repeatEventMap=new Map}getCurrentDateEvents(e){return this.createRepeatEvents().filter((t=>t.isCurrentDayEvent(e)))}updateAfterEventChange(e){this.initCalendarEvents(e),this.repeatEventMap.clear()}updateWhenComponentWillLoad(){this.initCalendarEvents(this.events)}initCalendarEvents(e){const t=[];e&&e.forEach((e=>{try{const n=new ze(e);t.push(n)}catch(t){h.warn("Invalid calendar event item:",e)}})),this.calendarEvents=t}createRepeatEvents(){const e=[],t=[];return this.calendarEvents.forEach((n=>{n.isRepeatEvent?n.getRepeatSeries(this.currentPeriod).forEach((e=>{t.push(this.generateCalendarEventByRepeatSeries(n,e))})):e.push(n)})),t.concat(e)}generateCalendarEventByRepeatSeries(e,t){const n=`${e.eventKey}-${t.year}${t.month}${t.date}`;if(this.repeatEventMap.has(n))return this.repeatEventMap.get(n);{const i=e.copyTo(n,t);return this.repeatEventMap.set(n,i),i}}}Ie([l({writable:!0})],Me.prototype,"calendarEvents",void 0),Ie([l()],Me.prototype,"currentPeriod",void 0),Ie([l()],Me.prototype,"events",void 0),Ie([c("watchEventsChange")],Me.prototype,"updateAfterEventChange",null),Ie([c("componentWillLoad")],Me.prototype,"updateWhenComponentWillLoad",null);var Se=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Te extends d{render(t,n){return e("vega-calendar-event",{"data-calendar-ref":this.host,key:t.eventKey,calendarEvent:t,class:n,onKeyDown:z(),onClick:()=>this.handleEventClick(t)},!t.isRepeatEvent&&e("slot",{name:ie(t.event.key)}))}handleEventClick(e){this.eventClickEmitter.emit({rawEvent:e.event})}}Te.backgroundColorModeEventHeight=18,Se([l()],Te.prototype,"host",void 0),Se([l()],Te.prototype,"calendarView",void 0),Se([l()],Te.prototype,"eventClickEmitter",void 0);var Oe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Ve extends S{constructor(){super({target:()=>this.host,callback:()=>this.updateMaxDisplayCountWithDebounce()}),this.updateMaxDisplayCountWithDebounce=T(this.updateMaxDisplayCount,500,this)}updateMaxDisplayCount(){try{const e=this.monthEventRenderer.getMonthEventContainerRef();if("month"===this.viewMode&&e&&e.parentElement){const t=e.parentElement.getBoundingClientRect().height,n=Math.floor((t-Ve.monthDateTitleHeight)/Te.backgroundColorModeEventHeight);O.notify(x.getSubject(this.host,E),{host:this.host,detail:n})}}catch(e){}}updateMaxDisplayCountAfterSwitchToMonthView(e){"month"===e&&this.updateMaxDisplayCountWithDebounce()}}Ve.monthDateTitleHeight=26,Oe([l()],Ve.prototype,"host",void 0),Oe([l()],Ve.prototype,"monthEventRenderer",void 0),Oe([l()],Ve.prototype,"viewMode",void 0),Oe([c("componentDidLoad")],Ve.prototype,"updateMaxDisplayCount",null),Oe([c("watchViewModeChange")],Ve.prototype,"updateMaxDisplayCountAfterSwitchToMonthView",null);var $e=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Pe extends d{render(){const t=this.calendarView.dateItems[0],n=t.map((e=>this.calendarEventController.getCurrentDateEvents(e).filter((e=>e.isAllDayEvent||e.isGroupEvent())))),i=this.fullDayEventLayoutRenderer.sortLongEvents(n),r=this.filterDisplayEvents(i);return e("div",{class:"calendar-view-event-all"},t.map(((t,n)=>e("div",{class:"event-all-col border-divider-left",key:t.date},this.renderCurrentFullDayEvents(r[n],n,i[n])))))}renderCurrentFullDayEvents(n,i,r){const a=n.length*Te.backgroundColorModeEventHeight-2,o=r.slice(n.length).filter(Boolean).length;return e(t,null,e("div",{class:"placeholder-block",style:{height:a+"px"}},e("span",null,n.length," events")),this.fullDayEventLayoutRenderer.render(n,i),o>0&&this.dayViewFullDayEventMoreButtonRenderer.render(o))}filterDisplayEvents(e){if(this.showAllEventsInDayOrWeekView)return e;{const t=[],n=Pe.maxDisplayEventLength;return e.forEach((e=>{const i=e.length>n?e.slice(0,n):e;t.push(i)})),t}}}Pe.maxDisplayEventLength=2,$e([l()],Pe.prototype,"calendarView",void 0),$e([l()],Pe.prototype,"calendarEventController",void 0),$e([l()],Pe.prototype,"eventItemRenderer",void 0),$e([l()],Pe.prototype,"fullDayEventLayoutRenderer",void 0),$e([l()],Pe.prototype,"showAllEventsInDayOrWeekView",void 0),$e([l()],Pe.prototype,"dayViewFullDayEventMoreButtonRenderer",void 0);class Be extends d{render(t){const n=[];return t.eventLayoutCells.forEach(((i,r)=>{let a=i.getEventBySlotIndex(0),o=0;for(let s=0;s<Be.totalNumberOfCells;s++){const l=i.getEventBySlotIndex(s);l!==a&&(a&&n.push(e("div",{key:r,class:"time-event-block",style:this.getTimeEventStyle(o,s,r,t.getEventColumnsSpannedCount(a))},this.eventItemRenderer.render(a,{"day-event":!0,"bg-shadow":r>0}))),a=l,o=s)}})),n}getTimeEventStyle(e,t,n,i){const r=n*(1/i);return{position:"absolute",left:100*r+"%",top:100/Be.totalNumberOfCells*e+"%",width:`calc(100% - ${100*r}%)`,height:100/Be.totalNumberOfCells*(t-e)+"%",zIndex:n>0?`${n}`:void 0}}}Be.totalNumberOfCells=96,function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],Be.prototype,"eventItemRenderer",void 0);class Ne{addCurrentEventToLayout(e,t){let n=e.find((e=>!e.hasOverlapEvent(t)));n?n.updateSlots(t):(n=this.createNewLayoutCell(),n.updateSlots(t),e.push(n))}}class Le{get eventLayoutCells(){return this.cells}}class Ae extends Le{constructor(e){super(),this.cells=e}getEventColumnsSpannedCount(e){const t=this.cells.findIndex((t=>t.getEventStartIndex(e)>=0));let n=t+1;return t<this.cells.length-1&&this.cells.slice(t+1).forEach((t=>{t.hasOverlapEvent(e)&&n++})),n}}class Fe{getEventBySlotIndex(e){return this.slots[e]}getEventStartIndex(e){return this.slots.findIndex((t=>t===e))}getEventEndIndex(e){const t=this.getEventStartIndex(e);let n=t;if(t>=0)for(let i=t+1;i<this.slots.length;i++){if(this.slots[i]!==e){n=i-1;break}i===this.slots.length-1&&(n=i)}return n}}class We extends Fe{constructor(){super(...arguments),this.slots=We.defaultSlots}hasOverlapEvent(e){const[t,n]=this.getIndexRangeFromEvent(e);let i=!1;for(let e=t;e<n;e++)if(this.slots[e]){i=!0;break}return i}updateSlots(e){const[t,n]=this.getIndexRangeFromEvent(e);n>t&&(this.slots=this.slots.slice(0,t).concat(Array(n-t).fill(e),this.slots.slice(n)))}getIndexRangeFromEvent(e){const{startTime:t,endTime:n}=e;return[ne(t),ne(n)]}}We.defaultSlots=Array(96).fill(null);class He extends Ne{generate(e){const t=[new We];return e.forEach((e=>{this.addCurrentEventToLayout(t,e)})),new Ae(t)}createNewLayoutCell(){return new We}}class Ue{sort(e,t,n){const i=[],r=[],a=[];for(let t=0;t<e.length;t++){const n=e[t];n&&(n.isGroupEvent()?r.push(n):n.isAllDayEvent?i.push(n):a.push(n))}let o=i.concat(this.sortCalendarEventByTime(a)),s=n.getEventsByIndex(t);const l=s.filter((e=>e));if(o=r.filter((e=>l.findIndex((t=>t===e))<0)).concat(o),s.length>l.length){const e=o.slice(0,s.length-l.length);o=o.slice(s.length-l.length),s=this.insertEventsToEmptyPosition(s,e)}return o=s.concat(o),o}sortCalendarEventByTime(e){return e.sort(((e,t)=>{const n=ne(e.startTime),i=ne(t.startTime);return n===i?ne(t.endTime)-ne(e.endTime):n-i}))}insertEventsToEmptyPosition(e,t){return e.map((e=>{if(t.length&&!e){const e=t[0];return t=t.slice(1),e}return e}))}}var Ye=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class _e extends d{constructor(){super(...arguments),this.calendarEventSorter=new Ue,this.dayViewTimedEventLayoutGenerator=new He}render(){return e("div",{class:"day-event-container"},this.calendarView.dateItems[0].map((t=>e("div",{key:`${t.month}-${t.date}`,class:"day-event-col"},this.renderTimedEvents(t)))))}renderTimedEvents(e){const t=this.calendarEventController.getCurrentDateEvents(e).filter((e=>!e.isAllDayEvent&&!e.isGroupEvent())),n=this.calendarEventSorter.sortCalendarEventByTime(t),i=this.dayViewTimedEventLayoutGenerator.generate(n);return this.dayViewEventLayoutRenderer.render(i)}}Ye([l()],_e.prototype,"calendarView",void 0),Ye([l()],_e.prototype,"calendarEventController",void 0),Ye([l()],_e.prototype,"dayViewEventLayoutRenderer",void 0);class qe extends Le{constructor(e){super(),this.cells=e}getEventRowsIndex(e){return this.cells.findIndex((t=>t.getEventStartIndex(e)>=0))}getEventsByIndex(e){const t=[];let n=0;return this.cells.forEach(((i,r)=>{const a=i.getEventBySlotIndex(e);t.push(a),a&&(n=r)})),t.slice(0,n+1)}}class Ke extends Fe{constructor(){super(...arguments),this.slots=Ke.defaultSlots}updateSlots(e){const{start:t,end:n}=e;this.slots=this.slots.slice(0,t).concat(Array(n-t+1).fill(e.event),this.slots.slice(n+1))}hasOverlapEvent(e){const{start:t,end:n}=e;let i=!1;for(let e=t;e<n+1;e++)if(this.slots[e]){i=!0;break}return i}}Ke.defaultSlots=Array(7).fill(null);class Xe extends Ne{generate(e){const t=this.collectAllShouldOrderLongEvents(e),n=[this.createNewLayoutCell()];return t.forEach((e=>{this.addCurrentEventToLayout(n,e)})),new qe(n)}createNewLayoutCell(){return new Ke}collectAllShouldOrderLongEvents(e){const t={};e.forEach(((e,n)=>{e.filter((e=>e&&e.isGroupEvent())).forEach((e=>{t[e.eventKey]=t[e.eventKey]?Object.assign(Object.assign({},t[e.eventKey]),{end:n,start:n-t[e.eventKey].end!=1?n:t[e.eventKey].start}):{start:n,end:n,event:e}}))}));const n=Object.values(t);return this.sortLongEventViews(n)}sortLongEventViews(e){return e.sort(((e,t)=>{const{startDate:n,endDate:i}=e.event,{startDate:r,endDate:a}=t.event;n.setHours(0,0,0),r.setHours(0,0,0),i.setHours(23,59,59),a.setHours(23,59,59);const o=a.valueOf()-r.valueOf()-(i.valueOf()-n.valueOf());return n.valueOf()!==r.valueOf()?n.valueOf()-r.valueOf():o}))}}var Ge=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Je extends d{constructor(){super(...arguments),this.longEventLayoutGenerator=new Xe,this.calendarEventSorter=new Ue}sortLongEvents(e){return this.fullDayEventLayout=this.longEventLayoutGenerator.generate(e),e.map(((e,t)=>this.calendarEventSorter.sort(e,t,this.fullDayEventLayout)))}render(t,n){return t.map(((t,i)=>{if(t)return e("div",{key:t.eventKey,class:"month"===this.viewMode?"month-event-block":"day-event-block",style:this.getEventStyle(t,n,i,"month"===this.viewMode?Je.monthViewEventOffsetTop:0)},this.eventItemRenderer.render(t,{"month-event":"month"===this.viewMode,"day-event":"month"!==this.viewMode}))}))}getEventStyle(e,t,n,i){const r=this.calendarView.weekdays.length,a=t;let o=t+1;const s=n;let l=!0;const d=this.fullDayEventLayout.getEventRowsIndex(e);if(d>=0){const n=this.fullDayEventLayout.eventLayoutCells[d].getEventStartIndex(e),i=this.fullDayEventLayout.eventLayoutCells[d].getEventEndIndex(e);n===t?o=i+1:l=!1}return{position:"absolute",left:100/r*a+"%",top:`${s*Te.backgroundColorModeEventHeight+i}px`,width:100/r*(o-a)+"%",opacity:l?"1":"0"}}}Je.monthViewEventOffsetTop=26,Ge([l()],Je.prototype,"eventItemRenderer",void 0),Ge([l()],Je.prototype,"viewMode",void 0),Ge([l()],Je.prototype,"calendarView",void 0);var Qe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Ze extends d{constructor(){super(...arguments),this.updateShowAllFlag=e=>{e.stopPropagation(),this.showAllEventsInDayOrWeekView=!0}}render(t){if(!this.showAllEventsInDayOrWeekView)return e("div",{tabIndex:0,role:"button",class:"more-button",onKeyDown:z(),onClick:this.updateShowAllFlag},`${t} More`)}resetShowAllFlag(){this.showAllEventsInDayOrWeekView=!1}}Qe([l({writable:!0})],Ze.prototype,"showAllEventsInDayOrWeekView",void 0),Qe([c("watchViewModeChange")],Ze.prototype,"resetShowAllFlag",null);var et=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class tt extends d{render(t){const n=t.findIndex((e=>e.isToday()))>=0;return e("div",{class:{"time-marker-container":!0,hidden:!n}},e("div",{class:"time-marker",style:{top:this.getTimeMarkerPosition()},ref:e=>this.timeMarkerRef=e},t.map((t=>e("div",{key:t.date,class:{active:t.isToday()}})))))}updateTimeLine(e){this.scrollToTargetTimeBlock(e),this.syncTimeMarkerPosition(e)}clearTimer(){clearInterval(this.timeMarkerPositionTimer)}updateTimeLineIfComponentAddBack(){this.syncTimeMarkerPosition(this.viewMode)}displayCurrentTimeBlockByDefault(){this.scrollToTargetTimeBlock(this.viewMode)}getTimeMarkerPosition(){const e=new Date;return(60*e.getHours()+e.getMinutes())/1440*100+"%"}syncTimeMarkerPosition(e){clearInterval(this.timeMarkerPositionTimer),"month"!==e&&(this.timeMarkerPositionTimer=setInterval((()=>{this.timeMarkerRef&&(this.timeMarkerRef.style.top=this.getTimeMarkerPosition())}),6e4))}scrollToTargetTimeBlock(e){"month"!==e&&setTimeout((()=>{const e=this.viewRenderer.getCalendarViewElementRef(),t=Math.max(0,this.getViewCenterPosition());e&&t&&e.scrollTo({top:t})}),16)}getViewCenterPosition(){const e=this.viewRenderer.getCalendarViewElementRef();if(e){const t=e.querySelector(".calendar-view-title-container").offsetHeight,n=Math.max(e.offsetHeight-t,0)/2,i=e.scrollHeight,r=16,a=Number(this.getTimeMarkerPosition().replace("%",""))/100*Math.max(i-r-t,0);if(!isNaN(n)&&a&&a>n)return a-n+r}return 0}}et([l()],tt.prototype,"viewMode",void 0),et([l()],tt.prototype,"viewRenderer",void 0),et([c("watchViewModeChange")],tt.prototype,"updateTimeLine",null),et([c("disconnectedCallback")],tt.prototype,"clearTimer",null),et([c("connectedCallback")],tt.prototype,"updateTimeLineIfComponentAddBack",null),et([c("componentDidLoad")],tt.prototype,"displayCurrentTimeBlockByDefault",null);var nt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const it=class{constructor(e){i(this,e),this.vegaChange=r(this,"vegaChange",7),this.change=r(this,"change",7),this.vegaEventClick=r(this,"vegaEventClick",7),this.eventClick=r(this,"eventClick",7),this.vegaDateDblClick=r(this,"vegaDateDblClick",7),this.dateDblClick=r(this,"dateDblClick",7),this.vegaMoreActionClick=r(this,"vegaMoreActionClick",7),this.moreActionClick=r(this,"moreActionClick",7),this.globalSlimmer={},this.translationSlimmer=new $,this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.renderer=new W,this.switchPanelRenderer=new oe,this.viewRenderer=new le,this.monthViewRenderer=new ce,this.viewWithTimeRenderer=new ve,this.timeLineRenderer=new pe,this.timeMarkerRenderer=new tt,this.monthEventRenderer=new xe,this.currentPeriodController=new ue,this.calendarViewController=new me,this.dayViewFullDayEventRenderer=new Pe,this.dayViewFullDayEventMoreButtonRenderer=new Ze,this.dayViewTimedEventRenderer=new _e,this.eventItemRenderer=new Te,this.dayViewEventLayoutRenderer=new Be,this.fullDayEventLayoutRenderer=new Je,this.calendarEventController=new Me,this.eventResponsiveController=new Ve,this.changeEventEmitter=j(it,u),this.eventClickEmitter=j(it,b),this.dateDblClickEmitter=j(it,y),this.moreActionClickEmitter=j(it,k),this.changeEventPrevent=new D([u],(()=>this.switchPanelRenderer.getSwitchPanelRef())),this.timeFormatNotifySlimmer=V(it,"timeFormat","watchTimeFormat"),this.showEventColorBarNotifySlimmer=V(it,"showEventColorBar","watchShowEventColorBar"),this.showAllEventsInDayOrWeekView=!1,this.calendarEvents=[],this.viewMode="month",this.timeFormat="24-hour",this.isDateDisabled=()=>!1,this.showEventColorBar=!0,this.showWeekends=!0}watchCurrentPeriodChange(e,t){}watchViewModeChange(e){}watchEventsChange(e){}watchTimeFormat(e){}watchShowEventColorBar(e){}watchShowWeekendsChange(){}render(){return s(e(a,null,this.renderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{currentPeriod:["watchCurrentPeriodChange"],viewMode:["watchViewModeChange"],events:["watchEventsChange"],timeFormat:["watchTimeFormat"],showEventColorBar:["watchShowEventColorBar"],showWeekends:["watchShowWeekendsChange"]}}};nt([f()],it.prototype,"globalSlimmer",void 0),nt([v()],it.prototype,"translationSlimmer",void 0),nt([v()],it.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),nt([v()],it.prototype,"renderer",void 0),nt([v()],it.prototype,"switchPanelRenderer",void 0),nt([v()],it.prototype,"viewRenderer",void 0),nt([v()],it.prototype,"monthViewRenderer",void 0),nt([v()],it.prototype,"viewWithTimeRenderer",void 0),nt([v()],it.prototype,"timeLineRenderer",void 0),nt([v()],it.prototype,"timeMarkerRenderer",void 0),nt([v()],it.prototype,"monthEventRenderer",void 0),nt([v()],it.prototype,"currentPeriodController",void 0),nt([v()],it.prototype,"calendarViewController",void 0),nt([v()],it.prototype,"dayViewFullDayEventRenderer",void 0),nt([v()],it.prototype,"dayViewFullDayEventMoreButtonRenderer",void 0),nt([v()],it.prototype,"dayViewTimedEventRenderer",void 0),nt([v()],it.prototype,"eventItemRenderer",void 0),nt([v()],it.prototype,"dayViewEventLayoutRenderer",void 0),nt([v()],it.prototype,"fullDayEventLayoutRenderer",void 0),nt([v()],it.prototype,"calendarEventController",void 0),nt([v()],it.prototype,"eventResponsiveController",void 0),nt([v()],it.prototype,"changeEventEmitter",void 0),nt([v()],it.prototype,"eventClickEmitter",void 0),nt([v()],it.prototype,"dateDblClickEmitter",void 0),nt([v()],it.prototype,"moreActionClickEmitter",void 0),nt([v()],it.prototype,"changeEventPrevent",void 0),nt([v()],it.prototype,"timeFormatNotifySlimmer",void 0),nt([v()],it.prototype,"showEventColorBarNotifySlimmer",void 0),it.style='.border-divider-top{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-left-width:0px;border-right-width:0px;border-bottom-width:0px}.border-divider-top.disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.border-divider-left{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-right-width:0px;border-bottom-width:0px}.border-divider-left.disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.border-divider-right{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-left-width:0px;border-bottom-width:0px}.border-divider-bottom{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-left-width:0px;border-right-width:0px}:host{display:flex;flex-direction:column;border-radius:12px;border:1px solid rgba(var(--v-border-divider, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));overflow:hidden;width:100%;height:100%;box-sizing:border-box;max-height:1966px}.calendar-switch-panel{padding:24px;border-bottom-width:1px;border-top-width:0px;border-left-width:0px;border-right-width:0px;border-style:solid;border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));flex-shrink:0;width:100%;box-sizing:border-box}.calendar-switch-panel .calendar-date-switch-container{display:flex;gap:8px;align-items:center;flex-direction:row}.calendar-switch-panel .calendar-view-switch-container{display:flex;gap:16px;align-items:center;flex-direction:row}.calendar-switch-panel .calendar-current-date{padding-left:8px}.calendar-view{width:100%;position:relative;flex-grow:1;overflow-y:auto;overflow-x:hidden;--calendar-weekday-columns:7}.calendar-view.calendar-hide-weekends{--calendar-weekday-columns:5}.calendar-view-month .calendar-view-month-container{width:100%;display:grid;min-height:100%;grid-template-rows:43px repeat(6, minmax(64px, 1fr))}.calendar-view-month .calendar-view-title{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));top:0;left:0;z-index:62}.calendar-view-month .calendar-view-title div{padding-top:12px;padding-bottom:12px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;text-align:center}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.calendar-view-month .calendar-view-row{position:relative;display:grid;grid-template-rows:1fr;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-month .calendar-view-row.calendar-view-title{position:sticky}.calendar-view-month .calendar-view-row:last-child{border-bottom-width:0px}.calendar-view-month .calendar-view-row .row-cell{overflow:hidden;display:flex;flex-direction:column;justify-content:space-between}.calendar-view-month .calendar-view-row .row-cell:last-child{border-right-width:0px}.calendar-view-month .calendar-view-row .row-cell .date{padding-top:4px;padding-bottom:4px;padding-right:12px;padding-left:8px}.calendar-view-month .calendar-view-row .row-cell .date>div{display:inline-block;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.calendar-view-month .calendar-view-row .row-cell .date .month-block{margin-right:2px}.calendar-view-month .calendar-view-row .row-cell .date .grid-col{text-align:center;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;cursor:pointer;width:18px;height:18px;line-height:18px}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:hover{background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1))}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:active{background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.calendar-view-month .calendar-view-row .row-cell.current-month-day .date>div{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}.calendar-view-month .calendar-view-row .row-cell.disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.calendar-view-month .calendar-view-row .row-cell.disabled .date>div{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));border-top-left-radius:9999px;border-bottom-left-radius:9999px;color:rgba(var(--v-text-on-action, 252, 252, 252, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.calendar-view-container{width:100%}.calendar-view-container .calendar-view-title-container{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));position:sticky;top:0;left:0;z-index:62}.calendar-view-container .calendar-view-row{box-sizing:border-box;width:100%;display:flex;flex-direction:row}.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{width:72px;text-align:right;padding-right:8px;box-sizing:border-box;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));flex-shrink:0}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.calendar-view-container .calendar-view-title{width:100%}.calendar-view-container .calendar-view-title>div{padding:12px;padding-bottom:8px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;text-align:center;display:flex;flex-direction:column;gap:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.calendar-view-container .calendar-view-title .week-day{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}.calendar-view-container .calendar-view-title .active div{color:rgba(var(--v-text-link, 19, 98, 226, 1))}.calendar-view-container .calendar-view-event-all-container{align-items:center}.calendar-view-container .calendar-view-event-all{display:grid;grid-template-rows:1fr;flex-grow:1;min-height:18px}.calendar-view-container .calendar-view-day-container .time-line{display:grid;grid-template-rows:16px repeat(24, minmax(74px, 1fr))}.calendar-view-container .calendar-view-day-container .time-line .time-text{margin-top:-9px}.calendar-view-container .calendar-view-day-container .calendar-view-content{width:100%}.calendar-view-container .calendar-view-day-container .calendar-view-content .grid-col{display:grid;grid-template-rows:16px repeat(24, minmax(74px, 1fr));grid-template-columns:minmax(64px, 1fr)}.calendar-view-container .calendar-view-day-container .calendar-view-content .grid-col>.border-divider-top:first-child{border-top-width:0px}.calendar-view-container .calendar-view-content-container{width:100%;position:relative}.calendar-view-week .calendar-view-container{min-height:100%}.calendar-view-week .calendar-view-container .calendar-view-title{display:grid;grid-template-rows:1fr;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .calendar-view-container .calendar-view-event-all{grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .calendar-view-container .calendar-view-day-container .calendar-view-content{display:grid;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .time-marker-container .time-marker{display:grid;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .day-event-container{display:grid;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-day .calendar-view-container{min-height:100%}.time-marker-container{position:absolute;min-width:100%;left:0;top:16px;height:calc(100% - 16px);pointer-events:none}.time-marker-container.hidden{display:none}.time-marker-container .time-marker{position:absolute;height:2px;display:grid;min-width:100%;left:0;top:0;z-index:61}.time-marker-container .time-marker div{width:100%;height:2px;background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));opacity:0.3}.time-marker-container .time-marker div.active{opacity:1;position:relative}.time-marker-container .time-marker div.active::before{content:"";display:block;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;position:absolute;width:8px;height:8px;background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));top:-3px;left:-4px}.day-event-container{position:absolute;min-width:100%;left:0;top:16px;height:calc(100% - 16px);pointer-events:none}.day-event-container .day-event-col{height:100%;overflow:hidden}.day-event-container vega-calendar-event{pointer-events:auto;height:100%}.calendar-view-month .month-event-row{position:absolute;width:100%;overflow:hidden;height:calc(100% - 26px);left:0;bottom:0}.calendar-view-month .events-container{width:100%;box-sizing:border-box;overflow:hidden;padding:2px;display:flex;flex-direction:column;gap:2px;justify-content:space-between;flex-grow:1}.calendar-view-month .events-container .event-list{display:flex;flex-direction:column;gap:2px;flex-grow:1}.calendar-view-month .events-container .event-list .month-event-block{box-sizing:border-box;padding-left:2px;padding-right:3px}.calendar-view-month .events-container .month-event-more .more-button{display:inline-block;height:16px;font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1));cursor:pointer;border-radius:2px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}.calendar-view-month .events-container .month-event-more .more-button:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}.calendar-view-container .calendar-view-event-all{position:relative}.calendar-view-container .calendar-view-event-all .placeholder-block{padding-top:2px;padding-bottom:2px;box-sizing:content-box}.calendar-view-container .calendar-view-event-all .placeholder-block span{display:none}.calendar-view-container .calendar-view-event-all .day-event-block{padding-top:2px;padding-right:2px;box-sizing:border-box;padding-left:3px}.calendar-view-container .calendar-view-event-all .more-button{display:inline-block;height:16px;font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1));cursor:pointer;border-radius:2px;margin-left:2px;padding:2px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}.calendar-view-container .calendar-view-event-all .more-button:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}.calendar-view-container .calendar-view-event-all .event-all-col{display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start}.calendar-view-container .day-event-col{position:relative}.calendar-view-container .day-event-col .time-event-block{box-sizing:border-box;padding-right:8px;padding-bottom:2px;padding-top:3px}.calendar-view-container .day-event-col .time-event-block vega-calendar-event.bg-shadow::part(event-container):not(:focus){outline:2px solid rgba(var(--v-bg-primary, 252, 252, 252, 1))}.calendar-view-container .day-event-col .time-event-block:focus-within{z-index:60 !important}.calendar-event-slot-container{display:none}';var rt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class at extends d{getEventTitleContainerRef(){return this.eventTitleContainerRef}getSlotContainerRef(){return this.slotContainerRef}render(){return e(t,null,this.injectBackgroundColorStyle(),this.calendarEventRender())}calendarEventRender(){return this.calendarEvent.isAllDayEvent||this.calendarEvent.isGroupEvent()?this.renderBackgroundModeEvent():this.renderNormalEvent()}renderBackgroundModeEvent(){const t=this.calendarEvent.disabled;return e("div",{role:"button",tabIndex:0,class:{"slot-container":this.slotMode,"background-color-mode":!0,"event-bg-color":!t,"bg-disabled":t},ref:e=>this.slotContainerRef=e},this.slotMode?this.getSlotElement():this.calendarEvent.title)}renderNormalEvent(){const{variant:t,disabled:n}=this.calendarEvent,i=t||"primary",r=!this.host.classList.contains("day-event"),a={"slot-container":this.slotMode,"event-container":!0,disabled:n,[i]:!0};if(r)return e("div",{role:"button",tabIndex:0,class:a,ref:e=>this.slotContainerRef=e},!this.slotMode&&this.renderEventStatus(),this.slotMode?this.getSlotElement():this.defaultNormalMonthEventContentRender());{const t=this.calendarEvent.getEventDuration();return e("div",{part:"event-container",class:Object.assign(Object.assign({},a),{vertical:t>30,"duration-half-an-hour":30===t,"event-bg-color":!n,"bg-disabled":n}),role:"button",tabIndex:0,ref:e=>this.slotContainerRef=e},!this.slotMode&&this.renderEventStatus(),e("div",{class:"cover-block"}),this.slotMode?this.getSlotElement():this.defaultNormalTimedEventContentRender(t))}}renderEventStatus(){if(this.showColorBar){const t=this.calendarEvent.disabled;return e("div",{class:{"event-status":!0,"event-bg-color":!t,"bg-disabled":t}},e("span",{class:{stripe:"secondary"===this.calendarEvent.variant}}))}}defaultNormalMonthEventContentRender(){const{startTime:t,title:n}=this.calendarEvent;return e("div",{class:"event-title"},`${this.formatDisplayTime(t)} ${n}`)}defaultNormalTimedEventContentRender(t){const{startTime:n,endTime:i,title:r}=this.calendarEvent;return e("div",{class:"event-content"},e("div",{class:{"event-title":!0,"title-word-wrap":t>30},ref:e=>this.eventTitleContainerRef=e},r),e("div",{class:"event-time"},e("vega-icon",{size:"size-12",icon:C.getIconKey("clock-three")}),e("span",null,`${this.formatDisplayTime(n)} - ${this.formatDisplayTime(i)}`)))}getSlotElement(){if(!this.calendarEvent.isRepeatEvent)return e("slot",null)}injectBackgroundColorStyle(){return e("style",null,this.colorController.getBackgroundColorStyle())}formatDisplayTime(e){const[t,n]=e.split(":");if("24-hour"===this.timeFormat)return`${t.padStart(2,"0")}:${n.padStart(2,"0")}`;{const e=Number(t),i=e>=12?"pm":"am",r=n.padStart(2,"0");return e>12?`${e-12}:${r} pm`:0===e?`12:${r} am`:`${e}:${r} ${i}`}}}C.register({"clock-three":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 13.3 10.7 24 24 24H360c13.3 0 24-10.7 24-24s-10.7-24-24-24H280V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"/></svg>'}}),rt([l()],at.prototype,"host",void 0),rt([l()],at.prototype,"timeFormat",void 0),rt([l()],at.prototype,"calendarEvent",void 0),rt([l()],at.prototype,"slotMode",void 0),rt([l()],at.prototype,"showColorBar",void 0),rt([l()],at.prototype,"colorController",void 0);class ot extends d{getBackgroundColorStyle(){const e=this.calendarEvent.color||"bg-accent6-primary";return B(e)?`.event-bg-color{${N.formatToken(e)}}`:`.event-bg-color{background-color:${e}}`}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],ot.prototype,"calendarEvent",void 0);var st=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class lt extends L{constructor(){super({parent:()=>this.host["data-calendar-ref"],subStates:[{subStateName:"timeFormat",parentStateName:"timeFormat"},{subStateName:"showColorBar",parentStateName:"showEventColorBar"}]})}}st([l({writable:!0})],lt.prototype,"timeFormat",void 0),st([l({writable:!0})],lt.prototype,"showColorBar",void 0);class dt extends d{setVerticalTitleMaxHeight(){const e=this.renderer.getEventTitleContainerRef();if(e&&e.classList.contains("title-word-wrap")){const t=window.getComputedStyle(e),n=A(t.height),i=A(t.lineHeight),r=Math.max(Math.floor(n/i),1);e.style.maxHeight=r*i+"px"}}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],dt.prototype,"renderer",void 0);var ct=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ht extends d{findTheCalendarEventSlot(){if(this.calendarEvent){const{event:e}=this.calendarEvent,t=this.getParentCalendarElement();if(t){const n=t.querySelector(`vega-calendar-event-slot[event-key='${e.key}']`);n&&(this.slotMode=!0,this.matchSlotElement=n)}}}appendTheRepeatEventSlotToContainer(){const e=this.renderer.getSlotContainerRef();if(this.slotMode&&e&&this.matchSlotElement&&(this.calendarEvent.isRepeatEvent||this.isPopoverContent())){const t=this.matchSlotElement.cloneNode(!0);t.removeAttribute("slot"),e.querySelector("vega-calendar-event-slot")||e.appendChild(t)}}getParentCalendarElement(){return this.host["data-calendar-ref"]}isPopoverContent(){return this.host.classList.contains("calendar-event-in-popover")}}ct([l()],ht.prototype,"host",void 0),ct([l()],ht.prototype,"calendarEvent",void 0),ct([l({writable:!0})],ht.prototype,"slotMode",void 0),ct([l()],ht.prototype,"renderer",void 0),ct([c("componentWillLoad")],ht.prototype,"findTheCalendarEventSlot",null),ct([c("componentDidLoad")],ht.prototype,"appendTheRepeatEventSlotToContainer",null);var vt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const pt=class{constructor(e){i(this,e),this.globalSlimmer={},this.pageResizeObserverSlimmer=new S({target:()=>this.host,callback:()=>this.titleMaxHeightController.setVerticalTitleMaxHeight()}),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.renderer=new at,this.colorController=new ot,this.slotController=new ht,this.subStateController=new lt,this.titleMaxHeightController=new dt,this.timeFormat="24-hour",this.slotMode=!1,this.showColorBar=!0}render(){return P(e("slot",null)),s(e(a,null,this.calendarEvent?this.renderer.render():null),this.host)}get host(){return o(this)}};vt([f()],pt.prototype,"globalSlimmer",void 0),vt([v()],pt.prototype,"pageResizeObserverSlimmer",void 0),vt([v()],pt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),vt([v()],pt.prototype,"renderer",void 0),vt([v()],pt.prototype,"colorController",void 0),vt([v()],pt.prototype,"slotController",void 0),vt([v()],pt.prototype,"subStateController",void 0),vt([v()],pt.prototype,"titleMaxHeightController",void 0),pt.style='.bg-disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host{display:block;box-sizing:border-box;width:100%}:host .background-color-mode{border-radius:2px;color:rgba(var(--v-text-black, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;cursor:pointer;overflow:hidden;white-space:nowrap}@media screen and (min-width: 768px) and (max-width: 1023px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}:host .background-color-mode:not(.slot-container){padding-left:8px;padding-right:8px}:host .background-color-mode:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host .event-container{display:block;width:100%;border-radius:4px;cursor:pointer;box-sizing:border-box;overflow:hidden}:host .background-color-mode.slot-container{height:16px;line-height:16px}:host ::slotted(vega-calendar-event-slot){position:relative;pointer-events:none}:host(.month-event) .event-container{display:flex;flex-direction:row;gap:4px;align-items:center;min-height:16px}:host(.month-event) .event-container:not(.slot-container){padding-left:2px;padding-right:2px}:host(.month-event) .event-container .event-status{width:8px;height:8px;box-sizing:border-box;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;margin-left:2px;flex-shrink:0}:host(.month-event) .event-container .event-status span{display:none;width:100%;height:100%;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px}:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.month-event) .event-container .event-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(.month-event) .event-container .event-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(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}:host(.month-event) .event-container.secondary .event-status span{display:block;background-size:4px 4px;opacity:0.8}:host(.month-event) .event-container.tertiary .event-status{padding:1px}:host(.month-event) .event-container.tertiary .event-status span{display:block;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}:host(.month-event) .event-container.disabled .event-status{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.month-event) .event-container:hover{background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1))}:host(.month-event) .event-container:active{background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}:host(.month-event) .event-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host(.day-event) .event-container{position:relative}:host(.day-event) .event-container:not(.slot-container){padding-left:8px;padding-right:8px}:host(.day-event) .event-container .event-status{position:absolute;width:4px;height:100%;left:0;top:0;z-index:1}:host(.day-event) .event-container .event-status span{display:none}:host(.day-event) .event-container .cover-block{position:absolute;height:100%;width:100%;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:4px;left:0;top:0;opacity:0.7}:host(.day-event) .event-container .event-content,:host(.day-event) .event-container .event-time{display:flex;flex-direction:row;align-items:center}:host(.day-event) .event-container .event-content{gap:8px;position:relative;height:100%;box-sizing:border-box}:host(.day-event) .event-container .event-time{gap: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}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.day-event) .event-container .event-time{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(.day-event) .event-container .event-time{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(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}:host(.day-event) .event-container .event-time vega-icon{flex-shrink:0}:host(.day-event) .event-container .event-time span{white-space:nowrap}:host(.day-event) .event-container .event-title{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}:host(.day-event) .event-container .event-title.title-word-wrap{overflow:hidden}:host(.day-event) .event-container .event-title:not(.title-word-wrap){white-space:nowrap}:host(.day-event) .event-container.duration-half-an-hour{padding-top:8px;padding-bottom:8px}:host(.day-event) .event-container.vertical{height:100%}:host(.day-event) .event-container.vertical .event-content{flex-direction:column;align-items:flex-start;gap:4px;padding-top:8px;padding-bottom:8px}:host(.day-event) .event-container.secondary .event-status span,:host(.day-event) .event-container.tertiary .event-status span{display:block;position:absolute;border-top-left-radius:4px;border-bottom-left-radius:4px}:host(.day-event) .event-container.secondary .cover-block,:host(.day-event) .event-container.tertiary .cover-block{width:calc(100% - 2px);height:calc(100% - 2px);top:1px;left:1px}:host(.day-event) .event-container.secondary .event-status span{width:100%;height:100%;top:0px;left:0px;background-size:4px 4px;opacity:0.8}:host(.day-event) .event-container.secondary .cover-block{opacity:0.9}:host(.day-event) .event-container.tertiary .event-status span{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));width:2px;height:calc(100% - 2px);top:1px;left:1px}:host(.day-event) .event-container.tertiary .cover-block{opacity:1}:host(.day-event) .event-container.disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.day-event) .event-container.disabled .event-status{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.day-event) .event-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host(.day-event) .slot-container{min-height:16px}:host(.month-event.calendar-event-large-size) .background-color-mode{border-radius:4px}:host(.month-event.calendar-event-large-size) .background-color-mode:not(.slot-container){padding-top:4px;padding-bottom:4px}:host(.month-event.calendar-event-large-size) .event-container:not(.slot-container){padding-top:4px;padding-bottom:4px}:host(.month-event.calendar-event-large-size) .slot-container{height:24px;display:flex;align-items:center;line-height:24px}.stripe{background-image:linear-gradient(-45deg, transparent 25%, rgba(var(--v-bg-primary, 252, 252, 252, 1)) 25% 50%, transparent 50% 75%, rgba(var(--v-bg-primary, 252, 252, 252, 1)) 75% 100%)}';var ft=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const mt=class{constructor(e){i(this,e),this.globalSlimmer={},this.vegaComponentUsageRuntimeMetricsSlimmer=new p}render(){return s(e(a,{slot:ie(this.eventKey)},e("slot",null)),this.host)}get host(){return o(this)}};ft([f()],mt.prototype,"globalSlimmer",void 0),ft([v()],mt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),mt.style=":host{width:100%;height:100%;position:relative}";export{it as vega_calendar,pt as vega_calendar_event,mt as vega_calendar_event_slot}
@@ -0,0 +1 @@
1
+ import{r as t,h as o,H as e,g as i}from"./p-21d26bb4.js";import{s}from"./p-519a7d55.js";import{j as r,f as d,k as l}from"./p-fda6f8bc.js";import{a as n}from"./p-d5776087.js";import{c as a,M as h,V as c,I as p}from"./p-6e1ab235.js";import{V as b,I as m}from"./p-d849e0f5.js";import{R as v}from"./p-4a237308.js";import{P as f}from"./p-7d9cd9c8.js";import{f as g}from"./p-fc02a67a.js";import"./p-5e2c9e69.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-49fd1009.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-5f377954.js";import"./p-bcdb235d.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-0c8bd757.js";import"./p-5773a9a3.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";import"./p-112455b1.js";import"./p-613ee009.js";import"./p-6e01f0a2.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-8c46e116.js";import"./p-5d676a94.js";import"./p-9d6003ef.js";import"./p-88e08a33.js";import"./p-d7e0c57a.js";import"./p-f5ac60f5.js";import"./p-b75ee3ba.js";var y=function(t,o,e,i){var s,r=arguments.length,d=r<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(t,o,e,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(d=(r<3?s(d):r>3?s(o,e,d):s(o,e))||d);return r>3&&d&&Object.defineProperty(o,e,d),d};class w extends c{componentWillLoad(){this.appendAllStateStyles()}watchBorder(){this.appendStateStyles(this.border,"border"),this.makeBorderColorAfterBorder()}watchShadow(){this.appendStateStyles(this.shadow,"shadow")}watchBorderColor(){this.appendStateStyles(this.borderColor,"borderColor"),this.makeBorderColorAfterBorder()}watchBackgroundColor(){this.appendStateStyles(this.backgroundColor,"backgroundColor")}appendStateStyles(t,o){var e;if(null===(e=this.host.shadowRoot.querySelector(`style#state-styles-${o}`))||void 0===e||e.remove(),r(t,o)){const e=document.createElement("style");e.setAttribute("id",`state-styles-${o}`),e.innerHTML=r(t,o),this.host.shadowRoot.append(e)}}makeBorderColorAfterBorder(){const t=this.host.shadowRoot.querySelector("style#state-styles-borderColor"),o=this.host.shadowRoot.querySelector("style#state-styles-border");t&&o&&o.after(t)}appendAllStateStyles(){this.appendStateStyles(this.backgroundColor,"backgroundColor"),this.appendStateStyles(this.border,"border"),this.appendStateStyles(this.borderColor,"borderColor"),this.appendStateStyles(this.shadow,"shadow")}}y([a()],w.prototype,"host",void 0),y([a()],w.prototype,"backgroundColor",void 0),y([a()],w.prototype,"borderColor",void 0),y([a()],w.prototype,"border",void 0),y([a()],w.prototype,"shadow",void 0),y([h("componentWillLoad")],w.prototype,"componentWillLoad",null),y([h("watchBorder")],w.prototype,"watchBorder",null),y([h("watchShadow")],w.prototype,"watchShadow",null),y([h("watchBorderColor")],w.prototype,"watchBorderColor",null),y([h("watchBackgroundColor")],w.prototype,"watchBackgroundColor",null);var j=function(t,o,e,i){var s,r=arguments.length,d=r<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(t,o,e,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(d=(r<3?s(d):r>3?s(o,e,d):s(o,e))||d);return r>3&&d&&Object.defineProperty(o,e,d),d};class u extends c{constructor(){super(...arguments),this.paddingStyleRef=null,this.marginStyleRef=null,this.cornersStyleRef=null}setDefaultStyle(){this.generatePaddingStyle(),this.generateMarginStyle(),this.generateCornersStyle()}generatePaddingStyle(){const t=d(this.padding,"paddingStyle");this.attachStyle("padding",t)}generateMarginStyle(){const t=d(this.margin,"marginStyle");this.attachStyle("margin",t)}generateCornersStyle(){const t=d(this.corners,"cornersStyle");this.attachStyle("corners",t)}attachStyle(t,o){if(o){const e=`${t}StyleRef`,i=this.host.shadowRoot;this[e]||(this[e]=document.createElement("style"),i.appendChild(this[e])),this[e].innerHTML=o}}}j([a()],u.prototype,"host",void 0),j([a()],u.prototype,"padding",void 0),j([a()],u.prototype,"margin",void 0),j([a()],u.prototype,"corners",void 0),j([h("componentWillLoad")],u.prototype,"setDefaultStyle",null),j([h("watchPaddingChange")],u.prototype,"generatePaddingStyle",null),j([h("watchMarginChange")],u.prototype,"generateMarginStyle",null),j([h("watchCornersChange")],u.prototype,"generateCornersStyle",null);var k=function(t,o,e,i){var s,r=arguments.length,d=r<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(t,o,e,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(d=(r<3?s(d):r>3?s(o,e,d):s(o,e))||d);return r>3&&d&&Object.defineProperty(o,e,d),d};const C=class{constructor(o){t(this,o),this.globalSlimmers={},this.pageResizeSlimmer=new f,this.stateStyleController=new w,this.vegaComponentUsageRuntimeMetricsSlimmer=new b,this.responsiveStyleController=new u}watchPaddingChange(){}watchMarginChange(){}watchBorder(){}watchShadow(){}watchBorderColor(){}watchBackgroundColor(){}watchCornersChange(){}render(){const t=[d(this.padding,"padding"),d(this.margin,"margin"),d(this.display,"boxDisplay"),d(this.corners,"corners"),l(this.borderStyle),v.formatCustom(this.responsiveClass)],i=Object.assign({width:d(this.width,"widthAndHeight"),height:d(this.height,"widthAndHeight"),minHeight:d(this.minHeight,"widthAndHeight"),maxHeight:d(this.maxHeight,"widthAndHeight"),order:this.order&&`${v.formatCustom(this.order)}`,alignSelf:this.alignSelf&&`${v.formatCustom(this.alignSelf)}`,justifySelf:this.justifySelf&&`${v.formatCustom(this.justifySelf)}`},g(this.flex,this.flexGrow,this.flexShrink,this.flexBasis));return this.gridArea?i.gridArea=`${v.formatCustom(this.gridArea)}`:(i.gridColumn=this.gridColumn&&`${v.formatCustom(this.gridColumn)}`,i.gridRow=this.gridRow&&`${v.formatCustom(this.gridRow)}`),s(o(e,{style:i,class:n(t)},o("slot",null)),this.host)}get host(){return i(this)}static get watchers(){return{padding:["watchPaddingChange"],margin:["watchMarginChange"],border:["watchBorder"],shadow:["watchShadow"],borderColor:["watchBorderColor"],backgroundColor:["watchBackgroundColor"],corners:["watchCornersChange"]}}};k([m()],C.prototype,"globalSlimmers",void 0),k([p()],C.prototype,"pageResizeSlimmer",void 0),k([p()],C.prototype,"stateStyleController",void 0),k([p()],C.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),k([p()],C.prototype,"responsiveStyleController",void 0),C.style=":host(.v-block),.v-block{display:block}:host(.v-inline-block),.v-inline-block{display:inline-block}:host(.v-hidden),.v-hidden{display:none}@media (min-width: 320px){:host(.S\\:v-block),.S\\:v-block{display:block}:host(.S\\:v-inline-block),.S\\:v-inline-block{display:inline-block}:host(.S\\:v-hidden),.S\\:v-hidden{display:none}}@media (min-width: 768px){:host(.M\\:v-block),.M\\:v-block{display:block}:host(.M\\:v-inline-block),.M\\:v-inline-block{display:inline-block}:host(.M\\:v-hidden),.M\\:v-hidden{display:none}}@media (min-width: 1024px){:host(.L\\:v-block),.L\\:v-block{display:block}:host(.L\\:v-inline-block),.L\\:v-inline-block{display:inline-block}:host(.L\\:v-hidden),.L\\:v-hidden{display:none}}@media (min-width: 1440px){:host(.XL\\:v-block),.XL\\:v-block{display:block}:host(.XL\\:v-inline-block),.XL\\:v-inline-block{display:inline-block}:host(.XL\\:v-hidden),.XL\\:v-hidden{display:none}}:host(.v-border-solid),.v-border-solid{border-style:solid}:host(.v-border-dashed),.v-border-dashed{border-style:dashed}:host(.v-border-dotted),.v-border-dotted{border-style:dotted}:host(.v-border-double),.v-border-double{border-style:double}:host(.v-border-none),.v-border-none{border-style:none}:host{display:block}";export{C as vega_box}
@@ -1 +1 @@
1
- import{r as t,c as i,h as s,H as e,g as a}from"./p-21d26bb4.js";import{F as r}from"./p-6e1b5949.js";import{C as o}from"./p-2d0d575f.js";import{O as n}from"./p-331a62d5.js";import{g as h,b as l,d,c as m,e as c,F as p,a as f}from"./p-5773a9a3.js";import{d as u}from"./p-d27ae9ff.js";import{s as b}from"./p-519a7d55.js";import{f as v,c as j,i as w}from"./p-d5776087.js";import{I as g}from"./p-b28d4f7d.js";import{c as V,I as F}from"./p-6e1ab235.js";import{V as y,I as E}from"./p-d849e0f5.js";import{c as R}from"./p-012cbd8f.js";import{C as S}from"./p-d789b291.js";import{w as C,x as O,y as I,d as P}from"./p-6e01f0a2.js";import{C as B}from"./p-864de9a1.js";import{d as M}from"./p-65d8c2bc.js";import{c as A}from"./p-4f5eb8d5.js";import{S as D}from"./p-ecd032fc.js";import"./p-0bb29d98.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-9d6003ef.js";import"./p-7d9cd9c8.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-b75ee3ba.js";import"./p-abd7aeaa.js";import"./p-e7b00bf0.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-262ec334.js";import"./p-613ee009.js";import"./p-5f377954.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-112455b1.js";var N=function(t,i,s,e){var a,r=arguments.length,o=r<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,s,e);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(o=(r<3?a(o):r>3?a(i,s,o):a(i,s))||o);return r>3&&o&&Object.defineProperty(i,s,o),o};class x extends D{constructor(){super({parent:"vega-form",subStates:[{subStateName:"disableBlurValidation",parentStateName:"disableBlurValidation"}]})}}N([V()],x.prototype,"host",void 0),N([V({writable:!0})],x.prototype,"disableBlurValidation",void 0);var H=function(t,i,s,e){var a,r=arguments.length,o=r<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,s,e);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(o=(r<3?a(o):r>3?a(i,s,o):a(i,s))||o);return r>3&&o&&Object.defineProperty(i,s,o),o};const k=class{constructor(s){t(this,s),this.vegaValidate=i(this,"vegaValidate",7),this.validate=i(this,"validate",7),this.vegaFormSubmit=i(this,"vegaFormSubmit",7),this.formSubmit=i(this,"formSubmit",7),this.vegaFormReset=i(this,"vegaFormReset",7),this.formReset=i(this,"formReset",7),this.globalSlimmers={},this.submitEventEmitter=R(k,C),this.resetEventEmitter=R(k,O),this.validateEventEmitter=R(k,I),this.disableBlurValidationNotifySlimmer=A(k,"disableBlurValidation","watchDisableBlurValidation"),this.stateController=new x,this.childEventPrevent=new S([C,O],(()=>this.host.querySelector("vega-form")),{customPreventHandle:t=>{t.stopPropagation()}}),this.childFormValidateEventPrevent=new S([I],(()=>this.host),{customPreventHandle:t=>{t.stopPropagation()}}),this.childNotifyObserver=new B(h,(t=>this.updateInternalValidStatus(t))),this.childNodeValueChangeObserver=new B(l,(()=>this.updateInternalTouchedStatus())),this.vegaComponentUsageRuntimeMetricsSlimmer=new y,this.invalidFieldPathMap=new g(new Map,(t=>{this.invalidFieldPathMap=t,this.updateIsValidFlag()})),this.pendingValidFieldPathMap=new g(new Map,(t=>{this.pendingValidFieldPathMap=t,this.updateIsValidFlag()})),this.controlledFieldPathSet=new Set,this.isValid=null,this.isTouched=!1,this.disableBlurValidation=!1,this.updateInternalValidStatus=t=>{if(t.host!==this.host){const i=t.host,s=t.detail;r.isValidFormField(i)&&this.shouldVisitElement(i,!1,!1)&&(s?this.invalidFieldPathMap.delete(i):this.invalidFieldPathMap.set(i,i.dataset.vegaForm))}}}watchIsValid(){this.validateEventEmitter.emit(this.isValid),o.notify(h,{host:this.host,detail:this.isValid})}watchDisableBlurValidation(){}async disconnectedCallback(){o.notify(d,{host:this.host}),o.unregister(d,this.formFieldDisconnectedObserver),o.unregister(m,this.formFieldPendingValidObserver)}async componentDidLoad(){await this.navigateVegaFormChildren((async(t,i)=>{i||this.controlledFieldPathSet.add(this.getFormFieldName(t,!0))})),this.initFormFieldDisconnectedObserver(),this.registerFormSubmitChangeManager(),this.registerFormResetChangeManager(),this.registerFormFieldPendingValidChangeManager()}async valid(t=!0){const i={isValid:!0,invalidFields:[]};return await this.navigateVegaFormChildren((async(s,e)=>{if("function"==typeof s.valid&&e){const e=await s.valid(t);e.isValid||(i.isValid=!1,i.invalidFields.push(...e.invalidFields),i.invalidFieldsErrorMessages=Object.assign(Object.assign({},i.invalidFieldsErrorMessages),e.invalidFieldsErrorMessages))}else{const{isValid:e,message:a}=await this.handleChildFormFieldElementValid(s,t);e||(i.isValid=!1,i.invalidFields.push(this.getFormFieldName(s)),i.invalidFieldsErrorMessages||(i.invalidFieldsErrorMessages={}),i.invalidFieldsErrorMessages[this.getFormFieldName(s)]=a)}})),i}async getValue(t){const i={};return await this.navigateVegaFormChildren((async(s,e)=>{const a=this.getFormFieldName(s);i[a]=e?await s.getValue(t):k.getFormFieldValue(s)}),t),u(i)?Object.values(i):i}async setValue(t,i){t&&(await this.navigateVegaFormChildren((async(s,e)=>{const a=this.getFormFieldName(s);e?await s.setValue(t[a],i):(await s.componentOnReady(),void 0!==t[a]&&("function"==typeof s.setValue?await s.setValue(t[a]):s.value=t[a]))}),i),this.isTouched=!1)}async reset(t={},i){await this.navigateVegaFormChildren((async(s,e)=>{const a=this.getFormFieldName(s);e&&await s.reset(t[a]||{},i)}),i),o.notify(c,{host:this.host,defaultValueMap:t,option:i}),this.isTouched=!1}static getFormFieldValue(t){return void 0===t.value?t.getAttribute("value"):t.value}render(){return b(s(e,null,s("slot",null)),this.host)}updateInternalTouchedStatus(){this.isTouched=!0}async navigateVegaFormChildren(t,i,s=this.host){const e=[];Array.from(s.children).forEach((s=>{r.isValidFormField(s)?this.shouldVisitElement(s,null==i?void 0:i.skipDisabled,null==i?void 0:i.skipInvisible)&&e.push(t(s,"VEGA-FORM"===s.tagName)):e.push(this.navigateVegaFormChildren(t,i,s))})),await Promise.all(e)}updateIsValidFlag(){this.isValid=this.pendingValidFieldPathMap.size>0?null:0===this.invalidFieldPathMap.size}getFormFieldName(t,i){let s=t.dataset.vegaForm;if(i){let i=v(t,"vega-form");for(;i&&i!==this.host;)s=i.dataset.vegaForm+" -> "+s,i=v(i,"vega-form")}return s}shouldVisitElement(t,i,s){return this.getFormFieldName(t)&&(!i||!t.disabled)&&(!s||j(t))}initFormFieldDisconnectedObserver(){this.formFieldDisconnectedObserver=new n(this.canAcceptFormFieldDisconnectedOperation.bind(this),this.updateInvalidFieldPath.bind(this)),o.register(d,this.formFieldDisconnectedObserver)}canAcceptFormFieldDisconnectedOperation(t){return this.invalidFieldPathMap.has(t.host)}async updateInvalidFieldPath(t){this.invalidFieldPathMap.delete(t.host),this.pendingValidFieldPathMap.delete(t.host)}registerFormSubmitChangeManager(){this.formEventsObserver=new n(this.canAcceptFormSubmitEvent.bind(this),this.handleSubmitEvents.bind(this)),o.register(p,this.formEventsObserver)}canAcceptFormSubmitEvent(t){return this.isElementInCurrentForm(t.host)}async handleSubmitEvents(){if((await this.valid()).isValid){const t=await this.getValue();this.submitEventEmitter.emit(t)}}registerFormResetChangeManager(){this.formEventsObserver=new n(this.canAcceptFormResetEvent.bind(this),this.handleResetEvents.bind(this)),o.register(f,this.formEventsObserver)}canAcceptFormResetEvent(t){return this.isElementInCurrentForm(t.host)}async handleResetEvents(){await this.reset(),this.resetEventEmitter.emit()}registerFormFieldPendingValidChangeManager(){this.formFieldPendingValidObserver=new n(this.canAcceptFormFieldPendingValid.bind(this),this.handleFieldPendingValid.bind(this)),o.register(m,this.formFieldPendingValidObserver)}canAcceptFormFieldPendingValid(t){return this.isElementInCurrentForm(t.host)}handleFieldPendingValid(t){"boolean"==typeof t.detail?this.pendingValidFieldPathMap.delete(t.host):this.pendingValidFieldPathMap.set(t.host,t.host.dataset.vegaForm)}isElementInCurrentForm(t){return this.invalidFieldPathMap.has(t)||w(t,this.host)}async handleChildFormFieldElementValid(t,i){const s=P.getSubject(t,M),{isValid:e,message:a}=await new Promise((e=>{const a=setTimeout((()=>{e({isValid:!0,message:""})}),2e3);o.notify(s,{host:t,message:i,promiseResolve:e,timerId:a})}));return{isValid:e,message:a}}get host(){return a(this)}static get watchers(){return{isValid:["watchIsValid"],disableBlurValidation:["watchDisableBlurValidation"]}}};H([E()],k.prototype,"globalSlimmers",void 0),H([F()],k.prototype,"submitEventEmitter",void 0),H([F()],k.prototype,"resetEventEmitter",void 0),H([F()],k.prototype,"validateEventEmitter",void 0),H([F()],k.prototype,"disableBlurValidationNotifySlimmer",void 0),H([F()],k.prototype,"stateController",void 0),H([F()],k.prototype,"childEventPrevent",void 0),H([F()],k.prototype,"childFormValidateEventPrevent",void 0),H([F()],k.prototype,"childNotifyObserver",void 0),H([F()],k.prototype,"childNodeValueChangeObserver",void 0),H([F()],k.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),k.style=":host{display:block}";export{k as vega_form}
1
+ import{r as t,c as i,h as s,H as e,g as a}from"./p-21d26bb4.js";import{F as r}from"./p-43263510.js";import{C as o}from"./p-2d0d575f.js";import{O as n}from"./p-331a62d5.js";import{g as h,b as l,d,c as m,e as c,F as p,a as f}from"./p-5773a9a3.js";import{d as u}from"./p-d27ae9ff.js";import{s as b}from"./p-519a7d55.js";import{f as v,c as j,i as w}from"./p-d5776087.js";import{I as g}from"./p-b28d4f7d.js";import{c as V,I as F}from"./p-6e1ab235.js";import{V as y,I as E}from"./p-d849e0f5.js";import{c as R}from"./p-012cbd8f.js";import{C as S}from"./p-d789b291.js";import{w as C,x as O,y as I,d as P}from"./p-6e01f0a2.js";import{C as B}from"./p-864de9a1.js";import{d as M}from"./p-f5ac60f5.js";import{c as A}from"./p-8c4f893b.js";import{S as D}from"./p-8782abeb.js";import"./p-0bb29d98.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-9d6003ef.js";import"./p-7d9cd9c8.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-b75ee3ba.js";import"./p-abd7aeaa.js";import"./p-e7b00bf0.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-262ec334.js";import"./p-613ee009.js";import"./p-5f377954.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-112455b1.js";var N=function(t,i,s,e){var a,r=arguments.length,o=r<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,s,e);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(o=(r<3?a(o):r>3?a(i,s,o):a(i,s))||o);return r>3&&o&&Object.defineProperty(i,s,o),o};class x extends D{constructor(){super({parent:"vega-form",subStates:[{subStateName:"disableBlurValidation",parentStateName:"disableBlurValidation"}]})}}N([V()],x.prototype,"host",void 0),N([V({writable:!0})],x.prototype,"disableBlurValidation",void 0);var H=function(t,i,s,e){var a,r=arguments.length,o=r<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,s,e);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(o=(r<3?a(o):r>3?a(i,s,o):a(i,s))||o);return r>3&&o&&Object.defineProperty(i,s,o),o};const k=class{constructor(s){t(this,s),this.vegaValidate=i(this,"vegaValidate",7),this.validate=i(this,"validate",7),this.vegaFormSubmit=i(this,"vegaFormSubmit",7),this.formSubmit=i(this,"formSubmit",7),this.vegaFormReset=i(this,"vegaFormReset",7),this.formReset=i(this,"formReset",7),this.globalSlimmers={},this.submitEventEmitter=R(k,C),this.resetEventEmitter=R(k,O),this.validateEventEmitter=R(k,I),this.disableBlurValidationNotifySlimmer=A(k,"disableBlurValidation","watchDisableBlurValidation"),this.stateController=new x,this.childEventPrevent=new S([C,O],(()=>this.host.querySelector("vega-form")),{customPreventHandle:t=>{t.stopPropagation()}}),this.childFormValidateEventPrevent=new S([I],(()=>this.host),{customPreventHandle:t=>{t.stopPropagation()}}),this.childNotifyObserver=new B(h,(t=>this.updateInternalValidStatus(t))),this.childNodeValueChangeObserver=new B(l,(()=>this.updateInternalTouchedStatus())),this.vegaComponentUsageRuntimeMetricsSlimmer=new y,this.invalidFieldPathMap=new g(new Map,(t=>{this.invalidFieldPathMap=t,this.updateIsValidFlag()})),this.pendingValidFieldPathMap=new g(new Map,(t=>{this.pendingValidFieldPathMap=t,this.updateIsValidFlag()})),this.controlledFieldPathSet=new Set,this.isValid=null,this.isTouched=!1,this.disableBlurValidation=!1,this.updateInternalValidStatus=t=>{if(t.host!==this.host){const i=t.host,s=t.detail;r.isValidFormField(i)&&this.shouldVisitElement(i,!1,!1)&&(s?this.invalidFieldPathMap.delete(i):this.invalidFieldPathMap.set(i,i.dataset.vegaForm))}}}watchIsValid(){this.validateEventEmitter.emit(this.isValid),o.notify(h,{host:this.host,detail:this.isValid})}watchDisableBlurValidation(){}async disconnectedCallback(){o.notify(d,{host:this.host}),o.unregister(d,this.formFieldDisconnectedObserver),o.unregister(m,this.formFieldPendingValidObserver)}async componentDidLoad(){await this.navigateVegaFormChildren((async(t,i)=>{i||this.controlledFieldPathSet.add(this.getFormFieldName(t,!0))})),this.initFormFieldDisconnectedObserver(),this.registerFormSubmitChangeManager(),this.registerFormResetChangeManager(),this.registerFormFieldPendingValidChangeManager()}async valid(t=!0){const i={isValid:!0,invalidFields:[]};return await this.navigateVegaFormChildren((async(s,e)=>{if("function"==typeof s.valid&&e){const e=await s.valid(t);e.isValid||(i.isValid=!1,i.invalidFields.push(...e.invalidFields),i.invalidFieldsErrorMessages=Object.assign(Object.assign({},i.invalidFieldsErrorMessages),e.invalidFieldsErrorMessages))}else{const{isValid:e,message:a}=await this.handleChildFormFieldElementValid(s,t);e||(i.isValid=!1,i.invalidFields.push(this.getFormFieldName(s)),i.invalidFieldsErrorMessages||(i.invalidFieldsErrorMessages={}),i.invalidFieldsErrorMessages[this.getFormFieldName(s)]=a)}})),i}async getValue(t){const i={};return await this.navigateVegaFormChildren((async(s,e)=>{const a=this.getFormFieldName(s);i[a]=e?await s.getValue(t):k.getFormFieldValue(s)}),t),u(i)?Object.values(i):i}async setValue(t,i){t&&(await this.navigateVegaFormChildren((async(s,e)=>{const a=this.getFormFieldName(s);e?await s.setValue(t[a],i):(await s.componentOnReady(),void 0!==t[a]&&("function"==typeof s.setValue?await s.setValue(t[a]):s.value=t[a]))}),i),this.isTouched=!1)}async reset(t={},i){await this.navigateVegaFormChildren((async(s,e)=>{const a=this.getFormFieldName(s);e&&await s.reset(t[a]||{},i)}),i),o.notify(c,{host:this.host,defaultValueMap:t,option:i}),this.isTouched=!1}static getFormFieldValue(t){return void 0===t.value?t.getAttribute("value"):t.value}render(){return b(s(e,null,s("slot",null)),this.host)}updateInternalTouchedStatus(){this.isTouched=!0}async navigateVegaFormChildren(t,i,s=this.host){const e=[];Array.from(s.children).forEach((s=>{r.isValidFormField(s)?this.shouldVisitElement(s,null==i?void 0:i.skipDisabled,null==i?void 0:i.skipInvisible)&&e.push(t(s,"VEGA-FORM"===s.tagName)):e.push(this.navigateVegaFormChildren(t,i,s))})),await Promise.all(e)}updateIsValidFlag(){this.isValid=this.pendingValidFieldPathMap.size>0?null:0===this.invalidFieldPathMap.size}getFormFieldName(t,i){let s=t.dataset.vegaForm;if(i){let i=v(t,"vega-form");for(;i&&i!==this.host;)s=i.dataset.vegaForm+" -> "+s,i=v(i,"vega-form")}return s}shouldVisitElement(t,i,s){return this.getFormFieldName(t)&&(!i||!t.disabled)&&(!s||j(t))}initFormFieldDisconnectedObserver(){this.formFieldDisconnectedObserver=new n(this.canAcceptFormFieldDisconnectedOperation.bind(this),this.updateInvalidFieldPath.bind(this)),o.register(d,this.formFieldDisconnectedObserver)}canAcceptFormFieldDisconnectedOperation(t){return this.invalidFieldPathMap.has(t.host)}async updateInvalidFieldPath(t){this.invalidFieldPathMap.delete(t.host),this.pendingValidFieldPathMap.delete(t.host)}registerFormSubmitChangeManager(){this.formEventsObserver=new n(this.canAcceptFormSubmitEvent.bind(this),this.handleSubmitEvents.bind(this)),o.register(p,this.formEventsObserver)}canAcceptFormSubmitEvent(t){return this.isElementInCurrentForm(t.host)}async handleSubmitEvents(){if((await this.valid()).isValid){const t=await this.getValue();this.submitEventEmitter.emit(t)}}registerFormResetChangeManager(){this.formEventsObserver=new n(this.canAcceptFormResetEvent.bind(this),this.handleResetEvents.bind(this)),o.register(f,this.formEventsObserver)}canAcceptFormResetEvent(t){return this.isElementInCurrentForm(t.host)}async handleResetEvents(){await this.reset(),this.resetEventEmitter.emit()}registerFormFieldPendingValidChangeManager(){this.formFieldPendingValidObserver=new n(this.canAcceptFormFieldPendingValid.bind(this),this.handleFieldPendingValid.bind(this)),o.register(m,this.formFieldPendingValidObserver)}canAcceptFormFieldPendingValid(t){return this.isElementInCurrentForm(t.host)}handleFieldPendingValid(t){"boolean"==typeof t.detail?this.pendingValidFieldPathMap.delete(t.host):this.pendingValidFieldPathMap.set(t.host,t.host.dataset.vegaForm)}isElementInCurrentForm(t){return this.invalidFieldPathMap.has(t)||w(t,this.host)}async handleChildFormFieldElementValid(t,i){const s=P.getSubject(t,M),{isValid:e,message:a}=await new Promise((e=>{const a=setTimeout((()=>{e({isValid:!0,message:""})}),2e3);o.notify(s,{host:t,message:i,promiseResolve:e,timerId:a})}));return{isValid:e,message:a}}get host(){return a(this)}static get watchers(){return{isValid:["watchIsValid"],disableBlurValidation:["watchDisableBlurValidation"]}}};H([E()],k.prototype,"globalSlimmers",void 0),H([F()],k.prototype,"submitEventEmitter",void 0),H([F()],k.prototype,"resetEventEmitter",void 0),H([F()],k.prototype,"validateEventEmitter",void 0),H([F()],k.prototype,"disableBlurValidationNotifySlimmer",void 0),H([F()],k.prototype,"stateController",void 0),H([F()],k.prototype,"childEventPrevent",void 0),H([F()],k.prototype,"childFormValidateEventPrevent",void 0),H([F()],k.prototype,"childNotifyObserver",void 0),H([F()],k.prototype,"childNodeValueChangeObserver",void 0),H([F()],k.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),k.style=":host{display:block}";export{k as vega_form}
@@ -1 +1 @@
1
- import{h as t,r,c as a,H as o,g as e}from"./p-21d26bb4.js";import{P as i,g as n}from"./p-7d9cd9c8.js";import{s}from"./p-519a7d55.js";import{R as d}from"./p-fb8c99c5.js";import{F as v,a as g}from"./p-5773a9a3.js";import{C as b}from"./p-2d0d575f.js";import{c as p,V as c,I as l}from"./p-6e1ab235.js";import{V as h,I as u}from"./p-d849e0f5.js";import{c as f}from"./p-012cbd8f.js";import{a as m}from"./p-6e01f0a2.js";import{C as x}from"./p-d789b291.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-b75ee3ba.js";import"./p-5e2c9e69.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-5f377954.js";import"./p-bcdb235d.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-d5776087.js";import"./p-0c8bd757.js";import"./p-331a62d5.js";import"./p-112455b1.js";import"./p-613ee009.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-8c46e116.js";import"./p-5d676a94.js";import"./p-9d6003ef.js";import"./p-53e9595f.js";import"./p-8246f8ae.js";import"./p-65d8c2bc.js";import"./p-e7b00bf0.js";class w extends c{render(){if(this.loading)return t("vega-loading-indicator",{size:"micro",mode:"indeterminate"})}}!function(t,r,a,o){var e,i=arguments.length,n=i<3?r:null===o?o=Object.getOwnPropertyDescriptor(r,a):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,r,a,o);else for(var s=t.length-1;s>=0;s--)(e=t[s])&&(n=(i<3?e(n):i>3?e(r,a,n):e(r,a))||n);i>3&&n&&Object.defineProperty(r,a,n)}([p()],w.prototype,"loading",void 0);var y=function(t,r,a,o){var e,i=arguments.length,n=i<3?r:null===o?o=Object.getOwnPropertyDescriptor(r,a):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,r,a,o);else for(var s=t.length-1;s>=0;s--)(e=t[s])&&(n=(i<3?e(n):i>3?e(r,a,n):e(r,a))||n);return i>3&&n&&Object.defineProperty(r,a,n),n};const j=class{constructor(t){r(this,t),this.vegaClick=a(this,"vegaClick",7),this.click=a(this,"click",7),this.globalSlimmers={},this.pageResizeObserverSlimmer=new i,this.clickEventEmitter=f(j,m),this.eventPrevent=new x([m],(()=>this.host),{useCapture:!0,customPreventHandle:t=>{this.isDisabledButton()&&t.stopImmediatePropagation()}}),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.vegaButtonLoadingRenderer=new w,this.currentBreakpoint=n(),this.size="default",this.variant="primary",this.iconAlign="left",this.label=null,this.disabled=!1,this.danger=!1,this.block=!1,this.type="button",this.loading=!1,this.handleClick=t=>{this.isDisabledButton()?t.preventDefault():(["submit","reset"].includes(this.type)&&b.notify("submit"===this.type?v:g,{host:this.host}),this.clickEventEmitter.emit(void 0,t))}}componentWillLoad(){this.label||(this.label=this.host.textContent),this.host.innerHTML=""}render(){return s(t(o,{class:{"vega-button-block":this.isBlockStyleButton()}},t("button",{type:this.type,"aria-label":this.label||"No label defined",class:{[`vega-button-size-${d.formatCustom(this.size)}`]:!0,[`vega-button-variant-${this.variant}`]:!0,"vega-button-disabled":this.isDisabledButton(),"vega-button-danger":this.danger},onClick:this.handleClick,disabled:this.isDisabledButton(),part:"button"},this.renderContent())),this.host)}renderContent(){return this.icon||this.loading?t("vega-flex",{alignItems:"center",gap:"size-8",justifyContent:"center"},"left"===this.iconAlign&&this.renderIcon(),this.renderLabel(),"right"===this.iconAlign&&this.renderIcon(),this.vegaButtonLoadingRenderer.render()):this.renderLabel()}renderLabel(){return this.label&&t("span",null,this.label)}renderIcon(){if(this.icon)return t("vega-icon",{icon:this.icon,class:"vega-flex-shrink-0 v-min-w-min",size:"large"===this.size?"size-24":"size-16"})}isDisabledButton(){return this.disabled||this.loading}isBlockStyleButton(){return d.formatCustom(this.block)}get host(){return e(this)}};y([u()],j.prototype,"globalSlimmers",void 0),y([l()],j.prototype,"pageResizeObserverSlimmer",void 0),y([l()],j.prototype,"clickEventEmitter",void 0),y([l()],j.prototype,"eventPrevent",void 0),y([l()],j.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),y([l()],j.prototype,"vegaButtonLoadingRenderer",void 0),j.style=':host{display:inline-block;border-radius:9999px}:host(.vega-button-block){display:block}:host>button{border-radius:9999px;cursor:pointer;font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:24px;letter-spacing:0px;box-sizing:border-box;outline:none}@media screen and (min-width: 768px) and (max-width: 1023px){:host>button{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host>button{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host>button{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}:host .vega-button-size-small{padding-left:16px;padding-right:16px;padding-top:4px;padding-bottom:4px}:host .vega-button-size-default{padding-left:24px;padding-right:24px;padding-top:8px;padding-bottom:8px}:host .vega-button-size-large{padding-left:32px;padding-right:32px;padding-top:16px;padding-bottom:16px}:host .vega-button-variant-secondary.vega-button-size-small{padding-top:2px;padding-bottom:2px}:host .vega-button-variant-secondary.vega-button-size-default{padding-top:6px;padding-bottom:6px}:host .vega-button-variant-secondary.vega-button-size-large{padding-top:14px;padding-bottom:14px}:host>button vega-flex span{overflow-wrap:break-word}:host(.vega-button-block) button{width:100%}:host button:focus{outline:none}:host .vega-button-variant-primary{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));border-width:0px;color:rgba(var(--v-text-on-action, 252, 252, 252, 1))}:host .vega-button-variant-primary:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}:host .vega-button-variant-primary:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}:host .vega-button-variant-primary:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .vega-button-variant-secondary{border:2px solid rgba(var(--v-border-secondary-btn, 19, 98, 226, 1));background-color:rgba(var(--v-bg-action-secondary, 252, 252, 252, 1));color:rgba(var(--v-text-link, 19, 98, 226, 1))}:host .vega-button-variant-secondary:hover{border:2px solid rgba(var(--v-border-secondary-btn-hover, 4, 112, 236, 1));background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1));color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}:host .vega-button-variant-secondary:active{border:2px solid rgba(var(--v-border-secondary-btn-active, 29, 65, 195, 1));color:rgba(var(--v-text-link-active, 29, 65, 195, 1));background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}:host .vega-button-variant-secondary:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .vega-button-variant-primary.vega-button-danger{background-color:rgba(var(--v-bg-danger, 189, 41, 71, 1));color:rgba(var(--v-text-on-danger, 252, 252, 252, 1))}:host .vega-button-variant-primary.vega-button-danger:hover{background-color:rgba(var(--v-bg-danger-hover, 233, 71, 104, 1))}:host .vega-button-variant-primary.vega-button-danger:active{background-color:rgba(var(--v-bg-danger-active, 230, 50, 87, 1))}:host .vega-button-variant-primary.vega-button-danger:focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}:host .vega-button-variant-secondary.vega-button-danger{border:2px solid rgba(var(--v-border-secondary-danger-btn, 230, 50, 87, 1));color:rgba(var(--v-text-danger-link, 230, 50, 87, 1))}:host .vega-button-variant-secondary.vega-button-danger:hover{border:2px solid rgba(var(--v-border-secondary-danger-btn-hover, 255, 87, 114, 1));background-color:rgba(var(--v-bg-danger-tertiary-hover, 255, 87, 114, 0.2));color:rgba(var(--v-text-danger-link-hover, 233, 71, 104, 1))}:host .vega-button-variant-secondary.vega-button-danger:active{border:2px solid rgba(var(--v-border-secondary-danger-btn-active, 189, 41, 71, 1));color:rgba(var(--v-text-danger-link-active, 189, 41, 71, 1));background-color:rgba(var(--v-bg-danger-tertiary-active, 189, 41, 71, 0.2))}:host .vega-button-variant-secondary.vega-button-danger:focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px;color:rgba(var(--v-text-danger-link-focus, 240, 52, 91, 1))}:host .vega-button-disabled{pointer-events:none;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 rgba(0, 0, 0, 0))}:host .vega-button-variant-primary.vega-button-disabled,:host .vega-button-variant-primary.vega-button-disabled:focus{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1));color:rgba(var(--v-text-on-disabled, 252, 252, 252, 1));--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 rgba(0, 0, 0, 0))}:host .vega-button-variant-secondary.vega-button-disabled,:host .vega-button-variant-secondary.vega-button-disabled:focus{background-color:rgba(var(--v-bg-action-secondary, 252, 252, 252, 1));color:rgba(var(--v-text-disabled, 176, 180, 181, 1));border:2px solid rgba(var(--v-border-secondary-btn-disabled, 176, 180, 181, 1));--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 rgba(0, 0, 0, 0))}:host .vega-button-variant-primary vega-loading-indicator::part(circle-loader-progress){stroke:rgba(var(--v-text-white, 252, 252, 252, 1))}:host .vega-button-variant-primary vega-loading-indicator::part(circle-loader-track){stroke:rgba(var(--v-text-white, 252, 252, 252, 1));opacity:0.2}';export{j as vega_button}
1
+ import{h as t,r,c as a,H as o,g as e}from"./p-21d26bb4.js";import{P as i,g as n}from"./p-7d9cd9c8.js";import{s}from"./p-519a7d55.js";import{R as d}from"./p-4a237308.js";import{F as v,a as g}from"./p-5773a9a3.js";import{C as b}from"./p-2d0d575f.js";import{c as p,V as c,I as l}from"./p-6e1ab235.js";import{V as h,I as u}from"./p-d849e0f5.js";import{c as f}from"./p-012cbd8f.js";import{a as m}from"./p-6e01f0a2.js";import{C as x}from"./p-d789b291.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-b75ee3ba.js";import"./p-5e2c9e69.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-5f377954.js";import"./p-bcdb235d.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-d5776087.js";import"./p-0c8bd757.js";import"./p-331a62d5.js";import"./p-112455b1.js";import"./p-613ee009.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-8c46e116.js";import"./p-5d676a94.js";import"./p-9d6003ef.js";import"./p-88e08a33.js";import"./p-d7e0c57a.js";import"./p-f5ac60f5.js";import"./p-e7b00bf0.js";class w extends c{render(){if(this.loading)return t("vega-loading-indicator",{size:"micro",mode:"indeterminate"})}}!function(t,r,a,o){var e,i=arguments.length,n=i<3?r:null===o?o=Object.getOwnPropertyDescriptor(r,a):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,r,a,o);else for(var s=t.length-1;s>=0;s--)(e=t[s])&&(n=(i<3?e(n):i>3?e(r,a,n):e(r,a))||n);i>3&&n&&Object.defineProperty(r,a,n)}([p()],w.prototype,"loading",void 0);var y=function(t,r,a,o){var e,i=arguments.length,n=i<3?r:null===o?o=Object.getOwnPropertyDescriptor(r,a):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,r,a,o);else for(var s=t.length-1;s>=0;s--)(e=t[s])&&(n=(i<3?e(n):i>3?e(r,a,n):e(r,a))||n);return i>3&&n&&Object.defineProperty(r,a,n),n};const j=class{constructor(t){r(this,t),this.vegaClick=a(this,"vegaClick",7),this.click=a(this,"click",7),this.globalSlimmers={},this.pageResizeObserverSlimmer=new i,this.clickEventEmitter=f(j,m),this.eventPrevent=new x([m],(()=>this.host),{useCapture:!0,customPreventHandle:t=>{this.isDisabledButton()&&t.stopImmediatePropagation()}}),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.vegaButtonLoadingRenderer=new w,this.currentBreakpoint=n(),this.size="default",this.variant="primary",this.iconAlign="left",this.label=null,this.disabled=!1,this.danger=!1,this.block=!1,this.type="button",this.loading=!1,this.handleClick=t=>{this.isDisabledButton()?t.preventDefault():(["submit","reset"].includes(this.type)&&b.notify("submit"===this.type?v:g,{host:this.host}),this.clickEventEmitter.emit(void 0,t))}}componentWillLoad(){this.label||(this.label=this.host.textContent),this.host.innerHTML=""}render(){return s(t(o,{class:{"vega-button-block":this.isBlockStyleButton()}},t("button",{type:this.type,"aria-label":this.label||"No label defined",class:{[`vega-button-size-${d.formatCustom(this.size)}`]:!0,[`vega-button-variant-${this.variant}`]:!0,"vega-button-disabled":this.isDisabledButton(),"vega-button-danger":this.danger},onClick:this.handleClick,disabled:this.isDisabledButton(),part:"button"},this.renderContent())),this.host)}renderContent(){return this.icon||this.loading?t("vega-flex",{alignItems:"center",gap:"size-8",justifyContent:"center"},"left"===this.iconAlign&&this.renderIcon(),this.renderLabel(),"right"===this.iconAlign&&this.renderIcon(),this.vegaButtonLoadingRenderer.render()):this.renderLabel()}renderLabel(){return this.label&&t("span",null,this.label)}renderIcon(){if(this.icon)return t("vega-icon",{icon:this.icon,class:"vega-flex-shrink-0 v-min-w-min",size:"large"===this.size?"size-24":"size-16"})}isDisabledButton(){return this.disabled||this.loading}isBlockStyleButton(){return d.formatCustom(this.block)}get host(){return e(this)}};y([u()],j.prototype,"globalSlimmers",void 0),y([l()],j.prototype,"pageResizeObserverSlimmer",void 0),y([l()],j.prototype,"clickEventEmitter",void 0),y([l()],j.prototype,"eventPrevent",void 0),y([l()],j.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),y([l()],j.prototype,"vegaButtonLoadingRenderer",void 0),j.style=':host{display:inline-block;border-radius:9999px}:host(.vega-button-block){display:block}:host>button{border-radius:9999px;cursor:pointer;font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:24px;letter-spacing:0px;box-sizing:border-box;outline:none}@media screen and (min-width: 768px) and (max-width: 1023px){:host>button{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host>button{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host>button{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}:host .vega-button-size-small{padding-left:16px;padding-right:16px;padding-top:4px;padding-bottom:4px}:host .vega-button-size-default{padding-left:24px;padding-right:24px;padding-top:8px;padding-bottom:8px}:host .vega-button-size-large{padding-left:32px;padding-right:32px;padding-top:16px;padding-bottom:16px}:host .vega-button-variant-secondary.vega-button-size-small{padding-top:2px;padding-bottom:2px}:host .vega-button-variant-secondary.vega-button-size-default{padding-top:6px;padding-bottom:6px}:host .vega-button-variant-secondary.vega-button-size-large{padding-top:14px;padding-bottom:14px}:host>button vega-flex span{overflow-wrap:break-word}:host(.vega-button-block) button{width:100%}:host button:focus{outline:none}:host .vega-button-variant-primary{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));border-width:0px;color:rgba(var(--v-text-on-action, 252, 252, 252, 1))}:host .vega-button-variant-primary:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}:host .vega-button-variant-primary:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}:host .vega-button-variant-primary:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .vega-button-variant-secondary{border:2px solid rgba(var(--v-border-secondary-btn, 19, 98, 226, 1));background-color:rgba(var(--v-bg-action-secondary, 252, 252, 252, 1));color:rgba(var(--v-text-link, 19, 98, 226, 1))}:host .vega-button-variant-secondary:hover{border:2px solid rgba(var(--v-border-secondary-btn-hover, 4, 112, 236, 1));background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1));color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}:host .vega-button-variant-secondary:active{border:2px solid rgba(var(--v-border-secondary-btn-active, 29, 65, 195, 1));color:rgba(var(--v-text-link-active, 29, 65, 195, 1));background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}:host .vega-button-variant-secondary:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .vega-button-variant-primary.vega-button-danger{background-color:rgba(var(--v-bg-danger, 189, 41, 71, 1));color:rgba(var(--v-text-on-danger, 252, 252, 252, 1))}:host .vega-button-variant-primary.vega-button-danger:hover{background-color:rgba(var(--v-bg-danger-hover, 233, 71, 104, 1))}:host .vega-button-variant-primary.vega-button-danger:active{background-color:rgba(var(--v-bg-danger-active, 230, 50, 87, 1))}:host .vega-button-variant-primary.vega-button-danger:focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}:host .vega-button-variant-secondary.vega-button-danger{border:2px solid rgba(var(--v-border-secondary-danger-btn, 230, 50, 87, 1));color:rgba(var(--v-text-danger-link, 230, 50, 87, 1))}:host .vega-button-variant-secondary.vega-button-danger:hover{border:2px solid rgba(var(--v-border-secondary-danger-btn-hover, 255, 87, 114, 1));background-color:rgba(var(--v-bg-danger-tertiary-hover, 255, 87, 114, 0.2));color:rgba(var(--v-text-danger-link-hover, 233, 71, 104, 1))}:host .vega-button-variant-secondary.vega-button-danger:active{border:2px solid rgba(var(--v-border-secondary-danger-btn-active, 189, 41, 71, 1));color:rgba(var(--v-text-danger-link-active, 189, 41, 71, 1));background-color:rgba(var(--v-bg-danger-tertiary-active, 189, 41, 71, 0.2))}:host .vega-button-variant-secondary.vega-button-danger:focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px;color:rgba(var(--v-text-danger-link-focus, 240, 52, 91, 1))}:host .vega-button-disabled{pointer-events:none;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 rgba(0, 0, 0, 0))}:host .vega-button-variant-primary.vega-button-disabled,:host .vega-button-variant-primary.vega-button-disabled:focus{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1));color:rgba(var(--v-text-on-disabled, 252, 252, 252, 1));--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 rgba(0, 0, 0, 0))}:host .vega-button-variant-secondary.vega-button-disabled,:host .vega-button-variant-secondary.vega-button-disabled:focus{background-color:rgba(var(--v-bg-action-secondary, 252, 252, 252, 1));color:rgba(var(--v-text-disabled, 176, 180, 181, 1));border:2px solid rgba(var(--v-border-secondary-btn-disabled, 176, 180, 181, 1));--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 rgba(0, 0, 0, 0))}:host .vega-button-variant-primary vega-loading-indicator::part(circle-loader-progress){stroke:rgba(var(--v-text-white, 252, 252, 252, 1))}:host .vega-button-variant-primary vega-loading-indicator::part(circle-loader-track){stroke:rgba(var(--v-text-white, 252, 252, 252, 1));opacity:0.2}';export{j as vega_button}