funda-ui 4.5.712 → 4.5.766

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 (501) hide show
  1. package/Chatbox/index.d.ts +54 -0
  2. package/{publish/lib/cjs/Date → Chatbox}/index.js +2465 -3802
  3. package/README.md +4 -105
  4. package/Utils/useStreamController.d.ts +71 -0
  5. package/Utils/useStreamController.js +494 -0
  6. package/{publish/all.d.ts → all.d.ts} +1 -0
  7. package/{publish/all.js → all.js} +1 -0
  8. package/lib/cjs/Chatbox/index.d.ts +54 -0
  9. package/lib/cjs/Chatbox/index.js +4863 -0
  10. package/lib/cjs/Utils/useStreamController.d.ts +71 -0
  11. package/lib/cjs/Utils/useStreamController.js +494 -0
  12. package/lib/cjs/index.d.ts +1 -0
  13. package/lib/cjs/index.js +1 -0
  14. package/lib/esm/Chatbox/PureLoader.tsx +45 -0
  15. package/lib/esm/Chatbox/TypingEffect.tsx +32 -0
  16. package/lib/esm/Chatbox/index.scss +502 -0
  17. package/lib/esm/Chatbox/index.tsx +1171 -0
  18. package/lib/esm/Chatbox/useStreamController.tsx +277 -0
  19. package/lib/esm/Chatbox/utils/func.ts +107 -0
  20. package/lib/esm/Textarea/index.tsx +1 -0
  21. package/lib/esm/Utils/hooks/useStreamController.tsx +277 -0
  22. package/lib/esm/index.js +1 -0
  23. package/package.json +44 -41
  24. package/.gitattributes +0 -2
  25. package/README_PUBLISH.md +0 -126
  26. package/logo.png +0 -0
  27. package/preview.png +0 -0
  28. package/publish/LICENSE +0 -21
  29. package/publish/README.md +0 -126
  30. package/publish/lib/cjs/Accordion/index.d.ts +0 -2
  31. package/publish/lib/cjs/Accordion/index.js +0 -1035
  32. package/publish/lib/cjs/BackToTop/index.d.ts +0 -17
  33. package/publish/lib/cjs/BackToTop/index.js +0 -904
  34. package/publish/lib/cjs/CascadingSelect/index.d.ts +0 -60
  35. package/publish/lib/cjs/CascadingSelect/index.js +0 -2943
  36. package/publish/lib/cjs/CascadingSelectE2E/index.d.ts +0 -71
  37. package/publish/lib/cjs/CascadingSelectE2E/index.js +0 -3540
  38. package/publish/lib/cjs/Checkbox/index.d.ts +0 -28
  39. package/publish/lib/cjs/Checkbox/index.js +0 -662
  40. package/publish/lib/cjs/ColorPicker/index.d.ts +0 -27
  41. package/publish/lib/cjs/ColorPicker/index.js +0 -662
  42. package/publish/lib/cjs/Date/index.d.ts +0 -70
  43. package/publish/lib/cjs/DigitalClock/index.d.ts +0 -7
  44. package/publish/lib/cjs/DigitalClock/index.js +0 -402
  45. package/publish/lib/cjs/DragDropList/index.d.ts +0 -44
  46. package/publish/lib/cjs/DragDropList/index.js +0 -1587
  47. package/publish/lib/cjs/DropdownMenu/index.d.ts +0 -38
  48. package/publish/lib/cjs/DropdownMenu/index.js +0 -1498
  49. package/publish/lib/cjs/DynamicFields/index.d.ts +0 -40
  50. package/publish/lib/cjs/DynamicFields/index.js +0 -810
  51. package/publish/lib/cjs/EventCalendar/index.d.ts +0 -61
  52. package/publish/lib/cjs/EventCalendar/index.js +0 -3740
  53. package/publish/lib/cjs/EventCalendarTimeline/index.d.ts +0 -100
  54. package/publish/lib/cjs/EventCalendarTimeline/index.js +0 -6084
  55. package/publish/lib/cjs/File/index.d.ts +0 -40
  56. package/publish/lib/cjs/File/index.js +0 -1751
  57. package/publish/lib/cjs/HorizontalScrollContent/index.d.ts +0 -14
  58. package/publish/lib/cjs/HorizontalScrollContent/index.js +0 -426
  59. package/publish/lib/cjs/Input/index.d.ts +0 -59
  60. package/publish/lib/cjs/Input/index.js +0 -1455
  61. package/publish/lib/cjs/LiveSearch/index.d.ts +0 -69
  62. package/publish/lib/cjs/LiveSearch/index.js +0 -3626
  63. package/publish/lib/cjs/MasonryLayout/index.d.ts +0 -14
  64. package/publish/lib/cjs/MasonryLayout/index.js +0 -689
  65. package/publish/lib/cjs/ModalDialog/index.d.ts +0 -79
  66. package/publish/lib/cjs/ModalDialog/index.js +0 -1695
  67. package/publish/lib/cjs/ModeSwitch/index.d.ts +0 -17
  68. package/publish/lib/cjs/ModeSwitch/index.js +0 -202
  69. package/publish/lib/cjs/MultilevelDropdownMenu/index.d.ts +0 -20
  70. package/publish/lib/cjs/MultilevelDropdownMenu/index.js +0 -930
  71. package/publish/lib/cjs/MultipleCheckboxes/index.d.ts +0 -41
  72. package/publish/lib/cjs/MultipleCheckboxes/index.js +0 -1717
  73. package/publish/lib/cjs/MultipleSelect/index.d.ts +0 -65
  74. package/publish/lib/cjs/MultipleSelect/index.js +0 -3704
  75. package/publish/lib/cjs/NativeSelect/index.d.ts +0 -37
  76. package/publish/lib/cjs/NativeSelect/index.js +0 -1631
  77. package/publish/lib/cjs/NumberInput/index.d.ts +0 -40
  78. package/publish/lib/cjs/NumberInput/index.js +0 -1188
  79. package/publish/lib/cjs/Pagination/index.d.ts +0 -51
  80. package/publish/lib/cjs/Pagination/index.js +0 -612
  81. package/publish/lib/cjs/Radio/index.d.ts +0 -45
  82. package/publish/lib/cjs/Radio/index.js +0 -1391
  83. package/publish/lib/cjs/RangeSlider/index.d.ts +0 -22
  84. package/publish/lib/cjs/RangeSlider/index.js +0 -2665
  85. package/publish/lib/cjs/RootPortal/index.d.ts +0 -8
  86. package/publish/lib/cjs/RootPortal/index.js +0 -141
  87. package/publish/lib/cjs/ScrollReveal/index.d.ts +0 -21
  88. package/publish/lib/cjs/ScrollReveal/index.js +0 -401
  89. package/publish/lib/cjs/Scrollbar/index.d.ts +0 -17
  90. package/publish/lib/cjs/Scrollbar/index.js +0 -1107
  91. package/publish/lib/cjs/SearchBar/index.d.ts +0 -41
  92. package/publish/lib/cjs/SearchBar/index.js +0 -701
  93. package/publish/lib/cjs/Select/index.d.ts +0 -99
  94. package/publish/lib/cjs/Select/index.js +0 -5697
  95. package/publish/lib/cjs/ShowMoreLess/index.d.ts +0 -36
  96. package/publish/lib/cjs/ShowMoreLess/index.js +0 -387
  97. package/publish/lib/cjs/Switch/index.d.ts +0 -25
  98. package/publish/lib/cjs/Switch/index.js +0 -628
  99. package/publish/lib/cjs/Table/index.d.ts +0 -12
  100. package/publish/lib/cjs/Table/index.js +0 -2062
  101. package/publish/lib/cjs/Tabs/index.d.ts +0 -3
  102. package/publish/lib/cjs/Tabs/index.js +0 -771
  103. package/publish/lib/cjs/TagInput/index.d.ts +0 -31
  104. package/publish/lib/cjs/TagInput/index.js +0 -1144
  105. package/publish/lib/cjs/Textarea/index.d.ts +0 -50
  106. package/publish/lib/cjs/Textarea/index.js +0 -1784
  107. package/publish/lib/cjs/Toast/index.d.ts +0 -34
  108. package/publish/lib/cjs/Toast/index.js +0 -861
  109. package/publish/lib/cjs/Tooltip/index.d.ts +0 -23
  110. package/publish/lib/cjs/Tooltip/index.js +0 -1674
  111. package/publish/lib/cjs/Tree/index.d.ts +0 -62
  112. package/publish/lib/cjs/Tree/index.js +0 -1960
  113. package/publish/lib/cjs/Utils/anim.d.ts +0 -11
  114. package/publish/lib/cjs/Utils/anim.js +0 -400
  115. package/publish/lib/cjs/Utils/bodyScrollLock.d.ts +0 -8
  116. package/publish/lib/cjs/Utils/bodyScrollLock.js +0 -311
  117. package/publish/lib/cjs/Utils/buffer.d.ts +0 -67
  118. package/publish/lib/cjs/Utils/buffer.js +0 -343
  119. package/publish/lib/cjs/Utils/cls.d.ts +0 -15
  120. package/publish/lib/cjs/Utils/cls.js +0 -124
  121. package/publish/lib/cjs/Utils/convert.d.ts +0 -25
  122. package/publish/lib/cjs/Utils/convert.js +0 -109
  123. package/publish/lib/cjs/Utils/date.d.ts +0 -217
  124. package/publish/lib/cjs/Utils/date.js +0 -567
  125. package/publish/lib/cjs/Utils/dom.d.ts +0 -13
  126. package/publish/lib/cjs/Utils/dom.js +0 -215
  127. package/publish/lib/cjs/Utils/easing.d.ts +0 -29
  128. package/publish/lib/cjs/Utils/easing.js +0 -221
  129. package/publish/lib/cjs/Utils/extract.d.ts +0 -28
  130. package/publish/lib/cjs/Utils/extract.js +0 -130
  131. package/publish/lib/cjs/Utils/getElementProperty.d.ts +0 -52
  132. package/publish/lib/cjs/Utils/getElementProperty.js +0 -189
  133. package/publish/lib/cjs/Utils/guid.d.ts +0 -7
  134. package/publish/lib/cjs/Utils/guid.js +0 -67
  135. package/publish/lib/cjs/Utils/initDefaultOptions.d.ts +0 -21
  136. package/publish/lib/cjs/Utils/initDefaultOptions.js +0 -131
  137. package/publish/lib/cjs/Utils/inputsCalculation.d.ts +0 -28
  138. package/publish/lib/cjs/Utils/inputsCalculation.js +0 -188
  139. package/publish/lib/cjs/Utils/math.d.ts +0 -77
  140. package/publish/lib/cjs/Utils/math.js +0 -305
  141. package/publish/lib/cjs/Utils/object.d.ts +0 -18
  142. package/publish/lib/cjs/Utils/object.js +0 -120
  143. package/publish/lib/cjs/Utils/os.d.ts +0 -2
  144. package/publish/lib/cjs/Utils/os.js +0 -104
  145. package/publish/lib/cjs/Utils/performance.d.ts +0 -3
  146. package/publish/lib/cjs/Utils/performance.js +0 -94
  147. package/publish/lib/cjs/Utils/tree.d.ts +0 -40
  148. package/publish/lib/cjs/Utils/tree.js +0 -195
  149. package/publish/lib/cjs/Utils/useAutosizeTextArea.d.ts +0 -10
  150. package/publish/lib/cjs/Utils/useAutosizeTextArea.js +0 -227
  151. package/publish/lib/cjs/Utils/useBoundedDrag.d.ts +0 -125
  152. package/publish/lib/cjs/Utils/useBoundedDrag.js +0 -380
  153. package/publish/lib/cjs/Utils/useClickOutside.d.ts +0 -33
  154. package/publish/lib/cjs/Utils/useClickOutside.js +0 -166
  155. package/publish/lib/cjs/Utils/useComId.d.ts +0 -6
  156. package/publish/lib/cjs/Utils/useComId.js +0 -114
  157. package/publish/lib/cjs/Utils/useDebounce.d.ts +0 -20
  158. package/publish/lib/cjs/Utils/useDebounce.js +0 -138
  159. package/publish/lib/cjs/Utils/useDragDropPosition.d.ts +0 -169
  160. package/publish/lib/cjs/Utils/useDragDropPosition.js +0 -456
  161. package/publish/lib/cjs/Utils/useDraggable.d.ts +0 -62
  162. package/publish/lib/cjs/Utils/useDraggable.js +0 -348
  163. package/publish/lib/cjs/Utils/useInterval.d.ts +0 -5
  164. package/publish/lib/cjs/Utils/useInterval.js +0 -168
  165. package/publish/lib/cjs/Utils/useIsMobile.d.ts +0 -2
  166. package/publish/lib/cjs/Utils/useIsMobile.js +0 -168
  167. package/publish/lib/cjs/Utils/useKeyPress.d.ts +0 -44
  168. package/publish/lib/cjs/Utils/useKeyPress.js +0 -200
  169. package/publish/lib/cjs/Utils/useThrottle.d.ts +0 -2
  170. package/publish/lib/cjs/Utils/useThrottle.js +0 -136
  171. package/publish/lib/cjs/Utils/useWindowScroll.d.ts +0 -12
  172. package/publish/lib/cjs/Utils/useWindowScroll.js +0 -217
  173. package/publish/lib/cjs/Utils/viewport.d.ts +0 -7
  174. package/publish/lib/cjs/Utils/viewport.js +0 -64
  175. package/publish/lib/cjs/index.d.ts +0 -45
  176. package/publish/lib/cjs/index.js +0 -46
  177. package/publish/lib/css/BackToTop/index.css +0 -34
  178. package/publish/lib/css/CascadingSelect/index.css +0 -216
  179. package/publish/lib/css/CascadingSelectE2E/index.css +0 -216
  180. package/publish/lib/css/ColorPicker/index.css +0 -58
  181. package/publish/lib/css/Date/index.css +0 -434
  182. package/publish/lib/css/DragDropList/index.css +0 -188
  183. package/publish/lib/css/DropdownMenu/index.css +0 -151
  184. package/publish/lib/css/EventCalendar/index.css +0 -300
  185. package/publish/lib/css/EventCalendarTimeline/index.css +0 -694
  186. package/publish/lib/css/HorizontalScrollContent/index.css +0 -70
  187. package/publish/lib/css/LiveSearch/index.css +0 -55
  188. package/publish/lib/css/MultilevelDropdownMenu/index.css +0 -38
  189. package/publish/lib/css/MultipleSelect/index.css +0 -313
  190. package/publish/lib/css/RangeSlider/index.css +0 -150
  191. package/publish/lib/css/Scrollbar/index.css +0 -176
  192. package/publish/lib/css/Select/index.css +0 -368
  193. package/publish/lib/css/ShowMoreLess/index.css +0 -23
  194. package/publish/lib/css/Table/index.css +0 -584
  195. package/publish/lib/css/TagInput/index.css +0 -91
  196. package/publish/lib/css/Toast/index.css +0 -201
  197. package/publish/lib/css/Tooltip/index.css +0 -197
  198. package/publish/lib/css/Tree/index.css +0 -232
  199. package/publish/lib/esm/Accordion/Accordion.tsx +0 -184
  200. package/publish/lib/esm/Accordion/AccordionItem.tsx +0 -143
  201. package/publish/lib/esm/Accordion/index.tsx +0 -2
  202. package/publish/lib/esm/BackToTop/index.scss +0 -47
  203. package/publish/lib/esm/BackToTop/index.tsx +0 -177
  204. package/publish/lib/esm/CascadingSelect/Group.tsx +0 -82
  205. package/publish/lib/esm/CascadingSelect/index.scss +0 -291
  206. package/publish/lib/esm/CascadingSelect/index.tsx +0 -1203
  207. package/publish/lib/esm/CascadingSelectE2E/Group.tsx +0 -83
  208. package/publish/lib/esm/CascadingSelectE2E/index.scss +0 -293
  209. package/publish/lib/esm/CascadingSelectE2E/index.tsx +0 -1471
  210. package/publish/lib/esm/Checkbox/index.tsx +0 -193
  211. package/publish/lib/esm/ColorPicker/index.scss +0 -91
  212. package/publish/lib/esm/ColorPicker/index.tsx +0 -204
  213. package/publish/lib/esm/Date/Calendar.tsx +0 -723
  214. package/publish/lib/esm/Date/index.scss +0 -567
  215. package/publish/lib/esm/Date/index.tsx +0 -1683
  216. package/publish/lib/esm/Date/localization/en_US.js +0 -13
  217. package/publish/lib/esm/Date/localization/zh_CN.js +0 -12
  218. package/publish/lib/esm/DigitalClock/index.tsx +0 -74
  219. package/publish/lib/esm/DragDropList/index.scss +0 -245
  220. package/publish/lib/esm/DragDropList/index.tsx +0 -494
  221. package/publish/lib/esm/DropdownMenu/Option.tsx +0 -55
  222. package/publish/lib/esm/DropdownMenu/index.scss +0 -205
  223. package/publish/lib/esm/DropdownMenu/index.tsx +0 -377
  224. package/publish/lib/esm/DynamicFields/index.tsx +0 -404
  225. package/publish/lib/esm/EventCalendar/index.scss +0 -407
  226. package/publish/lib/esm/EventCalendar/index.tsx +0 -1004
  227. package/publish/lib/esm/EventCalendarTimeline/index.scss +0 -926
  228. package/publish/lib/esm/EventCalendarTimeline/index.tsx +0 -2683
  229. package/publish/lib/esm/File/index.tsx +0 -477
  230. package/publish/lib/esm/HorizontalScrollContent/index.scss +0 -87
  231. package/publish/lib/esm/HorizontalScrollContent/index.tsx +0 -171
  232. package/publish/lib/esm/Input/index.tsx +0 -614
  233. package/publish/lib/esm/LiveSearch/index.scss +0 -82
  234. package/publish/lib/esm/LiveSearch/index.tsx +0 -960
  235. package/publish/lib/esm/MasonryLayout/index.tsx +0 -326
  236. package/publish/lib/esm/ModalDialog/index.tsx +0 -552
  237. package/publish/lib/esm/ModeSwitch/index.tsx +0 -82
  238. package/publish/lib/esm/MultilevelDropdownMenu/ItemList.tsx +0 -265
  239. package/publish/lib/esm/MultilevelDropdownMenu/index.scss +0 -79
  240. package/publish/lib/esm/MultilevelDropdownMenu/index.tsx +0 -77
  241. package/publish/lib/esm/MultipleCheckboxes/index.tsx +0 -669
  242. package/publish/lib/esm/MultipleSelect/index.scss +0 -398
  243. package/publish/lib/esm/MultipleSelect/index.tsx +0 -766
  244. package/publish/lib/esm/MultipleSelect/utils/func.ts +0 -61
  245. package/publish/lib/esm/NativeSelect/index.tsx +0 -396
  246. package/publish/lib/esm/NativeSelect/utils/func.ts +0 -49
  247. package/publish/lib/esm/NumberInput/index.tsx +0 -385
  248. package/publish/lib/esm/Pagination/index.tsx +0 -286
  249. package/publish/lib/esm/Pagination/pagination-navigators.tsx +0 -60
  250. package/publish/lib/esm/Radio/index.tsx +0 -670
  251. package/publish/lib/esm/RangeSlider/index.scss +0 -186
  252. package/publish/lib/esm/RangeSlider/index.tsx +0 -241
  253. package/publish/lib/esm/RootPortal/index.tsx +0 -53
  254. package/publish/lib/esm/ScrollReveal/index.tsx +0 -148
  255. package/publish/lib/esm/Scrollbar/index.scss +0 -221
  256. package/publish/lib/esm/Scrollbar/index.tsx +0 -561
  257. package/publish/lib/esm/SearchBar/index.tsx +0 -253
  258. package/publish/lib/esm/Select/index.scss +0 -553
  259. package/publish/lib/esm/Select/index.tsx +0 -2816
  260. package/publish/lib/esm/Select/utils/func.ts +0 -106
  261. package/publish/lib/esm/ShowMoreLess/index.scss +0 -27
  262. package/publish/lib/esm/ShowMoreLess/index.tsx +0 -145
  263. package/publish/lib/esm/Switch/index.tsx +0 -147
  264. package/publish/lib/esm/Table/Table.tsx +0 -257
  265. package/publish/lib/esm/Table/TableBody.tsx +0 -41
  266. package/publish/lib/esm/Table/TableCaption.tsx +0 -34
  267. package/publish/lib/esm/Table/TableCell.tsx +0 -123
  268. package/publish/lib/esm/Table/TableColgroup.tsx +0 -38
  269. package/publish/lib/esm/Table/TableContext.tsx +0 -26
  270. package/publish/lib/esm/Table/TableFoot.tsx +0 -28
  271. package/publish/lib/esm/Table/TableHead.tsx +0 -28
  272. package/publish/lib/esm/Table/TableRow.tsx +0 -76
  273. package/publish/lib/esm/Table/index.scss +0 -418
  274. package/publish/lib/esm/Table/index.tsx +0 -14
  275. package/publish/lib/esm/Table/utils/DragHandleSprite.tsx +0 -46
  276. package/publish/lib/esm/Table/utils/SortSprite.tsx +0 -57
  277. package/publish/lib/esm/Table/utils/TableFilter.tsx +0 -56
  278. package/publish/lib/esm/Table/utils/ToggleSelection.tsx +0 -225
  279. package/publish/lib/esm/Table/utils/func.ts +0 -171
  280. package/publish/lib/esm/Table/utils/hooks/useTableDraggable.tsx +0 -342
  281. package/publish/lib/esm/Table/utils/hooks/useTableKeyPress.tsx +0 -154
  282. package/publish/lib/esm/Table/utils/hooks/useTableResponsive.tsx +0 -92
  283. package/publish/lib/esm/Table/utils/hooks/useTableSort.tsx +0 -143
  284. package/publish/lib/esm/Tabs/TabList.tsx +0 -50
  285. package/publish/lib/esm/Tabs/TabPanel.tsx +0 -44
  286. package/publish/lib/esm/Tabs/Tabs.tsx +0 -282
  287. package/publish/lib/esm/Tabs/index.tsx +0 -3
  288. package/publish/lib/esm/TagInput/index.scss +0 -126
  289. package/publish/lib/esm/TagInput/index.tsx +0 -352
  290. package/publish/lib/esm/Textarea/index.tsx +0 -608
  291. package/publish/lib/esm/Toast/Item.tsx +0 -124
  292. package/publish/lib/esm/Toast/index.scss +0 -269
  293. package/publish/lib/esm/Toast/index.tsx +0 -374
  294. package/publish/lib/esm/Tooltip/index.scss +0 -269
  295. package/publish/lib/esm/Tooltip/index.tsx +0 -312
  296. package/publish/lib/esm/Tree/TreeList.tsx +0 -616
  297. package/publish/lib/esm/Tree/index.scss +0 -386
  298. package/publish/lib/esm/Tree/index.tsx +0 -396
  299. package/publish/lib/esm/Tree/init-height.tsx +0 -27
  300. package/publish/lib/esm/Tree/utils/func.ts +0 -15
  301. package/publish/lib/esm/Utils/hooks/useAutosizeTextArea.tsx +0 -125
  302. package/publish/lib/esm/Utils/hooks/useBoundedDrag.tsx +0 -301
  303. package/publish/lib/esm/Utils/hooks/useClickOutside.tsx +0 -69
  304. package/publish/lib/esm/Utils/hooks/useComId.tsx +0 -13
  305. package/publish/lib/esm/Utils/hooks/useDebounce.tsx +0 -40
  306. package/publish/lib/esm/Utils/hooks/useDragDropPosition.tsx +0 -420
  307. package/publish/lib/esm/Utils/hooks/useDraggable.tsx +0 -265
  308. package/publish/lib/esm/Utils/hooks/useInterval.tsx +0 -74
  309. package/publish/lib/esm/Utils/hooks/useIsMobile.tsx +0 -56
  310. package/publish/lib/esm/Utils/hooks/useKeyPress.tsx +0 -104
  311. package/publish/lib/esm/Utils/hooks/useThrottle.tsx +0 -39
  312. package/publish/lib/esm/Utils/hooks/useWindowScroll.tsx +0 -83
  313. package/publish/lib/esm/Utils/libs/anim.ts +0 -96
  314. package/publish/lib/esm/Utils/libs/buffer.ts +0 -262
  315. package/publish/lib/esm/Utils/libs/cls.ts +0 -64
  316. package/publish/lib/esm/Utils/libs/convert.ts +0 -59
  317. package/publish/lib/esm/Utils/libs/date.ts +0 -578
  318. package/publish/lib/esm/Utils/libs/dom.ts +0 -150
  319. package/publish/lib/esm/Utils/libs/easing.ts +0 -201
  320. package/publish/lib/esm/Utils/libs/extract.ts +0 -86
  321. package/publish/lib/esm/Utils/libs/getElementProperty.ts +0 -150
  322. package/publish/lib/esm/Utils/libs/guid.ts +0 -16
  323. package/publish/lib/esm/Utils/libs/initDefaultOptions.ts +0 -104
  324. package/publish/lib/esm/Utils/libs/inputsCalculation.ts +0 -160
  325. package/publish/lib/esm/Utils/libs/math.ts +0 -276
  326. package/publish/lib/esm/Utils/libs/object.ts +0 -68
  327. package/publish/lib/esm/Utils/libs/os.ts +0 -63
  328. package/publish/lib/esm/Utils/libs/performance.ts +0 -47
  329. package/publish/lib/esm/Utils/libs/tree.ts +0 -119
  330. package/publish/lib/esm/Utils/libs/viewport.ts +0 -20
  331. package/publish/lib/esm/Utils/plugins/bodyScrollLock.ts +0 -286
  332. package/publish/lib/esm/index.js +0 -43
  333. package/publish/package.json +0 -1
  334. /package/{publish/Accordion → Accordion}/index.d.ts +0 -0
  335. /package/{publish/Accordion → Accordion}/index.js +0 -0
  336. /package/{publish/BackToTop → BackToTop}/index.css +0 -0
  337. /package/{publish/BackToTop → BackToTop}/index.d.ts +0 -0
  338. /package/{publish/BackToTop → BackToTop}/index.js +0 -0
  339. /package/{publish/CascadingSelect → CascadingSelect}/index.css +0 -0
  340. /package/{publish/CascadingSelect → CascadingSelect}/index.d.ts +0 -0
  341. /package/{publish/CascadingSelect → CascadingSelect}/index.js +0 -0
  342. /package/{publish/CascadingSelectE2E → CascadingSelectE2E}/index.css +0 -0
  343. /package/{publish/CascadingSelectE2E → CascadingSelectE2E}/index.d.ts +0 -0
  344. /package/{publish/CascadingSelectE2E → CascadingSelectE2E}/index.js +0 -0
  345. /package/{publish/Checkbox → Checkbox}/index.d.ts +0 -0
  346. /package/{publish/Checkbox → Checkbox}/index.js +0 -0
  347. /package/{publish/ColorPicker → ColorPicker}/index.css +0 -0
  348. /package/{publish/ColorPicker → ColorPicker}/index.d.ts +0 -0
  349. /package/{publish/ColorPicker → ColorPicker}/index.js +0 -0
  350. /package/{publish/Date → Date}/index.css +0 -0
  351. /package/{publish/Date → Date}/index.d.ts +0 -0
  352. /package/{publish/Date → Date}/index.js +0 -0
  353. /package/{publish/DigitalClock → DigitalClock}/index.d.ts +0 -0
  354. /package/{publish/DigitalClock → DigitalClock}/index.js +0 -0
  355. /package/{publish/DragDropList → DragDropList}/index.css +0 -0
  356. /package/{publish/DragDropList → DragDropList}/index.d.ts +0 -0
  357. /package/{publish/DragDropList → DragDropList}/index.js +0 -0
  358. /package/{publish/DropdownMenu → DropdownMenu}/index.css +0 -0
  359. /package/{publish/DropdownMenu → DropdownMenu}/index.d.ts +0 -0
  360. /package/{publish/DropdownMenu → DropdownMenu}/index.js +0 -0
  361. /package/{publish/DynamicFields → DynamicFields}/index.d.ts +0 -0
  362. /package/{publish/DynamicFields → DynamicFields}/index.js +0 -0
  363. /package/{publish/EventCalendar → EventCalendar}/index.css +0 -0
  364. /package/{publish/EventCalendar → EventCalendar}/index.d.ts +0 -0
  365. /package/{publish/EventCalendar → EventCalendar}/index.js +0 -0
  366. /package/{publish/EventCalendarTimeline → EventCalendarTimeline}/index.css +0 -0
  367. /package/{publish/EventCalendarTimeline → EventCalendarTimeline}/index.d.ts +0 -0
  368. /package/{publish/EventCalendarTimeline → EventCalendarTimeline}/index.js +0 -0
  369. /package/{publish/File → File}/index.d.ts +0 -0
  370. /package/{publish/File → File}/index.js +0 -0
  371. /package/{publish/HorizontalScrollContent → HorizontalScrollContent}/index.css +0 -0
  372. /package/{publish/HorizontalScrollContent → HorizontalScrollContent}/index.d.ts +0 -0
  373. /package/{publish/HorizontalScrollContent → HorizontalScrollContent}/index.js +0 -0
  374. /package/{publish/Input → Input}/index.d.ts +0 -0
  375. /package/{publish/Input → Input}/index.js +0 -0
  376. /package/{publish/LiveSearch → LiveSearch}/index.css +0 -0
  377. /package/{publish/LiveSearch → LiveSearch}/index.d.ts +0 -0
  378. /package/{publish/LiveSearch → LiveSearch}/index.js +0 -0
  379. /package/{publish/MasonryLayout → MasonryLayout}/index.d.ts +0 -0
  380. /package/{publish/MasonryLayout → MasonryLayout}/index.js +0 -0
  381. /package/{publish/ModalDialog → ModalDialog}/index.d.ts +0 -0
  382. /package/{publish/ModalDialog → ModalDialog}/index.js +0 -0
  383. /package/{publish/ModeSwitch → ModeSwitch}/index.d.ts +0 -0
  384. /package/{publish/ModeSwitch → ModeSwitch}/index.js +0 -0
  385. /package/{publish/MultilevelDropdownMenu → MultilevelDropdownMenu}/index.css +0 -0
  386. /package/{publish/MultilevelDropdownMenu → MultilevelDropdownMenu}/index.d.ts +0 -0
  387. /package/{publish/MultilevelDropdownMenu → MultilevelDropdownMenu}/index.js +0 -0
  388. /package/{publish/MultipleCheckboxes → MultipleCheckboxes}/index.d.ts +0 -0
  389. /package/{publish/MultipleCheckboxes → MultipleCheckboxes}/index.js +0 -0
  390. /package/{publish/MultipleSelect → MultipleSelect}/index.css +0 -0
  391. /package/{publish/MultipleSelect → MultipleSelect}/index.d.ts +0 -0
  392. /package/{publish/MultipleSelect → MultipleSelect}/index.js +0 -0
  393. /package/{publish/NativeSelect → NativeSelect}/index.d.ts +0 -0
  394. /package/{publish/NativeSelect → NativeSelect}/index.js +0 -0
  395. /package/{publish/NumberInput → NumberInput}/index.d.ts +0 -0
  396. /package/{publish/NumberInput → NumberInput}/index.js +0 -0
  397. /package/{publish/Pagination → Pagination}/index.d.ts +0 -0
  398. /package/{publish/Pagination → Pagination}/index.js +0 -0
  399. /package/{publish/Radio → Radio}/index.d.ts +0 -0
  400. /package/{publish/Radio → Radio}/index.js +0 -0
  401. /package/{publish/RangeSlider → RangeSlider}/index.css +0 -0
  402. /package/{publish/RangeSlider → RangeSlider}/index.d.ts +0 -0
  403. /package/{publish/RangeSlider → RangeSlider}/index.js +0 -0
  404. /package/{publish/RootPortal → RootPortal}/index.d.ts +0 -0
  405. /package/{publish/RootPortal → RootPortal}/index.js +0 -0
  406. /package/{publish/ScrollReveal → ScrollReveal}/index.d.ts +0 -0
  407. /package/{publish/ScrollReveal → ScrollReveal}/index.js +0 -0
  408. /package/{publish/Scrollbar → Scrollbar}/index.css +0 -0
  409. /package/{publish/Scrollbar → Scrollbar}/index.d.ts +0 -0
  410. /package/{publish/Scrollbar → Scrollbar}/index.js +0 -0
  411. /package/{publish/SearchBar → SearchBar}/index.d.ts +0 -0
  412. /package/{publish/SearchBar → SearchBar}/index.js +0 -0
  413. /package/{publish/Select → Select}/index.css +0 -0
  414. /package/{publish/Select → Select}/index.d.ts +0 -0
  415. /package/{publish/Select → Select}/index.js +0 -0
  416. /package/{publish/ShowMoreLess → ShowMoreLess}/index.css +0 -0
  417. /package/{publish/ShowMoreLess → ShowMoreLess}/index.d.ts +0 -0
  418. /package/{publish/ShowMoreLess → ShowMoreLess}/index.js +0 -0
  419. /package/{publish/Switch → Switch}/index.d.ts +0 -0
  420. /package/{publish/Switch → Switch}/index.js +0 -0
  421. /package/{publish/Table → Table}/index.css +0 -0
  422. /package/{publish/Table → Table}/index.d.ts +0 -0
  423. /package/{publish/Table → Table}/index.js +0 -0
  424. /package/{publish/Tabs → Tabs}/index.d.ts +0 -0
  425. /package/{publish/Tabs → Tabs}/index.js +0 -0
  426. /package/{publish/TagInput → TagInput}/index.css +0 -0
  427. /package/{publish/TagInput → TagInput}/index.d.ts +0 -0
  428. /package/{publish/TagInput → TagInput}/index.js +0 -0
  429. /package/{publish/Textarea → Textarea}/index.d.ts +0 -0
  430. /package/{publish/Textarea → Textarea}/index.js +0 -0
  431. /package/{publish/Toast → Toast}/index.css +0 -0
  432. /package/{publish/Toast → Toast}/index.d.ts +0 -0
  433. /package/{publish/Toast → Toast}/index.js +0 -0
  434. /package/{publish/Tooltip → Tooltip}/index.css +0 -0
  435. /package/{publish/Tooltip → Tooltip}/index.d.ts +0 -0
  436. /package/{publish/Tooltip → Tooltip}/index.js +0 -0
  437. /package/{publish/Tree → Tree}/index.css +0 -0
  438. /package/{publish/Tree → Tree}/index.d.ts +0 -0
  439. /package/{publish/Tree → Tree}/index.js +0 -0
  440. /package/{publish/Utils → Utils}/anim.d.ts +0 -0
  441. /package/{publish/Utils → Utils}/anim.js +0 -0
  442. /package/{publish/Utils → Utils}/bodyScrollLock.d.ts +0 -0
  443. /package/{publish/Utils → Utils}/bodyScrollLock.js +0 -0
  444. /package/{publish/Utils → Utils}/buffer.d.ts +0 -0
  445. /package/{publish/Utils → Utils}/buffer.js +0 -0
  446. /package/{publish/Utils → Utils}/cls.d.ts +0 -0
  447. /package/{publish/Utils → Utils}/cls.js +0 -0
  448. /package/{publish/Utils → Utils}/convert.d.ts +0 -0
  449. /package/{publish/Utils → Utils}/convert.js +0 -0
  450. /package/{publish/Utils → Utils}/date.d.ts +0 -0
  451. /package/{publish/Utils → Utils}/date.js +0 -0
  452. /package/{publish/Utils → Utils}/dom.d.ts +0 -0
  453. /package/{publish/Utils → Utils}/dom.js +0 -0
  454. /package/{publish/Utils → Utils}/easing.d.ts +0 -0
  455. /package/{publish/Utils → Utils}/easing.js +0 -0
  456. /package/{publish/Utils → Utils}/extract.d.ts +0 -0
  457. /package/{publish/Utils → Utils}/extract.js +0 -0
  458. /package/{publish/Utils → Utils}/getElementProperty.d.ts +0 -0
  459. /package/{publish/Utils → Utils}/getElementProperty.js +0 -0
  460. /package/{publish/Utils → Utils}/guid.d.ts +0 -0
  461. /package/{publish/Utils → Utils}/guid.js +0 -0
  462. /package/{publish/Utils → Utils}/initDefaultOptions.d.ts +0 -0
  463. /package/{publish/Utils → Utils}/initDefaultOptions.js +0 -0
  464. /package/{publish/Utils → Utils}/inputsCalculation.d.ts +0 -0
  465. /package/{publish/Utils → Utils}/inputsCalculation.js +0 -0
  466. /package/{publish/Utils → Utils}/math.d.ts +0 -0
  467. /package/{publish/Utils → Utils}/math.js +0 -0
  468. /package/{publish/Utils → Utils}/object.d.ts +0 -0
  469. /package/{publish/Utils → Utils}/object.js +0 -0
  470. /package/{publish/Utils → Utils}/os.d.ts +0 -0
  471. /package/{publish/Utils → Utils}/os.js +0 -0
  472. /package/{publish/Utils → Utils}/performance.d.ts +0 -0
  473. /package/{publish/Utils → Utils}/performance.js +0 -0
  474. /package/{publish/Utils → Utils}/tree.d.ts +0 -0
  475. /package/{publish/Utils → Utils}/tree.js +0 -0
  476. /package/{publish/Utils → Utils}/useAutosizeTextArea.d.ts +0 -0
  477. /package/{publish/Utils → Utils}/useAutosizeTextArea.js +0 -0
  478. /package/{publish/Utils → Utils}/useBoundedDrag.d.ts +0 -0
  479. /package/{publish/Utils → Utils}/useBoundedDrag.js +0 -0
  480. /package/{publish/Utils → Utils}/useClickOutside.d.ts +0 -0
  481. /package/{publish/Utils → Utils}/useClickOutside.js +0 -0
  482. /package/{publish/Utils → Utils}/useComId.d.ts +0 -0
  483. /package/{publish/Utils → Utils}/useComId.js +0 -0
  484. /package/{publish/Utils → Utils}/useDebounce.d.ts +0 -0
  485. /package/{publish/Utils → Utils}/useDebounce.js +0 -0
  486. /package/{publish/Utils → Utils}/useDragDropPosition.d.ts +0 -0
  487. /package/{publish/Utils → Utils}/useDragDropPosition.js +0 -0
  488. /package/{publish/Utils → Utils}/useDraggable.d.ts +0 -0
  489. /package/{publish/Utils → Utils}/useDraggable.js +0 -0
  490. /package/{publish/Utils → Utils}/useInterval.d.ts +0 -0
  491. /package/{publish/Utils → Utils}/useInterval.js +0 -0
  492. /package/{publish/Utils → Utils}/useIsMobile.d.ts +0 -0
  493. /package/{publish/Utils → Utils}/useIsMobile.js +0 -0
  494. /package/{publish/Utils → Utils}/useKeyPress.d.ts +0 -0
  495. /package/{publish/Utils → Utils}/useKeyPress.js +0 -0
  496. /package/{publish/Utils → Utils}/useThrottle.d.ts +0 -0
  497. /package/{publish/Utils → Utils}/useThrottle.js +0 -0
  498. /package/{publish/Utils → Utils}/useWindowScroll.d.ts +0 -0
  499. /package/{publish/Utils → Utils}/useWindowScroll.js +0 -0
  500. /package/{publish/Utils → Utils}/viewport.d.ts +0 -0
  501. /package/{publish/Utils → Utils}/viewport.js +0 -0
@@ -1,1751 +0,0 @@
1
- (function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory(require("react"));
4
- else if(typeof define === 'function' && define.amd)
5
- define(["react"], factory);
6
- else if(typeof exports === 'object')
7
- exports["RPB"] = factory(require("react"));
8
- else
9
- root["RPB"] = factory(root["React"]);
10
- })(this, (__WEBPACK_EXTERNAL_MODULE__787__) => {
11
- return /******/ (() => { // webpackBootstrap
12
- /******/ var __webpack_modules__ = ({
13
-
14
- /***/ 621:
15
- /***/ (function(module, exports, __webpack_require__) {
16
-
17
- /* module decorator */ module = __webpack_require__.nmd(module);
18
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof2(obj); }
19
- (function webpackUniversalModuleDefinition(root, factory) {
20
- if (( false ? 0 : _typeof2(exports)) === 'object' && ( false ? 0 : _typeof2(module)) === 'object') module.exports = factory();else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
21
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
22
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
23
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
24
- })(this, function () {
25
- return (/******/function () {
26
- // webpackBootstrap
27
- /******/
28
- "use strict";
29
-
30
- /******/ // The require scope
31
- /******/
32
- var __nested_webpack_require_993__ = {};
33
- /******/
34
- /************************************************************************/
35
- /******/ /* webpack/runtime/define property getters */
36
- /******/
37
- (function () {
38
- /******/ // define getter functions for harmony exports
39
- /******/__nested_webpack_require_993__.d = function (exports, definition) {
40
- /******/for (var key in definition) {
41
- /******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
42
- /******/Object.defineProperty(exports, key, {
43
- enumerable: true,
44
- get: definition[key]
45
- });
46
- /******/
47
- }
48
- /******/
49
- }
50
- /******/
51
- };
52
- /******/
53
- })();
54
- /******/
55
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
56
- /******/
57
- (function () {
58
- /******/__nested_webpack_require_993__.o = function (obj, prop) {
59
- return Object.prototype.hasOwnProperty.call(obj, prop);
60
- };
61
- /******/
62
- })();
63
- /******/
64
- /******/ /* webpack/runtime/make namespace object */
65
- /******/
66
- (function () {
67
- /******/ // define __esModule on exports
68
- /******/__nested_webpack_require_993__.r = function (exports) {
69
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
70
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
71
- value: 'Module'
72
- });
73
- /******/
74
- }
75
- /******/
76
- Object.defineProperty(exports, '__esModule', {
77
- value: true
78
- });
79
- /******/
80
- };
81
- /******/
82
- })();
83
- /******/
84
- /************************************************************************/
85
- var __webpack_exports__ = {};
86
- __nested_webpack_require_993__.r(__webpack_exports__);
87
- /* harmony export */
88
- __nested_webpack_require_993__.d(__webpack_exports__, {
89
- /* harmony export */"arrayBufferToUint8Array": function arrayBufferToUint8Array() {
90
- return (/* binding */_arrayBufferToUint8Array
91
- );
92
- },
93
- /* harmony export */"arrayToBlob": function arrayToBlob() {
94
- return (/* binding */_arrayToBlob
95
- );
96
- },
97
- /* harmony export */"arrayToStream": function arrayToStream() {
98
- return (/* binding */_arrayToStream
99
- );
100
- },
101
- /* harmony export */"arrayToUint8array": function arrayToUint8array() {
102
- return (/* binding */_arrayToUint8array
103
- );
104
- },
105
- /* harmony export */"base64ToArrayBuffer": function base64ToArrayBuffer() {
106
- return (/* binding */_base64ToArrayBuffer
107
- );
108
- },
109
- /* harmony export */"blobToUint8array": function blobToUint8array() {
110
- return (/* binding */_blobToUint8array
111
- );
112
- },
113
- /* harmony export */"decodeBase64Str": function decodeBase64Str() {
114
- return (/* binding */_decodeBase64Str
115
- );
116
- },
117
- /* harmony export */"readStream": function readStream() {
118
- return (/* binding */_readStream2
119
- );
120
- },
121
- /* harmony export */"toBinary": function toBinary() {
122
- return (/* binding */_toBinary
123
- );
124
- },
125
- /* harmony export */"uint8arrayToArr": function uint8arrayToArr() {
126
- return (/* binding */_uint8arrayToArr
127
- );
128
- },
129
- /* harmony export */"uint8arrayToBase64Str": function uint8arrayToBase64Str() {
130
- return (/* binding */_uint8arrayToBase64Str
131
- );
132
- }
133
- /* harmony export */
134
- });
135
- function _regeneratorRuntime() {
136
- "use strict";
137
-
138
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
139
- _regeneratorRuntime = function _regeneratorRuntime() {
140
- return exports;
141
- };
142
- var exports = {},
143
- Op = Object.prototype,
144
- hasOwn = Op.hasOwnProperty,
145
- defineProperty = Object.defineProperty || function (obj, key, desc) {
146
- obj[key] = desc.value;
147
- },
148
- $Symbol = "function" == typeof Symbol ? Symbol : {},
149
- iteratorSymbol = $Symbol.iterator || "@@iterator",
150
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
151
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
152
- function define(obj, key, value) {
153
- return Object.defineProperty(obj, key, {
154
- value: value,
155
- enumerable: !0,
156
- configurable: !0,
157
- writable: !0
158
- }), obj[key];
159
- }
160
- try {
161
- define({}, "");
162
- } catch (err) {
163
- define = function define(obj, key, value) {
164
- return obj[key] = value;
165
- };
166
- }
167
- function wrap(innerFn, outerFn, self, tryLocsList) {
168
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
169
- generator = Object.create(protoGenerator.prototype),
170
- context = new Context(tryLocsList || []);
171
- return defineProperty(generator, "_invoke", {
172
- value: makeInvokeMethod(innerFn, self, context)
173
- }), generator;
174
- }
175
- function tryCatch(fn, obj, arg) {
176
- try {
177
- return {
178
- type: "normal",
179
- arg: fn.call(obj, arg)
180
- };
181
- } catch (err) {
182
- return {
183
- type: "throw",
184
- arg: err
185
- };
186
- }
187
- }
188
- exports.wrap = wrap;
189
- var ContinueSentinel = {};
190
- function Generator() {}
191
- function GeneratorFunction() {}
192
- function GeneratorFunctionPrototype() {}
193
- var IteratorPrototype = {};
194
- define(IteratorPrototype, iteratorSymbol, function () {
195
- return this;
196
- });
197
- var getProto = Object.getPrototypeOf,
198
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
199
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
200
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
201
- function defineIteratorMethods(prototype) {
202
- ["next", "throw", "return"].forEach(function (method) {
203
- define(prototype, method, function (arg) {
204
- return this._invoke(method, arg);
205
- });
206
- });
207
- }
208
- function AsyncIterator(generator, PromiseImpl) {
209
- function invoke(method, arg, resolve, reject) {
210
- var record = tryCatch(generator[method], generator, arg);
211
- if ("throw" !== record.type) {
212
- var result = record.arg,
213
- value = result.value;
214
- return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
215
- invoke("next", value, resolve, reject);
216
- }, function (err) {
217
- invoke("throw", err, resolve, reject);
218
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
219
- result.value = unwrapped, resolve(result);
220
- }, function (error) {
221
- return invoke("throw", error, resolve, reject);
222
- });
223
- }
224
- reject(record.arg);
225
- }
226
- var previousPromise;
227
- defineProperty(this, "_invoke", {
228
- value: function value(method, arg) {
229
- function callInvokeWithMethodAndArg() {
230
- return new PromiseImpl(function (resolve, reject) {
231
- invoke(method, arg, resolve, reject);
232
- });
233
- }
234
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
235
- }
236
- });
237
- }
238
- function makeInvokeMethod(innerFn, self, context) {
239
- var state = "suspendedStart";
240
- return function (method, arg) {
241
- if ("executing" === state) throw new Error("Generator is already running");
242
- if ("completed" === state) {
243
- if ("throw" === method) throw arg;
244
- return doneResult();
245
- }
246
- for (context.method = method, context.arg = arg;;) {
247
- var delegate = context.delegate;
248
- if (delegate) {
249
- var delegateResult = maybeInvokeDelegate(delegate, context);
250
- if (delegateResult) {
251
- if (delegateResult === ContinueSentinel) continue;
252
- return delegateResult;
253
- }
254
- }
255
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
256
- if ("suspendedStart" === state) throw state = "completed", context.arg;
257
- context.dispatchException(context.arg);
258
- } else "return" === context.method && context.abrupt("return", context.arg);
259
- state = "executing";
260
- var record = tryCatch(innerFn, self, context);
261
- if ("normal" === record.type) {
262
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
263
- return {
264
- value: record.arg,
265
- done: context.done
266
- };
267
- }
268
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
269
- }
270
- };
271
- }
272
- function maybeInvokeDelegate(delegate, context) {
273
- var methodName = context.method,
274
- method = delegate.iterator[methodName];
275
- if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
276
- var record = tryCatch(method, delegate.iterator, context.arg);
277
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
278
- var info = record.arg;
279
- return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
280
- }
281
- function pushTryEntry(locs) {
282
- var entry = {
283
- tryLoc: locs[0]
284
- };
285
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
286
- }
287
- function resetTryEntry(entry) {
288
- var record = entry.completion || {};
289
- record.type = "normal", delete record.arg, entry.completion = record;
290
- }
291
- function Context(tryLocsList) {
292
- this.tryEntries = [{
293
- tryLoc: "root"
294
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
295
- }
296
- function values(iterable) {
297
- if (iterable) {
298
- var iteratorMethod = iterable[iteratorSymbol];
299
- if (iteratorMethod) return iteratorMethod.call(iterable);
300
- if ("function" == typeof iterable.next) return iterable;
301
- if (!isNaN(iterable.length)) {
302
- var i = -1,
303
- next = function next() {
304
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
305
- return next.value = undefined, next.done = !0, next;
306
- };
307
- return next.next = next;
308
- }
309
- }
310
- return {
311
- next: doneResult
312
- };
313
- }
314
- function doneResult() {
315
- return {
316
- value: undefined,
317
- done: !0
318
- };
319
- }
320
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
321
- value: GeneratorFunctionPrototype,
322
- configurable: !0
323
- }), defineProperty(GeneratorFunctionPrototype, "constructor", {
324
- value: GeneratorFunction,
325
- configurable: !0
326
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
327
- var ctor = "function" == typeof genFun && genFun.constructor;
328
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
329
- }, exports.mark = function (genFun) {
330
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
331
- }, exports.awrap = function (arg) {
332
- return {
333
- __await: arg
334
- };
335
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
336
- return this;
337
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
338
- void 0 === PromiseImpl && (PromiseImpl = Promise);
339
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
340
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
341
- return result.done ? result.value : iter.next();
342
- });
343
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
344
- return this;
345
- }), define(Gp, "toString", function () {
346
- return "[object Generator]";
347
- }), exports.keys = function (val) {
348
- var object = Object(val),
349
- keys = [];
350
- for (var key in object) keys.push(key);
351
- return keys.reverse(), function next() {
352
- for (; keys.length;) {
353
- var key = keys.pop();
354
- if (key in object) return next.value = key, next.done = !1, next;
355
- }
356
- return next.done = !0, next;
357
- };
358
- }, exports.values = values, Context.prototype = {
359
- constructor: Context,
360
- reset: function reset(skipTempReset) {
361
- if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
362
- },
363
- stop: function stop() {
364
- this.done = !0;
365
- var rootRecord = this.tryEntries[0].completion;
366
- if ("throw" === rootRecord.type) throw rootRecord.arg;
367
- return this.rval;
368
- },
369
- dispatchException: function dispatchException(exception) {
370
- if (this.done) throw exception;
371
- var context = this;
372
- function handle(loc, caught) {
373
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
374
- }
375
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
376
- var entry = this.tryEntries[i],
377
- record = entry.completion;
378
- if ("root" === entry.tryLoc) return handle("end");
379
- if (entry.tryLoc <= this.prev) {
380
- var hasCatch = hasOwn.call(entry, "catchLoc"),
381
- hasFinally = hasOwn.call(entry, "finallyLoc");
382
- if (hasCatch && hasFinally) {
383
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
384
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
385
- } else if (hasCatch) {
386
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
387
- } else {
388
- if (!hasFinally) throw new Error("try statement without catch or finally");
389
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
390
- }
391
- }
392
- }
393
- },
394
- abrupt: function abrupt(type, arg) {
395
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
396
- var entry = this.tryEntries[i];
397
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
398
- var finallyEntry = entry;
399
- break;
400
- }
401
- }
402
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
403
- var record = finallyEntry ? finallyEntry.completion : {};
404
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
405
- },
406
- complete: function complete(record, afterLoc) {
407
- if ("throw" === record.type) throw record.arg;
408
- return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
409
- },
410
- finish: function finish(finallyLoc) {
411
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
412
- var entry = this.tryEntries[i];
413
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
414
- }
415
- },
416
- "catch": function _catch(tryLoc) {
417
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
418
- var entry = this.tryEntries[i];
419
- if (entry.tryLoc === tryLoc) {
420
- var record = entry.completion;
421
- if ("throw" === record.type) {
422
- var thrown = record.arg;
423
- resetTryEntry(entry);
424
- }
425
- return thrown;
426
- }
427
- }
428
- throw new Error("illegal catch attempt");
429
- },
430
- delegateYield: function delegateYield(iterable, resultName, nextLoc) {
431
- return this.delegate = {
432
- iterator: values(iterable),
433
- resultName: resultName,
434
- nextLoc: nextLoc
435
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
436
- }
437
- }, exports;
438
- }
439
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
440
- try {
441
- var info = gen[key](arg);
442
- var value = info.value;
443
- } catch (error) {
444
- reject(error);
445
- return;
446
- }
447
- if (info.done) {
448
- resolve(value);
449
- } else {
450
- Promise.resolve(value).then(_next, _throw);
451
- }
452
- }
453
- function _asyncToGenerator(fn) {
454
- return function () {
455
- var self = this,
456
- args = arguments;
457
- return new Promise(function (resolve, reject) {
458
- var gen = fn.apply(self, args);
459
- function _next(value) {
460
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
461
- }
462
- function _throw(err) {
463
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
464
- }
465
- _next(undefined);
466
- });
467
- };
468
- }
469
- function _typeof(obj) {
470
- "@babel/helpers - typeof";
471
-
472
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
473
- return typeof obj;
474
- } : function (obj) {
475
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
476
- }, _typeof(obj);
477
- }
478
- /**
479
- * base64 to ArrayBuffer
480
- * @param {String} data
481
- * @returns {ArrayBuffer}
482
- */
483
- /*
484
- @returns:
485
-
486
- ArrayBuffer(522240)
487
-
488
- byteLength: 522240
489
- detached: false
490
- maxByteLength: 522240
491
- resizable: false
492
- [[Prototype]]: ArrayBuffer
493
- [[Int8Array]]: Int8Array(522240)
494
- [[Uint8Array]]: Uint8Array(522240)
495
- [[Int16Array]]: Int16Array(261120)
496
- [[Int32Array]]: Int32Array(130560)
497
- [[ArrayBufferByteLength]]: 522240
498
- [[ArrayBufferData]]: 673
499
- */
500
- function _base64ToArrayBuffer(data) {
501
- var res = data;
502
- if (data.indexOf('base64,') >= 0) {
503
- res = data.split('base64,')[1];
504
- }
505
- var binaryString = atob(res);
506
- var bytes = new Uint8Array(binaryString.length);
507
- for (var i = 0; i < binaryString.length; i++) {
508
- bytes[i] = binaryString.charCodeAt(i);
509
- }
510
- return bytes.buffer;
511
- }
512
-
513
- /**
514
- * ArrayBuffer to Uint8Array
515
- * @param {ArrayBuffer} data
516
- * @returns {Uint8Array}
517
- */
518
- /*
519
- @returns:
520
-
521
- Uint8Array(522240) [208, 207, 17, 224, 161, 177, 26, 225, 0, 0, ......]
522
- */
523
- function _arrayBufferToUint8Array(data) {
524
- return new Uint8Array(data);
525
- }
526
-
527
- /**
528
- * uint8array to array
529
- * @param {Uint8Array} data
530
- * @returns {Array}
531
- */
532
- function _uint8arrayToArr(data) {
533
- return Array.from(data);
534
- }
535
-
536
- /**
537
- * array to uint8array
538
- * @param {Array} data
539
- * @returns {Uint8Array}
540
- */
541
- /* Example:
542
-
543
- axios({
544
- method: 'get',
545
- url: 'http://xxxx',
546
- responseType: 'arraybuffer'
547
- })
548
- .then(function (res) {
549
- //res.data ==> ArrayBuffer(xxxx)
550
- const b64string = uint8arrayToBase64Str(res.data);
551
- const uint8ArrayData = arrayToUint8array(res.data);
552
-
553
- // do something
554
-
555
- });
556
- */
557
- function _arrayToUint8array(data) {
558
- return new Uint8Array(data);
559
- }
560
-
561
- /**
562
- * uint8array to base64 string
563
- * @param {Uint8Array|Array} data
564
- * @returns {String}
565
- */
566
- function _uint8arrayToBase64Str(data) {
567
- if ((typeof Buffer === "undefined" ? "undefined" : _typeof(Buffer)) !== ( true ? "undefined" : 0)) {
568
- return Buffer.from(data, 'binary').toString('base64'); // node.js too
569
- } else {
570
- var binary = '';
571
- var bytes = new Uint8Array(data);
572
- var len = bytes.byteLength;
573
- for (var i = 0; i < len; i++) {
574
- binary += String.fromCharCode(bytes[i]);
575
- }
576
- return window.btoa(binary);
577
- }
578
- }
579
-
580
- /**
581
- * decode base64 string
582
- * @param {String} data
583
- * @returns {String}
584
- */
585
- function _decodeBase64Str(data) {
586
- // avoid messy code
587
- // especially for Chinese, avoid using encodeURIComponent() and encodeURI()
588
- var decoded = decodeURIComponent(escape(atob(data)));
589
- return decoded;
590
- }
591
-
592
- /**
593
- * integer to binary
594
- * @param {Number} data
595
- * @returns {String}
596
- */
597
- function _toBinary(data) {
598
- if (!Number.isSafeInteger(data)) {
599
- throw new TypeError('value must be a safe integer');
600
- }
601
- return (data >>> 0).toString(2);
602
- }
603
-
604
- /**
605
- * array to blob
606
- * @param {Uint8Array} uint8ArrayData
607
- * @returns {Blob}
608
- */
609
- function _arrayToBlob(uint8ArrayData) {
610
- return new Blob([uint8ArrayData], {
611
- type: "text/plain"
612
- });
613
- }
614
-
615
- /**
616
- * blob to uint8array
617
- * @param {Blob} data
618
- * @returns {Uint8Array}
619
- */
620
- function _blobToUint8array(data) {
621
- return new Promise(function (resolve, reject) {
622
- var reader = new FileReader();
623
- reader.addEventListener("loadend", function () {
624
- resolve(reader.result);
625
- });
626
- reader.readAsArrayBuffer(data);
627
- });
628
- }
629
-
630
- /**
631
- * array to stream
632
- * @param {Array<Uint8Array>} data
633
- * @returns {ReadableStream }
634
- */
635
- /* Example:
636
-
637
- const uint8ArrayDataArr = [
638
- [137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,30,0,0,0,30,8,6,0,0,0,59,48,174,162,0,0,0,220,73,68,65,84,72,199,237,214,81,14,194,32,12,0,80,60,128,215,219,49,28,91,118,10,55,216,53,188,132,137,39,19,71,130,75,69,42,148,194,76,116,31,253,89,40,111,233,104,153,48,198,136,111,132,216,225,255,134,143,151,166,84,28,150,152,151,24,158,207,182,130,45,106,92,12,91,193,16,93,241,218,112,8,181,113,174,9,163,232,90,234,130,223,50,134,142,47,135,11,36,216,183,57,49,81,29,67,125,120,116,11,238,12,60,9,133,240,228,45,180,120,91,11,133,112,31,72,176,184,100,162,19,150,3,75,157,139,147,209,208,225,234,136,184,202,65,177,118,146,200,102,178,20,250,169,143,49,188,43,129,198,6,136,116,101,246,55,191,33,168,162,116,65,108,114,97,56,11,77,29,153,109,4,87,57,195,38,117,86,95,75,162,20,56,84,114,205,153,233,148,219,9,226,154,123,131,81,175,69,201,41,239,27,188,255,222,254,52,252,0,234,253,186,89,222,225,73,252,0,0,0,0,73,69,78,68,174,66,96,130]
639
- ];
640
- const readableStream = arrayToStream(uint8ArrayDataArr);
641
-
642
- */
643
- function _arrayToStream(data) {
644
- // @return --> ReadableStream {locked: false}
645
- return new ReadableStream({
646
- start: function start(controller) {
647
- // push a chunk
648
- data.forEach(function (chunk) {
649
- controller.enqueue(new Uint8Array(chunk));
650
- });
651
- },
652
- pull: function pull(controller) {
653
- // Called `read()` when the controller's queue is empty.
654
- //controller.enqueue(...);
655
- controller.close();
656
- },
657
- cancel: function cancel(reason) {
658
- // Called when the stream is canceled.
659
- }
660
- });
661
- }
662
-
663
- /**
664
- * read stream
665
- * @param {ReadableStream } data
666
- * @returns {Promise}
667
- */
668
- /* Example:
669
-
670
- readStream(readableStream).then((value) => {
671
- console.log(value);
672
- // iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAA3ElEQVRIx+3WUQ7CIAwAUDyA19sxHFt2CjfYNbyEiScTR4JLRSqUwkx0H/1ZKG/paJkwxohvhNjh/4aPl6ZUHJaYlxiez7aCLWpcDFvBEF3x2nAItXGuCaPoWuqC3zKGji+HCyTYtzkxUR1DfXh0C+4MPAmF8OQttHhbC4VwH0iwuGSiE5YDS52Lk9HQ4eqIuMpBsXaSyGayFPqpjzG8K4HGBoh0ZfY3vyGoonRBbHJhOAtNHZltBFc5wyZ1Vl9LohQ4VHLNmemU2wnimnuDUa9FySnvG7z/3v40/ADq/bpZ3uFJ/AAAAABJRU5ErkJggg==
673
-
674
- // test: <img src="data:image/png;base64,iVBORw0KGgo..." >
675
-
676
- });
677
- */
678
- function _readStream2(_x) {
679
- return _readStream.apply(this, arguments);
680
- }
681
- function _readStream() {
682
- _readStream = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(data) {
683
- var resReceived, stream, readInto;
684
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
685
- while (1) switch (_context3.prev = _context3.next) {
686
- case 0:
687
- resReceived = '';
688
- stream = data; // ReadableStream {locked: false}
689
- readInto = /*#__PURE__*/function () {
690
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(stream) {
691
- var reader, pump, _pump;
692
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
693
- while (1) switch (_context2.prev = _context2.next) {
694
- case 0:
695
- _pump = function _pump3() {
696
- _pump = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
697
- var _yield$reader$read, done, value, base64String;
698
- return _regeneratorRuntime().wrap(function _callee$(_context) {
699
- while (1) switch (_context.prev = _context.next) {
700
- case 0:
701
- _context.next = 2;
702
- return reader.read();
703
- case 2:
704
- _yield$reader$read = _context.sent;
705
- done = _yield$reader$read.done;
706
- value = _yield$reader$read.value;
707
- if (!done) {
708
- _context.next = 7;
709
- break;
710
- }
711
- return _context.abrupt("return");
712
- case 7:
713
- // value for fetch streams is a Uint8Array
714
- base64String = _uint8arrayToBase64Str(value);
715
- resReceived += base64String;
716
- return _context.abrupt("return", pump());
717
- case 10:
718
- case "end":
719
- return _context.stop();
720
- }
721
- }, _callee);
722
- }));
723
- return _pump.apply(this, arguments);
724
- };
725
- pump = function _pump2() {
726
- return _pump.apply(this, arguments);
727
- };
728
- reader = stream.getReader();
729
- return _context2.abrupt("return", pump());
730
- case 4:
731
- case "end":
732
- return _context2.stop();
733
- }
734
- }, _callee2);
735
- }));
736
- return function readInto(_x2) {
737
- return _ref.apply(this, arguments);
738
- };
739
- }();
740
- _context3.next = 5;
741
- return readInto(stream);
742
- case 5:
743
- return _context3.abrupt("return", resReceived);
744
- case 6:
745
- case "end":
746
- return _context3.stop();
747
- }
748
- }, _callee3);
749
- }));
750
- return _readStream.apply(this, arguments);
751
- }
752
-
753
- /******/
754
- return __webpack_exports__;
755
- /******/
756
- }()
757
- );
758
- });
759
-
760
- /***/ }),
761
-
762
- /***/ 188:
763
- /***/ (function(module, exports, __webpack_require__) {
764
-
765
- /* module decorator */ module = __webpack_require__.nmd(module);
766
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof2(obj); }
767
- (function webpackUniversalModuleDefinition(root, factory) {
768
- if (( false ? 0 : _typeof2(exports)) === 'object' && ( false ? 0 : _typeof2(module)) === 'object') module.exports = factory();else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
769
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
770
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
771
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
772
- })(this, function () {
773
- return (/******/function () {
774
- // webpackBootstrap
775
- /******/
776
- "use strict";
777
-
778
- /******/ // The require scope
779
- /******/
780
- var __nested_webpack_require_993__ = {};
781
- /******/
782
- /************************************************************************/
783
- /******/ /* webpack/runtime/define property getters */
784
- /******/
785
- (function () {
786
- /******/ // define getter functions for harmony exports
787
- /******/__nested_webpack_require_993__.d = function (exports, definition) {
788
- /******/for (var key in definition) {
789
- /******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
790
- /******/Object.defineProperty(exports, key, {
791
- enumerable: true,
792
- get: definition[key]
793
- });
794
- /******/
795
- }
796
- /******/
797
- }
798
- /******/
799
- };
800
- /******/
801
- })();
802
- /******/
803
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
804
- /******/
805
- (function () {
806
- /******/__nested_webpack_require_993__.o = function (obj, prop) {
807
- return Object.prototype.hasOwnProperty.call(obj, prop);
808
- };
809
- /******/
810
- })();
811
- /******/
812
- /******/ /* webpack/runtime/make namespace object */
813
- /******/
814
- (function () {
815
- /******/ // define __esModule on exports
816
- /******/__nested_webpack_require_993__.r = function (exports) {
817
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
818
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
819
- value: 'Module'
820
- });
821
- /******/
822
- }
823
- /******/
824
- Object.defineProperty(exports, '__esModule', {
825
- value: true
826
- });
827
- /******/
828
- };
829
- /******/
830
- })();
831
- /******/
832
- /************************************************************************/
833
- var __webpack_exports__ = {};
834
- __nested_webpack_require_993__.r(__webpack_exports__);
835
- /* harmony export */
836
- __nested_webpack_require_993__.d(__webpack_exports__, {
837
- /* harmony export */"clsWrite": function clsWrite() {
838
- return (/* binding */_clsWrite
839
- );
840
- },
841
- /* harmony export */"combinedCls": function combinedCls() {
842
- return (/* binding */_combinedCls
843
- );
844
- }
845
- /* harmony export */
846
- });
847
- function _slicedToArray(arr, i) {
848
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
849
- }
850
- function _nonIterableRest() {
851
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
852
- }
853
- function _unsupportedIterableToArray(o, minLen) {
854
- if (!o) return;
855
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
856
- var n = Object.prototype.toString.call(o).slice(8, -1);
857
- if (n === "Object" && o.constructor) n = o.constructor.name;
858
- if (n === "Map" || n === "Set") return Array.from(o);
859
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
860
- }
861
- function _arrayLikeToArray(arr, len) {
862
- if (len == null || len > arr.length) len = arr.length;
863
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
864
- return arr2;
865
- }
866
- function _iterableToArrayLimit(arr, i) {
867
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
868
- if (null != _i) {
869
- var _s,
870
- _e,
871
- _x,
872
- _r,
873
- _arr = [],
874
- _n = !0,
875
- _d = !1;
876
- try {
877
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
878
- if (Object(_i) !== _i) return;
879
- _n = !1;
880
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
881
- } catch (err) {
882
- _d = !0, _e = err;
883
- } finally {
884
- try {
885
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
886
- } finally {
887
- if (_d) throw _e;
888
- }
889
- }
890
- return _arr;
891
- }
892
- }
893
- function _arrayWithHoles(arr) {
894
- if (Array.isArray(arr)) return arr;
895
- }
896
- function _typeof(obj) {
897
- "@babel/helpers - typeof";
898
-
899
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
900
- return typeof obj;
901
- } : function (obj) {
902
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
903
- }, _typeof(obj);
904
- }
905
- /**
906
- * Output of class name
907
- * @param {*} s - Any
908
- * @param {String} defaultCls - Default string
909
- * @param {?*} targetCls - Any
910
- * @returns {*}
911
- */
912
- function _clsWrite(s, defaultCls) {
913
- var targetCls = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
914
- return s || s === '' ? typeof targetCls === 'undefined' ? s : targetCls : defaultCls;
915
- }
916
-
917
- /**
918
- * Combined classnames
919
- * @param {*} args
920
- * @returns {String|undefined}
921
- */
922
- /* Usage:
923
-
924
- console.log(combinedCls('a-1', 'a-2', 'a-3', {
925
- 'p-1': null,
926
- 'p-2': undefined,
927
- 'p-3': true,
928
- 'p-4': false,
929
- 'p-5': 'kkk',
930
- 'p-6': 0,
931
- 'p-7': 1,
932
- 'p-8': '',
933
- undefined
934
- })); // a-1 a-2 a-3 p-3 p-5 p-7
935
- */
936
- function _combinedCls() {
937
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
938
- args[_key] = arguments[_key];
939
- }
940
- if (args) {
941
- var classes = [];
942
- for (var i = 0; i < args.length; i++) {
943
- var className = args[i];
944
- if (!className) {
945
- continue;
946
- }
947
- var type = _typeof(className);
948
- if (type === 'string' || type === 'number') {
949
- classes.push(className);
950
- } else if (type === 'object') {
951
- var _classes = Array.isArray(className) ? className : Object.entries(className).map(function (_ref) {
952
- var _ref2 = _slicedToArray(_ref, 2),
953
- key = _ref2[0],
954
- value = _ref2[1];
955
- return value ? key : null;
956
- });
957
- classes = _classes.length ? classes.concat(_classes.filter(function (c) {
958
- return !!c;
959
- })) : classes;
960
- }
961
- }
962
- return classes.join(' ').trim();
963
- }
964
- return undefined;
965
- }
966
-
967
- /******/
968
- return __webpack_exports__;
969
- /******/
970
- }()
971
- );
972
- });
973
-
974
- /***/ }),
975
-
976
- /***/ 85:
977
- /***/ (function(module, exports, __webpack_require__) {
978
-
979
- /* module decorator */ module = __webpack_require__.nmd(module);
980
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
981
- (function webpackUniversalModuleDefinition(root, factory) {
982
- if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory(__webpack_require__(787));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(787)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
983
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
984
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
985
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
986
- })(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
987
- return (/******/function () {
988
- // webpackBootstrap
989
- /******/
990
- "use strict";
991
-
992
- /******/
993
- var __webpack_modules__ = {
994
- /***/787: /***/function _(module) {
995
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
996
-
997
- /***/
998
- }
999
-
1000
- /******/
1001
- };
1002
- /************************************************************************/
1003
- /******/ // The module cache
1004
- /******/
1005
- var __webpack_module_cache__ = {};
1006
- /******/
1007
- /******/ // The require function
1008
- /******/
1009
- function __nested_webpack_require_1465__(moduleId) {
1010
- /******/ // Check if module is in cache
1011
- /******/var cachedModule = __webpack_module_cache__[moduleId];
1012
- /******/
1013
- if (cachedModule !== undefined) {
1014
- /******/return cachedModule.exports;
1015
- /******/
1016
- }
1017
- /******/ // Create a new module (and put it into the cache)
1018
- /******/
1019
- var module = __webpack_module_cache__[moduleId] = {
1020
- /******/ // no module.id needed
1021
- /******/ // no module.loaded needed
1022
- /******/exports: {}
1023
- /******/
1024
- };
1025
- /******/
1026
- /******/ // Execute the module function
1027
- /******/
1028
- __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1465__);
1029
- /******/
1030
- /******/ // Return the exports of the module
1031
- /******/
1032
- return module.exports;
1033
- /******/
1034
- }
1035
- /******/
1036
- /************************************************************************/
1037
- /******/ /* webpack/runtime/compat get default export */
1038
- /******/
1039
- (function () {
1040
- /******/ // getDefaultExport function for compatibility with non-harmony modules
1041
- /******/__nested_webpack_require_1465__.n = function (module) {
1042
- /******/var getter = module && module.__esModule ? /******/function () {
1043
- return module['default'];
1044
- } : /******/function () {
1045
- return module;
1046
- };
1047
- /******/
1048
- __nested_webpack_require_1465__.d(getter, {
1049
- a: getter
1050
- });
1051
- /******/
1052
- return getter;
1053
- /******/
1054
- };
1055
- /******/
1056
- })();
1057
- /******/
1058
- /******/ /* webpack/runtime/define property getters */
1059
- /******/
1060
- (function () {
1061
- /******/ // define getter functions for harmony exports
1062
- /******/__nested_webpack_require_1465__.d = function (exports, definition) {
1063
- /******/for (var key in definition) {
1064
- /******/if (__nested_webpack_require_1465__.o(definition, key) && !__nested_webpack_require_1465__.o(exports, key)) {
1065
- /******/Object.defineProperty(exports, key, {
1066
- enumerable: true,
1067
- get: definition[key]
1068
- });
1069
- /******/
1070
- }
1071
- /******/
1072
- }
1073
- /******/
1074
- };
1075
- /******/
1076
- })();
1077
- /******/
1078
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
1079
- /******/
1080
- (function () {
1081
- /******/__nested_webpack_require_1465__.o = function (obj, prop) {
1082
- return Object.prototype.hasOwnProperty.call(obj, prop);
1083
- };
1084
- /******/
1085
- })();
1086
- /******/
1087
- /******/ /* webpack/runtime/make namespace object */
1088
- /******/
1089
- (function () {
1090
- /******/ // define __esModule on exports
1091
- /******/__nested_webpack_require_1465__.r = function (exports) {
1092
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1093
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
1094
- value: 'Module'
1095
- });
1096
- /******/
1097
- }
1098
- /******/
1099
- Object.defineProperty(exports, '__esModule', {
1100
- value: true
1101
- });
1102
- /******/
1103
- };
1104
- /******/
1105
- })();
1106
- /******/
1107
- /************************************************************************/
1108
- var __webpack_exports__ = {};
1109
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
1110
- (function () {
1111
- __nested_webpack_require_1465__.r(__webpack_exports__);
1112
- /* harmony export */
1113
- __nested_webpack_require_1465__.d(__webpack_exports__, {
1114
- /* harmony export */"default": function _default() {
1115
- return __WEBPACK_DEFAULT_EXPORT__;
1116
- }
1117
- /* harmony export */
1118
- });
1119
- /* harmony import */
1120
- var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1465__(787);
1121
- /* harmony import */
1122
- var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1465__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1123
- /**
1124
- * Create an available ID
1125
- *
1126
- */
1127
-
1128
- var useComId = function useComId() {
1129
- return "ID-".concat((0, react__WEBPACK_IMPORTED_MODULE_0__.useId)().replace(/\:/g, "-"));
1130
- };
1131
- /* harmony default export */
1132
- var __WEBPACK_DEFAULT_EXPORT__ = useComId;
1133
- })();
1134
-
1135
- /******/
1136
- return __webpack_exports__;
1137
- /******/
1138
- }()
1139
- );
1140
- });
1141
-
1142
- /***/ }),
1143
-
1144
- /***/ 787:
1145
- /***/ ((module) => {
1146
-
1147
- "use strict";
1148
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
1149
-
1150
- /***/ })
1151
-
1152
- /******/ });
1153
- /************************************************************************/
1154
- /******/ // The module cache
1155
- /******/ var __webpack_module_cache__ = {};
1156
- /******/
1157
- /******/ // The require function
1158
- /******/ function __webpack_require__(moduleId) {
1159
- /******/ // Check if module is in cache
1160
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
1161
- /******/ if (cachedModule !== undefined) {
1162
- /******/ return cachedModule.exports;
1163
- /******/ }
1164
- /******/ // Create a new module (and put it into the cache)
1165
- /******/ var module = __webpack_module_cache__[moduleId] = {
1166
- /******/ id: moduleId,
1167
- /******/ loaded: false,
1168
- /******/ exports: {}
1169
- /******/ };
1170
- /******/
1171
- /******/ // Execute the module function
1172
- /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
1173
- /******/
1174
- /******/ // Flag the module as loaded
1175
- /******/ module.loaded = true;
1176
- /******/
1177
- /******/ // Return the exports of the module
1178
- /******/ return module.exports;
1179
- /******/ }
1180
- /******/
1181
- /************************************************************************/
1182
- /******/ /* webpack/runtime/compat get default export */
1183
- /******/ (() => {
1184
- /******/ // getDefaultExport function for compatibility with non-harmony modules
1185
- /******/ __webpack_require__.n = (module) => {
1186
- /******/ var getter = module && module.__esModule ?
1187
- /******/ () => (module['default']) :
1188
- /******/ () => (module);
1189
- /******/ __webpack_require__.d(getter, { a: getter });
1190
- /******/ return getter;
1191
- /******/ };
1192
- /******/ })();
1193
- /******/
1194
- /******/ /* webpack/runtime/define property getters */
1195
- /******/ (() => {
1196
- /******/ // define getter functions for harmony exports
1197
- /******/ __webpack_require__.d = (exports, definition) => {
1198
- /******/ for(var key in definition) {
1199
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
1200
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
1201
- /******/ }
1202
- /******/ }
1203
- /******/ };
1204
- /******/ })();
1205
- /******/
1206
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
1207
- /******/ (() => {
1208
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
1209
- /******/ })();
1210
- /******/
1211
- /******/ /* webpack/runtime/make namespace object */
1212
- /******/ (() => {
1213
- /******/ // define __esModule on exports
1214
- /******/ __webpack_require__.r = (exports) => {
1215
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1216
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1217
- /******/ }
1218
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
1219
- /******/ };
1220
- /******/ })();
1221
- /******/
1222
- /******/ /* webpack/runtime/node module decorator */
1223
- /******/ (() => {
1224
- /******/ __webpack_require__.nmd = (module) => {
1225
- /******/ module.paths = [];
1226
- /******/ if (!module.children) module.children = [];
1227
- /******/ return module;
1228
- /******/ };
1229
- /******/ })();
1230
- /******/
1231
- /************************************************************************/
1232
- var __webpack_exports__ = {};
1233
- // This entry need to be wrapped in an IIFE because it need to be in strict mode.
1234
- (() => {
1235
- "use strict";
1236
- __webpack_require__.r(__webpack_exports__);
1237
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1238
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1239
- /* harmony export */ });
1240
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(787);
1241
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1242
- /* harmony import */ var funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(85);
1243
- /* harmony import */ var funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1__);
1244
- /* harmony import */ var funda_utils_dist_cjs_buffer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(621);
1245
- /* harmony import */ var funda_utils_dist_cjs_buffer__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_buffer__WEBPACK_IMPORTED_MODULE_2__);
1246
- /* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(188);
1247
- /* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_3__);
1248
- var _excluded = ["contentRef", "wrapperClassName", "controlClassName", "controlExClassName", "labelClassName", "labelHoverClassName", "accept", "inline", "autoSubmit", "fetchUrl", "fetchMethod", "fetchParams", "multiple", "submitLabel", "submitClassName", "progressLabel", "progressClassName", "disabled", "required", "value", "requiredLabel", "label", "name", "id", "data", "tabIndex", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "onChange", "onComplete", "onProgress"];
1249
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1250
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1251
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1252
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
1253
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1254
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
1255
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1256
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
1257
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
1258
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1259
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function (_e2) { function e(_x6) { return _e2.apply(this, arguments); } e.toString = function () { return _e2.toString(); }; return e; }(function (e) { throw e; }), f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function (_e3) { function e(_x7) { return _e3.apply(this, arguments); } e.toString = function () { return _e3.toString(); }; return e; }(function (e) { didErr = true; err = e; }), f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
1260
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
1261
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
1262
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
1263
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
1264
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1265
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1266
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
1267
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
1268
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
1269
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1270
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
1271
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
1272
-
1273
-
1274
-
1275
-
1276
- var File = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, externalRef) {
1277
- var contentRef = props.contentRef,
1278
- wrapperClassName = props.wrapperClassName,
1279
- controlClassName = props.controlClassName,
1280
- controlExClassName = props.controlExClassName,
1281
- labelClassName = props.labelClassName,
1282
- labelHoverClassName = props.labelHoverClassName,
1283
- accept = props.accept,
1284
- inline = props.inline,
1285
- autoSubmit = props.autoSubmit,
1286
- fetchUrl = props.fetchUrl,
1287
- fetchMethod = props.fetchMethod,
1288
- fetchParams = props.fetchParams,
1289
- multiple = props.multiple,
1290
- submitLabel = props.submitLabel,
1291
- submitClassName = props.submitClassName,
1292
- progressLabel = props.progressLabel,
1293
- progressClassName = props.progressClassName,
1294
- disabled = props.disabled,
1295
- required = props.required,
1296
- value = props.value,
1297
- requiredLabel = props.requiredLabel,
1298
- label = props.label,
1299
- name = props.name,
1300
- id = props.id,
1301
- data = props.data,
1302
- tabIndex = props.tabIndex,
1303
- fetchFuncAsync = props.fetchFuncAsync,
1304
- fetchFuncMethod = props.fetchFuncMethod,
1305
- fetchFuncMethodParams = props.fetchFuncMethodParams,
1306
- onChange = props.onChange,
1307
- onComplete = props.onComplete,
1308
- onProgress = props.onProgress,
1309
- attributes = _objectWithoutProperties(props, _excluded);
1310
- var uniqueID = funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1___default()();
1311
- var idRes = id || uniqueID;
1312
- var rootRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
1313
- var fileInputRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
1314
- var labelRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
1315
- var submitRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
1316
- var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
1317
- _useState2 = _slicedToArray(_useState, 2),
1318
- forceUpdate = _useState2[0],
1319
- setForceUpdate = _useState2[1];
1320
- var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
1321
- _useState4 = _slicedToArray(_useState3, 2),
1322
- defaultValue = _useState4[0],
1323
- setDefaultValue = _useState4[1];
1324
- var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
1325
- _useState6 = _slicedToArray(_useState5, 2),
1326
- incomingData = _useState6[0],
1327
- setIncomingData = _useState6[1];
1328
- var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
1329
- _useState8 = _slicedToArray(_useState7, 2),
1330
- progressing = _useState8[0],
1331
- setProgressing = _useState8[1];
1332
-
1333
- // exposes the following methods
1334
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(contentRef, function () {
1335
- return {
1336
- upload: function upload(val) {
1337
- handleSubmit(null);
1338
- }
1339
- };
1340
- }, [contentRef]);
1341
- var getExt = function getExt(filename) {
1342
- var ext = /^.+\.([^.]+)$/.exec(filename);
1343
- return ext == null ? "" : ext[1];
1344
- };
1345
- function resetDefaultVal() {
1346
- setDefaultValue(undefined);
1347
- fileInputRef.current.value = '';
1348
- }
1349
- function handleFileInput(event) {
1350
- if (fileInputRef.current.nextSibling.contains(document.activeElement)) {
1351
- // Bind space to trigger clicking of the button when focused
1352
- if (event.keyCode === 32) {
1353
- fileInputRef.current.click();
1354
- }
1355
- }
1356
- }
1357
- function fetchData(_x2, _x3) {
1358
- return _fetchData.apply(this, arguments);
1359
- }
1360
- function _fetchData() {
1361
- _fetchData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params, data) {
1362
- var response;
1363
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
1364
- while (1) switch (_context4.prev = _context4.next) {
1365
- case 0:
1366
- if (!(_typeof(fetchFuncAsync) === 'object')) {
1367
- _context4.next = 7;
1368
- break;
1369
- }
1370
- _context4.next = 3;
1371
- return fetchFuncAsync["".concat(fetchFuncMethod)].apply(fetchFuncAsync, _toConsumableArray(params.split(',')).concat([data]));
1372
- case 3:
1373
- response = _context4.sent;
1374
- return _context4.abrupt("return", response.data);
1375
- case 7:
1376
- return _context4.abrupt("return", null);
1377
- case 8:
1378
- case "end":
1379
- return _context4.stop();
1380
- }
1381
- }, _callee4);
1382
- }));
1383
- return _fetchData.apply(this, arguments);
1384
- }
1385
- function fetchDataDefault(_x4) {
1386
- return _fetchDataDefault.apply(this, arguments);
1387
- }
1388
- function _fetchDataDefault() {
1389
- _fetchDataDefault = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(url) {
1390
- var data,
1391
- methord,
1392
- res,
1393
- _len,
1394
- rest,
1395
- _key,
1396
- response,
1397
- _args5 = arguments;
1398
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
1399
- while (1) switch (_context5.prev = _context5.next) {
1400
- case 0:
1401
- data = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
1402
- methord = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : 'GET';
1403
- res = {};
1404
- if (!(typeof window === 'undefined')) {
1405
- _context5.next = 5;
1406
- break;
1407
- }
1408
- return _context5.abrupt("return", res);
1409
- case 5:
1410
- _context5.prev = 5;
1411
- for (_len = _args5.length, rest = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
1412
- rest[_key - 3] = _args5[_key];
1413
- }
1414
- _context5.next = 9;
1415
- return fetch(url + '?' + new URLSearchParams(fetchParams), _objectSpread({
1416
- method: methord,
1417
- body: data
1418
- }, rest));
1419
- case 9:
1420
- response = _context5.sent;
1421
- _context5.next = 12;
1422
- return response.json();
1423
- case 12:
1424
- res = _context5.sent;
1425
- _context5.next = 18;
1426
- break;
1427
- case 15:
1428
- _context5.prev = 15;
1429
- _context5.t0 = _context5["catch"](5);
1430
- res = {
1431
- 'error': _context5.t0
1432
- };
1433
- case 18:
1434
- return _context5.abrupt("return", res);
1435
- case 19:
1436
- case "end":
1437
- return _context5.stop();
1438
- }
1439
- }, _callee5, null, [[5, 15]]);
1440
- }));
1441
- return _fetchDataDefault.apply(this, arguments);
1442
- }
1443
- function handleLabelEnter(event) {
1444
- event.currentTarget.getElementsByTagName('button')[0].className = labelHoverClassName ? labelHoverClassName : 'btn btn-primary';
1445
- }
1446
- function handleLabelLeave(event) {
1447
- event.currentTarget.getElementsByTagName('button')[0].className = labelClassName ? labelClassName : 'btn btn-outline-secondary';
1448
- }
1449
- function handleSubmit(event) {
1450
- if (event) event.preventDefault();
1451
- var curFiles = fileInputRef.current.files;
1452
- var interceptRequests = onProgress === null || onProgress === void 0 ? void 0 : onProgress(curFiles, fileInputRef.current, submitRef.current);
1453
-
1454
- // interceptor
1455
- //----------------------------------------------------------------
1456
- if (interceptRequests === false) return;
1457
- setProgressing(true);
1458
- if (fetchUrl) {
1459
- var formData = new FormData();
1460
- formData.append('action', 'upload_plug_action');
1461
- for (var i = 0; i < curFiles.length; i++) {
1462
- formData.append("clientFiles", curFiles[i]);
1463
- }
1464
- fetchDataDefault(fetchUrl, formData, fetchMethod ? fetchMethod : 'POST', {
1465
- headers: {
1466
- 'Content-Type': 'multipart/form-data'
1467
- }
1468
- }).then(function (response) {
1469
- var jsonData = response.data;
1470
- onComplete === null || onComplete === void 0 ? void 0 : onComplete(fileInputRef.current, submitRef.current, jsonData, incomingData);
1471
- setProgressing(false);
1472
-
1473
- // update default value
1474
- resetDefaultVal();
1475
- });
1476
- } else {
1477
- if (_typeof(fetchFuncAsync) === 'object') {
1478
- // Using custom request structure of class
1479
- //----------------------------------------------------------------
1480
- var streamToText = /*#__PURE__*/function () {
1481
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(blob) {
1482
- var readableStream, chunk;
1483
- return _regeneratorRuntime().wrap(function _callee$(_context) {
1484
- while (1) switch (_context.prev = _context.next) {
1485
- case 0:
1486
- _context.next = 2;
1487
- return blob.getReader();
1488
- case 2:
1489
- readableStream = _context.sent;
1490
- _context.next = 5;
1491
- return readableStream.read();
1492
- case 5:
1493
- chunk = _context.sent;
1494
- return _context.abrupt("return", new TextDecoder('utf-8').decode(chunk.value));
1495
- case 7:
1496
- case "end":
1497
- return _context.stop();
1498
- }
1499
- }, _callee);
1500
- }));
1501
- return function streamToText(_x5) {
1502
- return _ref.apply(this, arguments);
1503
- };
1504
- }();
1505
- _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
1506
- var allFiles, _i2, file, fileSliceBlob, fileSliceBlobStream;
1507
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1508
- while (1) switch (_context2.prev = _context2.next) {
1509
- case 0:
1510
- allFiles = [];
1511
- _i2 = 0;
1512
- case 2:
1513
- if (!(_i2 < curFiles.length)) {
1514
- _context2.next = 16;
1515
- break;
1516
- }
1517
- file = curFiles[_i2];
1518
- fileSliceBlob = file.slice(0, file.length);
1519
- _context2.next = 7;
1520
- return fileSliceBlob.stream();
1521
- case 7:
1522
- fileSliceBlobStream = _context2.sent;
1523
- _context2.t0 = allFiles;
1524
- _context2.next = 11;
1525
- return streamToText(fileSliceBlobStream);
1526
- case 11:
1527
- _context2.t1 = _context2.sent;
1528
- _context2.t0.push.call(_context2.t0, _context2.t1);
1529
- case 13:
1530
- _i2++;
1531
- _context2.next = 2;
1532
- break;
1533
- case 16:
1534
- //send
1535
- Promise.all(allFiles).then(function (values) {
1536
- var _params = fetchFuncMethodParams || [];
1537
- fetchData(_params.join(','), values).then(function (res) {
1538
- onComplete === null || onComplete === void 0 ? void 0 : onComplete(fileInputRef.current, submitRef.current, res, incomingData);
1539
- setProgressing(false);
1540
-
1541
- // update default value
1542
- resetDefaultVal();
1543
- });
1544
- });
1545
- case 17:
1546
- case "end":
1547
- return _context2.stop();
1548
- }
1549
- }, _callee2);
1550
- }))();
1551
- } else {
1552
- // Using ReadableStream
1553
- //----------------------------------------------------------------
1554
- _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
1555
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1556
- while (1) switch (_context3.prev = _context3.next) {
1557
- case 0:
1558
- // setFilesData
1559
- [].slice.call(curFiles).forEach(function (file) {
1560
- var size = file.size;
1561
- var mimeType = file.type;
1562
- var name = file.name;
1563
- var ext = getExt(name);
1564
-
1565
- // get file content
1566
- var reader = new FileReader();
1567
- reader.addEventListener('load', function (event) {
1568
- var b64string = event.currentTarget.result;
1569
- var arrayBufferData = (0,funda_utils_dist_cjs_buffer__WEBPACK_IMPORTED_MODULE_2__.base64ToArrayBuffer)(b64string);
1570
- var uint8ArrayData = (0,funda_utils_dist_cjs_buffer__WEBPACK_IMPORTED_MODULE_2__.arrayBufferToUint8Array)(arrayBufferData);
1571
-
1572
- // console.log('b64string: ', b64string);
1573
- // console.log('arrayBufferData: ', arrayBufferData);
1574
- // console.log('uint8ArrayData: ', uint8ArrayData);
1575
-
1576
- //send
1577
- var jsonData = {
1578
- fileData: {
1579
- size: size,
1580
- mimeType: mimeType,
1581
- name: name,
1582
- ext: ext
1583
- },
1584
- b64string: b64string,
1585
- arrayBufferData: arrayBufferData,
1586
- uint8ArrayData: uint8ArrayData
1587
- };
1588
- onComplete === null || onComplete === void 0 ? void 0 : onComplete(fileInputRef.current, submitRef.current, jsonData, incomingData);
1589
- setProgressing(false);
1590
-
1591
- // update default value
1592
- resetDefaultVal();
1593
- });
1594
- reader.readAsDataURL(file);
1595
- });
1596
- case 1:
1597
- case "end":
1598
- return _context3.stop();
1599
- }
1600
- }, _callee3);
1601
- }))();
1602
- }
1603
- }
1604
- }
1605
- function handleChange(event) {
1606
- var val = event.target.value;
1607
- setForceUpdate(!forceUpdate);
1608
-
1609
- // update default value
1610
- setDefaultValue(null);
1611
-
1612
- //----
1613
- //remove focus style
1614
- if (val === '') {
1615
- var _rootRef$current;
1616
- (_rootRef$current = rootRef.current) === null || _rootRef$current === void 0 ? void 0 : _rootRef$current.classList.remove('focus');
1617
- }
1618
-
1619
- //
1620
- onChange === null || onChange === void 0 ? void 0 : onChange(fileInputRef.current, submitRef.current, fileInputRef.current.files);
1621
-
1622
- // Enable automatic upload
1623
- if (autoSubmit) {
1624
- handleSubmit(null);
1625
- }
1626
- }
1627
- function fileNames() {
1628
- var current = fileInputRef.current;
1629
- if (current && current.files.length > 0) {
1630
- var messages = [];
1631
- var _iterator = _createForOfIteratorHelper(current.files),
1632
- _step;
1633
- try {
1634
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
1635
- var file = _step.value;
1636
- messages = messages.concat(file.name);
1637
- }
1638
- } catch (err) {
1639
- _iterator.e(err);
1640
- } finally {
1641
- _iterator.f();
1642
- }
1643
- return messages.join(',');
1644
- }
1645
- return null;
1646
- }
1647
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
1648
- // update incoming data
1649
- //------------------------------------------
1650
- setIncomingData(data);
1651
-
1652
- // update default value
1653
- //--------------
1654
- setDefaultValue(value);
1655
- }, [data]);
1656
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1657
- className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_3__.clsWrite)(wrapperClassName, 'mb-3 position-relative upload-control'),
1658
- ref: rootRef
1659
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1660
- className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_3__.combinedCls)('upload-control-group d-flex', typeof inline === 'undefined' || inline === false ? 'flex-column' : 'flex-row')
1661
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1662
- className: "upload-control-group__control"
1663
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", {
1664
- ref: labelRef,
1665
- onMouseEnter: handleLabelEnter,
1666
- onMouseLeave: handleLabelLeave,
1667
- style: {
1668
- cursor: 'pointer',
1669
- pointerEvents: disabled ? 'none' : 'auto',
1670
- opacity: disabled ? 0.5 : 1
1671
- },
1672
- htmlFor: idRes,
1673
- "data-label": "1",
1674
- "data-input-id": idRes,
1675
- className: "form-label d-inline"
1676
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
1677
- className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_3__.clsWrite)(labelClassName, 'btn btn-outline-secondary'),
1678
- type: "button",
1679
- style: {
1680
- pointerEvents: 'none'
1681
- }
1682
- }, label ? label : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
1683
- width: "25px",
1684
- height: "25px",
1685
- viewBox: "0 0 1024 1024"
1686
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
1687
- d: "M512 256l144.8 144.8-36.2 36.2-83-83v311.6h-51.2V354l-83 83-36.2-36.2L512 256zM307.2 716.8V768h409.6v-51.2H307.2z",
1688
- fill: "#000000",
1689
- fillRule: "evenodd"
1690
- })), " ", required ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, requiredLabel || requiredLabel === '' ? requiredLabel : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
1691
- className: "text-danger"
1692
- }, "*")) : '')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1693
- className: "input-group"
1694
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1695
- className: "upload-control-group__control-inner",
1696
- style: {
1697
- display: 'none'
1698
- }
1699
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", _extends({
1700
- ref: function ref(node) {
1701
- fileInputRef.current = node;
1702
- if (typeof externalRef === 'function') {
1703
- externalRef(node);
1704
- } else if (externalRef) {
1705
- externalRef.current = node;
1706
- }
1707
- },
1708
- tabIndex: tabIndex || 0,
1709
- className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_3__.combinedCls)((0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_3__.clsWrite)(controlClassName, 'form-control'), controlExClassName),
1710
- id: idRes,
1711
- type: "file",
1712
- accept: accept
1713
- // The onChange should trigger updates whenever
1714
- // the value changes?
1715
- // Try to select a file, then try selecting another one.
1716
- ,
1717
- multiple: multiple || false,
1718
- name: name,
1719
- onKeyUp: handleFileInput,
1720
- onChange: handleChange,
1721
- disabled: disabled || null,
1722
- required: required || null
1723
- }, attributes))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1724
- className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_3__.combinedCls)('upload-control-group__btn', {
1725
- 'd-none': autoSubmit
1726
- })
1727
- }, progressing ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
1728
- ref: submitRef,
1729
- className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_3__.combinedCls)((0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_3__.clsWrite)(progressClassName, (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_3__.clsWrite)(submitClassName, 'btn btn-primary mt-2')), {
1730
- 'disabled': disabled
1731
- }),
1732
- type: "button",
1733
- onClick: handleSubmit
1734
- }, progressLabel ? progressLabel : submitLabel)) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
1735
- ref: submitRef,
1736
- className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_3__.combinedCls)((0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_3__.clsWrite)(submitClassName, 'btn btn-primary mt-2'), {
1737
- 'disabled': disabled
1738
- }),
1739
- type: "button",
1740
- onClick: handleSubmit
1741
- }, submitLabel ? submitLabel : null)))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1742
- className: "pload-control-result"
1743
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("small", null, typeof defaultValue !== 'undefined' ? fileNames() : null, defaultValue))));
1744
- });
1745
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (File);
1746
- })();
1747
-
1748
- /******/ return __webpack_exports__;
1749
- /******/ })()
1750
- ;
1751
- });