umwd-components 0.1.827 → 0.1.828

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 (440) hide show
  1. package/dist/cjs/node_modules/object-assign/index.js +2 -2
  2. package/dist/cjs/node_modules/prop-types/factoryWithTypeCheckers.js +1 -1
  3. package/dist/cjs/node_modules/prop-types/index.js +1 -1
  4. package/dist/cjs/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  5. package/dist/cjs/node_modules/safe-buffer/index.js +1 -1
  6. package/dist/cjs/src/components/e-commerce/products/EditReturnStockForm.js +1 -1
  7. package/dist/cjs/src/components/logistics/report/ReportMakingComponent.js +1 -1
  8. package/dist/cjs/src/components/logistics/vendor/EditVendorForm.js +1 -1
  9. package/dist/cjs/src/data/actions/logistics/note/createNoteAction.js +1 -1
  10. package/dist/cjs/src/data/actions/logistics/report/createReportAction.js +1 -1
  11. package/dist/cjs/src/index.js +1 -1
  12. package/dist/cjs/tsconfig.build.tsbuildinfo +1 -1
  13. package/dist/esm/_virtual/index2.js +2 -2
  14. package/dist/esm/_virtual/index3.js +2 -2
  15. package/dist/esm/_virtual/index4.js +2 -2
  16. package/dist/esm/node_modules/object-assign/index.js +74 -69
  17. package/dist/esm/node_modules/prop-types/factoryWithTypeCheckers.js +2 -2
  18. package/dist/esm/node_modules/prop-types/index.js +1 -1
  19. package/dist/esm/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  20. package/dist/esm/node_modules/safe-buffer/index.js +1 -1
  21. package/dist/esm/src/components/e-commerce/products/EditReturnStockForm.js +11 -22
  22. package/dist/esm/src/components/logistics/report/ReportMakingComponent.js +0 -1
  23. package/dist/esm/src/components/logistics/vendor/EditVendorForm.js +0 -1
  24. package/dist/esm/src/data/actions/logistics/note/createNoteAction.js +0 -2
  25. package/dist/esm/src/data/actions/logistics/report/createReportAction.js +0 -2
  26. package/dist/esm/src/index.js +0 -1
  27. package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
  28. package/dist/esm/types/data/actions/e-commerce/lead/contactFormAction.d.ts +1 -0
  29. package/dist/esm/types/index.d.ts +0 -3
  30. package/package.json +1 -1
  31. package/dist/cjs/_virtual/_commonjs-dynamic-modules.js +0 -6
  32. package/dist/cjs/_virtual/aes.js +0 -6
  33. package/dist/cjs/_virtual/b64.js +0 -6
  34. package/dist/cjs/_virtual/blowfish.js +0 -6
  35. package/dist/cjs/_virtual/cipher-core.js +0 -6
  36. package/dist/cjs/_virtual/clone.js +0 -6
  37. package/dist/cjs/_virtual/common.js +0 -6
  38. package/dist/cjs/_virtual/context.js +0 -6
  39. package/dist/cjs/_virtual/core2.js +0 -6
  40. package/dist/cjs/_virtual/decode.js +0 -6
  41. package/dist/cjs/_virtual/deflate.js +0 -6
  42. package/dist/cjs/_virtual/dictionary-browser.js +0 -6
  43. package/dist/cjs/_virtual/dictionary.js +0 -6
  44. package/dist/cjs/_virtual/en-us.js +0 -6
  45. package/dist/cjs/_virtual/enc-base64.js +0 -6
  46. package/dist/cjs/_virtual/enc-base64url.js +0 -6
  47. package/dist/cjs/_virtual/enc-utf16.js +0 -6
  48. package/dist/cjs/_virtual/events.js +0 -6
  49. package/dist/cjs/_virtual/evpkdf.js +0 -6
  50. package/dist/cjs/_virtual/format-hex.js +0 -6
  51. package/dist/cjs/_virtual/hmac.js +0 -6
  52. package/dist/cjs/_virtual/huffman.js +0 -6
  53. package/dist/cjs/_virtual/hyphen.js +0 -6
  54. package/dist/cjs/_virtual/index10.js +0 -6
  55. package/dist/cjs/_virtual/index5.js +0 -6
  56. package/dist/cjs/_virtual/index6.js +0 -6
  57. package/dist/cjs/_virtual/index7.js +0 -6
  58. package/dist/cjs/_virtual/index8.js +0 -6
  59. package/dist/cjs/_virtual/index9.js +0 -6
  60. package/dist/cjs/_virtual/inflate.js +0 -6
  61. package/dist/cjs/_virtual/inherits_browser.js +0 -6
  62. package/dist/cjs/_virtual/lib-typedarrays.js +0 -6
  63. package/dist/cjs/_virtual/md5.js +0 -6
  64. package/dist/cjs/_virtual/mode-cfb.js +0 -6
  65. package/dist/cjs/_virtual/mode-ctr-gladman.js +0 -6
  66. package/dist/cjs/_virtual/mode-ctr.js +0 -6
  67. package/dist/cjs/_virtual/mode-ecb.js +0 -6
  68. package/dist/cjs/_virtual/mode-ofb.js +0 -6
  69. package/dist/cjs/_virtual/pad-ansix923.js +0 -6
  70. package/dist/cjs/_virtual/pad-iso10126.js +0 -6
  71. package/dist/cjs/_virtual/pad-iso97971.js +0 -6
  72. package/dist/cjs/_virtual/pad-nopadding.js +0 -6
  73. package/dist/cjs/_virtual/pad-zeropadding.js +0 -6
  74. package/dist/cjs/_virtual/pbkdf2.js +0 -6
  75. package/dist/cjs/_virtual/prefix.js +0 -6
  76. package/dist/cjs/_virtual/rabbit-legacy.js +0 -6
  77. package/dist/cjs/_virtual/rabbit.js +0 -6
  78. package/dist/cjs/_virtual/rc4.js +0 -6
  79. package/dist/cjs/_virtual/ripemd160.js +0 -6
  80. package/dist/cjs/_virtual/scheduler.development.js +0 -6
  81. package/dist/cjs/_virtual/scheduler.production.js +0 -6
  82. package/dist/cjs/_virtual/sha1.js +0 -6
  83. package/dist/cjs/_virtual/sha224.js +0 -6
  84. package/dist/cjs/_virtual/sha256.js +0 -6
  85. package/dist/cjs/_virtual/sha3.js +0 -6
  86. package/dist/cjs/_virtual/sha384.js +0 -6
  87. package/dist/cjs/_virtual/sha512.js +0 -6
  88. package/dist/cjs/_virtual/streams.js +0 -6
  89. package/dist/cjs/_virtual/transform.js +0 -6
  90. package/dist/cjs/_virtual/trees.js +0 -6
  91. package/dist/cjs/_virtual/tripledes.js +0 -6
  92. package/dist/cjs/_virtual/x64-core.js +0 -6
  93. package/dist/cjs/node_modules/@react-pdf/fns/lib/index.js +0 -6
  94. package/dist/cjs/node_modules/@react-pdf/font/lib/index.browser.js +0 -6
  95. package/dist/cjs/node_modules/@react-pdf/image/lib/index.browser.js +0 -6
  96. package/dist/cjs/node_modules/@react-pdf/layout/lib/index.js +0 -6
  97. package/dist/cjs/node_modules/@react-pdf/pdfkit/lib/pdfkit.browser.js +0 -6
  98. package/dist/cjs/node_modules/@react-pdf/png-js/lib/png-js.browser.js +0 -6
  99. package/dist/cjs/node_modules/@react-pdf/primitives/lib/index.js +0 -6
  100. package/dist/cjs/node_modules/@react-pdf/reconciler/lib/index.js +0 -6
  101. package/dist/cjs/node_modules/@react-pdf/reconciler/lib/reconciler-23.js +0 -14
  102. package/dist/cjs/node_modules/@react-pdf/reconciler/lib/reconciler-31.js +0 -26
  103. package/dist/cjs/node_modules/@react-pdf/render/lib/index.js +0 -6
  104. package/dist/cjs/node_modules/@react-pdf/renderer/lib/react-pdf.browser.js +0 -6
  105. package/dist/cjs/node_modules/@react-pdf/stylesheet/lib/index.js +0 -6
  106. package/dist/cjs/node_modules/@react-pdf/textkit/lib/textkit.js +0 -13
  107. package/dist/cjs/node_modules/@swc/helpers/esm/_define_property.js +0 -6
  108. package/dist/cjs/node_modules/abs-svg-path/index.js +0 -6
  109. package/dist/cjs/node_modules/base64-js/index.js +0 -6
  110. package/dist/cjs/node_modules/bidi-js/dist/bidi.js +0 -6
  111. package/dist/cjs/node_modules/brotli/dec/bit_reader.js +0 -6
  112. package/dist/cjs/node_modules/brotli/dec/context.js +0 -6
  113. package/dist/cjs/node_modules/brotli/dec/decode.js +0 -6
  114. package/dist/cjs/node_modules/brotli/dec/dictionary-browser.js +0 -6
  115. package/dist/cjs/node_modules/brotli/dec/dictionary.bin.js +0 -6
  116. package/dist/cjs/node_modules/brotli/dec/dictionary.js +0 -6
  117. package/dist/cjs/node_modules/brotli/dec/huffman.js +0 -6
  118. package/dist/cjs/node_modules/brotli/dec/prefix.js +0 -6
  119. package/dist/cjs/node_modules/brotli/dec/streams.js +0 -6
  120. package/dist/cjs/node_modules/brotli/dec/transform.js +0 -6
  121. package/dist/cjs/node_modules/brotli/decompress.js +0 -6
  122. package/dist/cjs/node_modules/clone/clone.js +0 -6
  123. package/dist/cjs/node_modules/color-name/index.js +0 -6
  124. package/dist/cjs/node_modules/color-string/index.js +0 -6
  125. package/dist/cjs/node_modules/crypto-js/aes.js +0 -6
  126. package/dist/cjs/node_modules/crypto-js/blowfish.js +0 -6
  127. package/dist/cjs/node_modules/crypto-js/cipher-core.js +0 -6
  128. package/dist/cjs/node_modules/crypto-js/core.js +0 -6
  129. package/dist/cjs/node_modules/crypto-js/enc-base64.js +0 -6
  130. package/dist/cjs/node_modules/crypto-js/enc-base64url.js +0 -6
  131. package/dist/cjs/node_modules/crypto-js/enc-utf16.js +0 -6
  132. package/dist/cjs/node_modules/crypto-js/evpkdf.js +0 -6
  133. package/dist/cjs/node_modules/crypto-js/format-hex.js +0 -6
  134. package/dist/cjs/node_modules/crypto-js/hmac.js +0 -6
  135. package/dist/cjs/node_modules/crypto-js/index.js +0 -6
  136. package/dist/cjs/node_modules/crypto-js/lib-typedarrays.js +0 -6
  137. package/dist/cjs/node_modules/crypto-js/md5.js +0 -6
  138. package/dist/cjs/node_modules/crypto-js/mode-cfb.js +0 -6
  139. package/dist/cjs/node_modules/crypto-js/mode-ctr-gladman.js +0 -12
  140. package/dist/cjs/node_modules/crypto-js/mode-ctr.js +0 -6
  141. package/dist/cjs/node_modules/crypto-js/mode-ecb.js +0 -6
  142. package/dist/cjs/node_modules/crypto-js/mode-ofb.js +0 -6
  143. package/dist/cjs/node_modules/crypto-js/pad-ansix923.js +0 -6
  144. package/dist/cjs/node_modules/crypto-js/pad-iso10126.js +0 -6
  145. package/dist/cjs/node_modules/crypto-js/pad-iso97971.js +0 -6
  146. package/dist/cjs/node_modules/crypto-js/pad-nopadding.js +0 -6
  147. package/dist/cjs/node_modules/crypto-js/pad-zeropadding.js +0 -6
  148. package/dist/cjs/node_modules/crypto-js/pbkdf2.js +0 -6
  149. package/dist/cjs/node_modules/crypto-js/rabbit-legacy.js +0 -6
  150. package/dist/cjs/node_modules/crypto-js/rabbit.js +0 -6
  151. package/dist/cjs/node_modules/crypto-js/rc4.js +0 -6
  152. package/dist/cjs/node_modules/crypto-js/ripemd160.js +0 -17
  153. package/dist/cjs/node_modules/crypto-js/sha1.js +0 -6
  154. package/dist/cjs/node_modules/crypto-js/sha224.js +0 -6
  155. package/dist/cjs/node_modules/crypto-js/sha256.js +0 -6
  156. package/dist/cjs/node_modules/crypto-js/sha3.js +0 -6
  157. package/dist/cjs/node_modules/crypto-js/sha384.js +0 -6
  158. package/dist/cjs/node_modules/crypto-js/sha512.js +0 -6
  159. package/dist/cjs/node_modules/crypto-js/tripledes.js +0 -6
  160. package/dist/cjs/node_modules/crypto-js/x64-core.js +0 -6
  161. package/dist/cjs/node_modules/dfa/index.js +0 -6
  162. package/dist/cjs/node_modules/emoji-regex/index.js +0 -6
  163. package/dist/cjs/node_modules/events/events.js +0 -6
  164. package/dist/cjs/node_modules/fast-deep-equal/index.js +0 -6
  165. package/dist/cjs/node_modules/fontkit/dist/browser-module.js +0 -6
  166. package/dist/cjs/node_modules/hsl-to-hex/index.js +0 -6
  167. package/dist/cjs/node_modules/hsl-to-rgb-for-reals/converter.js +0 -6
  168. package/dist/cjs/node_modules/hyphen/hyphen.js +0 -6
  169. package/dist/cjs/node_modules/hyphen/patterns/en-us.js +0 -6
  170. package/dist/cjs/node_modules/inherits/inherits_browser.js +0 -6
  171. package/dist/cjs/node_modules/jay-peg/src/index.js +0 -6
  172. package/dist/cjs/node_modules/jay-peg/src/markers/dac.js +0 -6
  173. package/dist/cjs/node_modules/jay-peg/src/markers/dht.js +0 -6
  174. package/dist/cjs/node_modules/jay-peg/src/markers/dqt.js +0 -6
  175. package/dist/cjs/node_modules/jay-peg/src/markers/dri.js +0 -6
  176. package/dist/cjs/node_modules/jay-peg/src/markers/eoi.js +0 -6
  177. package/dist/cjs/node_modules/jay-peg/src/markers/exif.js +0 -6
  178. package/dist/cjs/node_modules/jay-peg/src/markers/jfif.js +0 -6
  179. package/dist/cjs/node_modules/jay-peg/src/markers/sof.js +0 -6
  180. package/dist/cjs/node_modules/jay-peg/src/markers/soi.js +0 -6
  181. package/dist/cjs/node_modules/jay-peg/src/markers/sos.js +0 -6
  182. package/dist/cjs/node_modules/jay-peg/src/markers/utils.js +0 -6
  183. package/dist/cjs/node_modules/linebreak/dist/module.js +0 -6
  184. package/dist/cjs/node_modules/linebreak/node_modules/base64-js/lib/b64.js +0 -6
  185. package/dist/cjs/node_modules/media-engine/src/index.js +0 -6
  186. package/dist/cjs/node_modules/media-engine/src/operators.js +0 -6
  187. package/dist/cjs/node_modules/media-engine/src/parser.js +0 -6
  188. package/dist/cjs/node_modules/media-engine/src/queries.js +0 -6
  189. package/dist/cjs/node_modules/normalize-svg-path/index.js +0 -6
  190. package/dist/cjs/node_modules/pako/lib/utils/common.js +0 -6
  191. package/dist/cjs/node_modules/pako/lib/zlib/adler32.js +0 -6
  192. package/dist/cjs/node_modules/pako/lib/zlib/constants.js +0 -6
  193. package/dist/cjs/node_modules/pako/lib/zlib/crc32.js +0 -6
  194. package/dist/cjs/node_modules/pako/lib/zlib/deflate.js +0 -6
  195. package/dist/cjs/node_modules/pako/lib/zlib/inffast.js +0 -6
  196. package/dist/cjs/node_modules/pako/lib/zlib/inflate.js +0 -6
  197. package/dist/cjs/node_modules/pako/lib/zlib/inftrees.js +0 -6
  198. package/dist/cjs/node_modules/pako/lib/zlib/messages.js +0 -6
  199. package/dist/cjs/node_modules/pako/lib/zlib/trees.js +0 -6
  200. package/dist/cjs/node_modules/pako/lib/zlib/zstream.js +0 -6
  201. package/dist/cjs/node_modules/parse-svg-path/index.js +0 -6
  202. package/dist/cjs/node_modules/postcss-value-parser/lib/parse.js +0 -6
  203. package/dist/cjs/node_modules/postcss-value-parser/lib/unit.js +0 -6
  204. package/dist/cjs/node_modules/queue/index.js +0 -6
  205. package/dist/cjs/node_modules/restructure/src/Array.js +0 -6
  206. package/dist/cjs/node_modules/restructure/src/Base.js +0 -6
  207. package/dist/cjs/node_modules/restructure/src/Bitfield.js +0 -6
  208. package/dist/cjs/node_modules/restructure/src/Buffer.js +0 -6
  209. package/dist/cjs/node_modules/restructure/src/DecodeStream.js +0 -6
  210. package/dist/cjs/node_modules/restructure/src/EncodeStream.js +0 -6
  211. package/dist/cjs/node_modules/restructure/src/LazyArray.js +0 -6
  212. package/dist/cjs/node_modules/restructure/src/Number.js +0 -6
  213. package/dist/cjs/node_modules/restructure/src/Optional.js +0 -6
  214. package/dist/cjs/node_modules/restructure/src/Pointer.js +0 -6
  215. package/dist/cjs/node_modules/restructure/src/Reserved.js +0 -6
  216. package/dist/cjs/node_modules/restructure/src/String.js +0 -6
  217. package/dist/cjs/node_modules/restructure/src/Struct.js +0 -6
  218. package/dist/cjs/node_modules/restructure/src/VersionedStruct.js +0 -6
  219. package/dist/cjs/node_modules/restructure/src/utils.js +0 -6
  220. package/dist/cjs/node_modules/scheduler/cjs/scheduler.development.js +0 -15
  221. package/dist/cjs/node_modules/scheduler/cjs/scheduler.production.js +0 -15
  222. package/dist/cjs/node_modules/scheduler/index.js +0 -6
  223. package/dist/cjs/node_modules/simple-swizzle/index.js +0 -6
  224. package/dist/cjs/node_modules/simple-swizzle/node_modules/is-arrayish/index.js +0 -6
  225. package/dist/cjs/node_modules/svg-arc-to-cubic-bezier/modules/index.js +0 -6
  226. package/dist/cjs/node_modules/tiny-inflate/index.js +0 -6
  227. package/dist/cjs/node_modules/tslib/tslib.es6.js +0 -6
  228. package/dist/cjs/node_modules/unicode-properties/dist/module.js +0 -6
  229. package/dist/cjs/node_modules/unicode-trie/index.js +0 -6
  230. package/dist/cjs/node_modules/unicode-trie/swap.js +0 -6
  231. package/dist/cjs/node_modules/yoga-layout/dist/binaries/yoga-wasm-base64-esm.js +0 -6
  232. package/dist/cjs/node_modules/yoga-layout/dist/src/generated/YGEnums.js +0 -6
  233. package/dist/cjs/node_modules/yoga-layout/dist/src/load.js +0 -6
  234. package/dist/cjs/node_modules/yoga-layout/dist/src/wrapAssembly.js +0 -6
  235. package/dist/cjs/src/components/e-commerce/invoice/InvoicePDF.js +0 -7
  236. package/dist/esm/_virtual/_commonjs-dynamic-modules.js +0 -11
  237. package/dist/esm/_virtual/aes.js +0 -9
  238. package/dist/esm/_virtual/b64.js +0 -9
  239. package/dist/esm/_virtual/blowfish.js +0 -9
  240. package/dist/esm/_virtual/cipher-core.js +0 -9
  241. package/dist/esm/_virtual/clone.js +0 -9
  242. package/dist/esm/_virtual/common.js +0 -9
  243. package/dist/esm/_virtual/context.js +0 -9
  244. package/dist/esm/_virtual/core2.js +0 -9
  245. package/dist/esm/_virtual/decode.js +0 -9
  246. package/dist/esm/_virtual/deflate.js +0 -9
  247. package/dist/esm/_virtual/dictionary-browser.js +0 -9
  248. package/dist/esm/_virtual/dictionary.js +0 -9
  249. package/dist/esm/_virtual/en-us.js +0 -9
  250. package/dist/esm/_virtual/enc-base64.js +0 -9
  251. package/dist/esm/_virtual/enc-base64url.js +0 -9
  252. package/dist/esm/_virtual/enc-utf16.js +0 -9
  253. package/dist/esm/_virtual/events.js +0 -9
  254. package/dist/esm/_virtual/evpkdf.js +0 -9
  255. package/dist/esm/_virtual/format-hex.js +0 -9
  256. package/dist/esm/_virtual/hmac.js +0 -9
  257. package/dist/esm/_virtual/huffman.js +0 -9
  258. package/dist/esm/_virtual/hyphen.js +0 -9
  259. package/dist/esm/_virtual/index10.js +0 -9
  260. package/dist/esm/_virtual/index5.js +0 -9
  261. package/dist/esm/_virtual/index6.js +0 -9
  262. package/dist/esm/_virtual/index7.js +0 -9
  263. package/dist/esm/_virtual/index8.js +0 -9
  264. package/dist/esm/_virtual/index9.js +0 -9
  265. package/dist/esm/_virtual/inflate.js +0 -9
  266. package/dist/esm/_virtual/inherits_browser.js +0 -9
  267. package/dist/esm/_virtual/lib-typedarrays.js +0 -9
  268. package/dist/esm/_virtual/md5.js +0 -9
  269. package/dist/esm/_virtual/mode-cfb.js +0 -9
  270. package/dist/esm/_virtual/mode-ctr-gladman.js +0 -9
  271. package/dist/esm/_virtual/mode-ctr.js +0 -9
  272. package/dist/esm/_virtual/mode-ecb.js +0 -9
  273. package/dist/esm/_virtual/mode-ofb.js +0 -9
  274. package/dist/esm/_virtual/pad-ansix923.js +0 -9
  275. package/dist/esm/_virtual/pad-iso10126.js +0 -9
  276. package/dist/esm/_virtual/pad-iso97971.js +0 -9
  277. package/dist/esm/_virtual/pad-nopadding.js +0 -9
  278. package/dist/esm/_virtual/pad-zeropadding.js +0 -9
  279. package/dist/esm/_virtual/pbkdf2.js +0 -9
  280. package/dist/esm/_virtual/prefix.js +0 -9
  281. package/dist/esm/_virtual/rabbit-legacy.js +0 -9
  282. package/dist/esm/_virtual/rabbit.js +0 -9
  283. package/dist/esm/_virtual/rc4.js +0 -9
  284. package/dist/esm/_virtual/ripemd160.js +0 -9
  285. package/dist/esm/_virtual/scheduler.development.js +0 -9
  286. package/dist/esm/_virtual/scheduler.production.js +0 -9
  287. package/dist/esm/_virtual/sha1.js +0 -9
  288. package/dist/esm/_virtual/sha224.js +0 -9
  289. package/dist/esm/_virtual/sha256.js +0 -9
  290. package/dist/esm/_virtual/sha3.js +0 -9
  291. package/dist/esm/_virtual/sha384.js +0 -9
  292. package/dist/esm/_virtual/sha512.js +0 -9
  293. package/dist/esm/_virtual/streams.js +0 -9
  294. package/dist/esm/_virtual/transform.js +0 -9
  295. package/dist/esm/_virtual/trees.js +0 -9
  296. package/dist/esm/_virtual/tripledes.js +0 -9
  297. package/dist/esm/_virtual/x64-core.js +0 -9
  298. package/dist/esm/node_modules/@react-pdf/fns/lib/index.js +0 -254
  299. package/dist/esm/node_modules/@react-pdf/font/lib/index.browser.js +0 -481
  300. package/dist/esm/node_modules/@react-pdf/image/lib/index.browser.js +0 -2217
  301. package/dist/esm/node_modules/@react-pdf/layout/lib/index.js +0 -2982
  302. package/dist/esm/node_modules/@react-pdf/pdfkit/lib/pdfkit.browser.js +0 -47429
  303. package/dist/esm/node_modules/@react-pdf/png-js/lib/png-js.browser.js +0 -12606
  304. package/dist/esm/node_modules/@react-pdf/primitives/lib/index.js +0 -37
  305. package/dist/esm/node_modules/@react-pdf/reconciler/lib/index.js +0 -16
  306. package/dist/esm/node_modules/@react-pdf/reconciler/lib/reconciler-23.js +0 -22
  307. package/dist/esm/node_modules/@react-pdf/reconciler/lib/reconciler-31.js +0 -30
  308. package/dist/esm/node_modules/@react-pdf/render/lib/index.js +0 -2081
  309. package/dist/esm/node_modules/@react-pdf/renderer/lib/react-pdf.browser.js +0 -472
  310. package/dist/esm/node_modules/@react-pdf/stylesheet/lib/index.js +0 -771
  311. package/dist/esm/node_modules/@react-pdf/textkit/lib/textkit.js +0 -2854
  312. package/dist/esm/node_modules/@swc/helpers/esm/_define_property.js +0 -15
  313. package/dist/esm/node_modules/abs-svg-path/index.js +0 -78
  314. package/dist/esm/node_modules/base64-js/index.js +0 -158
  315. package/dist/esm/node_modules/bidi-js/dist/bidi.js +0 -1008
  316. package/dist/esm/node_modules/brotli/dec/bit_reader.js +0 -132
  317. package/dist/esm/node_modules/brotli/dec/context.js +0 -255
  318. package/dist/esm/node_modules/brotli/dec/decode.js +0 -965
  319. package/dist/esm/node_modules/brotli/dec/dictionary-browser.js +0 -35
  320. package/dist/esm/node_modules/brotli/dec/dictionary.bin.js +0 -17
  321. package/dist/esm/node_modules/brotli/dec/dictionary.js +0 -54
  322. package/dist/esm/node_modules/brotli/dec/huffman.js +0 -133
  323. package/dist/esm/node_modules/brotli/dec/prefix.js +0 -70
  324. package/dist/esm/node_modules/brotli/dec/streams.js +0 -44
  325. package/dist/esm/node_modules/brotli/dec/transform.js +0 -264
  326. package/dist/esm/node_modules/brotli/decompress.js +0 -14
  327. package/dist/esm/node_modules/clone/clone.js +0 -272
  328. package/dist/esm/node_modules/color-name/index.js +0 -158
  329. package/dist/esm/node_modules/color-string/index.js +0 -259
  330. package/dist/esm/node_modules/crypto-js/aes.js +0 -251
  331. package/dist/esm/node_modules/crypto-js/blowfish.js +0 -488
  332. package/dist/esm/node_modules/crypto-js/cipher-core.js +0 -909
  333. package/dist/esm/node_modules/crypto-js/core.js +0 -820
  334. package/dist/esm/node_modules/crypto-js/enc-base64.js +0 -149
  335. package/dist/esm/node_modules/crypto-js/enc-base64url.js +0 -161
  336. package/dist/esm/node_modules/crypto-js/enc-utf16.js +0 -162
  337. package/dist/esm/node_modules/crypto-js/evpkdf.js +0 -149
  338. package/dist/esm/node_modules/crypto-js/format-hex.js +0 -80
  339. package/dist/esm/node_modules/crypto-js/hmac.js +0 -156
  340. package/dist/esm/node_modules/crypto-js/index.js +0 -61
  341. package/dist/esm/node_modules/crypto-js/lib-typedarrays.js +0 -89
  342. package/dist/esm/node_modules/crypto-js/md5.js +0 -277
  343. package/dist/esm/node_modules/crypto-js/mode-cfb.js +0 -94
  344. package/dist/esm/node_modules/crypto-js/mode-ctr-gladman.js +0 -130
  345. package/dist/esm/node_modules/crypto-js/mode-ctr.js +0 -72
  346. package/dist/esm/node_modules/crypto-js/mode-ecb.js +0 -54
  347. package/dist/esm/node_modules/crypto-js/mode-ofb.js +0 -68
  348. package/dist/esm/node_modules/crypto-js/pad-ansix923.js +0 -63
  349. package/dist/esm/node_modules/crypto-js/pad-iso10126.js +0 -58
  350. package/dist/esm/node_modules/crypto-js/pad-iso97971.js +0 -54
  351. package/dist/esm/node_modules/crypto-js/pad-nopadding.js +0 -44
  352. package/dist/esm/node_modules/crypto-js/pad-zeropadding.js +0 -61
  353. package/dist/esm/node_modules/crypto-js/pbkdf2.js +0 -160
  354. package/dist/esm/node_modules/crypto-js/rabbit-legacy.js +0 -207
  355. package/dist/esm/node_modules/crypto-js/rabbit.js +0 -209
  356. package/dist/esm/node_modules/crypto-js/rc4.js +0 -156
  357. package/dist/esm/node_modules/crypto-js/ripemd160.js +0 -280
  358. package/dist/esm/node_modules/crypto-js/sha1.js +0 -163
  359. package/dist/esm/node_modules/crypto-js/sha224.js +0 -94
  360. package/dist/esm/node_modules/crypto-js/sha256.js +0 -212
  361. package/dist/esm/node_modules/crypto-js/sha3.js +0 -340
  362. package/dist/esm/node_modules/crypto-js/sha384.js +0 -98
  363. package/dist/esm/node_modules/crypto-js/sha512.js +0 -340
  364. package/dist/esm/node_modules/crypto-js/tripledes.js +0 -796
  365. package/dist/esm/node_modules/crypto-js/x64-core.js +0 -317
  366. package/dist/esm/node_modules/dfa/index.js +0 -101
  367. package/dist/esm/node_modules/emoji-regex/index.js +0 -12
  368. package/dist/esm/node_modules/events/events.js +0 -485
  369. package/dist/esm/node_modules/fast-deep-equal/index.js +0 -56
  370. package/dist/esm/node_modules/fontkit/dist/browser-module.js +0 -13295
  371. package/dist/esm/node_modules/hsl-to-hex/index.js +0 -72
  372. package/dist/esm/node_modules/hsl-to-rgb-for-reals/converter.js +0 -66
  373. package/dist/esm/node_modules/hyphen/hyphen.js +0 -424
  374. package/dist/esm/node_modules/hyphen/patterns/en-us.js +0 -48
  375. package/dist/esm/node_modules/inherits/inherits_browser.js +0 -39
  376. package/dist/esm/node_modules/jay-peg/src/index.js +0 -68
  377. package/dist/esm/node_modules/jay-peg/src/markers/dac.js +0 -25
  378. package/dist/esm/node_modules/jay-peg/src/markers/dht.js +0 -52
  379. package/dist/esm/node_modules/jay-peg/src/markers/dqt.js +0 -26
  380. package/dist/esm/node_modules/jay-peg/src/markers/dri.js +0 -17
  381. package/dist/esm/node_modules/jay-peg/src/markers/eoi.js +0 -17
  382. package/dist/esm/node_modules/jay-peg/src/markers/exif.js +0 -327
  383. package/dist/esm/node_modules/jay-peg/src/markers/jfif.js +0 -24
  384. package/dist/esm/node_modules/jay-peg/src/markers/sof.js +0 -32
  385. package/dist/esm/node_modules/jay-peg/src/markers/soi.js +0 -11
  386. package/dist/esm/node_modules/jay-peg/src/markers/sos.js +0 -57
  387. package/dist/esm/node_modules/jay-peg/src/markers/utils.js +0 -71
  388. package/dist/esm/node_modules/linebreak/dist/module.js +0 -1340
  389. package/dist/esm/node_modules/linebreak/node_modules/base64-js/lib/b64.js +0 -137
  390. package/dist/esm/node_modules/media-engine/src/index.js +0 -26
  391. package/dist/esm/node_modules/media-engine/src/operators.js +0 -36
  392. package/dist/esm/node_modules/media-engine/src/parser.js +0 -147
  393. package/dist/esm/node_modules/media-engine/src/queries.js +0 -64
  394. package/dist/esm/node_modules/normalize-svg-path/index.js +0 -126
  395. package/dist/esm/node_modules/pako/lib/utils/common.js +0 -114
  396. package/dist/esm/node_modules/pako/lib/zlib/adler32.js +0 -57
  397. package/dist/esm/node_modules/pako/lib/zlib/constants.js +0 -78
  398. package/dist/esm/node_modules/pako/lib/zlib/crc32.js +0 -65
  399. package/dist/esm/node_modules/pako/lib/zlib/deflate.js +0 -1880
  400. package/dist/esm/node_modules/pako/lib/zlib/inffast.js +0 -351
  401. package/dist/esm/node_modules/pako/lib/zlib/inflate.js +0 -1557
  402. package/dist/esm/node_modules/pako/lib/zlib/inftrees.js +0 -352
  403. package/dist/esm/node_modules/pako/lib/zlib/messages.js +0 -38
  404. package/dist/esm/node_modules/pako/lib/zlib/trees.js +0 -1232
  405. package/dist/esm/node_modules/pako/lib/zlib/zstream.js +0 -57
  406. package/dist/esm/node_modules/parse-svg-path/index.js +0 -68
  407. package/dist/esm/node_modules/postcss-value-parser/lib/parse.js +0 -333
  408. package/dist/esm/node_modules/postcss-value-parser/lib/unit.js +0 -132
  409. package/dist/esm/node_modules/queue/index.js +0 -211
  410. package/dist/esm/node_modules/restructure/src/Array.js +0 -112
  411. package/dist/esm/node_modules/restructure/src/Base.js +0 -25
  412. package/dist/esm/node_modules/restructure/src/Bitfield.js +0 -47
  413. package/dist/esm/node_modules/restructure/src/Buffer.js +0 -44
  414. package/dist/esm/node_modules/restructure/src/DecodeStream.js +0 -93
  415. package/dist/esm/node_modules/restructure/src/EncodeStream.js +0 -137
  416. package/dist/esm/node_modules/restructure/src/LazyArray.js +0 -82
  417. package/dist/esm/node_modules/restructure/src/Number.js +0 -80
  418. package/dist/esm/node_modules/restructure/src/Optional.js +0 -52
  419. package/dist/esm/node_modules/restructure/src/Pointer.js +0 -175
  420. package/dist/esm/node_modules/restructure/src/Reserved.js +0 -31
  421. package/dist/esm/node_modules/restructure/src/String.js +0 -161
  422. package/dist/esm/node_modules/restructure/src/Struct.js +0 -121
  423. package/dist/esm/node_modules/restructure/src/VersionedStruct.js +0 -147
  424. package/dist/esm/node_modules/restructure/src/utils.js +0 -42
  425. package/dist/esm/node_modules/scheduler/cjs/scheduler.development.js +0 -382
  426. package/dist/esm/node_modules/scheduler/cjs/scheduler.production.js +0 -359
  427. package/dist/esm/node_modules/scheduler/index.js +0 -21
  428. package/dist/esm/node_modules/simple-swizzle/index.js +0 -40
  429. package/dist/esm/node_modules/simple-swizzle/node_modules/is-arrayish/index.js +0 -17
  430. package/dist/esm/node_modules/svg-arc-to-cubic-bezier/modules/index.js +0 -189
  431. package/dist/esm/node_modules/tiny-inflate/index.js +0 -387
  432. package/dist/esm/node_modules/tslib/tslib.es6.js +0 -36
  433. package/dist/esm/node_modules/unicode-properties/dist/module.js +0 -132
  434. package/dist/esm/node_modules/unicode-trie/index.js +0 -150
  435. package/dist/esm/node_modules/unicode-trie/swap.js +0 -33
  436. package/dist/esm/node_modules/yoga-layout/dist/binaries/yoga-wasm-base64-esm.js +0 -81
  437. package/dist/esm/node_modules/yoga-layout/dist/src/generated/YGEnums.js +0 -217
  438. package/dist/esm/node_modules/yoga-layout/dist/src/load.js +0 -24
  439. package/dist/esm/node_modules/yoga-layout/dist/src/wrapAssembly.js +0 -130
  440. package/dist/esm/src/components/e-commerce/invoice/InvoicePDF.js +0 -181
@@ -1,82 +0,0 @@
1
- /*
2
- * UMWD-Components
3
- * @copyright Jelle Paulus
4
- * @license MIT
5
- */
6
-
7
- import { Array as ArrayT } from './Array.js';
8
- import { Number as NumberT } from './Number.js';
9
- import { resolveLength } from './utils.js';
10
-
11
- class LazyArray extends ArrayT {
12
- decode(stream, parent) {
13
- const { pos } = stream;
14
- const length = resolveLength(this.length, stream, parent);
15
-
16
- if (this.length instanceof NumberT) {
17
- parent = {
18
- parent,
19
- _startOffset: pos,
20
- _currentOffset: 0,
21
- _length: length
22
- };
23
- }
24
-
25
- const res = new LazyArrayValue(this.type, length, stream, parent);
26
-
27
- stream.pos += length * this.type.size(null, parent);
28
- return res;
29
- }
30
-
31
- size(val, ctx) {
32
- if (val instanceof LazyArrayValue) {
33
- val = val.toArray();
34
- }
35
-
36
- return super.size(val, ctx);
37
- }
38
-
39
- encode(stream, val, ctx) {
40
- if (val instanceof LazyArrayValue) {
41
- val = val.toArray();
42
- }
43
-
44
- return super.encode(stream, val, ctx);
45
- }
46
- }
47
-
48
- class LazyArrayValue {
49
- constructor(type, length, stream, ctx) {
50
- this.type = type;
51
- this.length = length;
52
- this.stream = stream;
53
- this.ctx = ctx;
54
- this.base = this.stream.pos;
55
- this.items = [];
56
- }
57
-
58
- get(index) {
59
- if ((index < 0) || (index >= this.length)) {
60
- return undefined;
61
- }
62
-
63
- if (this.items[index] == null) {
64
- const { pos } = this.stream;
65
- this.stream.pos = this.base + (this.type.size(null, this.ctx) * index);
66
- this.items[index] = this.type.decode(this.stream, this.ctx);
67
- this.stream.pos = pos;
68
- }
69
-
70
- return this.items[index];
71
- }
72
-
73
- toArray() {
74
- const result = [];
75
- for (let i = 0, end = this.length; i < end; i++) {
76
- result.push(this.get(i));
77
- }
78
- return result;
79
- }
80
- }
81
-
82
- export { LazyArray };
@@ -1,80 +0,0 @@
1
- /*
2
- * UMWD-Components
3
- * @copyright Jelle Paulus
4
- * @license MIT
5
- */
6
-
7
- import { DecodeStream } from './DecodeStream.js';
8
- import { Base } from './Base.js';
9
-
10
- class NumberT extends Base {
11
- constructor(type, endian = 'BE') {
12
- super();
13
- this.type = type;
14
- this.endian = endian;
15
- this.fn = this.type;
16
- if (this.type[this.type.length - 1] !== '8') {
17
- this.fn += this.endian;
18
- }
19
- }
20
-
21
- size() {
22
- return DecodeStream.TYPES[this.type];
23
- }
24
-
25
- decode(stream) {
26
- return stream[`read${this.fn}`]();
27
- }
28
-
29
- encode(stream, val) {
30
- return stream[`write${this.fn}`](val);
31
- }
32
- }
33
-
34
- const uint8 = new NumberT('UInt8');
35
- const uint16be = new NumberT('UInt16', 'BE');
36
- const uint16 = uint16be;
37
- const uint16le = new NumberT('UInt16', 'LE');
38
- const uint24be = new NumberT('UInt24', 'BE');
39
- const uint24 = uint24be;
40
- new NumberT('UInt24', 'LE');
41
- const uint32be = new NumberT('UInt32', 'BE');
42
- const uint32 = uint32be;
43
- const uint32le = new NumberT('UInt32', 'LE');
44
- const int8 = new NumberT('Int8');
45
- const int16be = new NumberT('Int16', 'BE');
46
- const int16 = int16be;
47
- new NumberT('Int16', 'LE');
48
- new NumberT('Int24', 'BE');
49
- new NumberT('Int24', 'LE');
50
- const int32be = new NumberT('Int32', 'BE');
51
- const int32 = int32be;
52
- new NumberT('Int32', 'LE');
53
- new NumberT('Float', 'BE');
54
- new NumberT('Float', 'LE');
55
- new NumberT('Double', 'BE');
56
- new NumberT('Double', 'LE');
57
-
58
- class Fixed extends NumberT {
59
- constructor(size, endian, fracBits = size >> 1) {
60
- super(`Int${size}`, endian);
61
- this._point = 1 << fracBits;
62
- }
63
-
64
- decode(stream) {
65
- return super.decode(stream) / this._point;
66
- }
67
-
68
- encode(stream, val) {
69
- return super.encode(stream, (val * this._point) | 0);
70
- }
71
- }
72
-
73
- const fixed16be = new Fixed(16, 'BE');
74
- const fixed16 = fixed16be;
75
- new Fixed(16, 'LE');
76
- const fixed32be = new Fixed(32, 'BE');
77
- const fixed32 = fixed32be;
78
- new Fixed(32, 'LE');
79
-
80
- export { Fixed, NumberT as Number, fixed16, fixed16be, fixed32, fixed32be, int16, int16be, int32, int32be, int8, uint16, uint16be, uint16le, uint24, uint24be, uint32, uint32be, uint32le, uint8 };
@@ -1,52 +0,0 @@
1
- /*
2
- * UMWD-Components
3
- * @copyright Jelle Paulus
4
- * @license MIT
5
- */
6
-
7
- import { Base } from './Base.js';
8
-
9
- class Optional extends Base {
10
- constructor(type, condition = true) {
11
- super();
12
- this.type = type;
13
- this.condition = condition;
14
- }
15
-
16
- decode(stream, parent) {
17
- let { condition } = this;
18
- if (typeof condition === 'function') {
19
- condition = condition.call(parent, parent);
20
- }
21
-
22
- if (condition) {
23
- return this.type.decode(stream, parent);
24
- }
25
- }
26
-
27
- size(val, parent) {
28
- let { condition } = this;
29
- if (typeof condition === 'function') {
30
- condition = condition.call(parent, parent);
31
- }
32
-
33
- if (condition) {
34
- return this.type.size(val, parent);
35
- } else {
36
- return 0;
37
- }
38
- }
39
-
40
- encode(stream, val, parent) {
41
- let { condition } = this;
42
- if (typeof condition === 'function') {
43
- condition = condition.call(parent, parent);
44
- }
45
-
46
- if (condition) {
47
- return this.type.encode(stream, val, parent);
48
- }
49
- }
50
- }
51
-
52
- export { Optional };
@@ -1,175 +0,0 @@
1
- /*
2
- * UMWD-Components
3
- * @copyright Jelle Paulus
4
- * @license MIT
5
- */
6
-
7
- import { PropertyDescriptor } from './utils.js';
8
- import { Base } from './Base.js';
9
-
10
- class Pointer extends Base {
11
- constructor(offsetType, type, options = {}) {
12
- super();
13
- this.offsetType = offsetType;
14
- this.type = type;
15
- this.options = options;
16
- if (this.type === 'void') { this.type = null; }
17
- if (this.options.type == null) { this.options.type = 'local'; }
18
- if (this.options.allowNull == null) { this.options.allowNull = true; }
19
- if (this.options.nullValue == null) { this.options.nullValue = 0; }
20
- if (this.options.lazy == null) { this.options.lazy = false; }
21
- if (this.options.relativeTo) {
22
- if (typeof this.options.relativeTo !== 'function') {
23
- throw new Error('relativeTo option must be a function');
24
- }
25
- this.relativeToGetter = options.relativeTo;
26
- }
27
- }
28
-
29
- decode(stream, ctx) {
30
- const offset = this.offsetType.decode(stream, ctx);
31
-
32
- // handle NULL pointers
33
- if ((offset === this.options.nullValue) && this.options.allowNull) {
34
- return null;
35
- }
36
-
37
- let relative;
38
- switch (this.options.type) {
39
- case 'local': relative = ctx._startOffset; break;
40
- case 'immediate': relative = stream.pos - this.offsetType.size(); break;
41
- case 'parent': relative = ctx.parent._startOffset; break;
42
- default:
43
- var c = ctx;
44
- while (c.parent) {
45
- c = c.parent;
46
- }
47
-
48
- relative = c._startOffset || 0;
49
- }
50
-
51
- if (this.options.relativeTo) {
52
- relative += this.relativeToGetter(ctx);
53
- }
54
-
55
- const ptr = offset + relative;
56
-
57
- if (this.type != null) {
58
- let val = null;
59
- const decodeValue = () => {
60
- if (val != null) { return val; }
61
-
62
- const { pos } = stream;
63
- stream.pos = ptr;
64
- val = this.type.decode(stream, ctx);
65
- stream.pos = pos;
66
- return val;
67
- };
68
-
69
- // If this is a lazy pointer, define a getter to decode only when needed.
70
- // This obviously only works when the pointer is contained by a Struct.
71
- if (this.options.lazy) {
72
- return new PropertyDescriptor({
73
- get: decodeValue});
74
- }
75
-
76
- return decodeValue();
77
- } else {
78
- return ptr;
79
- }
80
- }
81
-
82
- size(val, ctx) {
83
- const parent = ctx;
84
- switch (this.options.type) {
85
- case 'local': case 'immediate':
86
- break;
87
- case 'parent':
88
- ctx = ctx.parent;
89
- break;
90
- default: // global
91
- while (ctx.parent) {
92
- ctx = ctx.parent;
93
- }
94
- }
95
-
96
- let { type } = this;
97
- if (type == null) {
98
- if (!(val instanceof VoidPointer)) {
99
- throw new Error("Must be a VoidPointer");
100
- }
101
-
102
- ({ type } = val);
103
- val = val.value;
104
- }
105
-
106
- if (val && ctx) {
107
- // Must be written as two separate lines rather than += in case `type.size` mutates ctx.pointerSize.
108
- let size = type.size(val, parent);
109
- ctx.pointerSize += size;
110
- }
111
-
112
- return this.offsetType.size();
113
- }
114
-
115
- encode(stream, val, ctx) {
116
- let relative;
117
- const parent = ctx;
118
- if ((val == null)) {
119
- this.offsetType.encode(stream, this.options.nullValue);
120
- return;
121
- }
122
-
123
- switch (this.options.type) {
124
- case 'local':
125
- relative = ctx.startOffset;
126
- break;
127
- case 'immediate':
128
- relative = stream.pos + this.offsetType.size(val, parent);
129
- break;
130
- case 'parent':
131
- ctx = ctx.parent;
132
- relative = ctx.startOffset;
133
- break;
134
- default: // global
135
- relative = 0;
136
- while (ctx.parent) {
137
- ctx = ctx.parent;
138
- }
139
- }
140
-
141
- if (this.options.relativeTo) {
142
- relative += this.relativeToGetter(parent.val);
143
- }
144
-
145
- this.offsetType.encode(stream, ctx.pointerOffset - relative);
146
-
147
- let { type } = this;
148
- if (type == null) {
149
- if (!(val instanceof VoidPointer)) {
150
- throw new Error("Must be a VoidPointer");
151
- }
152
-
153
- ({ type } = val);
154
- val = val.value;
155
- }
156
-
157
- ctx.pointers.push({
158
- type,
159
- val,
160
- parent
161
- });
162
-
163
- return ctx.pointerOffset += type.size(val, parent);
164
- }
165
- }
166
-
167
- // A pointer whose type is determined at decode time
168
- class VoidPointer {
169
- constructor(type, value) {
170
- this.type = type;
171
- this.value = value;
172
- }
173
- }
174
-
175
- export { Pointer, VoidPointer };
@@ -1,31 +0,0 @@
1
- /*
2
- * UMWD-Components
3
- * @copyright Jelle Paulus
4
- * @license MIT
5
- */
6
-
7
- import { Base } from './Base.js';
8
- import { resolveLength } from './utils.js';
9
-
10
- class Reserved extends Base {
11
- constructor(type, count = 1) {
12
- super();
13
- this.type = type;
14
- this.count = count;
15
- }
16
- decode(stream, parent) {
17
- stream.pos += this.size(null, parent);
18
- return undefined;
19
- }
20
-
21
- size(data, parent) {
22
- const count = resolveLength(this.count, null, parent);
23
- return this.type.size() * count;
24
- }
25
-
26
- encode(stream, val, parent) {
27
- return stream.fill(0, this.size(val, parent));
28
- }
29
- }
30
-
31
- export { Reserved };
@@ -1,161 +0,0 @@
1
- /*
2
- * UMWD-Components
3
- * @copyright Jelle Paulus
4
- * @license MIT
5
- */
6
-
7
- import { Base } from './Base.js';
8
- import { Number as NumberT } from './Number.js';
9
- import { resolveLength } from './utils.js';
10
-
11
- class StringT extends Base {
12
- constructor(length, encoding = 'ascii') {
13
- super();
14
- this.length = length;
15
- this.encoding = encoding;
16
- }
17
-
18
- decode(stream, parent) {
19
- let length, pos;
20
-
21
- let { encoding } = this;
22
- if (typeof encoding === 'function') {
23
- encoding = encoding.call(parent, parent) || 'ascii';
24
- }
25
- let width = encodingWidth(encoding);
26
-
27
- if (this.length != null) {
28
- length = resolveLength(this.length, stream, parent);
29
- } else {
30
- let buffer;
31
- ({buffer, length, pos} = stream);
32
-
33
- while ((pos < length - width + 1) &&
34
- (buffer[pos] !== 0x00 ||
35
- (width === 2 && buffer[pos+1] !== 0x00)
36
- )) {
37
- pos += width;
38
- }
39
-
40
- length = pos - stream.pos;
41
- }
42
-
43
-
44
- const string = stream.readString(length, encoding);
45
-
46
- if ((this.length == null) && (stream.pos < stream.length)) {
47
- stream.pos+=width;
48
- }
49
-
50
- return string;
51
- }
52
-
53
- size(val, parent) {
54
- // Use the defined value if no value was given
55
- if (val === undefined || val === null) {
56
- return resolveLength(this.length, null, parent);
57
- }
58
-
59
- let { encoding } = this;
60
- if (typeof encoding === 'function') {
61
- encoding = encoding.call(parent != null ? parent.val : undefined, parent != null ? parent.val : undefined) || 'ascii';
62
- }
63
-
64
- if (encoding === 'utf16be') {
65
- encoding = 'utf16le';
66
- }
67
-
68
- let size = byteLength(val, encoding);
69
- if (this.length instanceof NumberT) {
70
- size += this.length.size();
71
- }
72
-
73
- if ((this.length == null)) {
74
- size += encodingWidth(encoding);
75
- }
76
-
77
- return size;
78
- }
79
-
80
- encode(stream, val, parent) {
81
- let { encoding } = this;
82
- if (typeof encoding === 'function') {
83
- encoding = encoding.call(parent != null ? parent.val : undefined, parent != null ? parent.val : undefined) || 'ascii';
84
- }
85
-
86
- if (this.length instanceof NumberT) {
87
- this.length.encode(stream, byteLength(val, encoding));
88
- }
89
-
90
- stream.writeString(val, encoding);
91
-
92
- if ((this.length == null)) {
93
- return encodingWidth(encoding) == 2 ?
94
- stream.writeUInt16LE(0x0000) :
95
- stream.writeUInt8(0x00);
96
- }
97
- }
98
- }
99
-
100
- function encodingWidth(encoding) {
101
- switch(encoding) {
102
- case 'ascii':
103
- case 'utf8': // utf8 is a byte-based encoding for zero-term string
104
- return 1;
105
- case 'utf16le':
106
- case 'utf16-le':
107
- case 'utf-16be':
108
- case 'utf-16le':
109
- case 'utf16be':
110
- case 'utf16-be':
111
- case 'ucs2':
112
- return 2;
113
- default:
114
- //TODO: assume all other encodings are 1-byters
115
- //throw new Error('Unknown encoding ' + encoding);
116
- return 1;
117
- }
118
- }
119
-
120
- function byteLength(string, encoding) {
121
- switch (encoding) {
122
- case 'ascii':
123
- return string.length;
124
- case 'utf8':
125
- let len = 0;
126
- for (let i = 0; i < string.length; i++) {
127
- let c = string.charCodeAt(i);
128
-
129
- if (c >= 0xd800 && c <= 0xdbff && i < string.length - 1) {
130
- let c2 = string.charCodeAt(++i);
131
- if ((c2 & 0xfc00) === 0xdc00) {
132
- c = ((c & 0x3ff) << 10) + (c2 & 0x3ff) + 0x10000;
133
- } else {
134
- // unmatched surrogate.
135
- i--;
136
- }
137
- }
138
-
139
- if ((c & 0xffffff80) === 0) {
140
- len++;
141
- } else if ((c & 0xfffff800) === 0) {
142
- len += 2;
143
- } else if ((c & 0xffff0000) === 0) {
144
- len += 3;
145
- } else if ((c & 0xffe00000) === 0) {
146
- len += 4;
147
- }
148
- }
149
- return len;
150
- case 'utf16le':
151
- case 'utf16-le':
152
- case 'utf16be':
153
- case 'utf16-be':
154
- case 'ucs2':
155
- return string.length * 2;
156
- default:
157
- throw new Error('Unknown encoding ' + encoding);
158
- }
159
- }
160
-
161
- export { StringT as String };
@@ -1,121 +0,0 @@
1
- /*
2
- * UMWD-Components
3
- * @copyright Jelle Paulus
4
- * @license MIT
5
- */
6
-
7
- import { Base } from './Base.js';
8
- import { PropertyDescriptor } from './utils.js';
9
-
10
- class Struct extends Base {
11
- constructor(fields = {}) {
12
- super();
13
- this.fields = fields;
14
- }
15
-
16
- decode(stream, parent, length = 0) {
17
- const res = this._setup(stream, parent, length);
18
- this._parseFields(stream, res, this.fields);
19
-
20
- if (this.process != null) {
21
- this.process.call(res, stream);
22
- }
23
- return res;
24
- }
25
-
26
- _setup(stream, parent, length) {
27
- const res = {};
28
-
29
- // define hidden properties
30
- Object.defineProperties(res, {
31
- parent: { value: parent },
32
- _startOffset: { value: stream.pos },
33
- _currentOffset: { value: 0, writable: true },
34
- _length: { value: length }
35
- });
36
-
37
- return res;
38
- }
39
-
40
- _parseFields(stream, res, fields) {
41
- for (let key in fields) {
42
- var val;
43
- const type = fields[key];
44
- if (typeof type === 'function') {
45
- val = type.call(res, res);
46
- } else {
47
- val = type.decode(stream, res);
48
- }
49
-
50
- if (val !== undefined) {
51
- if (val instanceof PropertyDescriptor) {
52
- Object.defineProperty(res, key, val);
53
- } else {
54
- res[key] = val;
55
- }
56
- }
57
-
58
- res._currentOffset = stream.pos - res._startOffset;
59
- }
60
-
61
- }
62
-
63
- size(val, parent, includePointers = true) {
64
- if (val == null) { val = {}; }
65
- const ctx = {
66
- parent,
67
- val,
68
- pointerSize: 0
69
- };
70
-
71
- if (this.preEncode != null) {
72
- this.preEncode.call(val);
73
- }
74
-
75
- let size = 0;
76
- for (let key in this.fields) {
77
- const type = this.fields[key];
78
- if (type.size != null) {
79
- size += type.size(val[key], ctx);
80
- }
81
- }
82
-
83
- if (includePointers) {
84
- size += ctx.pointerSize;
85
- }
86
-
87
- return size;
88
- }
89
-
90
- encode(stream, val, parent) {
91
- let type;
92
- if (this.preEncode != null) {
93
- this.preEncode.call(val, stream);
94
- }
95
-
96
- const ctx = {
97
- pointers: [],
98
- startOffset: stream.pos,
99
- parent,
100
- val,
101
- pointerSize: 0
102
- };
103
-
104
- ctx.pointerOffset = stream.pos + this.size(val, ctx, false);
105
-
106
- for (let key in this.fields) {
107
- type = this.fields[key];
108
- if (type.encode != null) {
109
- type.encode(stream, val[key], ctx);
110
- }
111
- }
112
-
113
- let i = 0;
114
- while (i < ctx.pointers.length) {
115
- const ptr = ctx.pointers[i++];
116
- ptr.type.encode(stream, ptr.val, ptr.parent);
117
- }
118
- }
119
- }
120
-
121
- export { Struct };