@oneclick.dev/cms-core-modules 0.0.109 → 0.0.110

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