@luckylillia-dev/luckylillia 0.0.0-stage → 9.0.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.
- package/chunks/preload-helper-D5R8FHQt.js +342 -0
- package/chunks/preload-helper-D5R8FHQt.js.map +1 -0
- package/default_config.json +83 -0
- package/llbot-core.js +35013 -0
- package/llbot-core.js.map +1 -0
- package/llbot.js +138 -0
- package/llbot.js.map +1 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/lib/commands.d.ts +86 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/lib/commands.js +1 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/lib/config.d.ts +14 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/lib/config.js +1 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/lib/ffmpeg.d.ts +41 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/lib/ffmpeg.js +1 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/lib/http.d.ts +88 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/lib/http.js +1 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/lib/index.d.ts +17 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/lib/index.js +6 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/lib/internal.d.ts +430 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/lib/internal.js +7 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/lib/manifest.d.ts +68 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/lib/manifest.js +1 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/lib/server.d.ts +23 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/lib/server.js +1 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/lib/storage.d.ts +21 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/lib/storage.js +1 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/lib/testing.d.ts +71 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/lib/testing.js +1123 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/lib/universal.d.ts +299 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/lib/universal.js +1 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/lib/webui.d.ts +762 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/lib/webui.js +9 -0
- package/node_modules/@luckylillia-dev/plugin-sdk/package.json +63 -0
- package/node_modules/@satorijs/element/jsx-dev-runtime.d.ts +3 -0
- package/node_modules/@satorijs/element/jsx-runtime.d.ts +3 -0
- package/node_modules/@satorijs/element/lib/index.cjs +447 -0
- package/node_modules/@satorijs/element/lib/index.d.ts +116 -0
- package/node_modules/@satorijs/element/lib/index.mjs +455 -0
- package/node_modules/@satorijs/element/package.json +60 -0
- package/node_modules/@satorijs/element/src/index.ts +559 -0
- package/node_modules/@satorijs/protocol/lib/index.cjs +187 -0
- package/node_modules/@satorijs/protocol/lib/index.d.ts +328 -0
- package/node_modules/@satorijs/protocol/lib/index.mjs +148 -0
- package/node_modules/@satorijs/protocol/package.json +44 -0
- package/node_modules/@satorijs/protocol/src/index.ts +513 -0
- package/node_modules/@standard-schema/spec/LICENSE +21 -0
- package/node_modules/@standard-schema/spec/README.md +198 -0
- package/node_modules/@standard-schema/spec/dist/index.cjs +18 -0
- package/node_modules/@standard-schema/spec/dist/index.d.cts +119 -0
- package/node_modules/@standard-schema/spec/dist/index.d.ts +119 -0
- package/node_modules/@standard-schema/spec/dist/index.js +0 -0
- package/node_modules/@standard-schema/spec/package.json +52 -0
- package/node_modules/cordis/README.md +10 -0
- package/node_modules/cordis/bin.js +16 -0
- package/node_modules/cordis/lib/context.d.ts +32 -0
- package/node_modules/cordis/lib/events.d.ts +62 -0
- package/node_modules/cordis/lib/fiber.d.ts +85 -0
- package/node_modules/cordis/lib/index.d.ts +7 -0
- package/node_modules/cordis/lib/index.js +1577 -0
- package/node_modules/cordis/lib/logger.d.ts +74 -0
- package/node_modules/cordis/lib/reflect.d.ts +54 -0
- package/node_modules/cordis/lib/registry.d.ts +78 -0
- package/node_modules/cordis/lib/service.d.ts +19 -0
- package/node_modules/cordis/lib/utils.d.ts +50 -0
- package/node_modules/cordis/package.json +49 -0
- package/node_modules/cosmokit/LICENSE +21 -0
- package/node_modules/cosmokit/README.md +24 -0
- package/node_modules/cosmokit/lib/index.cjs +419 -0
- package/node_modules/cosmokit/lib/index.cjs.map +6 -0
- package/node_modules/cosmokit/lib/index.d.ts +142 -0
- package/node_modules/cosmokit/lib/index.mjs +357 -0
- package/node_modules/cosmokit/lib/index.mjs.map +6 -0
- package/node_modules/cosmokit/package.json +57 -0
- package/node_modules/cosmokit/src/array.ts +35 -0
- package/node_modules/cosmokit/src/index.ts +5 -0
- package/node_modules/cosmokit/src/misc.ts +57 -0
- package/node_modules/cosmokit/src/string.ts +101 -0
- package/node_modules/cosmokit/src/time.ts +91 -0
- package/node_modules/cosmokit/src/types.ts +131 -0
- package/node_modules/schemastery/README.md +342 -0
- package/node_modules/schemastery/lib/index.cjs +648 -0
- package/node_modules/schemastery/lib/index.cjs.map +6 -0
- package/node_modules/schemastery/lib/index.d.ts +138 -0
- package/node_modules/schemastery/lib/index.mjs +656 -0
- package/node_modules/schemastery/lib/index.mjs.map +6 -0
- package/node_modules/schemastery/package.json +32 -0
- package/node_modules/schemastery/src/index.ts +841 -0
- package/node_modules/undici/LICENSE +21 -0
- package/node_modules/undici/README.md +741 -0
- package/node_modules/undici/docs/docs/api/Agent.md +84 -0
- package/node_modules/undici/docs/docs/api/BalancedPool.md +99 -0
- package/node_modules/undici/docs/docs/api/CacheStorage.md +30 -0
- package/node_modules/undici/docs/docs/api/CacheStore.md +164 -0
- package/node_modules/undici/docs/docs/api/Client.md +290 -0
- package/node_modules/undici/docs/docs/api/ClientStats.md +27 -0
- package/node_modules/undici/docs/docs/api/Connector.md +115 -0
- package/node_modules/undici/docs/docs/api/ContentType.md +57 -0
- package/node_modules/undici/docs/docs/api/Cookies.md +128 -0
- package/node_modules/undici/docs/docs/api/Debug.md +62 -0
- package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +317 -0
- package/node_modules/undici/docs/docs/api/Dispatcher.md +1393 -0
- package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +159 -0
- package/node_modules/undici/docs/docs/api/Errors.md +49 -0
- package/node_modules/undici/docs/docs/api/EventSource.md +45 -0
- package/node_modules/undici/docs/docs/api/Fetch.md +60 -0
- package/node_modules/undici/docs/docs/api/GlobalInstallation.md +139 -0
- package/node_modules/undici/docs/docs/api/H2CClient.md +263 -0
- package/node_modules/undici/docs/docs/api/MockAgent.md +603 -0
- package/node_modules/undici/docs/docs/api/MockCallHistory.md +197 -0
- package/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +43 -0
- package/node_modules/undici/docs/docs/api/MockClient.md +81 -0
- package/node_modules/undici/docs/docs/api/MockErrors.md +12 -0
- package/node_modules/undici/docs/docs/api/MockPool.md +555 -0
- package/node_modules/undici/docs/docs/api/Pool.md +84 -0
- package/node_modules/undici/docs/docs/api/PoolStats.md +35 -0
- package/node_modules/undici/docs/docs/api/ProxyAgent.md +229 -0
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +93 -0
- package/node_modules/undici/docs/docs/api/RetryAgent.md +50 -0
- package/node_modules/undici/docs/docs/api/RetryHandler.md +118 -0
- package/node_modules/undici/docs/docs/api/RoundRobinPool.md +145 -0
- package/node_modules/undici/docs/docs/api/SnapshotAgent.md +616 -0
- package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +275 -0
- package/node_modules/undici/docs/docs/api/Util.md +25 -0
- package/node_modules/undici/docs/docs/api/WebSocket.md +141 -0
- package/node_modules/undici/docs/docs/api/api-lifecycle.md +91 -0
- package/node_modules/undici/docs/docs/best-practices/client-certificate.md +64 -0
- package/node_modules/undici/docs/docs/best-practices/crawling.md +58 -0
- package/node_modules/undici/docs/docs/best-practices/mocking-request.md +190 -0
- package/node_modules/undici/docs/docs/best-practices/proxy.md +127 -0
- package/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +224 -0
- package/node_modules/undici/docs/docs/best-practices/writing-tests.md +63 -0
- package/node_modules/undici/index-fetch.js +65 -0
- package/node_modules/undici/index.d.ts +3 -0
- package/node_modules/undici/index.js +234 -0
- package/node_modules/undici/lib/api/abort-signal.js +59 -0
- package/node_modules/undici/lib/api/api-connect.js +110 -0
- package/node_modules/undici/lib/api/api-pipeline.js +252 -0
- package/node_modules/undici/lib/api/api-request.js +214 -0
- package/node_modules/undici/lib/api/api-stream.js +209 -0
- package/node_modules/undici/lib/api/api-upgrade.js +111 -0
- package/node_modules/undici/lib/api/index.js +7 -0
- package/node_modules/undici/lib/api/readable.js +580 -0
- package/node_modules/undici/lib/cache/memory-cache-store.js +279 -0
- package/node_modules/undici/lib/cache/sqlite-cache-store.js +467 -0
- package/node_modules/undici/lib/core/connect.js +159 -0
- package/node_modules/undici/lib/core/constants.js +143 -0
- package/node_modules/undici/lib/core/diagnostics.js +227 -0
- package/node_modules/undici/lib/core/errors.js +477 -0
- package/node_modules/undici/lib/core/request.js +485 -0
- package/node_modules/undici/lib/core/socks5-client.js +422 -0
- package/node_modules/undici/lib/core/socks5-utils.js +212 -0
- package/node_modules/undici/lib/core/symbols.js +76 -0
- package/node_modules/undici/lib/core/tree.js +160 -0
- package/node_modules/undici/lib/core/util.js +992 -0
- package/node_modules/undici/lib/dispatcher/agent.js +162 -0
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +221 -0
- package/node_modules/undici/lib/dispatcher/client-h1.js +1744 -0
- package/node_modules/undici/lib/dispatcher/client-h2.js +1056 -0
- package/node_modules/undici/lib/dispatcher/client.js +669 -0
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +196 -0
- package/node_modules/undici/lib/dispatcher/dispatcher.js +48 -0
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +146 -0
- package/node_modules/undici/lib/dispatcher/fixed-queue.js +135 -0
- package/node_modules/undici/lib/dispatcher/h2c-client.js +51 -0
- package/node_modules/undici/lib/dispatcher/pool-base.js +214 -0
- package/node_modules/undici/lib/dispatcher/pool.js +118 -0
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +319 -0
- package/node_modules/undici/lib/dispatcher/retry-agent.js +35 -0
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +137 -0
- package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +260 -0
- package/node_modules/undici/lib/encoding/index.js +33 -0
- package/node_modules/undici/lib/global.js +59 -0
- package/node_modules/undici/lib/handler/cache-handler.js +824 -0
- package/node_modules/undici/lib/handler/cache-revalidation-handler.js +124 -0
- package/node_modules/undici/lib/handler/decorator-handler.js +67 -0
- package/node_modules/undici/lib/handler/deduplication-handler.js +504 -0
- package/node_modules/undici/lib/handler/redirect-handler.js +245 -0
- package/node_modules/undici/lib/handler/retry-handler.js +504 -0
- package/node_modules/undici/lib/handler/unwrap-handler.js +106 -0
- package/node_modules/undici/lib/handler/wrap-handler.js +105 -0
- package/node_modules/undici/lib/interceptor/cache.js +621 -0
- package/node_modules/undici/lib/interceptor/decompress.js +561 -0
- package/node_modules/undici/lib/interceptor/deduplicate.js +117 -0
- package/node_modules/undici/lib/interceptor/dns.js +571 -0
- package/node_modules/undici/lib/interceptor/dump.js +99 -0
- package/node_modules/undici/lib/interceptor/redirect.js +21 -0
- package/node_modules/undici/lib/interceptor/response-error.js +95 -0
- package/node_modules/undici/lib/interceptor/retry.js +19 -0
- package/node_modules/undici/lib/llhttp/constants.d.ts +195 -0
- package/node_modules/undici/lib/llhttp/constants.js +531 -0
- package/node_modules/undici/lib/llhttp/llhttp-wasm.js +15 -0
- package/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +15 -0
- package/node_modules/undici/lib/llhttp/utils.d.ts +2 -0
- package/node_modules/undici/lib/llhttp/utils.js +12 -0
- package/node_modules/undici/lib/mock/mock-agent.js +232 -0
- package/node_modules/undici/lib/mock/mock-call-history.js +248 -0
- package/node_modules/undici/lib/mock/mock-client.js +68 -0
- package/node_modules/undici/lib/mock/mock-errors.js +29 -0
- package/node_modules/undici/lib/mock/mock-interceptor.js +209 -0
- package/node_modules/undici/lib/mock/mock-pool.js +68 -0
- package/node_modules/undici/lib/mock/mock-symbols.js +32 -0
- package/node_modules/undici/lib/mock/mock-utils.js +486 -0
- package/node_modules/undici/lib/mock/pending-interceptors-formatter.js +43 -0
- package/node_modules/undici/lib/mock/snapshot-agent.js +353 -0
- package/node_modules/undici/lib/mock/snapshot-recorder.js +588 -0
- package/node_modules/undici/lib/mock/snapshot-utils.js +158 -0
- package/node_modules/undici/lib/util/cache.js +676 -0
- package/node_modules/undici/lib/util/date.js +670 -0
- package/node_modules/undici/lib/util/promise.js +28 -0
- package/node_modules/undici/lib/util/runtime-features.js +124 -0
- package/node_modules/undici/lib/util/stats.js +32 -0
- package/node_modules/undici/lib/util/timers.js +425 -0
- package/node_modules/undici/lib/web/cache/cache.js +864 -0
- package/node_modules/undici/lib/web/cache/cachestorage.js +152 -0
- package/node_modules/undici/lib/web/cache/util.js +45 -0
- package/node_modules/undici/lib/web/cookies/constants.js +12 -0
- package/node_modules/undici/lib/web/cookies/index.js +201 -0
- package/node_modules/undici/lib/web/cookies/parse.js +315 -0
- package/node_modules/undici/lib/web/cookies/util.js +371 -0
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +575 -0
- package/node_modules/undici/lib/web/eventsource/eventsource.js +504 -0
- package/node_modules/undici/lib/web/eventsource/util.js +29 -0
- package/node_modules/undici/lib/web/fetch/LICENSE +21 -0
- package/node_modules/undici/lib/web/fetch/body.js +509 -0
- package/node_modules/undici/lib/web/fetch/constants.js +131 -0
- package/node_modules/undici/lib/web/fetch/data-url.js +596 -0
- package/node_modules/undici/lib/web/fetch/formdata-parser.js +586 -0
- package/node_modules/undici/lib/web/fetch/formdata.js +259 -0
- package/node_modules/undici/lib/web/fetch/global.js +40 -0
- package/node_modules/undici/lib/web/fetch/headers.js +719 -0
- package/node_modules/undici/lib/web/fetch/index.js +2413 -0
- package/node_modules/undici/lib/web/fetch/request.js +1115 -0
- package/node_modules/undici/lib/web/fetch/response.js +641 -0
- package/node_modules/undici/lib/web/fetch/util.js +1522 -0
- package/node_modules/undici/lib/web/infra/index.js +243 -0
- package/node_modules/undici/lib/web/subresource-integrity/Readme.md +9 -0
- package/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +307 -0
- package/node_modules/undici/lib/web/webidl/index.js +1006 -0
- package/node_modules/undici/lib/web/websocket/connection.js +339 -0
- package/node_modules/undici/lib/web/websocket/constants.js +126 -0
- package/node_modules/undici/lib/web/websocket/events.js +331 -0
- package/node_modules/undici/lib/web/websocket/frame.js +133 -0
- package/node_modules/undici/lib/web/websocket/permessage-deflate.js +105 -0
- package/node_modules/undici/lib/web/websocket/receiver.js +520 -0
- package/node_modules/undici/lib/web/websocket/sender.js +109 -0
- package/node_modules/undici/lib/web/websocket/stream/websocketerror.js +104 -0
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +496 -0
- package/node_modules/undici/lib/web/websocket/util.js +347 -0
- package/node_modules/undici/lib/web/websocket/websocket.js +758 -0
- package/node_modules/undici/package.json +152 -0
- package/node_modules/undici/scripts/strip-comments.js +10 -0
- package/node_modules/undici/types/README.md +6 -0
- package/node_modules/undici/types/agent.d.ts +32 -0
- package/node_modules/undici/types/api.d.ts +43 -0
- package/node_modules/undici/types/balanced-pool.d.ts +30 -0
- package/node_modules/undici/types/cache-interceptor.d.ts +179 -0
- package/node_modules/undici/types/cache.d.ts +36 -0
- package/node_modules/undici/types/client-stats.d.ts +15 -0
- package/node_modules/undici/types/client.d.ts +153 -0
- package/node_modules/undici/types/connector.d.ts +36 -0
- package/node_modules/undici/types/content-type.d.ts +21 -0
- package/node_modules/undici/types/cookies.d.ts +30 -0
- package/node_modules/undici/types/diagnostics-channel.d.ts +74 -0
- package/node_modules/undici/types/dispatcher.d.ts +275 -0
- package/node_modules/undici/types/env-http-proxy-agent.d.ts +22 -0
- package/node_modules/undici/types/errors.d.ts +177 -0
- package/node_modules/undici/types/eventsource.d.ts +66 -0
- package/node_modules/undici/types/fetch.d.ts +231 -0
- package/node_modules/undici/types/formdata.d.ts +114 -0
- package/node_modules/undici/types/global-dispatcher.d.ts +9 -0
- package/node_modules/undici/types/global-origin.d.ts +7 -0
- package/node_modules/undici/types/h2c-client.d.ts +73 -0
- package/node_modules/undici/types/handlers.d.ts +14 -0
- package/node_modules/undici/types/header.d.ts +160 -0
- package/node_modules/undici/types/index.d.ts +91 -0
- package/node_modules/undici/types/interceptors.d.ts +82 -0
- package/node_modules/undici/types/mock-agent.d.ts +68 -0
- package/node_modules/undici/types/mock-call-history.d.ts +111 -0
- package/node_modules/undici/types/mock-client.d.ts +27 -0
- package/node_modules/undici/types/mock-errors.d.ts +12 -0
- package/node_modules/undici/types/mock-interceptor.d.ts +94 -0
- package/node_modules/undici/types/mock-pool.d.ts +27 -0
- package/node_modules/undici/types/patch.d.ts +29 -0
- package/node_modules/undici/types/pool-stats.d.ts +19 -0
- package/node_modules/undici/types/pool.d.ts +41 -0
- package/node_modules/undici/types/proxy-agent.d.ts +29 -0
- package/node_modules/undici/types/readable.d.ts +68 -0
- package/node_modules/undici/types/retry-agent.d.ts +8 -0
- package/node_modules/undici/types/retry-handler.d.ts +125 -0
- package/node_modules/undici/types/round-robin-pool.d.ts +41 -0
- package/node_modules/undici/types/snapshot-agent.d.ts +109 -0
- package/node_modules/undici/types/socks5-proxy-agent.d.ts +25 -0
- package/node_modules/undici/types/util.d.ts +18 -0
- package/node_modules/undici/types/utility.d.ts +7 -0
- package/node_modules/undici/types/webidl.d.ts +347 -0
- package/node_modules/undici/types/websocket.d.ts +188 -0
- package/node_modules/ws/LICENSE +20 -0
- package/node_modules/ws/README.md +548 -0
- package/node_modules/ws/browser.js +8 -0
- package/node_modules/ws/index.js +22 -0
- package/node_modules/ws/lib/buffer-util.js +131 -0
- package/node_modules/ws/lib/constants.js +19 -0
- package/node_modules/ws/lib/event-target.js +292 -0
- package/node_modules/ws/lib/extension.js +203 -0
- package/node_modules/ws/lib/limiter.js +55 -0
- package/node_modules/ws/lib/permessage-deflate.js +530 -0
- package/node_modules/ws/lib/receiver.js +743 -0
- package/node_modules/ws/lib/sender.js +607 -0
- package/node_modules/ws/lib/stream.js +161 -0
- package/node_modules/ws/lib/subprotocol.js +62 -0
- package/node_modules/ws/lib/validation.js +152 -0
- package/node_modules/ws/lib/websocket-server.js +562 -0
- package/node_modules/ws/lib/websocket.js +1407 -0
- package/node_modules/ws/package.json +74 -0
- package/node_modules/ws/wrapper.mjs +21 -0
- package/package.json +17 -4
- package/webui/assets/group-bot-profile-CYK81678.jpg +0 -0
- package/webui/assets/group-bot-settings-BBQBbfgh.jpg +0 -0
- package/webui/assets/index-CuH0UYYo.js +28 -0
- package/webui/assets/index-DjbPiYmB.css +2 -0
- package/webui/favicon.ico +0 -0
- package/webui/index.html +26 -0
- package/webui/logo-128.webp +0 -0
- package/webui/logo-192.webp +0 -0
- package/webui/logo-256.webp +0 -0
- package/webui/logo-64.webp +0 -0
- package/webui/logo.jpg +0 -0
- package/webui/plugin-shared/plugin-sdk-webui.js +3 -0
- package/webui/plugin-shared/react-dom.js +3 -0
- package/webui/plugin-shared/react-jsx-runtime.js +3 -0
- package/webui/plugin-shared/react.js +3 -0
- package//344/275/277/347/224/250/350/257/264/346/230/216.txt +6 -0
- package//346/233/264/346/226/260/346/227/245/345/277/227.txt +1091 -0
- package/README.md +0 -3
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
Binary: () => Binary,
|
|
24
|
+
Time: () => Time,
|
|
25
|
+
arrayBufferToBase64: () => arrayBufferToBase64,
|
|
26
|
+
arrayBufferToHex: () => arrayBufferToHex,
|
|
27
|
+
base64ToArrayBuffer: () => base64ToArrayBuffer,
|
|
28
|
+
camelCase: () => camelCase,
|
|
29
|
+
camelize: () => camelize,
|
|
30
|
+
capitalize: () => capitalize,
|
|
31
|
+
clone: () => clone,
|
|
32
|
+
contain: () => contain,
|
|
33
|
+
deduplicate: () => deduplicate,
|
|
34
|
+
deepEqual: () => deepEqual,
|
|
35
|
+
defineProperty: () => defineProperty,
|
|
36
|
+
difference: () => difference,
|
|
37
|
+
filterKeys: () => filterKeys,
|
|
38
|
+
formatProperty: () => formatProperty,
|
|
39
|
+
hexToArrayBuffer: () => hexToArrayBuffer,
|
|
40
|
+
hyphenate: () => hyphenate,
|
|
41
|
+
intersection: () => intersection,
|
|
42
|
+
is: () => is,
|
|
43
|
+
isNonNullable: () => isNonNullable,
|
|
44
|
+
isNullable: () => isNullable,
|
|
45
|
+
isPlainObject: () => isPlainObject,
|
|
46
|
+
makeArray: () => makeArray,
|
|
47
|
+
mapValues: () => mapValues,
|
|
48
|
+
noop: () => noop,
|
|
49
|
+
omit: () => omit,
|
|
50
|
+
paramCase: () => paramCase,
|
|
51
|
+
pick: () => pick,
|
|
52
|
+
remove: () => remove,
|
|
53
|
+
sanitize: () => sanitize,
|
|
54
|
+
snakeCase: () => snakeCase,
|
|
55
|
+
trimSlash: () => trimSlash,
|
|
56
|
+
uncapitalize: () => uncapitalize,
|
|
57
|
+
union: () => union,
|
|
58
|
+
valueMap: () => mapValues
|
|
59
|
+
});
|
|
60
|
+
module.exports = __toCommonJS(index_exports);
|
|
61
|
+
|
|
62
|
+
// src/misc.ts
|
|
63
|
+
function noop() {
|
|
64
|
+
}
|
|
65
|
+
function isNullable(value) {
|
|
66
|
+
return value === null || value === void 0;
|
|
67
|
+
}
|
|
68
|
+
function isNonNullable(value) {
|
|
69
|
+
return !isNullable(value);
|
|
70
|
+
}
|
|
71
|
+
function isPlainObject(data) {
|
|
72
|
+
return data && typeof data === "object" && !Array.isArray(data);
|
|
73
|
+
}
|
|
74
|
+
function filterKeys(object, filter) {
|
|
75
|
+
return Object.fromEntries(Object.entries(object).filter(([key, value]) => filter(key, value)));
|
|
76
|
+
}
|
|
77
|
+
function mapValues(object, transform) {
|
|
78
|
+
return Object.fromEntries(Object.entries(object).map(([key, value]) => [key, transform(value, key)]));
|
|
79
|
+
}
|
|
80
|
+
function pick(source, keys, forced) {
|
|
81
|
+
if (!keys) return { ...source };
|
|
82
|
+
const result = {};
|
|
83
|
+
for (const key of keys) {
|
|
84
|
+
if (forced || source[key] !== void 0) result[key] = source[key];
|
|
85
|
+
}
|
|
86
|
+
return result;
|
|
87
|
+
}
|
|
88
|
+
function omit(source, keys) {
|
|
89
|
+
if (!keys) return { ...source };
|
|
90
|
+
const result = { ...source };
|
|
91
|
+
for (const key of keys) {
|
|
92
|
+
Reflect.deleteProperty(result, key);
|
|
93
|
+
}
|
|
94
|
+
return result;
|
|
95
|
+
}
|
|
96
|
+
function defineProperty(object, key, value) {
|
|
97
|
+
return Object.defineProperty(object, key, { writable: true, value, enumerable: false });
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// src/array.ts
|
|
101
|
+
function contain(array1, array2) {
|
|
102
|
+
return array2.every((item) => array1.includes(item));
|
|
103
|
+
}
|
|
104
|
+
function intersection(array1, array2) {
|
|
105
|
+
return array1.filter((item) => array2.includes(item));
|
|
106
|
+
}
|
|
107
|
+
function difference(array1, array2) {
|
|
108
|
+
return array1.filter((item) => !array2.includes(item));
|
|
109
|
+
}
|
|
110
|
+
function union(array1, array2) {
|
|
111
|
+
return Array.from(/* @__PURE__ */ new Set([...array1, ...array2]));
|
|
112
|
+
}
|
|
113
|
+
function deduplicate(array) {
|
|
114
|
+
return [...new Set(array)];
|
|
115
|
+
}
|
|
116
|
+
function remove(list, item) {
|
|
117
|
+
const index = list?.indexOf(item);
|
|
118
|
+
if (index >= 0) {
|
|
119
|
+
list.splice(index, 1);
|
|
120
|
+
return true;
|
|
121
|
+
} else {
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
function makeArray(source) {
|
|
126
|
+
return Array.isArray(source) ? source : isNullable(source) ? [] : [source];
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// src/types.ts
|
|
130
|
+
function is(type, value) {
|
|
131
|
+
if (arguments.length === 1) return (value2) => is(type, value2);
|
|
132
|
+
return type in globalThis && value instanceof globalThis[type] || Object.prototype.toString.call(value).slice(8, -1) === type;
|
|
133
|
+
}
|
|
134
|
+
function isArrayBufferLike(value) {
|
|
135
|
+
return is("ArrayBuffer", value) || is("SharedArrayBuffer", value);
|
|
136
|
+
}
|
|
137
|
+
function isArrayBufferSource(value) {
|
|
138
|
+
return isArrayBufferLike(value) || ArrayBuffer.isView(value);
|
|
139
|
+
}
|
|
140
|
+
var Binary;
|
|
141
|
+
((Binary2) => {
|
|
142
|
+
Binary2.is = isArrayBufferLike;
|
|
143
|
+
Binary2.isSource = isArrayBufferSource;
|
|
144
|
+
function fromSource(source) {
|
|
145
|
+
if (ArrayBuffer.isView(source)) {
|
|
146
|
+
return source.buffer.slice(source.byteOffset, source.byteOffset + source.byteLength);
|
|
147
|
+
} else {
|
|
148
|
+
return source;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
Binary2.fromSource = fromSource;
|
|
152
|
+
function toBase64(source) {
|
|
153
|
+
source = fromSource(source);
|
|
154
|
+
if (typeof Buffer !== "undefined") {
|
|
155
|
+
return Buffer.from(source).toString("base64");
|
|
156
|
+
}
|
|
157
|
+
let binary = "";
|
|
158
|
+
const bytes = new Uint8Array(source);
|
|
159
|
+
for (let i = 0; i < bytes.byteLength; i++) {
|
|
160
|
+
binary += String.fromCharCode(bytes[i]);
|
|
161
|
+
}
|
|
162
|
+
return btoa(binary);
|
|
163
|
+
}
|
|
164
|
+
Binary2.toBase64 = toBase64;
|
|
165
|
+
function fromBase64(source) {
|
|
166
|
+
if (typeof Buffer !== "undefined") return fromSource(Buffer.from(source, "base64"));
|
|
167
|
+
return Uint8Array.from(atob(source), (c) => c.charCodeAt(0));
|
|
168
|
+
}
|
|
169
|
+
Binary2.fromBase64 = fromBase64;
|
|
170
|
+
function toHex(source) {
|
|
171
|
+
source = fromSource(source);
|
|
172
|
+
if (typeof Buffer !== "undefined") return Buffer.from(source).toString("hex");
|
|
173
|
+
return Array.from(new Uint8Array(source), (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
174
|
+
}
|
|
175
|
+
Binary2.toHex = toHex;
|
|
176
|
+
function fromHex(source) {
|
|
177
|
+
if (typeof Buffer !== "undefined") return fromSource(Buffer.from(source, "hex"));
|
|
178
|
+
const hex = source.length % 2 === 0 ? source : source.slice(0, source.length - 1);
|
|
179
|
+
const buffer = [];
|
|
180
|
+
for (let i = 0; i < hex.length; i += 2) {
|
|
181
|
+
buffer.push(parseInt(`${hex[i]}${hex[i + 1]}`, 16));
|
|
182
|
+
}
|
|
183
|
+
return Uint8Array.from(buffer).buffer;
|
|
184
|
+
}
|
|
185
|
+
Binary2.fromHex = fromHex;
|
|
186
|
+
})(Binary || (Binary = {}));
|
|
187
|
+
var base64ToArrayBuffer = Binary.fromBase64;
|
|
188
|
+
var arrayBufferToBase64 = Binary.toBase64;
|
|
189
|
+
var hexToArrayBuffer = Binary.fromHex;
|
|
190
|
+
var arrayBufferToHex = Binary.toHex;
|
|
191
|
+
function clone(source, refs = /* @__PURE__ */ new Map()) {
|
|
192
|
+
if (!source || typeof source !== "object") return source;
|
|
193
|
+
if (is("Date", source)) return new Date(source.valueOf());
|
|
194
|
+
if (is("RegExp", source)) return new RegExp(source.source, source.flags);
|
|
195
|
+
if (isArrayBufferLike(source)) return source.slice(0);
|
|
196
|
+
if (ArrayBuffer.isView(source)) return source.buffer.slice(source.byteOffset, source.byteOffset + source.byteLength);
|
|
197
|
+
const cached = refs.get(source);
|
|
198
|
+
if (cached) return cached;
|
|
199
|
+
if (Array.isArray(source)) {
|
|
200
|
+
const result2 = [];
|
|
201
|
+
refs.set(source, result2);
|
|
202
|
+
source.forEach((value, index) => {
|
|
203
|
+
result2[index] = Reflect.apply(clone, null, [value, refs]);
|
|
204
|
+
});
|
|
205
|
+
return result2;
|
|
206
|
+
}
|
|
207
|
+
const result = Object.create(Object.getPrototypeOf(source));
|
|
208
|
+
refs.set(source, result);
|
|
209
|
+
for (const key of Reflect.ownKeys(source)) {
|
|
210
|
+
const descriptor = { ...Reflect.getOwnPropertyDescriptor(source, key) };
|
|
211
|
+
if ("value" in descriptor) {
|
|
212
|
+
descriptor.value = Reflect.apply(clone, null, [descriptor.value, refs]);
|
|
213
|
+
}
|
|
214
|
+
Reflect.defineProperty(result, key, descriptor);
|
|
215
|
+
}
|
|
216
|
+
return result;
|
|
217
|
+
}
|
|
218
|
+
function deepEqual(a, b, strict) {
|
|
219
|
+
if (a === b) return true;
|
|
220
|
+
if (!strict && isNullable(a) && isNullable(b)) return true;
|
|
221
|
+
if (typeof a !== typeof b) return false;
|
|
222
|
+
if (typeof a !== "object") return false;
|
|
223
|
+
if (!a || !b) return false;
|
|
224
|
+
function check(test, then) {
|
|
225
|
+
return test(a) ? test(b) ? then(a, b) : false : test(b) ? false : void 0;
|
|
226
|
+
}
|
|
227
|
+
return check(Array.isArray, (a2, b2) => a2.length === b2.length && a2.every((item, index) => deepEqual(item, b2[index]))) ?? check(is("Date"), (a2, b2) => a2.valueOf() === b2.valueOf()) ?? check(is("RegExp"), (a2, b2) => a2.source === b2.source && a2.flags === b2.flags) ?? check(isArrayBufferLike, (a2, b2) => {
|
|
228
|
+
if (a2.byteLength !== b2.byteLength) return false;
|
|
229
|
+
const viewA = new Uint8Array(a2);
|
|
230
|
+
const viewB = new Uint8Array(b2);
|
|
231
|
+
for (let i = 0; i < viewA.length; i++) {
|
|
232
|
+
if (viewA[i] !== viewB[i]) return false;
|
|
233
|
+
}
|
|
234
|
+
return true;
|
|
235
|
+
}) ?? Object.keys({ ...a, ...b }).every((key) => deepEqual(a[key], b[key], strict));
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// src/string.ts
|
|
239
|
+
function capitalize(source) {
|
|
240
|
+
return source.charAt(0).toUpperCase() + source.slice(1);
|
|
241
|
+
}
|
|
242
|
+
function uncapitalize(source) {
|
|
243
|
+
return source.charAt(0).toLowerCase() + source.slice(1);
|
|
244
|
+
}
|
|
245
|
+
function camelCase(source) {
|
|
246
|
+
return source.replace(/[_-][a-z]/g, (str) => str.slice(1).toUpperCase());
|
|
247
|
+
}
|
|
248
|
+
function tokenize(source, delimiters, delimiter) {
|
|
249
|
+
const output = [];
|
|
250
|
+
let state = 0 /* DELIM */;
|
|
251
|
+
for (let i = 0; i < source.length; i++) {
|
|
252
|
+
const code = source.charCodeAt(i);
|
|
253
|
+
if (code >= 65 && code <= 90) {
|
|
254
|
+
if (state === 1 /* UPPER */) {
|
|
255
|
+
const next = source.charCodeAt(i + 1);
|
|
256
|
+
if (next >= 97 && next <= 122) {
|
|
257
|
+
output.push(delimiter);
|
|
258
|
+
}
|
|
259
|
+
output.push(code + 32);
|
|
260
|
+
} else {
|
|
261
|
+
if (state !== 0 /* DELIM */) {
|
|
262
|
+
output.push(delimiter);
|
|
263
|
+
}
|
|
264
|
+
output.push(code + 32);
|
|
265
|
+
}
|
|
266
|
+
state = 1 /* UPPER */;
|
|
267
|
+
} else if (code >= 97 && code <= 122) {
|
|
268
|
+
output.push(code);
|
|
269
|
+
state = 2 /* LOWER */;
|
|
270
|
+
} else if (delimiters.includes(code)) {
|
|
271
|
+
if (state !== 0 /* DELIM */) {
|
|
272
|
+
output.push(delimiter);
|
|
273
|
+
}
|
|
274
|
+
state = 0 /* DELIM */;
|
|
275
|
+
} else {
|
|
276
|
+
output.push(code);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
return String.fromCharCode(...output);
|
|
280
|
+
}
|
|
281
|
+
function paramCase(source) {
|
|
282
|
+
return tokenize(source, [45, 95], 45);
|
|
283
|
+
}
|
|
284
|
+
function snakeCase(source) {
|
|
285
|
+
return tokenize(source, [45, 95], 95);
|
|
286
|
+
}
|
|
287
|
+
var camelize = camelCase;
|
|
288
|
+
var hyphenate = paramCase;
|
|
289
|
+
function formatProperty(key) {
|
|
290
|
+
if (typeof key !== "string") return `[${key.toString()}]`;
|
|
291
|
+
return /^[a-z_$][\w$]*$/i.test(key) ? `.${key}` : `[${JSON.stringify(key)}]`;
|
|
292
|
+
}
|
|
293
|
+
function trimSlash(source) {
|
|
294
|
+
return source.replace(/\/$/, "");
|
|
295
|
+
}
|
|
296
|
+
function sanitize(source) {
|
|
297
|
+
if (!source.startsWith("/")) source = "/" + source;
|
|
298
|
+
return trimSlash(source);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// src/time.ts
|
|
302
|
+
var Time;
|
|
303
|
+
((Time2) => {
|
|
304
|
+
Time2.millisecond = 1;
|
|
305
|
+
Time2.second = 1e3;
|
|
306
|
+
Time2.minute = Time2.second * 60;
|
|
307
|
+
Time2.hour = Time2.minute * 60;
|
|
308
|
+
Time2.day = Time2.hour * 24;
|
|
309
|
+
Time2.week = Time2.day * 7;
|
|
310
|
+
let timezoneOffset = (/* @__PURE__ */ new Date()).getTimezoneOffset();
|
|
311
|
+
function setTimezoneOffset(offset) {
|
|
312
|
+
timezoneOffset = offset;
|
|
313
|
+
}
|
|
314
|
+
Time2.setTimezoneOffset = setTimezoneOffset;
|
|
315
|
+
function getTimezoneOffset() {
|
|
316
|
+
return timezoneOffset;
|
|
317
|
+
}
|
|
318
|
+
Time2.getTimezoneOffset = getTimezoneOffset;
|
|
319
|
+
function getDateNumber(date = /* @__PURE__ */ new Date(), offset) {
|
|
320
|
+
if (typeof date === "number") date = new Date(date);
|
|
321
|
+
if (offset === void 0) offset = timezoneOffset;
|
|
322
|
+
return Math.floor((date.valueOf() / Time2.minute - offset) / 1440);
|
|
323
|
+
}
|
|
324
|
+
Time2.getDateNumber = getDateNumber;
|
|
325
|
+
function fromDateNumber(value, offset) {
|
|
326
|
+
const date = new Date(value * Time2.day);
|
|
327
|
+
if (offset === void 0) offset = timezoneOffset;
|
|
328
|
+
return new Date(+date + offset * Time2.minute);
|
|
329
|
+
}
|
|
330
|
+
Time2.fromDateNumber = fromDateNumber;
|
|
331
|
+
const numeric = /\d+(?:\.\d+)?/.source;
|
|
332
|
+
const timeRegExp = new RegExp(`^${[
|
|
333
|
+
"w(?:eek(?:s)?)?",
|
|
334
|
+
"d(?:ay(?:s)?)?",
|
|
335
|
+
"h(?:our(?:s)?)?",
|
|
336
|
+
"m(?:in(?:ute)?(?:s)?)?",
|
|
337
|
+
"s(?:ec(?:ond)?(?:s)?)?"
|
|
338
|
+
].map((unit) => `(${numeric}${unit})?`).join("")}$`);
|
|
339
|
+
function parseTime(source) {
|
|
340
|
+
const capture = timeRegExp.exec(source);
|
|
341
|
+
if (!capture) return 0;
|
|
342
|
+
return (parseFloat(capture[1]) * Time2.week || 0) + (parseFloat(capture[2]) * Time2.day || 0) + (parseFloat(capture[3]) * Time2.hour || 0) + (parseFloat(capture[4]) * Time2.minute || 0) + (parseFloat(capture[5]) * Time2.second || 0);
|
|
343
|
+
}
|
|
344
|
+
Time2.parseTime = parseTime;
|
|
345
|
+
function parseDate(date) {
|
|
346
|
+
const parsed = parseTime(date);
|
|
347
|
+
if (parsed) {
|
|
348
|
+
date = Date.now() + parsed;
|
|
349
|
+
} else if (/^\d{1,2}(:\d{1,2}){1,2}$/.test(date)) {
|
|
350
|
+
date = `${(/* @__PURE__ */ new Date()).toLocaleDateString()}-${date}`;
|
|
351
|
+
} else if (/^\d{1,2}-\d{1,2}-\d{1,2}(:\d{1,2}){1,2}$/.test(date)) {
|
|
352
|
+
date = `${(/* @__PURE__ */ new Date()).getFullYear()}-${date}`;
|
|
353
|
+
}
|
|
354
|
+
return date ? new Date(date) : /* @__PURE__ */ new Date();
|
|
355
|
+
}
|
|
356
|
+
Time2.parseDate = parseDate;
|
|
357
|
+
function format(ms) {
|
|
358
|
+
const abs = Math.abs(ms);
|
|
359
|
+
if (abs >= Time2.day - Time2.hour / 2) {
|
|
360
|
+
return Math.round(ms / Time2.day) + "d";
|
|
361
|
+
} else if (abs >= Time2.hour - Time2.minute / 2) {
|
|
362
|
+
return Math.round(ms / Time2.hour) + "h";
|
|
363
|
+
} else if (abs >= Time2.minute - Time2.second / 2) {
|
|
364
|
+
return Math.round(ms / Time2.minute) + "m";
|
|
365
|
+
} else if (abs >= Time2.second) {
|
|
366
|
+
return Math.round(ms / Time2.second) + "s";
|
|
367
|
+
}
|
|
368
|
+
return ms + "ms";
|
|
369
|
+
}
|
|
370
|
+
Time2.format = format;
|
|
371
|
+
function toDigits(source, length = 2) {
|
|
372
|
+
return source.toString().padStart(length, "0");
|
|
373
|
+
}
|
|
374
|
+
Time2.toDigits = toDigits;
|
|
375
|
+
function template(template2, time = /* @__PURE__ */ new Date()) {
|
|
376
|
+
return template2.replace("yyyy", time.getFullYear().toString()).replace("yy", time.getFullYear().toString().slice(2)).replace("MM", toDigits(time.getMonth() + 1)).replace("dd", toDigits(time.getDate())).replace("hh", toDigits(time.getHours())).replace("mm", toDigits(time.getMinutes())).replace("ss", toDigits(time.getSeconds())).replace("SSS", toDigits(time.getMilliseconds(), 3));
|
|
377
|
+
}
|
|
378
|
+
Time2.template = template;
|
|
379
|
+
})(Time || (Time = {}));
|
|
380
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
381
|
+
0 && (module.exports = {
|
|
382
|
+
Binary,
|
|
383
|
+
Time,
|
|
384
|
+
arrayBufferToBase64,
|
|
385
|
+
arrayBufferToHex,
|
|
386
|
+
base64ToArrayBuffer,
|
|
387
|
+
camelCase,
|
|
388
|
+
camelize,
|
|
389
|
+
capitalize,
|
|
390
|
+
clone,
|
|
391
|
+
contain,
|
|
392
|
+
deduplicate,
|
|
393
|
+
deepEqual,
|
|
394
|
+
defineProperty,
|
|
395
|
+
difference,
|
|
396
|
+
filterKeys,
|
|
397
|
+
formatProperty,
|
|
398
|
+
hexToArrayBuffer,
|
|
399
|
+
hyphenate,
|
|
400
|
+
intersection,
|
|
401
|
+
is,
|
|
402
|
+
isNonNullable,
|
|
403
|
+
isNullable,
|
|
404
|
+
isPlainObject,
|
|
405
|
+
makeArray,
|
|
406
|
+
mapValues,
|
|
407
|
+
noop,
|
|
408
|
+
omit,
|
|
409
|
+
paramCase,
|
|
410
|
+
pick,
|
|
411
|
+
remove,
|
|
412
|
+
sanitize,
|
|
413
|
+
snakeCase,
|
|
414
|
+
trimSlash,
|
|
415
|
+
uncapitalize,
|
|
416
|
+
union,
|
|
417
|
+
valueMap
|
|
418
|
+
});
|
|
419
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/index.ts", "../src/misc.ts", "../src/array.ts", "../src/types.ts", "../src/string.ts", "../src/time.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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AgB,GAAG,CAAC,CAAC;AAAA,EACvD;AAVO,EAAAD,MAAS;AAAA,GA/ED;",
|
|
5
|
+
"names": ["value", "Binary", "result", "a", "b", "Time", "template"]
|
|
6
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
export type Dict<T = any, K extends string | symbol = string> = {
|
|
2
|
+
[key in K]: T;
|
|
3
|
+
};
|
|
4
|
+
export type Get<T extends {}, K> = K extends keyof T ? T[K] : never;
|
|
5
|
+
export type Extract<S, T, U = S> = S extends T ? U : never;
|
|
6
|
+
export type MaybeArray<T> = [T] extends [unknown[]] ? T : T | T[];
|
|
7
|
+
export type Promisify<T> = Promise<T extends Promise<infer S> ? S : T>;
|
|
8
|
+
export type Awaitable<T> = [T] extends [Promise<unknown>] ? T : T | Promise<T>;
|
|
9
|
+
export type Intersect<U> = (U extends any ? (arg: U) => void : never) extends ((arg: infer I) => void) ? I : never;
|
|
10
|
+
export function noop(): any;
|
|
11
|
+
export function isNullable(value: any): value is null | undefined | void;
|
|
12
|
+
export function isNonNullable<T>(value: T): value is NonNullable<T>;
|
|
13
|
+
export function isPlainObject(data: any): any;
|
|
14
|
+
export function filterKeys<T, K extends string, U extends K>(object: Dict<T, K>, filter: (key: K, value: T) => key is U): Dict<T, U>;
|
|
15
|
+
export function filterKeys<T, K extends string>(object: Dict<T, K>, filter: (key: K, value: T) => boolean): Dict<T, K>;
|
|
16
|
+
export function mapValues<U, T, K extends string>(object: Dict<T, K>, transform: (value: T, key: K) => U): Dict<U, K>;
|
|
17
|
+
export { mapValues as valueMap };
|
|
18
|
+
export function pick<T extends object, K extends keyof T>(source: T, keys?: Iterable<K>, forced?: boolean): Pick<T, K>;
|
|
19
|
+
export function omit<T, K extends keyof T>(source: T, keys?: Iterable<K>): Omit<T, K>;
|
|
20
|
+
export function defineProperty<T, K extends keyof T>(object: T, key: K, value: T[K]): T;
|
|
21
|
+
export function defineProperty<T, K extends keyof any>(object: T, key: K, value: any): T;
|
|
22
|
+
export function contain(array1: readonly any[], array2: readonly any[]): boolean;
|
|
23
|
+
export function intersection<T>(array1: readonly T[], array2: readonly T[]): T[];
|
|
24
|
+
export function difference<S>(array1: readonly S[], array2: readonly any[]): S[];
|
|
25
|
+
export function union<T>(array1: readonly T[], array2: readonly T[]): T[];
|
|
26
|
+
export function deduplicate<T>(array: readonly T[]): T[];
|
|
27
|
+
export function remove<T>(list: T[], item: T): boolean;
|
|
28
|
+
export function makeArray<T>(source: null | undefined | T | T[]): T[];
|
|
29
|
+
type GlobalConstructorNames = keyof {
|
|
30
|
+
[K in keyof typeof globalThis as typeof globalThis[K] extends abstract new (...args: any) => any ? K : never]: K;
|
|
31
|
+
};
|
|
32
|
+
export function is<K extends GlobalConstructorNames>(type: K): (value: any) => value is InstanceType<typeof globalThis[K]>;
|
|
33
|
+
export function is<K extends GlobalConstructorNames>(type: K, value: any): value is InstanceType<typeof globalThis[K]>;
|
|
34
|
+
declare function isArrayBufferLike(value: any): value is ArrayBufferLike;
|
|
35
|
+
declare function isArrayBufferSource(value: any): value is Binary.Source;
|
|
36
|
+
export namespace Binary {
|
|
37
|
+
type Source<T extends ArrayBufferLike = ArrayBufferLike> = T | ArrayBufferView<T>;
|
|
38
|
+
const is: typeof isArrayBufferLike;
|
|
39
|
+
const isSource: typeof isArrayBufferSource;
|
|
40
|
+
function fromSource<T extends ArrayBufferLike>(source: Source<T>): T;
|
|
41
|
+
function toBase64(source: Source): string;
|
|
42
|
+
function fromBase64(source: string): ArrayBuffer | Uint8Array<ArrayBuffer>;
|
|
43
|
+
function toHex(source: Source): string;
|
|
44
|
+
function fromHex(source: string): ArrayBuffer;
|
|
45
|
+
}
|
|
46
|
+
export const base64ToArrayBuffer: typeof Binary.fromBase64;
|
|
47
|
+
export const arrayBufferToBase64: typeof Binary.toBase64;
|
|
48
|
+
export const hexToArrayBuffer: typeof Binary.fromHex;
|
|
49
|
+
export const arrayBufferToHex: typeof Binary.toHex;
|
|
50
|
+
export function clone<T>(source: T): T;
|
|
51
|
+
export function deepEqual(a: any, b: any, strict?: boolean): boolean;
|
|
52
|
+
export function capitalize(source: string): string;
|
|
53
|
+
export function uncapitalize(source: string): string;
|
|
54
|
+
export function camelCase(source: string): string;
|
|
55
|
+
export function paramCase(source: string): string;
|
|
56
|
+
export function snakeCase(source: string): string;
|
|
57
|
+
export const camelize: typeof camelCase;
|
|
58
|
+
export const hyphenate: typeof paramCase;
|
|
59
|
+
declare namespace Letter {
|
|
60
|
+
interface LowerToUpper {
|
|
61
|
+
a: 'A';
|
|
62
|
+
b: 'B';
|
|
63
|
+
c: 'C';
|
|
64
|
+
d: 'D';
|
|
65
|
+
e: 'E';
|
|
66
|
+
f: 'F';
|
|
67
|
+
g: 'G';
|
|
68
|
+
h: 'H';
|
|
69
|
+
i: 'I';
|
|
70
|
+
j: 'J';
|
|
71
|
+
k: 'K';
|
|
72
|
+
l: 'L';
|
|
73
|
+
m: 'M';
|
|
74
|
+
n: 'N';
|
|
75
|
+
o: 'O';
|
|
76
|
+
p: 'P';
|
|
77
|
+
q: 'Q';
|
|
78
|
+
r: 'R';
|
|
79
|
+
s: 'S';
|
|
80
|
+
t: 'T';
|
|
81
|
+
u: 'U';
|
|
82
|
+
v: 'V';
|
|
83
|
+
w: 'W';
|
|
84
|
+
x: 'X';
|
|
85
|
+
y: 'Y';
|
|
86
|
+
z: 'Z';
|
|
87
|
+
}
|
|
88
|
+
interface UpperToLower {
|
|
89
|
+
A: 'a';
|
|
90
|
+
B: 'b';
|
|
91
|
+
C: 'c';
|
|
92
|
+
D: 'd';
|
|
93
|
+
E: 'e';
|
|
94
|
+
F: 'f';
|
|
95
|
+
G: 'g';
|
|
96
|
+
H: 'h';
|
|
97
|
+
I: 'i';
|
|
98
|
+
J: 'j';
|
|
99
|
+
K: 'k';
|
|
100
|
+
L: 'l';
|
|
101
|
+
M: 'm';
|
|
102
|
+
N: 'n';
|
|
103
|
+
O: 'o';
|
|
104
|
+
P: 'p';
|
|
105
|
+
Q: 'q';
|
|
106
|
+
R: 'r';
|
|
107
|
+
S: 's';
|
|
108
|
+
T: 't';
|
|
109
|
+
U: 'u';
|
|
110
|
+
V: 'v';
|
|
111
|
+
W: 'w';
|
|
112
|
+
X: 'x';
|
|
113
|
+
Y: 'y';
|
|
114
|
+
Z: 'z';
|
|
115
|
+
}
|
|
116
|
+
export type Upper = keyof UpperToLower;
|
|
117
|
+
export type Lower = keyof LowerToUpper;
|
|
118
|
+
export type ToUpper<S extends string> = S extends Lower ? LowerToUpper[S] : S;
|
|
119
|
+
export type ToLower<S extends string, P extends string = ''> = S extends Upper ? `${P}${UpperToLower[S]}` : S;
|
|
120
|
+
}
|
|
121
|
+
export type camelize<S extends string> = S extends `${infer L}-${infer M}${infer R}` ? `${L}${Letter.ToUpper<M>}${camelize<R>}` : S;
|
|
122
|
+
export type hyphenate<S extends string> = S extends `${infer L}${infer R}` ? `${Letter.ToLower<L, '-'>}${hyphenate<R>}` : S;
|
|
123
|
+
export function formatProperty(key: keyof any): string;
|
|
124
|
+
export function trimSlash(source: string): string;
|
|
125
|
+
export function sanitize(source: string): string;
|
|
126
|
+
export namespace Time {
|
|
127
|
+
const millisecond = 1;
|
|
128
|
+
const second = 1000;
|
|
129
|
+
const minute: number;
|
|
130
|
+
const hour: number;
|
|
131
|
+
const day: number;
|
|
132
|
+
const week: number;
|
|
133
|
+
function setTimezoneOffset(offset: number): void;
|
|
134
|
+
function getTimezoneOffset(): number;
|
|
135
|
+
function getDateNumber(date?: number | Date, offset?: number): number;
|
|
136
|
+
function fromDateNumber(value: number, offset?: number): Date;
|
|
137
|
+
function parseTime(source: string): number;
|
|
138
|
+
function parseDate(date: string): Date;
|
|
139
|
+
function format(ms: number): string;
|
|
140
|
+
function toDigits(source: number, length?: number): string;
|
|
141
|
+
function template(template: string, time?: Date): string;
|
|
142
|
+
}
|