@tachybase/module-workflow 0.23.8

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 (536) hide show
  1. package/.turbo/turbo-build.log +12 -0
  2. package/README.md +9 -0
  3. package/README.zh-CN.md +9 -0
  4. package/client.d.ts +2 -0
  5. package/client.js +1 -0
  6. package/dist/client/Branch.d.ts +9 -0
  7. package/dist/client/CanvasContent.d.ts +4 -0
  8. package/dist/client/CanvasContentWrapper.d.ts +4 -0
  9. package/dist/client/ExecutionCanvas.d.ts +2 -0
  10. package/dist/client/ExecutionContextProvider.d.ts +7 -0
  11. package/dist/client/ExecutionLink.d.ts +2 -0
  12. package/dist/client/ExecutionPage.d.ts +2 -0
  13. package/dist/client/ExecutionResourceProvider.d.ts +6 -0
  14. package/dist/client/FlowContext.d.ts +3 -0
  15. package/dist/client/Plugin.d.ts +39 -0
  16. package/dist/client/WorkflowCanvas.d.ts +2 -0
  17. package/dist/client/WorkflowLink.d.ts +2 -0
  18. package/dist/client/WorkflowPage.d.ts +2 -0
  19. package/dist/client/WorkflowPane.d.ts +2 -0
  20. package/dist/client/components/AddNotifiedPerson.d.ts +3 -0
  21. package/dist/client/components/AutoResizeInput.d.ts +4 -0
  22. package/dist/client/components/CheckboxGroupWithTooltip.d.ts +7 -0
  23. package/dist/client/components/CollectionBlockInitializer.d.ts +2 -0
  24. package/dist/client/components/CollectionFieldset.d.ts +3 -0
  25. package/dist/client/components/ColumnShowCollection.d.ts +2 -0
  26. package/dist/client/components/ColumnShowTitle.d.ts +2 -0
  27. package/dist/client/components/ConfigButtonMessage.d.ts +2 -0
  28. package/dist/client/components/DetailsBlockProvider.d.ts +6 -0
  29. package/dist/client/components/DrawerDescription.d.ts +5 -0
  30. package/dist/client/components/DrawerForm.d.ts +5 -0
  31. package/dist/client/components/ExecutionStatus.d.ts +5 -0
  32. package/dist/client/components/ExecutionTime.d.ts +3 -0
  33. package/dist/client/components/FieldsSelect.d.ts +2 -0
  34. package/dist/client/components/FilterDynamicComponent.d.ts +6 -0
  35. package/dist/client/components/GoBackButton.d.ts +2 -0
  36. package/dist/client/components/OpenDrawer.d.ts +7 -0
  37. package/dist/client/components/RadioWithTooltip.d.ts +7 -0
  38. package/dist/client/components/SelectNotifiedPerson.d.ts +2 -0
  39. package/dist/client/components/ShowNodeTypesInWorkflow.d.ts +2 -0
  40. package/dist/client/components/SimpleDesigner.d.ts +2 -0
  41. package/dist/client/components/StatusButton.d.ts +2 -0
  42. package/dist/client/components/ValueBlock.d.ts +5 -0
  43. package/dist/client/components/WorkflowLink.d.ts +2 -0
  44. package/dist/client/components/index.d.ts +15 -0
  45. package/dist/client/components/renderEngineReference.d.ts +2 -0
  46. package/dist/client/constants.d.ts +37 -0
  47. package/dist/client/features/aggregate/AggregateInstruction.d.ts +217 -0
  48. package/dist/client/features/aggregate/index.d.ts +4 -0
  49. package/dist/client/features/common/constants.d.ts +3 -0
  50. package/dist/client/features/delay/DelayInstruction.d.ts +48 -0
  51. package/dist/client/features/delay/index.d.ts +4 -0
  52. package/dist/client/features/dynamic-calculation/DynamicCalculation.d.ts +76 -0
  53. package/dist/client/features/dynamic-calculation/DynamicExpression.d.ts +6 -0
  54. package/dist/client/features/dynamic-calculation/expression.d.ts +35 -0
  55. package/dist/client/features/dynamic-calculation/index.d.ts +4 -0
  56. package/dist/client/features/interceptor/WorkflowTriggerInterceptor.d.ts +100 -0
  57. package/dist/client/features/interceptor/index.d.ts +4 -0
  58. package/dist/client/features/js-parse/JSParse.instruction.d.ts +123 -0
  59. package/dist/client/features/js-parse/index.d.ts +5 -0
  60. package/dist/client/features/json-parse/JSONParse.instruction.d.ts +119 -0
  61. package/dist/client/features/json-parse/index.d.ts +5 -0
  62. package/dist/client/features/loop/LoopInstruction.d.ts +33 -0
  63. package/dist/client/features/loop/index.d.ts +4 -0
  64. package/dist/client/features/manual/WorkflowTodo.d.ts +5 -0
  65. package/dist/client/features/manual/WorkflowTodoBlockInitializer.d.ts +2 -0
  66. package/dist/client/features/manual/index.d.ts +5 -0
  67. package/dist/client/features/manual/instruction/AssigneesSelect.d.ts +6 -0
  68. package/dist/client/features/manual/instruction/FormBlockInitializer.d.ts +2 -0
  69. package/dist/client/features/manual/instruction/FormBlockProvider.d.ts +2 -0
  70. package/dist/client/features/manual/instruction/ModeConfig.d.ts +5 -0
  71. package/dist/client/features/manual/instruction/SchemaConfig.d.ts +50 -0
  72. package/dist/client/features/manual/instruction/createManualFormBlockUISchema.d.ts +57 -0
  73. package/dist/client/features/manual/instruction/forms/create.d.ts +3 -0
  74. package/dist/client/features/manual/instruction/forms/custom.d.ts +5 -0
  75. package/dist/client/features/manual/instruction/forms/update.d.ts +3 -0
  76. package/dist/client/features/manual/instruction/index.d.ts +91 -0
  77. package/dist/client/features/manual/instruction/utils.d.ts +1 -0
  78. package/dist/client/features/notice/common/flowNodes.collection.d.ts +38 -0
  79. package/dist/client/features/notice/common/notice.collection.d.ts +127 -0
  80. package/dist/client/features/notice/common/workflow.collection.d.ts +30 -0
  81. package/dist/client/features/notice/configuration/Notice.instruction.d.ts +76 -0
  82. package/dist/client/features/notice/configuration/config-items/AddNotifiedPerson.view.d.ts +2 -0
  83. package/dist/client/features/notice/configuration/config-items/ConfigButtonNotice.view.d.ts +2 -0
  84. package/dist/client/features/notice/configuration/config-items/SelectNotifiedPerson.view.d.ts +2 -0
  85. package/dist/client/features/notice/configuration/kit.d.ts +5 -0
  86. package/dist/client/features/notice/configuration/show-interface/NoticeDetail.block.d.ts +2 -0
  87. package/dist/client/features/notice/configuration/show-interface/NoticeDetail.initializer.d.ts +2 -0
  88. package/dist/client/features/notice/configuration/show-interface/NoticeDetail.schema.d.ts +6 -0
  89. package/dist/client/features/notice/configuration/show-interface/NoticeDetailContainer.schema.d.ts +2 -0
  90. package/dist/client/features/notice/configuration/show-interface/style.d.ts +3 -0
  91. package/dist/client/features/notice/configuration/style.d.ts +5 -0
  92. package/dist/client/features/notice/index.d.ts +5 -0
  93. package/dist/client/features/notice/locale.d.ts +7 -0
  94. package/dist/client/features/notice/usage/NoticeBlock.initializer.d.ts +6 -0
  95. package/dist/client/features/notice/usage/NoticeBlock.provider.d.ts +5 -0
  96. package/dist/client/features/notice/usage/NoticeCenter.schema.d.ts +2 -0
  97. package/dist/client/features/notice/usage/column/column.action.d.ts +2 -0
  98. package/dist/client/features/notice/usage/column/column.node.d.ts +1 -0
  99. package/dist/client/features/notice/usage/column/column.status.d.ts +8 -0
  100. package/dist/client/features/notice/usage/column/column.user.d.ts +1 -0
  101. package/dist/client/features/notice/usage/column/column.workflow.d.ts +2 -0
  102. package/dist/client/features/notice/usage/kit.d.ts +5 -0
  103. package/dist/client/features/notice/usage/show-detail/NoticeDetail.provider.d.ts +5 -0
  104. package/dist/client/features/notice/usage/show-detail/NoticeDetail.schema.d.ts +2 -0
  105. package/dist/client/features/notice/usage/show-detail/contexts/MyComponent.context.d.ts +9 -0
  106. package/dist/client/features/notice/usage/show-detail/contexts/WorkflowNotice.context.d.ts +4 -0
  107. package/dist/client/features/notice/usage/show-detail/hooks/usePropsNoticeDetail.d.ts +3 -0
  108. package/dist/client/features/omni-trigger/OmniActionTrigger.d.ts +84 -0
  109. package/dist/client/features/omni-trigger/index.d.ts +5 -0
  110. package/dist/client/features/omni-trigger/usage/APIRegular.schema.d.ts +2 -0
  111. package/dist/client/features/omni-trigger/usage/APIRegular.setting.d.ts +2 -0
  112. package/dist/client/features/omni-trigger/usage/hooks.d.ts +3 -0
  113. package/dist/client/features/omni-trigger/usage/kit.d.ts +4 -0
  114. package/dist/client/features/omni-trigger/useFormWorkflowCustomActionProps.d.ts +3 -0
  115. package/dist/client/features/omni-trigger/useRecordWorkflowCustomTriggerActionProps.d.ts +3 -0
  116. package/dist/client/features/parallel/ParallelInstruction.d.ts +34 -0
  117. package/dist/client/features/parallel/index.d.ts +4 -0
  118. package/dist/client/features/request/RequestInstruction.d.ts +220 -0
  119. package/dist/client/features/request/index.d.ts +4 -0
  120. package/dist/client/features/response/index.d.ts +4 -0
  121. package/dist/client/features/script/Script.instruction.d.ts +198 -0
  122. package/dist/client/features/script/index.d.ts +5 -0
  123. package/dist/client/features/sql/SQLInstruction.d.ts +54 -0
  124. package/dist/client/features/sql/index.d.ts +4 -0
  125. package/dist/client/features/trigger-instruction/TriggerInstruction.d.ts +93 -0
  126. package/dist/client/features/trigger-instruction/index.d.ts +0 -0
  127. package/dist/client/features/trigger-instruction/plugin.d.ts +4 -0
  128. package/dist/client/features/variables/VariableTargetSelect.d.ts +5 -0
  129. package/dist/client/features/variables/VariablesInstruction.d.ts +54 -0
  130. package/dist/client/features/variables/index.d.ts +4 -0
  131. package/dist/client/features/variables/useStyles.d.ts +3 -0
  132. package/dist/client/hooks/index.d.ts +3 -0
  133. package/dist/client/hooks/useGetAriaLabelOfAddButton.d.ts +6 -0
  134. package/dist/client/hooks/useTriggerWorkflowActionProps.d.ts +6 -0
  135. package/dist/client/hooks/useWorkflowExecuted.d.ts +2 -0
  136. package/dist/client/index.d.ts +19 -0
  137. package/dist/client/index.js +876 -0
  138. package/dist/client/locale/index.d.ts +4 -0
  139. package/dist/client/nodes/calculation.d.ts +88 -0
  140. package/dist/client/nodes/condition.d.ts +108 -0
  141. package/dist/client/nodes/create.d.ts +68 -0
  142. package/dist/client/nodes/default-node/Node.context.d.ts +3 -0
  143. package/dist/client/nodes/default-node/Node.d.ts +4 -0
  144. package/dist/client/nodes/default-node/Node.style.d.ts +4 -0
  145. package/dist/client/nodes/default-node/buttons/ArrowDownButton.d.ts +2 -0
  146. package/dist/client/nodes/default-node/buttons/ArrowUpButton.d.ts +2 -0
  147. package/dist/client/nodes/default-node/buttons/DragButton.d.ts +2 -0
  148. package/dist/client/nodes/default-node/buttons/JobButton.d.ts +2 -0
  149. package/dist/client/nodes/default-node/buttons/JobButton.style.d.ts +5 -0
  150. package/dist/client/nodes/default-node/buttons/RemoveButton.d.ts +2 -0
  151. package/dist/client/nodes/default-node/components/AddButton.d.ts +11 -0
  152. package/dist/client/nodes/default-node/components/AddButton.props.d.ts +11 -0
  153. package/dist/client/nodes/default-node/components/AddButton.style.d.ts +6 -0
  154. package/dist/client/nodes/default-node/components/NodeConfig.d.ts +2 -0
  155. package/dist/client/nodes/default-node/components/NodeConfig.provider.d.ts +2 -0
  156. package/dist/client/nodes/default-node/components/NodeConfig.schema.d.ts +15 -0
  157. package/dist/client/nodes/default-node/components/NodeConfig.view.d.ts +2 -0
  158. package/dist/client/nodes/default-node/components/NodeConfigTitle.d.ts +2 -0
  159. package/dist/client/nodes/default-node/components/NodeDefaultView.d.ts +2 -0
  160. package/dist/client/nodes/default-node/components/NodeDefaultView.style.d.ts +5 -0
  161. package/dist/client/nodes/default-node/components/NodePoint.d.ts +2 -0
  162. package/dist/client/nodes/default-node/components/NodePoint.style.d.ts +4 -0
  163. package/dist/client/nodes/default-node/hooks/useAvailableUpstreams.d.ts +1 -0
  164. package/dist/client/nodes/default-node/hooks/useFormProviderProps.d.ts +3 -0
  165. package/dist/client/nodes/default-node/hooks/useUpdateAction.d.ts +3 -0
  166. package/dist/client/nodes/default-node/hooks/useUpstreamScopes.d.ts +1 -0
  167. package/dist/client/nodes/default-node/index.d.ts +4 -0
  168. package/dist/client/nodes/default-node/interface.d.ts +49 -0
  169. package/dist/client/nodes/destroy.d.ts +46 -0
  170. package/dist/client/nodes/end.d.ts +25 -0
  171. package/dist/client/nodes/query.d.ts +221 -0
  172. package/dist/client/nodes/update.d.ts +82 -0
  173. package/dist/client/schemas/collection.d.ts +162 -0
  174. package/dist/client/schemas/executions.d.ts +380 -0
  175. package/dist/client/schemas/workflows.d.ts +47 -0
  176. package/dist/client/settings/customizeSubmitToWorkflowActionSettings.d.ts +2 -0
  177. package/dist/client/style.d.ts +19 -0
  178. package/dist/client/triggers/collection.d.ts +133 -0
  179. package/dist/client/triggers/index.d.ts +25 -0
  180. package/dist/client/triggers/schedule/EndsByField.d.ts +5 -0
  181. package/dist/client/triggers/schedule/OnField.d.ts +5 -0
  182. package/dist/client/triggers/schedule/RepeatField.d.ts +5 -0
  183. package/dist/client/triggers/schedule/ScheduleConfig.d.ts +2 -0
  184. package/dist/client/triggers/schedule/constants.d.ts +4 -0
  185. package/dist/client/triggers/schedule/index.d.ts +22 -0
  186. package/dist/client/triggers/schedule/locale/Cron.zh-CN.d.ts +34 -0
  187. package/dist/client/utils.d.ts +5 -0
  188. package/dist/client/variable.d.ts +97 -0
  189. package/dist/common/constants.d.ts +5 -0
  190. package/dist/common/constants.js +39 -0
  191. package/dist/externalVersion.js +25 -0
  192. package/dist/index.d.ts +2 -0
  193. package/dist/index.js +39 -0
  194. package/dist/locale/en-US.json +319 -0
  195. package/dist/locale/es-ES.json +129 -0
  196. package/dist/locale/fr-FR.json +129 -0
  197. package/dist/locale/ja-JP.json +87 -0
  198. package/dist/locale/ko_KR.json +246 -0
  199. package/dist/locale/pt-BR.json +129 -0
  200. package/dist/locale/ru-RU.json +87 -0
  201. package/dist/locale/tr-TR.json +87 -0
  202. package/dist/locale/zh-CN.json +399 -0
  203. package/dist/node_modules/@babel/core/LICENSE +22 -0
  204. package/dist/node_modules/@babel/core/cjs-proxy.cjs +68 -0
  205. package/dist/node_modules/@babel/core/lib/config/cache-contexts.js +3 -0
  206. package/dist/node_modules/@babel/core/lib/config/caching.js +261 -0
  207. package/dist/node_modules/@babel/core/lib/config/config-chain.js +469 -0
  208. package/dist/node_modules/@babel/core/lib/config/config-descriptors.js +190 -0
  209. package/dist/node_modules/@babel/core/lib/config/files/configuration.js +287 -0
  210. package/dist/node_modules/@babel/core/lib/config/files/import.cjs +6 -0
  211. package/dist/node_modules/@babel/core/lib/config/files/index-browser.js +58 -0
  212. package/dist/node_modules/@babel/core/lib/config/files/index.js +78 -0
  213. package/dist/node_modules/@babel/core/lib/config/files/module-types.js +195 -0
  214. package/dist/node_modules/@babel/core/lib/config/files/package.js +61 -0
  215. package/dist/node_modules/@babel/core/lib/config/files/plugins.js +229 -0
  216. package/dist/node_modules/@babel/core/lib/config/files/types.js +3 -0
  217. package/dist/node_modules/@babel/core/lib/config/files/utils.js +36 -0
  218. package/dist/node_modules/@babel/core/lib/config/full.js +312 -0
  219. package/dist/node_modules/@babel/core/lib/config/helpers/config-api.js +84 -0
  220. package/dist/node_modules/@babel/core/lib/config/helpers/deep-array.js +23 -0
  221. package/dist/node_modules/@babel/core/lib/config/helpers/environment.js +12 -0
  222. package/dist/node_modules/@babel/core/lib/config/index.js +93 -0
  223. package/dist/node_modules/@babel/core/lib/config/item.js +67 -0
  224. package/dist/node_modules/@babel/core/lib/config/partial.js +158 -0
  225. package/dist/node_modules/@babel/core/lib/config/pattern-to-regex.js +38 -0
  226. package/dist/node_modules/@babel/core/lib/config/plugin.js +33 -0
  227. package/dist/node_modules/@babel/core/lib/config/printer.js +113 -0
  228. package/dist/node_modules/@babel/core/lib/config/resolve-targets-browser.js +41 -0
  229. package/dist/node_modules/@babel/core/lib/config/resolve-targets.js +61 -0
  230. package/dist/node_modules/@babel/core/lib/config/util.js +31 -0
  231. package/dist/node_modules/@babel/core/lib/config/validation/option-assertions.js +277 -0
  232. package/dist/node_modules/@babel/core/lib/config/validation/options.js +189 -0
  233. package/dist/node_modules/@babel/core/lib/config/validation/plugins.js +67 -0
  234. package/dist/node_modules/@babel/core/lib/config/validation/removed.js +68 -0
  235. package/dist/node_modules/@babel/core/lib/errors/config-error.js +18 -0
  236. package/dist/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js +98 -0
  237. package/dist/node_modules/@babel/core/lib/gensync-utils/async.js +90 -0
  238. package/dist/node_modules/@babel/core/lib/gensync-utils/fs.js +31 -0
  239. package/dist/node_modules/@babel/core/lib/gensync-utils/functional.js +58 -0
  240. package/dist/node_modules/@babel/core/lib/index.js +227 -0
  241. package/dist/node_modules/@babel/core/lib/parse.js +47 -0
  242. package/dist/node_modules/@babel/core/lib/parser/index.js +79 -0
  243. package/dist/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js +339 -0
  244. package/dist/node_modules/@babel/core/lib/tools/build-external-helpers.js +144 -0
  245. package/dist/node_modules/@babel/core/lib/transform-ast.js +50 -0
  246. package/dist/node_modules/@babel/core/lib/transform-file-browser.js +23 -0
  247. package/dist/node_modules/@babel/core/lib/transform-file.js +40 -0
  248. package/dist/node_modules/@babel/core/lib/transform.js +49 -0
  249. package/dist/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js +84 -0
  250. package/dist/node_modules/@babel/core/lib/transformation/file/babel-7-helpers.cjs +4 -0
  251. package/dist/node_modules/@babel/core/lib/transformation/file/file.js +214 -0
  252. package/dist/node_modules/@babel/core/lib/transformation/file/generate.js +84 -0
  253. package/dist/node_modules/@babel/core/lib/transformation/file/merge-map.js +37 -0
  254. package/dist/node_modules/@babel/core/lib/transformation/index.js +92 -0
  255. package/dist/node_modules/@babel/core/lib/transformation/normalize-file.js +129 -0
  256. package/dist/node_modules/@babel/core/lib/transformation/normalize-opts.js +59 -0
  257. package/dist/node_modules/@babel/core/lib/transformation/plugin-pass.js +50 -0
  258. package/dist/node_modules/@babel/core/lib/transformation/util/clone-deep.js +36 -0
  259. package/dist/node_modules/@babel/core/lib/vendor/import-meta-resolve.js +1043 -0
  260. package/dist/node_modules/@babel/core/node_modules/.bin/json5 +17 -0
  261. package/dist/node_modules/@babel/core/node_modules/.bin/parser +17 -0
  262. package/dist/node_modules/@babel/core/node_modules/.bin/semver +17 -0
  263. package/dist/node_modules/@babel/core/package.json +1 -0
  264. package/dist/node_modules/@babel/core/src/config/files/index-browser.ts +113 -0
  265. package/dist/node_modules/@babel/core/src/config/files/index.ts +29 -0
  266. package/dist/node_modules/@babel/core/src/config/resolve-targets-browser.ts +40 -0
  267. package/dist/node_modules/@babel/core/src/config/resolve-targets.ts +56 -0
  268. package/dist/node_modules/@babel/core/src/transform-file-browser.ts +31 -0
  269. package/dist/node_modules/@babel/core/src/transform-file.ts +55 -0
  270. package/dist/node_modules/cron-parser/LICENSE +21 -0
  271. package/dist/node_modules/cron-parser/lib/date.js +252 -0
  272. package/dist/node_modules/cron-parser/lib/expression.js +1002 -0
  273. package/dist/node_modules/cron-parser/lib/field_compactor.js +70 -0
  274. package/dist/node_modules/cron-parser/lib/field_stringify.js +58 -0
  275. package/dist/node_modules/cron-parser/lib/parser.js +1 -0
  276. package/dist/node_modules/cron-parser/package.json +1 -0
  277. package/dist/node_modules/cron-parser/types/common.d.ts +131 -0
  278. package/dist/node_modules/cron-parser/types/index.d.ts +45 -0
  279. package/dist/node_modules/cron-parser/types/ts3/index.d.ts +28 -0
  280. package/dist/node_modules/form-data/License +19 -0
  281. package/dist/node_modules/form-data/index.d.ts +62 -0
  282. package/dist/node_modules/form-data/lib/browser.js +2 -0
  283. package/dist/node_modules/form-data/lib/form_data.js +14 -0
  284. package/dist/node_modules/form-data/lib/populate.js +10 -0
  285. package/dist/node_modules/form-data/package.json +1 -0
  286. package/dist/node_modules/jsonata/LICENSE +19 -0
  287. package/dist/node_modules/jsonata/jsonata-es5.js +9875 -0
  288. package/dist/node_modules/jsonata/jsonata-es5.min.js +1 -0
  289. package/dist/node_modules/jsonata/jsonata.d.ts +72 -0
  290. package/dist/node_modules/jsonata/jsonata.js +1 -0
  291. package/dist/node_modules/jsonata/jsonata.min.js +1 -0
  292. package/dist/node_modules/jsonata/package.json +1 -0
  293. package/dist/node_modules/lru-cache/index-cjs.d.ts +7 -0
  294. package/dist/node_modules/lru-cache/index-cjs.js +1 -0
  295. package/dist/node_modules/lru-cache/index.d.ts +807 -0
  296. package/dist/node_modules/lru-cache/index.js +1334 -0
  297. package/dist/node_modules/lru-cache/index.min.js +2 -0
  298. package/dist/node_modules/lru-cache/package.json +1 -0
  299. package/dist/node_modules/mime-types/LICENSE +23 -0
  300. package/dist/node_modules/mime-types/index.js +14 -0
  301. package/dist/node_modules/mime-types/package.json +1 -0
  302. package/dist/node_modules/qrcode/bin/qrcode +159 -0
  303. package/dist/node_modules/qrcode/helper/to-sjis-browser.js +2 -0
  304. package/dist/node_modules/qrcode/helper/to-sjis.js +105 -0
  305. package/dist/node_modules/qrcode/lib/browser.js +76 -0
  306. package/dist/node_modules/qrcode/lib/can-promise.js +7 -0
  307. package/dist/node_modules/qrcode/lib/core/alignment-pattern.js +83 -0
  308. package/dist/node_modules/qrcode/lib/core/alphanumeric-data.js +59 -0
  309. package/dist/node_modules/qrcode/lib/core/bit-buffer.js +37 -0
  310. package/dist/node_modules/qrcode/lib/core/bit-matrix.js +65 -0
  311. package/dist/node_modules/qrcode/lib/core/byte-data.js +30 -0
  312. package/dist/node_modules/qrcode/lib/core/error-correction-code.js +135 -0
  313. package/dist/node_modules/qrcode/lib/core/error-correction-level.js +50 -0
  314. package/dist/node_modules/qrcode/lib/core/finder-pattern.js +22 -0
  315. package/dist/node_modules/qrcode/lib/core/format-info.js +29 -0
  316. package/dist/node_modules/qrcode/lib/core/galois-field.js +69 -0
  317. package/dist/node_modules/qrcode/lib/core/kanji-data.js +54 -0
  318. package/dist/node_modules/qrcode/lib/core/mask-pattern.js +234 -0
  319. package/dist/node_modules/qrcode/lib/core/mode.js +167 -0
  320. package/dist/node_modules/qrcode/lib/core/numeric-data.js +43 -0
  321. package/dist/node_modules/qrcode/lib/core/polynomial.js +62 -0
  322. package/dist/node_modules/qrcode/lib/core/qrcode.js +495 -0
  323. package/dist/node_modules/qrcode/lib/core/reed-solomon-encoder.js +56 -0
  324. package/dist/node_modules/qrcode/lib/core/regex.js +31 -0
  325. package/dist/node_modules/qrcode/lib/core/segments.js +330 -0
  326. package/dist/node_modules/qrcode/lib/core/utils.js +63 -0
  327. package/dist/node_modules/qrcode/lib/core/version-check.js +9 -0
  328. package/dist/node_modules/qrcode/lib/core/version.js +163 -0
  329. package/dist/node_modules/qrcode/lib/index.js +1 -0
  330. package/dist/node_modules/qrcode/lib/renderer/canvas.js +63 -0
  331. package/dist/node_modules/qrcode/lib/renderer/png.js +78 -0
  332. package/dist/node_modules/qrcode/lib/renderer/svg-tag.js +81 -0
  333. package/dist/node_modules/qrcode/lib/renderer/svg.js +19 -0
  334. package/dist/node_modules/qrcode/lib/renderer/terminal/terminal-small.js +85 -0
  335. package/dist/node_modules/qrcode/lib/renderer/terminal/terminal.js +49 -0
  336. package/dist/node_modules/qrcode/lib/renderer/terminal.js +9 -0
  337. package/dist/node_modules/qrcode/lib/renderer/utf8.js +71 -0
  338. package/dist/node_modules/qrcode/lib/renderer/utils.js +99 -0
  339. package/dist/node_modules/qrcode/lib/server.js +138 -0
  340. package/dist/node_modules/qrcode/license +10 -0
  341. package/dist/node_modules/qrcode/package.json +1 -0
  342. package/dist/server/Plugin.d.ts +50 -0
  343. package/dist/server/Plugin.js +498 -0
  344. package/dist/server/Processor.d.ts +59 -0
  345. package/dist/server/Processor.js +306 -0
  346. package/dist/server/actions/executions.d.ts +3 -0
  347. package/dist/server/actions/executions.js +87 -0
  348. package/dist/server/actions/index.d.ts +3 -0
  349. package/dist/server/actions/index.js +59 -0
  350. package/dist/server/actions/nodes.d.ts +6 -0
  351. package/dist/server/actions/nodes.js +322 -0
  352. package/dist/server/actions/workflows.d.ts +10 -0
  353. package/dist/server/actions/workflows.js +347 -0
  354. package/dist/server/collections/1-users_jobs.d.ts +2 -0
  355. package/dist/server/collections/1-users_jobs.js +73 -0
  356. package/dist/server/collections/2-jobs.d.ts +2 -0
  357. package/dist/server/collections/2-jobs.js +40 -0
  358. package/dist/server/collections/3-users.d.ts +2 -0
  359. package/dist/server/collections/3-users.js +38 -0
  360. package/dist/server/collections/executions.d.ts +3 -0
  361. package/dist/server/collections/executions.js +64 -0
  362. package/dist/server/collections/flow_nodes.d.ts +3 -0
  363. package/dist/server/collections/flow_nodes.js +78 -0
  364. package/dist/server/collections/jobs.d.ts +3 -0
  365. package/dist/server/collections/jobs.js +61 -0
  366. package/dist/server/collections/workflows.d.ts +2 -0
  367. package/dist/server/collections/workflows.js +130 -0
  368. package/dist/server/constants.d.ts +22 -0
  369. package/dist/server/constants.js +52 -0
  370. package/dist/server/features/_deprecated-js-parse/JSParse.instruction.d.ts +10 -0
  371. package/dist/server/features/_deprecated-js-parse/JSParse.instruction.js +100 -0
  372. package/dist/server/features/_deprecated-js-parse/index.d.ts +1 -0
  373. package/dist/server/features/_deprecated-js-parse/index.js +33 -0
  374. package/dist/server/features/_deprecated-js-parse/plugin.d.ts +5 -0
  375. package/dist/server/features/_deprecated-js-parse/plugin.js +48 -0
  376. package/dist/server/features/_deprecated-json-parse/JSONParse.instruction.d.ts +11 -0
  377. package/dist/server/features/_deprecated-json-parse/JSONParse.instruction.js +81 -0
  378. package/dist/server/features/_deprecated-json-parse/index.d.ts +1 -0
  379. package/dist/server/features/_deprecated-json-parse/index.js +33 -0
  380. package/dist/server/features/_deprecated-json-parse/plugin.d.ts +5 -0
  381. package/dist/server/features/_deprecated-json-parse/plugin.js +48 -0
  382. package/dist/server/features/aggregate/AggregateInstruction.d.ts +7 -0
  383. package/dist/server/features/aggregate/AggregateInstruction.js +56 -0
  384. package/dist/server/features/aggregate/Plugin.d.ts +4 -0
  385. package/dist/server/features/aggregate/Plugin.js +45 -0
  386. package/dist/server/features/common/constants.d.ts +4 -0
  387. package/dist/server/features/common/constants.js +36 -0
  388. package/dist/server/features/delay/DelayInstruction.d.ts +12 -0
  389. package/dist/server/features/delay/DelayInstruction.js +106 -0
  390. package/dist/server/features/delay/Plugin.d.ts +4 -0
  391. package/dist/server/features/delay/Plugin.js +45 -0
  392. package/dist/server/features/dynamic-calculation/DynamicCalculation.d.ts +10 -0
  393. package/dist/server/features/dynamic-calculation/DynamicCalculation.js +62 -0
  394. package/dist/server/features/dynamic-calculation/Plugin.d.ts +4 -0
  395. package/dist/server/features/dynamic-calculation/Plugin.js +49 -0
  396. package/dist/server/features/dynamic-calculation/expression-field.d.ts +7 -0
  397. package/dist/server/features/dynamic-calculation/expression-field.js +32 -0
  398. package/dist/server/features/interception/RequestInterceptionTrigger.d.ts +11 -0
  399. package/dist/server/features/interception/RequestInterceptionTrigger.js +146 -0
  400. package/dist/server/features/interception/index.d.ts +4 -0
  401. package/dist/server/features/interception/index.js +35 -0
  402. package/dist/server/features/loop/LoopInstruction.d.ts +13 -0
  403. package/dist/server/features/loop/LoopInstruction.js +100 -0
  404. package/dist/server/features/loop/Plugin.d.ts +4 -0
  405. package/dist/server/features/loop/Plugin.js +45 -0
  406. package/dist/server/features/manual/ManualInstruction.d.ts +28 -0
  407. package/dist/server/features/manual/ManualInstruction.js +152 -0
  408. package/dist/server/features/manual/Plugin.d.ts +4 -0
  409. package/dist/server/features/manual/Plugin.js +70 -0
  410. package/dist/server/features/manual/actions.d.ts +2 -0
  411. package/dist/server/features/manual/actions.js +104 -0
  412. package/dist/server/features/manual/forms/create.d.ts +6 -0
  413. package/dist/server/features/manual/forms/create.js +41 -0
  414. package/dist/server/features/manual/forms/index.d.ts +6 -0
  415. package/dist/server/features/manual/forms/index.js +38 -0
  416. package/dist/server/features/manual/forms/update.d.ts +7 -0
  417. package/dist/server/features/manual/forms/update.js +41 -0
  418. package/dist/server/features/notice/NoticeInstruction.d.ts +9 -0
  419. package/dist/server/features/notice/NoticeInstruction.js +172 -0
  420. package/dist/server/features/notice/actions.d.ts +3 -0
  421. package/dist/server/features/notice/actions.js +124 -0
  422. package/dist/server/features/notice/collections/workflowNotice.d.ts +3 -0
  423. package/dist/server/features/notice/collections/workflowNotice.js +90 -0
  424. package/dist/server/features/notice/constants.d.ts +16 -0
  425. package/dist/server/features/notice/constants.js +44 -0
  426. package/dist/server/features/notice/index.d.ts +1 -0
  427. package/dist/server/features/notice/index.js +33 -0
  428. package/dist/server/features/notice/plugin.d.ts +12 -0
  429. package/dist/server/features/notice/plugin.js +83 -0
  430. package/dist/server/features/notice/tools.d.ts +17 -0
  431. package/dist/server/features/notice/tools.js +163 -0
  432. package/dist/server/features/omni-trigger/CustomActionTrigger.d.ts +11 -0
  433. package/dist/server/features/omni-trigger/CustomActionTrigger.js +270 -0
  434. package/dist/server/features/omni-trigger/Plugin.d.ts +4 -0
  435. package/dist/server/features/omni-trigger/Plugin.js +45 -0
  436. package/dist/server/features/omni-trigger/index.d.ts +1 -0
  437. package/dist/server/features/omni-trigger/index.js +21 -0
  438. package/dist/server/features/parallel/ParallelInstruction.d.ts +11 -0
  439. package/dist/server/features/parallel/ParallelInstruction.js +137 -0
  440. package/dist/server/features/parallel/Plugin.d.ts +4 -0
  441. package/dist/server/features/parallel/Plugin.js +45 -0
  442. package/dist/server/features/request/Plugin.d.ts +4 -0
  443. package/dist/server/features/request/Plugin.js +45 -0
  444. package/dist/server/features/request/RequestInstruction.d.ts +14 -0
  445. package/dist/server/features/request/RequestInstruction.js +183 -0
  446. package/dist/server/features/response/Plugin.d.ts +4 -0
  447. package/dist/server/features/response/Plugin.js +45 -0
  448. package/dist/server/features/response/ResponseMessageInstruction.d.ts +7 -0
  449. package/dist/server/features/response/ResponseMessageInstruction.js +57 -0
  450. package/dist/server/features/response/index.d.ts +1 -0
  451. package/dist/server/features/response/index.js +21 -0
  452. package/dist/server/features/script/index.d.ts +1 -0
  453. package/dist/server/features/script/index.js +33 -0
  454. package/dist/server/features/script/plugin.d.ts +5 -0
  455. package/dist/server/features/script/plugin.js +48 -0
  456. package/dist/server/features/script/script.instruction.d.ts +10 -0
  457. package/dist/server/features/script/script.instruction.js +212 -0
  458. package/dist/server/features/sql/Plugin.d.ts +4 -0
  459. package/dist/server/features/sql/Plugin.js +45 -0
  460. package/dist/server/features/sql/SQLInstruction.d.ts +10 -0
  461. package/dist/server/features/sql/SQLInstruction.js +48 -0
  462. package/dist/server/features/trigger-instruction/TriggerInstruction.d.ts +15 -0
  463. package/dist/server/features/trigger-instruction/TriggerInstruction.js +71 -0
  464. package/dist/server/features/trigger-instruction/flownode-check.d.ts +2 -0
  465. package/dist/server/features/trigger-instruction/flownode-check.js +114 -0
  466. package/dist/server/features/trigger-instruction/index.d.ts +0 -0
  467. package/dist/server/features/trigger-instruction/index.js +0 -0
  468. package/dist/server/features/trigger-instruction/plugin.d.ts +4 -0
  469. package/dist/server/features/trigger-instruction/plugin.js +37 -0
  470. package/dist/server/features/variables/Plugin.d.ts +4 -0
  471. package/dist/server/features/variables/Plugin.js +45 -0
  472. package/dist/server/features/variables/VariableInstruction.d.ts +7 -0
  473. package/dist/server/features/variables/VariableInstruction.js +61 -0
  474. package/dist/server/features/variables/index.d.ts +1 -0
  475. package/dist/server/features/variables/index.js +27 -0
  476. package/dist/server/features/webhook/Plugin.d.ts +4 -0
  477. package/dist/server/features/webhook/Plugin.js +109 -0
  478. package/dist/server/features/webhook/index.d.ts +1 -0
  479. package/dist/server/features/webhook/index.js +27 -0
  480. package/dist/server/features/webhook/webhooks.d.ts +9 -0
  481. package/dist/server/features/webhook/webhooks.js +286 -0
  482. package/dist/server/functions/index.d.ts +9 -0
  483. package/dist/server/functions/index.js +31 -0
  484. package/dist/server/index.d.ts +8 -0
  485. package/dist/server/index.js +54 -0
  486. package/dist/server/instructions/CalculationInstruction.d.ts +17 -0
  487. package/dist/server/instructions/CalculationInstruction.js +59 -0
  488. package/dist/server/instructions/ConditionInstruction.d.ts +29 -0
  489. package/dist/server/instructions/ConditionInstruction.js +160 -0
  490. package/dist/server/instructions/CreateInstruction.d.ts +10 -0
  491. package/dist/server/instructions/CreateInstruction.js +175 -0
  492. package/dist/server/instructions/DestroyInstruction.d.ts +10 -0
  493. package/dist/server/instructions/DestroyInstruction.js +50 -0
  494. package/dist/server/instructions/EndInstruction.d.ts +6 -0
  495. package/dist/server/instructions/EndInstruction.js +47 -0
  496. package/dist/server/instructions/QueryInstruction.d.ts +13 -0
  497. package/dist/server/instructions/QueryInstruction.js +78 -0
  498. package/dist/server/instructions/UpdateInstruction.d.ts +10 -0
  499. package/dist/server/instructions/UpdateInstruction.js +159 -0
  500. package/dist/server/instructions/index.d.ts +23 -0
  501. package/dist/server/instructions/index.js +33 -0
  502. package/dist/server/migrations/20241118104303-add-initAt.d.ts +6 -0
  503. package/dist/server/migrations/20241118104303-add-initAt.js +47 -0
  504. package/dist/server/migrations/20241206122842-add-createdBy.d.ts +6 -0
  505. package/dist/server/migrations/20241206122842-add-createdBy.js +46 -0
  506. package/dist/server/migrations/20241220001154-bigInt.d.ts +6 -0
  507. package/dist/server/migrations/20241220001154-bigInt.js +39 -0
  508. package/dist/server/triggers/CollectionTrigger.d.ts +14 -0
  509. package/dist/server/triggers/CollectionTrigger.js +188 -0
  510. package/dist/server/triggers/ScheduleTrigger/DateFieldScheduleTrigger.d.ts +31 -0
  511. package/dist/server/triggers/ScheduleTrigger/DateFieldScheduleTrigger.js +342 -0
  512. package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.d.ts +15 -0
  513. package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.js +143 -0
  514. package/dist/server/triggers/ScheduleTrigger/index.d.ts +13 -0
  515. package/dist/server/triggers/ScheduleTrigger/index.js +74 -0
  516. package/dist/server/triggers/ScheduleTrigger/utils.d.ts +5 -0
  517. package/dist/server/triggers/ScheduleTrigger/utils.js +35 -0
  518. package/dist/server/triggers/index.d.ts +13 -0
  519. package/dist/server/triggers/index.js +37 -0
  520. package/dist/server/types/Execution.d.ts +17 -0
  521. package/dist/server/types/Execution.js +25 -0
  522. package/dist/server/types/FlowNode.d.ts +16 -0
  523. package/dist/server/types/FlowNode.js +25 -0
  524. package/dist/server/types/Job.d.ts +14 -0
  525. package/dist/server/types/Job.js +25 -0
  526. package/dist/server/types/Workflow.d.ts +27 -0
  527. package/dist/server/types/Workflow.js +25 -0
  528. package/dist/server/types/index.d.ts +4 -0
  529. package/dist/server/types/index.js +15 -0
  530. package/dist/server/utils.d.ts +1 -0
  531. package/dist/server/utils.js +42 -0
  532. package/dist/swagger/index.d.ts +754 -0
  533. package/dist/swagger/index.js +798 -0
  534. package/package.json +63 -0
  535. package/server.d.ts +2 -0
  536. package/server.js +1 -0
@@ -0,0 +1 @@
1
+ (function(){var t={5364:function(t){"use strict";var e={single_source_shortest_paths:function(t,n,r){var i={};var o={};o[n]=0;var s=e.PriorityQueue.make();s.push(n,0);var a,l,f,h,u,c,d,p,g;while(!s.empty()){a=s.pop();l=a.value;h=a.cost;u=t[l]||{};for(f in u){if(u.hasOwnProperty(f)){c=u[f];d=h+c;p=o[f];g=typeof o[f]==="undefined";if(g||p>d){o[f]=d;s.push(f,d);i[f]=l}}}}if(typeof r!=="undefined"&&typeof o[r]==="undefined"){var _=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(_)}return i},extract_shortest_path_from_predecessor_list:function(t,e){var n=[];var r=e;var i;while(r){n.push(r);i=t[r];r=t[r]}n.reverse();return n},find_path:function(t,n,r){var i=e.single_source_shortest_paths(t,n,r);return e.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(t){var n=e.PriorityQueue,r={},i;t=t||{};for(i in n){if(n.hasOwnProperty(i)){r[i]=n[i]}}r.queue=[];r.sorter=t.sorter||n.default_sorter;return r},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n);this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};if(true){t.exports=e}},7585:function(t,e,n){"use strict";let r=n(990);let i=[function(){},function(t,e,n,r){if(r===e.length){throw new Error("Ran out of data")}let i=e[r];t[n]=i;t[n+1]=i;t[n+2]=i;t[n+3]=255},function(t,e,n,r){if(r+1>=e.length){throw new Error("Ran out of data")}let i=e[r];t[n]=i;t[n+1]=i;t[n+2]=i;t[n+3]=e[r+1]},function(t,e,n,r){if(r+2>=e.length){throw new Error("Ran out of data")}t[n]=e[r];t[n+1]=e[r+1];t[n+2]=e[r+2];t[n+3]=255},function(t,e,n,r){if(r+3>=e.length){throw new Error("Ran out of data")}t[n]=e[r];t[n+1]=e[r+1];t[n+2]=e[r+2];t[n+3]=e[r+3]}];let o=[function(){},function(t,e,n,r){let i=e[0];t[n]=i;t[n+1]=i;t[n+2]=i;t[n+3]=r},function(t,e,n){let r=e[0];t[n]=r;t[n+1]=r;t[n+2]=r;t[n+3]=e[1]},function(t,e,n,r){t[n]=e[0];t[n+1]=e[1];t[n+2]=e[2];t[n+3]=r},function(t,e,n){t[n]=e[0];t[n+1]=e[1];t[n+2]=e[2];t[n+3]=e[3]}];function bitRetriever(t,e){let n=[];let r=0;function split(){if(r===t.length){throw new Error("Ran out of data")}let i=t[r];r++;let o,s,a,l,f,h,u,c;switch(e){default:throw new Error("unrecognised depth");case 16:u=t[r];r++;n.push((i<<8)+u);break;case 4:u=i&15;c=i>>4;n.push(c,u);break;case 2:f=i&3;h=i>>2&3;u=i>>4&3;c=i>>6&3;n.push(c,u,h,f);break;case 1:o=i&1;s=i>>1&1;a=i>>2&1;l=i>>3&1;f=i>>4&1;h=i>>5&1;u=i>>6&1;c=i>>7&1;n.push(c,u,h,f,l,a,s,o);break}}return{get:function(t){while(n.length<t){split()}let e=n.slice(0,t);n=n.slice(t);return e},resetAfterLine:function(){n.length=0},end:function(){if(r!==t.length){throw new Error("extra data found")}}}}function mapImage8Bit(t,e,n,r,o,s){let a=t.width;let l=t.height;let f=t.index;for(let t=0;t<l;t++){for(let l=0;l<a;l++){let a=n(l,t,f);i[r](e,o,a,s);s+=r}}return s}function mapImageCustomBit(t,e,n,r,i,s){let a=t.width;let l=t.height;let f=t.index;for(let t=0;t<l;t++){for(let l=0;l<a;l++){let a=i.get(r);let h=n(l,t,f);o[r](e,a,h,s)}i.resetAfterLine()}}e.dataToBitMap=function(t,e){let n=e.width;let i=e.height;let o=e.depth;let s=e.bpp;let a=e.interlace;let l;if(o!==8){l=bitRetriever(t,o)}let f;if(o<=8){f=Buffer.alloc(n*i*4)}else{f=new Uint16Array(n*i*4)}let h=Math.pow(2,o)-1;let u=0;let c;let d;if(a){c=r.getImagePasses(n,i);d=r.getInterlaceIterator(n,i)}else{let t=0;d=function(){let e=t;t+=4;return e};c=[{width:n,height:i}]}for(let e=0;e<c.length;e++){if(o===8){u=mapImage8Bit(c[e],f,d,s,t,u)}else{mapImageCustomBit(c[e],f,d,s,l,h)}}if(o===8){if(u!==t.length){throw new Error("extra data found")}}else{l.end()}return f}},9774:function(t,e,n){"use strict";let r=n(3530);t.exports=function(t,e,n,i){let o=[r.COLORTYPE_COLOR_ALPHA,r.COLORTYPE_ALPHA].indexOf(i.colorType)!==-1;if(i.colorType===i.inputColorType){let e=function(){let t=new ArrayBuffer(2);new DataView(t).setInt16(0,256,true);return new Int16Array(t)[0]!==256}();if(i.bitDepth===8||i.bitDepth===16&&e){return t}}let s=i.bitDepth!==16?t:new Uint16Array(t.buffer);let a=255;let l=r.COLORTYPE_TO_BPP_MAP[i.inputColorType];if(l===4&&!i.inputHasAlpha){l=3}let f=r.COLORTYPE_TO_BPP_MAP[i.colorType];if(i.bitDepth===16){a=65535;f*=2}let h=Buffer.alloc(e*n*f);let u=0;let c=0;let d=i.bgColor||{};if(d.red===undefined){d.red=a}if(d.green===undefined){d.green=a}if(d.blue===undefined){d.blue=a}function getRGBA(){let t;let e;let n;let l=a;switch(i.inputColorType){case r.COLORTYPE_COLOR_ALPHA:l=s[u+3];t=s[u];e=s[u+1];n=s[u+2];break;case r.COLORTYPE_COLOR:t=s[u];e=s[u+1];n=s[u+2];break;case r.COLORTYPE_ALPHA:l=s[u+1];t=s[u];e=t;n=t;break;case r.COLORTYPE_GRAYSCALE:t=s[u];e=t;n=t;break;default:throw new Error("input color type:"+i.inputColorType+" is not supported at present")}if(i.inputHasAlpha){if(!o){l/=a;t=Math.min(Math.max(Math.round((1-l)*d.red+l*t),0),a);e=Math.min(Math.max(Math.round((1-l)*d.green+l*e),0),a);n=Math.min(Math.max(Math.round((1-l)*d.blue+l*n),0),a)}}return{red:t,green:e,blue:n,alpha:l}}for(let t=0;t<n;t++){for(let t=0;t<e;t++){let t=getRGBA(s,u);switch(i.colorType){case r.COLORTYPE_COLOR_ALPHA:case r.COLORTYPE_COLOR:if(i.bitDepth===8){h[c]=t.red;h[c+1]=t.green;h[c+2]=t.blue;if(o){h[c+3]=t.alpha}}else{h.writeUInt16BE(t.red,c);h.writeUInt16BE(t.green,c+2);h.writeUInt16BE(t.blue,c+4);if(o){h.writeUInt16BE(t.alpha,c+6)}}break;case r.COLORTYPE_ALPHA:case r.COLORTYPE_GRAYSCALE:{let e=(t.red+t.green+t.blue)/3;if(i.bitDepth===8){h[c]=e;if(o){h[c+1]=t.alpha}}else{h.writeUInt16BE(e,c);if(o){h.writeUInt16BE(t.alpha,c+2)}}break}default:throw new Error("unrecognised color Type "+i.colorType)}u+=l;c+=f}}return h}},1346:function(t,e,n){"use strict";let r=n(9023);let i=n(2203);let o=t.exports=function(){i.call(this);this._buffers=[];this._buffered=0;this._reads=[];this._paused=false;this._encoding="utf8";this.writable=true};r.inherits(o,i);o.prototype.read=function(t,e){this._reads.push({length:Math.abs(t),allowLess:t<0,func:e});process.nextTick(function(){this._process();if(this._paused&&this._reads&&this._reads.length>0){this._paused=false;this.emit("drain")}}.bind(this))};o.prototype.write=function(t,e){if(!this.writable){this.emit("error",new Error("Stream not writable"));return false}let n;if(Buffer.isBuffer(t)){n=t}else{n=Buffer.from(t,e||this._encoding)}this._buffers.push(n);this._buffered+=n.length;this._process();if(this._reads&&this._reads.length===0){this._paused=true}return this.writable&&!this._paused};o.prototype.end=function(t,e){if(t){this.write(t,e)}this.writable=false;if(!this._buffers){return}if(this._buffers.length===0){this._end()}else{this._buffers.push(null);this._process()}};o.prototype.destroySoon=o.prototype.end;o.prototype._end=function(){if(this._reads.length>0){this.emit("error",new Error("Unexpected end of input"))}this.destroy()};o.prototype.destroy=function(){if(!this._buffers){return}this.writable=false;this._reads=null;this._buffers=null;this.emit("close")};o.prototype._processReadAllowingLess=function(t){this._reads.shift();let e=this._buffers[0];if(e.length>t.length){this._buffered-=t.length;this._buffers[0]=e.slice(t.length);t.func.call(this,e.slice(0,t.length))}else{this._buffered-=e.length;this._buffers.shift();t.func.call(this,e)}};o.prototype._processRead=function(t){this._reads.shift();let e=0;let n=0;let r=Buffer.alloc(t.length);while(e<t.length){let i=this._buffers[n++];let o=Math.min(i.length,t.length-e);i.copy(r,e,0,o);e+=o;if(o!==i.length){this._buffers[--n]=i.slice(o)}}if(n>0){this._buffers.splice(0,n)}this._buffered-=t.length;t.func.call(this,r)};o.prototype._process=function(){try{while(this._buffered>0&&this._reads&&this._reads.length>0){let t=this._reads[0];if(t.allowLess){this._processReadAllowingLess(t)}else if(this._buffered>=t.length){this._processRead(t)}else{break}}if(this._buffers&&!this.writable){this._end()}}catch(t){this.emit("error",t)}}},3530:function(t){"use strict";t.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}},4677:function(t){"use strict";let e=[];(function(){for(let t=0;t<256;t++){let n=t;for(let t=0;t<8;t++){if(n&1){n=3988292384^n>>>1}else{n=n>>>1}}e[t]=n}})();let n=t.exports=function(){this._crc=-1};n.prototype.write=function(t){for(let n=0;n<t.length;n++){this._crc=e[(this._crc^t[n])&255]^this._crc>>>8}return true};n.prototype.crc32=function(){return this._crc^-1};n.crc32=function(t){let n=-1;for(let r=0;r<t.length;r++){n=e[(n^t[r])&255]^n>>>8}return n^-1}},5739:function(t,e,n){"use strict";let r=n(8220);function filterNone(t,e,n,r,i){for(let o=0;o<n;o++){r[i+o]=t[e+o]}}function filterSumNone(t,e,n){let r=0;let i=e+n;for(let n=e;n<i;n++){r+=Math.abs(t[n])}return r}function filterSub(t,e,n,r,i,o){for(let s=0;s<n;s++){let n=s>=o?t[e+s-o]:0;let a=t[e+s]-n;r[i+s]=a}}function filterSumSub(t,e,n,r){let i=0;for(let o=0;o<n;o++){let n=o>=r?t[e+o-r]:0;let s=t[e+o]-n;i+=Math.abs(s)}return i}function filterUp(t,e,n,r,i){for(let o=0;o<n;o++){let s=e>0?t[e+o-n]:0;let a=t[e+o]-s;r[i+o]=a}}function filterSumUp(t,e,n){let r=0;let i=e+n;for(let o=e;o<i;o++){let i=e>0?t[o-n]:0;let s=t[o]-i;r+=Math.abs(s)}return r}function filterAvg(t,e,n,r,i,o){for(let s=0;s<n;s++){let a=s>=o?t[e+s-o]:0;let l=e>0?t[e+s-n]:0;let f=t[e+s]-(a+l>>1);r[i+s]=f}}function filterSumAvg(t,e,n,r){let i=0;for(let o=0;o<n;o++){let s=o>=r?t[e+o-r]:0;let a=e>0?t[e+o-n]:0;let l=t[e+o]-(s+a>>1);i+=Math.abs(l)}return i}function filterPaeth(t,e,n,i,o,s){for(let a=0;a<n;a++){let l=a>=s?t[e+a-s]:0;let f=e>0?t[e+a-n]:0;let h=e>0&&a>=s?t[e+a-(n+s)]:0;let u=t[e+a]-r(l,f,h);i[o+a]=u}}function filterSumPaeth(t,e,n,i){let o=0;for(let s=0;s<n;s++){let a=s>=i?t[e+s-i]:0;let l=e>0?t[e+s-n]:0;let f=e>0&&s>=i?t[e+s-(n+i)]:0;let h=t[e+s]-r(a,l,f);o+=Math.abs(h)}return o}let i={0:filterNone,1:filterSub,2:filterUp,3:filterAvg,4:filterPaeth};let o={0:filterSumNone,1:filterSumSub,2:filterSumUp,3:filterSumAvg,4:filterSumPaeth};t.exports=function(t,e,n,r,s){let a;if(!("filterType"in r)||r.filterType===-1){a=[0,1,2,3,4]}else if(typeof r.filterType==="number"){a=[r.filterType]}else{throw new Error("unrecognised filter types")}if(r.bitDepth===16){s*=2}let l=e*s;let f=0;let h=0;let u=Buffer.alloc((l+1)*n);let c=a[0];for(let e=0;e<n;e++){if(a.length>1){let e=Infinity;for(let n=0;n<a.length;n++){let r=o[a[n]](t,h,l,s);if(r<e){c=a[n];e=r}}}u[f]=c;f++;i[c](t,h,l,u,f,s);f+=l;h+=l}return u}},9682:function(t,e,n){"use strict";let r=n(9023);let i=n(1346);let o=n(8959);let s=t.exports=function(t){i.call(this);let e=[];let n=this;this._filter=new o(t,{read:this.read.bind(this),write:function(t){e.push(t)},complete:function(){n.emit("complete",Buffer.concat(e))}});this._filter.start()};r.inherits(s,i)},5911:function(t,e,n){"use strict";let r=n(1682);let i=n(8959);e.process=function(t,e){let n=[];let o=new r(t);let s=new i(e,{read:o.read.bind(o),write:function(t){n.push(t)},complete:function(){}});s.start();o.process();return Buffer.concat(n)}},8959:function(t,e,n){"use strict";let r=n(990);let i=n(8220);function getByteWidth(t,e,n){let r=t*e;if(n!==8){r=Math.ceil(r/(8/n))}return r}let o=t.exports=function(t,e){let n=t.width;let i=t.height;let o=t.interlace;let s=t.bpp;let a=t.depth;this.read=e.read;this.write=e.write;this.complete=e.complete;this._imageIndex=0;this._images=[];if(o){let t=r.getImagePasses(n,i);for(let e=0;e<t.length;e++){this._images.push({byteWidth:getByteWidth(t[e].width,s,a),height:t[e].height,lineIndex:0})}}else{this._images.push({byteWidth:getByteWidth(n,s,a),height:i,lineIndex:0})}if(a===8){this._xComparison=s}else if(a===16){this._xComparison=s*2}else{this._xComparison=1}};o.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))};o.prototype._unFilterType1=function(t,e,n){let r=this._xComparison;let i=r-1;for(let o=0;o<n;o++){let n=t[1+o];let s=o>i?e[o-r]:0;e[o]=n+s}};o.prototype._unFilterType2=function(t,e,n){let r=this._lastLine;for(let i=0;i<n;i++){let n=t[1+i];let o=r?r[i]:0;e[i]=n+o}};o.prototype._unFilterType3=function(t,e,n){let r=this._xComparison;let i=r-1;let o=this._lastLine;for(let s=0;s<n;s++){let n=t[1+s];let a=o?o[s]:0;let l=s>i?e[s-r]:0;let f=Math.floor((l+a)/2);e[s]=n+f}};o.prototype._unFilterType4=function(t,e,n){let r=this._xComparison;let o=r-1;let s=this._lastLine;for(let a=0;a<n;a++){let n=t[1+a];let l=s?s[a]:0;let f=a>o?e[a-r]:0;let h=a>o&&s?s[a-r]:0;let u=i(f,l,h);e[a]=n+u}};o.prototype._reverseFilterLine=function(t){let e=t[0];let n;let r=this._images[this._imageIndex];let i=r.byteWidth;if(e===0){n=t.slice(1,i+1)}else{n=Buffer.alloc(i);switch(e){case 1:this._unFilterType1(t,n,i);break;case 2:this._unFilterType2(t,n,i);break;case 3:this._unFilterType3(t,n,i);break;case 4:this._unFilterType4(t,n,i);break;default:throw new Error("Unrecognised filter type - "+e)}}this.write(n);r.lineIndex++;if(r.lineIndex>=r.height){this._lastLine=null;this._imageIndex++;r=this._images[this._imageIndex]}else{this._lastLine=n}if(r){this.read(r.byteWidth+1,this._reverseFilterLine.bind(this))}else{this._lastLine=null;this.complete()}}},8681:function(t){"use strict";function dePalette(t,e,n,r,i){let o=0;for(let s=0;s<r;s++){for(let r=0;r<n;r++){let n=i[t[o]];if(!n){throw new Error("index "+t[o]+" not in palette")}for(let t=0;t<4;t++){e[o+t]=n[t]}o+=4}}}function replaceTransparentColor(t,e,n,r,i){let o=0;for(let s=0;s<r;s++){for(let r=0;r<n;r++){let n=false;if(i.length===1){if(i[0]===t[o]){n=true}}else if(i[0]===t[o]&&i[1]===t[o+1]&&i[2]===t[o+2]){n=true}if(n){for(let t=0;t<4;t++){e[o+t]=0}}o+=4}}}function scaleDepth(t,e,n,r,i){let o=255;let s=Math.pow(2,i)-1;let a=0;for(let i=0;i<r;i++){for(let r=0;r<n;r++){for(let n=0;n<4;n++){e[a+n]=Math.floor(t[a+n]*o/s+.5)}a+=4}}}t.exports=function(t,e){let n=e.depth;let r=e.width;let i=e.height;let o=e.colorType;let s=e.transColor;let a=e.palette;let l=t;if(o===3){dePalette(t,l,r,i,a)}else{if(s){replaceTransparentColor(t,l,r,i,s)}if(n!==8){if(n===16){l=Buffer.alloc(r*i*4)}scaleDepth(t,l,r,i,n)}}return l}},990:function(t,e){"use strict";let n=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];e.getImagePasses=function(t,e){let r=[];let i=t%8;let o=e%8;let s=(t-i)/8;let a=(e-o)/8;for(let t=0;t<n.length;t++){let e=n[t];let l=s*e.x.length;let f=a*e.y.length;for(let t=0;t<e.x.length;t++){if(e.x[t]<i){l++}else{break}}for(let t=0;t<e.y.length;t++){if(e.y[t]<o){f++}else{break}}if(l>0&&f>0){r.push({width:l,height:f,index:t})}}return r};e.getInterlaceIterator=function(t){return function(e,r,i){let o=e%n[i].x.length;let s=(e-o)/n[i].x.length*8+n[i].x[o];let a=r%n[i].y.length;let l=(r-a)/n[i].y.length*8+n[i].y[a];return s*4+l*t*4}}},6192:function(t,e,n){"use strict";let r=n(9023);let i=n(2203);let o=n(3530);let s=n(1);let a=t.exports=function(t){i.call(this);let e=t||{};this._packer=new s(e);this._deflate=this._packer.createDeflate();this.readable=true};r.inherits(a,i);a.prototype.pack=function(t,e,n,r){this.emit("data",Buffer.from(o.PNG_SIGNATURE));this.emit("data",this._packer.packIHDR(e,n));if(r){this.emit("data",this._packer.packGAMA(r))}let i=this._packer.filterData(t,e,n);this._deflate.on("error",this.emit.bind(this,"error"));this._deflate.on("data",function(t){this.emit("data",this._packer.packIDAT(t))}.bind(this));this._deflate.on("end",function(){this.emit("data",this._packer.packIEND());this.emit("end")}.bind(this));this._deflate.end(i)}},9553:function(t,e,n){"use strict";let r=true;let i=n(3106);if(!i.deflateSync){r=false}let o=n(3530);let s=n(1);t.exports=function(t,e){if(!r){throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0")}let n=e||{};let a=new s(n);let l=[];l.push(Buffer.from(o.PNG_SIGNATURE));l.push(a.packIHDR(t.width,t.height));if(t.gamma){l.push(a.packGAMA(t.gamma))}let f=a.filterData(t.data,t.width,t.height);let h=i.deflateSync(f,a.getDeflateOptions());f=null;if(!h||!h.length){throw new Error("bad png - invalid compressed data response")}l.push(a.packIDAT(h));l.push(a.packIEND());return Buffer.concat(l)}},1:function(t,e,n){"use strict";let r=n(3530);let i=n(4677);let o=n(9774);let s=n(5739);let a=n(3106);let l=t.exports=function(t){this._options=t;t.deflateChunkSize=t.deflateChunkSize||32*1024;t.deflateLevel=t.deflateLevel!=null?t.deflateLevel:9;t.deflateStrategy=t.deflateStrategy!=null?t.deflateStrategy:3;t.inputHasAlpha=t.inputHasAlpha!=null?t.inputHasAlpha:true;t.deflateFactory=t.deflateFactory||a.createDeflate;t.bitDepth=t.bitDepth||8;t.colorType=typeof t.colorType==="number"?t.colorType:r.COLORTYPE_COLOR_ALPHA;t.inputColorType=typeof t.inputColorType==="number"?t.inputColorType:r.COLORTYPE_COLOR_ALPHA;if([r.COLORTYPE_GRAYSCALE,r.COLORTYPE_COLOR,r.COLORTYPE_COLOR_ALPHA,r.COLORTYPE_ALPHA].indexOf(t.colorType)===-1){throw new Error("option color type:"+t.colorType+" is not supported at present")}if([r.COLORTYPE_GRAYSCALE,r.COLORTYPE_COLOR,r.COLORTYPE_COLOR_ALPHA,r.COLORTYPE_ALPHA].indexOf(t.inputColorType)===-1){throw new Error("option input color type:"+t.inputColorType+" is not supported at present")}if(t.bitDepth!==8&&t.bitDepth!==16){throw new Error("option bit depth:"+t.bitDepth+" is not supported at present")}};l.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}};l.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())};l.prototype.filterData=function(t,e,n){let i=o(t,e,n,this._options);let a=r.COLORTYPE_TO_BPP_MAP[this._options.colorType];let l=s(i,e,n,this._options,a);return l};l.prototype._packChunk=function(t,e){let n=e?e.length:0;let r=Buffer.alloc(n+12);r.writeUInt32BE(n,0);r.writeUInt32BE(t,4);if(e){e.copy(r,8)}r.writeInt32BE(i.crc32(r.slice(4,r.length-4)),r.length-4);return r};l.prototype.packGAMA=function(t){let e=Buffer.alloc(4);e.writeUInt32BE(Math.floor(t*r.GAMMA_DIVISION),0);return this._packChunk(r.TYPE_gAMA,e)};l.prototype.packIHDR=function(t,e){let n=Buffer.alloc(13);n.writeUInt32BE(t,0);n.writeUInt32BE(e,4);n[8]=this._options.bitDepth;n[9]=this._options.colorType;n[10]=0;n[11]=0;n[12]=0;return this._packChunk(r.TYPE_IHDR,n)};l.prototype.packIDAT=function(t){return this._packChunk(r.TYPE_IDAT,t)};l.prototype.packIEND=function(){return this._packChunk(r.TYPE_IEND,null)}},8220:function(t){"use strict";t.exports=function paethPredictor(t,e,n){let r=t+e-n;let i=Math.abs(r-t);let o=Math.abs(r-e);let s=Math.abs(r-n);if(i<=o&&i<=s){return t}if(o<=s){return e}return n}},5497:function(t,e,n){"use strict";let r=n(9023);let i=n(3106);let o=n(1346);let s=n(9682);let a=n(7352);let l=n(7585);let f=n(8681);let h=t.exports=function(t){o.call(this);this._parser=new a(t,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)});this._options=t;this.writable=true;this._parser.start()};r.inherits(h,o);h.prototype._handleError=function(t){this.emit("error",t);this.writable=false;this.destroy();if(this._inflate&&this._inflate.destroy){this._inflate.destroy()}if(this._filter){this._filter.destroy();this._filter.on("error",(function(){}))}this.errord=true};h.prototype._inflateData=function(t){if(!this._inflate){if(this._bitmapInfo.interlace){this._inflate=i.createInflate();this._inflate.on("error",this.emit.bind(this,"error"));this._filter.on("complete",this._complete.bind(this));this._inflate.pipe(this._filter)}else{let t=(this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3)+1;let e=t*this._bitmapInfo.height;let n=Math.max(e,i.Z_MIN_CHUNK);this._inflate=i.createInflate({chunkSize:n});let r=e;let o=this.emit.bind(this,"error");this._inflate.on("error",(function(t){if(!r){return}o(t)}));this._filter.on("complete",this._complete.bind(this));let s=this._filter.write.bind(this._filter);this._inflate.on("data",(function(t){if(!r){return}if(t.length>r){t=t.slice(0,r)}r-=t.length;s(t)}));this._inflate.on("end",this._filter.end.bind(this._filter))}}this._inflate.write(t)};h.prototype._handleMetaData=function(t){this._metaData=t;this._bitmapInfo=Object.create(t);this._filter=new s(this._bitmapInfo)};h.prototype._handleTransColor=function(t){this._bitmapInfo.transColor=t};h.prototype._handlePalette=function(t){this._bitmapInfo.palette=t};h.prototype._simpleTransparency=function(){this._metaData.alpha=true};h.prototype._headersFinished=function(){this.emit("metadata",this._metaData)};h.prototype._finished=function(){if(this.errord){return}if(!this._inflate){this.emit("error","No Inflate block")}else{this._inflate.end()}};h.prototype._complete=function(t){if(this.errord){return}let e;try{let n=l.dataToBitMap(t,this._bitmapInfo);e=f(n,this._bitmapInfo);n=null}catch(t){this._handleError(t);return}this.emit("parsed",e)}},5506:function(t,e,n){"use strict";let r=true;let i=n(3106);let o=n(9642);if(!i.deflateSync){r=false}let s=n(1682);let a=n(5911);let l=n(7352);let f=n(7585);let h=n(8681);t.exports=function(t,e){if(!r){throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0")}let n;function handleError(t){n=t}let u;function handleMetaData(t){u=t}function handleTransColor(t){u.transColor=t}function handlePalette(t){u.palette=t}function handleSimpleTransparency(){u.alpha=true}let c;function handleGamma(t){c=t}let d=[];function handleInflateData(t){d.push(t)}let p=new s(t);let g=new l(e,{read:p.read.bind(p),error:handleError,metadata:handleMetaData,gamma:handleGamma,palette:handlePalette,transColor:handleTransColor,inflateData:handleInflateData,simpleTransparency:handleSimpleTransparency});g.start();p.process();if(n){throw n}let _=Buffer.concat(d);d.length=0;let m;if(u.interlace){m=i.inflateSync(_)}else{let t=(u.width*u.bpp*u.depth+7>>3)+1;let e=t*u.height;m=o(_,{chunkSize:e,maxLength:e})}_=null;if(!m||!m.length){throw new Error("bad png - invalid inflate data response")}let y=a.process(m,u);_=null;let w=f.dataToBitMap(y,u);y=null;let E=h(w,u);u.data=E;u.gamma=c||0;return u}},7352:function(t,e,n){"use strict";let r=n(3530);let i=n(4677);let o=t.exports=function(t,e){this._options=t;t.checkCRC=t.checkCRC!==false;this._hasIHDR=false;this._hasIEND=false;this._emittedHeadersFinished=false;this._palette=[];this._colorType=0;this._chunks={};this._chunks[r.TYPE_IHDR]=this._handleIHDR.bind(this);this._chunks[r.TYPE_IEND]=this._handleIEND.bind(this);this._chunks[r.TYPE_IDAT]=this._handleIDAT.bind(this);this._chunks[r.TYPE_PLTE]=this._handlePLTE.bind(this);this._chunks[r.TYPE_tRNS]=this._handleTRNS.bind(this);this._chunks[r.TYPE_gAMA]=this._handleGAMA.bind(this);this.read=e.read;this.error=e.error;this.metadata=e.metadata;this.gamma=e.gamma;this.transColor=e.transColor;this.palette=e.palette;this.parsed=e.parsed;this.inflateData=e.inflateData;this.finished=e.finished;this.simpleTransparency=e.simpleTransparency;this.headersFinished=e.headersFinished||function(){}};o.prototype.start=function(){this.read(r.PNG_SIGNATURE.length,this._parseSignature.bind(this))};o.prototype._parseSignature=function(t){let e=r.PNG_SIGNATURE;for(let n=0;n<e.length;n++){if(t[n]!==e[n]){this.error(new Error("Invalid file signature"));return}}this.read(8,this._parseChunkBegin.bind(this))};o.prototype._parseChunkBegin=function(t){let e=t.readUInt32BE(0);let n=t.readUInt32BE(4);let o="";for(let e=4;e<8;e++){o+=String.fromCharCode(t[e])}let s=Boolean(t[4]&32);if(!this._hasIHDR&&n!==r.TYPE_IHDR){this.error(new Error("Expected IHDR on beggining"));return}this._crc=new i;this._crc.write(Buffer.from(o));if(this._chunks[n]){return this._chunks[n](e)}if(!s){this.error(new Error("Unsupported critical chunk type "+o));return}this.read(e+4,this._skipChunk.bind(this))};o.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))};o.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))};o.prototype._parseChunkEnd=function(t){let e=t.readInt32BE(0);let n=this._crc.crc32();if(this._options.checkCRC&&n!==e){this.error(new Error("Crc error - "+e+" - "+n));return}if(!this._hasIEND){this.read(8,this._parseChunkBegin.bind(this))}};o.prototype._handleIHDR=function(t){this.read(t,this._parseIHDR.bind(this))};o.prototype._parseIHDR=function(t){this._crc.write(t);let e=t.readUInt32BE(0);let n=t.readUInt32BE(4);let i=t[8];let o=t[9];let s=t[10];let a=t[11];let l=t[12];if(i!==8&&i!==4&&i!==2&&i!==1&&i!==16){this.error(new Error("Unsupported bit depth "+i));return}if(!(o in r.COLORTYPE_TO_BPP_MAP)){this.error(new Error("Unsupported color type"));return}if(s!==0){this.error(new Error("Unsupported compression method"));return}if(a!==0){this.error(new Error("Unsupported filter method"));return}if(l!==0&&l!==1){this.error(new Error("Unsupported interlace method"));return}this._colorType=o;let f=r.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=true;this.metadata({width:e,height:n,depth:i,interlace:Boolean(l),palette:Boolean(o&r.COLORTYPE_PALETTE),color:Boolean(o&r.COLORTYPE_COLOR),alpha:Boolean(o&r.COLORTYPE_ALPHA),bpp:f,colorType:o});this._handleChunkEnd()};o.prototype._handlePLTE=function(t){this.read(t,this._parsePLTE.bind(this))};o.prototype._parsePLTE=function(t){this._crc.write(t);let e=Math.floor(t.length/3);for(let n=0;n<e;n++){this._palette.push([t[n*3],t[n*3+1],t[n*3+2],255])}this.palette(this._palette);this._handleChunkEnd()};o.prototype._handleTRNS=function(t){this.simpleTransparency();this.read(t,this._parseTRNS.bind(this))};o.prototype._parseTRNS=function(t){this._crc.write(t);if(this._colorType===r.COLORTYPE_PALETTE_COLOR){if(this._palette.length===0){this.error(new Error("Transparency chunk must be after palette"));return}if(t.length>this._palette.length){this.error(new Error("More transparent colors than palette size"));return}for(let e=0;e<t.length;e++){this._palette[e][3]=t[e]}this.palette(this._palette)}if(this._colorType===r.COLORTYPE_GRAYSCALE){this.transColor([t.readUInt16BE(0)])}if(this._colorType===r.COLORTYPE_COLOR){this.transColor([t.readUInt16BE(0),t.readUInt16BE(2),t.readUInt16BE(4)])}this._handleChunkEnd()};o.prototype._handleGAMA=function(t){this.read(t,this._parseGAMA.bind(this))};o.prototype._parseGAMA=function(t){this._crc.write(t);this.gamma(t.readUInt32BE(0)/r.GAMMA_DIVISION);this._handleChunkEnd()};o.prototype._handleIDAT=function(t){if(!this._emittedHeadersFinished){this._emittedHeadersFinished=true;this.headersFinished()}this.read(-t,this._parseIDAT.bind(this,t))};o.prototype._parseIDAT=function(t,e){this._crc.write(e);if(this._colorType===r.COLORTYPE_PALETTE_COLOR&&this._palette.length===0){throw new Error("Expected palette not found")}this.inflateData(e);let n=t-e.length;if(n>0){this._handleIDAT(n)}else{this._handleChunkEnd()}};o.prototype._handleIEND=function(t){this.read(t,this._parseIEND.bind(this))};o.prototype._parseIEND=function(t){this._crc.write(t);this._hasIEND=true;this._handleChunkEnd();if(this.finished){this.finished()}}},4882:function(t,e,n){"use strict";let r=n(5506);let i=n(9553);e.read=function(t,e){return r(t,e||{})};e.write=function(t,e){return i(t,e)}},4952:function(t,e,n){"use strict";let r=n(9023);let i=n(2203);let o=n(5497);let s=n(6192);let a=n(4882);let l=e.O=function(t){i.call(this);t=t||{};this.width=t.width|0;this.height=t.height|0;this.data=this.width>0&&this.height>0?Buffer.alloc(4*this.width*this.height):null;if(t.fill&&this.data){this.data.fill(0)}this.gamma=0;this.readable=this.writable=true;this._parser=new o(t);this._parser.on("error",this.emit.bind(this,"error"));this._parser.on("close",this._handleClose.bind(this));this._parser.on("metadata",this._metadata.bind(this));this._parser.on("gamma",this._gamma.bind(this));this._parser.on("parsed",function(t){this.data=t;this.emit("parsed",t)}.bind(this));this._packer=new s(t);this._packer.on("data",this.emit.bind(this,"data"));this._packer.on("end",this.emit.bind(this,"end"));this._parser.on("close",this._handleClose.bind(this));this._packer.on("error",this.emit.bind(this,"error"))};r.inherits(l,i);l.sync=a;l.prototype.pack=function(){if(!this.data||!this.data.length){this.emit("error","No data provided");return this}process.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this));return this};l.prototype.parse=function(t,e){if(e){let t,n;t=function(t){this.removeListener("error",n);this.data=t;e(null,this)}.bind(this);n=function(n){this.removeListener("parsed",t);e(n,null)}.bind(this);this.once("parsed",t);this.once("error",n)}this.end(t);return this};l.prototype.write=function(t){this._parser.write(t);return true};l.prototype.end=function(t){this._parser.end(t)};l.prototype._metadata=function(t){this.width=t.width;this.height=t.height;this.emit("metadata",t)};l.prototype._gamma=function(t){this.gamma=t};l.prototype._handleClose=function(){if(!this._parser.writable&&!this._packer.readable){this.emit("close")}};l.bitblt=function(t,e,n,r,i,o,s,a){n|=0;r|=0;i|=0;o|=0;s|=0;a|=0;if(n>t.width||r>t.height||n+i>t.width||r+o>t.height){throw new Error("bitblt reading outside image")}if(s>e.width||a>e.height||s+i>e.width||a+o>e.height){throw new Error("bitblt writing outside image")}for(let l=0;l<o;l++){t.data.copy(e.data,(a+l)*e.width+s<<2,(r+l)*t.width+n<<2,(r+l)*t.width+n+i<<2)}};l.prototype.bitblt=function(t,e,n,r,i,o,s){l.bitblt(this,t,e,n,r,i,o,s);return this};l.adjustGamma=function(t){if(t.gamma){for(let e=0;e<t.height;e++){for(let n=0;n<t.width;n++){let r=t.width*e+n<<2;for(let e=0;e<3;e++){let n=t.data[r+e]/255;n=Math.pow(n,1/2.2/t.gamma);t.data[r+e]=Math.round(n*255)}}}t.gamma=0}};l.prototype.adjustGamma=function(){l.adjustGamma(this)}},9642:function(t,e,n){"use strict";let r=n(2613).ok;let i=n(3106);let o=n(9023);let s=n(181).kMaxLength;function Inflate(t){if(!(this instanceof Inflate)){return new Inflate(t)}if(t&&t.chunkSize<i.Z_MIN_CHUNK){t.chunkSize=i.Z_MIN_CHUNK}i.Inflate.call(this,t);this._offset=this._offset===undefined?this._outOffset:this._offset;this._buffer=this._buffer||this._outBuffer;if(t&&t.maxLength!=null){this._maxLength=t.maxLength}}function createInflate(t){return new Inflate(t)}function _close(t,e){if(e){process.nextTick(e)}if(!t._handle){return}t._handle.close();t._handle=null}Inflate.prototype._processChunk=function(t,e,n){if(typeof n==="function"){return i.Inflate._processChunk.call(this,t,e,n)}let o=this;let a=t&&t.length;let l=this._chunkSize-this._offset;let f=this._maxLength;let h=0;let u=[];let c=0;let d;this.on("error",(function(t){d=t}));function handleChunk(t,e){if(o._hadError){return}let n=l-e;r(n>=0,"have should not go down");if(n>0){let t=o._buffer.slice(o._offset,o._offset+n);o._offset+=n;if(t.length>f){t=t.slice(0,f)}u.push(t);c+=t.length;f-=t.length;if(f===0){return false}}if(e===0||o._offset>=o._chunkSize){l=o._chunkSize;o._offset=0;o._buffer=Buffer.allocUnsafe(o._chunkSize)}if(e===0){h+=a-t;a=t;return true}return false}r(this._handle,"zlib binding closed");let p;do{p=this._handle.writeSync(e,t,h,a,this._buffer,this._offset,l);p=p||this._writeState}while(!this._hadError&&handleChunk(p[0],p[1]));if(this._hadError){throw d}if(c>=s){_close(this);throw new RangeError("Cannot create final Buffer. It would be larger than 0x"+s.toString(16)+" bytes")}let g=Buffer.concat(u,c);_close(this);return g};o.inherits(Inflate,i.Inflate);function zlibBufferSync(t,e){if(typeof e==="string"){e=Buffer.from(e)}if(!(e instanceof Buffer)){throw new TypeError("Not a string or buffer")}let n=t._finishFlushFlag;if(n==null){n=i.Z_FINISH}return t._processChunk(e,n)}function inflateSync(t,e){return zlibBufferSync(new Inflate(e),t)}t.exports=e=inflateSync;e.Inflate=Inflate;e.createInflate=createInflate;e.inflateSync=inflateSync},1682:function(t){"use strict";let e=t.exports=function(t){this._buffer=t;this._reads=[]};e.prototype.read=function(t,e){this._reads.push({length:Math.abs(t),allowLess:t<0,func:e})};e.prototype.process=function(){while(this._reads.length>0&&this._buffer.length){let t=this._reads[0];if(this._buffer.length&&(this._buffer.length>=t.length||t.allowLess)){this._reads.shift();let e=this._buffer;this._buffer=e.slice(t.length);t.func.call(this,e.slice(0,t.length))}else{break}}if(this._reads.length>0){return new Error("There are some read requests waitng on finished stream")}if(this._buffer.length>0){return new Error("unrecognised content at end of stream")}}},2758:function(t,e,n){var r;const i=n(7344);const o=n(5816);const s=n(4538);const a=n(1027);function renderCanvas(t,e,n,r,s){const a=[].slice.call(arguments,1);const l=a.length;const f=typeof a[l-1]==="function";if(!f&&!i()){throw new Error("Callback required as last argument")}if(f){if(l<2){throw new Error("Too few arguments provided")}if(l===2){s=n;n=e;e=r=undefined}else if(l===3){if(e.getContext&&typeof s==="undefined"){s=r;r=undefined}else{s=r;r=n;n=e;e=undefined}}}else{if(l<1){throw new Error("Too few arguments provided")}if(l===1){n=e;e=r=undefined}else if(l===2&&!e.getContext){r=n;n=e;e=undefined}return new Promise((function(i,s){try{const s=o.create(n,r);i(t(s,e,r))}catch(t){s(t)}}))}try{const i=o.create(n,r);s(null,t(i,e,r))}catch(t){s(t)}}r=o.create;e.toCanvas=renderCanvas.bind(null,s.render);r=renderCanvas.bind(null,s.renderToDataURL);r=renderCanvas.bind(null,(function(t,e,n){return a.render(t,n)}))},7344:function(t){t.exports=function(){return typeof Promise==="function"&&Promise.prototype&&Promise.prototype.then}},4058:function(t,e,n){const r=n(1837).getSymbolSize;e.getRowColCoords=function getRowColCoords(t){if(t===1)return[];const e=Math.floor(t/7)+2;const n=r(t);const i=n===145?26:Math.ceil((n-13)/(2*e-2))*2;const o=[n-7];for(let t=1;t<e-1;t++){o[t]=o[t-1]-i}o.push(6);return o.reverse()};e.getPositions=function getPositions(t){const n=[];const r=e.getRowColCoords(t);const i=r.length;for(let t=0;t<i;t++){for(let e=0;e<i;e++){if(t===0&&e===0||t===0&&e===i-1||t===i-1&&e===0){continue}n.push([r[t],r[e]])}}return n}},3294:function(t,e,n){const r=n(617);const i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function AlphanumericData(t){this.mode=r.ALPHANUMERIC;this.data=t}AlphanumericData.getBitsLength=function getBitsLength(t){return 11*Math.floor(t/2)+6*(t%2)};AlphanumericData.prototype.getLength=function getLength(){return this.data.length};AlphanumericData.prototype.getBitsLength=function getBitsLength(){return AlphanumericData.getBitsLength(this.data.length)};AlphanumericData.prototype.write=function write(t){let e;for(e=0;e+2<=this.data.length;e+=2){let n=i.indexOf(this.data[e])*45;n+=i.indexOf(this.data[e+1]);t.put(n,11)}if(this.data.length%2){t.put(i.indexOf(this.data[e]),6)}};t.exports=AlphanumericData},8066:function(t){function BitBuffer(){this.buffer=[];this.length=0}BitBuffer.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let n=0;n<e;n++){this.putBit((t>>>e-n-1&1)===1)}},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);if(this.buffer.length<=e){this.buffer.push(0)}if(t){this.buffer[e]|=128>>>this.length%8}this.length++}};t.exports=BitBuffer},3729:function(t){function BitMatrix(t){if(!t||t<1){throw new Error("BitMatrix size must be defined and greater than 0")}this.size=t;this.data=new Uint8Array(t*t);this.reservedBit=new Uint8Array(t*t)}BitMatrix.prototype.set=function(t,e,n,r){const i=t*this.size+e;this.data[i]=n;if(r)this.reservedBit[i]=true};BitMatrix.prototype.get=function(t,e){return this.data[t*this.size+e]};BitMatrix.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n};BitMatrix.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};t.exports=BitMatrix},2181:function(t,e,n){const r=n(617);function ByteData(t){this.mode=r.BYTE;if(typeof t==="string"){this.data=(new TextEncoder).encode(t)}else{this.data=new Uint8Array(t)}}ByteData.getBitsLength=function getBitsLength(t){return t*8};ByteData.prototype.getLength=function getLength(){return this.data.length};ByteData.prototype.getBitsLength=function getBitsLength(){return ByteData.getBitsLength(this.data.length)};ByteData.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++){t.put(this.data[e],8)}};t.exports=ByteData},3889:function(t,e,n){const r=n(7756);const i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81];const o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function getBlocksCount(t,e){switch(e){case r.L:return i[(t-1)*4+0];case r.M:return i[(t-1)*4+1];case r.Q:return i[(t-1)*4+2];case r.H:return i[(t-1)*4+3];default:return undefined}};e.getTotalCodewordsCount=function getTotalCodewordsCount(t,e){switch(e){case r.L:return o[(t-1)*4+0];case r.M:return o[(t-1)*4+1];case r.Q:return o[(t-1)*4+2];case r.H:return o[(t-1)*4+3];default:return undefined}}},7756:function(t,e){e.L={bit:1};e.M={bit:0};e.Q={bit:3};e.H={bit:2};function fromString(t){if(typeof t!=="string"){throw new Error("Param is not a string")}const n=t.toLowerCase();switch(n){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}e.isValid=function isValid(t){return t&&typeof t.bit!=="undefined"&&t.bit>=0&&t.bit<4};e.from=function from(t,n){if(e.isValid(t)){return t}try{return fromString(t)}catch(t){return n}}},1521:function(t,e,n){const r=n(1837).getSymbolSize;const i=7;e.getPositions=function getPositions(t){const e=r(t);return[[0,0],[e-i,0],[0,e-i]]}},306:function(t,e,n){const r=n(1837);const i=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0;const o=1<<14|1<<12|1<<10|1<<4|1<<1;const s=r.getBCHDigit(i);e.getEncodedBits=function getEncodedBits(t,e){const n=t.bit<<3|e;let a=n<<10;while(r.getBCHDigit(a)-s>=0){a^=i<<r.getBCHDigit(a)-s}return(n<<10|a)^o}},7994:function(t,e){const n=new Uint8Array(512);const r=new Uint8Array(256);(function initTables(){let t=1;for(let e=0;e<255;e++){n[e]=t;r[t]=e;t<<=1;if(t&256){t^=285}}for(let t=255;t<512;t++){n[t]=n[t-255]}})();e.log=function log(t){if(t<1)throw new Error("log("+t+")");return r[t]};e.exp=function exp(t){return n[t]};e.mul=function mul(t,e){if(t===0||e===0)return 0;return n[r[t]+r[e]]}},6044:function(t,e,n){const r=n(617);const i=n(1837);function KanjiData(t){this.mode=r.KANJI;this.data=t}KanjiData.getBitsLength=function getBitsLength(t){return t*13};KanjiData.prototype.getLength=function getLength(){return this.data.length};KanjiData.prototype.getBitsLength=function getBitsLength(){return KanjiData.getBitsLength(this.data.length)};KanjiData.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let n=i.toSJIS(this.data[e]);if(n>=33088&&n<=40956){n-=33088}else if(n>=57408&&n<=60351){n-=49472}else{throw new Error("Invalid SJIS character: "+this.data[e]+"\n"+"Make sure your charset is UTF-8")}n=(n>>>8&255)*192+(n&255);t.put(n,13)}};t.exports=KanjiData},9357:function(t,e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const n={N1:3,N2:3,N3:40,N4:10};e.isValid=function isValid(t){return t!=null&&t!==""&&!isNaN(t)&&t>=0&&t<=7};e.from=function from(t){return e.isValid(t)?parseInt(t,10):undefined};e.getPenaltyN1=function getPenaltyN1(t){const e=t.size;let r=0;let i=0;let o=0;let s=null;let a=null;for(let l=0;l<e;l++){i=o=0;s=a=null;for(let f=0;f<e;f++){let e=t.get(l,f);if(e===s){i++}else{if(i>=5)r+=n.N1+(i-5);s=e;i=1}e=t.get(f,l);if(e===a){o++}else{if(o>=5)r+=n.N1+(o-5);a=e;o=1}}if(i>=5)r+=n.N1+(i-5);if(o>=5)r+=n.N1+(o-5)}return r};e.getPenaltyN2=function getPenaltyN2(t){const e=t.size;let r=0;for(let n=0;n<e-1;n++){for(let i=0;i<e-1;i++){const e=t.get(n,i)+t.get(n,i+1)+t.get(n+1,i)+t.get(n+1,i+1);if(e===4||e===0)r++}}return r*n.N2};e.getPenaltyN3=function getPenaltyN3(t){const e=t.size;let r=0;let i=0;let o=0;for(let n=0;n<e;n++){i=o=0;for(let s=0;s<e;s++){i=i<<1&2047|t.get(n,s);if(s>=10&&(i===1488||i===93))r++;o=o<<1&2047|t.get(s,n);if(s>=10&&(o===1488||o===93))r++}}return r*n.N3};e.getPenaltyN4=function getPenaltyN4(t){let e=0;const r=t.data.length;for(let n=0;n<r;n++)e+=t.data[n];const i=Math.abs(Math.ceil(e*100/r/5)-10);return i*n.N4};function getMaskAt(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2===0;case e.Patterns.PATTERN001:return n%2===0;case e.Patterns.PATTERN010:return r%3===0;case e.Patterns.PATTERN011:return(n+r)%3===0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2===0;case e.Patterns.PATTERN101:return n*r%2+n*r%3===0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2===0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2===0;default:throw new Error("bad maskPattern:"+t)}}e.applyMask=function applyMask(t,e){const n=e.size;for(let r=0;r<n;r++){for(let i=0;i<n;i++){if(e.isReserved(i,r))continue;e.xor(i,r,getMaskAt(t,i,r))}}};e.getBestMask=function getBestMask(t,n){const r=Object.keys(e.Patterns).length;let i=0;let o=Infinity;for(let s=0;s<r;s++){n(s);e.applyMask(s,t);const r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(s,t);if(r<o){o=r;i=s}}return i}},617:function(t,e,n){const r=n(541);const i=n(1931);e.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]};e.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]};e.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]};e.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]};e.MIXED={bit:-1};e.getCharCountIndicator=function getCharCountIndicator(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!r.isValid(e)){throw new Error("Invalid version: "+e)}if(e>=1&&e<10)return t.ccBits[0];else if(e<27)return t.ccBits[1];return t.ccBits[2]};e.getBestModeForData=function getBestModeForData(t){if(i.testNumeric(t))return e.NUMERIC;else if(i.testAlphanumeric(t))return e.ALPHANUMERIC;else if(i.testKanji(t))return e.KANJI;else return e.BYTE};e.toString=function toString(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")};e.isValid=function isValid(t){return t&&t.bit&&t.ccBits};function fromString(t){if(typeof t!=="string"){throw new Error("Param is not a string")}const n=t.toLowerCase();switch(n){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}e.from=function from(t,n){if(e.isValid(t)){return t}try{return fromString(t)}catch(t){return n}}},4136:function(t,e,n){const r=n(617);function NumericData(t){this.mode=r.NUMERIC;this.data=t.toString()}NumericData.getBitsLength=function getBitsLength(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};NumericData.prototype.getLength=function getLength(){return this.data.length};NumericData.prototype.getBitsLength=function getBitsLength(){return NumericData.getBitsLength(this.data.length)};NumericData.prototype.write=function write(t){let e,n,r;for(e=0;e+3<=this.data.length;e+=3){n=this.data.substr(e,3);r=parseInt(n,10);t.put(r,10)}const i=this.data.length-e;if(i>0){n=this.data.substr(e);r=parseInt(n,10);t.put(r,i*3+1)}};t.exports=NumericData},5388:function(t,e,n){const r=n(7994);e.mul=function mul(t,e){const n=new Uint8Array(t.length+e.length-1);for(let i=0;i<t.length;i++){for(let o=0;o<e.length;o++){n[i+o]^=r.mul(t[i],e[o])}}return n};e.mod=function mod(t,e){let n=new Uint8Array(t);while(n.length-e.length>=0){const t=n[0];for(let i=0;i<e.length;i++){n[i]^=r.mul(e[i],t)}let i=0;while(i<n.length&&n[i]===0)i++;n=n.slice(i)}return n};e.generateECPolynomial=function generateECPolynomial(t){let n=new Uint8Array([1]);for(let i=0;i<t;i++){n=e.mul(n,new Uint8Array([1,r.exp(i)]))}return n}},5816:function(t,e,n){const r=n(1837);const i=n(7756);const o=n(8066);const s=n(3729);const a=n(4058);const l=n(1521);const f=n(9357);const h=n(3889);const u=n(1917);const c=n(8376);const d=n(306);const p=n(617);const g=n(9376);function setupFinderPattern(t,e){const n=t.size;const r=l.getPositions(e);for(let e=0;e<r.length;e++){const i=r[e][0];const o=r[e][1];for(let e=-1;e<=7;e++){if(i+e<=-1||n<=i+e)continue;for(let r=-1;r<=7;r++){if(o+r<=-1||n<=o+r)continue;if(e>=0&&e<=6&&(r===0||r===6)||r>=0&&r<=6&&(e===0||e===6)||e>=2&&e<=4&&r>=2&&r<=4){t.set(i+e,o+r,true,true)}else{t.set(i+e,o+r,false,true)}}}}}function setupTimingPattern(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2===0;t.set(n,6,e,true);t.set(6,n,e,true)}}function setupAlignmentPattern(t,e){const n=a.getPositions(e);for(let e=0;e<n.length;e++){const r=n[e][0];const i=n[e][1];for(let e=-2;e<=2;e++){for(let n=-2;n<=2;n++){if(e===-2||e===2||n===-2||n===2||e===0&&n===0){t.set(r+e,i+n,true,true)}else{t.set(r+e,i+n,false,true)}}}}}function setupVersionInfo(t,e){const n=t.size;const r=c.getEncodedBits(e);let i,o,s;for(let e=0;e<18;e++){i=Math.floor(e/3);o=e%3+n-8-3;s=(r>>e&1)===1;t.set(i,o,s,true);t.set(o,i,s,true)}}function setupFormatInfo(t,e,n){const r=t.size;const i=d.getEncodedBits(e,n);let o,s;for(o=0;o<15;o++){s=(i>>o&1)===1;if(o<6){t.set(o,8,s,true)}else if(o<8){t.set(o+1,8,s,true)}else{t.set(r-15+o,8,s,true)}if(o<8){t.set(8,r-o-1,s,true)}else if(o<9){t.set(8,15-o-1+1,s,true)}else{t.set(8,15-o-1,s,true)}}t.set(r-8,8,1,true)}function setupData(t,e){const n=t.size;let r=-1;let i=n-1;let o=7;let s=0;for(let a=n-1;a>0;a-=2){if(a===6)a--;while(true){for(let n=0;n<2;n++){if(!t.isReserved(i,a-n)){let r=false;if(s<e.length){r=(e[s]>>>o&1)===1}t.set(i,a-n,r);o--;if(o===-1){s++;o=7}}}i+=r;if(i<0||n<=i){i-=r;r=-r;break}}}}function createData(t,e,n){const i=new o;n.forEach((function(e){i.put(e.mode.bit,4);i.put(e.getLength(),p.getCharCountIndicator(e.mode,t));e.write(i)}));const s=r.getSymbolTotalCodewords(t);const a=h.getTotalCodewordsCount(t,e);const l=(s-a)*8;if(i.getLengthInBits()+4<=l){i.put(0,4)}while(i.getLengthInBits()%8!==0){i.putBit(0)}const f=(l-i.getLengthInBits())/8;for(let t=0;t<f;t++){i.put(t%2?17:236,8)}return createCodewords(i,t,e)}function createCodewords(t,e,n){const i=r.getSymbolTotalCodewords(e);const o=h.getTotalCodewordsCount(e,n);const s=i-o;const a=h.getBlocksCount(e,n);const l=i%a;const f=a-l;const c=Math.floor(i/a);const d=Math.floor(s/a);const p=d+1;const g=c-d;const _=new u(g);let m=0;const y=new Array(a);const w=new Array(a);let E=0;const b=new Uint8Array(t.buffer);for(let t=0;t<a;t++){const e=t<f?d:p;y[t]=b.slice(m,m+e);w[t]=_.encode(y[t]);m+=e;E=Math.max(E,e)}const T=new Uint8Array(i);let C=0;let B,I;for(B=0;B<E;B++){for(I=0;I<a;I++){if(B<y[I].length){T[C++]=y[I][B]}}}for(B=0;B<g;B++){for(I=0;I<a;I++){T[C++]=w[I][B]}}return T}function createSymbol(t,e,n,i){let o;if(Array.isArray(t)){o=g.fromArray(t)}else if(typeof t==="string"){let r=e;if(!r){const e=g.rawSplit(t);r=c.getBestVersionForData(e,n)}o=g.fromString(t,r||40)}else{throw new Error("Invalid data")}const a=c.getBestVersionForData(o,n);if(!a){throw new Error("The amount of data is too big to be stored in a QR Code")}if(!e){e=a}else if(e<a){throw new Error("\n"+"The chosen QR Code version cannot contain this amount of data.\n"+"Minimum version required to store current data is: "+a+".\n")}const l=createData(e,n,o);const h=r.getSymbolSize(e);const u=new s(h);setupFinderPattern(u,e);setupTimingPattern(u);setupAlignmentPattern(u,e);setupFormatInfo(u,n,0);if(e>=7){setupVersionInfo(u,e)}setupData(u,l);if(isNaN(i)){i=f.getBestMask(u,setupFormatInfo.bind(null,u,n))}f.applyMask(i,u);setupFormatInfo(u,n,i);return{modules:u,version:e,errorCorrectionLevel:n,maskPattern:i,segments:o}}e.create=function create(t,e){if(typeof t==="undefined"||t===""){throw new Error("No input text")}let n=i.M;let o;let s;if(typeof e!=="undefined"){n=i.from(e.errorCorrectionLevel,i.M);o=c.from(e.version);s=f.from(e.maskPattern);if(e.toSJISFunc){r.setToSJISFunction(e.toSJISFunc)}}return createSymbol(t,o,n,s)}},1917:function(t,e,n){const r=n(5388);function ReedSolomonEncoder(t){this.genPoly=undefined;this.degree=t;if(this.degree)this.initialize(this.degree)}ReedSolomonEncoder.prototype.initialize=function initialize(t){this.degree=t;this.genPoly=r.generateECPolynomial(this.degree)};ReedSolomonEncoder.prototype.encode=function encode(t){if(!this.genPoly){throw new Error("Encoder not initialized")}const e=new Uint8Array(t.length+this.degree);e.set(t);const n=r.mod(e,this.genPoly);const i=this.degree-n.length;if(i>0){const t=new Uint8Array(this.degree);t.set(n,i);return t}return n};t.exports=ReedSolomonEncoder},1931:function(t,e){const n="[0-9]+";const r="[A-Z $%*+\\-./:]+";let i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|"+"[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|"+"[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|"+"[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";i=i.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+i+")(?:.|[\r\n]))+";e.KANJI=new RegExp(i,"g");e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");e.BYTE=new RegExp(o,"g");e.NUMERIC=new RegExp(n,"g");e.ALPHANUMERIC=new RegExp(r,"g");const s=new RegExp("^"+i+"$");const a=new RegExp("^"+n+"$");const l=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function testKanji(t){return s.test(t)};e.testNumeric=function testNumeric(t){return a.test(t)};e.testAlphanumeric=function testAlphanumeric(t){return l.test(t)}},9376:function(t,e,n){const r=n(617);const i=n(4136);const o=n(3294);const s=n(2181);const a=n(6044);const l=n(1931);const f=n(1837);const h=n(5364);function getStringByteLength(t){return unescape(encodeURIComponent(t)).length}function getSegments(t,e,n){const r=[];let i;while((i=t.exec(n))!==null){r.push({data:i[0],index:i.index,mode:e,length:i[0].length})}return r}function getSegmentsFromString(t){const e=getSegments(l.NUMERIC,r.NUMERIC,t);const n=getSegments(l.ALPHANUMERIC,r.ALPHANUMERIC,t);let i;let o;if(f.isKanjiModeEnabled()){i=getSegments(l.BYTE,r.BYTE,t);o=getSegments(l.KANJI,r.KANJI,t)}else{i=getSegments(l.BYTE_KANJI,r.BYTE,t);o=[]}const s=e.concat(n,i,o);return s.sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function getSegmentBitsLength(t,e){switch(e){case r.NUMERIC:return i.getBitsLength(t);case r.ALPHANUMERIC:return o.getBitsLength(t);case r.KANJI:return a.getBitsLength(t);case r.BYTE:return s.getBitsLength(t)}}function mergeSegments(t){return t.reduce((function(t,e){const n=t.length-1>=0?t[t.length-1]:null;if(n&&n.mode===e.mode){t[t.length-1].data+=e.data;return t}t.push(e);return t}),[])}function buildNodes(t){const e=[];for(let n=0;n<t.length;n++){const i=t[n];switch(i.mode){case r.NUMERIC:e.push([i,{data:i.data,mode:r.ALPHANUMERIC,length:i.length},{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.ALPHANUMERIC:e.push([i,{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.KANJI:e.push([i,{data:i.data,mode:r.BYTE,length:getStringByteLength(i.data)}]);break;case r.BYTE:e.push([{data:i.data,mode:r.BYTE,length:getStringByteLength(i.data)}])}}return e}function buildGraph(t,e){const n={};const i={start:{}};let o=["start"];for(let s=0;s<t.length;s++){const a=t[s];const l=[];for(let t=0;t<a.length;t++){const f=a[t];const h=""+s+t;l.push(h);n[h]={node:f,lastCount:0};i[h]={};for(let t=0;t<o.length;t++){const s=o[t];if(n[s]&&n[s].node.mode===f.mode){i[s][h]=getSegmentBitsLength(n[s].lastCount+f.length,f.mode)-getSegmentBitsLength(n[s].lastCount,f.mode);n[s].lastCount+=f.length}else{if(n[s])n[s].lastCount=f.length;i[s][h]=getSegmentBitsLength(f.length,f.mode)+4+r.getCharCountIndicator(f.mode,e)}}}o=l}for(let t=0;t<o.length;t++){i[o[t]].end=0}return{map:i,table:n}}function buildSingleSegment(t,e){let n;const l=r.getBestModeForData(t);n=r.from(e,l);if(n!==r.BYTE&&n.bit<l.bit){throw new Error('"'+t+'"'+" cannot be encoded with mode "+r.toString(n)+".\n Suggested mode is: "+r.toString(l))}if(n===r.KANJI&&!f.isKanjiModeEnabled()){n=r.BYTE}switch(n){case r.NUMERIC:return new i(t);case r.ALPHANUMERIC:return new o(t);case r.KANJI:return new a(t);case r.BYTE:return new s(t)}}e.fromArray=function fromArray(t){return t.reduce((function(t,e){if(typeof e==="string"){t.push(buildSingleSegment(e,null))}else if(e.data){t.push(buildSingleSegment(e.data,e.mode))}return t}),[])};e.fromString=function fromString(t,n){const r=getSegmentsFromString(t,f.isKanjiModeEnabled());const i=buildNodes(r);const o=buildGraph(i,n);const s=h.find_path(o.map,"start","end");const a=[];for(let t=1;t<s.length-1;t++){a.push(o.table[s[t]].node)}return e.fromArray(mergeSegments(a))};e.rawSplit=function rawSplit(t){return e.fromArray(getSegmentsFromString(t,f.isKanjiModeEnabled()))}},1837:function(t,e){let n;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function getSymbolSize(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};e.getSymbolTotalCodewords=function getSymbolTotalCodewords(t){return r[t]};e.getBCHDigit=function(t){let e=0;while(t!==0){e++;t>>>=1}return e};e.setToSJISFunction=function setToSJISFunction(t){if(typeof t!=="function"){throw new Error('"toSJISFunc" is not a valid function.')}n=t};e.isKanjiModeEnabled=function(){return typeof n!=="undefined"};e.toSJIS=function toSJIS(t){return n(t)}},541:function(t,e){e.isValid=function isValid(t){return!isNaN(t)&&t>=1&&t<=40}},8376:function(t,e,n){const r=n(1837);const i=n(3889);const o=n(7756);const s=n(617);const a=n(541);const l=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0;const f=r.getBCHDigit(l);function getBestVersionForDataLength(t,n,r){for(let i=1;i<=40;i++){if(n<=e.getCapacity(i,r,t)){return i}}return undefined}function getReservedBitsCount(t,e){return s.getCharCountIndicator(t,e)+4}function getTotalBitsFromDataArray(t,e){let n=0;t.forEach((function(t){const r=getReservedBitsCount(t.mode,e);n+=r+t.getBitsLength()}));return n}function getBestVersionForMixedData(t,n){for(let r=1;r<=40;r++){const i=getTotalBitsFromDataArray(t,r);if(i<=e.getCapacity(r,n,s.MIXED)){return r}}return undefined}e.from=function from(t,e){if(a.isValid(t)){return parseInt(t,10)}return e};e.getCapacity=function getCapacity(t,e,n){if(!a.isValid(t)){throw new Error("Invalid QR Code version")}if(typeof n==="undefined")n=s.BYTE;const o=r.getSymbolTotalCodewords(t);const l=i.getTotalCodewordsCount(t,e);const f=(o-l)*8;if(n===s.MIXED)return f;const h=f-getReservedBitsCount(n,t);switch(n){case s.NUMERIC:return Math.floor(h/10*3);case s.ALPHANUMERIC:return Math.floor(h/11*2);case s.KANJI:return Math.floor(h/13);case s.BYTE:default:return Math.floor(h/8)}};e.getBestVersionForData=function getBestVersionForData(t,e){let n;const r=o.from(e,o.M);if(Array.isArray(t)){if(t.length>1){return getBestVersionForMixedData(t,r)}if(t.length===0){return 1}n=t[0]}else{n=t}return getBestVersionForDataLength(n.mode,n.getLength(),r)};e.getEncodedBits=function getEncodedBits(t){if(!a.isValid(t)||t<7){throw new Error("Invalid QR Code version")}let e=t<<12;while(r.getBCHDigit(e)-f>=0){e^=l<<r.getBCHDigit(e)-f}return t<<12|e}},982:function(t,e,n){t.exports=n(7107)},4538:function(t,e,n){const r=n(3417);function clearCanvas(t,e,n){t.clearRect(0,0,e.width,e.height);if(!e.style)e.style={};e.height=n;e.width=n;e.style.height=n+"px";e.style.width=n+"px"}function getCanvasElement(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}e.render=function render(t,e,n){let i=n;let o=e;if(typeof i==="undefined"&&(!e||!e.getContext)){i=e;e=undefined}if(!e){o=getCanvasElement()}i=r.getOptions(i);const s=r.getImageWidth(t.modules.size,i);const a=o.getContext("2d");const l=a.createImageData(s,s);r.qrToImageData(l.data,t,i);clearCanvas(a,o,s);a.putImageData(l,0,0);return o};e.renderToDataURL=function renderToDataURL(t,n,r){let i=r;if(typeof i==="undefined"&&(!n||!n.getContext)){i=n;n=undefined}if(!i)i={};const o=e.render(t,n,i);const s=i.type||"image/png";const a=i.rendererOpts||{};return o.toDataURL(s,a.quality)}},8939:function(t,e,n){const r=n(9896);const i=n(4952).O;const o=n(3417);e.render=function render(t,e){const n=o.getOptions(e);const r=n.rendererOpts;const s=o.getImageWidth(t.modules.size,n);r.width=s;r.height=s;const a=new i(r);o.qrToImageData(a.data,t,n);return a};e.renderToDataURL=function renderToDataURL(t,n,r){if(typeof r==="undefined"){r=n;n=undefined}e.renderToBuffer(t,n,(function(t,e){if(t)r(t);let n="data:image/png;base64,";n+=e.toString("base64");r(null,n)}))};e.renderToBuffer=function renderToBuffer(t,n,r){if(typeof r==="undefined"){r=n;n=undefined}const i=e.render(t,n);const o=[];i.on("error",r);i.on("data",(function(t){o.push(t)}));i.on("end",(function(){r(null,Buffer.concat(o))}));i.pack()};e.renderToFile=function renderToFile(t,n,i,o){if(typeof o==="undefined"){o=i;i=undefined}let s=false;const done=(...t)=>{if(s)return;s=true;o.apply(null,t)};const a=r.createWriteStream(t);a.on("error",done);a.on("close",done);e.renderToFileStream(a,n,i)};e.renderToFileStream=function renderToFileStream(t,n,r){const i=e.render(n,r);i.pack().pipe(t)}},1027:function(t,e,n){const r=n(3417);function getColorAttrib(t,e){const n=t.a/255;const r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function svgCmd(t,e,n){let r=t+e;if(typeof n!=="undefined")r+=" "+n;return r}function qrToPath(t,e,n){let r="";let i=0;let o=false;let s=0;for(let a=0;a<t.length;a++){const l=Math.floor(a%e);const f=Math.floor(a/e);if(!l&&!o)o=true;if(t[a]){s++;if(!(a>0&&l>0&&t[a-1])){r+=o?svgCmd("M",l+n,.5+f+n):svgCmd("m",i,0);i=0;o=false}if(!(l+1<e&&t[a+1])){r+=svgCmd("h",s);s=0}}else{i++}}return r}e.render=function render(t,e,n){const i=r.getOptions(e);const o=t.modules.size;const s=t.modules.data;const a=o+i.margin*2;const l=!i.color.light.a?"":"<path "+getColorAttrib(i.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>';const f="<path "+getColorAttrib(i.color.dark,"stroke")+' d="'+qrToPath(s,o,i.margin)+'"/>';const h='viewBox="'+"0 0 "+a+" "+a+'"';const u=!i.width?"":'width="'+i.width+'" height="'+i.width+'" ';const c='<svg xmlns="http://www.w3.org/2000/svg" '+u+h+' shape-rendering="crispEdges">'+l+f+"</svg>\n";if(typeof n==="function"){n(null,c)}return c}},8130:function(t,e,n){const r=n(1027);e.render=r.render;e.renderToFile=function renderToFile(t,r,i,o){if(typeof o==="undefined"){o=i;i=undefined}const s=n(9896);const a=e.render(r,i);const l='<?xml version="1.0" encoding="utf-8"?>'+'<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">'+a;s.writeFile(t,l,o)}},4114:function(t,e,n){const r=n(3365);const i=n(7691);e.render=function(t,e,n){if(e&&e.small){return i.render(t,e,n)}return r.render(t,e,n)}},7691:function(t,e){const n="";const r="";const i="";const o="";const s="";const a=n+o;const l=r+i;const createPalette=function(t,e,n){return{"00":s+" "+t,"01":s+e+"▄"+t,"02":s+n+"▄"+t,10:s+e+"▀"+t,11:" ",12:"▄",20:s+n+"▀"+t,21:"▀",22:"█"}};const mkCodePixel=function(t,e,n,r){const i=e+1;if(n>=i||r>=i||r<-1||n<-1)return"0";if(n>=e||r>=e||r<0||n<0)return"1";const o=r*e+n;return t[o]?"2":"1"};const mkCode=function(t,e,n,r){return mkCodePixel(t,e,n,r)+mkCodePixel(t,e,n,r+1)};e.render=function(t,e,n){const r=t.modules.size;const f=t.modules.data;const h=!!(e&&e.inverse);const u=e&&e.inverse?l:a;const c=h?o:i;const d=h?i:o;const p=createPalette(u,c,d);const g=s+"\n"+u;let _=u;for(let t=-1;t<r+1;t+=2){for(let e=-1;e<r;e++){_+=p[mkCode(f,r,e,t)]}_+=p[mkCode(f,r,r,t)]+g}_+=s;if(typeof n==="function"){n(null,_)}return _}},3365:function(t,e){e.render=function(t,e,n){const r=t.modules.size;const i=t.modules.data;const o=" ";const s=" ";let a="";const l=Array(r+3).join(s);const f=Array(2).join(s);a+=l+"\n";for(let t=0;t<r;++t){a+=s;for(let e=0;e<r;e++){a+=i[t*r+e]?o:s}a+=f+"\n"}a+=l+"\n";if(typeof n==="function"){n(null,a)}return a}},1869:function(t,e,n){const r=n(3417);const i={WW:" ",WB:"▄",BB:"█",BW:"▀"};const o={BB:" ",BW:"▄",WW:"█",WB:"▀"};function getBlockChar(t,e,n){if(t&&e)return n.BB;if(t&&!e)return n.BW;if(!t&&e)return n.WB;return n.WW}e.render=function(t,e,n){const s=r.getOptions(e);let a=i;if(s.color.dark.hex==="#ffffff"||s.color.light.hex==="#000000"){a=o}const l=t.modules.size;const f=t.modules.data;let h="";let u=Array(l+s.margin*2+1).join(a.WW);u=Array(s.margin/2+1).join(u+"\n");const c=Array(s.margin+1).join(a.WW);h+=u;for(let t=0;t<l;t+=2){h+=c;for(let e=0;e<l;e++){const n=f[t*l+e];const r=f[(t+1)*l+e];h+=getBlockChar(n,r,a)}h+=c+"\n"}h+=u.slice(0,-1);if(typeof n==="function"){n(null,h)}return h};e.renderToFile=function renderToFile(t,r,i,o){if(typeof o==="undefined"){o=i;i=undefined}const s=n(9896);const a=e.render(r,i);s.writeFile(t,a,o)}},3417:function(t,e){function hex2rgba(t){if(typeof t==="number"){t=t.toString()}if(typeof t!=="string"){throw new Error("Color should be defined as hex string")}let e=t.slice().replace("#","").split("");if(e.length<3||e.length===5||e.length>8){throw new Error("Invalid hex color: "+t)}if(e.length===3||e.length===4){e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))}if(e.length===6)e.push("F","F");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function getOptions(t){if(!t)t={};if(!t.color)t.color={};const e=typeof t.margin==="undefined"||t.margin===null||t.margin<0?4:t.margin;const n=t.width&&t.width>=21?t.width:undefined;const r=t.scale||4;return{width:n,scale:n?4:r,margin:e,color:{dark:hex2rgba(t.color.dark||"#000000ff"),light:hex2rgba(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}};e.getScale=function getScale(t,e){return e.width&&e.width>=t+e.margin*2?e.width/(t+e.margin*2):e.scale};e.getImageWidth=function getImageWidth(t,n){const r=e.getScale(t,n);return Math.floor((t+n.margin*2)*r)};e.qrToImageData=function qrToImageData(t,n,r){const i=n.modules.size;const o=n.modules.data;const s=e.getScale(i,r);const a=Math.floor((i+r.margin*2)*s);const l=r.margin*s;const f=[r.color.light,r.color.dark];for(let e=0;e<a;e++){for(let n=0;n<a;n++){let h=(e*a+n)*4;let u=r.color.light;if(e>=l&&n>=l&&e<a-l&&n<a-l){const t=Math.floor((e-l)/s);const r=Math.floor((n-l)/s);u=f[o[t*i+r]?1:0]}t[h++]=u.r;t[h++]=u.g;t[h++]=u.b;t[h]=u.a}}}},7107:function(t,e,n){const r=n(7344);const i=n(5816);const o=n(8939);const s=n(1869);const a=n(4114);const l=n(8130);function checkParams(t,e,n){if(typeof t==="undefined"){throw new Error("String required as first argument")}if(typeof n==="undefined"){n=e;e={}}if(typeof n!=="function"){if(!r()){throw new Error("Callback required as last argument")}else{e=n||{};n=null}}return{opts:e,cb:n}}function getTypeFromFilename(t){return t.slice((t.lastIndexOf(".")-1>>>0)+2).toLowerCase()}function getRendererFromType(t){switch(t){case"svg":return l;case"txt":case"utf8":return s;case"png":case"image/png":default:return o}}function getStringRendererFromType(t){switch(t){case"svg":return l;case"terminal":return a;case"utf8":default:return s}}function render(t,e,n){if(!n.cb){return new Promise((function(r,o){try{const s=i.create(e,n.opts);return t(s,n.opts,(function(t,e){return t?o(t):r(e)}))}catch(t){o(t)}}))}try{const r=i.create(e,n.opts);return t(r,n.opts,n.cb)}catch(t){n.cb(t)}}e.create=i.create;e.toCanvas=n(2758).toCanvas;e.toString=function toString(t,e,n){const r=checkParams(t,e,n);const i=r.opts?r.opts.type:undefined;const o=getStringRendererFromType(i);return render(o.render,t,r)};e.toDataURL=function toDataURL(t,e,n){const r=checkParams(t,e,n);const i=getRendererFromType(r.opts.type);return render(i.renderToDataURL,t,r)};e.toBuffer=function toBuffer(t,e,n){const r=checkParams(t,e,n);const i=getRendererFromType(r.opts.type);return render(i.renderToBuffer,t,r)};e.toFile=function toFile(t,e,n,i){if(typeof t!=="string"||!(typeof e==="string"||typeof e==="object")){throw new Error("Invalid argument")}if(arguments.length<3&&!r()){throw new Error("Too few arguments provided")}const o=checkParams(e,n,i);const s=o.opts.type||getTypeFromFilename(t);const a=getRendererFromType(s);const l=a.renderToFile.bind(null,t);return render(l,e,o)};e.toFileStream=function toFileStream(t,e,n){if(arguments.length<2){throw new Error("Too few arguments provided")}const r=checkParams(e,n,t.emit.bind(t,"error"));const i=getRendererFromType("png");const o=i.renderToFileStream.bind(null,t);render(o,e,r)}},2613:function(t){"use strict";t.exports=require("assert")},181:function(t){"use strict";t.exports=require("buffer")},9896:function(t){"use strict";t.exports=require("fs")},2203:function(t){"use strict";t.exports=require("stream")},9023:function(t){"use strict";t.exports=require("util")},3106:function(t){"use strict";t.exports=require("zlib")}};var e={};function __nccwpck_require__(n){var r=e[n];if(r!==undefined){return r.exports}var i=e[n]={exports:{}};var o=true;try{t[n](i,i.exports,__nccwpck_require__);o=false}finally{if(o)delete e[n]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n=__nccwpck_require__(982);module.exports=n})();
@@ -0,0 +1,63 @@
1
+ const Utils = require('./utils')
2
+
3
+ function clearCanvas (ctx, canvas, size) {
4
+ ctx.clearRect(0, 0, canvas.width, canvas.height)
5
+
6
+ if (!canvas.style) canvas.style = {}
7
+ canvas.height = size
8
+ canvas.width = size
9
+ canvas.style.height = size + 'px'
10
+ canvas.style.width = size + 'px'
11
+ }
12
+
13
+ function getCanvasElement () {
14
+ try {
15
+ return document.createElement('canvas')
16
+ } catch (e) {
17
+ throw new Error('You need to specify a canvas element')
18
+ }
19
+ }
20
+
21
+ exports.render = function render (qrData, canvas, options) {
22
+ let opts = options
23
+ let canvasEl = canvas
24
+
25
+ if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {
26
+ opts = canvas
27
+ canvas = undefined
28
+ }
29
+
30
+ if (!canvas) {
31
+ canvasEl = getCanvasElement()
32
+ }
33
+
34
+ opts = Utils.getOptions(opts)
35
+ const size = Utils.getImageWidth(qrData.modules.size, opts)
36
+
37
+ const ctx = canvasEl.getContext('2d')
38
+ const image = ctx.createImageData(size, size)
39
+ Utils.qrToImageData(image.data, qrData, opts)
40
+
41
+ clearCanvas(ctx, canvasEl, size)
42
+ ctx.putImageData(image, 0, 0)
43
+
44
+ return canvasEl
45
+ }
46
+
47
+ exports.renderToDataURL = function renderToDataURL (qrData, canvas, options) {
48
+ let opts = options
49
+
50
+ if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {
51
+ opts = canvas
52
+ canvas = undefined
53
+ }
54
+
55
+ if (!opts) opts = {}
56
+
57
+ const canvasEl = exports.render(qrData, canvas, opts)
58
+
59
+ const type = opts.type || 'image/png'
60
+ const rendererOpts = opts.rendererOpts || {}
61
+
62
+ return canvasEl.toDataURL(type, rendererOpts.quality)
63
+ }
@@ -0,0 +1,78 @@
1
+ const fs = require('fs')
2
+ const PNG = require('pngjs').PNG
3
+ const Utils = require('./utils')
4
+
5
+ exports.render = function render (qrData, options) {
6
+ const opts = Utils.getOptions(options)
7
+ const pngOpts = opts.rendererOpts
8
+ const size = Utils.getImageWidth(qrData.modules.size, opts)
9
+
10
+ pngOpts.width = size
11
+ pngOpts.height = size
12
+
13
+ const pngImage = new PNG(pngOpts)
14
+ Utils.qrToImageData(pngImage.data, qrData, opts)
15
+
16
+ return pngImage
17
+ }
18
+
19
+ exports.renderToDataURL = function renderToDataURL (qrData, options, cb) {
20
+ if (typeof cb === 'undefined') {
21
+ cb = options
22
+ options = undefined
23
+ }
24
+
25
+ exports.renderToBuffer(qrData, options, function (err, output) {
26
+ if (err) cb(err)
27
+ let url = 'data:image/png;base64,'
28
+ url += output.toString('base64')
29
+ cb(null, url)
30
+ })
31
+ }
32
+
33
+ exports.renderToBuffer = function renderToBuffer (qrData, options, cb) {
34
+ if (typeof cb === 'undefined') {
35
+ cb = options
36
+ options = undefined
37
+ }
38
+
39
+ const png = exports.render(qrData, options)
40
+ const buffer = []
41
+
42
+ png.on('error', cb)
43
+
44
+ png.on('data', function (data) {
45
+ buffer.push(data)
46
+ })
47
+
48
+ png.on('end', function () {
49
+ cb(null, Buffer.concat(buffer))
50
+ })
51
+
52
+ png.pack()
53
+ }
54
+
55
+ exports.renderToFile = function renderToFile (path, qrData, options, cb) {
56
+ if (typeof cb === 'undefined') {
57
+ cb = options
58
+ options = undefined
59
+ }
60
+
61
+ let called = false
62
+ const done = (...args) => {
63
+ if (called) return
64
+ called = true
65
+ cb.apply(null, args)
66
+ }
67
+ const stream = fs.createWriteStream(path)
68
+
69
+ stream.on('error', done)
70
+ stream.on('close', done)
71
+
72
+ exports.renderToFileStream(stream, qrData, options)
73
+ }
74
+
75
+ exports.renderToFileStream = function renderToFileStream (stream, qrData, options) {
76
+ const png = exports.render(qrData, options)
77
+ png.pack().pipe(stream)
78
+ }
@@ -0,0 +1,81 @@
1
+ const Utils = require('./utils')
2
+
3
+ function getColorAttrib (color, attrib) {
4
+ const alpha = color.a / 255
5
+ const str = attrib + '="' + color.hex + '"'
6
+
7
+ return alpha < 1
8
+ ? str + ' ' + attrib + '-opacity="' + alpha.toFixed(2).slice(1) + '"'
9
+ : str
10
+ }
11
+
12
+ function svgCmd (cmd, x, y) {
13
+ let str = cmd + x
14
+ if (typeof y !== 'undefined') str += ' ' + y
15
+
16
+ return str
17
+ }
18
+
19
+ function qrToPath (data, size, margin) {
20
+ let path = ''
21
+ let moveBy = 0
22
+ let newRow = false
23
+ let lineLength = 0
24
+
25
+ for (let i = 0; i < data.length; i++) {
26
+ const col = Math.floor(i % size)
27
+ const row = Math.floor(i / size)
28
+
29
+ if (!col && !newRow) newRow = true
30
+
31
+ if (data[i]) {
32
+ lineLength++
33
+
34
+ if (!(i > 0 && col > 0 && data[i - 1])) {
35
+ path += newRow
36
+ ? svgCmd('M', col + margin, 0.5 + row + margin)
37
+ : svgCmd('m', moveBy, 0)
38
+
39
+ moveBy = 0
40
+ newRow = false
41
+ }
42
+
43
+ if (!(col + 1 < size && data[i + 1])) {
44
+ path += svgCmd('h', lineLength)
45
+ lineLength = 0
46
+ }
47
+ } else {
48
+ moveBy++
49
+ }
50
+ }
51
+
52
+ return path
53
+ }
54
+
55
+ exports.render = function render (qrData, options, cb) {
56
+ const opts = Utils.getOptions(options)
57
+ const size = qrData.modules.size
58
+ const data = qrData.modules.data
59
+ const qrcodesize = size + opts.margin * 2
60
+
61
+ const bg = !opts.color.light.a
62
+ ? ''
63
+ : '<path ' + getColorAttrib(opts.color.light, 'fill') +
64
+ ' d="M0 0h' + qrcodesize + 'v' + qrcodesize + 'H0z"/>'
65
+
66
+ const path =
67
+ '<path ' + getColorAttrib(opts.color.dark, 'stroke') +
68
+ ' d="' + qrToPath(data, size, opts.margin) + '"/>'
69
+
70
+ const viewBox = 'viewBox="' + '0 0 ' + qrcodesize + ' ' + qrcodesize + '"'
71
+
72
+ const width = !opts.width ? '' : 'width="' + opts.width + '" height="' + opts.width + '" '
73
+
74
+ const svgTag = '<svg xmlns="http://www.w3.org/2000/svg" ' + width + viewBox + ' shape-rendering="crispEdges">' + bg + path + '</svg>\n'
75
+
76
+ if (typeof cb === 'function') {
77
+ cb(null, svgTag)
78
+ }
79
+
80
+ return svgTag
81
+ }
@@ -0,0 +1,19 @@
1
+ const svgTagRenderer = require('./svg-tag')
2
+
3
+ exports.render = svgTagRenderer.render
4
+
5
+ exports.renderToFile = function renderToFile (path, qrData, options, cb) {
6
+ if (typeof cb === 'undefined') {
7
+ cb = options
8
+ options = undefined
9
+ }
10
+
11
+ const fs = require('fs')
12
+ const svgTag = exports.render(qrData, options)
13
+
14
+ const xmlStr = '<?xml version="1.0" encoding="utf-8"?>' +
15
+ '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">' +
16
+ svgTag
17
+
18
+ fs.writeFile(path, xmlStr, cb)
19
+ }
@@ -0,0 +1,85 @@
1
+ const backgroundWhite = '\x1b[47m'
2
+ const backgroundBlack = '\x1b[40m'
3
+ const foregroundWhite = '\x1b[37m'
4
+ const foregroundBlack = '\x1b[30m'
5
+ const reset = '\x1b[0m'
6
+ const lineSetupNormal = backgroundWhite + foregroundBlack // setup colors
7
+ const lineSetupInverse = backgroundBlack + foregroundWhite // setup colors
8
+
9
+ const createPalette = function (lineSetup, foregroundWhite, foregroundBlack) {
10
+ return {
11
+ // 1 ... white, 2 ... black, 0 ... transparent (default)
12
+
13
+ '00': reset + ' ' + lineSetup,
14
+ '01': reset + foregroundWhite + '▄' + lineSetup,
15
+ '02': reset + foregroundBlack + '▄' + lineSetup,
16
+ 10: reset + foregroundWhite + '▀' + lineSetup,
17
+ 11: ' ',
18
+ 12: '▄',
19
+ 20: reset + foregroundBlack + '▀' + lineSetup,
20
+ 21: '▀',
21
+ 22: '█'
22
+ }
23
+ }
24
+
25
+ /**
26
+ * Returns code for QR pixel
27
+ * @param {boolean[][]} modules
28
+ * @param {number} size
29
+ * @param {number} x
30
+ * @param {number} y
31
+ * @return {'0' | '1' | '2'}
32
+ */
33
+ const mkCodePixel = function (modules, size, x, y) {
34
+ const sizePlus = size + 1
35
+ if ((x >= sizePlus) || (y >= sizePlus) || (y < -1) || (x < -1)) return '0'
36
+ if ((x >= size) || (y >= size) || (y < 0) || (x < 0)) return '1'
37
+ const idx = (y * size) + x
38
+ return modules[idx] ? '2' : '1'
39
+ }
40
+
41
+ /**
42
+ * Returns code for four QR pixels. Suitable as key in palette.
43
+ * @param {boolean[][]} modules
44
+ * @param {number} size
45
+ * @param {number} x
46
+ * @param {number} y
47
+ * @return {keyof palette}
48
+ */
49
+ const mkCode = function (modules, size, x, y) {
50
+ return (
51
+ mkCodePixel(modules, size, x, y) +
52
+ mkCodePixel(modules, size, x, y + 1)
53
+ )
54
+ }
55
+
56
+ exports.render = function (qrData, options, cb) {
57
+ const size = qrData.modules.size
58
+ const data = qrData.modules.data
59
+
60
+ const inverse = !!(options && options.inverse)
61
+ const lineSetup = options && options.inverse ? lineSetupInverse : lineSetupNormal
62
+ const white = inverse ? foregroundBlack : foregroundWhite
63
+ const black = inverse ? foregroundWhite : foregroundBlack
64
+
65
+ const palette = createPalette(lineSetup, white, black)
66
+ const newLine = reset + '\n' + lineSetup
67
+
68
+ let output = lineSetup // setup colors
69
+
70
+ for (let y = -1; y < size + 1; y += 2) {
71
+ for (let x = -1; x < size; x++) {
72
+ output += palette[mkCode(data, size, x, y)]
73
+ }
74
+
75
+ output += palette[mkCode(data, size, size, y)] + newLine
76
+ }
77
+
78
+ output += reset
79
+
80
+ if (typeof cb === 'function') {
81
+ cb(null, output)
82
+ }
83
+
84
+ return output
85
+ }
@@ -0,0 +1,49 @@
1
+ // let Utils = require('./utils')
2
+
3
+ exports.render = function (qrData, options, cb) {
4
+ const size = qrData.modules.size
5
+ const data = qrData.modules.data
6
+
7
+ // let opts = Utils.getOptions(options)
8
+
9
+ // use same scheme as https://github.com/gtanner/qrcode-terminal because it actually works! =)
10
+ const black = '\x1b[40m \x1b[0m'
11
+ const white = '\x1b[47m \x1b[0m'
12
+
13
+ let output = ''
14
+ const hMargin = Array(size + 3).join(white)
15
+ const vMargin = Array(2).join(white)
16
+
17
+ output += hMargin + '\n'
18
+ for (let i = 0; i < size; ++i) {
19
+ output += white
20
+ for (let j = 0; j < size; j++) {
21
+ // let topModule = data[i * size + j]
22
+ // let bottomModule = data[(i + 1) * size + j]
23
+
24
+ output += data[i * size + j] ? black : white// getBlockChar(topModule, bottomModule)
25
+ }
26
+ // output += white+'\n'
27
+ output += vMargin + '\n'
28
+ }
29
+
30
+ output += hMargin + '\n'
31
+
32
+ if (typeof cb === 'function') {
33
+ cb(null, output)
34
+ }
35
+
36
+ return output
37
+ }
38
+ /*
39
+ exports.renderToFile = function renderToFile (path, qrData, options, cb) {
40
+ if (typeof cb === 'undefined') {
41
+ cb = options
42
+ options = undefined
43
+ }
44
+
45
+ let fs = require('fs')
46
+ let utf8 = exports.render(qrData, options)
47
+ fs.writeFile(path, utf8, cb)
48
+ }
49
+ */
@@ -0,0 +1,9 @@
1
+ const big = require('./terminal/terminal')
2
+ const small = require('./terminal/terminal-small')
3
+
4
+ exports.render = function (qrData, options, cb) {
5
+ if (options && options.small) {
6
+ return small.render(qrData, options, cb)
7
+ }
8
+ return big.render(qrData, options, cb)
9
+ }
@@ -0,0 +1,71 @@
1
+ const Utils = require('./utils')
2
+
3
+ const BLOCK_CHAR = {
4
+ WW: ' ',
5
+ WB: '▄',
6
+ BB: '█',
7
+ BW: '▀'
8
+ }
9
+
10
+ const INVERTED_BLOCK_CHAR = {
11
+ BB: ' ',
12
+ BW: '▄',
13
+ WW: '█',
14
+ WB: '▀'
15
+ }
16
+
17
+ function getBlockChar (top, bottom, blocks) {
18
+ if (top && bottom) return blocks.BB
19
+ if (top && !bottom) return blocks.BW
20
+ if (!top && bottom) return blocks.WB
21
+ return blocks.WW
22
+ }
23
+
24
+ exports.render = function (qrData, options, cb) {
25
+ const opts = Utils.getOptions(options)
26
+ let blocks = BLOCK_CHAR
27
+ if (opts.color.dark.hex === '#ffffff' || opts.color.light.hex === '#000000') {
28
+ blocks = INVERTED_BLOCK_CHAR
29
+ }
30
+
31
+ const size = qrData.modules.size
32
+ const data = qrData.modules.data
33
+
34
+ let output = ''
35
+ let hMargin = Array(size + (opts.margin * 2) + 1).join(blocks.WW)
36
+ hMargin = Array((opts.margin / 2) + 1).join(hMargin + '\n')
37
+
38
+ const vMargin = Array(opts.margin + 1).join(blocks.WW)
39
+
40
+ output += hMargin
41
+ for (let i = 0; i < size; i += 2) {
42
+ output += vMargin
43
+ for (let j = 0; j < size; j++) {
44
+ const topModule = data[i * size + j]
45
+ const bottomModule = data[(i + 1) * size + j]
46
+
47
+ output += getBlockChar(topModule, bottomModule, blocks)
48
+ }
49
+
50
+ output += vMargin + '\n'
51
+ }
52
+
53
+ output += hMargin.slice(0, -1)
54
+
55
+ if (typeof cb === 'function') {
56
+ cb(null, output)
57
+ }
58
+
59
+ return output
60
+ }
61
+
62
+ exports.renderToFile = function renderToFile (path, qrData, options, cb) {
63
+ if (typeof cb === 'undefined') {
64
+ cb = options
65
+ options = undefined
66
+ }
67
+
68
+ const fs = require('fs')
69
+ const utf8 = exports.render(qrData, options)
70
+ fs.writeFile(path, utf8, cb)
71
+ }