orion-design 0.1.31 → 0.1.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (259) hide show
  1. package/README.md +5 -5
  2. package/dist/Throne/hooks/use-throne-context.d.ts +5 -0
  3. package/dist/Throne/hooks/use-throne-context.js +15 -0
  4. package/dist/Throne/hooks/use-throne-context.js.map +1 -0
  5. package/dist/Throne/index.d.ts +1 -1
  6. package/dist/Throne/index.js +14 -30
  7. package/dist/Throne/index.js.map +1 -1
  8. package/dist/components/Button/ButtonGroup/ButtonGroup.d.ts +2 -0
  9. package/dist/components/Button/index.js +36 -41
  10. package/dist/components/Button/index.js.map +1 -1
  11. package/dist/components/Flex/index.js +89 -122
  12. package/dist/components/Flex/index.js.map +1 -1
  13. package/dist/components/Form/FileInput/FileInput.vue.d.ts +4 -4
  14. package/dist/components/Form/Form.js +2 -2
  15. package/dist/components/Form/Form.js.map +1 -1
  16. package/dist/components/Form/LovInput/LovInput.js +2 -2
  17. package/dist/components/Form/LovInput/LovInput.js.map +1 -1
  18. package/dist/components/Form/LovInput/LovInput.vue.d.ts +894 -0
  19. package/dist/components/Form/LovInput/hooks/useLov.js +5 -5
  20. package/dist/components/Form/LovInput/hooks/useLov.js.map +1 -1
  21. package/dist/components/Form/LovInput/index.js +4 -4
  22. package/dist/components/Form/MultiTableSelect/MultiTableSelect.d.ts +26 -0
  23. package/dist/components/Form/MultiTableSelect/MultiTableSelect.js +5 -0
  24. package/dist/components/Form/MultiTableSelect/MultiTableSelect.js.map +1 -0
  25. package/dist/components/Form/MultiTableSelect/MultiTableSelect.vue.d.ts +6249 -0
  26. package/dist/components/Form/MultiTableSelect/hooks/useMultiTableSelect.d.ts +1 -0
  27. package/dist/components/Form/MultiTableSelect/hooks/useMultiTableSelect.js +9 -0
  28. package/dist/components/Form/MultiTableSelect/hooks/useMultiTableSelect.js.map +1 -0
  29. package/dist/components/Form/MultiTableSelect/index.d.ts +2 -0
  30. package/dist/components/Form/MultiTableSelect/index.js +7 -0
  31. package/dist/components/Form/MultiTableSelect/index.js.map +1 -0
  32. package/dist/components/Form/hooks/FormItemValidateTrigger.js +2 -2
  33. package/dist/components/Form/hooks/FormItemValidateTrigger.js.map +1 -1
  34. package/dist/components/Form/hooks/index.js +69 -127
  35. package/dist/components/Form/hooks/index.js.map +1 -1
  36. package/dist/components/Form/index.d.ts +3 -0
  37. package/dist/components/Form/index.js +790 -829
  38. package/dist/components/Form/index.js.map +1 -1
  39. package/dist/components/Form/utils/index.js +18 -30
  40. package/dist/components/Form/utils/index.js.map +1 -1
  41. package/dist/components/LovTable/LovPagetable.vue.d.ts +510 -6
  42. package/dist/components/LovTable/LovQuerytable.vue.d.ts +468 -4
  43. package/dist/components/LovTable/index.d.ts +489 -5
  44. package/dist/components/LovTable/index.js +104 -179
  45. package/dist/components/LovTable/index.js.map +1 -1
  46. package/dist/components/Modal/index.js +56 -111
  47. package/dist/components/Modal/index.js.map +1 -1
  48. package/dist/components/Modal/types.d.ts +1 -1
  49. package/dist/components/Modal/types.js +3 -4
  50. package/dist/components/Modal/types.js.map +1 -1
  51. package/dist/components/Modal/useModal.js +5 -5
  52. package/dist/components/Modal/useModal.js.map +1 -1
  53. package/dist/components/MultiTableSelectPagetable/MultiTableSelectPagetable.vue.d.ts +880 -0
  54. package/dist/components/MultiTableSelectPagetable/index.d.ts +462 -0
  55. package/dist/components/MultiTableSelectPagetable/index.js +164 -0
  56. package/dist/components/MultiTableSelectPagetable/index.js.map +1 -0
  57. package/dist/components/Pagetable/Pagetable.d.ts +96 -3
  58. package/dist/components/Pagetable/columns/PagetableColumnButtongroup.d.ts +14 -1
  59. package/dist/components/Pagetable/columns/PagetableColumnDate.d.ts +14 -1
  60. package/dist/components/Pagetable/columns/PagetableColumnDiy.d.ts +1 -1
  61. package/dist/components/Pagetable/columns/PagetableColumnLink.d.ts +14 -1
  62. package/dist/components/Pagetable/columns/PagetableColumnMultiselect.d.ts +14 -1
  63. package/dist/components/Pagetable/columns/PagetableColumnNumber.d.ts +14 -1
  64. package/dist/components/Pagetable/columns/PagetableColumnSingleselect.d.ts +14 -1
  65. package/dist/components/Pagetable/columns/PagetableColumnString.d.ts +14 -1
  66. package/dist/components/Pagetable/hooks/useCode.d.ts +2 -0
  67. package/dist/components/Pagetable/hooks/useCode.js +24 -0
  68. package/dist/components/Pagetable/hooks/useCode.js.map +1 -0
  69. package/dist/components/Pagetable/hooks/useColumns.js +85 -88
  70. package/dist/components/Pagetable/hooks/useColumns.js.map +1 -1
  71. package/dist/components/Pagetable/index.d.ts +159 -2
  72. package/dist/components/Pagetable/index.js +601 -684
  73. package/dist/components/Pagetable/index.js.map +1 -1
  74. package/dist/components/Pagetable/utils/index.js +54 -92
  75. package/dist/components/Pagetable/utils/index.js.map +1 -1
  76. package/dist/components/Querytable/Querytable.d.ts +80 -2
  77. package/dist/components/Querytable/columns/QuerytableColumnButtongroup.d.ts +14 -1
  78. package/dist/components/Querytable/columns/QuerytableColumnDate.d.ts +14 -1
  79. package/dist/components/Querytable/columns/QuerytableColumnDiy.d.ts +1 -1
  80. package/dist/components/Querytable/columns/QuerytableColumnLink.d.ts +14 -1
  81. package/dist/components/Querytable/columns/QuerytableColumnMultiselect.d.ts +14 -1
  82. package/dist/components/Querytable/columns/QuerytableColumnNumber.d.ts +14 -1
  83. package/dist/components/Querytable/columns/QuerytableColumnSingleselect.d.ts +14 -1
  84. package/dist/components/Querytable/columns/QuerytableColumnString.d.ts +14 -1
  85. package/dist/components/Querytable/hooks/useColumns.js +79 -82
  86. package/dist/components/Querytable/hooks/useColumns.js.map +1 -1
  87. package/dist/components/Querytable/index.d.ts +147 -1
  88. package/dist/components/Querytable/index.js +526 -579
  89. package/dist/components/Querytable/index.js.map +1 -1
  90. package/dist/components/Querytable/utils/index.js +54 -92
  91. package/dist/components/Querytable/utils/index.js.map +1 -1
  92. package/dist/components/RichTextEditor/index.js +74 -100
  93. package/dist/components/RichTextEditor/index.js.map +1 -1
  94. package/dist/components/Tabs/constants.js +2 -2
  95. package/dist/components/Tabs/constants.js.map +1 -1
  96. package/dist/components/Tabs/index.js +358 -603
  97. package/dist/components/Tabs/index.js.map +1 -1
  98. package/dist/components/Tabs/tab-bar.js +6 -6
  99. package/dist/components/Tabs/tab-bar.js.map +1 -1
  100. package/dist/components/Tabs/tab-pane.js +3 -3
  101. package/dist/components/Tabs/tab-pane.js.map +1 -1
  102. package/dist/components/Throne/ThroneContextProvider.d.ts +25 -0
  103. package/dist/components/_constants/aria.js +2 -2
  104. package/dist/components/_constants/aria.js.map +1 -1
  105. package/dist/components/_constants/event.js +4 -6
  106. package/dist/components/_constants/event.js.map +1 -1
  107. package/dist/components/_constants/index.js +6 -6
  108. package/dist/components/_hooks/index.js +7 -7
  109. package/dist/components/_hooks/use-namespace/index.js +39 -74
  110. package/dist/components/_hooks/use-namespace/index.js.map +1 -1
  111. package/dist/components/_hooks/use-ordered-children/index.js +19 -29
  112. package/dist/components/_hooks/use-ordered-children/index.js.map +1 -1
  113. package/dist/components/_util/arrays.js +5 -9
  114. package/dist/components/_util/arrays.js.map +1 -1
  115. package/dist/components/_util/browser.js +6 -6
  116. package/dist/components/_util/browser.js.map +1 -1
  117. package/dist/components/_util/classNames.js +17 -22
  118. package/dist/components/_util/classNames.js.map +1 -1
  119. package/dist/components/_util/dom/aria.js +39 -74
  120. package/dist/components/_util/dom/aria.js.map +1 -1
  121. package/dist/components/_util/dom/element.js +8 -9
  122. package/dist/components/_util/dom/element.js.map +1 -1
  123. package/dist/components/_util/dom/event.js +7 -14
  124. package/dist/components/_util/dom/event.js.map +1 -1
  125. package/dist/components/_util/dom/index.js +36 -36
  126. package/dist/components/_util/dom/position.js +25 -49
  127. package/dist/components/_util/dom/position.js.map +1 -1
  128. package/dist/components/_util/dom/scroll.js +61 -103
  129. package/dist/components/_util/dom/scroll.js.map +1 -1
  130. package/dist/components/_util/dom/style.js +50 -65
  131. package/dist/components/_util/dom/style.js.map +1 -1
  132. package/dist/components/_util/easings.js +4 -8
  133. package/dist/components/_util/easings.js.map +1 -1
  134. package/dist/components/_util/error.js +11 -12
  135. package/dist/components/_util/error.js.map +1 -1
  136. package/dist/components/_util/functions.js +3 -3
  137. package/dist/components/_util/i18n.js +2 -2
  138. package/dist/components/_util/i18n.js.map +1 -1
  139. package/dist/components/_util/index.js +137 -137
  140. package/dist/components/_util/isValid.js +2 -4
  141. package/dist/components/_util/isValid.js.map +1 -1
  142. package/dist/components/_util/objects.js +14 -18
  143. package/dist/components/_util/objects.js.map +1 -1
  144. package/dist/components/_util/props-util/index.js +20 -46
  145. package/dist/components/_util/props-util/index.js.map +1 -1
  146. package/dist/components/_util/props-util/initDefaultProps.js +10 -18
  147. package/dist/components/_util/props-util/initDefaultProps.js.map +1 -1
  148. package/dist/components/_util/raf.js +4 -5
  149. package/dist/components/_util/raf.js.map +1 -1
  150. package/dist/components/_util/rand.js +3 -4
  151. package/dist/components/_util/rand.js.map +1 -1
  152. package/dist/components/_util/strings.js +8 -9
  153. package/dist/components/_util/strings.js.map +1 -1
  154. package/dist/components/_util/throttleByRaf.js +10 -16
  155. package/dist/components/_util/throttleByRaf.js.map +1 -1
  156. package/dist/components/_util/type.js +38 -41
  157. package/dist/components/_util/type.js.map +1 -1
  158. package/dist/components/_util/types.js +22 -41
  159. package/dist/components/_util/types.js.map +1 -1
  160. package/dist/components/_util/typescript.js +2 -2
  161. package/dist/components/_util/typescript.js.map +1 -1
  162. package/dist/components/_util/util.js +43 -85
  163. package/dist/components/_util/util.js.map +1 -1
  164. package/dist/components/_util/vue/global-node.js +15 -27
  165. package/dist/components/_util/vue/global-node.js.map +1 -1
  166. package/dist/components/_util/vue/icon.js +25 -29
  167. package/dist/components/_util/vue/icon.js.map +1 -1
  168. package/dist/components/_util/vue/index.js +41 -41
  169. package/dist/components/_util/vue/install.js +18 -35
  170. package/dist/components/_util/vue/install.js.map +1 -1
  171. package/dist/components/_util/vue/props/index.js +6 -6
  172. package/dist/components/_util/vue/props/runtime.js +30 -46
  173. package/dist/components/_util/vue/props/runtime.js.map +1 -1
  174. package/dist/components/_util/vue/refs.js +6 -12
  175. package/dist/components/_util/vue/refs.js.map +1 -1
  176. package/dist/components/_util/vue/size.js +3 -5
  177. package/dist/components/_util/vue/size.js.map +1 -1
  178. package/dist/components/_util/vue/validator.js +4 -5
  179. package/dist/components/_util/vue/validator.js.map +1 -1
  180. package/dist/components/_util/vue/vnode.js +54 -100
  181. package/dist/components/_util/vue/vnode.js.map +1 -1
  182. package/dist/components/_util/vue-types/index.js +220 -231
  183. package/dist/components/_util/vue-types/index.js.map +1 -1
  184. package/dist/components/components.d.ts +2 -0
  185. package/dist/components/components.js +24 -20
  186. package/dist/components/components.js.map +1 -1
  187. package/dist/components/index.js +43 -38
  188. package/dist/components/index.js.map +1 -1
  189. package/dist/components-DP9bnDLm.js +48 -0
  190. package/dist/components-DP9bnDLm.js.map +1 -0
  191. package/dist/error/OrionError.js +4 -8
  192. package/dist/error/OrionError.js.map +1 -1
  193. package/dist/{index-C6P_0wAy.js → index-ChkLOmNK.js} +76 -46
  194. package/dist/{index-C6P_0wAy.js.map → index-ChkLOmNK.js.map} +1 -1
  195. package/dist/index.css +1 -797
  196. package/dist/index.d.ts +1 -0
  197. package/dist/index.js +46 -36
  198. package/dist/index.js.map +1 -1
  199. package/dist/print/LodopFuncs.js +43 -101
  200. package/dist/print/LodopFuncs.js.map +1 -1
  201. package/dist/print/index.js +108 -200
  202. package/dist/print/index.js.map +1 -1
  203. package/dist/request/ErrorHandlerChain.js +14 -17
  204. package/dist/request/ErrorHandlerChain.js.map +1 -1
  205. package/dist/request/RequestFilterChain.js +13 -16
  206. package/dist/request/RequestFilterChain.js.map +1 -1
  207. package/dist/request/ResponseParserChain.js +14 -17
  208. package/dist/request/ResponseParserChain.js.map +1 -1
  209. package/dist/request/disivion/DateSerializer.js +22 -47
  210. package/dist/request/disivion/DateSerializer.js.map +1 -1
  211. package/dist/request/disivion/DivisionErrorHandler.js +25 -40
  212. package/dist/request/disivion/DivisionErrorHandler.js.map +1 -1
  213. package/dist/request/disivion/DivisionResponseParser.js +10 -16
  214. package/dist/request/disivion/DivisionResponseParser.js.map +1 -1
  215. package/dist/request/disivion/index.js +201 -305
  216. package/dist/request/disivion/index.js.map +1 -1
  217. package/dist/request/error/BizExceptionResponseError.js +5 -11
  218. package/dist/request/error/BizExceptionResponseError.js.map +1 -1
  219. package/dist/request/error/ExceptionResponseError.js +5 -11
  220. package/dist/request/error/ExceptionResponseError.js.map +1 -1
  221. package/dist/request/error/ResponseError.js +4 -9
  222. package/dist/request/error/ResponseError.js.map +1 -1
  223. package/dist/request/error/SessionExceptionResponseError.js +5 -11
  224. package/dist/request/error/SessionExceptionResponseError.js.map +1 -1
  225. package/dist/request/index.js +11 -11
  226. package/dist/utils/DateUtil.js +33 -48
  227. package/dist/utils/DateUtil.js.map +1 -1
  228. package/dist/utils/NumberUtil.js +6 -6
  229. package/dist/utils/NumberUtil.js.map +1 -1
  230. package/dist/utils/cloneDeep.js +2 -2
  231. package/dist/utils/delay.js +3 -3
  232. package/dist/utils/delay.js.map +1 -1
  233. package/dist/utils/functions.js +3 -3
  234. package/dist/utils/index.js +12 -12
  235. package/dist/utils/md5.js +93 -191
  236. package/dist/utils/md5.js.map +1 -1
  237. package/dist/utils/uuid.js +25 -35
  238. package/dist/utils/uuid.js.map +1 -1
  239. package/dist/version/index.js +2 -2
  240. package/dist/version/version.d.ts +1 -1
  241. package/dist/version/version.js +2 -2
  242. package/dist/version/version.js.map +1 -1
  243. package/package.json +1 -1
  244. package/dist/_commonjsHelpers-DWwsNxpa.js +0 -9
  245. package/dist/_commonjsHelpers-DWwsNxpa.js.map +0 -1
  246. package/dist/components-8oZ2kpUC.js +0 -27
  247. package/dist/components-8oZ2kpUC.js.map +0 -1
  248. package/dist/components-B3d9m_tn.js +0 -27
  249. package/dist/components-B3d9m_tn.js.map +0 -1
  250. package/dist/functions-BeMkokbY.js +0 -63
  251. package/dist/functions-BeMkokbY.js.map +0 -1
  252. package/dist/index-BOKLZnqH.js +0 -54
  253. package/dist/index-BOKLZnqH.js.map +0 -1
  254. package/dist/index-D1m0KTpK.js +0 -69
  255. package/dist/index-D1m0KTpK.js.map +0 -1
  256. package/dist/index-DR5ZP7mD.js +0 -160
  257. package/dist/index-DR5ZP7mD.js.map +0 -1
  258. package/dist/index-DkwIULcN.js +0 -200
  259. package/dist/index-DkwIULcN.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../node_modules/js-base64/base64.mjs","../../../src/request/disivion/index.ts"],"sourcesContent":["/**\n * base64.ts\n *\n * Licensed under the BSD 3-Clause License.\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * References:\n * http://en.wikipedia.org/wiki/Base64\n *\n * @author Dan Kogai (https://github.com/dankogai)\n */\nconst version = '3.7.7';\n/**\n * @deprecated use lowercase `version`.\n */\nconst VERSION = version;\nconst _hasBuffer = typeof Buffer === 'function';\nconst _TD = typeof TextDecoder === 'function' ? new TextDecoder() : undefined;\nconst _TE = typeof TextEncoder === 'function' ? new TextEncoder() : undefined;\nconst b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\nconst b64chs = Array.prototype.slice.call(b64ch);\nconst b64tab = ((a) => {\n let tab = {};\n a.forEach((c, i) => tab[c] = i);\n return tab;\n})(b64chs);\nconst b64re = /^(?:[A-Za-z\\d+\\/]{4})*?(?:[A-Za-z\\d+\\/]{2}(?:==)?|[A-Za-z\\d+\\/]{3}=?)?$/;\nconst _fromCC = String.fromCharCode.bind(String);\nconst _U8Afrom = typeof Uint8Array.from === 'function'\n ? Uint8Array.from.bind(Uint8Array)\n : (it) => new Uint8Array(Array.prototype.slice.call(it, 0));\nconst _mkUriSafe = (src) => src\n .replace(/=/g, '').replace(/[+\\/]/g, (m0) => m0 == '+' ? '-' : '_');\nconst _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\\+\\/]/g, '');\n/**\n * polyfill version of `btoa`\n */\nconst btoaPolyfill = (bin) => {\n // console.log('polyfilled');\n let u32, c0, c1, c2, asc = '';\n const pad = bin.length % 3;\n for (let i = 0; i < bin.length;) {\n if ((c0 = bin.charCodeAt(i++)) > 255 ||\n (c1 = bin.charCodeAt(i++)) > 255 ||\n (c2 = bin.charCodeAt(i++)) > 255)\n throw new TypeError('invalid character found');\n u32 = (c0 << 16) | (c1 << 8) | c2;\n asc += b64chs[u32 >> 18 & 63]\n + b64chs[u32 >> 12 & 63]\n + b64chs[u32 >> 6 & 63]\n + b64chs[u32 & 63];\n }\n return pad ? asc.slice(0, pad - 3) + \"===\".substring(pad) : asc;\n};\n/**\n * does what `window.btoa` of web browsers do.\n * @param {String} bin binary string\n * @returns {string} Base64-encoded string\n */\nconst _btoa = typeof btoa === 'function' ? (bin) => btoa(bin)\n : _hasBuffer ? (bin) => Buffer.from(bin, 'binary').toString('base64')\n : btoaPolyfill;\nconst _fromUint8Array = _hasBuffer\n ? (u8a) => Buffer.from(u8a).toString('base64')\n : (u8a) => {\n // cf. https://stackoverflow.com/questions/12710001/how-to-convert-uint8-array-to-base64-encoded-string/12713326#12713326\n const maxargs = 0x1000;\n let strs = [];\n for (let i = 0, l = u8a.length; i < l; i += maxargs) {\n strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs)));\n }\n return _btoa(strs.join(''));\n };\n/**\n * converts a Uint8Array to a Base64 string.\n * @param {boolean} [urlsafe] URL-and-filename-safe a la RFC4648 §5\n * @returns {string} Base64 string\n */\nconst fromUint8Array = (u8a, urlsafe = false) => urlsafe ? _mkUriSafe(_fromUint8Array(u8a)) : _fromUint8Array(u8a);\n// This trick is found broken https://github.com/dankogai/js-base64/issues/130\n// const utob = (src: string) => unescape(encodeURIComponent(src));\n// reverting good old fationed regexp\nconst cb_utob = (c) => {\n if (c.length < 2) {\n var cc = c.charCodeAt(0);\n return cc < 0x80 ? c\n : cc < 0x800 ? (_fromCC(0xc0 | (cc >>> 6))\n + _fromCC(0x80 | (cc & 0x3f)))\n : (_fromCC(0xe0 | ((cc >>> 12) & 0x0f))\n + _fromCC(0x80 | ((cc >>> 6) & 0x3f))\n + _fromCC(0x80 | (cc & 0x3f)));\n }\n else {\n var cc = 0x10000\n + (c.charCodeAt(0) - 0xD800) * 0x400\n + (c.charCodeAt(1) - 0xDC00);\n return (_fromCC(0xf0 | ((cc >>> 18) & 0x07))\n + _fromCC(0x80 | ((cc >>> 12) & 0x3f))\n + _fromCC(0x80 | ((cc >>> 6) & 0x3f))\n + _fromCC(0x80 | (cc & 0x3f)));\n }\n};\nconst re_utob = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFFF]|[^\\x00-\\x7F]/g;\n/**\n * @deprecated should have been internal use only.\n * @param {string} src UTF-8 string\n * @returns {string} UTF-16 string\n */\nconst utob = (u) => u.replace(re_utob, cb_utob);\n//\nconst _encode = _hasBuffer\n ? (s) => Buffer.from(s, 'utf8').toString('base64')\n : _TE\n ? (s) => _fromUint8Array(_TE.encode(s))\n : (s) => _btoa(utob(s));\n/**\n * converts a UTF-8-encoded string to a Base64 string.\n * @param {boolean} [urlsafe] if `true` make the result URL-safe\n * @returns {string} Base64 string\n */\nconst encode = (src, urlsafe = false) => urlsafe\n ? _mkUriSafe(_encode(src))\n : _encode(src);\n/**\n * converts a UTF-8-encoded string to URL-safe Base64 RFC4648 §5.\n * @returns {string} Base64 string\n */\nconst encodeURI = (src) => encode(src, true);\n// This trick is found broken https://github.com/dankogai/js-base64/issues/130\n// const btou = (src: string) => decodeURIComponent(escape(src));\n// reverting good old fationed regexp\nconst re_btou = /[\\xC0-\\xDF][\\x80-\\xBF]|[\\xE0-\\xEF][\\x80-\\xBF]{2}|[\\xF0-\\xF7][\\x80-\\xBF]{3}/g;\nconst cb_btou = (cccc) => {\n switch (cccc.length) {\n case 4:\n var cp = ((0x07 & cccc.charCodeAt(0)) << 18)\n | ((0x3f & cccc.charCodeAt(1)) << 12)\n | ((0x3f & cccc.charCodeAt(2)) << 6)\n | (0x3f & cccc.charCodeAt(3)), offset = cp - 0x10000;\n return (_fromCC((offset >>> 10) + 0xD800)\n + _fromCC((offset & 0x3FF) + 0xDC00));\n case 3:\n return _fromCC(((0x0f & cccc.charCodeAt(0)) << 12)\n | ((0x3f & cccc.charCodeAt(1)) << 6)\n | (0x3f & cccc.charCodeAt(2)));\n default:\n return _fromCC(((0x1f & cccc.charCodeAt(0)) << 6)\n | (0x3f & cccc.charCodeAt(1)));\n }\n};\n/**\n * @deprecated should have been internal use only.\n * @param {string} src UTF-16 string\n * @returns {string} UTF-8 string\n */\nconst btou = (b) => b.replace(re_btou, cb_btou);\n/**\n * polyfill version of `atob`\n */\nconst atobPolyfill = (asc) => {\n // console.log('polyfilled');\n asc = asc.replace(/\\s+/g, '');\n if (!b64re.test(asc))\n throw new TypeError('malformed base64.');\n asc += '=='.slice(2 - (asc.length & 3));\n let u24, bin = '', r1, r2;\n for (let i = 0; i < asc.length;) {\n u24 = b64tab[asc.charAt(i++)] << 18\n | b64tab[asc.charAt(i++)] << 12\n | (r1 = b64tab[asc.charAt(i++)]) << 6\n | (r2 = b64tab[asc.charAt(i++)]);\n bin += r1 === 64 ? _fromCC(u24 >> 16 & 255)\n : r2 === 64 ? _fromCC(u24 >> 16 & 255, u24 >> 8 & 255)\n : _fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255);\n }\n return bin;\n};\n/**\n * does what `window.atob` of web browsers do.\n * @param {String} asc Base64-encoded string\n * @returns {string} binary string\n */\nconst _atob = typeof atob === 'function' ? (asc) => atob(_tidyB64(asc))\n : _hasBuffer ? (asc) => Buffer.from(asc, 'base64').toString('binary')\n : atobPolyfill;\n//\nconst _toUint8Array = _hasBuffer\n ? (a) => _U8Afrom(Buffer.from(a, 'base64'))\n : (a) => _U8Afrom(_atob(a).split('').map(c => c.charCodeAt(0)));\n/**\n * converts a Base64 string to a Uint8Array.\n */\nconst toUint8Array = (a) => _toUint8Array(_unURI(a));\n//\nconst _decode = _hasBuffer\n ? (a) => Buffer.from(a, 'base64').toString('utf8')\n : _TD\n ? (a) => _TD.decode(_toUint8Array(a))\n : (a) => btou(_atob(a));\nconst _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == '-' ? '+' : '/'));\n/**\n * converts a Base64 string to a UTF-8 string.\n * @param {String} src Base64 string. Both normal and URL-safe are supported\n * @returns {string} UTF-8 string\n */\nconst decode = (src) => _decode(_unURI(src));\n/**\n * check if a value is a valid Base64 string\n * @param {String} src a value to check\n */\nconst isValid = (src) => {\n if (typeof src !== 'string')\n return false;\n const s = src.replace(/\\s+/g, '').replace(/={0,2}$/, '');\n return !/[^\\s0-9a-zA-Z\\+/]/.test(s) || !/[^\\s0-9a-zA-Z\\-_]/.test(s);\n};\n//\nconst _noEnum = (v) => {\n return {\n value: v, enumerable: false, writable: true, configurable: true\n };\n};\n/**\n * extend String.prototype with relevant methods\n */\nconst extendString = function () {\n const _add = (name, body) => Object.defineProperty(String.prototype, name, _noEnum(body));\n _add('fromBase64', function () { return decode(this); });\n _add('toBase64', function (urlsafe) { return encode(this, urlsafe); });\n _add('toBase64URI', function () { return encode(this, true); });\n _add('toBase64URL', function () { return encode(this, true); });\n _add('toUint8Array', function () { return toUint8Array(this); });\n};\n/**\n * extend Uint8Array.prototype with relevant methods\n */\nconst extendUint8Array = function () {\n const _add = (name, body) => Object.defineProperty(Uint8Array.prototype, name, _noEnum(body));\n _add('toBase64', function (urlsafe) { return fromUint8Array(this, urlsafe); });\n _add('toBase64URI', function () { return fromUint8Array(this, true); });\n _add('toBase64URL', function () { return fromUint8Array(this, true); });\n};\n/**\n * extend Builtin prototypes with relevant methods\n */\nconst extendBuiltins = () => {\n extendString();\n extendUint8Array();\n};\nconst gBase64 = {\n version: version,\n VERSION: VERSION,\n atob: _atob,\n atobPolyfill: atobPolyfill,\n btoa: _btoa,\n btoaPolyfill: btoaPolyfill,\n fromBase64: decode,\n toBase64: encode,\n encode: encode,\n encodeURI: encodeURI,\n encodeURL: encodeURI,\n utob: utob,\n btou: btou,\n decode: decode,\n isValid: isValid,\n fromUint8Array: fromUint8Array,\n toUint8Array: toUint8Array,\n extendString: extendString,\n extendUint8Array: extendUint8Array,\n extendBuiltins: extendBuiltins\n};\n// makecjs:CUT //\nexport { version };\nexport { VERSION };\nexport { _atob as atob };\nexport { atobPolyfill };\nexport { _btoa as btoa };\nexport { btoaPolyfill };\nexport { decode as fromBase64 };\nexport { encode as toBase64 };\nexport { utob };\nexport { encode };\nexport { encodeURI };\nexport { encodeURI as encodeURL };\nexport { btou };\nexport { decode };\nexport { isValid };\nexport { fromUint8Array };\nexport { toUint8Array };\nexport { extendString };\nexport { extendUint8Array };\nexport { extendBuiltins };\n// and finally,\nexport { gBase64 as Base64 };\n","import axios from 'axios'\r\nimport { Base64 } from 'js-base64'\r\nimport { cloneDeep } from '../../utils'\r\nimport ResponseParserChain, { type ResponseParser } from '../ResponseParserChain'\r\nimport ErrorHandlerChain, { type ErrorHandler } from '../ErrorHandlerChain'\r\nimport RequestFilterChain, { type RequestFilter } from '../RequestFilterChain'\r\nimport DateSerializer from './DateSerializer'\r\nimport DivisionResponseParser from './DivisionResponseParser'\r\nimport DivisionErrorHandler from './DivisionErrorHandler'\r\nimport { ElLoading } from 'element-plus'\r\n\r\nimport ResponseError from '../error/ResponseError'\r\n\r\nexport type RequestParams = Record<string, unknown>\r\n\r\nexport interface RequestOptionsI {\r\n loading?: boolean\r\n mask?: boolean\r\n timeout?: number\r\n}\r\n\r\n//////////////////////////////////// Chain\r\nlet gRequestHeaders: () => Record<string, string | null> = () => ({})\r\nlet gResponseParsers: ResponseParser[] = [new DivisionResponseParser()]\r\nlet gErrorHandlers: ErrorHandler[] = [new DivisionErrorHandler()]\r\nlet gRequestFilters: RequestFilter[] = [\r\n {\r\n doFilter: (request, chain) => {\r\n const headers = gRequestHeaders()\r\n Object.keys(headers).forEach(function (key) {\r\n request.headers![key] = headers[key]\r\n })\r\n chain.doFilter(request, chain)\r\n },\r\n },\r\n {\r\n doFilter: (request) => {\r\n new DateSerializer('YYYYMMDDHHmmss').serialize(request.data)\r\n },\r\n },\r\n]\r\n\r\n//////////////////////////////////// GLOBAL VARS\r\n\r\nlet BASE_URL = '/'\r\nlet REQUEST_TIMEOUT = 1000 * 30\r\nconst LOADING_DELAY = 1500\r\n\r\n//////////////////////////////////// AXIOS\r\n\r\nconst g_AxiosInstance = axios.create()\r\ng_AxiosInstance.interceptors.request.use(function (config) {\r\n const chain = new RequestFilterChain(gRequestFilters)\r\n chain.doFilter(config, chain)\r\n return config\r\n})\r\ng_AxiosInstance.interceptors.response.use(function (response) {\r\n try {\r\n const chain = new ResponseParserChain(gResponseParsers)\r\n return chain.doParse(response, chain)\r\n } catch (e) {\r\n throw new ResponseError((e as Error).message, { cause: e }, response)\r\n }\r\n})\r\n\r\nexport function request<T>(\r\n url: string,\r\n data: RequestParams | FormData = {},\r\n options: RequestOptionsI = { loading: true, mask: false, timeout: REQUEST_TIMEOUT }\r\n): Promise<T> {\r\n let newData = data\r\n if (!(data instanceof FormData)) {\r\n newData = cloneDeep(data)\r\n }\r\n\r\n // loading\r\n let loading: any\r\n\r\n if (options.loading === true) {\r\n loading = ElLoading.service({ fullscreen: true, background: 'transparent' })\r\n }\r\n\r\n return g_AxiosInstance\r\n .request({\r\n baseURL: BASE_URL,\r\n method: 'POST',\r\n timeout: REQUEST_TIMEOUT,\r\n withCredentials: true,\r\n url,\r\n data: newData,\r\n responseType: 'json',\r\n ...options,\r\n })\r\n .then((data) => {\r\n if (loading) {\r\n loading.close()\r\n }\r\n\r\n return data\r\n })\r\n .catch(function (error) {\r\n if (loading) {\r\n loading.close()\r\n }\r\n\r\n const chain = new ErrorHandlerChain(gErrorHandlers)\r\n return chain.handle(error, chain)\r\n }) as Promise<T>\r\n}\r\n\r\nexport function download(url: string, data: RequestParams = {}, options: RequestOptionsI = { loading: true, mask: false, timeout: REQUEST_TIMEOUT }) {\r\n let loading: any\r\n\r\n if (options.loading === true) {\r\n loading = ElLoading.service({ fullscreen: true, background: 'transparent' })\r\n }\r\n\r\n return g_AxiosInstance\r\n .request({\r\n baseURL: BASE_URL,\r\n method: 'POST',\r\n timeout: REQUEST_TIMEOUT,\r\n withCredentials: true,\r\n url,\r\n data,\r\n responseType: 'blob',\r\n ...options,\r\n })\r\n .then((data) => {\r\n if (loading) {\r\n loading.close()\r\n }\r\n\r\n return data\r\n })\r\n .then((response) => {\r\n const contentDisposition = response.headers['content-disposition']\r\n const blob = response.data\r\n\r\n const base64FileName = contentDisposition.match(/attachment; filename=\\\"(.*?)\\\"/)[1]\r\n const decodedFileName = Base64.decode(base64FileName)\r\n // for IE\r\n //@ts-ignore\r\n if (window.navigator && window.navigator.msSaveOrOpenBlob) {\r\n //@ts-ignore\r\n window.navigator.msSaveOrOpenBlob(blob, decodedFileName)\r\n } else {\r\n const a = document.createElement('a')\r\n const url = URL.createObjectURL(blob)\r\n a.href = url\r\n a.download = decodedFileName\r\n document.body.appendChild(a)\r\n a.click()\r\n document.body.removeChild(a)\r\n URL.revokeObjectURL(url)\r\n }\r\n })\r\n .catch(function (error) {\r\n if (loading) {\r\n loading.close()\r\n }\r\n\r\n const chain = new ErrorHandlerChain(gErrorHandlers)\r\n return chain.handle(error, chain)\r\n })\r\n}\r\n\r\nexport function upload(url: string, params: RequestParams, options: RequestOptionsI) {\r\n const formdata = new FormData()\r\n if (params) {\r\n const keys = Object.keys(params)\r\n const normalParams: Record<string, unknown> = {}\r\n\r\n for (let i = 0; i < keys.length; i++) {\r\n const key = keys[i]\r\n const itemValue = params[key]\r\n if (itemValue instanceof File) {\r\n formdata.append(key, itemValue)\r\n } else if (itemValue instanceof Array) {\r\n let isFile = false\r\n for (let j = 0; j < itemValue.length; j++) {\r\n if (itemValue[j] instanceof File) {\r\n isFile = true\r\n break\r\n }\r\n }\r\n if (isFile) {\r\n for (let j = 0; j < itemValue.length; j++) {\r\n formdata.append(key, itemValue[j])\r\n }\r\n } else {\r\n // formdata.append(key, JSON.stringify(itemValue));\r\n normalParams[key] = itemValue\r\n }\r\n } else {\r\n // formdata.append(key, itemValue);\r\n normalParams[key] = itemValue\r\n }\r\n }\r\n formdata.append('ibayJson', JSON.stringify(normalParams))\r\n }\r\n\r\n return request(url, formdata, options)\r\n}\r\n\r\n// config\r\nexport const config = {\r\n setBaseUrl: (pBaseUrl: string) => {\r\n if (!pBaseUrl) {\r\n throw new Error(`pBaseUrl is null!`)\r\n }\r\n BASE_URL = pBaseUrl\r\n },\r\n setRequestTimeout: (pTimeout: number) => {\r\n REQUEST_TIMEOUT = pTimeout\r\n },\r\n setRequestHeaders: (pRequestHeaders: () => Record<string, string | null>) => {\r\n if (!pRequestHeaders) {\r\n throw new Error(`pRequestHeaders is null!`)\r\n }\r\n\r\n if (!(pRequestHeaders instanceof Function)) {\r\n throw new Error(`pRequestHeaders is not a function!`)\r\n }\r\n\r\n gRequestHeaders = pRequestHeaders\r\n },\r\n setRequestFilters: (...filters: RequestFilter[]) => {\r\n if (filters == null) {\r\n throw new Error(`filters is null!`)\r\n }\r\n gRequestFilters = filters\r\n },\r\n setResponseParsers: (...parsers: ResponseParser[]) => {\r\n if (parsers == null) {\r\n throw new Error(`parsers is null!`)\r\n }\r\n gResponseParsers = parsers\r\n },\r\n setErrorHandlers: (...handlers: ErrorHandler[]) => {\r\n if (handlers == null) {\r\n throw new Error(`handlers should not null!`)\r\n }\r\n gErrorHandlers = handlers\r\n },\r\n}\r\n"],"names":["request","config","data","Base64","url"],"mappings":";;;;;;;;;;;;;AAWA,MAAM,UAAU;AAIhB,MAAM,UAAU;AAChB,MAAM,aAAa,OAAO,WAAW;AACrC,MAAM,MAAM,OAAO,gBAAgB,aAAa,IAAI,YAAW,IAAK;AACpE,MAAM,MAAM,OAAO,gBAAgB,aAAa,IAAI,YAAW,IAAK;AACpE,MAAM,QAAQ;AACd,MAAM,SAAS,MAAM,UAAU,MAAM,KAAK,KAAK;AAC/C,MAAM,UAAU,CAAC,MAAM;AACnB,MAAI,MAAM,CAAA;AACV,IAAE,QAAQ,CAAC,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC;AAC9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AA,EACb;AAAA,EACA,mBAAmB,CAAC,aAAqB;AACrB,sBAAA;AAAA,EACpB;AAAA,EACA,mBAAmB,CAAC,oBAAyD;AAC3E,QAAI,CAAC,iBAAiB;AACd,YAAA,IAAI,MAAM,0BAA0B;AAAA,IAC5C;AAEI,QAAA,EAAE,2BAA2B,WAAW;AACpC,YAAA,IAAI,MAAM,oCAAoC;AAAA,IACtD;AAEkB,sBAAA;AAAA,EACpB;AAAA,EACA,mBAAmB,IAAI,YAA6B;AAClD,QAAI,WAAW,MAAM;AACb,YAAA,IAAI,MAAM,kBAAkB;AAAA,IACpC;AACkB,sBAAA;AAAA,EACpB;AAAA,EACA,oBAAoB,IAAI,YAA8B;AACpD,QAAI,WAAW,MAAM;AACb,YAAA,IAAI,MAAM,kBAAkB;AAAA,IACpC;AACmB,uBAAA;AAAA,EACrB;AAAA,EACA,kBAAkB,IAAI,aAA6B;AACjD,QAAI,YAAY,MAAM;AACd,YAAA,IAAI,MAAM,2BAA2B;AAAA,IAC7C;AACiB,qBAAA;AAAA,EACnB;AACF;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.js","sources":["../../../node_modules/js-base64/base64.mjs","../../../src/request/disivion/index.ts"],"sourcesContent":["/**\n * base64.ts\n *\n * Licensed under the BSD 3-Clause License.\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * References:\n * http://en.wikipedia.org/wiki/Base64\n *\n * @author Dan Kogai (https://github.com/dankogai)\n */\nconst version = '3.7.7';\n/**\n * @deprecated use lowercase `version`.\n */\nconst VERSION = version;\nconst _hasBuffer = typeof Buffer === 'function';\nconst _TD = typeof TextDecoder === 'function' ? new TextDecoder() : undefined;\nconst _TE = typeof TextEncoder === 'function' ? new TextEncoder() : undefined;\nconst b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\nconst b64chs = Array.prototype.slice.call(b64ch);\nconst b64tab = ((a) => {\n let tab = {};\n a.forEach((c, i) => tab[c] = i);\n return tab;\n})(b64chs);\nconst b64re = /^(?:[A-Za-z\\d+\\/]{4})*?(?:[A-Za-z\\d+\\/]{2}(?:==)?|[A-Za-z\\d+\\/]{3}=?)?$/;\nconst _fromCC = String.fromCharCode.bind(String);\nconst _U8Afrom = typeof Uint8Array.from === 'function'\n ? Uint8Array.from.bind(Uint8Array)\n : (it) => new Uint8Array(Array.prototype.slice.call(it, 0));\nconst _mkUriSafe = (src) => src\n .replace(/=/g, '').replace(/[+\\/]/g, (m0) => m0 == '+' ? '-' : '_');\nconst _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\\+\\/]/g, '');\n/**\n * polyfill version of `btoa`\n */\nconst btoaPolyfill = (bin) => {\n // console.log('polyfilled');\n let u32, c0, c1, c2, asc = '';\n const pad = bin.length % 3;\n for (let i = 0; i < bin.length;) {\n if ((c0 = bin.charCodeAt(i++)) > 255 ||\n (c1 = bin.charCodeAt(i++)) > 255 ||\n (c2 = bin.charCodeAt(i++)) > 255)\n throw new TypeError('invalid character found');\n u32 = (c0 << 16) | (c1 << 8) | c2;\n asc += b64chs[u32 >> 18 & 63]\n + b64chs[u32 >> 12 & 63]\n + b64chs[u32 >> 6 & 63]\n + b64chs[u32 & 63];\n }\n return pad ? asc.slice(0, pad - 3) + \"===\".substring(pad) : asc;\n};\n/**\n * does what `window.btoa` of web browsers do.\n * @param {String} bin binary string\n * @returns {string} Base64-encoded string\n */\nconst _btoa = typeof btoa === 'function' ? (bin) => btoa(bin)\n : _hasBuffer ? (bin) => Buffer.from(bin, 'binary').toString('base64')\n : btoaPolyfill;\nconst _fromUint8Array = _hasBuffer\n ? (u8a) => Buffer.from(u8a).toString('base64')\n : (u8a) => {\n // cf. https://stackoverflow.com/questions/12710001/how-to-convert-uint8-array-to-base64-encoded-string/12713326#12713326\n const maxargs = 0x1000;\n let strs = [];\n for (let i = 0, l = u8a.length; i < l; i += maxargs) {\n strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs)));\n }\n return _btoa(strs.join(''));\n };\n/**\n * converts a Uint8Array to a Base64 string.\n * @param {boolean} [urlsafe] URL-and-filename-safe a la RFC4648 §5\n * @returns {string} Base64 string\n */\nconst fromUint8Array = (u8a, urlsafe = false) => urlsafe ? _mkUriSafe(_fromUint8Array(u8a)) : _fromUint8Array(u8a);\n// This trick is found broken https://github.com/dankogai/js-base64/issues/130\n// const utob = (src: string) => unescape(encodeURIComponent(src));\n// reverting good old fationed regexp\nconst cb_utob = (c) => {\n if (c.length < 2) {\n var cc = c.charCodeAt(0);\n return cc < 0x80 ? c\n : cc < 0x800 ? (_fromCC(0xc0 | (cc >>> 6))\n + _fromCC(0x80 | (cc & 0x3f)))\n : (_fromCC(0xe0 | ((cc >>> 12) & 0x0f))\n + _fromCC(0x80 | ((cc >>> 6) & 0x3f))\n + _fromCC(0x80 | (cc & 0x3f)));\n }\n else {\n var cc = 0x10000\n + (c.charCodeAt(0) - 0xD800) * 0x400\n + (c.charCodeAt(1) - 0xDC00);\n return (_fromCC(0xf0 | ((cc >>> 18) & 0x07))\n + _fromCC(0x80 | ((cc >>> 12) & 0x3f))\n + _fromCC(0x80 | ((cc >>> 6) & 0x3f))\n + _fromCC(0x80 | (cc & 0x3f)));\n }\n};\nconst re_utob = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFFF]|[^\\x00-\\x7F]/g;\n/**\n * @deprecated should have been internal use only.\n * @param {string} src UTF-8 string\n * @returns {string} UTF-16 string\n */\nconst utob = (u) => u.replace(re_utob, cb_utob);\n//\nconst _encode = _hasBuffer\n ? (s) => Buffer.from(s, 'utf8').toString('base64')\n : _TE\n ? (s) => _fromUint8Array(_TE.encode(s))\n : (s) => _btoa(utob(s));\n/**\n * converts a UTF-8-encoded string to a Base64 string.\n * @param {boolean} [urlsafe] if `true` make the result URL-safe\n * @returns {string} Base64 string\n */\nconst encode = (src, urlsafe = false) => urlsafe\n ? _mkUriSafe(_encode(src))\n : _encode(src);\n/**\n * converts a UTF-8-encoded string to URL-safe Base64 RFC4648 §5.\n * @returns {string} Base64 string\n */\nconst encodeURI = (src) => encode(src, true);\n// This trick is found broken https://github.com/dankogai/js-base64/issues/130\n// const btou = (src: string) => decodeURIComponent(escape(src));\n// reverting good old fationed regexp\nconst re_btou = /[\\xC0-\\xDF][\\x80-\\xBF]|[\\xE0-\\xEF][\\x80-\\xBF]{2}|[\\xF0-\\xF7][\\x80-\\xBF]{3}/g;\nconst cb_btou = (cccc) => {\n switch (cccc.length) {\n case 4:\n var cp = ((0x07 & cccc.charCodeAt(0)) << 18)\n | ((0x3f & cccc.charCodeAt(1)) << 12)\n | ((0x3f & cccc.charCodeAt(2)) << 6)\n | (0x3f & cccc.charCodeAt(3)), offset = cp - 0x10000;\n return (_fromCC((offset >>> 10) + 0xD800)\n + _fromCC((offset & 0x3FF) + 0xDC00));\n case 3:\n return _fromCC(((0x0f & cccc.charCodeAt(0)) << 12)\n | ((0x3f & cccc.charCodeAt(1)) << 6)\n | (0x3f & cccc.charCodeAt(2)));\n default:\n return _fromCC(((0x1f & cccc.charCodeAt(0)) << 6)\n | (0x3f & cccc.charCodeAt(1)));\n }\n};\n/**\n * @deprecated should have been internal use only.\n * @param {string} src UTF-16 string\n * @returns {string} UTF-8 string\n */\nconst btou = (b) => b.replace(re_btou, cb_btou);\n/**\n * polyfill version of `atob`\n */\nconst atobPolyfill = (asc) => {\n // console.log('polyfilled');\n asc = asc.replace(/\\s+/g, '');\n if (!b64re.test(asc))\n throw new TypeError('malformed base64.');\n asc += '=='.slice(2 - (asc.length & 3));\n let u24, bin = '', r1, r2;\n for (let i = 0; i < asc.length;) {\n u24 = b64tab[asc.charAt(i++)] << 18\n | b64tab[asc.charAt(i++)] << 12\n | (r1 = b64tab[asc.charAt(i++)]) << 6\n | (r2 = b64tab[asc.charAt(i++)]);\n bin += r1 === 64 ? _fromCC(u24 >> 16 & 255)\n : r2 === 64 ? _fromCC(u24 >> 16 & 255, u24 >> 8 & 255)\n : _fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255);\n }\n return bin;\n};\n/**\n * does what `window.atob` of web browsers do.\n * @param {String} asc Base64-encoded string\n * @returns {string} binary string\n */\nconst _atob = typeof atob === 'function' ? (asc) => atob(_tidyB64(asc))\n : _hasBuffer ? (asc) => Buffer.from(asc, 'base64').toString('binary')\n : atobPolyfill;\n//\nconst _toUint8Array = _hasBuffer\n ? (a) => _U8Afrom(Buffer.from(a, 'base64'))\n : (a) => _U8Afrom(_atob(a).split('').map(c => c.charCodeAt(0)));\n/**\n * converts a Base64 string to a Uint8Array.\n */\nconst toUint8Array = (a) => _toUint8Array(_unURI(a));\n//\nconst _decode = _hasBuffer\n ? (a) => Buffer.from(a, 'base64').toString('utf8')\n : _TD\n ? (a) => _TD.decode(_toUint8Array(a))\n : (a) => btou(_atob(a));\nconst _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == '-' ? '+' : '/'));\n/**\n * converts a Base64 string to a UTF-8 string.\n * @param {String} src Base64 string. Both normal and URL-safe are supported\n * @returns {string} UTF-8 string\n */\nconst decode = (src) => _decode(_unURI(src));\n/**\n * check if a value is a valid Base64 string\n * @param {String} src a value to check\n */\nconst isValid = (src) => {\n if (typeof src !== 'string')\n return false;\n const s = src.replace(/\\s+/g, '').replace(/={0,2}$/, '');\n return !/[^\\s0-9a-zA-Z\\+/]/.test(s) || !/[^\\s0-9a-zA-Z\\-_]/.test(s);\n};\n//\nconst _noEnum = (v) => {\n return {\n value: v, enumerable: false, writable: true, configurable: true\n };\n};\n/**\n * extend String.prototype with relevant methods\n */\nconst extendString = function () {\n const _add = (name, body) => Object.defineProperty(String.prototype, name, _noEnum(body));\n _add('fromBase64', function () { return decode(this); });\n _add('toBase64', function (urlsafe) { return encode(this, urlsafe); });\n _add('toBase64URI', function () { return encode(this, true); });\n _add('toBase64URL', function () { return encode(this, true); });\n _add('toUint8Array', function () { return toUint8Array(this); });\n};\n/**\n * extend Uint8Array.prototype with relevant methods\n */\nconst extendUint8Array = function () {\n const _add = (name, body) => Object.defineProperty(Uint8Array.prototype, name, _noEnum(body));\n _add('toBase64', function (urlsafe) { return fromUint8Array(this, urlsafe); });\n _add('toBase64URI', function () { return fromUint8Array(this, true); });\n _add('toBase64URL', function () { return fromUint8Array(this, true); });\n};\n/**\n * extend Builtin prototypes with relevant methods\n */\nconst extendBuiltins = () => {\n extendString();\n extendUint8Array();\n};\nconst gBase64 = {\n version: version,\n VERSION: VERSION,\n atob: _atob,\n atobPolyfill: atobPolyfill,\n btoa: _btoa,\n btoaPolyfill: btoaPolyfill,\n fromBase64: decode,\n toBase64: encode,\n encode: encode,\n encodeURI: encodeURI,\n encodeURL: encodeURI,\n utob: utob,\n btou: btou,\n decode: decode,\n isValid: isValid,\n fromUint8Array: fromUint8Array,\n toUint8Array: toUint8Array,\n extendString: extendString,\n extendUint8Array: extendUint8Array,\n extendBuiltins: extendBuiltins\n};\n// makecjs:CUT //\nexport { version };\nexport { VERSION };\nexport { _atob as atob };\nexport { atobPolyfill };\nexport { _btoa as btoa };\nexport { btoaPolyfill };\nexport { decode as fromBase64 };\nexport { encode as toBase64 };\nexport { utob };\nexport { encode };\nexport { encodeURI };\nexport { encodeURI as encodeURL };\nexport { btou };\nexport { decode };\nexport { isValid };\nexport { fromUint8Array };\nexport { toUint8Array };\nexport { extendString };\nexport { extendUint8Array };\nexport { extendBuiltins };\n// and finally,\nexport { gBase64 as Base64 };\n","import axios from 'axios'\r\nimport { Base64 } from 'js-base64'\r\nimport { cloneDeep } from '../../utils'\r\nimport ResponseParserChain, { type ResponseParser } from '../ResponseParserChain'\r\nimport ErrorHandlerChain, { type ErrorHandler } from '../ErrorHandlerChain'\r\nimport RequestFilterChain, { type RequestFilter } from '../RequestFilterChain'\r\nimport DateSerializer from './DateSerializer'\r\nimport DivisionResponseParser from './DivisionResponseParser'\r\nimport DivisionErrorHandler from './DivisionErrorHandler'\r\nimport { ElLoading } from 'element-plus'\r\n\r\nimport ResponseError from '../error/ResponseError'\r\n\r\nexport type RequestParams = Record<string, unknown>\r\n\r\nexport interface RequestOptionsI {\r\n loading?: boolean\r\n mask?: boolean\r\n timeout?: number\r\n}\r\n\r\n//////////////////////////////////// Chain\r\nlet gRequestHeaders: () => Record<string, string | null> = () => ({})\r\nlet gResponseParsers: ResponseParser[] = [new DivisionResponseParser()]\r\nlet gErrorHandlers: ErrorHandler[] = [new DivisionErrorHandler()]\r\nlet gRequestFilters: RequestFilter[] = [\r\n {\r\n doFilter: (request, chain) => {\r\n const headers = gRequestHeaders()\r\n Object.keys(headers).forEach(function (key) {\r\n request.headers![key] = headers[key]\r\n })\r\n chain.doFilter(request, chain)\r\n },\r\n },\r\n {\r\n doFilter: (request) => {\r\n new DateSerializer('YYYYMMDDHHmmss').serialize(request.data)\r\n },\r\n },\r\n]\r\n\r\n//////////////////////////////////// GLOBAL VARS\r\n\r\nlet BASE_URL = '/'\r\nlet REQUEST_TIMEOUT = 1000 * 30\r\nconst LOADING_DELAY = 1500\r\n\r\n//////////////////////////////////// AXIOS\r\n\r\nconst g_AxiosInstance = axios.create()\r\ng_AxiosInstance.interceptors.request.use(function (config) {\r\n const chain = new RequestFilterChain(gRequestFilters)\r\n chain.doFilter(config, chain)\r\n return config\r\n})\r\ng_AxiosInstance.interceptors.response.use(function (response) {\r\n try {\r\n const chain = new ResponseParserChain(gResponseParsers)\r\n return chain.doParse(response, chain)\r\n } catch (e) {\r\n throw new ResponseError((e as Error).message, { cause: e }, response)\r\n }\r\n})\r\n\r\nexport function request<T>(\r\n url: string,\r\n data: RequestParams | FormData = {},\r\n options: RequestOptionsI = { loading: true, mask: false, timeout: REQUEST_TIMEOUT }\r\n): Promise<T> {\r\n let newData = data\r\n if (!(data instanceof FormData)) {\r\n newData = cloneDeep(data)\r\n }\r\n\r\n // loading\r\n let loading: any\r\n\r\n if (options.loading === true) {\r\n loading = ElLoading.service({ fullscreen: true, background: 'transparent' })\r\n }\r\n\r\n return g_AxiosInstance\r\n .request({\r\n baseURL: BASE_URL,\r\n method: 'POST',\r\n timeout: REQUEST_TIMEOUT,\r\n withCredentials: true,\r\n url,\r\n data: newData,\r\n responseType: 'json',\r\n ...options,\r\n })\r\n .then((data) => {\r\n if (loading) {\r\n loading.close()\r\n }\r\n\r\n return data\r\n })\r\n .catch(function (error) {\r\n if (loading) {\r\n loading.close()\r\n }\r\n\r\n const chain = new ErrorHandlerChain(gErrorHandlers)\r\n return chain.handle(error, chain)\r\n }) as Promise<T>\r\n}\r\n\r\nexport function download(url: string, data: RequestParams = {}, options: RequestOptionsI = { loading: true, mask: false, timeout: REQUEST_TIMEOUT }) {\r\n let loading: any\r\n\r\n if (options.loading === true) {\r\n loading = ElLoading.service({ fullscreen: true, background: 'transparent' })\r\n }\r\n\r\n return g_AxiosInstance\r\n .request({\r\n baseURL: BASE_URL,\r\n method: 'POST',\r\n timeout: REQUEST_TIMEOUT,\r\n withCredentials: true,\r\n url,\r\n data,\r\n responseType: 'blob',\r\n ...options,\r\n })\r\n .then((data) => {\r\n if (loading) {\r\n loading.close()\r\n }\r\n\r\n return data\r\n })\r\n .then((response) => {\r\n const contentDisposition = response.headers['content-disposition']\r\n const blob = response.data\r\n\r\n const base64FileName = contentDisposition.match(/attachment; filename=\\\"(.*?)\\\"/)[1]\r\n const decodedFileName = Base64.decode(base64FileName)\r\n // for IE\r\n //@ts-ignore\r\n if (window.navigator && window.navigator.msSaveOrOpenBlob) {\r\n //@ts-ignore\r\n window.navigator.msSaveOrOpenBlob(blob, decodedFileName)\r\n } else {\r\n const a = document.createElement('a')\r\n const url = URL.createObjectURL(blob)\r\n a.href = url\r\n a.download = decodedFileName\r\n document.body.appendChild(a)\r\n a.click()\r\n document.body.removeChild(a)\r\n URL.revokeObjectURL(url)\r\n }\r\n })\r\n .catch(function (error) {\r\n if (loading) {\r\n loading.close()\r\n }\r\n\r\n const chain = new ErrorHandlerChain(gErrorHandlers)\r\n return chain.handle(error, chain)\r\n })\r\n}\r\n\r\nexport function upload(url: string, params: RequestParams, options: RequestOptionsI) {\r\n const formdata = new FormData()\r\n if (params) {\r\n const keys = Object.keys(params)\r\n const normalParams: Record<string, unknown> = {}\r\n\r\n for (let i = 0; i < keys.length; i++) {\r\n const key = keys[i]\r\n const itemValue = params[key]\r\n if (itemValue instanceof File) {\r\n formdata.append(key, itemValue)\r\n } else if (itemValue instanceof Array) {\r\n let isFile = false\r\n for (let j = 0; j < itemValue.length; j++) {\r\n if (itemValue[j] instanceof File) {\r\n isFile = true\r\n break\r\n }\r\n }\r\n if (isFile) {\r\n for (let j = 0; j < itemValue.length; j++) {\r\n formdata.append(key, itemValue[j])\r\n }\r\n } else {\r\n // formdata.append(key, JSON.stringify(itemValue));\r\n normalParams[key] = itemValue\r\n }\r\n } else {\r\n // formdata.append(key, itemValue);\r\n normalParams[key] = itemValue\r\n }\r\n }\r\n formdata.append('ibayJson', JSON.stringify(normalParams))\r\n }\r\n\r\n return request(url, formdata, options)\r\n}\r\n\r\n// config\r\nexport const config = {\r\n setBaseUrl: (pBaseUrl: string) => {\r\n if (!pBaseUrl) {\r\n throw new Error(`pBaseUrl is null!`)\r\n }\r\n BASE_URL = pBaseUrl\r\n },\r\n setRequestTimeout: (pTimeout: number) => {\r\n REQUEST_TIMEOUT = pTimeout\r\n },\r\n setRequestHeaders: (pRequestHeaders: () => Record<string, string | null>) => {\r\n if (!pRequestHeaders) {\r\n throw new Error(`pRequestHeaders is null!`)\r\n }\r\n\r\n if (!(pRequestHeaders instanceof Function)) {\r\n throw new Error(`pRequestHeaders is not a function!`)\r\n }\r\n\r\n gRequestHeaders = pRequestHeaders\r\n },\r\n setRequestFilters: (...filters: RequestFilter[]) => {\r\n if (filters == null) {\r\n throw new Error(`filters is null!`)\r\n }\r\n gRequestFilters = filters\r\n },\r\n setResponseParsers: (...parsers: ResponseParser[]) => {\r\n if (parsers == null) {\r\n throw new Error(`parsers is null!`)\r\n }\r\n gResponseParsers = parsers\r\n },\r\n setErrorHandlers: (...handlers: ErrorHandler[]) => {\r\n if (handlers == null) {\r\n throw new Error(`handlers should not null!`)\r\n }\r\n gErrorHandlers = handlers\r\n },\r\n}\r\n"],"names":["version","VERSION","_hasBuffer","_TD","_TE","b64ch","b64chs","b64tab","a","tab","c","i","b64re","_fromCC","_U8Afrom","it","_mkUriSafe","src","m0","_tidyB64","s","btoaPolyfill","bin","u32","c0","c1","c2","asc","pad","_btoa","_fromUint8Array","u8a","strs","l","fromUint8Array","urlsafe","cb_utob","cc","re_utob","utob","u","_encode","encode","encodeURI","re_btou","cb_btou","cccc","cp","offset","btou","b","atobPolyfill","u24","r1","r2","_atob","_toUint8Array","toUint8Array","_unURI","_decode","decode","isValid","_noEnum","v","extendString","_add","name","body","extendUint8Array","extendBuiltins","gBase64","gRequestHeaders","gResponseParsers","DivisionResponseParser","gErrorHandlers","DivisionErrorHandler","gRequestFilters","request","chain","headers","key","DateSerializer","BASE_URL","REQUEST_TIMEOUT","g_AxiosInstance","axios","config","RequestFilterChain","response","ResponseParserChain","e","ResponseError","url","data","options","newData","cloneDeep","loading","ElLoading","error","ErrorHandlerChain","download","contentDisposition","blob","base64FileName","decodedFileName","Base64","upload","params","formdata","keys","normalParams","itemValue","isFile","j","pBaseUrl","pTimeout","pRequestHeaders","filters","parsers","handlers"],"mappings":";;;;;;;;;;;;;AAWA,MAAMA,IAAU,SAIVC,KAAUD,GACVE,IAAa,OAAO,UAAW,YAC/BC,IAAM,OAAO,eAAgB,aAAa,IAAI,YAAW,IAAK,QAC9DC,IAAM,OAAO,eAAgB,aAAa,IAAI,YAAW,IAAK,QAC9DC,KAAQ,qEACRC,IAAS,MAAM,UAAU,MAAM,KAAKD,EAAK,GACzCE,KAAU,CAACC,MAAM;AACnB,MAAIC,IAAM,CAAA;AACV,SAAAD,EAAE,QAAQ,CAACE,GAAGC,MAAMF,EAAIC,CAAC,IAAIC,CAAC,GACvBF;AACX,GAAGH,CAAM,GACHM,KAAQ,2EACRC,IAAU,OAAO,aAAa,KAAK,MAAM,GACzCC,IAAW,OAAO,WAAW,QAAS,aACtC,WAAW,KAA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B,YAAY,CAAC6B,MAAqB;AAChC,QAAI,CAACA;AACG,YAAA,IAAI,MAAM,mBAAmB;AAE1B,IAAAjC,IAAAiC;AAAA,EACb;AAAA,EACA,mBAAmB,CAACC,MAAqB;AACrB,IAAAjC,IAAAiC;AAAA,EACpB;AAAA,EACA,mBAAmB,CAACC,MAAyD;AAC3E,QAAI,CAACA;AACG,YAAA,IAAI,MAAM,0BAA0B;AAGxC,QAAA,EAAEA,aAA2B;AACzB,YAAA,IAAI,MAAM,oCAAoC;AAGpC,IAAA9C,IAAA8C;AAAA,EACpB;AAAA,EACA,mBAAmB,IAAIC,MAA6B;AAClD,QAAIA,KAAW;AACP,YAAA,IAAI,MAAM,kBAAkB;AAElB,IAAA1C,IAAA0C;AAAA,EACpB;AAAA,EACA,oBAAoB,IAAIC,MAA8B;AACpD,QAAIA,KAAW;AACP,YAAA,IAAI,MAAM,kBAAkB;AAEjB,IAAA/C,IAAA+C;AAAA,EACrB;AAAA,EACA,kBAAkB,IAAIC,MAA6B;AACjD,QAAIA,KAAY;AACR,YAAA,IAAI,MAAM,2BAA2B;AAE5B,IAAA9C,IAAA8C;AAAA,EACnB;AACF;","x_google_ignoreList":[0]}
@@ -1,16 +1,10 @@
1
- import ResponseError from "./ResponseError.js";
2
- class BizExceptionResponseError extends ResponseError {
3
- constructor(message, cause, response, reponseData) {
4
- super(message, cause, response);
5
- if (Error.captureStackTrace) {
6
- Error.captureStackTrace(this, BizExceptionResponseError);
7
- }
8
- this.name = "BizExceptionResponseError";
9
- this.response = response;
10
- this.reponseData = reponseData;
1
+ import a from "./ResponseError.js";
2
+ class e extends a {
3
+ constructor(t, s, r, o) {
4
+ super(t, s, r), Error.captureStackTrace && Error.captureStackTrace(this, e), this.name = "BizExceptionResponseError", this.response = r, this.reponseData = o;
11
5
  }
12
6
  }
13
7
  export {
14
- BizExceptionResponseError as default
8
+ e as default
15
9
  };
16
10
  //# sourceMappingURL=BizExceptionResponseError.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BizExceptionResponseError.js","sources":["../../../src/request/error/BizExceptionResponseError.ts"],"sourcesContent":["import type { AxiosResponse } from 'axios'\r\nimport ResponseError from './ResponseError'\r\nexport default class BizExceptionResponseError extends ResponseError {\r\n declare response: AxiosResponse\r\n declare reponseData: unknown\r\n\r\n constructor(message: string, cause: Error, response: AxiosResponse, reponseData: unknown) {\r\n super(message, cause, response)\r\n\r\n // Maintains proper stack trace for where our error was thrown (only available on V8)\r\n // @ts-ignore\r\n if (Error.captureStackTrace) {\r\n // @ts-ignore\r\n Error.captureStackTrace(this, BizExceptionResponseError)\r\n }\r\n\r\n this.name = 'BizExceptionResponseError'\r\n\r\n // CustomData\r\n this.response = response\r\n this.reponseData = reponseData\r\n }\r\n}\r\n"],"names":[],"mappings":";AAEA,MAAqB,kCAAkC,cAAc;AAAA,EAInE,YAAY,SAAiB,OAAc,UAAyB,aAAsB;AAClF,UAAA,SAAS,OAAO,QAAQ;AAI9B,QAAI,MAAM,mBAAmB;AAErB,YAAA,kBAAkB,MAAM,yBAAyB;AAAA,IACzD;AAEA,SAAK,OAAO;AAGZ,SAAK,WAAW;AAChB,SAAK,cAAc;AAAA,EACrB;AACF;"}
1
+ {"version":3,"file":"BizExceptionResponseError.js","sources":["../../../src/request/error/BizExceptionResponseError.ts"],"sourcesContent":["import type { AxiosResponse } from 'axios'\r\nimport ResponseError from './ResponseError'\r\nexport default class BizExceptionResponseError extends ResponseError {\r\n declare response: AxiosResponse\r\n declare reponseData: unknown\r\n\r\n constructor(message: string, cause: Error, response: AxiosResponse, reponseData: unknown) {\r\n super(message, cause, response)\r\n\r\n // Maintains proper stack trace for where our error was thrown (only available on V8)\r\n // @ts-ignore\r\n if (Error.captureStackTrace) {\r\n // @ts-ignore\r\n Error.captureStackTrace(this, BizExceptionResponseError)\r\n }\r\n\r\n this.name = 'BizExceptionResponseError'\r\n\r\n // CustomData\r\n this.response = response\r\n this.reponseData = reponseData\r\n }\r\n}\r\n"],"names":["BizExceptionResponseError","ResponseError","message","cause","response","reponseData"],"mappings":";AAEA,MAAqBA,UAAkCC,EAAc;AAAA,EAInE,YAAYC,GAAiBC,GAAcC,GAAyBC,GAAsB;AAClF,UAAAH,GAASC,GAAOC,CAAQ,GAI1B,MAAM,qBAEF,MAAA,kBAAkB,MAAMJ,CAAyB,GAGzD,KAAK,OAAO,6BAGZ,KAAK,WAAWI,GAChB,KAAK,cAAcC;AAAA,EACrB;AACF;"}
@@ -1,16 +1,10 @@
1
- import ResponseError from "./ResponseError.js";
2
- class ExceptionResponseError extends ResponseError {
3
- constructor(message, cause, response, reponseData) {
4
- super(message, cause, response);
5
- if (Error.captureStackTrace) {
6
- Error.captureStackTrace(this, ExceptionResponseError);
7
- }
8
- this.name = "ExceptionResponseError";
9
- this.response = response;
10
- this.reponseData = reponseData;
1
+ import a from "./ResponseError.js";
2
+ class e extends a {
3
+ constructor(t, s, r, o) {
4
+ super(t, s, r), Error.captureStackTrace && Error.captureStackTrace(this, e), this.name = "ExceptionResponseError", this.response = r, this.reponseData = o;
11
5
  }
12
6
  }
13
7
  export {
14
- ExceptionResponseError as default
8
+ e as default
15
9
  };
16
10
  //# sourceMappingURL=ExceptionResponseError.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExceptionResponseError.js","sources":["../../../src/request/error/ExceptionResponseError.ts"],"sourcesContent":["import type { AxiosResponse } from 'axios'\r\nimport ResponseError from './ResponseError'\r\nexport default class ExceptionResponseError extends ResponseError {\r\n declare response: AxiosResponse\r\n declare reponseData: unknown\r\n\r\n constructor(message: string, cause: Error, response: AxiosResponse, reponseData: unknown) {\r\n super(message, cause, response)\r\n\r\n // Maintains proper stack trace for where our error was thrown (only available on V8)\r\n // @ts-ignore\r\n if (Error.captureStackTrace) {\r\n // @ts-ignore\r\n Error.captureStackTrace(this, ExceptionResponseError)\r\n }\r\n\r\n this.name = 'ExceptionResponseError'\r\n\r\n // CustomData\r\n this.response = response\r\n this.reponseData = reponseData\r\n }\r\n}\r\n"],"names":[],"mappings":";AAEA,MAAqB,+BAA+B,cAAc;AAAA,EAIhE,YAAY,SAAiB,OAAc,UAAyB,aAAsB;AAClF,UAAA,SAAS,OAAO,QAAQ;AAI9B,QAAI,MAAM,mBAAmB;AAErB,YAAA,kBAAkB,MAAM,sBAAsB;AAAA,IACtD;AAEA,SAAK,OAAO;AAGZ,SAAK,WAAW;AAChB,SAAK,cAAc;AAAA,EACrB;AACF;"}
1
+ {"version":3,"file":"ExceptionResponseError.js","sources":["../../../src/request/error/ExceptionResponseError.ts"],"sourcesContent":["import type { AxiosResponse } from 'axios'\r\nimport ResponseError from './ResponseError'\r\nexport default class ExceptionResponseError extends ResponseError {\r\n declare response: AxiosResponse\r\n declare reponseData: unknown\r\n\r\n constructor(message: string, cause: Error, response: AxiosResponse, reponseData: unknown) {\r\n super(message, cause, response)\r\n\r\n // Maintains proper stack trace for where our error was thrown (only available on V8)\r\n // @ts-ignore\r\n if (Error.captureStackTrace) {\r\n // @ts-ignore\r\n Error.captureStackTrace(this, ExceptionResponseError)\r\n }\r\n\r\n this.name = 'ExceptionResponseError'\r\n\r\n // CustomData\r\n this.response = response\r\n this.reponseData = reponseData\r\n }\r\n}\r\n"],"names":["ExceptionResponseError","ResponseError","message","cause","response","reponseData"],"mappings":";AAEA,MAAqBA,UAA+BC,EAAc;AAAA,EAIhE,YAAYC,GAAiBC,GAAcC,GAAyBC,GAAsB;AAClF,UAAAH,GAASC,GAAOC,CAAQ,GAI1B,MAAM,qBAEF,MAAA,kBAAkB,MAAMJ,CAAsB,GAGtD,KAAK,OAAO,0BAGZ,KAAK,WAAWI,GAChB,KAAK,cAAcC;AAAA,EACrB;AACF;"}
@@ -1,14 +1,9 @@
1
- class ResponseError extends Error {
2
- constructor(message, options, reponse) {
3
- super(message, { cause: options.cause });
4
- if (Error.captureStackTrace) {
5
- Error.captureStackTrace(this, ResponseError);
6
- }
7
- this.name = "ResponseError";
8
- this.response = reponse;
1
+ class r extends Error {
2
+ constructor(e, s, a) {
3
+ super(e, { cause: s.cause }), Error.captureStackTrace && Error.captureStackTrace(this, r), this.name = "ResponseError", this.response = a;
9
4
  }
10
5
  }
11
6
  export {
12
- ResponseError as default
7
+ r as default
13
8
  };
14
9
  //# sourceMappingURL=ResponseError.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseError.js","sources":["../../../src/request/error/ResponseError.ts"],"sourcesContent":["import type { AxiosResponse } from 'axios'\r\nexport default class ResponseError extends Error {\r\n declare response: AxiosResponse\r\n\r\n constructor(message: string, options: ErrorOptions, reponse: AxiosResponse) {\r\n super(message, { cause: options.cause })\r\n\r\n // Maintains proper stack trace for where our error was thrown (only available on V8)\r\n // @ts-ignore\r\n if (Error.captureStackTrace) {\r\n // @ts-ignore\r\n Error.captureStackTrace(this, ResponseError)\r\n }\r\n\r\n this.name = 'ResponseError'\r\n\r\n // CustomData\r\n this.response = reponse\r\n }\r\n}\r\n"],"names":[],"mappings":"AACA,MAAqB,sBAAsB,MAAM;AAAA,EAG/C,YAAY,SAAiB,SAAuB,SAAwB;AAC1E,UAAM,SAAS,EAAE,OAAO,QAAQ,MAAO,CAAA;AAIvC,QAAI,MAAM,mBAAmB;AAErB,YAAA,kBAAkB,MAAM,aAAa;AAAA,IAC7C;AAEA,SAAK,OAAO;AAGZ,SAAK,WAAW;AAAA,EAClB;AACF;"}
1
+ {"version":3,"file":"ResponseError.js","sources":["../../../src/request/error/ResponseError.ts"],"sourcesContent":["import type { AxiosResponse } from 'axios'\r\nexport default class ResponseError extends Error {\r\n declare response: AxiosResponse\r\n\r\n constructor(message: string, options: ErrorOptions, reponse: AxiosResponse) {\r\n super(message, { cause: options.cause })\r\n\r\n // Maintains proper stack trace for where our error was thrown (only available on V8)\r\n // @ts-ignore\r\n if (Error.captureStackTrace) {\r\n // @ts-ignore\r\n Error.captureStackTrace(this, ResponseError)\r\n }\r\n\r\n this.name = 'ResponseError'\r\n\r\n // CustomData\r\n this.response = reponse\r\n }\r\n}\r\n"],"names":["ResponseError","message","options","reponse"],"mappings":"AACA,MAAqBA,UAAsB,MAAM;AAAA,EAG/C,YAAYC,GAAiBC,GAAuBC,GAAwB;AAC1E,UAAMF,GAAS,EAAE,OAAOC,EAAQ,MAAO,CAAA,GAInC,MAAM,qBAEF,MAAA,kBAAkB,MAAMF,CAAa,GAG7C,KAAK,OAAO,iBAGZ,KAAK,WAAWG;AAAA,EAClB;AACF;"}
@@ -1,16 +1,10 @@
1
- import ResponseError from "./ResponseError.js";
2
- class SessionExceptionResponseError extends ResponseError {
3
- constructor(message, cause, response, reponseData) {
4
- super(message, cause, response);
5
- if (Error.captureStackTrace) {
6
- Error.captureStackTrace(this, SessionExceptionResponseError);
7
- }
8
- this.name = "SessionExceptionResponseError";
9
- this.response = response;
10
- this.reponseData = reponseData;
1
+ import a from "./ResponseError.js";
2
+ class e extends a {
3
+ constructor(s, t, r, o) {
4
+ super(s, t, r), Error.captureStackTrace && Error.captureStackTrace(this, e), this.name = "SessionExceptionResponseError", this.response = r, this.reponseData = o;
11
5
  }
12
6
  }
13
7
  export {
14
- SessionExceptionResponseError as default
8
+ e as default
15
9
  };
16
10
  //# sourceMappingURL=SessionExceptionResponseError.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SessionExceptionResponseError.js","sources":["../../../src/request/error/SessionExceptionResponseError.ts"],"sourcesContent":["import type { AxiosResponse } from 'axios'\r\nimport ResponseError from './ResponseError'\r\nexport default class SessionExceptionResponseError extends ResponseError {\r\n declare response: AxiosResponse\r\n declare reponseData: unknown\r\n\r\n constructor(message: string, cause: Error, response: AxiosResponse, reponseData: unknown) {\r\n super(message, cause, response)\r\n\r\n // Maintains proper stack trace for where our error was thrown (only available on V8)\r\n // @ts-ignore\r\n if (Error.captureStackTrace) {\r\n // @ts-ignore\r\n Error.captureStackTrace(this, SessionExceptionResponseError)\r\n }\r\n\r\n this.name = 'SessionExceptionResponseError'\r\n\r\n // CustomData\r\n this.response = response\r\n this.reponseData = reponseData\r\n }\r\n}\r\n"],"names":[],"mappings":";AAEA,MAAqB,sCAAsC,cAAc;AAAA,EAIvE,YAAY,SAAiB,OAAc,UAAyB,aAAsB;AAClF,UAAA,SAAS,OAAO,QAAQ;AAI9B,QAAI,MAAM,mBAAmB;AAErB,YAAA,kBAAkB,MAAM,6BAA6B;AAAA,IAC7D;AAEA,SAAK,OAAO;AAGZ,SAAK,WAAW;AAChB,SAAK,cAAc;AAAA,EACrB;AACF;"}
1
+ {"version":3,"file":"SessionExceptionResponseError.js","sources":["../../../src/request/error/SessionExceptionResponseError.ts"],"sourcesContent":["import type { AxiosResponse } from 'axios'\r\nimport ResponseError from './ResponseError'\r\nexport default class SessionExceptionResponseError extends ResponseError {\r\n declare response: AxiosResponse\r\n declare reponseData: unknown\r\n\r\n constructor(message: string, cause: Error, response: AxiosResponse, reponseData: unknown) {\r\n super(message, cause, response)\r\n\r\n // Maintains proper stack trace for where our error was thrown (only available on V8)\r\n // @ts-ignore\r\n if (Error.captureStackTrace) {\r\n // @ts-ignore\r\n Error.captureStackTrace(this, SessionExceptionResponseError)\r\n }\r\n\r\n this.name = 'SessionExceptionResponseError'\r\n\r\n // CustomData\r\n this.response = response\r\n this.reponseData = reponseData\r\n }\r\n}\r\n"],"names":["SessionExceptionResponseError","ResponseError","message","cause","response","reponseData"],"mappings":";AAEA,MAAqBA,UAAsCC,EAAc;AAAA,EAIvE,YAAYC,GAAiBC,GAAcC,GAAyBC,GAAsB;AAClF,UAAAH,GAASC,GAAOC,CAAQ,GAI1B,MAAM,qBAEF,MAAA,kBAAkB,MAAMJ,CAA6B,GAG7D,KAAK,OAAO,iCAGZ,KAAK,WAAWI,GAChB,KAAK,cAAcC;AAAA,EACrB;AACF;"}
@@ -1,14 +1,14 @@
1
- import { config, download, request, upload } from "./disivion/index.js";
2
- import { default as default2 } from "./error/BizExceptionResponseError.js";
3
- import { default as default3 } from "./error/SessionExceptionResponseError.js";
4
- import { default as default4 } from "./error/ExceptionResponseError.js";
1
+ import { config as s, download as i, request as r, upload as n } from "./disivion/index.js";
2
+ import { default as d } from "./error/BizExceptionResponseError.js";
3
+ import { default as t } from "./error/SessionExceptionResponseError.js";
4
+ import { default as l } from "./error/ExceptionResponseError.js";
5
5
  export {
6
- default2 as BizExceptionResponseError,
7
- default4 as ExceptionResponseError,
8
- default3 as SessionExceptionResponseError,
9
- config as divisionConfig,
10
- download as divisionDownload,
11
- request as divisionRequest,
12
- upload as divisionUpload
6
+ d as BizExceptionResponseError,
7
+ l as ExceptionResponseError,
8
+ t as SessionExceptionResponseError,
9
+ s as divisionConfig,
10
+ i as divisionDownload,
11
+ r as divisionRequest,
12
+ n as divisionUpload
13
13
  };
14
14
  //# sourceMappingURL=index.js.map
@@ -1,54 +1,39 @@
1
- import dayjs from "dayjs";
2
- import OrionError from "../error/OrionError.js";
3
- const DateUtil = {
4
- format(p1, p2, p3) {
5
- if (p1 instanceof Date && typeof p2 === "string") {
6
- const value = p1;
7
- const format = p2;
8
- if (!value) {
9
- throw new OrionError("value is null.");
10
- }
11
- if (!format) {
12
- throw new OrionError("format is null.");
13
- }
14
- return dayjs(value).format(format);
15
- } else if (typeof p1 === "string" && typeof p2 === "string" && typeof p3 === "string") {
16
- const value = p1;
17
- const sourceFormat = p2;
18
- const targetFormat = p3;
19
- if (!value || !sourceFormat || !targetFormat) {
20
- throw new OrionError(`Invalid arguments: ${value}, ${sourceFormat}, ${targetFormat}`);
21
- }
22
- if (dayjs(value, sourceFormat, true).isValid()) {
23
- return dayjs(value, sourceFormat).format(targetFormat);
24
- } else {
25
- throw new OrionError(`日期[${value}]与格式[${sourceFormat}]不匹配。`);
26
- }
27
- } else {
28
- throw new OrionError(`入参数量[${arguments.length}]不正确。`);
29
- }
1
+ import i from "dayjs";
2
+ import e from "../error/OrionError.js";
3
+ const l = {
4
+ format(t, r, f) {
5
+ if (t instanceof Date && typeof r == "string") {
6
+ const n = t, o = r;
7
+ if (!n)
8
+ throw new e("value is null.");
9
+ if (!o)
10
+ throw new e("format is null.");
11
+ return i(n).format(o);
12
+ } else if (typeof t == "string" && typeof r == "string" && typeof f == "string") {
13
+ const n = t, o = r, s = f;
14
+ if (!n || !o || !s)
15
+ throw new e(`Invalid arguments: ${n}, ${o}, ${s}`);
16
+ if (i(n, o, !0).isValid())
17
+ return i(n, o).format(s);
18
+ throw new e(`日期[${n}]与格式[${o}]不匹配。`);
19
+ } else
20
+ throw new e(`入参数量[${arguments.length}]不正确。`);
30
21
  },
31
- stringToDate(value, format) {
32
- if (!value) {
33
- throw new OrionError("value is null.");
34
- }
35
- if (!format) {
36
- throw new OrionError("format is null.");
37
- }
38
- if (typeof value !== "string") {
39
- throw new OrionError("value is not a string.");
40
- }
41
- if (typeof format !== "string") {
42
- throw new OrionError("format is not a string.");
43
- }
44
- if (dayjs(value, format, true).isValid()) {
45
- return dayjs(value, format).toDate();
46
- } else {
47
- throw new OrionError(`日期[${value}]与格式[${format}]不匹配。`);
48
- }
22
+ stringToDate(t, r) {
23
+ if (!t)
24
+ throw new e("value is null.");
25
+ if (!r)
26
+ throw new e("format is null.");
27
+ if (typeof t != "string")
28
+ throw new e("value is not a string.");
29
+ if (typeof r != "string")
30
+ throw new e("format is not a string.");
31
+ if (i(t, r, !0).isValid())
32
+ return i(t, r).toDate();
33
+ throw new e(`日期[${t}]与格式[${r}]不匹配。`);
49
34
  }
50
35
  };
51
36
  export {
52
- DateUtil as default
37
+ l as default
53
38
  };
54
39
  //# sourceMappingURL=DateUtil.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DateUtil.js","sources":["../../src/utils/DateUtil.ts"],"sourcesContent":["import dayjs from 'dayjs'\r\n\r\nimport OrionError from '../error/OrionError'\r\n\r\ninterface DateUtilFormat {\r\n format(value: Date, targetFormat: string): string\r\n format(value: string, sourceFormat: string, targetFormat: string): string\r\n}\r\n\r\nexport interface DateUtilI {\r\n format: DateUtilFormat['format']\r\n stringToDate(value: string, format: string): Date\r\n}\r\n\r\nconst DateUtil: DateUtilI = {\r\n format(p1: Date | string, p2: string, p3?: string) {\r\n if (p1 instanceof Date && typeof p2 === 'string') {\r\n const value = p1\r\n const format = p2\r\n\r\n if (!value) {\r\n throw new OrionError('value is null.')\r\n }\r\n\r\n if (!format) {\r\n throw new OrionError('format is null.')\r\n }\r\n\r\n return dayjs(value).format(format)\r\n } else if (typeof p1 === 'string' && typeof p2 === 'string' && typeof p3 === 'string') {\r\n const value = p1\r\n const sourceFormat = p2\r\n const targetFormat = p3\r\n\r\n if (!value || !sourceFormat || !targetFormat) {\r\n throw new OrionError(`Invalid arguments: ${value}, ${sourceFormat}, ${targetFormat}`)\r\n }\r\n\r\n if (dayjs(value, sourceFormat, true).isValid()) {\r\n return dayjs(value, sourceFormat).format(targetFormat)\r\n } else {\r\n throw new OrionError(`日期[${value}]与格式[${sourceFormat}]不匹配。`)\r\n }\r\n } else {\r\n throw new OrionError(`入参数量[${arguments.length}]不正确。`)\r\n }\r\n },\r\n\r\n stringToDate(value: string, format: string): Date {\r\n if (!value) {\r\n throw new OrionError('value is null.')\r\n }\r\n\r\n if (!format) {\r\n throw new OrionError('format is null.')\r\n }\r\n\r\n if (typeof value !== 'string') {\r\n throw new OrionError('value is not a string.')\r\n }\r\n\r\n if (typeof format !== 'string') {\r\n throw new OrionError('format is not a string.')\r\n }\r\n\r\n if (dayjs(value, format, true).isValid()) {\r\n return dayjs(value, format).toDate()\r\n } else {\r\n throw new OrionError(`日期[${value}]与格式[${format}]不匹配。`)\r\n }\r\n },\r\n}\r\n\r\nexport default DateUtil\r\n"],"names":[],"mappings":";;AAcA,MAAM,WAAsB;AAAA,EAC1B,OAAO,IAAmB,IAAY,IAAa;AACjD,QAAI,cAAc,QAAQ,OAAO,OAAO,UAAU;AAChD,YAAM,QAAQ;AACd,YAAM,SAAS;AAEf,UAAI,CAAC,OAAO;AACJ,cAAA,IAAI,WAAW,gBAAgB;AAAA,MACvC;AAEA,UAAI,CAAC,QAAQ;AACL,cAAA,IAAI,WAAW,iBAAiB;AAAA,MACxC;AAEA,aAAO,MAAM,KAAK,EAAE,OAAO,MAAM;AAAA,IAAA,WACxB,OAAO,OAAO,YAAY,OAAO,OAAO,YAAY,OAAO,OAAO,UAAU;AACrF,YAAM,QAAQ;AACd,YAAM,eAAe;AACrB,YAAM,eAAe;AAErB,UAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,cAAc;AACtC,cAAA,IAAI,WAAW,sBAAsB,KAAK,KAAK,YAAY,KAAK,YAAY,EAAE;AAAA,MACtF;AAEA,UAAI,MAAM,OAAO,cAAc,IAAI,EAAE,WAAW;AAC9C,eAAO,MAAM,OAAO,YAAY,EAAE,OAAO,YAAY;AAAA,MAAA,OAChD;AACL,cAAM,IAAI,WAAW,MAAM,KAAK,QAAQ,YAAY,OAAO;AAAA,MAC7D;AAAA,IAAA,OACK;AACL,YAAM,IAAI,WAAW,QAAQ,UAAU,MAAM,OAAO;AAAA,IACtD;AAAA,EACF;AAAA,EAEA,aAAa,OAAe,QAAsB;AAChD,QAAI,CAAC,OAAO;AACJ,YAAA,IAAI,WAAW,gBAAgB;AAAA,IACvC;AAEA,QAAI,CAAC,QAAQ;AACL,YAAA,IAAI,WAAW,iBAAiB;AAAA,IACxC;AAEI,QAAA,OAAO,UAAU,UAAU;AACvB,YAAA,IAAI,WAAW,wBAAwB;AAAA,IAC/C;AAEI,QAAA,OAAO,WAAW,UAAU;AACxB,YAAA,IAAI,WAAW,yBAAyB;AAAA,IAChD;AAEA,QAAI,MAAM,OAAO,QAAQ,IAAI,EAAE,WAAW;AACxC,aAAO,MAAM,OAAO,MAAM,EAAE,OAAO;AAAA,IAAA,OAC9B;AACL,YAAM,IAAI,WAAW,MAAM,KAAK,QAAQ,MAAM,OAAO;AAAA,IACvD;AAAA,EACF;AACF;"}
1
+ {"version":3,"file":"DateUtil.js","sources":["../../src/utils/DateUtil.ts"],"sourcesContent":["import dayjs from 'dayjs'\r\n\r\nimport OrionError from '../error/OrionError'\r\n\r\ninterface DateUtilFormat {\r\n format(value: Date, targetFormat: string): string\r\n format(value: string, sourceFormat: string, targetFormat: string): string\r\n}\r\n\r\nexport interface DateUtilI {\r\n format: DateUtilFormat['format']\r\n stringToDate(value: string, format: string): Date\r\n}\r\n\r\nconst DateUtil: DateUtilI = {\r\n format(p1: Date | string, p2: string, p3?: string) {\r\n if (p1 instanceof Date && typeof p2 === 'string') {\r\n const value = p1\r\n const format = p2\r\n\r\n if (!value) {\r\n throw new OrionError('value is null.')\r\n }\r\n\r\n if (!format) {\r\n throw new OrionError('format is null.')\r\n }\r\n\r\n return dayjs(value).format(format)\r\n } else if (typeof p1 === 'string' && typeof p2 === 'string' && typeof p3 === 'string') {\r\n const value = p1\r\n const sourceFormat = p2\r\n const targetFormat = p3\r\n\r\n if (!value || !sourceFormat || !targetFormat) {\r\n throw new OrionError(`Invalid arguments: ${value}, ${sourceFormat}, ${targetFormat}`)\r\n }\r\n\r\n if (dayjs(value, sourceFormat, true).isValid()) {\r\n return dayjs(value, sourceFormat).format(targetFormat)\r\n } else {\r\n throw new OrionError(`日期[${value}]与格式[${sourceFormat}]不匹配。`)\r\n }\r\n } else {\r\n throw new OrionError(`入参数量[${arguments.length}]不正确。`)\r\n }\r\n },\r\n\r\n stringToDate(value: string, format: string): Date {\r\n if (!value) {\r\n throw new OrionError('value is null.')\r\n }\r\n\r\n if (!format) {\r\n throw new OrionError('format is null.')\r\n }\r\n\r\n if (typeof value !== 'string') {\r\n throw new OrionError('value is not a string.')\r\n }\r\n\r\n if (typeof format !== 'string') {\r\n throw new OrionError('format is not a string.')\r\n }\r\n\r\n if (dayjs(value, format, true).isValid()) {\r\n return dayjs(value, format).toDate()\r\n } else {\r\n throw new OrionError(`日期[${value}]与格式[${format}]不匹配。`)\r\n }\r\n },\r\n}\r\n\r\nexport default DateUtil\r\n"],"names":["DateUtil","p1","p2","p3","value","format","OrionError","dayjs","sourceFormat","targetFormat"],"mappings":";;AAcA,MAAMA,IAAsB;AAAA,EAC1B,OAAOC,GAAmBC,GAAYC,GAAa;AACjD,QAAIF,aAAc,QAAQ,OAAOC,KAAO,UAAU;AAChD,YAAME,IAAQH,GACRI,IAASH;AAEf,UAAI,CAACE;AACG,cAAA,IAAIE,EAAW,gBAAgB;AAGvC,UAAI,CAACD;AACG,cAAA,IAAIC,EAAW,iBAAiB;AAGxC,aAAOC,EAAMH,CAAK,EAAE,OAAOC,CAAM;AAAA,IAAA,WACxB,OAAOJ,KAAO,YAAY,OAAOC,KAAO,YAAY,OAAOC,KAAO,UAAU;AACrF,YAAMC,IAAQH,GACRO,IAAeN,GACfO,IAAeN;AAErB,UAAI,CAACC,KAAS,CAACI,KAAgB,CAACC;AACxB,cAAA,IAAIH,EAAW,sBAAsBF,CAAK,KAAKI,CAAY,KAAKC,CAAY,EAAE;AAGtF,UAAIF,EAAMH,GAAOI,GAAc,EAAI,EAAE;AACnC,eAAOD,EAAMH,GAAOI,CAAY,EAAE,OAAOC,CAAY;AAErD,YAAM,IAAIH,EAAW,MAAMF,CAAK,QAAQI,CAAY,OAAO;AAAA,IAC7D;AAEA,YAAM,IAAIF,EAAW,QAAQ,UAAU,MAAM,OAAO;AAAA,EAExD;AAAA,EAEA,aAAaF,GAAeC,GAAsB;AAChD,QAAI,CAACD;AACG,YAAA,IAAIE,EAAW,gBAAgB;AAGvC,QAAI,CAACD;AACG,YAAA,IAAIC,EAAW,iBAAiB;AAGpC,QAAA,OAAOF,KAAU;AACb,YAAA,IAAIE,EAAW,wBAAwB;AAG3C,QAAA,OAAOD,KAAW;AACd,YAAA,IAAIC,EAAW,yBAAyB;AAGhD,QAAIC,EAAMH,GAAOC,GAAQ,EAAI,EAAE;AAC7B,aAAOE,EAAMH,GAAOC,CAAM,EAAE,OAAO;AAEnC,UAAM,IAAIC,EAAW,MAAMF,CAAK,QAAQC,CAAM,OAAO;AAAA,EAEzD;AACF;"}
@@ -1,11 +1,11 @@
1
- import Decimal from "decimal.js";
2
- const NumberUtil = {
3
- round: (value, how) => {
4
- const dec = new Decimal(value);
5
- return Number(dec.toFixed(how, 4));
1
+ import o from "decimal.js";
2
+ const n = {
3
+ round: (e, r) => {
4
+ const t = new o(e);
5
+ return Number(t.toFixed(r, 4));
6
6
  }
7
7
  };
8
8
  export {
9
- NumberUtil as default
9
+ n as default
10
10
  };
11
11
  //# sourceMappingURL=NumberUtil.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NumberUtil.js","sources":["../../src/utils/NumberUtil.ts"],"sourcesContent":["import Decimal from 'decimal.js'\r\n\r\nconst NumberUtil = {\r\n round: (value: number, how: number) => {\r\n const dec = new Decimal(value)\r\n return Number(dec.toFixed(how, 4))\r\n },\r\n}\r\n\r\nexport default NumberUtil\r\n"],"names":[],"mappings":";AAEA,MAAM,aAAa;AAAA,EACjB,OAAO,CAAC,OAAe,QAAgB;AAC/B,UAAA,MAAM,IAAI,QAAQ,KAAK;AAC7B,WAAO,OAAO,IAAI,QAAQ,KAAK,CAAC,CAAC;AAAA,EACnC;AACF;"}
1
+ {"version":3,"file":"NumberUtil.js","sources":["../../src/utils/NumberUtil.ts"],"sourcesContent":["import Decimal from 'decimal.js'\r\n\r\nconst NumberUtil = {\r\n round: (value: number, how: number) => {\r\n const dec = new Decimal(value)\r\n return Number(dec.toFixed(how, 4))\r\n },\r\n}\r\n\r\nexport default NumberUtil\r\n"],"names":["NumberUtil","value","how","dec","Decimal"],"mappings":";AAEA,MAAMA,IAAa;AAAA,EACjB,OAAO,CAACC,GAAeC,MAAgB;AAC/B,UAAAC,IAAM,IAAIC,EAAQH,CAAK;AAC7B,WAAO,OAAOE,EAAI,QAAQD,GAAK,CAAC,CAAC;AAAA,EACnC;AACF;"}
@@ -1,5 +1,5 @@
1
- import { cloneDeep } from "lodash-es";
1
+ import { cloneDeep as a } from "lodash-es";
2
2
  export {
3
- cloneDeep as default
3
+ a as default
4
4
  };
5
5
  //# sourceMappingURL=cloneDeep.js.map
@@ -1,7 +1,7 @@
1
- function delay(ms) {
2
- return new Promise((resolve) => setTimeout(resolve, ms));
1
+ function n(e) {
2
+ return new Promise((t) => setTimeout(t, e));
3
3
  }
4
4
  export {
5
- delay as default
5
+ n as default
6
6
  };
7
7
  //# sourceMappingURL=delay.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"delay.js","sources":["../../src/utils/delay.ts"],"sourcesContent":["export default function delay(ms: number): Promise<void> {\r\n return new Promise((resolve) => setTimeout(resolve, ms))\r\n}\r\n"],"names":[],"mappings":"AAAA,SAAwB,MAAM,IAA2B;AACvD,SAAO,IAAI,QAAQ,CAAC,YAAY,WAAW,SAAS,EAAE,CAAC;AACzD;"}
1
+ {"version":3,"file":"delay.js","sources":["../../src/utils/delay.ts"],"sourcesContent":["export default function delay(ms: number): Promise<void> {\r\n return new Promise((resolve) => setTimeout(resolve, ms))\r\n}\r\n"],"names":["delay","ms","resolve"],"mappings":"AAAA,SAAwBA,EAAMC,GAA2B;AACvD,SAAO,IAAI,QAAQ,CAACC,MAAY,WAAWA,GAASD,CAAE,CAAC;AACzD;"}
@@ -1,6 +1,6 @@
1
- import { N, t } from "../functions-BeMkokbY.js";
1
+ import { N as t, t as e } from "../functions-DzLqXvGt.js";
2
2
  export {
3
- N as NOOP,
4
- t as toRawType
3
+ t as NOOP,
4
+ e as toRawType
5
5
  };
6
6
  //# sourceMappingURL=functions.js.map
@@ -1,15 +1,15 @@
1
- import { cloneDeep } from "lodash-es";
2
- import { default as default2 } from "./DateUtil.js";
3
- import { default as default3 } from "./delay.js";
4
- import { default as default4 } from "./md5.js";
5
- import { default as default5 } from "./NumberUtil.js";
6
- import { default as default6 } from "./uuid.js";
1
+ import { cloneDeep as o } from "lodash-es";
2
+ import { default as a } from "./DateUtil.js";
3
+ import { default as l } from "./delay.js";
4
+ import { default as m } from "./md5.js";
5
+ import { default as p } from "./NumberUtil.js";
6
+ import { default as s } from "./uuid.js";
7
7
  export {
8
- default2 as DateUtil,
9
- default5 as NumberUtil,
10
- cloneDeep,
11
- default3 as delay,
12
- default4 as md5,
13
- default6 as uuid
8
+ a as DateUtil,
9
+ p as NumberUtil,
10
+ o as cloneDeep,
11
+ l as delay,
12
+ m as md5,
13
+ s as uuid
14
14
  };
15
15
  //# sourceMappingURL=index.js.map