wsemi 1.7.18 → 1.7.19

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 (396) hide show
  1. package/README.md +1 -1
  2. package/dist/wsemi.umd.js +2 -2
  3. package/dist/wsemi.umd.js.map +1 -1
  4. package/docs/-_class.mjs.html +1 -1
  5. package/docs/ab2blob.mjs.html +1 -1
  6. package/docs/ab2u8arr.mjs.html +1 -1
  7. package/docs/addExcelWorksheetFromData.mjs.html +1 -1
  8. package/docs/addMonth.mjs.html +1 -1
  9. package/docs/aes2str.mjs.html +1 -1
  10. package/docs/alive.mjs.html +1 -1
  11. package/docs/arr2dt.mjs.html +1 -1
  12. package/docs/arrAccum.mjs.html +1 -1
  13. package/docs/arrAdd.mjs.html +1 -1
  14. package/docs/arrAt.mjs.html +1 -1
  15. package/docs/arrDiff.mjs.html +1 -1
  16. package/docs/arrFilterByKeywords.mjs.html +1 -1
  17. package/docs/arrFilterByNum.mjs.html +1 -1
  18. package/docs/arrFilterByPnum.mjs.html +1 -1
  19. package/docs/arrFilterByPnumAndToLog.mjs.html +1 -1
  20. package/docs/arrFind.mjs.html +1 -1
  21. package/docs/arrGroupByMaxmin.mjs.html +1 -1
  22. package/docs/arrHas.mjs.html +1 -1
  23. package/docs/arrInsert.mjs.html +1 -1
  24. package/docs/arrLookupByMaxmin.mjs.html +1 -1
  25. package/docs/arrMax.mjs.html +1 -1
  26. package/docs/arrMin.mjs.html +1 -1
  27. package/docs/arrMulti.mjs.html +1 -1
  28. package/docs/arrNorm.mjs.html +1 -1
  29. package/docs/arrProduct.mjs.html +1 -1
  30. package/docs/arrReduce.mjs.html +1 -1
  31. package/docs/arrSep.mjs.html +1 -1
  32. package/docs/arrSort.mjs.html +1 -1
  33. package/docs/asind.mjs.html +1 -1
  34. package/docs/atan2d.mjs.html +1 -1
  35. package/docs/atand.mjs.html +1 -1
  36. package/docs/attstr.mjs.html +1 -1
  37. package/docs/b642obj.mjs.html +1 -1
  38. package/docs/b642str.mjs.html +1 -1
  39. package/docs/b642u16arr.mjs.html +1 -1
  40. package/docs/b642u8arr.mjs.html +1 -1
  41. package/docs/binstr.mjs.html +1 -1
  42. package/docs/blob2ab.mjs.html +1 -1
  43. package/docs/blob2b64.mjs.html +1 -1
  44. package/docs/blob2str.mjs.html +1 -1
  45. package/docs/blob2u8arr.mjs.html +1 -1
  46. package/docs/blobs2b64s.mjs.html +1 -1
  47. package/docs/blobs2u8arrs.mjs.html +1 -1
  48. package/docs/bodyLog.mjs.html +1 -1
  49. package/docs/browserView.mjs.html +1 -1
  50. package/docs/browserViewFromBlob.mjs.html +1 -1
  51. package/docs/browserViewFromText.mjs.html +1 -1
  52. package/docs/browserViewFromU8arr.mjs.html +1 -1
  53. package/docs/bs2u8arr.mjs.html +1 -1
  54. package/docs/bufRead.mjs.html +1 -1
  55. package/docs/bufReadDbl.mjs.html +1 -1
  56. package/docs/bufWrite.mjs.html +1 -1
  57. package/docs/bufWriteDbl.mjs.html +1 -1
  58. package/docs/cache.mjs.html +1 -1
  59. package/docs/cbol.mjs.html +1 -1
  60. package/docs/cdbl.mjs.html +1 -1
  61. package/docs/cfilesize.mjs.html +1 -1
  62. package/docs/cfinancial.mjs.html +1 -1
  63. package/docs/cint.mjs.html +1 -1
  64. package/docs/clearXSS.mjs.html +1 -1
  65. package/docs/color.mjs.html +1 -1
  66. package/docs/composeToTree.mjs.html +1 -1
  67. package/docs/convertToTree.mjs.html +1 -1
  68. package/docs/copyStrToClipboard.mjs.html +1 -1
  69. package/docs/cosd.mjs.html +1 -1
  70. package/docs/cotd.mjs.html +1 -1
  71. package/docs/createExcelWorkbook.mjs.html +1 -1
  72. package/docs/cscd.mjs.html +1 -1
  73. package/docs/cstr.mjs.html +1 -1
  74. package/docs/day2cht.mjs.html +1 -1
  75. package/docs/debounce.mjs.html +1 -1
  76. package/docs/delay.mjs.html +1 -1
  77. package/docs/dig.mjs.html +1 -1
  78. package/docs/digExp.mjs.html +1 -1
  79. package/docs/domAlert.mjs.html +1 -1
  80. package/docs/domAppend.mjs.html +1 -1
  81. package/docs/domCancelEvent.mjs.html +1 -1
  82. package/docs/domCompareText.mjs.html +1 -1
  83. package/docs/domCompareTextDyn.mjs.html +1 -1
  84. package/docs/domConvertToPic.mjs.html +1 -1
  85. package/docs/domConvertToPicDyn.mjs.html +1 -1
  86. package/docs/domDetect.mjs.html +1 -1
  87. package/docs/domDrag.mjs.html +1 -1
  88. package/docs/domDragBarAndScroll.mjs.html +1 -1
  89. package/docs/domDragPreview.mjs.html +1 -1
  90. package/docs/domDropFiles.mjs.html +1 -1
  91. package/docs/domElementsFromPoint.mjs.html +1 -1
  92. package/docs/domFadeIn.mjs.html +1 -1
  93. package/docs/domFadeOut.mjs.html +1 -1
  94. package/docs/domFind.mjs.html +1 -1
  95. package/docs/domFinds.mjs.html +1 -1
  96. package/docs/domGetAttr.mjs.html +1 -1
  97. package/docs/domGetBoudRect.mjs.html +1 -1
  98. package/docs/domGetBoudRectRefSelf.mjs.html +1 -1
  99. package/docs/domGetFileAccept.mjs.html +1 -1
  100. package/docs/domGetFiles.mjs.html +1 -1
  101. package/docs/domGetParents.mjs.html +1 -1
  102. package/docs/domGetPointFromEvent.mjs.html +1 -1
  103. package/docs/domGetScrollableParent.mjs.html +1 -1
  104. package/docs/domGetWindowSize.mjs.html +1 -1
  105. package/docs/domIsClientXYIn.mjs.html +1 -1
  106. package/docs/domIsFocused.mjs.html +1 -1
  107. package/docs/domIsVisible.mjs.html +1 -1
  108. package/docs/domPrepend.mjs.html +1 -1
  109. package/docs/domRemove.mjs.html +1 -1
  110. package/docs/domRenderMarkdownMind.mjs.html +1 -1
  111. package/docs/domRenderMarkdownMindDyn.mjs.html +1 -1
  112. package/docs/domRipple.mjs.html +1 -1
  113. package/docs/domScrollIntoView.mjs.html +1 -1
  114. package/docs/domScrollTo.mjs.html +1 -1
  115. package/docs/domShowImages.mjs.html +1 -1
  116. package/docs/domShowImagesDyn.mjs.html +1 -1
  117. package/docs/domShowInputAndGetFiles.mjs.html +1 -1
  118. package/docs/domShowInputAndGetFilesU8Arrs.mjs.html +1 -1
  119. package/docs/domTooltip.mjs.html +1 -1
  120. package/docs/domTriggerEvent.mjs.html +1 -1
  121. package/docs/domVirtualCreate.mjs.html +1 -1
  122. package/docs/domVirtualCreateQueue.mjs.html +1 -1
  123. package/docs/downloadExcelFileFromData.mjs.html +1 -1
  124. package/docs/downloadExcelFileFromDataDyn.mjs.html +1 -1
  125. package/docs/downloadFileFromB64.mjs.html +1 -1
  126. package/docs/downloadFileFromBlob.mjs.html +1 -1
  127. package/docs/downloadFileFromText.mjs.html +1 -1
  128. package/docs/downloadFileFromU8Arr.mjs.html +1 -1
  129. package/docs/dtmapping.mjs.html +1 -1
  130. package/docs/dtpick.mjs.html +1 -1
  131. package/docs/evem.mjs.html +1 -1
  132. package/docs/examples/ex-blob2b64.html +1 -1
  133. package/docs/examples/ex-clearXSS.html +1 -1
  134. package/docs/examples/ex-colorConverter.html +1 -1
  135. package/docs/examples/ex-cryptojs.html +1 -1
  136. package/docs/examples/ex-dayjs.html +1 -1
  137. package/docs/examples/ex-domCompareText.html +1 -1
  138. package/docs/examples/ex-domCompareTextDyn.html +1 -1
  139. package/docs/examples/ex-domConvertToPic.html +1 -1
  140. package/docs/examples/ex-domConvertToPicDyn.html +1 -1
  141. package/docs/examples/ex-domDrag.html +1 -1
  142. package/docs/examples/ex-domDropFiles.html +1 -1
  143. package/docs/examples/ex-domIsVisible.html +1 -1
  144. package/docs/examples/ex-domRenderMarkdownMind.html +1 -1
  145. package/docs/examples/ex-domRenderMarkdownMindDyn.html +1 -1
  146. package/docs/examples/ex-domRipple.html +1 -1
  147. package/docs/examples/ex-domScrollIntoView.html +1 -1
  148. package/docs/examples/ex-domScrollTo.html +1 -1
  149. package/docs/examples/ex-domShowImages.html +1 -1
  150. package/docs/examples/ex-domShowImagesDyn.html +1 -1
  151. package/docs/examples/ex-domShowInputAndGetFiles.html +1 -1
  152. package/docs/examples/ex-domTooltip.html +1 -1
  153. package/docs/examples/ex-getUserAgent.html +1 -1
  154. package/docs/examples/ex-getUserAgentDyn.html +1 -1
  155. package/docs/examples/ex-html2pic.html +1 -1
  156. package/docs/examples/ex-html2picDyn.html +1 -1
  157. package/docs/examples/ex-html2str.html +1 -1
  158. package/docs/examples/ex-html2strDyn.html +1 -1
  159. package/docs/examples/ex-lodash.html +1 -1
  160. package/docs/examples/ex-obj2u8arr-u8arr2obj.html +1 -1
  161. package/docs/examples/ex-ocr.html +1 -1
  162. package/docs/examples/ex-ocrDyn.html +1 -1
  163. package/docs/examples/ex-openLink.html +1 -1
  164. package/docs/examples/ex-strFindFuzz.html +1 -1
  165. package/docs/examples/ex-strFindFuzzDyn.html +1 -1
  166. package/docs/examples/ex-timeTZ2expire-timeTZ2past.html +1 -1
  167. package/docs/examples/ex-xlsx.html +1 -1
  168. package/docs/examples/ex-xlsxDyn.html +1 -1
  169. package/docs/execProcess.mjs.html +1 -1
  170. package/docs/execScript.mjs.html +1 -1
  171. package/docs/f2c.mjs.html +1 -1
  172. package/docs/filepathToTree.mjs.html +1 -1
  173. package/docs/files2data.mjs.html +1 -1
  174. package/docs/flattenToConn.mjs.html +1 -1
  175. package/docs/flattenTree.mjs.html +1 -1
  176. package/docs/fsCleanFolder.mjs.html +1 -1
  177. package/docs/fsCopyFolder.mjs.html +1 -1
  178. package/docs/fsCreateFile.mjs.html +1 -1
  179. package/docs/fsCreateFolder.mjs.html +1 -1
  180. package/docs/fsDeleteFile.mjs.html +1 -1
  181. package/docs/fsDeleteFolder.mjs.html +1 -1
  182. package/docs/fsEvem.mjs.html +1 -1
  183. package/docs/fsGetFilesInFolder.mjs.html +1 -1
  184. package/docs/fsGetFoldersInFolder.mjs.html +1 -1
  185. package/docs/fsIsFile.mjs.html +1 -1
  186. package/docs/fsIsFolder.mjs.html +1 -1
  187. package/docs/fsReadText.mjs.html +1 -1
  188. package/docs/fsRenameFile.mjs.html +1 -1
  189. package/docs/fsRenameFolder.mjs.html +1 -1
  190. package/docs/fsTreeFolder.mjs.html +1 -1
  191. package/docs/fsWatchFile.mjs.html +1 -1
  192. package/docs/fsWriteText.mjs.html +1 -1
  193. package/docs/genGradientColor.mjs.html +1 -1
  194. package/docs/genID.mjs.html +1 -1
  195. package/docs/genPm.mjs.html +1 -1
  196. package/docs/getBufferSize.mjs.html +1 -1
  197. package/docs/getClearPathName.mjs.html +1 -1
  198. package/docs/getCsvStrFromData.mjs.html +1 -1
  199. package/docs/getDataFromExcelFileU8Arr.mjs.html +1 -1
  200. package/docs/getDataFromExcelFileU8ArrDyn.mjs.html +1 -1
  201. package/docs/getDirName.mjs.html +1 -1
  202. package/docs/getEnv.mjs.html +1 -1
  203. package/docs/getExcelU8ArrFromData.mjs.html +1 -1
  204. package/docs/getExcelU8ArrFromWorkbook.mjs.html +1 -1
  205. package/docs/getExcelWorkbookFromData.mjs.html +1 -1
  206. package/docs/getExcelWorkbookFromWorksheet.mjs.html +1 -1
  207. package/docs/getExcelWorksheetFromData.mjs.html +1 -1
  208. package/docs/getFileAccept.mjs.html +1 -1
  209. package/docs/getFileName.mjs.html +1 -1
  210. package/docs/getFileTrueName.mjs.html +1 -1
  211. package/docs/getGlobal.mjs.html +1 -1
  212. package/docs/getObjSize.mjs.html +1 -1
  213. package/docs/getTimeBetween.mjs.html +1 -1
  214. package/docs/getTimeFromUnit.mjs.html +1 -1
  215. package/docs/getTimeObject.mjs.html +1 -1
  216. package/docs/getTimeRange.mjs.html +1 -1
  217. package/docs/getUserAgent.mjs.html +1 -1
  218. package/docs/getUserAgentDyn.mjs.html +1 -1
  219. package/docs/getltdtkeys.mjs.html +1 -1
  220. package/docs/haskey.mjs.html +1 -1
  221. package/docs/html2pic.mjs.html +1 -1
  222. package/docs/html2picDyn.mjs.html +1 -1
  223. package/docs/html2str.mjs.html +1 -1
  224. package/docs/html2strDyn.mjs.html +1 -1
  225. package/docs/htmlDecode.mjs.html +1 -1
  226. package/docs/htmlEncode.mjs.html +1 -1
  227. package/docs/importResources.mjs.html +1 -1
  228. package/docs/index.html +1 -1
  229. package/docs/interp1.mjs.html +1 -1
  230. package/docs/isDev.mjs.html +1 -1
  231. package/docs/isEle.mjs.html +1 -1
  232. package/docs/isEleExistByID.mjs.html +1 -1
  233. package/docs/isEmail.mjs.html +1 -1
  234. package/docs/isIE.mjs.html +1 -1
  235. package/docs/isNarrow.mjs.html +1 -1
  236. package/docs/isStrHasCapital.mjs.html +1 -1
  237. package/docs/isStrHasLowerCase.mjs.html +1 -1
  238. package/docs/isStrHasNumber.mjs.html +1 -1
  239. package/docs/isUserIdentify.mjs.html +1 -1
  240. package/docs/isUserName.mjs.html +1 -1
  241. package/docs/isUserPW.mjs.html +1 -1
  242. package/docs/isWindow.mjs.html +1 -1
  243. package/docs/isab.mjs.html +1 -1
  244. package/docs/isarr.mjs.html +1 -1
  245. package/docs/isarr0.mjs.html +1 -1
  246. package/docs/isblob.mjs.html +1 -1
  247. package/docs/isbol.mjs.html +1 -1
  248. package/docs/isday.mjs.html +1 -1
  249. package/docs/isearr.mjs.html +1 -1
  250. package/docs/iseobj.mjs.html +1 -1
  251. package/docs/iser.mjs.html +1 -1
  252. package/docs/isernot.mjs.html +1 -1
  253. package/docs/isestr.mjs.html +1 -1
  254. package/docs/isfun.mjs.html +1 -1
  255. package/docs/isint.mjs.html +1 -1
  256. package/docs/ismonth.mjs.html +1 -1
  257. package/docs/isn0int.mjs.html +1 -1
  258. package/docs/isn0num.mjs.html +1 -1
  259. package/docs/isnbr.mjs.html +1 -1
  260. package/docs/isnint.mjs.html +1 -1
  261. package/docs/isnnum.mjs.html +1 -1
  262. package/docs/isnull.mjs.html +1 -1
  263. package/docs/isnum.mjs.html +1 -1
  264. package/docs/isobj.mjs.html +1 -1
  265. package/docs/isobj0.mjs.html +1 -1
  266. package/docs/isp0int.mjs.html +1 -1
  267. package/docs/isp0num.mjs.html +1 -1
  268. package/docs/ispint.mjs.html +1 -1
  269. package/docs/ispm.mjs.html +1 -1
  270. package/docs/ispnum.mjs.html +1 -1
  271. package/docs/isstr.mjs.html +1 -1
  272. package/docs/isstr0.mjs.html +1 -1
  273. package/docs/istime.mjs.html +1 -1
  274. package/docs/istimeTZ.mjs.html +1 -1
  275. package/docs/istimems.mjs.html +1 -1
  276. package/docs/istimemsTZ.mjs.html +1 -1
  277. package/docs/isu16arr.mjs.html +1 -1
  278. package/docs/isu8arr.mjs.html +1 -1
  279. package/docs/isundefined.mjs.html +1 -1
  280. package/docs/j2o.mjs.html +1 -1
  281. package/docs/keysmat2ltdt.mjs.html +1 -1
  282. package/docs/log.mjs.html +1 -1
  283. package/docs/ltdt2vrtsable.mjs.html +1 -1
  284. package/docs/ltdtDiff.mjs.html +1 -1
  285. package/docs/ltdtDiffByKey.mjs.html +1 -1
  286. package/docs/ltdtkeys2mat.mjs.html +1 -1
  287. package/docs/ltdtkeysheads2mat.mjs.html +1 -1
  288. package/docs/ltdtmapping.mjs.html +1 -1
  289. package/docs/ltdtmerge.mjs.html +1 -1
  290. package/docs/ltdtpick.mjs.html +1 -1
  291. package/docs/ltdtpull.mjs.html +1 -1
  292. package/docs/mat2ltdt.mjs.html +1 -1
  293. package/docs/matConcat.mjs.html +1 -1
  294. package/docs/matDiff.mjs.html +1 -1
  295. package/docs/matat.mjs.html +1 -1
  296. package/docs/now2str.mjs.html +1 -1
  297. package/docs/now2strp.mjs.html +1 -1
  298. package/docs/nowDay2str.mjs.html +1 -1
  299. package/docs/nowms2str.mjs.html +1 -1
  300. package/docs/nowms2strp.mjs.html +1 -1
  301. package/docs/o2j.mjs.html +1 -1
  302. package/docs/obj2b64.mjs.html +1 -1
  303. package/docs/obj2pb64.mjs.html +1 -1
  304. package/docs/obj2str.mjs.html +1 -1
  305. package/docs/obj2stru8arr.mjs.html +1 -1
  306. package/docs/obj2u8arr.mjs.html +1 -1
  307. package/docs/objSortBy.mjs.html +1 -1
  308. package/docs/objSortByKeys.mjs.html +1 -1
  309. package/docs/ocr.mjs.html +1 -1
  310. package/docs/ocrDyn.mjs.html +1 -1
  311. package/docs/oo.mjs.html +1 -1
  312. package/docs/openLink.mjs.html +1 -1
  313. package/docs/pb642obj.mjs.html +1 -1
  314. package/docs/pmChain.mjs.html +1 -1
  315. package/docs/pmConvertResolve.mjs.html +1 -1
  316. package/docs/pmHook.mjs.html +1 -1
  317. package/docs/pmHookReject.mjs.html +1 -1
  318. package/docs/pmIni.mjs.html +1 -1
  319. package/docs/pmInvResolve.mjs.html +50 -11
  320. package/docs/pmMap.mjs.html +1 -1
  321. package/docs/pmQueue.mjs.html +1 -1
  322. package/docs/pmSeries.mjs.html +1 -1
  323. package/docs/pmThrottle.mjs.html +1 -1
  324. package/docs/pseudoRandom.mjs.html +1 -1
  325. package/docs/pseudoRandomIntRange.mjs.html +1 -1
  326. package/docs/pseudoRandomRange.mjs.html +1 -1
  327. package/docs/queue.mjs.html +1 -1
  328. package/docs/rang.mjs.html +1 -1
  329. package/docs/rep.mjs.html +1 -1
  330. package/docs/repObj.mjs.html +1 -1
  331. package/docs/replace.mjs.html +1 -1
  332. package/docs/replaceObj.mjs.html +1 -1
  333. package/docs/replacePlus.mjs.html +1 -1
  334. package/docs/round.mjs.html +1 -1
  335. package/docs/secd.mjs.html +1 -1
  336. package/docs/sep.mjs.html +1 -1
  337. package/docs/sepInt.mjs.html +1 -1
  338. package/docs/sind.mjs.html +1 -1
  339. package/docs/split.mjs.html +1 -1
  340. package/docs/str2aes.mjs.html +1 -1
  341. package/docs/str2b64.mjs.html +1 -1
  342. package/docs/str2hint.mjs.html +1 -1
  343. package/docs/str2md5.mjs.html +1 -1
  344. package/docs/str2obj.mjs.html +1 -1
  345. package/docs/str2sha512.mjs.html +1 -1
  346. package/docs/str2u8arr.mjs.html +1 -1
  347. package/docs/strCompare.mjs.html +1 -1
  348. package/docs/strDiff.mjs.html +1 -1
  349. package/docs/strFindFuzz.mjs.html +1 -1
  350. package/docs/strFindFuzzDyn.mjs.html +1 -1
  351. package/docs/strFindSimilar.mjs.html +1 -1
  352. package/docs/strdelleft.mjs.html +1 -1
  353. package/docs/strdelright.mjs.html +1 -1
  354. package/docs/strleft.mjs.html +1 -1
  355. package/docs/strmid.mjs.html +1 -1
  356. package/docs/strright.mjs.html +1 -1
  357. package/docs/stru8arr2obj.mjs.html +1 -1
  358. package/docs/tand.mjs.html +1 -1
  359. package/docs/time2day.mjs.html +1 -1
  360. package/docs/time2hour.mjs.html +1 -1
  361. package/docs/time2min.mjs.html +1 -1
  362. package/docs/timeTZ2day.mjs.html +1 -1
  363. package/docs/timeTZ2expire.mjs.html +1 -1
  364. package/docs/timeTZ2hour.mjs.html +1 -1
  365. package/docs/timeTZ2min.mjs.html +1 -1
  366. package/docs/timeTZ2past.mjs.html +1 -1
  367. package/docs/timems2day.mjs.html +1 -1
  368. package/docs/timems2hour.mjs.html +1 -1
  369. package/docs/timems2min.mjs.html +1 -1
  370. package/docs/timems2time.mjs.html +1 -1
  371. package/docs/timemsTZ2day.mjs.html +1 -1
  372. package/docs/timemsTZ2expire.mjs.html +1 -1
  373. package/docs/timemsTZ2hour.mjs.html +1 -1
  374. package/docs/timemsTZ2min.mjs.html +1 -1
  375. package/docs/timemsTZ2past.mjs.html +1 -1
  376. package/docs/timemsTZ2time.mjs.html +1 -1
  377. package/docs/treeObj.mjs.html +1 -1
  378. package/docs/treeToFilepath.mjs.html +1 -1
  379. package/docs/trim.mjs.html +1 -1
  380. package/docs/u16arr2b64.mjs.html +1 -1
  381. package/docs/u16arr2u8arr.mjs.html +1 -1
  382. package/docs/u8arr2ab.mjs.html +1 -1
  383. package/docs/u8arr2b64.mjs.html +1 -1
  384. package/docs/u8arr2blob.mjs.html +1 -1
  385. package/docs/u8arr2bs.mjs.html +1 -1
  386. package/docs/u8arr2obj.mjs.html +1 -1
  387. package/docs/u8arr2str.mjs.html +1 -1
  388. package/docs/u8arr2u16arr.mjs.html +1 -1
  389. package/docs/urlParse.mjs.html +1 -1
  390. package/docs/verifyValue.mjs.html +1 -1
  391. package/docs/waitFun.mjs.html +1 -1
  392. package/docs/wsemi.html +160 -14
  393. package/g.mjs +29 -9
  394. package/package.json +1 -1
  395. package/src/pmInvResolve.mjs +49 -10
  396. package/test/pmInvResolve.test.mjs +30 -2
package/README.md CHANGED
@@ -188,5 +188,5 @@ or
188
188
 
189
189
  [Necessary] Add script for wsemi.
190
190
  ```alias
191
- <script src="https://cdn.jsdelivr.net/npm/wsemi@1.7.18/dist/wsemi.umd.js"></script>
191
+ <script src="https://cdn.jsdelivr.net/npm/wsemi@1.7.19/dist/wsemi.umd.js"></script>
192
192
  ```
package/dist/wsemi.umd.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * wsemi v1.7.18
2
+ * wsemi v1.7.19
3
3
  * (c) 2018-2021 yuda-lyu(semisphere)
4
4
  * Released under the MIT License.
5
5
  */
@@ -11,5 +11,5 @@
11
11
  * Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
12
12
  * MIT Licence
13
13
  */
14
- var TS,YS,HS=9e15,IS=1e9,LS="0123456789abcdef",NS="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",$S="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",CS={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-HS,maxE:HS,crypto:!1},BS=!0,FS="[DecimalError] ",RS=FS+"Invalid argument: ",zS=FS+"Precision limit exceeded",US=FS+"crypto unavailable",WS="[object Decimal]",qS=Math.floor,VS=Math.pow,XS=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,ZS=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,GS=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,KS=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,JS=1e7,QS=7,eE=NS.length-1,tE=$S.length-1,nE={toStringTag:WS};function rE(e){var t,n,r,i=e.length-1,o="",u=e[0];if(i>0){for(o+=u,t=1;t<i;t++)r=e[t]+"",(n=QS-r.length)&&(o+=hE(n)),o+=r;u=e[t],(n=QS-(r=u+"").length)&&(o+=hE(n))}else if(0===u)return"0";for(;u%10==0;)u/=10;return o+u}function iE(e,t,n){if(e!==~~e||e<t||e>n)throw Error(RS+e)}function oE(e,t,n,r){var i,o,u,l;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=QS,i=0):(i=Math.ceil((t+1)/QS),t%=QS),o=VS(10,QS-t),l=e[i]%o|0,null==r?t<3?(0==t?l=l/100|0:1==t&&(l=l/10|0),u=n<4&&99999==l||n>3&&49999==l||5e4==l||0==l):u=(n<4&&l+1==o||n>3&&l+1==o/2)&&(e[i+1]/o/100|0)==VS(10,t-2)-1||(l==o/2||0==l)&&0==(e[i+1]/o/100|0):t<4?(0==t?l=l/1e3|0:1==t?l=l/100|0:2==t&&(l=l/10|0),u=(r||n<4)&&9999==l||!r&&n>3&&4999==l):u=((r||n<4)&&l+1==o||!r&&n>3&&l+1==o/2)&&(e[i+1]/o/1e3|0)==VS(10,t-3)-1,u}function uE(e,t,n){for(var r,i,o=[0],u=0,l=e.length;u<l;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=LS.indexOf(e.charAt(u++)),r=0;r<o.length;r++)o[r]>n-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}nE.absoluteValue=nE.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),aE(e)},nE.ceil=function(){return aE(new this.constructor(this),this.e+1,2)},nE.clampedTo=nE.clamp=function(e,t){var n=this,r=n.constructor;if(e=new r(e),t=new r(t),!e.s||!t.s)return new r(NaN);if(e.gt(t))throw Error(RS+t);return n.cmp(e)<0?e:n.cmp(t)>0?t:new r(n)},nE.comparedTo=nE.cmp=function(e){var t,n,r,i,o=this,u=o.d,l=(e=new o.constructor(e)).d,a=o.s,s=e.s;if(!u||!l)return a&&s?a!==s?a:u===l?0:!u^a<0?1:-1:NaN;if(!u[0]||!l[0])return u[0]?a:l[0]?-s:0;if(a!==s)return a;if(o.e!==e.e)return o.e>e.e^a<0?1:-1;for(t=0,n=(r=u.length)<(i=l.length)?r:i;t<n;++t)if(u[t]!==l[t])return u[t]>l[t]^a<0?1:-1;return r===i?0:r>i^a<0?1:-1},nE.cosine=nE.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+QS,r.rounding=1,n=function(e,t){var n,r,i;if(t.isZero())return t;r=t.d.length,r<32?i=(1/SE(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10");e.precision+=n,t=OE(e,1,t.times(i),new e(1));for(var o=n;o--;){var u=t.times(t);t=u.times(u).minus(u).times(8).plus(1)}return e.precision-=n,t}(r,EE(r,n)),r.precision=e,r.rounding=t,aE(2==YS||3==YS?n.neg():n,e,t,!0)):new r(1):new r(NaN)},nE.cubeRoot=nE.cbrt=function(){var e,t,n,r,i,o,u,l,a,s,c=this,f=c.constructor;if(!c.isFinite()||c.isZero())return new f(c);for(BS=!1,(o=c.s*VS(c.s*c,1/3))&&Math.abs(o)!=1/0?r=new f(o.toString()):(n=rE(c.d),(o=((e=c.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=VS(n,1/3),e=qS((e+1)/3)-(e%3==(e<0?-1:2)),(r=new f(n=o==1/0?"5e"+e:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=c.s),u=(e=f.precision)+3;;)if(s=(a=(l=r).times(l).times(l)).plus(c),r=lE(s.plus(c).times(l),s.plus(a),u+2,1),rE(l.d).slice(0,u)===(n=rE(r.d)).slice(0,u)){if("9999"!=(n=n.slice(u-3,u+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(aE(r,e+1,1),t=!r.times(r).times(r).eq(c));break}if(!i&&(aE(l,e+1,0),l.times(l).times(l).eq(c))){r=l;break}u+=4,i=1}return BS=!0,aE(r,e,f.rounding,t)},nE.decimalPlaces=nE.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=((e=t.length-1)-qS(this.e/QS))*QS,e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},nE.dividedBy=nE.div=function(e){return lE(this,new this.constructor(e))},nE.dividedToIntegerBy=nE.divToInt=function(e){var t=this.constructor;return aE(lE(this,new t(e),0,1,1),t.precision,t.rounding)},nE.equals=nE.eq=function(e){return 0===this.cmp(e)},nE.floor=function(){return aE(new this.constructor(this),this.e+1,3)},nE.greaterThan=nE.gt=function(e){return this.cmp(e)>0},nE.greaterThanOrEqualTo=nE.gte=function(e){var t=this.cmp(e);return 1==t||0===t},nE.hyperbolicCosine=nE.cosh=function(){var e,t,n,r,i,o=this,u=o.constructor,l=new u(1);if(!o.isFinite())return new u(o.s?1/0:NaN);if(o.isZero())return l;n=u.precision,r=u.rounding,u.precision=n+Math.max(o.e,o.sd())+4,u.rounding=1,(i=o.d.length)<32?t=(1/SE(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=OE(u,1,o.times(t),new u(1),!0);for(var a,s=e,c=new u(8);s--;)a=o.times(o),o=l.minus(a.times(c.minus(a.times(c))));return aE(o,u.precision=n,u.rounding=r,!0)},nE.hyperbolicSine=nE.sinh=function(){var e,t,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=OE(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,i=OE(o,2,i=i.times(1/SE(5,e)),i,!0);for(var u,l=new o(5),a=new o(16),s=new o(20);e--;)u=i.times(i),i=i.times(l.plus(u.times(a.times(u).plus(s))))}return o.precision=t,o.rounding=n,aE(i,t,n,!0)},nE.hyperbolicTangent=nE.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,lE(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},nE.inverseCosine=nE.acos=function(){var e,t=this,n=t.constructor,r=t.abs().cmp(1),i=n.precision,o=n.rounding;return-1!==r?0===r?t.isNeg()?dE(n,i,o):new n(0):new n(NaN):t.isZero()?dE(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,t=t.asin(),e=dE(n,i+4,o).times(.5),n.precision=i,n.rounding=o,e.minus(t))},nE.inverseHyperbolicCosine=nE.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,BS=!1,n=n.times(n).minus(1).sqrt().plus(n),BS=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},nE.inverseHyperbolicSine=nE.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,BS=!1,n=n.times(n).plus(1).sqrt().plus(n),BS=!0,r.precision=e,r.rounding=t,n.ln())},nE.inverseHyperbolicTangent=nE.atanh=function(){var e,t,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,r=i.sd(),Math.max(r,e)<2*-i.e-1?aE(new o(i),e,t,!0):(o.precision=n=r-i.e,i=lE(i.plus(1),new o(1).minus(i),n+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)},nE.inverseSine=nE.asin=function(){var e,t,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==t?0===t?((e=dE(o,n+4,r).times(.5)).s=i.s,e):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},nE.inverseTangent=nE.atan=function(){var e,t,n,r,i,o,u,l,a,s=this,c=s.constructor,f=c.precision,d=c.rounding;if(s.isFinite()){if(s.isZero())return new c(s);if(s.abs().eq(1)&&f+4<=tE)return(u=dE(c,f+4,d).times(.25)).s=s.s,u}else{if(!s.s)return new c(NaN);if(f+4<=tE)return(u=dE(c,f+4,d).times(.5)).s=s.s,u}for(c.precision=l=f+10,c.rounding=1,e=n=Math.min(28,l/QS+2|0);e;--e)s=s.div(s.times(s).plus(1).sqrt().plus(1));for(BS=!1,t=Math.ceil(l/QS),r=1,a=s.times(s),u=new c(s),i=s;-1!==e;)if(i=i.times(a),o=u.minus(i.div(r+=2)),i=i.times(a),void 0!==(u=o.plus(i.div(r+=2))).d[t])for(e=t;u.d[e]===o.d[e]&&e--;);return n&&(u=u.times(2<<n-1)),BS=!0,aE(u,c.precision=f,c.rounding=d,!0)},nE.isFinite=function(){return!!this.d},nE.isInteger=nE.isInt=function(){return!!this.d&&qS(this.e/QS)>this.d.length-2},nE.isNaN=function(){return!this.s},nE.isNegative=nE.isNeg=function(){return this.s<0},nE.isPositive=nE.isPos=function(){return this.s>0},nE.isZero=function(){return!!this.d&&0===this.d[0]},nE.lessThan=nE.lt=function(e){return this.cmp(e)<0},nE.lessThanOrEqualTo=nE.lte=function(e){return this.cmp(e)<1},nE.logarithm=nE.log=function(e){var t,n,r,i,o,u,l,a,s=this,c=s.constructor,f=c.precision,d=c.rounding;if(null==e)e=new c(10),t=!0;else{if(n=(e=new c(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new c(NaN);t=e.eq(10)}if(n=s.d,s.s<0||!n||!n[0]||s.eq(1))return new c(n&&!n[0]?-1/0:1!=s.s?NaN:n?0:1/0);if(t)if(n.length>1)o=!0;else{for(i=n[0];i%10==0;)i/=10;o=1!==i}if(BS=!1,u=bE(s,l=f+5),r=t?fE(c,l+10):bE(e,l),oE((a=lE(u,r,l,1)).d,i=f,d))do{if(u=bE(s,l+=10),r=t?fE(c,l+10):bE(e,l),a=lE(u,r,l,1),!o){+rE(a.d).slice(i+1,i+15)+1==1e14&&(a=aE(a,f+1,0));break}}while(oE(a.d,i+=10,d));return BS=!0,aE(a,f,d)},nE.minus=nE.sub=function(e){var t,n,r,i,o,u,l,a,s,c,f,d,p=this,h=p.constructor;if(e=new h(e),!p.d||!e.d)return p.s&&e.s?p.d?e.s=-e.s:e=new h(e.d||p.s!==e.s?p:NaN):e=new h(NaN),e;if(p.s!=e.s)return e.s=-e.s,p.plus(e);if(s=p.d,d=e.d,l=h.precision,a=h.rounding,!s[0]||!d[0]){if(d[0])e.s=-e.s;else{if(!s[0])return new h(3===a?-0:0);e=new h(p)}return BS?aE(e,l,a):e}if(n=qS(e.e/QS),c=qS(p.e/QS),s=s.slice(),o=c-n){for((f=o<0)?(t=s,o=-o,u=d.length):(t=d,n=c,u=s.length),o>(r=Math.max(Math.ceil(l/QS),u)+2)&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for((f=(r=s.length)<(u=d.length))&&(u=r),r=0;r<u;r++)if(s[r]!=d[r]){f=s[r]<d[r];break}o=0}for(f&&(t=s,s=d,d=t,e.s=-e.s),u=s.length,r=d.length-u;r>0;--r)s[u++]=0;for(r=d.length;r>o;){if(s[--r]<d[r]){for(i=r;i&&0===s[--i];)s[i]=JS-1;--s[i],s[r]+=JS}s[r]-=d[r]}for(;0===s[--u];)s.pop();for(;0===s[0];s.shift())--n;return s[0]?(e.d=s,e.e=cE(s,n),BS?aE(e,l,a):e):new h(3===a?-0:0)},nE.modulo=nE.mod=function(e){var t,n=this,r=n.constructor;return e=new r(e),!n.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||n.d&&!n.d[0]?aE(new r(n),r.precision,r.rounding):(BS=!1,9==r.modulo?(t=lE(n,e.abs(),0,3,1)).s*=e.s:t=lE(n,e,0,r.modulo,1),t=t.times(e),BS=!0,n.minus(t))},nE.naturalExponential=nE.exp=function(){return yE(this)},nE.naturalLogarithm=nE.ln=function(){return bE(this)},nE.negated=nE.neg=function(){var e=new this.constructor(this);return e.s=-e.s,aE(e)},nE.plus=nE.add=function(e){var t,n,r,i,o,u,l,a,s,c,f=this,d=f.constructor;if(e=new d(e),!f.d||!e.d)return f.s&&e.s?f.d||(e=new d(e.d||f.s===e.s?f:NaN)):e=new d(NaN),e;if(f.s!=e.s)return e.s=-e.s,f.minus(e);if(s=f.d,c=e.d,l=d.precision,a=d.rounding,!s[0]||!c[0])return c[0]||(e=new d(f)),BS?aE(e,l,a):e;if(o=qS(f.e/QS),r=qS(e.e/QS),s=s.slice(),i=o-r){for(i<0?(n=s,i=-i,u=c.length):(n=c,r=o,u=s.length),i>(u=(o=Math.ceil(l/QS))>u?o+1:u+1)&&(i=u,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((u=s.length)-(i=c.length)<0&&(i=u,n=c,c=s,s=n),t=0;i;)t=(s[--i]=s[i]+c[i]+t)/JS|0,s[i]%=JS;for(t&&(s.unshift(t),++r),u=s.length;0==s[--u];)s.pop();return e.d=s,e.e=cE(s,r),BS?aE(e,l,a):e},nE.precision=nE.sd=function(e){var t,n=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(RS+e);return n.d?(t=pE(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},nE.round=function(){var e=this,t=e.constructor;return aE(new t(e),e.e+1,t.rounding)},nE.sine=nE.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+QS,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:OE(e,2,t,t);n=(n=1.4*Math.sqrt(r))>16?16:0|n,t=t.times(1/SE(5,n)),t=OE(e,2,t,t);for(var i,o=new e(5),u=new e(16),l=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(u.times(i).minus(l))));return t}(r,EE(r,n)),r.precision=e,r.rounding=t,aE(YS>2?n.neg():n,e,t,!0)):new r(NaN)},nE.squareRoot=nE.sqrt=function(){var e,t,n,r,i,o,u=this,l=u.d,a=u.e,s=u.s,c=u.constructor;if(1!==s||!l||!l[0])return new c(!s||s<0&&(!l||l[0])?NaN:l?u:1/0);for(BS=!1,0==(s=Math.sqrt(+u))||s==1/0?(((t=rE(l)).length+a)%2==0&&(t+="0"),s=Math.sqrt(t),a=qS((a+1)/2)-(a<0||a%2),r=new c(t=s==1/0?"5e"+a:(t=s.toExponential()).slice(0,t.indexOf("e")+1)+a)):r=new c(s.toString()),n=(a=c.precision)+3;;)if(r=(o=r).plus(lE(u,o,n+2,1)).times(.5),rE(o.d).slice(0,n)===(t=rE(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(aE(r,a+1,1),e=!r.times(r).eq(u));break}if(!i&&(aE(o,a+1,0),o.times(o).eq(u))){r=o;break}n+=4,i=1}return BS=!0,aE(r,a,c.rounding,e)},nE.tangent=nE.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=lE(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,aE(2==YS||4==YS?n.neg():n,e,t,!0)):new r(NaN)},nE.times=nE.mul=function(e){var t,n,r,i,o,u,l,a,s,c=this,f=c.constructor,d=c.d,p=(e=new f(e)).d;if(e.s*=c.s,!(d&&d[0]&&p&&p[0]))return new f(!e.s||d&&!d[0]&&!p||p&&!p[0]&&!d?NaN:d&&p?0*e.s:e.s/0);for(n=qS(c.e/QS)+qS(e.e/QS),(a=d.length)<(s=p.length)&&(o=d,d=p,p=o,u=a,a=s,s=u),o=[],r=u=a+s;r--;)o.push(0);for(r=s;--r>=0;){for(t=0,i=a+r;i>r;)l=o[i]+p[r]*d[i-r-1]+t,o[i--]=l%JS|0,t=l/JS|0;o[i]=(o[i]+t)%JS|0}for(;!o[--u];)o.pop();return t?++n:o.shift(),e.d=o,e.e=cE(o,n),BS?aE(e,f.precision,f.rounding):e},nE.toBinary=function(e,t){return DE(this,2,e,t)},nE.toDecimalPlaces=nE.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(iE(e,0,IS),void 0===t?t=r.rounding:iE(t,0,8),aE(n,e+n.e+1,t))},nE.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=sE(r,!0):(iE(e,0,IS),void 0===t?t=i.rounding:iE(t,0,8),n=sE(r=aE(new i(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},nE.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return void 0===e?n=sE(i):(iE(e,0,IS),void 0===t?t=o.rounding:iE(t,0,8),n=sE(r=aE(new o(i),e+i.e+1,t),!1,e+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},nE.toFraction=function(e){var t,n,r,i,o,u,l,a,s,c,f,d,p=this,h=p.d,v=p.constructor;if(!h)return new v(p);if(s=n=new v(1),r=a=new v(0),u=(o=(t=new v(r)).e=pE(h)-p.e-1)%QS,t.d[0]=VS(10,u<0?QS+u:u),null==e)e=o>0?t:s;else{if(!(l=new v(e)).isInt()||l.lt(s))throw Error(RS+l);e=l.gt(t)?o>0?t:s:l}for(BS=!1,l=new v(rE(h)),c=v.precision,v.precision=o=h.length*QS*2;f=lE(l,t,0,1,1),1!=(i=n.plus(f.times(r))).cmp(e);)n=r,r=i,i=s,s=a.plus(f.times(i)),a=i,i=t,t=l.minus(f.times(i)),l=i;return i=lE(e.minus(n),r,0,1,1),a=a.plus(i.times(s)),n=n.plus(i.times(r)),a.s=s.s=p.s,d=lE(s,r,o,1).minus(p).abs().cmp(lE(a,n,o,1).minus(p).abs())<1?[s,r]:[a,n],v.precision=c,BS=!0,d},nE.toHexadecimal=nE.toHex=function(e,t){return DE(this,16,e,t)},nE.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:iE(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(BS=!1,n=lE(n,e,0,t,1).times(e),BS=!0,aE(n)):(e.s=n.s,n=e),n},nE.toNumber=function(){return+this},nE.toOctal=function(e,t){return DE(this,8,e,t)},nE.toPower=nE.pow=function(e){var t,n,r,i,o,u,l=this,a=l.constructor,s=+(e=new a(e));if(!(l.d&&e.d&&l.d[0]&&e.d[0]))return new a(VS(+l,s));if((l=new a(l)).eq(1))return l;if(r=a.precision,o=a.rounding,e.eq(1))return aE(l,r,o);if((t=qS(e.e/QS))>=e.d.length-1&&(n=s<0?-s:s)<=9007199254740991)return i=vE(a,l,n,r),e.s<0?new a(1).div(i):aE(i,r,o);if((u=l.s)<0){if(t<e.d.length-1)return new a(NaN);if(0==(1&e.d[t])&&(u=1),0==l.e&&1==l.d[0]&&1==l.d.length)return l.s=u,l}return(t=0!=(n=VS(+l,s))&&isFinite(n)?new a(n+"").e:qS(s*(Math.log("0."+rE(l.d))/Math.LN10+l.e+1)))>a.maxE+1||t<a.minE-1?new a(t>0?u/0:0):(BS=!1,a.rounding=l.s=1,n=Math.min(12,(t+"").length),(i=yE(e.times(bE(l,r+n)),r)).d&&oE((i=aE(i,r+5,1)).d,r,o)&&(t=r+10,+rE((i=aE(yE(e.times(bE(l,t+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=aE(i,r+1,0))),i.s=u,BS=!0,a.rounding=o,aE(i,r,o))},nE.toPrecision=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=sE(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(iE(e,1,IS),void 0===t?t=i.rounding:iE(t,0,8),n=sE(r=aE(new i(r),e,t),e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},nE.toSignificantDigits=nE.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(iE(e,1,IS),void 0===t?t=n.rounding:iE(t,0,8)),aE(new n(this),e,t)},nE.toString=function(){var e=this,t=e.constructor,n=sE(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},nE.truncated=nE.trunc=function(){return aE(new this.constructor(this),this.e+1,1)},nE.valueOf=nE.toJSON=function(){var e=this,t=e.constructor,n=sE(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};var lE=function(){function e(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,u,l,a){var s,c,f,d,p,h,v,m,g,y,b,w,x,j,O,S,E,D,k,M,_=r.constructor,A=r.s==i.s?1:-1,P=r.d,T=i.d;if(!(P&&P[0]&&T&&T[0]))return new _(r.s&&i.s&&(P?!T||P[0]!=T[0]:T)?P&&0==P[0]||!T?0*A:A/0:NaN);for(a?(p=1,c=r.e-i.e):(a=JS,p=QS,c=qS(r.e/p)-qS(i.e/p)),k=T.length,E=P.length,y=(g=new _(A)).d=[],f=0;T[f]==(P[f]||0);f++);if(T[f]>(P[f]||0)&&c--,null==o?(j=o=_.precision,u=_.rounding):j=l?o+(r.e-i.e)+1:o,j<0)y.push(1),h=!0;else{if(j=j/p+2|0,f=0,1==k){for(d=0,T=T[0],j++;(f<E||d)&&j--;f++)O=d*a+(P[f]||0),y[f]=O/T|0,d=O%T|0;h=d||f<E}else{for((d=a/(T[0]+1)|0)>1&&(T=e(T,d,a),P=e(P,d,a),k=T.length,E=P.length),S=k,w=(b=P.slice(0,k)).length;w<k;)b[w++]=0;(M=T.slice()).unshift(0),D=T[0],T[1]>=a/2&&++D;do{d=0,(s=t(T,b,k,w))<0?(x=b[0],k!=w&&(x=x*a+(b[1]||0)),(d=x/D|0)>1?(d>=a&&(d=a-1),1==(s=t(v=e(T,d,a),b,m=v.length,w=b.length))&&(d--,n(v,k<m?M:T,m,a))):(0==d&&(s=d=1),v=T.slice()),(m=v.length)<w&&v.unshift(0),n(b,v,w,a),-1==s&&(s=t(T,b,k,w=b.length))<1&&(d++,n(b,k<w?M:T,w,a)),w=b.length):0===s&&(d++,b=[0]),y[f++]=d,s&&b[0]?b[w++]=P[S]||0:(b=[P[S]],w=1)}while((S++<E||void 0!==b[0])&&j--);h=void 0!==b[0]}y[0]||y.shift()}if(1==p)g.e=c,TS=h;else{for(f=1,d=y[0];d>=10;d/=10)f++;g.e=f+c*p-1,aE(g,l?o+g.e+1:o,u,h)}return g}}();function aE(e,t,n,r){var i,o,u,l,a,s,c,f,d,p=e.constructor;e:if(null!=t){if(!(f=e.d))return e;for(i=1,l=f[0];l>=10;l/=10)i++;if((o=t-i)<0)o+=QS,u=t,a=(c=f[d=0])/VS(10,i-u-1)%10|0;else if((d=Math.ceil((o+1)/QS))>=(l=f.length)){if(!r)break e;for(;l++<=d;)f.push(0);c=a=0,i=1,u=(o%=QS)-QS+1}else{for(c=l=f[d],i=1;l>=10;l/=10)i++;a=(u=(o%=QS)-QS+i)<0?0:c/VS(10,i-u-1)%10|0}if(r=r||t<0||void 0!==f[d+1]||(u<0?c:c%VS(10,i-u-1)),s=n<4?(a||r)&&(0==n||n==(e.s<0?3:2)):a>5||5==a&&(4==n||r||6==n&&(o>0?u>0?c/VS(10,i-u):0:f[d-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,s?(t-=e.e+1,f[0]=VS(10,(QS-t%QS)%QS),e.e=-t||0):f[0]=e.e=0,e;if(0==o?(f.length=d,l=1,d--):(f.length=d+1,l=VS(10,QS-o),f[d]=u>0?(c/VS(10,i-u)%VS(10,u)|0)*l:0),s)for(;;){if(0==d){for(o=1,u=f[0];u>=10;u/=10)o++;for(u=f[0]+=l,l=1;u>=10;u/=10)l++;o!=l&&(e.e++,f[0]==JS&&(f[0]=1));break}if(f[d]+=l,f[d]!=JS)break;f[d--]=0,l=1}for(o=f.length;0===f[--o];)f.pop()}return BS&&(e.e>p.maxE?(e.d=null,e.e=NaN):e.e<p.minE&&(e.e=0,e.d=[0])),e}function sE(e,t,n){if(!e.isFinite())return wE(e);var r,i=e.e,o=rE(e.d),u=o.length;return t?(n&&(r=n-u)>0?o=o.charAt(0)+"."+o.slice(1)+hE(r):u>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+hE(-i-1)+o,n&&(r=n-u)>0&&(o+=hE(r))):i>=u?(o+=hE(i+1-u),n&&(r=n-i-1)>0&&(o=o+"."+hE(r))):((r=i+1)<u&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-u)>0&&(i+1===u&&(o+="."),o+=hE(r))),o}function cE(e,t){var n=e[0];for(t*=QS;n>=10;n/=10)t++;return t}function fE(e,t,n){if(t>eE)throw BS=!0,n&&(e.precision=n),Error(zS);return aE(new e(NS),t,1,!0)}function dE(e,t,n){if(t>tE)throw Error(zS);return aE(new e($S),t,n,!0)}function pE(e){var t=e.length-1,n=t*QS+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function hE(e){for(var t="";e--;)t+="0";return t}function vE(e,t,n,r){var i,o=new e(1),u=Math.ceil(r/QS+4);for(BS=!1;;){if(n%2&&kE((o=o.times(t)).d,u)&&(i=!0),0===(n=qS(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}kE((t=t.times(t)).d,u)}return BS=!0,o}function mE(e){return 1&e.d[e.d.length-1]}function gE(e,t,n){for(var r,i=new e(t[0]),o=0;++o<t.length;){if(!(r=new e(t[o])).s){i=r;break}i[n](r)&&(i=r)}return i}function yE(e,t){var n,r,i,o,u,l,a,s=0,c=0,f=0,d=e.constructor,p=d.rounding,h=d.precision;if(!e.d||!e.d[0]||e.e>17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(BS=!1,a=h):a=t,l=new d(.03125);e.e>-2;)e=e.times(l),f+=5;for(a+=r=Math.log(VS(2,f))/Math.LN10*2+5|0,n=o=u=new d(1),d.precision=a;;){if(o=aE(o.times(e),a,1),n=n.times(++c),rE((l=u.plus(lE(o,n,a,1))).d).slice(0,a)===rE(u.d).slice(0,a)){for(i=f;i--;)u=aE(u.times(u),a,1);if(null!=t)return d.precision=h,u;if(!(s<3&&oE(u.d,a-r,p,s)))return aE(u,d.precision=h,p,BS=!0);d.precision=a+=10,n=o=l=new d(1),c=0,s++}u=l}}function bE(e,t){var n,r,i,o,u,l,a,s,c,f,d,p=1,h=e,v=h.d,m=h.constructor,g=m.rounding,y=m.precision;if(h.s<0||!v||!v[0]||!h.e&&1==v[0]&&1==v.length)return new m(v&&!v[0]?-1/0:1!=h.s?NaN:v?0:h);if(null==t?(BS=!1,c=y):c=t,m.precision=c+=10,r=(n=rE(v)).charAt(0),!(Math.abs(o=h.e)<15e14))return s=fE(m,c+2,y).times(o+""),h=bE(new m(r+"."+n.slice(1)),c-10).plus(s),m.precision=y,null==t?aE(h,y,g,BS=!0):h;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=rE((h=h.times(e)).d)).charAt(0),p++;for(o=h.e,r>1?(h=new m("0."+n),o++):h=new m(r+"."+n.slice(1)),f=h,a=u=h=lE(h.minus(1),h.plus(1),c,1),d=aE(h.times(h),c,1),i=3;;){if(u=aE(u.times(d),c,1),rE((s=a.plus(lE(u,new m(i),c,1))).d).slice(0,c)===rE(a.d).slice(0,c)){if(a=a.times(2),0!==o&&(a=a.plus(fE(m,c+2,y).times(o+""))),a=lE(a,new m(p),c,1),null!=t)return m.precision=y,a;if(!oE(a.d,c-10,g,l))return aE(a,m.precision=y,g,BS=!0);m.precision=c+=10,s=u=h=lE(f.minus(1),f.plus(1),c,1),d=aE(h.times(h),c,1),i=l=1}a=s,i+=2}}function wE(e){return String(e.s*e.s/0)}function xE(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%QS,n<0&&(r+=QS),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=QS;r<i;)e.d.push(+t.slice(r,r+=QS));t=t.slice(r),r=QS-t.length}else r-=i;for(;r--;)t+="0";e.d.push(+t),BS&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function jE(e,t){var n,r,i,o,u,l,a,s,c;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),KS.test(t))return xE(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(ZS.test(t))n=16,t=t.toLowerCase();else if(XS.test(t))n=2;else{if(!GS.test(t))throw Error(RS+t);n=8}for((o=t.search(/p/i))>0?(a=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),u=(o=t.indexOf("."))>=0,r=e.constructor,u&&(o=(l=(t=t.replace(".","")).length)-o,i=vE(r,new r(n),o,2*o)),o=c=(s=uE(t,n,JS)).length-1;0===s[o];--o)s.pop();return o<0?new r(0*e.s):(e.e=cE(s,c),e.d=s,BS=!1,u&&(e=lE(e,i,4*l)),a&&(e=e.times(Math.abs(a)<54?VS(2,a):hD.pow(2,a))),BS=!0,e)}function OE(e,t,n,r,i){var o,u,l,a,s=e.precision,c=Math.ceil(s/QS);for(BS=!1,a=n.times(n),l=new e(r);;){if(u=lE(l.times(a),new e(t++*t++),s,1),l=i?r.plus(u):r.minus(u),r=lE(u.times(a),new e(t++*t++),s,1),void 0!==(u=l.plus(r)).d[c]){for(o=c;u.d[o]===l.d[o]&&o--;);if(-1==o)break}o=l,l=r,r=u,u=o}return BS=!0,u.d.length=c+1,u}function SE(e,t){for(var n=e;--t;)n*=e;return n}function EE(e,t){var n,r=t.s<0,i=dE(e,e.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return YS=r?4:1,t;if((n=t.divToInt(i)).isZero())YS=r?3:2;else{if((t=t.minus(n.times(i))).lte(o))return YS=mE(n)?r?2:3:r?4:1,t;YS=mE(n)?r?1:4:r?3:2}return t.minus(i).abs()}function DE(e,t,n,r){var i,o,u,l,a,s,c,f,d,p=e.constructor,h=void 0!==n;if(h?(iE(n,1,IS),void 0===r?r=p.rounding:iE(r,0,8)):(n=p.precision,r=p.rounding),e.isFinite()){for(h?(i=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):i=t,(u=(c=sE(e)).indexOf("."))>=0&&(c=c.replace(".",""),(d=new p(1)).e=c.length-u,d.d=uE(sE(d),10,i),d.e=d.d.length),o=a=(f=uE(c,10,i)).length;0==f[--a];)f.pop();if(f[0]){if(u<0?o--:((e=new p(e)).d=f,e.e=o,f=(e=lE(e,d,n,r,0,i)).d,o=e.e,s=TS),u=f[n],l=i/2,s=s||void 0!==f[n+1],s=r<4?(void 0!==u||s)&&(0===r||r===(e.s<0?3:2)):u>l||u===l&&(4===r||s||6===r&&1&f[n-1]||r===(e.s<0?8:7)),f.length=n,s)for(;++f[--n]>i-1;)f[n]=0,n||(++o,f.unshift(1));for(a=f.length;!f[a-1];--a);for(u=0,c="";u<a;u++)c+=LS.charAt(f[u]);if(h){if(a>1)if(16==t||8==t){for(u=16==t?4:3,--a;a%u;a++)c+="0";for(a=(f=uE(c,i,t)).length;!f[a-1];--a);for(u=1,c="1.";u<a;u++)c+=LS.charAt(f[u])}else c=c.charAt(0)+"."+c.slice(1);c=c+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)c="0"+c;c="0."+c}else if(++o>a)for(o-=a;o--;)c+="0";else o<a&&(c=c.slice(0,o)+"."+c.slice(o))}else c=h?"0p+0":"0";c=(16==t?"0x":2==t?"0b":8==t?"0o":"")+c}else c=wE(e);return e.s<0?"-"+c:c}function kE(e,t){if(e.length>t)return e.length=t,!0}function ME(e){return new this(e).abs()}function _E(e){return new this(e).acos()}function AE(e){return new this(e).acosh()}function PE(e,t){return new this(e).plus(t)}function TE(e){return new this(e).asin()}function YE(e){return new this(e).asinh()}function HE(e){return new this(e).atan()}function IE(e){return new this(e).atanh()}function LE(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?dE(this,r,i):new this(0)).s=e.s:!e.d||t.isZero()?(n=dE(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,n=this.atan(lE(e,t,o,1)),t=dE(this,o,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(lE(e,t,o,1)):(n=dE(this,o,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function NE(e){return new this(e).cbrt()}function $E(e){return aE(e=new this(e),e.e+1,2)}function CE(e,t,n){return new this(e).clamp(t,n)}function BE(e){if(!e||"object"!=typeof e)throw Error(FS+"Object expected");var t,n,r,i=!0===e.defaults,o=["precision",1,IS,"rounding",0,8,"toExpNeg",-HS,0,"toExpPos",0,HS,"maxE",0,HS,"minE",-HS,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(n=o[t],i&&(this[n]=CS[n]),void 0!==(r=e[n])){if(!(qS(r)===r&&r>=o[t+1]&&r<=o[t+2]))throw Error(RS+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=CS[n]),void 0!==(r=e[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(RS+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(US);this[n]=!0}else this[n]=!1}return this}function FE(e){return new this(e).cos()}function RE(e){return new this(e).cosh()}function zE(e,t){return new this(e).div(t)}function UE(e){return new this(e).exp()}function WE(e){return aE(e=new this(e),e.e+1,3)}function qE(){var e,t,n=new this(0);for(BS=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return BS=!0,new this(1/0);n=t}return BS=!0,n.sqrt()}function VE(e){return e instanceof hD||e&&e.toStringTag===WS||!1}function XE(e){return new this(e).ln()}function ZE(e,t){return new this(e).log(t)}function GE(e){return new this(e).log(2)}function KE(e){return new this(e).log(10)}function JE(){return gE(this,arguments,"lt")}function QE(){return gE(this,arguments,"gt")}function eD(e,t){return new this(e).mod(t)}function tD(e,t){return new this(e).mul(t)}function nD(e,t){return new this(e).pow(t)}function rD(e){var t,n,r,i,o=0,u=new this(1),l=[];if(void 0===e?e=this.precision:iE(e,1,IS),r=Math.ceil(e/QS),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));o<r;)(i=t[o])>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:l[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(US);for(t=crypto.randomBytes(r*=4);o<r;)(i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,o):(l.push(i%1e7),o+=4);o=r/4}else for(;o<r;)l[o++]=1e7*Math.random()|0;for(r=l[--o],e%=QS,r&&e&&(i=VS(10,QS-e),l[o]=(r/i|0)*i);0===l[o];o--)l.pop();if(o<0)n=0,l=[0];else{for(n=-1;0===l[0];n-=QS)l.shift();for(r=1,i=l[0];i>=10;i/=10)r++;r<QS&&(n-=QS-r)}return u.e=n,u.d=l,u}function iD(e){return aE(e=new this(e),e.e+1,this.rounding)}function oD(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function uD(e){return new this(e).sin()}function lD(e){return new this(e).sinh()}function aD(e){return new this(e).sqrt()}function sD(e,t){return new this(e).sub(t)}function cD(){var e=0,t=arguments,n=new this(t[e]);for(BS=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return BS=!0,aE(n,this.precision,this.rounding)}function fD(e){return new this(e).tan()}function dD(e){return new this(e).tanh()}function pD(e){return aE(e=new this(e),e.e+1,1)}nE[Symbol.for("nodejs.util.inspect.custom")]=nE.toString,nE[Symbol.toStringTag]="Decimal";var hD=nE.constructor=function e(t){var n,r,i;function o(e){var t,n,r,i=this;if(!(i instanceof o))return new o(e);if(i.constructor=o,VE(e))return i.s=e.s,void(BS?!e.d||e.e>o.maxE?(i.e=NaN,i.d=null):e.e<o.minE?(i.e=0,i.d=[0]):(i.e=e.e,i.d=e.d.slice()):(i.e=e.e,i.d=e.d?e.d.slice():e.d));if("number"===(r=typeof e)){if(0===e)return i.s=1/e<0?-1:1,i.e=0,void(i.d=[0]);if(e<0?(e=-e,i.s=-1):i.s=1,e===~~e&&e<1e7){for(t=0,n=e;n>=10;n/=10)t++;return void(BS?t>o.maxE?(i.e=NaN,i.d=null):t<o.minE?(i.e=0,i.d=[0]):(i.e=t,i.d=[e]):(i.e=t,i.d=[e]))}return 0*e!=0?(e||(i.s=NaN),i.e=NaN,void(i.d=null)):xE(i,e.toString())}if("string"!==r)throw Error(RS+e);return 45===(n=e.charCodeAt(0))?(e=e.slice(1),i.s=-1):(43===n&&(e=e.slice(1)),i.s=1),KS.test(e)?xE(i,e):jE(i,e)}if(o.prototype=nE,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=BE,o.clone=e,o.isDecimal=VE,o.abs=ME,o.acos=_E,o.acosh=AE,o.add=PE,o.asin=TE,o.asinh=YE,o.atan=HE,o.atanh=IE,o.atan2=LE,o.cbrt=NE,o.ceil=$E,o.clamp=CE,o.cos=FE,o.cosh=RE,o.div=zE,o.exp=UE,o.floor=WE,o.hypot=qE,o.ln=XE,o.log=ZE,o.log10=KE,o.log2=GE,o.max=JE,o.min=QE,o.mod=eD,o.mul=tD,o.pow=nD,o.random=rD,o.round=iD,o.sign=oD,o.sin=uD,o.sinh=lD,o.sqrt=aD,o.sub=sD,o.sum=cD,o.tan=fD,o.tanh=dD,o.trunc=pD,void 0===t&&(t={}),t&&!0!==t.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<i.length;)t.hasOwnProperty(r=i[n++])||(t[r]=this[r]);return o.config(t),o}(CS);NS=new hD(NS),$S=new hD($S);var vD=y(Uc("floor"));var mD=y(wa());var gD,yD={exports:{}},bD={exports:{}};!function(e,t){var n;e.exports=(n=ha(),gD||(gD=1,function(e,t){var n,r,i,o,u,l,a;e.exports=(i=(r=a=ha()).lib,o=i.Base,u=i.WordArray,(l=r.x64={}).Word=o.extend({init:function(e,t){this.high=e,this.low=t}}),l.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=t!=n?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r<t;r++){var i=e[r];n.push(i.high),n.push(i.low)}return u.create(n,this.sigBytes)},clone:function(){for(var e=o.clone.call(this),t=e.words=this.words.slice(0),n=t.length,r=0;r<n;r++)t[r]=t[r].clone();return e}}),a)}(bD)),function(){var e=n,t=e.lib.Hasher,r=e.x64,i=r.Word,o=r.WordArray,u=e.algo;function l(){return i.create.apply(i,arguments)}var a=[l(1116352408,3609767458),l(1899447441,602891725),l(3049323471,3964484399),l(3921009573,2173295548),l(961987163,4081628472),l(1508970993,3053834265),l(2453635748,2937671579),l(2870763221,3664609560),l(3624381080,2734883394),l(310598401,1164996542),l(607225278,1323610764),l(1426881987,3590304994),l(1925078388,4068182383),l(2162078206,991336113),l(2614888103,633803317),l(3248222580,3479774868),l(3835390401,2666613458),l(4022224774,944711139),l(264347078,2341262773),l(604807628,2007800933),l(770255983,1495990901),l(1249150122,1856431235),l(1555081692,3175218132),l(1996064986,2198950837),l(2554220882,3999719339),l(2821834349,766784016),l(2952996808,2566594879),l(3210313671,3203337956),l(3336571891,1034457026),l(3584528711,2466948901),l(113926993,3758326383),l(338241895,168717936),l(666307205,1188179964),l(773529912,1546045734),l(1294757372,1522805485),l(1396182291,2643833823),l(1695183700,2343527390),l(1986661051,1014477480),l(2177026350,1206759142),l(2456956037,344077627),l(2730485921,1290863460),l(2820302411,3158454273),l(3259730800,3505952657),l(3345764771,106217008),l(3516065817,3606008344),l(3600352804,1432725776),l(4094571909,1467031594),l(275423344,851169720),l(430227734,3100823752),l(506948616,1363258195),l(659060556,3750685593),l(883997877,3785050280),l(958139571,3318307427),l(1322822218,3812723403),l(1537002063,2003034995),l(1747873779,3602036899),l(1955562222,1575990012),l(2024104815,1125592928),l(2227730452,2716904306),l(2361852424,442776044),l(2428436474,593698344),l(2756734187,3733110249),l(3204031479,2999351573),l(3329325298,3815920427),l(3391569614,3928383900),l(3515267271,566280711),l(3940187606,3454069534),l(4118630271,4000239992),l(116418474,1914138554),l(174292421,2731055270),l(289380356,3203993006),l(460393269,320620315),l(685471733,587496836),l(852142971,1086792851),l(1017036298,365543100),l(1126000580,2618297676),l(1288033470,3409855158),l(1501505948,4234509866),l(1607167915,987167468),l(1816402316,1246189591)],s=[];!function(){for(var e=0;e<80;e++)s[e]=l()}();var c=u.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],u=n[3],l=n[4],c=n[5],f=n[6],d=n[7],p=r.high,h=r.low,v=i.high,m=i.low,g=o.high,y=o.low,b=u.high,w=u.low,x=l.high,j=l.low,O=c.high,S=c.low,E=f.high,D=f.low,k=d.high,M=d.low,_=p,A=h,P=v,T=m,Y=g,H=y,I=b,L=w,N=x,$=j,C=O,B=S,F=E,R=D,z=k,U=M,W=0;W<80;W++){var q,V,X=s[W];if(W<16)V=X.high=0|e[t+2*W],q=X.low=0|e[t+2*W+1];else{var Z=s[W-15],G=Z.high,K=Z.low,J=(G>>>1|K<<31)^(G>>>8|K<<24)^G>>>7,Q=(K>>>1|G<<31)^(K>>>8|G<<24)^(K>>>7|G<<25),ee=s[W-2],te=ee.high,ne=ee.low,re=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,ie=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),oe=s[W-7],ue=oe.high,le=oe.low,ae=s[W-16],se=ae.high,ce=ae.low;V=(V=(V=J+ue+((q=Q+le)>>>0<Q>>>0?1:0))+re+((q+=ie)>>>0<ie>>>0?1:0))+se+((q+=ce)>>>0<ce>>>0?1:0),X.high=V,X.low=q}var fe,de=N&C^~N&F,pe=$&B^~$&R,he=_&P^_&Y^P&Y,ve=A&T^A&H^T&H,me=(_>>>28|A<<4)^(_<<30|A>>>2)^(_<<25|A>>>7),ge=(A>>>28|_<<4)^(A<<30|_>>>2)^(A<<25|_>>>7),ye=(N>>>14|$<<18)^(N>>>18|$<<14)^(N<<23|$>>>9),be=($>>>14|N<<18)^($>>>18|N<<14)^($<<23|N>>>9),we=a[W],xe=we.high,je=we.low,Oe=z+ye+((fe=U+be)>>>0<U>>>0?1:0),Se=ge+ve;z=F,U=R,F=C,R=B,C=N,B=$,N=I+(Oe=(Oe=(Oe=Oe+de+((fe+=pe)>>>0<pe>>>0?1:0))+xe+((fe+=je)>>>0<je>>>0?1:0))+V+((fe+=q)>>>0<q>>>0?1:0))+(($=L+fe|0)>>>0<L>>>0?1:0)|0,I=Y,L=H,Y=P,H=T,P=_,T=A,_=Oe+(me+he+(Se>>>0<ge>>>0?1:0))+((A=fe+Se|0)>>>0<fe>>>0?1:0)|0}h=r.low=h+A,r.high=p+_+(h>>>0<A>>>0?1:0),m=i.low=m+T,i.high=v+P+(m>>>0<T>>>0?1:0),y=o.low=y+H,o.high=g+Y+(y>>>0<H>>>0?1:0),w=u.low=w+L,u.high=b+I+(w>>>0<L>>>0?1:0),j=l.low=j+$,l.high=x+N+(j>>>0<$>>>0?1:0),S=c.low=S+B,c.high=O+C+(S>>>0<B>>>0?1:0),D=f.low=D+R,f.high=E+F+(D>>>0<R>>>0?1:0),M=d.low=M+U,d.high=k+z+(M>>>0<U>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(c),e.HmacSHA512=t._createHmacHelper(c)}(),n.SHA512)}(yD);var wD=y(yD.exports);function xD(e,t){return qt(e)&&qt(t)?function(e,t){if(e=e.replace(/\s+/g,""),t=t.replace(/\s+/g,""),!e.length&&!t.length)return 1;if(!e.length||!t.length)return 0;if(e===t)return 1;if(1===e.length&&1===t.length)return 0;if(e.length<2||t.length<2)return 0;let n=new Map;for(let t=0;t<e.length-1;t++){const r=e.substring(t,t+2),i=n.has(r)?n.get(r)+1:1;n.set(r,i)}let r=0;for(let e=0;e<t.length-1;e++){const i=t.substring(e,e+2),o=n.has(i)?n.get(i):0;o>0&&(n.set(i,o-1),r++)}return 2*r/(e.length+t.length-2)}(e,t):0}var jD=Sp;var OD=function(e,t){var n=null==e?0:e.length;return n?jD(e,t)/n:NaN},SD=fo;var ED=y((function(e){return OD(e,SD)}));function DD(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r="";if(qt(e)||Xt(e))r=Xp(e);else{if(!Yu(e))return!!n&&0;r=If(e,"")}if(""===t)return!n||100;if(Tu(t))return!!n&&0;if(_h(r,t))return!n||100;let i=np(t," "),o=function(){let e=$l();return d||e.Fuse}(),u=pu(i,(function(e){return((e,t)=>{let n=new o([e],{includeScore:!0}).search(t);n=Ft(n,0);let r=Ft(n,"score",1);return r=1-r,r*=100,r})(r,e)}));if(n)return ED(u);{let e=80;return No(u,(function(t){return t>=e}))}}function kD(e){if(!zt(e))return{};let{results:t,binarys:n}=e;if(!qt(t))return{};if(!Ut(n))return{};let r={};try{r=JSON.parse(t,(function(e,t){if(qt(t)){if(t.indexOf("[Uint8Array]::")>=0){let e=qc(t.replace("[Uint8Array]::",""));return n[e]}if(t.indexOf("[Uint16Array]::")>=0){let e=qc(t.replace("[Uint16Array]::",""));return n[e]}if(t.indexOf("[ArrayBuffer]::")>=0){let e=qc(t.replace("[ArrayBuffer]::",""));return n[e]}}return t}))}catch(e){}return r}function MD(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!_O(e))return{today:null,msg:"",err:"時間格式錯誤"};let r=n();_O(t)&&(r=n(t,"YYYY-MM-DDTHH:mm:ss.SSSZ"));let i=n(e,"YYYY-MM-DDTHH:mm:ss.SSSZ");if(r>i)return{today:null,msg:"",err:"時間已過"};let o,u=r.format("YYYY-MM-DD"),l=i.format("YYYY-MM-DD"),a=n(u,"YYYY-MM-DD"),s=n(l,"YYYY-MM-DD"),c=i.diff(r,"seconds"),f=i.diff(r,"minutes"),d=i.diff(r,"hours"),p=s.diff(a,"days"),h=s.diff(a,"weeks"),v=s.diff(a,"months"),m=s.diff(a,"years"),g="即將到來";if(c>=0&&(o=!0,g=c+"秒後"),f>0&&(o=!0,g=f+"分鐘後"),d>0){let e=i.format("HH:mm");u===l?(o=!0,g=d+"小時後,今天"+e):(o=!1,g=d+"小時後,明天"+e)}return p>1&&(o=!1,g=2===p?"後天":p+"天後"),h>0&&(o=!1,g=h+"周後"),v>0&&(o=!1,g=v+"個月後"),m>0&&(o=!1,g=m+"年後"),{today:o,msg:g,err:""}}function _D(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!_O(e))return{today:null,msg:"",err:"時間格式錯誤"};let r=n();_O(t)&&(r=n(t,"YYYY-MM-DDTHH:mm:ss.SSSZ"));let i=n(e,"YYYY-MM-DDTHH:mm:ss.SSSZ");if(r<i)return{today:null,msg:"",err:"時間未到"};let o=r.format("YYYY-MM-DD"),u=i.format("YYYY-MM-DD"),l=n(o,"YYYY-MM-DD"),a=n(u,"YYYY-MM-DD"),s=r.diff(i,"seconds"),c=r.diff(i,"minutes"),f=r.diff(i,"hours"),d=l.diff(a,"days"),p=l.diff(a,"weeks"),h=l.diff(a,"months"),v=l.diff(a,"years"),m=!1,g="剛剛";if(s>=0&&(m=!0,g=s+"秒前"),c>0&&(m=!0,g=c+"分鐘前"),f>0){let e=i.format("HH:mm");o===u?(m=!0,g=f+"小時前"):(m=!1,g="昨天"+e)}return d>1&&(m=!1,g=d+"天前"),p>0&&(m=!1,g=p+"周前"),h>0&&(m=!1,g=h+"個月前"),v>0&&(m=!1,g=v+"年前"),{today:m,msg:g,err:""}}function AD(e){let t=MO.sepTZ(e);return e=`${t.t}.000${t.tz}`}function PD(e){let t=MO.sepTZ(e);return e=`${t.t}.000${t.tz}`}function TD(e){if(!Dh(e))return"";let t;try{t=Oh(lS(e))}catch(e){return""}return t}var YD=y((function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}));e._getXLSX=Cl,e._tz=MO,e.ab2blob=function(e){let t=m(e);return new Blob([t])},e.ab2u8arr=m,e.addExcelWorksheetFromData=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"data";if(!zt(e))return{error:"wb is not an effective object"};if(!Ut(Ft(e,"SheetNames")))return{error:"wb.SheetNames is not an array"};if(!Rt(Ft(e,"Sheets")))return{error:"wb.Sheets is not an object"};let r=Bl(t);return Zt(r,"error")?r:(e.SheetNames.push(n),e.Sheets[n]=r,e)},e.addMonth=function(e,t){return Fl(e)&&ca(t)?n(e,"YYYY-MM").add(t,"months").format("YYYY-MM"):""},e.aes2str=La,e.alive=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=$c(),n={},r=null,i=Ft(e,"timeAlive");Vc(i)||(i=1e4),i=qc(i);let o=Ft(e,"timeDetect");return Vc(o)||(o=50),o=qc(o),t.trigger=function(e,u){qt(e)?(Zt(n,e)||setTimeout((()=>{t.emit("message",{eventName:"enter",key:e,data:u,now:_l(n)})}),1),n[e]={data:u,time:Date.now()},null===r&&(r=setInterval((()=>{ou(n,((e,r)=>{if(Date.now()-e.time>i){let e=Ic(n[r]);delete n[r],t.emit("message",{eventName:"leave",key:r,data:e.data,now:_l(n)})}})),zt(n)||(clearInterval(r),r=null)}),o))):console.log("trigger need key")},t.get=function(){let e=[];return ou(n,((t,n)=>{e.push({key:n,data:t.data})})),e=Ic(e),e},t},e.arr2dt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!Yu(e))return{};if(Yu(t))return _l(e)===_l(t)?Jc(e,t):{};let n=[];for(let r=0;r<_l(e);r++)n.push(Ic(t));return Jc(e,n)},e.arrAccum=function(e){if(!Yu(e))return[];let t=[],n=0;return ou(e,(function(e){n+=sa(e),Xt(e)?t.push(n):t.push("")})),t},e.arrAdd=function(){if(_l(arguments)<2)return[];let e=arguments[0];for(let t=1;t<_l(arguments);t++){e=Qc(e,arguments[t])}return e},e.arrAt=Af,e.arrDiff=zd,e.arrFilterByKeywords=function(e,t){if(!Yu(e))return[];if(!qt(t)&&!Yu(t))return[];let n=null;n=qt(t)?np(t," "):t;let r=_l(n);return pu(e,(e=>function(e){let t=!1,i=0;for(let o=0;o<r;o++){let u=n[o],l=u,a="+"===rp(u,1),s="-"===rp(u,1);if((a||s)&&(l=op(u,1)),""===ep(l))continue;let c=e.indexOf(l)>=0;if(a){if(c){t=!0,i=1;break}t=!1,i=0;break}if(s){if(c){t=!1,i=0;break}t=!0,i=1;break}if(c){t=!0;let e=1-o/r;e=e**2,i+=e}}return{hasKeyword:t,weight:i}}(e)))},e.arrFilterByNum=function(e){return Yu(e)?(e=Ic(e),e=fp(e,Xt),e=pu(e,sa)):[]},e.arrFilterByPnum=pp,e.arrFilterByPnumAndToLog=function(e){return Yu(e)?(e=pp(e),e=pu(e,Math.log)):[]},e.arrFind=function(e,t){function n(e){return Ut(e)?e:[e]}return Tu(e)||0===(e=n(e)).length||Tu(t)?[]:(t=n(t),pu(t,(function(t){let n=-1;for(let r=0;r<e.length;r++)if(vp(e[r],t)){n=r;break}return n})))},e.arrGroupByMaxmin=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ft(n,"keyMax");qt(r)||(r="max");let i=Ft(n,"keyMin");qt(i)||(i="min");let o=Ft(n,"keyValue");qt(o)||(o="value");let u=Ft(n,"keyItems");if(qt(u)||(u="items"),!Yu(e))return[];if(!Yu(t))return[];let l=Ic(t);return ou(e,((e,n)=>{let a=Ft(e,o);Xt(a)?a=sa(a):Xt(e)&&(a=sa(e)),yp(a)&&ou(t,((t,n)=>{let o=Ft(t,r,null),s=Ft(t,i,null);if(null!==o&&null!==s&&Xt(o)&&Xt(s)){let r=Ft(t,"maxType");"<="!==r&&"<"!==r&&(r="<=");let i,c,f=Ft(t,"minType");">="!==f&&">"!==f&&(f=">="),o=sa(o),s=sa(s),i=">="===f?a>=s:a>s,c="<="===r?a<=o:a<o,i&&c&&(Zt(l[n],u)||(l[n][u]=[]),l[n][u].push(e))}}))})),l},e.arrHas=bp,e.arrInsert=function(e,t,n){if(!Ut(e))return[];if(Ut(n)||(n=[n]),!_f(t))return e;if((t=qc(t))>_l(e))return e;let r=e;try{r=[...e.slice(0,t),...n,...e.slice(t)]}catch(e){}return r},e.arrLookupByMaxmin=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ft(n,"keyMax");qt(r)||(r="max");let i=Ft(n,"keyMin");qt(i)||(i="min");let o=Ft(n,"keyValue");qt(o)||(o="value");let u=Ft(n,"keyItems");qt(u)||(u="items");let l=Ft(n,"beforeAddResult",null);if(!Yu(e))return[];if(!Yu(t))return[];if(!zt(Ft(e,0)))return[];let a=Ic(e);return ou(a,((e,n)=>{let s=Ft(e,o);Xt(s)&&(s=sa(s)),yp(s)&&ou(t,((e,t)=>{let o=Ft(e,r,null),c=Ft(e,i,null);if(null!==o&&null!==c&&Xt(o)&&Xt(c)){let t=Ft(e,"maxType");"<="!==t&&"<"!==t&&(t="<=");let r,i,f=Ft(e,"minType");">="!==f&&">"!==f&&(f=">="),o=sa(o),c=sa(c),r=">="===f?s>=c:s>c,i="<="===t?s<=o:s<o,r&&i&&(wp(l)&&(e=l(e,a[n],n)),Zt(a[n],u)||(a[n][u]=[]),a[n][u].push(e))}}))})),a},e.arrMax=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Yu(e))return null;let n=Ft(t,"returnIndex");Yl(n)||(n=!1);let r=Ft(t,"compareKey",null),i=e;qt(r)&&(i=pu(e,((e,t)=>Ft(e,r,""))));let o=null,u=xp(i,((e,t)=>Xt(t)?(t=sa(t),null===e?(o=t,t):(e=Math.max(e,t),o=e,e)):e),{returnIndex:!0});if(n)return u;let l=null;return u>=0&&(l=qt(r)?e[u]:o),l},e.arrMin=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Yu(e))return null;let n=Ft(t,"returnIndex");Yl(n)||(n=!1);let r=Ft(t,"compareKey",null),i=e;qt(r)&&(i=pu(e,((e,t)=>Ft(e,r,""))));let o=null,u=xp(i,((e,t)=>Xt(t)?(t=sa(t),null===e?(o=t,t):(e=Math.min(e,t),o=e,e)):e),{returnIndex:!0});if(n)return u;let l=null;return u>=0&&(l=qt(r)?e[u]:o),l},e.arrMulti=Op,e.arrNorm=function(e){if(!Yu(e))return null;let t=Mp(e,e);return Xt(t)?t<=0?null:Math.sqrt(t):null},e.arrProduct=Mp,e.arrReduce=xp,e.arrSep=function(e,t){if(!Yu(e))return[];if(!Vc(t)&&!zt(t))return[];let n="",r=null;if(Vc(t))r=t,n="numCount";else if(zt(t))if(Vc(Ft(t,"numCount")))r=t.numCount,n="numCount";else{if(!Vc(Ft(t,"numGroup")))throw new Error("invalid opt.numCount or opt.numGroup");r=t.numGroup,n="numGroup"}let i=_l(e),o=[];if("numCount"===n)for(let t=0;t<i;t+=r){let n=[];for(let o=0;o<r;o++){let r=t+o;r<i&&n.push(e[r])}o.push(n)}else if("numGroup"===n){for(let e=0;e<r;e++)o[e]=[];let t=-1;for(let n=0;n<i;n++)t++,t>r-1&&(t=0),o[t].push(e[n])}return o},e.arrSort=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Yu(e))return[];if(1===_l(e))return e;let n=Ft(t,"localeCompare");Yl(n)||(n=!1);let r=Ft(t,"returnIndex");Yl(r)||(r=!1);let i=Ft(t,"compareKey",null),o=null;o=n?oh:ih;let u,l=nh(e);if(""===l)return[];if("obj"===l){if(!qt(i))return[];let t=pu(e,((e,t)=>Ft(e,i,""))),l=nh(t);if("num"!==l&&"str"!==l)return[];{n&&(l="files");let i=o(rh(t,l),!0);u=r?i:pu(i,(t=>e[t]))}}else if("num"===l||"str"===l){n&&(l="files");let t=rh(e,l);console.log("num|str: getVirArr vs",t),u=o(t,r)}return u},e.asind=function(e){return Xt(e)?(e=sa(e),180*Math.asin(e)/Math.PI):null},e.atan2d=function(e,t){return Xt(e)?(e=sa(e),Xt(t)?(t=sa(t),180*Math.atan2(t,e)/Math.PI):null):null},e.atand=function(e){return Xt(e)?(e=sa(e),180*Math.atan(e)/Math.PI):null},e.attstr=jh,e.b642obj=function(e){if(!Wt(e))return{};let t={};try{t=Sh(Oh(e))}catch(e){t={}}return t},e.b642str=Oh,e.b642u16arr=Mh,e.b642u8arr=Eh,e.binstr=_h,e.blob2ab=Ph,e.blob2b64=Th,e.blob2str=function(e){let t=Ah(),n=new FileReader;return n.onload=function(){t.resolve(n.result)},n.onerror=function(e){t.reject(e)},n.readAsText(e),t},e.blob2u8arr=Yh,e.blobs2b64s=Hh,e.blobs2u8arrs=Ih,e.bodyLog=function(){let e=`\n <div style="padding:5px; font-size:10pt; font-family:Microsoft JhengHei, Helvetica;">\n <span style="color:#f26;">log: </span>\n <code>${Lh(pu(arguments,(function(e){return Hl(e)})).join(", "))}</code>\n </div>\n `;document.querySelector("body").insertAdjacentHTML("beforeend",e)},e.browserView=Nh,e.browserViewFromBlob=function(e,t){$h(e)&&Nh(e,t)},e.browserViewFromText=function(e){Wt(e)&&Nh(e,"text/plain")},e.browserViewFromU8arr=function(e,t){Dh(e)&&Nh(e,t)},e.bs2u8arr=Ch,e.bufRead=Bh,e.bufReadDbl=Fh,e.bufWrite=Rh,e.bufWriteDbl=zh,e.cache=function(){let e=$c(),t={};function n(t,n){setTimeout((()=>{e.emit(t,n)}),1)}function r(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Zt(t,e))return;let i=Ft(r,"execFun");wp(i)||(i=async()=>{});let o=Ft(r,"inputFun");Ut(o)||(o=[]);let u=Ft(r,"timeExpired");Vc(u)||(u=5e3),u=qc(u),t[e]={needExec:!0,execFun:i,execFunRunning:!1,inputFun:o,value:null,time:null,timeExpired:u},n("message",{fun:"set",key:e,timeExpired:u})}async function i(e){if(Zt(t,e)){let r;n("message",{fun:"get",key:e,msg:"waiting"}),await Wh((()=>!t[e].execFunRunning),{timeInterval:1e3});let i=Date.now();r=t[e].needExec;let o=i-t[e].time;return r?n("message",{fun:"get",key:e,msg:"execute first"}):t[e].timeExpired>0&&o>t[e].timeExpired&&(n("message",{fun:"get",key:e,msg:"execute by timeExpired",timeDiff:o}),r=!0),r?(n("message",{fun:"get",key:e,msg:"execFun start"}),t[e].execFunRunning=!0,t[e].value=await t[e].execFun(...t[e].inputFun).catch((t=>{n("error",{fun:"get",key:e,msg:t})})),t[e].needExec=!1,t[e].time=i,t[e].execFunRunning=!1,n("message",{fun:"get",key:e,msg:"execFun end"})):n("message",{fun:"get",key:e,msg:"use cache"}),Ic(t[e].value)}return n("error",{fun:"get",key:e,msg:"invalid key"}),null}return e.set=r,e.getProxy=async function(e){return r(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),i(e)},e.get=i,e.update=function(e,r){Zt(t,e)&&(n("message",{fun:"updateValue",key:e}),t[e].value=r,t[e].time=Date.now())},e.clear=function(e){Zt(t,e)&&(n("message",{fun:"clear",key:e}),t[e].needExec=!0)},e.remove=function(e){Zt(t,e)&&(n("message",{fun:"remove",key:e}),delete t[e])},e},e.cbol=function(e){if(Yl(e))return e;if(0===e)return!1;if(1===e)return!0;let t=!1;return qt(e)&&"true"===(e=Vh(ep(e)))&&(t=!0),t},e.cdbl=sa,e.cfilesize=function(e){return Xt(e)?(e=sa(e))<1024?Xh(e,1)+" b":e<1048576?Xh(e/1024,1)+" kb":e<1073741824?Xh(e/1024/1024,1)+" mb":e<1099511627776?Xh(e/1024/1024/1024,1)+" gb":"":""},e.cfinancial=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!Xt(e))return"";if(!_f(t))return"";let n=(e=Xh(e,t)).split("."),r=n[0],i=n.length>1?"."+n[1]:"",o=/(\d+)(\d{3})/;for(;o.test(r);)r=r.replace(o,"$1,$2");return r+i},e.cint=qc,e.clearXSS=function(e){return function e(t){return Ut(t)||Rt(t)?(ou(t,(function(n,r){t[r]=e(n)})),t):Wt(t)?r(t,{onIgnoreTagAttr:function(e,t,n,i){if("style"===t)return t+'="'+r.escapeAttrValue(n)+'"'}}):t}(Ic(e))},e.color=tm,e.composeToTree=Tm,e.convertToTree=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!zt(e)&&!Yu(e))return[];let n=Ft(t,"bindKey",null);qt(n)||(n="id");let r=Ft(t,"bindParent",null);qt(r)||(r="parentId");let i=Ft(t,"bindText",null);qt(i)||(i="text");let o=Ft(t,"bindChildren",null);qt(o)||(o="children");let u=Ft(t,"bindType",null);qt(u)||(u="type");let l=Ft(t,"bindNumOfChilren",null);qt(l)||(l="numOfChilren");let a=Ft(t,"bindRoot",null);qt(a)||(a="root");let s=Ft(t,"saveExtProps",null);return Yl(s)||(s=!1),qt(a)&&(e={[a]:e}),Tm(Hm(e,{bindKey:n,bindParent:r,bindText:i,bindType:u,bindNumOfChilren:l}),{bindKey:n,bindParent:r,bindChildren:o,saveExtProps:s})},e.copyStrToClipboard=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Wt(e))return"invalid input";let n=Ft(t,"eleParent");Ko(n)||(n=document.body);let r=document.createElement("textarea");if(r.style.position="fixed",r.style.left=0,r.style.top=0,r.style.zIndex=-1,r.style.background="transparent",r.style.color="transparent",r.value=e,n.appendChild(r),r.select(),!Im(r))return"ele can not be focusd";try{document.execCommand("copy")}catch(e){return"can not copy str to clipboard"}return n.removeChild(r),""},e.cosd=Lm,e.cotd=function(e){return Xt(e)?1/Nm(e=sa(e)):null},e.createExcelWorkbook=$m,e.cscd=function(e){return Xt(e)?1/Cm(e=sa(e)):null},e.cstr=Xp,e.day2cht=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!Bm(e))return"";let r=n(e,"YYYY-MM-DD"),i="";return i=t?r.month()+1+"月"+r.date()+"日":"民國 "+(r.year()-1911)+" 年 "+(r.month()+1)+" 月 "+r.date()+" 日",i},e.debounce=function(){return new function(e){let t=[],n=null,r=null;return Vc(e)||(e=300),e=qc(e),function(i){if(wp(i)){r=Date.now();for(var o=arguments.length,u=new Array(o>1?o-1:0),l=1;l<o;l++)u[l-1]=arguments[l];t.push({func:i,input:u}),null===n&&(n=setInterval((()=>{if(Date.now()-r>e){let e=t.pop();t=[],e.func(...e.input)}0===t.length&&(clearInterval(n),n=null)}),10))}else console.log("func is not a function")}}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:300)},e.delay=Fm,e.dig=Xh,e.digExp=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!Xt(e))return"";if(!_f(t))return"";let n="";return n=0===(e=sa(e))?"0":Math.abs(e)<=1e-6?e.toExponential(t):Xh(e,t),n},e.domAlert=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!qt(e))return;let n=Ft(t,"type","success");Zt(Xm,n)||(n="success");let r=Ft(t,"icon",null);qt(r)||(r=Xm[n]);let i="top-right";"top-left"!==t.position&&"bottom-right"!==t.position&&"bottom-left"!==t.position||(i=t.position);let o=Ft(t,"time");yp(o)||(o=4e3),o<0&&(o=4e3);let u=Ft(t,"paddingStyle",null);null===u&&(u={top:14,right:26,bottom:14,left:14});let l="";{let e=Ft(u,"top",0),t=Ft(u,"bottom",0),n=Ft(u,"left",0);l=`padding:${e}px ${Ft(u,"right",0)}px ${t}px ${n}px;`}let a=Ft(t,"textColor","#000");a=Kh(a,";","");let s=Ft(t,"backgroundColor","#fff");s=Kh(s,";","");let c=Ft(t,"borderWidth",1),f=Ft(t,"borderColor","#ebeef5");f=Kh(f,";","");let d=Ft(t,"borderRadius",8),p=Ft(t,"shadowStyle","0 2px 12px 0 rgba(0,0,0,.1)");p=Kh(p,";","");let h=Ft(t,"closeIconShift",null);null===h&&(h={top:10,right:10});let v="";{let e=Ft(h,"top",""),t=Ft(h,"bottom",""),n=Ft(h,"left",""),r=Ft(h,"right","");yp(e)&&(e=`top:${e}px;`),yp(t)&&(t=`bottom:${t}px;`),yp(n)&&(n=`left:${n}px;`),yp(r)&&(r=`right:${r}px;`),v=`position:absolute; ${e} ${r} ${t} ${n}`}let m=`alt-${Um()}`,g=`alt-${Um()}`,y=`\n <div \n style="display:inline-block; color:${a}; background:${s}; border:${c}px solid ${f}; border-radius:${d}px; box-shadow:${p};"\n onmouseenter="ttWAlertFadeIn('${g}')"\n onmouseleave="ttWAlertFadeOut('${g}')"\n >\n <div style="position:relative; ${l}">\n\n <div style="display:flex; align-items:center;">\n <div style="margin-right:10px;">\n <div style="display:flex;">${r}</div>\n </div>\n <div>${e}</div>\n </div>\n\n <div style="${v}">\n <div \n id="${g}" \n style="display:flex; cursor:pointer; opacity:0;" \n onclick="ttWAlertCancel('${m}')"\n >\n ${Vm}\n </div>\n </div>\n\n </div>\n </div>\n `,b=document.createElement("div");b.id=m,b.style.position="fixed",b.style.transition="transform 0.3s, top 0.5s, bottom 0.5s",b.style.zIndex=-1,b.style.opacity=.001,i.indexOf("-left")>=0?b.style.transform="translateX(-100%)":b.style.transform="translateX(100%)",b.innerHTML=y,document.querySelector("body").appendChild(b);let w=Ah();return function(e){let{id:t,position:n,time:r,pm:i}=e;Zm[t]={id:t,position:n,ele:null,loc:{height:null,top:null,bottom:null,left:null,right:null},timeShow:r,timeStart:Date.now(),pm:i},Jm(),null===Gm&&(Gm=setInterval((()=>{ou(Zm,(e=>{Date.now()-e.timeStart>e.timeShow&&(e.pm.resolve(),Qm(e.id))})),zt(Zm)||(clearInterval(Gm),Gm=null)}),50))}({id:m,position:i,time:o,pm:w}),w},e.domAppend=eg,e.domCancelEvent=ng,e.domCompareText=ig,e.domCompareTextDyn=async function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=arguments.length>5?arguments[5]:void 0;return Yu(o)||(o=["https://cdn.jsdelivr.net/npm/diff2html@3.4.34/bundles/css/diff2html.min.css","https://cdn.jsdelivr.net/npm/diff2html@3.4.34/bundles/js/diff2html.min.js"]),await sg(o),ig(e,t,n,r,i)},e.domConvertToPic=pg,e.domConvertToPicDyn=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return Yu(n)||(n=["https://cdn.jsdelivr.net/npm/html-to-image@1.11.11/dist/html-to-image.js"]),await sg(n),pg(e,t)},e.domDetect=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Ft(t,"timeInterval",null);Vc(n)||(n=20);let r=Ft(t,"tolerancePixel",null);Vc(r)||(r=1);let i,o=$c(),u={offsetWidth:0,offsetHeight:0};if(!wp(e))return console.log("invalid f",e),null;i=setInterval((()=>{let t=e();if(t){let e={offsetWidth:t.offsetWidth,offsetHeight:t.offsetHeight,clientWidth:t.clientWidth,clientHeight:t.clientHeight},n=Math.abs(u.offsetWidth-e.offsetWidth)>r,i=Math.abs(u.offsetHeight-e.offsetHeight)>r;if(n||i){let n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hg(Object(n),!0).forEach((function(t){Yf(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},u);setTimeout((()=>{e.offsetWidth>0&&e.offsetHeight>0&&(o.emit("resize",{sold:n,snew:e,ele:t}),o.emit("resizeWithWindow",{sold:n,snew:e,ele:t,from:"dom"}))}),1)}u=e}}),n);let l=e=>{o.emit("resizeWithWindow",{snew:u,from:"window"})};return window.addEventListener("resize",l),o.clear=()=>{clearInterval(i),window.removeEventListener("resize",l)},o},e.domDrag=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Ko(e))return void console.log("ele is not a HTMLElement",e);let n=Ft(t,"attIdentify",null);qt(n)||(n="dragid");let r=Ft(t,"attIndex",null);qt(r)||(r="dragindex");let i=Ft(t,"attGroup",null);qt(i)||(i="draggroup");let o=Ft(t,"group",null);qt(o)||(o="group");let u=Ft(t,"previewOpacity",null);yp(u)||(u=.4);let l=Ft(t,"previewDisabledOpacity",null);yp(l)||(l=.2);let a=Ft(t,"previewBackground",null);qt(a)||(a="white");let s=Ft(t,"previewBorderWidth",null);yp(s)||(s=1);let c=Ft(t,"previewBorderColor",null);qt(c)||(c="#f26");let f=Ft(t,"timeDragStartDelay",null);yp(f)||(f=120);let d=`c${Um(8)}`,p=o;e.setAttribute(i,p),e.setAttribute(n,d);let h=Ig(p,d,{attIdentify:n,previewOpacity:u,previewBackground:a,previewBorderWidth:s,previewBorderColor:c}),v=function(e,t,n,r){let i=[];return{bind:function(){let n;n="mousedown";let r=function(n){t.dragStart({e:n,ele:e,name:"mousedown"})};e.addEventListener(n,r,!1),i.push({ele:e,name:n,f:r}),n="touchstart";let o=function(n){t.dragStart({e:n,ele:e,name:"touchstart"})};e.addEventListener(n,o,!1),i.push({ele:e,name:n,f:o}),n="touchmove";let u=function(e){t.dragMove({e:e,name:"touchmove"}),e.cancelable&&e.preventDefault()};e.addEventListener(n,u,!1),i.push({ele:e,name:n,f:u})},unbind:function(){ou(i,(e=>{let{ele:t,name:n,f:r}=e;t.removeEventListener(n,r)}))}}}(e,{dragStart:e=>{h.emit(p+"-dragStart",e)},dragMove:e=>{h.emit(p+"-dragMove",e)}});v.bind(),Ng({gid:p,attGroup:i,attIndex:r,attIdentify:n,timeDragStartDelay:f,previewOpacity:u,previewDisabledOpacity:l});let m=$c();return h.on(o+"-change",(e=>{e.tarEid===d&&m.emit("change",e)})),h.on(o+"-start",(e=>{e.tarEid===d&&m.emit("start",e)})),h.on(o+"-move",(e=>{e.tarEid===d&&m.emit("move",e)})),h.on(o+"-enter",(e=>{e.tarEid===d&&m.emit("enter",e)})),h.on(o+"-leave",(e=>{e.tarEid===d&&m.emit("leave",e)})),h.on(o+"-drop",(e=>{e.tarEid===d&&m.emit("drop",e)})),m.setIsActive=function(e){Hg[p].isActive=e},m.unbind=function(){v.unbind(),function(e,t){let n=Hg[e],r=Ic(n.eleIds);Sg(r,t),n.eleIds=r,0===r.length&&(n.oevg.unbind(),n.pv.clear(),delete Hg[e])}(p,d)},m},e.domDragBarAndScroll=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,i=null,o=null,u=null,l=null,a=null,s=null,c=null,f=null,d=null,p=null,h=null,v=null,m=null,g=null,y=!1,b=Ft(n,"getHeighRatio",null);K(b)||(b=()=>1);let w=Ft(n,"getWidthRatio",null);K(w)||(w=()=>1);let x=Ft(n,"stopScrollPropagationForPanel",null);Tl(x)||(x=!1);let j=Ft(n,"stopTouchDragPropagationForPanel",null);Tl(j)||(j=!1);let O=Ft(n,"useTouchDragForPanel",null);Tl(O)||(O=!0);let S=e,E=t,D=$c();return r=e=>{let t=e.deltaY/Math.abs(e.deltaY),n=e.deltaX/Math.abs(e.deltaX);D.emit("scrollPanel",{ratioY:t,ratioX:n}),x&&ng(e)},S.addEventListener("wheel",r),i=e=>{if(O){let t=Ft(e,"touches.0.clientY",0),n=Ft(e,"touches.0.clientX",0),r=-t*b(),i=-n*w();y=!0,D.emit("pressBar",{clientY:r,clientX:i}),j&&ng(e)}},S.addEventListener("touchstart",i),o=e=>{if(O&&y){let t=Ft(e,"touches.0.clientY",0),n=Ft(e,"touches.0.clientX",0),r=-t*b(),i=-n*w();D.emit("dragBar",{clientY:r,clientX:i}),j&&ng(e)}},S.addEventListener("touchmove",o,{passive:!1}),u=e=>{O&&y&&(y=!1,D.emit("freeBar"),j&&ng(e))},S.addEventListener("touchend",u),l=e=>{y=!0,D.emit("pressBar",{clientY:e.clientY,clientX:e.clientX})},E.addEventListener("mousedown",l),a=e=>{y&&(y=!1,D.emit("freeBar"))},E.addEventListener("mouseup",a),s=e=>{y=!0,D.emit("pressBar",{clientY:e.touches[0].clientY,clientX:e.touches[0].clientX})},E.addEventListener("touchstart",s),c=e=>{y&&(D.emit("dragBar",{clientY:e.touches[0].clientY,clientX:e.touches[0].clientX}),ng(e))},E.addEventListener("touchmove",c,{passive:!1}),f=e=>{y&&(y=!1,D.emit("freeBar"))},E.addEventListener("touchend",f),d=e=>{y&&D.emit("dragBar",{clientY:e.clientY,clientX:e.clientX})},window.addEventListener("mousemove",d),p=e=>{y&&(y=!1,D.emit("freeBar"),x&&ng(e))},window.addEventListener("mouseup",p),h=e=>{},window.addEventListener("scroll",h,{passive:!1}),v=e=>{},window.addEventListener("wheel",v,{passive:!1}),m=e=>{},document.addEventListener("scroll",m,{passive:!1}),g=e=>{},document.addEventListener("wheel",g,{passive:!1}),D.clear=function(){S.removeEventListener("wheel",r),S.removeEventListener("touchstart",i),S.removeEventListener("touchmove",o),S.removeEventListener("touchend",u),E.removeEventListener("mousedown",l),E.removeEventListener("mouseup",a),E.removeEventListener("touchstart",s),E.removeEventListener("touchmove",c),E.removeEventListener("touchend",f),window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",p),window.removeEventListener("scroll",h),window.removeEventListener("wheel",v),document.removeEventListener("scroll",m),document.removeEventListener("wheel",g)},D},e.domDragPreview=Pg,e.domDropFiles=function(e){let t=!1,n=!1,r=$c();function i(e){ng(e),n=!0,!1===t&&(t=!0,r.emit("dropIn",{ev:e}))}function o(e){ng(e),n=!1,setTimeout((function(){n||(t=!1,r.emit("dropOut",{ev:e}))}),100)}function u(e){i(e)}function l(e){o(e)}function a(e){function t(){o(e)}i(e),Bg(e.dataTransfer).then((n=>{let i=fp(n.entries,{type:"file"});r.emit("getFiles",{ev:e,files:n.files,filesTree:i,entries:n.entries,cb:t})})).catch((e=>{r.emit("error",e)}))}return e.addEventListener("dragenter",u,!1),e.addEventListener("dragover",u,!1),e.addEventListener("dragleave",l,!1),e.addEventListener("drop",a,!1),r.off=function(){e.removeEventListener("dragenter",u,!1),e.removeEventListener("dragover",u,!1),e.removeEventListener("dragleave",l,!1),e.removeEventListener("drop",a,!1)},r},e.domElementsFromPoint=kg,e.domFadeIn=Wm,e.domFadeOut=qm,e.domFind=Fg,e.domFinds=cg,e.domGetAttr=Mg,e.domGetBoudRect=_g,e.domGetBoudRectRefSelf=Ag,e.domGetFileAccept=Ug,e.domGetFiles=Wg,e.domGetParents=Eg,e.domGetPointFromEvent=Dg,e.domGetScrollableParent=function(e){let t=/(auto|scroll)/,n=function(e,t){return getComputedStyle(e,null).getPropertyValue(t)},r=function(e){return t.test(function(e){return n(e,"overflow")+n(e,"overflow-y")+n(e,"overflow-x")}(e))};if(!(e instanceof HTMLElement||e instanceof SVGElement))return;let i=Eg(e);for(let e=0;e<i.length;e+=1)if(r(i[e]))return i[e];return document.scrollingElement||document.documentElement},e.domGetWindowSize=function(){let e=$l();return{width:(()=>{let t=[Ft(e,"innerWidth"),Ft(e,"document.documentElement.clientWidth"),Ft(e,"document.body.clientWidth")];return t=fp(t,yp),Kg(t)})(),height:(()=>{let t=[Ft(e,"innerHeight"),Ft(e,"document.documentElement.clientHeight"),Ft(e,"document.body.clientHeight")];return t=fp(t,yp),Kg(t)})()}},e.domIsClientXYIn=function(e,t,n){if(!yp(e))return void console.log("clientX is not a number",e);if(!yp(t))return void console.log("clientY is not a number",t);if(!Ko(n))return void console.log("ele is not a HTMLElement",n);let r;try{r=n.getBoundingClientRect()}catch(e){return void console.log("invalid ele for getBoundingClientRect",e)}let i=!1;try{i=e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom}catch(e){console.log("catch when calculating page information of element",e)}return i},e.domIsFocused=Im,e.domIsVisible=function(e){if(!Ko(e))return Promise.reject("invalid element");if(Jg())return Promise.reject("invalid IntersectionObserver");let t=Ah();try{let n=new IntersectionObserver((e=>{t.resolve(e[0].isIntersecting),n.disconnect()}));n.observe(e)}catch(e){t.reject(e)}return t},e.domPrepend=dg,e.domRemove=fg,e.domRenderMarkdownMind=Qg,e.domRenderMarkdownMindDyn=async function(e,t){let n=arguments.length>3?arguments[3]:void 0;return Yu(n)||(n=["https://cdn.jsdelivr.net/npm/d3@7.8.3/dist/d3.min.js","https://cdn.jsdelivr.net/npm/markmap-view@0.14.4/dist/index.min.js","https://cdn.jsdelivr.net/npm/markmap-lib@0.14.4/dist/browser/index.min.js"]),await sg(n),Qg(e,t)},e.domRipple=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ft(n,"timeDuration",null);Vc(r)||(r=1e3);let i=Ft(n,"color",null);if(qt(i)||(i="rgba(255, 255, 255, 0.5)"),!Ko(e))return;e.style.position="relative",e.style.overflow="hidden";let o=e.getBoundingClientRect(),u=t.clientX-o.left,l=t.clientY-o.top,a=2*Math.max(e.clientWidth,e.clientHeight),s=document.createElement("div");s.style.width=`${a}px`,s.style.height=`${a}px`,s.style.transition=`all ${r/1e3}s linear`,s.style.position="absolute",s.style.zIndex=1,s.style.left=`${u}px`,s.style.top=`${l}px`,s.style.borderRadius="50%",s.style.transformOrigin="center",s.style.transform="translate(-50%,-50%) scale(0)",s.style.background=i,s.style.userSelect="none",s.style.pointerEvents="none",e.appendChild(s),setTimeout((()=>{s.style.transform="translate(-50%,-50%) scale(2)",s.style.opacity=0}),1),setTimeout((()=>{fg(s)}),r)},e.domScrollIntoView=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Ko(e))return;Rt(t)||(t={});let n={behavior:"smooth"};n=Uy(Uy({},n),t),tg()&&Ry(),e.scrollIntoView(n)},e.domScrollTo=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Ko(e))return;Rt(t)||(t={});let n={behavior:"smooth"};n=qy(qy({},n),t),tg()&&Ry(),e.scrollTo(n)},e.domShowImages=_b,e.domShowImagesDyn=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;return Yu(r)||(r=["https://cdn.jsdelivr.net/npm/viewerjs@1.11.3/dist/viewer.min.css","https://cdn.jsdelivr.net/npm/viewerjs@1.11.3/dist/viewer.min.js"]),await sg(r),_b(e,t,n)},e.domShowInputAndGetFiles=Pb,e.domShowInputAndGetFilesU8Arrs=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Ft(t,"multiple");Yl(n)||(n=!1);let r=Ft(t,"entireHierarchy");Yl(r)||(r=!1);let i=Ft(t,"sizelimit");Xt(i)||(i=1e3),i=sa(i);let o=Ah(),u=[];return Pb(e,{multiple:n,entireHierarchy:r,sizelimit:i}).then((function(e){let t=Ah(),n=Ft(e,"errs",{}),r=Ft(e,"files",[]);return zt(n)?t.reject(n):t.resolve(r),t})).then((function(e){return ou(e,(function(e){u.push({name:e.name,size:e.size,type:e.type})})),Ih(e)})).then((function(e){ou(e,(function(e,t){u[t].u8a=e})),o.resolve(u)})).catch((function(e){o.reject(e)})),o},e.domTooltip=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,i=null;function o(){null!==r&&r.destroy(!0),e.setAttribute("tippystate",""),clearInterval(i)}let u={arrow:!0,theme:"dark",placement:"bottom",delay:150};n=zt(n)?Mb(u,n):u;let l=t;t||(l=e.innerHTML);let a=Xt(e.getAttribute("tippystate"));if(e.setAttribute("tippystate","5"),a)return;l=`<div style="text-align:left;">${l}</div>`;let s=qx;qx.default&&(s=qx.default),r=s(e,Zx(Zx({},n),{},{content:l,allowHTML:!0,onHidden(){o()},onDestroy(){r=null,o()}})),r.show(),i=setInterval((()=>{let t=e.getAttribute("tippystate");Xt(t)?(t=qc(t),t-=1,e.setAttribute("tippystate",t),t<=0&&o()):o()}),1e3)},e.domTriggerEvent=Ab,e.domVirtualCreate=Gx,e.domVirtualCreateQueue=function(){return new function(){let e=tj(1);return async function(t){return e(Gx,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}}},e.downloadExcelFileFromData=oj,e.downloadExcelFileFromDataDyn=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"data",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;Yu(r)||(r=["https://cdn.jsdelivr.net/npm/xlsx@0.18.5/dist/xlsx.full.min.js"]),await sg(r);let i=oj(e,t,n);return""!==Ft(i,"error","")?Promise.reject(i.error):i},e.downloadFileFromB64=function(e,t){if(!Nl())return void console.log("no window");if(!qt(e))return void console.log("no filename");let n=document.createElement("a");n.href=t,n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)},e.downloadFileFromBlob=nj,e.downloadFileFromText=function(e,t){let n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];Nl()?qt(e)?Wt(t)?Yl(r)?(n=r?new Blob(["\ufeff",t]):new Blob([t]),nj(e,n)):console.log("withBOM is not a boolean"):console.log("invalid content"):console.log("invalid filename"):console.log("no window")},e.downloadFileFromU8Arr=function(e,t){if(!Nl())return void console.log("no window");if(!qt(e))return void console.log("no filename");if(!Dh(t))return void console.log("no data");nj(e,uj(t))},e.dtmapping=lj,e.dtpick=aj,e.evem=$c,e.execProcess=function(e,t){function n(e){try{return e.toString("utf8")}catch(e){}return""}return new Promise((function(r,i){let u="";o.exec(`${e} ${t}`,((e,t,r)=>{if(e)return i(e);qt(t=n(t))&&(u+=t),qt(r=n(r))&&(u+=r)})).on("close",(e=>{r(u)}))}))},e.execScript=function(e,t){return new Promise((function(n,r){Ut(t)||(t=[t]);let i=o.spawnSync(e,t),u=fp(i.output,(e=>null!==e));u=pu(u,(e=>function(e){try{return e.toString("utf8")}catch(e){}return""}(e)));let l=If(u,""),a=Ft(i,"error.message");a?r(a):n(l)}))},e.f2c=function(e){if(!wp(e))return"";let t=String(e),n=t.substring(t.indexOf("/*")+3,t.lastIndexOf("*/"));return n=th(n),n},e.filepathToTree=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Yu(e))return{};let n=Ft(t,"delimiter");qt(n)||(n="❯");let r=Ft(t,"bindRoot");qt(r)||(r="root");let i=Ft(t,"soryItems"),o=pu(e,((e,t)=>{"folder"!==e.type&&"file"!==e.type&&(e.type="file");let r=(e=>{let t=np(e=(e=e.replace(/\\\\/g,"\\")).replace(/\\/g,"/"),"/");return{ss:t,cfp:If(t,n)}})(e.path);return{ind:t,type:e.type,ss:r.ss,data:Ic(e)}})),u=e=>{let t=_l(e),r=[];for(let i=0;i<t;i++){let t=[];for(let n=0;n<=i;n++)t.push(e[n]);let o=If(t,n);r.push({id:o,name:e[i]})}return r},l=-1,a=[],s={};ou(o,(e=>{let t=[r],i=r,o=_l(e.ss)-1;ou(e.ss,((r,c)=>{let f=c<o||"folder"===e.type;t.push(r);let d=null,p=null;c===o&&(d=e.ind,p=e.data);let h=If(t,n),v=u(t);if(!Zt(s,h)){l++;let e=l;s[h]=f?{_indOri:d,_indNormalize:e,ns:_l(t),ts:Ic(t),pathInfors:v,_type:"folder",type:"array",numOfChilren:-1,id:h,parentId:i,text:r,children:[],data:p}:{_indOri:d,_indNormalize:e,ns:_l(t),ts:Ic(t),pathInfors:v,_type:"file",type:"node",numOfChilren:-1,id:h,parentId:i,text:r,data:p},a.push(Lj(Lj({},Ft(s[h],"data",{})),{},{type:s[h]._type,path:"/"+If(t,"/")}))}i=h}))}));let c=mj(s);if(c=Vp(c,"id"),c=Vp(c,"ns"),wp(i)){let e=[],t=Ej(c,"ns");ou(t,((t,n)=>{let r=Ej(t,"parentId");ou(r,((t,r)=>{let o=i(t,r,n);e=[...e,...o]}))})),c=e}let f=[],d=[];ou(c,(e=>{"folder"===e._type?f.push(e):d.push(e)}));let p=Ej(f,"ns"),h=Ej(d,"ns"),v=dj(pu(f,"ns")),m=dj(pu(d,"ns")),g=null;{let e=[r];g=[{_indOri:null,_indNormalize:null,ns:_l(e),ts:Ic(e),pathInfors:u(e),_type:"folder",type:"array",numOfChilren:-1,id:r,parentId:"",text:r,children:[],data:null}]}let y={};y[r]="0.children";let b={};b[r]="0";for(let e=2;e<=v;e++){let t=p[e];ou(t,(e=>{let t=Ft(y,e.parentId,"");if(!qt(t))throw console.log("kpPathFd",y),console.log("v",e,e.parentId),new Error(`invalid parentId[${e.parentId}] in folder`);let n=Ft(g,t);if(Ut(n)||cm(g,t,[]),n=Ft(g,t),!zt(Hj(n,{id:e.id}))){n.push(Lj(Lj({},e),{},{children:[]}));let r=`${t}.${_l(n)-1}`;y[e.id]=`${r}.children`,b[e.id]=r}}))}let w=Ic(g),x={};for(let e=2;e<=m;e++){let t=h[e];ou(t,(e=>{let t=Ft(y,e.parentId,"");if(!qt(t))throw console.log("kpPathFd",y),console.log("v",e,e.parentId),new Error(`invalid parentId[${e.parentId}] in file`);let n=Ft(g,t);if(!Ut(n))throw console.log("treeItems",g),console.log("k",t),console.log("v",e),new Error("無預先建置資料夾");if(!zt(Hj(n,{id:e.id}))){n.push(e);let r=`${t}.${_l(n)-1}`;x[e.id]=r,b[e.id]=r}}))}return{treeItems:g,treeItemsFolder:w,kpPath:b,fpsNormalize:a}},e.files2data=function(e){let t=Ah(),n=pu(e,(function(e){return{name:e.name,size:e.size,type:e.type}}));return Hh(e).then((function(e){let r=pu(e,(function(e){return{b64:e}})),i=Nj(n,r);t.resolve(i)})),t},e.flattenToConn=Hm,e.flattenTree=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ut(e)){if(0===e.length)return[]}else{if(!Rt(e))return[];if(_u(e))return[]}let n=Ft(t,"bindKey",null);qt(n)||(n="id");let r=Ft(t,"bindChildren",null);qt(r)||(r="children");let i=!1;Rt(e)&&(i=!0,e=[e]);let o=[];return Ym(e,((e,t,i)=>{let u=Ft(e,n,null),l=Ft(e,r,null);if(u){let n=function(e){let t=[e[0]];for(let n=1;n<e.length;n++){let i=e[n];t.push(r),t.push(i)}return t}([...i,t]);if(o.push(Cj(Cj({},e),{},{level:(_l(n)-1)/2,nk:n})),l)return l}})),i&&(o=o[0]),o},e.fsCleanFolder=function(e){if(!u.existsSync(e)){let t=Rj(e);return t.error?t.error:{success:"done: "+e}}if(!Bj(e))return{error:"input path is not a folder"};try{u.readdirSync(e).forEach((function(t){let n=e+"/"+t;if(u.lstatSync(n).isDirectory())Fj(n);else try{u.unlinkSync(n)}catch(e){}}))}catch(e){return{error:e}}return{success:"done: "+e}},e.fsCopyFolder=function e(t,n){try{u.readdirSync(t).forEach((function(r){let i=t+"/"+r,o=n+"/"+r,a=u.lstatSync(i);if(a.isDirectory())Rj(l.dirname(o)),e(i,o);else if(a.isSymbolicLink()){let e=u.readlinkSync(i);u.symlinkSync(e,o)}else Rj(l.dirname(o)),u.copyFileSync(i,o)}))}catch(e){return{error:e}}return{success:"done: "+n}},e.fsCreateFile=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(u.existsSync(e))return{error:"input path already exists: "+e};if(zj(e))return{error:"input file is already exists: "+e};try{u.writeFileSync(e,t,n)}catch(e){return{error:e}}return{success:"done: "+e}},e.fsCreateFolder=Rj,e.fsDeleteFile=function(e){if(!u.existsSync(e))return{success:"file does not exist: "+e};if(!zj(e))return{error:"input path is not a file: "+e};try{u.unlinkSync(e)}catch(e){return{error:e}}return{success:"done: "+e}},e.fsDeleteFolder=Fj,e.fsEvem=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"./_evps",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=$c(),i=Ft(t,"timeDetect");Vc(i)||(i=50),i=qc(i);let o=Ft(t,"timeRewatch");return Vc(o)||(o=1e3),o=qc(o),Bj(e)||Rj(e),r.on=function(t,r){let a=l.resolve(e,t),s=Uj({timeDetect:i,timeRewatch:o});s.on(a,(e=>{let t=u.readFileSync(a,"utf8"),n=Sh(t);zt(n)&&(t=n),r(t,e)})),n.push({fp:a,evf:s})},r.off=function(t){let r=l.resolve(e,t);ou(n,(e=>{e.fp===r&&e.evf.clear()}))},r.emit=function(t,n){let r=l.resolve(e,t);qt(n)||(n=JSON.stringify(n)),u.writeFileSync(r,n,"utf8")},r.clear=function(){ou(n,(e=>{e.evf.clear()}))},r},e.fsGetFilesInFolder=function(e){let t=Wj(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1);return t=fp(t,(e=>zj(e.path))),t=pu(t,"path"),t},e.fsGetFoldersInFolder=function(e){let t=Wj(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1);return t=fp(t,(e=>!zj(e.path))),t=pu(t,"path"),t},e.fsIsFile=zj,e.fsIsFolder=Bj,e.fsReadText=function(e){return u.readFileSync(e,"utf8")},e.fsRenameFile=function(e,t){if(!zj(e))return{error:`pahOld[${e}] is not a file`};if(!u.existsSync(t))return{error:`pahNew[${t}] does exist`};try{u.renameSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}},e.fsRenameFolder=function(e,t){if(!Bj(e))return{error:`pahOld[${e}] is not a folder`};if(!u.existsSync(t))return{error:`pahNew[${t}] does exist`};try{u.renameSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}},e.fsTreeFolder=Wj,e.fsWatchFile=Uj,e.fsWriteText=function(e,t){u.writeFileSync(e,t,"utf8")},e.genGradientColor=function(e){if(Tu(e))return{};let t;try{t=tm.toRgba(e)}catch(e){return{}}function n(e,t){return e.a=t,tm.toRgbaString(e)}return{linearGradient:{x1:0,x2:0,y1:0,y2:1},stops:[[0,n(t,.4)],[1,n(t,.9)]]}},e.genID=Um,e.genPm=Ah,e.getBufferSize=Vj,e.getClearPathName=Xj,e.getCsvStrFromData=Zj,e.getDataFromExcelFileU8Arr=Jj,e.getDataFromExcelFileU8ArrDyn=async function(e,t,n){Yu(n)||(n=["https://cdn.jsdelivr.net/npm/xlsx@0.18.5/dist/xlsx.full.min.js"]),await sg(n);let r=Jj(e,t);return""!==Ft(r,"error","")?Promise.reject(r.error):r},e.getDirName=function(e){if(!qt(e))return"";let t=Xj(e);if(t.isRoot)return t.path;let n=Qj(e=t.path);if(!qt(n))return e;let r=Xj(e=eh(e,_l(n)));return r.isRoot,r.path},e.getEnv=function(){let e=Nl(),t="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope;return e=e||t,{isBrowser:e,isWebWorker:t,isNode:"undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node}},e.getExcelU8ArrFromData=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"data";if(!Yu(e)){return{error:"no data"}}qt(t)||(t="data");let n=null,r=ij(e,t);return Zt(r,"error")?r:(n=eO(r),Zt(n,"error"),n)},e.getExcelU8ArrFromWorkbook=eO,e.getExcelWorkbookFromData=ij,e.getExcelWorkbookFromWorksheet=rj,e.getExcelWorksheetFromData=Bl,e.getFileAccept=zg,e.getFileName=Qj,e.getFileTrueName=function(e){if(!qt(e))return"";let t=Qj(e),n=vd(t,".");if(_l(n)<=1)return t;let r="";try{n=yd(n),r=If(n,".")}catch(e){}return r},e.getGlobal=$l,e.getObjSize=function(e){let t=0,n=function e(n){if(null!=n)switch(typeof n){case"number":t+=8;break;case"string":t+=2*n.length;break;case"boolean":t+=4;break;case"object":let r=Object.prototype.toString.call(n).slice(8,-1);if("Object"===r||"Array"===r)for(let t in n)n.hasOwnProperty(t)&&e(n[t]);else t+=2*n.toString().length}return t}(e),r=function(e){return e<1024?e+" bytes":e<1048576?(e/1024).toFixed(3)+" KiB":e<1073741824?(e/1048576).toFixed(3)+" MiB":(e/1073741824).toFixed(3)+" GiB"}(n);return{int:n,str:r}},e.getTimeBetween=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"days",r=lO(n);if(""===r)return[];let i=aO(e,n),o=aO(t,n);if(null===i||null===o)return[];if(e>=t)return[];let u=o.diff(i,n)+1;return pu(uO(u),(function(e){return i.clone().add(e,n).format(r)}))},e.getTimeFromUnit=lO,e.getTimeObject=aO,e.getTimeRange=function(e,t){if(!sO(e))return"無起始時間";if(void 0===t&&(t=e),!sO(t))return"結束時間格式錯誤";let r=n(e,"YYYY-MM-DDTHH:mm:ss"),i=n(t,"YYYY-MM-DDTHH:mm:ss"),o=r.format("YYYY-MM-DD"),u=i.format("YYYY-MM-DD");if(o===u){let n=i.format("HH:mm");if(e===t)return cO(e)+" 至 無";if(e<t)return cO(e)+" 至 "+n;if(e>t)return cO(e)+" 至 "+n+" (起始時間大於結束時間)"}else{if(o<u)return cO(e)+" 至 "+cO(t);if(o>u)return cO(e)+" 至 "+cO(t)+" (起始時間大於結束時間)"}return""},e.getUserAgent=fO,e.getUserAgentDyn=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return Yu(t)||(t=["https://cdn.jsdelivr.net/npm/ua-parser-js@1.0.34/dist/ua-parser.min.js"]),await sg(t),fO(e)},e.getltdtkeys=el,e.haskey=Zt,e.html2pic=pO,e.html2picDyn=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return Yu(n)||(n=["https://cdn.jsdelivr.net/npm/canvg@4.0.0/lib/umd.js","https://cdn.jsdelivr.net/npm/html2canvas@1.4.1/dist/html2canvas.min.js"]),await sg(n),pO(e,t)},e.html2str=hO,e.html2strDyn=async function(e,t){return Yu(t)||(t=["https://cdn.jsdelivr.net/npm/htmlparser@1.7.7/lib/htmlparser.min.js"]),await sg(t),await hO(e)},e.htmlDecode=function(e){let t=document.createElement("span");return t.appendChild(document.createTextNode(e)),t.innerHTML},e.htmlEncode=Lh,e.importResources=sg,e.interp1=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!Ut(e))return{err:"ps is not an array"};if(!yp(t))return{err:"x is not a number"};let r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(_l(e)<=0)return[];let n=Ft(t,"keyX");qt(n)||(n="x");let r=Ft(t,"keyY");qt(r)||(r="y");let i=[];return ou(e,(e=>{let t=null,o=null;Ut(e)&&_l(e)>=2?(t=Ft(e,0),o=Ft(e,1)):(t=Ft(e,n,null),o=Ft(e,r,null)),Xt(t)&&Xt(o)&&(t=ea(t),o=ea(o),i.push({x:t,y:o}))})),i}(e,n);if(Ft(r,"err"))return Ft(r,"err");if(0===_l(r))return{err:"ps(length=0) is not an effective array",ps:e,psEff:r};if(1===_l(r))return{err:"ps(length=1) is one point only",ps:e,psEff:r};let i=function(e){let t=!0,n=!0;for(let r=1;r<_l(e);r++){let i=e[r-1],o=e[r];if(t&&i.x>o.x&&(t=!1),n&&i.x<o.x&&(n=!1),i.x===o.x)return{err:`x can not be equal: i=${r}, x=${i.x}`}}return t?gO:n?yO:"no"}(r);if("no"===i)return{err:"psEff is not increasing or decreasing"};i===yO&&(i=gO,r=Qp(r));let o=Ft(n,"mode");"linear"!==o&&"stairs"!==o&&"blocks"!==o&&(o="linear");try{if("linear"===o)return function(e,t){let n=bO(e,t);if(n!==vO)return n;let r=null;for(let n=1;n<_l(e);n++){let i=e[n-1],o=e[n];if(i.x<=t&&t<=o.x){r=((t-i.x)*o.y+(o.x-t)*i.y)/(o.x-i.x);break}}return null===r?{err:mO}:r}(r,t);if("blocks"===o)return function(e,t){let n=bO(e,t);if(n!==vO)return n;let r=null;for(let n=1;n<_l(e);n++){let i=e[n-1],o=e[n],u=i.x,l=o.x;if(u<=t&&t<=l){r=o.y;break}}return null===r?{err:mO}:r}(r,t);if("stairs"===o)return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ft(n,"xMin");if(yp(r)){if(r>e[0].x)return{err:`xMin=${r} > ps[0].x=${e[0].x}`};r===e[0].x||(e=[{x:r,y:e[0].y},...e])}let i=Ft(n,"xMax");if(yp(i)){if(i<e[_l(e)-1].x)return{err:`xMax=${i} < ps[size(ps)-1].x=${e[_l(e)-1].x}`};if(i===e[_l(e)-1].x);else{let t={x:i,y:e[_l(e)-1].y};e=[...e,t]}}let o=bO(e,t);if(o!==vO)return o;let u=null;for(let n=0;n<_l(e);n++){let r=Ft(e,n-1,null),i=Ft(e,n,null),o=Ft(e,n+1,null),l=i.x;r&&(l=(r.x+i.x)/2);let a=i.x;if(o&&(a=(o.x+i.x)/2),l<=t&&t<=a){u=i.y;break}}return null===u?{err:mO}:u}(r,t,n)}catch(e){return{err:e.toString()}}},e.isDev=function(){return!!location&&_h(location.href,"localhost")},e.isEle=Ko,e.isEleExistByID=function(e){return!!qt(e)&&!(null===document.getElementById(e))},e.isEmail=function(e){return!!qt(e)&&/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e)},e.isIE=tg,e.isNarrow=function(e){if(!Nl())return!1;let t=window.innerWidth>0&&window.innerWidth<=1024,n=!1;if(e){let t=Ft(e,"clientWidth",0);n=t>0&&t<=700}return t||n},e.isStrHasCapital=OO,e.isStrHasLowerCase=SO,e.isStrHasNumber=EO,e.isUserIdentify=function(e){let t=Ah();if(!qt(e))return t.reject("身份證字號非有效字串"),t;if(10!==e.length)return t.reject("身份證字號長度非10位"),t;if(isNaN(e.substr(1,9))||!/^[A-Z]$/.test(e.substr(0,1)))return t.reject("身份證格式錯誤,字首需大寫英文"),t;e="ABCDEFGHJKLMNPQRSTUVXYWZIO".indexOf(e.substring(0,1))+10+""+e.substr(1,9);let n=parseInt(e.substr(0,1))+9*parseInt(e.substr(1,1))+8*parseInt(e.substr(2,1))+7*parseInt(e.substr(3,1))+6*parseInt(e.substr(4,1))+5*parseInt(e.substr(5,1))+4*parseInt(e.substr(6,1))+3*parseInt(e.substr(7,1))+2*parseInt(e.substr(8,1))+parseInt(e.substr(9,1)),r=parseInt(e.substr(10,1));return n%10!=0&&10-n%10!==r?(t.reject("非有效身份證"),t):(t.resolve(),t)},e.isUserName=function(e){let t=Ah();return qt(e)?(t.resolve(),t):(t.reject("請填入姓名"),t)},e.isUserPW=function(e){let t=Ah();if(!Wt(e))return t.reject("密碼非字串"),t;let n=[];return e.length<8&&n.push("長度須大於8個字元"),e.length>30&&n.push("長度須小於30個字元"),OO(e)&&SO(e)&&EO(e)||n.push("須包含大寫、小寫英文與數字各1個字元"),_h(e,["<",">"])&&n.push("不能使用特殊符號(<,>)"),_h(e,["select","insert","update","delete"])&&n.push("不能使用指令(select,insert,update,delete)"),n.length>0?t.reject(If(n,",")):t.resolve(),t},e.isWindow=Nl,e.isab=v,e.isarr=Ut,e.isarr0=Pu,e.isblob=$h,e.isbol=Yl,e.isday=Bm,e.isearr=Yu,e.iseobj=zt,e.iser=Tu,e.isernot=Rg,e.isestr=qt,e.isfun=wp,e.isint=ca,e.ismonth=Fl,e.isn0int=wO,e.isn0num=xO,e.isnbr=Vt,e.isnint=Qx,e.isnnum=function(e){return!!Xt(e)&&sa(e)<0},e.isnull=Mu,e.isnum=Xt,e.isobj=Rt,e.isobj0=_u,e.isp0int=_f,e.isp0num=jO,e.ispint=Vc,e.ispm=Uh,e.ispnum=dp,e.isstr=Wt,e.isstr0=Au,e.istime=sO,e.istimeTZ=AO,e.istimems=DO,e.istimemsTZ=_O,e.isu16arr=qj,e.isu8arr=Dh,e.isundefined=ku,e.j2o=Sh,e.keysmat2ltdt=PO,e.log=function(){let e=null;return{init:function(t){if(!wp(t))throw new Error("loggerFun is not a function");e=t},log:function(t,n,r){if(null===e)throw new Error("no logger: need to construct by init");let i=TO(),o={id:Um(),from:t,level:n,msg:Hl(r),time:i};return e(o)}}},e.ltdt2vrtsable=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!Yu(e))return[];if(!Ut(t))return[];let n=!1;if(ou(e,(function(e){zt(e)||(n=!0)})),n)return[];let r=el(e),i=[];ou(e,(function(e){let t={};ou(r,(function(n){t[n]={value:e[n].value,style:e[n].style,rowspan:1}})),i.push(t)}));let o=Qp(i),u=_l(o);return ou(r,(function(e){if(bp(e,t)){let t=af(0,u,0),n=af(0,u,0),r=af(1,u+1,0);ou(o,(function(i,u){if(u>0){let i=o[u-1][e].value,l=o[u][e].value;vp(i,l)&&(t[u-1]=1,t[u]=1,r[u]=r[u-1]+1),1===t[u-1]&&1===t[u]&&(n[u-1]=0,n[u]=1)}})),ou(o,(function(i,u){1===t[u]&&(1===n[u]?o[u][e].rowspan=r[u]:o[u][e].rowspan=null)}))}})),Qp(o)},e.ltdtDiff=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!Ut(e))return{};if(!Ut(t))return{};if(0===_l(e)&&0===_l(t))return{};let r=Ft(n,"empty");qt(r)||(r="∗empty∗");let i=el(e),o=el(t),u=LO(i,o),l={};ou(u,((e,t)=>{l[t]=e}));let a=zd(Il(e,u,{empty:r}),Il(t,u,{empty:r}),$O($O({},n),{},{mode:"matrix"}));return a.dfs=pu(a.dfs,(e=>{let t={};ou(e,(e=>{e.k=l[e.k],t[e.k]=e}));let n={};return ou(u,(e=>{n[e]=t[e]})),n})),a},e.ltdtDiffByKey=function(e,t,n){let r={infor:{},del:[],same:[],diff:[],add:[]};if(!qt(n))return console.log("invalid key"),r;Ut(e)||(e=[e]),Ut(t)||(t=[t]);let i={},o=[],u=[],l=[];ou(e,(function(e){if(Zt(e,n)){let r={[n]:e[n]},a=Hj(t,r);Tu(a)?(o.push(e),i[e[n]]="del"):vp(e,a)?(l.push(a),i[a[n]]="same"):(u.push(a),i[a[n]]="diff")}}));let a=[];return ou(t,(function(t){if(Zt(t,n)){let r={[n]:t[n]};Tu(Hj(e,r))&&(a.push(t),i[t[n]]="add")}})),{infor:i,del:o,same:l,diff:u,add:a}},e.ltdtkeys2mat=Il,e.ltdtkeysheads2mat=Ll,e.ltdtmapping=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return Yu(e)&&Yu(t)?pu(e,(e=>lj(e,t,n))):[]},e.ltdtmerge=Nj,e.ltdtpick=function(e,t){return Yu(e)&&Yu(t)?pu(e,(e=>aj(e,t))):[]},e.ltdtpull=function(e,t,n){return Ut(e)&&Ut(t)&&qt(n)&&No(e,(e=>Rt(e)))?0===t.length?e:No(t,(e=>Rt(e)))?JO(e,t,n):[]:[]},e.mat2ltdt=function(e){if(!Yu(e))return[];if(e.length<=1)return[];let t=!1;return ou(e,(function(e){Yu(e)||(t=!0)})),t?[]:PO(Nd(e)[0],eS(e))},e.matConcat=function(e,t){if(!Ut(e))return[];if(!Ut(t))return[];if(0===_l(e)&&0===_l(t))return[];let n=_l(e),r=_l(Ft(e,0,[])),i=_l(t),o=_l(Ft(t,0,[])),u=[],l=Math.max(n,i);for(let n=0;n<l;n++){let i=[],l=-1;for(let t=0;t<r;t++){l++;let r=Ft(e,`${n}.${t}`,null);i[l]=r}for(let e=0;e<o;e++){l++;let r=Ft(t,`${n}.${e}`,null);i[l]=r}u[n]=i}return u},e.matDiff=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Ut(e)&&Ut(t)?0===_l(e)&&0===_l(t)?{}:zd(e,t,nS(nS({},n),{},{mode:"matrix"})):{}},e.matat=function(e,t,n){return Yu(e)?pu(e,(function(e){return Af(e,t,n)})):[]},e.now2str=function(){return n().format("YYYY-MM-DDTHH:mm:ssZ")},e.now2strp=function(){return n().format("YYYYMMDDHHmmss")},e.nowDay2str=function(){return n().format("YYYY-MM-DD")},e.nowms2str=TO,e.nowms2strp=function(){return n().format("YYYYMMDDHHmmssSSS")},e.o2j=Hl,e.obj2b64=function(e){let t="";try{t=rS(Hl(e))}catch(e){t=""}return t},e.obj2pb64=function(e,t){return void 0===e?"":qt(t)?iS(Hl({data:e}),t,!0):""},e.obj2str=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Uint8Array";if(ku(e))return"";if(Wt(t))t=[t];else if(!Ut(t))return"";let n="";try{n=JSON.stringify(e,(function(e,n){return t.indexOf("Uint8Array")>=0&&(n=dS.u8arr2b64(n)),t.indexOf("Uint16Array")>=0&&(n=dS.u16arr2b64(n)),n}))}catch(e){n=""}return n},e.obj2stru8arr=yS,e.obj2u8arr=function(e){let t=[],n=[];if(!Yu(e)&&!zt(e))return null;let r=[],i=[];function o(e){r.push(Vj(e)),i.push(e)}try{let u=yS(e);o(bS(u.results)),ou(u.binarys,(e=>{o(e)}));let l=r,a=bS(JSON.stringify(l)),s=new Uint8Array(8);zh(Vj(a),s),t.push(s),t.push(a),ou(i,(e=>{t.push(e)})),ou(t,(e=>{n=function(e,t){let n=Vj(e),r=Vj(t),i=new Uint8Array(n+r);return i.set(new Uint8Array(e),0),i.set(new Uint8Array(t),n),i}(n,e)}))}catch(e){return null}return n},e.objSortBy=wS,e.objSortByKeys=function(e,t){if(!zt(e))return{};if(!Yu(t))return{};let n={};return ou(t,((e,t)=>{n[e]=t})),wS(e,((e,t)=>Ft(n,t,0)))},e.ocr=xS,e.ocrDyn=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return Yu(n)||(n=["https://cdn.jsdelivr.net/npm/tesseract.js@4.0.3/dist/tesseract.min.js"]),await sg(n),await xS(e,t)},e.oo=function(e){if(void 0!==e)return Sh(Hl(e))},e.openLink=function(e){if(!qt(e))return;let t=document.createElement("a");t.href=e,t.target="_blank",document.body.appendChild(t),t.click(),document.body.removeChild(t)},e.pb642obj=function(e,t){return qt(e)&&qt(t)?Sh(La(e,t,!0)).data:""},e.pm2resolve=Jx,e.pmChain=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Ut(e)){let e=Ah();return e.reject("pms is not an array"),e}return e.reduce(((e,t)=>e.then(t)),Promise.resolve(t))},e.pmConvertResolve=Kx,e.pmHook=jS,e.pmHookReject=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return wp(e)?(wp(t)||(t=()=>{}),jS(e,(e=>{if("afterCatch"===e.mode)return t(e.data)}))):null},e.pmIni=function(){return Promise.resolve()},e.pmInvResolve=function(e){if(!Uh(e))throw new Error("pm is not a promise");let t=Ah();return e.then((e=>{let n=Ft(e,"state",""),r=Ft(e,"msg",{});"success"===n?t.resolve(r):"cancelled"===n?t.reject({reason:"cancelled"}):t.reject(r)})).catch((e=>{t.reject(e)})),t},e.pmMap=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r={},i=!1,o=Ah();if(!Ut(e)&&!Rt(e))return o.reject("rs is not an array or object"),o;let u=!1;if(Rt(e)){u=!0;let t=[];ou(e,((e,n)=>{t.push({k:n,v:e})})),e=t}let l=ej(n);return l.on("message",(function(n){if(i)return;let a,s=l.get();if(wp(t)){let e=s.key,n=s.value;u&&(e=s.value.k,n=s.value.v),a=t(n,e)}else a=s.value;a.then((e=>{r[s.key]=e})).catch((e=>{i=!0,l.clear(),o.reject(e)})).finally((()=>{l.cb(),_l(r)===e.length&&o.resolve(mj(r))}))})),ou(e,((e,t)=>{l.push({key:t,value:e})})),o},e.pmQueue=tj,e.pmSeries=og,e.pmThrottle=function(){let e=$c(),t=[],n=null,r=!1;return function(i){let o=Ah();if(!wp(i))return void console.log("func is not a function");let u=Um();for(var l=arguments.length,a=new Array(l>1?l-1:0),s=1;s<l;s++)a[s-1]=arguments[s];return t.push({id:u,func:i,input:a}),null===n&&(n=setInterval((async()=>{if(r)return;r=!0;let i=t.pop();for(let n=0;n<t.length;n++){let r=t[n].id,i={state:"cancelled"};e.emit(r,i)}if(t=[],i){let t,n=i.id;t=wp(i.func)?await Jx(i.func)(...i.input):{state:"error",msg:"fun is not a function"},e.emit(n,t)}r=!1,r||0!==t.length||(clearInterval(n),n=null)}),10)),e.once(u,(e=>{"success"===e.state?o.resolve(e.msg):"cancelled"===e.state?o.reject({reason:"cancelled"}):o.reject(e.msg)})),o}},e.pseudoRandom=ES,e.pseudoRandomIntRange=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"start1";if(ca(e)||(e=0),e=qc(e),ca(t)||(t=100),t=qc(t),e>t)throw new Error(`vstart[${e}] > vend[${t}]`);let r=ES(n)*(t-e+1)+e;return r=Math.ceil(r),r},e.pseudoRandomRange=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"start1";if(Xt(e)||(e=0),e=sa(e),Xt(t)||(t=1),t=sa(t),e>t)throw new Error(`vstart[${e}] > vend[${t}]`);return ES(n)*(t-e)+e},e.queue=ej,e.rang=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if(!Xt(e))return[];if(e=sa(e),!Xt(t))return[];t=sa(t),Vc(n)||(n=2),n=qc(n);let r=(t-e)/n,i=e,o=[];for(let e=0;e<=n;e++)o.push(i),i+=r;return o},e.rep=function(e,t){return qt(e)&&_f(t)?PS(e,t):""},e.repObj=function(e,t){return Tu(e)?[]:Vc(t)?uO(t,gf(e)):[]},e.replace=Kh,e.replaceObj=function(e,t){if(!qt(e))return"";if(!zt(t))return"";let n=!1;return ou(t,(function(e,t){Wt(e)||(n=!0)})),n?"":(ou(t,(function(t,n){e=Kh(e,n,t)})),e)},e.replacePlus=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4?arguments[4]:void 0;if(!qt(e)||!qt(t)||!qt(n))return"";if(!Wt(i))return"";let o="[\\s\\S]*";qt(r)&&(o="[^"+r+"]*");let u=new RegExp(t+o+n,"g");return e.replace(u,i)},e.round=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};_f(t)||(t=0),t=qc(t);let r=Ft(n,"rounding","");if("ROUND_HALF_UP"!==r&&"ROUND_HALF_EVEN"!==r&&(r="ROUND_HALF_UP"),!Xt(e))return"";e=sa(e);let i=hD.clone();return i.set({rounding:hD[r]}),new i(e).toDecimalPlaces(t).toNumber()},e.secd=function(e){return Xt(e)?1/Lm(e=sa(e)):null},e.sep=np,e.sepInt=function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!ca(e))return[];if(!_f(t))return[];if(!Yl(n))return[];let r=vD(e/t),i=e-r*t,o=[];for(let e=1;e<=t;e++){let t=r;e<=i&&(t=r+1),o.push(t)}return n&&(o=Qp(o)),o},e.sind=Cm,e.split=tp,e.str2aes=iS,e.str2b64=rS,e.str2hint=OS,e.str2md5=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!qt(e))return"";if(!Yl(t))return"";let n=mD(e),r="";return r=t?n.toString(ya):n.toString(Ia),r},e.str2obj=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Uint8Array";if(Wt(t))t=[t];else if(!Ut(t))return{};let n={};try{n=JSON.parse(e,(function(e,n){return t.indexOf("Uint8Array")>=0&&(n=dS.b642u8arr(n)),t.indexOf("Uint16Array")>=0&&(n=dS.b642u16arr(n)),n}))}catch(e){n={}}return n},e.str2sha512=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!qt(e))return"";if(!Yl(t))return"";let n=wD(e),r="";return r=t?n.toString(ya):n.toString(Ia),r},e.str2u8arr=bS,e.strCompare=xD,e.strDiff=$d,e.strFindFuzz=DD,e.strFindFuzzDyn=async function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;return Yu(r)||(r=["https://cdn.jsdelivr.net/npm/fuse.js@6.6.2/dist/fuse.min.js"]),await sg(r),DD(e,t,n)},e.strFindSimilar=function(e,t){let n="";if(qt(e)||Xt(e))n=Xp(e);else{if(!Yu(e))return{};n=If(e,"")}return Xt(t)&&(t=Xp(t)),qt(t)&&(t=[t]),Yu(t)?function(e,t){let n=[],r=0;for(let i=0;i<t.length;i++){let o=t[i],u=xD(e,o);n.push({target:o,rating:u}),u>n[r].rating&&(r=i)}return{ratings:n,bestMatch:n[r],bestMatchIndex:r}}(n,t=pu(t,(function(e){return Xp(e)}))):{}},e.strdelleft=op,e.strdelright=eh,e.strleft=rp,e.strmid=Jh,e.strright=ip,e.stru8arr2obj=kD,e.tand=Nm,e.time2day=function(e){return sO(e)?n(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DD"):""},e.time2hour=function(e){return sO(e)?n(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DDTHH"):""},e.time2min=cO,e.timeTZ2day=function(e){return AO(e)?(e=MO.delTZ(e),n(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DD")):""},e.timeTZ2expire=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return AO(e)?(e=AD(e),t=AD(t),MD(e,t)):{today:null,msg:"",err:"時間格式錯誤"}},e.timeTZ2hour=function(e){return AO(e)?(e=MO.delTZ(e),n(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DDTHH")):""},e.timeTZ2min=function(e){return AO(e)?(e=MO.delTZ(e),n(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DDTHH:mm")):""},e.timeTZ2past=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return AO(e)?(e=PD(e),t=PD(t),_D(e,t)):{today:null,msg:"",err:"時間格式錯誤"}},e.timems2day=function(e){return DO(e)?n(e,"YYYY-MM-DDTHH:mm:ss.SSS").format("YYYY-MM-DD"):""},e.timems2hour=function(e){return DO(e)?n(e,"YYYY-MM-DDTHH:mm:ss.SSS").format("YYYY-MM-DDTHH"):""},e.timems2min=function(e){return DO(e)?n(e,"YYYY-MM-DDTHH:mm:ss.SSS").format("YYYY-MM-DDTHH:mm"):""},e.timems2time=function(e){return DO(e)?n(e,"YYYY-MM-DDTHH:mm:ss.SSS").format("YYYY-MM-DDTHH:mm:ss"):""},e.timemsTZ2day=function(e){return _O(e)?(e=MO.delTZ(e),n(e).format("YYYY-MM-DD")):""},e.timemsTZ2expire=MD,e.timemsTZ2hour=function(e){return _O(e)?(e=MO.delTZ(e),n(e).format("YYYY-MM-DDTHH")):""},e.timemsTZ2min=function(e){return _O(e)?(e=MO.delTZ(e),n(e).format("YYYY-MM-DDTHH:mm")):""},e.timemsTZ2past=_D,e.timemsTZ2time=function(e){return _O(e)?(e=MO.delTZ(e),n(e).format("YYYY-MM-DDTHH:mm:ss")):""},e.treeObj=Ym,e.treeToFilepath=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Yu(e))return[];let n=Ft(t,"delimiter");qt(n)||(n="/");let r=Ft(t,"bindRoot");qt(r)||(r="root");let i=[];return Ym(e,((e,t,o)=>{let u=Ft(e,"_type","");if("folder"!==u&&"file"!==u)return e;let l=Ft(e,"pathInfors",[]),a=pu(l,"name"),s=Ft(a,0,"")===r;if(1===_l(a)&&s)return e;s&&(a=Kp(a));let c={type:u,path:n+If(a,n)};return i.push(c),e}),{force:!0}),i},e.trim=th,e.u16arr2b64=sS,e.u16arr2u8arr=aS,e.u8arr2ab=function(e){return Dh(e)?e.buffer:new ArrayBuffer},e.u8arr2b64=lS,e.u8arr2blob=uj,e.u8arr2bs=function(e){if(!Dh(e))return"";let t=e.length,n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n},e.u8arr2obj=function(e){let t=null;if(!Dh(e))return null;try{let n=8,r=e.slice(0,n),i=e.slice(n,Vj(e)),o=Fh(r),u=i.slice(0,o),l=i.slice(o,Vj(i)),a=TD(u),s=function(e,t){let n=0,r=0,i=[];return ou(t,(t=>{r=n+t;let o=e.slice(n,r);n=r,i.push(o)})),i}(l,JSON.parse(a));t=kD({results:TD(s.shift()),binarys:s})}catch(e){}return t},e.u8arr2str=TD,e.u8arr2u16arr=kh,e.urlParse=function(e){if(!qt(e))return{};if(e=vd(e,"?"),!qt(e=Ft(e,"[1]")))return{};let t=vd(e,"&");return t=pu(t,(function(e){return vd(e,"=")})),t=YD(t),t},e.verifyValue=function(e,t){let n=!1,r="";if("isstr"===t)Wt(e)||(n=!0,r="需要為字串",e="");else if("isnum"===t)Xt(e)||(n=!0,r="需要為數字",e=0);else if("isp0num"===t)jO(e)||(n=!0,r="需要為含0的正浮點數",e=0);else if("isn0num"===t)xO(e)||(n=!0,r="需要為含0的負浮點數",e=0);else if("isint"===t)ca(e)||(n=!0,r="需要為整數",e=0);else if("ispint"===t)Vc(e)||(n=!0,r="需要為不含0正整數",e=0);else if("isp0int"===t)_f(e)||(n=!0,r="需要為含0正整數",e=0);else if("isnint"===t)Qx(e)||(n=!0,r="需要為不含0負整數",e=0);else if("isn0int"===t)wO(e)||(n=!0,r="需要為含0負整數",e=0);else if(wp(t)){e=t(e)}else"any"===t?Xt(e)||Wt(e)||(n=!0,r="需要為字串或數字",e=""):(n=!0,r="需要指定驗證類型",e=null);return{value:e,err:n,errmsg:r}},e.waitFun=Wh}));
14
+ var TS,YS,HS=9e15,IS=1e9,LS="0123456789abcdef",NS="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",$S="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",CS={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-HS,maxE:HS,crypto:!1},BS=!0,FS="[DecimalError] ",RS=FS+"Invalid argument: ",zS=FS+"Precision limit exceeded",US=FS+"crypto unavailable",WS="[object Decimal]",qS=Math.floor,VS=Math.pow,XS=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,ZS=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,GS=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,KS=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,JS=1e7,QS=7,eE=NS.length-1,tE=$S.length-1,nE={toStringTag:WS};function rE(e){var t,n,r,i=e.length-1,o="",u=e[0];if(i>0){for(o+=u,t=1;t<i;t++)r=e[t]+"",(n=QS-r.length)&&(o+=hE(n)),o+=r;u=e[t],(n=QS-(r=u+"").length)&&(o+=hE(n))}else if(0===u)return"0";for(;u%10==0;)u/=10;return o+u}function iE(e,t,n){if(e!==~~e||e<t||e>n)throw Error(RS+e)}function oE(e,t,n,r){var i,o,u,l;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=QS,i=0):(i=Math.ceil((t+1)/QS),t%=QS),o=VS(10,QS-t),l=e[i]%o|0,null==r?t<3?(0==t?l=l/100|0:1==t&&(l=l/10|0),u=n<4&&99999==l||n>3&&49999==l||5e4==l||0==l):u=(n<4&&l+1==o||n>3&&l+1==o/2)&&(e[i+1]/o/100|0)==VS(10,t-2)-1||(l==o/2||0==l)&&0==(e[i+1]/o/100|0):t<4?(0==t?l=l/1e3|0:1==t?l=l/100|0:2==t&&(l=l/10|0),u=(r||n<4)&&9999==l||!r&&n>3&&4999==l):u=((r||n<4)&&l+1==o||!r&&n>3&&l+1==o/2)&&(e[i+1]/o/1e3|0)==VS(10,t-3)-1,u}function uE(e,t,n){for(var r,i,o=[0],u=0,l=e.length;u<l;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=LS.indexOf(e.charAt(u++)),r=0;r<o.length;r++)o[r]>n-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}nE.absoluteValue=nE.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),aE(e)},nE.ceil=function(){return aE(new this.constructor(this),this.e+1,2)},nE.clampedTo=nE.clamp=function(e,t){var n=this,r=n.constructor;if(e=new r(e),t=new r(t),!e.s||!t.s)return new r(NaN);if(e.gt(t))throw Error(RS+t);return n.cmp(e)<0?e:n.cmp(t)>0?t:new r(n)},nE.comparedTo=nE.cmp=function(e){var t,n,r,i,o=this,u=o.d,l=(e=new o.constructor(e)).d,a=o.s,s=e.s;if(!u||!l)return a&&s?a!==s?a:u===l?0:!u^a<0?1:-1:NaN;if(!u[0]||!l[0])return u[0]?a:l[0]?-s:0;if(a!==s)return a;if(o.e!==e.e)return o.e>e.e^a<0?1:-1;for(t=0,n=(r=u.length)<(i=l.length)?r:i;t<n;++t)if(u[t]!==l[t])return u[t]>l[t]^a<0?1:-1;return r===i?0:r>i^a<0?1:-1},nE.cosine=nE.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+QS,r.rounding=1,n=function(e,t){var n,r,i;if(t.isZero())return t;r=t.d.length,r<32?i=(1/SE(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10");e.precision+=n,t=OE(e,1,t.times(i),new e(1));for(var o=n;o--;){var u=t.times(t);t=u.times(u).minus(u).times(8).plus(1)}return e.precision-=n,t}(r,EE(r,n)),r.precision=e,r.rounding=t,aE(2==YS||3==YS?n.neg():n,e,t,!0)):new r(1):new r(NaN)},nE.cubeRoot=nE.cbrt=function(){var e,t,n,r,i,o,u,l,a,s,c=this,f=c.constructor;if(!c.isFinite()||c.isZero())return new f(c);for(BS=!1,(o=c.s*VS(c.s*c,1/3))&&Math.abs(o)!=1/0?r=new f(o.toString()):(n=rE(c.d),(o=((e=c.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=VS(n,1/3),e=qS((e+1)/3)-(e%3==(e<0?-1:2)),(r=new f(n=o==1/0?"5e"+e:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=c.s),u=(e=f.precision)+3;;)if(s=(a=(l=r).times(l).times(l)).plus(c),r=lE(s.plus(c).times(l),s.plus(a),u+2,1),rE(l.d).slice(0,u)===(n=rE(r.d)).slice(0,u)){if("9999"!=(n=n.slice(u-3,u+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(aE(r,e+1,1),t=!r.times(r).times(r).eq(c));break}if(!i&&(aE(l,e+1,0),l.times(l).times(l).eq(c))){r=l;break}u+=4,i=1}return BS=!0,aE(r,e,f.rounding,t)},nE.decimalPlaces=nE.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=((e=t.length-1)-qS(this.e/QS))*QS,e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},nE.dividedBy=nE.div=function(e){return lE(this,new this.constructor(e))},nE.dividedToIntegerBy=nE.divToInt=function(e){var t=this.constructor;return aE(lE(this,new t(e),0,1,1),t.precision,t.rounding)},nE.equals=nE.eq=function(e){return 0===this.cmp(e)},nE.floor=function(){return aE(new this.constructor(this),this.e+1,3)},nE.greaterThan=nE.gt=function(e){return this.cmp(e)>0},nE.greaterThanOrEqualTo=nE.gte=function(e){var t=this.cmp(e);return 1==t||0===t},nE.hyperbolicCosine=nE.cosh=function(){var e,t,n,r,i,o=this,u=o.constructor,l=new u(1);if(!o.isFinite())return new u(o.s?1/0:NaN);if(o.isZero())return l;n=u.precision,r=u.rounding,u.precision=n+Math.max(o.e,o.sd())+4,u.rounding=1,(i=o.d.length)<32?t=(1/SE(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=OE(u,1,o.times(t),new u(1),!0);for(var a,s=e,c=new u(8);s--;)a=o.times(o),o=l.minus(a.times(c.minus(a.times(c))));return aE(o,u.precision=n,u.rounding=r,!0)},nE.hyperbolicSine=nE.sinh=function(){var e,t,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=OE(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,i=OE(o,2,i=i.times(1/SE(5,e)),i,!0);for(var u,l=new o(5),a=new o(16),s=new o(20);e--;)u=i.times(i),i=i.times(l.plus(u.times(a.times(u).plus(s))))}return o.precision=t,o.rounding=n,aE(i,t,n,!0)},nE.hyperbolicTangent=nE.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,lE(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},nE.inverseCosine=nE.acos=function(){var e,t=this,n=t.constructor,r=t.abs().cmp(1),i=n.precision,o=n.rounding;return-1!==r?0===r?t.isNeg()?dE(n,i,o):new n(0):new n(NaN):t.isZero()?dE(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,t=t.asin(),e=dE(n,i+4,o).times(.5),n.precision=i,n.rounding=o,e.minus(t))},nE.inverseHyperbolicCosine=nE.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,BS=!1,n=n.times(n).minus(1).sqrt().plus(n),BS=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},nE.inverseHyperbolicSine=nE.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,BS=!1,n=n.times(n).plus(1).sqrt().plus(n),BS=!0,r.precision=e,r.rounding=t,n.ln())},nE.inverseHyperbolicTangent=nE.atanh=function(){var e,t,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,r=i.sd(),Math.max(r,e)<2*-i.e-1?aE(new o(i),e,t,!0):(o.precision=n=r-i.e,i=lE(i.plus(1),new o(1).minus(i),n+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)},nE.inverseSine=nE.asin=function(){var e,t,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==t?0===t?((e=dE(o,n+4,r).times(.5)).s=i.s,e):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},nE.inverseTangent=nE.atan=function(){var e,t,n,r,i,o,u,l,a,s=this,c=s.constructor,f=c.precision,d=c.rounding;if(s.isFinite()){if(s.isZero())return new c(s);if(s.abs().eq(1)&&f+4<=tE)return(u=dE(c,f+4,d).times(.25)).s=s.s,u}else{if(!s.s)return new c(NaN);if(f+4<=tE)return(u=dE(c,f+4,d).times(.5)).s=s.s,u}for(c.precision=l=f+10,c.rounding=1,e=n=Math.min(28,l/QS+2|0);e;--e)s=s.div(s.times(s).plus(1).sqrt().plus(1));for(BS=!1,t=Math.ceil(l/QS),r=1,a=s.times(s),u=new c(s),i=s;-1!==e;)if(i=i.times(a),o=u.minus(i.div(r+=2)),i=i.times(a),void 0!==(u=o.plus(i.div(r+=2))).d[t])for(e=t;u.d[e]===o.d[e]&&e--;);return n&&(u=u.times(2<<n-1)),BS=!0,aE(u,c.precision=f,c.rounding=d,!0)},nE.isFinite=function(){return!!this.d},nE.isInteger=nE.isInt=function(){return!!this.d&&qS(this.e/QS)>this.d.length-2},nE.isNaN=function(){return!this.s},nE.isNegative=nE.isNeg=function(){return this.s<0},nE.isPositive=nE.isPos=function(){return this.s>0},nE.isZero=function(){return!!this.d&&0===this.d[0]},nE.lessThan=nE.lt=function(e){return this.cmp(e)<0},nE.lessThanOrEqualTo=nE.lte=function(e){return this.cmp(e)<1},nE.logarithm=nE.log=function(e){var t,n,r,i,o,u,l,a,s=this,c=s.constructor,f=c.precision,d=c.rounding;if(null==e)e=new c(10),t=!0;else{if(n=(e=new c(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new c(NaN);t=e.eq(10)}if(n=s.d,s.s<0||!n||!n[0]||s.eq(1))return new c(n&&!n[0]?-1/0:1!=s.s?NaN:n?0:1/0);if(t)if(n.length>1)o=!0;else{for(i=n[0];i%10==0;)i/=10;o=1!==i}if(BS=!1,u=bE(s,l=f+5),r=t?fE(c,l+10):bE(e,l),oE((a=lE(u,r,l,1)).d,i=f,d))do{if(u=bE(s,l+=10),r=t?fE(c,l+10):bE(e,l),a=lE(u,r,l,1),!o){+rE(a.d).slice(i+1,i+15)+1==1e14&&(a=aE(a,f+1,0));break}}while(oE(a.d,i+=10,d));return BS=!0,aE(a,f,d)},nE.minus=nE.sub=function(e){var t,n,r,i,o,u,l,a,s,c,f,d,p=this,h=p.constructor;if(e=new h(e),!p.d||!e.d)return p.s&&e.s?p.d?e.s=-e.s:e=new h(e.d||p.s!==e.s?p:NaN):e=new h(NaN),e;if(p.s!=e.s)return e.s=-e.s,p.plus(e);if(s=p.d,d=e.d,l=h.precision,a=h.rounding,!s[0]||!d[0]){if(d[0])e.s=-e.s;else{if(!s[0])return new h(3===a?-0:0);e=new h(p)}return BS?aE(e,l,a):e}if(n=qS(e.e/QS),c=qS(p.e/QS),s=s.slice(),o=c-n){for((f=o<0)?(t=s,o=-o,u=d.length):(t=d,n=c,u=s.length),o>(r=Math.max(Math.ceil(l/QS),u)+2)&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for((f=(r=s.length)<(u=d.length))&&(u=r),r=0;r<u;r++)if(s[r]!=d[r]){f=s[r]<d[r];break}o=0}for(f&&(t=s,s=d,d=t,e.s=-e.s),u=s.length,r=d.length-u;r>0;--r)s[u++]=0;for(r=d.length;r>o;){if(s[--r]<d[r]){for(i=r;i&&0===s[--i];)s[i]=JS-1;--s[i],s[r]+=JS}s[r]-=d[r]}for(;0===s[--u];)s.pop();for(;0===s[0];s.shift())--n;return s[0]?(e.d=s,e.e=cE(s,n),BS?aE(e,l,a):e):new h(3===a?-0:0)},nE.modulo=nE.mod=function(e){var t,n=this,r=n.constructor;return e=new r(e),!n.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||n.d&&!n.d[0]?aE(new r(n),r.precision,r.rounding):(BS=!1,9==r.modulo?(t=lE(n,e.abs(),0,3,1)).s*=e.s:t=lE(n,e,0,r.modulo,1),t=t.times(e),BS=!0,n.minus(t))},nE.naturalExponential=nE.exp=function(){return yE(this)},nE.naturalLogarithm=nE.ln=function(){return bE(this)},nE.negated=nE.neg=function(){var e=new this.constructor(this);return e.s=-e.s,aE(e)},nE.plus=nE.add=function(e){var t,n,r,i,o,u,l,a,s,c,f=this,d=f.constructor;if(e=new d(e),!f.d||!e.d)return f.s&&e.s?f.d||(e=new d(e.d||f.s===e.s?f:NaN)):e=new d(NaN),e;if(f.s!=e.s)return e.s=-e.s,f.minus(e);if(s=f.d,c=e.d,l=d.precision,a=d.rounding,!s[0]||!c[0])return c[0]||(e=new d(f)),BS?aE(e,l,a):e;if(o=qS(f.e/QS),r=qS(e.e/QS),s=s.slice(),i=o-r){for(i<0?(n=s,i=-i,u=c.length):(n=c,r=o,u=s.length),i>(u=(o=Math.ceil(l/QS))>u?o+1:u+1)&&(i=u,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((u=s.length)-(i=c.length)<0&&(i=u,n=c,c=s,s=n),t=0;i;)t=(s[--i]=s[i]+c[i]+t)/JS|0,s[i]%=JS;for(t&&(s.unshift(t),++r),u=s.length;0==s[--u];)s.pop();return e.d=s,e.e=cE(s,r),BS?aE(e,l,a):e},nE.precision=nE.sd=function(e){var t,n=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(RS+e);return n.d?(t=pE(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},nE.round=function(){var e=this,t=e.constructor;return aE(new t(e),e.e+1,t.rounding)},nE.sine=nE.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+QS,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:OE(e,2,t,t);n=(n=1.4*Math.sqrt(r))>16?16:0|n,t=t.times(1/SE(5,n)),t=OE(e,2,t,t);for(var i,o=new e(5),u=new e(16),l=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(u.times(i).minus(l))));return t}(r,EE(r,n)),r.precision=e,r.rounding=t,aE(YS>2?n.neg():n,e,t,!0)):new r(NaN)},nE.squareRoot=nE.sqrt=function(){var e,t,n,r,i,o,u=this,l=u.d,a=u.e,s=u.s,c=u.constructor;if(1!==s||!l||!l[0])return new c(!s||s<0&&(!l||l[0])?NaN:l?u:1/0);for(BS=!1,0==(s=Math.sqrt(+u))||s==1/0?(((t=rE(l)).length+a)%2==0&&(t+="0"),s=Math.sqrt(t),a=qS((a+1)/2)-(a<0||a%2),r=new c(t=s==1/0?"5e"+a:(t=s.toExponential()).slice(0,t.indexOf("e")+1)+a)):r=new c(s.toString()),n=(a=c.precision)+3;;)if(r=(o=r).plus(lE(u,o,n+2,1)).times(.5),rE(o.d).slice(0,n)===(t=rE(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(aE(r,a+1,1),e=!r.times(r).eq(u));break}if(!i&&(aE(o,a+1,0),o.times(o).eq(u))){r=o;break}n+=4,i=1}return BS=!0,aE(r,a,c.rounding,e)},nE.tangent=nE.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=lE(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,aE(2==YS||4==YS?n.neg():n,e,t,!0)):new r(NaN)},nE.times=nE.mul=function(e){var t,n,r,i,o,u,l,a,s,c=this,f=c.constructor,d=c.d,p=(e=new f(e)).d;if(e.s*=c.s,!(d&&d[0]&&p&&p[0]))return new f(!e.s||d&&!d[0]&&!p||p&&!p[0]&&!d?NaN:d&&p?0*e.s:e.s/0);for(n=qS(c.e/QS)+qS(e.e/QS),(a=d.length)<(s=p.length)&&(o=d,d=p,p=o,u=a,a=s,s=u),o=[],r=u=a+s;r--;)o.push(0);for(r=s;--r>=0;){for(t=0,i=a+r;i>r;)l=o[i]+p[r]*d[i-r-1]+t,o[i--]=l%JS|0,t=l/JS|0;o[i]=(o[i]+t)%JS|0}for(;!o[--u];)o.pop();return t?++n:o.shift(),e.d=o,e.e=cE(o,n),BS?aE(e,f.precision,f.rounding):e},nE.toBinary=function(e,t){return DE(this,2,e,t)},nE.toDecimalPlaces=nE.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(iE(e,0,IS),void 0===t?t=r.rounding:iE(t,0,8),aE(n,e+n.e+1,t))},nE.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=sE(r,!0):(iE(e,0,IS),void 0===t?t=i.rounding:iE(t,0,8),n=sE(r=aE(new i(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},nE.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return void 0===e?n=sE(i):(iE(e,0,IS),void 0===t?t=o.rounding:iE(t,0,8),n=sE(r=aE(new o(i),e+i.e+1,t),!1,e+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},nE.toFraction=function(e){var t,n,r,i,o,u,l,a,s,c,f,d,p=this,h=p.d,v=p.constructor;if(!h)return new v(p);if(s=n=new v(1),r=a=new v(0),u=(o=(t=new v(r)).e=pE(h)-p.e-1)%QS,t.d[0]=VS(10,u<0?QS+u:u),null==e)e=o>0?t:s;else{if(!(l=new v(e)).isInt()||l.lt(s))throw Error(RS+l);e=l.gt(t)?o>0?t:s:l}for(BS=!1,l=new v(rE(h)),c=v.precision,v.precision=o=h.length*QS*2;f=lE(l,t,0,1,1),1!=(i=n.plus(f.times(r))).cmp(e);)n=r,r=i,i=s,s=a.plus(f.times(i)),a=i,i=t,t=l.minus(f.times(i)),l=i;return i=lE(e.minus(n),r,0,1,1),a=a.plus(i.times(s)),n=n.plus(i.times(r)),a.s=s.s=p.s,d=lE(s,r,o,1).minus(p).abs().cmp(lE(a,n,o,1).minus(p).abs())<1?[s,r]:[a,n],v.precision=c,BS=!0,d},nE.toHexadecimal=nE.toHex=function(e,t){return DE(this,16,e,t)},nE.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:iE(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(BS=!1,n=lE(n,e,0,t,1).times(e),BS=!0,aE(n)):(e.s=n.s,n=e),n},nE.toNumber=function(){return+this},nE.toOctal=function(e,t){return DE(this,8,e,t)},nE.toPower=nE.pow=function(e){var t,n,r,i,o,u,l=this,a=l.constructor,s=+(e=new a(e));if(!(l.d&&e.d&&l.d[0]&&e.d[0]))return new a(VS(+l,s));if((l=new a(l)).eq(1))return l;if(r=a.precision,o=a.rounding,e.eq(1))return aE(l,r,o);if((t=qS(e.e/QS))>=e.d.length-1&&(n=s<0?-s:s)<=9007199254740991)return i=vE(a,l,n,r),e.s<0?new a(1).div(i):aE(i,r,o);if((u=l.s)<0){if(t<e.d.length-1)return new a(NaN);if(0==(1&e.d[t])&&(u=1),0==l.e&&1==l.d[0]&&1==l.d.length)return l.s=u,l}return(t=0!=(n=VS(+l,s))&&isFinite(n)?new a(n+"").e:qS(s*(Math.log("0."+rE(l.d))/Math.LN10+l.e+1)))>a.maxE+1||t<a.minE-1?new a(t>0?u/0:0):(BS=!1,a.rounding=l.s=1,n=Math.min(12,(t+"").length),(i=yE(e.times(bE(l,r+n)),r)).d&&oE((i=aE(i,r+5,1)).d,r,o)&&(t=r+10,+rE((i=aE(yE(e.times(bE(l,t+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=aE(i,r+1,0))),i.s=u,BS=!0,a.rounding=o,aE(i,r,o))},nE.toPrecision=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=sE(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(iE(e,1,IS),void 0===t?t=i.rounding:iE(t,0,8),n=sE(r=aE(new i(r),e,t),e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},nE.toSignificantDigits=nE.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(iE(e,1,IS),void 0===t?t=n.rounding:iE(t,0,8)),aE(new n(this),e,t)},nE.toString=function(){var e=this,t=e.constructor,n=sE(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},nE.truncated=nE.trunc=function(){return aE(new this.constructor(this),this.e+1,1)},nE.valueOf=nE.toJSON=function(){var e=this,t=e.constructor,n=sE(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};var lE=function(){function e(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,u,l,a){var s,c,f,d,p,h,v,m,g,y,b,w,x,j,O,S,E,D,k,M,_=r.constructor,A=r.s==i.s?1:-1,P=r.d,T=i.d;if(!(P&&P[0]&&T&&T[0]))return new _(r.s&&i.s&&(P?!T||P[0]!=T[0]:T)?P&&0==P[0]||!T?0*A:A/0:NaN);for(a?(p=1,c=r.e-i.e):(a=JS,p=QS,c=qS(r.e/p)-qS(i.e/p)),k=T.length,E=P.length,y=(g=new _(A)).d=[],f=0;T[f]==(P[f]||0);f++);if(T[f]>(P[f]||0)&&c--,null==o?(j=o=_.precision,u=_.rounding):j=l?o+(r.e-i.e)+1:o,j<0)y.push(1),h=!0;else{if(j=j/p+2|0,f=0,1==k){for(d=0,T=T[0],j++;(f<E||d)&&j--;f++)O=d*a+(P[f]||0),y[f]=O/T|0,d=O%T|0;h=d||f<E}else{for((d=a/(T[0]+1)|0)>1&&(T=e(T,d,a),P=e(P,d,a),k=T.length,E=P.length),S=k,w=(b=P.slice(0,k)).length;w<k;)b[w++]=0;(M=T.slice()).unshift(0),D=T[0],T[1]>=a/2&&++D;do{d=0,(s=t(T,b,k,w))<0?(x=b[0],k!=w&&(x=x*a+(b[1]||0)),(d=x/D|0)>1?(d>=a&&(d=a-1),1==(s=t(v=e(T,d,a),b,m=v.length,w=b.length))&&(d--,n(v,k<m?M:T,m,a))):(0==d&&(s=d=1),v=T.slice()),(m=v.length)<w&&v.unshift(0),n(b,v,w,a),-1==s&&(s=t(T,b,k,w=b.length))<1&&(d++,n(b,k<w?M:T,w,a)),w=b.length):0===s&&(d++,b=[0]),y[f++]=d,s&&b[0]?b[w++]=P[S]||0:(b=[P[S]],w=1)}while((S++<E||void 0!==b[0])&&j--);h=void 0!==b[0]}y[0]||y.shift()}if(1==p)g.e=c,TS=h;else{for(f=1,d=y[0];d>=10;d/=10)f++;g.e=f+c*p-1,aE(g,l?o+g.e+1:o,u,h)}return g}}();function aE(e,t,n,r){var i,o,u,l,a,s,c,f,d,p=e.constructor;e:if(null!=t){if(!(f=e.d))return e;for(i=1,l=f[0];l>=10;l/=10)i++;if((o=t-i)<0)o+=QS,u=t,a=(c=f[d=0])/VS(10,i-u-1)%10|0;else if((d=Math.ceil((o+1)/QS))>=(l=f.length)){if(!r)break e;for(;l++<=d;)f.push(0);c=a=0,i=1,u=(o%=QS)-QS+1}else{for(c=l=f[d],i=1;l>=10;l/=10)i++;a=(u=(o%=QS)-QS+i)<0?0:c/VS(10,i-u-1)%10|0}if(r=r||t<0||void 0!==f[d+1]||(u<0?c:c%VS(10,i-u-1)),s=n<4?(a||r)&&(0==n||n==(e.s<0?3:2)):a>5||5==a&&(4==n||r||6==n&&(o>0?u>0?c/VS(10,i-u):0:f[d-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,s?(t-=e.e+1,f[0]=VS(10,(QS-t%QS)%QS),e.e=-t||0):f[0]=e.e=0,e;if(0==o?(f.length=d,l=1,d--):(f.length=d+1,l=VS(10,QS-o),f[d]=u>0?(c/VS(10,i-u)%VS(10,u)|0)*l:0),s)for(;;){if(0==d){for(o=1,u=f[0];u>=10;u/=10)o++;for(u=f[0]+=l,l=1;u>=10;u/=10)l++;o!=l&&(e.e++,f[0]==JS&&(f[0]=1));break}if(f[d]+=l,f[d]!=JS)break;f[d--]=0,l=1}for(o=f.length;0===f[--o];)f.pop()}return BS&&(e.e>p.maxE?(e.d=null,e.e=NaN):e.e<p.minE&&(e.e=0,e.d=[0])),e}function sE(e,t,n){if(!e.isFinite())return wE(e);var r,i=e.e,o=rE(e.d),u=o.length;return t?(n&&(r=n-u)>0?o=o.charAt(0)+"."+o.slice(1)+hE(r):u>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+hE(-i-1)+o,n&&(r=n-u)>0&&(o+=hE(r))):i>=u?(o+=hE(i+1-u),n&&(r=n-i-1)>0&&(o=o+"."+hE(r))):((r=i+1)<u&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-u)>0&&(i+1===u&&(o+="."),o+=hE(r))),o}function cE(e,t){var n=e[0];for(t*=QS;n>=10;n/=10)t++;return t}function fE(e,t,n){if(t>eE)throw BS=!0,n&&(e.precision=n),Error(zS);return aE(new e(NS),t,1,!0)}function dE(e,t,n){if(t>tE)throw Error(zS);return aE(new e($S),t,n,!0)}function pE(e){var t=e.length-1,n=t*QS+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function hE(e){for(var t="";e--;)t+="0";return t}function vE(e,t,n,r){var i,o=new e(1),u=Math.ceil(r/QS+4);for(BS=!1;;){if(n%2&&kE((o=o.times(t)).d,u)&&(i=!0),0===(n=qS(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}kE((t=t.times(t)).d,u)}return BS=!0,o}function mE(e){return 1&e.d[e.d.length-1]}function gE(e,t,n){for(var r,i=new e(t[0]),o=0;++o<t.length;){if(!(r=new e(t[o])).s){i=r;break}i[n](r)&&(i=r)}return i}function yE(e,t){var n,r,i,o,u,l,a,s=0,c=0,f=0,d=e.constructor,p=d.rounding,h=d.precision;if(!e.d||!e.d[0]||e.e>17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(BS=!1,a=h):a=t,l=new d(.03125);e.e>-2;)e=e.times(l),f+=5;for(a+=r=Math.log(VS(2,f))/Math.LN10*2+5|0,n=o=u=new d(1),d.precision=a;;){if(o=aE(o.times(e),a,1),n=n.times(++c),rE((l=u.plus(lE(o,n,a,1))).d).slice(0,a)===rE(u.d).slice(0,a)){for(i=f;i--;)u=aE(u.times(u),a,1);if(null!=t)return d.precision=h,u;if(!(s<3&&oE(u.d,a-r,p,s)))return aE(u,d.precision=h,p,BS=!0);d.precision=a+=10,n=o=l=new d(1),c=0,s++}u=l}}function bE(e,t){var n,r,i,o,u,l,a,s,c,f,d,p=1,h=e,v=h.d,m=h.constructor,g=m.rounding,y=m.precision;if(h.s<0||!v||!v[0]||!h.e&&1==v[0]&&1==v.length)return new m(v&&!v[0]?-1/0:1!=h.s?NaN:v?0:h);if(null==t?(BS=!1,c=y):c=t,m.precision=c+=10,r=(n=rE(v)).charAt(0),!(Math.abs(o=h.e)<15e14))return s=fE(m,c+2,y).times(o+""),h=bE(new m(r+"."+n.slice(1)),c-10).plus(s),m.precision=y,null==t?aE(h,y,g,BS=!0):h;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=rE((h=h.times(e)).d)).charAt(0),p++;for(o=h.e,r>1?(h=new m("0."+n),o++):h=new m(r+"."+n.slice(1)),f=h,a=u=h=lE(h.minus(1),h.plus(1),c,1),d=aE(h.times(h),c,1),i=3;;){if(u=aE(u.times(d),c,1),rE((s=a.plus(lE(u,new m(i),c,1))).d).slice(0,c)===rE(a.d).slice(0,c)){if(a=a.times(2),0!==o&&(a=a.plus(fE(m,c+2,y).times(o+""))),a=lE(a,new m(p),c,1),null!=t)return m.precision=y,a;if(!oE(a.d,c-10,g,l))return aE(a,m.precision=y,g,BS=!0);m.precision=c+=10,s=u=h=lE(f.minus(1),f.plus(1),c,1),d=aE(h.times(h),c,1),i=l=1}a=s,i+=2}}function wE(e){return String(e.s*e.s/0)}function xE(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%QS,n<0&&(r+=QS),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=QS;r<i;)e.d.push(+t.slice(r,r+=QS));t=t.slice(r),r=QS-t.length}else r-=i;for(;r--;)t+="0";e.d.push(+t),BS&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function jE(e,t){var n,r,i,o,u,l,a,s,c;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),KS.test(t))return xE(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(ZS.test(t))n=16,t=t.toLowerCase();else if(XS.test(t))n=2;else{if(!GS.test(t))throw Error(RS+t);n=8}for((o=t.search(/p/i))>0?(a=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),u=(o=t.indexOf("."))>=0,r=e.constructor,u&&(o=(l=(t=t.replace(".","")).length)-o,i=vE(r,new r(n),o,2*o)),o=c=(s=uE(t,n,JS)).length-1;0===s[o];--o)s.pop();return o<0?new r(0*e.s):(e.e=cE(s,c),e.d=s,BS=!1,u&&(e=lE(e,i,4*l)),a&&(e=e.times(Math.abs(a)<54?VS(2,a):hD.pow(2,a))),BS=!0,e)}function OE(e,t,n,r,i){var o,u,l,a,s=e.precision,c=Math.ceil(s/QS);for(BS=!1,a=n.times(n),l=new e(r);;){if(u=lE(l.times(a),new e(t++*t++),s,1),l=i?r.plus(u):r.minus(u),r=lE(u.times(a),new e(t++*t++),s,1),void 0!==(u=l.plus(r)).d[c]){for(o=c;u.d[o]===l.d[o]&&o--;);if(-1==o)break}o=l,l=r,r=u,u=o}return BS=!0,u.d.length=c+1,u}function SE(e,t){for(var n=e;--t;)n*=e;return n}function EE(e,t){var n,r=t.s<0,i=dE(e,e.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return YS=r?4:1,t;if((n=t.divToInt(i)).isZero())YS=r?3:2;else{if((t=t.minus(n.times(i))).lte(o))return YS=mE(n)?r?2:3:r?4:1,t;YS=mE(n)?r?1:4:r?3:2}return t.minus(i).abs()}function DE(e,t,n,r){var i,o,u,l,a,s,c,f,d,p=e.constructor,h=void 0!==n;if(h?(iE(n,1,IS),void 0===r?r=p.rounding:iE(r,0,8)):(n=p.precision,r=p.rounding),e.isFinite()){for(h?(i=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):i=t,(u=(c=sE(e)).indexOf("."))>=0&&(c=c.replace(".",""),(d=new p(1)).e=c.length-u,d.d=uE(sE(d),10,i),d.e=d.d.length),o=a=(f=uE(c,10,i)).length;0==f[--a];)f.pop();if(f[0]){if(u<0?o--:((e=new p(e)).d=f,e.e=o,f=(e=lE(e,d,n,r,0,i)).d,o=e.e,s=TS),u=f[n],l=i/2,s=s||void 0!==f[n+1],s=r<4?(void 0!==u||s)&&(0===r||r===(e.s<0?3:2)):u>l||u===l&&(4===r||s||6===r&&1&f[n-1]||r===(e.s<0?8:7)),f.length=n,s)for(;++f[--n]>i-1;)f[n]=0,n||(++o,f.unshift(1));for(a=f.length;!f[a-1];--a);for(u=0,c="";u<a;u++)c+=LS.charAt(f[u]);if(h){if(a>1)if(16==t||8==t){for(u=16==t?4:3,--a;a%u;a++)c+="0";for(a=(f=uE(c,i,t)).length;!f[a-1];--a);for(u=1,c="1.";u<a;u++)c+=LS.charAt(f[u])}else c=c.charAt(0)+"."+c.slice(1);c=c+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)c="0"+c;c="0."+c}else if(++o>a)for(o-=a;o--;)c+="0";else o<a&&(c=c.slice(0,o)+"."+c.slice(o))}else c=h?"0p+0":"0";c=(16==t?"0x":2==t?"0b":8==t?"0o":"")+c}else c=wE(e);return e.s<0?"-"+c:c}function kE(e,t){if(e.length>t)return e.length=t,!0}function ME(e){return new this(e).abs()}function _E(e){return new this(e).acos()}function AE(e){return new this(e).acosh()}function PE(e,t){return new this(e).plus(t)}function TE(e){return new this(e).asin()}function YE(e){return new this(e).asinh()}function HE(e){return new this(e).atan()}function IE(e){return new this(e).atanh()}function LE(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?dE(this,r,i):new this(0)).s=e.s:!e.d||t.isZero()?(n=dE(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,n=this.atan(lE(e,t,o,1)),t=dE(this,o,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(lE(e,t,o,1)):(n=dE(this,o,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function NE(e){return new this(e).cbrt()}function $E(e){return aE(e=new this(e),e.e+1,2)}function CE(e,t,n){return new this(e).clamp(t,n)}function BE(e){if(!e||"object"!=typeof e)throw Error(FS+"Object expected");var t,n,r,i=!0===e.defaults,o=["precision",1,IS,"rounding",0,8,"toExpNeg",-HS,0,"toExpPos",0,HS,"maxE",0,HS,"minE",-HS,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(n=o[t],i&&(this[n]=CS[n]),void 0!==(r=e[n])){if(!(qS(r)===r&&r>=o[t+1]&&r<=o[t+2]))throw Error(RS+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=CS[n]),void 0!==(r=e[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(RS+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(US);this[n]=!0}else this[n]=!1}return this}function FE(e){return new this(e).cos()}function RE(e){return new this(e).cosh()}function zE(e,t){return new this(e).div(t)}function UE(e){return new this(e).exp()}function WE(e){return aE(e=new this(e),e.e+1,3)}function qE(){var e,t,n=new this(0);for(BS=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return BS=!0,new this(1/0);n=t}return BS=!0,n.sqrt()}function VE(e){return e instanceof hD||e&&e.toStringTag===WS||!1}function XE(e){return new this(e).ln()}function ZE(e,t){return new this(e).log(t)}function GE(e){return new this(e).log(2)}function KE(e){return new this(e).log(10)}function JE(){return gE(this,arguments,"lt")}function QE(){return gE(this,arguments,"gt")}function eD(e,t){return new this(e).mod(t)}function tD(e,t){return new this(e).mul(t)}function nD(e,t){return new this(e).pow(t)}function rD(e){var t,n,r,i,o=0,u=new this(1),l=[];if(void 0===e?e=this.precision:iE(e,1,IS),r=Math.ceil(e/QS),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));o<r;)(i=t[o])>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:l[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(US);for(t=crypto.randomBytes(r*=4);o<r;)(i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,o):(l.push(i%1e7),o+=4);o=r/4}else for(;o<r;)l[o++]=1e7*Math.random()|0;for(r=l[--o],e%=QS,r&&e&&(i=VS(10,QS-e),l[o]=(r/i|0)*i);0===l[o];o--)l.pop();if(o<0)n=0,l=[0];else{for(n=-1;0===l[0];n-=QS)l.shift();for(r=1,i=l[0];i>=10;i/=10)r++;r<QS&&(n-=QS-r)}return u.e=n,u.d=l,u}function iD(e){return aE(e=new this(e),e.e+1,this.rounding)}function oD(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function uD(e){return new this(e).sin()}function lD(e){return new this(e).sinh()}function aD(e){return new this(e).sqrt()}function sD(e,t){return new this(e).sub(t)}function cD(){var e=0,t=arguments,n=new this(t[e]);for(BS=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return BS=!0,aE(n,this.precision,this.rounding)}function fD(e){return new this(e).tan()}function dD(e){return new this(e).tanh()}function pD(e){return aE(e=new this(e),e.e+1,1)}nE[Symbol.for("nodejs.util.inspect.custom")]=nE.toString,nE[Symbol.toStringTag]="Decimal";var hD=nE.constructor=function e(t){var n,r,i;function o(e){var t,n,r,i=this;if(!(i instanceof o))return new o(e);if(i.constructor=o,VE(e))return i.s=e.s,void(BS?!e.d||e.e>o.maxE?(i.e=NaN,i.d=null):e.e<o.minE?(i.e=0,i.d=[0]):(i.e=e.e,i.d=e.d.slice()):(i.e=e.e,i.d=e.d?e.d.slice():e.d));if("number"===(r=typeof e)){if(0===e)return i.s=1/e<0?-1:1,i.e=0,void(i.d=[0]);if(e<0?(e=-e,i.s=-1):i.s=1,e===~~e&&e<1e7){for(t=0,n=e;n>=10;n/=10)t++;return void(BS?t>o.maxE?(i.e=NaN,i.d=null):t<o.minE?(i.e=0,i.d=[0]):(i.e=t,i.d=[e]):(i.e=t,i.d=[e]))}return 0*e!=0?(e||(i.s=NaN),i.e=NaN,void(i.d=null)):xE(i,e.toString())}if("string"!==r)throw Error(RS+e);return 45===(n=e.charCodeAt(0))?(e=e.slice(1),i.s=-1):(43===n&&(e=e.slice(1)),i.s=1),KS.test(e)?xE(i,e):jE(i,e)}if(o.prototype=nE,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=BE,o.clone=e,o.isDecimal=VE,o.abs=ME,o.acos=_E,o.acosh=AE,o.add=PE,o.asin=TE,o.asinh=YE,o.atan=HE,o.atanh=IE,o.atan2=LE,o.cbrt=NE,o.ceil=$E,o.clamp=CE,o.cos=FE,o.cosh=RE,o.div=zE,o.exp=UE,o.floor=WE,o.hypot=qE,o.ln=XE,o.log=ZE,o.log10=KE,o.log2=GE,o.max=JE,o.min=QE,o.mod=eD,o.mul=tD,o.pow=nD,o.random=rD,o.round=iD,o.sign=oD,o.sin=uD,o.sinh=lD,o.sqrt=aD,o.sub=sD,o.sum=cD,o.tan=fD,o.tanh=dD,o.trunc=pD,void 0===t&&(t={}),t&&!0!==t.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<i.length;)t.hasOwnProperty(r=i[n++])||(t[r]=this[r]);return o.config(t),o}(CS);NS=new hD(NS),$S=new hD($S);var vD=y(Uc("floor"));var mD=y(wa());var gD,yD={exports:{}},bD={exports:{}};!function(e,t){var n;e.exports=(n=ha(),gD||(gD=1,function(e,t){var n,r,i,o,u,l,a;e.exports=(i=(r=a=ha()).lib,o=i.Base,u=i.WordArray,(l=r.x64={}).Word=o.extend({init:function(e,t){this.high=e,this.low=t}}),l.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=t!=n?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r<t;r++){var i=e[r];n.push(i.high),n.push(i.low)}return u.create(n,this.sigBytes)},clone:function(){for(var e=o.clone.call(this),t=e.words=this.words.slice(0),n=t.length,r=0;r<n;r++)t[r]=t[r].clone();return e}}),a)}(bD)),function(){var e=n,t=e.lib.Hasher,r=e.x64,i=r.Word,o=r.WordArray,u=e.algo;function l(){return i.create.apply(i,arguments)}var a=[l(1116352408,3609767458),l(1899447441,602891725),l(3049323471,3964484399),l(3921009573,2173295548),l(961987163,4081628472),l(1508970993,3053834265),l(2453635748,2937671579),l(2870763221,3664609560),l(3624381080,2734883394),l(310598401,1164996542),l(607225278,1323610764),l(1426881987,3590304994),l(1925078388,4068182383),l(2162078206,991336113),l(2614888103,633803317),l(3248222580,3479774868),l(3835390401,2666613458),l(4022224774,944711139),l(264347078,2341262773),l(604807628,2007800933),l(770255983,1495990901),l(1249150122,1856431235),l(1555081692,3175218132),l(1996064986,2198950837),l(2554220882,3999719339),l(2821834349,766784016),l(2952996808,2566594879),l(3210313671,3203337956),l(3336571891,1034457026),l(3584528711,2466948901),l(113926993,3758326383),l(338241895,168717936),l(666307205,1188179964),l(773529912,1546045734),l(1294757372,1522805485),l(1396182291,2643833823),l(1695183700,2343527390),l(1986661051,1014477480),l(2177026350,1206759142),l(2456956037,344077627),l(2730485921,1290863460),l(2820302411,3158454273),l(3259730800,3505952657),l(3345764771,106217008),l(3516065817,3606008344),l(3600352804,1432725776),l(4094571909,1467031594),l(275423344,851169720),l(430227734,3100823752),l(506948616,1363258195),l(659060556,3750685593),l(883997877,3785050280),l(958139571,3318307427),l(1322822218,3812723403),l(1537002063,2003034995),l(1747873779,3602036899),l(1955562222,1575990012),l(2024104815,1125592928),l(2227730452,2716904306),l(2361852424,442776044),l(2428436474,593698344),l(2756734187,3733110249),l(3204031479,2999351573),l(3329325298,3815920427),l(3391569614,3928383900),l(3515267271,566280711),l(3940187606,3454069534),l(4118630271,4000239992),l(116418474,1914138554),l(174292421,2731055270),l(289380356,3203993006),l(460393269,320620315),l(685471733,587496836),l(852142971,1086792851),l(1017036298,365543100),l(1126000580,2618297676),l(1288033470,3409855158),l(1501505948,4234509866),l(1607167915,987167468),l(1816402316,1246189591)],s=[];!function(){for(var e=0;e<80;e++)s[e]=l()}();var c=u.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],u=n[3],l=n[4],c=n[5],f=n[6],d=n[7],p=r.high,h=r.low,v=i.high,m=i.low,g=o.high,y=o.low,b=u.high,w=u.low,x=l.high,j=l.low,O=c.high,S=c.low,E=f.high,D=f.low,k=d.high,M=d.low,_=p,A=h,P=v,T=m,Y=g,H=y,I=b,L=w,N=x,$=j,C=O,B=S,F=E,R=D,z=k,U=M,W=0;W<80;W++){var q,V,X=s[W];if(W<16)V=X.high=0|e[t+2*W],q=X.low=0|e[t+2*W+1];else{var Z=s[W-15],G=Z.high,K=Z.low,J=(G>>>1|K<<31)^(G>>>8|K<<24)^G>>>7,Q=(K>>>1|G<<31)^(K>>>8|G<<24)^(K>>>7|G<<25),ee=s[W-2],te=ee.high,ne=ee.low,re=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,ie=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),oe=s[W-7],ue=oe.high,le=oe.low,ae=s[W-16],se=ae.high,ce=ae.low;V=(V=(V=J+ue+((q=Q+le)>>>0<Q>>>0?1:0))+re+((q+=ie)>>>0<ie>>>0?1:0))+se+((q+=ce)>>>0<ce>>>0?1:0),X.high=V,X.low=q}var fe,de=N&C^~N&F,pe=$&B^~$&R,he=_&P^_&Y^P&Y,ve=A&T^A&H^T&H,me=(_>>>28|A<<4)^(_<<30|A>>>2)^(_<<25|A>>>7),ge=(A>>>28|_<<4)^(A<<30|_>>>2)^(A<<25|_>>>7),ye=(N>>>14|$<<18)^(N>>>18|$<<14)^(N<<23|$>>>9),be=($>>>14|N<<18)^($>>>18|N<<14)^($<<23|N>>>9),we=a[W],xe=we.high,je=we.low,Oe=z+ye+((fe=U+be)>>>0<U>>>0?1:0),Se=ge+ve;z=F,U=R,F=C,R=B,C=N,B=$,N=I+(Oe=(Oe=(Oe=Oe+de+((fe+=pe)>>>0<pe>>>0?1:0))+xe+((fe+=je)>>>0<je>>>0?1:0))+V+((fe+=q)>>>0<q>>>0?1:0))+(($=L+fe|0)>>>0<L>>>0?1:0)|0,I=Y,L=H,Y=P,H=T,P=_,T=A,_=Oe+(me+he+(Se>>>0<ge>>>0?1:0))+((A=fe+Se|0)>>>0<fe>>>0?1:0)|0}h=r.low=h+A,r.high=p+_+(h>>>0<A>>>0?1:0),m=i.low=m+T,i.high=v+P+(m>>>0<T>>>0?1:0),y=o.low=y+H,o.high=g+Y+(y>>>0<H>>>0?1:0),w=u.low=w+L,u.high=b+I+(w>>>0<L>>>0?1:0),j=l.low=j+$,l.high=x+N+(j>>>0<$>>>0?1:0),S=c.low=S+B,c.high=O+C+(S>>>0<B>>>0?1:0),D=f.low=D+R,f.high=E+F+(D>>>0<R>>>0?1:0),M=d.low=M+U,d.high=k+z+(M>>>0<U>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(c),e.HmacSHA512=t._createHmacHelper(c)}(),n.SHA512)}(yD);var wD=y(yD.exports);function xD(e,t){return qt(e)&&qt(t)?function(e,t){if(e=e.replace(/\s+/g,""),t=t.replace(/\s+/g,""),!e.length&&!t.length)return 1;if(!e.length||!t.length)return 0;if(e===t)return 1;if(1===e.length&&1===t.length)return 0;if(e.length<2||t.length<2)return 0;let n=new Map;for(let t=0;t<e.length-1;t++){const r=e.substring(t,t+2),i=n.has(r)?n.get(r)+1:1;n.set(r,i)}let r=0;for(let e=0;e<t.length-1;e++){const i=t.substring(e,e+2),o=n.has(i)?n.get(i):0;o>0&&(n.set(i,o-1),r++)}return 2*r/(e.length+t.length-2)}(e,t):0}var jD=Sp;var OD=function(e,t){var n=null==e?0:e.length;return n?jD(e,t)/n:NaN},SD=fo;var ED=y((function(e){return OD(e,SD)}));function DD(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r="";if(qt(e)||Xt(e))r=Xp(e);else{if(!Yu(e))return!!n&&0;r=If(e,"")}if(""===t)return!n||100;if(Tu(t))return!!n&&0;if(_h(r,t))return!n||100;let i=np(t," "),o=function(){let e=$l();return d||e.Fuse}(),u=pu(i,(function(e){return((e,t)=>{let n=new o([e],{includeScore:!0}).search(t);n=Ft(n,0);let r=Ft(n,"score",1);return r=1-r,r*=100,r})(r,e)}));if(n)return ED(u);{let e=80;return No(u,(function(t){return t>=e}))}}function kD(e){if(!zt(e))return{};let{results:t,binarys:n}=e;if(!qt(t))return{};if(!Ut(n))return{};let r={};try{r=JSON.parse(t,(function(e,t){if(qt(t)){if(t.indexOf("[Uint8Array]::")>=0){let e=qc(t.replace("[Uint8Array]::",""));return n[e]}if(t.indexOf("[Uint16Array]::")>=0){let e=qc(t.replace("[Uint16Array]::",""));return n[e]}if(t.indexOf("[ArrayBuffer]::")>=0){let e=qc(t.replace("[ArrayBuffer]::",""));return n[e]}}return t}))}catch(e){}return r}function MD(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!_O(e))return{today:null,msg:"",err:"時間格式錯誤"};let r=n();_O(t)&&(r=n(t,"YYYY-MM-DDTHH:mm:ss.SSSZ"));let i=n(e,"YYYY-MM-DDTHH:mm:ss.SSSZ");if(r>i)return{today:null,msg:"",err:"時間已過"};let o,u=r.format("YYYY-MM-DD"),l=i.format("YYYY-MM-DD"),a=n(u,"YYYY-MM-DD"),s=n(l,"YYYY-MM-DD"),c=i.diff(r,"seconds"),f=i.diff(r,"minutes"),d=i.diff(r,"hours"),p=s.diff(a,"days"),h=s.diff(a,"weeks"),v=s.diff(a,"months"),m=s.diff(a,"years"),g="即將到來";if(c>=0&&(o=!0,g=c+"秒後"),f>0&&(o=!0,g=f+"分鐘後"),d>0){let e=i.format("HH:mm");u===l?(o=!0,g=d+"小時後,今天"+e):(o=!1,g=d+"小時後,明天"+e)}return p>1&&(o=!1,g=2===p?"後天":p+"天後"),h>0&&(o=!1,g=h+"周後"),v>0&&(o=!1,g=v+"個月後"),m>0&&(o=!1,g=m+"年後"),{today:o,msg:g,err:""}}function _D(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!_O(e))return{today:null,msg:"",err:"時間格式錯誤"};let r=n();_O(t)&&(r=n(t,"YYYY-MM-DDTHH:mm:ss.SSSZ"));let i=n(e,"YYYY-MM-DDTHH:mm:ss.SSSZ");if(r<i)return{today:null,msg:"",err:"時間未到"};let o=r.format("YYYY-MM-DD"),u=i.format("YYYY-MM-DD"),l=n(o,"YYYY-MM-DD"),a=n(u,"YYYY-MM-DD"),s=r.diff(i,"seconds"),c=r.diff(i,"minutes"),f=r.diff(i,"hours"),d=l.diff(a,"days"),p=l.diff(a,"weeks"),h=l.diff(a,"months"),v=l.diff(a,"years"),m=!1,g="剛剛";if(s>=0&&(m=!0,g=s+"秒前"),c>0&&(m=!0,g=c+"分鐘前"),f>0){let e=i.format("HH:mm");o===u?(m=!0,g=f+"小時前"):(m=!1,g="昨天"+e)}return d>1&&(m=!1,g=d+"天前"),p>0&&(m=!1,g=p+"周前"),h>0&&(m=!1,g=h+"個月前"),v>0&&(m=!1,g=v+"年前"),{today:m,msg:g,err:""}}function AD(e){let t=MO.sepTZ(e);return e=`${t.t}.000${t.tz}`}function PD(e){let t=MO.sepTZ(e);return e=`${t.t}.000${t.tz}`}function TD(e){if(!Dh(e))return"";let t;try{t=Oh(lS(e))}catch(e){return""}return t}var YD=y((function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}));e._getXLSX=Cl,e._tz=MO,e.ab2blob=function(e){let t=m(e);return new Blob([t])},e.ab2u8arr=m,e.addExcelWorksheetFromData=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"data";if(!zt(e))return{error:"wb is not an effective object"};if(!Ut(Ft(e,"SheetNames")))return{error:"wb.SheetNames is not an array"};if(!Rt(Ft(e,"Sheets")))return{error:"wb.Sheets is not an object"};let r=Bl(t);return Zt(r,"error")?r:(e.SheetNames.push(n),e.Sheets[n]=r,e)},e.addMonth=function(e,t){return Fl(e)&&ca(t)?n(e,"YYYY-MM").add(t,"months").format("YYYY-MM"):""},e.aes2str=La,e.alive=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=$c(),n={},r=null,i=Ft(e,"timeAlive");Vc(i)||(i=1e4),i=qc(i);let o=Ft(e,"timeDetect");return Vc(o)||(o=50),o=qc(o),t.trigger=function(e,u){qt(e)?(Zt(n,e)||setTimeout((()=>{t.emit("message",{eventName:"enter",key:e,data:u,now:_l(n)})}),1),n[e]={data:u,time:Date.now()},null===r&&(r=setInterval((()=>{ou(n,((e,r)=>{if(Date.now()-e.time>i){let e=Ic(n[r]);delete n[r],t.emit("message",{eventName:"leave",key:r,data:e.data,now:_l(n)})}})),zt(n)||(clearInterval(r),r=null)}),o))):console.log("trigger need key")},t.get=function(){let e=[];return ou(n,((t,n)=>{e.push({key:n,data:t.data})})),e=Ic(e),e},t},e.arr2dt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!Yu(e))return{};if(Yu(t))return _l(e)===_l(t)?Jc(e,t):{};let n=[];for(let r=0;r<_l(e);r++)n.push(Ic(t));return Jc(e,n)},e.arrAccum=function(e){if(!Yu(e))return[];let t=[],n=0;return ou(e,(function(e){n+=sa(e),Xt(e)?t.push(n):t.push("")})),t},e.arrAdd=function(){if(_l(arguments)<2)return[];let e=arguments[0];for(let t=1;t<_l(arguments);t++){e=Qc(e,arguments[t])}return e},e.arrAt=Af,e.arrDiff=zd,e.arrFilterByKeywords=function(e,t){if(!Yu(e))return[];if(!qt(t)&&!Yu(t))return[];let n=null;n=qt(t)?np(t," "):t;let r=_l(n);return pu(e,(e=>function(e){let t=!1,i=0;for(let o=0;o<r;o++){let u=n[o],l=u,a="+"===rp(u,1),s="-"===rp(u,1);if((a||s)&&(l=op(u,1)),""===ep(l))continue;let c=e.indexOf(l)>=0;if(a){if(c){t=!0,i=1;break}t=!1,i=0;break}if(s){if(c){t=!1,i=0;break}t=!0,i=1;break}if(c){t=!0;let e=1-o/r;e=e**2,i+=e}}return{hasKeyword:t,weight:i}}(e)))},e.arrFilterByNum=function(e){return Yu(e)?(e=Ic(e),e=fp(e,Xt),e=pu(e,sa)):[]},e.arrFilterByPnum=pp,e.arrFilterByPnumAndToLog=function(e){return Yu(e)?(e=pp(e),e=pu(e,Math.log)):[]},e.arrFind=function(e,t){function n(e){return Ut(e)?e:[e]}return Tu(e)||0===(e=n(e)).length||Tu(t)?[]:(t=n(t),pu(t,(function(t){let n=-1;for(let r=0;r<e.length;r++)if(vp(e[r],t)){n=r;break}return n})))},e.arrGroupByMaxmin=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ft(n,"keyMax");qt(r)||(r="max");let i=Ft(n,"keyMin");qt(i)||(i="min");let o=Ft(n,"keyValue");qt(o)||(o="value");let u=Ft(n,"keyItems");if(qt(u)||(u="items"),!Yu(e))return[];if(!Yu(t))return[];let l=Ic(t);return ou(e,((e,n)=>{let a=Ft(e,o);Xt(a)?a=sa(a):Xt(e)&&(a=sa(e)),yp(a)&&ou(t,((t,n)=>{let o=Ft(t,r,null),s=Ft(t,i,null);if(null!==o&&null!==s&&Xt(o)&&Xt(s)){let r=Ft(t,"maxType");"<="!==r&&"<"!==r&&(r="<=");let i,c,f=Ft(t,"minType");">="!==f&&">"!==f&&(f=">="),o=sa(o),s=sa(s),i=">="===f?a>=s:a>s,c="<="===r?a<=o:a<o,i&&c&&(Zt(l[n],u)||(l[n][u]=[]),l[n][u].push(e))}}))})),l},e.arrHas=bp,e.arrInsert=function(e,t,n){if(!Ut(e))return[];if(Ut(n)||(n=[n]),!_f(t))return e;if((t=qc(t))>_l(e))return e;let r=e;try{r=[...e.slice(0,t),...n,...e.slice(t)]}catch(e){}return r},e.arrLookupByMaxmin=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ft(n,"keyMax");qt(r)||(r="max");let i=Ft(n,"keyMin");qt(i)||(i="min");let o=Ft(n,"keyValue");qt(o)||(o="value");let u=Ft(n,"keyItems");qt(u)||(u="items");let l=Ft(n,"beforeAddResult",null);if(!Yu(e))return[];if(!Yu(t))return[];if(!zt(Ft(e,0)))return[];let a=Ic(e);return ou(a,((e,n)=>{let s=Ft(e,o);Xt(s)&&(s=sa(s)),yp(s)&&ou(t,((e,t)=>{let o=Ft(e,r,null),c=Ft(e,i,null);if(null!==o&&null!==c&&Xt(o)&&Xt(c)){let t=Ft(e,"maxType");"<="!==t&&"<"!==t&&(t="<=");let r,i,f=Ft(e,"minType");">="!==f&&">"!==f&&(f=">="),o=sa(o),c=sa(c),r=">="===f?s>=c:s>c,i="<="===t?s<=o:s<o,r&&i&&(wp(l)&&(e=l(e,a[n],n)),Zt(a[n],u)||(a[n][u]=[]),a[n][u].push(e))}}))})),a},e.arrMax=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Yu(e))return null;let n=Ft(t,"returnIndex");Yl(n)||(n=!1);let r=Ft(t,"compareKey",null),i=e;qt(r)&&(i=pu(e,((e,t)=>Ft(e,r,""))));let o=null,u=xp(i,((e,t)=>Xt(t)?(t=sa(t),null===e?(o=t,t):(e=Math.max(e,t),o=e,e)):e),{returnIndex:!0});if(n)return u;let l=null;return u>=0&&(l=qt(r)?e[u]:o),l},e.arrMin=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Yu(e))return null;let n=Ft(t,"returnIndex");Yl(n)||(n=!1);let r=Ft(t,"compareKey",null),i=e;qt(r)&&(i=pu(e,((e,t)=>Ft(e,r,""))));let o=null,u=xp(i,((e,t)=>Xt(t)?(t=sa(t),null===e?(o=t,t):(e=Math.min(e,t),o=e,e)):e),{returnIndex:!0});if(n)return u;let l=null;return u>=0&&(l=qt(r)?e[u]:o),l},e.arrMulti=Op,e.arrNorm=function(e){if(!Yu(e))return null;let t=Mp(e,e);return Xt(t)?t<=0?null:Math.sqrt(t):null},e.arrProduct=Mp,e.arrReduce=xp,e.arrSep=function(e,t){if(!Yu(e))return[];if(!Vc(t)&&!zt(t))return[];let n="",r=null;if(Vc(t))r=t,n="numCount";else if(zt(t))if(Vc(Ft(t,"numCount")))r=t.numCount,n="numCount";else{if(!Vc(Ft(t,"numGroup")))throw new Error("invalid opt.numCount or opt.numGroup");r=t.numGroup,n="numGroup"}let i=_l(e),o=[];if("numCount"===n)for(let t=0;t<i;t+=r){let n=[];for(let o=0;o<r;o++){let r=t+o;r<i&&n.push(e[r])}o.push(n)}else if("numGroup"===n){for(let e=0;e<r;e++)o[e]=[];let t=-1;for(let n=0;n<i;n++)t++,t>r-1&&(t=0),o[t].push(e[n])}return o},e.arrSort=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Yu(e))return[];if(1===_l(e))return e;let n=Ft(t,"localeCompare");Yl(n)||(n=!1);let r=Ft(t,"returnIndex");Yl(r)||(r=!1);let i=Ft(t,"compareKey",null),o=null;o=n?oh:ih;let u,l=nh(e);if(""===l)return[];if("obj"===l){if(!qt(i))return[];let t=pu(e,((e,t)=>Ft(e,i,""))),l=nh(t);if("num"!==l&&"str"!==l)return[];{n&&(l="files");let i=o(rh(t,l),!0);u=r?i:pu(i,(t=>e[t]))}}else if("num"===l||"str"===l){n&&(l="files");let t=rh(e,l);console.log("num|str: getVirArr vs",t),u=o(t,r)}return u},e.asind=function(e){return Xt(e)?(e=sa(e),180*Math.asin(e)/Math.PI):null},e.atan2d=function(e,t){return Xt(e)?(e=sa(e),Xt(t)?(t=sa(t),180*Math.atan2(t,e)/Math.PI):null):null},e.atand=function(e){return Xt(e)?(e=sa(e),180*Math.atan(e)/Math.PI):null},e.attstr=jh,e.b642obj=function(e){if(!Wt(e))return{};let t={};try{t=Sh(Oh(e))}catch(e){t={}}return t},e.b642str=Oh,e.b642u16arr=Mh,e.b642u8arr=Eh,e.binstr=_h,e.blob2ab=Ph,e.blob2b64=Th,e.blob2str=function(e){let t=Ah(),n=new FileReader;return n.onload=function(){t.resolve(n.result)},n.onerror=function(e){t.reject(e)},n.readAsText(e),t},e.blob2u8arr=Yh,e.blobs2b64s=Hh,e.blobs2u8arrs=Ih,e.bodyLog=function(){let e=`\n <div style="padding:5px; font-size:10pt; font-family:Microsoft JhengHei, Helvetica;">\n <span style="color:#f26;">log: </span>\n <code>${Lh(pu(arguments,(function(e){return Hl(e)})).join(", "))}</code>\n </div>\n `;document.querySelector("body").insertAdjacentHTML("beforeend",e)},e.browserView=Nh,e.browserViewFromBlob=function(e,t){$h(e)&&Nh(e,t)},e.browserViewFromText=function(e){Wt(e)&&Nh(e,"text/plain")},e.browserViewFromU8arr=function(e,t){Dh(e)&&Nh(e,t)},e.bs2u8arr=Ch,e.bufRead=Bh,e.bufReadDbl=Fh,e.bufWrite=Rh,e.bufWriteDbl=zh,e.cache=function(){let e=$c(),t={};function n(t,n){setTimeout((()=>{e.emit(t,n)}),1)}function r(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Zt(t,e))return;let i=Ft(r,"execFun");wp(i)||(i=async()=>{});let o=Ft(r,"inputFun");Ut(o)||(o=[]);let u=Ft(r,"timeExpired");Vc(u)||(u=5e3),u=qc(u),t[e]={needExec:!0,execFun:i,execFunRunning:!1,inputFun:o,value:null,time:null,timeExpired:u},n("message",{fun:"set",key:e,timeExpired:u})}async function i(e){if(Zt(t,e)){let r;n("message",{fun:"get",key:e,msg:"waiting"}),await Wh((()=>!t[e].execFunRunning),{timeInterval:1e3});let i=Date.now();r=t[e].needExec;let o=i-t[e].time;return r?n("message",{fun:"get",key:e,msg:"execute first"}):t[e].timeExpired>0&&o>t[e].timeExpired&&(n("message",{fun:"get",key:e,msg:"execute by timeExpired",timeDiff:o}),r=!0),r?(n("message",{fun:"get",key:e,msg:"execFun start"}),t[e].execFunRunning=!0,t[e].value=await t[e].execFun(...t[e].inputFun).catch((t=>{n("error",{fun:"get",key:e,msg:t})})),t[e].needExec=!1,t[e].time=i,t[e].execFunRunning=!1,n("message",{fun:"get",key:e,msg:"execFun end"})):n("message",{fun:"get",key:e,msg:"use cache"}),Ic(t[e].value)}return n("error",{fun:"get",key:e,msg:"invalid key"}),null}return e.set=r,e.getProxy=async function(e){return r(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),i(e)},e.get=i,e.update=function(e,r){Zt(t,e)&&(n("message",{fun:"updateValue",key:e}),t[e].value=r,t[e].time=Date.now())},e.clear=function(e){Zt(t,e)&&(n("message",{fun:"clear",key:e}),t[e].needExec=!0)},e.remove=function(e){Zt(t,e)&&(n("message",{fun:"remove",key:e}),delete t[e])},e},e.cbol=function(e){if(Yl(e))return e;if(0===e)return!1;if(1===e)return!0;let t=!1;return qt(e)&&"true"===(e=Vh(ep(e)))&&(t=!0),t},e.cdbl=sa,e.cfilesize=function(e){return Xt(e)?(e=sa(e))<1024?Xh(e,1)+" b":e<1048576?Xh(e/1024,1)+" kb":e<1073741824?Xh(e/1024/1024,1)+" mb":e<1099511627776?Xh(e/1024/1024/1024,1)+" gb":"":""},e.cfinancial=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!Xt(e))return"";if(!_f(t))return"";let n=(e=Xh(e,t)).split("."),r=n[0],i=n.length>1?"."+n[1]:"",o=/(\d+)(\d{3})/;for(;o.test(r);)r=r.replace(o,"$1,$2");return r+i},e.cint=qc,e.clearXSS=function(e){return function e(t){return Ut(t)||Rt(t)?(ou(t,(function(n,r){t[r]=e(n)})),t):Wt(t)?r(t,{onIgnoreTagAttr:function(e,t,n,i){if("style"===t)return t+'="'+r.escapeAttrValue(n)+'"'}}):t}(Ic(e))},e.color=tm,e.composeToTree=Tm,e.convertToTree=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!zt(e)&&!Yu(e))return[];let n=Ft(t,"bindKey",null);qt(n)||(n="id");let r=Ft(t,"bindParent",null);qt(r)||(r="parentId");let i=Ft(t,"bindText",null);qt(i)||(i="text");let o=Ft(t,"bindChildren",null);qt(o)||(o="children");let u=Ft(t,"bindType",null);qt(u)||(u="type");let l=Ft(t,"bindNumOfChilren",null);qt(l)||(l="numOfChilren");let a=Ft(t,"bindRoot",null);qt(a)||(a="root");let s=Ft(t,"saveExtProps",null);return Yl(s)||(s=!1),qt(a)&&(e={[a]:e}),Tm(Hm(e,{bindKey:n,bindParent:r,bindText:i,bindType:u,bindNumOfChilren:l}),{bindKey:n,bindParent:r,bindChildren:o,saveExtProps:s})},e.copyStrToClipboard=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Wt(e))return"invalid input";let n=Ft(t,"eleParent");Ko(n)||(n=document.body);let r=document.createElement("textarea");if(r.style.position="fixed",r.style.left=0,r.style.top=0,r.style.zIndex=-1,r.style.background="transparent",r.style.color="transparent",r.value=e,n.appendChild(r),r.select(),!Im(r))return"ele can not be focusd";try{document.execCommand("copy")}catch(e){return"can not copy str to clipboard"}return n.removeChild(r),""},e.cosd=Lm,e.cotd=function(e){return Xt(e)?1/Nm(e=sa(e)):null},e.createExcelWorkbook=$m,e.cscd=function(e){return Xt(e)?1/Cm(e=sa(e)):null},e.cstr=Xp,e.day2cht=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!Bm(e))return"";let r=n(e,"YYYY-MM-DD"),i="";return i=t?r.month()+1+"月"+r.date()+"日":"民國 "+(r.year()-1911)+" 年 "+(r.month()+1)+" 月 "+r.date()+" 日",i},e.debounce=function(){return new function(e){let t=[],n=null,r=null;return Vc(e)||(e=300),e=qc(e),function(i){if(wp(i)){r=Date.now();for(var o=arguments.length,u=new Array(o>1?o-1:0),l=1;l<o;l++)u[l-1]=arguments[l];t.push({func:i,input:u}),null===n&&(n=setInterval((()=>{if(Date.now()-r>e){let e=t.pop();t=[],e.func(...e.input)}0===t.length&&(clearInterval(n),n=null)}),10))}else console.log("func is not a function")}}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:300)},e.delay=Fm,e.dig=Xh,e.digExp=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!Xt(e))return"";if(!_f(t))return"";let n="";return n=0===(e=sa(e))?"0":Math.abs(e)<=1e-6?e.toExponential(t):Xh(e,t),n},e.domAlert=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!qt(e))return;let n=Ft(t,"type","success");Zt(Xm,n)||(n="success");let r=Ft(t,"icon",null);qt(r)||(r=Xm[n]);let i="top-right";"top-left"!==t.position&&"bottom-right"!==t.position&&"bottom-left"!==t.position||(i=t.position);let o=Ft(t,"time");yp(o)||(o=4e3),o<0&&(o=4e3);let u=Ft(t,"paddingStyle",null);null===u&&(u={top:14,right:26,bottom:14,left:14});let l="";{let e=Ft(u,"top",0),t=Ft(u,"bottom",0),n=Ft(u,"left",0);l=`padding:${e}px ${Ft(u,"right",0)}px ${t}px ${n}px;`}let a=Ft(t,"textColor","#000");a=Kh(a,";","");let s=Ft(t,"backgroundColor","#fff");s=Kh(s,";","");let c=Ft(t,"borderWidth",1),f=Ft(t,"borderColor","#ebeef5");f=Kh(f,";","");let d=Ft(t,"borderRadius",8),p=Ft(t,"shadowStyle","0 2px 12px 0 rgba(0,0,0,.1)");p=Kh(p,";","");let h=Ft(t,"closeIconShift",null);null===h&&(h={top:10,right:10});let v="";{let e=Ft(h,"top",""),t=Ft(h,"bottom",""),n=Ft(h,"left",""),r=Ft(h,"right","");yp(e)&&(e=`top:${e}px;`),yp(t)&&(t=`bottom:${t}px;`),yp(n)&&(n=`left:${n}px;`),yp(r)&&(r=`right:${r}px;`),v=`position:absolute; ${e} ${r} ${t} ${n}`}let m=`alt-${Um()}`,g=`alt-${Um()}`,y=`\n <div \n style="display:inline-block; color:${a}; background:${s}; border:${c}px solid ${f}; border-radius:${d}px; box-shadow:${p};"\n onmouseenter="ttWAlertFadeIn('${g}')"\n onmouseleave="ttWAlertFadeOut('${g}')"\n >\n <div style="position:relative; ${l}">\n\n <div style="display:flex; align-items:center;">\n <div style="margin-right:10px;">\n <div style="display:flex;">${r}</div>\n </div>\n <div>${e}</div>\n </div>\n\n <div style="${v}">\n <div \n id="${g}" \n style="display:flex; cursor:pointer; opacity:0;" \n onclick="ttWAlertCancel('${m}')"\n >\n ${Vm}\n </div>\n </div>\n\n </div>\n </div>\n `,b=document.createElement("div");b.id=m,b.style.position="fixed",b.style.transition="transform 0.3s, top 0.5s, bottom 0.5s",b.style.zIndex=-1,b.style.opacity=.001,i.indexOf("-left")>=0?b.style.transform="translateX(-100%)":b.style.transform="translateX(100%)",b.innerHTML=y,document.querySelector("body").appendChild(b);let w=Ah();return function(e){let{id:t,position:n,time:r,pm:i}=e;Zm[t]={id:t,position:n,ele:null,loc:{height:null,top:null,bottom:null,left:null,right:null},timeShow:r,timeStart:Date.now(),pm:i},Jm(),null===Gm&&(Gm=setInterval((()=>{ou(Zm,(e=>{Date.now()-e.timeStart>e.timeShow&&(e.pm.resolve(),Qm(e.id))})),zt(Zm)||(clearInterval(Gm),Gm=null)}),50))}({id:m,position:i,time:o,pm:w}),w},e.domAppend=eg,e.domCancelEvent=ng,e.domCompareText=ig,e.domCompareTextDyn=async function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=arguments.length>5?arguments[5]:void 0;return Yu(o)||(o=["https://cdn.jsdelivr.net/npm/diff2html@3.4.34/bundles/css/diff2html.min.css","https://cdn.jsdelivr.net/npm/diff2html@3.4.34/bundles/js/diff2html.min.js"]),await sg(o),ig(e,t,n,r,i)},e.domConvertToPic=pg,e.domConvertToPicDyn=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return Yu(n)||(n=["https://cdn.jsdelivr.net/npm/html-to-image@1.11.11/dist/html-to-image.js"]),await sg(n),pg(e,t)},e.domDetect=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Ft(t,"timeInterval",null);Vc(n)||(n=20);let r=Ft(t,"tolerancePixel",null);Vc(r)||(r=1);let i,o=$c(),u={offsetWidth:0,offsetHeight:0};if(!wp(e))return console.log("invalid f",e),null;i=setInterval((()=>{let t=e();if(t){let e={offsetWidth:t.offsetWidth,offsetHeight:t.offsetHeight,clientWidth:t.clientWidth,clientHeight:t.clientHeight},n=Math.abs(u.offsetWidth-e.offsetWidth)>r,i=Math.abs(u.offsetHeight-e.offsetHeight)>r;if(n||i){let n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hg(Object(n),!0).forEach((function(t){Yf(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},u);setTimeout((()=>{e.offsetWidth>0&&e.offsetHeight>0&&(o.emit("resize",{sold:n,snew:e,ele:t}),o.emit("resizeWithWindow",{sold:n,snew:e,ele:t,from:"dom"}))}),1)}u=e}}),n);let l=e=>{o.emit("resizeWithWindow",{snew:u,from:"window"})};return window.addEventListener("resize",l),o.clear=()=>{clearInterval(i),window.removeEventListener("resize",l)},o},e.domDrag=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Ko(e))return void console.log("ele is not a HTMLElement",e);let n=Ft(t,"attIdentify",null);qt(n)||(n="dragid");let r=Ft(t,"attIndex",null);qt(r)||(r="dragindex");let i=Ft(t,"attGroup",null);qt(i)||(i="draggroup");let o=Ft(t,"group",null);qt(o)||(o="group");let u=Ft(t,"previewOpacity",null);yp(u)||(u=.4);let l=Ft(t,"previewDisabledOpacity",null);yp(l)||(l=.2);let a=Ft(t,"previewBackground",null);qt(a)||(a="white");let s=Ft(t,"previewBorderWidth",null);yp(s)||(s=1);let c=Ft(t,"previewBorderColor",null);qt(c)||(c="#f26");let f=Ft(t,"timeDragStartDelay",null);yp(f)||(f=120);let d=`c${Um(8)}`,p=o;e.setAttribute(i,p),e.setAttribute(n,d);let h=Ig(p,d,{attIdentify:n,previewOpacity:u,previewBackground:a,previewBorderWidth:s,previewBorderColor:c}),v=function(e,t,n,r){let i=[];return{bind:function(){let n;n="mousedown";let r=function(n){t.dragStart({e:n,ele:e,name:"mousedown"})};e.addEventListener(n,r,!1),i.push({ele:e,name:n,f:r}),n="touchstart";let o=function(n){t.dragStart({e:n,ele:e,name:"touchstart"})};e.addEventListener(n,o,!1),i.push({ele:e,name:n,f:o}),n="touchmove";let u=function(e){t.dragMove({e:e,name:"touchmove"}),e.cancelable&&e.preventDefault()};e.addEventListener(n,u,!1),i.push({ele:e,name:n,f:u})},unbind:function(){ou(i,(e=>{let{ele:t,name:n,f:r}=e;t.removeEventListener(n,r)}))}}}(e,{dragStart:e=>{h.emit(p+"-dragStart",e)},dragMove:e=>{h.emit(p+"-dragMove",e)}});v.bind(),Ng({gid:p,attGroup:i,attIndex:r,attIdentify:n,timeDragStartDelay:f,previewOpacity:u,previewDisabledOpacity:l});let m=$c();return h.on(o+"-change",(e=>{e.tarEid===d&&m.emit("change",e)})),h.on(o+"-start",(e=>{e.tarEid===d&&m.emit("start",e)})),h.on(o+"-move",(e=>{e.tarEid===d&&m.emit("move",e)})),h.on(o+"-enter",(e=>{e.tarEid===d&&m.emit("enter",e)})),h.on(o+"-leave",(e=>{e.tarEid===d&&m.emit("leave",e)})),h.on(o+"-drop",(e=>{e.tarEid===d&&m.emit("drop",e)})),m.setIsActive=function(e){Hg[p].isActive=e},m.unbind=function(){v.unbind(),function(e,t){let n=Hg[e],r=Ic(n.eleIds);Sg(r,t),n.eleIds=r,0===r.length&&(n.oevg.unbind(),n.pv.clear(),delete Hg[e])}(p,d)},m},e.domDragBarAndScroll=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,i=null,o=null,u=null,l=null,a=null,s=null,c=null,f=null,d=null,p=null,h=null,v=null,m=null,g=null,y=!1,b=Ft(n,"getHeighRatio",null);K(b)||(b=()=>1);let w=Ft(n,"getWidthRatio",null);K(w)||(w=()=>1);let x=Ft(n,"stopScrollPropagationForPanel",null);Tl(x)||(x=!1);let j=Ft(n,"stopTouchDragPropagationForPanel",null);Tl(j)||(j=!1);let O=Ft(n,"useTouchDragForPanel",null);Tl(O)||(O=!0);let S=e,E=t,D=$c();return r=e=>{let t=e.deltaY/Math.abs(e.deltaY),n=e.deltaX/Math.abs(e.deltaX);D.emit("scrollPanel",{ratioY:t,ratioX:n}),x&&ng(e)},S.addEventListener("wheel",r),i=e=>{if(O){let t=Ft(e,"touches.0.clientY",0),n=Ft(e,"touches.0.clientX",0),r=-t*b(),i=-n*w();y=!0,D.emit("pressBar",{clientY:r,clientX:i}),j&&ng(e)}},S.addEventListener("touchstart",i),o=e=>{if(O&&y){let t=Ft(e,"touches.0.clientY",0),n=Ft(e,"touches.0.clientX",0),r=-t*b(),i=-n*w();D.emit("dragBar",{clientY:r,clientX:i}),j&&ng(e)}},S.addEventListener("touchmove",o,{passive:!1}),u=e=>{O&&y&&(y=!1,D.emit("freeBar"),j&&ng(e))},S.addEventListener("touchend",u),l=e=>{y=!0,D.emit("pressBar",{clientY:e.clientY,clientX:e.clientX})},E.addEventListener("mousedown",l),a=e=>{y&&(y=!1,D.emit("freeBar"))},E.addEventListener("mouseup",a),s=e=>{y=!0,D.emit("pressBar",{clientY:e.touches[0].clientY,clientX:e.touches[0].clientX})},E.addEventListener("touchstart",s),c=e=>{y&&(D.emit("dragBar",{clientY:e.touches[0].clientY,clientX:e.touches[0].clientX}),ng(e))},E.addEventListener("touchmove",c,{passive:!1}),f=e=>{y&&(y=!1,D.emit("freeBar"))},E.addEventListener("touchend",f),d=e=>{y&&D.emit("dragBar",{clientY:e.clientY,clientX:e.clientX})},window.addEventListener("mousemove",d),p=e=>{y&&(y=!1,D.emit("freeBar"),x&&ng(e))},window.addEventListener("mouseup",p),h=e=>{},window.addEventListener("scroll",h,{passive:!1}),v=e=>{},window.addEventListener("wheel",v,{passive:!1}),m=e=>{},document.addEventListener("scroll",m,{passive:!1}),g=e=>{},document.addEventListener("wheel",g,{passive:!1}),D.clear=function(){S.removeEventListener("wheel",r),S.removeEventListener("touchstart",i),S.removeEventListener("touchmove",o),S.removeEventListener("touchend",u),E.removeEventListener("mousedown",l),E.removeEventListener("mouseup",a),E.removeEventListener("touchstart",s),E.removeEventListener("touchmove",c),E.removeEventListener("touchend",f),window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",p),window.removeEventListener("scroll",h),window.removeEventListener("wheel",v),document.removeEventListener("scroll",m),document.removeEventListener("wheel",g)},D},e.domDragPreview=Pg,e.domDropFiles=function(e){let t=!1,n=!1,r=$c();function i(e){ng(e),n=!0,!1===t&&(t=!0,r.emit("dropIn",{ev:e}))}function o(e){ng(e),n=!1,setTimeout((function(){n||(t=!1,r.emit("dropOut",{ev:e}))}),100)}function u(e){i(e)}function l(e){o(e)}function a(e){function t(){o(e)}i(e),Bg(e.dataTransfer).then((n=>{let i=fp(n.entries,{type:"file"});r.emit("getFiles",{ev:e,files:n.files,filesTree:i,entries:n.entries,cb:t})})).catch((e=>{r.emit("error",e)}))}return e.addEventListener("dragenter",u,!1),e.addEventListener("dragover",u,!1),e.addEventListener("dragleave",l,!1),e.addEventListener("drop",a,!1),r.off=function(){e.removeEventListener("dragenter",u,!1),e.removeEventListener("dragover",u,!1),e.removeEventListener("dragleave",l,!1),e.removeEventListener("drop",a,!1)},r},e.domElementsFromPoint=kg,e.domFadeIn=Wm,e.domFadeOut=qm,e.domFind=Fg,e.domFinds=cg,e.domGetAttr=Mg,e.domGetBoudRect=_g,e.domGetBoudRectRefSelf=Ag,e.domGetFileAccept=Ug,e.domGetFiles=Wg,e.domGetParents=Eg,e.domGetPointFromEvent=Dg,e.domGetScrollableParent=function(e){let t=/(auto|scroll)/,n=function(e,t){return getComputedStyle(e,null).getPropertyValue(t)},r=function(e){return t.test(function(e){return n(e,"overflow")+n(e,"overflow-y")+n(e,"overflow-x")}(e))};if(!(e instanceof HTMLElement||e instanceof SVGElement))return;let i=Eg(e);for(let e=0;e<i.length;e+=1)if(r(i[e]))return i[e];return document.scrollingElement||document.documentElement},e.domGetWindowSize=function(){let e=$l();return{width:(()=>{let t=[Ft(e,"innerWidth"),Ft(e,"document.documentElement.clientWidth"),Ft(e,"document.body.clientWidth")];return t=fp(t,yp),Kg(t)})(),height:(()=>{let t=[Ft(e,"innerHeight"),Ft(e,"document.documentElement.clientHeight"),Ft(e,"document.body.clientHeight")];return t=fp(t,yp),Kg(t)})()}},e.domIsClientXYIn=function(e,t,n){if(!yp(e))return void console.log("clientX is not a number",e);if(!yp(t))return void console.log("clientY is not a number",t);if(!Ko(n))return void console.log("ele is not a HTMLElement",n);let r;try{r=n.getBoundingClientRect()}catch(e){return void console.log("invalid ele for getBoundingClientRect",e)}let i=!1;try{i=e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom}catch(e){console.log("catch when calculating page information of element",e)}return i},e.domIsFocused=Im,e.domIsVisible=function(e){if(!Ko(e))return Promise.reject("invalid element");if(Jg())return Promise.reject("invalid IntersectionObserver");let t=Ah();try{let n=new IntersectionObserver((e=>{t.resolve(e[0].isIntersecting),n.disconnect()}));n.observe(e)}catch(e){t.reject(e)}return t},e.domPrepend=dg,e.domRemove=fg,e.domRenderMarkdownMind=Qg,e.domRenderMarkdownMindDyn=async function(e,t){let n=arguments.length>3?arguments[3]:void 0;return Yu(n)||(n=["https://cdn.jsdelivr.net/npm/d3@7.8.3/dist/d3.min.js","https://cdn.jsdelivr.net/npm/markmap-view@0.14.4/dist/index.min.js","https://cdn.jsdelivr.net/npm/markmap-lib@0.14.4/dist/browser/index.min.js"]),await sg(n),Qg(e,t)},e.domRipple=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ft(n,"timeDuration",null);Vc(r)||(r=1e3);let i=Ft(n,"color",null);if(qt(i)||(i="rgba(255, 255, 255, 0.5)"),!Ko(e))return;e.style.position="relative",e.style.overflow="hidden";let o=e.getBoundingClientRect(),u=t.clientX-o.left,l=t.clientY-o.top,a=2*Math.max(e.clientWidth,e.clientHeight),s=document.createElement("div");s.style.width=`${a}px`,s.style.height=`${a}px`,s.style.transition=`all ${r/1e3}s linear`,s.style.position="absolute",s.style.zIndex=1,s.style.left=`${u}px`,s.style.top=`${l}px`,s.style.borderRadius="50%",s.style.transformOrigin="center",s.style.transform="translate(-50%,-50%) scale(0)",s.style.background=i,s.style.userSelect="none",s.style.pointerEvents="none",e.appendChild(s),setTimeout((()=>{s.style.transform="translate(-50%,-50%) scale(2)",s.style.opacity=0}),1),setTimeout((()=>{fg(s)}),r)},e.domScrollIntoView=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Ko(e))return;Rt(t)||(t={});let n={behavior:"smooth"};n=Uy(Uy({},n),t),tg()&&Ry(),e.scrollIntoView(n)},e.domScrollTo=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Ko(e))return;Rt(t)||(t={});let n={behavior:"smooth"};n=qy(qy({},n),t),tg()&&Ry(),e.scrollTo(n)},e.domShowImages=_b,e.domShowImagesDyn=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;return Yu(r)||(r=["https://cdn.jsdelivr.net/npm/viewerjs@1.11.3/dist/viewer.min.css","https://cdn.jsdelivr.net/npm/viewerjs@1.11.3/dist/viewer.min.js"]),await sg(r),_b(e,t,n)},e.domShowInputAndGetFiles=Pb,e.domShowInputAndGetFilesU8Arrs=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Ft(t,"multiple");Yl(n)||(n=!1);let r=Ft(t,"entireHierarchy");Yl(r)||(r=!1);let i=Ft(t,"sizelimit");Xt(i)||(i=1e3),i=sa(i);let o=Ah(),u=[];return Pb(e,{multiple:n,entireHierarchy:r,sizelimit:i}).then((function(e){let t=Ah(),n=Ft(e,"errs",{}),r=Ft(e,"files",[]);return zt(n)?t.reject(n):t.resolve(r),t})).then((function(e){return ou(e,(function(e){u.push({name:e.name,size:e.size,type:e.type})})),Ih(e)})).then((function(e){ou(e,(function(e,t){u[t].u8a=e})),o.resolve(u)})).catch((function(e){o.reject(e)})),o},e.domTooltip=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,i=null;function o(){null!==r&&r.destroy(!0),e.setAttribute("tippystate",""),clearInterval(i)}let u={arrow:!0,theme:"dark",placement:"bottom",delay:150};n=zt(n)?Mb(u,n):u;let l=t;t||(l=e.innerHTML);let a=Xt(e.getAttribute("tippystate"));if(e.setAttribute("tippystate","5"),a)return;l=`<div style="text-align:left;">${l}</div>`;let s=qx;qx.default&&(s=qx.default),r=s(e,Zx(Zx({},n),{},{content:l,allowHTML:!0,onHidden(){o()},onDestroy(){r=null,o()}})),r.show(),i=setInterval((()=>{let t=e.getAttribute("tippystate");Xt(t)?(t=qc(t),t-=1,e.setAttribute("tippystate",t),t<=0&&o()):o()}),1e3)},e.domTriggerEvent=Ab,e.domVirtualCreate=Gx,e.domVirtualCreateQueue=function(){return new function(){let e=tj(1);return async function(t){return e(Gx,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}}},e.downloadExcelFileFromData=oj,e.downloadExcelFileFromDataDyn=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"data",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;Yu(r)||(r=["https://cdn.jsdelivr.net/npm/xlsx@0.18.5/dist/xlsx.full.min.js"]),await sg(r);let i=oj(e,t,n);return""!==Ft(i,"error","")?Promise.reject(i.error):i},e.downloadFileFromB64=function(e,t){if(!Nl())return void console.log("no window");if(!qt(e))return void console.log("no filename");let n=document.createElement("a");n.href=t,n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)},e.downloadFileFromBlob=nj,e.downloadFileFromText=function(e,t){let n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];Nl()?qt(e)?Wt(t)?Yl(r)?(n=r?new Blob(["\ufeff",t]):new Blob([t]),nj(e,n)):console.log("withBOM is not a boolean"):console.log("invalid content"):console.log("invalid filename"):console.log("no window")},e.downloadFileFromU8Arr=function(e,t){if(!Nl())return void console.log("no window");if(!qt(e))return void console.log("no filename");if(!Dh(t))return void console.log("no data");nj(e,uj(t))},e.dtmapping=lj,e.dtpick=aj,e.evem=$c,e.execProcess=function(e,t){function n(e){try{return e.toString("utf8")}catch(e){}return""}return new Promise((function(r,i){let u="";o.exec(`${e} ${t}`,((e,t,r)=>{if(e)return i(e);qt(t=n(t))&&(u+=t),qt(r=n(r))&&(u+=r)})).on("close",(e=>{r(u)}))}))},e.execScript=function(e,t){return new Promise((function(n,r){Ut(t)||(t=[t]);let i=o.spawnSync(e,t),u=fp(i.output,(e=>null!==e));u=pu(u,(e=>function(e){try{return e.toString("utf8")}catch(e){}return""}(e)));let l=If(u,""),a=Ft(i,"error.message");a?r(a):n(l)}))},e.f2c=function(e){if(!wp(e))return"";let t=String(e),n=t.substring(t.indexOf("/*")+3,t.lastIndexOf("*/"));return n=th(n),n},e.filepathToTree=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Yu(e))return{};let n=Ft(t,"delimiter");qt(n)||(n="❯");let r=Ft(t,"bindRoot");qt(r)||(r="root");let i=Ft(t,"soryItems"),o=pu(e,((e,t)=>{"folder"!==e.type&&"file"!==e.type&&(e.type="file");let r=(e=>{let t=np(e=(e=e.replace(/\\\\/g,"\\")).replace(/\\/g,"/"),"/");return{ss:t,cfp:If(t,n)}})(e.path);return{ind:t,type:e.type,ss:r.ss,data:Ic(e)}})),u=e=>{let t=_l(e),r=[];for(let i=0;i<t;i++){let t=[];for(let n=0;n<=i;n++)t.push(e[n]);let o=If(t,n);r.push({id:o,name:e[i]})}return r},l=-1,a=[],s={};ou(o,(e=>{let t=[r],i=r,o=_l(e.ss)-1;ou(e.ss,((r,c)=>{let f=c<o||"folder"===e.type;t.push(r);let d=null,p=null;c===o&&(d=e.ind,p=e.data);let h=If(t,n),v=u(t);if(!Zt(s,h)){l++;let e=l;s[h]=f?{_indOri:d,_indNormalize:e,ns:_l(t),ts:Ic(t),pathInfors:v,_type:"folder",type:"array",numOfChilren:-1,id:h,parentId:i,text:r,children:[],data:p}:{_indOri:d,_indNormalize:e,ns:_l(t),ts:Ic(t),pathInfors:v,_type:"file",type:"node",numOfChilren:-1,id:h,parentId:i,text:r,data:p},a.push(Lj(Lj({},Ft(s[h],"data",{})),{},{type:s[h]._type,path:"/"+If(t,"/")}))}i=h}))}));let c=mj(s);if(c=Vp(c,"id"),c=Vp(c,"ns"),wp(i)){let e=[],t=Ej(c,"ns");ou(t,((t,n)=>{let r=Ej(t,"parentId");ou(r,((t,r)=>{let o=i(t,r,n);e=[...e,...o]}))})),c=e}let f=[],d=[];ou(c,(e=>{"folder"===e._type?f.push(e):d.push(e)}));let p=Ej(f,"ns"),h=Ej(d,"ns"),v=dj(pu(f,"ns")),m=dj(pu(d,"ns")),g=null;{let e=[r];g=[{_indOri:null,_indNormalize:null,ns:_l(e),ts:Ic(e),pathInfors:u(e),_type:"folder",type:"array",numOfChilren:-1,id:r,parentId:"",text:r,children:[],data:null}]}let y={};y[r]="0.children";let b={};b[r]="0";for(let e=2;e<=v;e++){let t=p[e];ou(t,(e=>{let t=Ft(y,e.parentId,"");if(!qt(t))throw console.log("kpPathFd",y),console.log("v",e,e.parentId),new Error(`invalid parentId[${e.parentId}] in folder`);let n=Ft(g,t);if(Ut(n)||cm(g,t,[]),n=Ft(g,t),!zt(Hj(n,{id:e.id}))){n.push(Lj(Lj({},e),{},{children:[]}));let r=`${t}.${_l(n)-1}`;y[e.id]=`${r}.children`,b[e.id]=r}}))}let w=Ic(g),x={};for(let e=2;e<=m;e++){let t=h[e];ou(t,(e=>{let t=Ft(y,e.parentId,"");if(!qt(t))throw console.log("kpPathFd",y),console.log("v",e,e.parentId),new Error(`invalid parentId[${e.parentId}] in file`);let n=Ft(g,t);if(!Ut(n))throw console.log("treeItems",g),console.log("k",t),console.log("v",e),new Error("無預先建置資料夾");if(!zt(Hj(n,{id:e.id}))){n.push(e);let r=`${t}.${_l(n)-1}`;x[e.id]=r,b[e.id]=r}}))}return{treeItems:g,treeItemsFolder:w,kpPath:b,fpsNormalize:a}},e.files2data=function(e){let t=Ah(),n=pu(e,(function(e){return{name:e.name,size:e.size,type:e.type}}));return Hh(e).then((function(e){let r=pu(e,(function(e){return{b64:e}})),i=Nj(n,r);t.resolve(i)})),t},e.flattenToConn=Hm,e.flattenTree=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ut(e)){if(0===e.length)return[]}else{if(!Rt(e))return[];if(_u(e))return[]}let n=Ft(t,"bindKey",null);qt(n)||(n="id");let r=Ft(t,"bindChildren",null);qt(r)||(r="children");let i=!1;Rt(e)&&(i=!0,e=[e]);let o=[];return Ym(e,((e,t,i)=>{let u=Ft(e,n,null),l=Ft(e,r,null);if(u){let n=function(e){let t=[e[0]];for(let n=1;n<e.length;n++){let i=e[n];t.push(r),t.push(i)}return t}([...i,t]);if(o.push(Cj(Cj({},e),{},{level:(_l(n)-1)/2,nk:n})),l)return l}})),i&&(o=o[0]),o},e.fsCleanFolder=function(e){if(!u.existsSync(e)){let t=Rj(e);return t.error?t.error:{success:"done: "+e}}if(!Bj(e))return{error:"input path is not a folder"};try{u.readdirSync(e).forEach((function(t){let n=e+"/"+t;if(u.lstatSync(n).isDirectory())Fj(n);else try{u.unlinkSync(n)}catch(e){}}))}catch(e){return{error:e}}return{success:"done: "+e}},e.fsCopyFolder=function e(t,n){try{u.readdirSync(t).forEach((function(r){let i=t+"/"+r,o=n+"/"+r,a=u.lstatSync(i);if(a.isDirectory())Rj(l.dirname(o)),e(i,o);else if(a.isSymbolicLink()){let e=u.readlinkSync(i);u.symlinkSync(e,o)}else Rj(l.dirname(o)),u.copyFileSync(i,o)}))}catch(e){return{error:e}}return{success:"done: "+n}},e.fsCreateFile=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(u.existsSync(e))return{error:"input path already exists: "+e};if(zj(e))return{error:"input file is already exists: "+e};try{u.writeFileSync(e,t,n)}catch(e){return{error:e}}return{success:"done: "+e}},e.fsCreateFolder=Rj,e.fsDeleteFile=function(e){if(!u.existsSync(e))return{success:"file does not exist: "+e};if(!zj(e))return{error:"input path is not a file: "+e};try{u.unlinkSync(e)}catch(e){return{error:e}}return{success:"done: "+e}},e.fsDeleteFolder=Fj,e.fsEvem=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"./_evps",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=$c(),i=Ft(t,"timeDetect");Vc(i)||(i=50),i=qc(i);let o=Ft(t,"timeRewatch");return Vc(o)||(o=1e3),o=qc(o),Bj(e)||Rj(e),r.on=function(t,r){let a=l.resolve(e,t),s=Uj({timeDetect:i,timeRewatch:o});s.on(a,(e=>{let t=u.readFileSync(a,"utf8"),n=Sh(t);zt(n)&&(t=n),r(t,e)})),n.push({fp:a,evf:s})},r.off=function(t){let r=l.resolve(e,t);ou(n,(e=>{e.fp===r&&e.evf.clear()}))},r.emit=function(t,n){let r=l.resolve(e,t);qt(n)||(n=JSON.stringify(n)),u.writeFileSync(r,n,"utf8")},r.clear=function(){ou(n,(e=>{e.evf.clear()}))},r},e.fsGetFilesInFolder=function(e){let t=Wj(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1);return t=fp(t,(e=>zj(e.path))),t=pu(t,"path"),t},e.fsGetFoldersInFolder=function(e){let t=Wj(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1);return t=fp(t,(e=>!zj(e.path))),t=pu(t,"path"),t},e.fsIsFile=zj,e.fsIsFolder=Bj,e.fsReadText=function(e){return u.readFileSync(e,"utf8")},e.fsRenameFile=function(e,t){if(!zj(e))return{error:`pahOld[${e}] is not a file`};if(!u.existsSync(t))return{error:`pahNew[${t}] does exist`};try{u.renameSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}},e.fsRenameFolder=function(e,t){if(!Bj(e))return{error:`pahOld[${e}] is not a folder`};if(!u.existsSync(t))return{error:`pahNew[${t}] does exist`};try{u.renameSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}},e.fsTreeFolder=Wj,e.fsWatchFile=Uj,e.fsWriteText=function(e,t){u.writeFileSync(e,t,"utf8")},e.genGradientColor=function(e){if(Tu(e))return{};let t;try{t=tm.toRgba(e)}catch(e){return{}}function n(e,t){return e.a=t,tm.toRgbaString(e)}return{linearGradient:{x1:0,x2:0,y1:0,y2:1},stops:[[0,n(t,.4)],[1,n(t,.9)]]}},e.genID=Um,e.genPm=Ah,e.getBufferSize=Vj,e.getClearPathName=Xj,e.getCsvStrFromData=Zj,e.getDataFromExcelFileU8Arr=Jj,e.getDataFromExcelFileU8ArrDyn=async function(e,t,n){Yu(n)||(n=["https://cdn.jsdelivr.net/npm/xlsx@0.18.5/dist/xlsx.full.min.js"]),await sg(n);let r=Jj(e,t);return""!==Ft(r,"error","")?Promise.reject(r.error):r},e.getDirName=function(e){if(!qt(e))return"";let t=Xj(e);if(t.isRoot)return t.path;let n=Qj(e=t.path);if(!qt(n))return e;let r=Xj(e=eh(e,_l(n)));return r.isRoot,r.path},e.getEnv=function(){let e=Nl(),t="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope;return e=e||t,{isBrowser:e,isWebWorker:t,isNode:"undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node}},e.getExcelU8ArrFromData=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"data";if(!Yu(e)){return{error:"no data"}}qt(t)||(t="data");let n=null,r=ij(e,t);return Zt(r,"error")?r:(n=eO(r),Zt(n,"error"),n)},e.getExcelU8ArrFromWorkbook=eO,e.getExcelWorkbookFromData=ij,e.getExcelWorkbookFromWorksheet=rj,e.getExcelWorksheetFromData=Bl,e.getFileAccept=zg,e.getFileName=Qj,e.getFileTrueName=function(e){if(!qt(e))return"";let t=Qj(e),n=vd(t,".");if(_l(n)<=1)return t;let r="";try{n=yd(n),r=If(n,".")}catch(e){}return r},e.getGlobal=$l,e.getObjSize=function(e){let t=0,n=function e(n){if(null!=n)switch(typeof n){case"number":t+=8;break;case"string":t+=2*n.length;break;case"boolean":t+=4;break;case"object":let r=Object.prototype.toString.call(n).slice(8,-1);if("Object"===r||"Array"===r)for(let t in n)n.hasOwnProperty(t)&&e(n[t]);else t+=2*n.toString().length}return t}(e),r=function(e){return e<1024?e+" bytes":e<1048576?(e/1024).toFixed(3)+" KiB":e<1073741824?(e/1048576).toFixed(3)+" MiB":(e/1073741824).toFixed(3)+" GiB"}(n);return{int:n,str:r}},e.getTimeBetween=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"days",r=lO(n);if(""===r)return[];let i=aO(e,n),o=aO(t,n);if(null===i||null===o)return[];if(e>=t)return[];let u=o.diff(i,n)+1;return pu(uO(u),(function(e){return i.clone().add(e,n).format(r)}))},e.getTimeFromUnit=lO,e.getTimeObject=aO,e.getTimeRange=function(e,t){if(!sO(e))return"無起始時間";if(void 0===t&&(t=e),!sO(t))return"結束時間格式錯誤";let r=n(e,"YYYY-MM-DDTHH:mm:ss"),i=n(t,"YYYY-MM-DDTHH:mm:ss"),o=r.format("YYYY-MM-DD"),u=i.format("YYYY-MM-DD");if(o===u){let n=i.format("HH:mm");if(e===t)return cO(e)+" 至 無";if(e<t)return cO(e)+" 至 "+n;if(e>t)return cO(e)+" 至 "+n+" (起始時間大於結束時間)"}else{if(o<u)return cO(e)+" 至 "+cO(t);if(o>u)return cO(e)+" 至 "+cO(t)+" (起始時間大於結束時間)"}return""},e.getUserAgent=fO,e.getUserAgentDyn=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return Yu(t)||(t=["https://cdn.jsdelivr.net/npm/ua-parser-js@1.0.34/dist/ua-parser.min.js"]),await sg(t),fO(e)},e.getltdtkeys=el,e.haskey=Zt,e.html2pic=pO,e.html2picDyn=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return Yu(n)||(n=["https://cdn.jsdelivr.net/npm/canvg@4.0.0/lib/umd.js","https://cdn.jsdelivr.net/npm/html2canvas@1.4.1/dist/html2canvas.min.js"]),await sg(n),pO(e,t)},e.html2str=hO,e.html2strDyn=async function(e,t){return Yu(t)||(t=["https://cdn.jsdelivr.net/npm/htmlparser@1.7.7/lib/htmlparser.min.js"]),await sg(t),await hO(e)},e.htmlDecode=function(e){let t=document.createElement("span");return t.appendChild(document.createTextNode(e)),t.innerHTML},e.htmlEncode=Lh,e.importResources=sg,e.interp1=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!Ut(e))return{err:"ps is not an array"};if(!yp(t))return{err:"x is not a number"};let r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(_l(e)<=0)return[];let n=Ft(t,"keyX");qt(n)||(n="x");let r=Ft(t,"keyY");qt(r)||(r="y");let i=[];return ou(e,(e=>{let t=null,o=null;Ut(e)&&_l(e)>=2?(t=Ft(e,0),o=Ft(e,1)):(t=Ft(e,n,null),o=Ft(e,r,null)),Xt(t)&&Xt(o)&&(t=ea(t),o=ea(o),i.push({x:t,y:o}))})),i}(e,n);if(Ft(r,"err"))return Ft(r,"err");if(0===_l(r))return{err:"ps(length=0) is not an effective array",ps:e,psEff:r};if(1===_l(r))return{err:"ps(length=1) is one point only",ps:e,psEff:r};let i=function(e){let t=!0,n=!0;for(let r=1;r<_l(e);r++){let i=e[r-1],o=e[r];if(t&&i.x>o.x&&(t=!1),n&&i.x<o.x&&(n=!1),i.x===o.x)return{err:`x can not be equal: i=${r}, x=${i.x}`}}return t?gO:n?yO:"no"}(r);if("no"===i)return{err:"psEff is not increasing or decreasing"};i===yO&&(i=gO,r=Qp(r));let o=Ft(n,"mode");"linear"!==o&&"stairs"!==o&&"blocks"!==o&&(o="linear");try{if("linear"===o)return function(e,t){let n=bO(e,t);if(n!==vO)return n;let r=null;for(let n=1;n<_l(e);n++){let i=e[n-1],o=e[n];if(i.x<=t&&t<=o.x){r=((t-i.x)*o.y+(o.x-t)*i.y)/(o.x-i.x);break}}return null===r?{err:mO}:r}(r,t);if("blocks"===o)return function(e,t){let n=bO(e,t);if(n!==vO)return n;let r=null;for(let n=1;n<_l(e);n++){let i=e[n-1],o=e[n],u=i.x,l=o.x;if(u<=t&&t<=l){r=o.y;break}}return null===r?{err:mO}:r}(r,t);if("stairs"===o)return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ft(n,"xMin");if(yp(r)){if(r>e[0].x)return{err:`xMin=${r} > ps[0].x=${e[0].x}`};r===e[0].x||(e=[{x:r,y:e[0].y},...e])}let i=Ft(n,"xMax");if(yp(i)){if(i<e[_l(e)-1].x)return{err:`xMax=${i} < ps[size(ps)-1].x=${e[_l(e)-1].x}`};if(i===e[_l(e)-1].x);else{let t={x:i,y:e[_l(e)-1].y};e=[...e,t]}}let o=bO(e,t);if(o!==vO)return o;let u=null;for(let n=0;n<_l(e);n++){let r=Ft(e,n-1,null),i=Ft(e,n,null),o=Ft(e,n+1,null),l=i.x;r&&(l=(r.x+i.x)/2);let a=i.x;if(o&&(a=(o.x+i.x)/2),l<=t&&t<=a){u=i.y;break}}return null===u?{err:mO}:u}(r,t,n)}catch(e){return{err:e.toString()}}},e.isDev=function(){return!!location&&_h(location.href,"localhost")},e.isEle=Ko,e.isEleExistByID=function(e){return!!qt(e)&&!(null===document.getElementById(e))},e.isEmail=function(e){return!!qt(e)&&/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e)},e.isIE=tg,e.isNarrow=function(e){if(!Nl())return!1;let t=window.innerWidth>0&&window.innerWidth<=1024,n=!1;if(e){let t=Ft(e,"clientWidth",0);n=t>0&&t<=700}return t||n},e.isStrHasCapital=OO,e.isStrHasLowerCase=SO,e.isStrHasNumber=EO,e.isUserIdentify=function(e){let t=Ah();if(!qt(e))return t.reject("身份證字號非有效字串"),t;if(10!==e.length)return t.reject("身份證字號長度非10位"),t;if(isNaN(e.substr(1,9))||!/^[A-Z]$/.test(e.substr(0,1)))return t.reject("身份證格式錯誤,字首需大寫英文"),t;e="ABCDEFGHJKLMNPQRSTUVXYWZIO".indexOf(e.substring(0,1))+10+""+e.substr(1,9);let n=parseInt(e.substr(0,1))+9*parseInt(e.substr(1,1))+8*parseInt(e.substr(2,1))+7*parseInt(e.substr(3,1))+6*parseInt(e.substr(4,1))+5*parseInt(e.substr(5,1))+4*parseInt(e.substr(6,1))+3*parseInt(e.substr(7,1))+2*parseInt(e.substr(8,1))+parseInt(e.substr(9,1)),r=parseInt(e.substr(10,1));return n%10!=0&&10-n%10!==r?(t.reject("非有效身份證"),t):(t.resolve(),t)},e.isUserName=function(e){let t=Ah();return qt(e)?(t.resolve(),t):(t.reject("請填入姓名"),t)},e.isUserPW=function(e){let t=Ah();if(!Wt(e))return t.reject("密碼非字串"),t;let n=[];return e.length<8&&n.push("長度須大於8個字元"),e.length>30&&n.push("長度須小於30個字元"),OO(e)&&SO(e)&&EO(e)||n.push("須包含大寫、小寫英文與數字各1個字元"),_h(e,["<",">"])&&n.push("不能使用特殊符號(<,>)"),_h(e,["select","insert","update","delete"])&&n.push("不能使用指令(select,insert,update,delete)"),n.length>0?t.reject(If(n,",")):t.resolve(),t},e.isWindow=Nl,e.isab=v,e.isarr=Ut,e.isarr0=Pu,e.isblob=$h,e.isbol=Yl,e.isday=Bm,e.isearr=Yu,e.iseobj=zt,e.iser=Tu,e.isernot=Rg,e.isestr=qt,e.isfun=wp,e.isint=ca,e.ismonth=Fl,e.isn0int=wO,e.isn0num=xO,e.isnbr=Vt,e.isnint=Qx,e.isnnum=function(e){return!!Xt(e)&&sa(e)<0},e.isnull=Mu,e.isnum=Xt,e.isobj=Rt,e.isobj0=_u,e.isp0int=_f,e.isp0num=jO,e.ispint=Vc,e.ispm=Uh,e.ispnum=dp,e.isstr=Wt,e.isstr0=Au,e.istime=sO,e.istimeTZ=AO,e.istimems=DO,e.istimemsTZ=_O,e.isu16arr=qj,e.isu8arr=Dh,e.isundefined=ku,e.j2o=Sh,e.keysmat2ltdt=PO,e.log=function(){let e=null;return{init:function(t){if(!wp(t))throw new Error("loggerFun is not a function");e=t},log:function(t,n,r){if(null===e)throw new Error("no logger: need to construct by init");let i=TO(),o={id:Um(),from:t,level:n,msg:Hl(r),time:i};return e(o)}}},e.ltdt2vrtsable=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!Yu(e))return[];if(!Ut(t))return[];let n=!1;if(ou(e,(function(e){zt(e)||(n=!0)})),n)return[];let r=el(e),i=[];ou(e,(function(e){let t={};ou(r,(function(n){t[n]={value:e[n].value,style:e[n].style,rowspan:1}})),i.push(t)}));let o=Qp(i),u=_l(o);return ou(r,(function(e){if(bp(e,t)){let t=af(0,u,0),n=af(0,u,0),r=af(1,u+1,0);ou(o,(function(i,u){if(u>0){let i=o[u-1][e].value,l=o[u][e].value;vp(i,l)&&(t[u-1]=1,t[u]=1,r[u]=r[u-1]+1),1===t[u-1]&&1===t[u]&&(n[u-1]=0,n[u]=1)}})),ou(o,(function(i,u){1===t[u]&&(1===n[u]?o[u][e].rowspan=r[u]:o[u][e].rowspan=null)}))}})),Qp(o)},e.ltdtDiff=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!Ut(e))return{};if(!Ut(t))return{};if(0===_l(e)&&0===_l(t))return{};let r=Ft(n,"empty");qt(r)||(r="∗empty∗");let i=el(e),o=el(t),u=LO(i,o),l={};ou(u,((e,t)=>{l[t]=e}));let a=zd(Il(e,u,{empty:r}),Il(t,u,{empty:r}),$O($O({},n),{},{mode:"matrix"}));return a.dfs=pu(a.dfs,(e=>{let t={};ou(e,(e=>{e.k=l[e.k],t[e.k]=e}));let n={};return ou(u,(e=>{n[e]=t[e]})),n})),a},e.ltdtDiffByKey=function(e,t,n){let r={infor:{},del:[],same:[],diff:[],add:[]};if(!qt(n))return console.log("invalid key"),r;Ut(e)||(e=[e]),Ut(t)||(t=[t]);let i={},o=[],u=[],l=[];ou(e,(function(e){if(Zt(e,n)){let r={[n]:e[n]},a=Hj(t,r);Tu(a)?(o.push(e),i[e[n]]="del"):vp(e,a)?(l.push(a),i[a[n]]="same"):(u.push(a),i[a[n]]="diff")}}));let a=[];return ou(t,(function(t){if(Zt(t,n)){let r={[n]:t[n]};Tu(Hj(e,r))&&(a.push(t),i[t[n]]="add")}})),{infor:i,del:o,same:l,diff:u,add:a}},e.ltdtkeys2mat=Il,e.ltdtkeysheads2mat=Ll,e.ltdtmapping=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return Yu(e)&&Yu(t)?pu(e,(e=>lj(e,t,n))):[]},e.ltdtmerge=Nj,e.ltdtpick=function(e,t){return Yu(e)&&Yu(t)?pu(e,(e=>aj(e,t))):[]},e.ltdtpull=function(e,t,n){return Ut(e)&&Ut(t)&&qt(n)&&No(e,(e=>Rt(e)))?0===t.length?e:No(t,(e=>Rt(e)))?JO(e,t,n):[]:[]},e.mat2ltdt=function(e){if(!Yu(e))return[];if(e.length<=1)return[];let t=!1;return ou(e,(function(e){Yu(e)||(t=!0)})),t?[]:PO(Nd(e)[0],eS(e))},e.matConcat=function(e,t){if(!Ut(e))return[];if(!Ut(t))return[];if(0===_l(e)&&0===_l(t))return[];let n=_l(e),r=_l(Ft(e,0,[])),i=_l(t),o=_l(Ft(t,0,[])),u=[],l=Math.max(n,i);for(let n=0;n<l;n++){let i=[],l=-1;for(let t=0;t<r;t++){l++;let r=Ft(e,`${n}.${t}`,null);i[l]=r}for(let e=0;e<o;e++){l++;let r=Ft(t,`${n}.${e}`,null);i[l]=r}u[n]=i}return u},e.matDiff=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Ut(e)&&Ut(t)?0===_l(e)&&0===_l(t)?{}:zd(e,t,nS(nS({},n),{},{mode:"matrix"})):{}},e.matat=function(e,t,n){return Yu(e)?pu(e,(function(e){return Af(e,t,n)})):[]},e.now2str=function(){return n().format("YYYY-MM-DDTHH:mm:ssZ")},e.now2strp=function(){return n().format("YYYYMMDDHHmmss")},e.nowDay2str=function(){return n().format("YYYY-MM-DD")},e.nowms2str=TO,e.nowms2strp=function(){return n().format("YYYYMMDDHHmmssSSS")},e.o2j=Hl,e.obj2b64=function(e){let t="";try{t=rS(Hl(e))}catch(e){t=""}return t},e.obj2pb64=function(e,t){return void 0===e?"":qt(t)?iS(Hl({data:e}),t,!0):""},e.obj2str=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Uint8Array";if(ku(e))return"";if(Wt(t))t=[t];else if(!Ut(t))return"";let n="";try{n=JSON.stringify(e,(function(e,n){return t.indexOf("Uint8Array")>=0&&(n=dS.u8arr2b64(n)),t.indexOf("Uint16Array")>=0&&(n=dS.u16arr2b64(n)),n}))}catch(e){n=""}return n},e.obj2stru8arr=yS,e.obj2u8arr=function(e){let t=[],n=[];if(!Yu(e)&&!zt(e))return null;let r=[],i=[];function o(e){r.push(Vj(e)),i.push(e)}try{let u=yS(e);o(bS(u.results)),ou(u.binarys,(e=>{o(e)}));let l=r,a=bS(JSON.stringify(l)),s=new Uint8Array(8);zh(Vj(a),s),t.push(s),t.push(a),ou(i,(e=>{t.push(e)})),ou(t,(e=>{n=function(e,t){let n=Vj(e),r=Vj(t),i=new Uint8Array(n+r);return i.set(new Uint8Array(e),0),i.set(new Uint8Array(t),n),i}(n,e)}))}catch(e){return null}return n},e.objSortBy=wS,e.objSortByKeys=function(e,t){if(!zt(e))return{};if(!Yu(t))return{};let n={};return ou(t,((e,t)=>{n[e]=t})),wS(e,((e,t)=>Ft(n,t,0)))},e.ocr=xS,e.ocrDyn=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return Yu(n)||(n=["https://cdn.jsdelivr.net/npm/tesseract.js@4.0.3/dist/tesseract.min.js"]),await sg(n),await xS(e,t)},e.oo=function(e){if(void 0!==e)return Sh(Hl(e))},e.openLink=function(e){if(!qt(e))return;let t=document.createElement("a");t.href=e,t.target="_blank",document.body.appendChild(t),t.click(),document.body.removeChild(t)},e.pb642obj=function(e,t){return qt(e)&&qt(t)?Sh(La(e,t,!0)).data:""},e.pm2resolve=Jx,e.pmChain=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Ut(e)){let e=Ah();return e.reject("pms is not an array"),e}return e.reduce(((e,t)=>e.then(t)),Promise.resolve(t))},e.pmConvertResolve=Kx,e.pmHook=jS,e.pmHookReject=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return wp(e)?(wp(t)||(t=()=>{}),jS(e,(e=>{if("afterCatch"===e.mode)return t(e.data)}))):null},e.pmIni=function(){return Promise.resolve()},e.pmInvResolve=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Uh(e))throw new Error("pm is not a promise");let n=Ft(t,"thenExtractData");Yl(n)||(n=!1);let r=Ah();return e.then((e=>{n&&(e=Ft(e,"data"));let t=Ft(e,"state",""),i=Ft(e,"msg",{});"success"===t?r.resolve(i):"cancelled"===t?r.reject({reason:"cancelled"}):r.reject(i)})).catch((e=>{r.reject(e)})),r},e.pmMap=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r={},i=!1,o=Ah();if(!Ut(e)&&!Rt(e))return o.reject("rs is not an array or object"),o;let u=!1;if(Rt(e)){u=!0;let t=[];ou(e,((e,n)=>{t.push({k:n,v:e})})),e=t}let l=ej(n);return l.on("message",(function(n){if(i)return;let a,s=l.get();if(wp(t)){let e=s.key,n=s.value;u&&(e=s.value.k,n=s.value.v),a=t(n,e)}else a=s.value;a.then((e=>{r[s.key]=e})).catch((e=>{i=!0,l.clear(),o.reject(e)})).finally((()=>{l.cb(),_l(r)===e.length&&o.resolve(mj(r))}))})),ou(e,((e,t)=>{l.push({key:t,value:e})})),o},e.pmQueue=tj,e.pmSeries=og,e.pmThrottle=function(){let e=$c(),t=[],n=null,r=!1;return function(i){let o=Ah();if(!wp(i))return void console.log("func is not a function");let u=Um();for(var l=arguments.length,a=new Array(l>1?l-1:0),s=1;s<l;s++)a[s-1]=arguments[s];return t.push({id:u,func:i,input:a}),null===n&&(n=setInterval((async()=>{if(r)return;r=!0;let i=t.pop();for(let n=0;n<t.length;n++){let r=t[n].id,i={state:"cancelled"};e.emit(r,i)}if(t=[],i){let t,n=i.id;t=wp(i.func)?await Jx(i.func)(...i.input):{state:"error",msg:"fun is not a function"},e.emit(n,t)}r=!1,r||0!==t.length||(clearInterval(n),n=null)}),10)),e.once(u,(e=>{"success"===e.state?o.resolve(e.msg):"cancelled"===e.state?o.reject({reason:"cancelled"}):o.reject(e.msg)})),o}},e.pseudoRandom=ES,e.pseudoRandomIntRange=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"start1";if(ca(e)||(e=0),e=qc(e),ca(t)||(t=100),t=qc(t),e>t)throw new Error(`vstart[${e}] > vend[${t}]`);let r=ES(n)*(t-e+1)+e;return r=Math.ceil(r),r},e.pseudoRandomRange=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"start1";if(Xt(e)||(e=0),e=sa(e),Xt(t)||(t=1),t=sa(t),e>t)throw new Error(`vstart[${e}] > vend[${t}]`);return ES(n)*(t-e)+e},e.queue=ej,e.rang=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if(!Xt(e))return[];if(e=sa(e),!Xt(t))return[];t=sa(t),Vc(n)||(n=2),n=qc(n);let r=(t-e)/n,i=e,o=[];for(let e=0;e<=n;e++)o.push(i),i+=r;return o},e.rep=function(e,t){return qt(e)&&_f(t)?PS(e,t):""},e.repObj=function(e,t){return Tu(e)?[]:Vc(t)?uO(t,gf(e)):[]},e.replace=Kh,e.replaceObj=function(e,t){if(!qt(e))return"";if(!zt(t))return"";let n=!1;return ou(t,(function(e,t){Wt(e)||(n=!0)})),n?"":(ou(t,(function(t,n){e=Kh(e,n,t)})),e)},e.replacePlus=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4?arguments[4]:void 0;if(!qt(e)||!qt(t)||!qt(n))return"";if(!Wt(i))return"";let o="[\\s\\S]*";qt(r)&&(o="[^"+r+"]*");let u=new RegExp(t+o+n,"g");return e.replace(u,i)},e.round=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};_f(t)||(t=0),t=qc(t);let r=Ft(n,"rounding","");if("ROUND_HALF_UP"!==r&&"ROUND_HALF_EVEN"!==r&&(r="ROUND_HALF_UP"),!Xt(e))return"";e=sa(e);let i=hD.clone();return i.set({rounding:hD[r]}),new i(e).toDecimalPlaces(t).toNumber()},e.secd=function(e){return Xt(e)?1/Lm(e=sa(e)):null},e.sep=np,e.sepInt=function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!ca(e))return[];if(!_f(t))return[];if(!Yl(n))return[];let r=vD(e/t),i=e-r*t,o=[];for(let e=1;e<=t;e++){let t=r;e<=i&&(t=r+1),o.push(t)}return n&&(o=Qp(o)),o},e.sind=Cm,e.split=tp,e.str2aes=iS,e.str2b64=rS,e.str2hint=OS,e.str2md5=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!qt(e))return"";if(!Yl(t))return"";let n=mD(e),r="";return r=t?n.toString(ya):n.toString(Ia),r},e.str2obj=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Uint8Array";if(Wt(t))t=[t];else if(!Ut(t))return{};let n={};try{n=JSON.parse(e,(function(e,n){return t.indexOf("Uint8Array")>=0&&(n=dS.b642u8arr(n)),t.indexOf("Uint16Array")>=0&&(n=dS.b642u16arr(n)),n}))}catch(e){n={}}return n},e.str2sha512=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!qt(e))return"";if(!Yl(t))return"";let n=wD(e),r="";return r=t?n.toString(ya):n.toString(Ia),r},e.str2u8arr=bS,e.strCompare=xD,e.strDiff=$d,e.strFindFuzz=DD,e.strFindFuzzDyn=async function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;return Yu(r)||(r=["https://cdn.jsdelivr.net/npm/fuse.js@6.6.2/dist/fuse.min.js"]),await sg(r),DD(e,t,n)},e.strFindSimilar=function(e,t){let n="";if(qt(e)||Xt(e))n=Xp(e);else{if(!Yu(e))return{};n=If(e,"")}return Xt(t)&&(t=Xp(t)),qt(t)&&(t=[t]),Yu(t)?function(e,t){let n=[],r=0;for(let i=0;i<t.length;i++){let o=t[i],u=xD(e,o);n.push({target:o,rating:u}),u>n[r].rating&&(r=i)}return{ratings:n,bestMatch:n[r],bestMatchIndex:r}}(n,t=pu(t,(function(e){return Xp(e)}))):{}},e.strdelleft=op,e.strdelright=eh,e.strleft=rp,e.strmid=Jh,e.strright=ip,e.stru8arr2obj=kD,e.tand=Nm,e.time2day=function(e){return sO(e)?n(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DD"):""},e.time2hour=function(e){return sO(e)?n(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DDTHH"):""},e.time2min=cO,e.timeTZ2day=function(e){return AO(e)?(e=MO.delTZ(e),n(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DD")):""},e.timeTZ2expire=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return AO(e)?(e=AD(e),t=AD(t),MD(e,t)):{today:null,msg:"",err:"時間格式錯誤"}},e.timeTZ2hour=function(e){return AO(e)?(e=MO.delTZ(e),n(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DDTHH")):""},e.timeTZ2min=function(e){return AO(e)?(e=MO.delTZ(e),n(e,"YYYY-MM-DDTHH:mm:ss").format("YYYY-MM-DDTHH:mm")):""},e.timeTZ2past=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return AO(e)?(e=PD(e),t=PD(t),_D(e,t)):{today:null,msg:"",err:"時間格式錯誤"}},e.timems2day=function(e){return DO(e)?n(e,"YYYY-MM-DDTHH:mm:ss.SSS").format("YYYY-MM-DD"):""},e.timems2hour=function(e){return DO(e)?n(e,"YYYY-MM-DDTHH:mm:ss.SSS").format("YYYY-MM-DDTHH"):""},e.timems2min=function(e){return DO(e)?n(e,"YYYY-MM-DDTHH:mm:ss.SSS").format("YYYY-MM-DDTHH:mm"):""},e.timems2time=function(e){return DO(e)?n(e,"YYYY-MM-DDTHH:mm:ss.SSS").format("YYYY-MM-DDTHH:mm:ss"):""},e.timemsTZ2day=function(e){return _O(e)?(e=MO.delTZ(e),n(e).format("YYYY-MM-DD")):""},e.timemsTZ2expire=MD,e.timemsTZ2hour=function(e){return _O(e)?(e=MO.delTZ(e),n(e).format("YYYY-MM-DDTHH")):""},e.timemsTZ2min=function(e){return _O(e)?(e=MO.delTZ(e),n(e).format("YYYY-MM-DDTHH:mm")):""},e.timemsTZ2past=_D,e.timemsTZ2time=function(e){return _O(e)?(e=MO.delTZ(e),n(e).format("YYYY-MM-DDTHH:mm:ss")):""},e.treeObj=Ym,e.treeToFilepath=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Yu(e))return[];let n=Ft(t,"delimiter");qt(n)||(n="/");let r=Ft(t,"bindRoot");qt(r)||(r="root");let i=[];return Ym(e,((e,t,o)=>{let u=Ft(e,"_type","");if("folder"!==u&&"file"!==u)return e;let l=Ft(e,"pathInfors",[]),a=pu(l,"name"),s=Ft(a,0,"")===r;if(1===_l(a)&&s)return e;s&&(a=Kp(a));let c={type:u,path:n+If(a,n)};return i.push(c),e}),{force:!0}),i},e.trim=th,e.u16arr2b64=sS,e.u16arr2u8arr=aS,e.u8arr2ab=function(e){return Dh(e)?e.buffer:new ArrayBuffer},e.u8arr2b64=lS,e.u8arr2blob=uj,e.u8arr2bs=function(e){if(!Dh(e))return"";let t=e.length,n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n},e.u8arr2obj=function(e){let t=null;if(!Dh(e))return null;try{let n=8,r=e.slice(0,n),i=e.slice(n,Vj(e)),o=Fh(r),u=i.slice(0,o),l=i.slice(o,Vj(i)),a=TD(u),s=function(e,t){let n=0,r=0,i=[];return ou(t,(t=>{r=n+t;let o=e.slice(n,r);n=r,i.push(o)})),i}(l,JSON.parse(a));t=kD({results:TD(s.shift()),binarys:s})}catch(e){}return t},e.u8arr2str=TD,e.u8arr2u16arr=kh,e.urlParse=function(e){if(!qt(e))return{};if(e=vd(e,"?"),!qt(e=Ft(e,"[1]")))return{};let t=vd(e,"&");return t=pu(t,(function(e){return vd(e,"=")})),t=YD(t),t},e.verifyValue=function(e,t){let n=!1,r="";if("isstr"===t)Wt(e)||(n=!0,r="需要為字串",e="");else if("isnum"===t)Xt(e)||(n=!0,r="需要為數字",e=0);else if("isp0num"===t)jO(e)||(n=!0,r="需要為含0的正浮點數",e=0);else if("isn0num"===t)xO(e)||(n=!0,r="需要為含0的負浮點數",e=0);else if("isint"===t)ca(e)||(n=!0,r="需要為整數",e=0);else if("ispint"===t)Vc(e)||(n=!0,r="需要為不含0正整數",e=0);else if("isp0int"===t)_f(e)||(n=!0,r="需要為含0正整數",e=0);else if("isnint"===t)Qx(e)||(n=!0,r="需要為不含0負整數",e=0);else if("isn0int"===t)wO(e)||(n=!0,r="需要為含0負整數",e=0);else if(wp(t)){e=t(e)}else"any"===t?Xt(e)||Wt(e)||(n=!0,r="需要為字串或數字",e=""):(n=!0,r="需要指定驗證類型",e=null);return{value:e,err:n,errmsg:r}},e.waitFun=Wh}));
15
15
  //# sourceMappingURL=wsemi.umd.js.map