@kosdev-code/kos-dispense-sdk 0.1.0-dev.5840 → 0.1.0-next.719

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 (295) hide show
  1. package/{dispense-registration-manager-C7GGaZ47.js → dispense-registration-manager-DNibbp5F.js} +218 -266
  2. package/dispense-registration-manager-DNibbp5F.js.map +1 -0
  3. package/{dispense-registration-manager-lQhkTFKW.cjs → dispense-registration-manager-FTLZRpFt.cjs} +201 -249
  4. package/dispense-registration-manager-FTLZRpFt.cjs.map +1 -0
  5. package/{extension-utils-50g2ril2.cjs → extension-utils-Bh989x8z.cjs} +14 -25
  6. package/extension-utils-Bh989x8z.cjs.map +1 -0
  7. package/{extension-utils-Dt00FOJq.js → extension-utils-DkeldSBo.js} +20 -31
  8. package/extension-utils-DkeldSBo.js.map +1 -0
  9. package/extensions/control-pour-extension.d.ts +8 -9
  10. package/extensions/control-pour-extension.d.ts.map +1 -1
  11. package/extensions/index.d.ts.map +1 -1
  12. package/index.cjs +3 -6
  13. package/index.cjs.map +1 -1
  14. package/index.d.ts.map +1 -1
  15. package/index.js +89 -92
  16. package/index.js.map +1 -1
  17. package/models/constants/constants.d.ts.map +1 -1
  18. package/models/constants/index.d.ts.map +1 -1
  19. package/models/index.d.ts.map +1 -1
  20. package/models/models/assembly/assembly-model.d.ts +4 -5
  21. package/models/models/assembly/assembly-model.d.ts.map +1 -1
  22. package/models/models/assembly/assembly-registration.d.ts +1 -2
  23. package/models/models/assembly/assembly-registration.d.ts.map +1 -1
  24. package/models/models/assembly/board-utils.d.ts +1 -2
  25. package/models/models/assembly/board-utils.d.ts.map +1 -1
  26. package/models/models/assembly/holder-utils.d.ts +1 -2
  27. package/models/models/assembly/holder-utils.d.ts.map +1 -1
  28. package/models/models/assembly/index.d.ts.map +1 -1
  29. package/models/models/assembly/nozzle-utils.d.ts +1 -2
  30. package/models/models/assembly/nozzle-utils.d.ts.map +1 -1
  31. package/models/models/assembly/pump-utils.d.ts +2 -3
  32. package/models/models/assembly/pump-utils.d.ts.map +1 -1
  33. package/models/models/assembly/services/assembly-services.d.ts +0 -1
  34. package/models/models/assembly/services/assembly-services.d.ts.map +1 -1
  35. package/models/models/assembly/services/index.d.ts.map +1 -1
  36. package/models/models/assembly/types/index.d.ts +2 -3
  37. package/models/models/availability/availability-model.d.ts +1 -2
  38. package/models/models/availability/availability-model.d.ts.map +1 -1
  39. package/models/models/availability/index.d.ts.map +1 -1
  40. package/models/models/availability/types/index.d.ts +0 -1
  41. package/models/models/board/board-container-model.d.ts +2 -3
  42. package/models/models/board/board-container-model.d.ts.map +1 -1
  43. package/models/models/board/board-container-registration.d.ts +2 -3
  44. package/models/models/board/board-container-registration.d.ts.map +1 -1
  45. package/models/models/board/board-model.d.ts +1 -2
  46. package/models/models/board/board-model.d.ts.map +1 -1
  47. package/models/models/board/board-registration.d.ts +1 -2
  48. package/models/models/board/board-registration.d.ts.map +1 -1
  49. package/models/models/board/index.d.ts.map +1 -1
  50. package/models/models/board/types/index.d.ts +0 -2
  51. package/models/models/board/types/services.d.ts.map +1 -1
  52. package/models/models/board/utils/board-trouble-data-mapper.d.ts +1 -2
  53. package/models/models/board/utils/board-trouble-data-mapper.d.ts.map +1 -1
  54. package/models/models/board/utils/board-trouble-resolver.d.ts +0 -1
  55. package/models/models/board/utils/board-trouble-resolver.d.ts.map +1 -1
  56. package/models/models/device-assembly/device-assembly-model.d.ts +2 -3
  57. package/models/models/device-assembly/device-assembly-model.d.ts.map +1 -1
  58. package/models/models/device-assembly/device-assembly-registration.d.ts +2 -3
  59. package/models/models/device-assembly/device-assembly-registration.d.ts.map +1 -1
  60. package/models/models/device-assembly/index.d.ts.map +1 -1
  61. package/models/models/generic-pour/generic-pour-model.d.ts +3 -4
  62. package/models/models/generic-pour/generic-pour-model.d.ts.map +1 -1
  63. package/models/models/generic-pour/generic-pour-registration.d.ts +2 -3
  64. package/models/models/generic-pour/generic-pour-registration.d.ts.map +1 -1
  65. package/models/models/generic-pour/index.d.ts.map +1 -1
  66. package/models/models/generic-pour/services/generic-pour-services.d.ts.map +1 -1
  67. package/models/models/generic-pour/services/index.d.ts.map +1 -1
  68. package/models/models/holder/holder-model.d.ts +1 -2
  69. package/models/models/holder/holder-model.d.ts.map +1 -1
  70. package/models/models/holder/index.d.ts.map +1 -1
  71. package/models/models/holder/services/assignment-services.d.ts.map +1 -1
  72. package/models/models/holder/services/holder-services.d.ts.map +1 -1
  73. package/models/models/holder/services/index.d.ts.map +1 -1
  74. package/models/models/holder/types/index.d.ts +5 -7
  75. package/models/models/holder/utils/holder-utils.d.ts +0 -1
  76. package/models/models/holder/utils/holder-utils.d.ts.map +1 -1
  77. package/models/models/holder-container/holder-container-model.d.ts +1 -2
  78. package/models/models/holder-container/holder-container-model.d.ts.map +1 -1
  79. package/models/models/holder-container/index.d.ts.map +1 -1
  80. package/models/models/holder-container/types/index.d.ts +1 -3
  81. package/models/models/index.d.ts.map +1 -1
  82. package/models/models/ingredient/index.d.ts.map +1 -1
  83. package/models/models/ingredient/ingredient-model.d.ts +1 -2
  84. package/models/models/ingredient/ingredient-model.d.ts.map +1 -1
  85. package/models/models/ingredient/services/index.d.ts.map +1 -1
  86. package/models/models/ingredient/services/ingredient-services.d.ts.map +1 -1
  87. package/models/models/ingredient/types/index.d.ts +0 -2
  88. package/models/models/ingredient-container/index.d.ts.map +1 -1
  89. package/models/models/ingredient-container/ingredient-container-model.d.ts +1 -2
  90. package/models/models/ingredient-container/ingredient-container-model.d.ts.map +1 -1
  91. package/models/models/ingredient-container/types/index.d.ts +1 -3
  92. package/models/models/nozzle/index.d.ts.map +1 -1
  93. package/models/models/nozzle/nozzle-model.d.ts +6 -7
  94. package/models/models/nozzle/nozzle-model.d.ts.map +1 -1
  95. package/models/models/nozzle/services/index.d.ts.map +1 -1
  96. package/models/models/nozzle/services/nozzle-services.d.ts.map +1 -1
  97. package/models/models/nozzle/types/index.d.ts +1 -3
  98. package/models/models/pump/index.d.ts.map +1 -1
  99. package/models/models/pump/pump-model.d.ts +1 -2
  100. package/models/models/pump/pump-model.d.ts.map +1 -1
  101. package/models/models/pump/services/index.d.ts.map +1 -1
  102. package/models/models/pump/services/pump-services.d.ts +3 -5
  103. package/models/models/pump/services/pump-services.d.ts.map +1 -1
  104. package/models/models/pump/types/index.d.ts +1 -3
  105. package/models/models/pump/utils/pump-trouble-resolver.d.ts +0 -1
  106. package/models/models/pump/utils/pump-trouble-resolver.d.ts.map +1 -1
  107. package/models/models/pump-container/index.d.ts.map +1 -1
  108. package/models/models/pump-container/pump-container-model.d.ts +1 -2
  109. package/models/models/pump-container/pump-container-model.d.ts.map +1 -1
  110. package/models/models/pump-container/types/index.d.ts +1 -3
  111. package/models/models/types/assembly.d.ts.map +1 -1
  112. package/models/models/types/index.d.ts.map +1 -1
  113. package/models/models/types/intent.d.ts +0 -1
  114. package/models/models/types/intent.d.ts.map +1 -1
  115. package/models/models/types/pouring.d.ts.map +1 -1
  116. package/models/utils/dispense-registration-manager.d.ts +5 -6
  117. package/models/utils/dispense-registration-manager.d.ts.map +1 -1
  118. package/models/utils/extension-utils.d.ts +6 -7
  119. package/models/utils/extension-utils.d.ts.map +1 -1
  120. package/models/utils/openapi-index.d.ts.map +1 -1
  121. package/models/utils/registration.d.ts +0 -1
  122. package/models/utils/registration.d.ts.map +1 -1
  123. package/models/utils/service.d.ts +34 -35
  124. package/models/utils/service.d.ts.map +1 -1
  125. package/models/utils/services/dispense/1.6.5/service.d.ts +34 -35
  126. package/models/utils/services/dispense/1.6.5/service.d.ts.map +1 -1
  127. package/models/utils/services/dispense/1.8.1/service.d.ts +34 -35
  128. package/models/utils/services/dispense/1.8.1/service.d.ts.map +1 -1
  129. package/models/utils/services/dispense/daily/service.d.ts +34 -35
  130. package/models/utils/services/dispense/daily/service.d.ts.map +1 -1
  131. package/models/utils/services-index.d.ts.map +1 -1
  132. package/models.cjs +2 -4
  133. package/models.cjs.map +1 -1
  134. package/models.d.ts +1 -0
  135. package/models.js +25 -27
  136. package/models.js.map +1 -1
  137. package/package.json +10 -11
  138. package/{pump-provider-CBFev3qg.cjs → pump-provider-Coy43LDF.cjs} +154 -175
  139. package/pump-provider-Coy43LDF.cjs.map +1 -0
  140. package/{pump-provider-DyxEmFRT.js → pump-provider-DEbqbOnK.js} +217 -238
  141. package/pump-provider-DEbqbOnK.js.map +1 -0
  142. package/ui/contexts/assembly/assembly-provider.d.ts +1 -2
  143. package/ui/contexts/assembly/assembly-provider.d.ts.map +1 -1
  144. package/ui/contexts/assembly/index.d.ts.map +1 -1
  145. package/ui/contexts/availability/availability-provider.d.ts +1 -2
  146. package/ui/contexts/availability/availability-provider.d.ts.map +1 -1
  147. package/ui/contexts/availability/index.d.ts.map +1 -1
  148. package/ui/contexts/board/board-provider.d.ts +1 -2
  149. package/ui/contexts/board/board-provider.d.ts.map +1 -1
  150. package/ui/contexts/board/index.d.ts.map +1 -1
  151. package/ui/contexts/board-container/board-container-provider.d.ts +1 -2
  152. package/ui/contexts/board-container/board-container-provider.d.ts.map +1 -1
  153. package/ui/contexts/board-container/index.d.ts.map +1 -1
  154. package/ui/contexts/cui-kit/cui-kit.d.ts +1 -2
  155. package/ui/contexts/cui-kit/cui-kit.d.ts.map +1 -1
  156. package/ui/contexts/cui-kit/index.d.ts.map +1 -1
  157. package/ui/contexts/device-assembly/device-assembly-provider.d.ts +1 -2
  158. package/ui/contexts/device-assembly/device-assembly-provider.d.ts.map +1 -1
  159. package/ui/contexts/device-assembly/index.d.ts.map +1 -1
  160. package/ui/contexts/holder/holder-provider.d.ts +1 -2
  161. package/ui/contexts/holder/holder-provider.d.ts.map +1 -1
  162. package/ui/contexts/holder/index.d.ts.map +1 -1
  163. package/ui/contexts/holder-container/holder-container-provider.d.ts +1 -2
  164. package/ui/contexts/holder-container/holder-container-provider.d.ts.map +1 -1
  165. package/ui/contexts/holder-container/index.d.ts.map +1 -1
  166. package/ui/contexts/index.d.ts.map +1 -1
  167. package/ui/contexts/ingredient/index.d.ts.map +1 -1
  168. package/ui/contexts/ingredient/ingredient-provider.d.ts +1 -2
  169. package/ui/contexts/ingredient/ingredient-provider.d.ts.map +1 -1
  170. package/ui/contexts/ingredient-container/index.d.ts.map +1 -1
  171. package/ui/contexts/ingredient-container/ingredient-container-provider.d.ts +1 -2
  172. package/ui/contexts/ingredient-container/ingredient-container-provider.d.ts.map +1 -1
  173. package/ui/contexts/nozzle/index.d.ts.map +1 -1
  174. package/ui/contexts/nozzle/nozzle-provider.d.ts +1 -2
  175. package/ui/contexts/nozzle/nozzle-provider.d.ts.map +1 -1
  176. package/ui/contexts/pump/index.d.ts.map +1 -1
  177. package/ui/contexts/pump/pump-provider.d.ts +1 -2
  178. package/ui/contexts/pump/pump-provider.d.ts.map +1 -1
  179. package/ui/hooks/assembly/index.d.ts.map +1 -1
  180. package/ui/hooks/assembly/use-assembly.d.ts +1 -2
  181. package/ui/hooks/assembly/use-assembly.d.ts.map +1 -1
  182. package/ui/hooks/assembly/with-assembly.d.ts +0 -1
  183. package/ui/hooks/assembly/with-assembly.d.ts.map +1 -1
  184. package/ui/hooks/availability/index.d.ts.map +1 -1
  185. package/ui/hooks/availability/use-availability.d.ts +1 -2
  186. package/ui/hooks/availability/use-availability.d.ts.map +1 -1
  187. package/ui/hooks/availability/with-availability.d.ts +0 -1
  188. package/ui/hooks/availability/with-availability.d.ts.map +1 -1
  189. package/ui/hooks/board/index.d.ts.map +1 -1
  190. package/ui/hooks/board/use-board.d.ts +1 -2
  191. package/ui/hooks/board/use-board.d.ts.map +1 -1
  192. package/ui/hooks/board/with-board.d.ts +0 -1
  193. package/ui/hooks/board/with-board.d.ts.map +1 -1
  194. package/ui/hooks/board-container/index.d.ts.map +1 -1
  195. package/ui/hooks/board-container/use-board-container.d.ts +1 -2
  196. package/ui/hooks/board-container/use-board-container.d.ts.map +1 -1
  197. package/ui/hooks/board-container/with-board-container.d.ts +0 -1
  198. package/ui/hooks/board-container/with-board-container.d.ts.map +1 -1
  199. package/ui/hooks/cui-kit/dispense-topics.d.ts +0 -1
  200. package/ui/hooks/cui-kit/dispense-topics.d.ts.map +1 -1
  201. package/ui/hooks/cui-kit/index.d.ts.map +1 -1
  202. package/ui/hooks/cui-kit/use-ambient-attract-timers.d.ts +0 -1
  203. package/ui/hooks/cui-kit/use-ambient-attract-timers.d.ts.map +1 -1
  204. package/ui/hooks/cui-kit/use-beverages.d.ts +1 -2
  205. package/ui/hooks/cui-kit/use-beverages.d.ts.map +1 -1
  206. package/ui/hooks/cui-kit/use-brands.d.ts +1 -2
  207. package/ui/hooks/cui-kit/use-brands.d.ts.map +1 -1
  208. package/ui/hooks/cui-kit/use-cui-kit.d.ts +3 -4
  209. package/ui/hooks/cui-kit/use-cui-kit.d.ts.map +1 -1
  210. package/ui/hooks/cui-kit/use-default-cui-kit-lifecycle.d.ts +0 -1
  211. package/ui/hooks/cui-kit/use-default-cui-kit-lifecycle.d.ts.map +1 -1
  212. package/ui/hooks/cui-kit/use-dispense-lifecycle.d.ts +0 -1
  213. package/ui/hooks/cui-kit/use-dispense-lifecycle.d.ts.map +1 -1
  214. package/ui/hooks/cui-kit/use-dispense-timers.d.ts +0 -1
  215. package/ui/hooks/cui-kit/use-dispense-timers.d.ts.map +1 -1
  216. package/ui/hooks/cui-kit/use-flavors.d.ts +1 -2
  217. package/ui/hooks/cui-kit/use-flavors.d.ts.map +1 -1
  218. package/ui/hooks/device-assembly/index.d.ts.map +1 -1
  219. package/ui/hooks/device-assembly/use-device-assembly.d.ts +1 -2
  220. package/ui/hooks/device-assembly/use-device-assembly.d.ts.map +1 -1
  221. package/ui/hooks/device-assembly/with-device-assembly.d.ts +0 -1
  222. package/ui/hooks/device-assembly/with-device-assembly.d.ts.map +1 -1
  223. package/ui/hooks/generic-pour/index.d.ts.map +1 -1
  224. package/ui/hooks/generic-pour/use-generic-pour.d.ts +2 -3
  225. package/ui/hooks/generic-pour/use-generic-pour.d.ts.map +1 -1
  226. package/ui/hooks/generic-pour/with-generic-pour.d.ts +0 -1
  227. package/ui/hooks/generic-pour/with-generic-pour.d.ts.map +1 -1
  228. package/ui/hooks/holder/index.d.ts.map +1 -1
  229. package/ui/hooks/holder/use-holder.d.ts +1 -2
  230. package/ui/hooks/holder/use-holder.d.ts.map +1 -1
  231. package/ui/hooks/holder/with-holder.d.ts +0 -1
  232. package/ui/hooks/holder/with-holder.d.ts.map +1 -1
  233. package/ui/hooks/holder-container/index.d.ts.map +1 -1
  234. package/ui/hooks/holder-container/use-holder-container.d.ts +1 -2
  235. package/ui/hooks/holder-container/use-holder-container.d.ts.map +1 -1
  236. package/ui/hooks/holder-container/with-holder-container.d.ts +0 -1
  237. package/ui/hooks/holder-container/with-holder-container.d.ts.map +1 -1
  238. package/ui/hooks/index.d.ts.map +1 -1
  239. package/ui/hooks/ingredient/index.d.ts.map +1 -1
  240. package/ui/hooks/ingredient/use-ingredient-pour.d.ts +2 -3
  241. package/ui/hooks/ingredient/use-ingredient-pour.d.ts.map +1 -1
  242. package/ui/hooks/ingredient/use-ingredient.d.ts +1 -2
  243. package/ui/hooks/ingredient/use-ingredient.d.ts.map +1 -1
  244. package/ui/hooks/ingredient/with-ingredient.d.ts +0 -1
  245. package/ui/hooks/ingredient/with-ingredient.d.ts.map +1 -1
  246. package/ui/hooks/ingredient-container/index.d.ts.map +1 -1
  247. package/ui/hooks/ingredient-container/use-ingredient-container.d.ts +1 -2
  248. package/ui/hooks/ingredient-container/use-ingredient-container.d.ts.map +1 -1
  249. package/ui/hooks/ingredient-container/with-ingredient-container.d.ts +0 -1
  250. package/ui/hooks/ingredient-container/with-ingredient-container.d.ts.map +1 -1
  251. package/ui/hooks/nozzle/index.d.ts.map +1 -1
  252. package/ui/hooks/nozzle/use-dispense-kit.d.ts +0 -1
  253. package/ui/hooks/nozzle/use-dispense-kit.d.ts.map +1 -1
  254. package/ui/hooks/nozzle/use-nozzle.d.ts +1 -2
  255. package/ui/hooks/nozzle/use-nozzle.d.ts.map +1 -1
  256. package/ui/hooks/nozzle/with-nozzle.d.ts +0 -1
  257. package/ui/hooks/nozzle/with-nozzle.d.ts.map +1 -1
  258. package/ui/hooks/nozzle-pour/index.d.ts.map +1 -1
  259. package/ui/hooks/nozzle-pour/use-nozzle-pour.d.ts +3 -4
  260. package/ui/hooks/nozzle-pour/use-nozzle-pour.d.ts.map +1 -1
  261. package/ui/hooks/pour/index.d.ts.map +1 -1
  262. package/ui/hooks/pour/use-pour.d.ts +4 -5
  263. package/ui/hooks/pour/use-pour.d.ts.map +1 -1
  264. package/ui/hooks/pump/index.d.ts.map +1 -1
  265. package/ui/hooks/pump/use-pump.d.ts +1 -2
  266. package/ui/hooks/pump/use-pump.d.ts.map +1 -1
  267. package/ui/hooks/pump/with-pump.d.ts +0 -1
  268. package/ui/hooks/pump/with-pump.d.ts.map +1 -1
  269. package/ui/hooks/utils/pour-strategy/hold-to-pour-intent-strategy.d.ts +1 -2
  270. package/ui/hooks/utils/pour-strategy/hold-to-pour-intent-strategy.d.ts.map +1 -1
  271. package/ui/hooks/utils/pour-strategy/hold-to-pour-strategy.d.ts +0 -1
  272. package/ui/hooks/utils/pour-strategy/hold-to-pour-strategy.d.ts.map +1 -1
  273. package/ui/hooks/utils/pour-strategy/index.d.ts.map +1 -1
  274. package/ui/hooks/utils/pour-strategy/pour-strategy.d.ts +1 -2
  275. package/ui/hooks/utils/pour-strategy/pour-strategy.d.ts.map +1 -1
  276. package/ui/hooks/utils/pour-strategy/tap-or-hold-to-pour-intent-strategy.d.ts +1 -2
  277. package/ui/hooks/utils/pour-strategy/tap-or-hold-to-pour-intent-strategy.d.ts.map +1 -1
  278. package/ui/hooks/utils/pour-strategy/tap-to-pour-intent-strategy.d.ts +1 -2
  279. package/ui/hooks/utils/pour-strategy/tap-to-pour-intent-strategy.d.ts.map +1 -1
  280. package/ui/hooks/utils/pour-strategy/tap-to-pour-strategy.d.ts +0 -1
  281. package/ui/hooks/utils/pour-strategy/tap-to-pour-strategy.d.ts.map +1 -1
  282. package/ui/index.d.ts.map +1 -1
  283. package/ui/utils/pour-context.d.ts.map +1 -1
  284. package/ui.cjs +1 -5
  285. package/ui.cjs.map +1 -1
  286. package/ui.d.ts +1 -0
  287. package/ui.js +64 -68
  288. package/ui.js.map +1 -1
  289. package/dispense-registration-manager-C7GGaZ47.js.map +0 -1
  290. package/dispense-registration-manager-lQhkTFKW.cjs.map +0 -1
  291. package/extension-utils-50g2ril2.cjs.map +0 -1
  292. package/extension-utils-Dt00FOJq.js.map +0 -1
  293. package/kos-models.json +0 -180
  294. package/pump-provider-CBFev3qg.cjs.map +0 -1
  295. package/pump-provider-DyxEmFRT.js.map +0 -1
@@ -1,10 +1,4 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
- var __publicField = (obj, key, value) => {
5
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
6
- return value;
7
- };
8
2
  const kosUiSdk = require("@kosdev-code/kos-ui-sdk");
9
3
  require("react");
10
4
  var ExtensionType = /* @__PURE__ */ ((ExtensionType2) => {
@@ -47,6 +41,11 @@ var __decorateClass$c = (decorators, target, key, kind) => {
47
41
  };
48
42
  const MODEL_TYPE$c = "ingredient-model";
49
43
  let IngredientModelImpl = class {
44
+ id;
45
+ ingredientId;
46
+ name;
47
+ type;
48
+ data;
50
49
  constructor(modelId, {
51
50
  name,
52
51
  type,
@@ -54,11 +53,6 @@ let IngredientModelImpl = class {
54
53
  ingredientId,
55
54
  ...rest
56
55
  }) {
57
- __publicField(this, "id");
58
- __publicField(this, "ingredientId");
59
- __publicField(this, "name");
60
- __publicField(this, "type");
61
- __publicField(this, "data");
62
56
  this.id = modelId;
63
57
  this.ingredientId = ingredientId;
64
58
  this.name = name;
@@ -113,16 +107,15 @@ var __decorateClass$b = (decorators, target, key, kind) => {
113
107
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
114
108
  if (decorator = decorators[i])
115
109
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
116
- if (kind && result)
117
- __defProp$9(target, key, result);
110
+ if (kind && result) __defProp$9(target, key, result);
118
111
  return result;
119
112
  };
120
113
  const MODEL_TYPE$b = "ingredient-container-model";
121
114
  const log$3 = kosUiSdk.KosLog.createLogger({ name: "ingredient-container-model" });
122
115
  let IngredientContainerModelImpl = class {
116
+ id;
117
+ ingredients;
123
118
  constructor(modelId, options) {
124
- __publicField(this, "id");
125
- __publicField(this, "ingredients");
126
119
  this.id = modelId;
127
120
  this.ingredients = new kosUiSdk.KosModelContainer({
128
121
  indexMap: {
@@ -139,19 +132,18 @@ let IngredientContainerModelImpl = class {
139
132
  return this.ingredients.getIndexByKey("ingredientType", type);
140
133
  }
141
134
  async load(context) {
142
- var _a;
143
135
  log$3.debug(`loading ingredient container ${this.id}`);
144
136
  const allIngredients = await getIngredients();
145
- if ((allIngredients == null ? void 0 : allIngredients.status) !== 200) {
137
+ if (allIngredients?.status !== 200) {
146
138
  throw new Error("Failed to load ingredients");
147
139
  }
148
140
  const ingredientContext = await kosUiSdk.KosExtensionUtils.executeLoaderExtension({
149
141
  context,
150
142
  extension: ExtensionType.IngredientLoader
151
143
  });
152
- const ingredientData = (allIngredients == null ? void 0 : allIngredients.data) ?? {};
144
+ const ingredientData = allIngredients?.data ?? {};
153
145
  for (const key of Object.keys(ingredientData)) {
154
- for (const ingredientData2 of ((_a = allIngredients == null ? void 0 : allIngredients.data) == null ? void 0 : _a[key]) || []) {
146
+ for (const ingredientData2 of allIngredients?.data?.[key] || []) {
155
147
  const data = await kosUiSdk.KosExtensionUtils.executeDataMapperExtension({
156
148
  extension: ExtensionType.IngredientMapper,
157
149
  data: ingredientData2,
@@ -227,8 +219,7 @@ const unassignHolderIngredient = async (holderPath) => {
227
219
  return response;
228
220
  };
229
221
  const replaceLine = async (holderPath) => {
230
- if (!holderPath)
231
- throw new Error("Missing holderPath");
222
+ if (!holderPath) throw new Error("Missing holderPath");
232
223
  log$2.debug(
233
224
  `sending POST request to /api/ext/dispense/pumpEvents/replaceLine/${holderPath}`
234
225
  );
@@ -249,7 +240,6 @@ const getAssignments = async () => {
249
240
  return response;
250
241
  };
251
242
  const sendRfidOverride = async (holderPath, overrides) => {
252
- var _a, _b, _c, _d;
253
243
  const factoryJson = JSON.stringify(overrides);
254
244
  const url = `${URL$4}/api/ext/dispense/assignments`;
255
245
  try {
@@ -257,15 +247,15 @@ const sendRfidOverride = async (holderPath, overrides) => {
257
247
  model: { holderPath, factoryJson },
258
248
  urlOverride: url
259
249
  });
260
- if ((response == null ? void 0 : response.status) === 200 && ((_a = response == null ? void 0 : response.data) == null ? void 0 : _a.error)) {
250
+ if (response?.status === 200 && response?.data?.error) {
261
251
  return [response.data.error || "unknownError", response.data];
262
252
  }
263
- return [void 0, response == null ? void 0 : response.data];
253
+ return [void 0, response?.data];
264
254
  } catch (error) {
265
255
  if (error instanceof kosUiSdk.FetchError) {
266
256
  return [
267
- ((_c = (_b = error.payload) == null ? void 0 : _b.data) == null ? void 0 : _c.error) || "unknownError",
268
- (_d = error.payload) == null ? void 0 : _d.data
257
+ error.payload?.data?.error || "unknownError",
258
+ error.payload?.data
269
259
  ];
270
260
  }
271
261
  }
@@ -291,8 +281,7 @@ var __decorateClass$a = (decorators, target, key, kind) => {
291
281
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
292
282
  if (decorator = decorators[i])
293
283
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
294
- if (kind && result)
295
- __defProp$8(target, key, result);
284
+ if (kind && result) __defProp$8(target, key, result);
296
285
  return result;
297
286
  };
298
287
  const MODEL_TYPE$a = DispenseModelType.Holder;
@@ -316,7 +305,7 @@ kosUiSdk.ExtensionManager[kosUiSdk.EXTENSION_TROUBLE_DATA_MAPPER].register(
316
305
  const ingredientModel = pumpModel.ingredientId ? kosUiSdk.getKosModelSync(pumpModel.ingredientId).model : void 0;
317
306
  return {
318
307
  ingredientId: pumpModel.ingredientId,
319
- ingredientName: (ingredientModel == null ? void 0 : ingredientModel.displayName) ?? ((ingredientModel == null ? void 0 : ingredientModel.name) || ""),
308
+ ingredientName: ingredientModel?.displayName ?? (ingredientModel?.name || ""),
320
309
  childPumpName: pumpModel.name
321
310
  };
322
311
  }
@@ -343,7 +332,7 @@ kosUiSdk.ExtensionManager[kosUiSdk.EXTENSION_TROUBLE_DATA_MAPPER].register(
343
332
  const ingredientId = trouble.data.ingredients[0];
344
333
  const { model } = kosUiSdk.getKosModelSync(ingredientId);
345
334
  return {
346
- ingredientName: (model == null ? void 0 : model.displayName) ?? ((model == null ? void 0 : model.name) || ""),
335
+ ingredientName: model?.displayName ?? (model?.name || ""),
347
336
  ingredients: trouble.data.ingredients ? trouble.data.ingredients : [],
348
337
  unknonwnIngredientId: trouble.data.unknonwnIngredientId ?? ""
349
338
  };
@@ -352,14 +341,27 @@ kosUiSdk.ExtensionManager[kosUiSdk.EXTENSION_TROUBLE_DATA_MAPPER].register(
352
341
  }
353
342
  );
354
343
  class AssignmentError extends Error {
344
+ type;
355
345
  constructor(type, message) {
356
346
  super(message);
357
- __publicField(this, "type");
358
347
  this.name = "AssignmentError";
359
348
  this.type = type;
360
349
  }
361
350
  }
362
351
  let HolderModelImpl = class {
352
+ id;
353
+ path;
354
+ name;
355
+ ingredientId;
356
+ ingredientType;
357
+ ingredientSource;
358
+ group;
359
+ slice;
360
+ logger;
361
+ data;
362
+ enjoyByDate;
363
+ pumps;
364
+ ingredientContainer;
363
365
  constructor(modelId, {
364
366
  path,
365
367
  name,
@@ -371,19 +373,6 @@ let HolderModelImpl = class {
371
373
  data,
372
374
  enjoyByDate
373
375
  }, context) {
374
- __publicField(this, "id");
375
- __publicField(this, "path");
376
- __publicField(this, "name");
377
- __publicField(this, "ingredientId");
378
- __publicField(this, "ingredientType");
379
- __publicField(this, "ingredientSource");
380
- __publicField(this, "group");
381
- __publicField(this, "slice");
382
- __publicField(this, "logger");
383
- __publicField(this, "data");
384
- __publicField(this, "enjoyByDate");
385
- __publicField(this, "pumps");
386
- __publicField(this, "ingredientContainer");
387
376
  this.id = modelId;
388
377
  this.path = path;
389
378
  this.name = name;
@@ -425,8 +414,7 @@ let HolderModelImpl = class {
425
414
  return !!this.enjoyByDate && !this.unassigned;
426
415
  }
427
416
  get hasEnjoyByWarning() {
428
- var _a;
429
- return ((_a = this.troublesByType["EnjoyByTrouble"]) == null ? void 0 : _a.length) > 0;
417
+ return this.troublesByType["EnjoyByTrouble"]?.length > 0;
430
418
  }
431
419
  get nozzlePaths() {
432
420
  return this.pumps.data.map((pump) => pump.nozzlePath);
@@ -448,7 +436,7 @@ let HolderModelImpl = class {
448
436
  const intent = typeof props === "string" ? props : props.intent;
449
437
  const pumpPath = typeof props === "string" ? void 0 : props.pumpPath;
450
438
  const pump = pumpPath ? this.pumps.getModel(pumpPath) : this.pumps.data[0];
451
- return pump == null ? void 0 : pump.performIntent({ intent });
439
+ return pump?.performIntent({ intent });
452
440
  }
453
441
  get pourState() {
454
442
  const state = this.pumps.data.reduce((resolvedState, pump) => {
@@ -460,8 +448,7 @@ let HolderModelImpl = class {
460
448
  return state;
461
449
  }
462
450
  get nozzlePath() {
463
- var _a;
464
- return (_a = this.pumps.data[0]) == null ? void 0 : _a.nozzlePath;
451
+ return this.pumps.data[0]?.nozzlePath;
465
452
  }
466
453
  get pumpPaths() {
467
454
  return this.pumps.data.map((pump) => pump.id);
@@ -478,11 +465,10 @@ let HolderModelImpl = class {
478
465
  });
479
466
  }
480
467
  get ingredient() {
481
- var _a;
482
468
  if (!this.ingredientId) {
483
469
  return void 0;
484
470
  }
485
- const ingredient = (_a = this.ingredientContainer) == null ? void 0 : _a.ingredients.getModel(
471
+ const ingredient = this.ingredientContainer?.ingredients.getModel(
486
472
  this.ingredientId
487
473
  );
488
474
  return ingredient;
@@ -497,11 +483,10 @@ let HolderModelImpl = class {
497
483
  }
498
484
  }
499
485
  get previousIngredient() {
500
- var _a;
501
486
  if (!this.prevIngredientId) {
502
487
  return void 0;
503
488
  }
504
- const ingredient = (_a = this.ingredientContainer) == null ? void 0 : _a.ingredients.getModel(
489
+ const ingredient = this.ingredientContainer?.ingredients.getModel(
505
490
  this.prevIngredientId
506
491
  );
507
492
  return ingredient;
@@ -516,8 +501,7 @@ let HolderModelImpl = class {
516
501
  }
517
502
  }
518
503
  get prevIngredientId() {
519
- var _a, _b;
520
- return (_b = (_a = this.pumps.data) == null ? void 0 : _a[0]) == null ? void 0 : _b.prevIngredientId;
504
+ return this.pumps.data?.[0]?.prevIngredientId;
521
505
  }
522
506
  get unassigned() {
523
507
  return (!this.ingredientId || this.ingredientId === "0") && (!this.prevIngredientId || this.prevIngredientId === "0");
@@ -571,7 +555,7 @@ let HolderModelImpl = class {
571
555
  );
572
556
  }
573
557
  kosUiSdk.kosAction(() => {
574
- this.ingredientId = result == null ? void 0 : result.ingredientId;
558
+ this.ingredientId = result?.ingredientId;
575
559
  });
576
560
  return result;
577
561
  } catch (e) {
@@ -646,7 +630,6 @@ const Holder = {
646
630
  factory: kosUiSdk.Kos.Factory.create(MODEL_TYPE$a)
647
631
  };
648
632
  const mapAssemblyHolderToModel = async (group, holderData) => {
649
- var _a;
650
633
  const _ingredientId = kosUiSdk.ExtensionManager.propertyMapper.executeMapper(
651
634
  ExtensionType.HolderIngredientMapper,
652
635
  holderData
@@ -669,7 +652,7 @@ const mapAssemblyHolderToModel = async (group, holderData) => {
669
652
  ingredientId: _ingredientId || ingredientId,
670
653
  ingredientType: type || ingType,
671
654
  ingredientSource: ingSource,
672
- enjoyByDate: ((_a = holderData.container) == null ? void 0 : _a.enjoyByDate) ? new Date(holderData.container.enjoyByDate) : void 0,
655
+ enjoyByDate: holderData.container?.enjoyByDate ? new Date(holderData.container.enjoyByDate) : void 0,
673
656
  slice: sliceData,
674
657
  group,
675
658
  data: extData
@@ -697,18 +680,17 @@ var __decorateClass$9 = (decorators, target, key, kind) => {
697
680
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
698
681
  if (decorator = decorators[i])
699
682
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
700
- if (kind && result)
701
- __defProp$7(target, key, result);
683
+ if (kind && result) __defProp$7(target, key, result);
702
684
  return result;
703
685
  };
704
686
  const MODEL_TYPE$9 = "board-container-model";
705
687
  const TOPIC_BOARD_LINKED = "/kos/hardware/board/linked";
706
688
  const TOPIC_BOARD_UNLINKED = "/kos/hardware/board/unlinked";
707
689
  exports.BoardContainerModel = class BoardContainerModel {
690
+ id;
691
+ logger;
692
+ models;
708
693
  constructor(modelId, options, context) {
709
- __publicField(this, "id");
710
- __publicField(this, "logger");
711
- __publicField(this, "models");
712
694
  this.id = modelId;
713
695
  this.logger = context.logger;
714
696
  this.models = new kosUiSdk.KosModelContainer({
@@ -779,7 +761,7 @@ const boardTroubleDataMapper = async (trouble) => {
779
761
  const boardPath = trouble.data.boardPath;
780
762
  const { model } = kosUiSdk.getKosModelSync(boardPath);
781
763
  return {
782
- boardName: (model == null ? void 0 : model.name) || ""
764
+ boardName: model?.name || ""
783
765
  };
784
766
  };
785
767
  var __defProp$6 = Object.defineProperty;
@@ -789,8 +771,7 @@ var __decorateClass$8 = (decorators, target, key, kind) => {
789
771
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
790
772
  if (decorator = decorators[i])
791
773
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
792
- if (kind && result)
793
- __defProp$6(target, key, result);
774
+ if (kind && result) __defProp$6(target, key, result);
794
775
  return result;
795
776
  };
796
777
  const MODEL_TYPE$8 = DispenseModelType.PumpContainer;
@@ -801,9 +782,9 @@ var PumpIndex = /* @__PURE__ */ ((PumpIndex2) => {
801
782
  return PumpIndex2;
802
783
  })(PumpIndex || {});
803
784
  let PumpContainerModelImpl = class {
785
+ id;
786
+ pumps;
804
787
  constructor(modelId, options) {
805
- __publicField(this, "id");
806
- __publicField(this, "pumps");
807
788
  this.id = modelId;
808
789
  this.pumps = new kosUiSdk.KosModelContainer({
809
790
  indexMap: {
@@ -892,7 +873,7 @@ const boardTroubleResolver = async (trouble) => {
892
873
  const pumpContainer = await kosUiSdk.getKosModel(
893
874
  PumpContainer.type
894
875
  );
895
- if (pumpContainer == null ? void 0 : pumpContainer.model) {
876
+ if (pumpContainer?.model) {
896
877
  const boardPumps = pumpContainer.model.models.getIndexByKey(
897
878
  PumpIndex.byBoard,
898
879
  boardPath
@@ -937,14 +918,14 @@ kosUiSdk.ExtensionManager[kosUiSdk.EXTENSION_TROUBLE_DATA_MAPPER].register(
937
918
  boardTroubleDataMapper
938
919
  );
939
920
  let BoardModelImpl = class {
921
+ id;
922
+ type;
923
+ name;
924
+ path;
925
+ linked;
926
+ instanceId;
927
+ logger;
940
928
  constructor(modelId, options, context) {
941
- __publicField(this, "id");
942
- __publicField(this, "type");
943
- __publicField(this, "name");
944
- __publicField(this, "path");
945
- __publicField(this, "linked");
946
- __publicField(this, "instanceId");
947
- __publicField(this, "logger");
948
929
  this.id = modelId;
949
930
  this.logger = context.logger;
950
931
  mapOptionsToModel(options, this);
@@ -995,8 +976,7 @@ var __decorateClass$6 = (decorators, target, key, kind) => {
995
976
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
996
977
  if (decorator = decorators[i])
997
978
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
998
- if (kind && result)
999
- __defProp$5(target, key, result);
979
+ if (kind && result) __defProp$5(target, key, result);
1000
980
  return result;
1001
981
  };
1002
982
  const MODEL_TYPE$6 = DispenseModelType.HolderContainer;
@@ -1007,10 +987,10 @@ const TOPIC_REMOVE = "/kos/insertion/remove";
1007
987
  const TOPIC_REPLACE_LINE = "/kos/pumpEvent/replaceLine";
1008
988
  const TOPIC_HOLDER_CHANGED = "/kos/handle/*";
1009
989
  let HolderContainerModelImpl = class {
990
+ id;
991
+ holders;
992
+ logger;
1010
993
  constructor(modelId, _options, context) {
1011
- __publicField(this, "id");
1012
- __publicField(this, "holders");
1013
- __publicField(this, "logger");
1014
994
  this.id = modelId;
1015
995
  this.holders = new kosUiSdk.KosModelContainer({
1016
996
  indexMap: {
@@ -1025,7 +1005,6 @@ let HolderContainerModelImpl = class {
1025
1005
  updateModel() {
1026
1006
  }
1027
1007
  handleHolderEvents(event) {
1028
- var _a, _b, _c;
1029
1008
  kosUiSdk.KosLog.ifDebug(
1030
1009
  () => this.logger.debug("Received holder change event", JSON.stringify(event))
1031
1010
  );
@@ -1034,9 +1013,9 @@ let HolderContainerModelImpl = class {
1034
1013
  this.logger.info(
1035
1014
  `Received change event for holder ${holder.path}. Updating fuel gauge data.`
1036
1015
  );
1037
- holder.slice.currentVolMl = (_a = event.slice) == null ? void 0 : _a.currentVolMl;
1038
- holder.slice.maxVolMl = (_b = event.slice) == null ? void 0 : _b.maxVolMl;
1039
- if ((_c = event == null ? void 0 : event.container) == null ? void 0 : _c.enjoyByDate) {
1016
+ holder.slice.currentVolMl = event.slice?.currentVolMl;
1017
+ holder.slice.maxVolMl = event.slice?.maxVolMl;
1018
+ if (event?.container?.enjoyByDate) {
1040
1019
  holder.enjoyByDate = new Date(event.container.enjoyByDate);
1041
1020
  } else {
1042
1021
  holder.enjoyByDate = void 0;
@@ -1050,7 +1029,6 @@ let HolderContainerModelImpl = class {
1050
1029
  const wrappedData = Array.isArray(data) ? data : [data];
1051
1030
  wrappedData.forEach((event) => {
1052
1031
  kosUiSdk.kosAction(() => {
1053
- var _a, _b, _c;
1054
1032
  const ingredientId = event.ingredientId;
1055
1033
  const holder = this.holders.getModel(event.path);
1056
1034
  if (holder) {
@@ -1058,9 +1036,9 @@ let HolderContainerModelImpl = class {
1058
1036
  `Received insertion event for holder ${holder.path}`
1059
1037
  );
1060
1038
  holder.updateIngredient(ingredientId);
1061
- holder.slice.currentVolMl = (_a = event.slice) == null ? void 0 : _a.currentVolMl;
1062
- holder.slice.maxVolMl = (_b = event.slice) == null ? void 0 : _b.maxVolMl;
1063
- if ((_c = event == null ? void 0 : event.container) == null ? void 0 : _c.enjoyByDate) {
1039
+ holder.slice.currentVolMl = event.slice?.currentVolMl;
1040
+ holder.slice.maxVolMl = event.slice?.maxVolMl;
1041
+ if (event?.container?.enjoyByDate) {
1064
1042
  holder.enjoyByDate = new Date(event.container.enjoyByDate);
1065
1043
  } else {
1066
1044
  holder.enjoyByDate = void 0;
@@ -1167,7 +1145,7 @@ const sendIntent = async ({
1167
1145
  }) => {
1168
1146
  const url = `${URL$2}/api/ext/dispense/nozzle/nozzle/pipeline/ingredient/pour/${pumpId}/${intent}`;
1169
1147
  const response = await postModel$2({ model: {}, urlOverride: url, tracker });
1170
- if (response == null ? void 0 : response.data) {
1148
+ if (response?.data) {
1171
1149
  kosUiSdk.FutureManager.initiateFuture(response.data);
1172
1150
  }
1173
1151
  return response;
@@ -1175,7 +1153,7 @@ const sendIntent = async ({
1175
1153
  const getIntentVolume = async (pumpId, intent) => {
1176
1154
  const url = `${URL$2}/api/ext/dispense/nozzle/nozzle/pipeline/ingredient/intent/${pumpId}/${intent}/volume`;
1177
1155
  const response = await getOne$1({ urlOverride: url });
1178
- if (!(response == null ? void 0 : response.data)) {
1156
+ if (!response?.data) {
1179
1157
  return { volume: -1 };
1180
1158
  }
1181
1159
  return response.data;
@@ -1187,8 +1165,7 @@ var __decorateClass$5 = (decorators, target, key, kind) => {
1187
1165
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
1188
1166
  if (decorator = decorators[i])
1189
1167
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1190
- if (kind && result)
1191
- __defProp$4(target, key, result);
1168
+ if (kind && result) __defProp$4(target, key, result);
1192
1169
  return result;
1193
1170
  };
1194
1171
  const MODEL_TYPE$5 = DispenseModelType.Pump;
@@ -1197,25 +1174,25 @@ kosUiSdk.ExtensionManager[kosUiSdk.EXTENSION_TROUBLE_MAPPER].register(
1197
1174
  pumpTroubleResolver
1198
1175
  );
1199
1176
  let PumpModelImpl = class {
1177
+ id;
1178
+ inserted;
1179
+ type;
1180
+ virtual;
1181
+ ingredientId;
1182
+ holderPath;
1183
+ boardPath;
1184
+ nozzlePath;
1185
+ childPump;
1186
+ name;
1187
+ path;
1188
+ prevIngredientId;
1189
+ /**
1190
+ * @kosApiLevel 12
1191
+ */
1192
+ state;
1193
+ futureHandler;
1194
+ currentState = PourState.IDLE;
1200
1195
  constructor(modelId, options) {
1201
- __publicField(this, "id");
1202
- __publicField(this, "inserted");
1203
- __publicField(this, "type");
1204
- __publicField(this, "virtual");
1205
- __publicField(this, "ingredientId");
1206
- __publicField(this, "holderPath");
1207
- __publicField(this, "boardPath");
1208
- __publicField(this, "nozzlePath");
1209
- __publicField(this, "childPump");
1210
- __publicField(this, "name");
1211
- __publicField(this, "path");
1212
- __publicField(this, "prevIngredientId");
1213
- /**
1214
- * @kosApiLevel 12
1215
- */
1216
- __publicField(this, "state");
1217
- __publicField(this, "futureHandler");
1218
- __publicField(this, "currentState", PourState.IDLE);
1219
1196
  this.id = modelId;
1220
1197
  const {
1221
1198
  inserted,
@@ -1270,12 +1247,10 @@ let PumpModelImpl = class {
1270
1247
  }
1271
1248
  // -------------------LIFECYCLE----------------------------
1272
1249
  get pouringState() {
1273
- var _a;
1274
- return ((_a = this.future) == null ? void 0 : _a.endState) || "";
1250
+ return this.future?.endState || "";
1275
1251
  }
1276
1252
  get isPouring() {
1277
- var _a;
1278
- return !!(this.future && !((_a = this.future) == null ? void 0 : _a.endState)) || this.currentState === PourState.POUR_STARTING || this.currentState === PourState.POURING;
1253
+ return !!(this.future && !this.future?.endState) || this.currentState === PourState.POUR_STARTING || this.currentState === PourState.POURING;
1279
1254
  }
1280
1255
  get canPour() {
1281
1256
  return !!this.ingredientId && !this.isPouring;
@@ -1288,10 +1263,9 @@ let PumpModelImpl = class {
1288
1263
  }
1289
1264
  }
1290
1265
  async cancelPour() {
1291
- var _a;
1292
1266
  if (this.currentState === PourState.POURING || this.currentState === PourState.POUR_STARTING) {
1293
1267
  this.currentState = PourState.POUR_CANCELING;
1294
- await ((_a = this.future) == null ? void 0 : _a.cancelFuture());
1268
+ await this.future?.cancelFuture();
1295
1269
  kosUiSdk.kosAction(() => {
1296
1270
  this.currentState = PourState.IDLE;
1297
1271
  });
@@ -1326,7 +1300,7 @@ let PumpModelImpl = class {
1326
1300
  this.currentState = PourState.POURING;
1327
1301
  });
1328
1302
  }
1329
- return result == null ? void 0 : result.data;
1303
+ return result?.data;
1330
1304
  } else {
1331
1305
  throw new Error(`Cannot pour in state ${this.currentState}`);
1332
1306
  }
@@ -1377,18 +1351,17 @@ const mapAssemblyPumpToModel = (nozzlePath, pump) => {
1377
1351
  return pumpModel;
1378
1352
  };
1379
1353
  const assemblyPumpMap = (pumpContainer) => (holderContainer) => (nozzle) => (assemblyPump) => {
1380
- var _a;
1381
1354
  try {
1382
1355
  Logger.debug(`adding pump ${assemblyPump.name}`);
1383
1356
  const pump = mapAssemblyPumpToModel(nozzle.path, assemblyPump);
1384
1357
  pumpContainer.addModel(pump);
1385
1358
  const holderPath = pump.holderPath;
1386
1359
  const holder = holderContainer.holders.getModel(holderPath);
1387
- holder == null ? void 0 : holder.pumps.addModel(pump);
1388
- if (!(holder == null ? void 0 : holder.nozzlePaths.includes(nozzle.path))) {
1389
- holder == null ? void 0 : holder.nozzlePaths.push(nozzle.path);
1360
+ holder?.pumps.addModel(pump);
1361
+ if (!holder?.nozzlePaths.includes(nozzle.path)) {
1362
+ holder?.nozzlePaths.push(nozzle.path);
1390
1363
  }
1391
- (_a = assemblyPump == null ? void 0 : assemblyPump.pumps) == null ? void 0 : _a.forEach((subPump) => {
1364
+ assemblyPump?.pumps?.forEach((subPump) => {
1392
1365
  const subHolderPath = pump.holderPath;
1393
1366
  const subPumpData = {
1394
1367
  ...subPump,
@@ -1410,22 +1383,21 @@ var __decorateClass$4 = (decorators, target, key, kind) => {
1410
1383
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
1411
1384
  if (decorator = decorators[i])
1412
1385
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1413
- if (kind && result)
1414
- __defProp$3(target, key, result);
1386
+ if (kind && result) __defProp$3(target, key, result);
1415
1387
  return result;
1416
1388
  };
1417
1389
  const MODEL_TYPE$4 = "assembly-model";
1418
1390
  const CONTEXT_ASSEMBLY_DATA = "assembly-data";
1419
1391
  const CONTEXT_ASSEMBLY_RAW_DATA = "assembly-raw-data";
1420
1392
  let AssemblyModelImpl = class {
1393
+ id;
1394
+ _nozzlePaths = /* @__PURE__ */ new Set();
1395
+ troubleContainer;
1396
+ holderContainer;
1397
+ boardContainer;
1398
+ pumpContainer;
1399
+ logger;
1421
1400
  constructor(modelId, _options, context) {
1422
- __publicField(this, "id");
1423
- __publicField(this, "_nozzlePaths", /* @__PURE__ */ new Set());
1424
- __publicField(this, "troubleContainer");
1425
- __publicField(this, "holderContainer");
1426
- __publicField(this, "boardContainer");
1427
- __publicField(this, "pumpContainer");
1428
- __publicField(this, "logger");
1429
1401
  this.id = modelId;
1430
1402
  this.holderContainer = HolderContainer.factory({});
1431
1403
  this.boardContainer = BoardContainer.factory({});
@@ -1472,8 +1444,7 @@ let AssemblyModelImpl = class {
1472
1444
  this.logger.debug(`initializing assembly ${this.id}`);
1473
1445
  }
1474
1446
  async ready() {
1475
- var _a;
1476
- (_a = this.troubleContainer) == null ? void 0 : _a.troubles.increment();
1447
+ this.troubleContainer?.troubles.increment();
1477
1448
  kosUiSdk.ExtensionManager[kosUiSdk.EXTENSION_FEATURE_FLAG_RESOLVER].execute(
1478
1449
  ExtensionType.AssemblyFeatureFlags,
1479
1450
  this
@@ -1482,7 +1453,7 @@ let AssemblyModelImpl = class {
1482
1453
  async load(context) {
1483
1454
  this.logger.debug(`loading assembly ${this.id}`);
1484
1455
  const result = await getAssembly();
1485
- if ((result == null ? void 0 : result.status) === 200) {
1456
+ if (result?.status === 200) {
1486
1457
  const data = await kosUiSdk.KosExtensionUtils.executeDataMapperExtension({
1487
1458
  extension: ExtensionType.AssemblyMapper,
1488
1459
  data: result.data,
@@ -1510,11 +1481,10 @@ let AssemblyModelImpl = class {
1510
1481
  this.logger.debug(`adding assembly ${name}`);
1511
1482
  this.logger.warn(`Assembly rest keys: ${Object.keys(rest).join(", ")}`);
1512
1483
  Object.keys(rest).forEach((key) => {
1513
- var _a;
1514
1484
  this.logger.warn(`Enabling feature flag: ${key}`);
1515
1485
  kosUiSdk.KosFeatureFlags.enableFeature(key);
1516
1486
  context.set(`assembly-feature-${key}`, rest[key]);
1517
- if (((_a = rest[key]["state"]) == null ? void 0 : _a["path"]) !== void 0) {
1487
+ if (rest[key]["state"]?.["path"] !== void 0) {
1518
1488
  const statePath = rest[key]["state"]["path"];
1519
1489
  this.logger.warn(`Feature flag ${key} state path: ${statePath}`);
1520
1490
  context.set(`assembly-state-path-${key}`, statePath);
@@ -1584,20 +1554,20 @@ var __decorateClass$3 = (decorators, target, key, kind) => {
1584
1554
  };
1585
1555
  const MODEL_TYPE$3 = DispenseModelType.Availability;
1586
1556
  let AvailabilityModelImpl = class {
1557
+ id;
1558
+ data;
1559
+ properties;
1560
+ available;
1561
+ visible;
1562
+ groupId;
1563
+ rawId;
1564
+ altId;
1565
+ type;
1566
+ note;
1567
+ taggedIds;
1568
+ parentId;
1569
+ logger;
1587
1570
  constructor(modelId, options, context) {
1588
- __publicField(this, "id");
1589
- __publicField(this, "data");
1590
- __publicField(this, "properties");
1591
- __publicField(this, "available");
1592
- __publicField(this, "visible");
1593
- __publicField(this, "groupId");
1594
- __publicField(this, "rawId");
1595
- __publicField(this, "altId");
1596
- __publicField(this, "type");
1597
- __publicField(this, "note");
1598
- __publicField(this, "taggedIds");
1599
- __publicField(this, "parentId");
1600
- __publicField(this, "logger");
1601
1571
  this.id = modelId;
1602
1572
  this.taggedIds = options.taggedIds || [];
1603
1573
  this.logger = context.logger;
@@ -1652,11 +1622,11 @@ const { postModel: postModel$1, deleteModel, getOne } = kosUiSdk.ServiceFactory.
1652
1622
  const pourPourable = async (nozzleId, tracker) => {
1653
1623
  const response = await postModel$1({
1654
1624
  model: {},
1655
- urlOverride: `${URL$1}/api/ext/dispense/nozzle/${nozzleId}/pipeline/beverage/pour`,
1625
+ urlOverride: `${URL$1}/api/ext/dispense/nozzle/${nozzleId}/pipeline/beverage/pour/selected/maxVolume`,
1656
1626
  ordered: true,
1657
1627
  tracker
1658
1628
  });
1659
- if (response == null ? void 0 : response.data) {
1629
+ if (response?.data) {
1660
1630
  kosUiSdk.FutureManager.initiateFuture(response.data);
1661
1631
  }
1662
1632
  return response;
@@ -1668,7 +1638,7 @@ const pourNamedPourable = async (name, nozzleId, tracker) => {
1668
1638
  ordered: true,
1669
1639
  tracker
1670
1640
  });
1671
- if (response == null ? void 0 : response.data) {
1641
+ if (response?.data) {
1672
1642
  kosUiSdk.FutureManager.initiateFuture(response.data);
1673
1643
  }
1674
1644
  return response;
@@ -1700,8 +1670,7 @@ var __decorateClass$2 = (decorators, target, key, kind) => {
1700
1670
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
1701
1671
  if (decorator = decorators[i])
1702
1672
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1703
- if (kind && result)
1704
- __defProp$2(target, key, result);
1673
+ if (kind && result) __defProp$2(target, key, result);
1705
1674
  return result;
1706
1675
  };
1707
1676
  const MODEL_TYPE$2 = DispenseModelType.Nozzle;
@@ -1713,37 +1682,18 @@ const TOPIC_NOZZLE_POUR_STARTED = "/kos/nozzle/pour/started";
1713
1682
  const TOPIC_NOZZLE_POUR_PROGRESS = "/kos/nozzle/pour/progress";
1714
1683
  const TOPIC_NOZZLE_POUR_CANCEL = "/kos/nozzle/pour/cancel";
1715
1684
  let NozzleModelImpl = class {
1716
- constructor(modelId, options) {
1717
- /** the unique identifier for this nozzle.*/
1718
- __publicField(this, "id");
1719
- __publicField(this, "path");
1720
- __publicField(this, "name");
1721
- __publicField(this, "_selectedBeverage");
1722
- __publicField(this, "_selectedBrand");
1723
- __publicField(this, "_additionalItems");
1724
- __publicField(this, "_availabilityItems");
1725
- __publicField(this, "futureHandler");
1726
- __publicField(this, "beverageTopicPrefix");
1727
- __publicField(this, "topicPrefix");
1728
- __publicField(this, "urlPrefix");
1729
- this.id = modelId;
1730
- this.path = options.path;
1731
- this.name = options.name;
1732
- this.beverageTopicPrefix = options.beverageTopicPrefix;
1733
- this.topicPrefix = options.topicPrefix;
1734
- this.urlPrefix = options.urlPrefix;
1735
- this._selectedBeverage = void 0;
1736
- this._selectedBrand = void 0;
1737
- this._additionalItems = [];
1738
- this.futureHandler = new kosUiSdk.MultipleFutureHandler(this);
1739
- this._availabilityItems = new kosUiSdk.KosModelContainer({
1740
- indexMap: {
1741
- byGroup: "groupId",
1742
- byParent: "parentId"
1743
- },
1744
- parentId: modelId
1745
- });
1746
- }
1685
+ /** the unique identifier for this nozzle.*/
1686
+ id;
1687
+ path;
1688
+ name;
1689
+ _selectedBeverage;
1690
+ _selectedBrand;
1691
+ _additionalItems;
1692
+ _availabilityItems;
1693
+ futureHandler;
1694
+ beverageTopicPrefix;
1695
+ topicPrefix;
1696
+ urlPrefix;
1747
1697
  /**
1748
1698
  * The availability nodes that can be dispensed from this nozzle.
1749
1699
  * This is a subset of the availability for the entire dispenser
@@ -1770,8 +1720,7 @@ let NozzleModelImpl = class {
1770
1720
  * @readonly
1771
1721
  */
1772
1722
  get isPouring() {
1773
- var _a;
1774
- return !!(this.futureHandler.getFuture() && !((_a = this.futureHandler.getFuture()) == null ? void 0 : _a.endState)) || this.currentState === PourState.POUR_STARTING || this.currentState === PourState.POURING || this.currentState === PourState.POUR_CANCELING;
1723
+ return !!(this.futureHandler.getFuture() && !this.futureHandler.getFuture()?.endState) || this.currentState === PourState.POUR_STARTING || this.currentState === PourState.POURING || this.currentState === PourState.POUR_CANCELING;
1775
1724
  }
1776
1725
  /**
1777
1726
  * A derived value that indicates if the nozzle is currently available to pour a beverage.
@@ -1802,8 +1751,26 @@ let NozzleModelImpl = class {
1802
1751
  return this.futureHandler.getFuture();
1803
1752
  }
1804
1753
  get pourProgress() {
1805
- var _a;
1806
- return ((_a = this.future) == null ? void 0 : _a.progress) ?? 0;
1754
+ return this.future?.progress ?? 0;
1755
+ }
1756
+ constructor(modelId, options) {
1757
+ this.id = modelId;
1758
+ this.path = options.path;
1759
+ this.name = options.name;
1760
+ this.beverageTopicPrefix = options.beverageTopicPrefix;
1761
+ this.topicPrefix = options.topicPrefix;
1762
+ this.urlPrefix = options.urlPrefix;
1763
+ this._selectedBeverage = void 0;
1764
+ this._selectedBrand = void 0;
1765
+ this._additionalItems = [];
1766
+ this.futureHandler = new kosUiSdk.MultipleFutureHandler(this);
1767
+ this._availabilityItems = new kosUiSdk.KosModelContainer({
1768
+ indexMap: {
1769
+ byGroup: "groupId",
1770
+ byParent: "parentId"
1771
+ },
1772
+ parentId: modelId
1773
+ });
1807
1774
  }
1808
1775
  updateModel() {
1809
1776
  }
@@ -1829,7 +1796,7 @@ let NozzleModelImpl = class {
1829
1796
  async setSelectedPourable({ beverage, additional, context }, forceUpdate = false) {
1830
1797
  if (!beverage) {
1831
1798
  const response2 = await clearPourable(this.name);
1832
- if ((response2 == null ? void 0 : response2.status) !== 200) {
1799
+ if (response2?.status !== 200) {
1833
1800
  throw new Error("Failed to clear pourable");
1834
1801
  }
1835
1802
  this._selectedBeverage = void 0;
@@ -1868,7 +1835,7 @@ let NozzleModelImpl = class {
1868
1835
  }
1869
1836
  const payload = selectedPayload ?? defaultPayload;
1870
1837
  const response = await selectPourable(this.name, payload);
1871
- if ((response == null ? void 0 : response.status) !== 200) {
1838
+ if (response?.status !== 200) {
1872
1839
  throw new Error("Failed to select pourable");
1873
1840
  }
1874
1841
  }
@@ -1905,9 +1872,8 @@ let NozzleModelImpl = class {
1905
1872
  handlePouringStart() {
1906
1873
  this.logger.info("Pour started");
1907
1874
  kosUiSdk.getAllKosCompanionModels(this).forEach((model) => {
1908
- var _a;
1909
1875
  if (isPourAware$1(model)) {
1910
- (_a = model.onPourStart) == null ? void 0 : _a.call(model);
1876
+ model.onPourStart?.();
1911
1877
  }
1912
1878
  });
1913
1879
  }
@@ -1920,9 +1886,8 @@ let NozzleModelImpl = class {
1920
1886
  handleCanceled() {
1921
1887
  this.logger.info("Pour canceled");
1922
1888
  kosUiSdk.getAllKosCompanionModels(this).forEach((model) => {
1923
- var _a;
1924
1889
  if (isPourAware$1(model)) {
1925
- (_a = model.onPourCancel) == null ? void 0 : _a.call(model);
1890
+ model.onPourCancel?.();
1926
1891
  }
1927
1892
  });
1928
1893
  const evt = {
@@ -1962,7 +1927,6 @@ let NozzleModelImpl = class {
1962
1927
  }
1963
1928
  // Inherits throwOnInvalid: false from class
1964
1929
  async pour(tracker) {
1965
- var _a;
1966
1930
  try {
1967
1931
  this.transition("START_POUR");
1968
1932
  if (!tracker) {
@@ -1975,7 +1939,7 @@ let NozzleModelImpl = class {
1975
1939
  type: "free"
1976
1940
  };
1977
1941
  kosUiSdk.EventBus.publish(TOPIC_NOZZLE_POUR_STARTED, evt);
1978
- if ((_a = result == null ? void 0 : result.data) == null ? void 0 : _a.endState) {
1942
+ if (result?.data?.endState) {
1979
1943
  this.transition("POUR_COMPLETED");
1980
1944
  }
1981
1945
  return result;
@@ -1989,7 +1953,6 @@ let NozzleModelImpl = class {
1989
1953
  }
1990
1954
  // Inherits throwOnInvalid: false from class
1991
1955
  async fixedPour(name, tracker) {
1992
- var _a;
1993
1956
  try {
1994
1957
  this.transition("START_POUR");
1995
1958
  if (!tracker) {
@@ -2002,7 +1965,7 @@ let NozzleModelImpl = class {
2002
1965
  type: "fixed"
2003
1966
  };
2004
1967
  kosUiSdk.EventBus.publish(TOPIC_NOZZLE_POUR_STARTED, evt);
2005
- if ((_a = result == null ? void 0 : result.data) == null ? void 0 : _a.endState) {
1968
+ if (result?.data?.endState) {
2006
1969
  this.transition("POUR_COMPLETED");
2007
1970
  }
2008
1971
  return result;
@@ -2016,9 +1979,8 @@ let NozzleModelImpl = class {
2016
1979
  }
2017
1980
  // Inherits throwOnInvalid: false - silently ignore if already idle
2018
1981
  async cancelPour() {
2019
- var _a;
2020
1982
  this.transition("CANCEL_POUR");
2021
- await ((_a = this.futureHandler.getFuture()) == null ? void 0 : _a.cancelFuture());
1983
+ await this.futureHandler.getFuture()?.cancelFuture();
2022
1984
  this.transition("POUR_CANCELED");
2023
1985
  }
2024
1986
  updateGroupMembers() {
@@ -2037,20 +1999,19 @@ let NozzleModelImpl = class {
2037
1999
  }
2038
2000
  /** @internal */
2039
2001
  async load(context) {
2040
- var _a, _b;
2041
2002
  this.logger.debug(`loading nozzle ${this.id}`);
2042
2003
  const availability = await getAvailability(this.urlPrefix);
2043
- if ((availability == null ? void 0 : availability.status) !== 200) {
2004
+ if (availability?.status !== 200) {
2044
2005
  throw new Error("Failed to load nozzle availability");
2045
2006
  }
2046
2007
  const beverageContext = await kosUiSdk.ExtensionManager.loader.executeLoader(
2047
2008
  ExtensionType.AvailabilityLoader,
2048
2009
  {}
2049
2010
  );
2050
- context == null ? void 0 : context.set(ExtensionType.AvailabilityLoader, beverageContext);
2051
- context == null ? void 0 : context.set(Nozzle.type, this);
2052
- for (const group of Object.keys((_a = availability.data) == null ? void 0 : _a.groups) || []) {
2053
- for (const beverageData of ((_b = availability.data) == null ? void 0 : _b.groups[group]) || []) {
2011
+ context?.set(ExtensionType.AvailabilityLoader, beverageContext);
2012
+ context?.set(Nozzle.type, this);
2013
+ for (const group of Object.keys(availability.data?.groups) || []) {
2014
+ for (const beverageData of availability.data?.groups[group] || []) {
2054
2015
  const extensionData = await kosUiSdk.ExtensionManager.dataMapper.executeMapper(
2055
2016
  ExtensionType.AvailabilityMapper,
2056
2017
  { ...beverageData, groupId: group },
@@ -2075,9 +2036,9 @@ let NozzleModelImpl = class {
2075
2036
  }
2076
2037
  async updateAvailability(update) {
2077
2038
  const context = kosUiSdk.KosContextManager.getContext(this.id);
2078
- const beverageContext = (context == null ? void 0 : context.get(ExtensionType.AvailabilityLoader)) || {};
2039
+ const beverageContext = context?.get(ExtensionType.AvailabilityLoader) || {};
2079
2040
  if (update.rebuild) {
2080
- for (const group of Object.keys(update == null ? void 0 : update.groups) || []) {
2041
+ for (const group of Object.keys(update?.groups) || []) {
2081
2042
  const deletedBeverages = this._availabilityItems.getIndexByKey("group", group).filter(
2082
2043
  (beverage) => !update.groups[group].find(
2083
2044
  (b) => `${this.id}-${group}-${b.id}` === beverage.id
@@ -2087,7 +2048,7 @@ let NozzleModelImpl = class {
2087
2048
  this._availabilityItems.removeModel(beverage.id);
2088
2049
  kosUiSdk.destroyKosModel(beverage);
2089
2050
  });
2090
- for (const beverageData of (update == null ? void 0 : update.groups[group]) || []) {
2051
+ for (const beverageData of update?.groups[group] || []) {
2091
2052
  const extensionData = await kosUiSdk.ExtensionManager.dataMapper.executeMapper(
2092
2053
  ExtensionType.AvailabilityMapper,
2093
2054
  { ...beverageData, groupId: group },
@@ -2117,8 +2078,8 @@ let NozzleModelImpl = class {
2117
2078
  }
2118
2079
  }
2119
2080
  } else {
2120
- for (const group of Object.keys(update == null ? void 0 : update.groups) || []) {
2121
- for (const beverageData of (update == null ? void 0 : update.groups[group]) || []) {
2081
+ for (const group of Object.keys(update?.groups) || []) {
2082
+ for (const beverageData of update?.groups[group] || []) {
2122
2083
  const extensionData = await kosUiSdk.ExtensionManager.dataMapper.executeMapper(
2123
2084
  ExtensionType.AvailabilityMapper,
2124
2085
  { ...beverageData, groupId: group },
@@ -2240,16 +2201,15 @@ var __decorateClass$1 = (decorators, target, key, kind) => {
2240
2201
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
2241
2202
  if (decorator = decorators[i])
2242
2203
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2243
- if (kind && result)
2244
- __defProp$1(target, key, result);
2204
+ if (kind && result) __defProp$1(target, key, result);
2245
2205
  return result;
2246
2206
  };
2247
2207
  const MODEL_TYPE$1 = "device-assembly-model";
2248
2208
  let DeviceAssemblyModelImpl = class {
2209
+ id;
2210
+ deviceNozzles;
2211
+ logger;
2249
2212
  constructor(modelId, _options, context) {
2250
- __publicField(this, "id");
2251
- __publicField(this, "deviceNozzles");
2252
- __publicField(this, "logger");
2253
2213
  this.id = modelId;
2254
2214
  this.logger = context.logger;
2255
2215
  this.deviceNozzles = new kosUiSdk.KosModelContainer();
@@ -2267,12 +2227,11 @@ let DeviceAssemblyModelImpl = class {
2267
2227
  async load() {
2268
2228
  this.logger.debug(`loading device-assembly ${this.id}`);
2269
2229
  const result = await getAssembly();
2270
- if ((result == null ? void 0 : result.status) === 200) {
2230
+ if (result?.status === 200) {
2271
2231
  const nozzles = result.data.assemblies.map((assembly) => assembly.nozzles ?? []).flat();
2272
2232
  nozzles.forEach((nozzleData) => {
2273
- var _a;
2274
2233
  const nozzleId = nozzleData.path;
2275
- const beverageTopicPrefix = ((_a = nozzleData.pipelines.find((pipeline) => pipeline.name === "beverage")) == null ? void 0 : _a.topicPrefix) || "";
2234
+ const beverageTopicPrefix = nozzleData.pipelines.find((pipeline) => pipeline.name === "beverage")?.topicPrefix || "";
2276
2235
  const nozzle = Nozzle.factory(nozzleId)({
2277
2236
  path: nozzleData.path,
2278
2237
  name: nozzleData.name,
@@ -2306,20 +2265,19 @@ const pourOnTarget = async (path, tracker) => {
2306
2265
  ordered: true,
2307
2266
  tracker
2308
2267
  });
2309
- if (response == null ? void 0 : response.data) {
2268
+ if (response?.data) {
2310
2269
  kosUiSdk.FutureManager.initiateFuture(response.data);
2311
2270
  }
2312
2271
  return response;
2313
2272
  };
2314
- var __defProp2 = Object.defineProperty;
2273
+ var __defProp = Object.defineProperty;
2315
2274
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
2316
2275
  var __decorateClass = (decorators, target, key, kind) => {
2317
2276
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
2318
2277
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
2319
2278
  if (decorator = decorators[i])
2320
2279
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2321
- if (kind && result)
2322
- __defProp2(target, key, result);
2280
+ if (kind && result) __defProp(target, key, result);
2323
2281
  return result;
2324
2282
  };
2325
2283
  const MODEL_TYPE = "generic-pour-model";
@@ -2328,18 +2286,18 @@ const TOPIC_GENERIC_POUR_PROGRESS = "/kos/generic/pour/progress";
2328
2286
  const TOPIC_GENERIC_POUR_CANCEL = "/kos/generic/pour/cancel";
2329
2287
  const isPourAware = (model) => model.onPourStart !== void 0 && model.onPourCancel !== void 0 && model.onPourProgress !== void 0;
2330
2288
  let GenericPourModelImpl = class {
2289
+ id;
2290
+ /**
2291
+ * @kosApiLevel 5
2292
+ */
2293
+ servicePathFactory;
2294
+ pourType;
2295
+ /**
2296
+ * @kosApiLevel 5
2297
+ */
2298
+ selectedId;
2299
+ state;
2331
2300
  constructor(modelId, options) {
2332
- __publicField(this, "id");
2333
- /**
2334
- * @kosApiLevel 5
2335
- */
2336
- __publicField(this, "servicePathFactory");
2337
- __publicField(this, "pourType");
2338
- /**
2339
- * @kosApiLevel 5
2340
- */
2341
- __publicField(this, "selectedId");
2342
- __publicField(this, "state");
2343
2301
  this.id = modelId;
2344
2302
  this.futureHandler = new kosUiSdk.FutureHandler(this);
2345
2303
  this.servicePathFactory = options.servicePathFactory;
@@ -2385,9 +2343,8 @@ let GenericPourModelImpl = class {
2385
2343
  handlePouringStart() {
2386
2344
  this.logger.info("Pour started");
2387
2345
  kosUiSdk.getAllKosCompanionModels(this).forEach((model) => {
2388
- var _a;
2389
2346
  if (isPourAware(model)) {
2390
- (_a = model.onPourStart) == null ? void 0 : _a.call(model);
2347
+ model.onPourStart?.();
2391
2348
  }
2392
2349
  });
2393
2350
  const evt = {
@@ -2405,9 +2362,8 @@ let GenericPourModelImpl = class {
2405
2362
  handleCanceled() {
2406
2363
  this.logger.info("Pour canceled");
2407
2364
  kosUiSdk.getAllKosCompanionModels(this).forEach((model) => {
2408
- var _a;
2409
2365
  if (isPourAware(model)) {
2410
- (_a = model.onPourCancel) == null ? void 0 : _a.call(model);
2366
+ model.onPourCancel?.();
2411
2367
  }
2412
2368
  });
2413
2369
  const evt = {
@@ -2417,7 +2373,6 @@ let GenericPourModelImpl = class {
2417
2373
  }
2418
2374
  // Inherits throwOnInvalid: false from class
2419
2375
  async pour(tracker) {
2420
- var _a;
2421
2376
  try {
2422
2377
  this.transition("START_POUR");
2423
2378
  if (!tracker) {
@@ -2425,7 +2380,7 @@ let GenericPourModelImpl = class {
2425
2380
  }
2426
2381
  const result = await pourOnTarget(this.servicePath, tracker);
2427
2382
  this.transition("POUR_ACTIVE");
2428
- if ((_a = result == null ? void 0 : result.data) == null ? void 0 : _a.endState) {
2383
+ if (result?.data?.endState) {
2429
2384
  this.transition("POUR_COMPLETED");
2430
2385
  }
2431
2386
  return result;
@@ -2439,9 +2394,8 @@ let GenericPourModelImpl = class {
2439
2394
  }
2440
2395
  // Inherits throwOnInvalid: false - silently ignore if already idle
2441
2396
  async cancelPour() {
2442
- var _a;
2443
2397
  this.transition("CANCEL_POUR");
2444
- await ((_a = this.futureHandler.getFuture()) == null ? void 0 : _a.cancelFuture());
2398
+ await this.futureHandler.getFuture()?.cancelFuture();
2445
2399
  this.transition("POUR_CANCELED");
2446
2400
  }
2447
2401
  // ============================================================================
@@ -2452,8 +2406,7 @@ let GenericPourModelImpl = class {
2452
2406
  * @readonly
2453
2407
  */
2454
2408
  get isPouring() {
2455
- var _a;
2456
- return !!(this.future && !((_a = this.future) == null ? void 0 : _a.endState)) || this.currentState === PourState.POUR_STARTING || this.currentState === PourState.POURING || this.currentState === PourState.POUR_CANCELING;
2409
+ return !!(this.future && !this.future?.endState) || this.currentState === PourState.POUR_STARTING || this.currentState === PourState.POURING || this.currentState === PourState.POUR_CANCELING;
2457
2410
  }
2458
2411
  /**
2459
2412
  * A derived value that indicates if the pour target is currently available to pour a beverage.
@@ -2588,8 +2541,7 @@ const registerDispenseModels = (root) => () => {
2588
2541
  kosUiSdk.ExtensionManager[kosUiSdk.EXTENSION_TROUBLE_DATA_MAPPER].register(
2589
2542
  "FirmwareUpdateInProgressTrouble",
2590
2543
  async (trouble) => {
2591
- var _a;
2592
- if ((_a = trouble.data) == null ? void 0 : _a.deviceId) {
2544
+ if (trouble.data?.deviceId) {
2593
2545
  const { model: assemblyModel } = kosUiSdk.getKosModelSync(
2594
2546
  Assembly.type
2595
2547
  );
@@ -2668,4 +2620,4 @@ exports.selectPourable = selectPourable;
2668
2620
  exports.sendIntent = sendIntent;
2669
2621
  exports.sendRfidOverride = sendRfidOverride;
2670
2622
  exports.unassignHolderIngredient = unassignHolderIngredient;
2671
- //# sourceMappingURL=dispense-registration-manager-lQhkTFKW.cjs.map
2623
+ //# sourceMappingURL=dispense-registration-manager-FTLZRpFt.cjs.map