@oneclick.dev/cms-core-modules 0.0.105 → 0.0.107

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 (574) hide show
  1. package/dist/Acquisition-DypEyPSO.js +1 -0
  2. package/dist/Acquisition-TCNX-th6.mjs +308 -0
  3. package/dist/AgendaOpeningHoursCard-BIhm0vpV.js +1 -0
  4. package/dist/AgendaOpeningHoursCard-BKUdJxRI.mjs +133 -0
  5. package/dist/AppointmentDetailsCard-C5rQ5jsW.js +1 -0
  6. package/dist/AppointmentDetailsCard-NRHeNP2L.mjs +111 -0
  7. package/dist/AppointmentEditor-BcF8CiD-.mjs +150 -0
  8. package/dist/AppointmentEditor-BlhFtoCm.js +1 -0
  9. package/dist/AppointmentListTable-B-ReBVtV.js +1 -0
  10. package/dist/AppointmentListTable-DHmy-iid.mjs +129 -0
  11. package/dist/Audience-Cq1Gu-Vo.mjs +394 -0
  12. package/dist/Audience-h5PfXPz4.js +1 -0
  13. package/dist/Components-BehelN4r.js +1 -0
  14. package/dist/Components-CR6zukUU.mjs +468 -0
  15. package/dist/Content-C5Iye3t0.mjs +257 -0
  16. package/dist/Content-eOfBx52Y.js +1 -0
  17. package/dist/ContentEditor-BgL4qEeg.mjs +26835 -0
  18. package/dist/ContentEditor-Tlu3w0Hu.js +462 -0
  19. package/dist/CountryBreakdownCard-CWVyB8be.mjs +151 -0
  20. package/dist/CountryBreakdownCard-Db-pMiNe.js +1 -0
  21. package/dist/Create-B1it8S4m.js +1 -0
  22. package/dist/Create-DbYi0FAI.mjs +907 -0
  23. package/dist/DateFormatter-DLrDYkby.mjs +630 -0
  24. package/dist/DateFormatter-Dni0Oq8r.js +1 -0
  25. package/dist/Detail-D-eahJGO.mjs +21 -0
  26. package/dist/Detail-D0kdPPIm.mjs +2757 -0
  27. package/dist/Detail-DAafePYi.mjs +485 -0
  28. package/dist/Detail-DYpv4fYg.js +1 -0
  29. package/dist/Detail-Dc_ui4LM.js +1 -0
  30. package/dist/Detail-DccUekl_.js +1 -0
  31. package/dist/Detail-Dhz0V0Vf.js +1 -0
  32. package/dist/Detail-DjnGY0F8.mjs +282 -0
  33. package/dist/Detail-DplAitHg.mjs +447 -0
  34. package/dist/Detail-SugyeSxb.js +1 -0
  35. package/dist/DeviceBreakdownCard-CzxZT6To.js +1 -0
  36. package/dist/DeviceBreakdownCard-eEwPjzKl.mjs +115 -0
  37. package/dist/EditLayout-Bnz9q_jd.js +1 -0
  38. package/dist/EditLayout-J_DGXb8v.mjs +99 -0
  39. package/dist/Entries-CgpWg6fE.js +1 -0
  40. package/dist/Entries-CkGTXcAq.mjs +575 -0
  41. package/dist/Find-Bz0TNJzk.mjs +164 -0
  42. package/dist/Find-D-ItTXaZ.js +1 -0
  43. package/dist/GlobalStyling-CSQPF7o_.mjs +1162 -0
  44. package/dist/GlobalStyling-DabldMZh.js +15 -0
  45. package/dist/NewReservationDialog-BhIiY2B9.js +1 -0
  46. package/dist/NewReservationDialog-CN49aGcM.mjs +1002 -0
  47. package/dist/OrderDetailDialog-BJ01DZFe.js +1 -0
  48. package/dist/OrderDetailDialog-CoVQ_rzs.mjs +215 -0
  49. package/dist/Overview-9FMgn5hT.mjs +492 -0
  50. package/dist/Overview-BOOwMQ-c.mjs +636 -0
  51. package/dist/Overview-Biz3h60w.js +1 -0
  52. package/dist/Overview-C2K2ofdS.js +1 -0
  53. package/dist/Overview-CFHOXP9N.mjs +123 -0
  54. package/dist/Overview-CTJe7J5_.js +1 -0
  55. package/dist/Overview-Cvj2i9eW.js +1 -0
  56. package/dist/Overview-D2I1F8Dm.mjs +21 -0
  57. package/dist/Overview-DFOc9emt.mjs +345 -0
  58. package/dist/Overview-Dmhfb94Y.js +1 -0
  59. package/dist/Overview-PPzv7weG.mjs +450 -0
  60. package/dist/Overview-qFKcXHVF.js +1 -0
  61. package/dist/Overview-xkmYYTae.mjs +133 -0
  62. package/dist/Overview-yPsLvR2c.js +1 -0
  63. package/dist/PeakHoursCard-CtgEP-ez.mjs +157 -0
  64. package/dist/PeakHoursCard-DPeoMyhu.js +1 -0
  65. package/dist/ProductDetailsCard-B0WhmzO-.mjs +98 -0
  66. package/dist/ProductDetailsCard-C1ROuH6l.js +1 -0
  67. package/dist/RealtimeCard-DQno-Okz.js +1 -0
  68. package/dist/RealtimeCard-dR-g1iDo.mjs +92 -0
  69. package/dist/ReservationDetailDialog-Cdo6h0RD.mjs +2163 -0
  70. package/dist/ReservationDetailDialog-DZTFD2xI.js +349 -0
  71. package/dist/SearchTermsCard-BXJSXz_k.js +1 -0
  72. package/dist/SearchTermsCard-DsaxLKwP.mjs +146 -0
  73. package/dist/SendPush-Bssi-OZD.mjs +150 -0
  74. package/dist/SendPush-BuaYboRH.js +1 -0
  75. package/dist/SeoHealth-CP-kL0us.js +1 -0
  76. package/dist/SeoHealth-Cxp_Gb3Y.mjs +459 -0
  77. package/dist/TableView-7iwBkQ_k.mjs +4757 -0
  78. package/dist/TableView-BB_oIYYZ.js +4 -0
  79. package/dist/TemplateList-CNcM_Kgq.mjs +56 -0
  80. package/dist/TemplateList-VuPcBUJO.js +1 -0
  81. package/dist/TopPagesCard-CvDECn3_.mjs +117 -0
  82. package/dist/TopPagesCard-DNdATXJE.js +1 -0
  83. package/dist/TrafficSourcesCard-BLpBr7u0.mjs +151 -0
  84. package/dist/TrafficSourcesCard-_3gRUCw3.js +1 -0
  85. package/dist/View-DSnUHI7h.mjs +30 -0
  86. package/dist/View-Dbcfpdqh.js +1 -0
  87. package/dist/VisitorStatsCard-CFEnXSjF.mjs +185 -0
  88. package/dist/VisitorStatsCard-C_jhQxDW.js +1 -0
  89. package/dist/_plugin-vue_export-helper-5u7tqpWC.js +1 -0
  90. package/dist/_plugin-vue_export-helper-BJQSo0im.mjs +8 -0
  91. package/dist/agenda-CzMRcQTA.mjs +989 -0
  92. package/dist/agenda-D4zWRYSQ.js +1 -0
  93. package/dist/appointments-9syR5TZE.js +1 -0
  94. package/dist/appointments-BBmOJMhM.mjs +23 -0
  95. package/dist/array-BH1uH7XT.js +1 -0
  96. package/dist/array-DnDL9cFz.mjs +98 -0
  97. package/dist/availability-CAXB7Yd6.js +1 -0
  98. package/dist/availability-Dp7eF-ZK.mjs +215 -0
  99. package/dist/booking-data-Bysf6e5x.mjs +724 -0
  100. package/dist/booking-data-C6SGjC2X.js +1 -0
  101. package/dist/chunk-DQi1bQcV.js +1 -0
  102. package/dist/cms-core-modules.css +2 -1
  103. package/dist/contentManager-D7JxXCwE.js +1 -0
  104. package/dist/contentManager-tfy0x1LD.mjs +22 -0
  105. package/dist/context-AQKfnJ4t.mjs +3809 -0
  106. package/dist/context-ubyMq9Xe.js +54 -0
  107. package/dist/core-Dhgr4ctC.mjs +202 -0
  108. package/dist/core-_HKfBlaZ.js +1 -0
  109. package/dist/countries-MXLT3mVe.mjs +4 -0
  110. package/dist/countries-OCd5qPxG.js +1 -0
  111. package/dist/create-BfNc2C7N.js +1 -0
  112. package/dist/create-C7JlIlIh.mjs +95 -0
  113. package/dist/custom-BwN9-6Mb.js +1 -0
  114. package/dist/custom-INNwaWla.mjs +13 -0
  115. package/dist/dist-BCVg7FKM.js +1 -0
  116. package/dist/dist-DIhK9VWh.mjs +3045 -0
  117. package/dist/edit-BiI2VG60.js +35 -0
  118. package/dist/edit-DD3iFBEh.mjs +1097 -0
  119. package/dist/exceptions-DICMaDcH.mjs +462 -0
  120. package/dist/exceptions-DpWqMNuG.js +1 -0
  121. package/dist/google-Bcc4XZnV.mjs +4 -0
  122. package/dist/google-DTSRmJ51.js +1 -0
  123. package/dist/googleAnalytics-BSaqRR_L.js +1 -0
  124. package/dist/googleAnalytics-Cg-iWblZ.mjs +47 -0
  125. package/dist/index.cjs.js +1 -1
  126. package/dist/index.mjs +1095 -806
  127. package/dist/interpolation-B8OzkMyi.mjs +131 -0
  128. package/dist/interpolation-DpAqtGOW.js +1 -0
  129. package/dist/lib-4wSi00Vr.js +1 -0
  130. package/dist/lib-BZgXUui5.mjs +198 -0
  131. package/dist/line-DJdnFNI7.js +75 -0
  132. package/dist/line-tYLnEDGV.mjs +1500 -0
  133. package/dist/mailTemplates-BNk8fhVS.mjs +23 -0
  134. package/dist/mailTemplates-DswHzyQe.js +1 -0
  135. package/dist/orders-CIc0JlKX.mjs +512 -0
  136. package/dist/orders-DwPSi_pD.js +1 -0
  137. package/dist/payment-BsNWFaDm.js +1 -0
  138. package/dist/payment-Ced5_dpa.mjs +718 -0
  139. package/dist/productCollections-Cuvw_8zC.js +1 -0
  140. package/dist/productCollections-D0AxRlzr.mjs +23 -0
  141. package/dist/products-DUD-ZMkR.mjs +22 -0
  142. package/dist/products-DvX9B-Ul.js +1 -0
  143. package/dist/promoCodes-BCWqN6w4.mjs +23 -0
  144. package/dist/promoCodes-CEZ4LYot.js +1 -0
  145. package/dist/push-notifications-BGp4XWo9.js +1 -0
  146. package/dist/push-notifications-C7W7KuzR.mjs +23 -0
  147. package/dist/regular-BCFrS6lK.mjs +908 -0
  148. package/dist/regular-DBqPgT8C.js +1 -0
  149. package/dist/resources-DwsMmWgm.mjs +669 -0
  150. package/dist/resources-Dz81GkHe.js +1 -0
  151. package/dist/server-handlers.cjs.js +1 -1
  152. package/dist/server-handlers.mjs +1049 -996
  153. package/dist/shippingOptions-C3NEJff1.mjs +23 -0
  154. package/dist/shippingOptions-Cy040ZW1.js +1 -0
  155. package/dist/single-container-BJmmqq65.mjs +468 -0
  156. package/dist/single-container-Xoo0Xzxv.js +58 -0
  157. package/dist/src/appointments/composables/useHorizontalScroll.d.ts +20 -0
  158. package/dist/src/appointments/index.d.ts +9 -12
  159. package/dist/src/appointments/metadata.d.ts +1 -1
  160. package/dist/src/appointments/routes.d.ts +3 -6
  161. package/dist/src/contentManager/components/content-editor/tiptap-extensions/LockBlocks.d.ts +15 -0
  162. package/dist/src/contentManager/components/content-editor/tiptap-extensions/TrailingNodeInContainers.d.ts +4 -1
  163. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/index.d.ts +12 -132
  164. package/dist/src/contentManager/index.d.ts +5 -14
  165. package/dist/src/contentManager/metadata.d.ts +1 -1
  166. package/dist/src/contentManager/routes.d.ts +3 -12
  167. package/dist/src/custom/index.d.ts +2 -2
  168. package/dist/src/custom/routes.d.ts +1 -1
  169. package/dist/src/googleAnalytics/index.d.ts +10 -10
  170. package/dist/src/googleAnalytics/routes.d.ts +1 -1
  171. package/dist/src/lib/interpolation.d.ts +6 -0
  172. package/dist/src/mailTemplates/index.d.ts +3 -3
  173. package/dist/src/mailTemplates/metadata.d.ts +1 -1
  174. package/dist/src/mailTemplates/routes.d.ts +1 -1
  175. package/dist/src/productCollections/index.d.ts +3 -3
  176. package/dist/src/productCollections/metadata.d.ts +1 -1
  177. package/dist/src/productCollections/routes.d.ts +1 -1
  178. package/dist/src/products/index.d.ts +4 -4
  179. package/dist/src/products/metadata.d.ts +1 -1
  180. package/dist/src/products/routes.d.ts +1 -1
  181. package/dist/src/promoCodes/index.d.ts +3 -3
  182. package/dist/src/promoCodes/metadata.d.ts +1 -1
  183. package/dist/src/promoCodes/routes.d.ts +1 -1
  184. package/dist/src/push-notifications/index.d.ts +3 -3
  185. package/dist/src/push-notifications/metadata.d.ts +1 -1
  186. package/dist/src/push-notifications/routes.d.ts +1 -1
  187. package/dist/src/shippingOptions/index.d.ts +3 -3
  188. package/dist/src/shippingOptions/metadata.d.ts +1 -1
  189. package/dist/src/shippingOptions/routes.d.ts +1 -1
  190. package/dist/src/table/flow-builder-extensions/row-item.d.ts +3 -17
  191. package/dist/src/table/index.d.ts +2 -2
  192. package/dist/src/table/routes.d.ts +1 -1
  193. package/dist/src/types/index.d.ts +6 -0
  194. package/dist/src/vue-shim.d.ts +7 -0
  195. package/dist/table-DWw0fs3S.js +1 -0
  196. package/dist/table-LXt5DQOL.mjs +23 -0
  197. package/dist/utils-CVIHqQsU.js +3 -0
  198. package/dist/utils-h3owcMtS.mjs +37 -0
  199. package/dist/vee-validate-zod-BmXMJo8W.js +1 -0
  200. package/dist/vee-validate-zod-D9dZzbWZ.mjs +4985 -0
  201. package/dist/xy-container-CuQSwrtB.mjs +3180 -0
  202. package/dist/xy-container-_6YpscZh.js +158 -0
  203. package/package.json +55 -55
  204. package/dist/Acquisition-Br1Pfny3.js +0 -1
  205. package/dist/Acquisition-CPlZzUBo.mjs +0 -400
  206. package/dist/AgendaOpeningHoursCard-B7ROIPWw.js +0 -1
  207. package/dist/AgendaOpeningHoursCard-Cp4wxUeK.mjs +0 -172
  208. package/dist/AppointmentDetailsCard-33WpATpV.mjs +0 -161
  209. package/dist/AppointmentDetailsCard-DpLM5IrB.js +0 -1
  210. package/dist/AppointmentEditor-BeOtYV6u.mjs +0 -196
  211. package/dist/AppointmentEditor-CaTfbkIf.js +0 -1
  212. package/dist/AppointmentListTable-DZJNmTMb.mjs +0 -177
  213. package/dist/AppointmentListTable-Dieu9US_.js +0 -1
  214. package/dist/Audience-BfkrmBuQ.js +0 -1
  215. package/dist/Audience-DTblSAiL.mjs +0 -489
  216. package/dist/Components-C83O-xlF.mjs +0 -623
  217. package/dist/Components-DXbx0RLV.js +0 -1
  218. package/dist/Content-BHr_rPVY.js +0 -1
  219. package/dist/Content-CYOZKvWK.mjs +0 -358
  220. package/dist/ContentEditor-B1nfKG_5.mjs +0 -30676
  221. package/dist/ContentEditor-DdFU8piH.js +0 -462
  222. package/dist/CountryBreakdownCard-D7BK3nRD.js +0 -1
  223. package/dist/CountryBreakdownCard-DVxNz2DJ.mjs +0 -196
  224. package/dist/Create-BRBh0xjM.mjs +0 -1247
  225. package/dist/Create-qPeQxkdl.js +0 -1
  226. package/dist/DateFormatter-Bw-87W31.mjs +0 -734
  227. package/dist/DateFormatter-CYAD4GBN.js +0 -1
  228. package/dist/Detail-Byk781b4.mjs +0 -26
  229. package/dist/Detail-C1Blq61w.mjs +0 -585
  230. package/dist/Detail-C857g62L.js +0 -1
  231. package/dist/Detail-C8wQiDcv.js +0 -1
  232. package/dist/Detail-CPqug27l.js +0 -1
  233. package/dist/Detail-CjuhjPby.js +0 -1
  234. package/dist/Detail-CtItxMX4.mjs +0 -649
  235. package/dist/Detail-CujdFApD.mjs +0 -379
  236. package/dist/Detail-Dnpnmy4-.mjs +0 -3477
  237. package/dist/Detail-mvSGbnFU.js +0 -1
  238. package/dist/DeviceBreakdownCard-DRhQ9ufG.js +0 -1
  239. package/dist/DeviceBreakdownCard-W1frLe0L.mjs +0 -159
  240. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-DWMqQvHl.mjs +0 -76
  241. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-kpjbVSXg.js +0 -1
  242. package/dist/Entries-BaS6H6ak.js +0 -1
  243. package/dist/Entries-C8UJkrVC.mjs +0 -728
  244. package/dist/Find-B24ZEhYM.mjs +0 -229
  245. package/dist/Find-D4Qa45qC.js +0 -1
  246. package/dist/GlobalStyling-C9VthHWK.mjs +0 -1588
  247. package/dist/GlobalStyling-CnSlXkZc.js +0 -25
  248. package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-9Q7TMm4u.mjs +0 -401
  249. package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-DiNzGl-q.js +0 -1
  250. package/dist/Overview-3HWhsqaz.mjs +0 -860
  251. package/dist/Overview-BCpJNiEB.mjs +0 -190
  252. package/dist/Overview-BDlBCUI_.js +0 -1
  253. package/dist/Overview-BYMrsZjM.mjs +0 -332
  254. package/dist/Overview-BbvfH1u-.js +0 -1
  255. package/dist/Overview-BrCwozey.js +0 -1
  256. package/dist/Overview-CIa1E-HH.mjs +0 -178
  257. package/dist/Overview-CpHhuiaV.js +0 -1
  258. package/dist/Overview-DAxCu9XC.js +0 -1
  259. package/dist/Overview-D_T3K6aq.mjs +0 -632
  260. package/dist/Overview-Su8ZUbMs.mjs +0 -26
  261. package/dist/Overview-T-lsy3UZ.js +0 -1
  262. package/dist/Overview-kaMhsIUq.mjs +0 -567
  263. package/dist/Overview-t0pG5xjA.js +0 -1
  264. package/dist/PeakHoursCard-9-EZFZLR.mjs +0 -182
  265. package/dist/PeakHoursCard-BR5zmta4.js +0 -1
  266. package/dist/ProductDetailsCard-6nHikw4V.mjs +0 -121
  267. package/dist/ProductDetailsCard-Bn7qrgmc.js +0 -1
  268. package/dist/RealtimeCard--APfRNc8.js +0 -1
  269. package/dist/RealtimeCard-fvQlJcM7.mjs +0 -126
  270. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Cz_22Oce.mjs +0 -2927
  271. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-DPPNc-Z5.js +0 -349
  272. package/dist/SearchTermsCard-BsB-63aH.js +0 -1
  273. package/dist/SearchTermsCard-BzVrHKqQ.mjs +0 -201
  274. package/dist/SendPush-COns44j7.js +0 -1
  275. package/dist/SendPush-CPIOjVX4.mjs +0 -184
  276. package/dist/SeoHealth-09sEOu3G.js +0 -1
  277. package/dist/SeoHealth-BzcWd_w7.mjs +0 -615
  278. package/dist/TableView-CPAw3h8g.js +0 -4
  279. package/dist/TableView-DXmEF6pY.mjs +0 -6143
  280. package/dist/TemplateList.vue_vue_type_script_setup_true_lang-B_AtWnHa.js +0 -1
  281. package/dist/TemplateList.vue_vue_type_script_setup_true_lang-Cmovy7kk.mjs +0 -40
  282. package/dist/TopPagesCard-BDeA997A.js +0 -1
  283. package/dist/TopPagesCard-CTozhOr_.mjs +0 -159
  284. package/dist/TrafficSourcesCard-BxtCKsqx.mjs +0 -197
  285. package/dist/TrafficSourcesCard-C3ziDTUL.js +0 -1
  286. package/dist/View-CsudjxCE.mjs +0 -30
  287. package/dist/View-Dw_wA6kK.js +0 -1
  288. package/dist/VisitorStatsCard-BmByE_Hi.js +0 -1
  289. package/dist/VisitorStatsCard-CXizEbVK.mjs +0 -174
  290. package/dist/_plugin-vue_export-helper-BHFhmbuH.js +0 -1
  291. package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +0 -9
  292. package/dist/agenda-BNG05SAq.js +0 -1
  293. package/dist/agenda-D1RxMxBS.mjs +0 -1152
  294. package/dist/array-CbATeQbk.js +0 -1
  295. package/dist/array-CvmZXzxF.mjs +0 -108
  296. package/dist/availability-CMrRa5y2.mjs +0 -269
  297. package/dist/availability-Cf2YfMwM.js +0 -1
  298. package/dist/booking-data-DgJd0BcM.mjs +0 -889
  299. package/dist/booking-data-Di5GmH_8.js +0 -1
  300. package/dist/countries-BTPvmrsb.mjs +0 -4
  301. package/dist/countries-CgZ081No.js +0 -1
  302. package/dist/exceptions-CI0B4xVj.js +0 -1
  303. package/dist/exceptions-vo8SA5SE.mjs +0 -646
  304. package/dist/google-CvtuJwgk.mjs +0 -4
  305. package/dist/google-D4N3gb01.js +0 -1
  306. package/dist/index-4tjmIans.js +0 -1
  307. package/dist/index-9HVlmvK3.js +0 -1
  308. package/dist/index-BWDwEd8D.mjs +0 -24
  309. package/dist/index-BfBBm9uY.mjs +0 -24
  310. package/dist/index-Bkq58CeQ.mjs +0 -22
  311. package/dist/index-BtujSJeg.js +0 -35
  312. package/dist/index-BuzLn4Km.js +0 -54
  313. package/dist/index-C4YUVWzJ.js +0 -75
  314. package/dist/index-CJQQBRLY.js +0 -1
  315. package/dist/index-CMk3uhUt.mjs +0 -3837
  316. package/dist/index-CQkOH2_3.mjs +0 -24
  317. package/dist/index-CSxYBeVA.js +0 -1
  318. package/dist/index-CU-tbS5W.mjs +0 -24
  319. package/dist/index-CZn2nDLv.mjs +0 -34
  320. package/dist/index-CkiNvRzs.js +0 -1
  321. package/dist/index-Co4ON2Di.js +0 -1
  322. package/dist/index-Cpnn_Pxd.mjs +0 -24
  323. package/dist/index-CrgzoTyR.mjs +0 -110
  324. package/dist/index-CsVeM3PA.mjs +0 -24
  325. package/dist/index-CwqrAU-H.js +0 -1
  326. package/dist/index-CxETuRsG.js +0 -1
  327. package/dist/index-Cz-baGax.js +0 -1
  328. package/dist/index-D3L8WAJI.js +0 -58
  329. package/dist/index-DFQGVHTs.js +0 -1
  330. package/dist/index-DPd3waTN.js +0 -1
  331. package/dist/index-DQYBP8Js.js +0 -158
  332. package/dist/index-DRqJOqUR.mjs +0 -3484
  333. package/dist/index-DjDCYQ_6.mjs +0 -441
  334. package/dist/index-DjWuIBxh.js +0 -1
  335. package/dist/index-Dnn2SCSl.js +0 -1
  336. package/dist/index-Dpl9sU6a.mjs +0 -12
  337. package/dist/index-DrXxXB2F.mjs +0 -138
  338. package/dist/index-MYWjg0zi.mjs +0 -176
  339. package/dist/index-R2oUDsjx.js +0 -1
  340. package/dist/index-RLz1QPrf.mjs +0 -203
  341. package/dist/index-UtjLbLw-.js +0 -1
  342. package/dist/index-_2lRVt_k.mjs +0 -2942
  343. package/dist/index-cOnxXTbF.mjs +0 -24
  344. package/dist/index-dOdMm1pV.mjs +0 -1105
  345. package/dist/index-hlylYYgy.mjs +0 -24
  346. package/dist/index-ijdf0d9-.js +0 -1
  347. package/dist/index-p5Uqu8c2.mjs +0 -1438
  348. package/dist/interpolation-DEDSLETn.mjs +0 -128
  349. package/dist/interpolation-DERg6Lwt.js +0 -1
  350. package/dist/orders-CzzcFQha.mjs +0 -559
  351. package/dist/orders-ETtbA4aQ.js +0 -1
  352. package/dist/payment-C3ohkehF.mjs +0 -1080
  353. package/dist/payment-Dfr-Ro-a.js +0 -1
  354. package/dist/regular-1LXNPviB.js +0 -1
  355. package/dist/regular-_05oq5Tx.mjs +0 -1101
  356. package/dist/resources-CxeFd57z.js +0 -1
  357. package/dist/resources-WI_4SO6T.mjs +0 -811
  358. package/dist/src/appointments/chat-components/AgendaOpeningHoursCard.vue.d.ts +0 -15
  359. package/dist/src/appointments/chat-components/AppointmentDetailsCard.vue.d.ts +0 -14
  360. package/dist/src/appointments/chat-components/AppointmentEditor.vue.d.ts +0 -14
  361. package/dist/src/appointments/chat-components/AppointmentListTable.vue.d.ts +0 -14
  362. package/dist/src/appointments/components/create/StepNavigation.vue.d.ts +0 -32
  363. package/dist/src/appointments/components/create/regular/Step1.vue.d.ts +0 -2
  364. package/dist/src/appointments/components/create/regular/Step2.vue.d.ts +0 -2
  365. package/dist/src/appointments/components/create/regular/Step3.vue.d.ts +0 -2
  366. package/dist/src/appointments/components/create/regular/Step4.vue.d.ts +0 -2
  367. package/dist/src/appointments/components/edit/CustomerInformationFieldEditorDialog.vue.d.ts +0 -24
  368. package/dist/src/appointments/components/edit/EditLayout.vue.d.ts +0 -17
  369. package/dist/src/appointments/components/edit/Event24hSidebar.vue.d.ts +0 -2
  370. package/dist/src/appointments/components/edit/EventDialog/ApproveReservationDialog.vue.d.ts +0 -8
  371. package/dist/src/appointments/components/edit/EventDialog/BookingsList.vue.d.ts +0 -127
  372. package/dist/src/appointments/components/edit/EventDialog/CancelReservationDialog.vue.d.ts +0 -8
  373. package/dist/src/appointments/components/edit/EventDialog/EventDialog.vue.d.ts +0 -11
  374. package/dist/src/appointments/components/edit/EventDialog/RejectReservationDialog.vue.d.ts +0 -8
  375. package/dist/src/appointments/components/edit/EventDialog/ReservationDetailDialog.vue.d.ts +0 -82
  376. package/dist/src/appointments/components/edit/EventDialog/TimelineChart.vue.d.ts +0 -24
  377. package/dist/src/appointments/components/edit/EventDialog/TransferReservationDialog.vue.d.ts +0 -4
  378. package/dist/src/appointments/components/edit/EventTimeIndicator.vue.d.ts +0 -12
  379. package/dist/src/appointments/components/edit/EventTimeline.vue.d.ts +0 -48
  380. package/dist/src/appointments/components/edit/EventView.vue.d.ts +0 -9
  381. package/dist/src/appointments/components/edit/ExceptionDialog.vue.d.ts +0 -29
  382. package/dist/src/appointments/components/edit/MetadataSchemaEditorDialog.vue.d.ts +0 -12
  383. package/dist/src/appointments/components/edit/NewReservationDialog/NewReservationDialog.vue.d.ts +0 -2
  384. package/dist/src/appointments/components/edit/OrderMetadataDisplay.vue.d.ts +0 -21
  385. package/dist/src/appointments/components/edit/PaymentAddons/Addon.vue.d.ts +0 -22
  386. package/dist/src/appointments/components/edit/PaymentAddons/AddonList.vue.d.ts +0 -5
  387. package/dist/src/appointments/components/edit/PaymentAddons/index.vue.d.ts +0 -15
  388. package/dist/src/appointments/components/edit/ResourceEditorDialog.vue.d.ts +0 -13
  389. package/dist/src/appointments/components/edit/dashboard/BookingsList.vue.d.ts +0 -110
  390. package/dist/src/appointments/components/edit/dashboard/Timeline.vue.d.ts +0 -34
  391. package/dist/src/appointments/components/edit/dashboard/timeline/ResourceSelector.vue.d.ts +0 -50
  392. package/dist/src/appointments/index.vue.d.ts +0 -22
  393. package/dist/src/appointments/pages/Overview.vue.d.ts +0 -4
  394. package/dist/src/appointments/pages/create/index.vue.d.ts +0 -2
  395. package/dist/src/appointments/pages/create/regular.vue.d.ts +0 -6
  396. package/dist/src/appointments/pages/edit/agenda.vue.d.ts +0 -4
  397. package/dist/src/appointments/pages/edit/availability.vue.d.ts +0 -2
  398. package/dist/src/appointments/pages/edit/booking-data.vue.d.ts +0 -65
  399. package/dist/src/appointments/pages/edit/index.vue.d.ts +0 -2
  400. package/dist/src/appointments/pages/edit/orders.vue.d.ts +0 -98
  401. package/dist/src/appointments/pages/edit/payment.vue.d.ts +0 -2
  402. package/dist/src/appointments/pages/edit/resources.vue.d.ts +0 -28
  403. package/dist/src/contentManager/components/components/ComponentDialog.vue.d.ts +0 -12
  404. package/dist/src/contentManager/components/components/ComponentGridItem.vue.d.ts +0 -16
  405. package/dist/src/contentManager/components/content-editor/ApiDocs.vue.d.ts +0 -2
  406. package/dist/src/contentManager/components/content-editor/ContentLayout.vue.d.ts +0 -49
  407. package/dist/src/contentManager/components/content-editor/ContentSettings.vue.d.ts +0 -24
  408. package/dist/src/contentManager/components/content-editor/ContentStructuredContentSections.vue.d.ts +0 -4
  409. package/dist/src/contentManager/components/content-editor/Header.vue.d.ts +0 -64
  410. package/dist/src/contentManager/components/content-editor/LivePreviewWrapper.vue.d.ts +0 -53
  411. package/dist/src/contentManager/components/content-editor/Locales.vue.d.ts +0 -44
  412. package/dist/src/contentManager/components/content-editor/NewSectionDialog.vue.d.ts +0 -21
  413. package/dist/src/contentManager/components/content-editor/PageSettings.vue.d.ts +0 -2
  414. package/dist/src/contentManager/components/content-editor/SEO.vue.d.ts +0 -14
  415. package/dist/src/contentManager/components/content-editor/SidebarSectionWrapper.vue.d.ts +0 -39
  416. package/dist/src/contentManager/components/content-editor/Status.vue.d.ts +0 -2
  417. package/dist/src/contentManager/components/content-editor/Versions.vue.d.ts +0 -63
  418. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Button.vue.d.ts +0 -94
  419. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Card.vue.d.ts +0 -92
  420. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Column.vue.d.ts +0 -92
  421. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Container.vue.d.ts +0 -92
  422. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Divider.vue.d.ts +0 -92
  423. package/dist/src/contentManager/components/content-editor/tiptap-extensions/EmptySpace.vue.d.ts +0 -94
  424. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Heading.vue.d.ts +0 -92
  425. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Image.vue.d.ts +0 -92
  426. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Map.vue.d.ts +0 -92
  427. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Paragraph.vue.d.ts +0 -92
  428. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Row.vue.d.ts +0 -115
  429. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Stack.vue.d.ts +0 -115
  430. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Video.vue.d.ts +0 -92
  431. package/dist/src/contentManager/components/content-editor/tiptap-extensions/extension-details/DetailsNodeView.vue.d.ts +0 -92
  432. package/dist/src/contentManager/components/content-editor/tiptap-extensions/helpers/NodeLabel.vue.d.ts +0 -108
  433. package/dist/src/contentManager/components/content-editor/tiptap-extensions/helpers/ResizeHandlers.vue.d.ts +0 -20
  434. package/dist/src/contentManager/components/content-editor/tiptap-extensions/helpers/TopMarginDragger.vue.d.ts +0 -104
  435. package/dist/src/contentManager/components/content-editor/tiptap-menus/BubbleMenuClassBuilder.vue.d.ts +0 -19
  436. package/dist/src/contentManager/components/content-editor/tiptap-menus/BubbleMenuLinkBuilder.vue.d.ts +0 -19
  437. package/dist/src/contentManager/components/content-editor/tiptap-menus/BubbleMenuToggleButton.vue.d.ts +0 -29
  438. package/dist/src/contentManager/components/content-editor/tiptap-menus/DefaultBubbleMenu.vue.d.ts +0 -13
  439. package/dist/src/contentManager/components/content-editor/tiptap-menus/ElementEditorMenu.vue.d.ts +0 -19
  440. package/dist/src/contentManager/components/content-editor/tiptap-menus/EmojiMenu.vue.d.ts +0 -8
  441. package/dist/src/contentManager/components/content-editor/tiptap-menus/NewNodeView.vue.d.ts +0 -47
  442. package/dist/src/contentManager/components/content-editor/tiptap-menus/SlashMenu.vue.d.ts +0 -6
  443. package/dist/src/contentManager/components/content-editor/tiptap-menus/SlashMenuButton.vue.d.ts +0 -17
  444. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/ButtonMenu.vue.d.ts +0 -13
  445. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/CardMenu.vue.d.ts +0 -13
  446. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/ColumnMenu.vue.d.ts +0 -13
  447. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/DividerMenu.vue.d.ts +0 -13
  448. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/EmptySpaceMenu.vue.d.ts +0 -13
  449. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/HeadingMenu.vue.d.ts +0 -13
  450. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/ImageMenu.vue.d.ts +0 -13
  451. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/MapMenu.vue.d.ts +0 -13
  452. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/RowMenu.vue.d.ts +0 -13
  453. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/StackMenu.vue.d.ts +0 -13
  454. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/TextMenu.vue.d.ts +0 -13
  455. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/VideoMenu.vue.d.ts +0 -13
  456. package/dist/src/contentManager/components/overview/CollectionDialog.vue.d.ts +0 -30
  457. package/dist/src/contentManager/components/overview/CollectionsGridView.vue.d.ts +0 -18
  458. package/dist/src/contentManager/components/overview/ContentEntryContextMenu.vue.d.ts +0 -27
  459. package/dist/src/contentManager/components/overview/FilterPopover.vue.d.ts +0 -2
  460. package/dist/src/contentManager/components/overview/ListView.vue.d.ts +0 -12
  461. package/dist/src/contentManager/components/styling/ButtonStyleDialog.vue.d.ts +0 -24
  462. package/dist/src/contentManager/components/styling/CardStyleDialog.vue.d.ts +0 -24
  463. package/dist/src/contentManager/components/styling/SectionStyleDialog.vue.d.ts +0 -24
  464. package/dist/src/contentManager/index.vue.d.ts +0 -22
  465. package/dist/src/contentManager/pages/Components.vue.d.ts +0 -27
  466. package/dist/src/contentManager/pages/ContentEditor.vue.d.ts +0 -14
  467. package/dist/src/contentManager/pages/Entries.vue.d.ts +0 -16
  468. package/dist/src/contentManager/pages/GlobalStyling.vue.d.ts +0 -117
  469. package/dist/src/contentManager/pages/Overview.vue.d.ts +0 -57
  470. package/dist/src/custom/index.vue.d.ts +0 -2
  471. package/dist/src/custom/pages/View.vue.d.ts +0 -2
  472. package/dist/src/googleAnalytics/chat-components/CountryBreakdownCard.vue.d.ts +0 -14
  473. package/dist/src/googleAnalytics/chat-components/DeviceBreakdownCard.vue.d.ts +0 -14
  474. package/dist/src/googleAnalytics/chat-components/PeakHoursCard.vue.d.ts +0 -14
  475. package/dist/src/googleAnalytics/chat-components/RealtimeCard.vue.d.ts +0 -14
  476. package/dist/src/googleAnalytics/chat-components/SearchTermsCard.vue.d.ts +0 -14
  477. package/dist/src/googleAnalytics/chat-components/TopPagesCard.vue.d.ts +0 -14
  478. package/dist/src/googleAnalytics/chat-components/TrafficSourcesCard.vue.d.ts +0 -14
  479. package/dist/src/googleAnalytics/chat-components/VisitorStatsCard.vue.d.ts +0 -14
  480. package/dist/src/googleAnalytics/components/seo-health/SeoClicksChart.vue.d.ts +0 -5
  481. package/dist/src/googleAnalytics/components/seo-health/SeoImpressionsChart.vue.d.ts +0 -5
  482. package/dist/src/googleAnalytics/components/seo-health/SeoKeywordsTab.vue.d.ts +0 -5
  483. package/dist/src/googleAnalytics/components/seo-health/SeoKpiCards.vue.d.ts +0 -10
  484. package/dist/src/googleAnalytics/components/seo-health/SeoMappingTab.vue.d.ts +0 -5
  485. package/dist/src/googleAnalytics/components/seo-health/SeoPagesTab.vue.d.ts +0 -5
  486. package/dist/src/googleAnalytics/components/seo-health/SeoRankingDistribution.vue.d.ts +0 -5
  487. package/dist/src/googleAnalytics/index.vue.d.ts +0 -2
  488. package/dist/src/googleAnalytics/pages/Acquisition.vue.d.ts +0 -2
  489. package/dist/src/googleAnalytics/pages/Audience.vue.d.ts +0 -2
  490. package/dist/src/googleAnalytics/pages/Content.vue.d.ts +0 -2
  491. package/dist/src/googleAnalytics/pages/Overview.vue.d.ts +0 -2
  492. package/dist/src/googleAnalytics/pages/SeoHealth.vue.d.ts +0 -2
  493. package/dist/src/mailTemplates/components/TemplateList.vue.d.ts +0 -2
  494. package/dist/src/mailTemplates/index.vue.d.ts +0 -22
  495. package/dist/src/mailTemplates/pages/Detail.vue.d.ts +0 -14
  496. package/dist/src/mailTemplates/pages/Overview.vue.d.ts +0 -14
  497. package/dist/src/productCollections/components/detail/Main.vue.d.ts +0 -2
  498. package/dist/src/productCollections/components/detail/SEO.vue.d.ts +0 -2
  499. package/dist/src/productCollections/components/detail/Status.vue.d.ts +0 -2
  500. package/dist/src/productCollections/components/overview/ListView.vue.d.ts +0 -12
  501. package/dist/src/productCollections/index.vue.d.ts +0 -22
  502. package/dist/src/productCollections/pages/Detail.vue.d.ts +0 -14
  503. package/dist/src/productCollections/pages/Overview.vue.d.ts +0 -16
  504. package/dist/src/products/chat-components/ProductDetailsCard.vue.d.ts +0 -14
  505. package/dist/src/products/components/detail/Collections.vue.d.ts +0 -14
  506. package/dist/src/products/components/detail/Inventory.vue.d.ts +0 -2
  507. package/dist/src/products/components/detail/Main.vue.d.ts +0 -2
  508. package/dist/src/products/components/detail/NewSection.vue.d.ts +0 -2
  509. package/dist/src/products/components/detail/Price.vue.d.ts +0 -2
  510. package/dist/src/products/components/detail/SEO.vue.d.ts +0 -2
  511. package/dist/src/products/components/detail/Shipping.vue.d.ts +0 -2
  512. package/dist/src/products/components/detail/Status.vue.d.ts +0 -2
  513. package/dist/src/products/components/detail/price/UnitPriceDialog.vue.d.ts +0 -17
  514. package/dist/src/products/components/detail/variants/Option.vue.d.ts +0 -33
  515. package/dist/src/products/components/detail/variants/VariantList.vue.d.ts +0 -38
  516. package/dist/src/products/components/overview/FilterPopover.vue.d.ts +0 -2
  517. package/dist/src/products/components/overview/GridView.vue.d.ts +0 -12
  518. package/dist/src/products/components/overview/ListView.vue.d.ts +0 -12
  519. package/dist/src/products/components/overview/ProductContextMenu.vue.d.ts +0 -27
  520. package/dist/src/products/index.vue.d.ts +0 -22
  521. package/dist/src/products/pages/Detail.vue.d.ts +0 -14
  522. package/dist/src/products/pages/Overview.vue.d.ts +0 -16
  523. package/dist/src/promoCodes/components/create/DateRange.vue.d.ts +0 -2
  524. package/dist/src/promoCodes/components/create/MultiCodes.vue.d.ts +0 -2
  525. package/dist/src/promoCodes/components/create/Note.vue.d.ts +0 -2
  526. package/dist/src/promoCodes/components/create/SingleCode.vue.d.ts +0 -2
  527. package/dist/src/promoCodes/components/create/TypeAndValue/TypeDetailDialog.vue.d.ts +0 -6
  528. package/dist/src/promoCodes/components/create/TypeAndValue/TypeManageDialog.vue.d.ts +0 -18
  529. package/dist/src/promoCodes/components/create/TypeAndValue/index.vue.d.ts +0 -2
  530. package/dist/src/promoCodes/index.vue.d.ts +0 -22
  531. package/dist/src/promoCodes/pages/Create.vue.d.ts +0 -16
  532. package/dist/src/promoCodes/pages/Detail.vue.d.ts +0 -14
  533. package/dist/src/promoCodes/pages/Find.vue.d.ts +0 -16
  534. package/dist/src/push-notifications/components/PreviewAndroid.vue.d.ts +0 -28
  535. package/dist/src/push-notifications/components/PreviewIPhone.vue.d.ts +0 -28
  536. package/dist/src/push-notifications/components/PushPreview.vue.d.ts +0 -28
  537. package/dist/src/push-notifications/index.vue.d.ts +0 -22
  538. package/dist/src/push-notifications/pages/SendPush.vue.d.ts +0 -14
  539. package/dist/src/shared/BrandLogo.vue.d.ts +0 -12
  540. package/dist/src/shared/DrawerToggle.vue.d.ts +0 -60
  541. package/dist/src/shared/VerticalToggle.vue.d.ts +0 -60
  542. package/dist/src/shippingOptions/components/detail/Condition.vue.d.ts +0 -2
  543. package/dist/src/shippingOptions/components/detail/Countries.vue.d.ts +0 -2
  544. package/dist/src/shippingOptions/components/detail/Example.vue.d.ts +0 -2
  545. package/dist/src/shippingOptions/components/detail/Main.vue.d.ts +0 -2
  546. package/dist/src/shippingOptions/components/overview/ListView.vue.d.ts +0 -12
  547. package/dist/src/shippingOptions/index.vue.d.ts +0 -22
  548. package/dist/src/shippingOptions/pages/Detail.vue.d.ts +0 -14
  549. package/dist/src/shippingOptions/pages/Overview.vue.d.ts +0 -16
  550. package/dist/src/table/components/DataTable.vue.d.ts +0 -18
  551. package/dist/src/table/components/DataTableAction.vue.d.ts +0 -14
  552. package/dist/src/table/components/DataTableMobileRowActionDrawer.vue.d.ts +0 -4
  553. package/dist/src/table/components/DataTablePagination.vue.d.ts +0 -6
  554. package/dist/src/table/components/actions/ActionDialog.vue.d.ts +0 -19
  555. package/dist/src/table/components/actions/CtaActionDialog.vue.d.ts +0 -4
  556. package/dist/src/table/components/columns/ColumnDropdown.vue.d.ts +0 -2
  557. package/dist/src/table/components/columns/ColumnEditorDialog.vue.d.ts +0 -34
  558. package/dist/src/table/components/columns/DialogTableColumnItem.vue.d.ts +0 -12
  559. package/dist/src/table/components/date-range-filter/DateRangeFilter.vue.d.ts +0 -2
  560. package/dist/src/table/components/date-range-filter/DateRangeSettingsDialog.vue.d.ts +0 -27
  561. package/dist/src/table/components/filters/FilterDialog.vue.d.ts +0 -12
  562. package/dist/src/table/components/filters/Filters.vue.d.ts +0 -27
  563. package/dist/src/table/components/search/Search.vue.d.ts +0 -2
  564. package/dist/src/table/components/sort/SortMode.vue.d.ts +0 -2
  565. package/dist/src/table/components/sort/SortModeSettingsDialog.vue.d.ts +0 -18
  566. package/dist/src/table/components/stats/StatDialog.vue.d.ts +0 -12
  567. package/dist/src/table/components/stats/Stats.vue.d.ts +0 -27
  568. package/dist/src/table/flow-builder-extensions/TableRowEditor.vue.d.ts +0 -16
  569. package/dist/src/table/index.vue.d.ts +0 -22
  570. package/dist/src/table/pages/TableView.vue.d.ts +0 -54
  571. package/dist/utils-CanmrIWO.mjs +0 -47
  572. package/dist/utils-Yd6F5mea.js +0 -3
  573. package/dist/vee-validate-zod-ByykgYKJ.js +0 -1
  574. package/dist/vee-validate-zod-CcOwoF6y.mjs +0 -4402
@@ -0,0 +1,1002 @@
1
+ import { a as e, o as t, t as n } from "./DateFormatter-DLrDYkby.mjs";
2
+ import { t as r } from "./_plugin-vue_export-helper-BJQSo0im.mjs";
3
+ import { t as i } from "./utils-h3owcMtS.mjs";
4
+ import { useFirebaseIntegration as a, useModule as o, useModuleRoute as s } from "@oneclick.dev/cms-kit";
5
+ import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createTextVNode as m, createVNode as h, defineComponent as g, inject as _, isRef as v, markRaw as y, nextTick as b, normalizeClass as x, onBeforeUnmount as S, onMounted as C, openBlock as w, reactive as T, ref as E, renderList as D, resolveComponent as O, toDisplayString as k, unref as A, watch as j, withCtx as M } from "vue";
6
+ import { CalendarIcon as N, Check as P, ChevronLeft as F, ChevronRight as I, Pencil as L, Plus as R, Tag as z, Trash2 as B, Users as V, X as H, Zap as U } from "@lucide/vue";
7
+ //#region src/appointments/components/edit/NewReservationDialog/CustomerInformation.vue?vue&type=script&setup=true&lang.ts
8
+ var W = { class: "space-y-3" }, G = { class: "grid gap-4 @md/modal:grid-cols-2 @2xl/modal:grid-cols-3 @4xl/modal:grid-cols-4 overflow-hidden p-1" }, K = {
9
+ key: 0,
10
+ class: "flex items-center gap-3 min-h-9"
11
+ }, q = {
12
+ key: 0,
13
+ class: "italic text-xs opacity-50"
14
+ }, J = {
15
+ key: 0,
16
+ class: "italic text-xs opacity-50"
17
+ }, Y = {
18
+ key: 0,
19
+ class: "italic text-xs opacity-50"
20
+ }, X = {
21
+ key: 0,
22
+ class: "italic text-xs opacity-50"
23
+ }, Z = {
24
+ key: 0,
25
+ class: "text-red-400"
26
+ }, ee = { class: "list-disc pl-4" }, te = /* @__PURE__ */ g({
27
+ __name: "CustomerInformation",
28
+ props: { agendaData: {} },
29
+ setup(e, { expose: t }) {
30
+ let n = [
31
+ {
32
+ id: "firstName",
33
+ fieldName: "First Name",
34
+ fieldType: "text",
35
+ required: !0,
36
+ visible: !0
37
+ },
38
+ {
39
+ id: "lastName",
40
+ fieldName: "Last Name",
41
+ fieldType: "text",
42
+ required: !0,
43
+ visible: !0
44
+ },
45
+ {
46
+ id: "phone",
47
+ fieldName: "Phone No",
48
+ fieldType: "tel",
49
+ required: !0,
50
+ visible: !0
51
+ },
52
+ {
53
+ id: "email",
54
+ fieldName: "Email",
55
+ fieldType: "email",
56
+ required: !0,
57
+ visible: !0
58
+ },
59
+ {
60
+ id: "birthdate",
61
+ fieldName: "Birthdate",
62
+ fieldType: "date",
63
+ required: !0,
64
+ visible: !0
65
+ }
66
+ ], r = new Set(["firstName", "email"]), i = e, a = E([]), o = T({}), s = l(() => {
67
+ let e = i.agendaData?.customerInformationFields, t = (Array.isArray(e) && e.length > 0 ? e : n).filter((e) => e?.id && (e.visible !== !1 || r.has(e.id))).map((e) => ({
68
+ ...e,
69
+ required: r.has(e.id),
70
+ visible: !0
71
+ })), a = n.filter((e) => r.has(e.id) && !t.some((t) => t.id === e.id)).map((e) => ({
72
+ ...e,
73
+ required: !0,
74
+ visible: !0
75
+ }));
76
+ return [...t, ...a];
77
+ }), g = (e) => e.fieldName || e.id, _ = (e) => e.replace(/[^A-Za-z0-9_-]/g, "-"), v = (e, t) => [
78
+ "new-res-customer-info",
79
+ e.id,
80
+ t
81
+ ].filter(Boolean).map((e) => _(e)).join("-"), y = (e) => e.fieldType === "email" || e.fieldType === "tel" || e.fieldType === "date" ? e.fieldType : "text", b = (e) => Array.isArray(e.options) ? e.options.filter(Boolean) : [], S = (e) => e.fieldType === "checkbox" ? !1 : "", C = (e = !1) => {
82
+ let t = new Set(s.value.map((e) => e.id));
83
+ Object.keys(o).forEach((e) => {
84
+ t.has(e) || delete o[e];
85
+ }), s.value.forEach((t) => {
86
+ let n = S(t);
87
+ (e || o[t.id] === void 0 || typeof o[t.id] != typeof n) && (o[t.id] = n);
88
+ });
89
+ }, A = () => {
90
+ let e = s.value.reduce((e, t) => {
91
+ let n = o[t.id];
92
+ return e[t.id] = typeof n == "string" ? n.trim() : !!n, e;
93
+ }, {});
94
+ return Object.entries(e).forEach(([e, t]) => {
95
+ o[e] = t;
96
+ }), e;
97
+ }, N = (e, t) => e.fieldType === "checkbox" ? t === !0 : typeof t == "string" ? t.trim().length > 0 : t != null;
98
+ return j(s, () => {
99
+ C();
100
+ }, { immediate: !0 }), t({
101
+ getCustomerInfo: A,
102
+ reset: () => {
103
+ a.value = [], C(!0);
104
+ },
105
+ validateForm: () => {
106
+ let e = [], t = A();
107
+ return s.value.forEach((n) => {
108
+ let r = t[n.id], i = g(n);
109
+ n.required && !N(n, r) && e.push(`Please fill in ${i}.`), n.fieldType === "email" && N(n, r) && typeof r == "string" && /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r) === !1 && e.push(`Please fill in a correct ${i}.`);
110
+ }), a.value = e, e.length === 0;
111
+ }
112
+ }), (e, t) => {
113
+ let n = O("Checkbox"), r = O("Label"), i = O("SelectValue"), l = O("SelectTrigger"), _ = O("SelectItem"), S = O("SelectGroup"), C = O("SelectContent"), T = O("Select"), E = O("RadioGroupItem"), A = O("RadioGroup"), j = O("Input");
114
+ return w(), f("div", W, [
115
+ t[0] ||= p("h2", { class: "text-sm font-medium" }, "Customer Information", -1),
116
+ p("div", G, [(w(!0), f(c, null, D(s.value, (e) => (w(), f("div", {
117
+ key: e.id,
118
+ class: x(["grid gap-2", e.fieldType === "checkbox" ? "@md/modal:col-span-2" : ""])
119
+ }, [e.fieldType === "checkbox" ? (w(), f("div", K, [h(n, {
120
+ id: v(e),
121
+ modelValue: o[e.id],
122
+ "onUpdate:modelValue": (t) => o[e.id] = t
123
+ }, null, 8, [
124
+ "id",
125
+ "modelValue",
126
+ "onUpdate:modelValue"
127
+ ]), h(r, {
128
+ for: v(e),
129
+ class: "font-normal cursor-pointer"
130
+ }, {
131
+ default: M(() => [m(k(g(e)) + " ", 1), e.required ? d("", !0) : (w(), f("span", q, "optional"))]),
132
+ _: 2
133
+ }, 1032, ["for"])])) : e.fieldType === "select" ? (w(), f(c, { key: 1 }, [h(r, { for: v(e) }, {
134
+ default: M(() => [m(k(g(e)) + " ", 1), e.required ? d("", !0) : (w(), f("span", J, "optional"))]),
135
+ _: 2
136
+ }, 1032, ["for"]), h(T, {
137
+ modelValue: o[e.id],
138
+ "onUpdate:modelValue": (t) => o[e.id] = t
139
+ }, {
140
+ default: M(() => [h(l, {
141
+ id: v(e),
142
+ class: "w-full"
143
+ }, {
144
+ default: M(() => [h(i, { placeholder: `Select ${g(e)}` }, null, 8, ["placeholder"])]),
145
+ _: 2
146
+ }, 1032, ["id"]), h(C, null, {
147
+ default: M(() => [h(S, null, {
148
+ default: M(() => [(w(!0), f(c, null, D(b(e), (e) => (w(), u(_, {
149
+ key: e,
150
+ value: e
151
+ }, {
152
+ default: M(() => [m(k(e), 1)]),
153
+ _: 2
154
+ }, 1032, ["value"]))), 128))]),
155
+ _: 2
156
+ }, 1024)]),
157
+ _: 2
158
+ }, 1024)]),
159
+ _: 2
160
+ }, 1032, ["modelValue", "onUpdate:modelValue"])], 64)) : e.fieldType === "radio" ? (w(), f(c, { key: 2 }, [h(r, null, {
161
+ default: M(() => [m(k(g(e)) + " ", 1), e.required ? d("", !0) : (w(), f("span", Y, "optional"))]),
162
+ _: 2
163
+ }, 1024), h(A, {
164
+ modelValue: o[e.id],
165
+ "onUpdate:modelValue": (t) => o[e.id] = t,
166
+ class: "grid gap-2"
167
+ }, {
168
+ default: M(() => [(w(!0), f(c, null, D(b(e), (t) => (w(), f("div", {
169
+ key: t,
170
+ class: "flex items-center gap-2"
171
+ }, [h(E, {
172
+ id: v(e, t),
173
+ value: t
174
+ }, null, 8, ["id", "value"]), h(r, {
175
+ for: v(e, t),
176
+ class: "font-normal cursor-pointer"
177
+ }, {
178
+ default: M(() => [m(k(t), 1)]),
179
+ _: 2
180
+ }, 1032, ["for"])]))), 128))]),
181
+ _: 2
182
+ }, 1032, ["modelValue", "onUpdate:modelValue"])], 64)) : (w(), f(c, { key: 3 }, [h(r, { for: v(e) }, {
183
+ default: M(() => [m(k(g(e)) + " ", 1), e.required ? d("", !0) : (w(), f("span", X, "optional"))]),
184
+ _: 2
185
+ }, 1032, ["for"]), h(j, {
186
+ modelValue: o[e.id],
187
+ "onUpdate:modelValue": (t) => o[e.id] = t,
188
+ id: v(e),
189
+ type: y(e),
190
+ autocomplete: "off"
191
+ }, null, 8, [
192
+ "modelValue",
193
+ "onUpdate:modelValue",
194
+ "id",
195
+ "type"
196
+ ])], 64))], 2))), 128))]),
197
+ a.value.length > 0 ? (w(), f("div", Z, [p("ul", ee, [(w(!0), f(c, null, D(a.value, (e) => (w(), f("li", { key: e }, k(e), 1))), 128))])])) : d("", !0)
198
+ ]);
199
+ };
200
+ }
201
+ });
202
+ //#endregion
203
+ //#region src/appointments/composables/useHorizontalScroll.ts
204
+ function ne(e = {}) {
205
+ let t = E(null), n = E(!1), r = E(!1), i = E(!1), a = E(!1), o = e.dragSpeed ?? 1.1, s = e.dragThreshold ?? 10, c = e.edgeThreshold ?? 10, u = e.ignoreDragSelector ?? "input, select, textarea, [contenteditable=\"true\"], [data-horizontal-scroll-ignore-drag]", d = null, f = 0, p = 0, m = !1, h = null, g = null, _ = null, v = () => {
206
+ h === null || typeof window > "u" || (window.clearTimeout(h), h = null);
207
+ }, y = () => {
208
+ let e = t.value;
209
+ if (!e) {
210
+ r.value = !1, i.value = !1, a.value = !1;
211
+ return;
212
+ }
213
+ let n = Math.max(e.scrollWidth - e.clientWidth, 0);
214
+ r.value = n > c, i.value = r.value && e.scrollLeft > c, a.value = r.value && e.scrollLeft < n - c;
215
+ }, x = () => {
216
+ b(() => {
217
+ if (typeof window > "u") {
218
+ y();
219
+ return;
220
+ }
221
+ window.requestAnimationFrame(() => y());
222
+ });
223
+ }, w = () => {
224
+ if (typeof e.scrollStep == "number") return e.scrollStep;
225
+ let n = t.value;
226
+ return n ? Math.max(Math.floor(n.clientWidth * .72), 180) : 240;
227
+ }, T = (e, n = "smooth") => {
228
+ let r = t.value;
229
+ if (r) {
230
+ if (r.scrollBy({
231
+ left: e,
232
+ behavior: n
233
+ }), n === "auto") {
234
+ y();
235
+ return;
236
+ }
237
+ x();
238
+ }
239
+ }, D = () => {
240
+ T(-w());
241
+ }, O = () => {
242
+ T(w());
243
+ }, k = () => {
244
+ let e = t.value;
245
+ d !== null && e?.hasPointerCapture?.(d) && e.releasePointerCapture(d), n.value && (m = !0, v(), typeof window < "u" && (h = window.setTimeout(() => {
246
+ m = !1, h = null;
247
+ }, 0))), d = null, n.value = !1, e && (e.style.userSelect = "", e.style.cursor = ""), y();
248
+ }, A = () => {
249
+ y();
250
+ }, M = (e) => {
251
+ let n = t.value;
252
+ if (!n || !r.value || Math.abs(e.deltaY) <= Math.abs(e.deltaX)) return;
253
+ let o = e.deltaY < 0, s = e.deltaY > 0;
254
+ o && !i.value || s && !a.value || (e.preventDefault(), n.scrollLeft += e.deltaY, y());
255
+ }, N = (e) => e instanceof Element ? !!e.closest(u) : !1, P = (e) => {
256
+ let n = t.value;
257
+ !n || !r.value || e.pointerType !== "touch" && e.button === 0 && (N(e.target) || (d = e.pointerId, f = e.clientX, p = n.scrollLeft, m = !1));
258
+ }, F = (e) => {
259
+ let r = t.value;
260
+ if (!r || d !== e.pointerId) return;
261
+ let i = e.clientX - f;
262
+ !n.value && Math.abs(i) < s || (n.value || (n.value = !0, r.style.userSelect = "none", r.style.cursor = "grabbing", r.setPointerCapture?.(e.pointerId)), e.preventDefault(), r.scrollLeft = p - i * o, y());
263
+ }, I = (e) => {
264
+ d === e.pointerId && k();
265
+ }, L = () => {
266
+ d !== null && k();
267
+ }, R = (e) => {
268
+ m &&= (e.preventDefault(), e.stopPropagation(), !1);
269
+ }, z = (t) => {
270
+ typeof ResizeObserver < "u" && (g = new ResizeObserver(() => y()), g.observe(t)), e.observeMutations !== !1 && typeof MutationObserver < "u" && (_ = new MutationObserver(() => x()), _.observe(t, {
271
+ childList: !0,
272
+ subtree: !0,
273
+ characterData: !0
274
+ }));
275
+ }, B = () => {
276
+ g?.disconnect(), _?.disconnect(), g = null, _ = null;
277
+ }, V = (e) => {
278
+ e.addEventListener("scroll", A), e.addEventListener("wheel", M, { passive: !1 }), e.addEventListener("pointerdown", P), e.addEventListener("pointermove", F), e.addEventListener("pointerup", I), e.addEventListener("pointercancel", L), e.addEventListener("lostpointercapture", L), e.addEventListener("click", R, !0), z(e), x();
279
+ }, H = (e) => {
280
+ e.removeEventListener("scroll", A), e.removeEventListener("wheel", M), e.removeEventListener("pointerdown", P), e.removeEventListener("pointermove", F), e.removeEventListener("pointerup", I), e.removeEventListener("pointercancel", L), e.removeEventListener("lostpointercapture", L), e.removeEventListener("click", R, !0), B();
281
+ };
282
+ return j(t, (e, t) => {
283
+ t && H(t), e ? V(e) : y();
284
+ }), C(() => {
285
+ x();
286
+ }), S(() => {
287
+ v(), t.value && H(t.value), m = !1, k();
288
+ }), {
289
+ canScrollLeft: l(() => i.value),
290
+ canScrollRight: l(() => a.value),
291
+ containerRef: t,
292
+ isDragging: n,
293
+ isScrollable: r,
294
+ refresh: x,
295
+ scrollNext: O,
296
+ scrollPrev: D,
297
+ showLeftShadow: i,
298
+ showRightShadow: a
299
+ };
300
+ }
301
+ //#endregion
302
+ //#region src/appointments/components/edit/NewReservationDialog/QuickReservationAdder.vue?vue&type=script&setup=true&lang.ts
303
+ var re = { class: "flex items-start justify-between gap-3" }, ie = { class: "text-sm font-medium" }, ae = {
304
+ key: 0,
305
+ class: "mt-1 text-xs text-muted-foreground"
306
+ }, oe = { class: "grid gap-4 @md/quick-adder:grid-cols-2 @2xl/quick-adder:grid-cols-3 @4xl/quick-adder:grid-cols-4" }, se = { class: "grid gap-2" }, ce = {
307
+ key: 0,
308
+ class: "grid gap-2"
309
+ }, le = {
310
+ key: 1,
311
+ class: "grid gap-2"
312
+ }, ue = {
313
+ key: 2,
314
+ class: "grid gap-2"
315
+ }, de = { class: "grid gap-2" }, fe = {
316
+ key: 0,
317
+ class: "rounded-md border border-dashed bg-muted/20 px-4 py-4 text-sm text-muted-foreground"
318
+ }, pe = {
319
+ key: 1,
320
+ class: "relative flex items-center gap-2 overflow-hidden"
321
+ }, me = { class: "relative min-w-0 flex-1 overflow-hidden" }, he = {
322
+ key: 0,
323
+ class: "pointer-events-none absolute inset-y-0 left-0 z-10 w-10 md:w-20 bg-gradient-to-r from-background via-background/95 to-transparent"
324
+ }, ge = {
325
+ key: 1,
326
+ class: "pointer-events-none absolute inset-y-0 right-0 z-10 w-10 md:w-20 bg-gradient-to-l from-background via-background/95 to-transparent"
327
+ }, _e = {
328
+ key: 0,
329
+ class: "absolute -top-1 -right-1 flex items-center justify-center bg-primary rounded-full text-background size-4"
330
+ }, ve = { class: "flex flex-wrap gap-2" }, ye = ["onClick"], be = { key: 0 }, xe = { key: 1 }, Se = { key: 2 }, Ce = /* @__PURE__ */ r(/* @__PURE__ */ g({
331
+ __name: "QuickReservationAdder",
332
+ props: {
333
+ agendaData: {},
334
+ surface: { default: "card" }
335
+ },
336
+ emits: ["add"],
337
+ setup(r, { emit: a }) {
338
+ let o = r, s = a, g = new n("en-US", { dateStyle: "long" }), _ = t(e()), b = l(() => o.surface === "popover"), S = E(""), T = E(void 0), j = E(""), L = E(""), R = E([]), z = E(1), B = l(() => o.agendaData?.resources?.find((e) => e.id === j.value)), V = (e) => {
339
+ let [t, n] = e.split(":").map(Number);
340
+ return t * 60 + n;
341
+ }, U = (e) => {
342
+ let t = Math.floor(e / 60), n = e % 60;
343
+ return `${t.toString().padStart(2, "0")}:${n.toString().padStart(2, "0")}`;
344
+ }, W = () => {
345
+ if (!B.value) return [];
346
+ let e = B.value.interval || 60, t = null, n = null;
347
+ for (let e of Object.values(B.value.openingHours || {})) for (let r of e) {
348
+ let e = V(r.start), i = V(r.end);
349
+ (t === null || e < t) && (t = e), (n === null || i > n) && (n = i);
350
+ }
351
+ if (t === null || n === null) return [];
352
+ let r = [];
353
+ for (let i = t; i < n; i += e) r.push(U(i));
354
+ return r;
355
+ }, G = l(() => T.value && j.value && L.value && R.value.length > 0), K = l(() => W()), { canScrollLeft: q, canScrollRight: J, containerRef: Y, isDragging: X, isScrollable: Z, scrollNext: ee, scrollPrev: te, showLeftShadow: Ce, showRightShadow: we } = ne(), Q = (e) => R.value.includes(e), Te = (e) => {
356
+ if (Q(e)) {
357
+ R.value = R.value.filter((t) => t !== e);
358
+ return;
359
+ }
360
+ R.value = [...R.value, e].sort((e, t) => V(e) - V(t));
361
+ }, Ee = (e, t) => {
362
+ T.value = e ? y(e) : void 0, S.value = e ? `${e}` : "", t();
363
+ }, De = E(""), Oe = E(""), $ = E([]), ke = () => {
364
+ s("add", {
365
+ date: T.value,
366
+ resourceId: j.value,
367
+ pricingOptionId: L.value,
368
+ startTimes: R.value,
369
+ spots: z.value
370
+ }), R.value = [], $.value = [], Oe.value = "", De.value = "";
371
+ }, Ae = () => {
372
+ S.value = _.toString(), T.value = _, j.value = o.agendaData?.resources?.[0]?.id || "", L.value = o.agendaData?.pricingOptions?.find((e) => e.isDefault)?.id || o.agendaData?.pricingOptions?.[0]?.id || "", R.value = [], z.value = 1, De.value = "";
373
+ };
374
+ return C(() => {
375
+ Ae();
376
+ }), (n, a) => {
377
+ let o = O("Label"), s = O("Button"), l = O("PopoverTrigger"), y = O("Calendar"), S = O("PopoverContent"), C = O("Popover"), E = O("DynamicSelectOption"), B = O("DynamicSelect"), V = O("Input");
378
+ return w(), f("div", { class: x(A(i)("@container/quick-adder grid gap-4 overflow-hidden bg-background", A(b) ? "p-5 sm:p-6" : "rounded-md border p-4")) }, [
379
+ p("div", re, [p("div", null, [p("h3", ie, k(A(b) ? "Quick add reservations" : "Add reservations"), 1), A(b) ? (w(), f("p", ae, " Choose one date and add multiple timeslots in one pass. ")) : d("", !0)])]),
380
+ p("div", oe, [
381
+ p("div", se, [h(o, null, {
382
+ default: M(() => [...a[3] ||= [m("Date", -1)]]),
383
+ _: 1
384
+ }), h(C, null, {
385
+ default: M(({ close: n }) => [h(l, { "as-child": "" }, {
386
+ default: M(() => [h(s, {
387
+ type: "button",
388
+ variant: "outline",
389
+ class: x(A(i)("w-full justify-start text-left font-normal", !A(T) && "text-muted-foreground"))
390
+ }, {
391
+ default: M(() => [h(A(N)), m(" " + k(A(T) ? A(g).format(A(T).toDate(A(e)())) : "Pick a date"), 1)]),
392
+ _: 1
393
+ }, 8, ["class"])]),
394
+ _: 1
395
+ }), h(S, {
396
+ class: "w-auto p-0",
397
+ align: "start"
398
+ }, {
399
+ default: M(() => [h(y, {
400
+ "model-value": A(T),
401
+ "default-placeholder": A(_),
402
+ layout: "month-and-year",
403
+ "initial-focus": "",
404
+ "onUpdate:modelValue": (e) => Ee(e, n),
405
+ minValue: A(t)(A(e)())
406
+ }, null, 8, [
407
+ "model-value",
408
+ "default-placeholder",
409
+ "onUpdate:modelValue",
410
+ "minValue"
411
+ ])]),
412
+ _: 2
413
+ }, 1024)]),
414
+ _: 1
415
+ })]),
416
+ r.agendaData.resources?.length > 1 ? (w(), f("div", ce, [h(o, null, {
417
+ default: M(() => [...a[4] ||= [m("Resource", -1)]]),
418
+ _: 1
419
+ }), h(B, {
420
+ modelValue: A(j),
421
+ "onUpdate:modelValue": a[0] ||= (e) => v(j) ? j.value = e : null,
422
+ "wrapper-class": "w-full",
423
+ class: "w-full",
424
+ placeholder: "Select resource"
425
+ }, {
426
+ default: M(() => [(w(!0), f(c, null, D(r.agendaData.resources || [], (e) => (w(), u(E, {
427
+ key: e.id,
428
+ value: e.id
429
+ }, {
430
+ default: M(() => [m(k(e.name), 1)]),
431
+ _: 2
432
+ }, 1032, ["value"]))), 128))]),
433
+ _: 1
434
+ }, 8, ["modelValue"])])) : d("", !0),
435
+ r.agendaData.pricingOptions?.length > 1 ? (w(), f("div", le, [h(o, null, {
436
+ default: M(() => [...a[5] ||= [m("Type", -1)]]),
437
+ _: 1
438
+ }), h(B, {
439
+ modelValue: A(L),
440
+ "onUpdate:modelValue": a[1] ||= (e) => v(L) ? L.value = e : null,
441
+ "wrapper-class": "w-full",
442
+ class: "w-full",
443
+ placeholder: "Select type"
444
+ }, {
445
+ default: M(() => [(w(!0), f(c, null, D(r.agendaData.pricingOptions || [], (e) => (w(), u(E, {
446
+ key: e.id,
447
+ value: e.id
448
+ }, {
449
+ default: M(() => [m(k(e.name) + " (" + k(e.duration) + "min) ", 1)]),
450
+ _: 2
451
+ }, 1032, ["value"]))), 128))]),
452
+ _: 1
453
+ }, 8, ["modelValue"])])) : d("", !0),
454
+ r.agendaData?.maxTicketsPerReservation > 1 ? (w(), f("div", ue, [h(o, null, {
455
+ default: M(() => [...a[6] ||= [m("Spots/tickets", -1)]]),
456
+ _: 1
457
+ }), h(V, {
458
+ modelValue: A(z),
459
+ "onUpdate:modelValue": a[2] ||= (e) => v(z) ? z.value = e : null,
460
+ modelModifiers: { number: !0 },
461
+ type: "number",
462
+ min: "1",
463
+ class: "no-spinner",
464
+ autocomplete: "off"
465
+ }, null, 8, ["modelValue"])])) : d("", !0)
466
+ ]),
467
+ p("div", de, [
468
+ h(o, null, {
469
+ default: M(() => [...a[7] ||= [m("Available hours", -1)]]),
470
+ _: 1
471
+ }),
472
+ A(K).length === 0 ? (w(), f("div", fe, " No preset hours are available for this resource. You can still add a custom time below. ")) : (w(), f("div", pe, [
473
+ A(q) ? (w(), u(s, {
474
+ key: 0,
475
+ type: "button",
476
+ size: "icon",
477
+ variant: "outline",
478
+ class: "hidden absolute size-8 shrink-0 rounded-full shadow-sm md:inline-flex z-[11] left-0.5",
479
+ onClick: A(te)
480
+ }, {
481
+ default: M(() => [h(A(F), { class: "size-4" })]),
482
+ _: 1
483
+ }, 8, ["onClick"])) : d("", !0),
484
+ p("div", me, [
485
+ A(Ce) ? (w(), f("div", he)) : d("", !0),
486
+ A(we) ? (w(), f("div", ge)) : d("", !0),
487
+ p("div", {
488
+ ref_key: "hourScrollContainer",
489
+ ref: Y,
490
+ class: x(A(i)("hour-scroll-track flex w-full min-w-0 gap-2 overflow-x-auto overscroll-contain py-2", A(Z) && !A(X) && "cursor-grab", A(X) && "cursor-grabbing select-none"))
491
+ }, [(w(!0), f(c, null, D(A(K), (e) => (w(), u(s, {
492
+ key: e,
493
+ type: "button",
494
+ variant: "outline",
495
+ class: x(["relative h-12 shrink-0", Q(e) ? "border-primary!" : ""]),
496
+ onClick: (t) => Te(e)
497
+ }, {
498
+ default: M(() => [m(k(e) + " ", 1), Q(e) ? (w(), f("div", _e, [h(A(P), { class: "size-3" })])) : d("", !0)]),
499
+ _: 2
500
+ }, 1032, ["class", "onClick"]))), 128))], 2)
501
+ ]),
502
+ A(J) ? (w(), u(s, {
503
+ key: 1,
504
+ type: "button",
505
+ size: "icon",
506
+ variant: "outline",
507
+ class: "hidden absolute size-8 shrink-0 rounded-full shadow-sm md:inline-flex z-[11] right-0.5",
508
+ onClick: A(ee)
509
+ }, {
510
+ default: M(() => [h(A(I), { class: "size-4" })]),
511
+ _: 1
512
+ }, 8, ["onClick"])) : d("", !0)
513
+ ])),
514
+ p("div", ve, [(w(!0), f(c, null, D(A($), (e) => (w(), f("div", {
515
+ key: e,
516
+ class: "relative"
517
+ }, [h(s, {
518
+ type: "button",
519
+ variant: "outline",
520
+ class: "h-12 px-4 py-2"
521
+ }, {
522
+ default: M(() => [m(k(e), 1)]),
523
+ _: 2
524
+ }, 1024), p("div", {
525
+ class: "absolute -top-1 -right-1 flex items-center justify-center bg-red-500 rounded-full text-white size-4 cursor-pointer",
526
+ onClick: (t) => {
527
+ $.value = A($).filter((t) => t !== e), R.value = A(R).filter((t) => t !== e);
528
+ }
529
+ }, [h(A(H), { class: "size-3" })], 8, ye)]))), 128))])
530
+ ]),
531
+ p("div", null, [h(s, {
532
+ disabled: !A(G),
533
+ onClick: ke
534
+ }, {
535
+ default: M(() => [A(R).length === 0 ? (w(), f("span", be, "Select at least one timeslot")) : A(R).length === 1 ? (w(), f("span", xe, "Add 1 reservation")) : (w(), f("span", Se, "Add " + k(A(R).length) + " reservations", 1))]),
536
+ _: 1
537
+ }, 8, ["disabled"])])
538
+ ], 2);
539
+ };
540
+ }
541
+ }), [["__scopeId", "data-v-d6f90961"]]), we = { class: "space-y-3" }, Q = { class: "flex flex-wrap items-center justify-between gap-3" }, Te = { class: "text-xs text-muted-foreground" }, Ee = { class: "flex flex-wrap items-center gap-2" }, De = {
542
+ key: 0,
543
+ class: "rounded-md border border-dashed bg-muted/20 px-4 py-6 text-sm text-muted-foreground"
544
+ }, Oe = {
545
+ key: 1,
546
+ class: "space-y-3"
547
+ }, $ = { class: "flex items-start gap-2 p-3 md:hidden" }, ke = ["aria-expanded", "onClick"], Ae = { class: "mt-0.5 flex size-10 shrink-0 items-center justify-center rounded-full bg-muted text-sm font-semibold text-muted-foreground" }, je = { class: "min-w-0 flex-1" }, Me = { class: "flex items-start justify-between gap-3" }, Ne = { class: "min-w-0" }, Pe = { class: "block truncate text-base font-semibold" }, Fe = { class: "mt-1 block truncate text-xs text-muted-foreground" }, Ie = { class: "mt-1 block truncate text-xs text-muted-foreground" }, Le = { class: "flex size-10 shrink-0 items-center justify-center rounded-xl border border-border/70 text-muted-foreground" }, Re = { class: "mt-3 flex flex-wrap items-center gap-x-4 gap-y-1 text-sm text-muted-foreground" }, ze = { class: "inline-flex items-center gap-1.5" }, Be = { class: "inline-flex items-center gap-1.5" }, Ve = { class: "hidden items-start justify-between gap-3 p-4 pb-0 md:flex" }, He = { class: "text-sm font-medium" }, Ue = { class: "text-xs text-muted-foreground" }, We = { class: "grid gap-4 border-t pt-3 md:grid-cols-2 md:border-0 md:pt-4 xl:grid-cols-5" }, Ge = { class: "grid gap-2" }, Ke = {
548
+ key: 0,
549
+ class: "text-xs text-orange-500"
550
+ }, qe = { class: "grid gap-2" }, Je = { class: "grid gap-2" }, Ye = { class: "grid gap-2" }, Xe = {
551
+ key: 0,
552
+ class: "grid gap-2"
553
+ }, Ze = /* @__PURE__ */ r(/* @__PURE__ */ g({
554
+ __name: "ReservationLines",
555
+ props: {
556
+ modelValue: {},
557
+ agendaData: {}
558
+ },
559
+ emits: [
560
+ "add",
561
+ "quick-add",
562
+ "update:modelValue"
563
+ ],
564
+ setup(e, { emit: t }) {
565
+ let n = e, r = t, i = l(() => n.modelValue ?? []), a = l(() => Number(n.agendaData?.maxTicketsPerReservation) > 1), o = E(null), s = E(!1), g = l(() => String(n.agendaData?.currency || "EUR").toUpperCase()), _ = l(() => {
566
+ try {
567
+ return new Intl.NumberFormat("en-US", {
568
+ style: "currency",
569
+ currency: g.value,
570
+ minimumFractionDigits: 2,
571
+ maximumFractionDigits: 2
572
+ });
573
+ } catch {
574
+ return new Intl.NumberFormat("en-US", {
575
+ minimumFractionDigits: 2,
576
+ maximumFractionDigits: 2
577
+ });
578
+ }
579
+ }), v = (e) => {
580
+ r("update:modelValue", e);
581
+ }, y = (e, t, n) => {
582
+ v(i.value.map((r) => r.id === e ? t === "date" ? {
583
+ ...r,
584
+ date: String(n ?? ""),
585
+ dateValue: n || void 0
586
+ } : {
587
+ ...r,
588
+ [t]: n
589
+ } : r));
590
+ }, b = (e, t) => {
591
+ let n = Number(t);
592
+ y(e, "paid", Number.isFinite(n) ? n : 0);
593
+ }, S = (e, t) => {
594
+ let n = Number(t);
595
+ y(e, "spots", Number.isFinite(n) && n > 0 ? n : 1);
596
+ }, C = (e) => {
597
+ v(i.value.filter((t) => t.id !== e));
598
+ }, T = (e) => {
599
+ r("quick-add", e), s.value = !1;
600
+ }, N = (e) => n.agendaData?.pricingOptions?.find((t) => t.id === e.pricingOption), P = (e) => {
601
+ let t = N(e);
602
+ return t ? t.duration ? `${t.name} (${t.duration}min)` : t.name : "Reservation";
603
+ }, F = (e) => n.agendaData?.resources?.find((t) => t.id === e.resourceId), I = (e) => F(e)?.name || "Unknown resource", H = (e) => {
604
+ if (!e.startTime) return "";
605
+ let t = Number(N(e)?.duration);
606
+ if (!Number.isFinite(t) || t <= 0) return "";
607
+ let [n, r] = e.startTime.split(":").map(Number);
608
+ if (!Number.isFinite(n) || !Number.isFinite(r)) return "";
609
+ let i = n * 60 + r + t, a = Math.floor(i / 60) % 24, o = i % 60;
610
+ return `${a.toString().padStart(2, "0")}:${o.toString().padStart(2, "0")}`;
611
+ }, W = (e) => {
612
+ if (!e.startTime) return "Select time";
613
+ let t = H(e);
614
+ return t ? `${e.startTime} - ${t}` : e.startTime;
615
+ }, G = (e) => {
616
+ let t = Number(e);
617
+ if (!Number.isFinite(t)) return g.value === "EUR" ? "€0.00" : "0.00";
618
+ try {
619
+ return _.value.format(t);
620
+ } catch {
621
+ return `${t.toFixed(2)}`;
622
+ }
623
+ }, K = (e) => {
624
+ let t = Number(e.spots), n = Number.isFinite(t) && t > 0 ? t : 1;
625
+ return n === 1 ? "1 spot" : `${n} spots`;
626
+ }, q = (e) => {
627
+ if (!/^\d{4}-\d{2}-\d{2}$/.test(e)) return null;
628
+ let [t, n, r] = e.split("-").map(Number), i = new Date(t, n - 1, r);
629
+ return Number.isNaN(i.getTime()) || i.getFullYear() !== t || i.getMonth() !== n - 1 || i.getDate() !== r ? null : (i.setHours(0, 0, 0, 0), i);
630
+ }, J = (e) => {
631
+ let t = q(String(e.date || "").trim());
632
+ if (!t) return "";
633
+ let n = /* @__PURE__ */ new Date();
634
+ if (n.setHours(0, 0, 0, 0), t < n) return "This date is in the past. Double-check it before saving.";
635
+ let r = new Date(n);
636
+ return r.setFullYear(r.getFullYear() + 1), t > r ? "This date is more than a year ahead. Double-check it before saving." : "";
637
+ }, Y = (e) => !e.date || !e.startTime || !e.resourceId || !e.pricingOption, X = (e) => o.value === e, Z = (e) => {
638
+ o.value = o.value === e ? null : e;
639
+ };
640
+ return j(i, (e) => {
641
+ let t = new Set(e.map((e) => e.id));
642
+ if (o.value && !t.has(o.value) && (o.value = null), !o.value) {
643
+ let t = e.find(Y);
644
+ t && (o.value = t.id);
645
+ }
646
+ }, { immediate: !0 }), (t, n) => {
647
+ let o = O("Button"), l = O("PopoverTrigger"), g = O("PopoverContent"), _ = O("Popover"), v = O("Label"), E = O("Input"), j = O("DynamicSelectOption"), N = O("DynamicSelect");
648
+ return w(), f("div", we, [p("div", Q, [p("p", Te, k(i.value.length === 1 ? "1 reservation line" : `${i.value.length} reservation lines`), 1), p("div", Ee, [h(_, {
649
+ open: s.value,
650
+ "onUpdate:open": n[0] ||= (e) => s.value = e
651
+ }, {
652
+ default: M(() => [h(l, { "as-child": "" }, {
653
+ default: M(() => [h(o, {
654
+ type: "button",
655
+ variant: "outline",
656
+ size: "sm",
657
+ class: "gap-2"
658
+ }, {
659
+ default: M(() => [h(A(U), { class: "size-4 text-primary" }), n[2] ||= m(" Quick add ", -1)]),
660
+ _: 1
661
+ })]),
662
+ _: 1
663
+ }), h(g, {
664
+ align: "end",
665
+ class: "max-h-[80vh] w-[min(34rem,calc(100vw-2rem))] overflow-y-auto p-0"
666
+ }, {
667
+ default: M(() => [s.value ? (w(), u(Ce, {
668
+ key: 0,
669
+ surface: "popover",
670
+ agendaData: e.agendaData,
671
+ onAdd: T
672
+ }, null, 8, ["agendaData"])) : d("", !0)]),
673
+ _: 1
674
+ })]),
675
+ _: 1
676
+ }, 8, ["open"]), h(o, {
677
+ type: "button",
678
+ variant: "outline",
679
+ size: "sm",
680
+ onClick: n[1] ||= (e) => r("add")
681
+ }, {
682
+ default: M(() => [h(A(R), { class: "size-4" }), n[3] ||= m(" Add line ", -1)]),
683
+ _: 1
684
+ })])]), i.value.length === 0 ? (w(), f("div", De, " Use Quick add to create filled reservation lines, or add an empty line manually. ")) : (w(), f("div", Oe, [(w(!0), f(c, null, D(i.value, (t, r) => (w(), f("div", {
685
+ key: t.id,
686
+ class: "rounded-xl border bg-background"
687
+ }, [
688
+ p("div", $, [p("button", {
689
+ type: "button",
690
+ class: "flex min-w-0 flex-1 items-start gap-3 rounded-lg px-1 py-1 text-left outline-none transition-colors hover:bg-muted/40 focus-visible:ring-2 focus-visible:ring-ring/50",
691
+ "aria-expanded": X(t.id),
692
+ onClick: (e) => Z(t.id)
693
+ }, [p("span", Ae, k(r + 1), 1), p("span", je, [p("span", Me, [p("span", Ne, [
694
+ p("span", Pe, k(W(t)), 1),
695
+ p("span", Fe, k(t.date || "No date selected"), 1),
696
+ p("span", Ie, k(I(t)) + " · " + k(P(t)), 1)
697
+ ]), p("span", Le, [h(A(L), { class: "size-4" })])]), p("span", Re, [p("span", ze, [h(A(V), { class: "size-4" }), m(" " + k(K(t)), 1)]), p("span", Be, [h(A(z), { class: "size-4" }), m(" " + k(G(t.paid)), 1)])])])], 8, ke), h(o, {
698
+ type: "button",
699
+ variant: "ghost",
700
+ size: "icon",
701
+ class: "mt-1 shrink-0",
702
+ onClick: (e) => C(t.id)
703
+ }, {
704
+ default: M(() => [h(A(B), { class: "size-4" })]),
705
+ _: 1
706
+ }, 8, ["onClick"])]),
707
+ p("div", Ve, [p("div", null, [p("p", He, "Reservation " + k(r + 1), 1), p("p", Ue, k(I(t)) + " · " + k(P(t)), 1)]), h(o, {
708
+ type: "button",
709
+ variant: "ghost",
710
+ size: "icon",
711
+ class: "shrink-0",
712
+ onClick: (e) => C(t.id)
713
+ }, {
714
+ default: M(() => [h(A(B), { class: "size-4" })]),
715
+ _: 1
716
+ }, 8, ["onClick"])]),
717
+ p("div", { class: x(["px-3 pb-3 md:px-4 md:pb-4 overflow-hidden", X(t.id) ? "block" : "hidden md:block"]) }, [p("div", We, [
718
+ p("div", Ge, [
719
+ h(v, null, {
720
+ default: M(() => [...n[4] ||= [m("Date", -1)]]),
721
+ _: 1
722
+ }),
723
+ h(E, {
724
+ "model-value": t.date,
725
+ type: "date",
726
+ "onUpdate:modelValue": (e) => y(t.id, "date", String(e ?? ""))
727
+ }, null, 8, ["model-value", "onUpdate:modelValue"]),
728
+ J(t) ? (w(), f("p", Ke, k(J(t)), 1)) : d("", !0)
729
+ ]),
730
+ p("div", qe, [h(v, { for: `new_reservation_res_line_${r}_time` }, {
731
+ default: M(() => [...n[5] ||= [m("Time", -1)]]),
732
+ _: 1
733
+ }, 8, ["for"]), h(E, {
734
+ id: `new_reservation_res_line_${r}_time`,
735
+ "model-value": t.startTime,
736
+ type: "time",
737
+ class: "reservation-time-input",
738
+ "onUpdate:modelValue": (e) => y(t.id, "startTime", String(e ?? ""))
739
+ }, null, 8, [
740
+ "id",
741
+ "model-value",
742
+ "onUpdate:modelValue"
743
+ ])]),
744
+ p("div", Je, [h(v, null, {
745
+ default: M(() => [...n[6] ||= [m("Resource", -1)]]),
746
+ _: 1
747
+ }), h(N, {
748
+ "model-value": t.resourceId,
749
+ "wrapper-class": "w-full",
750
+ class: "w-full",
751
+ placeholder: "Select resource",
752
+ "onUpdate:modelValue": (e) => y(t.id, "resourceId", String(e ?? ""))
753
+ }, {
754
+ default: M(() => [(w(!0), f(c, null, D(e.agendaData?.resources || [], (e) => (w(), u(j, {
755
+ key: e.id,
756
+ value: e.id
757
+ }, {
758
+ default: M(() => [m(k(e.name), 1)]),
759
+ _: 2
760
+ }, 1032, ["value"]))), 128))]),
761
+ _: 1
762
+ }, 8, ["model-value", "onUpdate:modelValue"])]),
763
+ p("div", Ye, [h(v, null, {
764
+ default: M(() => [...n[7] ||= [m("Type", -1)]]),
765
+ _: 1
766
+ }), h(N, {
767
+ "model-value": t.pricingOption,
768
+ "wrapper-class": "w-full",
769
+ class: "w-full",
770
+ placeholder: "Select type",
771
+ "onUpdate:modelValue": (e) => y(t.id, "pricingOption", String(e ?? ""))
772
+ }, {
773
+ default: M(() => [(w(!0), f(c, null, D(e.agendaData?.pricingOptions || [], (e) => (w(), u(j, {
774
+ key: e.id,
775
+ value: e.id
776
+ }, {
777
+ default: M(() => [m(k(e.name), 1)]),
778
+ _: 2
779
+ }, 1032, ["value"]))), 128))]),
780
+ _: 1
781
+ }, 8, ["model-value", "onUpdate:modelValue"])]),
782
+ p("div", { class: x(["grid gap-4", a.value ? "md:grid-cols-2 xl:grid-cols-2 xl:col-span-1" : ""]) }, [a.value ? (w(), f("div", Xe, [h(v, null, {
783
+ default: M(() => [...n[8] ||= [m("Spots", -1)]]),
784
+ _: 1
785
+ }), h(E, {
786
+ "model-value": t.spots,
787
+ type: "number",
788
+ min: "1",
789
+ class: "no-spinner",
790
+ "onUpdate:modelValue": (e) => S(t.id, e)
791
+ }, null, 8, ["model-value", "onUpdate:modelValue"])])) : d("", !0), p("div", { class: x(["grid gap-2", a.value ? "" : "md:col-span-2 xl:col-span-1"]) }, [h(v, null, {
792
+ default: M(() => [...n[9] ||= [m("Paid", -1)]]),
793
+ _: 1
794
+ }), h(E, {
795
+ "model-value": t.paid,
796
+ type: "number",
797
+ min: "0",
798
+ step: "1",
799
+ class: "no-spinner",
800
+ "onUpdate:modelValue": (e) => b(t.id, e)
801
+ }, null, 8, ["model-value", "onUpdate:modelValue"])], 2)], 2)
802
+ ])], 2)
803
+ ]))), 128))]))]);
804
+ };
805
+ }
806
+ }), [["__scopeId", "data-v-e6916de3"]]), Qe = { class: "space-y-5 md:mt-5" }, $e = { class: "space-y-3" }, et = { class: "mt-4 text-red-400" }, tt = { class: "list-disc pl-4" }, nt = { key: 0 }, rt = { key: 1 }, it = "00:00", at = /* @__PURE__ */ g({
807
+ __name: "NewReservationDialog",
808
+ props: { agendaData: {} },
809
+ setup(e) {
810
+ let t = e, { params: n } = s(), { config: r } = o(), i = a(r.project), d = l(() => n.value?.id ?? n.id ?? ""), g = _("agendaData", E({})), v = l(() => t.agendaData ?? g.value ?? {}), y = E(!1), x = E(!1), S = E([]), C = /^([01]\d|2[0-3]):[0-5]\d$/, T = E([]), N = E(null), P = () => v.value?.resources?.[0]?.id ?? "", F = () => v.value?.pricingOptions?.find((e) => e.isDefault === !0)?.id ?? v.value?.pricingOptions?.[0]?.id ?? "", I = (e) => {
811
+ let t = e?.pricingOption ?? F(), n = v.value?.pricingOptions?.find((e) => e.id === t)?.price ?? 0;
812
+ typeof n == "string" && (n = Number(n));
813
+ let r = e?.paid ?? n;
814
+ return typeof r == "string" && (r = Number(r)), {
815
+ id: `reservation_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`,
816
+ spots: Number(e?.spots) || 1,
817
+ paid: Number.isFinite(r) ? r : 0,
818
+ resourceId: e?.resourceId ?? P(),
819
+ pricingOption: t,
820
+ date: e?.date ?? "",
821
+ dateValue: e?.dateValue,
822
+ startTime: e?.startTime ?? it
823
+ };
824
+ }, L = () => {
825
+ T.value = [I()];
826
+ }, z = (e) => !e.date && e.startTime === it, B = () => {
827
+ let e = T.value[T.value.length - 1];
828
+ T.value = [...T.value, I(e ? { ...e } : void 0)];
829
+ }, V = (e) => v.value?.pricingOptions?.find((t) => t.id === e.pricingOption), H = (e) => v.value?.resources?.find((t) => t.id === e.resourceId), U = () => {
830
+ let e = Number(v.value?.maxTicketsPerReservation);
831
+ return Number.isFinite(e) && e > 0 ? e : null;
832
+ }, W = (e) => `Reservation ${e + 1}`, G = (e) => {
833
+ let t = String(e.date || "").trim(), n = String(e.startTime || "").trim(), r = String(e.resourceId || "").trim();
834
+ return !t || !n || !r ? "" : `${r}_${t}_${n}`;
835
+ }, K = () => {
836
+ let e = [], t = /* @__PURE__ */ new Map(), n = U();
837
+ return T.value.forEach((r, i) => {
838
+ let a = W(i), o = String(r.date || "").trim(), s = String(r.startTime || "").trim(), c = String(r.resourceId || "").trim(), l = String(r.pricingOption || "").trim(), u = Number(r.spots), d = Number(r.paid);
839
+ o || e.push(`${a}: please select a date.`), s ? C.test(s) || e.push(`${a}: please enter a valid time.`) : e.push(`${a}: please select a time.`), c ? H(r) || e.push(`${a}: the selected resource is no longer available.`) : e.push(`${a}: please select a resource.`), l ? V(r) || e.push(`${a}: the selected type is no longer available.`) : e.push(`${a}: please select a type.`), !Number.isFinite(u) || u <= 0 ? e.push(`${a}: spots must be at least 1.`) : n !== null && u > n && e.push(`${a}: spots cannot be more than ${n}.`), (!Number.isFinite(d) || d < 0) && e.push(`${a}: paid amount must be 0 or higher.`);
840
+ let f = G(r);
841
+ if (f) {
842
+ let n = t.get(f);
843
+ n === void 0 ? t.set(f, i) : e.push(`${a}: duplicate of ${W(n).toLowerCase()}.`);
844
+ }
845
+ }), e;
846
+ }, q = (e) => {
847
+ let t = e.startTimes.map((t) => I({
848
+ date: e.date ? `${e.date}` : "",
849
+ dateValue: e.date,
850
+ pricingOption: e.pricingOptionId,
851
+ resourceId: e.resourceId,
852
+ spots: e.spots,
853
+ startTime: t
854
+ }));
855
+ if (t.length !== 0) {
856
+ if (T.value.length === 1 && z(T.value[0])) {
857
+ T.value = t;
858
+ return;
859
+ }
860
+ T.value = [...T.value, ...t];
861
+ }
862
+ }, J = (e) => {
863
+ if (!e.startTime || !e.pricingOption) return "";
864
+ let t = V(e);
865
+ if (!t?.duration) return e.startTime;
866
+ let [n, r] = e.startTime.split(":").map(Number);
867
+ if (isNaN(n) || isNaN(r)) return "";
868
+ let i = n * 60 + r + t.duration, a = Math.floor(i / 60) % 24, o = i % 60;
869
+ return `${a.toString().padStart(2, "0")}:${o.toString().padStart(2, "0")}`;
870
+ };
871
+ j(y, async (e) => {
872
+ e && (S.value = [], L(), await b(), N.value?.reset());
873
+ });
874
+ let Y = () => {
875
+ let e = [];
876
+ S.value = [];
877
+ let t = N.value, n = t ? t.validateForm() : !1;
878
+ return t || e.push("Customer information form is unavailable."), T.value.length === 0 && e.push("Please add at least one reservation."), e.push(...K()), S.value = e, e.length === 0 && n;
879
+ }, X = async () => {
880
+ let e = N.value;
881
+ if (!e || !Y()) return;
882
+ let t = !1;
883
+ try {
884
+ x.value = !0;
885
+ let n = e.getCustomerInfo(), a = T.value.map((e) => {
886
+ let t = Number(e.paid) || 0, n = Number(e.spots) || 1, r = V(e), i = H(e), a = e.date;
887
+ return {
888
+ paidAmount: t,
889
+ flattenedReservationDate: `${e.resourceId}_${a}`,
890
+ flattenedReservation: `${e.resourceId}_${a}_${e.startTime.replace(":", "")}`,
891
+ reservation: {
892
+ status: "approved",
893
+ totalPrice: Number(t.toFixed(2)),
894
+ basePrice: Number((t / n).toFixed(2)),
895
+ addOnsPrice: 0,
896
+ addOns: [],
897
+ date: a,
898
+ id: `res_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`,
899
+ pricingOption: {
900
+ duration: r?.duration || "",
901
+ id: r?.id || "",
902
+ name: r?.name || "",
903
+ price: r?.price || ""
904
+ },
905
+ pricingOptionId: e.pricingOption,
906
+ resource: {
907
+ avatarLabel: i?.avatarLabel || "",
908
+ color: i?.color || "",
909
+ description: i?.description || "",
910
+ id: i?.id || "",
911
+ name: i?.name || ""
912
+ },
913
+ resourceId: e.resourceId,
914
+ spots: n,
915
+ timeslot: {
916
+ startTime: e.startTime,
917
+ endTime: J(e)
918
+ }
919
+ }
920
+ };
921
+ }), o = Number(a.reduce((e, t) => e + t.paidAmount, 0).toFixed(2)), s = {
922
+ agendaId: d.value,
923
+ customerInfo: n,
924
+ metadata: {},
925
+ amountPaid: o,
926
+ amountDue: 0,
927
+ subtotal: o,
928
+ total: o,
929
+ createdAt: /* @__PURE__ */ new Date(),
930
+ updatedAt: /* @__PURE__ */ new Date(),
931
+ discount: 0,
932
+ flattenedReservationDates: Array.from(new Set(a.map((e) => e.flattenedReservationDate))),
933
+ flattenedReservations: a.map((e) => e.flattenedReservation),
934
+ paymentStatus: "paid",
935
+ paymentType: "full",
936
+ reservations: a.map((e) => e.reservation),
937
+ status: "confirmed"
938
+ };
939
+ await i.add(r.reservationsCollection, s), t = !0;
940
+ } catch (e) {
941
+ console.error("Error creating reservation:", e);
942
+ } finally {
943
+ x.value = !1, t && (y.value = !1);
944
+ }
945
+ };
946
+ return (e, t) => {
947
+ let n = O("Button"), r = O("ResponsiveModalTrigger"), i = O("ResponsiveModalTitle"), a = O("ResponsiveModalHeader"), o = O("ResponsiveModalFooter"), s = O("ResponsiveModalScrollContent"), l = O("ResponsiveModal");
948
+ return w(), u(l, {
949
+ open: y.value,
950
+ "onUpdate:open": t[1] ||= (e) => y.value = e
951
+ }, {
952
+ default: M(() => [h(r, { "as-child": "" }, {
953
+ default: M(() => [h(n, null, {
954
+ default: M(() => [h(A(R), { class: "size-4" }), t[2] ||= m(" Add Reservation ", -1)]),
955
+ _: 1
956
+ })]),
957
+ _: 1
958
+ }), h(s, { class: "@container/modal sm:max-w-7xl" }, {
959
+ default: M(() => [
960
+ h(a, null, {
961
+ default: M(() => [h(i, null, {
962
+ default: M(() => [...t[3] ||= [m("Create new reservation", -1)]]),
963
+ _: 1
964
+ })]),
965
+ _: 1
966
+ }),
967
+ p("div", Qe, [
968
+ h(te, {
969
+ ref_key: "customerInformationRef",
970
+ ref: N,
971
+ agendaData: v.value
972
+ }, null, 8, ["agendaData"]),
973
+ t[5] ||= p("div", { class: "w-full h-[1px] bg-border my-8" }, null, -1),
974
+ p("div", $e, [t[4] ||= p("div", { class: "flex items-center justify-between gap-3" }, [p("h2", { class: "text-sm font-medium" }, "Reservations")], -1), h(Ze, {
975
+ modelValue: T.value,
976
+ "onUpdate:modelValue": t[0] ||= (e) => T.value = e,
977
+ agendaData: v.value,
978
+ onAdd: B,
979
+ onQuickAdd: q
980
+ }, null, 8, ["modelValue", "agendaData"])]),
981
+ p("div", et, [p("ul", tt, [(w(!0), f(c, null, D(S.value, (e) => (w(), f("li", { key: e }, k(e), 1))), 128))])])
982
+ ]),
983
+ h(o, { class: "gap-2" }, {
984
+ default: M(() => [h(n, {
985
+ onClick: X,
986
+ disabled: x.value
987
+ }, {
988
+ default: M(() => [x.value ? (w(), f("span", nt, "Creating...")) : (w(), f("span", rt, k(T.value.length > 1 ? `Create ${T.value.length} reservations` : "Create reservation"), 1))]),
989
+ _: 1
990
+ }, 8, ["disabled"])]),
991
+ _: 1
992
+ })
993
+ ]),
994
+ _: 1
995
+ })]),
996
+ _: 1
997
+ }, 8, ["open"]);
998
+ };
999
+ }
1000
+ });
1001
+ //#endregion
1002
+ export { at as t };