@cloudbase/oauth 0.1.1-alpha.5 → 0.1.1-alpha.7
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/.prettierrc.js +41 -0
- package/dist/app/openuri.js +20 -14
- package/dist/app/openuri.js.map +1 -1
- package/dist/app/request.js +8 -2
- package/dist/app/request.js.map +1 -1
- package/dist/auth/consts.d.ts +2 -1
- package/dist/auth/consts.js +1 -0
- package/dist/auth/consts.js.map +1 -1
- package/dist/auth/index.d.ts +6 -1
- package/dist/auth/index.js +12 -0
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/models.d.ts +9 -3
- package/dist/auth/models.js +0 -1
- package/dist/auth/models.js.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
- package/packages/analytics/dist/cjs/index.d.ts +2 -0
- package/packages/analytics/dist/cjs/index.js +144 -0
- package/packages/analytics/dist/esm/index.d.ts +2 -0
- package/packages/analytics/dist/esm/index.js +140 -0
- package/packages/app/dist/cjs/constants/common.d.ts +24 -0
- package/packages/app/dist/cjs/constants/common.js +68 -0
- package/packages/app/dist/cjs/index.d.ts +4 -0
- package/packages/app/dist/cjs/index.js +248 -0
- package/packages/app/dist/cjs/libs/adapter.d.ts +2 -0
- package/packages/app/dist/cjs/libs/adapter.js +5 -0
- package/packages/app/dist/cjs/libs/cache.d.ts +6 -0
- package/packages/app/dist/cjs/libs/cache.js +38 -0
- package/packages/app/dist/cjs/libs/component.d.ts +3 -0
- package/packages/app/dist/cjs/libs/component.js +126 -0
- package/packages/app/dist/cjs/libs/request.d.ts +28 -0
- package/packages/app/dist/cjs/libs/request.js +297 -0
- package/packages/app/dist/esm/constants/common.d.ts +24 -0
- package/packages/app/dist/esm/constants/common.js +57 -0
- package/packages/app/dist/esm/index.d.ts +4 -0
- package/packages/app/dist/esm/index.js +241 -0
- package/packages/app/dist/esm/libs/adapter.d.ts +2 -0
- package/packages/app/dist/esm/libs/adapter.js +2 -0
- package/packages/app/dist/esm/libs/cache.d.ts +6 -0
- package/packages/app/dist/esm/libs/cache.js +32 -0
- package/packages/app/dist/esm/libs/component.d.ts +3 -0
- package/packages/app/dist/esm/libs/component.js +121 -0
- package/packages/app/dist/esm/libs/request.d.ts +28 -0
- package/packages/app/dist/esm/libs/request.js +292 -0
- package/packages/auth/dist/cjs/index.d.ts +114 -0
- package/packages/auth/dist/cjs/index.js +1030 -0
- package/packages/auth/dist/esm/index.d.ts +114 -0
- package/packages/auth/dist/esm/index.js +1026 -0
- package/packages/cloudbase/analytics/dist/index.d.ts +2 -0
- package/packages/cloudbase/analytics/dist/index.esm.js +4 -0
- package/packages/cloudbase/analytics/dist/index.js +9 -0
- package/packages/cloudbase/app/dist/index.d.ts +9 -0
- package/packages/cloudbase/app/dist/index.esm.js +10 -0
- package/packages/cloudbase/app/dist/index.js +17 -0
- package/packages/cloudbase/auth/dist/index.d.ts +2 -0
- package/packages/cloudbase/auth/dist/index.esm.js +4 -0
- package/packages/cloudbase/auth/dist/index.js +9 -0
- package/packages/cloudbase/container/dist/index.d.ts +2 -0
- package/packages/cloudbase/container/dist/index.esm.js +4 -0
- package/packages/cloudbase/container/dist/index.js +9 -0
- package/packages/cloudbase/dist/index.cjs.js +31 -0
- package/packages/cloudbase/dist/index.esm.js +26 -0
- package/packages/cloudbase/functions/dist/index.d.ts +2 -0
- package/packages/cloudbase/functions/dist/index.esm.js +4 -0
- package/packages/cloudbase/functions/dist/index.js +9 -0
- package/packages/cloudbase/oauth/dist/index.d.ts +1 -0
- package/packages/cloudbase/oauth/dist/index.esm.js +3 -0
- package/packages/cloudbase/oauth/dist/index.js +21 -0
- package/packages/cloudbase/realtime/dist/index.d.ts +2 -0
- package/packages/cloudbase/realtime/dist/index.esm.js +4 -0
- package/packages/cloudbase/realtime/dist/index.js +9 -0
- package/packages/cloudbase/src/dist/oauth/src/index.d.ts +1 -0
- package/packages/cloudbase/src/dist/src/index.d.ts +9 -0
- package/packages/cloudbase/storage/dist/index.d.ts +2 -0
- package/packages/cloudbase/storage/dist/index.esm.js +4 -0
- package/packages/cloudbase/storage/dist/index.js +9 -0
- package/packages/container/dist/cjs/constants/index.d.ts +1 -0
- package/packages/container/dist/cjs/constants/index.js +5 -0
- package/packages/container/dist/cjs/go_wams_exec.d.ts +2 -0
- package/packages/container/dist/cjs/go_wams_exec.js +538 -0
- package/packages/container/dist/cjs/index.d.ts +11 -0
- package/packages/container/dist/cjs/index.js +333 -0
- package/packages/container/dist/cjs/utils/index.d.ts +3 -0
- package/packages/container/dist/cjs/utils/index.js +83 -0
- package/packages/container/dist/cjs/utils/loader.d.ts +8 -0
- package/packages/container/dist/cjs/utils/loader.js +186 -0
- package/packages/container/dist/cjs/utils/request.d.ts +12 -0
- package/packages/container/dist/cjs/utils/request.js +105 -0
- package/packages/container/dist/esm/constants/index.d.ts +1 -0
- package/packages/container/dist/esm/constants/index.js +2 -0
- package/packages/container/dist/esm/go_wams_exec.d.ts +2 -0
- package/packages/container/dist/esm/go_wams_exec.js +536 -0
- package/packages/container/dist/esm/index.d.ts +11 -0
- package/packages/container/dist/esm/index.js +329 -0
- package/packages/container/dist/esm/utils/index.d.ts +3 -0
- package/packages/container/dist/esm/utils/index.js +77 -0
- package/packages/container/dist/esm/utils/loader.d.ts +8 -0
- package/packages/container/dist/esm/utils/loader.js +178 -0
- package/packages/container/dist/esm/utils/request.d.ts +12 -0
- package/packages/container/dist/esm/utils/request.js +101 -0
- package/packages/container/dist/miniprogram/index.js +1 -0
- package/packages/container/node_modules/@cloudbase/types/LICENSE +202 -0
- package/packages/container/node_modules/@cloudbase/types/auth.d.ts +78 -0
- package/packages/container/node_modules/@cloudbase/types/cache.d.ts +26 -0
- package/packages/container/node_modules/@cloudbase/types/component.d.ts +17 -0
- package/packages/container/node_modules/@cloudbase/types/database.d.ts +31 -0
- package/packages/container/node_modules/@cloudbase/types/events.d.ts +13 -0
- package/packages/container/node_modules/@cloudbase/types/functions.d.ts +16 -0
- package/packages/container/node_modules/@cloudbase/types/index.d.ts +66 -0
- package/packages/container/node_modules/@cloudbase/types/index.js +1 -0
- package/packages/container/node_modules/@cloudbase/types/package.json +46 -0
- package/packages/container/node_modules/@cloudbase/types/realtime.d.ts +350 -0
- package/packages/container/node_modules/@cloudbase/types/request.d.ts +28 -0
- package/packages/container/node_modules/@cloudbase/types/storage.d.ts +97 -0
- package/packages/container/node_modules/@cloudbase/utilities/.eslintignore +2 -0
- package/packages/container/node_modules/@cloudbase/utilities/.eslintrc.js +15 -0
- package/packages/container/node_modules/@cloudbase/utilities/LICENSE +202 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/cjs/adapters/index.d.ts +13 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/cjs/adapters/index.js +55 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/cjs/adapters/platforms/web.d.ts +15 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/cjs/adapters/platforms/web.js +215 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/cjs/constants/common.d.ts +6 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/cjs/constants/common.js +24 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/cjs/constants/errors.d.ts +8 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/cjs/constants/errors.js +12 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/cjs/constants/index.d.ts +3 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/cjs/constants/index.js +21 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/cjs/helpers/decorators.d.ts +11 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/cjs/helpers/decorators.js +238 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/cjs/helpers/index.d.ts +1 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/cjs/helpers/index.js +18 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/cjs/index.d.ts +11 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/cjs/index.js +47 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/cjs/libs/cache.d.ts +17 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/cjs/libs/cache.js +261 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/cjs/libs/events.d.ts +27 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/cjs/libs/events.js +108 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/cjs/libs/util.d.ts +35 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/cjs/libs/util.js +223 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/esm/adapters/index.d.ts +13 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/esm/adapters/index.js +27 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/esm/adapters/platforms/web.d.ts +15 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/esm/adapters/platforms/web.js +211 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/esm/constants/common.d.ts +6 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/esm/constants/common.js +17 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/esm/constants/errors.d.ts +8 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/esm/constants/errors.js +9 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/esm/constants/index.d.ts +3 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/esm/constants/index.js +4 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/esm/helpers/decorators.d.ts +11 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/esm/helpers/decorators.js +234 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/esm/helpers/index.d.ts +1 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/esm/helpers/index.js +2 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/esm/index.d.ts +11 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/esm/index.js +12 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/esm/libs/cache.d.ts +17 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/esm/libs/cache.js +258 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/esm/libs/events.d.ts +27 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/esm/libs/events.js +102 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/esm/libs/util.d.ts +35 -0
- package/packages/container/node_modules/@cloudbase/utilities/dist/esm/libs/util.js +194 -0
- package/packages/container/node_modules/@cloudbase/utilities/package.json +32 -0
- package/packages/container/node_modules/@cloudbase/utilities/src/adapters/index.ts +28 -0
- package/packages/container/node_modules/@cloudbase/utilities/src/adapters/platforms/web.ts +182 -0
- package/packages/container/node_modules/@cloudbase/utilities/src/constants/common.ts +21 -0
- package/packages/container/node_modules/@cloudbase/utilities/src/constants/errors.ts +8 -0
- package/packages/container/node_modules/@cloudbase/utilities/src/constants/index.ts +4 -0
- package/packages/container/node_modules/@cloudbase/utilities/src/global.d.ts +3 -0
- package/packages/container/node_modules/@cloudbase/utilities/src/helpers/decorators.ts +228 -0
- package/packages/container/node_modules/@cloudbase/utilities/src/helpers/index.ts +1 -0
- package/packages/container/node_modules/@cloudbase/utilities/src/index.ts +22 -0
- package/packages/container/node_modules/@cloudbase/utilities/src/libs/cache.ts +192 -0
- package/packages/container/node_modules/@cloudbase/utilities/src/libs/events.ts +154 -0
- package/packages/container/node_modules/@cloudbase/utilities/src/libs/util.ts +216 -0
- package/packages/container/node_modules/@cloudbase/utilities/tsconfig.esm.json +16 -0
- package/packages/container/node_modules/@cloudbase/utilities/tsconfig.json +21 -0
- package/packages/container/node_modules/crypto-js/CONTRIBUTING.md +28 -0
- package/packages/container/node_modules/crypto-js/LICENSE +24 -0
- package/packages/container/node_modules/crypto-js/README.md +261 -0
- package/packages/container/node_modules/crypto-js/aes.js +234 -0
- package/packages/container/node_modules/crypto-js/bower.json +39 -0
- package/packages/container/node_modules/crypto-js/cipher-core.js +890 -0
- package/packages/container/node_modules/crypto-js/core.js +807 -0
- package/packages/container/node_modules/crypto-js/crypto-js.js +6191 -0
- package/packages/container/node_modules/crypto-js/docs/QuickStartGuide.wiki +470 -0
- package/packages/container/node_modules/crypto-js/enc-base64.js +136 -0
- package/packages/container/node_modules/crypto-js/enc-base64url.js +140 -0
- package/packages/container/node_modules/crypto-js/enc-hex.js +18 -0
- package/packages/container/node_modules/crypto-js/enc-latin1.js +18 -0
- package/packages/container/node_modules/crypto-js/enc-utf16.js +149 -0
- package/packages/container/node_modules/crypto-js/enc-utf8.js +18 -0
- package/packages/container/node_modules/crypto-js/evpkdf.js +134 -0
- package/packages/container/node_modules/crypto-js/format-hex.js +66 -0
- package/packages/container/node_modules/crypto-js/format-openssl.js +18 -0
- package/packages/container/node_modules/crypto-js/hmac-md5.js +18 -0
- package/packages/container/node_modules/crypto-js/hmac-ripemd160.js +18 -0
- package/packages/container/node_modules/crypto-js/hmac-sha1.js +18 -0
- package/packages/container/node_modules/crypto-js/hmac-sha224.js +18 -0
- package/packages/container/node_modules/crypto-js/hmac-sha256.js +18 -0
- package/packages/container/node_modules/crypto-js/hmac-sha3.js +18 -0
- package/packages/container/node_modules/crypto-js/hmac-sha384.js +18 -0
- package/packages/container/node_modules/crypto-js/hmac-sha512.js +18 -0
- package/packages/container/node_modules/crypto-js/hmac.js +143 -0
- package/packages/container/node_modules/crypto-js/index.js +18 -0
- package/packages/container/node_modules/crypto-js/lib-typedarrays.js +76 -0
- package/packages/container/node_modules/crypto-js/md5.js +268 -0
- package/packages/container/node_modules/crypto-js/mode-cfb.js +80 -0
- package/packages/container/node_modules/crypto-js/mode-ctr-gladman.js +116 -0
- package/packages/container/node_modules/crypto-js/mode-ctr.js +58 -0
- package/packages/container/node_modules/crypto-js/mode-ecb.js +40 -0
- package/packages/container/node_modules/crypto-js/mode-ofb.js +54 -0
- package/packages/container/node_modules/crypto-js/package.json +42 -0
- package/packages/container/node_modules/crypto-js/pad-ansix923.js +49 -0
- package/packages/container/node_modules/crypto-js/pad-iso10126.js +44 -0
- package/packages/container/node_modules/crypto-js/pad-iso97971.js +40 -0
- package/packages/container/node_modules/crypto-js/pad-nopadding.js +30 -0
- package/packages/container/node_modules/crypto-js/pad-pkcs7.js +18 -0
- package/packages/container/node_modules/crypto-js/pad-zeropadding.js +47 -0
- package/packages/container/node_modules/crypto-js/pbkdf2.js +145 -0
- package/packages/container/node_modules/crypto-js/rabbit-legacy.js +190 -0
- package/packages/container/node_modules/crypto-js/rabbit.js +192 -0
- package/packages/container/node_modules/crypto-js/rc4.js +139 -0
- package/packages/container/node_modules/crypto-js/ripemd160.js +267 -0
- package/packages/container/node_modules/crypto-js/sha1.js +150 -0
- package/packages/container/node_modules/crypto-js/sha224.js +80 -0
- package/packages/container/node_modules/crypto-js/sha256.js +199 -0
- package/packages/container/node_modules/crypto-js/sha3.js +326 -0
- package/packages/container/node_modules/crypto-js/sha384.js +83 -0
- package/packages/container/node_modules/crypto-js/sha512.js +326 -0
- package/packages/container/node_modules/crypto-js/tripledes.js +779 -0
- package/packages/container/node_modules/crypto-js/x64-core.js +304 -0
- package/packages/functions/dist/cjs/index.d.ts +2 -0
- package/packages/functions/dist/cjs/index.js +165 -0
- package/packages/functions/dist/esm/index.d.ts +2 -0
- package/packages/functions/dist/esm/index.js +161 -0
- package/packages/oauth/dist/cjs/auth/apis.d.ts +95 -0
- package/packages/oauth/dist/cjs/auth/apis.js +745 -0
- package/packages/oauth/dist/cjs/auth/consts.d.ts +67 -0
- package/packages/oauth/dist/cjs/auth/consts.js +75 -0
- package/packages/oauth/dist/cjs/auth/models.d.ts +378 -0
- package/packages/oauth/dist/cjs/auth/models.js +3 -0
- package/packages/oauth/dist/cjs/captcha/captcha.d.ts +35 -0
- package/packages/oauth/dist/cjs/captcha/captcha.js +288 -0
- package/packages/oauth/dist/cjs/index.d.ts +14 -0
- package/packages/oauth/dist/cjs/index.js +70 -0
- package/packages/oauth/dist/cjs/oauth2client/consts.d.ts +67 -0
- package/packages/oauth/dist/cjs/oauth2client/consts.js +73 -0
- package/packages/oauth/dist/cjs/oauth2client/interface.d.ts +15 -0
- package/packages/oauth/dist/cjs/oauth2client/interface.js +10 -0
- package/packages/oauth/dist/cjs/oauth2client/models.d.ts +50 -0
- package/packages/oauth/dist/cjs/oauth2client/models.js +3 -0
- package/packages/oauth/dist/cjs/oauth2client/oauth2client.d.ts +58 -0
- package/packages/oauth/dist/cjs/oauth2client/oauth2client.js +687 -0
- package/packages/oauth/dist/cjs/utils/encrypt.d.ts +4 -0
- package/packages/oauth/dist/cjs/utils/encrypt.js +25 -0
- package/packages/oauth/dist/cjs/utils/encryptlong/index.d.ts +154 -0
- package/packages/oauth/dist/cjs/utils/encryptlong/index.js +4029 -0
- package/packages/oauth/dist/cjs/utils/function/single-promise.d.ts +5 -0
- package/packages/oauth/dist/cjs/utils/function/single-promise.js +96 -0
- package/packages/oauth/dist/cjs/utils/index.d.ts +1 -0
- package/packages/oauth/dist/cjs/utils/index.js +49 -0
- package/packages/oauth/dist/cjs/utils/mp.d.ts +1 -0
- package/packages/oauth/dist/cjs/utils/mp.js +41 -0
- package/packages/oauth/dist/cjs/utils/uuid.d.ts +1 -0
- package/packages/oauth/dist/cjs/utils/uuid.js +12 -0
- package/packages/oauth/dist/esm/auth/apis.d.ts +95 -0
- package/packages/oauth/dist/esm/auth/apis.js +743 -0
- package/packages/oauth/dist/esm/auth/consts.d.ts +67 -0
- package/packages/oauth/dist/esm/auth/consts.js +72 -0
- package/packages/oauth/dist/esm/auth/models.d.ts +378 -0
- package/packages/oauth/dist/esm/auth/models.js +2 -0
- package/packages/oauth/dist/esm/captcha/captcha.d.ts +35 -0
- package/packages/oauth/dist/esm/captcha/captcha.js +285 -0
- package/packages/oauth/dist/esm/index.d.ts +14 -0
- package/packages/oauth/dist/esm/index.js +35 -0
- package/packages/oauth/dist/esm/oauth2client/consts.d.ts +67 -0
- package/packages/oauth/dist/esm/oauth2client/consts.js +70 -0
- package/packages/oauth/dist/esm/oauth2client/interface.d.ts +15 -0
- package/packages/oauth/dist/esm/oauth2client/interface.js +7 -0
- package/packages/oauth/dist/esm/oauth2client/models.d.ts +50 -0
- package/packages/oauth/dist/esm/oauth2client/models.js +2 -0
- package/packages/oauth/dist/esm/oauth2client/oauth2client.d.ts +58 -0
- package/packages/oauth/dist/esm/oauth2client/oauth2client.js +681 -0
- package/packages/oauth/dist/esm/utils/encrypt.d.ts +4 -0
- package/packages/oauth/dist/esm/utils/encrypt.js +18 -0
- package/packages/oauth/dist/esm/utils/encryptlong/index.d.ts +154 -0
- package/packages/oauth/dist/esm/utils/encryptlong/index.js +4027 -0
- package/packages/oauth/dist/esm/utils/function/single-promise.d.ts +5 -0
- package/packages/oauth/dist/esm/utils/function/single-promise.js +93 -0
- package/packages/oauth/dist/esm/utils/index.d.ts +1 -0
- package/packages/oauth/dist/esm/utils/index.js +45 -0
- package/packages/oauth/dist/esm/utils/mp.d.ts +1 -0
- package/packages/oauth/dist/esm/utils/mp.js +37 -0
- package/packages/oauth/dist/esm/utils/uuid.d.ts +1 -0
- package/packages/oauth/dist/esm/utils/uuid.js +8 -0
- package/packages/packages/cloudbase/src/dist/oauth/src/index.d.ts +1 -0
- package/packages/packages/cloudbase/src/dist/src/index.d.ts +9 -0
- package/packages/realtime/dist/cjs/common.d.ts +4 -0
- package/packages/realtime/dist/cjs/common.js +22 -0
- package/packages/realtime/dist/cjs/error.d.ts +36 -0
- package/packages/realtime/dist/cjs/error.js +106 -0
- package/packages/realtime/dist/cjs/index.d.ts +2 -0
- package/packages/realtime/dist/cjs/index.js +36 -0
- package/packages/realtime/dist/cjs/listener.d.ts +14 -0
- package/packages/realtime/dist/cjs/listener.js +18 -0
- package/packages/realtime/dist/cjs/message.d.ts +3 -0
- package/packages/realtime/dist/cjs/message.js +13 -0
- package/packages/realtime/dist/cjs/snapshot.d.ts +17 -0
- package/packages/realtime/dist/cjs/snapshot.js +45 -0
- package/packages/realtime/dist/cjs/utils.d.ts +1 -0
- package/packages/realtime/dist/cjs/utils.js +9 -0
- package/packages/realtime/dist/cjs/virtual-websocket-client.d.ts +62 -0
- package/packages/realtime/dist/cjs/websocket-client.d.ts +78 -0
- package/packages/realtime/dist/cjs/ws-event.d.ts +126 -0
- package/packages/realtime/dist/cjs/ws-event.js +141 -0
- package/packages/realtime/dist/esm/common.d.ts +4 -0
- package/packages/realtime/dist/esm/common.js +15 -0
- package/packages/realtime/dist/esm/error.d.ts +36 -0
- package/packages/realtime/dist/esm/error.js +100 -0
- package/packages/realtime/dist/esm/index.d.ts +2 -0
- package/packages/realtime/dist/esm/index.js +32 -0
- package/packages/realtime/dist/esm/listener.d.ts +14 -0
- package/packages/realtime/dist/esm/listener.js +15 -0
- package/packages/realtime/dist/esm/message.d.ts +3 -0
- package/packages/realtime/dist/esm/message.js +8 -0
- package/packages/realtime/dist/esm/snapshot.d.ts +17 -0
- package/packages/realtime/dist/esm/snapshot.js +42 -0
- package/packages/realtime/dist/esm/utils.d.ts +1 -0
- package/packages/realtime/dist/esm/utils.js +5 -0
- package/packages/realtime/dist/esm/virtual-websocket-client.d.ts +62 -0
- package/packages/realtime/dist/esm/websocket-client.d.ts +78 -0
- package/packages/realtime/dist/esm/ws-event.d.ts +126 -0
- package/packages/realtime/dist/esm/ws-event.js +137 -0
- package/packages/src/dist/oauth/src/index.d.ts +1 -0
- package/packages/src/dist/src/index.d.ts +9 -0
- package/packages/storage/dist/cjs/index.d.ts +2 -0
- package/packages/storage/dist/cjs/index.js +426 -0
- package/packages/storage/dist/esm/index.d.ts +2 -0
- package/packages/storage/dist/esm/index.js +422 -0
- package/packages/utilities/dist/cjs/adapters/index.d.ts +13 -0
- package/packages/utilities/dist/cjs/adapters/index.js +55 -0
- package/packages/utilities/dist/cjs/adapters/platforms/web.d.ts +15 -0
- package/packages/utilities/dist/cjs/adapters/platforms/web.js +215 -0
- package/packages/utilities/dist/cjs/constants/common.d.ts +6 -0
- package/packages/utilities/dist/cjs/constants/common.js +24 -0
- package/packages/utilities/dist/cjs/constants/errors.d.ts +8 -0
- package/packages/utilities/dist/cjs/constants/errors.js +12 -0
- package/packages/utilities/dist/cjs/constants/index.d.ts +3 -0
- package/packages/utilities/dist/cjs/constants/index.js +21 -0
- package/packages/utilities/dist/cjs/helpers/decorators.d.ts +11 -0
- package/packages/utilities/dist/cjs/helpers/decorators.js +238 -0
- package/packages/utilities/dist/cjs/helpers/index.d.ts +1 -0
- package/packages/utilities/dist/cjs/helpers/index.js +18 -0
- package/packages/utilities/dist/cjs/index.d.ts +11 -0
- package/packages/utilities/dist/cjs/index.js +47 -0
- package/packages/utilities/dist/cjs/libs/cache.d.ts +17 -0
- package/packages/utilities/dist/cjs/libs/cache.js +261 -0
- package/packages/utilities/dist/cjs/libs/events.d.ts +27 -0
- package/packages/utilities/dist/cjs/libs/events.js +108 -0
- package/packages/utilities/dist/cjs/libs/util.d.ts +34 -0
- package/packages/utilities/dist/cjs/libs/util.js +198 -0
- package/packages/utilities/dist/esm/adapters/index.d.ts +13 -0
- package/packages/utilities/dist/esm/adapters/index.js +27 -0
- package/packages/utilities/dist/esm/adapters/platforms/web.d.ts +15 -0
- package/packages/utilities/dist/esm/adapters/platforms/web.js +211 -0
- package/packages/utilities/dist/esm/constants/common.d.ts +6 -0
- package/packages/utilities/dist/esm/constants/common.js +17 -0
- package/packages/utilities/dist/esm/constants/errors.d.ts +8 -0
- package/packages/utilities/dist/esm/constants/errors.js +9 -0
- package/packages/utilities/dist/esm/constants/index.d.ts +3 -0
- package/packages/utilities/dist/esm/constants/index.js +4 -0
- package/packages/utilities/dist/esm/helpers/decorators.d.ts +11 -0
- package/packages/utilities/dist/esm/helpers/decorators.js +234 -0
- package/packages/utilities/dist/esm/helpers/index.d.ts +1 -0
- package/packages/utilities/dist/esm/helpers/index.js +2 -0
- package/packages/utilities/dist/esm/index.d.ts +11 -0
- package/packages/utilities/dist/esm/index.js +12 -0
- package/packages/utilities/dist/esm/libs/cache.d.ts +17 -0
- package/packages/utilities/dist/esm/libs/cache.js +258 -0
- package/packages/utilities/dist/esm/libs/events.d.ts +27 -0
- package/packages/utilities/dist/esm/libs/events.js +102 -0
- package/packages/utilities/dist/esm/libs/util.d.ts +34 -0
- package/packages/utilities/dist/esm/libs/util.js +173 -0
- package/src/app/openuri.ts +99 -89
- package/src/app/request.ts +52 -50
- package/src/auth/consts.ts +1 -0
- package/src/auth/index.ts +14 -0
- package/src/auth/models.ts +9 -5
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
23
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
+
function step(op) {
|
|
26
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
+
switch (op[0]) {
|
|
31
|
+
case 0: case 1: t = op; break;
|
|
32
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
+
default:
|
|
36
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
+
if (t[2]) _.ops.pop();
|
|
41
|
+
_.trys.pop(); continue;
|
|
42
|
+
}
|
|
43
|
+
op = body.call(thisArg, _);
|
|
44
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
import Go from '../go_wams_exec';
|
|
49
|
+
import { parseURL } from '.';
|
|
50
|
+
function instantiateStreaming(resp, importObject, brotliCompressed) {
|
|
51
|
+
if (brotliCompressed === void 0) { brotliCompressed = false; }
|
|
52
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
53
|
+
var source, buffer;
|
|
54
|
+
return __generator(this, function (_a) {
|
|
55
|
+
switch (_a.label) {
|
|
56
|
+
case 0:
|
|
57
|
+
if (!(brotliCompressed || !WebAssembly.instantiateStreaming)) return [3, 3];
|
|
58
|
+
return [4, resp];
|
|
59
|
+
case 1: return [4, (_a.sent()).arrayBuffer()];
|
|
60
|
+
case 2:
|
|
61
|
+
source = _a.sent();
|
|
62
|
+
if (brotliCompressed) {
|
|
63
|
+
throw new Error('do not support *.br');
|
|
64
|
+
}
|
|
65
|
+
buffer = source;
|
|
66
|
+
return [2, WebAssembly.instantiate(buffer, importObject)];
|
|
67
|
+
case 3: return [2, WebAssembly.instantiateStreaming(resp, importObject)];
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function isBrotliCompressed(url) {
|
|
73
|
+
var brotliCompressed = false;
|
|
74
|
+
var pathname = '';
|
|
75
|
+
try {
|
|
76
|
+
var location_1 = parseURL(url);
|
|
77
|
+
pathname = location_1.pathname;
|
|
78
|
+
}
|
|
79
|
+
catch (e) {
|
|
80
|
+
pathname = url;
|
|
81
|
+
}
|
|
82
|
+
if (/\.br$/.test(pathname)) {
|
|
83
|
+
brotliCompressed = true;
|
|
84
|
+
}
|
|
85
|
+
return brotliCompressed;
|
|
86
|
+
}
|
|
87
|
+
export function getExportFunction(url, module, mode) {
|
|
88
|
+
if (mode === void 0) { mode = 'go'; }
|
|
89
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
90
|
+
var importObject, go, brotliCompressed, reuslt;
|
|
91
|
+
return __generator(this, function (_a) {
|
|
92
|
+
switch (_a.label) {
|
|
93
|
+
case 0:
|
|
94
|
+
importObject = __assign({ env: {
|
|
95
|
+
memoryBase: 0,
|
|
96
|
+
tableBase: 0,
|
|
97
|
+
memory: new WebAssembly.Memory({
|
|
98
|
+
initial: 256,
|
|
99
|
+
}),
|
|
100
|
+
} }, module);
|
|
101
|
+
brotliCompressed = isBrotliCompressed(url);
|
|
102
|
+
if (mode === 'go') {
|
|
103
|
+
go = new Go();
|
|
104
|
+
go._initedModulePromise = new Promise(function (resolve) {
|
|
105
|
+
go._initedModuleResolve = resolve;
|
|
106
|
+
});
|
|
107
|
+
importObject = __assign(__assign({}, go.importObject), { env: __assign(__assign({}, go.importObject.env), { exportModule: function (module) {
|
|
108
|
+
return go._initedModuleResolve(module);
|
|
109
|
+
} }) });
|
|
110
|
+
}
|
|
111
|
+
return [4, instantiateStreaming(fetch(url), importObject, brotliCompressed)];
|
|
112
|
+
case 1:
|
|
113
|
+
reuslt = _a.sent();
|
|
114
|
+
if (!(mode === 'go')) return [3, 3];
|
|
115
|
+
return [4, Promise.race([
|
|
116
|
+
go.run(reuslt.instance),
|
|
117
|
+
new Promise(function (resolve) { return setTimeout(function () {
|
|
118
|
+
resolve(null);
|
|
119
|
+
}, 500); }),
|
|
120
|
+
])];
|
|
121
|
+
case 2:
|
|
122
|
+
_a.sent();
|
|
123
|
+
return [2, {
|
|
124
|
+
callContainer: window.callContainer,
|
|
125
|
+
initContainer: window.initContainer,
|
|
126
|
+
}];
|
|
127
|
+
case 3: return [2, reuslt.instance.exports];
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
export function loadJSExportFunction(config) {
|
|
133
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
134
|
+
var _a, vm, vender, VENDER_KEY;
|
|
135
|
+
return __generator(this, function (_b) {
|
|
136
|
+
switch (_b.label) {
|
|
137
|
+
case 0:
|
|
138
|
+
_a = config || {}, vm = _a.vm, vender = _a.vender;
|
|
139
|
+
VENDER_KEY = 'cloudbase_private_link_vender';
|
|
140
|
+
if (!(vender || !Object.prototype.hasOwnProperty.call(document.defaultView, VENDER_KEY))) return [3, 2];
|
|
141
|
+
return [4, loadUmdModule(vender
|
|
142
|
+
|| 'https://qbase.cdn-go.cn/lcap/lcap-resource-cdngo/-/release/_npm/@cloudbase/privatelink-vender@0.0.2/dist/cdn/cloudbase.privatelink.vender.js', VENDER_KEY)];
|
|
143
|
+
case 1:
|
|
144
|
+
_b.sent();
|
|
145
|
+
_b.label = 2;
|
|
146
|
+
case 2: return [2, loadUmdModule(vm
|
|
147
|
+
|| 'https://qbase.cdn-go.cn/lcap/lcap-resource-cdngo/-/release/_npm/@cloudbase/privatelink@0.0.1/dist/cdn/cloudbase.privatelink.vm.js', 'cloudbase_private_link')];
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
function loadUmdModule(jsUrl, umdModuleName, targetDoc) {
|
|
153
|
+
if (targetDoc === void 0) { targetDoc = document; }
|
|
154
|
+
return new Promise(function (resolve, reject) {
|
|
155
|
+
var win = targetDoc.defaultView;
|
|
156
|
+
var script = targetDoc.createElement('script');
|
|
157
|
+
script.setAttribute('src', jsUrl);
|
|
158
|
+
script.setAttribute('class', umdModuleName);
|
|
159
|
+
script.addEventListener('load', function () {
|
|
160
|
+
if (Object.prototype.hasOwnProperty.call(win, umdModuleName)) {
|
|
161
|
+
return resolve(win[umdModuleName]);
|
|
162
|
+
}
|
|
163
|
+
var error = new Error("Fail to load UMD module ".concat(umdModuleName, " from [").concat(jsUrl, "]."));
|
|
164
|
+
return reject(error);
|
|
165
|
+
});
|
|
166
|
+
script.addEventListener('error', function (e) {
|
|
167
|
+
var error = new Error("main bundle [".concat(umdModuleName, "] load failed from [").concat(jsUrl, "]: ").concat((e === null || e === void 0 ? void 0 : e.message) || ''));
|
|
168
|
+
reject(error);
|
|
169
|
+
});
|
|
170
|
+
if (targetDoc.body) {
|
|
171
|
+
targetDoc.body.appendChild(script);
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
targetDoc.head.appendChild(script);
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9hZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3V0aWxzL2xvYWRlci50cyJdLCJuYW1lcyI6W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Nb2R1bGVOYW1lfSBmcm9tIFske2pzVXJsfV0uYClcbiAgICAgIHJldHVybiByZWplY3QoZXJyb3IpXG4gICAgfSlcblxuICAgIHNjcmlwdC5hZGRFdmVudExpc3RlbmVyKCdlcnJvcicsIChlKSA9PiB7XG4gICAgICBjb25zdCBlcnJvciA9IG5ldyBFcnJvcihgbWFpbiBidW5kbGUgWyR7dW1kTW9kdWxlTmFtZX1dIGxvYWQgZmFpbGVkIGZyb20gWyR7anNVcmx9XTogJHtlPy5tZXNzYWdlIHx8ICcnfWApXG4gICAgICByZWplY3QoZXJyb3IpXG4gICAgfSlcbiAgICBpZiAodGFyZ2V0RG9jLmJvZHkpIHtcbiAgICAgIHRhcmdldERvYy5ib2R5LmFwcGVuZENoaWxkKHNjcmlwdClcbiAgICB9IGVsc2Uge1xuICAgICAgdGFyZ2V0RG9jLmhlYWQuYXBwZW5kQ2hpbGQoc2NyaXB0KVxuICAgIH1cbiAgfSlcbn1cbiJdfQ==
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface IRequestPorps {
|
|
2
|
+
url: string;
|
|
3
|
+
data?: string | object | ArrayBuffer;
|
|
4
|
+
header?: Record<string, string>;
|
|
5
|
+
timeout?: number;
|
|
6
|
+
method?: string;
|
|
7
|
+
dataType?: 'json' | string;
|
|
8
|
+
responseType?: 'text' | 'arrayBuffer';
|
|
9
|
+
mode?: 'cors' | 'no-cors' | 'same-origin';
|
|
10
|
+
}
|
|
11
|
+
export declare function request({ url, method, header, data, timeout, dataType, responseType, mode, }: IRequestPorps): Promise<any>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
23
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
+
function step(op) {
|
|
26
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
+
switch (op[0]) {
|
|
31
|
+
case 0: case 1: t = op; break;
|
|
32
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
+
default:
|
|
36
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
+
if (t[2]) _.ops.pop();
|
|
41
|
+
_.trys.pop(); continue;
|
|
42
|
+
}
|
|
43
|
+
op = body.call(thisArg, _);
|
|
44
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
import { constants } from '@cloudbase/utilities';
|
|
49
|
+
import { COMPONENT_NAME } from '../constants';
|
|
50
|
+
import { serializeRequestBody } from './index';
|
|
51
|
+
var getSdkName = constants.getSdkName, ERRORS = constants.ERRORS;
|
|
52
|
+
export function request(_a) {
|
|
53
|
+
var url = _a.url, _b = _a.method, method = _b === void 0 ? 'GET' : _b, _c = _a.header, header = _c === void 0 ? {} : _c, data = _a.data, _d = _a.timeout, timeout = _d === void 0 ? 60000 : _d, _e = _a.dataType, dataType = _e === void 0 ? 'json' : _e, _f = _a.responseType, responseType = _f === void 0 ? 'text' : _f, mode = _a.mode;
|
|
54
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
55
|
+
var headers, abortController, done;
|
|
56
|
+
return __generator(this, function (_g) {
|
|
57
|
+
headers = __assign({}, header);
|
|
58
|
+
data = serializeRequestBody(headers, data);
|
|
59
|
+
abortController = new AbortController();
|
|
60
|
+
done = false;
|
|
61
|
+
return [2, Promise.race([
|
|
62
|
+
new Promise(function (_, reject) {
|
|
63
|
+
setTimeout(function () {
|
|
64
|
+
var _a;
|
|
65
|
+
var error = new Error('请求超时');
|
|
66
|
+
error.code = 'SERVER_TIMEOUT';
|
|
67
|
+
if (!done) {
|
|
68
|
+
(_a = abortController.abort) === null || _a === void 0 ? void 0 : _a.call(abortController);
|
|
69
|
+
}
|
|
70
|
+
reject(error);
|
|
71
|
+
}, timeout);
|
|
72
|
+
}),
|
|
73
|
+
fetch(url, {
|
|
74
|
+
method: method,
|
|
75
|
+
headers: headers,
|
|
76
|
+
body: data,
|
|
77
|
+
signal: abortController.signal,
|
|
78
|
+
mode: mode,
|
|
79
|
+
}).then(function (response) {
|
|
80
|
+
done = true;
|
|
81
|
+
if (responseType === 'arrayBuffer') {
|
|
82
|
+
return response.arrayBuffer();
|
|
83
|
+
}
|
|
84
|
+
if (dataType === 'json') {
|
|
85
|
+
try {
|
|
86
|
+
return response.json();
|
|
87
|
+
}
|
|
88
|
+
catch (e) {
|
|
89
|
+
throw new Error("[".concat(getSdkName(), "][").concat(ERRORS.INVALID_PARAMS, "][").concat(COMPONENT_NAME, ".callContainer] response data must be json"));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return response.text();
|
|
93
|
+
}, function (e) {
|
|
94
|
+
done = true;
|
|
95
|
+
throw e;
|
|
96
|
+
}),
|
|
97
|
+
])];
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVxdWVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy91dGlscy9yZXF1ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLHNCQUFzQixDQUFBO0FBQ2hELE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxjQUFjLENBQUE7QUFDN0MsT0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uZXcgUHJvbWlzZSgoXywgcmVqZWN0KSA9PiB7XG4gICAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgY29uc3QgZXJyb3IgPSBuZXcgRXJyb3IoJ+ivt+axgui2heaXticpXG4gICAgICAgIDsoZXJyb3IgYXMgYW55KS5jb2RlID0gJ1NFUlZFUl9USU1FT1VUJ1xuICAgICAgICBpZiAoIWRvbmUpIHtcbiAgICAgICAgICBhYm9ydENvbnRyb2xsZXIuYWJvcnQ/LigpXG4gICAgICAgIH1cbiAgICAgICAgcmVqZWN0KGVycm9yKVxuICAgICAgfSwgdGltZW91dClcbiAgICB9KSxcbiAgICBmZXRjaCh1cmwsIHtcbiAgICAgIG1ldGhvZCxcbiAgICAgIGhlYWRlcnMsXG4gICAgICBib2R5OiBkYXRhIGFzIGFueSxcbiAgICAgIHNpZ25hbDogYWJvcnRDb250cm9sbGVyLnNpZ25hbCxcbiAgICAgIG1vZGUsXG4gICAgfSkudGhlbihcbiAgICAgIChyZXNwb25zZSkgPT4ge1xuICAgICAgICBkb25lID0gdHJ1ZVxuICAgICAgICBpZiAocmVzcG9uc2VUeXBlID09PSAnYXJyYXlCdWZmZXInKSB7XG4gICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLmFycmF5QnVmZmVyKClcbiAgICAgICAgfVxuICAgICAgICBpZiAoZGF0YVR5cGUgPT09ICdqc29uJykge1xuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICByZXR1cm4gcmVzcG9uc2UuanNvbigpXG4gICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBbJHtnZXRTZGtOYW1lKCl9XVske0VSUk9SUy5JTlZBTElEX1BBUkFNU31dWyR7Q09NUE9ORU5UX05BTUV9LmNhbGxDb250YWluZXJdIHJlc3BvbnNlIGRhdGEgbXVzdCBiZSBqc29uYCwpXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXNwb25zZS50ZXh0KClcbiAgICAgIH0sXG4gICAgICAoZSkgPT4ge1xuICAgICAgICBkb25lID0gdHJ1ZVxuICAgICAgICB0aHJvdyBlXG4gICAgICB9LFxuICAgICksXG4gIF0pXG59XG4iXX0=
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("cloudbase_container",[],e):"object"==typeof exports?exports.cloudbase_container=e():t.cloudbase_container=e()}("undefined"!=typeof window?window:this,()=>(()=>{var t={671:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.COMPONENT_NAME=void 0,e.COMPONENT_NAME="container"},976:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},a=this&&this.__decorate||function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a},c=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}s((r=r.apply(t,e||[])).next())}))},u=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}},l=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.registerContainers=e.CloudbaseContainers=void 0;var f=n(136),p=n(438),d=n(671),h=f.constants.ERRORS,y=f.constants.COMMUNITY_SITE_URL,v=f.utils.execCallback,g=f.utils.printWarn,w=f.helpers.catchErrorsDecorator,m=function(){throw new Error("getExportFunction 未实现")},b=function(){throw new Error("loadJSExportFunction 未实现")};m=function(){new Error("小程序不支持 wasm 加载")},b=function(t){return t&&new Error("小程序不支持动态 js 加载"),{initContainer:globalThis.cloudbase_private_link.initContainer,callContainer:globalThis.cloudbase_private_link.callContainer}};var _=function(t){function e(e,n){var r=this,o=JSON.stringify({code:h.INVALID_PARAMS,msg:"[".concat(e,"] ").concat(n)});return(r=t.call(this,o)||this).code=h.INVALID_PARAMS,r}return o(e,t),e.prototype.toJSON=function(){return{code:this.code,message:this.message}},e}(Error);function O(t,e,n){void 0===e&&(e=d.COMPONENT_NAME),void 0===n&&(n="call container error");var r=t instanceof Error?t:new Error("[".concat(e,"] ").concat((null==t?void 0:t.message)||n));return r.code=(null==t?void 0:t.code)||"UNKNOWN_ERROR",r}var E=e.CloudbaseContainers=function(){function t(t){var e,n=this;if(this.config=i(i({},t),{jsUrl:"string"==typeof t.jsUrl?{vm:t.jsUrl}:t.jsUrl}),!this.config.wasmUrl&&this.config.publicKey);else if(!this.config.wasmUrl&&!(null===(e=this.config.jsUrl)||void 0===e?void 0:e.vm)&&!globalThis.cloudbase_private_link)throw new _("".concat(d.COMPONENT_NAME),"缺少 privatelink sdk 地址");this.config.wasmUrl?this.wasm=m(this.config.wasmUrl).catch((function(t){if(n.config.jsUrl)return console.warn("load wams error, fall back to use js",t),b(n.config.jsUrl);if(globalThis.cloudbase_private_link)return globalThis.cloudbase_private_link;throw t})):this.config.jsUrl||this.config.publicKey?this.wasm=b(this.config.jsUrl):this.wasm=Promise.resolve({initContainer:globalThis.cloudbase_private_link.initContainer,callContainer:globalThis.cloudbase_private_link.callContainer})}return t.prototype.callContainer=function(t,e){return s(this,void 0,void 0,(function(){var n,r,o,a,c,s,f,h,y,g,w,m,b,E,S,N,C,A;return u(this,(function(u){switch(u.label){case 0:return[4,this.initContainer(this.config)];case 1:return u.sent(),n="".concat(d.COMPONENT_NAME,".callContainer"),[4,this.wasm];case 2:if(r=u.sent().callContainer,o=i({},t),a=o.url,E=o.method,c=void 0===E?"GET":E,S=o.header,s=void 0===S?{}:S,f=o.data,N=o.timeout,h=void 0===N?6e4:N,C=o.dataType,y=void 0===C?"json":C,A=o.responseType,g=void 0===A?"text":A,w=l(o,["url","method","header","data","timeout","dataType","responseType"]),!a)throw new _(n,"invalid request url");if(!c)throw new _(n,"invalid request method");u.label=3;case 3:return u.trys.push([3,5,,6]),[4,new Promise((function(t,e){var o=i({url:a,method:c,header:s,data:(0,p.serializeRequestBody)(s,f,c),timeout:h,dataType:y,responseType:g},w);if(f&&((0,p.isBuffer)(o.data)||"string"==typeof o.data)&&(null==f?void 0:f.length)>1024e4)e(new _(n,"body too large"));else{if("GET"===c){var u=o.data;if(u&&(o.data=void 0),!(0,p.isBuffer)(u)&&"string"!=typeof u){var l=Object.entries(u||{}).reduce((function(t,e){var n=e[0],r=e[1];return t.push("".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(String(r)))),t}),[]);l.length&&(u=l.join("&"))}if("string"==typeof o.data){var d=(0,p.parseURL)(a);d.search?d.search+="&".concat(o.data):d.search="?".concat(o.data),o.url=d.href,o.data=void 0}}r(i(i({},o),{success:t,fail:function(t){var r=(t||{}).data;e(O(r,n,"call container error"))}}))}}))];case 4:return m=u.sent(),[2,v(e,null,m)];case 5:return b=u.sent(),v(e,b),[3,6];case 6:return[2]}}))}))},t.prototype.initContainer=function(t){return s(this,void 0,void 0,(function(){var e,n=this;return u(this,(function(r){switch(r.label){case 0:return[4,this.wasm];case 1:return e=r.sent().initContainer,this.containerInitPromise||(this.containerInitPromise=new Promise((function(r,o){e({config:t,success:function(t){"200"!==String(t.statusCode)&&o(O(t.data,"".concat(d.COMPONENT_NAME,".initContainer"),"init container fail")),r(t)},fail:function(t){o(O(t.data,"".concat(d.COMPONENT_NAME,".initContainer"),"init container fail")),n.containerInitPromise=null}})}))),[2,this.containerInitPromise]}}))}))},a([w({customInfo:{className:"Cloudbase",methodName:"callContainer"},title:"调用失败",messages:["请确认以下各项:"," 1 - 调用 callContainer() 的语法或参数是否正确"," 2 - 域名 & 路径是否存在","如果问题依然存在,建议到官方问答社区提问或寻找帮助:".concat(y)]}),c("design:type",Function),c("design:paramtypes",[Object,Function]),c("design:returntype",Promise)],t.prototype,"callContainer",null),t}(),S={name:d.COMPONENT_NAME,namespace:"container",entity:function(t){if(this.containerInstance)return g(h.INVALID_OPERATION,"every cloudbase instance should has only one container object"),this.containerInstance;var e=new E(t);return this.containerInstance=e,this.callContainer=e.callContainer.bind(e),this.containerInstance}};try{cloudbase.registerComponent(S)}catch(t){}e.registerContainers=function(t){try{t.registerComponent(S)}catch(t){console.warn(t)}}},438:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.serializeRequestBody=e.isBuffer=e.parseURL=void 0;var r=n(136),o=n(671),i=r.constants.ERRORS;function a(t){return t instanceof ArrayBuffer||ArrayBuffer.isView(t)}function c(t){var e=Object.entries(t||{}).reduce((function(t,e){var n=e[0],r=e[1];return t.push("".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(r))),t}),[]);if(e.length)return e.join("&")}e.parseURL=function(t){if(document){var e=document.createElement("a");return e.href=t,e}return new URL(new Request(t).url)},e.isBuffer=a,e.serializeRequestBody=function(t,e,n){void 0===n&&(n="POST");var r=e;if("object"==typeof e&&!a(e)){t["Content-Type"]||t["content-type"]||(t["Content-Type"]="application/json");var s=t["Content-Type"]||t["content-type"];if("GET"===n)try{return c(e)||""}catch(t){throw new Error(JSON.stringify({code:i.INVALID_PARAMS,msg:"[".concat(o.COMPONENT_NAME,".callContainer] invalid data in query method, ").concat(t.message)}))}switch(s){case"application/json":try{r=JSON.stringify(e)}catch(t){throw new Error(JSON.stringify({code:i.INVALID_PARAMS,msg:"[".concat(o.COMPONENT_NAME,".callContainer] invalid data with content-type: application/json, ").concat(t.message)}))}break;case"application/x-www-form-urlencoded":try{var u=c(e);u&&(r=u)}catch(t){throw new Error(JSON.stringify({code:i.INVALID_PARAMS,msg:"[".concat(o.COMPONENT_NAME,".callContainer] invalid data with content-type: application/x-www-form-urlencoded,").concat(t.message)}))}}}return r}},136:(t,e,n)=>{"use strict";n.r(e),n.d(e,{adapters:()=>i,cache:()=>a,constants:()=>r,events:()=>c,helpers:()=>s,jwt:()=>xt,utils:()=>o});var r={};n.r(r),n.d(r,{COMMUNITY_SITE_URL:()=>g,ERRORS:()=>w,IS_DEBUG_MODE:()=>v,OATUH_LOGINTYPE:()=>m,getProtocol:()=>h,getSdkName:()=>f,setProtocol:()=>d,setSdkName:()=>l});var o={};n.r(o),n.d(o,{createPromiseCallback:()=>V,createSign:()=>B,execCallback:()=>z,formatUrl:()=>U,genSeqId:()=>M,getHash:()=>J,getQuery:()=>H,isArray:()=>I,isFormData:()=>k,isInstanceOf:()=>T,isNull:()=>x,isPalinObject:()=>R,isString:()=>j,isUndefined:()=>P,printError:()=>W,printGroupLog:()=>G,printInfo:()=>K,printWarn:()=>F,removeParam:()=>q,sleep:()=>Y,throwError:()=>$,toQueryString:()=>D,transformPhone:()=>X});var i={};n.r(i),n.d(i,{RUNTIME:()=>Z,useAdapters:()=>it,useDefaultAdapter:()=>at});var a={};n.r(a),n.d(a,{CloudbaseCache:()=>ft});var c={};n.r(c),n.d(c,{CloudbaseEvent:()=>ht,CloudbaseEventEmitter:()=>vt,IErrorEvent:()=>yt,activateEvent:()=>mt,addEventListener:()=>wt,removeEventListener:()=>bt});var s={};n.r(s),n.d(s,{catchErrorsDecorator:()=>Ct});var u="@cloudbase/js-sdk";function l(t){u=t}function f(){return u}var p="https:";function d(t){p=t}function h(){return p}var y,v=!1,g="https://support.qq.com/products/148793",w={INVALID_PARAMS:"INVALID_PARAMS",INVALID_SYNTAX:"INVALID_SYNTAX",INVALID_OPERATION:"INVALID_OPERATION",OPERATION_FAIL:"OPERATION_FAIL",NETWORK_ERROR:"NETWORK_ERROR",UNKOWN_ERROR:"UNKOWN_ERROR"},m="constants";!function(t){t.local="local",t.none="none",t.session="session"}(y||(y={}));var b=function(){},_=function(){},O=n(756),E=n.n(O),S=n(276),N=n.n(S),C=n(945),A=n.n(C);function I(t){return"[object Array]"===Object.prototype.toString.call(t)}function j(t){return"string"==typeof t}function P(t){return void 0===t}function R(t){return"[object Object]"===Object.prototype.toString.call(t)}function x(t){return"[object Null]"===Object.prototype.toString.call(t)}function T(t,e){return t instanceof e}function k(t){return"[object FormData]"===Object.prototype.toString.call(t)}function M(){return Math.random().toString(16).slice(2)}function U(t,e,n){void 0===n&&(n={});var r=/\?/.test(e),o="";return Object.keys(n).forEach((function(t){""===o?!r&&(e+="?"):o+="&",o+="".concat(t,"=").concat(encodeURIComponent(n[t]))})),/^http(s)?:\/\//.test(e+=o)?e:"".concat(t).concat(e)}function L(t){var e=N().stringify(t);return e=(e=(e=e.replace(/=+$/,"")).replace(/\+/g,"-")).replace(/\//g,"_")}function B(t,e){var n=L(A().parse(JSON.stringify({alg:"HS256",typ:"JWT"}))),r=L(A().parse(JSON.stringify(t))),o="".concat(n,".").concat(r),i=L(E()(o,e));return"".concat(o,".").concat(i)}function D(t){void 0===t&&(t={});var e=[];return Object.keys(t).forEach((function(n){e.push("".concat(n,"=").concat(encodeURIComponent(t[n])))})),e.join("&")}function H(t,e){if("undefined"==typeof window)return!1;var n=e||window.location.search,r=new RegExp("(^|&)".concat(t,"=([^&]*)(&|$)")),o=n.substr(n.indexOf("?")+1).match(r);return null!=o?o[2]:""}var J=function(t){if("undefined"==typeof window)return"";var e=window.location.hash.match(new RegExp("[#?&/]".concat(t,"=([^&#]*)")));return e?e[1]:""};function q(t,e){var n=e.split("?")[0],r=[],o=-1!==e.indexOf("?")?e.split("?")[1]:"";if(""!==o){for(var i=(r=o.split("&")).length-1;i>=0;i-=1)r[i].split("=")[0]===t&&r.splice(i,1);n="".concat(n,"?").concat(r.join("&"))}return n}function V(){var t;if(!Promise){(t=function(){}).promise={};var e=function(){throw new Error('Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.')};return Object.defineProperty(t.promise,"then",{get:e}),Object.defineProperty(t.promise,"catch",{get:e}),t}var n=new Promise((function(e,n){t=function(t,r){return t?n(t):e(r)}}));return t.promise=n,t}function z(t,e,n){if(void 0===n&&(n=null),t&&"function"==typeof t)return t(e,n);if(e)throw e;return n}function F(t,e){console.warn("[".concat(f(),"][").concat(t,"]:").concat(e))}function W(t,e){console.error({code:t,msg:"[".concat(f(),"][").concat(t,"]:").concat(e)})}function K(t,e){console.log("[".concat(f(),"][").concat(t,"]:").concat(e))}function $(t,e){throw new Error(JSON.stringify({code:t,msg:"[".concat(f(),"][").concat(t,"]:").concat(e)}))}function G(t){var e=t.title,n=t.subtitle,r=void 0===n?"":n,o=t.content,i=void 0===o?[]:o,a=t.printTrace,c=void 0!==a&&a,s=t.collapsed;void 0!==s&&s?console.groupCollapsed(e,r):console.group(e,r);for(var u=0,l=i;u<l.length;u++){var f=l[u],p=f.type,d=f.body;switch(p){case"info":console.log(d);break;case"warn":console.warn(d);break;case"error":console.error(d)}}c&&console.trace("stack trace:"),console.groupEnd()}var Y=function(t){return void 0===t&&(t=0),new Promise((function(e){return setTimeout(e,t)}))};function X(t){return"+86".concat(t)}var Q,Z,tt=(Q=function(t,e){return(Q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Q(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),et=function(){return(et=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},nt=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}s((r=r.apply(t,e||[])).next())}))},rt=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}},ot=function(t){function e(e){var n=t.call(this)||this,r=e.timeout,o=e.timeoutMsg,i=e.restrictedMethods;return n.timeout=r||0,n.timeoutMsg=o||"请求超时",n.restrictedMethods=i||["get","post","upload","download"],n}return tt(e,t),e.prototype.get=function(t){return this.request(et(et({},t),{method:"get"}),this.restrictedMethods.includes("get"))},e.prototype.post=function(t){return this.request(et(et({},t),{method:"post"}),this.restrictedMethods.includes("post"))},e.prototype.put=function(t){return this.request(et(et({},t),{method:"put"}))},e.prototype.upload=function(t){var e=t.data,n=t.file,r=t.name,o=t.method,i=t.headers,a=void 0===i?{}:i,c={post:"post",put:"put"}[null==o?void 0:o.toLowerCase()]||"put",s=new FormData;return"post"===c?(Object.keys(e).forEach((function(t){s.append(t,e[t])})),s.append("key",r),s.append("file",n),this.request(et(et({},t),{data:s,method:c}),this.restrictedMethods.includes("upload"))):this.request(et(et({},t),{method:"put",headers:a,body:n}),this.restrictedMethods.includes("upload"))},e.prototype.download=function(t){return nt(this,void 0,void 0,(function(){var e,n,r,o;return rt(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.get(et(et({},t),{headers:{},responseType:"blob"}))];case 1:return e=i.sent().data,n=window.URL.createObjectURL(new Blob([e])),r=decodeURIComponent(new URL(t.url).pathname.split("/").pop()||""),(o=document.createElement("a")).href=n,o.setAttribute("download",r),o.style.display="none",document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(n),document.body.removeChild(o),[3,3];case 2:return i.sent(),[3,3];case 3:return[2,new Promise((function(e){e({statusCode:200,tempFilePath:t.url})}))]}}))}))},e.prototype.request=function(t,e){var n=this;void 0===e&&(e=!1);var r=String(t.method).toLowerCase()||"get";return new Promise((function(o){var i,a,c=t.url,s=t.headers,u=void 0===s?{}:s,l=t.data,f=t.responseType,p=t.withCredentials,d=t.body,y=t.onUploadProgress,v=U(h(),c,"get"===r?l:{}),g=new XMLHttpRequest;g.open(r,v),f&&(g.responseType=f),Object.keys(u).forEach((function(t){g.setRequestHeader(t,u[t])})),y&&g.upload.addEventListener("progress",y),g.onreadystatechange=function(){var t={};if(4===g.readyState){var e=g.getAllResponseHeaders().trim().split(/[\r\n]+/),n={};e.forEach((function(t){var e=t.split(": "),r=e.shift().toLowerCase(),o=e.join(": ");n[r]=o})),t.header=n,t.statusCode=g.status;try{t.data="blob"===f?g.response:JSON.parse(g.responseText)}catch(e){t.data="blob"===f?g.response:g.responseText}clearTimeout(i),o(t)}},e&&n.timeout&&(i=setTimeout((function(){console.warn(n.timeoutMsg),g.abort()}),n.timeout)),a=k(l)?l:"application/x-www-form-urlencoded"===u["content-type"]?D(l):d||(l?JSON.stringify(l):void 0),p&&(g.withCredentials=!0),g.send(a)}))},e}(b);function it(t){for(var e=0,n=I(t)?t:[t];e<n.length;e++){var r=n[e],o=r.isMatch,i=r.genAdapter,a=r.runtime;if(o())return{adapter:i(),runtime:a}}}function at(){return{adapter:{root:window,reqClass:ot,wsClass:WebSocket,localStorage:localStorage},runtime:Z.WEB}}!function(t){t.WEB="web",t.WX_MP="wx_mp"}(Z||(Z={}));var ct=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),st=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}s((r=r.apply(t,e||[])).next())}))},ut=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}},lt=function(t){function e(e){var n=t.call(this)||this;return n.root=e,e.tcbCacheObject||(e.tcbCacheObject={}),n}return ct(e,t),e.prototype.setItem=function(t,e){this.root.tcbCacheObject[t]=e},e.prototype.getItem=function(t){return this.root.tcbCacheObject[t]},e.prototype.removeItem=function(t){delete this.root.tcbCacheObject[t]},e.prototype.clear=function(){delete this.root.tcbCacheObject},e}(_);var ft=function(){function t(t){this.keys={};var e=t.persistence,n=t.platformInfo,r=void 0===n?{}:n,o=t.keys,i=void 0===o?{}:o;this.platformInfo=r,this.storage||(this.persistenceTag=this.platformInfo.adapter.primaryStorage||e,this.storage=function(t,e){switch(t){case"local":return e.localStorage?e.localStorage:(F(w.INVALID_PARAMS,"localStorage is not supported on current platform"),new lt(e.root));case"none":return new lt(e.root);default:return e.localStorage?e.localStorage:(F(w.INVALID_PARAMS,"localStorage is not supported on current platform"),new lt(e.root))}}(this.persistenceTag,this.platformInfo.adapter),this.keys=i)}return Object.defineProperty(t.prototype,"mode",{get:function(){return this.storage.mode||"sync"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"persistence",{get:function(){return this.persistenceTag},enumerable:!1,configurable:!0}),t.prototype.setStore=function(t,e,n){if("async"!==this.mode){if(this.storage)try{var r={version:n||"localCachev1",content:e};this.storage.setItem(t,JSON.stringify(r))}catch(t){throw new Error(JSON.stringify({code:w.OPERATION_FAIL,msg:"[".concat(f(),"][").concat(w.OPERATION_FAIL,"]setStore failed"),info:t}))}}else F(w.INVALID_OPERATION,"current platform's storage is asynchronous, please use setStoreAsync insteed")},t.prototype.setStoreAsync=function(t,e,n){return st(this,void 0,void 0,(function(){var r;return ut(this,(function(o){switch(o.label){case 0:if(!this.storage)return[2];o.label=1;case 1:return o.trys.push([1,3,,4]),r={version:n||"localCachev1",content:e},[4,this.storage.setItem(t,JSON.stringify(r))];case 2:return o.sent(),[3,4];case 3:return o.sent(),[2];case 4:return[2]}}))}))},t.prototype.getStore=function(t,e){var n;if("async"!==this.mode){try{if("undefined"!=typeof process&&(null===(n=process.env)||void 0===n?void 0:n.tcb_token))return process.env.tcb_token;if(!this.storage)return""}catch(t){return""}e=e||"localCachev1";var r=this.storage.getItem(t);return r&&r.indexOf(e)>=0?JSON.parse(r).content:""}F(w.INVALID_OPERATION,"current platform's storage is asynchronous, please use getStoreAsync insteed")},t.prototype.getStoreAsync=function(t,e){var n;return st(this,void 0,void 0,(function(){var r;return ut(this,(function(o){switch(o.label){case 0:try{if("undefined"!=typeof process&&(null===(n=process.env)||void 0===n?void 0:n.tcb_token))return[2,process.env.tcb_token];if(!this.storage)return[2,""]}catch(t){return[2,""]}return e=e||"localCachev1",[4,this.storage.getItem(t)];case 1:return(r=o.sent())&&r.indexOf(e)>=0?[2,JSON.parse(r).content]:[2,""]}}))}))},t.prototype.removeStore=function(t){"async"!==this.mode?this.storage.removeItem(t):F(w.INVALID_OPERATION,"current platform's storage is asynchronous, please use removeStoreAsync insteed")},t.prototype.removeStoreAsync=function(t){return st(this,void 0,void 0,(function(){return ut(this,(function(e){switch(e.label){case 0:return[4,this.storage.removeItem(t)];case 1:return e.sent(),[2]}}))}))},t}(),pt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dt=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};var ht=function(t,e){this.data=e||null,this.name=t},yt=function(t){function e(e,n){var r=t.call(this,"error",{error:e,data:n})||this;return r.error=e,r}return pt(e,t),e}(ht),vt=function(){function t(){this.listeners={}}return t.prototype.on=function(t,e){return function(t,e,n){n[t]=n[t]||[],n[t].push(e)}(t,e,this.listeners),this},t.prototype.off=function(t,e){return function(t,e,n){if(null==n?void 0:n[t]){var r=n[t].indexOf(e);-1!==r&&n[t].splice(r,1)}}(t,e,this.listeners),this},t.prototype.fire=function(t,e){if(T(t,yt))return console.error(t.error),this;var n=j(t)?new ht(t,e||{}):t,r=n.name;if(this.listens(r)){n.target=this;for(var o=0,i=this.listeners[r]?dt([],this.listeners[r],!0):[];o<i.length;o++){i[o].call(this,n)}}return this},t.prototype.listens=function(t){return this.listeners[t]&&this.listeners[t].length>0},t}(),gt=new vt;function wt(t,e){gt.on(t,e)}function mt(t,e){void 0===e&&(e={}),gt.fire(t,e)}function bt(t,e){gt.off(t,e)}var _t=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}s((r=r.apply(t,e||[])).next())}))},Ot=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}},Et=!1;"undefined"!=typeof navigator&&navigator.userAgent&&(Et=-1!==navigator.userAgent.indexOf("Firefox"));var St=Et?/(\.js\/)?__decorate(\$\d+)?<@.*\d$/:/(\/\w+\.js\.)?__decorate(\$\d+)?\s*\(.*\)$/,Nt=/https?:\/\/.+:\d*\/.*\.js:\d+:\d+/;function Ct(t){var e=t.mode,n=void 0===e?"async":e,r=t.customInfo,o=void 0===r?{}:r,i=t.title,a=t.messages,c=void 0===a?[]:a;return function(t,e,r){if(v){var a=o.className||t.constructor.name,s=o.methodName||e,u=r.value,l=function(t){var e="",n=t.stack.split("\n"),r=n.findIndex((function(t){return St.test(t)}));if(-1!==r){var o=Nt.exec(n[r+1]||"");e=o?o[0]:""}return e}(new Error);r.value="sync"===n?function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=At({err:new Error,className:a,methodName:s,sourceLink:l});try{return u.apply(this,t)}catch(t){var r=t,o=t.message,f=t.error,p=t.error_description,d={title:i||"".concat(a,".").concat(s," failed"),content:[{type:"error",body:t}]};if(o&&/^\{.*\}$/.test(o)){var h=JSON.parse(o);d.subtitle=o,h.code&&(n?(n.code=h.code,n.msg=h.msg):(t.code=h.code,t.message=h.msg),r=n||t,d.content=c.map((function(t){return{type:"info",body:t}})))}throw f&&p&&(d.subtitle=p,n?(n.code=f,n.msg=p):(t.code=f,t.message=p),r=n||t,d.content=c.map((function(t){return{type:"info",body:t}}))),G(d),r}}:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return _t(this,void 0,void 0,(function(){var e,n,r,o,f,p,d,h;return Ot(this,(function(y){switch(y.label){case 0:e=At({err:new Error,className:a,methodName:s,sourceLink:l}),y.label=1;case 1:return y.trys.push([1,3,,4]),[4,u.apply(this,t)];case 2:return[2,y.sent()];case 3:throw n=y.sent(),r=n,o=n.message,f=n.error,p=n.error_description,d={title:i||"".concat(a,".").concat(s," failed"),content:[{type:"error",body:n}]},o&&/^\{.*\}$/.test(o)&&(h=JSON.parse(o),d.subtitle=h,h.code&&(e?(e.code=h.code,e.message=h.msg):(n.code=h.code,n.message=h.msg),r=e||n,d.content=c.map((function(t){return{type:"info",body:t}})))),f&&p&&(d.subtitle=p,e?(e.code=f,e.msg=p):(n.code=f,n.message=p),r=e||n,d.content=c.map((function(t){return{type:"info",body:t}}))),G(d),r;case 4:return[2]}}))}))}}}}function At(t){var e=t.err,n=t.className,r=t.methodName,o=t.sourceLink;if(!o)return null;var i,a=e.stack.split("\n"),c=Et?/^catchErrorsDecorator\/<\/descriptor.value@.*\d$/:new RegExp("".concat(n,"\\.descriptor.value\\s*\\[as\\s").concat(r,"\\]\\s*\\(.*\\)$")),s=Et?/^catchErrorsDecorator\/<\/descriptor.value/:new RegExp("".concat(n,"\\.descriptor.value\\s*\\[as\\s").concat(r,"\\]")),u=a.findIndex((function(t){return c.test(t)}));if(-1!==u){var l=a.filter((function(t,e){return e>u}));l.unshift(a[u].replace(s,"".concat(n,".").concat(r)).replace(Nt,o)),(i=new Error).stack="".concat(Et?"@debugger":"Error","\n").concat(l.join("\n"))}return i}function It(t){this.message=t}It.prototype=new Error,It.prototype.name="InvalidCharacterError";var jt="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new It("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,o=0,i=0,a="";r=e.charAt(i++);~r&&(n=o%4?64*n+r:r,o++%4)?a+=String.fromCharCode(255&n>>(-2*o&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return a};function Pt(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(jt(t).replace(/(.)/g,(function(t,e){var n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(e)}catch(t){return jt(e)}}function Rt(t){this.message=t}Rt.prototype=new Error,Rt.prototype.name="InvalidTokenError";var xt={decode:function(t,e){if("string"!=typeof t)throw new Rt("Invalid token specified");var n=!0===(e=e||{}).header?0:1;try{return JSON.parse(Pt(t.split(".")[n]))}catch(t){throw new Rt("Invalid token specified: "+t.message)}}}},540:function(t,e,n){var r;t.exports=(r=r||function(t,e){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==n.g&&n.g.crypto&&(r=n.g.crypto),!r)try{r=n(379)}catch(t){}var o=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),a={},c=a.lib={},s=c.Base={extend:function(t){var e=i(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},u=c.WordArray=s.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||f).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,o=t.sigBytes;if(this.clamp(),r%4)for(var i=0;i<o;i++){var a=n[i>>>2]>>>24-i%4*8&255;e[r+i>>>2]|=a<<24-(r+i)%4*8}else for(var c=0;c<o;c+=4)e[r+c>>>2]=n[c>>>2];return this.sigBytes+=o,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=s.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n<t;n+=4)e.push(o());return new u.init(e,t)}}),l=a.enc={},f=l.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o<n;o++){var i=e[o>>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new u.init(n,e/2)}},p=l.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o<n;o++){var i=e[o>>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(i))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new u.init(n,e)}},d=l.Utf8={stringify:function(t){try{return decodeURIComponent(escape(p.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return p.parse(unescape(encodeURIComponent(t)))}},h=c.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=d.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n,r=this._data,o=r.words,i=r.sigBytes,a=this.blockSize,c=i/(4*a),s=(c=e?t.ceil(c):t.max((0|c)-this._minBufferSize,0))*a,l=t.min(4*s,i);if(s){for(var f=0;f<s;f+=a)this._doProcessBlock(o,f);n=o.splice(0,s),r.sigBytes-=l}return new u.init(n,l)},clone:function(){var t=s.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),y=(c.Hasher=h.extend({cfg:s.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new y.HMAC.init(t,n).finalize(e)}}}),a.algo={});return a}(Math),r)},276:function(t,e,n){var r,o,i;t.exports=(i=n(540),o=(r=i).lib.WordArray,r.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp();for(var o=[],i=0;i<n;i+=3)for(var a=(e[i>>>2]>>>24-i%4*8&255)<<16|(e[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|e[i+2>>>2]>>>24-(i+2)%4*8&255,c=0;c<4&&i+.75*c<n;c++)o.push(r.charAt(a>>>6*(3-c)&63));var s=r.charAt(64);if(s)for(;o.length%4;)o.push(s);return o.join("")},parse:function(t){var e=t.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var i=0;i<n.length;i++)r[n.charCodeAt(i)]=i}var a=n.charAt(64);if(a){var c=t.indexOf(a);-1!==c&&(e=c)}return function(t,e,n){for(var r=[],i=0,a=0;a<e;a++)if(a%4){var c=n[t.charCodeAt(a-1)]<<a%4*2,s=n[t.charCodeAt(a)]>>>6-a%4*2,u=c|s;r[i>>>2]|=u<<24-i%4*8,i++}return o.create(r,i)}(t,e,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},i.enc.Base64)},945:function(t,e,n){var r;t.exports=(r=n(540),r.enc.Utf8)},756:function(t,e,n){var r;t.exports=(r=n(540),n(117),n(973),r.HmacSHA256)},973:function(t,e,n){var r,o,i,a;t.exports=(r=n(540),i=(o=r).lib.Base,a=o.enc.Utf8,void(o.algo.HMAC=i.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=a.parse(e));var n=t.blockSize,r=4*n;e.sigBytes>r&&(e=t.finalize(e)),e.clamp();for(var o=this._oKey=e.clone(),i=this._iKey=e.clone(),c=o.words,s=i.words,u=0;u<n;u++)c[u]^=1549556828,s[u]^=909522486;o.sigBytes=i.sigBytes=r,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,n=e.finalize(t);return e.reset(),e.finalize(this._oKey.clone().concat(n))}})))},117:function(t,e,n){var r;t.exports=(r=n(540),function(t){var e=r,n=e.lib,o=n.WordArray,i=n.Hasher,a=e.algo,c=[],s=[];!function(){function e(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}function n(t){return 4294967296*(t-(0|t))|0}for(var r=2,o=0;o<64;)e(r)&&(o<8&&(c[o]=n(t.pow(r,.5))),s[o]=n(t.pow(r,1/3)),o++),r++}();var u=[],l=a.SHA256=i.extend({_doReset:function(){this._hash=new o.init(c.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],a=n[3],c=n[4],l=n[5],f=n[6],p=n[7],d=0;d<64;d++){if(d<16)u[d]=0|t[e+d];else{var h=u[d-15],y=(h<<25|h>>>7)^(h<<14|h>>>18)^h>>>3,v=u[d-2],g=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;u[d]=y+u[d-7]+g+u[d-16]}var w=r&o^r&i^o&i,m=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),b=p+((c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25))+(c&l^~c&f)+s[d]+u[d];p=f,f=l,l=c,c=a+b|0,a=i,i=o,o=r,r=b+(m+w)|0}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+a|0,n[4]=n[4]+c|0,n[5]=n[5]+l|0,n[6]=n[6]+f|0,n[7]=n[7]+p|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,o=8*e.sigBytes;return n[o>>>5]|=128<<24-o%32,n[14+(o+64>>>9<<4)]=t.floor(r/4294967296),n[15+(o+64>>>9<<4)]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=i._createHelper(l),e.HmacSHA256=i._createHmacHelper(l)}(Math),r.SHA256)},379:()=>{}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(976)})());
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright (c) 2018-present Tencent Ltd. All rights reserved.
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|