kassza 0.18.0 → 0.19.0

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 (190) hide show
  1. package/README.md +1 -1
  2. package/dist/batch/index.cjs +5 -7
  3. package/dist/batch/index.d.cts +5 -9
  4. package/dist/batch/index.d.ts +5 -9
  5. package/dist/batch/index.js +5 -7
  6. package/dist/{binary-B89HM03_.cjs → binary-CdpKlNNI.cjs} +1 -2
  7. package/dist/{binary-D0M9U2MD.js → binary-DuKBSfH-.js} +1 -2
  8. package/dist/cli.cjs +14 -21
  9. package/dist/cli.js +14 -21
  10. package/dist/{client-DeWWQ-RZ.d.ts → client-BT2odGYl.d.cts} +8 -36
  11. package/dist/{client-SVZu25MB.d.cts → client-C-SYCiOZ.d.ts} +8 -36
  12. package/dist/{client-Cvb9yfxU.cjs → client-I_29IPMh.cjs} +25 -37
  13. package/dist/{client-CdWEA0et.js → client-JZ1M1sZX.js} +25 -37
  14. package/dist/{context-kb33TgzE.d.ts → context-BuX6Eion.d.ts} +6 -24
  15. package/dist/{context-CFNKzStE.d.cts → context-PwqY4JOK.d.cts} +6 -24
  16. package/dist/cookie-stores/index.cjs +2 -2
  17. package/dist/cookie-stores/index.d.cts +3 -3
  18. package/dist/cookie-stores/index.d.ts +3 -3
  19. package/dist/cookie-stores/index.js +2 -2
  20. package/dist/{create-CflXrPip.js → create-BwRslos0.js} +9 -12
  21. package/dist/{create-CvUvLUaT.cjs → create-DH5jiZPA.cjs} +9 -12
  22. package/dist/{create-once-CW0x_yvp.js → create-once-B6cAXyET.js} +16 -22
  23. package/dist/{create-once-VKp0tVow.d.ts → create-once-CiGUjXut.d.ts} +3 -7
  24. package/dist/{create-once-Bh6fOWkW.d.cts → create-once-CyaVT36b.d.cts} +3 -7
  25. package/dist/{create-once-CHhDz0un.cjs → create-once-zeF7GVVP.cjs} +16 -22
  26. package/dist/{crypto-Dpn4FHQ6.cjs → crypto-B0PAHKJB.cjs} +1 -2
  27. package/dist/{crypto-usDg8L2K.js → crypto-BqGn_oGu.js} +1 -2
  28. package/dist/data-link/index.cjs +10 -13
  29. package/dist/data-link/index.d.cts +1 -5
  30. package/dist/data-link/index.d.ts +1 -5
  31. package/dist/data-link/index.js +10 -13
  32. package/dist/{dates-CXyj7Azy.js → dates-DWsZOdaO.js} +1 -2
  33. package/dist/{dates-9zvESP0i.d.cts → dates-nlGEokCf.d.cts} +0 -2
  34. package/dist/{dates-9zvESP0i.d.ts → dates-nlGEokCf.d.ts} +0 -2
  35. package/dist/{dates-CPgBodkP.cjs → dates-oOp3ypPP.cjs} +1 -2
  36. package/dist/delegation/index.cjs +9 -12
  37. package/dist/delegation/index.d.cts +3 -9
  38. package/dist/delegation/index.d.ts +3 -9
  39. package/dist/delegation/index.js +9 -12
  40. package/dist/{errors-EE96_6D_.cjs → errors-Bn6pe6yw.cjs} +12 -3
  41. package/dist/{errors-DtN4g5Z9.js → errors-CGGsW0Y5.js} +12 -3
  42. package/dist/{get-Byc9T5WO.d.cts → get-BL4Fr8-P.d.cts} +0 -2
  43. package/dist/{get-Byc9T5WO.d.ts → get-BL4Fr8-P.d.ts} +0 -2
  44. package/dist/{get-BdMTseh4.cjs → get-DFhT7kOp.cjs} +4 -5
  45. package/dist/{get-CZEShCcj.js → get-HrHwVkVt.js} +4 -5
  46. package/dist/{index-C-7yWV7L.d.cts → index-CinpAhQM.d.cts} +0 -8
  47. package/dist/{index-C-7yWV7L.d.ts → index-CinpAhQM.d.ts} +0 -8
  48. package/dist/{index-BqGgQ4t3.d.ts → index-DqoDUw6X.d.ts} +2 -20
  49. package/dist/{index-BhUPY_EH.d.cts → index-qk62lWr3.d.cts} +2 -20
  50. package/dist/index.cjs +7 -7
  51. package/dist/index.d.cts +11 -13
  52. package/dist/index.d.ts +11 -13
  53. package/dist/index.js +7 -7
  54. package/dist/ipn/index.cjs +4 -6
  55. package/dist/ipn/index.d.cts +0 -4
  56. package/dist/ipn/index.d.ts +0 -4
  57. package/dist/ipn/index.js +4 -6
  58. package/dist/{issue-Bin4tKD_.cjs → issue-DReARZnF.cjs} +12 -18
  59. package/dist/{issue-DMA1Nbr1.js → issue-Dy9zvRK1.js} +12 -18
  60. package/dist/journal/index.cjs +7 -11
  61. package/dist/journal/index.d.cts +2 -6
  62. package/dist/journal/index.d.ts +2 -6
  63. package/dist/journal/index.js +7 -11
  64. package/dist/{journal-Y9qrIB8G.d.ts → journal-BNdo07p5.d.ts} +5 -9
  65. package/dist/{journal-DvI81Kt7.d.cts → journal-DI-hOW6N.d.cts} +5 -9
  66. package/dist/{json-4y4E2xxS.cjs → json-COC9rDwf.cjs} +1 -2
  67. package/dist/json-D3Bx7NhF.d.cts +2 -0
  68. package/dist/json-D3Bx7NhF.d.ts +2 -0
  69. package/dist/{json-DjnqnaJK.js → json-as-6J7d-.js} +1 -2
  70. package/dist/mcp/index.cjs +1 -1
  71. package/dist/mcp/index.d.cts +1 -9
  72. package/dist/mcp/index.d.ts +1 -9
  73. package/dist/mcp/index.js +1 -2
  74. package/dist/money/index.cjs +3 -3
  75. package/dist/money/index.d.cts +1 -1
  76. package/dist/money/index.d.ts +1 -1
  77. package/dist/money/index.js +3 -3
  78. package/dist/{money-K9j0wPit.cjs → money-NtVytaxG.cjs} +5 -7
  79. package/dist/{money-Cw457SD6.js → money-f280VT77.js} +5 -7
  80. package/dist/nav/index.cjs +15 -22
  81. package/dist/nav/index.d.cts +2 -22
  82. package/dist/nav/index.d.ts +2 -22
  83. package/dist/nav/index.js +15 -22
  84. package/dist/{nav-BcCerwWS.js → nav-NvNgaONz.js} +5 -7
  85. package/dist/{nav-BNbc8U0R.cjs → nav-VShZkjg8.cjs} +5 -7
  86. package/dist/node/index.cjs +1 -2
  87. package/dist/node/index.d.cts +1 -3
  88. package/dist/node/index.d.ts +1 -3
  89. package/dist/node/index.js +1 -2
  90. package/dist/observe/index.cjs +3 -5
  91. package/dist/observe/index.d.cts +1 -5
  92. package/dist/observe/index.d.ts +1 -5
  93. package/dist/observe/index.js +3 -5
  94. package/dist/{once-BN_3B5OF.cjs → once-BmXfrNbQ.cjs} +2 -3
  95. package/dist/{once-CqqZxsXG.js → once-CMhDPrs7.js} +2 -3
  96. package/dist/{parse-Cr7yQ3_z.js → parse-1RiSh4vY.js} +5 -7
  97. package/dist/{parse-DOA2XQ3e.cjs → parse-CmM5va-p.cjs} +5 -7
  98. package/dist/payments/barion.cjs +7 -6
  99. package/dist/payments/barion.d.cts +4 -6
  100. package/dist/payments/barion.d.ts +4 -6
  101. package/dist/payments/barion.js +7 -6
  102. package/dist/payments/index.cjs +2 -2
  103. package/dist/payments/index.d.cts +3 -9
  104. package/dist/payments/index.d.ts +3 -9
  105. package/dist/payments/index.js +2 -2
  106. package/dist/payments/paypal.cjs +8 -7
  107. package/dist/payments/paypal.d.cts +4 -6
  108. package/dist/payments/paypal.d.ts +4 -6
  109. package/dist/payments/paypal.js +8 -7
  110. package/dist/payments/revolut.cjs +7 -6
  111. package/dist/payments/revolut.d.cts +4 -6
  112. package/dist/payments/revolut.d.ts +4 -6
  113. package/dist/payments/revolut.js +7 -6
  114. package/dist/payments/simplepay.cjs +9 -8
  115. package/dist/payments/simplepay.d.cts +4 -6
  116. package/dist/payments/simplepay.d.ts +4 -6
  117. package/dist/payments/simplepay.js +9 -8
  118. package/dist/payments/stripe.cjs +6 -6
  119. package/dist/payments/stripe.d.cts +4 -6
  120. package/dist/payments/stripe.d.ts +4 -6
  121. package/dist/payments/stripe.js +6 -6
  122. package/dist/{push-BXj0Sf0Z.d.ts → push-CTxDD3yJ.d.cts} +2 -4
  123. package/dist/{push-D4nNbCNV.d.cts → push-DJh5YkyV.d.ts} +2 -4
  124. package/dist/{reference-B5TATqb5.js → reference-Cxz0m2zF.js} +6 -7
  125. package/dist/{reference-BIdYMK0t.cjs → reference-DoY12fc1.cjs} +6 -7
  126. package/dist/reports/index.cjs +3 -4
  127. package/dist/reports/index.d.cts +1 -7
  128. package/dist/reports/index.d.ts +1 -7
  129. package/dist/reports/index.js +3 -4
  130. package/dist/{request-body-uZHMRlQr.js → request-body-BM4sbsHd.js} +2 -3
  131. package/dist/{request-body-CH6ZGOrq.cjs → request-body-BhfkJhff.cjs} +2 -3
  132. package/dist/{rounding-TxoWy2ww.cjs → rounding-CHmSK5Z2.cjs} +1 -2
  133. package/dist/{rounding-BLyHjjI5.js → rounding-CZLj4DbV.js} +1 -2
  134. package/dist/{serialize-B2eFh3D-.js → serialize-CjymGkJj.js} +2 -4
  135. package/dist/{serialize-CquIsxA-.cjs → serialize-DEU7r6Bk.cjs} +2 -4
  136. package/dist/{server-B9guio75.cjs → server-BZ-ySQGx.cjs} +23 -35
  137. package/dist/{server-yx9eG_8p.js → server-CDwsjBWk.js} +23 -35
  138. package/dist/{session-Ckl5eJhV.d.ts → session-BBbSXlx3.d.cts} +1 -3
  139. package/dist/{session-DeM5vjvC.cjs → session-BYotpR_s.cjs} +2 -4
  140. package/dist/{session-SaEEXu2N.js → session-DZeE1ryt.js} +2 -4
  141. package/dist/{session-YbChChx7.d.cts → session-mKtpAeUB.d.ts} +1 -3
  142. package/dist/{shared-CrxlxI8n.cjs → shared-BOBTXDTo.cjs} +5 -6
  143. package/dist/{shared-D6DLa4b7.js → shared-Dbcfwr8x.js} +5 -6
  144. package/dist/storage/fs.cjs +3 -4
  145. package/dist/storage/fs.d.cts +2 -4
  146. package/dist/storage/fs.d.ts +2 -4
  147. package/dist/storage/fs.js +3 -4
  148. package/dist/storage/index.cjs +16 -25
  149. package/dist/storage/index.d.cts +2 -26
  150. package/dist/storage/index.d.ts +2 -26
  151. package/dist/storage/index.js +16 -25
  152. package/dist/{store-C1rHd9DB.d.cts → store-BkaZ8qkU.d.cts} +0 -2
  153. package/dist/{store-C1rHd9DB.d.ts → store-BkaZ8qkU.d.ts} +0 -2
  154. package/dist/stores/index.cjs +2 -2
  155. package/dist/stores/index.d.cts +3 -3
  156. package/dist/stores/index.d.ts +3 -3
  157. package/dist/stores/index.js +2 -2
  158. package/dist/{stores-DhjGBrl_.js → stores-BUnPNJQl.js} +12 -22
  159. package/dist/{stores-BNrS0dWl.cjs → stores-CH4rYKs_.cjs} +12 -22
  160. package/dist/{tax-number-BdqKsxNR.js → tax-number-C6jySuGR.js} +3 -6
  161. package/dist/{tax-number-BYFkBp4A.cjs → tax-number-XLdM5ETv.cjs} +3 -6
  162. package/dist/testing/index.cjs +20 -30
  163. package/dist/testing/index.d.cts +5 -15
  164. package/dist/testing/index.d.ts +5 -15
  165. package/dist/testing/index.js +20 -30
  166. package/dist/{types-DVRgwcqg.d.cts → types-Bfs08Mrc.d.cts} +0 -2
  167. package/dist/{types-DVRgwcqg.d.ts → types-Bfs08Mrc.d.ts} +0 -2
  168. package/dist/{types-ByAEvGsZ.d.ts → types-DeuUqIvU.d.cts} +2 -4
  169. package/dist/{types-D1zDOH_F.d.ts → types-Z6rQoqHn.d.ts} +1 -3
  170. package/dist/{types-lnKkQdot.d.cts → types-_HKTOCuQ.d.cts} +1 -3
  171. package/dist/{types-B1A8mUIE.d.cts → types-oiDulesz.d.ts} +2 -4
  172. package/dist/url-CRIlLxPE.cjs +23 -0
  173. package/dist/url-DeCMiKVm.js +12 -0
  174. package/dist/validators/index.cjs +6 -10
  175. package/dist/validators/index.d.cts +0 -12
  176. package/dist/validators/index.d.ts +0 -12
  177. package/dist/validators/index.js +6 -10
  178. package/dist/{vat-v_dcWCto.js → vat-B4J5Q0tu.js} +1 -2
  179. package/dist/{vat-g35srbNG.cjs → vat-BkoiiKm4.cjs} +1 -2
  180. package/dist/{warnings-DwTl5J-2.js → warnings-DJ0QvZOp.js} +1 -2
  181. package/dist/{warnings-B3DXnveC.d.cts → warnings-DpuYhn39.d.cts} +0 -4
  182. package/dist/{warnings-B3DXnveC.d.ts → warnings-DpuYhn39.d.ts} +0 -4
  183. package/dist/{warnings-DeIw5RFj.cjs → warnings-ciSzK6Jc.cjs} +1 -2
  184. package/dist/{webhook-Ckj-_hPD.cjs → webhook-BBTebz1x.cjs} +7 -11
  185. package/dist/{webhook-D6lEejob.d.ts → webhook-C9IBUdeT.d.ts} +1 -3
  186. package/dist/{webhook-CmdhGiH5.d.cts → webhook-DF2p_m2Q.d.cts} +1 -3
  187. package/dist/{webhook-CQVShAfI.js → webhook-SFlA_nCf.js} +7 -11
  188. package/package.json +1 -1
  189. package/dist/json-B70TwoX1.d.cts +0 -4
  190. package/dist/json-B70TwoX1.d.ts +0 -4
@@ -1,3 +1,3 @@
1
- import { a as memoryStore, n as memoryCookieStore, o as storeCapabilities, t as SESSION_TTL_SECONDS } from "../session-SaEEXu2N.js";
2
- import { a as upstashRedisCookieStore, c as customCookieStore, d as resilientCookieStore, i as diagnoseStore, l as CLOUDFLARE_KV_MIN_TTL_SECONDS, n as durableObjectStore, o as nodeRedisCookieStore, r as handleDurableObjectStoreRequest, s as ioredisCookieStore, t as DURABLE_OBJECT_STORE_URL, u as cloudflareKvCookieStore } from "../stores-DhjGBrl_.js";
1
+ import { a as memoryStore, n as memoryCookieStore, o as storeCapabilities, t as SESSION_TTL_SECONDS } from "../session-DZeE1ryt.js";
2
+ import { a as upstashRedisCookieStore, c as customCookieStore, d as resilientCookieStore, i as diagnoseStore, l as CLOUDFLARE_KV_MIN_TTL_SECONDS, n as durableObjectStore, o as nodeRedisCookieStore, r as handleDurableObjectStoreRequest, s as ioredisCookieStore, t as DURABLE_OBJECT_STORE_URL, u as cloudflareKvCookieStore } from "../stores-BUnPNJQl.js";
3
3
  export { CLOUDFLARE_KV_MIN_TTL_SECONDS, DURABLE_OBJECT_STORE_URL, SESSION_TTL_SECONDS, cloudflareKvCookieStore, cloudflareKvCookieStore as cloudflareKvStore, customCookieStore, customCookieStore as customStore, diagnoseStore, durableObjectStore, handleDurableObjectStoreRequest, ioredisCookieStore, ioredisCookieStore as ioredisStore, memoryCookieStore, memoryStore, nodeRedisCookieStore, nodeRedisCookieStore as nodeRedisStore, resilientCookieStore, resilientCookieStore as resilientStore, storeCapabilities, upstashRedisCookieStore, upstashRedisCookieStore as upstashRedisStore };
@@ -1,6 +1,6 @@
1
- import { r as decodeUtf8 } from "./binary-D0M9U2MD.js";
2
- import { o as storeCapabilities } from "./session-SaEEXu2N.js";
3
- //#region src/cookie-stores/resilient.ts
1
+ import { r as decodeUtf8 } from "./binary-DuKBSfH-.js";
2
+ import { o as storeCapabilities } from "./session-DZeE1ryt.js";
3
+ // src/cookie-stores/resilient.ts
4
4
  function warnCookieStoreError(event) {
5
5
  const continuation = ATOMIC_OPERATIONS.has(event.operation) ? "a hibát a kassza kapja meg és kezeli." : "a kérés session nélkül folytatódik.";
6
6
  console.warn(`[szamlazz] A tároló "${event.operation}" művelete sikertelen, ${continuation}`, event.error);
@@ -68,8 +68,7 @@ function resilientCookieStore(store, options = {}) {
68
68
  ...deleteIfEquals && { deleteIfEquals: (key, value) => strict("deleteIfEquals", key, () => deleteIfEquals(key, value)) }
69
69
  };
70
70
  }
71
- //#endregion
72
- //#region src/cookie-stores/shared.ts
71
+ // src/cookie-stores/shared.ts
73
72
  function prefixKey(options, key) {
74
73
  const prefix = options?.prefix;
75
74
  return prefix ? `${prefix}${key}` : key;
@@ -90,8 +89,7 @@ function wholeSeconds(ttlSeconds, minimum) {
90
89
  if (!Number.isFinite(ttlSeconds)) return minimum;
91
90
  return Math.max(minimum, Math.ceil(ttlSeconds));
92
91
  }
93
- //#endregion
94
- //#region src/cookie-stores/cloudflare-kv.ts
92
+ // src/cookie-stores/cloudflare-kv.ts
95
93
  const CLOUDFLARE_KV_MIN_TTL_SECONDS = 60;
96
94
  function cloudflareKvCookieStore(namespace, options) {
97
95
  return finalizeCookieStore({
@@ -106,8 +104,7 @@ function cloudflareKvCookieStore(namespace, options) {
106
104
  }
107
105
  }, options);
108
106
  }
109
- //#endregion
110
- //#region src/cookie-stores/custom.ts
107
+ // src/cookie-stores/custom.ts
111
108
  function customCookieStore(store, options) {
112
109
  const prefixed = (key) => prefixKey(options, key);
113
110
  const wrapped = {
@@ -125,8 +122,7 @@ function customCookieStore(store, options) {
125
122
  ...deleteIfEquals && { deleteIfEquals: (key, value) => deleteIfEquals(prefixed(key), value) }
126
123
  }, options);
127
124
  }
128
- //#endregion
129
- //#region src/cookie-stores/scripts.ts
125
+ // src/cookie-stores/scripts.ts
130
126
  const SET_IF_ABSENT_SCRIPT = "if redis.call('SET', KEYS[1], ARGV[1], 'NX', 'EX', ARGV[2]) then return 1 else return 0 end";
131
127
  const INCREMENT_SCRIPT = "local value = redis.call('INCR', KEYS[1]) redis.call('EXPIRE', KEYS[1], ARGV[1]) return value";
132
128
  const DELETE_IF_EQUALS_SCRIPT = "if redis.call('GET', KEYS[1]) == ARGV[1] then return redis.call('DEL', KEYS[1]) else return 0 end";
@@ -148,8 +144,7 @@ function atomicOperations(run, prefixed, seconds) {
148
144
  }
149
145
  };
150
146
  }
151
- //#endregion
152
- //#region src/cookie-stores/ioredis.ts
147
+ // src/cookie-stores/ioredis.ts
153
148
  function ioredisCookieStore(redis, options) {
154
149
  const base = {
155
150
  async get(key) {
@@ -170,8 +165,7 @@ function ioredisCookieStore(redis, options) {
170
165
  ...atomic
171
166
  }, options);
172
167
  }
173
- //#endregion
174
- //#region src/cookie-stores/node-redis.ts
168
+ // src/cookie-stores/node-redis.ts
175
169
  function nodeRedisCookieStore(client, options) {
176
170
  const base = {
177
171
  async get(key) {
@@ -195,8 +189,7 @@ function nodeRedisCookieStore(client, options) {
195
189
  ...atomic
196
190
  }, options);
197
191
  }
198
- //#endregion
199
- //#region src/cookie-stores/upstash.ts
192
+ // src/cookie-stores/upstash.ts
200
193
  function upstashRedisCookieStore(redis, options) {
201
194
  const base = {
202
195
  async get(key) {
@@ -217,8 +210,7 @@ function upstashRedisCookieStore(redis, options) {
217
210
  ...atomic
218
211
  }, options);
219
212
  }
220
- //#endregion
221
- //#region src/stores/diagnose.ts
213
+ // src/stores/diagnose.ts
222
214
  function randomSuffix() {
223
215
  return Array.from(crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(8)), (byte) => byte.toString(16).padStart(2, "0")).join("");
224
216
  }
@@ -279,8 +271,7 @@ async function diagnoseStore(store, options = {}) {
279
271
  problems
280
272
  };
281
273
  }
282
- //#endregion
283
- //#region src/stores/durable-object.ts
274
+ // src/stores/durable-object.ts
284
275
  const OPERATIONS = /* @__PURE__ */ new Set([
285
276
  "get",
286
277
  "set",
@@ -437,5 +428,4 @@ function durableObjectStore(stub) {
437
428
  }
438
429
  };
439
430
  }
440
- //#endregion
441
431
  export { upstashRedisCookieStore as a, customCookieStore as c, resilientCookieStore as d, diagnoseStore as i, CLOUDFLARE_KV_MIN_TTL_SECONDS as l, durableObjectStore as n, nodeRedisCookieStore as o, handleDurableObjectStoreRequest as r, ioredisCookieStore as s, DURABLE_OBJECT_STORE_URL as t, cloudflareKvCookieStore as u };
@@ -1,6 +1,6 @@
1
- const require_binary = require("./binary-B89HM03_.cjs");
2
- const require_session = require("./session-DeM5vjvC.cjs");
3
- //#region src/cookie-stores/resilient.ts
1
+ const require_binary = require("./binary-CdpKlNNI.cjs");
2
+ const require_session = require("./session-BYotpR_s.cjs");
3
+ // src/cookie-stores/resilient.ts
4
4
  function warnCookieStoreError(event) {
5
5
  const continuation = ATOMIC_OPERATIONS.has(event.operation) ? "a hibát a kassza kapja meg és kezeli." : "a kérés session nélkül folytatódik.";
6
6
  console.warn(`[szamlazz] A tároló "${event.operation}" művelete sikertelen, ${continuation}`, event.error);
@@ -68,8 +68,7 @@ function resilientCookieStore(store, options = {}) {
68
68
  ...deleteIfEquals && { deleteIfEquals: (key, value) => strict("deleteIfEquals", key, () => deleteIfEquals(key, value)) }
69
69
  };
70
70
  }
71
- //#endregion
72
- //#region src/cookie-stores/shared.ts
71
+ // src/cookie-stores/shared.ts
73
72
  function prefixKey(options, key) {
74
73
  const prefix = options?.prefix;
75
74
  return prefix ? `${prefix}${key}` : key;
@@ -90,8 +89,7 @@ function wholeSeconds(ttlSeconds, minimum) {
90
89
  if (!Number.isFinite(ttlSeconds)) return minimum;
91
90
  return Math.max(minimum, Math.ceil(ttlSeconds));
92
91
  }
93
- //#endregion
94
- //#region src/cookie-stores/cloudflare-kv.ts
92
+ // src/cookie-stores/cloudflare-kv.ts
95
93
  const CLOUDFLARE_KV_MIN_TTL_SECONDS = 60;
96
94
  function cloudflareKvCookieStore(namespace, options) {
97
95
  return finalizeCookieStore({
@@ -106,8 +104,7 @@ function cloudflareKvCookieStore(namespace, options) {
106
104
  }
107
105
  }, options);
108
106
  }
109
- //#endregion
110
- //#region src/cookie-stores/custom.ts
107
+ // src/cookie-stores/custom.ts
111
108
  function customCookieStore(store, options) {
112
109
  const prefixed = (key) => prefixKey(options, key);
113
110
  const wrapped = {
@@ -125,8 +122,7 @@ function customCookieStore(store, options) {
125
122
  ...deleteIfEquals && { deleteIfEquals: (key, value) => deleteIfEquals(prefixed(key), value) }
126
123
  }, options);
127
124
  }
128
- //#endregion
129
- //#region src/cookie-stores/scripts.ts
125
+ // src/cookie-stores/scripts.ts
130
126
  const SET_IF_ABSENT_SCRIPT = "if redis.call('SET', KEYS[1], ARGV[1], 'NX', 'EX', ARGV[2]) then return 1 else return 0 end";
131
127
  const INCREMENT_SCRIPT = "local value = redis.call('INCR', KEYS[1]) redis.call('EXPIRE', KEYS[1], ARGV[1]) return value";
132
128
  const DELETE_IF_EQUALS_SCRIPT = "if redis.call('GET', KEYS[1]) == ARGV[1] then return redis.call('DEL', KEYS[1]) else return 0 end";
@@ -148,8 +144,7 @@ function atomicOperations(run, prefixed, seconds) {
148
144
  }
149
145
  };
150
146
  }
151
- //#endregion
152
- //#region src/cookie-stores/ioredis.ts
147
+ // src/cookie-stores/ioredis.ts
153
148
  function ioredisCookieStore(redis, options) {
154
149
  const base = {
155
150
  async get(key) {
@@ -170,8 +165,7 @@ function ioredisCookieStore(redis, options) {
170
165
  ...atomic
171
166
  }, options);
172
167
  }
173
- //#endregion
174
- //#region src/cookie-stores/node-redis.ts
168
+ // src/cookie-stores/node-redis.ts
175
169
  function nodeRedisCookieStore(client, options) {
176
170
  const base = {
177
171
  async get(key) {
@@ -195,8 +189,7 @@ function nodeRedisCookieStore(client, options) {
195
189
  ...atomic
196
190
  }, options);
197
191
  }
198
- //#endregion
199
- //#region src/cookie-stores/upstash.ts
192
+ // src/cookie-stores/upstash.ts
200
193
  function upstashRedisCookieStore(redis, options) {
201
194
  const base = {
202
195
  async get(key) {
@@ -217,8 +210,7 @@ function upstashRedisCookieStore(redis, options) {
217
210
  ...atomic
218
211
  }, options);
219
212
  }
220
- //#endregion
221
- //#region src/stores/diagnose.ts
213
+ // src/stores/diagnose.ts
222
214
  function randomSuffix() {
223
215
  return Array.from(crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(8)), (byte) => byte.toString(16).padStart(2, "0")).join("");
224
216
  }
@@ -279,8 +271,7 @@ async function diagnoseStore(store, options = {}) {
279
271
  problems
280
272
  };
281
273
  }
282
- //#endregion
283
- //#region src/stores/durable-object.ts
274
+ // src/stores/durable-object.ts
284
275
  const OPERATIONS = /* @__PURE__ */ new Set([
285
276
  "get",
286
277
  "set",
@@ -437,7 +428,6 @@ function durableObjectStore(stub) {
437
428
  }
438
429
  };
439
430
  }
440
- //#endregion
441
431
  Object.defineProperty(exports, "CLOUDFLARE_KV_MIN_TTL_SECONDS", {
442
432
  enumerable: true,
443
433
  get: function() {
@@ -1,4 +1,4 @@
1
- //#region src/validators/digits.ts
1
+ // src/validators/digits.ts
2
2
  const SEPARATORS = /[\s-]+/g;
3
3
  function stripSeparators(value) {
4
4
  return value.replace(SEPARATORS, "");
@@ -10,8 +10,7 @@ function isDigits(value, length) {
10
10
  function weightedDigitSum(digits, weights) {
11
11
  return [...digits].reduce((sum, digit, index) => sum + Number(digit) * Number(weights[index % weights.length]), 0);
12
12
  }
13
- //#endregion
14
- //#region src/validators/email.ts
13
+ // src/validators/email.ts
15
14
  const MAX_EMAIL_LENGTH = 254;
16
15
  const EMAIL_PATTERN = /^[^\s@]+@[^\s@.]+(?:\.[^\s@.]+)+$/;
17
16
  function normalizeEmail(value) {
@@ -22,8 +21,7 @@ function isValidEmail(value) {
22
21
  const email = value.trim();
23
22
  return email.length <= MAX_EMAIL_LENGTH && EMAIL_PATTERN.test(email);
24
23
  }
25
- //#endregion
26
- //#region src/validators/tax-number.ts
24
+ // src/validators/tax-number.ts
27
25
  const TAXPAYER_ID_WEIGHTS = [
28
26
  9,
29
27
  7,
@@ -72,5 +70,4 @@ function isValidHungarianGroupTaxNumber(value) {
72
70
  function isHungarianVatGroupMemberTaxNumber(value) {
73
71
  return parseHungarianTaxNumber(value)?.vatCode === "4";
74
72
  }
75
- //#endregion
76
73
  export { isValidHungarianTaxpayerId as a, normalizeEmail as c, weightedDigitSum as d, isValidHungarianTaxNumber as i, isDigits as l, isHungarianVatGroupMemberTaxNumber as n, parseHungarianTaxNumber as o, isValidHungarianGroupTaxNumber as r, isValidEmail as s, HUNGARIAN_TAX_COUNTY_CODES as t, stripSeparators as u };
@@ -1,4 +1,4 @@
1
- //#region src/validators/digits.ts
1
+ // src/validators/digits.ts
2
2
  const SEPARATORS = /[\s-]+/g;
3
3
  function stripSeparators(value) {
4
4
  return value.replace(SEPARATORS, "");
@@ -10,8 +10,7 @@ function isDigits(value, length) {
10
10
  function weightedDigitSum(digits, weights) {
11
11
  return [...digits].reduce((sum, digit, index) => sum + Number(digit) * Number(weights[index % weights.length]), 0);
12
12
  }
13
- //#endregion
14
- //#region src/validators/email.ts
13
+ // src/validators/email.ts
15
14
  const MAX_EMAIL_LENGTH = 254;
16
15
  const EMAIL_PATTERN = /^[^\s@]+@[^\s@.]+(?:\.[^\s@.]+)+$/;
17
16
  function normalizeEmail(value) {
@@ -22,8 +21,7 @@ function isValidEmail(value) {
22
21
  const email = value.trim();
23
22
  return email.length <= MAX_EMAIL_LENGTH && EMAIL_PATTERN.test(email);
24
23
  }
25
- //#endregion
26
- //#region src/validators/tax-number.ts
24
+ // src/validators/tax-number.ts
27
25
  const TAXPAYER_ID_WEIGHTS = [
28
26
  9,
29
27
  7,
@@ -72,7 +70,6 @@ function isValidHungarianGroupTaxNumber(value) {
72
70
  function isHungarianVatGroupMemberTaxNumber(value) {
73
71
  return parseHungarianTaxNumber(value)?.vatCode === "4";
74
72
  }
75
- //#endregion
76
73
  Object.defineProperty(exports, "HUNGARIAN_TAX_COUNTY_CODES", {
77
74
  enumerable: true,
78
75
  get: function() {
@@ -1,15 +1,15 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_create_once = require("../create-once-CHhDz0un.cjs");
3
- const require_errors = require("../errors-EE96_6D_.cjs");
4
- const require_binary = require("../binary-B89HM03_.cjs");
5
- const require_serialize = require("../serialize-CquIsxA-.cjs");
6
- const require_issue = require("../issue-Bin4tKD_.cjs");
7
- const require_dates = require("../dates-CPgBodkP.cjs");
8
- const require_rounding = require("../rounding-TxoWy2ww.cjs");
9
- const require_vat = require("../vat-g35srbNG.cjs");
10
- const require_money = require("../money-K9j0wPit.cjs");
11
- const require_create = require("../create-CvUvLUaT.cjs");
12
- //#region src/testing/fake-agent-http.ts
2
+ const require_create_once = require("../create-once-zeF7GVVP.cjs");
3
+ const require_errors = require("../errors-Bn6pe6yw.cjs");
4
+ const require_binary = require("../binary-CdpKlNNI.cjs");
5
+ const require_serialize = require("../serialize-DEU7r6Bk.cjs");
6
+ const require_issue = require("../issue-DReARZnF.cjs");
7
+ const require_dates = require("../dates-oOp3ypPP.cjs");
8
+ const require_rounding = require("../rounding-CHmSK5Z2.cjs");
9
+ const require_vat = require("../vat-BkoiiKm4.cjs");
10
+ const require_money = require("../money-NtVytaxG.cjs");
11
+ const require_create = require("../create-DH5jiZPA.cjs");
12
+ // src/testing/fake-agent-http.ts
13
13
  const XML_CONTENT_TYPE = "application/xml; charset=UTF-8";
14
14
  const TEXT_CONTENT_TYPE = "text/plain; charset=UTF-8";
15
15
  const PDF_CONTENT_TYPE = "application/pdf";
@@ -115,8 +115,7 @@ function toFetchResponse(response) {
115
115
  headers: response.headers
116
116
  });
117
117
  }
118
- //#endregion
119
- //#region src/testing/fake-agent-state.ts
118
+ // src/testing/fake-agent-state.ts
120
119
  var FakeAgentFailure = class extends Error {
121
120
  name = "FakeAgentFailure";
122
121
  code;
@@ -149,8 +148,7 @@ function fakePdf(label) {
149
148
  function taxpayerKey(value) {
150
149
  return value.replace(/\D/g, "").slice(0, 8);
151
150
  }
152
- //#endregion
153
- //#region src/testing/fake-agent-items.ts
151
+ // src/testing/fake-agent-items.ts
154
152
  const SERVER_VAT_CODES = /* @__PURE__ */ new Set([
155
153
  "TAM",
156
154
  "AAM",
@@ -332,8 +330,7 @@ function negateTotals(totals) {
332
330
  function outstandingOf(gross, paid) {
333
331
  return gross > 0 ? Math.max(0, sum([gross, -paid])) : 0;
334
332
  }
335
- //#endregion
336
- //#region src/testing/fake-agent-account.ts
333
+ // src/testing/fake-agent-account.ts
337
334
  const NAV_API_NAMESPACE = "http://schemas.nav.gov.hu/OSA/3.0/api";
338
335
  const TAXPAYER_ID_PATTERN = /^\d{8}$/;
339
336
  const CONNECT_PRINCIPAL_MESSAGES = {
@@ -459,8 +456,7 @@ function handleConnectPrincipal(state, request) {
459
456
  });
460
457
  return connectResponse(principal.joinRequests === 0 ? CONNECT_PRINCIPAL_MESSAGES.joinRequestSent : CONNECT_PRINCIPAL_MESSAGES.joinRequestResent);
461
458
  }
462
- //#endregion
463
- //#region src/testing/fake-agent-invoice-xml.ts
459
+ // src/testing/fake-agent-invoice-xml.ts
464
460
  const UNIFIED_PAYMENT_METHODS = [
465
461
  "átutalás",
466
462
  "készpénz",
@@ -613,8 +609,7 @@ function renderInvoiceXml(invoice, testAccount, includePdf) {
613
609
  ]
614
610
  });
615
611
  }
616
- //#endregion
617
- //#region src/testing/fake-agent-request.ts
612
+ // src/testing/fake-agent-request.ts
618
613
  const REQUEST_ROOTS = {
619
614
  createInvoice: "xmlszamla",
620
615
  reverseInvoice: "xmlszamlast",
@@ -726,8 +721,7 @@ function errorStyleFor(action, root) {
726
721
  case "connectPrincipal": return "text";
727
722
  }
728
723
  }
729
- //#endregion
730
- //#region src/testing/fake-agent-invoices.ts
724
+ // src/testing/fake-agent-invoices.ts
731
725
  const LANGUAGES = /* @__PURE__ */ new Set([
732
726
  "hu",
733
727
  "en",
@@ -1031,8 +1025,7 @@ function handleDeleteProforma(state, request) {
1031
1025
  });
1032
1026
  return xmlResponse(xmlDocument("xmlszamladbkdelvalasz", [require_serialize.el("sikeres", true)]));
1033
1027
  }
1034
- //#endregion
1035
- //#region src/testing/fake-agent-receipts.ts
1028
+ // src/testing/fake-agent-receipts.ts
1036
1029
  const PREFIX_PATTERN = /^[A-Z0-9]+$/;
1037
1030
  const MONEY_DECIMALS = 2;
1038
1031
  function requiredText(parent, name, path) {
@@ -1243,8 +1236,7 @@ function handleSendReceipt(state, request) {
1243
1236
  });
1244
1237
  return xmlResponse(xmlDocument("xmlnyugtasendvalasz", [require_serialize.el("sikeres", true)]));
1245
1238
  }
1246
- //#endregion
1247
- //#region src/testing/fake-agent.ts
1239
+ // src/testing/fake-agent.ts
1248
1240
  const HANDLERS = {
1249
1241
  createInvoice: handleCreateInvoice,
1250
1242
  reverseInvoice: handleReverseInvoice,
@@ -1475,8 +1467,7 @@ function createFakeAgentFetch(options = {}) {
1475
1467
  }
1476
1468
  };
1477
1469
  }
1478
- //#endregion
1479
- //#region src/testing/index.ts
1470
+ // src/testing/index.ts
1480
1471
  const MOCK_PDF = new TextEncoder().encode("%PDF-1.4\n1 0 obj << /Type /Catalog >> endobj\ntrailer << /Root 1 0 R >>\n%%EOF\n");
1481
1472
  function notFound(code, message) {
1482
1473
  return new require_errors.SzamlazzError(`[${code}] ${message}`, {
@@ -1986,7 +1977,6 @@ function createMockKassza(options = {}) {
1986
1977
  }))
1987
1978
  };
1988
1979
  }
1989
- //#endregion
1990
1980
  exports.CONNECT_PRINCIPAL_MESSAGES = CONNECT_PRINCIPAL_MESSAGES;
1991
1981
  exports.MOCK_PDF = MOCK_PDF;
1992
1982
  exports.createFakeAgentFetch = createFakeAgentFetch;
@@ -1,9 +1,8 @@
1
- import { a as AgentAction, t as KasszaWarning } from "../warnings-B3DXnveC.cjs";
2
- import { G as InvoiceType, M as CreateInvoiceInput, d as DocumentErrorMode, p as DocumentHook, st as SzamlazzError } from "../context-CFNKzStE.cjs";
3
- import { r as Receipt } from "../types-lnKkQdot.cjs";
4
- import { f as TaxpayerInfo, n as Kassza, r as KasszaDefaults } from "../client-SVZu25MB.cjs";
5
- import { n as InvoiceDetails, o as InvoiceDetailsPayment } from "../get-Byc9T5WO.cjs";
6
- //#region src/testing/fake-agent-state.d.ts
1
+ import { a as AgentAction, t as KasszaWarning } from "../warnings-DpuYhn39.cjs";
2
+ import { G as InvoiceType, M as CreateInvoiceInput, d as DocumentErrorMode, p as DocumentHook, st as SzamlazzError } from "../context-PwqY4JOK.cjs";
3
+ import { r as Receipt } from "../types-_HKTOCuQ.cjs";
4
+ import { f as TaxpayerInfo, n as Kassza, r as KasszaDefaults } from "../client-BT2odGYl.cjs";
5
+ import { n as InvoiceDetails, o as InvoiceDetailsPayment } from "../get-BL4Fr8-P.cjs";
7
6
  type FakeInvoiceTypeCode = "SZ" | "D" | "ES" | "VS" | "HS" | "SS" | "SL";
8
7
  interface FakeAgentSeller {
9
8
  readonly name: string;
@@ -128,8 +127,6 @@ interface FakeAgentTaxpayer {
128
127
  readonly address?: FakeAgentTaxpayerAddress | undefined;
129
128
  }
130
129
  type FakeAgentPrincipalState = "owned" | "unowned";
131
- //#endregion
132
- //#region src/testing/fake-agent-request.d.ts
133
130
  interface FakeAgentAttachment {
134
131
  readonly filename: string;
135
132
  readonly size: number;
@@ -139,8 +136,6 @@ interface FakeAgentRequestRecord {
139
136
  readonly xml: string | undefined;
140
137
  readonly attachments: readonly FakeAgentAttachment[];
141
138
  }
142
- //#endregion
143
- //#region src/testing/fake-agent.d.ts
144
139
  type FakeAgentFaultName = "ghostSuccess" | "timeout" | "networkError" | "serverError" | "maintenance" | "partialSuccess" | "testAccountLimit" | "duplicateCallId" | "duplicateOrderNumber";
145
140
  interface FakeAgentCodeFault {
146
141
  readonly code: number;
@@ -183,16 +178,12 @@ interface FakeAgent {
183
178
  reset(): void;
184
179
  }
185
180
  export declare function createFakeAgentFetch(options?: FakeAgentOptions): FakeAgent;
186
- //#endregion
187
- //#region src/testing/fake-agent-account.d.ts
188
181
  export declare const CONNECT_PRINCIPAL_MESSAGES: {
189
182
  readonly created: "DONE";
190
183
  readonly ownerInviteResent: "Már létező fiók, nincs fiókgazdája. Fiókgazdai meghívó (megbízott számlakibocsátás) email újraküldve.";
191
184
  readonly joinRequestSent: "Már létező fiók fiókgazdával. Csatlakozási kérelmet küldtünk a fiókgazdának.";
192
185
  readonly joinRequestResent: "Már létező fiók fiókgazdával. A csatlakozási kérelem emailt újraküldtük a fiókgazdának.";
193
186
  };
194
- //#endregion
195
- //#region src/testing/index.d.ts
196
187
  export declare const MOCK_PDF: Uint8Array;
197
188
  export interface MockInvoiceRecord {
198
189
  readonly number: string;
@@ -234,5 +225,4 @@ export interface MockKassza extends Kassza {
234
225
  reset(): void;
235
226
  }
236
227
  export declare function createMockKassza(options?: MockKasszaOptions): MockKassza;
237
- //#endregion
238
228
  export type { FakeAgent, FakeAgentAttachment, FakeAgentBuyer, FakeAgentCodeFault, FakeAgentDuplicateOrderNumbers, FakeAgentFault, FakeAgentFaultName, FakeAgentFaultOptions, FakeAgentInvoice, FakeAgentInvoicePayment, FakeAgentItem, FakeAgentItemLedger, FakeAgentOptions, FakeAgentPrincipalState, FakeAgentReceipt, FakeAgentReceiptPayment, FakeAgentRequestRecord, FakeAgentScheduledFault, FakeAgentSeller, FakeAgentTaxpayer, FakeAgentTaxpayerAddress, FakeAgentTotals, FakeInvoiceTypeCode };
@@ -1,9 +1,8 @@
1
- import { a as AgentAction, t as KasszaWarning } from "../warnings-B3DXnveC.js";
2
- import { G as InvoiceType, M as CreateInvoiceInput, d as DocumentErrorMode, p as DocumentHook, st as SzamlazzError } from "../context-kb33TgzE.js";
3
- import { r as Receipt } from "../types-D1zDOH_F.js";
4
- import { f as TaxpayerInfo, n as Kassza, r as KasszaDefaults } from "../client-DeWWQ-RZ.js";
5
- import { n as InvoiceDetails, o as InvoiceDetailsPayment } from "../get-Byc9T5WO.js";
6
- //#region src/testing/fake-agent-state.d.ts
1
+ import { a as AgentAction, t as KasszaWarning } from "../warnings-DpuYhn39.js";
2
+ import { G as InvoiceType, M as CreateInvoiceInput, d as DocumentErrorMode, p as DocumentHook, st as SzamlazzError } from "../context-BuX6Eion.js";
3
+ import { r as Receipt } from "../types-Z6rQoqHn.js";
4
+ import { f as TaxpayerInfo, n as Kassza, r as KasszaDefaults } from "../client-C-SYCiOZ.js";
5
+ import { n as InvoiceDetails, o as InvoiceDetailsPayment } from "../get-BL4Fr8-P.js";
7
6
  type FakeInvoiceTypeCode = "SZ" | "D" | "ES" | "VS" | "HS" | "SS" | "SL";
8
7
  interface FakeAgentSeller {
9
8
  readonly name: string;
@@ -128,8 +127,6 @@ interface FakeAgentTaxpayer {
128
127
  readonly address?: FakeAgentTaxpayerAddress | undefined;
129
128
  }
130
129
  type FakeAgentPrincipalState = "owned" | "unowned";
131
- //#endregion
132
- //#region src/testing/fake-agent-request.d.ts
133
130
  interface FakeAgentAttachment {
134
131
  readonly filename: string;
135
132
  readonly size: number;
@@ -139,8 +136,6 @@ interface FakeAgentRequestRecord {
139
136
  readonly xml: string | undefined;
140
137
  readonly attachments: readonly FakeAgentAttachment[];
141
138
  }
142
- //#endregion
143
- //#region src/testing/fake-agent.d.ts
144
139
  type FakeAgentFaultName = "ghostSuccess" | "timeout" | "networkError" | "serverError" | "maintenance" | "partialSuccess" | "testAccountLimit" | "duplicateCallId" | "duplicateOrderNumber";
145
140
  interface FakeAgentCodeFault {
146
141
  readonly code: number;
@@ -183,16 +178,12 @@ interface FakeAgent {
183
178
  reset(): void;
184
179
  }
185
180
  export declare function createFakeAgentFetch(options?: FakeAgentOptions): FakeAgent;
186
- //#endregion
187
- //#region src/testing/fake-agent-account.d.ts
188
181
  export declare const CONNECT_PRINCIPAL_MESSAGES: {
189
182
  readonly created: "DONE";
190
183
  readonly ownerInviteResent: "Már létező fiók, nincs fiókgazdája. Fiókgazdai meghívó (megbízott számlakibocsátás) email újraküldve.";
191
184
  readonly joinRequestSent: "Már létező fiók fiókgazdával. Csatlakozási kérelmet küldtünk a fiókgazdának.";
192
185
  readonly joinRequestResent: "Már létező fiók fiókgazdával. A csatlakozási kérelem emailt újraküldtük a fiókgazdának.";
193
186
  };
194
- //#endregion
195
- //#region src/testing/index.d.ts
196
187
  export declare const MOCK_PDF: Uint8Array;
197
188
  export interface MockInvoiceRecord {
198
189
  readonly number: string;
@@ -234,5 +225,4 @@ export interface MockKassza extends Kassza {
234
225
  reset(): void;
235
226
  }
236
227
  export declare function createMockKassza(options?: MockKasszaOptions): MockKassza;
237
- //#endregion
238
228
  export type { FakeAgent, FakeAgentAttachment, FakeAgentBuyer, FakeAgentCodeFault, FakeAgentDuplicateOrderNumbers, FakeAgentFault, FakeAgentFaultName, FakeAgentFaultOptions, FakeAgentInvoice, FakeAgentInvoicePayment, FakeAgentItem, FakeAgentItemLedger, FakeAgentOptions, FakeAgentPrincipalState, FakeAgentReceipt, FakeAgentReceiptPayment, FakeAgentRequestRecord, FakeAgentScheduledFault, FakeAgentSeller, FakeAgentTaxpayer, FakeAgentTaxpayerAddress, FakeAgentTotals, FakeInvoiceTypeCode };
@@ -1,14 +1,14 @@
1
- import { c as resolveInvoice, g as AGENT_ACTIONS, m as emitDocumentEvent, r as registerPaymentOnce, t as createReceiptOnce } from "../create-once-CW0x_yvp.js";
2
- import { r as SzamlazzError, t as AGENT_ERROR_CODES } from "../errors-DtN4g5Z9.js";
3
- import { i as encodeUtf8, n as bytesToBase64 } from "../binary-D0M9U2MD.js";
4
- import { a as optionalEl, c as childNumber, d as findChildren, f as parseXml, i as formatXmlNumber, l as childText, n as buildXmlDocument, r as el, s as childBoolean, u as findChild } from "../serialize-B2eFh3D-.js";
5
- import { l as createInvoiceOnce, n as issueForPayment, o as convertReceiptToInvoice } from "../issue-DMA1Nbr1.js";
6
- import { n as toAgentDate, r as toBudapestDate } from "../dates-CXyj7Azy.js";
7
- import { n as decimalPlaces, r as roundMoney } from "../rounding-BLyHjjI5.js";
8
- import { i as isHuf, t as NUMERIC_VAT_RATES } from "../vat-v_dcWCto.js";
9
- import { a as summarizeItems } from "../money-Cw457SD6.js";
10
- import { n as calculateReceiptItems, t as buildCreateReceiptXml } from "../create-CflXrPip.js";
11
- //#region src/testing/fake-agent-http.ts
1
+ import { c as resolveInvoice, g as AGENT_ACTIONS, m as emitDocumentEvent, r as registerPaymentOnce, t as createReceiptOnce } from "../create-once-B6cAXyET.js";
2
+ import { r as SzamlazzError, t as AGENT_ERROR_CODES } from "../errors-CGGsW0Y5.js";
3
+ import { i as encodeUtf8, n as bytesToBase64 } from "../binary-DuKBSfH-.js";
4
+ import { a as optionalEl, c as childNumber, d as findChildren, f as parseXml, i as formatXmlNumber, l as childText, n as buildXmlDocument, r as el, s as childBoolean, u as findChild } from "../serialize-CjymGkJj.js";
5
+ import { l as createInvoiceOnce, n as issueForPayment, o as convertReceiptToInvoice } from "../issue-Dy9zvRK1.js";
6
+ import { n as toAgentDate, r as toBudapestDate } from "../dates-DWsZOdaO.js";
7
+ import { n as decimalPlaces, r as roundMoney } from "../rounding-CZLj4DbV.js";
8
+ import { i as isHuf, t as NUMERIC_VAT_RATES } from "../vat-B4J5Q0tu.js";
9
+ import { a as summarizeItems } from "../money-f280VT77.js";
10
+ import { n as calculateReceiptItems, t as buildCreateReceiptXml } from "../create-BwRslos0.js";
11
+ // src/testing/fake-agent-http.ts
12
12
  const XML_CONTENT_TYPE = "application/xml; charset=UTF-8";
13
13
  const TEXT_CONTENT_TYPE = "text/plain; charset=UTF-8";
14
14
  const PDF_CONTENT_TYPE = "application/pdf";
@@ -114,8 +114,7 @@ function toFetchResponse(response) {
114
114
  headers: response.headers
115
115
  });
116
116
  }
117
- //#endregion
118
- //#region src/testing/fake-agent-state.ts
117
+ // src/testing/fake-agent-state.ts
119
118
  var FakeAgentFailure = class extends Error {
120
119
  name = "FakeAgentFailure";
121
120
  code;
@@ -148,8 +147,7 @@ function fakePdf(label) {
148
147
  function taxpayerKey(value) {
149
148
  return value.replace(/\D/g, "").slice(0, 8);
150
149
  }
151
- //#endregion
152
- //#region src/testing/fake-agent-items.ts
150
+ // src/testing/fake-agent-items.ts
153
151
  const SERVER_VAT_CODES = /* @__PURE__ */ new Set([
154
152
  "TAM",
155
153
  "AAM",
@@ -331,8 +329,7 @@ function negateTotals(totals) {
331
329
  function outstandingOf(gross, paid) {
332
330
  return gross > 0 ? Math.max(0, sum([gross, -paid])) : 0;
333
331
  }
334
- //#endregion
335
- //#region src/testing/fake-agent-account.ts
332
+ // src/testing/fake-agent-account.ts
336
333
  const NAV_API_NAMESPACE = "http://schemas.nav.gov.hu/OSA/3.0/api";
337
334
  const TAXPAYER_ID_PATTERN = /^\d{8}$/;
338
335
  const CONNECT_PRINCIPAL_MESSAGES = {
@@ -458,8 +455,7 @@ function handleConnectPrincipal(state, request) {
458
455
  });
459
456
  return connectResponse(principal.joinRequests === 0 ? CONNECT_PRINCIPAL_MESSAGES.joinRequestSent : CONNECT_PRINCIPAL_MESSAGES.joinRequestResent);
460
457
  }
461
- //#endregion
462
- //#region src/testing/fake-agent-invoice-xml.ts
458
+ // src/testing/fake-agent-invoice-xml.ts
463
459
  const UNIFIED_PAYMENT_METHODS = [
464
460
  "átutalás",
465
461
  "készpénz",
@@ -612,8 +608,7 @@ function renderInvoiceXml(invoice, testAccount, includePdf) {
612
608
  ]
613
609
  });
614
610
  }
615
- //#endregion
616
- //#region src/testing/fake-agent-request.ts
611
+ // src/testing/fake-agent-request.ts
617
612
  const REQUEST_ROOTS = {
618
613
  createInvoice: "xmlszamla",
619
614
  reverseInvoice: "xmlszamlast",
@@ -725,8 +720,7 @@ function errorStyleFor(action, root) {
725
720
  case "connectPrincipal": return "text";
726
721
  }
727
722
  }
728
- //#endregion
729
- //#region src/testing/fake-agent-invoices.ts
723
+ // src/testing/fake-agent-invoices.ts
730
724
  const LANGUAGES = /* @__PURE__ */ new Set([
731
725
  "hu",
732
726
  "en",
@@ -1030,8 +1024,7 @@ function handleDeleteProforma(state, request) {
1030
1024
  });
1031
1025
  return xmlResponse(xmlDocument("xmlszamladbkdelvalasz", [el("sikeres", true)]));
1032
1026
  }
1033
- //#endregion
1034
- //#region src/testing/fake-agent-receipts.ts
1027
+ // src/testing/fake-agent-receipts.ts
1035
1028
  const PREFIX_PATTERN = /^[A-Z0-9]+$/;
1036
1029
  const MONEY_DECIMALS = 2;
1037
1030
  function requiredText(parent, name, path) {
@@ -1242,8 +1235,7 @@ function handleSendReceipt(state, request) {
1242
1235
  });
1243
1236
  return xmlResponse(xmlDocument("xmlnyugtasendvalasz", [el("sikeres", true)]));
1244
1237
  }
1245
- //#endregion
1246
- //#region src/testing/fake-agent.ts
1238
+ // src/testing/fake-agent.ts
1247
1239
  const HANDLERS = {
1248
1240
  createInvoice: handleCreateInvoice,
1249
1241
  reverseInvoice: handleReverseInvoice,
@@ -1474,8 +1466,7 @@ function createFakeAgentFetch(options = {}) {
1474
1466
  }
1475
1467
  };
1476
1468
  }
1477
- //#endregion
1478
- //#region src/testing/index.ts
1469
+ // src/testing/index.ts
1479
1470
  const MOCK_PDF = new TextEncoder().encode("%PDF-1.4\n1 0 obj << /Type /Catalog >> endobj\ntrailer << /Root 1 0 R >>\n%%EOF\n");
1480
1471
  function notFound(code, message) {
1481
1472
  return new SzamlazzError(`[${code}] ${message}`, {
@@ -1985,5 +1976,4 @@ function createMockKassza(options = {}) {
1985
1976
  }))
1986
1977
  };
1987
1978
  }
1988
- //#endregion
1989
1979
  export { CONNECT_PRINCIPAL_MESSAGES, MOCK_PDF, createFakeAgentFetch, createMockKassza };
@@ -1,4 +1,3 @@
1
- //#region src/storage/types.d.ts
2
1
  interface StoredFile {
3
2
  readonly key: string;
4
3
  readonly url?: string | undefined;
@@ -22,5 +21,4 @@ interface CompleteStorageAdapter extends StorageAdapter {
22
21
  delete(key: string): Promise<void>;
23
22
  getUrl(key: string, options?: StorageUrlOptions): Promise<string>;
24
23
  }
25
- //#endregion
26
24
  export { StoredFile as a, StorageUrlOptions as i, StorageAdapter as n, StoragePutOptions as r, CompleteStorageAdapter as t };
@@ -1,4 +1,3 @@
1
- //#region src/storage/types.d.ts
2
1
  interface StoredFile {
3
2
  readonly key: string;
4
3
  readonly url?: string | undefined;
@@ -22,5 +21,4 @@ interface CompleteStorageAdapter extends StorageAdapter {
22
21
  delete(key: string): Promise<void>;
23
22
  getUrl(key: string, options?: StorageUrlOptions): Promise<string>;
24
23
  }
25
- //#endregion
26
24
  export { StoredFile as a, StorageUrlOptions as i, StorageAdapter as n, StoragePutOptions as r, CompleteStorageAdapter as t };