@unchainedshop/admin-ui 4.8.18 → 4.8.20

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 (919) hide show
  1. package/dist/chunk-45H2WVIC.js +51 -0
  2. package/dist/chunk-4VNS5WPM.js +37 -0
  3. package/dist/chunk-54DKBWXV.js +33 -0
  4. package/dist/chunk-6TXD4TA7.js +1196 -0
  5. package/dist/chunk-BGCKJQGS.js +58 -0
  6. package/dist/chunk-BYXBJQAS.js +1 -0
  7. package/dist/chunk-EJDZRZSZ.js +59 -0
  8. package/dist/chunk-ELPURWDC.js +75 -0
  9. package/dist/chunk-IAQPLRXZ.js +16 -0
  10. package/dist/chunk-ILYPJE4N.js +57 -0
  11. package/dist/chunk-IXBMHOB5.js +13 -0
  12. package/dist/chunk-KH5MK6ZW.js +18 -0
  13. package/dist/chunk-NT7RB7AK.js +70 -0
  14. package/dist/chunk-OKGJ6HDE.js +26 -0
  15. package/dist/chunk-Q6S3LBUF.js +180 -0
  16. package/dist/chunk-QNLGYFV7.js +22 -0
  17. package/dist/chunk-RAQV2GYF.js +70 -0
  18. package/dist/chunk-RHUFQVKL.js +514 -0
  19. package/dist/chunk-RVG6IOFC.js +11 -0
  20. package/dist/chunk-SRAAKMWY.js +39 -0
  21. package/dist/chunk-UFYR5WZT.js +165 -0
  22. package/dist/chunk-UXG7EYHC.js +614 -0
  23. package/dist/chunk-VDKQGOMV.js +840 -0
  24. package/dist/chunk-XHOCXPD5.js +9 -0
  25. package/dist/chunk-XJBPMIC4.js +284 -0
  26. package/dist/chunk-YO6PT7KD.js +13 -0
  27. package/dist/chunk-YSKZE2KN.js +652 -0
  28. package/dist/components/ui/Accordion/Accordion.d.ts +11 -0
  29. package/dist/components/ui/Accordion/Accordion.d.ts.map +1 -0
  30. package/dist/components/ui/Accordion/AccordionHeader.d.ts +6 -0
  31. package/dist/components/ui/Accordion/AccordionHeader.d.ts.map +1 -0
  32. package/dist/components/ui/Accordion/AccordionItem.d.ts +11 -0
  33. package/dist/components/ui/Accordion/AccordionItem.d.ts.map +1 -0
  34. package/dist/components/ui/ActiveInActive.d.ts +10 -0
  35. package/dist/components/ui/ActiveInActive.d.ts.map +1 -0
  36. package/dist/components/ui/AnimatedCounter.d.ts +7 -0
  37. package/dist/components/ui/AnimatedCounter.d.ts.map +1 -0
  38. package/dist/components/ui/Badge.d.ts +10 -0
  39. package/dist/components/ui/Badge.d.ts.map +1 -0
  40. package/dist/components/ui/BreadCrumbs.d.ts +7 -0
  41. package/dist/components/ui/BreadCrumbs.d.ts.map +1 -0
  42. package/dist/components/ui/Button.d.ts +36 -0
  43. package/dist/components/ui/Button.d.ts.map +1 -0
  44. package/dist/components/ui/CopyableText.d.ts +5 -0
  45. package/dist/components/ui/CopyableText.d.ts.map +1 -0
  46. package/dist/components/ui/DateInput.d.ts +15 -0
  47. package/dist/components/ui/DateInput.d.ts.map +1 -0
  48. package/dist/components/ui/DateRangeFilterInput.d.ts +4 -0
  49. package/dist/components/ui/DateRangeFilterInput.d.ts.map +1 -0
  50. package/dist/components/ui/DetailHeader.d.ts +6 -0
  51. package/dist/components/ui/DetailHeader.d.ts.map +1 -0
  52. package/dist/components/ui/DraggableIcon.d.ts +3 -0
  53. package/dist/components/ui/DraggableIcon.d.ts.map +1 -0
  54. package/dist/components/ui/ErrorBoundary.d.ts +18 -0
  55. package/dist/components/ui/ErrorBoundary.d.ts.map +1 -0
  56. package/dist/components/ui/ErrorFallback.d.ts +6 -0
  57. package/dist/components/ui/ErrorFallback.d.ts.map +1 -0
  58. package/dist/components/ui/HelpText.d.ts +11 -0
  59. package/dist/components/ui/HelpText.d.ts.map +1 -0
  60. package/dist/components/ui/ImageWithFallback.d.ts +7 -0
  61. package/dist/components/ui/ImageWithFallback.d.ts.map +1 -0
  62. package/dist/components/ui/InfoTextBanner.d.ts +6 -0
  63. package/dist/components/ui/InfoTextBanner.d.ts.map +1 -0
  64. package/dist/components/ui/JSONView.d.ts +6 -0
  65. package/dist/components/ui/JSONView.d.ts.map +1 -0
  66. package/dist/components/ui/ListHeader.d.ts +6 -0
  67. package/dist/components/ui/ListHeader.d.ts.map +1 -0
  68. package/dist/components/ui/Loading.d.ts +3 -0
  69. package/dist/components/ui/Loading.d.ts.map +1 -0
  70. package/dist/components/ui/NoData.d.ts +7 -0
  71. package/dist/components/ui/NoData.d.ts.map +1 -0
  72. package/dist/components/ui/NoImage.d.ts +7 -0
  73. package/dist/components/ui/NoImage.d.ts.map +1 -0
  74. package/dist/components/ui/NoImageSvg.d.ts +8 -0
  75. package/dist/components/ui/NoImageSvg.d.ts.map +1 -0
  76. package/dist/components/ui/PageHeader.d.ts +11 -0
  77. package/dist/components/ui/PageHeader.d.ts.map +1 -0
  78. package/dist/components/ui/Pagination.d.ts +8 -0
  79. package/dist/components/ui/Pagination.d.ts.map +1 -0
  80. package/dist/components/ui/Portal/Portal.d.ts +16 -0
  81. package/dist/components/ui/Portal/Portal.d.ts.map +1 -0
  82. package/dist/components/ui/Portal/Portal.types.d.ts +16 -0
  83. package/dist/components/ui/Portal/Portal.types.d.ts.map +1 -0
  84. package/dist/components/ui/SaveAndCancelButtons.d.ts +10 -0
  85. package/dist/components/ui/SaveAndCancelButtons.d.ts.map +1 -0
  86. package/dist/components/ui/SearchField.d.ts +7 -0
  87. package/dist/components/ui/SearchField.d.ts.map +1 -0
  88. package/dist/components/ui/Tab.d.ts +18 -0
  89. package/dist/components/ui/Tab.d.ts.map +1 -0
  90. package/dist/components/ui/Tag/TagInput.d.ts +14 -0
  91. package/dist/components/ui/Tag/TagInput.d.ts.map +1 -0
  92. package/dist/components/ui/Tag/TagList.d.ts +8 -0
  93. package/dist/components/ui/Tag/TagList.d.ts.map +1 -0
  94. package/dist/components/ui/Tag/TagListForm.d.ts +8 -0
  95. package/dist/components/ui/Tag/TagListForm.d.ts.map +1 -0
  96. package/dist/components/ui/Toggle.d.ts +11 -0
  97. package/dist/components/ui/Toggle.d.ts.map +1 -0
  98. package/dist/components/ui/ToolTip.d.ts +7 -0
  99. package/dist/components/ui/ToolTip.d.ts.map +1 -0
  100. package/dist/components/ui/card.d.ts +9 -0
  101. package/dist/components/ui/card.d.ts.map +1 -0
  102. package/dist/components/ui/chart.d.ts +42 -0
  103. package/dist/components/ui/chart.d.ts.map +1 -0
  104. package/dist/components/ui/form/CheckboxField.d.ts +4 -0
  105. package/dist/components/ui/form/CheckboxField.d.ts.map +1 -0
  106. package/dist/components/ui/form/ChoicesField.d.ts +12 -0
  107. package/dist/components/ui/form/ChoicesField.d.ts.map +1 -0
  108. package/dist/components/ui/form/Combobox.d.ts +20 -0
  109. package/dist/components/ui/form/Combobox.d.ts.map +1 -0
  110. package/dist/components/ui/form/DatePickerField.d.ts +4 -0
  111. package/dist/components/ui/form/DatePickerField.d.ts.map +1 -0
  112. package/dist/components/ui/form/EmailField.d.ts +7 -0
  113. package/dist/components/ui/form/EmailField.d.ts.map +1 -0
  114. package/dist/components/ui/form/FieldWithHelp.d.ts +10 -0
  115. package/dist/components/ui/form/FieldWithHelp.d.ts.map +1 -0
  116. package/dist/components/ui/form/FieldWrapper.d.ts +8 -0
  117. package/dist/components/ui/form/FieldWrapper.d.ts.map +1 -0
  118. package/dist/components/ui/form/FormErrors.d.ts +6 -0
  119. package/dist/components/ui/form/FormErrors.d.ts.map +1 -0
  120. package/dist/components/ui/form/JSONAreaField.d.ts +7 -0
  121. package/dist/components/ui/form/JSONAreaField.d.ts.map +1 -0
  122. package/dist/components/ui/form/MarkdownTextAreaField.d.ts +8 -0
  123. package/dist/components/ui/form/MarkdownTextAreaField.d.ts.map +1 -0
  124. package/dist/components/ui/form/PasswordField.d.ts +3 -0
  125. package/dist/components/ui/form/PasswordField.d.ts.map +1 -0
  126. package/dist/components/ui/form/SelectField.d.ts +11 -0
  127. package/dist/components/ui/form/SelectField.d.ts.map +1 -0
  128. package/dist/components/ui/form/SubmitButton.d.ts +9 -0
  129. package/dist/components/ui/form/SubmitButton.d.ts.map +1 -0
  130. package/dist/components/ui/form/TagInputField.d.ts +6 -0
  131. package/dist/components/ui/form/TagInputField.d.ts.map +1 -0
  132. package/dist/components/ui/form/TextAreaField.d.ts +8 -0
  133. package/dist/components/ui/form/TextAreaField.d.ts.map +1 -0
  134. package/dist/components/ui/form/TextField.d.ts +10 -0
  135. package/dist/components/ui/form/TextField.d.ts.map +1 -0
  136. package/dist/components/ui/form/index.d.ts +17 -0
  137. package/dist/components/ui/form/index.d.ts.map +1 -0
  138. package/dist/components/ui/icons.d.ts +4 -0
  139. package/dist/components/ui/icons.d.ts.map +1 -0
  140. package/dist/components/ui/index.d.ts +41 -0
  141. package/dist/components/ui/index.d.ts.map +1 -0
  142. package/dist/form.js +30077 -0
  143. package/dist/gql/types.d.ts +17209 -0
  144. package/dist/gql/types.d.ts.map +1 -0
  145. package/dist/hooks.js +41 -0
  146. package/dist/lib/utils.d.ts +3 -0
  147. package/dist/lib/utils.d.ts.map +1 -0
  148. package/dist/modal.js +114 -0
  149. package/dist/modules/UnchainedContext/UnchainedContext.d.ts +8 -0
  150. package/dist/modules/UnchainedContext/UnchainedContext.d.ts.map +1 -0
  151. package/dist/modules/UnchainedContext/useUnchainedContext.d.ts +7 -0
  152. package/dist/modules/UnchainedContext/useUnchainedContext.d.ts.map +1 -0
  153. package/dist/modules/accounts/fragment/MD5MetaDataFragment.d.ts +3 -0
  154. package/dist/modules/accounts/fragment/MD5MetaDataFragment.d.ts.map +1 -0
  155. package/dist/modules/accounts/fragment/UserFragment.d.ts +3 -0
  156. package/dist/modules/accounts/fragment/UserFragment.d.ts.map +1 -0
  157. package/dist/modules/accounts/hooks/useCurrentUser.d.ts +10 -0
  158. package/dist/modules/accounts/hooks/useCurrentUser.d.ts.map +1 -0
  159. package/dist/modules/accounts/hooks/useUsersCount.d.ts +8 -0
  160. package/dist/modules/accounts/hooks/useUsersCount.d.ts.map +1 -0
  161. package/dist/modules/accounts.js +1013 -0
  162. package/dist/modules/assortment/hooks/useAssortmentsCount.d.ts +8 -0
  163. package/dist/modules/assortment/hooks/useAssortmentsCount.d.ts.map +1 -0
  164. package/dist/modules/assortment.js +1121 -0
  165. package/dist/modules/common/components/AppContext.d.ts +18 -0
  166. package/dist/modules/common/components/AppContext.d.ts.map +1 -0
  167. package/dist/modules/common/components/FormWrapper.d.ts +8 -0
  168. package/dist/modules/common/components/FormWrapper.d.ts.map +1 -0
  169. package/dist/modules/common/components/ThemeWrapper.d.ts +10 -0
  170. package/dist/modules/common/components/ThemeWrapper.d.ts.map +1 -0
  171. package/dist/modules/common/data/iso-codes.d.ts +4 -0
  172. package/dist/modules/common/data/iso-codes.d.ts.map +1 -0
  173. package/dist/modules/common/data/miscellaneous.d.ts +51 -0
  174. package/dist/modules/common/data/miscellaneous.d.ts.map +1 -0
  175. package/dist/modules/common/fragments/AddressFragment.d.ts +3 -0
  176. package/dist/modules/common/fragments/AddressFragment.d.ts.map +1 -0
  177. package/dist/modules/common/hooks/useApp.d.ts +11 -0
  178. package/dist/modules/common/hooks/useApp.d.ts.map +1 -0
  179. package/dist/modules/common/hooks/useCSVExport.d.ts +10 -0
  180. package/dist/modules/common/hooks/useCSVExport.d.ts.map +1 -0
  181. package/dist/modules/common/hooks/useCSVImport.d.ts +18 -0
  182. package/dist/modules/common/hooks/useCSVImport.d.ts.map +1 -0
  183. package/dist/modules/common/hooks/useChatEndpointChecker.d.ts +5 -0
  184. package/dist/modules/common/hooks/useChatEndpointChecker.d.ts.map +1 -0
  185. package/dist/modules/common/hooks/useConfirmMediaUpload.d.ts +10 -0
  186. package/dist/modules/common/hooks/useConfirmMediaUpload.d.ts.map +1 -0
  187. package/dist/modules/common/hooks/useDashboardMetrics.d.ts +23 -0
  188. package/dist/modules/common/hooks/useDashboardMetrics.d.ts.map +1 -0
  189. package/dist/modules/common/hooks/useLocalStorage.d.ts +3 -0
  190. package/dist/modules/common/hooks/useLocalStorage.d.ts.map +1 -0
  191. package/dist/modules/common/hooks/useOrderAnalytics.d.ts +25 -0
  192. package/dist/modules/common/hooks/useOrderAnalytics.d.ts.map +1 -0
  193. package/dist/modules/common/hooks/useOrderItemsAnalytics.d.ts +16 -0
  194. package/dist/modules/common/hooks/useOrderItemsAnalytics.d.ts.map +1 -0
  195. package/dist/modules/common/hooks/useOutsideClick.d.ts +3 -0
  196. package/dist/modules/common/hooks/useOutsideClick.d.ts.map +1 -0
  197. package/dist/modules/common/hooks/usePortal.d.ts +20 -0
  198. package/dist/modules/common/hooks/usePortal.d.ts.map +1 -0
  199. package/dist/modules/common/hooks/useShopConfiguration.d.ts +8 -0
  200. package/dist/modules/common/hooks/useShopConfiguration.d.ts.map +1 -0
  201. package/dist/modules/common/hooks/useShopInfo.d.ts +41 -0
  202. package/dist/modules/common/hooks/useShopInfo.d.ts.map +1 -0
  203. package/dist/modules/common/hooks/useStatusTypes.d.ts +10 -0
  204. package/dist/modules/common/hooks/useStatusTypes.d.ts.map +1 -0
  205. package/dist/modules/common/hooks/useSystemRoles.d.ts +7 -0
  206. package/dist/modules/common/hooks/useSystemRoles.d.ts.map +1 -0
  207. package/dist/modules/common/hooks/useTheme.d.ts +7 -0
  208. package/dist/modules/common/hooks/useTheme.d.ts.map +1 -0
  209. package/dist/modules/common/utils/deBounce.d.ts +3 -0
  210. package/dist/modules/common/utils/deBounce.d.ts.map +1 -0
  211. package/dist/modules/common/utils/defaultNextImageLoader.d.ts +7 -0
  212. package/dist/modules/common/utils/defaultNextImageLoader.d.ts.map +1 -0
  213. package/dist/modules/common/utils/formatUsername.d.ts +3 -0
  214. package/dist/modules/common/utils/formatUsername.d.ts.map +1 -0
  215. package/dist/modules/common/utils/getSetupStepsConfigurationsMeta.d.ts +30 -0
  216. package/dist/modules/common/utils/getSetupStepsConfigurationsMeta.d.ts.map +1 -0
  217. package/dist/modules/common/utils/normalizeFilterKeys.d.ts +4 -0
  218. package/dist/modules/common/utils/normalizeFilterKeys.d.ts.map +1 -0
  219. package/dist/modules/common/utils/useFormatDateTime.d.ts +7 -0
  220. package/dist/modules/common/utils/useFormatDateTime.d.ts.map +1 -0
  221. package/dist/modules/common/utils/utils.d.ts +21 -0
  222. package/dist/modules/common/utils/utils.d.ts.map +1 -0
  223. package/dist/modules/country/fragments/CountryFragment.d.ts +3 -0
  224. package/dist/modules/country/fragments/CountryFragment.d.ts.map +1 -0
  225. package/dist/modules/country/hooks/useCountries.d.ts +22 -0
  226. package/dist/modules/country/hooks/useCountries.d.ts.map +1 -0
  227. package/dist/modules/country.js +108 -0
  228. package/dist/modules/currency.js +119 -0
  229. package/dist/modules/delivery-provider.js +269 -0
  230. package/dist/modules/enrollment.js +353 -0
  231. package/dist/modules/event.js +123 -0
  232. package/dist/modules/filter.js +448 -0
  233. package/dist/modules/forms/components/Form.d.ts +8 -0
  234. package/dist/modules/forms/components/Form.d.ts.map +1 -0
  235. package/dist/modules/forms/hooks/useField.d.ts +35 -0
  236. package/dist/modules/forms/hooks/useField.d.ts.map +1 -0
  237. package/dist/modules/forms/hooks/useForm.d.ts +44 -0
  238. package/dist/modules/forms/hooks/useForm.d.ts.map +1 -0
  239. package/dist/modules/forms/hooks/useFormContext.d.ts +3 -0
  240. package/dist/modules/forms/hooks/useFormContext.d.ts.map +1 -0
  241. package/dist/modules/forms/lib/FormContext.d.ts +13 -0
  242. package/dist/modules/forms/lib/FormContext.d.ts.map +1 -0
  243. package/dist/modules/forms/lib/clean.d.ts +3 -0
  244. package/dist/modules/forms/lib/clean.d.ts.map +1 -0
  245. package/dist/modules/forms/lib/validators.d.ts +20 -0
  246. package/dist/modules/forms/lib/validators.d.ts.map +1 -0
  247. package/dist/modules/language/fragments/LanguageFragment.d.ts +3 -0
  248. package/dist/modules/language/fragments/LanguageFragment.d.ts.map +1 -0
  249. package/dist/modules/language/hooks/useLanguages.d.ts +19 -0
  250. package/dist/modules/language/hooks/useLanguages.d.ts.map +1 -0
  251. package/dist/modules/language.js +106 -0
  252. package/dist/modules/modal/components/AlertMessage.d.ts +9 -0
  253. package/dist/modules/modal/components/AlertMessage.d.ts.map +1 -0
  254. package/dist/modules/modal/components/DangerMessage.d.ts +12 -0
  255. package/dist/modules/modal/components/DangerMessage.d.ts.map +1 -0
  256. package/dist/modules/modal/components/ImportResultMessage.d.ts +14 -0
  257. package/dist/modules/modal/components/ImportResultMessage.d.ts.map +1 -0
  258. package/dist/modules/modal/components/Modal.d.ts +10 -0
  259. package/dist/modules/modal/components/Modal.d.ts.map +1 -0
  260. package/dist/modules/modal/components/ModalWrapper.d.ts +6 -0
  261. package/dist/modules/modal/components/ModalWrapper.d.ts.map +1 -0
  262. package/dist/modules/modal/hooks/useModal.d.ts +7 -0
  263. package/dist/modules/modal/hooks/useModal.d.ts.map +1 -0
  264. package/dist/modules/modal/utils/ModalContext.d.ts +9 -0
  265. package/dist/modules/modal/utils/ModalContext.d.ts.map +1 -0
  266. package/dist/modules/order/fragments/OrderDetailFragment.d.ts +3 -0
  267. package/dist/modules/order/fragments/OrderDetailFragment.d.ts.map +1 -0
  268. package/dist/modules/order/fragments/OrderFragment.d.ts +3 -0
  269. package/dist/modules/order/fragments/OrderFragment.d.ts.map +1 -0
  270. package/dist/modules/order/hooks/useOrders.d.ts +46 -0
  271. package/dist/modules/order/hooks/useOrders.d.ts.map +1 -0
  272. package/dist/modules/order.js +563 -0
  273. package/dist/modules/payment-providers.js +206 -0
  274. package/dist/modules/product/hooks/useProductsCount.d.ts +8 -0
  275. package/dist/modules/product/hooks/useProductsCount.d.ts.map +1 -0
  276. package/dist/modules/product-review.js +251 -0
  277. package/dist/modules/product.js +1929 -0
  278. package/dist/modules/quotation.js +297 -0
  279. package/dist/modules/token.js +143 -0
  280. package/dist/modules/warehousing-providers.js +206 -0
  281. package/dist/modules/work/fragments/WorkFragment.d.ts +3 -0
  282. package/dist/modules/work/fragments/WorkFragment.d.ts.map +1 -0
  283. package/dist/modules/work/hooks/useAddWork.d.ts +6 -0
  284. package/dist/modules/work/hooks/useAddWork.d.ts.map +1 -0
  285. package/dist/modules/work/hooks/useWork.d.ts +32 -0
  286. package/dist/modules/work/hooks/useWork.d.ts.map +1 -0
  287. package/dist/modules/work.js +308 -0
  288. package/dist/plugins.js +8 -0
  289. package/dist/providers.js +6 -0
  290. package/dist/sdk/hooks.d.ts +9 -0
  291. package/dist/sdk/hooks.d.ts.map +1 -0
  292. package/dist/sdk/modal.d.ts +7 -0
  293. package/dist/sdk/modal.d.ts.map +1 -0
  294. package/dist/sdk/plugins.d.ts +67 -0
  295. package/dist/sdk/plugins.d.ts.map +1 -0
  296. package/dist/sdk/providers.d.ts +5 -0
  297. package/dist/sdk/providers.d.ts.map +1 -0
  298. package/dist/sdk/theme.d.ts +26 -0
  299. package/dist/sdk/theme.d.ts.map +1 -0
  300. package/dist/theme.js +34 -0
  301. package/dist/ui.js +21527 -0
  302. package/out/403/index.html +2 -2
  303. package/out/404/index.html +2 -2
  304. package/out/404.html +2 -2
  305. package/out/423/index.html +2 -2
  306. package/out/500/index.html +2 -2
  307. package/out/_next/static/chunks/0-kffmdf1lcxk.js +1 -0
  308. package/out/_next/static/chunks/01h4ept18s-ns.js +807 -0
  309. package/out/_next/static/chunks/02cdoh48sex9m.js +1 -0
  310. package/out/_next/static/chunks/03-j84eg_htky.js +21 -0
  311. package/out/_next/static/chunks/03-z1yl608b56.js +807 -0
  312. package/out/_next/static/chunks/030bzkeke0edz.js +7 -0
  313. package/out/_next/static/chunks/037vsiy28s6dg.js +41 -0
  314. package/out/_next/static/chunks/05qpw6q8uiz3l.js +15 -0
  315. package/out/_next/static/chunks/06c-2u_g1d4r2.js +22 -0
  316. package/out/_next/static/chunks/06l-rqlf4bp81.js +108 -0
  317. package/out/_next/static/chunks/06rhycq_6w-52.js +188 -0
  318. package/out/_next/static/chunks/07nffhr51vke6.js +59 -0
  319. package/out/_next/static/chunks/0_ngi84ak813x.js +288 -0
  320. package/out/_next/static/chunks/0bc02hascgv7z.js +1 -0
  321. package/out/_next/static/chunks/0c9ruqj2wf3n6.js +905 -0
  322. package/out/_next/static/chunks/0cm0oyd82zvez.js +1 -0
  323. package/out/_next/static/chunks/0cotrfgh1n2cx.js +346 -0
  324. package/out/_next/static/chunks/0d6_opzy2p6ik.js +807 -0
  325. package/out/_next/static/chunks/0e2e0srgvkzk9.js +144 -0
  326. package/out/_next/static/chunks/0gurfn3nhm859.js +1 -0
  327. package/out/_next/static/chunks/0h0r_q6xa9qr_.js +1 -0
  328. package/out/_next/static/chunks/0ht2wu-61vq9v.js +807 -0
  329. package/out/_next/static/chunks/0jsq3fzumbjbc.js +8 -0
  330. package/out/_next/static/chunks/0ljuhrsh4x2p-.js +14 -0
  331. package/out/_next/static/chunks/0m6jydfuy_4o3.js +1 -0
  332. package/out/_next/static/chunks/0mzh9-epgepi1.js +119 -0
  333. package/out/_next/static/chunks/0n0uzfbkfb7e5.js +12 -0
  334. package/out/_next/static/chunks/0pecsk3c09b19.js +3 -0
  335. package/out/_next/static/chunks/0q-14a7j6afh3.js +1 -0
  336. package/out/_next/static/chunks/0qso2-ph6v-5-.js +12 -0
  337. package/out/_next/static/chunks/0razrbxeai797.js +807 -0
  338. package/out/_next/static/chunks/0se09klbk8drd.js +68 -0
  339. package/out/_next/static/chunks/0so45zh_oxlfb.js +15 -0
  340. package/out/_next/static/chunks/0ukyxgmnqos6o.js +1 -0
  341. package/out/_next/static/chunks/0urdgbfwcwyhr.js +14 -0
  342. package/out/_next/static/chunks/0uw9cbq0ivaz0.js +1 -0
  343. package/out/_next/static/chunks/0vls1lbu_rh78.js +342 -0
  344. package/out/_next/static/chunks/0xuevvy5i5d12.js +138 -0
  345. package/out/_next/static/chunks/0xxvsq70e4xn0.js +1 -0
  346. package/out/_next/static/chunks/0y4l_7c35iai3.js +12 -0
  347. package/out/_next/static/chunks/0yjypzfweew5c.js +13 -0
  348. package/out/_next/static/chunks/0yxc1yy1eq4u3.js +149 -0
  349. package/out/_next/static/chunks/1-g6r12rmwlxe.js +14 -0
  350. package/out/_next/static/chunks/10h7lznd10mmp.js +384 -0
  351. package/out/_next/static/chunks/10mdz-l7wmtr5.js +24 -0
  352. package/out/_next/static/chunks/10os1s66nimmi.js +110 -0
  353. package/out/_next/static/chunks/12qzh85d5on4y.js +44 -0
  354. package/out/_next/static/chunks/1398hevtpl_69.js +1 -0
  355. package/out/_next/static/chunks/13qk8ukzu1snm.js +288 -0
  356. package/out/_next/static/chunks/140i5f2n-78cg.js +7 -0
  357. package/out/_next/static/chunks/14xo-79v4hkao.js +15 -0
  358. package/out/_next/static/chunks/164wr2-2gfnlb.js +1 -0
  359. package/out/_next/static/chunks/168vn2bjuxmkv.js +15 -0
  360. package/out/_next/static/chunks/16ey81skn09dz.js +1 -0
  361. package/out/_next/static/chunks/16njzhio749zv.js +14 -0
  362. package/out/_next/static/chunks/18-orz9acmfb5.js +5 -0
  363. package/out/_next/static/chunks/18y5ygb5ea60g.js +15 -0
  364. package/out/_next/static/chunks/19y4w6_d_qiou.js +1 -0
  365. package/out/_next/static/chunks/1_g-csysa-i-9.js +1 -0
  366. package/out/_next/static/chunks/1_quktgfhf40v.js +31 -0
  367. package/out/_next/static/chunks/1_zsbsuo7l_6m.js +12 -0
  368. package/out/_next/static/chunks/1a8cuvabj42_k.js +15 -0
  369. package/out/_next/static/chunks/1ae-9ft5cgojf.js +1 -0
  370. package/out/_next/static/chunks/1ai7t85n93pgb.js +13 -0
  371. package/out/_next/static/chunks/1bm5ab-8dqhhe.js +14 -0
  372. package/out/_next/static/chunks/1cgxgd2cf8u3j.js +157 -0
  373. package/out/_next/static/chunks/1d0-uj-itsj64.js +13 -0
  374. package/out/_next/static/chunks/1d951b6ed8oqn.js +110 -0
  375. package/out/_next/static/chunks/1d_puhcn8lg6q.js +51 -0
  376. package/out/_next/static/chunks/1dn4wzp1vhocn.js +13 -0
  377. package/out/_next/static/chunks/1drrou5kp4qdz.js +1 -0
  378. package/out/_next/static/chunks/1e43ue9prlgq1.js +14 -0
  379. package/out/_next/static/chunks/1e4_28-3u5o85.js +30 -0
  380. package/out/_next/static/chunks/1f3mflnvp8_7-.js +31 -0
  381. package/out/_next/static/chunks/1f5-j4f3irx0j.js +147 -0
  382. package/out/_next/static/chunks/1fid6ut5hz6aw.js +14 -0
  383. package/out/_next/static/chunks/1fm3727le1x_5.js +195 -0
  384. package/out/_next/static/chunks/1g57y7cq7tjcb.js +9 -0
  385. package/out/_next/static/chunks/1ggz6fow3gt00.js +137 -0
  386. package/out/_next/static/chunks/1gt65pz91hyuz.js +1 -0
  387. package/out/_next/static/chunks/1i-48ku54x3au.js +12 -0
  388. package/out/_next/static/chunks/1ikm9qcx--k3u.js +807 -0
  389. package/out/_next/static/chunks/1izpxynqp99t4.js +193 -0
  390. package/out/_next/static/chunks/1j2ko85jp-5wy.js +807 -0
  391. package/out/_next/static/chunks/1kj__-femskug.js +52 -0
  392. package/out/_next/static/chunks/1lbsdlf5h6ojc.js +16 -0
  393. package/out/_next/static/chunks/1mp7dwvsvobjw.js +14 -0
  394. package/out/_next/static/chunks/1mwvnv71bl7mc.js +1 -0
  395. package/out/_next/static/chunks/1n7i2rp59o9o8.js +384 -0
  396. package/out/_next/static/chunks/1n7suzk2c4p2e.js +16 -0
  397. package/out/_next/static/chunks/1nsbi_bcocm4l.js +7 -0
  398. package/out/_next/static/chunks/1pklei2ds10d2.js +66 -0
  399. package/out/_next/static/chunks/1pxor-3_vf3du.js +31 -0
  400. package/out/_next/static/chunks/1q865b-tzgi80.js +13 -0
  401. package/out/_next/static/chunks/1qp68765j1aiv.js +61 -0
  402. package/out/_next/static/chunks/1r-cvj3mpr-7x.js +87 -0
  403. package/out/_next/static/chunks/1snnkviatd2ds.js +90 -0
  404. package/out/_next/static/chunks/1t7lg-hnk9tjf.js +18 -0
  405. package/out/_next/static/chunks/1telbrcq2kix_.js +10 -0
  406. package/out/_next/static/chunks/1tz4za98hv_q2.js +12 -0
  407. package/out/_next/static/chunks/1uw2vfhjol6j4.js +10 -0
  408. package/out/_next/static/chunks/1v16gcok-ktdo.js +142 -0
  409. package/out/_next/static/chunks/1v_n1-h3u8vtf.js +25 -0
  410. package/out/_next/static/chunks/1weq9keqxiqpy.js +73 -0
  411. package/out/_next/static/chunks/1wfwvd-730eaa.js +16 -0
  412. package/out/_next/static/chunks/1xbofs3ibkjvj.js +1 -0
  413. package/out/_next/static/chunks/1xl2h1_c5-b_a.js +13 -0
  414. package/out/_next/static/chunks/1yv01jo2m1gkf.js +1 -0
  415. package/out/_next/static/chunks/1ziicn0eb_yji.js +16 -0
  416. package/out/_next/static/chunks/1zza9faw4t3b_.js +46 -0
  417. package/out/_next/static/chunks/1zzpf1xbmchcj.js +132 -0
  418. package/out/_next/static/chunks/2-4ng9fxftmld.js +1 -0
  419. package/out/_next/static/chunks/208fwfjeuxv-r.js +14 -0
  420. package/out/_next/static/chunks/20rtv8f0brb0n.js +43 -0
  421. package/out/_next/static/chunks/21a19t2pe0fpg.js +81 -0
  422. package/out/_next/static/chunks/21zt48zdev_7t.js +20 -0
  423. package/out/_next/static/chunks/236ovetz0d3cm.js +12 -0
  424. package/out/_next/static/chunks/252jebodi67kg.js +1 -0
  425. package/out/_next/static/chunks/26ie8u_ab24o8.js +224 -0
  426. package/out/_next/static/chunks/275o3ly3svw4p.js +1 -0
  427. package/out/_next/static/chunks/28z1z7in8-kbg.js +26 -0
  428. package/out/_next/static/chunks/2atsi2t3hup4a.js +23 -0
  429. package/out/_next/static/chunks/2bb7696udjx6k.js +44 -0
  430. package/out/_next/static/chunks/2bm5aw8hqlgf2.js +50 -0
  431. package/out/_next/static/chunks/2c7gw8ronvu-c.js +807 -0
  432. package/out/_next/static/chunks/2cbr3ybo4xsrv.js +43 -0
  433. package/out/_next/static/chunks/2ef363b9erq_s.js +217 -0
  434. package/out/_next/static/chunks/2eh6ku1a1zbs4.js +135 -0
  435. package/out/_next/static/chunks/2fed4-6c0ghqp.js +99 -0
  436. package/out/_next/static/chunks/2gil5igdermzh.js +36 -0
  437. package/out/_next/static/chunks/2hm0mbq0vtqmw.js +5 -0
  438. package/out/_next/static/chunks/2ismth22knujm.js +1 -0
  439. package/out/_next/static/chunks/2j9-8qtc4_-uk.js +17 -0
  440. package/out/_next/static/chunks/2jln1kjysf99p.js +1 -0
  441. package/out/_next/static/chunks/2jtk4-i4e9lug.js +1 -0
  442. package/out/_next/static/chunks/2k020ab3luqev.js +1 -0
  443. package/out/_next/static/chunks/2kbieaechn8m8.js +1 -0
  444. package/out/_next/static/chunks/2kzyda4a6mqut.js +1 -0
  445. package/out/_next/static/chunks/2l24h40hc5_30.js +10 -0
  446. package/out/_next/static/chunks/2ljoq6sr-g2da.js +1 -0
  447. package/out/_next/static/chunks/2mr2k4sb6i021.js +32 -0
  448. package/out/_next/static/chunks/2na27-e8gs0-f.js +171 -0
  449. package/out/_next/static/chunks/2nn3_f04lnr0b.js +807 -0
  450. package/out/_next/static/chunks/2o8r09deae36c.js +9 -0
  451. package/out/_next/static/chunks/2ocwu5vbc5r34.js +73 -0
  452. package/out/_next/static/chunks/2qprgjhjl8d4c.js +807 -0
  453. package/out/_next/static/chunks/2s1zqhg6tm4h9.js +13 -0
  454. package/out/_next/static/chunks/2skxi0oqka3ef.js +26 -0
  455. package/out/_next/static/chunks/2som54uae4_oi.js +12 -0
  456. package/out/_next/static/chunks/2t3t6gm5vlg_0.js +58 -0
  457. package/out/_next/static/chunks/2twfwv_6mk256.js +17 -0
  458. package/out/_next/static/chunks/2u57x6wlny1y3.js +13 -0
  459. package/out/_next/static/chunks/2ukm5shi1lfcd.js +14 -0
  460. package/out/_next/static/chunks/2w5y5xf0nriwx.js +1 -0
  461. package/out/_next/static/chunks/2we-9ioq4gqia.js +8 -0
  462. package/out/_next/static/chunks/2ydh6mhksolv7.js +12 -0
  463. package/out/_next/static/chunks/2zr8-l2b9pf-u.js +12 -0
  464. package/out/_next/static/chunks/30g-s0ioynhjx.js +224 -0
  465. package/out/_next/static/chunks/31y7dx6ytab7h.js +3 -0
  466. package/out/_next/static/chunks/329ps41fzi6kl.js +17 -0
  467. package/out/_next/static/chunks/32r9w6anc6p-3.js +17 -0
  468. package/out/_next/static/chunks/35995k_05rugk.js +5 -0
  469. package/out/_next/static/chunks/363ng2l8o_bee.js +101 -0
  470. package/out/_next/static/chunks/36jick0alh9oa.js +50 -0
  471. package/out/_next/static/chunks/36pa0vs0telmp.js +1 -0
  472. package/out/_next/static/chunks/378867ti5yucc.js +3 -0
  473. package/out/_next/static/chunks/38b7m-s26ciug.js +137 -0
  474. package/out/_next/static/chunks/38pz7fmyf6ay0.js +1 -0
  475. package/out/_next/static/chunks/3_fk1axw7jv3l.js +188 -0
  476. package/out/_next/static/chunks/3_oq57mmti33y.js +60 -0
  477. package/out/_next/static/chunks/3b5o-l5g62zd5.js +15 -0
  478. package/out/_next/static/chunks/3bxtyo0u_psf7.js +1 -0
  479. package/out/_next/static/chunks/3def6w0a5af0g.js +21 -0
  480. package/out/_next/static/chunks/3ebh4y7h6y1vq.js +58 -0
  481. package/out/_next/static/chunks/3ely6dgcq2a4h.js +16 -0
  482. package/out/_next/static/chunks/3f-ap6wo94un_.js +1 -0
  483. package/out/_next/static/chunks/3gfjdynb9mg8h.js +23 -0
  484. package/out/_next/static/chunks/3ghzaufs2n8uq.js +2 -0
  485. package/out/_next/static/chunks/3gls52bjnoo8q.js +596 -0
  486. package/out/_next/static/chunks/3gx4smk7pb27x.js +119 -0
  487. package/out/_next/static/chunks/3jv-kmvjt_bno.js +1 -0
  488. package/out/_next/static/chunks/3k98cr566roh-.js +2 -0
  489. package/out/_next/static/chunks/3kisw9hre44e5.js +807 -0
  490. package/out/_next/static/chunks/3l2ohiwua66_k.js +13 -0
  491. package/out/_next/static/chunks/3mdyli-gbdglv.js +18 -0
  492. package/out/_next/static/chunks/3o733m88skfkc.js +8 -0
  493. package/out/_next/static/chunks/3opuxnw_w3yb5.js +101 -0
  494. package/out/_next/static/chunks/3po074-e_om-u.js +13 -0
  495. package/out/_next/static/chunks/3qpo866owyu7i.js +16 -0
  496. package/out/_next/static/chunks/3rnl7-84z1op5.js +28 -0
  497. package/out/_next/static/chunks/3s1r5r5je7t2j.js +12 -0
  498. package/out/_next/static/chunks/3tv9csz53av-5.js +1 -0
  499. package/out/_next/static/chunks/3v1dxn4rp-o3v.js +315 -0
  500. package/out/_next/static/chunks/3w_wwl_hd91od.js +1 -0
  501. package/out/_next/static/chunks/3wlt1njh1vvtx.js +16 -0
  502. package/out/_next/static/chunks/3wwsanj-y2gn3.js +107 -0
  503. package/out/_next/static/chunks/3wzzh45yillzb.js +1 -0
  504. package/out/_next/static/chunks/3x96n1j6ap_rg.js +190 -0
  505. package/out/_next/static/chunks/3xhmfg-981n_5.js +61 -0
  506. package/out/_next/static/chunks/3yqw8z_udrol0.js +1 -0
  507. package/out/_next/static/chunks/3z_c5kpm-e1ty.js +15 -0
  508. package/out/_next/static/chunks/3zqfchpzqxd92.css +1 -0
  509. package/out/_next/static/chunks/4079hjuumfmm2.js +31 -0
  510. package/out/_next/static/chunks/40922jbr_e5ug.js +51 -0
  511. package/out/_next/static/chunks/40zy6mxa-be0m.js +1 -0
  512. package/out/_next/static/chunks/43-m6q6a0aebk.js +66 -0
  513. package/out/_next/static/chunks/43lu0r3m_c-km.js +21 -0
  514. package/out/_next/static/chunks/44nj9c766dqvc.js +807 -0
  515. package/out/_next/static/chunks/458tg2eg5h8j5.js +324 -0
  516. package/out/_next/static/chunks/45cd4ypk94sw2.js +807 -0
  517. package/out/_next/static/chunks/turbopack-0-r_wvlw2r9-u.js +1 -0
  518. package/out/_next/static/chunks/turbopack-019acfo_4lvwb.js +1 -0
  519. package/out/_next/static/chunks/turbopack-04p4_o2q-3775.js +1 -0
  520. package/out/_next/static/chunks/turbopack-05gjzccig6ly0.js +1 -0
  521. package/out/_next/static/chunks/turbopack-0_-8nqdse9k2n.js +1 -0
  522. package/out/_next/static/chunks/turbopack-0bakfyovo7_7v.js +1 -0
  523. package/out/_next/static/chunks/turbopack-0dnmhb2s6oz_0.js +1 -0
  524. package/out/_next/static/chunks/turbopack-0f_0xhndfo2rg.js +1 -0
  525. package/out/_next/static/chunks/turbopack-0g8j6jo0h0wr2.js +1 -0
  526. package/out/_next/static/chunks/turbopack-0higs44_fpd2z.js +1 -0
  527. package/out/_next/static/chunks/turbopack-0hpqs96ev0qw3.js +1 -0
  528. package/out/_next/static/chunks/turbopack-0nhgkjul58c0o.js +1 -0
  529. package/out/_next/static/chunks/turbopack-0o2st91056bew.js +1 -0
  530. package/out/_next/static/chunks/turbopack-0t_4mmwvh5jcg.js +1 -0
  531. package/out/_next/static/chunks/turbopack-0x70e5tn0cdka.js +1 -0
  532. package/out/_next/static/chunks/turbopack-0xkx2uti084qk.js +1 -0
  533. package/out/_next/static/chunks/turbopack-0yqmz8xksziao.js +1 -0
  534. package/out/_next/static/chunks/turbopack-12k7mi-z9q_my.js +1 -0
  535. package/out/_next/static/chunks/turbopack-15m77byc-8nnf.js +1 -0
  536. package/out/_next/static/chunks/turbopack-18mged-v_fxn-.js +1 -0
  537. package/out/_next/static/chunks/turbopack-1cuprvm6j2dby.js +1 -0
  538. package/out/_next/static/chunks/turbopack-1eymghczt7xa6.js +1 -0
  539. package/out/_next/static/chunks/turbopack-1g54o3vx9b89_.js +1 -0
  540. package/out/_next/static/chunks/turbopack-1m692rsdwiawo.js +1 -0
  541. package/out/_next/static/chunks/turbopack-1mm7vtvpd13ez.js +1 -0
  542. package/out/_next/static/chunks/turbopack-1mpj4cwcr142-.js +1 -0
  543. package/out/_next/static/chunks/turbopack-1r78bk7u_h8wj.js +1 -0
  544. package/out/_next/static/chunks/turbopack-1r7fkywendzls.js +1 -0
  545. package/out/_next/static/chunks/turbopack-1rd9nl8tzd7mh.js +1 -0
  546. package/out/_next/static/chunks/turbopack-22rm65gb-fb5f.js +1 -0
  547. package/out/_next/static/chunks/turbopack-25vthc1ebxwmp.js +1 -0
  548. package/out/_next/static/chunks/turbopack-270o4xzuhcrx0.js +1 -0
  549. package/out/_next/static/chunks/turbopack-28xworku-1n7z.js +1 -0
  550. package/out/_next/static/chunks/turbopack-29flyuxccgrne.js +1 -0
  551. package/out/_next/static/chunks/turbopack-29srldogp40c5.js +1 -0
  552. package/out/_next/static/chunks/turbopack-2_6wg5anpoge7.js +1 -0
  553. package/out/_next/static/chunks/turbopack-2bj5y06eussh4.js +1 -0
  554. package/out/_next/static/chunks/turbopack-2fn9x-4hydbz0.js +1 -0
  555. package/out/_next/static/chunks/turbopack-2fuo3f3fu4s_7.js +1 -0
  556. package/out/_next/static/chunks/turbopack-2hl0oouvcl1z1.js +1 -0
  557. package/out/_next/static/chunks/turbopack-2n2hy492yai1a.js +1 -0
  558. package/out/_next/static/chunks/turbopack-2p5bsfgvhhojm.js +1 -0
  559. package/out/_next/static/chunks/turbopack-2rbboc86ezfbu.js +1 -0
  560. package/out/_next/static/chunks/turbopack-2s2n1a40z_nc8.js +1 -0
  561. package/out/_next/static/chunks/turbopack-3383eobamf6qf.js +1 -0
  562. package/out/_next/static/chunks/turbopack-3ef9ygfxmresk.js +1 -0
  563. package/out/_next/static/chunks/turbopack-3gcd1fazu0e6k.js +1 -0
  564. package/out/_next/static/chunks/turbopack-3jhuq-3ckq-kq.js +1 -0
  565. package/out/_next/static/chunks/turbopack-3k39kfzuaitd7.js +1 -0
  566. package/out/_next/static/chunks/turbopack-3l628cr68ep0q.js +1 -0
  567. package/out/_next/static/chunks/turbopack-3pajnpuxg-oo4.js +1 -0
  568. package/out/_next/static/chunks/turbopack-3pb9kv0yc_t53.js +1 -0
  569. package/out/_next/static/chunks/turbopack-3qe4ztycky7v0.js +1 -0
  570. package/out/_next/static/chunks/turbopack-3soc2g2pyqtpz.js +1 -0
  571. package/out/_next/static/chunks/turbopack-3tgiyd018trw3.js +1 -0
  572. package/out/_next/static/chunks/turbopack-3tml7qmypxr6t.js +1 -0
  573. package/out/_next/static/chunks/turbopack-3vvw42_0j2__s.js +1 -0
  574. package/out/_next/static/chunks/turbopack-3xhkblxlca6x1.js +1 -0
  575. package/out/_next/static/chunks/turbopack-3xz6yhttw8te6.js +1 -0
  576. package/out/_next/static/chunks/turbopack-3zxdh674077s0.js +1 -0
  577. package/out/_next/static/chunks/turbopack-4258ul_qgxg3-.js +1 -0
  578. package/out/_next/static/chunks/turbopack-42gir6e579247.js +1 -0
  579. package/out/_next/static/chunks/turbopack-42m_zup5_jxr9.js +1 -0
  580. package/out/_next/static/plNLzDs1uuSExXpN_uubP/_buildManifest.js +258 -0
  581. package/out/_offline/index.html +2 -2
  582. package/out/account/forgot-password/index.html +2 -2
  583. package/out/account/index.html +2 -2
  584. package/out/assortments/AssortmentDetailPage/index.html +2 -2
  585. package/out/assortments/index.html +2 -2
  586. package/out/assortments/new/index.html +2 -2
  587. package/out/copilot/index.html +2 -2
  588. package/out/country/CountryDetailPage/index.html +2 -2
  589. package/out/country/index.html +2 -2
  590. package/out/country/new/index.html +2 -2
  591. package/out/currency/CurrencyDetailPage/index.html +2 -2
  592. package/out/currency/index.html +2 -2
  593. package/out/currency/new/index.html +2 -2
  594. package/out/delivery-provider/DeliveryProviderDetailPage/index.html +2 -2
  595. package/out/delivery-provider/index.html +2 -2
  596. package/out/delivery-provider/new/index.html +2 -2
  597. package/out/enrollments/EnrollmentDetailPage/index.html +2 -2
  598. package/out/enrollments/index.html +2 -2
  599. package/out/events/EventDetailPage/index.html +2 -2
  600. package/out/events/index.html +2 -2
  601. package/out/exports/index.html +2 -2
  602. package/out/external/index.html +2 -2
  603. package/out/filters/FilterDetailPage/index.html +2 -2
  604. package/out/filters/index.html +2 -2
  605. package/out/filters/new/index.html +2 -2
  606. package/out/index.html +2 -2
  607. package/out/install/index.html +2 -2
  608. package/out/language/LanguageDetailPage/index.html +2 -2
  609. package/out/language/index.html +2 -2
  610. package/out/language/new/index.html +2 -2
  611. package/out/log-in/index.html +2 -2
  612. package/out/orders/OrderDetailPage/index.html +2 -2
  613. package/out/orders/index.html +2 -2
  614. package/out/payment-provider/PaymentProviderDetailPage/index.html +2 -2
  615. package/out/payment-provider/index.html +2 -2
  616. package/out/payment-provider/new/index.html +2 -2
  617. package/out/products/ProductDetailPage/index.html +2 -2
  618. package/out/products/index.html +2 -2
  619. package/out/products/new/index.html +2 -2
  620. package/out/quotations/QuotationDetailPage/index.html +2 -2
  621. package/out/quotations/index.html +2 -2
  622. package/out/reset-password/index.html +2 -2
  623. package/out/sign-up/index.html +2 -2
  624. package/out/styleguide/index.html +2 -2
  625. package/out/tokens/TokenDetailPage/index.html +2 -2
  626. package/out/tokens/index.html +2 -2
  627. package/out/users/UserDetailPage/index.html +2 -2
  628. package/out/users/index.html +2 -2
  629. package/out/users/new/index.html +2 -2
  630. package/out/verify-email/index.html +2 -2
  631. package/out/warehousing-provider/WarehousingProviderDetailPage/index.html +2 -2
  632. package/out/warehousing-provider/index.html +2 -2
  633. package/out/warehousing-provider/new/index.html +2 -2
  634. package/out/works/WorkDetailPage/index.html +2 -2
  635. package/out/works/WorkQueueListView/index.html +2 -2
  636. package/out/works/index.html +2 -2
  637. package/out/works/management/index.html +2 -2
  638. package/package.json +15 -15
  639. package/out/_next/static/chunks/0-5fyr7499zt-.js +0 -1
  640. package/out/_next/static/chunks/0-fh37zk913w7.js +0 -13
  641. package/out/_next/static/chunks/008lcuc11zfte.js +0 -43
  642. package/out/_next/static/chunks/016okam34efcb.js +0 -81
  643. package/out/_next/static/chunks/02vbc6plhv4r5.js +0 -384
  644. package/out/_next/static/chunks/03vpe61v8f-gu.js +0 -342
  645. package/out/_next/static/chunks/046r7jg73yrg4.js +0 -7
  646. package/out/_next/static/chunks/0476m35sf_p60.js +0 -147
  647. package/out/_next/static/chunks/04eely9r7xy_m.js +0 -12
  648. package/out/_next/static/chunks/05x_nq6c7164m.js +0 -1
  649. package/out/_next/static/chunks/06e1aw5kfb7xi.js +0 -5
  650. package/out/_next/static/chunks/083qufblh7mjm.js +0 -1
  651. package/out/_next/static/chunks/08k08iasjrir_.js +0 -31
  652. package/out/_next/static/chunks/09z9--qr2tkcu.js +0 -288
  653. package/out/_next/static/chunks/0_zceuhyoka_a.js +0 -110
  654. package/out/_next/static/chunks/0aj0bvtuku7d_.js +0 -291
  655. package/out/_next/static/chunks/0altoqexicqbh.js +0 -1
  656. package/out/_next/static/chunks/0dbwh_dc2wx4a.js +0 -288
  657. package/out/_next/static/chunks/0es-a44yzoi_c.js +0 -3
  658. package/out/_next/static/chunks/0h2609m294ysz.js +0 -41
  659. package/out/_next/static/chunks/0hgd0co23t_8i.js +0 -1
  660. package/out/_next/static/chunks/0hq1mco02oyfu.js +0 -15
  661. package/out/_next/static/chunks/0idef676w-1dr.js +0 -22
  662. package/out/_next/static/chunks/0ivn6vm7qrjvq.js +0 -1
  663. package/out/_next/static/chunks/0j01zkyli64rz.js +0 -14
  664. package/out/_next/static/chunks/0j1q0r96xzpzy.js +0 -46
  665. package/out/_next/static/chunks/0jian6h40drni.js +0 -13
  666. package/out/_next/static/chunks/0lt88y29dqxzp.js +0 -807
  667. package/out/_next/static/chunks/0m4bdyytr95sc.js +0 -177
  668. package/out/_next/static/chunks/0m7b5siv8r0ut.js +0 -1
  669. package/out/_next/static/chunks/0mpudwrx5wimh.js +0 -12
  670. package/out/_next/static/chunks/0nocitcg_prcn.js +0 -12
  671. package/out/_next/static/chunks/0nxlx7tthmg78.js +0 -31
  672. package/out/_next/static/chunks/0owtren6z_d3d.js +0 -15
  673. package/out/_next/static/chunks/0pc76ldf1jpm5.js +0 -807
  674. package/out/_next/static/chunks/0qchl2kwxk5_b.js +0 -9
  675. package/out/_next/static/chunks/0qxzncya34yzs.js +0 -135
  676. package/out/_next/static/chunks/0s1c1ap63wp7w.js +0 -1
  677. package/out/_next/static/chunks/0semy5tiq3zfa.js +0 -217
  678. package/out/_next/static/chunks/0sy4g9cj0c0nw.js +0 -1
  679. package/out/_next/static/chunks/0uvf4fw2u8xlt.js +0 -1
  680. package/out/_next/static/chunks/0v8wplj4_g1yk.js +0 -14
  681. package/out/_next/static/chunks/0vsekcvrno4r-.js +0 -12
  682. package/out/_next/static/chunks/0vskxstx7o46u.js +0 -200
  683. package/out/_next/static/chunks/0w90onmzd_9vo.js +0 -5
  684. package/out/_next/static/chunks/0winpgp117o2-.js +0 -14
  685. package/out/_next/static/chunks/0wooaklx8_14q.js +0 -1
  686. package/out/_next/static/chunks/0wq-kibsj03f4.js +0 -3
  687. package/out/_next/static/chunks/0x3i8esz6im79.js +0 -12
  688. package/out/_next/static/chunks/0xcsxtbxsj1ez.js +0 -807
  689. package/out/_next/static/chunks/0xmblnoqgtm4c.js +0 -13
  690. package/out/_next/static/chunks/0y9-ayhjhhngf.js +0 -101
  691. package/out/_next/static/chunks/0ysqpo9mvr0zd.js +0 -15
  692. package/out/_next/static/chunks/1-3-xh5bp6iml.js +0 -12
  693. package/out/_next/static/chunks/10a6m_uzed9ah.js +0 -7
  694. package/out/_next/static/chunks/110t5i029b2k2.js +0 -15
  695. package/out/_next/static/chunks/11p5hx0zojiun.js +0 -14
  696. package/out/_next/static/chunks/11tlxn06pl0v_.js +0 -807
  697. package/out/_next/static/chunks/1256wg-50z130.js +0 -224
  698. package/out/_next/static/chunks/12tyi7_yn5xtz.js +0 -13
  699. package/out/_next/static/chunks/14u7jeuqdz0nk.js +0 -108
  700. package/out/_next/static/chunks/14voa-w_qaloy.js +0 -10
  701. package/out/_next/static/chunks/151znlrk2b4e5.js +0 -61
  702. package/out/_next/static/chunks/1527ha2whtazw.js +0 -88
  703. package/out/_next/static/chunks/16dj7dz5shhv_.js +0 -1
  704. package/out/_next/static/chunks/17gp91vlnlpn7.js +0 -346
  705. package/out/_next/static/chunks/17h2_757nwv56.js +0 -807
  706. package/out/_next/static/chunks/18609lny07j4e.js +0 -1
  707. package/out/_next/static/chunks/18keiz8xbbpkq.js +0 -26
  708. package/out/_next/static/chunks/18pkchouqfxun.js +0 -1
  709. package/out/_next/static/chunks/199mkuw023v8s.js +0 -144
  710. package/out/_next/static/chunks/19wuto_c4vh0r.js +0 -1
  711. package/out/_next/static/chunks/1_evskl07e2cf.js +0 -132
  712. package/out/_next/static/chunks/1_pteaeq2-av2.js +0 -807
  713. package/out/_next/static/chunks/1_q3-gzp0dk5q.js +0 -59
  714. package/out/_next/static/chunks/1bhgl08k6mpqv.js +0 -103
  715. package/out/_next/static/chunks/1dr9_l25_z_bx.js +0 -1
  716. package/out/_next/static/chunks/1ec3to11jffvy.js +0 -10
  717. package/out/_next/static/chunks/1ev76ynqrcgrk.js +0 -1
  718. package/out/_next/static/chunks/1f3f0m0y4umue.js +0 -1
  719. package/out/_next/static/chunks/1gg4cjedszfwk.js +0 -13
  720. package/out/_next/static/chunks/1h1pt2-va82sv.js +0 -13
  721. package/out/_next/static/chunks/1jhqf1cmlc7pe.js +0 -16
  722. package/out/_next/static/chunks/1ji3672n2x2p1.js +0 -1
  723. package/out/_next/static/chunks/1jifp8h0xxr5a.js +0 -1
  724. package/out/_next/static/chunks/1jqnrnw0p9tw5.js +0 -1
  725. package/out/_next/static/chunks/1jtbcag00kp9r.js +0 -90
  726. package/out/_next/static/chunks/1kytgf0whx_qo.js +0 -14
  727. package/out/_next/static/chunks/1l2mamh-5uwio.js +0 -1
  728. package/out/_next/static/chunks/1l8j-zb8_9nsi.js +0 -1
  729. package/out/_next/static/chunks/1m_5ag79zi_f9.js +0 -14
  730. package/out/_next/static/chunks/1mnpt-bd73euh.js +0 -807
  731. package/out/_next/static/chunks/1mwnl27etu8p6.js +0 -1
  732. package/out/_next/static/chunks/1n0nlm7kpcww-.js +0 -61
  733. package/out/_next/static/chunks/1n3mdw-qdco80.js +0 -8
  734. package/out/_next/static/chunks/1nbgbej8adbrl.js +0 -188
  735. package/out/_next/static/chunks/1nj8g7amact5j.js +0 -8
  736. package/out/_next/static/chunks/1nzeajwrffqt9.js +0 -1
  737. package/out/_next/static/chunks/1oa-sp6_nb4s7.js +0 -119
  738. package/out/_next/static/chunks/1ocvav-_1h1ar.js +0 -13
  739. package/out/_next/static/chunks/1okn_q5vylut9.js +0 -384
  740. package/out/_next/static/chunks/1p8vfdg0fsork.js +0 -1
  741. package/out/_next/static/chunks/1qned-0hap5wh.js +0 -1
  742. package/out/_next/static/chunks/1tj0_95clq0gz.js +0 -13
  743. package/out/_next/static/chunks/1tss29yg71n68.js +0 -26
  744. package/out/_next/static/chunks/1uxu8tui0bawr.js +0 -286
  745. package/out/_next/static/chunks/1viswjqhymg_v.js +0 -836
  746. package/out/_next/static/chunks/1vt4kev5t-rtb.js +0 -16
  747. package/out/_next/static/chunks/1vvgg1k4ox4hs.js +0 -20
  748. package/out/_next/static/chunks/1vvpmer7-2bqu.js +0 -73
  749. package/out/_next/static/chunks/1w-zy6fc2ehco.js +0 -1
  750. package/out/_next/static/chunks/1x-mhg4wgh8xs.js +0 -1
  751. package/out/_next/static/chunks/1x4ypu6tmfyhg.js +0 -14
  752. package/out/_next/static/chunks/1y4f465xdm5b5.js +0 -50
  753. package/out/_next/static/chunks/2--jjxpscypa2.js +0 -31
  754. package/out/_next/static/chunks/2-dekw6fz0zyy.js +0 -137
  755. package/out/_next/static/chunks/20wpn0cmj1uyu.js +0 -7
  756. package/out/_next/static/chunks/223ol_txid_e9.js +0 -227
  757. package/out/_next/static/chunks/22myl2_m23rb-.js +0 -596
  758. package/out/_next/static/chunks/23o_a2htnomyg.js +0 -43
  759. package/out/_next/static/chunks/26430jr5_zhmz.js +0 -193
  760. package/out/_next/static/chunks/26apkiljp9y8j.js +0 -23
  761. package/out/_next/static/chunks/26fgtdpouev8j.js +0 -1
  762. package/out/_next/static/chunks/26jxcw998t9wn.js +0 -10
  763. package/out/_next/static/chunks/26vkx8q85z8r4.js +0 -1
  764. package/out/_next/static/chunks/279v6ulm8bak8.js +0 -13
  765. package/out/_next/static/chunks/27c0k45sjypl5.js +0 -138
  766. package/out/_next/static/chunks/27xa29kcgotjt.js +0 -11
  767. package/out/_next/static/chunks/28l8pqb5msman.js +0 -142
  768. package/out/_next/static/chunks/2_t9cm2tzlx6m.js +0 -1
  769. package/out/_next/static/chunks/2bejn7kgdoibj.js +0 -16
  770. package/out/_next/static/chunks/2bgk94-v9p3zh.js +0 -5
  771. package/out/_next/static/chunks/2c1gkwwv20spk.js +0 -384
  772. package/out/_next/static/chunks/2cykgzchwdf8h.js +0 -13
  773. package/out/_next/static/chunks/2d2xdaq--g766.js +0 -342
  774. package/out/_next/static/chunks/2dwssdhayrajs.js +0 -807
  775. package/out/_next/static/chunks/2ghls3qe3puh7.js +0 -1
  776. package/out/_next/static/chunks/2h88_6ug5c-64.js +0 -46
  777. package/out/_next/static/chunks/2i__ckq4rpsy-.js +0 -16
  778. package/out/_next/static/chunks/2k7cmes14f81v.js +0 -14
  779. package/out/_next/static/chunks/2kcgr1_1bt0ja.js +0 -13
  780. package/out/_next/static/chunks/2kw8sncead6q1.js +0 -1
  781. package/out/_next/static/chunks/2kx374mbbo2fx.js +0 -23
  782. package/out/_next/static/chunks/2l05fni6rturu.js +0 -324
  783. package/out/_next/static/chunks/2lickweqd0ttc.js +0 -16
  784. package/out/_next/static/chunks/2lpu0fgihk_1a.js +0 -1
  785. package/out/_next/static/chunks/2n37m9ums7yxo.js +0 -209
  786. package/out/_next/static/chunks/2ndzew-ih0j7o.js +0 -1
  787. package/out/_next/static/chunks/2ng7fu4nip4iz.js +0 -13
  788. package/out/_next/static/chunks/2npbjddbiwni8.js +0 -87
  789. package/out/_next/static/chunks/2nqaesgt8e-dq.js +0 -807
  790. package/out/_next/static/chunks/2nwi9ew7sgrj3.js +0 -2
  791. package/out/_next/static/chunks/2onyw1yt2zm92.js +0 -103
  792. package/out/_next/static/chunks/2ovkbxsq5d7zw.js +0 -101
  793. package/out/_next/static/chunks/2p2c9lu_w9xpm.js +0 -1
  794. package/out/_next/static/chunks/2p56h7y83ga43.js +0 -173
  795. package/out/_next/static/chunks/2q14v90xec8c3.js +0 -188
  796. package/out/_next/static/chunks/2tuoxofyqz54_.js +0 -12
  797. package/out/_next/static/chunks/2vg32f3cpxij2.js +0 -1
  798. package/out/_next/static/chunks/2vkhxhpfyjmdo.js +0 -14
  799. package/out/_next/static/chunks/2vtw28_by1t1w.js +0 -13
  800. package/out/_next/static/chunks/2w9yaommb4zvu.js +0 -36
  801. package/out/_next/static/chunks/2x-arnbqxh83-.js +0 -21
  802. package/out/_next/static/chunks/2x05qm5tand4y.js +0 -17
  803. package/out/_next/static/chunks/2y7sjkehompze.js +0 -32
  804. package/out/_next/static/chunks/2yme0y_2pzj9n.js +0 -44
  805. package/out/_next/static/chunks/30dk0bk_p44ir.js +0 -905
  806. package/out/_next/static/chunks/31eux-b8vx_2o.js +0 -596
  807. package/out/_next/static/chunks/31kcvq4mpuk-n.js +0 -8
  808. package/out/_next/static/chunks/32iahzknlfas2.js +0 -1
  809. package/out/_next/static/chunks/32l0f9qsyr70b.js +0 -1
  810. package/out/_next/static/chunks/32lrbx2g2oi58.js +0 -1
  811. package/out/_next/static/chunks/33lr5t1t8hzsu.js +0 -15
  812. package/out/_next/static/chunks/34erk-605s-mm.js +0 -1
  813. package/out/_next/static/chunks/3586ibuscee3p.js +0 -22
  814. package/out/_next/static/chunks/36vha92ibdqa5.js +0 -12
  815. package/out/_next/static/chunks/37clktwywpajv.js +0 -1
  816. package/out/_next/static/chunks/37s4hnkf3fb_y.js +0 -807
  817. package/out/_next/static/chunks/37sa01ltf42fy.js +0 -13
  818. package/out/_next/static/chunks/38afjslqo-ezj.js +0 -8
  819. package/out/_next/static/chunks/38bczx6d8d6lo.js +0 -5
  820. package/out/_next/static/chunks/3a0mg8mbspn1l.js +0 -46
  821. package/out/_next/static/chunks/3blt-diyq-naw.js +0 -14
  822. package/out/_next/static/chunks/3ciz0xpu_rprn.js +0 -119
  823. package/out/_next/static/chunks/3e35x8fg5e3pv.js +0 -60
  824. package/out/_next/static/chunks/3f0cric2zcwaa.js +0 -22
  825. package/out/_next/static/chunks/3f2jxhatqetvc.js +0 -807
  826. package/out/_next/static/chunks/3fj61jbc190pd.js +0 -13
  827. package/out/_next/static/chunks/3fq6z0s1jshzn.js +0 -15
  828. package/out/_next/static/chunks/3g4cm3-yeecm2.js +0 -44
  829. package/out/_next/static/chunks/3h3tsq4-en0ds.js +0 -51
  830. package/out/_next/static/chunks/3hu6bowb801qu.js +0 -73
  831. package/out/_next/static/chunks/3jv6te4pgio0l.js +0 -20
  832. package/out/_next/static/chunks/3kml-ussugoev.js +0 -15
  833. package/out/_next/static/chunks/3l02yeb2txq56.js +0 -137
  834. package/out/_next/static/chunks/3ldab1ofpij6b.js +0 -19
  835. package/out/_next/static/chunks/3lvyfkgg8oenq.js +0 -13
  836. package/out/_next/static/chunks/3mflhqmkkt1mw.js +0 -807
  837. package/out/_next/static/chunks/3nvwtolqxr_ge.js +0 -1
  838. package/out/_next/static/chunks/3o4iqy5pws1z9.js +0 -1
  839. package/out/_next/static/chunks/3pr2jl059hr6b.js +0 -22
  840. package/out/_next/static/chunks/3qz-e8u_rngvz.js +0 -1
  841. package/out/_next/static/chunks/3t_1dfdqi26e9.js +0 -18
  842. package/out/_next/static/chunks/3tl7_-7zqlvzg.js +0 -12
  843. package/out/_next/static/chunks/3tvg8ygnthkjr.js +0 -16
  844. package/out/_next/static/chunks/3v36muwibbmij.js +0 -58
  845. package/out/_next/static/chunks/3x304g0u9phqv.js +0 -51
  846. package/out/_next/static/chunks/40ang7smtylgf.css +0 -1
  847. package/out/_next/static/chunks/40j1w9hi4os9m.js +0 -66
  848. package/out/_next/static/chunks/40kd8woagvta6.js +0 -471
  849. package/out/_next/static/chunks/42xkht0rt6xf_.js +0 -12
  850. package/out/_next/static/chunks/43a7fwbiu6x-5.js +0 -13
  851. package/out/_next/static/chunks/43uz-_umdm9hg.js +0 -50
  852. package/out/_next/static/chunks/44cjcus7fzro2.js +0 -5
  853. package/out/_next/static/chunks/45cbkkq5ja1gw.js +0 -15
  854. package/out/_next/static/chunks/turbopack-060-1ln7tnj_o.js +0 -1
  855. package/out/_next/static/chunks/turbopack-06b_rq-xsg8x-.js +0 -1
  856. package/out/_next/static/chunks/turbopack-07j_ygzde0ibk.js +0 -1
  857. package/out/_next/static/chunks/turbopack-083kyitc50o38.js +0 -1
  858. package/out/_next/static/chunks/turbopack-090en30hq-ziw.js +0 -1
  859. package/out/_next/static/chunks/turbopack-0_j93cg1w4d7-.js +0 -1
  860. package/out/_next/static/chunks/turbopack-0_rslss3ulvpt.js +0 -1
  861. package/out/_next/static/chunks/turbopack-0bujhjoujrelz.js +0 -1
  862. package/out/_next/static/chunks/turbopack-0fneu371vdjf1.js +0 -1
  863. package/out/_next/static/chunks/turbopack-0fnocyew0acyq.js +0 -1
  864. package/out/_next/static/chunks/turbopack-0fr9xmcpxfoqa.js +0 -1
  865. package/out/_next/static/chunks/turbopack-0j5di01a8gcxh.js +0 -1
  866. package/out/_next/static/chunks/turbopack-0j_pfj3li7kkn.js +0 -1
  867. package/out/_next/static/chunks/turbopack-0jh0k3boktvim.js +0 -1
  868. package/out/_next/static/chunks/turbopack-0kwipuq5-xmz3.js +0 -1
  869. package/out/_next/static/chunks/turbopack-0m8f237bj0h96.js +0 -1
  870. package/out/_next/static/chunks/turbopack-0n7sl47ktn9hk.js +0 -1
  871. package/out/_next/static/chunks/turbopack-0w37q33v5-6zm.js +0 -1
  872. package/out/_next/static/chunks/turbopack-1-j7m49r309x4.js +0 -1
  873. package/out/_next/static/chunks/turbopack-10nzf9877-okq.js +0 -1
  874. package/out/_next/static/chunks/turbopack-11yslp77vs6mo.js +0 -1
  875. package/out/_next/static/chunks/turbopack-12kl06t32c8h5.js +0 -1
  876. package/out/_next/static/chunks/turbopack-15ck0zsoo17qk.js +0 -1
  877. package/out/_next/static/chunks/turbopack-15z1m4_0bv4zo.js +0 -1
  878. package/out/_next/static/chunks/turbopack-17hgg9dccrviq.js +0 -1
  879. package/out/_next/static/chunks/turbopack-17mnrbrw40xul.js +0 -1
  880. package/out/_next/static/chunks/turbopack-1_alzj1dxez-l.js +0 -1
  881. package/out/_next/static/chunks/turbopack-1_ij44qvn9x25.js +0 -1
  882. package/out/_next/static/chunks/turbopack-1c3d9r9igrmgh.js +0 -1
  883. package/out/_next/static/chunks/turbopack-1cm654d1pgdmv.js +0 -1
  884. package/out/_next/static/chunks/turbopack-1dzfw_agzw78l.js +0 -1
  885. package/out/_next/static/chunks/turbopack-1e49xkg-hxkgw.js +0 -1
  886. package/out/_next/static/chunks/turbopack-1es07ppdqhn8l.js +0 -1
  887. package/out/_next/static/chunks/turbopack-1hz-oep9si1n4.js +0 -1
  888. package/out/_next/static/chunks/turbopack-1jsw2ikqqzdii.js +0 -1
  889. package/out/_next/static/chunks/turbopack-1kl8gahvsru18.js +0 -1
  890. package/out/_next/static/chunks/turbopack-1lzj42w3ao9lv.js +0 -1
  891. package/out/_next/static/chunks/turbopack-1nfsu5t6wryjs.js +0 -1
  892. package/out/_next/static/chunks/turbopack-1sqpspyd-b_u8.js +0 -1
  893. package/out/_next/static/chunks/turbopack-1u2b1ku-xxpld.js +0 -1
  894. package/out/_next/static/chunks/turbopack-1yguzhp-196yl.js +0 -1
  895. package/out/_next/static/chunks/turbopack-216mhl7lyker7.js +0 -1
  896. package/out/_next/static/chunks/turbopack-251iteu80yhxd.js +0 -1
  897. package/out/_next/static/chunks/turbopack-268fyi4wvgswd.js +0 -1
  898. package/out/_next/static/chunks/turbopack-2_w410r5zju-r.js +0 -1
  899. package/out/_next/static/chunks/turbopack-2a85b71rfv1vo.js +0 -1
  900. package/out/_next/static/chunks/turbopack-2e_abq5410ocm.js +0 -1
  901. package/out/_next/static/chunks/turbopack-2jptw2odupw9z.js +0 -1
  902. package/out/_next/static/chunks/turbopack-2n5cgk5tdnyrr.js +0 -1
  903. package/out/_next/static/chunks/turbopack-2qh9qcni48nfb.js +0 -1
  904. package/out/_next/static/chunks/turbopack-2vs1uxhibnike.js +0 -1
  905. package/out/_next/static/chunks/turbopack-2ysbeqfuzoqya.js +0 -1
  906. package/out/_next/static/chunks/turbopack-30nunvblnhi54.js +0 -1
  907. package/out/_next/static/chunks/turbopack-32v2pq35jf6zj.js +0 -1
  908. package/out/_next/static/chunks/turbopack-32zc13tm-_v-k.js +0 -1
  909. package/out/_next/static/chunks/turbopack-3_a0ktgrf9wjr.js +0 -1
  910. package/out/_next/static/chunks/turbopack-3a-4by2ed-ay-.js +0 -1
  911. package/out/_next/static/chunks/turbopack-3a2_b3fds1ev0.js +0 -1
  912. package/out/_next/static/chunks/turbopack-3nry4c4egh21l.js +0 -1
  913. package/out/_next/static/chunks/turbopack-3oydg87ftdlr2.js +0 -1
  914. package/out/_next/static/chunks/turbopack-3rxchig-6vsve.js +0 -1
  915. package/out/_next/static/chunks/turbopack-42frj4xnxg40e.js +0 -1
  916. package/out/_next/static/chunks/turbopack-44efn8-0a_co0.js +0 -1
  917. package/out/_next/static/fPE_xRhmnMCMvI-EidMrb/_buildManifest.js +0 -258
  918. /package/out/_next/static/{fPE_xRhmnMCMvI-EidMrb → plNLzDs1uuSExXpN_uubP}/_clientMiddlewareManifest.js +0 -0
  919. /package/out/_next/static/{fPE_xRhmnMCMvI-EidMrb → plNLzDs1uuSExXpN_uubP}/_ssgManifest.js +0 -0
@@ -0,0 +1,596 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,42929,97057,95379,51628,e=>{"use strict";var t=e.i(91398),a=e.i(69322),s=e.i(66773),l=e.i(25705),d=e.i(50243),i=e.i(94330),r=e.i(43054),o=e.i(95336),n=e.i(16113),u=e.i(82191),c=e.i(31004),m=e.i(76929),p=e.i(27927),f=e.i(61113),x=e.i(11056),g=e.i(42532),h=e.i(10785),b=e.i(1330),v=e.i(73356),y=e.i(50099),j=e.i(77035),I=e.i(56902),w=e.i(41523),M=e.i(19051),N=e.i(11907),P=e.i(37932),k=e.i(41418),_=e.i(58971),$=e.i(91788),C=e.i(44112),S=e.i(5505),T=e.i(30276),R=e.i(59080),A=e.i(32171),q=e.i(1880);let V=R.gql`
2
+ fragment ProductAssignmentFragment on ProductVariationAssignment {
3
+ _id
4
+ vectors {
5
+ _id
6
+ option {
7
+ _id
8
+ value
9
+ texts {
10
+ _id
11
+ title
12
+ subtitle
13
+ }
14
+ }
15
+ variation {
16
+ _id
17
+ key
18
+ texts {
19
+ _id
20
+ locale
21
+ title
22
+ }
23
+ }
24
+ }
25
+ product {
26
+ _id
27
+ texts {
28
+ _id
29
+ title
30
+ slug
31
+ subtitle
32
+ }
33
+ }
34
+ }
35
+ `,D=R.gql`
36
+ query ProductAssignments($productId: ID, $slug: String) {
37
+ product(productId: $productId, slug: $slug) {
38
+ _id
39
+ ... on ConfigurableProduct {
40
+ texts {
41
+ _id
42
+ subtitle
43
+ slug
44
+ title
45
+ }
46
+ variations {
47
+ _id
48
+ key
49
+ texts {
50
+ _id
51
+ title
52
+ }
53
+ options {
54
+ _id
55
+ value
56
+ texts {
57
+ _id
58
+ title
59
+ }
60
+ }
61
+ }
62
+ assignments(includeInactive: true) {
63
+ ...ProductAssignmentFragment
64
+ }
65
+ }
66
+ }
67
+ }
68
+ ${V}
69
+ `;var E=e.i(8918);let L=(e,t,a)=>{let s=e[a],l=[];return(s?.values.filter(e=>e.length).forEach(e=>{let a={};a[s.key]=e,t.length>0?t.forEach(e=>{l.push({...e,...a})}):l.push(a)}),e.length>a+1)?L(e,l,a+1):Array.from(new Set(l.map(e=>JSON.stringify(e)))).map(e=>JSON.parse(e))},U=({_id:e,texts:t})=>({value:e,label:t?.title});var O=e.i(62100),F=e.i(90647),Q=e.i(2765),B=e.i(15971),z=e.i(6607),K=e.i(76204);let H=R.gql`
70
+ mutation AddProductAssignment(
71
+ $proxyId: ID!
72
+ $productId: ID!
73
+ $vectors: [ProductAssignmentVectorInput!]!
74
+ ) {
75
+ addProductAssignment(
76
+ proxyId: $proxyId
77
+ productId: $productId
78
+ vectors: $vectors
79
+ ) {
80
+ _id
81
+ }
82
+ }
83
+ `,Z=()=>{let[e]=(0,K.useMutation)(H);return{addProductAssignment:async({productId:t,proxyId:a,vectors:s})=>e({variables:{productId:t,proxyId:a,vectors:s},refetchQueries:["ProductAssignments"]})}};var W=e.i(24112);let G=R.gql`
84
+ mutation RemoveProductAssignment(
85
+ $proxyId: ID!
86
+ $vectors: [ProductAssignmentVectorInput!]!
87
+ ) {
88
+ removeProductAssignment(proxyId: $proxyId, vectors: $vectors) {
89
+ _id
90
+ }
91
+ }
92
+ `;var J=e.i(41158),X=e.i(57748),Y=e.i(81013),ee=e.i(98949),et=e.i(69211),ea=e.i(45229),es=e.i(99160),el=e.i(57561),ed=e.i(38994);let ei=function({proxyProduct:e,vectors:t,onSuccess:l}){let{selectedLocale:d}=(0,el.default)(),{createProduct:i}=(0,ed.default)(),{addProductAssignment:r}=Z(),{formatMessage:o}=(0,a.useIntl)();return async({title:a,type:n})=>{let u=[{title:a,slug:a.toLowerCase().replace(/\s+/g,"-"),locale:d}],{data:c}=await i({product:{type:n||s.IProductType.SimpleProduct},texts:u}),m=c?.createProduct,p=m?._id;if(!p)throw Error(o({id:"product_creation_failed",defaultMessage:"Product creation failed"}));return await r({productId:p,proxyId:e?._id,vectors:t}),l?.(m),{success:!0}}};var er=e.i(73419);let eo=({proxyProduct:e,vectors:l,onSuccess:d})=>{let{formatMessage:i}=(0,a.useIntl)(),r=ei({onSuccess:d,proxyProduct:e,vectors:l}),{hasRole:o}=(0,_.default)(),n=(0,$.useMemo)(()=>l.map(({value:e})=>e),[l]),u=(0,$.useMemo)(()=>{let t=e?.texts?.title??"";return`${n.join("-")} ${t}`.trim()},[n,e]),c=async({title:e,type:t})=>{try{return await r({title:e,type:t}),{success:!0}}catch(e){return{success:!1,error:{message:e?.message}}}},m=i({id:"product-scaffolded-success",defaultMessage:"Product scaffolded successfully"}),p=(0,ee.default)({submit:c,successMessage:m,enableReinitialize:!0,initialValues:{title:u,type:s.IProductType.SimpleProduct}});return(0,t.jsxs)(et.default,{className:"mt-3 rounded-md",form:p,children:[(0,t.jsxs)("div",{className:"p-5 pb-7 sm:max-w-full flex flex-col gap-3",children:[(0,t.jsx)(ea.default,{name:"title",id:"title",label:i({id:"name",defaultMessage:"Name"}),required:!0,className:"block w-full max-w-full rounded-md border-slate-300 dark:border-slate-800 text-sm focus:ring-slate-800 sm:text-sm"}),(0,t.jsx)(er.default,{className:"mt-1 w-full",label:i({id:"type",defaultMessage:"Type"}),placeholder:i({id:"type",defaultMessage:"Type"}),required:!0,name:"type",options:Object.fromEntries(Object.entries(s.IProductType).map(([e,t])=>[t,e]))})]}),o(s.IRoleAction.ManageProducts)&&(0,t.jsx)("div",{className:"border-t border-t-slate-100 dark:border-t-slate-700 bg-slate-50 dark:bg-slate-900 p-5 text-right",children:(0,t.jsx)(es.default,{label:i({id:"scaffold_product",defaultMessage:"Scaffold"})})})]})},en=({columns:e,variationProduct:l,product:d,loading:i,disabled:r,proxyId:o,columnKeys:n})=>{let{formatMessage:u}=(0,a.useIntl)(),[c,m]=(0,$.useState)(""),{addProductAssignment:p}=Z(),{removeProductAssignment:f}=(()=>{let[e]=(0,K.useMutation)(G);return{removeProductAssignment:async({proxyId:t,vectors:a})=>e({variables:{proxyId:t,vectors:a},refetchQueries:["ProductAssignments"]})}})(),{hasRole:x}=(0,_.default)(),{setModal:g}=(0,z.default)(),{products:h}=(0,W.default)({queryString:c,limit:50,sort:[{key:"created",value:s.ISortDirection.Desc}]}),b=(0,$.useMemo)(()=>e.map((e,t)=>({key:n[t],value:e})).filter(({value:e})=>e),[e,n]),v=(0,$.useCallback)(async({value:e})=>{await p({proxyId:o,productId:e,vectors:b})},[b,p,o]),y=(0,$.useCallback)(async()=>{await g((0,t.jsx)(B.default,{onCancelClick:async()=>g(""),message:u({id:"delete_product_assignment",defaultMessage:"This action might cause inconsistencies with other data that relates to it. Are you sure you want to delete this assignment? "}),onOkClick:async()=>{g(""),await f({proxyId:o,vectors:b})},okText:u({id:"delete_variation_assignment",defaultMessage:"Delete assignment"})}))},[o,b,u,g,f]),j=(0,$.useMemo)(()=>(0,Q.default)(200)(m),[]),I=!l&&d?.variations?.length!==e?.length,w=(0,$.useMemo)(()=>h?.map(U).filter(({value:e})=>e!==o)||[],[h,o]),M=async()=>{await g((0,t.jsx)(eo,{proxyProduct:d,vectors:b,onSuccess:()=>{g(null)}}))};return(0,t.jsxs)(E.default.Row,{children:[e.map((e,a)=>(0,t.jsx)(E.default.Cell,{className:"font-medium",children:e},`${e}`)),(0,t.jsx)(E.default.Cell,{children:l?(0,t.jsx)("div",{className:"flex items-center",children:(0,t.jsx)(J.default,{href:`/products?slug=${(0,q.default)(l)}`,children:(0,t.jsx)("span",{className:"text-green-700 dark:text-green-300 font-medium",children:l?.texts?.title})})}):I?(0,t.jsx)("div",{className:"mt-1 text-sm text-rose-600 italic",children:u({id:"assign_product_needs_variations",defaultMessage:"Please configure all variation options before assigning a product."})}):(0,t.jsx)("div",{className:"relative w-full",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsx)(F.default,{name:"productId",placeholder:u({id:"search_product",defaultMessage:"Search product"}),isLoading:i,isDisabled:r,onChange:v,onInputChange:j,options:w,className:"mt-1 w-full py-2 text-sm font-medium text-slate-500"})}),x(s.IRoleAction.ManageProducts)&&(0,t.jsx)(Y.default,{onClick:M,children:(0,t.jsx)(X.SparklesIcon,{className:"h-5 w-5"})})]})})}),(0,t.jsx)(E.default.Cell,{children:l&&l._id&&(0,t.jsx)(O.default,{onClick:y})})]})};var eu=e.i(2875);let ec=({proxyId:e,disabled:s=!1})=>{let{formatMessage:l}=(0,a.useIntl)(),{product:d,loading:i}=(({productId:e=null,slug:t=null}={})=>{let a=(0,q.parseUniqueId)(t),{data:s,loading:l,error:d}=(0,A.useQuery)(D,{skip:!e&&!a,variables:{productId:e||a}});return{product:s?.product,loading:l,error:d}})({productId:e}),r=d&&d?.variations||[],o=d&&d.assignments||[],n=(0,$.useMemo)(()=>r.filter(({options:e})=>e.length).map(({key:e})=>e),[r]),u=(0,$.useMemo)(()=>r.map(({key:e,options:t})=>({values:t?.map(e=>e.value),key:e})),[r]),c=(0,$.useMemo)(()=>{let e=u.filter(({values:e})=>e?.length);return e.length>0?L(e,[],0):[]},[u]),m=(0,$.useMemo)(()=>o.map(e=>{let t={};return n.forEach(a=>{let s=e.vectors.find(e=>e.variation?.key===a);t[a]=s?.option?.value??""}),t}),[o,n]),p=(0,$.useMemo)(()=>{let e=[...c,...m],t=new Set;return e.filter(e=>{let a=Object.values(e).join("::");return!t.has(a)&&(t.add(a),!0)})},[c,m]),f=(0,$.useMemo)(()=>o.map(e=>{let t={};return e.vectors.forEach(e=>{e?.variation?.key&&e?.option?.value&&(t[e.variation.key]=e.option.value)}),{keys:t,product:e.product}}),[o]),x=(0,$.useMemo)(()=>p.map(e=>{let t=f.find(({keys:t})=>Object.entries(t).every(([t,a])=>e[t]===a));return{_id:Object.values(e).join("::"),product:t?.product,columns:Object.values(e),columnsText:Object.values(e)}}),[p,f]),g=(0,$.useMemo)(()=>r.length>0,[r]),h=(0,$.useMemo)(()=>r.some(e=>e.options&&e.options.length>0),[r]);return(0,t.jsxs)(S.default,{children:[(0,t.jsx)(eu.default,{title:l({id:"product_assignments_explanation_title",defaultMessage:"About Product Assignments"}),description:l({id:"product_assignments_explanation_text",defaultMessage:"Product assignments allow you to link specific products to each unique combination of variation options. For example, if you have a t-shirt with 'Size' and 'Color' variations, you can assign different product SKUs to each combination like 'Large + Red' or 'Small + Blue'. This is useful for managing inventory, pricing, and product details for each specific variant."})}),!g&&(0,t.jsxs)("div",{className:"text-center py-8",children:[(0,t.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-gray-100 dark:bg-gray-800 mb-4",children:(0,t.jsx)(C.InformationCircleIcon,{className:"w-8 h-8 text-gray-400"})}),(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-2",children:l({id:"no_variations_configured",defaultMessage:"No variations configured yet. Please add variations and their options in the Variations tab first."})})]}),g&&h&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(T.default,{messageKey:"assignment_matrix_help",defaultMessage:"Each row represents a unique combination of your product variations. Assign a specific product to each combination to create a complete product catalog."})}),(0,t.jsxs)(E.default,{children:[(0,t.jsxs)(E.default.Row,{children:[n.map(e=>(0,t.jsx)(E.default.Cell,{className:"font-semibold bg-gray-50 dark:bg-gray-800",children:r.find(t=>t.key===e)?.texts?.title||e},e)),(0,t.jsx)(E.default.Cell,{className:"font-semibold bg-gray-50 dark:bg-gray-800",children:l({id:"assigned_product_column_header",defaultMessage:"Assigned Product"})}),(0,t.jsx)(E.default.Cell,{className:"font-semibold bg-gray-50 dark:bg-gray-800",children:l({id:"actions_column_header",defaultMessage:"Actions"})})]}),x.length>0&&x.map(({_id:a,columns:l,product:r})=>(0,t.jsx)(en,{columns:l,disabled:s,loading:i,product:d,variationProduct:r,columnKeys:n,proxyId:e},a))]})]}),g&&!h&&(0,t.jsxs)("div",{className:"text-center py-8",children:[(0,t.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-yellow-100 dark:bg-yellow-900/30 mb-4",children:(0,t.jsx)(C.InformationCircleIcon,{className:"w-8 h-8 text-yellow-600 dark:text-yellow-400"})}),(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-2",children:l({id:"assign_product_needs_variations",defaultMessage:"Please configure all variation options before assigning a product."})}),(0,t.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:l({id:"assignment_matrix_help",defaultMessage:"Each row represents a unique combination of your product variations. Assign a specific product to each combination to create a complete product catalog."})})]})]})};var em=e.i(60195),ep=e.i(1504);let ef=R.gql`
93
+ query ProductTokenization($productId: ID, $slug: String) {
94
+ product(productId: $productId, slug: $slug) {
95
+ _id
96
+ ... on TokenizedProduct {
97
+ contractConfiguration {
98
+ tokenId
99
+ supply
100
+ }
101
+ contractStandard
102
+ contractAddress
103
+ }
104
+ }
105
+ }
106
+ `,ex=R.gql`
107
+ query SmartContractStandards {
108
+ smartContractStandards: __type(name: "SmartContractStandard") {
109
+ options: enumValues {
110
+ value: name
111
+ label: name
112
+ }
113
+ }
114
+ }
115
+ `,eg=R.gql`
116
+ mutation UpdateProductTokenization(
117
+ $productId: ID!
118
+ $tokenization: UpdateProductTokenizationInput!
119
+ ) {
120
+ updateProductTokenization(
121
+ productId: $productId
122
+ tokenization: $tokenization
123
+ ) {
124
+ _id
125
+ }
126
+ }
127
+ `,eh=({productId:e,disabled:l=!1})=>{let{formatMessage:d}=(0,a.useIntl)(),{hasRole:i}=(0,_.default)(),{smartContractStandards:r}=(()=>{let{data:e,loading:t,error:a}=(0,A.useQuery)(ex);return{smartContractStandards:e?.smartContractStandards?.options||[],loading:t,error:a}})(),{updateProductTokenization:o}=(()=>{let[e]=(0,K.useMutation)(eg);return{updateProductTokenization:async({productId:t,tokenization:{contractAddress:a,contractStandard:s,tokenId:l,supply:d}})=>e({variables:{productId:t,tokenization:{contractAddress:a,contractStandard:s,tokenId:l,supply:parseInt(d,10)}},refetchQueries:["Product","Products"]})}})(),{product:n,loading:u}=(({productId:e=null,slug:t=null}={})=>{let a=(0,q.parseUniqueId)(t),{data:s,loading:l,error:d}=(0,A.useQuery)(ef,{skip:!e&&!t,variables:{productId:e||a}});return{product:s?.product,loading:l,error:d}})({productId:e}),c=async({contractAddress:t,contractStandard:a,tokenId:s,supply:l})=>(await o({productId:e,tokenization:{contractAddress:t,contractStandard:a,tokenId:s||"",supply:l}}),{success:!0}),m=d({id:"token_updated",defaultMessage:"Token update successfully!"}),p=(0,ee.default)({disabled:l,submit:c,successMessage:m,initialValues:{contractAddress:"",contractStandard:"",tokenId:"",supply:""}});return(0,$.useEffect)(()=>{u||p.formik.setValues({contractAddress:n?.contractAddress||"",contractStandard:n?.contractStandard||"",tokenId:n?.contractConfiguration?.tokenId||"",supply:n?.contractConfiguration?.supply||""})},[u]),(0,t.jsx)(em.default,{documentationLabel:d({id:"texts",defaultMessage:"Texts"}),className:"mt-2 lg:mt-5",documentation:(0,t.jsx)(a.FormattedMessage,{id:"tokenized_product_text_form_description",defaultMessage:"<b>Contract standards </b> <ol> \n <dt><b> ERC721 </b></dt> <dd> Buying multiple Products leads to multiple Tokens (make sure to set the tokenId to 0 to make it auto generate new id's) </dd>\n <dt> <b> ERC1155 </b></dt> <dd> Buying multiple Products leads to a new token with balance 3 of token with tokenId assigned </dd>\n <dt> <b> Contract address </b></dt> <dd> Address of a token on a given network </dd> </ol>",values:{ol:e=>(0,t.jsxs)("ol",{children:[e," "]}),dt:e=>(0,t.jsxs)("dt",{className:"bold",children:[e," "]}),dd:e=>(0,t.jsxs)("dd",{children:[e," "]}),b:e=>(0,t.jsxs)("b",{children:[e," "]})}}),children:(0,t.jsx)(S.default,{children:(0,t.jsxs)(et.default,{form:p,children:[(0,t.jsxs)("div",{className:"p-5 pb-7 sm:max-w-full flex flex-col gap-y-5",children:[(0,t.jsx)(er.default,{className:"w-full",label:d({id:"contract-standard",defaultMessage:"Contract standard"}),placeholder:d({id:"contract-standard",defaultMessage:"Contract standard"}),required:!0,name:"contractStandard",options:(0,ep.default)(r,"label","value")}),(0,t.jsx)(ea.default,{name:"contractAddress",id:"contractAddress",label:d({id:"contract-address-label",defaultMessage:"Contract Address"}),placeholder:d({id:"contract-address-label",defaultMessage:"Contract Address"}),required:!0,className:"block w-full max-w-full rounded-md border-slate-300 dark:border-slate-800 text-sm focus:ring-slate-800 sm:text-sm"}),(0,t.jsx)(ea.default,{name:"supply",id:"supply",type:"number",label:d({id:"token-supply",defaultMessage:"Supply"}),placeholder:d({id:"token-supply",defaultMessage:"Supply"}),required:!0,className:"block w-full max-w-full rounded-md border-slate-300 dark:border-slate-800 text-sm focus:ring-slate-800 sm:text-sm"}),(0,t.jsx)(ea.default,{name:"tokenId",id:"tokenId",label:d({id:"token-id-label",defaultMessage:"Token Serial Number"}),placeholder:d({id:"token-id-label",defaultMessage:"Token Serial Number"}),className:"block w-full max-w-full rounded-md border-slate-300 dark:border-slate-800 text-sm focus:ring-slate-800 sm:text-sm"})]}),i(s.IRoleAction.ManageProducts)&&(0,t.jsx)("div",{className:"space-y-6 border-t border-t-slate-100 dark:border-t-slate-700 bg-slate-50 dark:bg-slate-900 p-5 text-right",children:(0,t.jsx)(es.default,{label:d({id:"update_token",defaultMessage:"Update token"})})})]})})})};var eb=e.i(31494),ev=e.i(8199);let ey=({id:e,selectedView:a="",disableAll:s=!1,...l})=>"texts"===a?(0,t.jsx)(x.default,{children:(0,t.jsx)(h.default,{productId:e,disabled:s})}):"media"===a?(0,t.jsx)(ev.default,{children:(0,t.jsx)(x.default,{children:(0,t.jsx)(b.default,{productId:e})})}):"commerce"===a?(0,t.jsx)(g.default,{productId:e,disabled:s}):"supply"===a?(0,t.jsx)(y.default,{productId:e,disabled:s}):"warehousing"===a?(0,t.jsx)(I.default,{productId:e,disabled:s}):"variations"===a?(0,t.jsx)(x.default,{children:(0,t.jsx)(j.default,{productId:e,disabled:s})}):"bundled_products"===a?(0,t.jsx)(x.default,{children:(0,t.jsx)(N.default,{productId:e,disabled:s})}):"subscriptions"===a?(0,t.jsx)(v.default,{productId:e,disabled:s}):"reviews"===a?(0,t.jsx)(M.default,{productId:e}):"assignments"===a?(0,t.jsx)(x.default,{children:(0,t.jsx)(ec,{proxyId:e,disabled:s})}):"token"===a?(0,t.jsx)(eh,{productId:e,disabled:s}):"extended"===a?(0,t.jsx)(eb.default,{data:l}):(0,t.jsx)(x.default,{children:(0,t.jsx)(h.default,{productId:e})});e.s(["default",0,({product:e,extendedData:x={}})=>{let{formatMessage:g}=(0,a.useIntl)(),{hasRole:h}=(0,_.default)(),{updateProduct:b}=(0,k.default)(),{shopInfo:v}=(0,el.default)(),{__typename:y}=e||{},j=[{id:"texts",title:g({id:"general_text",defaultMessage:"Text"}),Icon:(0,t.jsx)(l.DocumentTextIcon,{className:"h-5 w-5"})},{id:"media",title:g({id:"media",defaultMessage:"Media"}),Icon:(0,t.jsx)(d.FilmIcon,{className:"h-5 w-5"})},"ConfigurableProduct"!==y&&{id:"commerce",title:g({id:"commerce",defaultMessage:"Commerce"}),Icon:(0,t.jsx)(i.ShoppingBagIcon,{className:"h-5 w-5"})},"SimpleProduct"===y&&{id:"supply",title:g({id:"supply",defaultMessage:"Supply"}),Icon:(0,t.jsx)(r.ChartPieIcon,{className:"h-5 w-5"})},"SimpleProduct"===y&&{id:"warehousing",title:g({id:"warehousing",defaultMessage:"Warehousing"}),Icon:(0,t.jsx)(o.ArchiveBoxIcon,{className:"h-5 w-5"})},"ConfigurableProduct"===y&&{id:"variations",title:g({id:"variations",defaultMessage:"Variations"}),Icon:(0,t.jsx)(n.SwatchIcon,{className:"h-5 w-5"})},"BundleProduct"===y&&{id:"bundled_products",title:g({id:"bundled_items",defaultMessage:"Bundled items"}),Icon:(0,t.jsx)(u.PresentationChartLineIcon,{className:"h-5 w-5"})},"PlanProduct"===y&&{id:"subscriptions",title:g({id:"subscriptions",defaultMessage:"Subscriptions"}),Icon:(0,t.jsx)(c.UsersIcon,{className:"h-5 w-5"})},"ConfigurableProduct"===y&&{id:"assignments",title:g({id:"assignments",defaultMessage:"Assignments"}),Icon:(0,t.jsx)(p.LinkIcon,{className:"h-5 w-5"})},"TokenizedProduct"===y&&{id:"token",title:g({id:"token",defaultMessage:"Token"}),Icon:(0,t.jsx)(p.LinkIcon,{className:"h-5 w-5"})},{id:"reviews",title:g({id:"reviews",defaultMessage:"Reviews"}),Icon:(0,t.jsx)(f.StarIcon,{className:"h-5 w-5"})},null!==x&&{id:"extended",title:g({id:"extended-fields",defaultMessage:"Extended"}),Icon:(0,t.jsx)(m.PuzzlePieceIcon,{className:"h-5 w-5"})}].filter(e=>e),I=async({tags:t})=>(await b({productId:e?._id,product:{tags:t}}),!0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"mt-5 flex flex-wrap items-center justify-between gap-10",children:(0,t.jsx)(P.default,{defaultValue:e?.tags,onSubmit:I,enableEdit:h(s.IRoleAction.ManageProducts),availableTagOptions:v?.adminUiConfig?.productTags.filter(t=>!(e?.tags||[])?.includes(t)).map(e=>({value:e,label:e}))})}),(0,t.jsx)(w.default,{tabItems:j,defaultTab:"texts",children:(0,t.jsx)(ey,{disableAll:e?.status===s.IProductStatus.Deleted,id:e?._id,...x})})]})}],42929);var ej=e.i(35065);e.s(["default",0,({media:e=[],onEditMedia:a})=>(0,t.jsx)("div",{className:"my-5",children:(0,t.jsx)("div",{className:"flex gap-3 overflow-x-auto",children:e.map(e=>(0,t.jsx)("div",{className:"relative flex-shrink-0 group",children:(0,t.jsx)("div",{className:"w-16 h-16 bg-slate-100 dark:bg-slate-800 rounded-lg overflow-hidden cursor-pointer border border-slate-200 dark:border-slate-700",onClick:()=>{var t;return t=e._id,void(a&&a(t))},children:(0,t.jsx)(ej.default,{src:e?.file?.url,alt:e.texts?.[0]?.title||e?.file?.url,width:128,height:128,className:"w-full h-full object-cover"})})},e._id))})})],97057);var eI=e.i(62199);let ew=R.gql`
128
+ mutation PublishProduct($productId: ID!) {
129
+ publishProduct(productId: $productId) {
130
+ ...ProductDetailFragment
131
+ }
132
+ }
133
+ ${eI.default}
134
+ `;e.s(["default",0,()=>{let[e]=(0,K.useMutation)(ew);return{publishProduct:async({productId:t})=>e({variables:{productId:t},refetchQueries:["Product","ShopStatus"],awaitRefetchQueries:!0})}}],95379);let eM=R.gql`
135
+ mutation UnpublishProduct($productId: ID!) {
136
+ unpublishProduct(productId: $productId) {
137
+ ...ProductDetailFragment
138
+ }
139
+ }
140
+ ${eI.default}
141
+ `;e.s(["default",0,()=>{let[e]=(0,K.useMutation)(eM);return{unPublishProduct:async({productId:t})=>e({variables:{productId:t},refetchQueries:["Product","ShopStatus"],awaitRefetchQueries:!0})}}],51628)},88604,e=>{"use strict";var t=e.i(59080),a=e.i(76204);let s=t.gql`
142
+ mutation RemoveProduct($productId: ID!) {
143
+ removeProduct(productId: $productId) {
144
+ _id
145
+ }
146
+ }
147
+ `;e.s(["default",0,()=>{let[e]=(0,a.useMutation)(s);return{removeProduct:async({productId:t})=>e({variables:{productId:t},refetchQueries:["Products","ShopStatus","ShopInfo"]})}}])},41418,e=>{"use strict";var t=e.i(59080),a=e.i(76204),s=e.i(62199);let l=t.gql`
148
+ mutation UpdateProduct($productId: ID!, $product: UpdateProductInput!) {
149
+ updateProduct(productId: $productId, product: $product) {
150
+ ...ProductDetailFragment
151
+ }
152
+ }
153
+ ${s.default}
154
+ `;e.s(["default",0,()=>{let[e]=(0,a.useMutation)(l);return{updateProduct:async({productId:t,product:{tags:a,sequence:s,meta:l}})=>e({variables:{productId:t,product:{tags:a,sequence:s,meta:l}},refetchQueries:["Products","ShopStatus","ShopInfo"]})}}])},30311,e=>{"use strict";var t=e.i(91398),a=e.i(69322),s=e.i(66773),l=e.i(28401),d=e.i(61494),i=e.i(12197),r=e.i(17644),o=e.i(84818),n=e.i(42929),u=e.i(97057),c=e.i(84278),m=e.i(92276),p=e.i(95379),f=e.i(51628),x=e.i(41418),g=e.i(81359),h=e.i(88604),b=e.i(6607),v=e.i(15971),y=e.i(41215),j=e.i(3828),I=e.i(58971),w=e.i(24608),M=e.i(91788),N=e.i(34728);e.s(["default",0,({slug:e})=>{let{formatMessage:P}=(0,a.useIntl)(),{formatDateTime:k}=(0,o.default)(),{hasRole:_}=(0,I.default)(),{publishProduct:$}=(0,p.default)(),{unPublishProduct:C}=(0,f.default)(),{removeProduct:S}=(0,h.default)(),{updateProduct:T}=(0,x.default)(),{setModal:R}=(0,b.default)(),A=(0,j.useRouter)(),{push:q}=(0,j.useRouter)(),{product:V,loading:D,error:E,extendedData:L}=(0,c.default)({slug:e}),U=V?.status||"DRAFT",O=(0,M.useMemo)(()=>[{id:"published",title:P({id:"published",defaultMessage:"Published"}),description:P({id:"publish_product_description",defaultMessage:"Product will be searchable and is available for orders"}),current:"ACTIVE"===U,selectedTitle:P({id:"published",defaultMessage:"Published"}),onClick:async()=>{try{await $({productId:V?._id}),l.toast.success(P({id:"product_published",defaultMessage:"Published successfully "}))}catch(t){console.error("Failed to publish product:",t);let e=t?.message||"Unknown error";l.toast.error(`${P({id:"product_publish_error",defaultMessage:"Failed to publish product"})}: ${e}`)}},bgColor:"green",disable:!_(s.IRoleAction.ManageProducts)},{id:"draft",title:P({id:"draft",defaultMessage:"Draft"}),description:P({id:"draft_product_description",defaultMessage:"Product will not be discoverable and can not be orderose"}),current:"DRAFT"===U,selectedTitle:P({id:"not_published",defaultMessage:"Not published"}),bgColor:"amber",disable:"ACTIVE"===U&&!_(s.IRoleAction.ManageProducts),onClick:async()=>{if(_(s.IRoleAction.ManageProducts))try{await C({productId:V?._id}),l.toast.success(P({id:"product_drafted",defaultMessage:"Drafted successfully "}))}catch(t){console.error("Failed to unpublish product:",t);let e=t?.message||"Unknown error";l.toast.error(`${P({id:"product_unpublish_error",defaultMessage:"Failed to unpublish product"})}: ${e}`)}}}],[V]);if(E)return console.error("Error loading product:",E),(0,t.jsx)("div",{className:"mt-5 max-w-full",children:(0,t.jsx)("div",{className:"text-center py-8",children:(0,t.jsx)("p",{className:"text-rose-600 dark:text-rose-400",children:P({id:"product_load_error",defaultMessage:"Failed to load product"})})})});let F=async e=>{e.target.value&&await T({productId:V?._id,product:{sequence:parseInt(e.target.value,10)}})},Q=async()=>{"proxies"in V&&V.proxies?.length?await R((0,t.jsx)(N.default,{headerText:P({id:"product_delete_blocked_header",defaultMessage:"Remove links before deleting"}),message:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{children:P({id:"product_delete_blocked_intro",defaultMessage:"This product is linked to the following product types:"})}),(0,t.jsx)("ul",{className:"list-disc list-inside text-sm text-slate-700 dark:text-slate-300",children:"proxies"in V&&V.proxies.map(({__typename:e},a)=>(0,t.jsx)("li",{children:e.replace("Product","")},a))}),(0,t.jsx)("p",{children:P({id:"product_delete_blocked_action",defaultMessage:"Please unlink it before trying to delete it."})})]}),buttonText:P({id:"ok",defaultMessage:"Ok"}),onOkClick:()=>R(null)})):await R((0,t.jsx)(v.default,{onCancelClick:()=>R(""),message:P({id:"delete_product_confirmation",defaultMessage:"This action might cause inconsistencies with other data that relates to it and it is nonreversible. Are you sure you want to delete this product?"}),onOkClick:async()=>{R("");try{await S({productId:V?._id}),l.toast.success(P({id:"product_deleted_success",defaultMessage:"Deleted successfully"})),A.push("/products")}catch(e){await R((0,t.jsx)(v.default,{onCancelClick:()=>R(""),headerText:P({id:"error",defaultMessage:"Error"}),message:e instanceof y.default?e.message:e,icon:(0,t.jsx)("div",{className:"mx-auto flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-rose-100 dark:bg-rose-900/30 sm:mx-0 sm:h-10 sm:w-10",children:(0,t.jsx)(w.XMarkIcon,{className:"h-6 w-6 text-rose-600 dark:text-rose-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})}),okText:P({id:"ok",defaultMessage:"Ok"}),onOkClick:async()=>{R("")}}))}}}))};return V||D?D?(0,t.jsx)(i.default,{}):(0,t.jsxs)("div",{className:"mt-5 max-w-full",children:[(0,t.jsx)(d.default,{routeName:e,depth:3,currentPageTitle:V?.texts?.title}),"DELETED"===U&&(0,t.jsx)("div",{className:"mb-4 rounded-md border border-rose-300 bg-rose-50 p-4 text-sm text-rose-800 dark:border-rose-700 dark:bg-rose-900/30 dark:text-rose-300",children:P({id:"product_deleted_notice",defaultMessage:"This product has been deleted and is no longer active. Some actions may be restricted."})}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"items-center flex-wrap flex gap-5 min-w-full justify-between",children:[(0,t.jsx)(r.default,{headerText:(0,t.jsxs)(t.Fragment,{children:[V?.texts?.title||"Untitled Product","DELETED"===U&&(0,t.jsx)("span",{className:"ml-3 rounded bg-rose-100 px-2 py-1 text-xs font-semibold text-rose-800 dark:bg-rose-900/40 dark:text-rose-300",children:P({id:"deleted_status",defaultMessage:"Deleted"})})]}),title:`${V?.texts?.title||"Product"} (${V?._id})`}),(0,t.jsxs)("div",{className:"publish-and-order flex flex-wrap gap-3",children:[U&&"DELETED"!==U&&(0,t.jsx)(m.default,{options:O,type:P({id:"product",defaultMessage:"Product"})}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-md dark:border-slate-600 px-4 py-2 text-sm font-medium leading-5 shadow-xs bg-white dark:bg-slate-800 h-[38px]",children:[(0,t.jsx)("label",{htmlFor:"sequence-input",className:"text-slate-700 dark:text-slate-200 font-medium cursor-pointer",children:P({id:"sequence",defaultMessage:"Display Order"})}),(0,t.jsx)("input",{type:"number",id:"sequence-input",disabled:!_(s.IRoleAction.ManageProducts),className:"text-center w-12 bg-transparent border border-slate-300 dark:border-slate-600 rounded focus:ring-2 focus:ring-slate-800 dark:focus:ring-slate-400 focus:border-transparent focus:outline-none text-sm font-semibold text-slate-900 dark:text-slate-300 px-2 py-1 transition-all",defaultValue:V?.sequence,onBlur:F})]}),"DRAFT"===U&&_(s.IRoleAction.ManageProducts)&&(0,t.jsx)(g.default,{onClick:Q})]})]}),(0,t.jsxs)("div",{className:"mt-8 flex flex-wrap gap-3 gap-x-10 text-slate-600 dark:text-slate-400",children:[(0,t.jsxs)("div",{className:"flex flex-col items-baseline gap-0",children:[(0,t.jsx)("span",{className:"mr-2 text-xs text-slate-500 dark:text-slate-500",children:"ID:"}),(0,t.jsx)("span",{className:"text-sm font-mono",children:V?._id})]}),(0,t.jsxs)("div",{className:"flex flex-col items-baseline gap-0",children:[(0,t.jsx)("span",{className:"text-xs text-slate-500 dark:text-slate-500",children:"Type:"}),(0,t.jsx)("p",{className:"text-sm font-mono",children:V?.__typename})]}),V?.created&&(0,t.jsxs)("div",{className:"flex flex-col items-baseline gap-0",children:[(0,t.jsxs)("span",{className:"text-xs text-slate-500 dark:text-slate-500",children:[P({id:"created",defaultMessage:"Created"}),":"]}),(0,t.jsx)("span",{className:"text-sm font-mono",children:k(V.created,{dateStyle:"medium",timeStyle:"short"})})]}),V?.updated&&(0,t.jsxs)("div",{className:"flex flex-col items-baseline gap-0",children:[(0,t.jsxs)("span",{className:"text-xs text-slate-500 dark:text-slate-500",children:[P({id:"updated",defaultMessage:"Updated"}),":"]}),(0,t.jsx)("span",{className:"text-sm font-mono",children:k(V.updated,{dateStyle:"medium",timeStyle:"short"})})]}),V?.published&&(0,t.jsxs)("div",{className:"flex flex-col items-baseline gap-0",children:[(0,t.jsxs)("span",{className:"text-xs text-slate-500 dark:text-slate-500",children:[P({id:"published",defaultMessage:"Published"}),":"]}),(0,t.jsx)("span",{className:"text-sm font-mono",children:k(V.published,{dateStyle:"medium",timeStyle:"short"})})]})]})]}),(0,t.jsx)(u.default,{productId:V?._id,media:V?.media||[],onEditMedia:e=>{A.push({pathname:A.pathname,query:{...A.query,tab:"media"}},void 0,{shallow:!0})},canEdit:_(s.IRoleAction.ManageProducts)}),(0,t.jsx)(n.default,{product:V,extendedData:L})]}):(q("/404"),null)}])},94330,43054,95336,16113,82191,42532,10785,1330,73356,50099,77035,56902,19051,84278,11907,e=>{"use strict";var t=e.i(91788);let a=t.forwardRef(function({title:e,titleId:a,...s},l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),e?t.createElement("title",{id:a},e):null,t.createElement("path",{fillRule:"evenodd",d:"M6 5v1H4.667a1.75 1.75 0 0 0-1.743 1.598l-.826 9.5A1.75 1.75 0 0 0 3.84 19H16.16a1.75 1.75 0 0 0 1.743-1.902l-.826-9.5A1.75 1.75 0 0 0 15.333 6H14V5a4 4 0 0 0-8 0Zm4-2.5A2.5 2.5 0 0 0 7.5 5v1h5V5A2.5 2.5 0 0 0 10 2.5ZM7.5 10a2.5 2.5 0 0 0 5 0V8.75a.75.75 0 0 1 1.5 0V10a4 4 0 0 1-8 0V8.75a.75.75 0 0 1 1.5 0V10Z",clipRule:"evenodd"}))});e.s(["ShoppingBagIcon",0,a],94330);let s=t.forwardRef(function({title:e,titleId:a,...s},l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),e?t.createElement("title",{id:a},e):null,t.createElement("path",{d:"M12 9a1 1 0 0 1-1-1V3c0-.552.45-1.007.997-.93a7.004 7.004 0 0 1 5.933 5.933c.078.547-.378.997-.93.997h-5Z"}),t.createElement("path",{d:"M8.003 4.07C8.55 3.994 9 4.449 9 5v5a1 1 0 0 0 1 1h5c.552 0 1.008.45.93.997A7.001 7.001 0 0 1 2 11a7.002 7.002 0 0 1 6.003-6.93Z"}))});e.s(["ChartPieIcon",0,s],43054);let l=t.forwardRef(function({title:e,titleId:a,...s},l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),e?t.createElement("title",{id:a},e):null,t.createElement("path",{d:"M2 3a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1H2Z"}),t.createElement("path",{fillRule:"evenodd",d:"M2 7.5h16l-.811 7.71a2 2 0 0 1-1.99 1.79H4.802a2 2 0 0 1-1.99-1.79L2 7.5ZM7 11a1 1 0 0 1 1-1h4a1 1 0 1 1 0 2H8a1 1 0 0 1-1-1Z",clipRule:"evenodd"}))});e.s(["ArchiveBoxIcon",0,l],95336);let d=t.forwardRef(function({title:e,titleId:a,...s},l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),e?t.createElement("title",{id:a},e):null,t.createElement("path",{fillRule:"evenodd",d:"M3.5 2A1.5 1.5 0 0 0 2 3.5V15a3 3 0 1 0 6 0V3.5A1.5 1.5 0 0 0 6.5 2h-3Zm11.753 6.99L9.5 14.743V6.257l1.51-1.51a1.5 1.5 0 0 1 2.122 0l2.121 2.121a1.5 1.5 0 0 1 0 2.122ZM8.364 18H16.5a1.5 1.5 0 0 0 1.5-1.5v-3a1.5 1.5 0 0 0-1.5-1.5h-2.136l-6 6ZM5 16a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))});e.s(["SwatchIcon",0,d],16113);let i=t.forwardRef(function({title:e,titleId:a,...s},l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),e?t.createElement("title",{id:a},e):null,t.createElement("path",{fillRule:"evenodd",d:"M1 2.75A.75.75 0 0 1 1.75 2h16.5a.75.75 0 0 1 0 1.5H18v8.75A2.75 2.75 0 0 1 15.25 15h-1.072l.798 3.06a.75.75 0 0 1-1.452.38L13.41 18H6.59l-.114.44a.75.75 0 0 1-1.452-.38L5.823 15H4.75A2.75 2.75 0 0 1 2 12.25V3.5h-.25A.75.75 0 0 1 1 2.75ZM7.373 15l-.391 1.5h6.037l-.392-1.5H7.373Zm7.49-8.931a.75.75 0 0 1-.175 1.046 19.326 19.326 0 0 0-3.398 3.098.75.75 0 0 1-1.097.04L8.5 8.561l-2.22 2.22A.75.75 0 1 1 5.22 9.72l2.75-2.75a.75.75 0 0 1 1.06 0l1.664 1.663a20.786 20.786 0 0 1 3.122-2.74.75.75 0 0 1 1.046.176Z",clipRule:"evenodd"}))});e.s(["PresentationChartLineIcon",0,i],82191);var r=e.i(91398),o=e.i(66773),n=e.i(38865),u=e.i(69322),c=e.i(58971),m=e.i(5505),p=e.i(1504),f=e.i(98520),x=e.i(79093),g=e.i(64127),h=e.i(69211),b=e.i(72094),v=e.i(73419),y=e.i(99160),j=e.i(45229),I=e.i(81013),w=e.i(98949),M=e.i(82226),N=e.i(59080),P=e.i(32171);let k=N.gql`
155
+ fragment ProductCatalogPriceFragment on ProductCatalogPrice {
156
+ isTaxable
157
+ isNetPrice
158
+ country {
159
+ _id
160
+ isoCode
161
+ name
162
+ flagEmoji
163
+ }
164
+ currency {
165
+ _id
166
+ isoCode
167
+ isActive
168
+ }
169
+ amount
170
+ maxQuantity
171
+ }
172
+ `,_=N.gql`
173
+ query ProductCatalogPrices($productId: ID!) {
174
+ productCatalogPrices(productId: $productId) {
175
+ ...ProductCatalogPriceFragment
176
+ }
177
+ }
178
+ ${k}
179
+ `;var $=e.i(76204),C=e.i(62199);let S=N.gql`
180
+ mutation UpdateProductCommerce(
181
+ $productId: ID!
182
+ $commerce: UpdateProductCommerceInput!
183
+ ) {
184
+ updateProductCommerce(productId: $productId, commerce: $commerce) {
185
+ ...ProductDetailFragment
186
+ }
187
+ }
188
+ ${C.default}
189
+ `;e.s(["default",0,({productId:e,disabled:t=!1})=>{let{formatMessage:a}=(0,u.useIntl)(),{catalogPrices:s}=(({productId:e})=>{let{data:t,loading:a,error:s}=(0,P.useQuery)(_,{skip:!e,variables:{productId:e}});return{catalogPrices:t?.productCatalogPrices||[],loading:a,error:s}})({productId:e}),{hasRole:l}=(0,c.default)(),{updateProductCommerce:d}=(()=>{let[e]=(0,$.useMutation)(S),{currencies:t}=(0,x.default)();return{updateProductCommerce:async({productId:a,commerce:{pricing:s}})=>e({variables:{productId:a,commerce:{pricing:s.map(e=>{let a=t.find(({isoCode:t})=>t===e.currencyCode),s=((e,t)=>{if(!e||t<0)return 0;let a=e.trim();if(!/^-?\d*\.?\d*$/.test(a))return 0;let s=a.indexOf(".");return -1===s?Number(a)*10**t:Number((a.slice(0,s)||"0")+a.slice(s+1).slice(0,t).padEnd(t,"0"))})(e.amount.toString(),a.decimals);return{...e,amount:s}})}},refetchQueries:["Products"]})}})(),{countries:i}=(0,f.default)(),{currencies:N}=(0,x.default)(),k=i?.find(({isBase:e})=>e),C=k?.isoCode,T=k?.defaultCurrency?.isoCode,R=async({pricing:t})=>(await d({productId:e,commerce:{pricing:t}}),{success:!0}),A=a({id:"saved",defaultMessage:"Saved"}),q=((e=[],t=[])=>t.length?e.map(e=>{let a=t.find(({isoCode:t})=>t.toLowerCase()===e.currency.isoCode.toLowerCase());return{countryCode:e.country.isoCode,currencyCode:e.currency.isoCode,isTaxable:!!e.isTaxable,isNetPrice:!!e.isNetPrice,amount:((e,t)=>{if(t<0)return"0";if(0===t)return e.toString();let a=e.toString();if("0"===a)return"0."+"0".repeat(t);let s=a.startsWith("-"),l=s?a.slice(1):a;if(l.length<=t){let e=l.padStart(t,"0");return`${s?"-":""}0.${e}`}let d=l.length-t,i=l.slice(0,d),r=l.slice(d);return`${s?"-":""}${i}.${r}`})(e.amount,a?.decimals),maxQuantity:e.maxQuantity}}):[])(s,N),V=(0,w.default)({disabled:t,submit:R,successMessage:A,enableReinitialize:!0,initialValues:{pricing:[...q?.length?q:[{maxQuantity:"",amount:null,isTaxable:!1,isNetPrice:!1,currencyCode:T,countryCode:C}]]}}),{values:D}=V.formik,{pricing:E}=D;return(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"mt-5 md:col-span-3 lg:mt-0",children:[(0,r.jsx)(m.default,{children:(0,r.jsxs)(h.default,{className:"mt-3 rounded-md",form:V,disabled:!l(o.IRoleAction.ManageProducts),children:[(0,r.jsxs)("div",{className:"relative max-w-full p-3 sm:px-5",children:[(0,r.jsx)("div",{className:"max-w-full justify-between align-baseline"}),(0,r.jsxs)("label",{className:"sr-only flex w-full font-sans text-sm text-slate-500 dark:text-slate-200 lg:not-sr-only",children:[(0,r.jsxs)("span",{className:"flex w-full",children:[(0,r.jsx)("span",{className:"w-full",children:a({id:"max_quantity",defaultMessage:"Max Quantity"})}),(0,r.jsx)("span",{className:"w-full lg:ml-5",children:a({id:"price",defaultMessage:"Price"})})]}),(0,r.jsxs)("span",{className:"flex w-full",children:[(0,r.jsx)("span",{className:"w-full lg:ml-8",children:a({id:"vat_suspect",defaultMessage:"Vat Suspect"})}),(0,r.jsx)("span",{className:"w-full lg:ml-12",children:a({id:"net_price",defaultMessage:"Net Price"})})]}),(0,r.jsxs)("span",{className:"mr-5 flex w-full",children:[(0,r.jsx)("span",{className:"ml-10 w-full",children:a({id:"country",defaultMessage:"Country"})}),(0,r.jsx)("span",{className:"w-full",children:a({id:"currency",defaultMessage:"Currency"})})]})]}),(0,r.jsx)(n.FieldArray,{name:"pricing",children:({push:e,remove:t})=>(0,r.jsxs)("div",{children:[D.pricing.map((e,s)=>(0,r.jsxs)("div",{className:"relative max-w-full border-b dark:border-slate-700 pt-1 pb-5 mb-3 align-baseline lg:flex",children:[(0,r.jsxs)("div",{className:"flex w-full gap-x-2",children:[(0,r.jsx)(j.default,{className:"w-full",disabled:!l(o.IRoleAction.ManageProducts),validators:[(0,M.validateProductCommerce)(s,E),(0,M.validateProductCommerceOneNull)(E)],name:`pricing[${s}].maxQuantity`,id:`pricing[${s}].maxQuantity`,type:"number",min:0,hideLabel:!0,label:a({id:"max_quantity",defaultMessage:"Max Quantity"})}),(0,r.jsx)(j.default,{type:"number",className:"w-full",disabled:!l(o.IRoleAction.ManageProducts),name:`pricing[${s}].amount`,id:`pricing[${s}].amount`,required:!0,hideLabel:!0,label:a({id:"price",defaultMessage:"Price "})})]}),(0,r.jsxs)("div",{className:"flex w-full gap-x-2 pt-3 pb-2",children:[(0,r.jsx)("div",{className:"w-full lg:ml-8 lg:items-center",children:(0,r.jsx)(g.default,{name:`pricing[${s}].isTaxable`,labelClassName:"lg:sr-only items-center ",disabled:!l(o.IRoleAction.ManageProducts),label:a({id:"vat_suspect",defaultMessage:"Vat Suspect"}),className:"mr-2 h-4 w-4 rounded-sm border-slate-300 dark:border-slate-600 bg-white dark:!bg-slate-900 text-slate-950 focus:ring-slate-800 lg:items-center",type:"checkbox"})}),(0,r.jsx)("div",{className:"w-full lg:ml-8",children:(0,r.jsx)(g.default,{name:`pricing[${s}].isNetPrice`,labelClassName:"lg:sr-only items-center",disabled:!l(o.IRoleAction.ManageProducts),label:a({id:"net_price",defaultMessage:"Net Price"}),hideLabel:!0,className:"mr-2 h-4 w-4 justify-between rounded-sm border-slate-300 dark:border-slate-600 bg-white dark:!bg-slate-900 text-slate-950 focus:ring-slate-800 lg:items-center",type:"checkbox"})})]}),(0,r.jsxs)("div",{className:"flex w-full gap-x-2 mt-1",children:[(0,r.jsx)(v.default,{defaultValue:C,className:"w-full lg:ml-4 lg:mr-4",label:a({id:"country",defaultMessage:"Country"}),name:`pricing[${s}].countryCode`,id:`pricing[${s}].countryCode`,disabled:!l(o.IRoleAction.ManageProducts),required:!0,options:(0,p.default)(i,"isoCode","isoCode"),hideLabel:!0}),(0,r.jsx)(v.default,{defaultValue:T,className:"w-full lg:mr-8 ",label:a({id:"currency",defaultMessage:"Currency"}),disabled:!l(o.IRoleAction.ManageProducts),name:`pricing[${s}].currencyCode`,id:`pricing[${s}].currencyCode`,required:!0,options:(0,p.default)(N,"isoCode","isoCode"),hideLabel:!0,placeholder:a({id:"country_currency",defaultMessage:"Currency"})})]}),l(o.IRoleAction.ManageProducts)&&(0,r.jsx)("div",{className:"absolute -top-2 right-0 mt-0 mr-0 shrink-0 pb-1 md:mr-0 lg:mt-6 lg:py-0 lg:px-0 ",children:(0,r.jsx)("button",{className:"items-center rounded-full bg-white dark:bg-slate-900 px-1 py-1 text-sm text-rose-500 dark:text-rose-400 hover:bg-rose-50 focus:outline-hidden focus:ring-0 focus:ring-rose-500 focus:ring-offset-2",type:"button",onClick:()=>t(s),children:(0,r.jsxs)("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("polyline",{points:"3 6 5 6 21 6"}),(0,r.jsx)("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}),(0,r.jsx)("line",{x1:"10",y1:"11",x2:"10",y2:"17"}),(0,r.jsx)("line",{x1:"14",y1:"11",x2:"14",y2:"17"})]})})})]},s)),l(o.IRoleAction.ManageProducts)&&(0,r.jsx)("div",{className:"mt-6",children:(0,r.jsx)(I.default,{variant:"tertiary",text:a({id:"add_price_row",defaultMessage:"Add Price Row"}),className:"w-full items-center justify-center",onClick:()=>e({maxQuantity:"",amount:null,isTaxable:!1,isNetPrice:!1,currencyCode:T,countryCode:C})})})]})})]}),(0,r.jsx)(b.default,{displayFieldErrors:!0}),l(o.IRoleAction.ManageProducts)&&(0,r.jsx)("div",{className:"-mx-6 p-6 bg-slate-50 dark:bg-slate-900 text-right",children:(0,r.jsx)(y.default,{className:"mx-6",label:a({id:"save",defaultMessage:"Save"})})})]})}),(0,r.jsx)("p",{className:"mt-6 mb-10 text-sm text-slate-500 dark:text-slate-400",children:a({id:"product_commerce_info",defaultMessage:"One price list should have a max quantity field empty and no price should have the same max quantity along with currency and country specified"})})]})})}],42532);var T=e.i(70693),R=e.i(14336);let A=N.gql`
190
+ mutation UpdateProductTexts($productId: ID!, $texts: [ProductTextInput!]!) {
191
+ updateProductTexts(productId: $productId, texts: $texts) {
192
+ ...ProductTextsFragment
193
+ }
194
+ }
195
+ ${R.default}
196
+ `;var q=e.i(60195),V=e.i(73483),D=e.i(96015),E=e.i(30276),L=e.i(57561),U=e.i(48539);e.s(["default",0,({productId:e,disabled:a=!1})=>{let{selectedLocale:s,setSelectedLocale:l,languageDialectList:d}=(0,L.default)(),{formatMessage:i}=(0,u.useIntl)(),{hasRole:n}=(0,c.default)(),{defaultLocale:p,shopInfo:f,loading:x}=(0,U.default)(),{translatedTexts:g}=(({productId:e})=>{let{customProperties:t}=(0,T.default)(),{data:a,loading:s,error:l}=(0,P.useQuery)(((e="")=>N.gql`
197
+ query TranslatedProductTexts($productId: ID!) {
198
+ translatedProductTexts(productId: $productId) {
199
+ ...ProductTextsFragment
200
+ ${e}
201
+ }
202
+ }
203
+ ${R.default}
204
+ `)(t?.ProductTexts),{skip:!e,variables:{productId:e}});return{translatedTexts:a?.translatedProductTexts||[],loading:s,error:l}})({productId:e}),b=i({id:"saved",defaultMessage:"Saved"}),{updateProductTexts:v}=(()=>{let[e]=(0,$.useMutation)(A);return{updateProductTexts:async({productId:t,texts:a})=>e({variables:{productId:t,texts:a},refetchQueries:["TranslatedProductTexts"]})}})(),I=async({slug:t,title:a,subtitle:l,vendor:d,description:i,brand:r,labels:o})=>(await v({productId:e,texts:[{locale:s,slug:t,title:a,subtitle:l,vendor:d,description:i,brand:r,labels:o}]}),{success:!0}),M=(0,w.default)({disabled:a,submit:I,successMessage:b,initialValues:{slug:"",title:"",subtitle:"",vendor:"",description:"",brand:"",labels:[]}});return(0,t.useEffect)(()=>{let e=g?.find(e=>e.locale===s);M.formik.setValues({slug:"",title:"",subtitle:"",vendor:"",description:"",brand:"",labels:[],...e||{}})},[g,s]),(0,t.useEffect)(()=>{if(f&&g?.length&&!g?.find(({locale:e})=>e===s))if(p&&g?.find(({locale:e})=>e===p))l(p);else if(p&&g?.find(({locale:e})=>e===p.split("-")[0]))l(p.split("-")[0]);else{let e=g?.find(({locale:e})=>e&&d?.find(({isoCode:t})=>t===e));l(e?.locale)}},[x,g]),(0,r.jsx)(q.default,{documentationLabel:i({id:"texts",defaultMessage:"Texts"}),className:"mt-2 lg:mt-5",documentation:(0,r.jsx)(u.FormattedMessage,{id:"product_text_form_description",defaultMessage:"<ul> <li><strong>Slug:</strong> The unique part of your product URL (e.g., 'my-awesome-product'). Keep it short and descriptive.</li>\n <li><strong>Localization:</strong> Switch languages using the dropdown at the top left to translate content for different markets.</li>\n <li><strong>Description:</strong> Supports Markdown and HTML formatting. Use double backslash (\\\\\\\\) for line breaks.</li>\n <li><strong>Labels:</strong> Eye-catching badges that appear on your product (e.g., 'New Arrival', '50% Off', 'Limited Edition'). Perfect for promotions and highlighting special features. Each language can have unique labels.</li>\n <li><strong>Key Difference:</strong> Labels are customer-facing promotional badges, while Tags are internal keywords for organization and filtering.</li>\n </ul>",values:{ul:e=>(0,r.jsxs)("ul",{className:"space-y-2",children:[e," "]}),li:e=>(0,r.jsxs)("li",{className:"text-sm",children:[e," "]},Math.random()),strong:e=>(0,r.jsx)("strong",{className:"font-semibold text-slate-800 dark:text-slate-200",children:e})}}),children:(0,r.jsx)(m.default,{children:(0,r.jsxs)(h.default,{form:M,disabled:!n(o.IRoleAction.ManageProducts),children:[(0,r.jsxs)("div",{className:"relative text-slate-500 dark:text-slate-200 px-4 py-5 sm:p-6",children:[(0,r.jsxs)("div",{className:"grid grid-cols-6 gap-6",children:[(0,r.jsx)("div",{className:"col-span-6 sm:col-span-3",children:(0,r.jsx)(j.default,{name:"slug",disabled:!n(o.IRoleAction.ManageProducts),required:!0,id:"slug",label:i({id:"slug",defaultMessage:"Slug"}),autoComplete:"on",className:"text-sm"})}),(0,r.jsx)("div",{className:"col-span-6 sm:col-span-3",children:(0,r.jsx)(j.default,{name:"title",disabled:!n(o.IRoleAction.ManageProducts),required:!0,id:"title",label:i({id:"title",defaultMessage:"Title"}),autoComplete:"on",className:"text-sm"})}),(0,r.jsx)("div",{className:"col-span-6 sm:col-span-3",children:(0,r.jsx)(j.default,{name:"subtitle",disabled:!n(o.IRoleAction.ManageProducts),id:"subtitle",label:i({id:"subtitle",defaultMessage:"Subtitle"}),autoComplete:"on",className:"text-sm"})}),(0,r.jsx)("div",{className:"col-span-6 sm:col-span-3",children:(0,r.jsx)(j.default,{name:"vendor",disabled:!n(o.IRoleAction.ManageProducts),id:"vendor",label:i({id:"vendor",defaultMessage:"Vendor"}),autoComplete:"on",className:"text-sm"})}),(0,r.jsx)("div",{className:"col-span-6 sm:col-span-3",children:(0,r.jsx)(j.default,{name:"brand",disabled:!n(o.IRoleAction.ManageProducts),id:"brand",label:i({id:"brand",defaultMessage:"Brand"}),autoComplete:"on",className:"text-sm"})}),(0,r.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[(0,r.jsx)(D.default,{name:"labels",id:"labels",disabled:!n(o.IRoleAction.ManageProducts),label:i({id:"labels",defaultMessage:"Labels"}),placeholder:i({id:"label",defaultMessage:"Label"}),buttonText:i({id:"add",defaultMessage:"Add"}),autoComplete:"on",className:"text-sm"}),(0,r.jsx)(E.default,{messageKey:"product_labels_help",defaultMessage:"Add promotional badges like 'New Arrival', '50% Off', or 'Limited Edition' that customers will see on your product. Perfect for highlighting deals and special features.",className:"mt-3"})]})]}),(0,r.jsx)("div",{className:"col-span-6 mt-6 sm:col-span-3",children:(0,r.jsx)(V.default,{name:"description",id:"description",disabled:!n(o.IRoleAction.ManageProducts),label:i({id:"description",defaultMessage:"Description"})})})]}),n(o.IRoleAction.ManageProducts)&&(0,r.jsx)("div",{className:"border-t-slate-100 border-t dark:border-t-slate-700 bg-slate-50 dark:bg-slate-900 px-4 py-5 text-right sm:px-6",children:(0,r.jsx)(y.default,{label:i({id:"save",defaultMessage:"Save"})})})]})})})}],10785);var O=e.i(28401),F=e.i(59295),Q=e.i(6277),B=e.i(33006),z=e.i(93994),K=e.i(64479);let H=N.gql`
205
+ mutation PrepareProductMediaUpload($mediaName: String!, $productId: ID!) {
206
+ prepareProductMediaUpload(mediaName: $mediaName, productId: $productId) {
207
+ _id
208
+ putURL
209
+ expires
210
+ }
211
+ }
212
+ `;var Z=e.i(1880);let W=N.gql`
213
+ fragment ProductMediaFragment on ProductMedia {
214
+ _id
215
+ tags
216
+ file {
217
+ _id
218
+ name
219
+ type
220
+ size
221
+ url
222
+ }
223
+ sortKey
224
+ texts {
225
+ _id
226
+ locale
227
+ title
228
+ subtitle
229
+ }
230
+ }
231
+ `,G=N.gql`
232
+ query ProductMedia($productId: ID, $slug: String) {
233
+ product(productId: $productId, slug: $slug) {
234
+ _id
235
+ media {
236
+ ...ProductMediaFragment
237
+ }
238
+ }
239
+ }
240
+ ${W}
241
+ `;var J=e.i(26178),X=e.i(90062);let Y=N.gql`
242
+ fragment ProductMediaTextsFragment on ProductMediaTexts {
243
+ _id
244
+ locale
245
+ title
246
+ subtitle
247
+ }
248
+ `,ee=N.gql`
249
+ query TranslatedProductMediaTexts($productMediaId: ID!) {
250
+ translatedProductMediaTexts(productMediaId: $productMediaId) {
251
+ ...ProductMediaTextsFragment
252
+ }
253
+ }
254
+ ${Y}
255
+ `,et=N.gql`
256
+ mutation UpdateProductMediaTexts(
257
+ $productMediaId: ID!
258
+ $texts: [ProductMediaTextInput!]!
259
+ ) {
260
+ updateProductMediaTexts(productMediaId: $productMediaId, texts: $texts) {
261
+ ...ProductMediaTextsFragment
262
+ }
263
+ }
264
+ ${Y}
265
+ `;var ea=e.i(15971);let es=N.gql`
266
+ mutation RemoveProductMedia($productMediaId: ID!) {
267
+ removeProductMedia(productMediaId: $productMediaId) {
268
+ _id
269
+ }
270
+ }
271
+ `;var el=e.i(6607);let ed=({media:e,id:a})=>{let{setModal:s}=(0,el.default)(),{removeProductMedia:l}=(()=>{let[e]=(0,$.useMutation)(es);return{removeProductMedia:async({productMediaId:t})=>e({variables:{productMediaId:t},refetchQueries:["ProductMedia"]})}})(),{formatMessage:d}=(0,u.useIntl)(),{selectedLocale:i}=(0,L.default)(),{updateProductMediaTexts:n}=(()=>{let[e]=(0,$.useMutation)(et);return{updateProductMediaTexts:async({productMediaId:t,texts:a})=>e({variables:{productMediaId:t,texts:a},refetchQueries:["TranslatedProductMediaTexts"]})}})(),[m,p]=(0,t.useState)(!1),{hasRole:f}=(0,c.default)(),{translatedMediaTexts:x}=(({productMediaId:e})=>{let{data:t,loading:a,error:s}=(0,P.useQuery)(ee,{skip:!e,variables:{productMediaId:e}});return{translatedMediaTexts:t?.translatedProductMediaTexts||[],loading:a,error:s}})({productMediaId:e._id}),g=x?.find(e=>e.locale===i)||{},h=async e=>{await s((0,r.jsx)(ea.default,{onCancelClick:async()=>s(""),message:d({id:"delete_product_media_confirmation",defaultMessage:"This action might cause inconsistencies with other data that relates to it. Are you sure you want to delete this media? "}),onOkClick:async()=>{s(""),await l({productMediaId:e}),O.toast.success(d({id:"product_media_deleted",defaultMessage:"Media deleted successfully"}))},okText:d({id:"delete_product_media",defaultMessage:"Delete media"})}))},b=async({title:t,subtitle:a})=>(await n({productMediaId:e._id,texts:[{title:t,locale:i,subtitle:a}]}),p(!1),!0);return(0,r.jsx)(X.default,{id:a,media:e,mediaText:g,isEdit:m,onDelete:f(o.IRoleAction.ManageProducts)?h:void 0,onEdit:f(o.IRoleAction.ManageProducts)?p:void 0,onUpdate:f(o.IRoleAction.ManageProducts)?b:void 0})},ei=({medias:e,items:t})=>{let{formatMessage:a}=(0,u.useIntl)();return(0,r.jsx)("div",{className:"rounded-md lg:col-span-6 px-6",children:(0,r.jsxs)("div",{className:"mx-auto overflow-hidden",children:[(0,r.jsx)("h2",{className:"sr-only",children:a({id:"product_media",defaultMessage:"Product Media"})}),(0,r.jsx)("div",{className:"flow-root",children:(0,r.jsx)(Q.SortableContext,{items:t,strategy:Q.verticalListSortingStrategy,children:(0,r.jsx)("ul",{className:"flex flex-col gap-3 rounded-md transition-[background-color] ease-in-out delay-200 ",children:e?.length?t.map(t=>{let a=Object.values(e).find(e=>e._id===t);return(0,r.jsx)(ed,{id:t,media:a},a._id)}):(0,r.jsx)(J.default,{message:a({id:"media",defaultMessage:"Media"})})})})})]})})},er=N.gql`
272
+ mutation ReOrderProductMedia($sortKeys: [ReorderProductMediaInput!]!) {
273
+ reorderProductMedia(sortKeys: $sortKeys) {
274
+ _id
275
+ }
276
+ }
277
+ `;e.s(["default",0,({productId:e})=>{let{productMedia:t}=(({productId:e=null,slug:t=null}={})=>{let a=(0,Z.parseUniqueId)(t),{data:s,loading:l,error:d}=(0,P.useQuery)(G,{skip:!e&&!a,variables:{productId:e||a}});return{productMedia:s?.product?.media||[],loading:l,error:d}})({productId:e}),{formatMessage:a}=(0,u.useIntl)(),{hasRole:s}=(0,c.default)(),{addProductMedia:l}=(()=>{let[e]=(0,$.useMutation)(H),{confirmMediaUpload:t}=(0,K.default)({refetchQueries:["Product"]});return{addProductMedia:async({productId:a,media:s})=>{let{data:l}=await e({variables:{productId:a,mediaName:s.name}}),{prepareProductMediaUpload:d}=l;return await (0,z.default)(s,d.putURL),t({mediaUploadTicketId:d._id,size:s?.size,type:s.type})}}})(),{reOrderProductMedia:d}=(()=>{let[e]=(0,$.useMutation)(er);return{reOrderProductMedia:async({sortKeys:t})=>e({variables:{sortKeys:t},refetchQueries:["ProductMedia"]})}})(),i=t?.map(e=>e._id),n=async t=>{try{await l({productId:e,media:t}),O.toast.success(a({id:"product_media_upload",defaultMessage:"Media uploaded successfully"}))}catch(e){O.toast.error(a({id:"fail_upload",defaultMessage:"Media upload failed"}))}},m=async e=>{let{active:t,over:s}=e;if(t.id!==s.id){let e=i.indexOf(t.id),l=i.indexOf(s.id),r=(0,Q.arrayMove)(i,e,l).map((e,t)=>({productMediaId:e,sortKey:t}));try{await d({sortKeys:r}),O.toast.success(a({id:"link_reorder",defaultMessage:"Link reorder successfully"}))}catch(e){O.toast.error(a({id:"fail_reorder",defaultMessage:"Reordering failed, Try again!"}))}}else O.toast.info(a({id:"reorder_original",defaultMessage:"Reorder to original location"}))},p=(0,F.useSensors)((0,F.useSensor)(F.PointerSensor,{activationConstraint:{distance:5}}),(0,F.useSensor)(F.KeyboardSensor,{coordinateGetter:Q.sortableKeyboardCoordinates}));return(0,r.jsxs)("div",{className:"mx-auto mt-5 space-y-5 lg:space-y-0 max-w-full py-6 lg:grid lg:grid-cols-12 lg:gap-4",children:[s(o.IRoleAction.ManageProducts)&&(0,r.jsx)("div",{className:"mx-auto w-full px-6 lg:col-span-6 lg:col-start-1",children:(0,r.jsx)(B.default,{onlyDragAndDrop:!0,addMedia:n})}),(0,r.jsx)(F.DndContext,{sensors:p,collisionDetection:F.closestCenter,onDragEnd:m,children:(0,r.jsx)(ei,{medias:t,items:i})})]})}],1330);let eo=N.gql`
278
+ fragment ProductPlanConfigurationFragment on ProductPlanConfiguration {
279
+ usageCalculationType
280
+ billingInterval
281
+ trialInterval
282
+ trialIntervalCount
283
+ billingIntervalCount
284
+ }
285
+ `,en=N.gql`
286
+ query ProductPlan($productId: ID, $slug: String) {
287
+ product(productId: $productId, slug: $slug) {
288
+ _id
289
+ ... on PlanProduct {
290
+ plan {
291
+ ...ProductPlanConfigurationFragment
292
+ }
293
+ }
294
+ }
295
+ }
296
+ ${eo}
297
+ `,eu=N.gql`
298
+ query ProductPlanConfigurationOptions {
299
+ usageCalculationTypes: __type(name: "ProductPlanUsageCalculationType") {
300
+ options: enumValues {
301
+ value: name
302
+ label: description
303
+ }
304
+ }
305
+ configurationIntervals: __type(name: "ProductPlanConfigurationInterval") {
306
+ options: enumValues {
307
+ value: name
308
+ label: description
309
+ }
310
+ }
311
+ }
312
+ `,ec=N.gql`
313
+ mutation UpdateProductPlan($productId: ID!, $plan: UpdateProductPlanInput!) {
314
+ updateProductPlan(productId: $productId, plan: $plan) {
315
+ _id
316
+ }
317
+ }
318
+ `;e.s(["default",0,({productId:e,disabled:a=!1})=>{let{formatMessage:s}=(0,u.useIntl)(),{configurationIntervals:l,usageCalculationTypes:d}=(()=>{let{data:e,loading:t,error:a}=(0,P.useQuery)(eu),s=e?.usageCalculationTypes?.options||[];return{configurationIntervals:e?.configurationIntervals?.options||[],usageCalculationTypes:s,loading:t,error:a}})(),{plan:i,loading:n}=(({productId:e=null,slug:t=null}={})=>{let a=(0,Z.parseUniqueId)(t),{data:s,loading:l,error:d}=(0,P.useQuery)(en,{skip:!e&&!a,variables:{productId:e||a}}),i=s?.product;return{plan:i?.plan,loading:l,error:d}})({productId:e}),{hasRole:f}=(0,c.default)(),{updateProductPlan:x}=(()=>{let[e]=(0,$.useMutation)(ec);return{updateProductPlan:async({productId:t,plan:{usageCalculationType:a,billingInterval:s,billingIntervalCount:l=null,trialInterval:d=null,trialIntervalCount:i=null}})=>e({variables:{productId:t,plan:{usageCalculationType:a,billingInterval:s,billingIntervalCount:l,trialInterval:d,trialIntervalCount:i}},refetchQueries:["Products"]})}})(),g=s({id:"enrollment_updated_successfully",defaultMessage:"Enrollment saved successfully"}),b=async({trialInterval:t,trialIntervalCount:a,billingInterval:s,billingIntervalCount:l,usageCalculationType:d})=>(await x({productId:e,plan:{billingInterval:s,usageCalculationType:d,billingIntervalCount:l,trialInterval:t,trialIntervalCount:a}}),{success:!0}),I=(0,w.default)({disabled:a,submit:b,successMessage:g,initialValues:{trialInterval:"",trialIntervalCount:"",billingInterval:"",billingIntervalCount:"",usageCalculationType:""},getSubmitErrorMessage:e=>e?.message?.includes("Status of the product does not allow this operation")?s({id:"subscription_product_type_not_valid",defaultMessage:"Status of the product does not allow this operation"}):e?.message||""});return(0,t.useEffect)(()=>{i&&!n&&I.formik.setValues(i)},[i]),(0,r.jsx)(q.default,{documentationLabel:s({id:"subscription",defaultMessage:"Subscription"}),className:"mt-2 lg:mt-5",documentation:(0,r.jsx)(u.FormattedMessage,{id:"product_subscription_form_description",defaultMessage:"<ul><li> Information that will be used to calculate price of a subscription based product </li>\n <li>The price specified in commerce section will be used when calculating fees on each interval. </li>\n <li>Price will not be included for the specified trial period </li> </ul>",values:{ul:e=>(0,r.jsxs)("ul",{className:"space-y-1",children:[e," "]}),li:e=>(0,r.jsx)("li",{children:e})}}),children:(0,r.jsx)(m.default,{children:(0,r.jsx)(h.default,{form:I,children:(0,r.jsxs)("div",{className:"relative max-w-full space-y-6 rounded-md sm:p-6",children:[(0,r.jsx)(v.default,{required:!0,className:"mt-2.5 w-full py-1.5 text-sm font-medium text-slate-500",label:s({id:"usage_calculation_type",defaultMessage:"Usage calculation type"}),placeholder:s({id:"usage_calculation_type",defaultMessage:"Usage calculation type"}),name:"usageCalculationType",options:(0,p.default)(d,"value","value")}),(0,r.jsxs)("div",{className:"w-full items-end justify-end sm:flex",children:[(0,r.jsx)(v.default,{className:"mt-2.5 w-full text-sm font-medium text-slate-500",required:!0,label:s({id:"billing_interval_unit",defaultMessage:"Billing interval unit"}),placeholder:s({id:"billing_interval_unit",defaultMessage:"Billing interval unit"}),name:"billingInterval",options:(0,p.default)(l,"value","value")}),(0,r.jsx)(j.default,{name:"billingIntervalCount",id:"billing_unit",type:"number",required:!0,label:s({id:"billing_unit",defaultMessage:"Billing Unit"}),placeholder:s({id:"billing_unit",defaultMessage:"Billing Unit"}),className:"mt-1 w-full text-sm font-medium text-slate-500 sm:ml-1"})]}),(0,r.jsxs)("div",{className:"max-w-full items-end justify-end sm:flex",children:[(0,r.jsx)(v.default,{className:"mt-2.5 w-full text-sm font-medium text-slate-500",label:s({id:"trial_interval_unit",defaultMessage:"Trial interval unit"}),placeholder:s({id:"trial_interval_unit",defaultMessage:"Trial interval unit"}),name:"trialInterval",options:(0,p.default)(l,"value","value")}),(0,r.jsx)(j.default,{type:"number",name:"trialIntervalCount",id:"trialIntervalCount ",label:s({id:"trial_unit",defaultMessage:"Trial Unit"}),placeholder:s({id:"trial_unit",defaultMessage:"Trial Unit"}),required:!0,className:"mt-1 w-full text-sm font-medium text-slate-500 sm:ml-1"})]}),f(o.IRoleAction.CreateEnrollment)&&(0,r.jsx)("div",{className:"-mx-6 -mb-6 mt-6 border-t-slate-100 border-t space-y-6 bg-slate-50 dark:bg-slate-500 text-right sm:p-6",children:(0,r.jsx)(y.default,{label:s({id:"save",defaultMessage:"Save"})})})]})})})})}],73356);var em=e.i(60959);let ep=N.gql`
319
+ query ProductSupply($productId: ID, $slug: String) {
320
+ product(productId: $productId, slug: $slug) {
321
+ _id
322
+ ... on SimpleProduct {
323
+ dimensions {
324
+ ...ProductDimensionFragment
325
+ }
326
+ }
327
+ }
328
+ }
329
+ ${em.default}
330
+ `,ef=N.gql`
331
+ mutation UpdateProductSupply(
332
+ $productId: ID!
333
+ $supply: UpdateProductSupplyInput!
334
+ ) {
335
+ updateProductSupply(productId: $productId, supply: $supply) {
336
+ _id
337
+ ... on SimpleProduct {
338
+ dimensions {
339
+ ...ProductDimensionFragment
340
+ }
341
+ }
342
+ }
343
+ }
344
+ ${em.default}
345
+ `;e.s(["default",0,({productId:e,disabled:a=!1})=>{let{formatMessage:s}=(0,u.useIntl)(),l=s({id:"saved",defaultMessage:"Saved"}),{hasRole:d}=(0,c.default)(),{updateProductSupply:i}=(()=>{let[e]=(0,$.useMutation)(ef);return{updateProductSupply:async({productId:t,supply:{weightInGram:a=null,heightInMillimeters:s=null,lengthInMillimeters:l=null,widthInMillimeters:d=null}})=>e({variables:{productId:t,supply:{weightInGram:a||null,heightInMillimeters:s||null,lengthInMillimeters:l||null,widthInMillimeters:d||null}},refetchQueries:["Products"]})}})(),{dimensions:n}=(({productId:e=null,slug:t=null}={})=>{let a=(0,Z.parseUniqueId)(t),{data:s,loading:l,error:d}=(0,P.useQuery)(ep,{skip:!e&&!t,variables:{productId:e||a}}),i=s?.product;return{dimensions:i?.dimensions||{},loading:l,error:d}})({productId:e}),p=async({weight:t,length:a,width:s,height:l})=>(await i({productId:e,supply:{weightInGram:t,lengthInMillimeters:a,heightInMillimeters:l,widthInMillimeters:s}}),{success:!0}),f=(0,w.default)({disabled:a,submit:p,getSubmitErrorMessage:e=>(e.message.includes("supply.weightInGram")&&e.message.includes("Expected type Int")?f.formik.setFieldError("weight","Invalid value, only integer is accepted"):e.message.includes("supply.heightInMillimeters")&&e.message.includes("Expected type Int")?f.formik.setFieldError("height","Invalid value, only integer is accepted"):e.message.includes("supply.lengthInMillimeters")&&e.message.includes("Expected type Int")&&f.formik.setFieldError("length","Invalid value, only integer is accepted"),null),successMessage:l,initialValues:{weight:"",length:"",width:"",height:""}});return(0,t.useEffect)(()=>{Object.keys(n).length&&f.formik.setValues(n)},[n]),(0,r.jsx)("div",{className:"mt-5 md:col-span-2 md:mt-0",children:(0,r.jsx)(m.default,{children:(0,r.jsxs)(h.default,{form:f,disabled:!d(o.IRoleAction.ManageProducts),children:[(0,r.jsx)("div",{className:"relative px-4 py-5 sm:p-6",children:(0,r.jsxs)("div",{className:"grid grid-cols-6 gap-6",children:[(0,r.jsx)("div",{className:"col-span-6 sm:col-span-3",children:(0,r.jsx)(j.default,{validators:[(0,M.validateInteger)()],type:"number",name:"weight",disabled:!d(o.IRoleAction.ManageProducts),id:"weight",label:s({id:"weight_gram",defaultMessage:"Weight (Gram)"}),className:"text-sm"})}),(0,r.jsx)("div",{className:"col-span-6 sm:col-span-3",children:(0,r.jsx)(j.default,{validators:[(0,M.validateInteger)()],name:"length",disabled:!d(o.IRoleAction.ManageProducts),id:"length",type:"number",label:s({id:"length_millimeter",defaultMessage:"Length (Millimeter)"}),className:"text-sm"})}),(0,r.jsx)("div",{className:"col-span-6 sm:col-span-3",children:(0,r.jsx)(j.default,{validators:[(0,M.validateInteger)()],type:"number",name:"width",disabled:!d(o.IRoleAction.ManageProducts),id:"width ",label:s({id:"width",defaultMessage:"Width (Millimeter)"}),className:"text-sm "})}),(0,r.jsx)("div",{className:"col-span-6 sm:col-span-3",children:(0,r.jsx)(j.default,{validators:[(0,M.validateInteger)()],name:"height",disabled:!d(o.IRoleAction.ManageProducts),type:"number",id:"height",label:s({id:"height",defaultMessage:"Height (Millimeter)"}),className:"text-sm "})})]})}),d(o.IRoleAction.ManageProducts)&&(0,r.jsx)("div",{className:"border-t-slate-100 border-t dark:border-t-slate-700 space-y-6 bg-slate-50 dark:bg-slate-900 text-right sm:p-6",children:(0,r.jsx)(y.default,{label:s({id:"save",defaultMessage:"Save"}),full:!0})})]})})})}],50099);var ex=e.i(37369),eg=e.i(12197);let eh=N.gql`
346
+ mutation CreateProductVariation(
347
+ $productId: ID!
348
+ $variation: CreateProductVariationInput!
349
+ $texts: [ProductVariationTextInput!]
350
+ ) {
351
+ createProductVariation(
352
+ productId: $productId
353
+ variation: $variation
354
+ texts: $texts
355
+ ) {
356
+ _id
357
+ }
358
+ }
359
+ `,eb=N.gql`
360
+ fragment ProductVariationFragment on ProductVariation {
361
+ _id
362
+ type
363
+ key
364
+ texts(forceLocale: $locale) {
365
+ _id
366
+ locale
367
+ title
368
+ subtitle
369
+ }
370
+ options {
371
+ _id
372
+ texts(forceLocale: $locale) {
373
+ _id
374
+ locale
375
+ title
376
+ subtitle
377
+ }
378
+ value
379
+ }
380
+ }
381
+ `,ev=N.gql`
382
+ query ProductVariations($productId: ID, $slug: String, $locale: Locale) {
383
+ product(productId: $productId, slug: $slug) {
384
+ _id
385
+ ... on ConfigurableProduct {
386
+ variations {
387
+ ...ProductVariationFragment
388
+ }
389
+ }
390
+ }
391
+ }
392
+ ${eb}
393
+ `,ey=N.gql`
394
+ query ProductVariationType {
395
+ variationTypes: __type(name: "ProductVariationType") {
396
+ options: enumValues {
397
+ value: name
398
+ label: description
399
+ }
400
+ }
401
+ }
402
+ `,ej=({helpKey:e,helpText:t,helpValues:a,...s})=>(0,r.jsxs)("div",{className:"space-y-1",children:[(0,r.jsx)(j.default,{...s}),(e||t)&&(0,r.jsx)(E.default,{messageKey:e||`${s.name}_help`,defaultMessage:t,values:a,className:"mt-1"})]});var eI=e.i(11309);let ew=N.gql`
403
+ mutation RemoveProductVariation($productVariationId: ID!) {
404
+ removeProductVariation(productVariationId: $productVariationId) {
405
+ _id
406
+ }
407
+ }
408
+ `;var eM=e.i(65153);let eN=N.gql`
409
+ mutation UpdateProductVariationTexts(
410
+ $productVariationId: ID!
411
+ $productVariationOptionValue: String
412
+ $texts: [ProductVariationTextInput!]!
413
+ ) {
414
+ updateProductVariationTexts(
415
+ productVariationId: $productVariationId
416
+ productVariationOptionValue: $productVariationOptionValue
417
+ texts: $texts
418
+ ) {
419
+ _id
420
+ }
421
+ }
422
+ `,eP=()=>{let[e]=(0,$.useMutation)(eN);return{updateProductVariationTexts:async({productVariationId:t,productVariationOptionValue:a,texts:s})=>e({variables:{productVariationId:t,productVariationOptionValue:a,texts:s},refetchQueries:["ProductVariations"]})}},ek=({variation:e,onCancel:t,onSuccess:a})=>{let{updateProductVariationTexts:s}=eP(),{formatMessage:l}=(0,u.useIntl)(),{selectedLocale:d}=(0,L.default)(),i=async({title:t,subtitle:l})=>(await s({productVariationId:e._id,texts:[{title:t,subtitle:l,locale:d}]}),a(),{success:!0}),o=(0,w.default)({submit:i,initialValues:{title:e?.texts?.title??"",subtitle:e?.texts?.subtitle??""}});return(0,r.jsx)(h.default,{form:o,className:"variation-update-form bg-white dark:bg-slate-800 px-4 py-3 border-b border-slate-200 dark:border-slate-700 w-full overflow-x-hidden overflow-y-visible relative hover:outline hover:outline-2 hover:outline-slate-400 dark:hover:outline-slate-500 transition-all","data-variationid":e._id,children:(0,r.jsxs)("div",{className:"flex items-center justify-between w-full gap-4",tabIndex:-1,children:[(0,r.jsxs)("div",{className:"flex items-center gap-4 flex-1 min-w-0 overflow-hidden flex-wrap",children:[(0,r.jsx)("div",{className:"flex-shrink-0 min-w-[180px]",children:(0,r.jsx)(j.default,{className:"mt-0 py-1",name:"title",required:!0,label:l({id:"title",defaultMessage:"Title"})})}),e?.type&&(0,r.jsx)(eM.default,{text:e.type,color:"slate",className:"rounded-md uppercase text-xs font-medium flex-shrink-0"}),(0,r.jsx)("div",{className:"text-sm text-slate-500 dark:text-slate-400 truncate min-w-[200px]",children:(0,r.jsx)(j.default,{className:"mt-0 py-1",name:"subtitle",label:l({id:"subtitle",defaultMessage:"Subtitle"})})}),e?.options?.length>0&&(0,r.jsx)("div",{className:"flex items-center gap-2 flex-wrap",children:e.options.map((e,t)=>(0,r.jsx)("span",{className:"inline-flex text-nowrap items-center px-2 py-0.5 rounded-lg text-xs font-medium bg-slate-100 dark:bg-slate-900 text-slate-800 dark:text-slate-200 border border-slate-200 dark:border-slate-800",children:e?.texts?.title||e.value},e.value||t))}),(0,r.jsxs)("div",{className:"text-sm text-slate-400 dark:text-slate-500 font-mono flex-shrink-0",children:["(",e?.key,")"]})]}),(0,r.jsxs)("div",{className:"flex space-x-2 flex-shrink-0",children:[(0,r.jsx)(I.default,{onClick:t,type:"button",variant:"secondary",size:"sm",text:l({id:"cancel",defaultMessage:"Cancel"})}),(0,r.jsx)(I.default,{onClick:()=>o.formik.submitForm(),type:"submit",variant:"primary",size:"sm",text:l({id:"save",defaultMessage:"Save"})})]})]})})};var e_=e.i(86712),e$=e.i(16371),eC=e.i(37650),eS=e.i(24557);let eT=({type:e,variation:a,onEdit:s,onDelete:l})=>{let[d,i]=(0,t.useState)(!1),{formatMessage:o}=(0,u.useIntl)(),{buttonRef:n,menuRef:c,menuPosition:m}=((e,a)=>{let s=(0,t.useRef)(null),l=(0,t.useRef)(null),[d,i]=(0,t.useState)({top:0,left:0});return(0,t.useEffect)(()=>{let e=e=>{s.current&&!s.current.contains(e.target)&&a(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[a]),(0,t.useEffect)(()=>{if(e&&l.current){let e=l.current.getBoundingClientRect(),t=e.bottom+4,a=e.right-192;a<8&&(a=8),t+80>window.innerHeight-8&&(t=e.top-80-4),i({top:t,left:a})}},[e]),{buttonRef:l,menuRef:s,menuPosition:d}})(d,i);return(0,r.jsx)("div",{className:"variation-display bg-white dark:bg-slate-800 px-4 py-3 border-b border-slate-200 dark:border-slate-700 w-full overflow-x-hidden overflow-y-visible relative hover:outline hover:outline-2 hover:outline-slate-400 dark:hover:outline-slate-500 transition-all",children:(0,r.jsxs)("div",{className:"flex items-center justify-between w-full gap-4",tabIndex:-1,children:[(0,r.jsxs)("div",{className:"flex items-center gap-4 flex-1 min-w-0 overflow-hidden",children:[(0,r.jsx)("div",{className:"flex-shrink-0 text-lg font-semibold text-slate-900 dark:text-slate-200 truncate",children:a?.texts?.title}),e&&(0,r.jsx)(eM.default,{text:e,color:"slate",className:"rounded-md uppercase text-xs font-medium flex-shrink-0"}),a?.texts?.subtitle&&(0,r.jsx)("div",{className:"text-sm text-slate-500 dark:text-slate-400 truncate",children:a?.texts?.subtitle}),a?.options?.length>0&&(0,r.jsx)("div",{className:"flex items-center gap-2 flex-wrap",children:a.options.map((e,t)=>(0,r.jsx)("span",{className:"inline-flex text-nowrap items-center px-2 py-0.5 rounded-lg text-xs font-medium bg-slate-100 dark:bg-slate-900 text-slate-800 dark:text-slate-200 border border-slate-200 dark:border-slate-800",children:e?.texts?.title||e.value},e.value||t))}),(0,r.jsxs)("div",{className:"text-sm text-slate-400 dark:text-slate-500 font-mono flex-shrink-0",children:["(",a?.key,")"]})]}),(0,r.jsxs)("div",{className:"relative flex-shrink-0",children:[(0,r.jsx)("button",{ref:n,type:"button",onClick:e=>{e.stopPropagation(),e.preventDefault(),i(e=>!e)},className:"flex items-center justify-center w-8 h-8 rounded-md hover:bg-slate-100 dark:hover:bg-slate-700 transition-colors",children:(0,r.jsx)(e_.EllipsisHorizontalIcon,{className:"w-5 h-5 text-slate-500 dark:text-slate-400"})}),d&&(0,r.jsx)(e$.default,{children:(0,r.jsx)("div",{ref:c,className:"fixed w-48 bg-white dark:bg-slate-800 rounded-md shadow-xl border border-slate-200 dark:border-slate-700 z-[9999]",style:{top:m.top,left:m.left,boxShadow:"0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"},children:(0,r.jsxs)("div",{className:"py-1",children:[(0,r.jsxs)("button",{type:"button",onClick:e=>{e.stopPropagation(),e.preventDefault(),s(),i(!1)},className:"flex items-center w-full px-4 py-2 text-sm text-slate-700 dark:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-700 transition-colors",children:[(0,r.jsx)(eC.PencilSquareIcon,{className:"mr-3 h-5 w-5"}),o({id:"edit",defaultMessage:"Edit"})]}),(0,r.jsxs)("button",{type:"button",onClick:e=>{e.stopPropagation(),e.preventDefault(),l(a._id),i(!1)},className:"flex items-center w-full px-4 py-2 text-sm text-rose-600 dark:text-rose-400 hover:bg-rose-50 dark:hover:bg-rose-900/20 transition-colors",children:[(0,r.jsx)(eS.TrashIcon,{className:"mr-3 h-5 w-5"}),o({id:"delete",defaultMessage:"Delete"})]})]})})})]})]})})},eR=({type:e,variation:a,onDelete:s})=>{let[l,d]=(0,t.useState)(!1);return l?(0,r.jsx)(ek,{variation:a,onCancel:()=>d(!1),onSuccess:()=>d(!1)}):(0,r.jsx)(eT,{type:e,variation:a,onEdit:()=>d(!0),onDelete:s})},eA=N.gql`
423
+ mutation CreateProductVariationOption(
424
+ $productVariationId: ID!
425
+ $option: String!
426
+ $texts: [ProductVariationTextInput!]
427
+ ) {
428
+ createProductVariationOption(
429
+ productVariationId: $productVariationId
430
+ option: $option
431
+ texts: $texts
432
+ ) {
433
+ _id
434
+ }
435
+ }
436
+ `,eq=N.gql`
437
+ mutation RemoveProductVariationOption(
438
+ $productVariationId: ID!
439
+ $productVariationOptionValue: String!
440
+ ) {
441
+ removeProductVariationOption(
442
+ productVariationId: $productVariationId
443
+ productVariationOptionValue: $productVariationOptionValue
444
+ ) {
445
+ _id
446
+ }
447
+ }
448
+ `,eV=({onSubmit:e})=>{let{formatMessage:t}=(0,u.useIntl)(),{hasRole:a}=(0,c.default)(),s=t({id:"variation_option_added",defaultMessage:"Variation option added successfully!"}),l=(0,w.default)({submit:e,successMessage:s,initialValues:{value:"",title:""}});return(0,r.jsxs)(h.default,{form:l,className:"variation-option-form relative overflow-visible",children:[(0,r.jsx)("div",{className:"mb-4 px-2 sm:px-4 pt-2",children:(0,r.jsx)("div",{className:"p-3 bg-slate-50 dark:bg-slate-900/20 rounded-lg border border-slate-200 dark:border-slate-800",children:(0,r.jsx)("p",{className:"text-sm text-slate-800 dark:text-slate-200",children:t({id:"variation_options_explanation",defaultMessage:'Add individual choices for this variation (e.g., "Red", "Blue", "Green" for a Color variation)'})})})}),(0,r.jsxs)("div",{className:"grid lg:grid-cols-2 gap-3 px-2 sm:px-4 sm:pb-4",children:[(0,r.jsx)("div",{className:"col-span-1",children:(0,r.jsx)(ej,{className:"mt-2 pt-1",name:"title",label:t({id:"title",defaultMessage:"Title"}),helpText:t({id:"variation_option_title_help",defaultMessage:'Display name customers see (e.g., "Red", "Large", "Cotton")'}),required:!0})}),(0,r.jsx)("div",{className:"col-span-1",children:(0,r.jsx)(ej,{className:"mt-2 pt-1",name:"value",label:t({id:"value",defaultMessage:"Value"}),helpText:t({id:"variation_option_value_help",defaultMessage:'Internal identifier (e.g., "red", "large", "cotton")'}),required:!0})})]}),a(o.IRoleAction.ManageProducts)&&(0,r.jsx)("div",{className:"text-right mt-2 px-6 pb-6",children:(0,r.jsx)(y.default,{className:"py-2.5",label:t({id:"add_variation_option",defaultMessage:"Add option"})})})]})};var eD=e.i(3095);let eE=({option:e,onDelete:a,variationId:s})=>{let{formatMessage:l}=(0,u.useIntl)(),{selectedLocale:d}=(0,L.default)(),[i,o]=(0,t.useState)(!1),n=l({id:"variation_option_updated",defaultMessage:"Variation option updated successfully!"}),{updateProductVariationTexts:c}=eP(),m=async({title:t,subtitle:a})=>{let l=await c({productVariationId:s,productVariationOptionValue:e.value,texts:[{title:t,subtitle:a,locale:d}]});return o(!1),{data:l,success:!0}},p=(0,w.default)({submit:m,successMessage:n,initialValues:{title:e?.texts?.title,subtitle:e?.texts?.subtitle}});return(0,r.jsx)(h.default,{form:p,className:"last:pb-2 variation-option-update-form relative overflow-visible",children:(0,r.jsx)("div",{className:"my-2 rounded-sm border dark:border-slate-700 mx-4 ",children:(0,r.jsx)("div",{className:"p-2 bg-white dark:bg-slate-900 dark:text-slate-200",children:(0,r.jsxs)("div",{className:"flex gap-2 w-full items-center justify-between",children:[(0,r.jsx)(eM.default,{text:e?.value,color:"slate",className:"rounded-md"}),(0,r.jsxs)("div",{className:"flex items-center gap-4 w-full",children:[(0,r.jsx)("p",{className:"truncate text-sm font-medium text-slate-900 dark:text-slate-400",children:i?(0,r.jsx)(j.default,{className:"mt-0",name:"title",required:!0,label:l({id:"title",defaultMessage:"Title"})}):e?.texts?.title}),(0,r.jsx)("p",{className:"truncate text-sm text-slate-500",children:i?(0,r.jsx)(j.default,{className:"mt-0",name:"subtitle",label:l({id:"subtitle",defaultMessage:"Subtitle"})}):e?.texts?.subtitle})]}),(0,r.jsx)("div",{className:"flex items-center justify-end ml-auto",children:i?(0,r.jsxs)("div",{className:"flex space-x-2 py-2",children:[(0,r.jsx)("button",{onClick:()=>o(!i),"aria-label":l({id:"cancel",defaultMessage:"Cancel"}),type:"button",className:"inline-flex items-center justify-center font-medium shadow-sm focus:outline-hidden focus:ring-2 focus:ring-offset-2 transition-colors duration-200 disabled:cursor-not-allowed disabled:opacity-50 px-3 py-2 text-sm h-8 rounded-md border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-800 text-slate-700 dark:text-slate-200 hover:bg-slate-50 dark:hover:bg-slate-700 focus:ring-slate-500",children:l({id:"cancel",defaultMessage:"Cancel"})}),(0,r.jsx)("button",{type:"submit","aria-label":l({id:"save",defaultMessage:"Save"}),className:"inline-flex items-center justify-center font-medium shadow-sm focus:outline-hidden focus:ring-2 focus:ring-offset-2 transition-colors duration-200 disabled:cursor-not-allowed disabled:opacity-50 px-3 py-2 text-sm h-8 rounded-md border border-slate-800 dark:border-slate-600 bg-slate-800 dark:bg-slate-600 text-white hover:bg-slate-900 dark:hover:bg-slate-500 focus:ring-slate-800 dark:focus:ring-slate-400",children:l({id:"save",defaultMessage:"Save"})})]}):(0,r.jsx)(eD.default,{onEdit:()=>{o(!0)},onDelete:()=>{a(e.value)},showEdit:!0,showDelete:!0})})]})})})})},eL=({variationId:e,options:t})=>{let{createProductVariationOption:a}=(()=>{let[e]=(0,$.useMutation)(eA);return{createProductVariationOption:async({productVariationId:t,option:a,texts:s})=>e({variables:{productVariationId:t,option:a,texts:s},refetchQueries:["ProductVariations","Product"]})}})(),{formatMessage:s}=(0,u.useIntl)(),{selectedLocale:l}=(0,L.default)(),{setModal:d}=(0,el.default)(),{removeProductVariationOption:i}=(()=>{let[e]=(0,$.useMutation)(eq);return{removeProductVariationOption:async({productVariationId:t,productVariationOptionValue:a})=>e({variables:{productVariationId:t,productVariationOptionValue:a},refetchQueries:["ProductVariations"]})}})(),o=async t=>{await d((0,r.jsx)(ea.default,{message:s({id:"delete_variation_option_confirmation",defaultMessage:"This action might cause inconsistencies with other data that relates to it. Are you sure you want to delete this option? "}),onCancelClick:()=>d(""),onOkClick:async()=>{d(""),await i({productVariationId:e,productVariationOptionValue:t}),O.toast.success(s({id:"product_variation_option_deleted",defaultMessage:"Variation option deleted successfully"}))},okText:s({id:"delete_variation_option",defaultMessage:"Delete option"})}))},n=async({value:t,title:s})=>(await a({productVariationId:e,option:t,texts:[{title:s,locale:l}]}),{success:!0});return(0,r.jsxs)("div",{className:"relative overflow-visible",children:[(0,r.jsx)(eV,{onSubmit:n}),t.length?t.map(t=>(0,r.jsx)(eE,{variationId:e,option:t,onDelete:o},t._id)):(0,r.jsx)(J.default,{message:s({id:"option",defaultMessage:"Option"})})]})},eU=({productVariationId:e,variation:t})=>{let{formatMessage:a}=(0,u.useIntl)(),{setModal:s}=(0,el.default)(),{options:l}=t,{removeProductVariation:d}=(()=>{let[e]=(0,$.useMutation)(ew);return{removeProductVariation:async({productVariationId:t})=>e({variables:{productVariationId:t},refetchQueries:["ProductVariations"]})}})(),i=async()=>{await s((0,r.jsx)(ea.default,{onCancelClick:async()=>s(""),message:a({id:"delete_product_variation_confirmation",defaultMessage:"This action might cause inconsistencies with other data that relates to it. Are you sure you want to delete this variation? "}),onOkClick:async()=>{s(""),await d({productVariationId:e}),O.toast.success(a({id:"product_variation_deleted",defaultMessage:"Variation deleted successfully"}))},okText:a({id:"delete_product_variation",defaultMessage:"Delete variation"})}))},o=[{header:(0,r.jsx)(eR,{onDelete:i,variation:t,...t}),body:(0,r.jsx)(eL,{variationId:t._id,options:l},e)}];return(0,r.jsx)(eI.default,{"data-variationid":t._id,data:o,containerCSS:"w-full max-w-full !my-0 !border-0 !shadow-none relative",bodyCSS:"bg-slate-50 dark:bg-slate-950 !border-t-0 relative overflow-visible",itemContainerCSS:"!mt-0 !mb-0 !border-0",headerCSS:"w-full flex items-center justify-between !p-0 !bg-transparent !border-0",hideChevron:!0})},eO=({onSubmit:e,disabled:t,formatMessage:a})=>{let{variationTypes:s}=(()=>{let{data:e,loading:t,error:a}=(0,P.useQuery)(ey);return{variationTypes:e?.variationTypes?.options||[],loading:t,error:a}})(),{hasRole:l}=(0,c.default)(),d=a({id:"product_variation_added",defaultMessage:"Product variation added successfully"}),i=(0,w.default)({disabled:t,submit:e,successMessage:d,initialValues:{title:"",key:"",type:""}});return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-slate-900 dark:text-slate-100 mb-2",children:a({id:"product_variations_explanation_title",defaultMessage:"About Product Variations"})}),(0,r.jsx)("p",{className:"text-sm text-slate-600 dark:text-slate-400",children:a({id:"product_variations_explanation",defaultMessage:"Variations allow customers to choose different options for your product (like color, size, material). Each variation can have multiple options that customers can select from."})})]}),(0,r.jsxs)(h.default,{form:i,children:[(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsx)(ej,{name:"title",id:"title",label:a({id:"title",defaultMessage:"Title"}),helpText:a({id:"product_variation_title_help",defaultMessage:'The display name customers will see (e.g., "Color", "Size", "Material")'}),required:!0,autoComplete:"on",className:"w-full"}),(0,r.jsx)(ej,{name:"key",id:"key",label:a({id:"key",defaultMessage:"Key"}),helpText:a({id:"product_variation_key_help",defaultMessage:'Unique identifier used internally (e.g., "color", "size"). Use lowercase without spaces.'}),required:!0,autoComplete:"on",className:"w-full"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(v.default,{required:!0,className:"w-full",label:a({id:"type",defaultMessage:"Type"}),placeholder:a({id:"type",defaultMessage:"Type"}),name:"type",options:(0,p.default)(s,"value","value")}),(0,r.jsx)(E.default,{messageKey:"product_variation_type_help",defaultMessage:"COLOR: For predefined options like colors or sizes. TEXT: For free-form input like custom text or measurements.",className:"mt-1"})]})]}),l(o.IRoleAction.ManageProducts)&&(0,r.jsx)("div",{className:"flex justify-end mt-6 py-6 -mb-6 bg-slate-100 -mx-6 pe-5 border-t border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-900",children:(0,r.jsx)(y.default,{label:a({id:"add_variation",defaultMessage:"Add variation"})})})]})]})};e.s(["default",0,({productId:e,disabled:t=!1})=>{let{createProductVariation:a}=(()=>{let[e]=(0,$.useMutation)(eh);return{createProductVariation:async({productId:t,variation:{key:a,type:s},texts:l})=>e({variables:{productId:t,variation:{key:a,type:s},texts:l},refetchQueries:["ProductVariations"]})}})(),{selectedLocale:s}=(0,L.default)(),{formatMessage:l}=(0,u.useIntl)(),{setModal:d}=(0,el.default)(),{variations:i,loading:o}=(({productId:e=null,slug:t=null,locale:a=null}={})=>{let s=(0,Z.parseUniqueId)(t),{data:l,loading:d,error:i}=(0,P.useQuery)(ev,{skip:!e&&!s,variables:{productId:e||s,locale:a}}),r=l?.product;return{variations:r?.variations,loading:d,error:i}})({productId:e,locale:s}),n=async({title:t,key:l,type:i})=>(await a({productId:e,variation:{key:l,type:i},texts:[{title:t,locale:s}]}),d(""),{success:!0});return o?(0,r.jsx)(eg.default,{}):(0,r.jsxs)("div",{className:"mt-6 overflow-hidden rounded-md w-full max-w-full",children:[(0,r.jsx)("div",{className:"mb-6 flex justify-end items-center",children:(0,r.jsx)(I.default,{className:"m-1",onClick:()=>{d((0,r.jsx)(eO,{onSubmit:n,disabled:t,formatMessage:l}))},disabled:t,variant:"secondary",icon:(0,r.jsx)(ex.PlusIcon,{className:"w-5 h-5"}),text:l({id:"add_variation",defaultMessage:"Add variation"})})}),(0,r.jsx)("div",{className:"flex flex-col border border-slate-200 dark:border-slate-700 rounded-md overflow-x-hidden overflow-y-visible w-full relative",children:i?.length?i?.map(e=>(0,r.jsx)(eU,{productVariationId:e._id,variation:e},e._id)):(0,r.jsx)(J.default,{message:l({id:"variations",defaultMessage:"Variations"})})})]})}],77035);let eF=N.gql`
449
+ query ProductWarehousing($productId: ID, $slug: String) {
450
+ product(productId: $productId, slug: $slug) {
451
+ _id
452
+ ... on SimpleProduct {
453
+ sku
454
+ baseUnit
455
+ }
456
+ }
457
+ }
458
+ `,eQ=N.gql`
459
+ mutation UpdateProductWarehousing(
460
+ $productId: ID!
461
+ $warehousing: UpdateProductWarehousingInput!
462
+ ) {
463
+ updateProductWarehousing(productId: $productId, warehousing: $warehousing) {
464
+ _id
465
+ ... on SimpleProduct {
466
+ sku
467
+ baseUnit
468
+ }
469
+ }
470
+ }
471
+ `;e.s(["default",0,({productId:e,disabled:a=!1})=>{let{formatMessage:s}=(0,u.useIntl)(),{product:l}=(({productId:e=null,slug:t=null}={})=>{let a=(0,Z.parseUniqueId)(t),{data:s,loading:l,error:d}=(0,P.useQuery)(eF,{skip:!e&&!a,variables:{productId:e||a}});return{product:s?.product||{},loading:l,error:d}})({productId:e}),{hasRole:d}=(0,c.default)(),{updateProductWarehousing:i}=(()=>{let[e]=(0,$.useMutation)(eQ);return{updateProductWarehousing:async({productId:t,warehousing:{sku:a=null,baseUnit:s=null}})=>e({variables:{productId:t,warehousing:{sku:a,baseUnit:s}},refetchQueries:["Products"]})}})(),n=s({id:"saved",defaultMessage:"Saved"}),p=async({sku:t,baseUnit:a})=>({data:await i({productId:e,warehousing:{baseUnit:a,sku:t}}),success:!0}),f=(0,w.default)({disabled:a,submit:p,successMessage:n,initialValues:{sku:"",baseUnit:""}});return(0,t.useEffect)(()=>{Object.keys(l).length&&f.formik.setValues({...l})},[l]),(0,r.jsx)("div",{className:"mt-5 md:mt-0",children:(0,r.jsx)(m.default,{children:(0,r.jsxs)(h.default,{className:"rounded",form:f,disabled:!d(o.IRoleAction.ManageProducts),children:[(0,r.jsx)("div",{className:"relative px-4 pb-5 sm:p-6",children:(0,r.jsxs)("div",{className:"w-full justify-between align-baseline lg:flex gap-6",children:[(0,r.jsx)(j.default,{name:"sku",disabled:!d(o.IRoleAction.ManageProducts),id:"sku",label:s({id:"sku",defaultMessage:"SKU"}),className:"mb-4 text-sm"}),(0,r.jsx)(j.default,{name:"baseUnit",id:"baseUnit",disabled:!d(o.IRoleAction.ManageProducts),label:s({id:"baseUnit",defaultMessage:"Base Unit"}),className:"text-sm"})]})}),d(o.IRoleAction.ManageProducts)&&(0,r.jsx)("div",{className:"border-t-slate-100 border-t dark:border-t-slate-700 space-y-6 bg-slate-50 dark:bg-slate-900 text-right sm:p-6",children:(0,r.jsx)(y.default,{label:s({id:"save",defaultMessage:"Save"})})})]})})})}],56902);var eB=o,ez=e.i(87593);let eK=N.gql`
472
+ query ProductReviewByProduct(
473
+ $productId: ID
474
+ $slug: String
475
+ $limit: Int
476
+ $offset: Int
477
+ $sort: [SortOptionInput!]
478
+ $forceLocale: Locale
479
+ ) {
480
+ product(productId: $productId, slug: $slug) {
481
+ _id
482
+ reviews(limit: $limit, offset: $offset, sort: $sort) {
483
+ ...ProductReviewDetailFragment
484
+ }
485
+ reviewsCount
486
+ }
487
+ }
488
+ ${ez.default}
489
+ `;var eH=e.i(66859),eZ=e.i(39833),eW=e.i(84339);let eG=t.forwardRef(function({title:e,titleId:a,...s},l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),e?t.createElement("title",{id:a},e):null,t.createElement("path",{fillRule:"evenodd",d:"M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.006 5.404.434c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.434 2.082-5.005Z",clipRule:"evenodd"}))}),eJ=({productReviews:e})=>{let{formatMessage:t}=(0,u.useIntl)(),a=e.reduce((e,t)=>e+t.upVote,0),s=e.reduce((e,t)=>e+t.downVote,0),l=a?a/(a+s)*100:0,d=l?100-l:0;return(0,r.jsxs)("div",{className:"lg:col-span-4",children:[(0,r.jsx)("h2",{className:"text-2xl",children:t({id:"customer_reviews",defaultMessage:"Customer Reviews"})}),(0,r.jsxs)("div",{className:"mt-3 flex items-center",children:[(0,r.jsx)("div",{children:(0,r.jsx)("div",{title:`${l}`,className:"flex items-center",children:[0,1,2,3,4].map(e=>{let t=l>=20*e;return(0,r.jsx)(eG,{className:`
490
+ ${t?"text-amber-400":"text-slate-300 dark:text-slate-600"}
491
+ h-5 w-5 shrink-0
492
+ `,"aria-hidden":"true"},e)})})}),(0,r.jsx)("div",{className:"ml-2 text-sm",children:(0,r.jsx)(u.FormattedMessage,{id:"review_summary",defaultMessage:"<div> Based on <cta> {total} </cta> reviews</div>",values:{div:e=>(0,r.jsx)("div",{children:e}),cta:e=>(0,r.jsx)("b",{className:"font-semibold",children:e}),total:e.length}})})]}),(0,r.jsxs)("div",{className:"mt-6",children:[(0,r.jsx)("h3",{className:"sr-only",children:t({id:"review_data",defaultMessage:"Review data"})}),(0,r.jsxs)("dl",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center text-sm",children:[(0,r.jsxs)("dt",{className:"flex flex-1 items-center",children:[(0,r.jsx)("p",{className:"font-medium",children:a}),(0,r.jsxs)("div",{"aria-hidden":"true",className:"ml-2 flex flex-1 items-center",children:[(0,r.jsx)(eW.HandThumbUpIcon,{className:`
493
+ ${a>0?"text-emerald-500":"text-slate-500"}
494
+ h-5 w-5 shrink-0`,"aria-hidden":"true"}),(0,r.jsxs)("div",{className:"relative ml-3 flex-1",children:[(0,r.jsx)("div",{className:"h-3 rounded-full border border-slate-300 dark:border-slate-800 bg-slate-50 dark:bg-slate-900"}),a>0?(0,r.jsx)("div",{className:"absolute inset-y-0 rounded-full border border-emerald-500 bg-emerald-500",style:{width:`calc(${l}%)`}}):null]})]})]}),(0,r.jsxs)("dd",{className:"ml-3 w-10 text-right text-sm tabular-nums",children:[Math.round(l),"%"]})]}),(0,r.jsxs)("div",{className:"flex items-center text-sm",children:[(0,r.jsxs)("dt",{className:"flex flex-1 items-center",children:[(0,r.jsxs)("p",{className:"font-medium",children:[s,(0,r.jsx)("span",{className:"sr-only",children:t({id:"star_reviews",defaultMessage:"Star reviews"})})]}),(0,r.jsxs)("div",{"aria-hidden":"true",className:"ml-2 flex flex-1 items-center",children:[(0,r.jsx)(eZ.HandThumbDownIcon,{className:`
495
+ ${s>0?"text-rose-500":"text-slate-500"}
496
+ h-5 w-5 shrink-0
497
+ `,"aria-hidden":"true"}),(0,r.jsxs)("div",{className:"relative ml-3 flex-1",children:[(0,r.jsx)("div",{className:"h-3 rounded-full border border-slate-300 dark:border-slate-800 bg-slate-50 dark:bg-slate-900"}),s>0?(0,r.jsx)("div",{className:"absolute inset-y-0 rounded-full border border-rose-500 bg-rose-500",style:{width:`calc(${d}%)`}}):null]})]})]}),(0,r.jsxs)("dd",{className:"ml-3 w-10 text-right text-sm tabular-nums",children:[Math.round(d),"%"]})]})]})]})]})};var eX=e.i(19471);let eY=({onSubmit:e,onSubmitSuccess:t=null,defaultValue:a={},isEdit:s=!1})=>{let{formatMessage:l}=(0,u.useIntl)(),{hasRole:d}=(0,c.default)(),i=l({id:"product_review_added",defaultMessage:"Review added successfully!"}),n=l({id:"product_review_updated",defaultMessage:"Review updated successfully!"}),m=(0,w.default)({submit:e,onSubmitSuccess:t,successMessage:s?n:i,initialValues:{title:"",review:"",rating:1,...a}});return(0,r.jsxs)("div",{className:"bg-white dark:bg-slate-800 rounded-md shadow-sm overflow-hidden p-6 mb-6",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-slate-900 dark:text-slate-100 mb-4",children:l({id:"write_review",defaultMessage:"Write a Review"})}),(0,r.jsxs)(h.default,{form:m,children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(j.default,{name:"title",disabled:!d(o.IRoleAction.ReviewProduct),id:"title",label:l({id:"title",defaultMessage:"Title"}),autoComplete:"off",required:!0}),(0,r.jsx)(eX.default,{rows:4,name:"review",disabled:!d(o.IRoleAction.ReviewProduct),id:"review",label:l({id:"review",defaultMessage:"Review"}),placeholder:l({id:"review_placeholder",defaultMessage:"Share your thoughts about this product..."})})]}),d(o.IRoleAction.ReviewProduct)&&(0,r.jsx)("div",{className:"mt-6 flex justify-end",children:(0,r.jsx)(y.default,{label:l(s?{id:"update_review",defaultMessage:"Update Review"}:{id:"add_review",defaultMessage:"Add Review"}),className:"px-6 py-2"})})]})]})},e0=N.gql`
498
+ mutation CreateProductReview(
499
+ $productId: ID!
500
+ $productReview: ProductReviewInput!
501
+ $forceLocale: Locale
502
+ ) {
503
+ createProductReview(productId: $productId, productReview: $productReview) {
504
+ _id
505
+ }
506
+ }
507
+ `;e.s(["default",0,({productId:e})=>{let{productReviews:t,loadMore:a,reviewsCount:s}=(({productId:e=null,slug:t=null,limit:a=10,offset:s=0,sort:l=[{key:"created",value:eB.ISortDirection.Desc}]}={})=>{let{selectedLocale:d}=(0,L.default)(),{data:i,loading:r,error:o,fetchMore:n}=(0,P.useQuery)(eK,{skip:!e,variables:{productId:e,slug:t,limit:a,offset:s,sort:l,forceLocale:d}}),u=i?.product,c=u?.reviews||[];return{productReviews:c,loading:r,error:o,reviewsCount:u?.reviewsCount||0,loadMore:()=>{n({variables:{offset:c?.length}})}}})({productId:e}),{createProductReview:l}=(()=>{let[e]=(0,$.useMutation)(e0);return{createProductReview:async({productId:t,productReview:{title:a,rating:s,review:l}})=>e({variables:{productId:t,productReview:{title:a,rating:s,review:l}},refetchQueries:["ProductReviewByProduct","ProductReviewByUser"]})}})(),{formatMessage:d}=(0,u.useIntl)();return(0,r.jsxs)("div",{className:"sm:max-w-full",children:[(0,r.jsx)("div",{className:"text-slate-900 dark:text-slate-200",children:(0,r.jsxs)("div",{className:"mx-auto p-2 lg:grid lg:max-w-7xl lg:grid-cols-12 lg:gap-x-8",children:[(0,r.jsx)(eJ,{productReviews:t}),(0,r.jsxs)("div",{className:"mt-16 lg:col-span-7 lg:col-start-6 lg:mt-0",children:[e&&(0,r.jsx)(eY,{onSubmit:async({title:t,review:a,rating:s})=>await l({productId:e,productReview:{title:t,review:a,rating:10}})}),(0,r.jsx)("h3",{className:"sr-only",children:d({id:"recent_reviews",defaultMessage:"Recent reviews"})}),(0,r.jsx)("div",{className:"flow-root",children:(0,r.jsx)("div",{className:"-my-3",children:t.map(e=>(0,r.jsx)(eH.default,{review:e},e._id))})})]})]})}),s>t?.length?(0,r.jsx)(I.default,{text:d({id:"load-more-reviews",defaultMessage:"Load reviews"}),onClick:a}):null]})}],19051);var e1=e.i(47542);let e5=N.gql`
508
+ mutation CreateProductBundleItem(
509
+ $productId: ID!
510
+ $item: CreateProductBundleItemInput!
511
+ ) {
512
+ createProductBundleItem(productId: $productId, item: $item) {
513
+ _id
514
+ }
515
+ }
516
+ `;var e2=e.i(24112);let e3=(0,e.i(5270).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);var e6=e.i(38994);let e9=function({onSuccess:e}){let{selectedLocale:t}=(0,L.default)(),{createProduct:a}=(0,e6.default)(),{formatMessage:s}=(0,u.useIntl)();return async({title:l,type:d,quantity:i=1})=>{let r=[{title:l,slug:l.toLowerCase().replace(/\s+/g,"-"),locale:t}],{data:n}=await a({product:{type:d||o.IProductType.SimpleProduct},texts:r}),u=n?.createProduct;if(!u?._id)throw Error(s({id:"product_creation_failed",defaultMessage:"Product creation failed"}));return e?.(u,i),{success:!0}}},e7=({bundleProduct:e,onSuccess:a})=>{let{formatMessage:s}=(0,u.useIntl)(),{hasRole:l}=(0,c.default)(),d=e9({onSuccess:a}),i=(0,t.useMemo)(()=>{let t=e?.texts?.title??"";return`${t} - New Bundle Item`},[e]),n=async({title:e,type:t,quantity:a})=>{try{return await d({title:e,type:t,quantity:a}),{success:!0}}catch(e){return{success:!1,error:{message:e?.message}}}},m=s({id:"bundle-item-scaffolded-success",defaultMessage:"New product scaffolded and added to bundle successfully"}),p=(0,w.default)({submit:n,successMessage:m,enableReinitialize:!0,initialValues:{title:i,type:o.IProductType.SimpleProduct,quantity:1}});return(0,r.jsxs)(h.default,{className:"mt-4 rounded-md border border-slate-200 dark:border-slate-700",form:p,children:[(0,r.jsxs)("div",{className:"p-5 flex flex-col gap-3",children:[(0,r.jsx)("h3",{className:"text-md font-semibold text-slate-800 dark:text-slate-100",children:s({id:"scaffold_bundle_item_title",defaultMessage:"Scaffold New Bundle Item"})}),(0,r.jsx)(j.default,{name:"title",id:"title",label:s({id:"name",defaultMessage:"Name"}),required:!0,className:"block w-full rounded-md border-slate-300 dark:border-slate-800 text-sm"}),(0,r.jsx)(v.default,{className:"mt-1 w-full",label:s({id:"type",defaultMessage:"Type"}),placeholder:s({id:"type",defaultMessage:"Type"}),required:!0,name:"type",options:Object.fromEntries(Object.entries(o.IProductType).filter(([,e])=>e!==o.IProductType.ConfigurableProduct&&e!==o.IProductType.BundleProduct).map(([e,t])=>[t,e]))}),(0,r.jsx)(j.default,{name:"quantity",type:"number",required:!0,label:s({id:"quantity",defaultMessage:"Quantity"})})]}),l(o.IRoleAction.ManageProducts)&&(0,r.jsx)("div",{className:"border-t border-slate-100 dark:border-slate-700 bg-slate-50 dark:bg-slate-900 p-5 text-right",children:(0,r.jsx)(y.default,{label:s({id:"scaffold_and_add",defaultMessage:"Scaffold & Add"})})})]})},e4=({productId:e=null,slug:t=null}={})=>{let a=(0,Z.parseUniqueId)(t),{customProperties:s,hydrateFragment:l}=(0,T.default)(),{data:d,loading:i,error:r}=(0,P.useQuery)(((e="")=>N.gql`
517
+ query Product($productId: ID, $slug: String) {
518
+ product(productId: $productId, slug: $slug) {
519
+ ...ProductDetailFragment
520
+ ${e}
521
+ texts {
522
+ _id
523
+ title
524
+ subtitle
525
+ description
526
+ }
527
+ ... on SimpleProduct {
528
+ texts {
529
+ _id
530
+ title
531
+ subtitle
532
+ description
533
+ }
534
+ proxies {
535
+ __typename
536
+ }
537
+ }
538
+ ... on ConfigurableProduct {
539
+ texts {
540
+ _id
541
+ title
542
+ subtitle
543
+ description
544
+ }
545
+ }
546
+ ... on PlanProduct {
547
+ texts {
548
+ _id
549
+ title
550
+ subtitle
551
+ description
552
+ }
553
+ proxies {
554
+ __typename
555
+ }
556
+ }
557
+ ... on BundleProduct {
558
+ texts {
559
+ _id
560
+ title
561
+ subtitle
562
+ description
563
+ }
564
+ proxies {
565
+ __typename
566
+ }
567
+ }
568
+ }
569
+ }
570
+ ${C.default}
571
+ `)(s?.Product),{skip:!e&&!a,variables:{productId:e||a}}),o=l(s?.Product,d?.product);return{product:d?.product,loading:i,error:r,extendedData:o}};e.s(["default",0,e4],84278);let e8=({productId:e,disabled:a=!1})=>{let{product:s}=e4({productId:e}),{setModal:l}=(0,el.default)(),[d,i]=(0,t.useState)(""),{createProductBundleItem:n}=(()=>{let[e]=(0,$.useMutation)(e5);return{createProductBundleItem:async({productId:t,item:a})=>e({variables:{productId:t,item:a},refetchQueries:["ProductBundleItems"]})}})(),{hasRole:m}=(0,c.default)(),{formatMessage:p}=(0,u.useIntl)(),{products:f,loading:x}=(0,e2.default)({queryString:d,includeDrafts:!0,limit:50,sort:[{key:"created",value:o.ISortDirection.Desc}]}),g=async({productId:t,quantity:a})=>(await n({item:{productId:t,quantity:a},productId:e}),{success:!0}),b=p({id:"bundle_item_added",defaultMessage:"Bundle product added successfully"}),v=(0,w.default)({disabled:a,submit:g,successMessage:b,onSubmitSuccess:()=>(v.formik.resetForm(),null),initialValues:{productId:"",quantity:1}}),M=(0,t.useCallback)(async()=>{await l((0,r.jsx)(e7,{bundleProduct:s,onSuccess:async(t,a=1)=>{await n({item:{productId:t._id,quantity:a},productId:e}),l("")}}))},[s]);return(0,r.jsxs)(h.default,{form:v,children:[(0,r.jsxs)("div",{className:"flex items-end gap-2 w-full",children:[(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsx)(e1.default,{name:"productId",onFilter:i,queryString:d,label:p({id:"product",defaultMessage:"Product"}),data:((e=[])=>e.map(({_id:e,status:t,texts:a,media:s})=>({id:e,tag:t,...a,image:s?.length?s[0]?.file?.url:null})))(f),isLoading:x,className:"w-full text-sm font-medium text-slate-500",required:!0})}),m(o.IRoleAction.ManageProducts)&&(0,r.jsx)("div",{className:"pb-3",children:(0,r.jsx)(I.default,{className:"flex items-center justify-center p-2 rounded-md",onClick:M,children:(0,r.jsx)(e3,{className:"h-5 w-5"})})})]}),(0,r.jsx)(j.default,{name:"quantity",type:"number",required:!0,label:p({id:"quantity",defaultMessage:"Quantity"})}),m(o.IRoleAction.ManageProducts)&&(0,r.jsx)(y.default,{label:p({id:"submit",defaultMessage:"Submit"}),className:"mt-2"})]})};var te=e.i(54529);let tt=N.gql`
572
+ query ProductBundleItems(
573
+ $productId: ID
574
+ $slug: String
575
+ $forceLocale: Locale
576
+ ) {
577
+ product(productId: $productId, slug: $slug) {
578
+ _id
579
+ ... on BundleProduct {
580
+ bundleItems {
581
+ product {
582
+ ...ProductBriefFragment
583
+ }
584
+ quantity
585
+ }
586
+ }
587
+ }
588
+ }
589
+ ${te.default}
590
+ `,ta=N.gql`
591
+ mutation RemoveBundleItem($productId: ID!, $index: Int!) {
592
+ removeBundleItem(productId: $productId, index: $index) {
593
+ _id
594
+ }
595
+ }
596
+ `;var ts=e.i(41158),tl=e.i(35065),td=e.i(22315);let ti=({item:e,onDelete:t,index:a})=>{let{product:s,quantity:l}=e;return(0,r.jsx)(ts.default,{href:`/products?slug=${(0,Z.default)(s)}`,children:(0,r.jsxs)("div",{className:" group flex w-full items-center justify-between border-b border-slate-200 dark:border-slate-700 hover:border-slate-300 dark:hover:border-slate-600 hover:bg-slate-50/80 dark:hover:bg-slate-700/50 transition-all duration-200 ease-in-out hover:shadow-sm last:border-none",children:[(0,r.jsxs)("div",{className:"flex w-full items-center space-x-6 py-4",children:[s.media?.length?(0,r.jsx)("div",{className:"flex w-20 flex-col items-center",children:(0,r.jsx)("div",{className:"relative m-1 mr-2 mt-1 flex items-center justify-center rounded-full ",children:(0,r.jsx)(tl.default,{className:"mx-auto w-auto",src:s.media[0]?.file?.url,width:160,height:100,alt:s?.texts?.title||s?.texts?.subtitle})})}):(0,r.jsx)(td.default,{className:"h-10 w-10"}),(0,r.jsxs)("div",{className:"shrink grow basis-1/2",children:[(0,r.jsx)("h3",{className:"text-lg text-slate-800 dark:text-slate-200",children:s?.texts?.title}),(0,r.jsx)("p",{className:"text-xs text-slate-600 dark:text-slate-200",children:s?.texts?.subtitle})]}),(0,r.jsx)("div",{className:"ml-auto",children:(0,r.jsx)(eM.default,{text:l,color:"slate",square:!0})})]}),(0,r.jsx)(eD.default,{onDelete:()=>{t(a)},showDelete:!0})]})})},tr=({productId:e})=>{let{formatMessage:t}=(0,u.useIntl)(),{setModal:a}=(0,el.default)(),{selectedLocale:s}=(0,L.default)(),{bundleItems:l,loading:d}=(({productId:e=null,slug:t=null}={})=>{let{selectedLocale:a}=(0,L.default)(),s=(0,Z.parseUniqueId)(t),{data:l,loading:d,error:i}=(0,P.useQuery)(tt,{skip:!e&&!s,variables:{productId:e||s,forceLocale:a},context:{headers:{forceLocale:a}}});return{bundleItems:l?.product?.bundleItems||[],loading:d,error:i}})({productId:e,forceLocale:s}),{removeBundleItem:i}=(()=>{let[e]=(0,$.useMutation)(ta);return{removeBundleItem:async({productId:t,index:a})=>e({variables:{productId:t,index:a},refetchQueries:["ProductBundleItems"]})}})(),o=async s=>{await a((0,r.jsx)(ea.default,{onCancelClick:async()=>a(""),message:t({id:"delete_bundle_item_confirmation",defaultMessage:"This action might cause inconsistencies with other data that relates to it. Are you sure you want to delete this bundle item? "}),onOkClick:async()=>{a(""),await i({productId:e,index:s}),O.toast.success(t({id:"bundle_item_deleted",defaultMessage:"Bundle item deleted successfully"}))},okText:t({id:"delete_bundle_item",defaultMessage:"Delete item"})}))};return d?(0,r.jsx)(eg.default,{}):l.length?(0,r.jsx)(r.Fragment,{children:l.map((e,t)=>(0,r.jsx)(ti,{index:t,item:e,onDelete:o},e.product._id))}):(0,r.jsx)(J.default,{message:t({id:"bundle",defaultMessage:"Bundle product"})})};e.s(["default",0,({productId:e,disabled:t=!1})=>(0,r.jsx)("div",{className:"mt-6 rounded-md",children:(0,r.jsxs)("div",{className:"lg:grid lg:grid-cols-9",children:[(0,r.jsx)("div",{className:"mb-5 lg:col-span-4 lg:pr-5",children:(0,r.jsx)(e8,{productId:e,disabled:t})}),(0,r.jsx)("div",{className:"col-span-5 ml-auto rounded-md bg-white dark:bg-slate-800 px-8 shadow-md dark:shadow-none lg:w-full",children:(0,r.jsx)("div",{className:"py-4",children:(0,r.jsx)(tr,{productId:e})})})]})})],11907)}]);