tiny-essentials 1.28.19 → 1.29.1

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 (556) hide show
  1. package/README.md +1 -1
  2. package/changelog/1/28/19.md +24 -0
  3. package/changelog/1/29/0.md +58 -0
  4. package/changelog/1/29/1.md +11 -0
  5. package/dist/v1/ColorSafeStringify.min.js +1 -1
  6. package/dist/v1/TinyAdvancedRaffle.min.js +1 -1
  7. package/dist/v1/TinyAfterScrollWatcher.min.js +1 -1
  8. package/dist/v1/TinyAnalogClock.min.js +1 -1
  9. package/dist/v1/TinyArrayComparator.min.js +1 -1
  10. package/dist/v1/TinyArrayPaginator.min.js +1 -1
  11. package/dist/v1/TinyBasicsEs.min.js +1 -1
  12. package/dist/v1/TinyBrowserMonitor.min.js +1 -0
  13. package/dist/v1/TinyClassManager.min.js +1 -1
  14. package/dist/v1/TinyClipboard.min.js +1 -1
  15. package/dist/v1/TinyCloner.min.js +1 -0
  16. package/dist/v1/TinyColorConverter.min.js +1 -1
  17. package/dist/v1/TinyColorValidator.min.js +1 -1
  18. package/dist/v1/TinyCookieConsent.min.js +1 -1
  19. package/dist/v1/TinyDayNightCycle.min.js +1 -1
  20. package/dist/v1/TinyDebugger.min.js +1 -1
  21. package/dist/v1/TinyDomReadyManager.min.js +1 -1
  22. package/dist/v1/TinyDragDropDetector.min.js +1 -1
  23. package/dist/v1/TinyDragger.min.js +1 -1
  24. package/dist/v1/TinyElementObserver.min.js +1 -1
  25. package/dist/v1/TinyEssentials.min.js +1 -1
  26. package/dist/v1/TinyGamepad.min.js +1 -1
  27. package/dist/v1/TinyHtml.min.js +1 -1
  28. package/dist/v1/TinyHtmlTagRegexBuilder.min.js +1 -0
  29. package/dist/v1/TinyHttpResponseRegistry.min.js +1 -0
  30. package/dist/v1/TinyI18.min.js +1 -1
  31. package/dist/v1/TinyIframeEvents.min.js +1 -1
  32. package/dist/v1/TinyInventory.min.js +1 -1
  33. package/dist/v1/TinyInventoryTrader.min.js +1 -1
  34. package/dist/v1/TinyLevelUp.min.js +1 -1
  35. package/dist/v1/TinyLoadingScreen.min.js +1 -1
  36. package/dist/v1/TinyLocalStorage.min.js +1 -1
  37. package/dist/v1/TinyMaInSys.min.js +1 -1
  38. package/dist/v1/TinyMapCache.min.js +1 -0
  39. package/dist/v1/TinyMediaPlayer.min.js +1 -1
  40. package/dist/v1/TinyNeedBar.min.js +1 -1
  41. package/dist/v1/TinyNewWinEvents.min.js +1 -1
  42. package/dist/v1/TinyNotificationAdapter.min.js +1 -0
  43. package/dist/v1/TinyNotifications.min.js +1 -1
  44. package/dist/v1/TinyNotifyCenter.min.js +1 -1
  45. package/dist/v1/TinyOPFSFileSystem.min.js +1 -0
  46. package/dist/v1/TinyPasswordValidator.min.js +1 -0
  47. package/dist/v1/TinyPluginPackage.min.js +1 -0
  48. package/dist/v1/TinyPromiseQueue.min.js +1 -1
  49. package/dist/v1/TinyPushManager.min.js +1 -0
  50. package/dist/v1/TinyPushPayload.min.js +1 -0
  51. package/dist/v1/TinyPushRouter.min.js +1 -0
  52. package/dist/v1/TinyRadioFm.min.js +1 -1
  53. package/dist/v1/TinyRateLimiter.min.js +1 -1
  54. package/dist/v1/TinyRegexEs.min.js +1 -0
  55. package/dist/v1/TinyRouter.min.js +1 -0
  56. package/dist/v1/TinyServiceWorker.min.js +1 -0
  57. package/dist/v1/TinyServiceWorkerEngine.min.js +1 -0
  58. package/dist/v1/TinySetMapPackage.min.js +1 -0
  59. package/dist/v1/TinySimpleDice.min.js +1 -1
  60. package/dist/v1/TinySmartScroller.min.js +1 -1
  61. package/dist/v1/TinyStorageBucketFileSystem.min.js +1 -0
  62. package/dist/v1/TinyTextDiffer.min.js +1 -1
  63. package/dist/v1/TinyTextRangeEditor.min.js +1 -1
  64. package/dist/v1/TinyTextarea.min.js +1 -1
  65. package/dist/v1/TinyThrottledApi.min.js +1 -0
  66. package/dist/v1/TinyTimeout.min.js +1 -1
  67. package/dist/v1/TinyToastNotify.min.js +1 -1
  68. package/dist/v1/TinyUploadClicker.min.js +1 -1
  69. package/dist/v1/TinyUriParser.min.js +1 -0
  70. package/dist/v1/TinyVersion.min.js +1 -0
  71. package/dist/v1/TinyWebWorker.min.js +1 -0
  72. package/dist/v1/TinyWebWorkerEngine.min.js +1 -0
  73. package/dist/v1/UltraRandomMsgGen.min.js +1 -1
  74. package/dist/v1/basics/array.cjs +2 -2
  75. package/dist/v1/basics/array.d.mts +2 -0
  76. package/dist/v1/basics/array.d.mts.map +1 -1
  77. package/dist/v1/basics/array.mjs +2 -1
  78. package/dist/v1/basics/browserDetector.cjs +37 -12
  79. package/dist/v1/basics/browserDetector.d.mts +8 -0
  80. package/dist/v1/basics/browserDetector.d.mts.map +1 -1
  81. package/dist/v1/basics/browserDetector.mjs +32 -13
  82. package/dist/v1/basics/crypto.cjs +23 -0
  83. package/dist/v1/basics/crypto.d.mts +10 -0
  84. package/dist/v1/basics/crypto.d.mts.map +1 -0
  85. package/dist/v1/basics/crypto.mjs +18 -0
  86. package/dist/v1/basics/html.cjs +0 -3
  87. package/dist/v1/basics/html.d.mts.map +1 -1
  88. package/dist/v1/basics/html.mjs +0 -2
  89. package/dist/v1/basics/index.cjs +8 -1
  90. package/dist/v1/basics/index.d.mts +6 -5
  91. package/dist/v1/basics/index.d.mts.map +1 -1
  92. package/dist/v1/basics/index.mjs +6 -5
  93. package/dist/v1/basics/objChecker.cjs +88 -0
  94. package/dist/v1/basics/objChecker.d.mts +26 -0
  95. package/dist/v1/basics/objChecker.d.mts.map +1 -1
  96. package/dist/v1/basics/objChecker.mjs +74 -0
  97. package/dist/v1/basics/objFilter.cjs +234 -93
  98. package/dist/v1/basics/objFilter.d.mts +96 -22
  99. package/dist/v1/basics/objFilter.d.mts.map +1 -1
  100. package/dist/v1/basics/objFilter.mjs +216 -92
  101. package/dist/v1/basics/promiseUtils.cjs +48 -12
  102. package/dist/v1/basics/promiseUtils.d.mts +45 -12
  103. package/dist/v1/basics/promiseUtils.d.mts.map +1 -1
  104. package/dist/v1/basics/promiseUtils.mjs +47 -12
  105. package/dist/v1/basics/text.cjs +0 -12
  106. package/dist/v1/basics/text.d.mts +0 -10
  107. package/dist/v1/basics/text.d.mts.map +1 -1
  108. package/dist/v1/basics/text.mjs +0 -10
  109. package/dist/v1/index.cjs +88 -3
  110. package/dist/v1/index.d.mts +31 -6
  111. package/dist/v1/index.d.mts.map +1 -1
  112. package/dist/v1/index.mjs +32 -7
  113. package/dist/v1/jsdoc/EventEmitter.cjs +4 -0
  114. package/dist/v1/jsdoc/EventEmitter.d.mts +33 -0
  115. package/dist/v1/jsdoc/EventEmitter.d.mts.map +1 -0
  116. package/dist/v1/jsdoc/EventEmitter.mjs +18 -0
  117. package/dist/v1/libs/array/TinyArrayComparator.cjs +240 -25
  118. package/dist/v1/libs/array/TinyArrayComparator.d.mts +130 -22
  119. package/dist/v1/libs/array/TinyArrayComparator.d.mts.map +1 -1
  120. package/dist/v1/libs/array/TinyArrayComparator.mjs +210 -24
  121. package/dist/v1/libs/fs/constants.cjs +74 -0
  122. package/dist/v1/libs/fs/constants.d.mts +22 -0
  123. package/dist/v1/libs/fs/constants.d.mts.map +1 -0
  124. package/dist/v1/libs/fs/constants.mjs +53 -0
  125. package/dist/v1/libs/fs/encoding.cjs +118 -0
  126. package/dist/v1/libs/fs/encoding.d.mts +50 -0
  127. package/dist/v1/libs/fs/encoding.d.mts.map +1 -0
  128. package/dist/v1/libs/fs/encoding.mjs +102 -0
  129. package/dist/v1/libs/fs/error.cjs +188 -0
  130. package/dist/v1/libs/fs/error.d.mts +105 -0
  131. package/dist/v1/libs/fs/error.d.mts.map +1 -0
  132. package/dist/v1/libs/fs/error.mjs +158 -0
  133. package/dist/v1/libs/fs/handle.cjs +121 -0
  134. package/dist/v1/libs/fs/handle.d.mts +56 -0
  135. package/dist/v1/libs/fs/handle.d.mts.map +1 -0
  136. package/dist/v1/libs/fs/handle.mjs +100 -0
  137. package/dist/v1/libs/fs/index.cjs +700 -0
  138. package/dist/v1/libs/fs/index.d.mts +377 -0
  139. package/dist/v1/libs/fs/index.d.mts.map +1 -0
  140. package/dist/v1/libs/fs/index.mjs +630 -0
  141. package/dist/v1/libs/fs/path.cjs +234 -0
  142. package/dist/v1/libs/fs/path.d.mts +176 -0
  143. package/dist/v1/libs/fs/path.d.mts.map +1 -0
  144. package/dist/v1/libs/fs/path.mjs +197 -0
  145. package/dist/v1/libs/fs/plugins/OPFS/StorageBucket.cjs +202 -0
  146. package/dist/v1/libs/fs/plugins/OPFS/StorageBucket.d.mts +121 -0
  147. package/dist/v1/libs/fs/plugins/OPFS/StorageBucket.d.mts.map +1 -0
  148. package/dist/v1/libs/fs/plugins/OPFS/StorageBucket.mjs +172 -0
  149. package/dist/v1/libs/fs/plugins/OPFS/index.cjs +334 -0
  150. package/dist/v1/libs/fs/plugins/OPFS/index.d.mts +98 -0
  151. package/dist/v1/libs/fs/plugins/OPFS/index.d.mts.map +1 -0
  152. package/dist/v1/libs/fs/plugins/OPFS/index.mjs +300 -0
  153. package/dist/v1/libs/fs/stats.cjs +245 -0
  154. package/dist/v1/libs/fs/stats.d.mts +226 -0
  155. package/dist/v1/libs/fs/stats.d.mts.map +1 -0
  156. package/dist/v1/libs/fs/stats.mjs +197 -0
  157. package/dist/v1/libs/html/events/TinyIframeEvents.cjs +10 -1
  158. package/dist/v1/libs/html/events/TinyIframeEvents.d.mts +9 -2
  159. package/dist/v1/libs/html/events/TinyIframeEvents.d.mts.map +1 -1
  160. package/dist/v1/libs/html/events/TinyIframeEvents.mjs +8 -1
  161. package/dist/v1/libs/html/events/TinyNewWinEvents.cjs +14 -3
  162. package/dist/v1/libs/html/events/TinyNewWinEvents.d.mts +21 -5
  163. package/dist/v1/libs/html/events/TinyNewWinEvents.d.mts.map +1 -1
  164. package/dist/v1/libs/html/events/TinyNewWinEvents.mjs +12 -3
  165. package/dist/v1/libs/html/scroll/TinySmartScroller.cjs +13 -1
  166. package/dist/v1/libs/html/scroll/TinySmartScroller.d.mts +29 -2
  167. package/dist/v1/libs/html/scroll/TinySmartScroller.d.mts.map +1 -1
  168. package/dist/v1/libs/html/scroll/TinySmartScroller.mjs +11 -1
  169. package/dist/v1/libs/math/TinyAdvancedRaffle.cjs +13 -1
  170. package/dist/v1/libs/math/TinyAdvancedRaffle.d.mts +32 -2
  171. package/dist/v1/libs/math/TinyAdvancedRaffle.d.mts.map +1 -1
  172. package/dist/v1/libs/math/TinyAdvancedRaffle.mjs +11 -1
  173. package/dist/v1/libs/math/TinyTimeout.cjs +0 -14
  174. package/dist/v1/libs/math/TinyTimeout.d.mts +0 -11
  175. package/dist/v1/libs/math/TinyTimeout.d.mts.map +1 -1
  176. package/dist/v1/libs/math/TinyTimeout.mjs +0 -13
  177. package/dist/v1/libs/media/TinyMediaPlayer/index.cjs +25 -1
  178. package/dist/v1/libs/media/TinyMediaPlayer/index.d.mts +35 -2
  179. package/dist/v1/libs/media/TinyMediaPlayer/index.d.mts.map +1 -1
  180. package/dist/v1/libs/media/TinyMediaPlayer/index.mjs +23 -1
  181. package/dist/v1/libs/media/TinyMediaPlayer.cjs +2 -2
  182. package/dist/v1/libs/media/TinyMediaPlayer.d.mts +2 -2
  183. package/dist/v1/libs/media/TinyMediaPlayer.d.mts.map +1 -1
  184. package/dist/v1/libs/media/TinyMediaPlayer.mjs +2 -2
  185. package/dist/v1/libs/media/TinyRadioFm.cjs +19 -1
  186. package/dist/v1/libs/media/TinyRadioFm.d.mts +78 -2
  187. package/dist/v1/libs/media/TinyRadioFm.d.mts.map +1 -1
  188. package/dist/v1/libs/media/TinyRadioFm.mjs +17 -1
  189. package/dist/v1/libs/plugin/TinyPlugin.cjs +1630 -0
  190. package/dist/v1/libs/plugin/TinyPlugin.d.mts +753 -0
  191. package/dist/v1/libs/plugin/TinyPlugin.d.mts.map +1 -0
  192. package/dist/v1/libs/plugin/TinyPlugin.mjs +1376 -0
  193. package/dist/v1/libs/plugin/TinyVersion.cjs +204 -0
  194. package/dist/v1/libs/plugin/TinyVersion.d.mts +70 -0
  195. package/dist/v1/libs/plugin/TinyVersion.d.mts.map +1 -0
  196. package/dist/v1/libs/plugin/TinyVersion.mjs +179 -0
  197. package/dist/v1/libs/router/TinyRouter.cjs +661 -0
  198. package/dist/v1/libs/router/TinyRouter.d.mts +320 -0
  199. package/dist/v1/libs/router/TinyRouter.d.mts.map +1 -0
  200. package/dist/v1/libs/router/TinyRouter.mjs +572 -0
  201. package/dist/v1/libs/storage/TinyLocalStorage.cjs +20 -1
  202. package/dist/v1/libs/storage/TinyLocalStorage.d.mts +64 -2
  203. package/dist/v1/libs/storage/TinyLocalStorage.d.mts.map +1 -1
  204. package/dist/v1/libs/storage/TinyLocalStorage.mjs +18 -1
  205. package/dist/v1/libs/storage/TinyMapCache.cjs +373 -0
  206. package/dist/v1/libs/storage/TinyMapCache.d.mts +274 -0
  207. package/dist/v1/libs/storage/TinyMapCache.d.mts.map +1 -0
  208. package/dist/v1/libs/storage/TinyMapCache.mjs +333 -0
  209. package/dist/v1/libs/storage/TinySetMapDatabase.cjs +1167 -0
  210. package/dist/v1/libs/storage/TinySetMapDatabase.d.mts +603 -0
  211. package/dist/v1/libs/storage/TinySetMapDatabase.d.mts.map +1 -0
  212. package/dist/v1/libs/storage/TinySetMapDatabase.mjs +1059 -0
  213. package/dist/v1/libs/sw/browser/TinyNotificationAdapter.cjs +126 -0
  214. package/dist/v1/libs/sw/browser/TinyNotificationAdapter.d.mts +132 -0
  215. package/dist/v1/libs/sw/browser/TinyNotificationAdapter.d.mts.map +1 -0
  216. package/dist/v1/libs/sw/browser/TinyNotificationAdapter.mjs +109 -0
  217. package/dist/v1/libs/sw/browser/TinyPushManager.cjs +310 -0
  218. package/dist/v1/libs/sw/browser/TinyPushManager.d.mts +168 -0
  219. package/dist/v1/libs/sw/browser/TinyPushManager.d.mts.map +1 -0
  220. package/dist/v1/libs/sw/browser/TinyPushManager.mjs +264 -0
  221. package/dist/v1/libs/sw/browser/TinyServiceWorker.cjs +1060 -0
  222. package/dist/v1/libs/sw/browser/TinyServiceWorker.d.mts +348 -0
  223. package/dist/v1/libs/sw/browser/TinyServiceWorker.d.mts.map +1 -0
  224. package/dist/v1/libs/sw/browser/TinyServiceWorker.mjs +933 -0
  225. package/dist/v1/libs/sw/browser/plugins/TabManager.cjs +315 -0
  226. package/dist/v1/libs/sw/browser/plugins/TabManager.d.mts +178 -0
  227. package/dist/v1/libs/sw/browser/plugins/TabManager.d.mts.map +1 -0
  228. package/dist/v1/libs/sw/browser/plugins/TabManager.mjs +274 -0
  229. package/dist/v1/libs/sw/browser/utils.cjs +28 -0
  230. package/dist/v1/libs/sw/browser/utils.d.mts +8 -0
  231. package/dist/v1/libs/sw/browser/utils.d.mts.map +1 -0
  232. package/dist/v1/libs/sw/browser/utils.mjs +21 -0
  233. package/dist/v1/libs/sw/service/TinyPushRouter.cjs +222 -0
  234. package/dist/v1/libs/sw/service/TinyPushRouter.d.mts +138 -0
  235. package/dist/v1/libs/sw/service/TinyPushRouter.d.mts.map +1 -0
  236. package/dist/v1/libs/sw/service/TinyPushRouter.mjs +201 -0
  237. package/dist/v1/libs/sw/service/TinyServiceWorkerEngine.cjs +3016 -0
  238. package/dist/v1/libs/sw/service/TinyServiceWorkerEngine.d.mts +993 -0
  239. package/dist/v1/libs/sw/service/TinyServiceWorkerEngine.d.mts.map +1 -0
  240. package/dist/v1/libs/sw/service/TinyServiceWorkerEngine.mjs +2558 -0
  241. package/dist/v1/libs/sw/service/plugins/GlobBypassPlugin.cjs +88 -0
  242. package/dist/v1/libs/sw/service/plugins/GlobBypassPlugin.d.mts +32 -0
  243. package/dist/v1/libs/sw/service/plugins/GlobBypassPlugin.d.mts.map +1 -0
  244. package/dist/v1/libs/sw/service/plugins/GlobBypassPlugin.mjs +69 -0
  245. package/dist/v1/libs/sw/service/plugins/GlobCachePlugin.cjs +112 -0
  246. package/dist/v1/libs/sw/service/plugins/GlobCachePlugin.d.mts +31 -0
  247. package/dist/v1/libs/sw/service/plugins/GlobCachePlugin.d.mts.map +1 -0
  248. package/dist/v1/libs/sw/service/plugins/GlobCachePlugin.mjs +91 -0
  249. package/dist/v1/libs/sw/service/plugins/Ping.cjs +32 -0
  250. package/dist/v1/libs/sw/service/plugins/Ping.d.mts +9 -0
  251. package/dist/v1/libs/sw/service/plugins/Ping.d.mts.map +1 -0
  252. package/dist/v1/libs/sw/service/plugins/Ping.mjs +25 -0
  253. package/dist/v1/libs/sw/service/plugins/TabManager.cjs +457 -0
  254. package/dist/v1/libs/sw/service/plugins/TabManager.d.mts +91 -0
  255. package/dist/v1/libs/sw/service/plugins/TabManager.d.mts.map +1 -0
  256. package/dist/v1/libs/sw/service/plugins/TabManager.mjs +372 -0
  257. package/dist/v1/libs/sw/service/plugins/ViteFileDetector.cjs +180 -0
  258. package/dist/v1/libs/sw/service/plugins/ViteFileDetector.d.mts +28 -0
  259. package/dist/v1/libs/sw/service/plugins/ViteFileDetector.d.mts.map +1 -0
  260. package/dist/v1/libs/sw/service/plugins/ViteFileDetector.mjs +148 -0
  261. package/dist/v1/libs/sw/service/shared/TinyPushPayload.cjs +199 -0
  262. package/dist/v1/libs/sw/service/shared/TinyPushPayload.d.mts +80 -0
  263. package/dist/v1/libs/sw/service/shared/TinyPushPayload.d.mts.map +1 -0
  264. package/dist/v1/libs/sw/service/shared/TinyPushPayload.mjs +174 -0
  265. package/dist/v1/libs/sw/utils.cjs +57 -0
  266. package/dist/v1/libs/sw/utils.d.mts +173 -0
  267. package/dist/v1/libs/sw/utils.d.mts.map +1 -0
  268. package/dist/v1/libs/sw/utils.mjs +50 -0
  269. package/dist/v1/libs/text/TinyI18/Browser-NON-DOM.cjs +57 -0
  270. package/dist/v1/libs/text/TinyI18/Browser-NON-DOM.d.mts +39 -0
  271. package/dist/v1/libs/text/TinyI18/Browser-NON-DOM.d.mts.map +1 -0
  272. package/dist/v1/libs/text/TinyI18/Browser-NON-DOM.mjs +48 -0
  273. package/dist/v1/libs/text/TinyI18/Browser.cjs +64 -0
  274. package/dist/v1/libs/text/TinyI18/Browser.d.mts +47 -0
  275. package/dist/v1/libs/text/TinyI18/Browser.d.mts.map +1 -0
  276. package/dist/v1/libs/text/TinyI18/Browser.mjs +57 -0
  277. package/dist/v1/libs/text/TinyI18/Node.cjs +49 -0
  278. package/dist/v1/libs/text/TinyI18/Node.d.mts +38 -0
  279. package/dist/v1/libs/text/TinyI18/Node.d.mts.map +1 -0
  280. package/dist/v1/libs/text/TinyI18/Node.mjs +43 -0
  281. package/dist/v1/libs/text/TinyI18/browser-utils.cjs +17 -0
  282. package/dist/v1/libs/text/TinyI18/browser-utils.d.mts +8 -0
  283. package/dist/v1/libs/text/TinyI18/browser-utils.d.mts.map +1 -0
  284. package/dist/v1/libs/text/TinyI18/browser-utils.mjs +13 -0
  285. package/dist/v1/libs/text/{TinyI18.cjs → TinyI18/index.cjs} +205 -104
  286. package/dist/v1/libs/text/{TinyI18.d.mts → TinyI18/index.d.mts} +141 -92
  287. package/dist/v1/libs/text/TinyI18/index.d.mts.map +1 -0
  288. package/dist/v1/libs/text/{TinyI18.mjs → TinyI18/index.mjs} +195 -101
  289. package/dist/v1/libs/tools/TinyBrowserMonitor.cjs +1088 -0
  290. package/dist/v1/libs/tools/TinyBrowserMonitor.d.mts +621 -0
  291. package/dist/v1/libs/tools/TinyBrowserMonitor.d.mts.map +1 -0
  292. package/dist/v1/libs/tools/TinyBrowserMonitor.mjs +940 -0
  293. package/dist/v1/libs/tools/TinyDebugger.cjs +180 -19
  294. package/dist/v1/libs/tools/TinyDebugger.d.mts +220 -24
  295. package/dist/v1/libs/tools/TinyDebugger.d.mts.map +1 -1
  296. package/dist/v1/libs/tools/TinyDebugger.mjs +161 -19
  297. package/dist/v1/libs/tools/TinyHtmlTagRegexBuilder.cjs +256 -0
  298. package/dist/v1/libs/tools/TinyHtmlTagRegexBuilder.d.mts +125 -0
  299. package/dist/v1/libs/tools/TinyHtmlTagRegexBuilder.d.mts.map +1 -0
  300. package/dist/v1/libs/tools/TinyHtmlTagRegexBuilder.mjs +223 -0
  301. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser-NON-DOM.cjs +23 -0
  302. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser-NON-DOM.d.mts +17 -0
  303. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser-NON-DOM.d.mts.map +1 -0
  304. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser-NON-DOM.mjs +19 -0
  305. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser.cjs +23 -0
  306. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser.d.mts +17 -0
  307. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser.d.mts.map +1 -0
  308. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser.mjs +19 -0
  309. package/dist/v1/libs/tools/TinyHttpResponseRegistry/EmptyRequestCodes.cjs +390 -0
  310. package/dist/v1/libs/tools/TinyHttpResponseRegistry/EmptyRequestCodes.d.mts +9 -0
  311. package/dist/v1/libs/tools/TinyHttpResponseRegistry/EmptyRequestCodes.d.mts.map +1 -0
  312. package/dist/v1/libs/tools/TinyHttpResponseRegistry/EmptyRequestCodes.mjs +387 -0
  313. package/dist/v1/libs/tools/TinyHttpResponseRegistry/JsDoc.cjs +2 -0
  314. package/dist/v1/libs/tools/TinyHttpResponseRegistry/JsDoc.d.mts +27 -0
  315. package/dist/v1/libs/tools/TinyHttpResponseRegistry/JsDoc.d.mts.map +1 -0
  316. package/dist/v1/libs/tools/TinyHttpResponseRegistry/JsDoc.mjs +12 -0
  317. package/dist/v1/libs/tools/TinyHttpResponseRegistry/MozillaRequestCodes/LICENSE +53 -0
  318. package/dist/v1/libs/tools/TinyHttpResponseRegistry/MozillaRequestCodes/index.cjs +405 -0
  319. package/dist/v1/libs/tools/TinyHttpResponseRegistry/MozillaRequestCodes/index.d.mts +34 -0
  320. package/dist/v1/libs/tools/TinyHttpResponseRegistry/MozillaRequestCodes/index.d.mts.map +1 -0
  321. package/dist/v1/libs/tools/TinyHttpResponseRegistry/MozillaRequestCodes/index.mjs +342 -0
  322. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Node.cjs +23 -0
  323. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Node.d.mts +17 -0
  324. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Node.d.mts.map +1 -0
  325. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Node.mjs +19 -0
  326. package/dist/v1/libs/tools/TinyHttpResponseRegistry/RequestCodes.cjs +327 -0
  327. package/dist/v1/libs/tools/TinyHttpResponseRegistry/RequestCodes.d.mts +9 -0
  328. package/dist/v1/libs/tools/TinyHttpResponseRegistry/RequestCodes.d.mts.map +1 -0
  329. package/dist/v1/libs/tools/TinyHttpResponseRegistry/RequestCodes.mjs +324 -0
  330. package/dist/v1/libs/tools/TinyHttpResponseRegistry/index.cjs +268 -0
  331. package/dist/v1/libs/tools/TinyHttpResponseRegistry/index.d.mts +107 -0
  332. package/dist/v1/libs/tools/TinyHttpResponseRegistry/index.d.mts.map +1 -0
  333. package/dist/v1/libs/tools/TinyHttpResponseRegistry/index.mjs +238 -0
  334. package/dist/v1/libs/tools/TinyPasswordValidator.cjs +491 -0
  335. package/dist/v1/libs/tools/TinyPasswordValidator.d.mts +246 -0
  336. package/dist/v1/libs/tools/TinyPasswordValidator.d.mts.map +1 -0
  337. package/dist/v1/libs/tools/TinyPasswordValidator.mjs +434 -0
  338. package/dist/v1/libs/tools/TinyPkgExportValidator.cjs +48 -0
  339. package/dist/v1/libs/tools/TinyPkgExportValidator.d.mts +14 -0
  340. package/dist/v1/libs/tools/TinyPkgExportValidator.d.mts.map +1 -1
  341. package/dist/v1/libs/tools/TinyPkgExportValidator.mjs +44 -0
  342. package/dist/v1/libs/tools/TinySiteMap.cjs +1029 -0
  343. package/dist/v1/libs/tools/TinySiteMap.d.mts +429 -0
  344. package/dist/v1/libs/tools/TinySiteMap.d.mts.map +1 -0
  345. package/dist/v1/libs/tools/TinySiteMap.mjs +910 -0
  346. package/dist/v1/libs/tools/TinySiteMapStream.cjs +121 -0
  347. package/dist/v1/libs/tools/TinySiteMapStream.d.mts +51 -0
  348. package/dist/v1/libs/tools/TinySiteMapStream.d.mts.map +1 -0
  349. package/dist/v1/libs/tools/TinySiteMapStream.mjs +85 -0
  350. package/dist/v1/libs/tools/TinyURLSecurityVerifier.cjs +444 -0
  351. package/dist/v1/libs/tools/TinyURLSecurityVerifier.d.mts +217 -0
  352. package/dist/v1/libs/tools/TinyURLSecurityVerifier.d.mts.map +1 -0
  353. package/dist/v1/libs/tools/TinyURLSecurityVerifier.mjs +394 -0
  354. package/dist/v1/libs/tools/TinyUriParser/BlueSky.cjs +613 -0
  355. package/dist/v1/libs/tools/TinyUriParser/BlueSky.d.mts +152 -0
  356. package/dist/v1/libs/tools/TinyUriParser/BlueSky.d.mts.map +1 -0
  357. package/dist/v1/libs/tools/TinyUriParser/BlueSky.mjs +527 -0
  358. package/dist/v1/libs/tools/TinyUriParser/Discord.cjs +1119 -0
  359. package/dist/v1/libs/tools/TinyUriParser/Discord.d.mts +306 -0
  360. package/dist/v1/libs/tools/TinyUriParser/Discord.d.mts.map +1 -0
  361. package/dist/v1/libs/tools/TinyUriParser/Discord.mjs +968 -0
  362. package/dist/v1/libs/tools/TinyUriParser/MatrixProtocol.cjs +469 -0
  363. package/dist/v1/libs/tools/TinyUriParser/MatrixProtocol.d.mts +80 -0
  364. package/dist/v1/libs/tools/TinyUriParser/MatrixProtocol.d.mts.map +1 -0
  365. package/dist/v1/libs/tools/TinyUriParser/MatrixProtocol.mjs +379 -0
  366. package/dist/v1/libs/tools/TinyUriParser.cjs +217 -0
  367. package/dist/v1/libs/tools/TinyUriParser.d.mts +109 -0
  368. package/dist/v1/libs/tools/TinyUriParser.d.mts.map +1 -0
  369. package/dist/v1/libs/tools/TinyUriParser.mjs +183 -0
  370. package/dist/v1/libs/utils/TinyCloner.cjs +466 -0
  371. package/dist/v1/libs/utils/TinyCloner.d.mts +221 -0
  372. package/dist/v1/libs/utils/TinyCloner.d.mts.map +1 -0
  373. package/dist/v1/libs/utils/TinyCloner.mjs +416 -0
  374. package/dist/v1/libs/utils/TinyPromiseQueue.cjs +1 -1
  375. package/dist/v1/libs/utils/TinyPromiseQueue.d.mts +2 -2
  376. package/dist/v1/libs/utils/TinyPromiseQueue.d.mts.map +1 -1
  377. package/dist/v1/libs/utils/TinyPromiseQueue.mjs +1 -1
  378. package/dist/v1/libs/utils/TinyThrottledApi.cjs +333 -0
  379. package/dist/v1/libs/utils/TinyThrottledApi.d.mts +163 -0
  380. package/dist/v1/libs/utils/TinyThrottledApi.d.mts.map +1 -0
  381. package/dist/v1/libs/utils/TinyThrottledApi.mjs +294 -0
  382. package/dist/v1/libs/worker/browser/TinyWebWorker.cjs +342 -0
  383. package/dist/v1/libs/worker/browser/TinyWebWorker.d.mts +97 -0
  384. package/dist/v1/libs/worker/browser/TinyWebWorker.d.mts.map +1 -0
  385. package/dist/v1/libs/worker/browser/TinyWebWorker.mjs +305 -0
  386. package/dist/v1/libs/worker/engine/TinyWebWorkerEngine.cjs +346 -0
  387. package/dist/v1/libs/worker/engine/TinyWebWorkerEngine.d.mts +127 -0
  388. package/dist/v1/libs/worker/engine/TinyWebWorkerEngine.d.mts.map +1 -0
  389. package/dist/v1/libs/worker/engine/TinyWebWorkerEngine.mjs +304 -0
  390. package/dist/v1/regexp/Email.cjs +185 -0
  391. package/dist/v1/regexp/Email.d.mts +73 -0
  392. package/dist/v1/regexp/Email.d.mts.map +1 -0
  393. package/dist/v1/regexp/Email.mjs +153 -0
  394. package/dist/v1/regexp/Glob.cjs +293 -0
  395. package/dist/v1/regexp/Glob.d.mts +45 -0
  396. package/dist/v1/regexp/Glob.d.mts.map +1 -0
  397. package/dist/v1/regexp/Glob.mjs +260 -0
  398. package/dist/v1/regexp/Ipv4.cjs +57 -0
  399. package/dist/v1/regexp/Ipv4.d.mts +29 -0
  400. package/dist/v1/regexp/Ipv4.d.mts.map +1 -0
  401. package/dist/v1/regexp/Ipv4.mjs +45 -0
  402. package/dist/v1/regexp/Ipv6.cjs +67 -0
  403. package/dist/v1/regexp/Ipv6.d.mts +29 -0
  404. package/dist/v1/regexp/Ipv6.d.mts.map +1 -0
  405. package/dist/v1/regexp/Ipv6.mjs +54 -0
  406. package/dist/v1/regexp/SegmentExtractor.cjs +145 -0
  407. package/dist/v1/regexp/SegmentExtractor.d.mts +91 -0
  408. package/dist/v1/regexp/SegmentExtractor.d.mts.map +1 -0
  409. package/dist/v1/regexp/SegmentExtractor.mjs +116 -0
  410. package/dist/v1/regexp/UrlDetector.cjs +125 -0
  411. package/dist/v1/regexp/UrlDetector.d.mts +67 -0
  412. package/dist/v1/regexp/UrlDetector.d.mts.map +1 -0
  413. package/dist/v1/regexp/UrlDetector.mjs +102 -0
  414. package/dist/v1/regexp/Username/index.cjs +233 -0
  415. package/dist/v1/regexp/Username/index.d.mts +77 -0
  416. package/dist/v1/regexp/Username/index.d.mts.map +1 -0
  417. package/dist/v1/regexp/Username/index.mjs +199 -0
  418. package/dist/v1/regexp/Username/jsDoc.cjs +2 -0
  419. package/dist/v1/regexp/Username/jsDoc.d.mts +57 -0
  420. package/dist/v1/regexp/Username/jsDoc.d.mts.map +1 -0
  421. package/dist/v1/regexp/Username/jsDoc.mjs +18 -0
  422. package/dist/v1/regexp/Username/templates/BlueSky.cjs +56 -0
  423. package/dist/v1/regexp/Username/templates/BlueSky.d.mts +35 -0
  424. package/dist/v1/regexp/Username/templates/BlueSky.d.mts.map +1 -0
  425. package/dist/v1/regexp/Username/templates/BlueSky.mjs +52 -0
  426. package/dist/v1/regexp/Username/templates/Discord.cjs +505 -0
  427. package/dist/v1/regexp/Username/templates/Discord.d.mts +209 -0
  428. package/dist/v1/regexp/Username/templates/Discord.d.mts.map +1 -0
  429. package/dist/v1/regexp/Username/templates/Discord.mjs +458 -0
  430. package/dist/v1/regexp/Username/templates/MatrixProtocol.cjs +143 -0
  431. package/dist/v1/regexp/Username/templates/MatrixProtocol.d.mts +70 -0
  432. package/dist/v1/regexp/Username/templates/MatrixProtocol.d.mts.map +1 -0
  433. package/dist/v1/regexp/Username/templates/MatrixProtocol.mjs +128 -0
  434. package/dist/v1/regexp/Username/templates/deprecated/Discord.cjs +24 -0
  435. package/dist/v1/regexp/Username/templates/deprecated/Discord.d.mts +17 -0
  436. package/dist/v1/regexp/Username/templates/deprecated/Discord.d.mts.map +1 -0
  437. package/dist/v1/regexp/Username/templates/deprecated/Discord.mjs +20 -0
  438. package/dist/v1/regexp/Username/templates/index.cjs +11 -0
  439. package/dist/v1/regexp/Username/templates/index.d.mts +5 -0
  440. package/dist/v1/regexp/Username/templates/index.d.mts.map +1 -0
  441. package/dist/v1/regexp/Username/templates/index.mjs +4 -0
  442. package/dist/v1/regexp/index.cjs +41 -0
  443. package/dist/v1/regexp/index.d.mts +9 -0
  444. package/dist/v1/regexp/index.d.mts.map +1 -0
  445. package/dist/v1/regexp/index.mjs +8 -0
  446. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Browser.cjs +64 -0
  447. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Browser.d.mts +11 -0
  448. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Browser.d.mts.map +1 -0
  449. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Browser.mjs +51 -0
  450. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/FileInput.cjs +66 -0
  451. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/FileInput.d.mts +11 -0
  452. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/FileInput.d.mts.map +1 -0
  453. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/FileInput.mjs +51 -0
  454. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Node.cjs +39 -0
  455. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Node.d.mts +11 -0
  456. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Node.d.mts.map +1 -0
  457. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Node.mjs +28 -0
  458. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Template.cjs +494 -0
  459. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Template.d.mts +142 -0
  460. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Template.d.mts.map +1 -0
  461. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Template.mjs +445 -0
  462. package/dist/v1/webTemplates/bootstrap/5.3/html/BootstrapDialogs.cjs +30 -4
  463. package/dist/v1/webTemplates/bootstrap/5.3/html/BootstrapDialogs.d.mts +5 -2
  464. package/dist/v1/webTemplates/bootstrap/5.3/html/BootstrapDialogs.d.mts.map +1 -1
  465. package/dist/v1/webTemplates/bootstrap/5.3/html/BootstrapDialogs.mjs +29 -5
  466. package/dist/v1/webTemplates/media/MediaValidator/v1/Browser/index.cjs +135 -0
  467. package/dist/v1/webTemplates/media/MediaValidator/v1/Browser/index.d.mts +83 -0
  468. package/dist/v1/webTemplates/media/MediaValidator/v1/Browser/index.d.mts.map +1 -0
  469. package/dist/v1/webTemplates/media/MediaValidator/v1/Browser/index.mjs +120 -0
  470. package/dist/v1/webTemplates/media/MediaValidator/v1/Node/index.cjs +127 -0
  471. package/dist/v1/webTemplates/media/MediaValidator/v1/Node/index.d.mts +95 -0
  472. package/dist/v1/webTemplates/media/MediaValidator/v1/Node/index.d.mts.map +1 -0
  473. package/dist/v1/webTemplates/media/MediaValidator/v1/Node/index.mjs +109 -0
  474. package/dist/v1/webTemplates/multiformats/14.0/IPFSHasher/index.cjs +83 -0
  475. package/dist/v1/webTemplates/multiformats/14.0/IPFSHasher/index.d.mts +46 -0
  476. package/dist/v1/webTemplates/multiformats/14.0/IPFSHasher/index.d.mts.map +1 -0
  477. package/dist/v1/webTemplates/multiformats/14.0/IPFSHasher/index.mjs +71 -0
  478. package/dist/v1/webTemplates/vite/7.3/plugins/TinyVitePwaPlugin.cjs +493 -0
  479. package/dist/v1/webTemplates/vite/7.3/plugins/TinyVitePwaPlugin.d.mts +67 -0
  480. package/dist/v1/webTemplates/vite/7.3/plugins/TinyVitePwaPlugin.d.mts.map +1 -0
  481. package/dist/v1/webTemplates/vite/7.3/plugins/TinyVitePwaPlugin.mjs +399 -0
  482. package/dist/v1/webTemplates/vite/7.3/plugins/githubUtils.cjs +35 -0
  483. package/dist/v1/webTemplates/vite/7.3/plugins/githubUtils.d.mts +6 -0
  484. package/dist/v1/webTemplates/vite/7.3/plugins/githubUtils.d.mts.map +1 -0
  485. package/dist/v1/webTemplates/vite/7.3/plugins/githubUtils.mjs +29 -0
  486. package/docs/info/RegExp.md +74 -0
  487. package/docs/v1/Exports.md +101 -0
  488. package/docs/v1/README.md +113 -15
  489. package/docs/v1/basics/asyncReplace.md +2 -0
  490. package/docs/v1/basics/browserDetector.md +28 -11
  491. package/docs/v1/basics/crypto.md +85 -0
  492. package/docs/v1/basics/deprecated/html.md +2 -0
  493. package/docs/v1/basics/deprecated/objFilter.md +2 -0
  494. package/docs/v1/basics/html.md +2 -0
  495. package/docs/v1/basics/objChecker.md +55 -0
  496. package/docs/v1/basics/objFilter.md +57 -86
  497. package/docs/v1/basics/promiseUtils.md +12 -3
  498. package/docs/v1/basics/text.md +0 -1
  499. package/docs/v1/libs/array/TinyArrayComparator.md +50 -39
  500. package/docs/v1/libs/fs/TinyFS.md +752 -0
  501. package/docs/v1/libs/fs/TinyOPFSFileSystem.md +495 -0
  502. package/docs/v1/libs/fs/TinyStorageBucketFileSystem.md +407 -0
  503. package/docs/v1/libs/plugin/TinyPlugin.md +441 -0
  504. package/docs/v1/libs/plugin/TinyVersion.md +145 -0
  505. package/docs/v1/libs/router/TinyRouter.md +216 -0
  506. package/docs/v1/libs/storage/TinyMapCache.md +219 -0
  507. package/docs/v1/libs/storage/TinySetMapDatabase.md +478 -0
  508. package/docs/v1/libs/sw/browser/TinyNotificationAdapter.md +280 -0
  509. package/docs/v1/libs/sw/browser/TinyPushManager.md +782 -0
  510. package/docs/v1/libs/sw/browser/TinyServiceWorker.md +365 -0
  511. package/docs/v1/libs/sw/browser/plugins/TabManager.md +133 -0
  512. package/docs/v1/libs/sw/service/TinyPushRouter.md +314 -0
  513. package/docs/v1/libs/sw/service/TinyServiceWorkerEngine.md +748 -0
  514. package/docs/v1/libs/sw/service/plugins/GlobBypassPlugin.md +229 -0
  515. package/docs/v1/libs/sw/service/plugins/GlobCachePlugin.md +91 -0
  516. package/docs/v1/libs/sw/service/plugins/Ping.md +36 -0
  517. package/docs/v1/libs/sw/service/plugins/TabManager.md +64 -0
  518. package/docs/v1/libs/sw/service/plugins/ViteFileDetector.md +92 -0
  519. package/docs/v1/libs/sw/service/shared/TinyPushPayload.md +316 -0
  520. package/docs/v1/libs/text/TinyI18.md +80 -56
  521. package/docs/v1/libs/tools/TinyBrowserMonitor.md +170 -0
  522. package/docs/v1/libs/tools/TinyDebugger.md +117 -1
  523. package/docs/v1/libs/tools/TinyHtmlTagRegexBuilder.md +141 -0
  524. package/docs/v1/libs/tools/TinyHttpResponseRegistry.md +129 -0
  525. package/docs/v1/libs/tools/TinyPasswordValidator.md +153 -0
  526. package/docs/v1/libs/tools/TinyPkgExportValidator.md +45 -1
  527. package/docs/v1/libs/tools/TinySiteMap.md +134 -0
  528. package/docs/v1/libs/tools/TinySiteMapStream.md +97 -0
  529. package/docs/v1/libs/tools/TinyURLSecurityVerifier.md +146 -0
  530. package/docs/v1/libs/tools/TinyUriParser/Discord.md +374 -0
  531. package/docs/v1/libs/tools/TinyUriParser/MatrixProtocol.md +54 -0
  532. package/docs/v1/libs/tools/TinyUriParser.md +128 -0
  533. package/docs/v1/libs/utils/TinyCloner.md +126 -0
  534. package/docs/v1/libs/utils/TinyPromiseQueue.md +1 -1
  535. package/docs/v1/libs/utils/TinyThrottledApi.md +219 -0
  536. package/docs/v1/libs/worker/browser/TinyWebWorker.md +331 -0
  537. package/docs/v1/libs/worker/engine/TinyWebWorkerEngine.md +137 -0
  538. package/docs/v1/regexp/Email.md +127 -0
  539. package/docs/v1/regexp/Glob.md +155 -0
  540. package/docs/v1/regexp/IPv4.md +103 -0
  541. package/docs/v1/regexp/IPv6.md +122 -0
  542. package/docs/v1/regexp/SegmentExtractor.md +120 -0
  543. package/docs/v1/regexp/UrlDetector.md +117 -0
  544. package/docs/v1/regexp/Username/Base.md +131 -0
  545. package/docs/v1/regexp/Username/Discord.md +267 -0
  546. package/docs/v1/regexp/Username/MatrixProtocol.md +131 -0
  547. package/docs/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters.md +565 -0
  548. package/docs/v1/webTemplates/bootstrap/5.3/html/BootstrapDialogs.md +19 -7
  549. package/docs/v1/webTemplates/media/MediaValidator/v1/Browser.md +123 -0
  550. package/docs/v1/webTemplates/media/MediaValidator/v1/Node.md +136 -0
  551. package/docs/v1/webTemplates/multiformats/14.0/IPFSHasher.md +310 -0
  552. package/docs/v1/webTemplates/vite/7.3/plugins/TinyVitePwaPlugin.md +131 -0
  553. package/docs/v1/webTemplates/vite/7.3/plugins/githubUtils.md +50 -0
  554. package/package.json +340 -22
  555. package/types/EventEmitter.d.ts +48 -0
  556. package/dist/v1/libs/text/TinyI18.d.mts.map +0 -1
package/README.md CHANGED
@@ -117,7 +117,7 @@ This project is licensed under the LGPL-3.0 License - see the [LICENSE](LICENSE)
117
117
 
118
118
  This project was inspired by the need for lightweight, reusable code that can be used across many different kinds of applications. Contributions and suggestions are always appreciated!
119
119
 
120
- > 🧠 **Note**: This documentation was written by [ChatGPT](https://openai.com/chatgpt) and [Gemini](https://gemini.google.com), AI assistants developed by OpenAI and Google, based on the project structure and descriptions provided by the repository author.
120
+ > 🧠 **Note**: This documentation was written by [ChatGPT](https://openai.com/chatgpt), [Gemini](https://gemini.google.com), and [DeepSeek v4.1 Flash](https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash), based on the project structure and descriptions provided by the repository author.
121
121
  > If you find any inaccuracies or need improvements, feel free to contribute or open an issue!
122
122
 
123
123
  ---
@@ -0,0 +1,24 @@
1
+ ## ✨ New Features
2
+
3
+ * **🎭 BootstrapDialogs Module**
4
+ * Introduced a asynchronous replacement for native browser dialogs (`alert`, `confirm`, `prompt`).
5
+ * Fully integrated with **Bootstrap 5.3 Modals**.
6
+ * Supports a clean `async/await` workflow, eliminating the blocking nature of native browser popups.
7
+ * Highly customizable via `CustomElementConfig` (headers, footers, buttons, and more).
8
+ * Includes a built-in global loading state for background operations.
9
+
10
+ ## 📂 Structure & Organization
11
+
12
+ * **🗺️ New `webTemplates/` Directory**
13
+ * Created a dedicated space for UI-focused templates to separate them from core logic modules.
14
+ * **📖 Documentation Updates**
15
+ * Updated `README.md` with the new directory hierarchy.
16
+ * Updated `Exports.md` to include all new entry points for easy developer discovery.
17
+
18
+ ## 🛠️ Technical Updates
19
+
20
+ * **📦 Package Exports Expansion**
21
+ * Added official ESM and CJS entry points for `BootstrapDialogs`.
22
+ * Included essential Bootstrap 5.3 SCSS utility:
23
+ * `Placeholder-Colors-Fix.scss` 🎨
24
+ * `Spacing-Plus.scss` 📏
@@ -0,0 +1,58 @@
1
+ ## Release Notes: Feature Expansion Update 🚀
2
+
3
+ Following our previous heavy maintenance update, which focused on stabilizing and repairing core module structures, we are excited to shift our focus toward delivering a massive wave of new features and enhancements!
4
+
5
+ ### 🚀 Feature Updates
6
+
7
+ * **`TinyArrayComparator`**: Now features the ability to detect edited items within an array! To use this feature, simply specify the `idKey` option in the constructor to define the unique identifier for each element. 🔍
8
+
9
+ ### 🚀 New Features
10
+ * **`TinyVersion`**: A lightweight utility for parsing semantic versioning strings and performing precise version comparisons. 🏷️
11
+ * **`TinyHtmlTagRegexBuilder`**: A powerful utility for constructing highly configurable and precise Regular Expressions to parse HTML tags and their specific attributes. 🏗️
12
+ * **`TinyRouter`**: A brand-new, pure JavaScript client-side routing system designed specifically for browser execution. 🗺️
13
+ * **`TinyMapCache`**: A new utility for managing temporary data using TTL (Time-To-Live) logic. ⏱️
14
+ * **`TinySetMapDatabase`**, **`TinySetDb`**, and **`TinyMapDb`**: A complete persistence layer for IndexedDB. `TinySetDb` is a persistent `Set` with full set algebra (`union`, `intersection`, `difference`, and more), `TinyMapDb` is a persistent key/value `Map`, and `TinySetMapDatabase` groups several tables into a single versioned database with ordered schema migrations. 🗄️
15
+ * **`TinyServiceWorker` and `TinyServiceWorkerEngine`**: A dedicated script to simplify the implementation of Service Workers in your projects. 🛠️
16
+ * **`TinyWebWorker` and `TinyWebWorkerEngine`**: A dedicated script to simplify the implementation of Web Workers in your projects. 🛠️
17
+ * **`TinyBrowserMonitor`**: A comprehensive utility for monitoring network connectivity, connection quality, and resource performance metrics. 🌐
18
+ * **`TinyCloner`**: A new class specialized in managing deep object cloning instances. 🧬
19
+ * **`TinySitemap`** and **`TinySiteMapStream`**: A new class added for sitemap management. 🗺️
20
+ * **`MediaValidator`**: A new utility suite for validating media file types (Video, Image, or Audio), featuring dedicated implementations for both Node.js and Browser environments. 🎞️
21
+ * **`TinyHttpResponseRegistry`**: Provides quick and easy access to HTTP error message information. ⚠️
22
+ * **`TinyURLSecurityVerifier`**: A tool to assist developers with URL security checks, featuring customizable verification rules and the ability to define insecure protocols. 🛡️
23
+ * **`TinyPasswordValidator`**: Your new dedicated helper for robust password validation. 🔐
24
+ * **`TinyPkgExportValidator.execCommandTester`**: A new function that facilitates the creation of quick code-testing commands. 🧪
25
+ * **`TinyUriParser`**: A versatile utility designed to parse various URI formats into structured objects and reconstruct them back into strings. 🧩
26
+ * **`Regex Collection`**: Added a comprehensive collection of Regex patterns for IPv4, IPv6, URLs, Glob, and login data. 🔍
27
+ * **`TinyThrottledApi`**: A utility for managing asynchronous requests with concurrency limits and optional rate limiting. ⏳
28
+ * **`TinyFSCore`**: A dependency-free, `node:fs/promises`-compatible file system core. It is an abstract base class that ships with a working in-memory side table for permissions, ownership, and timestamps, so a backend only has to implement where the bytes live. 🗄️
29
+ * **`TinyOPFSFileSystem`**: An Origin Private File System backend for `TinyFSCore`, bringing a real, persistent, sandboxed file system to the browser. It maps the full API onto OPFS and works in both the main thread and Web Workers. 🗂️
30
+ * **`TinyStorageBucketFileSystem`**: A `TinyOPFSFileSystem` backend scoped to a single Storage Bucket. It gives you multiple, browser-enforced, isolated file systems per origin — ideal for multi-account apps, workspaces, and test suites. 🪣
31
+ * **`IPFSHasher`**: A utility class to generate IPFS Content Identifiers (CIDs) locally, supporting both `v0` and `v1` CID versions. 🧬
32
+ * **`ProcessSolidFilters`**: A new `ag-psd` web template that extracts solid colors from a PSD by matching layers against configurable filters, returning the reconstructed image, per-filter separated images, pixel statistics, and vector data. Ships with dedicated Node.js, Browser, and File Input entry points. 🎨
33
+
34
+ ### 🛠️ Improvements & Refactors
35
+ * **`TinyDebugger`**: Now supports optional `logSubId` and `toConsole`.
36
+ * **`BootstrapDialogs.showLoading`**: Now supports custom theme configuration. 🎨
37
+ * **`createSingletonTask`**: Enhanced with new monitoring configurations, allowing you to define whether the promise reset should be automatic or triggered manually. 🔄
38
+ * **`objChecker`**:
39
+ * Added `isClass`, `isClassInstance`, and `isAnyClassInstance` to improve the class detector stuff.
40
+ * **`objType`**:
41
+ * Added native support for the `URL` type. 🔗
42
+ * Added `getObjTypeOrder` to improve type management. 🔢
43
+ * **`browserDetector`**:
44
+ * Added the `isBrowser` and `isNode` utility. 🌐
45
+ * Browser detection scripts now include safety checks for Node.js environments to prevent accidental execution outside the browser. 🛡️
46
+ * **`TinyI18`**: Improved jsDoc and added a new `acceptNullResults` option. 🌍
47
+ * **Renaming**: `getCheckObj` has been renamed to `getObjTypeRegistry` for better semantic clarity. 🏷️
48
+
49
+ ### 🐛 Fixes & Documentation
50
+ * **`TinyMediaPlayer`**: Fixed jsDoc on line 42 (added the missing `Partial` type). 📝
51
+ * **Typed EventEmitter jsDoc**: Applied the `ICustomEventEmitter` typedef across every `EventEmitter`-based class (`TinyMapCache`, `TinyThrottledApi`, `TinyAdvancedRaffle`, `TinyDebugger`, `TinyLocalStorage`, `TinyRadioFm`, `TinyBrowserMonitor`, `BaseMediaAdapter`, `TinyIframeEvents`, `TinyNewWinEvents`, `TinySmartScroller`, `TinyServiceWorker`, and `TinyMediaPlayer`), enabling autocomplete and type checking for event names and `emit` arguments. 🔤
52
+
53
+ ### 🗑️ Deprecations & Removals
54
+ * Removed deprecated items: `diffStrings`, `getCheckObj`, and `static TinyTimeout.waitForTrue`.
55
+
56
+ ### 📦 Ecosystem & Tools
57
+ * **Vite Plugin**: Added a new plugin to facilitate Service Worker installation within Vite projects. ⚡
58
+ * **GitHub Pages Support**: Added a new storage tool specifically optimized for Vite deployment on GitHub Pages. 🚀
@@ -0,0 +1,11 @@
1
+ ## 🧪 Tests & 🛠️ Build Fixes
2
+
3
+ ### 🧪 Tests
4
+
5
+ * **New Test Files**: The `test/` folder now ships with a brand-new set of test files covering several modules.
6
+ * This is still a work in progress and will keep evolving over the next releases.
7
+
8
+ ### 🐛 Fixes
9
+
10
+ * **Builder**: Fixed the build process so the `dist` folder no longer accidentally includes a `node_modules` folder. 🧹
11
+ * The published output is now clean and only contains what it is supposed to. ✅
@@ -1 +1 @@
1
- (()=>{"use strict";const e={d:(r,t)=>{if(Array.isArray(t))for(var s=0;s<t.length;){var o=t[s++],l=t[s++];e.o(r,o)?0===l&&s++:0===l?Object.defineProperty(r,o,{enumerable:!0,value:t[s++]}):Object.defineProperty(r,o,{enumerable:!0,get:l})}else for(var o in t)e.o(t,o)&&!e.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:t[o]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r)};let r={};e.d(r,{ColorSafeStringify:()=>s});class t{#e;static#r={default:{reset:"",key:"",string:"",string_url:"",string_bool:"",string_number:"",number:"",boolean:"",null:"",special:"",func:""},solarized:{reset:"",key:"",string:"",string_url:"",string_bool:"",string_number:"",number:"",boolean:"",null:"",special:"",func:""},monokai:{reset:"",key:"",string:"",string_url:"",string_bool:"",string_number:"",number:"",boolean:"",null:"",special:"",func:""}};constructor(e={}){this.#e={...t.#r.default,...e}}#t(e,r){const t=[];e=(e=(e=e.replace(/(?<!")\b(-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b(?!")/g,`${r.number}$1${r.reset}`)).replace(/"([^"]+)":/g,(e,r)=>{const s=`___KEY${t.length}___`;return t.push({marker:s,key:r}),`${s}:`})).replace(/"(?:\\.|[^"\\])*?"/g,e=>{const t=e.slice(1,-1);return/^(https?|ftp):\/\/[^\s]+$/i.test(t)?`${r.string_url}${e}${r.reset}`:/^(true|false|null)$/.test(t)?`${r.string_bool}${e}${r.reset}`:/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/.test(t)?`${r.string_number}${e}${r.reset}`:`${r.string}${e}${r.reset}`});for(const{marker:s,key:o}of t){const t=new RegExp(s,"g");e=e.replace(t,`${r.key}"${o}"${r.reset}`)}return(e=(e=(e=(e=e.replace(/(?<!")\b(true|false)\b(?!")/g,`${r.boolean}$1${r.reset}`)).replace(/(?<!")\bnull\b(?!")/g,`${r.null}null${r.reset}`)).replace(/\[Circular\]/g,`${r.special}[Circular]${r.reset}`)).replace(/\[undefined\]/g,`${r.special}[undefined]${r.reset}`)).replace(/"function.*?[^\\]"/gs,`${r.func}$&${r.reset}`)}colorize(e,r={}){const t={...this.#e,...r};return this.#t(e,t)}getColors(){return{...this.#e}}updateColors(e){Object.assign(this.#e,e)}resetColors(){this.#e={...t.#r.default}}loadColorPreset(e){const r=t.#r[e];if(!r)throw new Error(`Preset "${e}" not found.`);this.#e={...r}}saveColorPreset(e,r){t.#r[e]={...r}}getAvailablePresets(){return Object.keys(t.#r)}}const s=t;window.ColorSafeStringify=r.ColorSafeStringify})();
1
+ (()=>{"use strict";const e={d:(r,t)=>{for(var s in t)e.o(t,s)&&!e.o(r,s)&&Object.defineProperty(r,s,{enumerable:!0,get:t[s]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r)};let r={};e.d(r,{ColorSafeStringify:()=>s});class t{#e;static#r={default:{reset:"",key:"",string:"",string_url:"",string_bool:"",string_number:"",number:"",boolean:"",null:"",special:"",func:""},solarized:{reset:"",key:"",string:"",string_url:"",string_bool:"",string_number:"",number:"",boolean:"",null:"",special:"",func:""},monokai:{reset:"",key:"",string:"",string_url:"",string_bool:"",string_number:"",number:"",boolean:"",null:"",special:"",func:""}};constructor(e={}){this.#e={...t.#r.default,...e}}#t(e,r){const t=[];e=(e=(e=e.replace(/(?<!")\b(-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b(?!")/g,`${r.number}$1${r.reset}`)).replace(/"([^"]+)":/g,(e,r)=>{const s=`___KEY${t.length}___`;return t.push({marker:s,key:r}),`${s}:`})).replace(/"(?:\\.|[^"\\])*?"/g,e=>{const t=e.slice(1,-1);return/^(https?|ftp):\/\/[^\s]+$/i.test(t)?`${r.string_url}${e}${r.reset}`:/^(true|false|null)$/.test(t)?`${r.string_bool}${e}${r.reset}`:/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/.test(t)?`${r.string_number}${e}${r.reset}`:`${r.string}${e}${r.reset}`});for(const{marker:s,key:o}of t){const t=new RegExp(s,"g");e=e.replace(t,`${r.key}"${o}"${r.reset}`)}return(e=(e=(e=(e=e.replace(/(?<!")\b(true|false)\b(?!")/g,`${r.boolean}$1${r.reset}`)).replace(/(?<!")\bnull\b(?!")/g,`${r.null}null${r.reset}`)).replace(/\[Circular\]/g,`${r.special}[Circular]${r.reset}`)).replace(/\[undefined\]/g,`${r.special}[undefined]${r.reset}`)).replace(/"function.*?[^\\]"/gs,`${r.func}$&${r.reset}`)}colorize(e,r={}){const t={...this.#e,...r};return this.#t(e,t)}getColors(){return{...this.#e}}updateColors(e){Object.assign(this.#e,e)}resetColors(){this.#e={...t.#r.default}}loadColorPreset(e){const r=t.#r[e];if(!r)throw new Error(`Preset "${e}" not found.`);this.#e={...r}}saveColorPreset(e,r){t.#r[e]={...r}}getAvailablePresets(){return Object.keys(t.#r)}}const s=t;window.ColorSafeStringify=r.ColorSafeStringify})();
@@ -1 +1 @@
1
- (()=>{"use strict";var e={159(e,t,r){r.d(t,{TinyAdvancedRaffle:()=>n});var i=r.cjs(function(e,t){var r,i="object"==typeof Reflect?Reflect:null,s=i&&"function"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function n(){n.init.call(this)}e.exports=n,e.exports.once=function(e,t){return new Promise(function(r,i){function s(r){e.removeListener(t,o),i(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",s),r([].slice.call(arguments))}c(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&c(e,"error",t,{once:!0})}(e,s)})},n.EventEmitter=n,n.prototype._events=void 0,n.prototype._eventsCount=0,n.prototype._maxListeners=void 0;var a=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function f(e){return void 0===e._maxListeners?n.defaultMaxListeners:e._maxListeners}function h(e,t,r,i){var s,o,n,a;if(u(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),n=o[t]),void 0===n)n=o[t]=r,++e._eventsCount;else if("function"==typeof n?n=o[t]=i?[r,n]:[n,r]:i?n.unshift(r):n.push(r),(s=f(e))>0&&n.length>s&&!n.warned){n.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+n.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=e,h.type=t,h.count=n.length,a=h,console&&console.warn&&console.warn(a)}return e}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function y(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},s=p.bind(i);return s.listener=r,i.wrapFn=s,s}function m(e,t,r){var i=e._events;if(void 0===i)return[];var s=i[t];return void 0===s?[]:"function"==typeof s?r?[s.listener||s]:[s]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(s):l(s,s.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function l(e,t){for(var r=new Array(t),i=0;i<t;++i)r[i]=e[i];return r}function c(e,t,r,i){if("function"==typeof e.on)i.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function s(o){i.once&&e.removeEventListener(t,s),r(o)})}}Object.defineProperty(n,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),n.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},n.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},n.prototype.getMaxListeners=function(){return f(this)},n.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var n;if(t.length>0&&(n=t[0]),n instanceof Error)throw n;var a=new Error("Unhandled error."+(n?" ("+n.message+")":""));throw a.context=n,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)s(u,this,t);else{var f=u.length,h=l(u,f);for(r=0;r<f;++r)s(h[r],this,t)}return!0},n.prototype.addListener=function(e,t){return h(this,e,t,!1)},n.prototype.on=n.prototype.addListener,n.prototype.prependListener=function(e,t){return h(this,e,t,!0)},n.prototype.once=function(e,t){return u(t),this.on(e,y(this,e,t)),this},n.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,y(this,e,t)),this},n.prototype.removeListener=function(e,t){var r,i,s,o,n;if(u(t),void 0===(i=this._events))return this;if(void 0===(r=i[e]))return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(s=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){n=r[o].listener,s=o;break}if(s<0)return this;0===s?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,s),1===r.length&&(i[e]=r[0]),void 0!==i.removeListener&&this.emit("removeListener",e,n||t)}return this},n.prototype.off=n.prototype.removeListener,n.prototype.removeAllListeners=function(e){var t,r,i;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var s,o=Object.keys(r);for(i=0;i<o.length;++i)"removeListener"!==(s=o[i])&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},n.prototype.listeners=function(e){return m(this,e,!0)},n.prototype.rawListeners=function(e){return m(this,e,!1)},n.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},n.prototype.listenerCount=d,n.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}});const s=e=>{if(e)throw new Error("This TinyAdvancedRaffle instance has been destroyed and can no longer be used.")};class o extends i.EventEmitter{#e=!1;#t;#r;#i=[];#s=[];#o=[];#n=new Map;#a=new Set;#u=new Map;#f;#h=new Map;#p=new Map;get isDestroyed(){return this.#e}get freq(){return s(this.#e),Object.fromEntries(this.#p)}get size(){return s(this.#e),this.#h.size}get normalization(){return s(this.#e),this.#t}set normalization(e){if(s(this.#e),"string"!=typeof e||!e.trim())throw new TypeError("normalization must be a non-empty string (e.g., 'relative', 'softmax').");this.#t=e}get seed(){return s(this.#e),this.#r}set seed(e){if(s(this.#e),null!==e&&("number"!=typeof e||!Number.isFinite(e)))throw new TypeError("seed must be a finite number or null.");this.#r=e,null!==e&&(this.#f=this._makeSeededRng(e))}get globalModifiers(){return s(this.#e),[...this.#i]}set globalModifiers(e){if(s(this.#e),!Array.isArray(e)||!e.every(e=>"function"==typeof e))throw new TypeError("globalModifiers must be an array of functions (WeightsCallback).");this.#i=e}get temporaryModifiers(){return s(this.#e),[...this.#s]}set temporaryModifiers(e){if(s(this.#e),!Array.isArray(e)||!e.every(e=>e&&"function"==typeof e.fn&&Number.isInteger(e.uses)&&e.uses>0))throw new TypeError("temporaryModifiers must be an array of objects { fn: function, uses: positive integer }.");this.#s=e}get conditionalRules(){return s(this.#e),[...this.#o]}set conditionalRules(e){if(s(this.#e),!Array.isArray(e)||!e.every(e=>"function"==typeof e))throw new TypeError("conditionalRules must be an array of functions (WeightsCallback).");this.#o=e}get pitySystems(){return s(this.#e),Object.fromEntries(this.#n)}set pitySystems(e){if(s(this.#e),!(e instanceof Map&&[...e.values()].every(e=>e&&"number"==typeof e.threshold&&"number"==typeof e.increment&&"number"==typeof e.cap&&"number"==typeof e.counter&&"number"==typeof e.currentAdd)))throw new TypeError("pitySystems must be a Map<string, Pity> with all numeric fields.");this.#n=e}get exclusions(){return s(this.#e),Array.from(this.#a)}set exclusions(e){if(s(this.#e),!(e instanceof Set&&[...e].every(e=>"string"==typeof e)))throw new TypeError("exclusions must be a Set<string>.");this.#a=e}get groups(){s(this.#e);const e={};return this.#u.forEach((t,r)=>e[r]=Array.from(t)),e}set groups(e){if(s(this.#e),!(e instanceof Map&&[...e.values()].every(e=>e instanceof Set&&[...e].every(e=>"string"==typeof e))))throw new TypeError("groups must be a Map<string, Set<string>>.");this.#u=e}get rng(){return s(this.#e),this.#f}set rng(e){if(s(this.#e),"function"!=typeof e||"number"!=typeof e())throw new TypeError("rng must be a function returning a number (RngGenerator).");this.#f=e}get items(){s(this.#e);const e={};return this.#h.forEach((t,r)=>{e[r]={...t,groups:Array.from(t.groups)}}),e}set items(e){if(s(this.#e),!(e instanceof Map&&[...e.values()].every(e=>e&&"string"==typeof e.id&&"string"==typeof e.label&&"number"==typeof e.baseWeight&&e.groups instanceof Set&&"boolean"==typeof e.locked&&"object"==typeof e.meta)))throw new TypeError("items must be a Map<string, ItemData> with valid item structures.");this.clearList(),this.#h=e}constructor(e={}){super();const{rng:t=null,seed:r=null,normalization:i="relative"}=e;this.#t=i,this.#r=r,"function"==typeof t?this.#f=t:null!==this.#r?this.#f=this._makeSeededRng(this.#r):this.#f=Math.random,this.#r=r??null}hasItem(e){if(s(this.#e),"string"!=typeof e)throw new TypeError("itemId must be a string");return this.#h.has(e)}addItem(e,t={}){if(s(this.#e),"string"!=typeof e||!e.trim())throw new TypeError("id must be a non-empty string");if("object"!=typeof t||null===t)throw new TypeError("opts must be an object");let{weight:r=1,label:i=e,meta:o={},groups:n=[]}=t;if("number"!=typeof r||!Number.isFinite(r)||r<0)throw new TypeError("weight must be a non-negative number");if("string"!=typeof i)throw new TypeError("label must be a string");if("object"!=typeof o||null===o)throw new TypeError("meta must be an object");if(!(Array.isArray(n)||n instanceof Set))throw new TypeError("groups must be an array or a Set of strings");n=Array.isArray(n)?n:[...n];for(const e of n)if("string"!=typeof e)throw new TypeError("groups must contain only strings");const a={id:e,label:i,baseWeight:Math.max(0,Number(r)||0),meta:{...o},groups:new Set(n),locked:!1};this.#h.set(e,a);for(const t of n)this._ensureGroup(t).add(e);return this.emit("itemAdded",a),a}removeItem(e){if(s(this.#e),"string"!=typeof e||!e.trim())throw new TypeError("id must be a non-empty string");const t=this.#h.get(e);if(!t)return!1;for(const r of t.groups){const t=this.#u.get(r);t&&t.delete(e)}return this.#h.delete(e),this.emit("itemRemoved",e),this.resetFreq(e),this.resetPity(e),!0}setBaseWeight(e,t){if(s(this.#e),"string"!=typeof e||!e.trim())throw new TypeError("id must be a non-empty string");if("number"!=typeof t||!Number.isFinite(t)||t<0)throw new TypeError("weight must be a non-negative number");const r=this.#h.get(e);if(!r)throw new Error("Item not found");r.baseWeight=Math.max(0,Number(t)||0),this.emit("weightChanged",{id:e,weight:r.baseWeight})}getItem(e){if(s(this.#e),"string"!=typeof e||!e.trim())throw new TypeError("id must be a non-empty string");return this.#h.get(e)??null}listItems(){return s(this.#e),Array.from(this.#h.values()).map(e=>({...e}))}clearList(){s(this.#e),this.#h.clear(),this.clearFreqs(),this.clearPities()}hasGlobalModifier(e){if(s(this.#e),"function"!=typeof e)throw new TypeError("fn must be a function");return this.#i.includes(e)}addGlobalModifier(e){if(s(this.#e),"function"!=typeof e)throw new TypeError("fn must be a function");this.#i.push(e)}removeGlobalModifier(e){if(s(this.#e),"function"!=typeof e)throw new TypeError("fn must be a function");this.#i=this.#i.filter(t=>t!==e)}hasTemporaryModifier(e){if(s(this.#e),"function"!=typeof e)throw new TypeError("fn must be a function");return this.#s.some(t=>t.fn===e)}addTemporaryModifier(e,t=1){if(s(this.#e),"function"!=typeof e)throw new TypeError("fn must be a function");if("number"!=typeof t||Number.isNaN(t))throw new TypeError("uses must be a number");this.#s.push({fn:e,uses:Math.max(1,Math.floor(t))})}removeTemporaryModifier(e){if(s(this.#e),"function"!=typeof e)throw new TypeError("fn must be a function");const t=this.#s.length;return this.#s=this.#s.filter(t=>t.fn!==e),this.#s.length!==t}hasConditionalRule(e){if(s(this.#e),"function"!=typeof e)throw new TypeError("ruleFn must be a function");return this.#o.includes(e)}addConditionalRule(e){if(s(this.#e),"function"!=typeof e)throw new TypeError("ruleFn must be a function");this.#o.push(e)}removeConditionalRule(e){if(s(this.#e),"function"!=typeof e)throw new TypeError("ruleFn must be a function");const t=this.#o.length;return this.#o=this.#o.filter(t=>t!==e),this.#o.length!==t}hasPity(e){if(s(this.#e),"string"!=typeof e)throw new TypeError("itemId must be a string");return this.#n.has(e)}configurePity(e,t){if(s(this.#e),!this.#h.has(e))throw new Error("Item not found");if("object"!=typeof t||null===t)throw new TypeError("cfg must be an object");const{threshold:r,increment:i,cap:o=1/0}=t;if("number"!=typeof r||r<=0)throw new TypeError("threshold must be a positive number");if("number"!=typeof i)throw new TypeError("increment must be a number");if("number"!=typeof o)throw new TypeError("cap must be a number");this.#n.set(e,{threshold:Math.max(1,r),increment:Number(i)||0,cap:Number(o)||1/0,counter:0,currentAdd:0})}resetPity(e){if(s(this.#e),"string"!=typeof e||!e.trim())throw new TypeError("itemId must be a non-empty string");const t=this.#n.get(e);t&&(t.counter=0,t.currentAdd=0)}clearPities(){s(this.#e),this.#n.clear()}hasExclusion(e){if(s(this.#e),"string"!=typeof e)throw new TypeError("itemId must be a string");return this.#a.has(e)}excludeItem(e){if(s(this.#e),"string"!=typeof e)throw new TypeError("itemId must be a string");this.#a.add(e)}includeItem(e){if(s(this.#e),"string"!=typeof e)throw new TypeError("itemId must be a string");this.#a.delete(e)}_ensureGroup(e){if(s(this.#e),"string"!=typeof e)throw new TypeError("name must be a string");let t=this.#u.get(e);return t||(t=new Set,this.#u.set(e,t)),t}hasInGroup(e,t){if(s(this.#e),"string"!=typeof e||"string"!=typeof t)throw new TypeError("itemId and groupName must be strings");const r=this.#u.get(t);return!!r&&r.has(e)}addToGroup(e,t){if(s(this.#e),"string"!=typeof e||"string"!=typeof t)throw new TypeError("itemId and groupName must be strings");const r=this.#h.get(e);if(!r)throw new Error("Item missing");r.groups.add(t),this._ensureGroup(t).add(e)}removeFromGroup(e,t){if(s(this.#e),"string"!=typeof e||"string"!=typeof t)throw new TypeError("itemId and groupName must be strings");const r=this.#u.get(t);r&&r.delete(e);const i=this.#h.get(e);i&&i.groups.delete(t)}clearFreqs(){s(this.#e),this.#p.clear()}resetFreq(e){if(s(this.#e),"string"!=typeof e)throw new TypeError("itemId must be a string");this.#p.delete(e)}computeEffectiveWeights(e={}){if(s(this.#e),"object"!=typeof e||null===e)throw new TypeError("computeEffectiveWeights: parameter 'context' must be a non-null object, got "+typeof e);if("previousDraws"in e&&!Array.isArray(e.previousDraws))throw new TypeError("computeEffectiveWeights: context.previousDraws must be an array if provided, got "+typeof e.previousDraws);if("metadata"in e&&void 0!==e.metadata&&("object"!=typeof e.metadata||null===e.metadata))throw new TypeError("computeEffectiveWeights: context.metadata must be a non-null object if provided, got "+typeof e.metadata);const t=new Map;for(const[e,r]of this.#h)t.set(e,r.baseWeight);for(const r of this.#i){const i=r(t,e);if(i instanceof Map)for(const[e,r]of i)t.set(e,Math.max(0,(t.get(e)||0)+r))}for(const r of this.#s){const i=r.fn(t,e);if(i instanceof Map)for(const[e,r]of i)t.set(e,Math.max(0,(t.get(e)||0)+r))}for(const r of this.#o){const i=r(t,e);if(i instanceof Map)for(const[e,r]of i)t.set(e,Math.max(0,(t.get(e)||0)+r))}for(const[e,r]of this.#n)if(t.has(e)&&r.counter>r.threshold){r.currentAdd=Math.min(r.cap,r.currentAdd+r.increment);const i=t.get(e);i&&t.set(e,i+r.currentAdd)}for(const e of this.#a)t.delete(e);for(const[e,r]of Array.from(t.entries()))r>0||t.delete(e);return t}_weightsToDistribution(e){if(!(e instanceof Map))throw new TypeError("_weightsToDistribution: parameter 'weights' must be a Map, got "+typeof e);for(const[t,r]of e){if("string"!=typeof t)throw new TypeError("_weightsToDistribution: weights Map key must be string, got "+typeof t);if("number"!=typeof r||!Number.isFinite(r)||r<0)throw new TypeError(`_weightsToDistribution: weights Map value must be finite non-negative number, got ${r} for key ${t}`)}const t=Array.from(e.entries()).map(([e,t])=>({id:e,weight:t}));if(0===t.length)return[];if("softmax"===this.#t){const e=Math.max(...t.map(e=>e.weight)),r=t.map(t=>Math.exp(t.weight-e)),i=r.reduce((e,t)=>e+t,0);let s=0;return t.map((e,t)=>{const o=r[t]/i;return s+=o,{id:e.id,weight:e.weight,p:o,cumulative:s}})}{const e=t.reduce((e,t)=>e+t.weight,0);let r=0;return t.map(t=>{const i=t.weight/e;return r+=i,{id:t.id,weight:t.weight,p:i,cumulative:r}})}}drawOne(e={}){if(s(this.#e),"object"!=typeof e||null===e)throw new TypeError("drawOne: parameter 'opts' must be a non-null object, got "+typeof e);if("previousDraws"in e&&!Array.isArray(e.previousDraws))throw new TypeError("drawOne: opts.previousDraws must be an array if provided, got "+typeof e.previousDraws);if("metadata"in e&&void 0!==e.metadata&&("object"!=typeof e.metadata||null===e.metadata))throw new TypeError("drawOne: opts.metadata must be a non-null object if provided, got "+typeof e.metadata);const t={previousDraws:e.previousDraws??[],metadata:e.metadata??{},activeModifiers:[...this.#s]},r=this.computeEffectiveWeights(t),i=this._weightsToDistribution(r);if(!i.length)return null;const o=this.#f(),n=i.find(e=>o<=e.cumulative)??i[i.length-1];for(const[e,t]of this.#n)e===n.id?(t.counter=0,t.currentAdd=0):t.counter++;this._consumeTemporaryModifiers();const a=this.#h.get(n.id);if(!a)return null;const u={id:a.id,label:a.label,meta:{...a.meta},prob:n.p};return this.emit("draw",u),u&&this.#p.set(u.id,(this.#p.get(u.id)||0)+1),u}_consumeTemporaryModifiers(){for(let e=this.#s.length-1;e>=0;--e){const t=this.#s[e];t.uses-=1,t.uses<=0&&this.#s.splice(e,1)}}drawMany(e=1,t={}){if(s(this.#e),!Number.isInteger(e)||e<=0)throw new TypeError(`drawMany: parameter 'count' must be a positive integer, got ${e}`);if("object"!=typeof t||null===t)throw new TypeError("drawMany: parameter 'opts' must be a non-null object, got "+typeof t);if("withReplacement"in t&&"boolean"!=typeof t.withReplacement)throw new TypeError("drawMany: opts.withReplacement must be boolean if provided, got "+typeof t.withReplacement);if("ensureUnique"in t&&"boolean"!=typeof t.ensureUnique)throw new TypeError("drawMany: opts.ensureUnique must be boolean if provided, got "+typeof t.ensureUnique);if("metadata"in t&&void 0!==t.metadata&&("object"!=typeof t.metadata||null===t.metadata))throw new TypeError("drawMany: opts.metadata must be a non-null object if provided, got "+typeof t.metadata);if("previousDraws"in t&&!Array.isArray(t.previousDraws))throw new TypeError("drawMany: opts.previousDraws must be an array if provided, got "+typeof t.previousDraws);const r=t.withReplacement??!0,i=t.ensureUnique??!1,o=[],n=t.previousDraws??[];if(!r&&i){const r=new Set;for(let i=0;i<e;++i){const e=new Set(this.#a);for(const e of r)this.#a.add(e);const i=this.drawOne({previousDraws:n,metadata:t.metadata});if(this.#a=e,!i)break;o.push(i),r.add(i.id),n.push(i)}return o}for(let i=0;i<e;++i){const e=this.drawOne({previousDraws:n,metadata:t.metadata});if(!e)break;o.push(e),n.push(e),r||this.excludeItem(e.id)}if(!r)for(const e of o)this.includeItem(e.id);return o}exportToJson(){return s(this.#e),{items:Array.from(this.#h.values()).map(e=>({id:e.id,label:e.label,baseWeight:e.baseWeight,meta:e.meta,groups:Array.from(e.groups),locked:!1})),pity:Array.from(this.#n.entries()),exclusions:Array.from(this.#a),normalization:this.#t,seed:this.#r}}loadFromJson(e){if(s(this.#e),"object"!=typeof e||null===e)throw new TypeError("data must be a non-null object");if(!Array.isArray(e.items)||!Array.isArray(e.pity)||!Array.isArray(e.exclusions))throw new TypeError("data must have items, pity, and exclusions arrays");if("string"!=typeof e.normalization)throw new TypeError("data.normalization must be a string");if(void 0!==e.seed&&null!==e.seed&&"number"!=typeof e.seed)throw new TypeError("data.seed must be a number, null, or undefined");this.clearList();for(const t of e.items){if("object"!=typeof t||null===t)throw new TypeError("Each item must be a non-null object");if("string"!=typeof t.id||!t.id.trim())throw new TypeError("Each item.id must be a non-empty string");if("string"!=typeof t.label)throw new TypeError(`Item with id "${t.id}" has invalid label; must be string`);if("number"!=typeof t.baseWeight||!Number.isFinite(t.baseWeight)||t.baseWeight<0)throw new TypeError(`Item with id "${t.id}" has invalid baseWeight; must be a finite non-negative number`);if(void 0!==t.groups&&!Array.isArray(t.groups))throw new TypeError(`Item with id "${t.id}" has invalid groups; must be an array of strings`);if(t.groups&&!t.groups.every(e=>"string"==typeof e))throw new TypeError(`Item with id "${t.id}" has groups containing non-string values`);if(void 0!==t.meta&&("object"!=typeof t.meta||null===t.meta))throw new TypeError(`Item with id "${t.id}" has invalid meta; must be an object`);this.#h.set(t.id,{id:t.id,label:t.label,baseWeight:t.baseWeight,meta:t.meta||{},groups:new Set(t.groups||[]),locked:!1});for(const e of t.groups||[])this._ensureGroup(e).add(t.id)}this.pitySystems=new Map(e.pity||[]),this.exclusions=new Set(e.exclusions||[]),this.normalization=e.normalization,void 0!==e.seed&&(this.seed=e.seed)}clone(){s(this.#e);const e=new o;return e.#t=this.#t,e.#r=this.#r,e.#i=[...this.#i],e.#s=this.#s.map(e=>({fn:e.fn,uses:e.uses})),e.#o=[...this.#o],e.#n=new Map([...this.#n.entries()].map(([e,t])=>[e,{...t}])),e.#a=new Set(this.#a),e.#u=new Map([...this.#u.entries()].map(([e,t])=>[e,new Set(t)])),e.#f=this.#f,e.#h=new Map([...this.#h.entries()].map(([e,t])=>[e,{...t,groups:new Set(t.groups),meta:{...t.meta}}])),e.#p=new Map(this.#p),e}_makeSeededRng(e){if("number"!=typeof e||!Number.isFinite(e))throw new TypeError("seed must be a finite number");let t=e>>>0;return function(){t+=1831565813;let e=Math.imul(t^t>>>15,1|t);return e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296}}destroy(){this.#e||(this.#n.clear(),this.#a.clear(),this.#u.clear(),this.#h.clear(),this.#p.clear(),this.#i=[],this.#s=[],this.#o=[],this.#r=null,this.#e=!0)}}const n=o}};const t={};function r(i){const s=t[i];if(void 0!==s)return s.exports;const o=t[i]={exports:{}};return e[i](o,o.exports,r),o.exports}r.d=(e,t)=>{if(Array.isArray(t))for(var i=0;i<t.length;){var s=t[i++],o=t[i++];r.o(e,s)?0===o&&i++:0===o?Object.defineProperty(e,s,{enumerable:!0,value:t[i++]}):Object.defineProperty(e,s,{enumerable:!0,get:o})}else for(var s in t)r.o(t,s)&&!r.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.cjs=e=>{const t={exports:{}};return e.call(t.exports,t,t.exports),t.exports};let i=r(159);window.TinyAdvancedRaffle=i.TinyAdvancedRaffle})();
1
+ (()=>{"use strict";const e={cw:e=>{var t;return()=>{if(e){var r=e;e=0,t={exports:{}},r.call(t.exports,t,t.exports)}return t.exports}},d:(t,r)=>{for(var i in r)e.o(r,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};let t={};e.d(t,{TinyAdvancedRaffle:()=>n});var r=e.cw(function(e,t){var r,i="object"==typeof Reflect?Reflect:null,s=i&&"function"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function n(){n.init.call(this)}e.exports=n,e.exports.once=function(e,t){return new Promise(function(r,i){function s(r){e.removeListener(t,o),i(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",s),r([].slice.call(arguments))}c(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&c(e,"error",t,{once:!0})}(e,s)})},n.EventEmitter=n,n.prototype._events=void 0,n.prototype._eventsCount=0,n.prototype._maxListeners=void 0;var a=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function f(e){return void 0===e._maxListeners?n.defaultMaxListeners:e._maxListeners}function h(e,t,r,i){var s,o,n,a;if(u(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),n=o[t]),void 0===n)n=o[t]=r,++e._eventsCount;else if("function"==typeof n?n=o[t]=i?[r,n]:[n,r]:i?n.unshift(r):n.push(r),(s=f(e))>0&&n.length>s&&!n.warned){n.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+n.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=e,h.type=t,h.count=n.length,a=h,console&&console.warn&&console.warn(a)}return e}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function y(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},s=p.bind(i);return s.listener=r,i.wrapFn=s,s}function m(e,t,r){var i=e._events;if(void 0===i)return[];var s=i[t];return void 0===s?[]:"function"==typeof s?r?[s.listener||s]:[s]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(s):l(s,s.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function l(e,t){for(var r=new Array(t),i=0;i<t;++i)r[i]=e[i];return r}function c(e,t,r,i){if("function"==typeof e.on)i.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function s(o){i.once&&e.removeEventListener(t,s),r(o)})}}Object.defineProperty(n,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),n.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},n.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},n.prototype.getMaxListeners=function(){return f(this)},n.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var n;if(t.length>0&&(n=t[0]),n instanceof Error)throw n;var a=new Error("Unhandled error."+(n?" ("+n.message+")":""));throw a.context=n,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)s(u,this,t);else{var f=u.length,h=l(u,f);for(r=0;r<f;++r)s(h[r],this,t)}return!0},n.prototype.addListener=function(e,t){return h(this,e,t,!1)},n.prototype.on=n.prototype.addListener,n.prototype.prependListener=function(e,t){return h(this,e,t,!0)},n.prototype.once=function(e,t){return u(t),this.on(e,y(this,e,t)),this},n.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,y(this,e,t)),this},n.prototype.removeListener=function(e,t){var r,i,s,o,n;if(u(t),void 0===(i=this._events))return this;if(void 0===(r=i[e]))return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(s=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){n=r[o].listener,s=o;break}if(s<0)return this;0===s?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,s),1===r.length&&(i[e]=r[0]),void 0!==i.removeListener&&this.emit("removeListener",e,n||t)}return this},n.prototype.off=n.prototype.removeListener,n.prototype.removeAllListeners=function(e){var t,r,i;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var s,o=Object.keys(r);for(i=0;i<o.length;++i)"removeListener"!==(s=o[i])&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},n.prototype.listeners=function(e){return m(this,e,!0)},n.prototype.rawListeners=function(e){return m(this,e,!1)},n.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},n.prototype.listenerCount=d,n.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}});r();const i=e=>{if(e)throw new Error("This TinyAdvancedRaffle instance has been destroyed and can no longer be used.")};const s=r().EventEmitter;class o extends s{#e=!1;#t;#r;#i=[];#s=[];#o=[];#n=new Map;#a=new Set;#u=new Map;#f;#h=new Map;#p=new Map;get isDestroyed(){return this.#e}get freq(){return i(this.#e),Object.fromEntries(this.#p)}get size(){return i(this.#e),this.#h.size}get normalization(){return i(this.#e),this.#t}set normalization(e){if(i(this.#e),"string"!=typeof e||!e.trim())throw new TypeError("normalization must be a non-empty string (e.g., 'relative', 'softmax').");this.#t=e}get seed(){return i(this.#e),this.#r}set seed(e){if(i(this.#e),null!==e&&("number"!=typeof e||!Number.isFinite(e)))throw new TypeError("seed must be a finite number or null.");this.#r=e,null!==e&&(this.#f=this._makeSeededRng(e))}get globalModifiers(){return i(this.#e),[...this.#i]}set globalModifiers(e){if(i(this.#e),!Array.isArray(e)||!e.every(e=>"function"==typeof e))throw new TypeError("globalModifiers must be an array of functions (WeightsCallback).");this.#i=e}get temporaryModifiers(){return i(this.#e),[...this.#s]}set temporaryModifiers(e){if(i(this.#e),!Array.isArray(e)||!e.every(e=>e&&"function"==typeof e.fn&&Number.isInteger(e.uses)&&e.uses>0))throw new TypeError("temporaryModifiers must be an array of objects { fn: function, uses: positive integer }.");this.#s=e}get conditionalRules(){return i(this.#e),[...this.#o]}set conditionalRules(e){if(i(this.#e),!Array.isArray(e)||!e.every(e=>"function"==typeof e))throw new TypeError("conditionalRules must be an array of functions (WeightsCallback).");this.#o=e}get pitySystems(){return i(this.#e),Object.fromEntries(this.#n)}set pitySystems(e){if(i(this.#e),!(e instanceof Map&&[...e.values()].every(e=>e&&"number"==typeof e.threshold&&"number"==typeof e.increment&&"number"==typeof e.cap&&"number"==typeof e.counter&&"number"==typeof e.currentAdd)))throw new TypeError("pitySystems must be a Map<string, Pity> with all numeric fields.");this.#n=e}get exclusions(){return i(this.#e),Array.from(this.#a)}set exclusions(e){if(i(this.#e),!(e instanceof Set&&[...e].every(e=>"string"==typeof e)))throw new TypeError("exclusions must be a Set<string>.");this.#a=e}get groups(){i(this.#e);const e={};return this.#u.forEach((t,r)=>e[r]=Array.from(t)),e}set groups(e){if(i(this.#e),!(e instanceof Map&&[...e.values()].every(e=>e instanceof Set&&[...e].every(e=>"string"==typeof e))))throw new TypeError("groups must be a Map<string, Set<string>>.");this.#u=e}get rng(){return i(this.#e),this.#f}set rng(e){if(i(this.#e),"function"!=typeof e||"number"!=typeof e())throw new TypeError("rng must be a function returning a number (RngGenerator).");this.#f=e}get items(){i(this.#e);const e={};return this.#h.forEach((t,r)=>{e[r]={...t,groups:Array.from(t.groups)}}),e}set items(e){if(i(this.#e),!(e instanceof Map&&[...e.values()].every(e=>e&&"string"==typeof e.id&&"string"==typeof e.label&&"number"==typeof e.baseWeight&&e.groups instanceof Set&&"boolean"==typeof e.locked&&"object"==typeof e.meta)))throw new TypeError("items must be a Map<string, ItemData> with valid item structures.");this.clearList(),this.#h=e}constructor(e={}){super();const{rng:t=null,seed:r=null,normalization:i="relative"}=e;this.#t=i,this.#r=r,"function"==typeof t?this.#f=t:null!==this.#r?this.#f=this._makeSeededRng(this.#r):this.#f=Math.random,this.#r=r??null}hasItem(e){if(i(this.#e),"string"!=typeof e)throw new TypeError("itemId must be a string");return this.#h.has(e)}addItem(e,t={}){if(i(this.#e),"string"!=typeof e||!e.trim())throw new TypeError("id must be a non-empty string");if("object"!=typeof t||null===t)throw new TypeError("opts must be an object");let{weight:r=1,label:s=e,meta:o={},groups:n=[]}=t;if("number"!=typeof r||!Number.isFinite(r)||r<0)throw new TypeError("weight must be a non-negative number");if("string"!=typeof s)throw new TypeError("label must be a string");if("object"!=typeof o||null===o)throw new TypeError("meta must be an object");if(!(Array.isArray(n)||n instanceof Set))throw new TypeError("groups must be an array or a Set of strings");n=Array.isArray(n)?n:[...n];for(const e of n)if("string"!=typeof e)throw new TypeError("groups must contain only strings");const a={id:e,label:s,baseWeight:Math.max(0,Number(r)||0),meta:{...o},groups:new Set(n),locked:!1};this.#h.set(e,a);for(const t of n)this._ensureGroup(t).add(e);return this.emit("itemAdded",a),a}removeItem(e){if(i(this.#e),"string"!=typeof e||!e.trim())throw new TypeError("id must be a non-empty string");const t=this.#h.get(e);if(!t)return!1;for(const r of t.groups){const t=this.#u.get(r);t&&t.delete(e)}return this.#h.delete(e),this.emit("itemRemoved",e),this.resetFreq(e),this.resetPity(e),!0}setBaseWeight(e,t){if(i(this.#e),"string"!=typeof e||!e.trim())throw new TypeError("id must be a non-empty string");if("number"!=typeof t||!Number.isFinite(t)||t<0)throw new TypeError("weight must be a non-negative number");const r=this.#h.get(e);if(!r)throw new Error("Item not found");r.baseWeight=Math.max(0,Number(t)||0),this.emit("weightChanged",{id:e,weight:r.baseWeight})}getItem(e){if(i(this.#e),"string"!=typeof e||!e.trim())throw new TypeError("id must be a non-empty string");return this.#h.get(e)??null}listItems(){return i(this.#e),Array.from(this.#h.values()).map(e=>({...e}))}clearList(){i(this.#e),this.#h.clear(),this.clearFreqs(),this.clearPities()}hasGlobalModifier(e){if(i(this.#e),"function"!=typeof e)throw new TypeError("fn must be a function");return this.#i.includes(e)}addGlobalModifier(e){if(i(this.#e),"function"!=typeof e)throw new TypeError("fn must be a function");this.#i.push(e)}removeGlobalModifier(e){if(i(this.#e),"function"!=typeof e)throw new TypeError("fn must be a function");this.#i=this.#i.filter(t=>t!==e)}hasTemporaryModifier(e){if(i(this.#e),"function"!=typeof e)throw new TypeError("fn must be a function");return this.#s.some(t=>t.fn===e)}addTemporaryModifier(e,t=1){if(i(this.#e),"function"!=typeof e)throw new TypeError("fn must be a function");if("number"!=typeof t||Number.isNaN(t))throw new TypeError("uses must be a number");this.#s.push({fn:e,uses:Math.max(1,Math.floor(t))})}removeTemporaryModifier(e){if(i(this.#e),"function"!=typeof e)throw new TypeError("fn must be a function");const t=this.#s.length;return this.#s=this.#s.filter(t=>t.fn!==e),this.#s.length!==t}hasConditionalRule(e){if(i(this.#e),"function"!=typeof e)throw new TypeError("ruleFn must be a function");return this.#o.includes(e)}addConditionalRule(e){if(i(this.#e),"function"!=typeof e)throw new TypeError("ruleFn must be a function");this.#o.push(e)}removeConditionalRule(e){if(i(this.#e),"function"!=typeof e)throw new TypeError("ruleFn must be a function");const t=this.#o.length;return this.#o=this.#o.filter(t=>t!==e),this.#o.length!==t}hasPity(e){if(i(this.#e),"string"!=typeof e)throw new TypeError("itemId must be a string");return this.#n.has(e)}configurePity(e,t){if(i(this.#e),!this.#h.has(e))throw new Error("Item not found");if("object"!=typeof t||null===t)throw new TypeError("cfg must be an object");const{threshold:r,increment:s,cap:o=1/0}=t;if("number"!=typeof r||r<=0)throw new TypeError("threshold must be a positive number");if("number"!=typeof s)throw new TypeError("increment must be a number");if("number"!=typeof o)throw new TypeError("cap must be a number");this.#n.set(e,{threshold:Math.max(1,r),increment:Number(s)||0,cap:Number(o)||1/0,counter:0,currentAdd:0})}resetPity(e){if(i(this.#e),"string"!=typeof e||!e.trim())throw new TypeError("itemId must be a non-empty string");const t=this.#n.get(e);t&&(t.counter=0,t.currentAdd=0)}clearPities(){i(this.#e),this.#n.clear()}hasExclusion(e){if(i(this.#e),"string"!=typeof e)throw new TypeError("itemId must be a string");return this.#a.has(e)}excludeItem(e){if(i(this.#e),"string"!=typeof e)throw new TypeError("itemId must be a string");this.#a.add(e)}includeItem(e){if(i(this.#e),"string"!=typeof e)throw new TypeError("itemId must be a string");this.#a.delete(e)}_ensureGroup(e){if(i(this.#e),"string"!=typeof e)throw new TypeError("name must be a string");let t=this.#u.get(e);return t||(t=new Set,this.#u.set(e,t)),t}hasInGroup(e,t){if(i(this.#e),"string"!=typeof e||"string"!=typeof t)throw new TypeError("itemId and groupName must be strings");const r=this.#u.get(t);return!!r&&r.has(e)}addToGroup(e,t){if(i(this.#e),"string"!=typeof e||"string"!=typeof t)throw new TypeError("itemId and groupName must be strings");const r=this.#h.get(e);if(!r)throw new Error("Item missing");r.groups.add(t),this._ensureGroup(t).add(e)}removeFromGroup(e,t){if(i(this.#e),"string"!=typeof e||"string"!=typeof t)throw new TypeError("itemId and groupName must be strings");const r=this.#u.get(t);r&&r.delete(e);const s=this.#h.get(e);s&&s.groups.delete(t)}clearFreqs(){i(this.#e),this.#p.clear()}resetFreq(e){if(i(this.#e),"string"!=typeof e)throw new TypeError("itemId must be a string");this.#p.delete(e)}computeEffectiveWeights(e={}){if(i(this.#e),"object"!=typeof e||null===e)throw new TypeError("computeEffectiveWeights: parameter 'context' must be a non-null object, got "+typeof e);if("previousDraws"in e&&!Array.isArray(e.previousDraws))throw new TypeError("computeEffectiveWeights: context.previousDraws must be an array if provided, got "+typeof e.previousDraws);if("metadata"in e&&void 0!==e.metadata&&("object"!=typeof e.metadata||null===e.metadata))throw new TypeError("computeEffectiveWeights: context.metadata must be a non-null object if provided, got "+typeof e.metadata);const t=new Map;for(const[e,r]of this.#h)t.set(e,r.baseWeight);for(const r of this.#i){const i=r(t,e);if(i instanceof Map)for(const[e,r]of i)t.set(e,Math.max(0,(t.get(e)||0)+r))}for(const r of this.#s){const i=r.fn(t,e);if(i instanceof Map)for(const[e,r]of i)t.set(e,Math.max(0,(t.get(e)||0)+r))}for(const r of this.#o){const i=r(t,e);if(i instanceof Map)for(const[e,r]of i)t.set(e,Math.max(0,(t.get(e)||0)+r))}for(const[e,r]of this.#n)if(t.has(e)&&r.counter>r.threshold){r.currentAdd=Math.min(r.cap,r.currentAdd+r.increment);const i=t.get(e);i&&t.set(e,i+r.currentAdd)}for(const e of this.#a)t.delete(e);for(const[e,r]of Array.from(t.entries()))r>0||t.delete(e);return t}_weightsToDistribution(e){if(!(e instanceof Map))throw new TypeError("_weightsToDistribution: parameter 'weights' must be a Map, got "+typeof e);for(const[t,r]of e){if("string"!=typeof t)throw new TypeError("_weightsToDistribution: weights Map key must be string, got "+typeof t);if("number"!=typeof r||!Number.isFinite(r)||r<0)throw new TypeError(`_weightsToDistribution: weights Map value must be finite non-negative number, got ${r} for key ${t}`)}const t=Array.from(e.entries()).map(([e,t])=>({id:e,weight:t}));if(0===t.length)return[];if("softmax"===this.#t){const e=Math.max(...t.map(e=>e.weight)),r=t.map(t=>Math.exp(t.weight-e)),i=r.reduce((e,t)=>e+t,0);let s=0;return t.map((e,t)=>{const o=r[t]/i;return s+=o,{id:e.id,weight:e.weight,p:o,cumulative:s}})}{const e=t.reduce((e,t)=>e+t.weight,0);let r=0;return t.map(t=>{const i=t.weight/e;return r+=i,{id:t.id,weight:t.weight,p:i,cumulative:r}})}}drawOne(e={}){if(i(this.#e),"object"!=typeof e||null===e)throw new TypeError("drawOne: parameter 'opts' must be a non-null object, got "+typeof e);if("previousDraws"in e&&!Array.isArray(e.previousDraws))throw new TypeError("drawOne: opts.previousDraws must be an array if provided, got "+typeof e.previousDraws);if("metadata"in e&&void 0!==e.metadata&&("object"!=typeof e.metadata||null===e.metadata))throw new TypeError("drawOne: opts.metadata must be a non-null object if provided, got "+typeof e.metadata);const t={previousDraws:e.previousDraws??[],metadata:e.metadata??{},activeModifiers:[...this.#s]},r=this.computeEffectiveWeights(t),s=this._weightsToDistribution(r);if(!s.length)return null;const o=this.#f(),n=s.find(e=>o<=e.cumulative)??s[s.length-1];for(const[e,t]of this.#n)e===n.id?(t.counter=0,t.currentAdd=0):t.counter++;this._consumeTemporaryModifiers();const a=this.#h.get(n.id);if(!a)return null;const u={id:a.id,label:a.label,meta:{...a.meta},prob:n.p};return this.emit("draw",u),u&&this.#p.set(u.id,(this.#p.get(u.id)||0)+1),u}_consumeTemporaryModifiers(){for(let e=this.#s.length-1;e>=0;--e){const t=this.#s[e];t.uses-=1,t.uses<=0&&this.#s.splice(e,1)}}drawMany(e=1,t={}){if(i(this.#e),!Number.isInteger(e)||e<=0)throw new TypeError(`drawMany: parameter 'count' must be a positive integer, got ${e}`);if("object"!=typeof t||null===t)throw new TypeError("drawMany: parameter 'opts' must be a non-null object, got "+typeof t);if("withReplacement"in t&&"boolean"!=typeof t.withReplacement)throw new TypeError("drawMany: opts.withReplacement must be boolean if provided, got "+typeof t.withReplacement);if("ensureUnique"in t&&"boolean"!=typeof t.ensureUnique)throw new TypeError("drawMany: opts.ensureUnique must be boolean if provided, got "+typeof t.ensureUnique);if("metadata"in t&&void 0!==t.metadata&&("object"!=typeof t.metadata||null===t.metadata))throw new TypeError("drawMany: opts.metadata must be a non-null object if provided, got "+typeof t.metadata);if("previousDraws"in t&&!Array.isArray(t.previousDraws))throw new TypeError("drawMany: opts.previousDraws must be an array if provided, got "+typeof t.previousDraws);const r=t.withReplacement??!0,s=t.ensureUnique??!1,o=[],n=t.previousDraws??[];if(!r&&s){const r=new Set;for(let i=0;i<e;++i){const e=new Set(this.#a);for(const e of r)this.#a.add(e);const i=this.drawOne({previousDraws:n,metadata:t.metadata});if(this.#a=e,!i)break;o.push(i),r.add(i.id),n.push(i)}return o}for(let i=0;i<e;++i){const e=this.drawOne({previousDraws:n,metadata:t.metadata});if(!e)break;o.push(e),n.push(e),r||this.excludeItem(e.id)}if(!r)for(const e of o)this.includeItem(e.id);return o}exportToJson(){return i(this.#e),{items:Array.from(this.#h.values()).map(e=>({id:e.id,label:e.label,baseWeight:e.baseWeight,meta:e.meta,groups:Array.from(e.groups),locked:!1})),pity:Array.from(this.#n.entries()),exclusions:Array.from(this.#a),normalization:this.#t,seed:this.#r}}loadFromJson(e){if(i(this.#e),"object"!=typeof e||null===e)throw new TypeError("data must be a non-null object");if(!Array.isArray(e.items)||!Array.isArray(e.pity)||!Array.isArray(e.exclusions))throw new TypeError("data must have items, pity, and exclusions arrays");if("string"!=typeof e.normalization)throw new TypeError("data.normalization must be a string");if(void 0!==e.seed&&null!==e.seed&&"number"!=typeof e.seed)throw new TypeError("data.seed must be a number, null, or undefined");this.clearList();for(const t of e.items){if("object"!=typeof t||null===t)throw new TypeError("Each item must be a non-null object");if("string"!=typeof t.id||!t.id.trim())throw new TypeError("Each item.id must be a non-empty string");if("string"!=typeof t.label)throw new TypeError(`Item with id "${t.id}" has invalid label; must be string`);if("number"!=typeof t.baseWeight||!Number.isFinite(t.baseWeight)||t.baseWeight<0)throw new TypeError(`Item with id "${t.id}" has invalid baseWeight; must be a finite non-negative number`);if(void 0!==t.groups&&!Array.isArray(t.groups))throw new TypeError(`Item with id "${t.id}" has invalid groups; must be an array of strings`);if(t.groups&&!t.groups.every(e=>"string"==typeof e))throw new TypeError(`Item with id "${t.id}" has groups containing non-string values`);if(void 0!==t.meta&&("object"!=typeof t.meta||null===t.meta))throw new TypeError(`Item with id "${t.id}" has invalid meta; must be an object`);this.#h.set(t.id,{id:t.id,label:t.label,baseWeight:t.baseWeight,meta:t.meta||{},groups:new Set(t.groups||[]),locked:!1});for(const e of t.groups||[])this._ensureGroup(e).add(t.id)}this.pitySystems=new Map(e.pity||[]),this.exclusions=new Set(e.exclusions||[]),this.normalization=e.normalization,void 0!==e.seed&&(this.seed=e.seed)}clone(){i(this.#e);const e=new o;return e.#t=this.#t,e.#r=this.#r,e.#i=[...this.#i],e.#s=this.#s.map(e=>({fn:e.fn,uses:e.uses})),e.#o=[...this.#o],e.#n=new Map([...this.#n.entries()].map(([e,t])=>[e,{...t}])),e.#a=new Set(this.#a),e.#u=new Map([...this.#u.entries()].map(([e,t])=>[e,new Set(t)])),e.#f=this.#f,e.#h=new Map([...this.#h.entries()].map(([e,t])=>[e,{...t,groups:new Set(t.groups),meta:{...t.meta}}])),e.#p=new Map(this.#p),e}_makeSeededRng(e){if("number"!=typeof e||!Number.isFinite(e))throw new TypeError("seed must be a finite number");let t=e>>>0;return function(){t+=1831565813;let e=Math.imul(t^t>>>15,1|t);return e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296}}destroy(){this.#e||(this.#n.clear(),this.#a.clear(),this.#u.clear(),this.#h.clear(),this.#p.clear(),this.#i=[],this.#s=[],this.#o=[],this.#r=null,this.#e=!0)}}const n=o;window.TinyAdvancedRaffle=t.TinyAdvancedRaffle})();
@@ -1 +1 @@
1
- (()=>{"use strict";const e={d:(t,r)=>{if(Array.isArray(r))for(var i=0;i<r.length;){var o=r[i++],s=r[i++];e.o(t,o)?0===s&&i++:0===s?Object.defineProperty(t,o,{enumerable:!0,value:r[i++]}):Object.defineProperty(t,o,{enumerable:!0,get:s})}else for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};let t={};e.d(t,{TinyAfterScrollWatcher:()=>i});const r=e=>{if(e)throw new Error("This TinyAfterScrollWatcher instance has been destroyed and can no longer be used.")};const i=class{#e;get scrollTarget(){return r(this.#t),this.#e}#r=null;#i=[];get afterScrollQueueSize(){return r(this.#t),this.#i.length}#o=100;#s=new Set;#n=new Set;#t=!1;get destroyed(){return this.#t}constructor(e,t=100){if(!(e instanceof Element||e instanceof Window))throw new TypeError("scrollTarget must be an Element or the Window object.");this.#e=e,this._checkTimer=this._checkTimer.bind(this),this.#e.addEventListener("scroll",this._checkTimer),this.#o=t}_checkTimer=()=>{this.#r&&clearTimeout(this.#r),this.#r=setTimeout(()=>{this.#r=null,this.#l()},this.#o)};get inactivityTime(){return r(this.#t),this.#o}set inactivityTime(e){if(r(this.#t),"number"!=typeof e||e<=0||!Number.isFinite(e))throw new Error("inactivityTime must be a positive number in milliseconds.");this.#o=e}#l(){if(!this.#t){for(const e of this.#n)"function"==typeof e&&e();for(;this.#i.length;){const e=this.#i.pop();"function"==typeof e&&e()}}}doAfterScroll(e){if(r(this.#t),"function"!=typeof e)throw new TypeError("Argument must be a function.");this.lastScrollTime=Date.now(),this.#i.push(e)}onStop(e){if(r(this.#t),"function"!=typeof e)throw new TypeError("Argument must be a function.");this.#n.add(e)}offStop(e){if(r(this.#t),"function"!=typeof e)throw new TypeError("Argument must be a function.");this.#n.delete(e)}onScroll(e){if(r(this.#t),"function"!=typeof e)throw new TypeError("Argument must be a function.");this.#e.addEventListener("scroll",e),this.#s.add(e)}offScroll(e){if(r(this.#t),"function"!=typeof e)throw new TypeError("Argument must be a function.");this.#s.has(e)&&(this.#e.removeEventListener("scroll",e),this.#s.delete(e))}destroy(){if(!this.#t){this.#e.removeEventListener("scroll",this._checkTimer);for(const e of this.#s)this.#e.removeEventListener("scroll",e);this.#s.clear(),this.#n.clear(),this.#t=!0}}};window.TinyAfterScrollWatcher=t.TinyAfterScrollWatcher})();
1
+ (()=>{"use strict";const e={d:(t,r)=>{for(var i in r)e.o(r,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};let t={};e.d(t,{TinyAfterScrollWatcher:()=>i});const r=e=>{if(e)throw new Error("This TinyAfterScrollWatcher instance has been destroyed and can no longer be used.")};const i=class{#e;get scrollTarget(){return r(this.#t),this.#e}#r=null;#i=[];get afterScrollQueueSize(){return r(this.#t),this.#i.length}#o=100;#s=new Set;#n=new Set;#t=!1;get destroyed(){return this.#t}constructor(e,t=100){if(!(e instanceof Element||e instanceof Window))throw new TypeError("scrollTarget must be an Element or the Window object.");this.#e=e,this._checkTimer=this._checkTimer.bind(this),this.#e.addEventListener("scroll",this._checkTimer),this.#o=t}_checkTimer=()=>{this.#r&&clearTimeout(this.#r),this.#r=setTimeout(()=>{this.#r=null,this.#l()},this.#o)};get inactivityTime(){return r(this.#t),this.#o}set inactivityTime(e){if(r(this.#t),"number"!=typeof e||e<=0||!Number.isFinite(e))throw new Error("inactivityTime must be a positive number in milliseconds.");this.#o=e}#l(){if(!this.#t){for(const e of this.#n)"function"==typeof e&&e();for(;this.#i.length;){const e=this.#i.pop();"function"==typeof e&&e()}}}doAfterScroll(e){if(r(this.#t),"function"!=typeof e)throw new TypeError("Argument must be a function.");this.lastScrollTime=Date.now(),this.#i.push(e)}onStop(e){if(r(this.#t),"function"!=typeof e)throw new TypeError("Argument must be a function.");this.#n.add(e)}offStop(e){if(r(this.#t),"function"!=typeof e)throw new TypeError("Argument must be a function.");this.#n.delete(e)}onScroll(e){if(r(this.#t),"function"!=typeof e)throw new TypeError("Argument must be a function.");this.#e.addEventListener("scroll",e),this.#s.add(e)}offScroll(e){if(r(this.#t),"function"!=typeof e)throw new TypeError("Argument must be a function.");this.#s.has(e)&&(this.#e.removeEventListener("scroll",e),this.#s.delete(e))}destroy(){if(!this.#t){this.#e.removeEventListener("scroll",this._checkTimer);for(const e of this.#s)this.#e.removeEventListener("scroll",e);this.#s.clear(),this.#n.clear(),this.#t=!0}}};window.TinyAfterScrollWatcher=t.TinyAfterScrollWatcher})();
@@ -1 +1 @@
1
- (()=>{"use strict";const e={d:(t,o)=>{if(Array.isArray(o))for(var n=0;n<o.length;){var i=o[n++],r=o[n++];e.o(t,i)?0===r&&n++:0===r?Object.defineProperty(t,i,{enumerable:!0,value:o[n++]}):Object.defineProperty(t,i,{enumerable:!0,get:r})}else for(var i in o)e.o(o,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:o[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};let t={};e.d(t,{TinyAnalogClock:()=>n});const o=e=>{if(e)throw new Error("This TinyAnalogClock instance has been destroyed and can no longer be used.")};const n=class{#e;#t;#o;#n;#i=null;#r=!1;get destroyed(){return this.#r}_getDate(){const e=new Date,t=e.getSeconds(),o=e.getMinutes(),n=e.getHours();return{now:e,s:t,m:o,h:n}}constructor(e={}){this.#n={bgColor:"#f0f0f0",borderColor:"#333",borderWidth:8,markColor:"#333",hourHandColor:"#000",minuteHandColor:"#444",secondHandColor:"#d81c1c",textColor:"#000",skinUrl:null,showNumbers:!0,showSeconds:!0,size:800,sizeAdjust:.04,padding:45,angleDistance:.95,pwH:.008,phH:.08,pwM:.005,phM:.03,...e},this.#e=document.createElement("div"),this.#e.className="analog-clock-container",this.#e.style.position="relative",this.#e.style.borderRadius="50%",this.#e.style.overflow="hidden",this.#e.style.boxSizing="border-box",this.#o=document.createElement("div"),this.#o.style.position="absolute",this.#o.style.inset="0",this.#o.style.backgroundSize="cover",this.#o.style.backgroundPosition="center",this.#o.style.zIndex="0",this.#t=document.createElement("div"),this.#t.style.position="absolute",this.#t.style.inset="0",this.#t.style.zIndex="1",this.#t.style.pointerEvents="none";const t=document.createElement("div");t.style.position="absolute",t.style.inset="0",t.style.zIndex="2",t.style.pointerEvents="none",t.innerHTML='\n <div class="hand hour-hand"></div>\n <div class="hand minute-hand"></div>\n <div class="hand second-hand"></div>\n <div class="center-pin"></div>\n ',this.#e.appendChild(this.#o),this.#e.appendChild(this.#t),this.#e.appendChild(t);const o=document.createElement("style");o.textContent="\n .analog-clock-container .hand {\n position: absolute;\n bottom: 50%;\n left: 50%;\n transform-origin: bottom center;\n border-radius: 4px;\n transform: translateX(-50%) rotate(0deg);\n z-index: 5;\n }\n .analog-clock-container .center-pin {\n position: absolute;\n top: 50%; left: 50%;\n width: 12px; height: 12px;\n background: #333;\n border-radius: 50%;\n transform: translate(-50%, -50%);\n z-index: 10;\n }\n .analog-clock-container .clock-mark {\n position: absolute;\n top: 50%; left: 50%;\n background: currentColor;\n transform-origin: center center;\n }\n .analog-clock-container .clock-number {\n position: absolute;\n top: 50%; left: 50%;\n transform: translate(-50%, -50%);\n font-family: sans-serif;\n font-weight: bold;\n text-align: center;\n line-height: 1;\n }\n ",this.#e.appendChild(o),this._applyConfig(),this._renderFace(),this._startTicker()}_applyConfig(){const e=this.#e.style,t=this.#n;e.width=`${t.size}px`,e.height=`${t.size}px`,e.border=`${t.borderWidth}px solid ${t.borderColor}`,e.backgroundColor=t.bgColor,t.skinUrl?(this.#o.style.backgroundImage=`url(${t.skinUrl})`,this.#o.style.display="block"):this.#o.style.display="none";const o=e=>{const t=this.#e.querySelector(e);if(!(t instanceof HTMLDivElement))throw new Error(`TinyAnalogClock: Element ${e} not found.`);return t},n=o(".hour-hand");n.style.backgroundColor=t.hourHandColor,n.style.width=.025*t.size+"px",n.style.height=.25*t.size+"px",n.style.marginLeft=.025*t.size/-2+"px",n.style.bottom="50%",n.style.left="50%",n.style.transformOrigin="bottom center";const i=o(".minute-hand");i.style.backgroundColor=t.minuteHandColor,i.style.width=.015*t.size+"px",i.style.height=.35*t.size+"px",i.style.marginLeft=.015*t.size/-2+"px";const r=o(".second-hand");t.showSeconds?(r.style.display="block",r.style.backgroundColor=t.secondHandColor,r.style.width=.005*t.size+"px",r.style.height=.4*t.size+"px",r.style.marginLeft=.005*t.size/-2+"px"):r.style.display="none",o(".center-pin").style.background=t.borderColor}_renderFace(){this.#t.innerHTML="";const e=this.#n.size/2-this.#n.borderWidth;for(let t=0;t<60;t++){const o=t%5==0,n=document.createElement("div");n.className="clock-mark";const i=o?this.#n.size*this.#n.pwH:this.#n.size*this.#n.pwM,r=o?this.#n.size*this.#n.phH:this.#n.size*this.#n.phM,s=this.#n.markColor;n.style.width=`${i}px`,n.style.height=`${r}px`,n.style.color=s;const a=e-this.#n.padding-r/2;n.style.transform=`translate(-50%, -50%) rotate(${6*t}deg) translate(0, -${a}px)`,this.#t.appendChild(n)}if(this.#n.showNumbers)for(let t=1;t<=12;t++){const o=30*t*(Math.PI/180),n=e*this.#n.angleDistance,i=e+Math.sin(o)*n,r=e-Math.cos(o)*n,s=document.createElement("div");s.className="clock-number",s.innerText=t.toString(),s.style.left=`${i}px`,s.style.top=`${r}px`,s.style.color=this.#n.textColor,s.style.fontSize=this.#n.size*this.#n.sizeAdjust+"px",this.#t.appendChild(s)}}_startTicker(){if(this.#i)return;const e=()=>{const{s:t,m:o,h:n}=this._getDate(),i=6*t,r=6*o+.1*t,s=n%12*30+.5*o,a=e=>{const t=this.#e.querySelector(e);if(!(t instanceof HTMLDivElement))throw new Error(`${e} not found.`);return t};this.#e.querySelector(".second-hand")&&(a(".second-hand").style.transform=`rotate(${i}deg)`),a(".minute-hand").style.transform=`rotate(${r}deg)`,a(".hour-hand").style.transform=`rotate(${s}deg)`,this.#i=requestAnimationFrame(e)};e()}get element(){return o(this.#r),this.#e}set size(e){if(o(this.#r),"number"!=typeof e||e<=0||isNaN(e))throw new Error(`TinyAnalogClock: 'size' must be a positive number. Received: ${e}`);this.#n.size=e,this._applyConfig(),this._renderFace()}get size(){return o(this.#r),this.#n.size}set skinUrl(e){if(o(this.#r),null!==e&&"string"!=typeof e)throw new Error("TinyAnalogClock: 'skin' must be a URL string or null. Received type: "+typeof e);this.#n.skinUrl=e,this._applyConfig()}get skinUrl(){return o(this.#r),this.#n.skinUrl}set borderColor(e){if(o(this.#r),"string"!=typeof e||""===e.trim())throw new Error(`TinyAnalogClock: 'borderColor' must be a non-empty string. Received: ${e}`);this.#n.borderColor=e,this._applyConfig(),this._renderFace()}get borderColor(){return o(this.#r),this.#n.borderColor}set markColor(e){if(o(this.#r),"string"!=typeof e||""===e.trim())throw new Error(`TinyAnalogClock: 'markColor' must be a non-empty string. Received: ${e}`);this.#n.markColor=e,this._applyConfig(),this._renderFace()}get markColor(){return o(this.#r),this.#n.markColor}set textColor(e){if(o(this.#r),"string"!=typeof e||""===e.trim())throw new Error(`TinyAnalogClock: 'textColor' must be a non-empty string. Received: ${e}`);this.#n.textColor=e,this._applyConfig(),this._renderFace()}get textColor(){return o(this.#r),this.#n.textColor}set showNumbers(e){if(o(this.#r),"boolean"!=typeof e)throw new Error("TinyAnalogClock: 'showNumbers' must be a boolean. Received type: "+typeof e);this.#n.showNumbers=e,this._renderFace()}get showNumbers(){return o(this.#r),this.#n.showNumbers}set bgColor(e){if(o(this.#r),"string"!=typeof e||!e)throw new Error("TinyAnalogClock: 'bgColor' must be a non-empty string.");this.#n.bgColor=e,this._applyConfig()}get bgColor(){return o(this.#r),this.#n.bgColor}set borderWidth(e){if(o(this.#r),"number"!=typeof e||e<0)throw new Error("TinyAnalogClock: 'borderWidth' must be a non-negative number.");this.#n.borderWidth=e,this._applyConfig(),this._renderFace()}get borderWidth(){return o(this.#r),this.#n.borderWidth}set hourHandColor(e){if(o(this.#r),"string"!=typeof e||!e)throw new Error("TinyAnalogClock: 'hourHandColor' must be a non-empty string.");this.#n.hourHandColor=e,this._applyConfig()}get hourHandColor(){return o(this.#r),this.#n.hourHandColor}set minuteHandColor(e){if(o(this.#r),"string"!=typeof e||!e)throw new Error("TinyAnalogClock: 'minuteHandColor' must be a non-empty string.");this.#n.minuteHandColor=e,this._applyConfig()}get minuteHandColor(){return o(this.#r),this.#n.minuteHandColor}set secondHandColor(e){if(o(this.#r),"string"!=typeof e||!e)throw new Error("TinyAnalogClock: 'secondHandColor' must be a non-empty string.");this.#n.secondHandColor=e,this._applyConfig()}get secondHandColor(){return o(this.#r),this.#n.secondHandColor}set showSeconds(e){if(o(this.#r),"boolean"!=typeof e)throw new Error("TinyAnalogClock: 'showSeconds' must be a boolean.");this.#n.showSeconds=e,this._applyConfig()}get showSeconds(){return o(this.#r),this.#n.showSeconds}set sizeAdjust(e){if(o(this.#r),"number"!=typeof e||e<=0)throw new Error("TinyAnalogClock: 'sizeAdjust' must be a positive number.");this.#n.sizeAdjust=e,this._renderFace()}get sizeAdjust(){return o(this.#r),this.#n.sizeAdjust}set padding(e){if(o(this.#r),"number"!=typeof e||e<0)throw new Error("TinyAnalogClock: 'padding' must be a non-negative number.");this.#n.padding=e,this._renderFace()}get padding(){return o(this.#r),this.#n.padding}set angleDistance(e){if(o(this.#r),"number"!=typeof e||e<=0)throw new Error("TinyAnalogClock: 'angleDistance' must be a positive number.");this.#n.angleDistance=e,this._renderFace()}get angleDistance(){return o(this.#r),this.#n.angleDistance}set pwH(e){if(o(this.#r),"number"!=typeof e||e<=0)throw new Error("TinyAnalogClock: 'pwH' must be a positive number.");this.#n.pwH=e,this._renderFace()}get pwH(){return o(this.#r),this.#n.pwH}set phH(e){if(o(this.#r),"number"!=typeof e||e<=0)throw new Error("TinyAnalogClock: 'phH' must be a positive number.");this.#n.phH=e,this._renderFace()}get phH(){return o(this.#r),this.#n.phH}set pwM(e){if(o(this.#r),"number"!=typeof e||e<=0)throw new Error("TinyAnalogClock: 'pwM' must be a positive number.");this.#n.pwM=e,this._renderFace()}get pwM(){return o(this.#r),this.#n.pwM}set phM(e){if(o(this.#r),"number"!=typeof e||e<=0)throw new Error("TinyAnalogClock: 'phM' must be a positive number.");this.#n.phM=e,this._renderFace()}get phM(){return o(this.#r),this.#n.phM}destroy(){this.#r||(this.#i&&(cancelAnimationFrame(this.#i),this.#i=null),this.#e.remove(),this.#r=!0)}};window.TinyAnalogClock=t.TinyAnalogClock})();
1
+ (()=>{"use strict";const e={d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};let t={};e.d(t,{TinyAnalogClock:()=>n});const o=e=>{if(e)throw new Error("This TinyAnalogClock instance has been destroyed and can no longer be used.")};const n=class{#e;#t;#o;#n;#i=null;#s=!1;get destroyed(){return this.#s}_getDate(){const e=new Date,t=e.getSeconds(),o=e.getMinutes(),n=e.getHours();return{now:e,s:t,m:o,h:n}}constructor(e={}){this.#n={bgColor:"#f0f0f0",borderColor:"#333",borderWidth:8,markColor:"#333",hourHandColor:"#000",minuteHandColor:"#444",secondHandColor:"#d81c1c",textColor:"#000",skinUrl:null,showNumbers:!0,showSeconds:!0,size:800,sizeAdjust:.04,padding:45,angleDistance:.95,pwH:.008,phH:.08,pwM:.005,phM:.03,...e},this.#e=document.createElement("div"),this.#e.className="analog-clock-container",this.#e.style.position="relative",this.#e.style.borderRadius="50%",this.#e.style.overflow="hidden",this.#e.style.boxSizing="border-box",this.#o=document.createElement("div"),this.#o.style.position="absolute",this.#o.style.inset="0",this.#o.style.backgroundSize="cover",this.#o.style.backgroundPosition="center",this.#o.style.zIndex="0",this.#t=document.createElement("div"),this.#t.style.position="absolute",this.#t.style.inset="0",this.#t.style.zIndex="1",this.#t.style.pointerEvents="none";const t=document.createElement("div");t.style.position="absolute",t.style.inset="0",t.style.zIndex="2",t.style.pointerEvents="none",t.innerHTML='\n <div class="hand hour-hand"></div>\n <div class="hand minute-hand"></div>\n <div class="hand second-hand"></div>\n <div class="center-pin"></div>\n ',this.#e.appendChild(this.#o),this.#e.appendChild(this.#t),this.#e.appendChild(t);const o=document.createElement("style");o.textContent="\n .analog-clock-container .hand {\n position: absolute;\n bottom: 50%;\n left: 50%;\n transform-origin: bottom center;\n border-radius: 4px;\n transform: translateX(-50%) rotate(0deg);\n z-index: 5;\n }\n .analog-clock-container .center-pin {\n position: absolute;\n top: 50%; left: 50%;\n width: 12px; height: 12px;\n background: #333;\n border-radius: 50%;\n transform: translate(-50%, -50%);\n z-index: 10;\n }\n .analog-clock-container .clock-mark {\n position: absolute;\n top: 50%; left: 50%;\n background: currentColor;\n transform-origin: center center;\n }\n .analog-clock-container .clock-number {\n position: absolute;\n top: 50%; left: 50%;\n transform: translate(-50%, -50%);\n font-family: sans-serif;\n font-weight: bold;\n text-align: center;\n line-height: 1;\n }\n ",this.#e.appendChild(o),this._applyConfig(),this._renderFace(),this._startTicker()}_applyConfig(){const e=this.#e.style,t=this.#n;e.width=`${t.size}px`,e.height=`${t.size}px`,e.border=`${t.borderWidth}px solid ${t.borderColor}`,e.backgroundColor=t.bgColor,t.skinUrl?(this.#o.style.backgroundImage=`url(${t.skinUrl})`,this.#o.style.display="block"):this.#o.style.display="none";const o=e=>{const t=this.#e.querySelector(e);if(!(t instanceof HTMLDivElement))throw new Error(`TinyAnalogClock: Element ${e} not found.`);return t},n=o(".hour-hand");n.style.backgroundColor=t.hourHandColor,n.style.width=.025*t.size+"px",n.style.height=.25*t.size+"px",n.style.marginLeft=.025*t.size/-2+"px",n.style.bottom="50%",n.style.left="50%",n.style.transformOrigin="bottom center";const i=o(".minute-hand");i.style.backgroundColor=t.minuteHandColor,i.style.width=.015*t.size+"px",i.style.height=.35*t.size+"px",i.style.marginLeft=.015*t.size/-2+"px";const s=o(".second-hand");t.showSeconds?(s.style.display="block",s.style.backgroundColor=t.secondHandColor,s.style.width=.005*t.size+"px",s.style.height=.4*t.size+"px",s.style.marginLeft=.005*t.size/-2+"px"):s.style.display="none",o(".center-pin").style.background=t.borderColor}_renderFace(){this.#t.innerHTML="";const e=this.#n.size/2-this.#n.borderWidth;for(let t=0;t<60;t++){const o=t%5==0,n=document.createElement("div");n.className="clock-mark";const i=o?this.#n.size*this.#n.pwH:this.#n.size*this.#n.pwM,s=o?this.#n.size*this.#n.phH:this.#n.size*this.#n.phM,r=this.#n.markColor;n.style.width=`${i}px`,n.style.height=`${s}px`,n.style.color=r;const a=e-this.#n.padding-s/2;n.style.transform=`translate(-50%, -50%) rotate(${6*t}deg) translate(0, -${a}px)`,this.#t.appendChild(n)}if(this.#n.showNumbers)for(let t=1;t<=12;t++){const o=30*t*(Math.PI/180),n=e*this.#n.angleDistance,i=e+Math.sin(o)*n,s=e-Math.cos(o)*n,r=document.createElement("div");r.className="clock-number",r.innerText=t.toString(),r.style.left=`${i}px`,r.style.top=`${s}px`,r.style.color=this.#n.textColor,r.style.fontSize=this.#n.size*this.#n.sizeAdjust+"px",this.#t.appendChild(r)}}_startTicker(){if(this.#i)return;const e=()=>{const{s:t,m:o,h:n}=this._getDate(),i=6*t,s=6*o+.1*t,r=n%12*30+.5*o,a=e=>{const t=this.#e.querySelector(e);if(!(t instanceof HTMLDivElement))throw new Error(`${e} not found.`);return t};this.#e.querySelector(".second-hand")&&(a(".second-hand").style.transform=`rotate(${i}deg)`),a(".minute-hand").style.transform=`rotate(${s}deg)`,a(".hour-hand").style.transform=`rotate(${r}deg)`,this.#i=requestAnimationFrame(e)};e()}get element(){return o(this.#s),this.#e}set size(e){if(o(this.#s),"number"!=typeof e||e<=0||isNaN(e))throw new Error(`TinyAnalogClock: 'size' must be a positive number. Received: ${e}`);this.#n.size=e,this._applyConfig(),this._renderFace()}get size(){return o(this.#s),this.#n.size}set skinUrl(e){if(o(this.#s),null!==e&&"string"!=typeof e)throw new Error("TinyAnalogClock: 'skin' must be a URL string or null. Received type: "+typeof e);this.#n.skinUrl=e,this._applyConfig()}get skinUrl(){return o(this.#s),this.#n.skinUrl}set borderColor(e){if(o(this.#s),"string"!=typeof e||""===e.trim())throw new Error(`TinyAnalogClock: 'borderColor' must be a non-empty string. Received: ${e}`);this.#n.borderColor=e,this._applyConfig(),this._renderFace()}get borderColor(){return o(this.#s),this.#n.borderColor}set markColor(e){if(o(this.#s),"string"!=typeof e||""===e.trim())throw new Error(`TinyAnalogClock: 'markColor' must be a non-empty string. Received: ${e}`);this.#n.markColor=e,this._applyConfig(),this._renderFace()}get markColor(){return o(this.#s),this.#n.markColor}set textColor(e){if(o(this.#s),"string"!=typeof e||""===e.trim())throw new Error(`TinyAnalogClock: 'textColor' must be a non-empty string. Received: ${e}`);this.#n.textColor=e,this._applyConfig(),this._renderFace()}get textColor(){return o(this.#s),this.#n.textColor}set showNumbers(e){if(o(this.#s),"boolean"!=typeof e)throw new Error("TinyAnalogClock: 'showNumbers' must be a boolean. Received type: "+typeof e);this.#n.showNumbers=e,this._renderFace()}get showNumbers(){return o(this.#s),this.#n.showNumbers}set bgColor(e){if(o(this.#s),"string"!=typeof e||!e)throw new Error("TinyAnalogClock: 'bgColor' must be a non-empty string.");this.#n.bgColor=e,this._applyConfig()}get bgColor(){return o(this.#s),this.#n.bgColor}set borderWidth(e){if(o(this.#s),"number"!=typeof e||e<0)throw new Error("TinyAnalogClock: 'borderWidth' must be a non-negative number.");this.#n.borderWidth=e,this._applyConfig(),this._renderFace()}get borderWidth(){return o(this.#s),this.#n.borderWidth}set hourHandColor(e){if(o(this.#s),"string"!=typeof e||!e)throw new Error("TinyAnalogClock: 'hourHandColor' must be a non-empty string.");this.#n.hourHandColor=e,this._applyConfig()}get hourHandColor(){return o(this.#s),this.#n.hourHandColor}set minuteHandColor(e){if(o(this.#s),"string"!=typeof e||!e)throw new Error("TinyAnalogClock: 'minuteHandColor' must be a non-empty string.");this.#n.minuteHandColor=e,this._applyConfig()}get minuteHandColor(){return o(this.#s),this.#n.minuteHandColor}set secondHandColor(e){if(o(this.#s),"string"!=typeof e||!e)throw new Error("TinyAnalogClock: 'secondHandColor' must be a non-empty string.");this.#n.secondHandColor=e,this._applyConfig()}get secondHandColor(){return o(this.#s),this.#n.secondHandColor}set showSeconds(e){if(o(this.#s),"boolean"!=typeof e)throw new Error("TinyAnalogClock: 'showSeconds' must be a boolean.");this.#n.showSeconds=e,this._applyConfig()}get showSeconds(){return o(this.#s),this.#n.showSeconds}set sizeAdjust(e){if(o(this.#s),"number"!=typeof e||e<=0)throw new Error("TinyAnalogClock: 'sizeAdjust' must be a positive number.");this.#n.sizeAdjust=e,this._renderFace()}get sizeAdjust(){return o(this.#s),this.#n.sizeAdjust}set padding(e){if(o(this.#s),"number"!=typeof e||e<0)throw new Error("TinyAnalogClock: 'padding' must be a non-negative number.");this.#n.padding=e,this._renderFace()}get padding(){return o(this.#s),this.#n.padding}set angleDistance(e){if(o(this.#s),"number"!=typeof e||e<=0)throw new Error("TinyAnalogClock: 'angleDistance' must be a positive number.");this.#n.angleDistance=e,this._renderFace()}get angleDistance(){return o(this.#s),this.#n.angleDistance}set pwH(e){if(o(this.#s),"number"!=typeof e||e<=0)throw new Error("TinyAnalogClock: 'pwH' must be a positive number.");this.#n.pwH=e,this._renderFace()}get pwH(){return o(this.#s),this.#n.pwH}set phH(e){if(o(this.#s),"number"!=typeof e||e<=0)throw new Error("TinyAnalogClock: 'phH' must be a positive number.");this.#n.phH=e,this._renderFace()}get phH(){return o(this.#s),this.#n.phH}set pwM(e){if(o(this.#s),"number"!=typeof e||e<=0)throw new Error("TinyAnalogClock: 'pwM' must be a positive number.");this.#n.pwM=e,this._renderFace()}get pwM(){return o(this.#s),this.#n.pwM}set phM(e){if(o(this.#s),"number"!=typeof e||e<=0)throw new Error("TinyAnalogClock: 'phM' must be a positive number.");this.#n.phM=e,this._renderFace()}get phM(){return o(this.#s),this.#n.phM}destroy(){this.#s||(this.#i&&(cancelAnimationFrame(this.#i),this.#i=null),this.#e.remove(),this.#s=!0)}};window.TinyAnalogClock=t.TinyAnalogClock})();
@@ -1 +1 @@
1
- (()=>{"use strict";const e={d:(r,t)=>{if(Array.isArray(t))for(var a=0;a<t.length;){var o=t[a++],s=t[a++];e.o(r,o)?0===s&&a++:0===s?Object.defineProperty(r,o,{enumerable:!0,value:t[a++]}):Object.defineProperty(r,o,{enumerable:!0,get:s})}else for(var o in t)e.o(t,o)&&!e.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:t[o]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r)};let r={};e.d(r,{TinyArrayComparator:()=>a});class t{static generateHash(e){const r="object"==typeof e?JSON.stringify(e):String(e);let t=0;for(let e=0,a=r.length;e<a;e++)t=(t<<5)-t+r.charCodeAt(e),t|=0;return t.toString(36)}#e=[];get oldArray(){return this.#e}set oldArray(e){if(!Array.isArray(e))throw new TypeError("The provided oldArray must be a valid Array.");this.#e=e}constructor(e){void 0!==e&&(this.oldArray=e)}_generateHash(e){return t.generateHash(e)}compare(e){if(!Array.isArray(e))throw new TypeError("The provided newArray must be a valid Array.");const r={oldItemsMap:new Map,affectedItems:[]};for(const e of this.#e){const t=this._generateHash(e);r.oldItemsMap.set(t,e)}for(const t of e){const e=this._generateHash(t);r.oldItemsMap.has(e)?r.oldItemsMap.delete(e):r.affectedItems.push({item:t,status:"added"})}for(const e of r.oldItemsMap.values())r.affectedItems.push({item:e,status:"deleted"});return r.affectedItems}}const a=t;window.TinyArrayComparator=r.TinyArrayComparator})();
1
+ (()=>{"use strict";const e={d:(t,r)=>{for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};let t={};e.d(t,{TinyArrayComparator:()=>o});class r{static generateHash(e){let t;try{t="object"==typeof e&&null!==e?JSON.stringify(e):String(e)}catch(e){throw new TypeError("Failed to stringify item for hashing. Ensure the object does not have circular references.")}let r=0;for(let e=0,o=t.length;e<o;e++)r=(r<<5)-r+t.charCodeAt(e),r|=0;return r.toString(36)}#e=[];#t=null;#r=!0;get idKey(){return this.#t}set idKey(e){if(null!==e&&"string"!=typeof e)throw new TypeError("The idKey must be a string or null.");this.#t=e}get deepComparison(){return this.#r}set deepComparison(e){if("boolean"!=typeof e)throw new TypeError("The deepComparison option must be a boolean.");this.#r=e}get oldArray(){return this.#e}set oldArray(e){if(!Array.isArray(e))throw new TypeError("The provided oldArray must be a valid Array.");this.#e=e}constructor(e,t={}){void 0!==e&&(this.oldArray=e),"string"==typeof t.idKey&&(this.idKey=t.idKey),"boolean"==typeof t.deepComparison&&(this.deepComparison=t.deepComparison)}_generateHash(e){return r.generateHash(e)}#o(e,t){const r={added:{},deleted:{},modified:{},nested:{}},o=new Set([...Object.keys(e),...Object.keys(t)]);for(const s of o){const o=e[s],i=t[s];if(s in e)if(s in t)if("object"!=typeof o||null===o||"object"!=typeof i||null===i||Array.isArray(o)||Array.isArray(t))o!==i&&(r.modified[s]={oldValue:o,newValue:i});else{const e=this.#o(o,i);(Object.keys(e.added).length>0||Object.keys(e.deleted).length>0||Object.keys(e.modified).length>0||Object.keys(e.nested).length>0)&&(r.nested[s]=e)}else r.deleted[s]=o;else r.added[s]=i}return r}compare(e){if(!Array.isArray(e))throw new TypeError("The provided newArray must be a valid Array.");const t={oldItemsMap:new Map,affectedItems:[]};for(const e of this.#e){const r=this._generateHash(e),o=null!==this.#t&&null!==e&&"object"==typeof e&&this.#t in e?e[this.#t]:r;t.oldItemsMap.set(o,{item:e,hash:r})}for(const r of e){const e=this._generateHash(r),o=null!==this.#t&&null!==r&&"object"==typeof r&&this.#t in r?r[this.#t]:e,s=t.oldItemsMap.get(o);if(s)if(s.hash===e)t.oldItemsMap.delete(o);else{const e={item:r,oldItem:s.item,status:"edited"};this.#r&&"object"==typeof r&&null!==r&&"object"==typeof s.item&&null!==s.item&&(e.details=this.#o(s.item,r)),t.affectedItems.push(e),t.oldItemsMap.delete(o)}else t.affectedItems.push({item:r,status:"added"})}for(const e of t.oldItemsMap.values())t.affectedItems.push({item:e.item,status:"deleted"});return t.affectedItems}}const o=r;window.TinyArrayComparator=t.TinyArrayComparator})();
@@ -1 +1 @@
1
- (()=>{"use strict";const e={d:(t,r)=>{if(Array.isArray(r))for(var a=0;a<r.length;){var i=r[a++],n=r[a++];e.o(t,i)?0===n&&a++:0===n?Object.defineProperty(t,i,{enumerable:!0,value:r[a++]}):Object.defineProperty(t,i,{enumerable:!0,get:n})}else for(var i in r)e.o(r,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};let t={};e.d(t,{TinyArrayPaginator:()=>r});const r=class{#e;get data(){return this.#e}set data(e){if(!(Array.isArray(e)||e instanceof Set))throw new TypeError("Paginator expects an array or Set as data source.");this.#e=e}get size(){return Array.isArray(this.#e)?this.#e.length:this.#e.size}constructor(e){if(!(Array.isArray(e)||e instanceof Set))throw new TypeError("Paginator expects an array or Set as data source.");this.#e=e}get({page:e,perPage:t,filter:r}){if(!Number.isInteger(e)||e<1)throw new RangeError("Page number must be a positive integer.");if(!Number.isInteger(t)||t<1)throw new RangeError("Items per page must be a positive integer.");const a=Array.isArray(this.#e)?this.#e:Array.from(this.#e);let i=a;if(r)if("function"==typeof r)i=a.filter((e,t,a)=>r(e,t,a));else{if("object"!=typeof r)throw new TypeError("Filter must be an object or a function");i=a.filter(e=>Object.entries(r).every(([t,r])=>{const a=e[t];return r instanceof RegExp?r.test(a):a===r}))}else i=a;const n=i.length,s=Math.max(1,Math.ceil(n/t)),o=Math.min(e,s),y=(o-1)*t,c=y+t,g=o>1,f=o<s;return{items:i.slice(y,c),page:o,perPage:t,totalItems:n,totalPages:s,hasPrev:g,hasNext:f}}};window.TinyArrayPaginator=t.TinyArrayPaginator})();
1
+ (()=>{"use strict";const t={d:(e,r)=>{for(var a in r)t.o(r,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:r[a]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};let e={};t.d(e,{TinyArrayPaginator:()=>r});const r=class{#t;get data(){return this.#t}set data(t){if(!(Array.isArray(t)||t instanceof Set))throw new TypeError("Paginator expects an array or Set as data source.");this.#t=t}get size(){return Array.isArray(this.#t)?this.#t.length:this.#t.size}constructor(t){if(!(Array.isArray(t)||t instanceof Set))throw new TypeError("Paginator expects an array or Set as data source.");this.#t=t}get({page:t,perPage:e,filter:r}){if(!Number.isInteger(t)||t<1)throw new RangeError("Page number must be a positive integer.");if(!Number.isInteger(e)||e<1)throw new RangeError("Items per page must be a positive integer.");const a=Array.isArray(this.#t)?this.#t:Array.from(this.#t);let i=a;if(r)if("function"==typeof r)i=a.filter((t,e,a)=>r(t,e,a));else{if("object"!=typeof r)throw new TypeError("Filter must be an object or a function");i=a.filter(t=>Object.entries(r).every(([e,r])=>{const a=t[e];return r instanceof RegExp?r.test(a):a===r}))}else i=a;const s=i.length,n=Math.max(1,Math.ceil(s/e)),o=Math.min(t,n),c=(o-1)*e,y=c+e,g=o>1,h=o<n;return{items:i.slice(c,y),page:o,perPage:e,totalItems:s,totalPages:n,hasPrev:g,hasNext:h}}};window.TinyArrayPaginator=e.TinyArrayPaginator})();