From 50399683160c28ed410ff4d76b2a79952737d6d8 Mon Sep 17 00:00:00 2001 From: ingkele <598792849@qq.com> Date: Mon, 12 Oct 2026 17:12:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20AI=E5=AE=A2=E6=9C=8D=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E6=A0=BC=E5=BC=8F=E5=8C=96=EF=BC=88=E6=8D=A2?= =?UTF-8?q?=E8=A1=8C+=E5=8A=A0=E7=B2=97+=E5=88=97=E8=A1=A8=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/ai-chat/ai-chat.vue | 18 +- .../router/node_modules/.package-lock.json | 36 +- .../router/node_modules/uni-config-center | 1 - .../node_modules/uni-config-center/index.js | 1 + .../uni-config-center/package.json | 9 + .../uni-config-center/uni-id/config.json | 169 ++ .../alipay/alipayCertPublicKey_RSA2.crt | 3 + .../uni-pay/alipay/alipayRootCert.crt | 15 + .../uni-pay/alipay/appCertPublicKey.crt | 3 + .../alipay/【重要】这里放支付宝证书.md | 5 + .../uni-config-center/uni-pay/config.js | 128 ++ .../uni-config-center/uni-pay/wxpay/wxpay.p12 | 0 .../wxpay/【重要】这里放微信支付证书.md | 3 + .../uni-config-center/vk-unicloud/index.js | 142 ++ .../uni-config-center/【重要】请先看这里.md | 73 + .../cloudfunctions/router/node_modules/uni-id | 1 - .../router/node_modules/uni-id/LICENSE.md | 201 +++ .../router/node_modules/uni-id/index.js | 1 + .../uni-id/node_modules/uni-config-center | 1 + .../router/node_modules/uni-id/package.json | 16 + .../router/node_modules/vk-unicloud | 1 - .../node_modules/vk-unicloud/LICENSE.md | 201 +++ .../router/node_modules/vk-unicloud/index.js | 1 + .../node_modules/vk-unicloud/package.json | 16 + .../cloudfunctions/router/package-lock.json | 117 +- .../router/service/client/ai/pub/chat.js | 8 +- .../database/jjx-balance-log.index.json | 50 + uniCloud-tcb/database/jjx-balance.index.json | 14 + .../database/jjx-balance.init_data.json | 6 + .../database/jjx-enquiry-quote.index.json | 26 + .../database/jjx-enquiry-sheet.index.json | 26 + .../database/jjx-spot-category.index.json | 38 + .../database/jjx-spot-cooperate.index.json | 26 + .../database/jjx-spot-goods.index.json | 26 + .../database/opendb-admin-log.index.json | 38 + .../database/opendb-admin-menus.index.json | 62 + .../opendb-admin-menus.init_data.json | 183 ++ .../database/opendb-app-list.index.json | 74 + .../database/opendb-app-list.init_data.json | 22 + .../database/opendb-app-versions.index.json | 98 ++ .../database/opendb-open-data.index.json | 26 + .../database/opendb-tempdata.index.json | 26 + .../database/opendb-verify-codes.index.json | 58 + uniCloud-tcb/database/uni-id-log.index.json | 26 + .../database/uni-id-permissions.index.json | 62 + .../uni-id-permissions.init_data.json | 277 +++ uniCloud-tcb/database/uni-id-roles.index.json | 50 + .../database/uni-id-roles.init_data.json | 29 + uniCloud-tcb/database/uni-id-users.index.json | 146 ++ .../database/uni-id-users.init_data.json | 15 + .../database/vk-components-dynamic.index.json | 86 + .../database/vk-files-categories.index.json | 38 + uniCloud-tcb/database/vk-files.index.json | 86 + .../database/vk-global-data.index.json | 38 + .../database/vk-pay-config.index.json | 14 + .../database/vk-pay-orders.index.json | 74 + uniCloud-tcb/database/vk-test.index.json | 26 + yarn.lock | 1520 ++++++++--------- 58 files changed, 3551 insertions(+), 905 deletions(-) delete mode 120000 uniCloud-tcb/cloudfunctions/router/node_modules/uni-config-center create mode 100644 uniCloud-tcb/cloudfunctions/router/node_modules/uni-config-center/index.js create mode 100644 uniCloud-tcb/cloudfunctions/router/node_modules/uni-config-center/package.json create mode 100644 uniCloud-tcb/cloudfunctions/router/node_modules/uni-config-center/uni-id/config.json create mode 100644 uniCloud-tcb/cloudfunctions/router/node_modules/uni-config-center/uni-pay/alipay/alipayCertPublicKey_RSA2.crt create mode 100644 uniCloud-tcb/cloudfunctions/router/node_modules/uni-config-center/uni-pay/alipay/alipayRootCert.crt create mode 100644 uniCloud-tcb/cloudfunctions/router/node_modules/uni-config-center/uni-pay/alipay/appCertPublicKey.crt create mode 100644 uniCloud-tcb/cloudfunctions/router/node_modules/uni-config-center/uni-pay/alipay/【重要】这里放支付宝证书.md create mode 100644 uniCloud-tcb/cloudfunctions/router/node_modules/uni-config-center/uni-pay/config.js create mode 100644 uniCloud-tcb/cloudfunctions/router/node_modules/uni-config-center/uni-pay/wxpay/wxpay.p12 create mode 100644 uniCloud-tcb/cloudfunctions/router/node_modules/uni-config-center/uni-pay/wxpay/【重要】这里放微信支付证书.md create mode 100644 uniCloud-tcb/cloudfunctions/router/node_modules/uni-config-center/vk-unicloud/index.js create mode 100644 uniCloud-tcb/cloudfunctions/router/node_modules/uni-config-center/【重要】请先看这里.md delete mode 120000 uniCloud-tcb/cloudfunctions/router/node_modules/uni-id create mode 100644 uniCloud-tcb/cloudfunctions/router/node_modules/uni-id/LICENSE.md create mode 100644 uniCloud-tcb/cloudfunctions/router/node_modules/uni-id/index.js create mode 100644 uniCloud-tcb/cloudfunctions/router/node_modules/uni-id/node_modules/uni-config-center create mode 100644 uniCloud-tcb/cloudfunctions/router/node_modules/uni-id/package.json delete mode 120000 uniCloud-tcb/cloudfunctions/router/node_modules/vk-unicloud create mode 100644 uniCloud-tcb/cloudfunctions/router/node_modules/vk-unicloud/LICENSE.md create mode 100644 uniCloud-tcb/cloudfunctions/router/node_modules/vk-unicloud/index.js create mode 100644 uniCloud-tcb/cloudfunctions/router/node_modules/vk-unicloud/package.json create mode 100644 uniCloud-tcb/database/jjx-balance-log.index.json create mode 100644 uniCloud-tcb/database/jjx-balance.index.json create mode 100644 uniCloud-tcb/database/jjx-balance.init_data.json create mode 100644 uniCloud-tcb/database/jjx-enquiry-quote.index.json create mode 100644 uniCloud-tcb/database/jjx-enquiry-sheet.index.json create mode 100644 uniCloud-tcb/database/jjx-spot-category.index.json create mode 100644 uniCloud-tcb/database/jjx-spot-cooperate.index.json create mode 100644 uniCloud-tcb/database/jjx-spot-goods.index.json create mode 100644 uniCloud-tcb/database/opendb-admin-log.index.json create mode 100644 uniCloud-tcb/database/opendb-admin-menus.index.json create mode 100644 uniCloud-tcb/database/opendb-admin-menus.init_data.json create mode 100644 uniCloud-tcb/database/opendb-app-list.index.json create mode 100644 uniCloud-tcb/database/opendb-app-list.init_data.json create mode 100644 uniCloud-tcb/database/opendb-app-versions.index.json create mode 100644 uniCloud-tcb/database/opendb-open-data.index.json create mode 100644 uniCloud-tcb/database/opendb-tempdata.index.json create mode 100644 uniCloud-tcb/database/opendb-verify-codes.index.json create mode 100644 uniCloud-tcb/database/uni-id-log.index.json create mode 100644 uniCloud-tcb/database/uni-id-permissions.index.json create mode 100644 uniCloud-tcb/database/uni-id-permissions.init_data.json create mode 100644 uniCloud-tcb/database/uni-id-roles.index.json create mode 100644 uniCloud-tcb/database/uni-id-roles.init_data.json create mode 100644 uniCloud-tcb/database/uni-id-users.index.json create mode 100644 uniCloud-tcb/database/uni-id-users.init_data.json create mode 100644 uniCloud-tcb/database/vk-components-dynamic.index.json create mode 100644 uniCloud-tcb/database/vk-files-categories.index.json create mode 100644 uniCloud-tcb/database/vk-files.index.json create mode 100644 uniCloud-tcb/database/vk-global-data.index.json create mode 100644 uniCloud-tcb/database/vk-pay-config.index.json create mode 100644 uniCloud-tcb/database/vk-pay-orders.index.json create mode 100644 uniCloud-tcb/database/vk-test.index.json diff --git a/components/ai-chat/ai-chat.vue b/components/ai-chat/ai-chat.vue index 058a656..ba68f1f 100644 --- a/components/ai-chat/ai-chat.vue +++ b/components/ai-chat/ai-chat.vue @@ -21,7 +21,7 @@ - + 思考中... @@ -50,6 +50,14 @@ }; }, methods: { + formatContent(text) { + if (!text) return ''; + let html = text.replace(/\*\*(.*?)\*\*/g, '$1'); + html = html.replace(/^[\-\•]\s+(.+)$/gm, '
• $1
'); + html = html.replace(/^(\d+)\.\s+(.+)$/gm, '
$1. $2
'); + html = html.replace(/\n/g, '
'); + return html; + }, toggle() { this.visible = !this.visible; if (this.visible) { @@ -73,12 +81,10 @@ try { const res = await this.vk.callFunction({ - url: 'client/ai/pub/chat', - data: { - message: msg, - conversation_id: this.conversationId - } + url: 'client/ai/pub/chat', + data: { message: msg, bot_id: '7680345813062680618' } }); + if (res.data.conversation_id) this.conversationId = res.data.conversation_id; this.messages.push({ role: 'assistant', diff --git a/uniCloud-tcb/cloudfunctions/router/node_modules/.package-lock.json b/uniCloud-tcb/cloudfunctions/router/node_modules/.package-lock.json index 57b4409..b805a16 100644 --- a/uniCloud-tcb/cloudfunctions/router/node_modules/.package-lock.json +++ b/uniCloud-tcb/cloudfunctions/router/node_modules/.package-lock.json @@ -1,7 +1,7 @@ { "name": "router", "version": "1.0.0", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "../../../uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center": { @@ -15,57 +15,46 @@ "uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" } }, - "../../../uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/node_modules/uni-config-center": { - "resolved": "../../../uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center", - "link": true - }, "../../../uni_modules/vk-unicloud/uniCloud/cloudfunctions/common/vk-unicloud": { "version": "2.15.3", "license": "Apache-2.0" }, "node_modules/charenc": { "version": "0.0.2", - "resolved": "https://registry.npmmirror.com/charenc/-/charenc-0.0.2.tgz", - "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==", + "license": "BSD-3-Clause", "engines": { "node": "*" } }, "node_modules/crypt": { "version": "0.0.2", - "resolved": "https://registry.npmmirror.com/crypt/-/crypt-0.0.2.tgz", - "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==", + "license": "BSD-3-Clause", "engines": { "node": "*" } }, "node_modules/crypto-js": { "version": "4.2.0", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", - "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" + "license": "MIT" }, "node_modules/dayjs": { "version": "1.11.10", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", - "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==" + "license": "MIT" }, "node_modules/debug": { "version": "3.2.7", - "resolved": "https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "license": "MIT", "dependencies": { "ms": "^2.1.1" } }, "node_modules/is-buffer": { "version": "1.1.6", - "resolved": "https://registry.npmmirror.com/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + "license": "MIT" }, "node_modules/md5": { "version": "2.3.0", - "resolved": "https://registry.npmmirror.com/md5/-/md5-2.3.0.tgz", - "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==", + "license": "BSD-3-Clause", "dependencies": { "charenc": "0.0.2", "crypt": "0.0.2", @@ -74,18 +63,15 @@ }, "node_modules/ms": { "version": "2.1.3", - "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + "license": "MIT" }, "node_modules/node-ensure": { "version": "0.0.0", - "resolved": "https://registry.npmmirror.com/node-ensure/-/node-ensure-0.0.0.tgz", - "integrity": "sha512-DRI60hzo2oKN1ma0ckc6nQWlHU69RH6xN0sjQTjMpChPfTYvKZdcQFfdYK2RWbJcKyUizSIy/l8OTGxMAM1QDw==" + "license": "MIT" }, "node_modules/pdf-parse": { "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/pdf-parse/-/pdf-parse-1.1.1.tgz", - "integrity": "sha512-v6ZJ/efsBpGrGGknjtq9J/oC8tZWq0KWL5vQrk2GlzLEQPUDB1ex+13Rmidl1neNN358Jn9EHZw5y07FFtaC7A==", + "license": "MIT", "dependencies": { "debug": "^3.1.0", "node-ensure": "^0.0.0" diff --git a/uniCloud-tcb/cloudfunctions/router/node_modules/uni-config-center b/uniCloud-tcb/cloudfunctions/router/node_modules/uni-config-center deleted file mode 120000 index 725efc5..0000000 --- a/uniCloud-tcb/cloudfunctions/router/node_modules/uni-config-center +++ /dev/null @@ -1 +0,0 @@ -../../../../uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center \ No newline at end of file diff --git a/uniCloud-tcb/cloudfunctions/router/node_modules/uni-config-center/index.js b/uniCloud-tcb/cloudfunctions/router/node_modules/uni-config-center/index.js new file mode 100644 index 0000000..00ba62f --- /dev/null +++ b/uniCloud-tcb/cloudfunctions/router/node_modules/uni-config-center/index.js @@ -0,0 +1 @@ +"use strict";var t=require("fs"),r=require("path");function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t),o=e(r),i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var u=function(t){var r={exports:{}};return t(r,r.exports),r.exports}((function(t,r){var e="__lodash_hash_undefined__",n=9007199254740991,o="[object Arguments]",u="[object Function]",c="[object Object]",a=/^\[object .+?Constructor\]$/,f=/^(?:0|[1-9]\d*)$/,s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s[o]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s[u]=s["[object Map]"]=s["[object Number]"]=s[c]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;var l="object"==typeof i&&i&&i.Object===Object&&i,h="object"==typeof self&&self&&self.Object===Object&&self,p=l||h||Function("return this")(),_=r&&!r.nodeType&&r,v=_&&t&&!t.nodeType&&t,d=v&&v.exports===_,y=d&&l.process,g=function(){try{var t=v&&v.require&&v.require("util").types;return t||y&&y.binding&&y.binding("util")}catch(t){}}(),b=g&&g.isTypedArray;function j(t,r,e){switch(e.length){case 0:return t.call(r);case 1:return t.call(r,e[0]);case 2:return t.call(r,e[0],e[1]);case 3:return t.call(r,e[0],e[1],e[2])}return t.apply(r,e)}var w,O,m,A=Array.prototype,z=Function.prototype,M=Object.prototype,x=p["__core-js_shared__"],C=z.toString,F=M.hasOwnProperty,U=(w=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"",S=M.toString,I=C.call(Object),P=RegExp("^"+C.call(F).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),T=d?p.Buffer:void 0,q=p.Symbol,E=p.Uint8Array,$=T?T.allocUnsafe:void 0,D=(O=Object.getPrototypeOf,m=Object,function(t){return O(m(t))}),k=Object.create,B=M.propertyIsEnumerable,N=A.splice,L=q?q.toStringTag:void 0,R=function(){try{var t=vt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),G=T?T.isBuffer:void 0,V=Math.max,W=Date.now,H=vt(p,"Map"),J=vt(Object,"create"),K=function(){function t(){}return function(r){if(!xt(r))return{};if(k)return k(r);t.prototype=r;var e=new t;return t.prototype=void 0,e}}();function Q(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r-1},X.prototype.set=function(t,r){var e=this.__data__,n=nt(e,t);return n<0?(++this.size,e.push([t,r])):e[n][1]=r,this},Y.prototype.clear=function(){this.size=0,this.__data__={hash:new Q,map:new(H||X),string:new Q}},Y.prototype.delete=function(t){var r=_t(this,t).delete(t);return this.size-=r?1:0,r},Y.prototype.get=function(t){return _t(this,t).get(t)},Y.prototype.has=function(t){return _t(this,t).has(t)},Y.prototype.set=function(t,r){var e=_t(this,t),n=e.size;return e.set(t,r),this.size+=e.size==n?0:1,this},Z.prototype.clear=function(){this.__data__=new X,this.size=0},Z.prototype.delete=function(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e},Z.prototype.get=function(t){return this.__data__.get(t)},Z.prototype.has=function(t){return this.__data__.has(t)},Z.prototype.set=function(t,r){var e=this.__data__;if(e instanceof X){var n=e.__data__;if(!H||n.length<199)return n.push([t,r]),this.size=++e.size,this;e=this.__data__=new Y(n)}return e.set(t,r),this.size=e.size,this};var it,ut=function(t,r,e){for(var n=-1,o=Object(t),i=e(t),u=i.length;u--;){var c=i[it?u:++n];if(!1===r(o[c],c,o))break}return t};function ct(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":L&&L in Object(t)?function(t){var r=F.call(t,L),e=t[L];try{t[L]=void 0;var n=!0}catch(t){}var o=S.call(t);n&&(r?t[L]=e:delete t[L]);return o}(t):function(t){return S.call(t)}(t)}function at(t){return Ct(t)&&ct(t)==o}function ft(t){return!(!xt(t)||function(t){return!!U&&U in t}(t))&&(zt(t)?P:a).test(function(t){if(null!=t){try{return C.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}function st(t){if(!xt(t))return function(t){var r=[];if(null!=t)for(var e in Object(t))r.push(e);return r}(t);var r=yt(t),e=[];for(var n in t)("constructor"!=n||!r&&F.call(t,n))&&e.push(n);return e}function lt(t,r,e,n,o){t!==r&&ut(r,(function(i,u){if(o||(o=new Z),xt(i))!function(t,r,e,n,o,i,u){var a=gt(t,e),f=gt(r,e),s=u.get(f);if(s)return void rt(t,e,s);var l=i?i(a,f,e+"",t,r,u):void 0,h=void 0===l;if(h){var p=Ot(f),_=!p&&At(f),v=!p&&!_&&Ft(f);l=f,p||_||v?Ot(a)?l=a:Ct(j=a)&&mt(j)?l=function(t,r){var e=-1,n=t.length;r||(r=Array(n));for(;++e-1&&t%1==0&&t0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}(pt);function jt(t,r){return t===r||t!=t&&r!=r}var wt=at(function(){return arguments}())?at:function(t){return Ct(t)&&F.call(t,"callee")&&!B.call(t,"callee")},Ot=Array.isArray;function mt(t){return null!=t&&Mt(t.length)&&!zt(t)}var At=G||function(){return!1};function zt(t){if(!xt(t))return!1;var r=ct(t);return r==u||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}function Mt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}function xt(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}function Ct(t){return null!=t&&"object"==typeof t}var Ft=b?function(t){return function(r){return t(r)}}(b):function(t){return Ct(t)&&Mt(t.length)&&!!s[ct(t)]};function Ut(t){return mt(t)?tt(t,!0):st(t)}var St,It=(St=function(t,r,e){lt(t,r,e)},ht((function(t,r){var e=-1,n=r.length,o=n>1?r[n-1]:void 0,i=n>2?r[2]:void 0;for(o=St.length>3&&"function"==typeof o?(n--,o):void 0,i&&function(t,r,e){if(!xt(e))return!1;var n=typeof r;return!!("number"==n?mt(e)&&dt(r,e.length):"string"==n&&r in e)&&jt(e[r],t)}(r[0],r[1],i)&&(o=n<3?void 0:o,n=1),t=Object(t);++ec.call(t,r);class f{constructor({pluginId:t,defaultConfig:r={},customMerge:e,root:n}){this.pluginId=t,this.defaultConfig=r,this.pluginConfigPath=o.default.resolve(n||__dirname,t),this.customMerge=e,this._config=void 0}resolve(t){return o.default.resolve(this.pluginConfigPath,t)}hasFile(t){return n.default.existsSync(this.resolve(t))}requireFile(t){try{return require(this.resolve(t))}catch(t){if("MODULE_NOT_FOUND"===t.code)return;throw t}}_getUserConfig(){return this.requireFile("config.json")}config(t,r){if(!this._config){const t=this._getUserConfig();this._config=Array.isArray(t)?t:(this.customMerge||u)(this.defaultConfig,t)}let e=this._config;return t?function(t,r,e){if("number"==typeof r)return t[r];if("symbol"==typeof r)return a(t,r)?t[r]:e;const n="string"!=typeof(o=r)?o:o.split(".").reduce(((t,r)=>(r.split(/\[([^}]+)\]/g).forEach((r=>r&&t.push(r))),t)),[]);var o;let i=t;for(let t=0;tt?t.toUpperCase():"")}function w(e){return e.replace(g,e=>"_"+e.toLowerCase())}function v(e,t){let r,n;switch(t){case"snake2camel":n=y,r=h;break;case"camel2snake":n=w,r=g}for(const i in e)if(d(e,i)&&r.test(i)){const r=n(i);e[r]=e[i],delete e[i],p(e[r])?e[r]=v(e[r],t):Array.isArray(e[r])&&(e[r]=e[r].map(e=>v(e,t)))}return e}function _(e){return v(e,"snake2camel")}function b(e){return v(e,"camel2snake")}function T(e){return function(e,t="-"){e=e||new Date;const r=[];return r.push(e.getFullYear()),r.push(("00"+(e.getMonth()+1)).substr(-2)),r.push(("00"+e.getDate()).substr(-2)),r.join(t)}(e=e||new Date)+" "+function(e,t=":"){e=e||new Date;const r=[];return r.push(("00"+e.getHours()).substr(-2)),r.push(("00"+e.getMinutes()).substr(-2)),r.push(("00"+e.getSeconds()).substr(-2)),r.join(t)}(e)}function E(){"development"===process.env.NODE_ENV&&console.log(...arguments)}function C(e=6){let t="";for(let r=0;r-1?"&":"?"}access_token=${t.accessToken}`}return`${e}${r}`}class G{constructor(e){this.options=Object.assign({baseUrl:"https://api.weixin.qq.com",timeout:5e3},e)}async _requestWxOpenapi({name:e,url:t,data:r,options:n}){const i={method:"GET",dataType:"json",dataAsQueryString:!0,timeout:this.options.timeout};return await H({name:"auth."+e,url:`${this.options.baseUrl}${K(t,r)}`,data:r,options:n,defaultOptions:i})}async code2Session(e){return await this._requestWxOpenapi({name:"code2Session",url:"/sns/jscode2session",data:{grant_type:"authorization_code",appid:this.options.appId,secret:this.options.secret,js_code:e}})}async getOauthAccessToken(e){const t=await this._requestWxOpenapi({name:"getOauthAccessToken",url:"/sns/oauth2/access_token",data:{grant_type:"authorization_code",appid:this.options.appId,secret:this.options.secret,code:e}});return t.expiresIn&&(t.expired=Date.now()+1e3*t.expiresIn),t}async getUserInfo({accessToken:e,openid:t}={}){const{nickname:r,headimgurl:n}=await this._requestWxOpenapi({name:"getUserInfo",url:"/sns/userinfo",data:{accessToken:e,openid:t,appid:this.options.appId,secret:this.options.secret,scope:"snsapi_userinfo"}});return{nickname:r,avatar:n}}}async function Q({name:e,url:t,data:r,options:n,defaultOptions:i}){let o;n=Object.assign({},i,n,{data:b(Object.assign({},r))});try{o=await uniCloud.httpclient.request(t,n)}catch(t){return function(e,t){throw new a({code:t.code||-2,message:t.message||e+" fail"})}(e,t)}let s=o.data;const c=o.headers["content-type"];if(!Buffer.isBuffer(s)||0!==c.indexOf("text/plain")&&0!==c.indexOf("application/json"))Buffer.isBuffer(s)&&(s={buffer:s,contentType:c});else try{s=JSON.parse(s.toString())}catch(e){s=s.toString()}return _(function(e,t){if(t.ret||t.error){const r=t.ret||t.error||t.errcode||-2,n=t.msg||t.error_description||t.errmsg||e+" fail";throw new a({code:r,message:n})}return delete t.ret,delete t.msg,delete t.error,delete t.error_description,delete t.errcode,delete t.errmsg,{...t,errMsg:e+" ok",errCode:0}}(e,s||{errCode:-2,errMsg:"Request failed"}))}class X{constructor(e){this.options=Object.assign({baseUrl:"https://graph.qq.com",timeout:5e3},e)}async _requestQQOpenapi({name:e,url:t,data:r,options:n}){const i={method:"GET",dataType:"json",dataAsQueryString:!0,timeout:this.options.timeout};var o,s;return await Q({name:"auth."+e,url:(o=this.options.baseUrl,s=t,/^https?:/.test(s)?s:o+s),data:r,options:n,defaultOptions:i})}async getOpenidByToken({accessToken:e}={}){const t=await this._requestQQOpenapi({name:"getOpenidByToken",url:"/oauth2.0/me",data:{accessToken:e,unionid:1,fmt:"json"}});if(t.clientId!==this.options.appId)throw new a({code:"APPID_NOT_MATCH",message:"appid not match"});return{openid:t.openid,unionid:t.unionid}}async code2Session({code:e}={}){return await this._requestQQOpenapi({name:"getOpenidByToken",url:"https://api.q.qq.com/sns/jscode2session",data:{grant_type:"authorization_code",appid:this.options.appId,secret:this.options.secret,js_code:e}})}}const Y={RSA:"RSA-SHA1",RSA2:"RSA-SHA256"};var z={code2Session:{returnValue:{openid:"userId"}}};class W extends class{constructor(e={}){if(!e.appId)throw new Error("appId required");if(!e.privateKey)throw new Error("privateKey required");const t={gateway:"https://openapi.alipay.com/gateway.do",timeout:5e3,charset:"utf-8",version:"1.0",signType:"RSA2",timeOffset:-(new Date).getTimezoneOffset()/60,keyType:"PKCS8"};e.sandbox&&(e.gateway="https://openapi.alipaydev.com/gateway.do"),this.options=Object.assign({},t,e);const r="PKCS8"===this.options.keyType?"PRIVATE KEY":"RSA PRIVATE KEY";this.options.privateKey=this._formatKey(this.options.privateKey,r),this.options.alipayPublicKey&&(this.options.alipayPublicKey=this._formatKey(this.options.alipayPublicKey,"PUBLIC KEY"))}_formatKey(e,t){return`-----BEGIN ${t}-----\n${e}\n-----END ${t}-----`}_formatUrl(e,t){let r=e;const n=["app_id","method","format","charset","sign_type","sign","timestamp","version","notify_url","return_url","auth_token","app_auth_token"];for(const e in t)if(n.indexOf(e)>-1){const n=encodeURIComponent(t[e]);r=`${r}${r.includes("?")?"&":"?"}${e}=${n}`,delete t[e]}return{execParams:t,url:r}}_getSign(e,r){const n=r.bizContent||null;delete r.bizContent;const i=Object.assign({method:e,appId:this.options.appId,charset:this.options.charset,version:this.options.version,signType:this.options.signType,timestamp:T((o=this.options.timeOffset,new Date(Date.now()+6e4*((new Date).getTimezoneOffset()+60*(o||0)))))},r);var o;n&&(i.bizContent=JSON.stringify(b(n)));const s=b(i),a=Object.keys(s).sort().map(e=>{let t=s[e];return"[object String]"!==Array.prototype.toString.call(t)&&(t=JSON.stringify(t)),`${e}=${t}`}).join("&"),c=t.createSign(Y[this.options.signType]).update(a,"utf8").sign(this.options.privateKey,"base64");return Object.assign(s,{sign:c})}async _exec(e,t={},r={}){const n=this._getSign(e,t),{url:i,execParams:o}=this._formatUrl(this.options.gateway,n),{status:s,data:a}=await uniCloud.httpclient.request(i,{method:"POST",data:o,dataType:"text",timeout:this.options.timeout});if(200!==s)throw new Error("request fail");const c=JSON.parse(a),u=e.replace(/\./g,"_")+"_response",d=c[u],p=c.error_response;if(d){if(!r.validateSign||this._checkResponseSign(a,u)){if(!d.code||"10000"===d.code){return{errCode:0,errMsg:d.msg||"",..._(d)}}const e=d.sub_code?`${d.sub_code} ${d.sub_msg}`:""+(d.msg||"unkonwn error");throw new Error(e)}throw new Error("check sign error")}if(p)throw new Error(p.sub_msg||p.msg||"request fail");throw new Error("request fail")}_checkResponseSign(e,r){if(!this.options.alipayPublicKey||""===this.options.alipayPublicKey)return console.warn("options.alipayPublicKey is empty"),!0;if(!e)return!1;const n=this._getSignStr(e,r),i=JSON.parse(e).sign,o=t.createVerify(Y[this.options.signType]);return o.update(n,"utf8"),o.verify(this.options.alipayPublicKey,i,"base64")}_getSignStr(e,t){let r=e.trim();const n=e.indexOf(t+'"'),i=e.lastIndexOf('"sign"');return r=r.substr(n+t.length+1),r=r.substr(0,i),r=r.replace(/^[^{]*{/g,"{"),r=r.replace(/\}([^}]*)$/g,"}"),r}}{constructor(e){super(e),this._protocols=z}async code2Session(e){return await this._exec("alipay.system.oauth.token",{grantType:"authorization_code",code:e})}}function J(e){var t=e[0];return t<"0"||t>"7"?"00"+e:e}function Z(e){var t=e.toString(16);return t.length%2?"0"+t:t}function ee(e){if(e<=127)return Z(e);var t=Z(e);return Z(128+t.length/2)+t}function te(e,t){return e(t={exports:{}},t.exports),t.exports}var re=te((function(e,t){var n=r.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=o),o.prototype=Object.create(n.prototype),i(n,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=n(e);return void 0!==t?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}})),ne=(re.Buffer,re.Buffer);function ie(e){if(this.buffer=null,this.writable=!0,this.readable=!0,!e)return this.buffer=ne.alloc(0),this;if("function"==typeof e.pipe)return this.buffer=ne.alloc(0),e.pipe(this),this;if(e.length||"object"==typeof e)return this.buffer=e,this.writable=!1,process.nextTick(function(){this.emit("end",e),this.readable=!1,this.emit("close")}.bind(this)),this;throw new TypeError("Unexpected data type ("+typeof e+")")}i.inherits(ie,n),ie.prototype.write=function(e){this.buffer=ne.concat([this.buffer,ne.from(e)]),this.emit("data",e)},ie.prototype.end=function(e){e&&this.write(e),this.emit("end",e),this.emit("close"),this.writable=!1,this.readable=!1};var oe=ie,se=r.Buffer,ae=r.SlowBuffer,ce=ue;function ue(e,t){if(!se.isBuffer(e)||!se.isBuffer(t))return!1;if(e.length!==t.length)return!1;for(var r=0,n=0;n=128&&--n,n}var we={derToJose:function(e,t){e=ge(e);var r=me(t),n=r+1,i=e.length,o=0;if(48!==e[o++])throw new Error('Could not find expected "seq"');var s=e[o++];if(129===s&&(s=e[o++]),i-o0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"weeks":case"week":case"w":return 6048e5*r;case"days":case"day":case"d":return r*mt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ft;case"minutes":case"minute":case"mins":case"min":case"m":return r*lt;case"seconds":case"second":case"secs":case"sec":case"s":return r*pt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(e);if("number"===r&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=mt)return gt(e,t,mt,"day");if(t>=ft)return gt(e,t,ft,"hour");if(t>=lt)return gt(e,t,lt,"minute");if(t>=pt)return gt(e,t,pt,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=mt)return Math.round(e/mt)+"d";if(t>=ft)return Math.round(e/ft)+"h";if(t>=lt)return Math.round(e/lt)+"m";if(t>=pt)return Math.round(e/pt)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function gt(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}var yt=function(e,t){var r=t||Math.floor(Date.now()/1e3);if("string"==typeof e){var n=ht(e);if(void 0===n)return;return Math.floor(r+n/1e3)}return"number"==typeof e?r+e:void 0},wt=te((function(e,t){var r;t=e.exports=G,r="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var n=Number.MAX_SAFE_INTEGER||9007199254740991,i=t.re=[],o=t.src=[],s=0,a=s++;o[a]="0|[1-9]\\d*";var c=s++;o[c]="[0-9]+";var u=s++;o[u]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var d=s++;o[d]="("+o[a]+")\\.("+o[a]+")\\.("+o[a]+")";var p=s++;o[p]="("+o[c]+")\\.("+o[c]+")\\.("+o[c]+")";var l=s++;o[l]="(?:"+o[a]+"|"+o[u]+")";var f=s++;o[f]="(?:"+o[c]+"|"+o[u]+")";var m=s++;o[m]="(?:-("+o[l]+"(?:\\."+o[l]+")*))";var h=s++;o[h]="(?:-?("+o[f]+"(?:\\."+o[f]+")*))";var g=s++;o[g]="[0-9A-Za-z-]+";var y=s++;o[y]="(?:\\+("+o[g]+"(?:\\."+o[g]+")*))";var w=s++,v="v?"+o[d]+o[m]+"?"+o[y]+"?";o[w]="^"+v+"$";var _="[v=\\s]*"+o[p]+o[h]+"?"+o[y]+"?",b=s++;o[b]="^"+_+"$";var T=s++;o[T]="((?:<|>)?=?)";var E=s++;o[E]=o[c]+"|x|X|\\*";var C=s++;o[C]=o[a]+"|x|X|\\*";var A=s++;o[A]="[v=\\s]*("+o[C]+")(?:\\.("+o[C]+")(?:\\.("+o[C]+")(?:"+o[m]+")?"+o[y]+"?)?)?";var I=s++;o[I]="[v=\\s]*("+o[E]+")(?:\\.("+o[E]+")(?:\\.("+o[E]+")(?:"+o[h]+")?"+o[y]+"?)?)?";var S=s++;o[S]="^"+o[T]+"\\s*"+o[A]+"$";var x=s++;o[x]="^"+o[T]+"\\s*"+o[I]+"$";var k=s++;o[k]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var O=s++;o[O]="(?:~>?)";var P=s++;o[P]="(\\s*)"+o[O]+"\\s+",i[P]=new RegExp(o[P],"g");var R=s++;o[R]="^"+o[O]+o[A]+"$";var j=s++;o[j]="^"+o[O]+o[I]+"$";var D=s++;o[D]="(?:\\^)";var q=s++;o[q]="(\\s*)"+o[D]+"\\s+",i[q]=new RegExp(o[q],"g");var N=s++;o[N]="^"+o[D]+o[A]+"$";var U=s++;o[U]="^"+o[D]+o[I]+"$";var L=s++;o[L]="^"+o[T]+"\\s*("+_+")$|^$";var V=s++;o[V]="^"+o[T]+"\\s*("+v+")$|^$";var M=s++;o[M]="(\\s*)"+o[T]+"\\s*("+_+"|"+o[A]+")",i[M]=new RegExp(o[M],"g");var B=s++;o[B]="^\\s*("+o[A]+")\\s+-\\s+("+o[A]+")\\s*$";var F=s++;o[F]="^\\s*("+o[I]+")\\s+-\\s+("+o[I]+")\\s*$";var $=s++;o[$]="(<|>)?=?\\s*\\*";for(var H=0;H<35;H++)r(H,o[H]),i[H]||(i[H]=new RegExp(o[H]));function K(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof G)return e;if("string"!=typeof e)return null;if(e.length>256)return null;if(!(t.loose?i[b]:i[w]).test(e))return null;try{return new G(e,t)}catch(e){return null}}function G(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof G){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof G))return new G(e,t);r("SemVer",e,t),this.options=t,this.loose=!!t.loose;var o=e.trim().match(t.loose?i[b]:i[w]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new G(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(J(e,t))return null;var r=K(e),n=K(t),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var o="prerelease"}for(var s in r)if(("major"===s||"minor"===s||"patch"===s)&&r[s]!==n[s])return i+s;return o},t.compareIdentifiers=X;var Q=/^[0-9]+$/;function X(e,t){var r=Q.test(e),n=Q.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e0}function W(e,t,r){return Y(e,t,r)<0}function J(e,t,r){return 0===Y(e,t,r)}function Z(e,t,r){return 0!==Y(e,t,r)}function ee(e,t,r){return Y(e,t,r)>=0}function te(e,t,r){return Y(e,t,r)<=0}function re(e,t,r,n){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return J(e,r,n);case"!=":return Z(e,r,n);case">":return z(e,r,n);case">=":return ee(e,r,n);case"<":return W(e,r,n);case"<=":return te(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}function ne(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof ne){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof ne))return new ne(e,t);r("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ie?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}t.rcompareIdentifiers=function(e,t){return X(t,e)},t.major=function(e,t){return new G(e,t).major},t.minor=function(e,t){return new G(e,t).minor},t.patch=function(e,t){return new G(e,t).patch},t.compare=Y,t.compareLoose=function(e,t){return Y(e,t,!0)},t.rcompare=function(e,t,r){return Y(t,e,r)},t.sort=function(e,r){return e.sort((function(e,n){return t.compare(e,n,r)}))},t.rsort=function(e,r){return e.sort((function(e,n){return t.rcompare(e,n,r)}))},t.gt=z,t.lt=W,t.eq=J,t.neq=Z,t.gte=ee,t.lte=te,t.cmp=re,t.Comparator=ne;var ie={};function oe(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof oe)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new oe(e.raw,t);if(e instanceof ne)return new oe(e.value,t);if(!(this instanceof oe))return new oe(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function se(e){return!e||"x"===e.toLowerCase()||"*"===e}function ae(e,t,r,n,i,o,s,a,c,u,d,p,l){return((t=se(r)?"":se(n)?">="+r+".0.0":se(i)?">="+r+"."+n+".0":">="+t)+" "+(a=se(c)?"":se(u)?"<"+(+c+1)+".0.0":se(d)?"<"+c+"."+(+u+1)+".0":p?"<="+c+"."+u+"."+d+"-"+p:"<="+a)).trim()}function ce(e,t,n){for(var i=0;i0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function ue(e,t,r){try{t=new oe(t,r)}catch(e){return!1}return t.test(e)}function de(e,t,r,n){var i,o,s,a,c;switch(e=new G(e,n),t=new oe(t,n),r){case">":i=z,o=te,s=W,a=">",c=">=";break;case"<":i=W,o=ee,s=z,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ue(e,t,n))return!1;for(var u=0;u=0.0.0")),p=p||e,l=l||e,i(e.semver,p.semver,n)?p=e:s(e.semver,l.semver,n)&&(l=e)})),p.operator===a||p.operator===c)return!1;if((!l.operator||l.operator===a)&&o(e,l.semver))return!1;if(l.operator===c&&s(e,l.semver))return!1}return!0}ne.prototype.parse=function(e){var t=this.options.loose?i[L]:i[V],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new G(r[2],this.options.loose):this.semver=ie},ne.prototype.toString=function(){return this.value},ne.prototype.test=function(e){return r("Comparator.test",e,this.options.loose),this.semver===ie||("string"==typeof e&&(e=new G(e,this.options)),re(e,this.operator,this.semver,this.options))},ne.prototype.intersects=function(e,t){if(!(e instanceof ne))throw new TypeError("a Comparator is required");var r;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return r=new oe(e.value,t),ue(this.value,r,t);if(""===e.operator)return r=new oe(this.value,t),ue(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=re(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=re(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||o&&s||a||c},t.Range=oe,oe.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},oe.prototype.toString=function(){return this.range},oe.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?i[F]:i[B];e=e.replace(n,ae),r("hyphen replace",e),e=e.replace(i[M],"$1$2$3"),r("comparator trim",e,i[M]),e=(e=(e=e.replace(i[P],"$1~")).replace(i[q],"$1^")).split(/\s+/).join(" ");var o=t?i[L]:i[V],s=e.split(" ").map((function(e){return function(e,t){return r("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){r("caret",e,t);var n=t.loose?i[U]:i[N];return e.replace(n,(function(t,n,i,o,s){var a;return r("caret",e,t,n,i,o,s),se(n)?a="":se(i)?a=">="+n+".0.0 <"+(+n+1)+".0.0":se(o)?a="0"===n?">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":">="+n+"."+i+".0 <"+(+n+1)+".0.0":s?(r("replaceCaret pr",s),a="0"===n?"0"===i?">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+i+"."+(+o+1):">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+o+"-"+s+" <"+(+n+1)+".0.0"):(r("no pr"),a="0"===n?"0"===i?">="+n+"."+i+"."+o+" <"+n+"."+i+"."+(+o+1):">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+o+" <"+(+n+1)+".0.0"),r("caret return",a),a}))}(e,t)})).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var n=t.loose?i[j]:i[R];return e.replace(n,(function(t,n,i,o,s){var a;return r("tilde",e,t,n,i,o,s),se(n)?a="":se(i)?a=">="+n+".0.0 <"+(+n+1)+".0.0":se(o)?a=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":s?(r("replaceTilde pr",s),a=">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+(+i+1)+".0"):a=">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0",r("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var n=t.loose?i[x]:i[S];return e.replace(n,(function(t,n,i,o,s,a){r("xRange",e,t,n,i,o,s,a);var c=se(i),u=c||se(o),d=u||se(s);return"="===n&&d&&(n=""),c?t=">"===n||"<"===n?"<0.0.0":"*":n&&d?(u&&(o=0),s=0,">"===n?(n=">=",u?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===n&&(n="<",u?i=+i+1:o=+o+1),t=n+i+"."+o+"."+s):u?t=">="+i+".0.0 <"+(+i+1)+".0.0":d&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),r("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(i[$],"")}(e,t),r("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(o)}))),s=s.map((function(e){return new ne(e,this.options)}),this)},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Range is required");return this.set.some((function(r){return r.every((function(r){return e.set.some((function(e){return e.every((function(e){return r.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new oe(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},oe.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new G(e,this.options));for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!z(r,t)||(r=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}if(r&&e.test(r))return r;return null},t.validRange=function(e,t){try{return new oe(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,r){return de(e,t,"<",r)},t.gtr=function(e,t,r){return de(e,t,">",r)},t.outside=de,t.prerelease=function(e,t){var r=K(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new oe(e,r),t=new oe(t,r),e.intersects(t)},t.coerce=function(e){if(e instanceof G)return e;if("string"!=typeof e)return null;var t=e.match(i[k]);if(null==t)return null;return K(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}})),vt=(wt.SEMVER_SPEC_VERSION,wt.re,wt.src,wt.parse,wt.valid,wt.clean,wt.SemVer,wt.inc,wt.diff,wt.compareIdentifiers,wt.rcompareIdentifiers,wt.major,wt.minor,wt.patch,wt.compare,wt.compareLoose,wt.rcompare,wt.sort,wt.rsort,wt.gt,wt.lt,wt.eq,wt.neq,wt.gte,wt.lte,wt.cmp,wt.Comparator,wt.Range,wt.toComparators,wt.satisfies,wt.maxSatisfying,wt.minSatisfying,wt.minVersion,wt.validRange,wt.ltr,wt.gtr,wt.outside,wt.prerelease,wt.intersects,wt.coerce,wt.satisfies(process.version,"^6.12.0 || >=8.0.0")),_t=["RS256","RS384","RS512","ES256","ES384","ES512"],bt=["RS256","RS384","RS512"],Tt=["HS256","HS384","HS512"];vt&&(_t.splice(3,0,"PS256","PS384","PS512"),bt.splice(3,0,"PS256","PS384","PS512"));var Et=/^\s+|\s+$/g,Ct=/^[-+]0x[0-9a-f]+$/i,At=/^0b[01]+$/i,It=/^0o[0-7]+$/i,St=/^(?:0|[1-9]\d*)$/,xt=parseInt;function kt(e){return e!=e}function Ot(e,t){return function(e,t){for(var r=-1,n=e?e.length:0,i=Array(n);++r-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){var t=Ht(e)?qt.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)}function Ht(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Kt(e){return!!e&&"object"==typeof e}var Gt=function(e,t,r,n){var i;e=$t(e)?e:(i=e)?Ot(i,function(e){return $t(e)?Vt(e):Mt(e)}(i)):[],r=r&&!n?function(e){var t=function(e){if(!e)return 0===e?e:0;if((e=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||Kt(e)&&"[object Symbol]"==qt.call(e)}(e))return NaN;if(Ht(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ht(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Et,"");var r=At.test(e);return r||It.test(e)?xt(e.slice(2),r?2:8):Ct.test(e)?NaN:+e}(e))===1/0||e===-1/0){return 17976931348623157e292*(e<0?-1:1)}return e==e?e:0}(e),r=t%1;return t==t?r?t-r:t:0}(r):0;var o=e.length;return r<0&&(r=Lt(o+r,0)),function(e){return"string"==typeof e||!Ft(e)&&Kt(e)&&"[object String]"==qt.call(e)}(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&function(e,t,r){if(t!=t)return function(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o-1},Qt=Object.prototype.toString;var Xt=function(e){return!0===e||!1===e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Boolean]"==Qt.call(e)},Yt=/^\s+|\s+$/g,zt=/^[-+]0x[0-9a-f]+$/i,Wt=/^0b[01]+$/i,Jt=/^0o[0-7]+$/i,Zt=parseInt,er=Object.prototype.toString;function tr(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var rr=function(e){return"number"==typeof e&&e==function(e){var t=function(e){if(!e)return 0===e?e:0;if((e=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==er.call(e)}(e))return NaN;if(tr(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=tr(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Yt,"");var r=Wt.test(e);return r||Jt.test(e)?Zt(e.slice(2),r?2:8):zt.test(e)?NaN:+e}(e))===1/0||e===-1/0){return 17976931348623157e292*(e<0?-1:1)}return e==e?e:0}(e),r=t%1;return t==t?r?t-r:t:0}(e)},nr=Object.prototype.toString;var ir=function(e){return"number"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Number]"==nr.call(e)};var or=Function.prototype,sr=Object.prototype,ar=or.toString,cr=sr.hasOwnProperty,ur=ar.call(Object),dr=sr.toString,pr=function(e,t){return function(r){return e(t(r))}}(Object.getPrototypeOf,Object);var lr=function(e){if(!function(e){return!!e&&"object"==typeof e}(e)||"[object Object]"!=dr.call(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e))return!1;var t=pr(e);if(null===t)return!0;var r=cr.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ar.call(r)==ur},fr=Object.prototype.toString,mr=Array.isArray;var hr=function(e){return"string"==typeof e||!mr(e)&&function(e){return!!e&&"object"==typeof e}(e)&&"[object String]"==fr.call(e)},gr=/^\s+|\s+$/g,yr=/^[-+]0x[0-9a-f]+$/i,wr=/^0b[01]+$/i,vr=/^0o[0-7]+$/i,_r=parseInt,br=Object.prototype.toString;function Tr(e,t){var r;if("function"!=typeof t)throw new TypeError("Expected a function");return e=function(e){var t=function(e){if(!e)return 0===e?e:0;if((e=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==br.call(e)}(e))return NaN;if(Er(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Er(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(gr,"");var r=wr.test(e);return r||vr.test(e)?_r(e.slice(2),r?2:8):yr.test(e)?NaN:+e}(e))===1/0||e===-1/0){return 17976931348623157e292*(e<0?-1:1)}return e==e?e:0}(e),r=t%1;return t==t?r?t-r:t:0}(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}}function Er(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var Cr=function(e){return Tr(2,e)},Ar=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];vt&&Ar.splice(3,0,"PS256","PS384","PS512");var Ir={expiresIn:{isValid:function(e){return rr(e)||hr(e)&&e},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(e){return rr(e)||hr(e)&&e},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(e){return hr(e)||Array.isArray(e)},message:'"audience" must be a string or array'},algorithm:{isValid:Gt.bind(null,Ar),message:'"algorithm" must be a valid string enum value'},header:{isValid:lr,message:'"header" must be an object'},encoding:{isValid:hr,message:'"encoding" must be a string'},issuer:{isValid:hr,message:'"issuer" must be a string'},subject:{isValid:hr,message:'"subject" must be a string'},jwtid:{isValid:hr,message:'"jwtid" must be a string'},noTimestamp:{isValid:Xt,message:'"noTimestamp" must be a boolean'},keyid:{isValid:hr,message:'"keyid" must be a string'},mutatePayload:{isValid:Xt,message:'"mutatePayload" must be a boolean'}},Sr={iat:{isValid:ir,message:'"iat" should be a number of seconds'},exp:{isValid:ir,message:'"exp" should be a number of seconds'},nbf:{isValid:ir,message:'"nbf" should be a number of seconds'}};function xr(e,t,r,n){if(!lr(r))throw new Error('Expected "'+n+'" to be a plain object.');Object.keys(r).forEach((function(i){var o=e[i];if(o){if(!o.isValid(r[i]))throw new Error(o.message)}else if(!t)throw new Error('"'+i+'" is not allowed in "'+n+'"')}))}var kr={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},Or=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"],Pr=function(e,t,r,n){var i;if("function"!=typeof r||n||(n=r,r={}),r||(r={}),r=Object.assign({},r),i=n||function(e,t){if(e)throw e;return t},r.clockTimestamp&&"number"!=typeof r.clockTimestamp)return i(new st("clockTimestamp must be a number"));if(void 0!==r.nonce&&("string"!=typeof r.nonce||""===r.nonce.trim()))return i(new st("nonce must be a non-empty string"));var o=r.clockTimestamp||Math.floor(Date.now()/1e3);if(!e)return i(new st("jwt must be provided"));if("string"!=typeof e)return i(new st("jwt must be a string"));var s,a=e.split(".");if(3!==a.length)return i(new st("jwt malformed"));try{s=it(e,{complete:!0})}catch(e){return i(e)}if(!s)return i(new st("invalid token"));var c,u=s.header;if("function"==typeof t){if(!n)return i(new st("verify must be called asynchronous if secret or public key is provided as a callback"));c=t}else c=function(e,r){return r(null,t)};return c(u,(function(t,n){if(t)return i(new st("error in secret or public key callback: "+t.message));var c,d=""!==a[2].trim();if(!d&&n)return i(new st("jwt signature is required"));if(d&&!n)return i(new st("secret or public key must be provided"));if(d||r.algorithms||(r.algorithms=["none"]),r.algorithms||(r.algorithms=~n.toString().indexOf("BEGIN CERTIFICATE")||~n.toString().indexOf("BEGIN PUBLIC KEY")?_t:~n.toString().indexOf("BEGIN RSA PUBLIC KEY")?bt:Tt),!~r.algorithms.indexOf(s.header.alg))return i(new st("invalid algorithm"));try{c=nt.verify(e,s.header.alg,n)}catch(e){return i(e)}if(!c)return i(new st("invalid signature"));var p=s.payload;if(void 0!==p.nbf&&!r.ignoreNotBefore){if("number"!=typeof p.nbf)return i(new st("invalid nbf value"));if(p.nbf>o+(r.clockTolerance||0))return i(new ct("jwt not active",new Date(1e3*p.nbf)))}if(void 0!==p.exp&&!r.ignoreExpiration){if("number"!=typeof p.exp)return i(new st("invalid exp value"));if(o>=p.exp+(r.clockTolerance||0))return i(new dt("jwt expired",new Date(1e3*p.exp)))}if(r.audience){var l=Array.isArray(r.audience)?r.audience:[r.audience];if(!(Array.isArray(p.aud)?p.aud:[p.aud]).some((function(e){return l.some((function(t){return t instanceof RegExp?t.test(e):t===e}))})))return i(new st("jwt audience invalid. expected: "+l.join(" or ")))}if(r.issuer&&("string"==typeof r.issuer&&p.iss!==r.issuer||Array.isArray(r.issuer)&&-1===r.issuer.indexOf(p.iss)))return i(new st("jwt issuer invalid. expected: "+r.issuer));if(r.subject&&p.sub!==r.subject)return i(new st("jwt subject invalid. expected: "+r.subject));if(r.jwtid&&p.jti!==r.jwtid)return i(new st("jwt jwtid invalid. expected: "+r.jwtid));if(r.nonce&&p.nonce!==r.nonce)return i(new st("jwt nonce invalid. expected: "+r.nonce));if(r.maxAge){if("number"!=typeof p.iat)return i(new st("iat required when maxAge is specified"));var f=yt(r.maxAge,p.iat);if(void 0===f)return i(new st('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(o>=f+(r.clockTolerance||0))return i(new dt("maxAge exceeded",new Date(1e3*f)))}if(!0===r.complete){var m=s.signature;return i(null,{header:u,payload:p,signature:m})}return i(null,p)}))},Rr=function(e,t,r,n){"function"==typeof r?(n=r,r={}):r=r||{};var i="object"==typeof e&&!Buffer.isBuffer(e),o=Object.assign({alg:r.algorithm||"HS256",typ:i?"JWT":void 0,kid:r.keyid},r.header);function s(e){if(n)return n(e);throw e}if(!t&&"none"!==r.algorithm)return s(new Error("secretOrPrivateKey must have a value"));if(void 0===e)return s(new Error("payload is required"));if(i){try{!function(e){xr(Sr,!0,e,"payload")}(e)}catch(e){return s(e)}r.mutatePayload||(e=Object.assign({},e))}else{var a=Or.filter((function(e){return void 0!==r[e]}));if(a.length>0)return s(new Error("invalid "+a.join(",")+" option for "+typeof e+" payload"))}if(void 0!==e.exp&&void 0!==r.expiresIn)return s(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(void 0!==e.nbf&&void 0!==r.notBefore)return s(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{!function(e){xr(Ir,!1,e,"options")}(r)}catch(e){return s(e)}var c=e.iat||Math.floor(Date.now()/1e3);if(r.noTimestamp?delete e.iat:i&&(e.iat=c),void 0!==r.notBefore){try{e.nbf=yt(r.notBefore,c)}catch(e){return s(e)}if(void 0===e.nbf)return s(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(void 0!==r.expiresIn&&"object"==typeof e){try{e.exp=yt(r.expiresIn,c)}catch(e){return s(e)}if(void 0===e.exp)return s(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(kr).forEach((function(t){var n=kr[t];if(void 0!==r[t]){if(void 0!==e[n])return s(new Error('Bad "options.'+t+'" option. The payload already has an "'+n+'" property.'));e[n]=r[t]}}));var u=r.encoding||"utf8";if("function"!=typeof n)return nt.sign({header:o,payload:e,secret:t,encoding:u});n=n&&Cr(n),nt.createSign({header:o,privateKey:t,payload:e,encoding:u}).once("error",n).once("done",(function(e){n(null,e)}))};let jr=[];class Dr{constructor(e){this.options=Object.assign({baseUrl:"https://appleid.apple.com",timeout:1e4},e)}async _fetch(e,t){const{baseUrl:r}=this.options;return uniCloud.httpclient.request(r+e,t)}async verifyIdentityToken(e){const t=e.split(".")[0],{kid:r}=JSON.parse(Buffer.from(t,"base64").toString());if(!jr.length)try{jr=await this.getAuthKeys()}catch(e){return{code:10705,msg:e.message}}const n=this.getUsedKey(jr,r);if(!Object.keys(n).length&&!this.fetched)try{jr=await this.getAuthKeys()}catch(e){return{code:10705,msg:e.message}}let i=null;try{i=Pr(e,function(e,t){var r=Buffer.from(e,"base64"),n=Buffer.from(t,"base64"),i=r.toString("hex"),o=n.toString("hex");i=J(i),o=J(o);var s=i.length/2,a=o.length/2,c=ee(s),u=ee(a),d="30"+ee(s+a+c.length/2+u.length/2+2)+"02"+c+i+"02"+u+o;return"-----BEGIN RSA PUBLIC KEY-----\n"+Buffer.from(d,"hex").toString("base64").match(/.{1,64}/g).join("\n")+"\n-----END RSA PUBLIC KEY-----\n"}(n.n,n.e),{algorithms:n.alg})}catch(e){return{code:10705,msg:e.message}}return{code:0,msg:i}}async getAuthKeys(){const{status:e,data:t}=await this._fetch("/auth/keys",{method:"GET",dataType:"json",timeout:this.options.timeout});if(200!==e)throw new Error("request https://appleid.apple.com/auth/keys fail");return t.keys}getUsedKey(e,t){let r={};for(let n=0;nvoid 0===e))return{code:N,messageValues:{param:this.t("dcloud-appid")}};const r=await P.doc(e).get(),n=r&&r.data&&r.data[0];if(!n)return{code:10002};const i=Object.keys(q).reduce((e,t)=>{const r=t,i=function(e,t){return t.split(".").reduce((e,t)=>e&&e[t],e)}(n,t);return i&&e.push({[r]:i}),e},[]);let o;const s={dcloud_appid:Mr.in(t),_id:Mr.neq(n._id)},a={dcloud_appid:Mr.exists(!1),_id:Mr.neq(n._id)};switch(i.length){case 0:return{code:10004};case 1:o=Mr.or([Mr.and([i[0],s]),Mr.and([i[0],a])]);break;default:o=Mr.or([Mr.and([Mr.or(i),s]),Mr.and([Mr.or(i),a])])}const c=await P.where(o).limit(1).get();return c&&c.data&&c.data[0]?{code:10005}:{code:0}}const Fr=uniCloud.database().command;const $r=uniCloud.database();const Hr=uniCloud.database();const Kr=uniCloud.database();async function Gr(e){const t=["apiKey","apiSecret"];for(let r=0,n=t.length;r0){u=a.and(a.or(c),a.or({dcloud_appid:a.in(s)},{dcloud_appid:a.exists(!1)}));if((await P.where(u).limit(1).get()).data.length>0)return{code:10201,messageValues:{type:this.t("username")}}}const d={role:o,nickname:t,dcloud_appid:s,register_date:Date.now()};if(e&&(d.username=e),r){const{passwordHash:e,version:t}=this.encryptPwd(r);d.password=e,t&&(d.password_secret_version=t)}return n&&(d.mobile=n,d.mobile_confirmed=1),i&&(d.email=i,d.email_confirmed=1),{code:0,uid:(await P.add(d)).id}},getUserInfo:async function({uid:e,field:t}){if(!e)return{code:N,messageValues:{param:this.t("user-id")}};let r;if(t&&t.length){const n={};for(let e=0;evoid 0===e.dcloud_appid||e.dcloud_appid.includes(this.context.APPID));if(0===i.length)return{code:10002};if(i.length>1)return{code:10005};const o=i[0]._id;return this.resetPwd({uid:o,password:r})},setAvatar:async function(e){return await P.doc(e.uid).update({avatar:e.avatar}),{code:0,msg:""}},updatePwd:async function(e){const t=await P.doc(e.uid).get();if(t&&t.data&&t.data.length>0){if(0===this._checkPwd(t.data[0],e.oldPassword).code){const{passwordHash:r,version:n}=this.encryptPwd(e.newPassword),i={password:r,token:[]};n&&(i.password_secret_version=n);return E("upRes",await P.doc(t.data[0]._id).update(i)),{code:0,msg:""}}return{code:40202}}return{code:40201}},updateUser:async function(e){const t=e.uid;if(!t)return{code:N,messageValues:{param:this.t("user-id")}};delete e.uid;const{username:r,email:n}=e,{usernameToLowerCase:i,emailToLowerCase:o}=this._getConfig();let s=r&&r.trim(),a=n&&n.trim();return s&&(i&&(s=s.toLowerCase()),e.username=s),a&&(o&&(a=a.toLowerCase()),e.email=a),E("update -> upRes",await P.doc(t).update(e)),{code:0,msg:""}},banAccount:async function({uid:e}={}){return $.call(this,{uid:e,status:B})},unbanAccount:async function({uid:e}={}){return $.call(this,{uid:e,status:M})},closeAccount:async function({uid:e}={}){return $.call(this,{uid:e,status:F})},openAccount:async function({uid:e}={}){return $.call(this,{uid:e,status:M})},_getAlipayApi:function(){const e=this.context.PLATFORM,t=this._getConfig();if(!t.oauth||!t.oauth.alipay)throw new Error(this.t("config-param-require",{param:e+".alipay"}));return["appid","privateKey"].forEach(r=>{if(!t.oauth.alipay[r])throw new Error(this.t("config-param-require",{param:`${e}.alipay.${r}`}))}),Ur({...t.oauth.alipay})},_getValidInviteCode:async function({inviteCode:e}){let t,r=10;e?(r=1,t=e):t=Vr();let n=!1;try{for(;r>0&&!n;){r--;if(0===(await P.where({my_invite_code:t}).get()).data.length){n=!0;break}t=Vr()}t=Vr()}catch(e){}return n?{code:0,inviteCode:t}:e?{code:80401}:{code:80402}},_addUser:async function(e,{needPermission:t,autoSetDcloudAppid:r=!0}={}){const n=this._getConfig(),i={...e,dcloud_appid:r?[this.context.APPID]:[],register_date:Date.now()},o=(await P.add(i)).id;let s;if(n.removePermissionAndRoleFromToken)s=await this.createToken({uid:o,needPermission:t});else{const t=e.role||[];let r;r=0===t.length||t.includes("admin")?[]:await this._getPermissionListByRoleList(t),s=await this.createToken({uid:o,role:t,permission:r})}const{token:a,tokenExpired:c}=s;return await P.doc(o).update({token:[a]}),{token:a,tokenExpired:c,uid:o,type:"register",userInfo:Object.assign({},i,{token:[a]})}},_loginExec:async function(e,t={}){if(e.status===B)return{code:10001};if(e.status===F)return{code:10006};const r=this._getConfig();let n=e.token||[];"string"==typeof n&&(n=[n]);const i=this._getExpiredToken(n);let o;if(n=n.filter(e=>-1===i.indexOf(e)),r.removePermissionAndRoleFromToken){const r=t.needPermission;o=await this.createToken({uid:e._id,needPermission:r})}else{const t=e.role||[];let r;r=0===t.length||t.includes("admin")?[]:await this._getPermissionListByRoleList(t),o=await this.createToken({uid:e._id,role:t,permission:r})}const{token:s,tokenExpired:a}=o;n.push(s),e.token=n;const c={last_login_date:Date.now(),last_login_ip:this.context.CLIENTIP,token:n,...t.extraData};await P.doc(e._id).update(c);const u=Object.assign({},e,c);return{code:0,msg:"",token:s,uid:u._id,username:u.username,type:"login",userInfo:u,tokenExpired:a}},_registerExec:async function(e,{needPermission:t,autoSetDcloudAppid:r=!0}={}){const{my_invite_code:n}=e;if(this._getConfig().autoSetInviteCode||n){const t=await this._getValidInviteCode({inviteCode:n});if(t.code)return t;e.my_invite_code=t.inviteCode}const{PLATFORM:i,appId:o,appid:s,APPID:a,uniPlatform:c,appName:u,appVersion:d,appVersionCode:p,channel:l,clientIP:f,CLIENTIP:m,OS:h,osName:g}=this.context;return e.register_env={appid:o||s||a||"",uni_platform:c||i||"",os_name:g||h||"",app_name:u||"",app_version:d||"",app_version_code:p||"",channel:l?l+"":"",client_ip:f||m||""},{code:0,msg:"",...await this._addUser(e,{needPermission:t,autoSetDcloudAppid:r})}},_getWeixinApi:function(){const e=this.context.PLATFORM,t=this._getConfig();if(!t.oauth||!t.oauth.weixin)throw new Error(this.t("config-param-require",{param:e+".weixin"}));return["appid","appsecret"].forEach(r=>{if(!t.oauth.weixin[r])throw new Error(this.t("config-param-require",{param:`${e}.weixin.${r}`}))}),qr({...t.oauth.weixin})},_getQQApi:function(){const e=this.context.PLATFORM,t=this._getConfig();if(!t.oauth||!t.oauth.qq)throw new Error(this.t("config-param-require",{param:e+".qq"}));return["appid","appsecret"].forEach(r=>{if(!t.oauth.qq[r])throw new Error(this.t("config-param-require",{param:`${e}.qq.${r}`}))}),Nr({...t.oauth.qq})},_getMatchedUser:function(e,t){if(0===e.length)return{code:10002};let r;const n={},i={};for(let r=e.length-1;r>=0;r--){const o=e[r];for(let s=0;s0?{code:10003,messageValues:{target:"用户"}}:{code:0,msg:"",userMatched:r,fieldMatched:s,isFallbackValueMatched:!!s&&i[s]}},_getCurrentAppUser:function(e){const t=this.context.APPID;return e.filter(e=>void 0===e.dcloud_appid||null===e.dcloud_appid||e.dcloud_appid.indexOf(t)>-1||e.dcloud_appid.indexOf(null)>-1)},_checkLoginUserList:function(e){if(e&&1!==e.length)return e[0].status===F?{code:10006}:{code:10005}},setAuthorizedAppLogin:async function({uid:e,dcloudAppidList:t}={}){if("array"!==m(t))return{code:U,messageValues:{param:"dcloudAppidList",reason:this.t("type-array-required",{param:this.t("dcloud-appid-list")})}};if(t&&0!==t.length){const r=await Br.bind(this)({uid:e,dcloudAppidList:t});if(r.code)return r}return await P.doc(e).update({dcloud_appid:Mr.set(t)}),{code:0}},authorizeAppLogin:async function({uid:e,dcloudAppid:t}={}){const r=await Br.bind(this)({uid:e,dcloudAppidList:[t]});return r.code?r:(await P.doc(e).update({dcloud_appid:Mr.push(t)}),{code:0})},forbidAppLogin:async function({uid:e,dcloudAppid:t}={}){return e?(await P.doc(e).update({dcloud_appid:Mr.pull(t)}),{code:0}):{code:N,messageValues:{param:this.t("user-id")}}},acceptInvite:async function({uid:e,inviteCode:t}){const r=await P.where({_id:Fr.neq(e),inviter_uid:Fr.not(Fr.all([e])),my_invite_code:t}).get();if(1!==r.data.length)return{code:80501,msg:"邀请码无效"};const n=[r.data[0]._id].concat(r.data[0].inviter_uid||[]),i=await P.doc(e).field({my_invite_code:!0,inviter_uid:!0}).get();if(0===i.data.length)return{code:80502};if(i.data[0].inviter_uid&&i.data[0].inviter_uid.length>0)return{code:80503,msg:"邀请码不可修改"};const o=Date.now();return await P.doc(e).update({inviter_uid:n,invite_time:o}),await P.where({inviter_uid:e}).update({inviter_uid:Fr.push(n)}),{code:0,msg:""}},getInvitedUser:async function({uid:e,level:t=1,limit:r=20,offset:n=0,needTotal:i=!1}){const o={code:0,msg:"",invitedUser:(await P.where({["inviter_uid."+(t-1)]:e}).field({_id:!0,username:!0,mobile:!0,invite_time:!0}).orderBy("invite_time","desc").skip(n).limit(r).get()).data};if(i){const r=await P.where({["inviter_uid."+(t-1)]:e}).count();o.total=r.total}return o},setUserInviteCode:async function({uid:e,myInviteCode:t}){const r=await this._getValidInviteCode({inviteCode:t});return r.code?r:(await P.doc(e).update({my_invite_code:r.inviteCode}),{code:0,msg:"",myInviteCode:r.inviteCode})},loginByAlipay:async function(e){"string"==typeof e&&(e={code:e});const{needPermission:t,code:r,myInviteCode:n,role:i,type:o}=e,{openid:s}=await this._getAlipayApi().code2Session(r);if(!s)return{code:10501,messageValues:{account:this.t("alipay-account")}};let a=await P.where({ali_openid:s}).get();if(a=this._getCurrentAppUser(a.data),a&&a.length>0){if("register"===o)return{code:10502,messageValues:{type:this.t("alipay-account")}};if(1!==a.length)return{code:10005};const e=a[0],r=await this._loginExec(e,{needPermission:t});if(0!==r.code)return r;const{userInfo:n}=r;return{...r,openid:s,mobileConfirmed:1===n.mobile_confirmed,emailConfirmed:1===n.email_confirmed}}{if("login"===o)return{code:10503,messageValues:{type:this.t("alipay-account")}};const e={ali_openid:s};e.my_invite_code=n,e.role=i;const r=await this._registerExec(e,{needPermission:t});return 0!==r.code?r:{...r,openid:s,mobileConfirmed:!1,emailConfirmed:!1}}},loginByEmail:async function(e){let{email:t,code:r,password:n,myInviteCode:i,type:o,needPermission:s,role:a}=e||{};if(t=t&&t.trim(),!t)return{code:N,messageValues:{param:"邮箱"}};const{emailToLowerCase:c}=this._getConfig();let u=t;c&&(u=t.toLowerCase());const d=await this.verifyCode({email:u,code:r,type:o||"login"});if(0!==d.code)return d;let p={email:t,email_confirmed:1};const l={field:"email",value:t},f=$r.command;u!==t&&(p=f.or(p,{email:u,email_confirmed:1}),l.fallbackValue=u);let m=await P.where(p).get();if(m=this._getCurrentAppUser(m.data),m&&m.length>0){if("register"===o)return{code:10301,messageValues:{type:"邮箱"}};const e=this._getMatchedUser(m,[l]);if(e.code)return e;const{userMatched:t}=e,r=await this._loginExec(t,{needPermission:s});return 0!==r.code?r:{...r,email:u}}{if("login"===o)return{code:10302,messageValues:{type:"邮箱"}};const e={email:u,email_confirmed:1},t=n&&n.trim();if(t){const{passwordHash:r,version:n}=this.encryptPwd(t);e.password=r,n&&(e.password_secret_version=n)}e.my_invite_code=i,e.role=a;const r=await this._registerExec(e,{needPermission:s});return 0!==r.code?r:{...r,email:u}}},loginBySms:async function({mobile:e,code:t,password:r,inviteCode:n,myInviteCode:i,type:o,needPermission:s,role:a}){if(!(e=e&&e.trim()))return{code:N,messageValues:{param:this.t("mobile")}};const c=this._getConfig();if(c.forceInviteCode&&!o)throw new Error(this.t("login-with-invite-type-required"));const u=await this.verifyCode({mobile:e,code:t,type:o||"login"});if(0!==u.code)return u;const d={mobile:e,mobile_confirmed:1};let p=await P.where(d).get();if(p=this._getCurrentAppUser(p.data),p&&p.length>0){if("register"===o)return{code:10201,messageValues:{type:this.t("mobile")}};if(1!==p.length)return{code:10005};const t=p[0],r=await this._loginExec(t,{needPermission:s});return 0!==r.code?r:{...r,mobile:e}}{const t=Date.now();if("login"===o)return{code:10202,messageValues:{type:this.t("mobile")}};const u={mobile:e,mobile_confirmed:1,register_ip:this.context.CLIENTIP,register_date:t},d=r&&r.trim();if(d){const{passwordHash:e,version:t}=this.encryptPwd(d);u.password=e,t&&(u.password_secret_version=t)}if(n){const e=await P.where({my_invite_code:n}).get();if(1!==e.data.length)return{code:10203};u.inviter_uid=[e.data[0]._id].concat(e.data[0].inviter_uid||[]),u.invite_time=t}else if(c.forceInviteCode)return{code:10203};u.my_invite_code=i,u.role=a;const p=await this._registerExec(u,{needPermission:s});return 0!==p.code?p:{...p,mobile:e}}},loginByWeixin:async function(e){"string"==typeof e&&(e={code:e});const{needPermission:t,platform:r,code:n,myInviteCode:i,role:o,type:s}=e,a=r||this.context.PLATFORM,c="mp-weixin"===a,{openid:u,unionid:d,sessionKey:p,accessToken:l,refreshToken:f,expired:m}=await this._getWeixinApi()[c?"code2Session":"getOauthAccessToken"](n);if(!u)return{code:10401,messageValues:{account:"微信openid"}};let h;h=c?{sessionKey:p}:{accessToken:l,refreshToken:f,accessTokenExpired:m};const g=Hr.command,y=[{wx_openid:{[a]:u}}];d&&y.push({wx_unionid:d});let w=await P.where(g.or(...y)).get();if(w=this._getCurrentAppUser(w.data),w&&w.length>0){if("register"===s)return{code:10402,messageValues:{type:this.t("wechat-account")}};if(1!==w.length)return{code:10005};const e=w[0],r={wx_openid:{[a]:u}};d&&(r.wx_unionid=d);const n=await this._loginExec(e,{needPermission:t,extraData:r});if(0!==n.code)return n;const{userInfo:i}=n;return{...n,openid:u,unionid:d,...h,mobileConfirmed:1===i.mobile_confirmed,emailConfirmed:1===i.email_confirmed}}{if("login"===s)return{code:10403,messageValues:{type:this.t("wechat-account")}};const e={wx_openid:{[a]:u},wx_unionid:d};e.my_invite_code=i,e.role=o;const r=await this._registerExec(e,{needPermission:t});return 0!==r.code?r:{...r,openid:u,unionid:d,...h,mobileConfirmed:!1,emailConfirmed:!1}}},loginByQQ:async function({code:e,accessToken:t,myInviteCode:r,needPermission:n,role:i,type:o}={}){const s=this.context.PLATFORM,a="mp-qq"===s,{openid:c,unionid:u,sessionKey:d}=await this._getQQApi()[a?"code2Session":"getOpenidByToken"]({code:e,accessToken:t});if(!c)return{code:10801,messageValues:{account:"qq openid"}};const p={accessToken:t,sessionKey:d},l=Kr.command,f=[{qq_openid:{[s]:c}}];u&&f.push({qq_unionid:u});let m=await P.where(l.or(...f)).get();if(m=this._getCurrentAppUser(m.data),m&&m.length>0){if("register"===o)return{code:10802,messageValues:{type:this.t("qq-account")}};if(1!==m.length)return{code:10005};const e=m[0],t={qq_openid:{[s]:c}};u&&(t.qq_unionid=u);const r=await this._loginExec(e,{needPermission:n,extraData:t});if(0!==r.code)return r;const{userInfo:i}=r;return{...r,openid:c,unionid:u,...p,mobileConfirmed:1===i.mobile_confirmed,emailConfirmed:1===i.email_confirmed}}{if("login"===o)return{code:10803,messageValues:{type:this.t("qq-account")}};const e={qq_openid:{[s]:c},qq_unionid:u};e.my_invite_code=r,e.role=i;const t=await this._registerExec(e);return 0!==t.code?t:{...t,openid:c,unionid:u,...p,mobileConfirmed:!1,emailConfirmed:!1}}},loginByUniverify:async function({openid:e,access_token:t,password:r,inviteCode:n,myInviteCode:i,type:o,needPermission:s,role:a}){const c=this._getConfig(),u=c&&c.service&&c.service.univerify;if(!u)throw new Error(this.t("uni-verify-config-required"));if(c.forceInviteCode&&!o)throw new Error(this.t("login-with-invite-type-required"));const d=await Gr.bind(this)({...u,openid:e,access_token:t});if(0!==d.code)return d;const p=String(d.phoneNumber);let l=await P.where({mobile:p,mobile_confirmed:1}).get();if(l=this._getCurrentAppUser(l.data),l&&l.length>0){if("register"===o)return{code:10601,messageValues:{type:this.t("mobile")}};if(1!==l.length)return{code:10005};const e=l[0],t=await this._loginExec(e,{needPermission:s});return 0!==t.code?t:{...t,mobile:p}}if("login"===o)return{code:10602,messageValues:{type:this.t("mobile")}};const f=Date.now(),m={mobile:p,my_invite_code:i,mobile_confirmed:1,role:a},h=r&&r.trim();if(h){const{passwordHash:e,version:t}=this.encryptPwd(h);m.password=e,t&&(m.password_secret_version=t)}if(n){let e=await P.where({my_invite_code:n}).get();if(1!==e.data.length)return{code:10203};e=e.data[0],m.inviter_uid=[e._id].concat(e.inviter_uid||[]),m.invite_time=f}else if(c.forceInviteCode)return{code:10203};m.my_invite_code=i;const g=await this._registerExec(m,{needPermission:s});return 0!==g.code?g:{...g,mobile:p}},loginByApple:async function({nickName:e,fullName:t,identityToken:r,myInviteCode:n,type:i,needPermission:o,role:s}){const a=this._getConfig(),c=a&&a.oauth&&a.oauth.apple,u=c&&c.bundleId;if(!u)throw new Error(this.t("config-param-require",{param:"(app || app-plus).apple.bundleId"}));if(!r)return{code:N,messageValues:{param:"identityToken"}};t=e||(t&&Object.keys(t).length>0?t.familyName+t.givenName:"");const{code:d,msg:p}=await Lr().verifyIdentityToken(r);if(0!==d)return{code:d,msg:p,messageValues:{account:this.t("apple-account")}};const{iss:l,sub:f,aud:m,email:h}=p;if("https://appleid.apple.com"!==l)return{code:10706,messageValues:{account:this.t("apple-account")}};if(!f)return{code:10701,messageValues:{account:this.t("apple-account")}};if(u!==m)return{code:10702,messageValues:{account:this.t("apple-account")}};const g=t||"User-"+(h?h.split("@")[0]:Math.random().toString(32).slice(2));let y=await P.where({apple_openid:f}).get();if(y=this._getCurrentAppUser(y.data),y&&y.length>0){if("register"===i)return{code:10703,messageValues:{type:this.t("apple-account")}};if(1!==y.length)return{code:10005};const e=y[0],t=await this._loginExec(e,{needPermission:o});return 0!==t.code?t:{...t,openid:f}}if("login"===i)return{code:10704,messageValues:{type:this.t("apple-account")}};const w={nickname:g,apple_openid:f,my_invite_code:n,role:s},v=await this._registerExec(w,{needPermission:o});return 0!==v.code?v:{...v,openid:f}},login:async function({username:e,password:t,queryField:r=[],needPermission:n}){const i=Qr.command,o=[];r&&r.length||(r=["username"]),r.length>1&&console.warn(this.t("query-field-warning"));const{usernameToLowerCase:s,emailToLowerCase:a,passwordErrorLimit:c,passwordErrorRetryTime:u}=this._getConfig(),d={email:{email_confirmed:1},mobile:{mobile_confirmed:1}},p={},l=e&&e.trim();if(!l)return{code:N,messageValues:{param:this.t("username")}};s&&(p.username=l.toLowerCase()),a&&(p.email=l.toLowerCase());const f=[];r.forEach(t=>{o.push({[t]:e,...d[t]});const r={field:t,value:e};"username"===t&&p.username!==e?(o.push({[t]:p.username,...d[t]}),r.fallbackValue=p.username):"email"===t&&p.email!==e&&(o.push({[t]:p.email,...d[t]}),r.fallbackValue=p.email),f.push(r)});let m=await P.where(i.or(...o)).get();m=this._getCurrentAppUser(m.data);const h=this.context.CLIENTIP,g=this._getMatchedUser(m,f);if(g.code)return g;const{userMatched:y}=g;let w=y.login_ip_limit||[];w=w.filter(e=>e.last_error_time>Date.now()-1e3*u);let v=w.find(e=>e.ip===h);if(v&&v.error_times>=c)return{code:10103};const _=t&&t.trim();if(!_)return{code:N,messageValues:{param:"密码"}};const b=this._checkPwd(y,_);if(0===b.code){const e=w.indexOf(v);e>-1&&w.splice(e,1);const t={login_ip_limit:w},{passwordHash:r,passwordVersion:i}=b;r&&i&&(t.password=r,t.password_secret_version=i);const o=await this._loginExec(y,{needPermission:n,extraData:t});return o.code,o}return v?(v.error_times++,v.last_error_time=Date.now()):(v={ip:h,error_times:1,last_error_time:Date.now()},w.push(v)),await P.doc(y._id).update({login_ip_limit:w}),{code:10102,msg:"密码错误"}},register:async function(e){const t=[],r=[{name:"username",desc:this.t("username")},{name:"email",desc:this.t("email"),extraCond:{email_confirmed:1}},{name:"mobile",desc:this.t("mobile"),extraCond:{mobile_confirmed:1}}],{usernameToLowerCase:n,emailToLowerCase:i}=this._getConfig();r.forEach(r=>{const o=r.name;let s=e[o]&&e[o].trim();s?(("username"===r.name&&n||"email"===r.name&&i)&&(s=s.toLowerCase()),e[o]=s,t.push({[o]:s,...r.extraCond})):delete e[o]});const{username:o,email:s,mobile:a,myInviteCode:c,needPermission:u,autoSetDcloudAppid:d=!0}=e;if("needPermission"in e&&delete e.needPermission,"autoSetDcloudAppid"in e&&delete e.autoSetDcloudAppid,0===t.length)return{code:20101,messageValues:{param:this.t("user-unique-param")}};const p=Xr.command;let l=await P.where(p.or(...t)).get();if(l=this._getCurrentAppUser(l.data),l&&l.length>0){const t=l[0];if(t.status===F)return{code:10006};for(let n=0;nt[e]===i.extraCond[e])),t[i.name]===e[i.name]&&o)return{code:20102,messageValues:{type:i.desc}}}}const f=e.password&&e.password.trim();if(!f)return{code:N,messageValues:{param:this.t("password")}};const{passwordHash:m,version:h}=this.encryptPwd(f);e.password=m,h&&(e.password_secret_version=h),e.my_invite_code=c,delete e.myInviteCode;const g=await this._registerExec(e,{needPermission:u,autoSetDcloudAppid:d});return 0!==g.code?g:{...g,username:o,email:s,mobile:a}},logout:async function(e){const t=await this.checkToken(e);if(t.code)return t;const r=Yr.command;return await P.doc(t.uid).update({token:r.pull(e)}),{code:0,msg:""}},getRoleByUid:async function({uid:e}){if(!e)return{code:N,messageValues:{param:this.t("user-id")}};const t=await P.doc(e).get();return 0===t.data.length?{code:L}:{code:0,msg:"",role:t.data[0].role||[]}},getPermissionByRole:async function({roleID:e}){if(!e)return{code:N,messageValues:{param:"roleID"}};if("admin"===e){return{code:0,msg:"",permission:(await D.limit(1e3).get()).data.map(e=>e.permission_id)}}const t=await j.where({role_id:e}).get();return 0===t.data.length?{code:V}:{code:0,msg:"",permission:t.data[0].permission||[]}},getPermissionByUid:async function({uid:e}={}){const t=await P.aggregate().match({_id:e}).project({role:!0}).unwind("$role").lookup({from:"uni-id-roles",localField:"role",foreignField:"role_id",as:"roleDetail"}).unwind("$roleDetail").replaceRoot({newRoot:"$roleDetail"}).end(),r=[],n=[];return t.data.forEach(e=>{n.push(e.role_id),r.push(...e.permission)}),{code:0,msg:"",role:n,permission:A(r)}},bindRole:async function({uid:e,roleList:t,reset:r=!1}){const n={};return"string"==typeof t&&(t=[t]),n.role=r?t:zr.push(t),await P.doc(e).update(n),{code:0,msg:""}},bindPermission:async function({roleID:e,permissionList:t,reset:r=!1}){const n={};return"string"==typeof t&&(t=[t]),n.permission=r?t:zr.push(t),await j.where({role_id:e}).update(n),{code:0,msg:""}},unbindRole:async function({uid:e,roleList:t}){return"string"==typeof t&&(t=[t]),await P.doc(e).update({role:zr.pull(zr.in(t))}),{code:0,msg:""}},unbindPermission:async function({roleID:e,permissionList:t}){return"string"==typeof t&&(t=[t]),await j.where({role_id:e}).update({permission:zr.pull(zr.in(t))}),{code:0,msg:""}},addRole:async function({roleID:e,roleName:t,comment:r,permission:n=[]}){return e?"admin"===e?{code:U,messageValues:{param:"roleID",reason:this.t("add-role-admin-is-not-allowed")}}:(await j.add({role_id:e,role_name:t,comment:r,permission:n,create_date:Date.now()}),{code:0,msg:""}):{code:N,messageValues:{param:this.t("role-id")}}},addPermission:async function({permissionID:e,permissionName:t,comment:r}){return e?(await D.add({permission_id:e,permission_name:t,comment:r,create_date:Date.now()}),{code:0,msg:""}):{code:N,messageValues:{param:this.t("permission-id")}}},getRoleList:async function({limit:e=20,offset:t=0,needTotal:r=!0}){const n={code:0,msg:"",roleList:(await j.skip(t).limit(e).get()).data};if(r){const{total:e}=await j.where({_id:zr.exists(!0)}).count();n.total=e}return n},getRoleInfo:async function(e){const t=await j.where({role_id:e}).get();return 0===t.data.length?{code:V}:{code:0,...t.data[0]}},updateRole:async function({roleID:e,roleName:t,comment:r,permission:n}){return e?(await j.where({role_id:e}).update({role_name:t,comment:r,permission:n}),{code:0,msg:""}):{code:N,messageValues:{param:this.t("role-id")}}},deleteRole:async function({roleID:e}){const t=m(e);if("string"===t)e=[e];else if("array"!==t)throw new Error("typeof roleID must be array or string");return await j.where({role_id:zr.in(e)}).remove(),await P.where({role:zr.elemMatch(zr.in(e))}).update({role:zr.pullAll(e)}),{code:0,msg:""}},getPermissionList:async function({limit:e=20,offset:t=0,needTotal:r=!0}){const n={code:0,msg:"",permissionList:(await D.skip(t).limit(e).get()).data};if(r){const{total:e}=await D.where({_id:zr.exists(!0)}).count();n.total=e}return n},getPermissionInfo:async function(e){const t=await D.where({permission_id:e}).get();return 0===t.data.length?{code:N,messageValues:{param:this.t("permission-id")}}:{code:0,...t.data[0]}},updatePermission:async function({permissionID:e,permissionName:t,comment:r}){return e?(await D.where({permission_id:e}).update({permission_name:t,comment:r}),{code:0,msg:""}):{code:N,messageValues:{param:this.t("permission-id")}}},deletePermission:async function({permissionID:e}){const t=m(e);if("string"===t)e=[e];else if("array"!==t)throw new Error("typeof permissionID must be array or string");return await D.where({permission_id:zr.in(e)}).remove(),await j.where({permission:zr.elemMatch(zr.in(e))}).update({permission:zr.pullAll(e)}),{code:0,msg:""}},bindAlipay:async function({uid:e,code:t,platform:r}){const n=r||this.context.PLATFORM,{openid:i}=await this._getAlipayApi({platform:n}).code2Session(t);if(!i)return{code:60401,messageValues:{account:this.t("alipay-account")}};let o=await P.where({ali_openid:i}).get();return o=this._getCurrentAppUser(o.data),o&&o.length>0?{code:60402,messageValues:{type:this.t("alipay-account")}}:(await P.doc(e).update({ali_openid:i}),{code:0,openid:i,msg:""})},bindEmail:async function(e){let{uid:t,email:r,code:n}=e||{};if(r=r&&r.trim(),!r)return{code:N,messageValues:{param:this.t("email")}};if(!n)return{code:N,messageValues:{param:this.t("verify-code")}};const{emailToLowerCase:i}=this._getConfig();i&&(r=r.toLowerCase());let o=await P.where({email:r,email_confirmed:1}).get();if(o=this._getCurrentAppUser(o.data),o&&o.length>0)return{code:60201,messageValues:{type:this.t("email")}};const s=await this.verifyCode({email:r,code:n,type:"bind"});return 0!==s.code?s:(await P.doc(t).update({email:r,email_confirmed:1}),{code:0,msg:"",email:r})},bindMobile:async function(e){let{uid:t,mobile:r,code:n,openid:i,access_token:o,type:s="sms"}=e||{};if("univerify"===s){const e=this._getConfig(),t=e&&e.service&&e.service.univerify;if(!t)throw new Error("请在config.json中配置service.univerify下一键登录相关参数");const n=await Gr.bind(this)({...t,openid:i,access_token:o});if(0!==n.code)return n;r=""+n.phoneNumber}let a=await P.where({mobile:r,mobile_confirmed:1}).get();if(a=this._getCurrentAppUser(a.data),a&&a.length>0)return{code:60101,messageValues:{type:"手机号"}};if("sms"===s&&"code"in e){if(!r)return{code:N,messageValues:{param:this.t("mobile")}};if(!n)return{code:N,messageValues:{param:this.t("verify-code")}};const e=await this.verifyCode({mobile:r,code:n,type:"bind"});if(0!==e.code)return e}return await P.doc(t).update({mobile:r,mobile_confirmed:1}),{code:0,msg:"",mobile:r}},bindWeixin:async function({uid:e,code:t,platform:r}){const n=r||this.context.PLATFORM,i="mp-weixin"===n,{openid:o,unionid:s,sessionKey:a,accessToken:c,refreshToken:u,expired:d}=await this._getWeixinApi({platform:n})[i?"code2Session":"getOauthAccessToken"](t);if(!o)return{code:60301,messageValues:{account:"微信openid"}};const p=Wr.command,l=[{wx_openid:{[n]:o}}];s&&l.push({wx_unionid:s});let f=await P.where(p.or(...l)).get();if(f=this._getCurrentAppUser(f.data),f&&f.length>0)return{code:60302,messageValues:{type:this.t("wechat-account")}};const m={wx_openid:{[n]:o}};let h;return s&&(m.wx_unionid=s),await P.doc(e).update(m),h=i?{sessionKey:a}:{accessToken:c,refreshToken:u,accessTokenExpired:d},{code:0,msg:"",openid:o,unionid:s,...h}},bindQQ:async function({uid:e,code:t,accessToken:r,platform:n}={}){const i=n||this.context.PLATFORM,o="mp-qq"===i,{openid:s,unionid:a,sessionKey:c}=await this._getQQApi()[o?"code2Session":"getOpenidByToken"]({code:t,accessToken:r});if(!s)return{code:60501,messageValues:{account:"qq openid"}};const u=Jr.command,d=[{qq_openid:{[i]:s}}];a&&d.push({qq_unionid:a});let p=await P.where(u.or(...d)).get();if(p=this._getCurrentAppUser(p.data),p&&p.length>0)return{code:60502,messageValues:{type:this.t("qq-account")}};const l={qq_openid:{[i]:s}};return a&&(l.qq_unionid=a),await P.doc(e).update(l),{code:0,msg:"",openid:s,unionid:a,...{accessToken:r,sessionKey:c}}},unbindAlipay:async function(e){const t=Zr.command,r=await P.doc(e).update({ali_openid:t.remove()});return E("upRes:",r),1===r.updated?{code:0,msg:""}:{code:70401}},unbindEmail:async function(e){let{uid:t,email:r,code:n}=e||{};if(r=r&&r.trim(),!t||!r)return{code:N,messageValues:{param:t?this.t("email"):this.t("user-id")}};const{emailToLowerCase:i}=this._getConfig();if("code"in e){const e=await this.verifyCode({email:r,code:n,type:"unbind"});if(0!==e.code)return e}const o=en.command;let s={_id:t,email:r};if(i){const e=r.toLowerCase();e!==r&&(s=o.or(s,{_id:t,email:e}))}return 1===(await P.where(s).update({email:o.remove(),email_confirmed:o.remove()})).updated?{code:0,msg:""}:{code:70201}},unbindMobile:async function(e){const{uid:t,mobile:r,code:n}=e||{};if("code"in e){const e=await this.verifyCode({mobile:r,code:n,type:"unbind"});if(0!==e.code)return e}const i=tn.command;return 1===(await P.where({_id:t,mobile:r}).update({mobile:i.remove(),mobile_confirmed:i.remove()})).updated?{code:0,msg:""}:{code:70101}},unbindWeixin:async function(e){const t=rn.command,r=await P.doc(e).update({wx_openid:t.remove(),wx_unionid:t.remove()});return E("upRes:",r),1===r.updated?{code:0,msg:""}:{code:70301}},unbindQQ:async function(e){const t=nn.command,r=await P.doc(e).update({qq_openid:t.remove(),qq_unionid:t.remove()});return E("upRes:",r),1===r.updated?{code:0,msg:""}:{code:70501}},getSupportedLoginType:function({appid:e,platform:t}={}){if(!e||!t)throw new Error("Parameter appid and platform is required");const r=this._getConfig({appid:e,platform:t}),n=["username-password","mobile-password","email-password"];for(const e in on)on[e](r)&&n.push(e);return{supportedLoginType:n}},code2SessionAlipay:async function(e){let t=e;"string"==typeof e&&(t={code:e});try{const e=t.platform||this.context.PLATFORM,r=await this._getAlipayApi({platform:e}).code2Session(t.code);return r.openid?{code:0,msg:"",...r}:{code:80701,messageValues:{account:this.t("alipay-account")}}}catch(e){return console.error(e),{code:80702,messageValues:{account:this.t("alipay-account")}}}},code2SessionWeixin:async function(e){let t=e;"string"==typeof e&&(t={code:e});try{const e=t.platform||this.context.PLATFORM,r=await this._getWeixinApi({platform:e})["mp-weixin"===e?"code2Session":"getOauthAccessToken"](t.code);return r.openid?{code:0,msg:"",...r}:{code:80601,messageValues:{account:"微信openid"}}}catch(e){return console.error(e),{code:80602,messageValues:{account:"微信openid"}}}},verifyAppleIdentityToken:async function({identityToken:e,platform:t}){const r=t||this.context.PLATFORM,{code:n,msg:i}=await Lr({clientType:r}).verifyIdentityToken(e);return 0!==n?{code:n,msg:i}:{code:n,msg:"验证通过",...i}},wxBizDataCrypt:async function({code:e,sessionKey:r,encryptedData:n,iv:i}){if(!n)return{code:N,messageValues:{param:"encryptedData"}};if(!i)return{code:N,messageValues:{param:"iv"}};if(!e&&!r)return{code:N,messageValues:{param:"sessionKey"}};const o=this._getWeixinApi();if(!r){const t=await o.code2Session(e);if(!t.sessionKey)return{code:80801};r=t.sessionKey}r=Buffer.from(r,"base64"),n=Buffer.from(n,"base64"),i=Buffer.from(i,"base64");try{var s=t.createDecipheriv("aes-128-cbc",r,i);s.setAutoPadding(!0);var a=s.update(n,"binary","utf8");a+=s.final("utf8"),a=JSON.parse(a)}catch(e){return console.error(e),{code:80802}}return a.watermark.appid!==o.options.appId?{code:80803}:{code:0,msg:"",...a}},getWeixinUserInfo:async function({accessToken:e,openid:t}={}){const r=this.context.PLATFORM;if("app"!==r&&"app-plus"!==r)throw new Error(this.t("limit-client-platform"));try{return{code:0,msg:"",...await this._getWeixinApi().getUserInfo({accessToken:e,openid:t})}}catch(e){return console.error(e),{code:80901}}},encryptPwd:function(e,{value:r,version:n}={}){if(!(e=e&&e.trim()))throw new Error(this.t("param-required",{param:this.t("password")}));if(!r){const e=this._getConfig(),{passwordSecret:t}=e;if("array"===m(t)){const e=t.sort((e,t)=>e.version-t.version);r=e[e.length-1].value,n=e[e.length-1].version}else r=t}if(!r)throw new Error(this.t("param-error",{param:"passwordSecret",reason:"invalid passwordSecret"}));const i=t.createHmac("sha1",r.toString("ascii"));return i.update(e),{passwordHash:i.digest("hex"),version:n}},checkToken:async function(e,{needPermission:t,needUserInfo:r=!0}={}){const n=this._getConfig(),i=this._verifyToken(e);if(i.code)return i;const{uid:o,needPermission:s,role:a,permission:c,exp:u,iat:d,...p}=i,l=a&&c;t=void 0===t?s:t;const f=n.removePermissionAndRoleFromToken||!l||r,m=!n.removePermissionAndRoleFromToken&&!l||n.removePermissionAndRoleFromToken&&l||n.tokenExpiresThreshold&&u-Date.now()/1e3this._createTokenInternal({signContent:e,config:o})):this._createTokenInternal({signContent:a,config:o})},_updateToken:async function({uid:e,tokenList:t,removeToken:r=[],addToken:n=[]}={}){if(!t){const r=await P.doc(e).get(),n=r.data&&r.data[0];t=n&&n.token||[]}"string"==typeof t&&(t=[t]);const i=this._getExpiredToken(t);(t=t.filter(e=>-1===i.indexOf(e))).push(...n);for(let e=0;ee.version-t.version);let c;if(c=n?a.find(e=>e.version===n):a[0],!c)return{code:3};const u=a[a.length-1],{passwordHash:d}=this.encryptPwd(t,c);if(d===r){const e={code:0};if(c!==u){const{passwordHash:r,version:n}=this.encryptPwd(t,u);e.passwordHash=r,e.passwordVersion=n}return e}return{code:4,message:""}},_verifyToken:function(e){const t=this._getConfig();let r;try{r=Pr(e,t.tokenSecret)}catch(e){return"TokenExpiredError"===e.name?{code:30203,err:e}:{code:30204,err:e}}return t.bindTokenToDevice&&r.clientId&&r.clientId!==this._getClientUaHash()?{code:30201}:{code:0,message:"",...r}},_getExpiredToken:function(e){const t=this._getConfig(),r=[];return e.forEach(e=>{try{Pr(e,t.tokenSecret)}catch(t){r.push(e)}}),r},_getPermissionListByRoleList:async function(e){if(!Array.isArray(e))return[];if(0===e.length)return[];if(e.includes("admin")){return(await D.limit(500).get()).data.map(e=>e.permission_id)}const t=await j.where({role_id:sn.in(e)}).get(),r=[];return t.data.forEach(e=>{Array.prototype.push.apply(r,e.permission)}),A(r)},_getClientUaHash:function(){const e=t.createHash("md5"),r=/MicroMessenger/i.test(this.context.CLIENTUA)?this.context.CLIENTUA.replace(/(MicroMessenger\S+).*/i,"$1"):this.context.CLIENTUA;return e.update(r),e.digest("hex")},_createTokenInternal:function({signContent:e,config:t}){if(t.tokenExpiresIn&&t.tokenExpiresThreshold&&t.tokenExpiresIn<=t.tokenExpiresThreshold)throw new Error(this.t("token-expires-config-warning"));return"object"===m(e)&&e.uid?(t.bindTokenToDevice&&(e.clientId=this._getClientUaHash()),{token:Rr(e,t.tokenSecret,{expiresIn:t.tokenExpiresIn}),tokenExpired:Date.now()+1e3*t.tokenExpiresIn}):{code:30101,messageValues:{param:this.t("user-id")}}},setVerifyCode:async function({mobile:e,email:t,code:r,expiresIn:n,type:i}){if(t=t&&t.trim(),e=e&&e.trim(),t){const{emailToLowerCase:e}=this._getConfig();e&&(t=t.toLowerCase())}if(!e&&!t)return{code:50101,messageValues:{param:"手机号或邮箱"}};if(e&&t)return{code:50102,messageValues:{param:"参数",reason:"手机号和邮箱不可同时存在"}};r||(r=C()),n||(n=180);const o=Date.now(),s={mobile:e,email:t,type:i,code:r,state:0,ip:this.context.CLIENTIP,created_at:o,expired_at:o+1e3*n};return await R.add(s),{code:0,mobile:e,email:t}},verifyCode:async function({mobile:e,email:t,code:r,type:n}){if(t=t&&t.trim(),e=e&&e.trim(),t){const{emailToLowerCase:e}=this._getConfig();e&&(t=t.toLowerCase())}if(!e&&!t)return{code:50201,messageValues:{param:"手机号或邮箱"}};if(e&&t)return{code:50203,messageValues:{param:"参数",reason:"手机号和邮箱不可同时存在"}};if(!r)return{code:50202,messageValues:{type:this.t(e?"sms":"email")}};const i=an.command,o=Date.now(),s={mobile:e,email:t,type:n,code:r,state:0,expired_at:i.gt(o)},a=await R.where(s).orderBy("created_at","desc").limit(1).get();if(a&&a.data&&a.data.length>0){const e=a.data[0];return await R.doc(e._id).update({state:1}),{code:0,msg:"验证通过"}}return{code:50202,messageValues:{type:this.t(e?"sms":"email")}}},sendSmsCode:async function({mobile:e,code:t,type:r,templateId:n}){if(!e)return{code:N,messageValues:{param:this.t("mobile")}};if(t||(t=C()),!r)return{code:N,messageValues:{param:this.t("verify-code-type")}};const i=this._getConfig();let o=i&&i.service&&i.service.sms;if(!o)throw new Error(this.t("config-param-required",{param:"service.sms"}));o=Object.assign({codeExpiresIn:300},o);const s=["smsKey","smsSecret"];for(let e=0,t=s.length;e=0?o:{code:0,msg:""}}catch(e){return console.error(e),{code:50301}}}});let un;try{un=require("uni-config-center")}catch(e){throw new Error("Plugin[uni-config-center] was not found")}class dn{constructor({context:e,clientInfo:t,config:r}={}){const n=un({pluginId:"uni-id"});this.pluginConfig=n,this.config=r||this._getConfigContent(),this._configCache={},Object.defineProperty(this,"context",{get(){let r;r=t?{OS:t.os,CLIENTIP:t.clientIP,CLIENTUA:t.userAgent,PLATFORM:t.platform,APPID:t.appId,LOCALE:t.locale,DEVICEID:t.deviceId}:Object.assign({},e||global.__ctx__||{});const n=["CLIENTIP","PLATFORM","APPID","LOCALE"];for(let e=0;ee.dcloudAppid===t)||e.find(e=>e.isDefaultConfig):e}_parseConfigContent(e){return Array.isArray(e)?e:e[0]?Object.values(e):e}_getConfigContent(){if(this.pluginConfig&&this.pluginConfig.hasFile("config.json")){let e;try{e=this.pluginConfig.config()}catch(e){throw new Error("Invalid uni-id config file\n"+e.message)}return this._parseConfigContent(e)}{let e;try{e=require("./config.json")}catch(e){if("MODULE_NOT_FOUND"===e.code||"ENOENT"===e.code)throw new Error("uni-id config file[uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json] not found");throw e}return this._parseConfigContent(e)}}init(){throw new Error("uniID.init has been deprecated, use uniID.createInstance instead")}setInterceptor(e,t){this.interceptorMap.set(e,t)}_getConfig({appid:e,platform:t}={}){const r=`${e=e||this.context.APPID}_${t=t||this.context.PLATFORM}`;if(this._configCache[r])return this._configCache[r];if(!(this.config&&0!==Object.keys(this.config).length))throw new Error(this.t("config-file-not-found"));const n=this._getAppConfig(this.config,e);"app"!==t&&"app-plus"!==t||(t=n.preferedAppPlatform||t),"web"!==t&&"h5"!==t||(t=n.preferedWebPlatform||t);const i=Object.assign(n,n[t])||{},o=Object.assign({bindTokenToDevice:!1,tokenExpiresIn:7200,tokenExpiresThreshold:1200,passwordErrorLimit:6,passwordErrorRetryTime:3600,usernameToLowerCase:!0,emailToLowerCase:!0},i);return["passwordSecret","tokenSecret","tokenExpiresIn","passwordErrorLimit","passwordErrorRetryTime"].forEach(e=>{if(!o||!o[e])throw new Error(this.t("config-param-required",{param:e}))}),this._configCache[r]=o,o}}for(const e in cn)dn.prototype[e]=cn[e];function pn(e){const t=new dn(e);return new Proxy(t,{get(e,t){if(t in e&&0!==t.indexOf("_")){if("function"==typeof e[t])return(r=e[t],function(){const e=r.apply(this,arguments);return f(e)?e.then(e=>(x.bind(this)(e),e)):(x.bind(this)(e),e)}).bind(e);if("context"!==t&&"config"!==t)return e[t]}var r}})}dn.prototype.createInstance=pn;var ln=pn();module.exports=ln; diff --git a/uniCloud-tcb/cloudfunctions/router/node_modules/uni-id/node_modules/uni-config-center b/uniCloud-tcb/cloudfunctions/router/node_modules/uni-id/node_modules/uni-config-center new file mode 100644 index 0000000..db5f823 --- /dev/null +++ b/uniCloud-tcb/cloudfunctions/router/node_modules/uni-id/node_modules/uni-config-center @@ -0,0 +1 @@ +../../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center \ No newline at end of file diff --git a/uniCloud-tcb/cloudfunctions/router/node_modules/uni-id/package.json b/uniCloud-tcb/cloudfunctions/router/node_modules/uni-id/package.json new file mode 100644 index 0000000..93b2b8f --- /dev/null +++ b/uniCloud-tcb/cloudfunctions/router/node_modules/uni-id/package.json @@ -0,0 +1,16 @@ +{ + "name": "uni-id", + "version": "3.3.28", + "description": "uni-id for uniCloud", + "main": "index.js", + "homepage": "https://uniapp.dcloud.io/uniCloud/uni-id", + "repository": { + "type": "git", + "url": "git+https://gitee.com/dcloud/uni-id.git" + }, + "author": "", + "license": "Apache-2.0", + "dependencies": { + "uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" + } +} \ No newline at end of file diff --git a/uniCloud-tcb/cloudfunctions/router/node_modules/vk-unicloud b/uniCloud-tcb/cloudfunctions/router/node_modules/vk-unicloud deleted file mode 120000 index 4f33825..0000000 --- a/uniCloud-tcb/cloudfunctions/router/node_modules/vk-unicloud +++ /dev/null @@ -1 +0,0 @@ -../../../../uni_modules/vk-unicloud/uniCloud/cloudfunctions/common/vk-unicloud \ No newline at end of file diff --git a/uniCloud-tcb/cloudfunctions/router/node_modules/vk-unicloud/LICENSE.md b/uniCloud-tcb/cloudfunctions/router/node_modules/vk-unicloud/LICENSE.md new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/uniCloud-tcb/cloudfunctions/router/node_modules/vk-unicloud/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/uniCloud-tcb/cloudfunctions/router/node_modules/vk-unicloud/index.js b/uniCloud-tcb/cloudfunctions/router/node_modules/vk-unicloud/index.js new file mode 100644 index 0000000..4db5060 --- /dev/null +++ b/uniCloud-tcb/cloudfunctions/router/node_modules/vk-unicloud/index.js @@ -0,0 +1 @@ +"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var crypto$1=_interopDefault(require("crypto")),commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},util={regExpTest:function(e,t){let n=!1;if("string"==typeof e){new RegExp(e).test(t)&&(n=!0)}else if("object"==typeof e)for(let i=0;i{let{serviceParam:t,middlewareService:n=[]}=e,i={code:403,msg:"access denied",filterStack:[]},{url:a}=t;for(let e in n){let r=n[e],{mode:o="onActionExecuting",enable:s=!0}=r;if(s&&"onActionExecuting"===o&&util_1.regExpTest(r.regExp,a)){t.filterResponse=i;let e=await r.main(t);if(e.filterId=r.id,i.filterStack.push(e),0!==e.code){i=e;break}i=Object.assign(i,e)}}return i},onActionExecuted=async(e={})=>{let{serviceParam:t,middlewareService:n=[],serviceRes:i}=e,{url:a}=t;for(let e in n){let r=n[e],{mode:o,enable:s=!0}=r;if(s&&"onActionExecuted"===o&&util_1.regExpTest(r.regExp,a)){let e=await r.main(t,i);if(e){if(0!==e.code){i=e;break}i=Object.assign(i,e)}}}return i},onActionIntercepted=async(e={})=>{let{serviceParam:t,middlewareService:n=[],filterResponse:i}=e,{url:a}=t;for(let e in n){let r=n[e],{mode:o,enable:s=!0}=r;if(s&&"onActionIntercepted"===o&&util_1.regExpTest(r.regExp,a)){let e=await r.main(t,i);if(e){if(0!==e.code){i=e;break}i=Object.assign(i,e)}}}return i},onActionError=async(e={})=>{let{serviceParam:t,middlewareService:n=[],serviceRes:i}=e,{url:a}=t;for(let e in n){let r=n[e],{mode:o,enable:s=!0}=r;if(s&&"onActionError"===o&&util_1.regExpTest(r.regExp,a)){let e=await r.main(t,i);if(e){if(0!==e.code){i=e;break}i=Object.assign(i,e)}}}return i},checkIsLogin={main:async e=>{let{url:t,data:n={},util:i}=e,{uniID:a}=i,{need_user_info:r}=n,o={code:-1,msg:""};void 0===r&&(r=-1==t.indexOf("."));let s=0==t.indexOf("admin/");s&&(r=!0),(t.indexOf("sys.")>-1||t.indexOf("sys_")>-1||t.indexOf("/sys")>-1)&&(r=!0);let u=t.indexOf("/sys/")>-1,l=await a.checkToken(e.uniIdToken,{needPermission:u,needUserInfo:r});if(l.code&&l.code>0)return l;if(l.userInfo){let e=l.userInfo;e.permission=l.permission,delete e.token,delete e.password,o.userInfo=e}if(o.uid=l.uid,l.token&&(o.token=l.token,o.tokenExpired=l.tokenExpired),s){if(!o.userInfo)return{code:403,msg:"need_user_info必须为true"};{let e=o.userInfo.role||[];if(!o.userInfo.allow_login_background&&!e.includes("admin"))return{code:403,msg:"您无权限登录后台"}}}return o.code=0,o.msg="ok",o}},checkSysAuth={main:async e=>{let{url:t,util:n}=e,{uniID:i,config:a,pubFun:r,vk:o,db:s,_:u}=n,l={code:-1,msg:""};const c=checkIsLogin;if(l=await c.main(e),0!==l.code)return l;if(!l.userInfo)return{code:403,msg:"请去除need_user_info:false"};if(l.userInfo.role||(l.userInfo.role=[]),l.userInfo.role.includes("admin"))return l;if(!l.userInfo.allow_login_background&&0==t.indexOf("admin/"))return{code:403,msg:"您无权限登录后台"};let d=[];if(l.userInfo.role.includes("admin-lv3")){let e=await listPermission({whereJson:{level:u.in([1,2,3])},justNeedID:!0},n);o.pubfn.isNotNull(e)&&(d=d.concat(e))}if(l.userInfo.role.includes("admin-lv2")){let e=await listPermission({whereJson:{level:u.in([1,2])},justNeedID:!0},n);o.pubfn.isNotNull(e)&&(d=d.concat(e))}if(l.userInfo.role.includes("admin-lv1")){let e=await listPermission({whereJson:{level:u.in([1])},justNeedID:!0},n);o.pubfn.isNotNull(e)&&(d=d.concat(e))}if(l.userInfo.role.includes("query-all")){let e=await listPermission({whereJson:{curd_category:4,level:u.neq(4)},justNeedID:!0},n);o.pubfn.isNotNull(e)&&(d=d.concat(e))}let p=await listRole({role:l.userInfo.role},n);for(let e in p){let{permission:t}=p[e];o.pubfn.isNotNull(t)&&(d=d.concat(t))}if(0==d.length)return{code:403,msg:"权限不足"};d=[...new Set(d)];let f=await listPermission({whereJson:{permission_id:u.in(d),match_mode:u.in([1,2])}},n),g=!1;for(let e=0;e0}async function listRole(e,t){let{vk:n,db:i,_:a}=t,{role:r}=e;return n.pubfn.isNull(r)?[]:(await n.baseDao.select({dbName:"uni-id-roles",whereJson:{role_id:a.in(r),enable:!0},fieldJson:{permission:!0}})).rows}var filterService=[{id:"pub",regExp:function(e=""){return"pub"===getType(e)},description:"pub函数为所有人都可以访问的函数",index:100,mode:"onActionExecuting",main:async function(e){let{url:t,data:n={},util:i}=e,{uniID:a}=i,r={};if(e.data.need_user_info)r=await checkIsLogin.main(e);else if(e.uniIdToken){let t=await a.checkToken(e.uniIdToken,{needPermission:!1,needUserInfo:!1});0===t.code&&(r.uid=t.uid)}return r.code=0,r.msg="ok",r}},{id:"kh",regExp:function(e=""){return"kh"===getType(e)},description:"kh函数为必须登录后才能访问的函数(客户端用户)",index:200,mode:"onActionExecuting",main:checkIsLogin.main},{id:"sys",regExp:function(e=""){return"sys"===getType(e)},description:"sys函数为后端管理人员才能访问的函数(商家后台工作人员)",index:300,mode:"onActionExecuting",main:checkSysAuth.main},{id:"access_denied",regExp:function(e=""){return"access denied"===getType(e)},description:"sys函数为后端管理人员才能访问的函数(商家后台工作人员)",index:100,mode:"onActionExecuting",main:function(){return{code:403,msg:"禁止访问私有函数!"}}}];function getType(e=""){let t="";return e.indexOf("/sys/")>-1?t="sys":e.indexOf("/kh/")>-1?t="kh":e.indexOf("/pub/")>-1&&(t="pub"),e.indexOf("/sys.")>-1||e.indexOf("/sys_")>-1||0===e.indexOf("sys.")||0===e.indexOf("sys_")?t="sys":e.indexOf("/kh.")>-1||e.indexOf("/kh_")>-1||0===e.indexOf("kh.")||0===e.indexOf("kh_")?t="kh":(e.indexOf("/pub.")>-1||e.indexOf("/pub_")>-1||0===e.indexOf("pub.")||0===e.indexOf("pub_"))&&(t="pub"),e.indexOf(".sys_")>-1?t="sys":e.indexOf(".kh_")>-1?t="kh":e.indexOf(".pub_")>-1&&(t="pub"),""==t&&e.indexOf(".")>-1&&(t="kh"),e.indexOf("._")>-1&&(t="access denied"),t}function getMiddleware(e){let t=[];if(e){let n=[...filterService,...e];n.sort((function(e,t){return e.index-t.index})),t=n.filter((e,t,i)=>{var a=[];return n.forEach((e,t)=>{a.push(e.id)}),a.indexOf(e.id)===t})}else t=filterService;return t}var getMiddleware_1=getMiddleware,filter={onActionExecuting:onActionExecuting,onActionExecuted:onActionExecuted,onActionIntercepted:onActionIntercepted,onActionError:onActionError,getMiddleware:getMiddleware_1},routerUtil={filterService:filter,getQueryStringParameters:function(e){let{event:t,vk:n}=e,i={};if(t.httpMethod){let{path:e=""}=t;if("/"===e[0]&&(e=e.substring(1)),e){let a,{urlrewrite:r={}}=n.getUnicloud(),{rule:o}=r,s=n.pubfn.getData(r,"config.accessOnlyInRule"),u=!1;if(o)for(let t in o){let i=o[t],r=n.pubfn.regExpExecToTemplate(e,t,i);if(r){u=!0;let t=r.split("?");e=t[0],a=n.pubfn.urlStringToJson(t[1]);break}}if(!u&&s)return{mpserverlessComposedResponse:!0,statusCode:403,code:403,headers:{"content-type":"application/json"},body:JSON.stringify({code:403,msg:"access denied"})};if(i={data:{}},n.pubfn.isNotNull(a)&&(i.data=Object.assign(i.data,a)),t.queryStringParameters){let e=t.queryStringParameters;"string"==typeof e&&(e=JSON.parse(e)),i.data=Object.assign(i.data,e)}if(t.body){let e=t.body,a=t.headers&&t.headers["content-type"]?t.headers["content-type"]:"";if(a.indexOf("multipart/form-data;")>-1)e=n.formDataUtil.formParser(t),i.data=Object.assign(i.data,e);else{t.isBase64Encoded&&(e=Buffer.from(e,"base64").toString("utf-8"));try{"string"==typeof e&&(e=JSON.parse(e)),i.data=Object.assign(i.data,e)}catch(e){}try{"string"==typeof e&&a.indexOf("x-www-form-urlencoded")>-1&&(e=n.pubfn.urlStringToJson(e),"object"==typeof e&&(e=n.pubfn.string2Number(e),i.data=Object.assign(i.data,e)))}catch(e){}}}i.$url||(i.data.$url?i.$url=i.data.$url:i.$url=e),i.data.uni_id_token&&(i.uni_id_token=i.data.uni_id_token,delete i.data.uni_id_token)}else{if(t.queryStringParameters){let e=t.queryStringParameters;"string"==typeof e.data&&(e.data=JSON.parse(e.data)),i=Object.assign(i,e)}if(t.body){let e=t.body;t.isBase64Encoded&&(e=Buffer.from(e,"base64").toString("utf-8"));try{"string"==typeof e&&(e=JSON.parse(e)),i=Object.assign(i,e)}catch(e){}}}try{let e=t.headers["uni-id-token"]||t.headers.uni_id_token;!i.uni_id_token&&e&&(i.uni_id_token=e)}catch(e){}}else i=JSON.parse(JSON.stringify(t));return i.data||(i.data={}),i.uniIdToken||(i.uniIdToken=i.uni_id_token),i.url=i.$url||"",i},returnError:returnError,filterInterception:async function({serviceParam:e,middlewareService:t,filterResponse:n}){try{n=await filter.onActionIntercepted({serviceParam:e,middlewareService:t,filterResponse:n})}catch(n){return await returnError({code:500,msg:`云函数 ${e.url} 的中间件 onActionIntercepted 运行异常!`,err:n,serviceParam:e,middlewareService:t})}return n},requireService:async function(e={}){let t,{vk:n,serviceParam:i}=e,{url:a,data:r,uniIdToken:o,util:s,filterResponse:u={},originalParam:l={}}=i;if(a.indexOf(".")>-1){let e,i=a.lastIndexOf("."),c=n.require("service/"+a.substring(0,i));if(t=n.pubfn.objectAssign({},c),!t.isCloudObject)throw new Error("msg:禁止访问私有对象内的函数!");let d=a.substring(i+1);if(0==d.indexOf("_"))throw new Error("msg:禁止访问私有函数!");if("function"!=typeof t[d]){try{l.event&&l.event.httpMethod&&l.event.path&&(a=l.event.path.substring(1))}catch(e){}throw{code:404,name:"cloudObject",message:`not found【${a}】`}}Object.assign(t,{vk:n,methodName:d,isCloudObject:!0,getClientInfo:function(){let{context:e={}}=l,t={...e,os:e.OS,appId:e.APPID,locale:e.LOCALE,clientIP:e.CLIENTIP,userAgent:e.CLIENTUA,platform:e.PLATFORM,deviceId:e.DEVICEID,source:e.SOURCE,uniIdToken:o,uid:u.uid,userInfo:u.userInfo,filterResponse:u,originalParam:l};return n.pubfn.objectKeySort(t)},getUserInfo:async function(){if(u.userInfo&&u.userInfo._id)return u.userInfo;if(!e&&u.uid){let t=await s.uniID.checkToken(o,{needUserInfo:!0});if(0!==t.code)throw new Error("msg:token失效:"+t.errMsg);t.userInfo&&t.userInfo._id&&(delete t.userInfo.token,delete t.userInfo.password,e=t.userInfo)}return e},getUtil:function(){return s},getMethodName:function(){return d},getParams:function(){return r},getCloudInfo:function(){let{SPACEINFO:e={},FUNCTION_NAME:t,FUNCTION_TYPE:n}=l.context||{},{provider:i,spaceId:a}=e;return{provider:i,spaceId:a,functionName:t,functionType:"cloudobject"}},getUniIdToken:function(){return o},getUniCloudRequestId:function(){return l.context.requestId},getHttpInfo:function(){return l.event}})}else t=n.require("service/"+a);return t},serviceRun:async function(e={}){let t,{serviceParam:n={},serviceMain:i}=e,{filterResponse:a}=n;if(a.uid&&(n.uid=a.uid),a.userInfo&&(n.userInfo=a.userInfo),i.isCloudObject){let{methodName:e="main"}=i;if("function"==typeof i._before){let e=await i._before();if("string"==typeof e)return{code:-1,msg:e};if("object"==typeof e&&0!==e.code)return{code:e.code,msg:e.msg};if("boolean"==typeof e&&!1===e)return{code:-1,msg:""}}if(t=await i[e](n.data),"function"==typeof i._after){let e=await i._after({res:t||{}});"object"==typeof e&&(t=e)}}else t=await i.main(n);return"object"==typeof t&&(void 0===t.vk_uni_token&&"object"==typeof a&&a.token&&void 0!==a.tokenExpired&&(t.vk_uni_token={token:a.token,tokenExpired:a.tokenExpired}),t=routerUtil.returnRes(t)),t},errorCatch:async function(e={}){let{err:t,type:n,serviceParam:i,middlewareService:a,serviceMain:r={}}=e,{url:o,originalParam:s={}}=i;t||(t={});let{code:u}=t,l=t.message||t.msg||t.errMsg||"";if("run"===n&&"function"==typeof r._after){let e=await r._after({err:t});if(e)return e}let c={code:500,msg:l,err:t,serviceParam:i,middlewareService:a};try{s.event&&s.event.httpMethod&&s.event.path&&(o=s.event.path.substring(1))}catch(t){}return"MODULE_NOT_FOUND"==u&&l.indexOf("service/")>-1||"ENOENT"==u&&l.indexOf("service")>-1||404==u&&["cloudFunction","cloudObject"].indexOf(t.name)>-1?(t.stack=`Error: not found【${o}】`,Object.assign(c,{code:404,msg:`not found【${o}】`})):"MODULE_NOT_FOUND"==u&&l.indexOf("Cannot find module")>-1?Object.assign(c,{code:500,msg:l}):"InternalServerError"==u&&l.indexOf("_id_ dup key")>-1?Object.assign(c,{code:500,msg:"vk.baseDao.add : _id不能重复添加"}):0===l.indexOf("Cannot read property 'mp-weixin' of undefined")?Object.assign(c,{code:501,msg:"请先绑定微信"}):l.indexOf("Response timeout for 10000ms")>-1?Object.assign(c,{code:502,msg:"timeout 请求超时,请重试!"}):l.indexOf("msg:token失效")>-1?Object.assign(c,{code:30202,errMsg:l,msg:l}):l.indexOf("msg:禁止访问私有对象内的函数")>-1||l.indexOf("msg:禁止访问私有函数")>-1?Object.assign(c,{code:403,msg:l.substring(4)}):0===l.indexOf("msg:")?Object.assign(c,{code:501,msg:l.substring(4)}):"ReferenceError"===t.name?Object.assign(c,{code:501,msg:`云函数 ${o} 变量引用错误:${l}`}):"TypeError"===t.name?Object.assign(c,{code:501,msg:`云函数 ${o} 运行异常,类型错误:${l}`}):"InternalServerError"==u?Object.assign(c,{code:"InternalServerError",msg:"内部错误"}):"Error"===t.name?Object.assign(c,{code:t.code,msg:l}):t.stack?Object.assign(c,{code:500,msg:"require"==n?`云函数 ${o} 编译异常!`:`云函数 ${o} 运行异常!`}):"string"==typeof t?Object.assign(c,{code:-1,msg:t}):Object.assign(c,t),await returnError(c)},returnRes:function(e={}){return"object"==typeof e&&(void 0!==e.code||void 0!==e.errCode&&(e.code=e.errCode,e.msg=e.errMsg)),e}},routerUtil_1=routerUtil;async function returnError(e={}){let{code:t,msg:n,err:i,serviceParam:a,middlewareService:r}=e;console.error(n);let o={code:t,msg:n};i&&(i.stack?(console.error(i.stack),o.err={message:i.message,stack:i.stack,code:i.code}):o.err=i);try{o.requestId=a.originalParam.context.requestId}catch(i){}let s=await filter.onActionError({serviceParam:a,middlewareService:r,serviceRes:o});return routerUtil.returnRes(s)}try{process.env.TZ="Asia/Shanghai"}catch(e){}async function main(e){let{event:t,context:n,vk:i}=e;!i&&this&&(i=this);let{config:a,uniID:r,uniPay:o,db:s,middlewareService:u,pubFun:l,customUtil:c,crypto:d}=i.getUnicloud();if(i.pubfn.getData(a,"vk.system.serviceShutdown"))return routerUtil_1.returnRes({code:405,msg:i.pubfn.getData(a,"vk.system.serviceShutdownDescription")});if(["h5","web"].indexOf(n.PLATFORM)>-1){let e=i.pubfn.getUniIdConfig(a,"preferedWebPlatform","h5");n.PLATFORM=e}else if(["app-plus","app"].indexOf(n.PLATFORM)>-1){let e=i.pubfn.getUniIdConfig(a,"preferedAppPlatform","app-plus");n.PLATFORM=e}let p={event:t,context:n},f=routerUtil_1.getQueryStringParameters(e),{url:g,data:m,uniIdToken:b}=f;if([403].indexOf(f.code)>-1)return routerUtil_1.returnRes(f);if(g&&"function"==typeof g.trim&&(g=g.trim()),m){m.vk_appId&&(n.APPID=m.vk_appId),m.vk_appid&&(n.APPID=m.vk_appid),m.vk_platform&&(n.PLATFORM=m.vk_platform),m.vk_locale&&(n.LOCALE=m.vk_locale);let e={};if("object"==typeof t.headers&&(t.headers["vk-appId"]&&(e.appId=t.headers["vk-appId"]),t.headers["vk-appid"]&&(e.appid=t.headers["vk-appid"]),t.headers["vk-platform"]&&(e.platform=t.headers["vk-platform"]),t.headers["vk-locale"]&&(e.locale=t.headers["vk-locale"]),t.headers["vk-device-id"]&&(e.deviceId=t.headers["vk-device-id"]),t.headers["vk-client-ip"]&&(e.clientIP=t.headers["vk-client-ip"]),t.headers["vk-os"]&&(e.os=t.headers["vk-os"])),"object"==typeof m.vk_context&&(e=i.pubfn.objectAssign(e,m.vk_context),delete m.vk_context),"object"==typeof e&&i.pubfn.isNotNull(e)&&(e.appId&&(n.APPID=e.appId),e.appid&&(n.APPID=e.appid),e.platform&&(n.PLATFORM=e.platform),e.locale&&(n.LOCALE=e.locale),e.clientIP&&!n.CLIENTIP&&(n.CLIENTIP=e.clientIP),e.os&&(n.OS=e.os),e.deviceId&&(n.DEVICEID=e.deviceId),"function"===n.SOURCE&&(e.clientIP&&(n.CLIENTIP=e.clientIP),e.userAgent&&(n.CLIENTUA=e.userAgent))),i.pubfn.isNullOne(n.APPID,n.PLATFORM)){let e=i.pubfn.getData(a,"vk.context");i.pubfn.isNotNull(e)&&(n.APPID||(n.APPID=e.APPID),n.PLATFORM||(n.PLATFORM=e.PLATFORM),n.LOCALE||(n.LOCALE=e.LOCALE),n.CLIENTIP||(n.CLIENTIP=e.CLIENTIP))}}const h=r.createInstance({context:n});s.command.$=s.command.aggregate;let y={vk:i,config:a,pubFun:l,uniID:h,uniPay:o,db:s,_:s.command,$:s.command.aggregate,customUtil:c,crypto:d,env:{APPID:n.APPID,CLIENTIP:n.CLIENTIP,DEVICEID:n.DEVICEID,LOCALE:n.LOCALE,OS:n.OS,PLATFORM:n.PLATFORM,CLIENTUA:n.CLIENTUA}};try{uniCloud.vk=i,uniCloud.env=y.env,uniCloud.context=n}catch(e){}let w={url:g,data:m,uniIdToken:b,util:y,originalParam:p};const _=routerUtil_1.filterService.getMiddleware(u);try{let e=await routerUtil_1.filterService.onActionExecuting({serviceParam:w,middlewareService:_});if(0!==e.code)return routerUtil_1.returnRes(await routerUtil_1.filterInterception({serviceParam:w,middlewareService:_,filterResponse:e}));delete m.uid,e.uid&&(m.uid=e.uid),w.filterResponse=e}catch(e){return await routerUtil_1.returnError({code:500,msg:`云函数 ${g} 的中间件 onActionExecuting 运行异常!`,err:e,serviceParam:w,middlewareService:_})}let k,v;try{k=await routerUtil_1.requireService({vk:i,serviceParam:w})}catch(e){return await routerUtil_1.errorCatch({err:e,type:"require",serviceParam:w,middlewareService:_})}try{v=await routerUtil_1.serviceRun({serviceParam:w,serviceMain:k})}catch(e){return await routerUtil_1.errorCatch({err:e,type:"run",serviceParam:w,middlewareService:_,serviceMain:k})}try{v=await routerUtil_1.filterService.onActionExecuted({serviceParam:w,middlewareService:_,serviceRes:v})}catch(e){return await routerUtil_1.returnError({code:500,msg:`云函数 ${g} 的中间件 onActionExecuted 运行异常!`,err:e,serviceParam:w,middlewareService:_})}return routerUtil_1.returnRes(v)}var router=main,md5=function(e){return crypto$1.createHash("md5").update(e).digest("hex")},util$1={},baseDao={init:function(e){util$1=e},add:async function(e){let{db:t,_:n,vk:i,config:a}=util$1,{dbName:r,dataJson:o,db:s,cancelAddTime:u,cancelAddTimeStr:l}=e;if(i.pubfn.isNull(r))throw new Error("vk.baseDao.add 中 dbName 不能为空");if(i.pubfn.isNull(o))throw new Error("vk.baseDao.add 中 dataJson 不能为空");let c=s||t;if(!o._add_time){let e=i.pubfn.getData(a,"vk.db.unicloud.cancelAddTime");void 0===u&&e&&(u=e);let t=i.pubfn.getData(a,"vk.db.unicloud.cancelAddTimeStr");if(void 0===l&&t&&(l=t),!u){let e=new Date;o._add_time=e.getTime(),l||(o._add_time_str=i.pubfn.timeFormat(e,"yyyy-MM-dd hh:mm:ss"))}}let d=await c.collection(r).add(o);return d.id?d.id:null},adds:async function(e){let{db:t,_:n,vk:i,config:a}=util$1,{dbName:r,dataJson:o,db:s,cancelAddTime:u,cancelAddTimeStr:l}=e;if(i.pubfn.isNull(r))throw new Error("vk.baseDao.adds 中 dbName 不能为空");if(i.pubfn.isNull(o))throw new Error("vk.baseDao.adds 中 dataJson 不能为空");if("[object Array]"!==Object.prototype.toString.call(o))throw new Error("vk.baseDao.adds 中 dataJson 必须是数组对象");let c=s||t,d=i.pubfn.getData(a,"vk.db.unicloud.cancelAddTime");void 0===u&&d&&(u=d);let p=i.pubfn.getData(a,"vk.db.unicloud.cancelAddTimeStr");if(void 0===l&&p&&(l=p),!u){let e=new Date,t=e.getTime(),n=i.pubfn.timeFormat(e,"yyyy-MM-dd hh:mm:ss");for(let e in o)o[e]._add_time||(o[e]._add_time=t,l||(o[e]._add_time_str=n))}let f=await c.collection(r).add(o);return f.ids?f.ids:f.id?f.id:null},del:async function(e){let{vk:t,db:n,_:i}=util$1,{dbName:a,whereJson:r,db:o}=e,s=o||n,u=0;if(t.pubfn.isNotNull(r)){let e=await s.collection(a).where(r).remove();e?u=e.deleted:(console.error(e.errMsg),u=-1)}else console.error("whereJson条件不能为空");return u},delete:async function(e){return await baseDao.del(e)},remove:async function(e){return await baseDao.del(e)},deleteById:async function(e){let{vk:t,db:n,_:i}=util$1,{dbName:a,id:r,db:o}=e,s=o||n,u=0;if(t.pubfn.isNull(r))throw new Error("deleteById的id不能为空,且必须是字符串");let l=await s.collection(a).doc(r).remove();return l?u=l.deleted:(console.error(l.errMsg),u=0),u},update:async function(e){let t,{vk:n,db:i,_:a}=util$1,{dbName:r,whereJson:o,dataJson:s,db:u}=e,l=u||i,c=0;if(n.pubfn.isNull(o))throw new Error("update的whereJson不能为空,且必须是对象形式");if(n.pubfn.isNull(s))throw new Error("update的dataJson不能为空,且必须是对象形式");return s._id&&delete s._id,t=void 0===o?await l.collection(r).update(s):await l.collection(r).where(o).update(s),t?c=t.updated:console.error(t.errMsg),c},updateById:async function(e){let{vk:t,db:n,_:i}=util$1,{dbName:a,id:r,dataJson:o,getUpdateData:s,db:u}=e,l=u||n,c=0;if(t.pubfn.isNull(r))throw new Error("updateById的id不能为空,且必须是字符串");if(t.pubfn.isNull(o))throw new Error("updateById的dataJson不能为空,且必须是对象形式");o._id===r&&delete o._id;let d=await l.collection(a).doc(r).update(o);return s?d?await baseDao.findById({db:l,dbName:a,id:r}):null:(d?c=d.updated:(console.error(d.errMsg),c=0),c)},updateAndReturn:async function(e){let{vk:t,db:n,_:i}=util$1,{dbName:a,id:r,whereJson:o,dataJson:s,db:u}=e,l=u||n;if(t.pubfn.isNullAll(r,o))throw new Error("updateAndReturn的id和whereJson两者不能都为空");if(t.pubfn.isNull(s))throw new Error("updateAndReturn的dataJson不能为空,且必须是对象形式");if(s._id&&delete s._id,t.pubfn.isNotNull(r)){return(await l.collection(a).doc(r).updateAndReturn(s)).doc}if(t.pubfn.isNotNull(o)){return(await l.collection(a).where(o).updateAndReturn(s)).doc}throw new Error("updateAndReturn的id和whereJson两者不能都为空")},setById:async function(e){let{vk:t,db:n,_:i}=util$1,{dbName:a,id:r,dataJson:o,db:s}=e,u=s||n;if(t.pubfn.isNull(o))throw new Error("setById的dataJson不能为空,且必须是对象形式");if(t.pubfn.isNullAll(r,o._id))throw new Error("id或dataJson._id不能均为空");if(t.pubfn.isNotNullAll(r,o._id)&&r!==o._id)throw new Error("id和dataJson._id必须一致");t.pubfn.isNotNull(o._id)&&(r=o._id,delete o._id);let l=await u.collection(a).doc(r).set(o);return l.updated>0?l.type="update":(l.type="add",l.id=l.upsertedId),l},select:async function(e={}){let{vk:t,db:n,_:i}=util$1;"string"==typeof e.pageIndex&&(e.pageIndex=parseInt(e.pageIndex)),"string"==typeof e.pageSize&&(e.pageSize=parseInt(e.pageSize));let{dbName:a,whereJson:r,pageSize:o=10,getOne:s=!1,getMain:u=!1}=e;if(o<=0&&(o=999999999),o>500)return await baseDao.selectAll(e);let l=await baseDao.getSelectData(e),{result:c,hasMore:d,total:p,getCount:f,pageIndex:g,fieldJson:m}=l;return c=c.skip((g-1)*o).limit(o),t.pubfn.isNotNull(m)&&(c=c.field(m)),c.get().then(e=>{let t={};return f?(t.total=p,t.hasMore=d):(t.total=e.data?e.data.length:0,t.hasMore=t.total>=o),t.rows=e.data,t.code=0,t.msg="查询成功",t.pagination={pageIndex:g,pageSize:o},s&&(t.rows=t.rows[0]),u?t.rows:t})},findById:async function(e){let{vk:t,db:n,_:i}=util$1,{dbName:a,id:r,fieldJson:o,db:s}=e,u=(s||n).collection(a).doc(r);o&&(u=u.field(o));let l=await u.get();return"[object Array]"===Object.prototype.toString.call(l.data)?l.data[0]:l.data},findByWhereJson:async function(e){let{vk:t,db:n,_:i}=util$1,{dbName:a,whereJson:r,fieldJson:o,sortArr:s,db:u}=e,l=u||n;if(t.pubfn.isNotNull(r)){let e=l.collection(a).where(r);if(s)for(let t in s){let n=s[t],i=n.name,a=n.type;null!=a&&""!=a||(a="asc"),e=e.orderBy(i,a)}o&&(e=e.field(o));let t=await e.limit(1).get();if(t.data&&t.data.length>0)return t.data[0]}else console.error("whereJson条件不能为空");return null},count:async function(e){let t,{vk:n,db:i,_:a}=util$1,{dbName:r,whereJson:o,foreignDB:s,foreignKey:u,groupJson:l,lastWhereJson:c,db:d}=e,p=d||i;if(n.pubfn.isNotNull(s)||n.pubfn.isNotNull(l)){let e=p.collection(r).aggregate();return n.pubfn.isNotNull(o)&&e.match(o),n.pubfn.isNotNull(l)&&e.group(l),n.pubfn.isNotNull(s)&&(e=baseDao.addForeignDB({foreignDB:s,foreignKey:u,result:e})),n.pubfn.isNotNull(c)&&(e=e.match(c)),e=await e.count("total").end(),e.data[0]?e.data[0].total:0}return t=n.pubfn.isNotNull(o)?await p.collection(r).where(o).count():await p.collection(r).count(),t.total},getSelectData:async function(e){let{vk:t,db:n,_:i}=util$1,{dbName:a,whereJson:r,pageIndex:o=1,pageSize:s=10,getCount:u=!1,db:l}=e;s<0&&(o=1,s=999999999,u=!0);let c=l||n,d=e.sortArr,p=e.fieldJson,f=0,g=!1;if(u){let e;e=t.pubfn.isNotNull(r)?await c.collection(a).where(r).count():await c.collection(a).count(),f=e.total,o1e3&&(u=1e3));let l=await baseDao.getSelectData(e),{result:c,hasMore:d,total:p,getCount:f,pageIndex:g,pageSize:m,fieldJson:b}=l;m>0&&!p&&!f&&(p=m),i.pubfn.isNotNull(b)&&(c=c.field(b));let h={};if(f&&0===p)h={data:[]};else{let t=p;mr&&(n=r-t);let o=c.skip(t).limit(n).get();i.push(o)}try{h=(await Promise.all(i)).reduce((e,t)=>({data:e.data.concat(t.data),errMsg:e.errMsg}))}catch(t){throw console.error("vk.baseDao.select-异常",e,t),new Error("msg:vk.baseDao.select-异常")}}let y={};return y.total=f?p:h.data?h.data.length:0,y.hasMore=d,y.rows=h.data,y.code=0,y.msg="查询成功",y.pagination={pageIndex:g,pageSize:m},o&&(y.rows=y.rows[0]),s?y.rows:y},sum:async function(e){let{vk:t,db:n,_:i}=util$1,{dbName:a,fieldName:r,whereJson:o,db:s}=e,u=s||n;const l=u.command.aggregate;let c=u.collection(a).aggregate();t.pubfn.isNotNull(o)&&c.match(o),c.group({_id:null,num:l.sum("$"+r)});let d=await c.end();return d.data&&d.data[0]?d.data[0].num:0},avg:async function(e){let{vk:t,db:n,_:i}=util$1,{dbName:a,fieldName:r,whereJson:o,db:s}=e,u=s||n;const l=u.command.aggregate;let c=u.collection(a).aggregate();t.pubfn.isNotNull(o)&&c.match(o),c.group({_id:null,num:l.avg("$"+r)});let d=await c.end();return d.data&&d.data[0]?d.data[0].num:null},max:async function(e){let{vk:t,db:n,_:i}=util$1,{dbName:a,fieldName:r,whereJson:o,db:s}=e,u=s||n;const l=u.command.aggregate;let c=u.collection(a).aggregate();t.pubfn.isNotNull(o)&&c.match(o),c.group({_id:null,num:l.max("$"+r)});let d=await c.end();return d.data&&d.data[0]?d.data[0].num:null},min:async function(e){let{vk:t,db:n,_:i}=util$1,{dbName:a,fieldName:r,whereJson:o,db:s}=e,u=s||n;const l=u.command.aggregate;let c=u.collection(a).aggregate();t.pubfn.isNotNull(o)&&c.match(o),c.group({_id:null,num:l.min("$"+r)});let d=await c.end();return d.data&&d.data[0]?d.data[0].num:null},sample:async function(e){let{vk:t,db:n,_:i}=util$1,{dbName:a,whereJson:r,size:o,fieldJson:s,db:u}=e,l=u||n;l.command.aggregate;let c=l.collection(a).aggregate();return t.pubfn.isNotNull(r)&&c.match(r),c.sample({size:o}).limit(o),t.pubfn.isNotNull(s)&&c.project(s),(await c.end()).data},selects:async function(e={}){let{vk:t,db:n,_:i}=util$1;if(t.pubfn.isNotNull(e.treeProps))return await baseDao.tree(e);"string"==typeof e.pageIndex&&(e.pageIndex=parseInt(e.pageIndex)),"string"==typeof e.pageSize&&(e.pageSize=parseInt(e.pageSize));let{db:a,dbName:r,foreignKey:o="_id",pageIndex:s=1,pageSize:u=10,getCount:l=!1,getOne:c=!1,getMain:d=!1,whereJson:p={},unwindJson:f,groupJson:g,sortArr:m=[],foreignDB:b=[],lastWhereJson:h,lastSortArr:y=[],fieldJson:w={},addFields:_}=e,k=a||n;-1==u&&(s=1,u=999999999,l=!1),c&&(u=1,l=!1);let v,x=0,N=!1;if(t.pubfn.isNotNull(p))for(let e in p)p[e]&&"object"==typeof p[e]&&"geoNear"===p[e].operator&&(v=t.pubfn.copyObject(p[e]),v.keyName=e,v.limit=s*u,delete p[e]);if(l){if(t.pubfn.isNullAll(g,f,h)){let e;e=t.pubfn.isNotNull(p)?await k.collection(r).where(p).count():await k.collection(r).count(),x=e.total}else{let e=k.collection(r).aggregate();t.pubfn.isNotNull(p)&&(t.pubfn.isNotNull(v)?e=baseDao.getGeoNearJson({runDB:k,result:e,geoNearJson:v,whereJson:p}):e.match(p)),t.pubfn.isNotNull(f)&&(e=baseDao.getTnwind({result:e,unwindJson:f})),t.pubfn.isNotNull(g)&&e.group(g),t.pubfn.isNotNull(h)&&(t.pubfn.isNotNull(b)&&(e=baseDao.addForeignDB({foreignDB:b,foreignKey:o,result:e})),e.match(h)),e=await e.count("total").end(),x=e.data[0]?e.data[0].total:0}s=u),$.rows=O,$.code=0,$.msg="查询成功",$.pagination={pageIndex:s,pageSize:u},c&&($.rows=$.rows[0]),d?$.rows:$},listToObjectByLimit1:function(e){let{vk:t,db:n,_:i}=util$1,{list:a,foreignDB:r}=e;if(t.pubfn.isNotNull(r))for(let e in a)for(let n in r){let{as:i,limit:o,foreignDB:s,dbName:u}=r[n];i||(i=u),t.pubfn.isNotNull(s)&&(a[e][i]=baseDao.listToObjectByLimit1({list:a[e][i],foreignDB:s})),1===o&&(t.pubfn.isArray(a[e][i])?a[e][i]&&a[e][i].length>0?a[e][i]=a[e][i][0]:a[e][i]={}:void 0===a[e][i]&&(a[e][i]={}))}return a},addForeignDB:function(e){let{vk:t,db:n,_:i}=util$1,{foreignDB:a,foreignKey:r,result:o}=e;const s=i.aggregate;for(let e in a){let n,{dbName:u,foreignKey:l,localKey:c,localKeyType:d="",foreignKeyType:p="",as:f,limit:g,getOne:m,whereJson:b,fieldJson:h,sortArr:y,foreignDB:w,addFields:_}=a[e];f||(f=u),n=t.pubfn.isNotNull(c)?c:"object"==typeof r?r[e]:r;let k,v="string"==typeof n?"$"+n:n,x="string"==typeof l?"$"+l:l,N="$$foreignKey"+baseDao.getForeignKeyName(n),$="foreignKey"+baseDao.getForeignKeyName(n);k="array"===d.toLowerCase()?[s.cond({if:s.isArray(N),then:s.in([x,N]),else:s.eq([x,N])})]:"array"===p.toLowerCase()?[s.cond({if:s.isArray(x),then:s.in([N,x]),else:s.eq([x,N])})]:[s.eq([x,N])];let D=s.pipeline().match(i.expr(s.and(k)));if(t.pubfn.isNotNull(b)&&(D=D.match(b)),t.pubfn.isNotNull(y)){let e={};for(let t in y){let n=y[t],i=n.name,a=n.type;a=null==a||""==a||"asc"==a?1:-1,e[i]=a}D=D.sort(e)}g&&(D=D.limit(g)),t.pubfn.isNotNull(w)&&(D=baseDao.addForeignDB({foreignDB:w,result:D})),t.pubfn.isNotNull(h)&&(h=baseDao.foreignDBToProject({fieldJson:h,foreignDB:w}),D=D.project(h)),t.pubfn.isNotNull(_)&&(D=D.addFields(_)),D=D.done();let T={};T[$]=v;let O={from:u,let:T,pipeline:D,as:f};o=o.lookup(O),(1===g&&!1!==m||!0===m)&&(o=o.unwind({path:"$"+f,preserveNullAndEmptyArrays:!0}))}return o},getForeignKeyName:function(e){return"string"==typeof e?e.replace(new RegExp("\\.","g"),"__"):"__vk__foreignKey1"},addWhereJson:function(e,t={},n="whereJson"){let{vk:i,db:a,_:r}=util$1,{formData:o,columns:s}=e;for(let e in s){let a,u=s[e],{key:l,mode:c,defaultValue:d,type:p="",lastWhereJson:f,auxiliary:g=!0,trim:m=!0,isNumber:b=!1}=u;if("lastWhereJson"===n&&!f)continue;if("lastWhereJson"!==n&&f)continue;let h=l;if(i.pubfn.isNotNull(u.fieldName)&&(h=u.fieldName),a=i.pubfn.isNotNull(u.value)?u.value:o[l],i.pubfn.isNull(a)&&i.pubfn.isNotNull(d)&&(a=d),i.pubfn.isNull(c)&&(c=["address","province","city","area"].indexOf(p)>-1?"address":"[object Array]"===Object.prototype.toString.call(a)&&a.length>=2?"[]":"="),i.pubfn.isNotNull(a))if("string"==typeof a&&m&&"function"==typeof a.trim&&(a=a.trim()),b&&!isNaN(a)&&(a=Number(a)),"custom"===c);else if("%%"===c)try{t[h]=new RegExp(a)}catch(e){}else if("%*"===c)try{t[h]=new RegExp("^"+a)}catch(e){}else if("*%"===c)try{t[h]=new RegExp(a+"$")}catch(e){}else if(">"===c)t[h]=t[h]?t[h].gt(a):r.gt(a);else if(">="===c)t[h]=t[h]?t[h].gte(a):r.gte(a);else if("<"===c)t[h]=t[h]?t[h].lt(a):r.lt(a);else if("<="===c)t[h]=t[h]?t[h].lte(a):r.lte(a);else if("in"===c)t[h]=r.in(a);else if("nin"===c)t[h]=r.nin(a);else if("!="===c)t[h]=r.neq(a);else if("[]"===c)t[h]=r.gte(a[0]).lte(a[1]);else if("[)"===c)t[h]=r.gte(a[0]).lt(a[1]);else if("(]"===c)t[h]=r.gt(a[0]).lte(a[1]);else if("()"===c)t[h]=r.gt(a[0]).lt(a[1]);else if("address"===c){let e={};a.province&&a.province.code&&(e["province.code"]=a.province.code),a.city&&a.city.code&&(e["city.code"]=a.city.code),a.area&&a.area.code&&(e["area.code"]=a.area.code),t[h]=e}else t[h]=g?"___empty-array___"===a?[]:"___empty-object___"===a?{}:"___non-existent___"===a?r.exists(!1):"___existent___"===a?r.exists(!0):a:a}return t},addLastWhereJson:function(e,t={}){return baseDao.addWhereJson(e,t,"lastWhereJson")},getTableData:async function(e){let{vk:t,db:n,_:i,config:a}=util$1,{db:r,dbName:o,data:s={},getCount:u=!0,getMain:l,whereJson:c,unwindJson:d,fieldJson:p,sortArr:f,treeProps:g,groupJson:m,foreignKey:b,foreignDB:h,lastWhereJson:y,lastSortArr:w,addFields:_}=e,{pageIndex:k,pageSize:v,pagination:x,sortRule:N,lastSortRule:$,formData:D,columns:T}=s;x&&(k=x.pageIndex,v=x.pageSize);let O,A={},I={},S=[],E={};if(t.pubfn.isNotNull(f))S=f;else{let e=t.pubfn.getData(a,"vk.db.unicloud.getTableData.sortArr");t.pubfn.isNotNull(e)?S=e:S.push({name:"_id",type:"desc"})}if(t.pubfn.isNotNull(N)&&(S=N),t.pubfn.isNotNull($)&&(w=$),I=baseDao.addWhereJson(s),E=baseDao.addLastWhereJson(s),t.pubfn.isNotNull(c)&&(c.operator&&c.operands&&["or","and"].indexOf(c.operator)>-1?I=i.and([I,c]):t.pubfn.objectAssign(I,c)),t.pubfn.isNotNull(p)&&t.pubfn.objectAssign(A,p),t.pubfn.isNotNull(y)&&t.pubfn.objectAssign(E,y),t.pubfn.isNotNull(I))for(let e in I)"object"==typeof I[e]&&I[e]&&"geoNear"===I[e].operator&&(O=!0);return t.pubfn.isNullAll(h,m,g,d,O)?await t.baseDao.select({db:r,dbName:o,getMain:l,getCount:u,pageIndex:k,pageSize:v,fieldJson:A,whereJson:I,sortArr:S}):await t.baseDao.selects({db:r,dbName:o,foreignKey:b,getMain:l,getCount:u,pageIndex:k,pageSize:v,whereJson:I,unwindJson:d,fieldJson:A,sortArr:S,treeProps:g,groupJson:m,foreignDB:h,lastWhereJson:E,lastSortArr:w,addFields:_})},startTransaction:async function(e){let{vk:t,db:n,_:i}=util$1;return await n.startTransaction()},rollbackTransaction:async function(e){let{db:t,msg:n="【异常】操作失败",tips:i="事务已回滚。",err:a={},code:r=-1}=e;console.error("transaction error",a);let o={code:r,msg:n,tips:i};await t.rollback();let s={message:a.message,stack:a.stack};try{s.body=JSON.parse(a.message),"object"==typeof s.body&&void 0!==s.body.code&&(s.body.msg,1)&&(o.msg=s.body.msg)}catch(e){}return console.error("transaction errJson",s),o.err=s,o},group:async function(e){let{vk:t,db:n,_:i}=util$1,{dbName:a,whereJson:r,groupJson:o,sortArr:s,pageIndex:u=1,pageSize:l=10,getCount:c=!1,lookupJson:d,db:p}=e,f=p||n;l<=0&&(l=999999999);i.aggregate;let g,m=f.collection(a).aggregate();if(t.pubfn.isNotNull(r)&&(m=m.match(r)),t.pubfn.isNotNull(o)&&(m=m.group(o)),t.pubfn.isNotNull(s)){let e={};for(let t in s){let n=s[t],i=n.name,a=n.type;a=null==a||""==a||"asc"==a?1:-1,e[i]=a}m=m.sort(e)}m=m.skip((u-1)*l).limit(l),t.pubfn.isNotNull(d)&&(g=d.returnObject,delete d.returnObject,m=m.lookup(d)),m=await m.end();let b,h=m.data;if(g)for(let e in h)h[e][d.as]=h[e][d.as][0];let y=!1;if(c){let e=f.collection(a).aggregate();t.pubfn.isNotNull(r)&&(e=e.match(r)),t.pubfn.isNotNull(o)&&(e=e.group(o));let n=await e.count("total").end();b=n.data[0]?n.data[0].total:0,u=l;return{hasMore:y,total:b,rows:h,code:0,key:1,pageIndex:u,pageSize:l}},tree:async function(e){let{vk:t,db:n,_:i}=util$1,{dbName:a,whereJson:r={},pageIndex:o=1,pageSize:s=10,getCount:u=!1,sortArr:l=[],fieldJson:c={},lastWhereJson:d,treeProps:p={}}=e;e.foreignDB||(e.foreignDB=[]);let{id:f="_id",parent_id:g="parent_id",children:m="children",level:b=10,limit:h=500}=p;if(b<1||b>20)throw new Error("msg:treeProps.level的范围必须在[1,20]");delete e.treeProps,e.whereJson||(e.whereJson={[g]:null}),e.foreignDB.unshift({dbName:a,localKey:f,foreignKey:g,as:m,limit:h,whereJson:p.whereJson,fieldJson:p.fieldJson||e.fieldJson,sortArr:p.sortArr,foreignDB:t.pubfn.copyObject(e.foreignDB)});let y=t.pubfn.copyObject(e.foreignDB);for(let n=1;n{"[object object]"===Object.prototype.toString.call(e.content)&&(e.content=JSON.stringify(e.content)),void 0===e.dataType&&(e.dataType="json"),"default"!=e.dataType&&""!==e.dataType||delete e.dataType,e.useContent&&(e.content=JSON.stringify(e.data)),e.method||(e.method="POST"),e.method=e.method.toUpperCase(),void 0===e.headers&&void 0!==e.header&&(e.headers=e.header);let t=await uniCloud.httpclient.request(e.url,e);return!e.needOriginalRes&&t&&t.data?t.data:t};var vk_request=request;const callFunction=async(e={})=>{let{name:t,url:n,data:i={},uniIdToken:a,clientInfo:r={},event:o={},uniCloud:s}=e;if(o&&o.originalParam&&o.originalParam.context){let e=o.originalParam.context;a=o.uniIdToken,r={...e,appId:e.APPID,platform:e.PLATFORM,locale:e.LOCALE,clientIP:e.CLIENTIP,os:e.OS,userAgent:e.CLIENTUA,deviceId:e.DEVICEID,uniIdToken:a}}let u,l=s||uniCloud;u=l.$context&&l.$context.FUNCTION_NAME?l.$context.FUNCTION_NAME:l.$options&&l.$options.context&&l.$options.context.FUNCTION_NAME?l.$options.context.FUNCTION_NAME:"router",a||r.uniIdToken&&(a=r.uniIdToken);let c={...i,vk_context:{appId:r.appId,platform:r.platform,locale:r.locale,clientIP:r.clientIP,os:r.os,userAgent:r.userAgent,deviceId:r.deviceId}};t||(t=u);let d=await l.callFunction({name:t,data:{$url:n,uniIdToken:a,data:c}});return d&&d.result};var vk_callFunction=callFunction,util$2={formValidateItem:function(e,t,n){let i={code:0,msg:"ok"},a=getData(e,t);void 0===a&&(a=e[t]);for(let e in n){let r=n[e];if(void 0===a&&r.required){i={type:"undefined",code:-1,msg:"字段:"+t+" 名称错误,请检查!",key:t,value:a};break}if(r.required&&(null==a||null==a||""===a||0==a.length)){i={type:"required",code:-1,msg:r.message,key:t,value:a};break}if(r.type&&void 0!==a){if(Object.prototype.toString.call(a).toLowerCase().toLowerCase()!==`[object ${r.type}]`.toLowerCase()){i={type:"type",code:-1,msg:r.message,key:t,value:a};break}}if(r.len&&a.length!=r.len){i={type:"len",code:-1,msg:r.message,key:t,value:a};break}if(r.min&&isNotNull(a))if("number"==r.type){if(ar.max){i={type:"max",code:-1,msg:r.message,key:t,value:a};break}}else if(a.length>r.max){i={type:"max",code:-1,msg:r.message,key:t,value:a};break}if("function"==typeof r.validator){let e,n,o=0,s=r.validator(r,a,(function(e){return n||(n=e),e}));if(n||(n=s),void 0!==n&&!0!==n&&(o=-1,"object"==typeof n?e||(e=n.message||n.msg,n.code&&(o=n.code)):"string"==typeof n&&(e||(e=n))),o){i={type:"validator",code:o,msg:e||r.message,key:t,value:a};break}}}return i}},formValidate=function(e={}){let t={code:0,msg:"ok"},{data:n,rules:i}=e;if(i)for(let e in i){let a=i[e];if(t=util$2.formValidateItem(n,e,a),0!=t.code)break}return t};function isNotNull(e){return-1===[void 0,null,""].indexOf(e)}function getData(e,t,n){let i=JSON.parse(JSON.stringify(e));t=t.replace(/\s+/g,"")+".";let a="";for(let e=0;e0&&(n=util$3.treeToArrayFn(l[o],t,n,l[a])),s&&delete l[o]}return n},util$3.arrayToTree=function(e,t){let n=deepClone(e),{id:i="_id",parent_id:a="parent_id",children:r="children",deleteParentId:o=!1,need_field:s}=t,u=[],l={};for(let e=0;e=10&&(e=Number(e)),"number"==typeof e)10==e.toString().length&&(e*=1e3),n=new Date(e);else if("object"==typeof e)n=new Date(e.getTime());else if("string"==typeof e){let i=t=util$4.getTargetTimezone(t),a=t>=0?"+":"";t>=0&&t<10?i="0"+t:t<0&&t>-10&&(i="-0"+-1*t);let r,o=e.split(" "),s=o[0]||"",u=o[1]||"";r=s.indexOf("-")>-1?s.split("-"):s.split("/");let l=u.split(":"),c={year:Number(r[0]),month:Number(r[1])||1,day:Number(r[2])||1,hour:Number(l[0])||0,minute:Number(l[1])||0,second:Number(l[2])||0};for(let e in c)c[e]>=0&&c[e]<10&&(c[e]="0"+c[e]);let d=`${c.year}-${c.month}-${c.day}T${c.hour}:${c.minute}:${c.second}${a}${i}:00`;n=new Date(d)}return n},getTimeByTimeZone:function(e,t){let n=util$4.getDateObject(e);t=util$4.getTargetTimezone(t);let i=60*n.getTimezoneOffset()*1e3+60*t*60*1e3,a=n.getTime()+i;return n=new Date(a),n},timeFormat:function(e,t="yyyy-MM-dd hh:mm:ss",n){try{if(!e)return"";n=util$4.getTargetTimezone(n);let i=util$4.getTimeByTimeZone(e,n),a={"M+":i.getMonth()+1,"d+":i.getDate(),"h+":i.getHours(),"m+":i.getMinutes(),"s+":i.getSeconds(),"q+":Math.floor((i.getMonth()+3)/3),S:i.getMilliseconds(),Z:`${n>=0?"+":"-"}${Math.abs(n).toString().padStart(2,"0")}:00`};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(i.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in a)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?a[e]:("00"+a[e]).substr((""+a[e]).length)));return t}catch(e){return time}},getDateInfo:function(e=new Date,t){let n=util$4.getTimeByTimeZone(e,t),i=n.getFullYear()+"",a=n.getMonth()+1<10?"0"+(n.getMonth()+1):n.getMonth()+1,r=n.getDate()<10?"0"+n.getDate():n.getDate(),o=n.getHours()<10?"0"+n.getHours():n.getHours(),s=n.getMinutes()<10?"0"+n.getMinutes():n.getMinutes(),u=n.getSeconds()<10?"0"+n.getSeconds():n.getSeconds(),l=n.getMilliseconds(),c=n.getDay(),d=Math.floor((n.getMonth()+3)/3);return{year:Number(i),month:Number(a),day:Number(r),hour:Number(o),minute:Number(s),second:Number(u),millisecond:Number(l),week:Number(c),quarter:Number(d)}},getCommonTime:function(e=new Date,t){let n={},i=util$4.getDateObject(e);t=util$4.getTargetTimezone(t);const a=60*i.getTimezoneOffset()*1e3+60*t*60*1e3,{year:r,month:o,day:s,hour:u,minute:l,second:c,millisecond:d,week:p,quarter:f}=util$4.getDateInfo(i,t);n.now={year:r,month:o,day:s,hour:u,minute:l,second:c,millisecond:d,week:p,quarter:f,date_str:util$4.timeFormat(i,"yyyy-MM-dd hh:mm:ss",t),date_day_str:util$4.timeFormat(i,"yyyy-MM-dd",t),date_month_str:util$4.timeFormat(i,"yyyy-MM",t)};let g=new Date(r,o,0).getDate(),m=new Date(r,12,0).getDate();n.todayStart=new Date(`${r}/${o}/${s}`).getTime()-a,n.today12End=new Date(`${r}/${o}/${s}`).getTime()+43199999-a,n.todayEnd=new Date(`${r}/${o}/${s}`).getTime()+86399999-a,n.monthStart=new Date(`${r}/${o}/1`).getTime()-a,n.monthEnd=new Date(`${r}/${o}/${g}`).getTime()+86399999-a,n.yearStart=new Date(r+"/1/1").getTime()-a,n.yearEnd=new Date(`${r}/12/${m}`).getTime()+86399999-a,n.hourStart=new Date(`${r}/${o}/${s} ${u}:00:00`).getTime()-a,n.hourEnd=new Date(`${r}/${o}/${s} ${u}:59:59`).getTime()-a;let b=r,h=o-1;0===h&&(h=12,b=r-1);let y=new Date(b,h,0).getDate();n.lastMonthStart=new Date(`${b}/${h}/1`).getTime()-a,n.lastMonthEnd=new Date(`${b}/${h}/${y}`).getTime()+86399999-a,n.yesterdayStart=n.todayStart-864e5,n.yesterday12End=n.today12End-864e5,n.yesterdayEnd=n.todayEnd-864e5;let w=util$4.getWeekOffsetStartAndEnd(0,i,t);n.weekStart=w.startTime,n.weekEnd=w.endTime,n.months=[],n.months[0]={startTime:n.monthStart,endTime:n.monthEnd,startTimeStr:util$4.timeFormat(n.monthStart,"yyyy-MM-dd hh:mm:ss",t),endTimeStr:util$4.timeFormat(n.monthEnd,"yyyy-MM-dd hh:mm:ss",t),monthStart:n.monthStart,monthEnd:n.monthEnd};for(let e=1;e<=12;e++){let i=new Date(r,e,0).getDate(),o=new Date(`${r}/${e}/1`).getTime()-a,s=new Date(`${r}/${e}/${i}`).getTime()+86399999-a;n.months[e]={startTime:o,endTime:s,startTimeStr:util$4.timeFormat(o,"yyyy-MM-dd hh:mm:ss",t),endTimeStr:util$4.timeFormat(s,"yyyy-MM-dd hh:mm:ss",t),monthStart:o,monthEnd:s}}n.days=[],n.days[0]={startTime:n.todayStart,endTime:n.todayEnd,startTimeStr:util$4.timeFormat(n.todayStart,"yyyy-MM-dd hh:mm:ss",t),endTimeStr:util$4.timeFormat(n.todayEnd,"yyyy-MM-dd hh:mm:ss",t)};for(let e=1;e<=g;e++){let i=n.monthStart+864e5*(e-1),{startTime:a,endTime:r}=util$4.getDayOffsetStartAndEnd(0,i,t);n.days[e]={startTime:a,endTime:r,startTimeStr:util$4.timeFormat(a,"yyyy-MM-dd hh:mm:ss",t),endTimeStr:util$4.timeFormat(r,"yyyy-MM-dd hh:mm:ss",t)}}for(let e in n)"number"==typeof n[e]&&13===n[e].toString().length&&(n[e+"Str"]=util$4.timeFormat(n[e],"yyyy-MM-dd hh:mm:ss",t));return n},getMonthStartAndEnd:function(e,t){t=util$4.getTargetTimezone(t);let n={startTime:null,endTime:null},{year:i,month:a}=e;if(i>0&&a>0){const e=60*(new Date).getTimezoneOffset()*1e3+60*t*60*1e3;let r=new Date(i,a,0).getDate();n.startTime=new Date(`${i}/${a}/1`).getTime()-e,n.endTime=new Date(`${i}/${a}/${r}`).getTime()+86399999-e}return n},getHourOffsetStartAndEnd:function(e=0,t=new Date,n){let i=util$4.getDateObject(t);n=util$4.getTargetTimezone(n);let a={};const r=60*i.getTimezoneOffset()*1e3+60*n*60*1e3;i=new Date(i.getTime()+36e5*e);let o=util$4.getDateInfo(i);return a.startTime=new Date(`${o.year}/${o.month}/${o.day} ${o.hour}:00:00`).getTime()-r,a.endTime=new Date(`${o.year}/${o.month}/${o.day} ${o.hour}:00:00`).getTime()+3599999-r,a},getDayOffsetStartAndEnd:function(e=0,t=new Date,n){let i=util$4.getDateObject(t);n=util$4.getTargetTimezone(n);let a={};const r=60*i.getTimezoneOffset()*1e3+60*n*60*1e3;i=new Date(i.getTime()+864e5*e);let o=util$4.getDateInfo(i);return a.startTime=new Date(`${o.year}/${o.month}/${o.day}`).getTime()-r,a.endTime=new Date(`${o.year}/${o.month}/${o.day}`).getTime()+86399999-r,a},getWeekOffsetStartAndEnd:function(e=0,t=new Date,n){let i={},a=util$4.getDateObject(t);n=util$4.getTargetTimezone(n);const r=60*a.getTimezoneOffset()*1e3+60*n*60*1e3;let o=0===a.getDay()?7:a.getDay();a.setDate(a.getDate()-o+1+7*e);let s=util$4.getDateInfo(a);a.setDate(a.getDate()+7);let u=util$4.getDateInfo(a);return i.startTime=new Date(`${s.year}/${s.month}/${s.day}`).getTime()-r,i.endTime=new Date(`${u.year}/${u.month}/${u.day}`).getTime()-1-r,i},getMonthOffsetStartAndEnd:function(e=0,t=new Date,n){let i={},a=util$4.getDateObject(t),r=util$4.getDateInfo(a),o=r.month+e,s=r.year;o>12?(s+=Math.floor(o/12),o=Math.abs(o)%12):o<=0&&(s=s-1-Math.floor(Math.abs(o)/12),o=12-Math.abs(o)%12);let u=new Date(s,o,0).getDate();return i.startTime=util$4.getDateObject(`${s}/${o}/01`,n).getTime(),i.endTime=util$4.getDateObject(`${s}/${o}/${u}`,n).getTime()+86399999,i},getQuarterOffsetStartAndEnd:function(e=0,t=new Date,n){let i={},a=util$4.getDateObject(t);a.setMonth(a.getMonth()+3*e),n=util$4.getTargetTimezone(n);const r=60*a.getTimezoneOffset()*1e3+60*n*60*1e3;let o=util$4.getDateInfo(a).month;[1,2,3].indexOf(o)>-1?o=1:[4,5,6].indexOf(o)>-1?o=4:[7,8,9].indexOf(o)>-1?o=7:[10,11,12].indexOf(o)>-1&&(o=10),a.setMonth(o-1);let s=util$4.getDateInfo(a);a.setMonth(a.getMonth()+3);let u=util$4.getDateInfo(a);return i.startTime=new Date(`${s.year}/${s.month}/1`).getTime()-r,i.endTime=new Date(`${u.year}/${u.month}/1`).getTime()-1-r,i},getYearOffsetStartAndEnd:function(e=0,t=new Date,n){let i={},a=util$4.getDateObject(t);n=util$4.getTargetTimezone(n);const r=60*a.getTimezoneOffset()*1e3+60*n*60*1e3;let o=util$4.getDateInfo(a).year+e;return i.startTime=new Date(o+"/1/1").getTime()-r,i.endTime=new Date(o+"/12/31").getTime()+86399999-r,i},getOffsetTime:function(e=new Date,t,n){let i=util$4.getDateObject(e),a=util$4.getDateInfo(i);n=util$4.getTargetTimezone(n);const r=60*i.getTimezoneOffset()*1e3+60*n*60*1e3;let o=t.year||t.y||0,s=t.month||t.m||0,u=t.day||t.d||0,l=t.hour||t.hours||t.hh||0,c=t.minute||t.minutes||t.mm||0,d=t.second||t.seconds||t.ss||0,{mode:p="after"}=t;"before"==p&&(o*=-1,s*=-1,u*=-1,l*=-1,c*=-1,d*=-1);let f={year:a.year+o,month:a.month+s,day:a.day+u,hour:a.hour+l,minute:a.minute+c,second:a.second+d};return i=new Date(f.year,f.month-1,f.day,f.hour,f.minute,f.second),i.getTime()-r},isLeapYear:function(e){if(void 0===e){let{now:t}=util$4.getCommonTime();e=t.year}else if("object"==typeof e){let{now:t}=util$4.getCommonTime(e);e=t.year}return e%4==0&&e%100!=0||e%400==0},isQingming:function(e=new Date){let{now:t}=util$4.getCommonTime(e),{year:n,month:i,day:a}=t,r=!1;return util$4.isLeapYear(n)||util$4.isLeapYear(n-1)?4===i&&4===a&&(r=!0):4===i&&5===a&&(r=!0),r},getFullTime:function(e,t=0,n){if(!e)return"";n=util$4.getTargetTimezone(n);let i=util$4.getDateObject(e);const a=60*i.getTimezoneOffset()*1e3+60*n*60*1e3,r=i.getTime()+a;i=new Date(r);let o=i.getFullYear()+"",s=i.getMonth()+1<10?"0"+(i.getMonth()+1):i.getMonth()+1,u=i.getDate()<10?"0"+i.getDate():i.getDate(),l=i.getHours()<10?"0"+i.getHours():i.getHours(),c=i.getMinutes()<10?"0"+i.getMinutes():i.getMinutes(),d=i.getSeconds()<10?"0"+i.getSeconds():i.getSeconds();return 2===t?{YYYY:Number(o),MM:Number(s),DD:Number(u),hh:Number(l),mm:Number(c),ss:Number(d),year:Number(o),month:Number(s),day:Number(u),hour:Number(l),minute:Number(c),second:Number(d)}:1===t?o+""+s+u+l+c+d:o+"-"+s+"-"+u+" "+l+":"+c+":"+d}},timeUtil=util$4,pubfn={};pubfn.formValidate=formValidate,pubfn.treeUtil=treeUtil,pubfn.timeUtil=timeUtil,pubfn.sleep=e=>new Promise(t=>setTimeout(t,e)),pubfn.timeFormat=pubfn.timeUtil.timeFormat,pubfn.getDateInfo=pubfn.timeUtil.getDateInfo,pubfn.getFullTime=pubfn.timeUtil.getFullTime,pubfn.getCommonTime=pubfn.timeUtil.getCommonTime,pubfn.getOffsetTime=pubfn.timeUtil.getOffsetTime,pubfn.getHourOffsetStartAndEnd=pubfn.timeUtil.getHourOffsetStartAndEnd,pubfn.getDayOffsetStartAndEnd=pubfn.timeUtil.getDayOffsetStartAndEnd,pubfn.getWeekOffsetStartAndEnd=pubfn.timeUtil.getWeekOffsetStartAndEnd,pubfn.getWeekStartAndEnd=pubfn.timeUtil.getWeekOffsetStartAndEnd,pubfn.getMonthOffsetStartAndEnd=pubfn.timeUtil.getMonthOffsetStartAndEnd,pubfn.getQuarterOffsetStartAndEnd=pubfn.timeUtil.getQuarterOffsetStartAndEnd,pubfn.getYearOffsetStartAndEnd=pubfn.timeUtil.getYearOffsetStartAndEnd,pubfn.getMonthStartAndEnd=pubfn.timeUtil.getMonthStartAndEnd,pubfn.validator=function(e){return function(t,n,i){let a=pubfn.test(n,e);return"function"!=typeof i||!a&&n?i(!1):void i()}},pubfn.test=function(e,t="",n=!1){let i;if(t=t.toLowerCase(),n&&(""===e||null==e))return!0;switch(t){case"mobile":return new RegExp(/^1[3|4|5|6|7|8|9][0-9]{9}$/).test(e);case"tel":return new RegExp(/^(0\d{2,3}-\d{7,8})(-\d{1,4})?$/).test(e);case"card":return new RegExp(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/).test(e);case"mobilecode":return new RegExp(/^[0-9]{6}$/).test(e);case"username":return new RegExp(/^[a-zA-Z]([-_a-zA-Z0-9]{2,31})$/).test(e);case"pwd":case"password":return new RegExp(/^([a-zA-Z0-9_@]){6,18}$/).test(e);case"paypwd":return new RegExp(/^[0-9]{6}$/).test(e);case"postal":return new RegExp(/[1-9]\d{5}(?!\d)/).test(e);case"qq":return new RegExp(/^[1-9][0-9]{4,9}$/).test(e);case"email":return new RegExp(/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/).test(e);case"money":return new RegExp(/^\d*(?:\.\d{0,2})?$/).test(e);case"url":return new RegExp(/^(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/).test(e);case"ip":return new RegExp(/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/).test(e);case"date":return new RegExp(/^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/).test(e);case"time":return new RegExp(/^(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/).test(e);case"datetime":return new RegExp(/^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\s+(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/).test(e);case"english+number":return new RegExp(/^[a-zA-Z0-9]+$/).test(e);case"english+number+_":return new RegExp(/^[a-zA-Z0-9_]+$/).test(e);case"english+number+_-":return new RegExp(/^[a-zA-Z0-9_-]+$/).test(e);case"version":return new RegExp(/^([1-9]\d|[1-9])(.([1-9]\d|\d)){2}$/).test(e);case"number":return new RegExp(/^[0-9]+$/).test(e);case"english":return new RegExp(/^[a-zA-Z]+$/).test(e);case"chinese":return new RegExp(/^[\u4e00-\u9fa5]+$/gi).test(e);case"lower":return new RegExp(/^[a-z]+$/).test(e);case"upper":return new RegExp(/^[A-Z]+$/).test(e);case"html":return new RegExp(/<("[^"]*"|'[^']*'|[^'">])*>/).test(e);case"image":return i=e.split("?")[0],new RegExp(/\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)$/).test(i);case"video":return i=e.split("?")[0],new RegExp(/\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8|3gp)$/).test(i);case"audio":return i=e.split("?")[0],new RegExp(/\.(mp3)$/).test(i);default:return!0}},pubfn.checkStr=pubfn.test,pubfn.priceFilter=function(e,t=""){return pubfn.isNull(e)?t:isNaN(e)?e:("string"==typeof e&&(e=parseFloat(e)),(e/100).toFixed(2))},pubfn.priceLeftFilter=function(e){let t="";return e&&(t=pubfn.priceFilter(e).split(".")[0]),t},pubfn.priceRightFilter=function(e){let t="";return e&&(t=pubfn.priceFilter(e).split(".")[1]),t},pubfn.percentageFilter=function(e,t=!0,n=""){return pubfn.isNull(e)?n:(isNaN(e)||("string"==typeof e&&(e=parseFloat(e)),e=parseFloat((100*e).toFixed(2)),t&&(e+="%")),e)},pubfn.discountFilter=function(e,t=!0,n=""){return pubfn.isNull(e)?n:isNaN(e)?e:("string"==typeof e&&(e=parseFloat(e)),(e=parseFloat((10*e).toFixed(2)))>10?"折扣不可以大于原价":10==e?"原价":0==e?"免费":e<0?"折扣不可以小于0":(t&&(e+=" 折"),e))},pubfn.objectDeleteInvalid=function(e){return Object.keys(e).forEach(t=>{void 0===e[t]&&delete e[t]}),e},pubfn.objectAssign=function(e,t,n=!0){return n&&pubfn.objectDeleteInvalid(t),Object.assign(e,t)},pubfn.copyObject=function(e){return void 0!==e?JSON.parse(JSON.stringify(e)):e},pubfn.deepClone=function(e){if([null,void 0,NaN,!1].includes(e))return e;if("object"!=typeof e&&"function"!=typeof e)return e;let t="[object Array]"===Object.prototype.toString.call(e)?[]:{};for(let n in e)e.hasOwnProperty(n)&&(t[n]="object"==typeof e[n]?pubfn.deepClone(e[n]):e[n]);return t},pubfn.formAssign=function(e,t){let n=pubfn.copyObject(e);return pubfn.objectAssign(n,t)},pubfn.arr_concat=function(e,t,n){n||(n="id"),e||(e=[]),t||(t=[]);let i=e.concat(t),a=[];if(-1!=n){let e=[];for(let t in i)-1==e.indexOf(i[t][n])&&(e.push(i[t][n]),a.push(i[t]))}else a=i;return a},pubfn.getData=function(e,t,n){let i=JSON.parse(JSON.stringify(e));t=t.replace(/\s+/g,"")+".";let a="";for(let e=0;ee[t])},pubfn.random=function(e,t,n){let i;if(pubfn.isNull(n))i=pubfn.randomFn(e,t);else{let a=0,r=1e5;do{a++,i=pubfn.randomFn(e,t)}while(n.indexOf(i)>-1&&ae){n+="0123456789"[i[e].charCodeAt()%10]}else n="0"+n;return n},pubfn.hidden=function(e="",t=0,n=0){let i=e.length-t-n,a="";for(let e=0;e-1&&(n=!0);return n},pubfn.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},pubfn.isObject=function(e){return"[object Object]"===Object.prototype.toString.call(e)},pubfn.calcFreights=function(e,t){return pubfn.calcFreightDetail(e,t).total_amount},pubfn.calcFreightDetail=function(e,t){let{first_weight:n,first_weight_price:i,continuous_weight:a,continuous_weight_price:r,max_weight:o}=e;o||(o=1e9);let s=t,u=0,l=o,c=!1,d=0;for(;t>0;)c?(d++,t-=a,l-=a):(c=!0,u++,l=o,t-=n,l-=n),l<=0&&(c=!1);let p=i*u+r*d;return{weight:s,first_weight:n,first_weight_price:i,first_weight_count:u,continuous_weight:a,continuous_weight_price:r,continuous_weight_count:d,first_weight_amount:u*i,continuous_weight_amount:r*d,total_amount:p,formula:`${i} * ${u} + ${r} * ${d} = ${p}`}},pubfn.getNewObject=function(e,t){let n=pubfn.copyObject(e),i={};if(t&&t.length>0)for(let e in t){let a=t[e];pubfn.isNotNull(n[a])&&(i[a]=n[a])}else i=n;return i},pubfn.deleteObjectKeys=function(e,t=[]){var n={};if(e)for(let i in e)-1==t.indexOf(i)&&(n[i]=e[i]);return n},pubfn.arrayToTree=pubfn.treeUtil.arrayToTree,pubfn.treeToArray=pubfn.treeUtil.treeToArray,pubfn.wildcardTestOne=function(e,t){if(!t)return!1;let n=t.replace(new RegExp("\\*"),"(.*)"),i=0!==t.indexOf("*")?"^":"",a="*"!==t[t.length-1]?"$":"";return new RegExp(i+n+a).test(e)},pubfn.wildcardTest=function(e,t){let n=0;if("string"==typeof t)pubfn.wildcardTestOne(e,t)&&n++;else if("object"==typeof t)for(let i=0;i0?l=r+"天":o>0?l=o+"小时":s>0?l=s+"分钟":u>0&&(l=u+"秒"),l+=t},pubfn.dateDiff2=function(e,t="1秒"){if(!e)return"";"string"!=typeof e||isNaN(e)||(e=Number(e)),"number"==typeof e&&(10==e.toString().length&&(e*=1e3),e=new Date(e),e=pubfn.timeFormat(e)),"string"==typeof e&&(e=e=e.replace("T"," "),e=new Date(e.replace(/-/g,"/")));var n=new Date,i=864e5,a=36e5,r=e.getTime()-n.getTime(),o=Math.floor(r/i),s=Math.floor(r%i/a),u=Math.floor(r%i%a/6e4),l=Math.round(r%i%a%6e4/1e3),c=t;return o>0?c=o+"天":s>0?c=s+"小时":u>0?c=u+"分钟":l>0&&(c=l+"秒"),c},pubfn.numStr=function(e){"string"==typeof e&&(e=parseFloat(e));var t=e;if(e<1e3)t=e;else if(e<1e4){t=Math.floor(e/100)/10+"千"}else if(e<1e6){t=Math.floor(e/1e3)/10+"万"}else if(e<1e7){t=Math.floor(e/1e6)+"百万"}else if(e<1e8){t=Math.floor(e/1e7)+"千万"}else if(e>=1e8){t=Math.floor(e/1e7)/10+"亿"}return t},pubfn.calcSize=function(e=0,t,n,i=2,a="auto"){let r=0,o="";if((e=parseFloat(e))parseObjectKeys(e,t)))}return e}pubfn.snake2camel=function(e){return e.replace(isSnakeCase,(e,t)=>t?t.toUpperCase():"")},pubfn.camel2snake=function(e){return e.replace(isCamelCase,e=>"_"+e.toLowerCase())},pubfn.snake2camelJson=function(e){return parseObjectKeys(e,"snake2camel")},pubfn.camel2snakeJson=function(e){return parseObjectKeys(e,"camel2snake")},pubfn.string2Number=function(e,t={}){switch(Object.prototype.toString.call(e).slice(8,-1).toLowerCase()){case"string":if(e&&!isNaN(e)){let{mobile:n=!0,idCard:i=!0,startFrom0:a=!0,maxLength:r=14}=t;return e.length>r||(n&&pubfn.test(e,"mobile")||i&&pubfn.test(e,"card")||a&&e.length>1&&0===e.indexOf("0")&&1!==e.indexOf("."))?e:Number(e)}return e;case"object":const n=Object.keys(e);for(let t=0;t-1&&(t=e.substring(n+1)),t},pubfn.checkFileSuffix=function(e,t){let n=!1,i=pubfn.getFileSuffix(e);for(let e=0;e-1){n=!0;break}return n},pubfn.splitArray=function(e,t){let n=[];for(let i=0;i-1){var o=a.indexOf('"',r),s=a.substring(r,o);if(o>r){var u=a.indexOf("---",o),l=a.substring(o+1,u).trim();n[s]=l}}}return n},pubfn.getPlatform=function(e){return"web"===e?e="h5":"app"===e&&(e="app-plus"),e},pubfn.getClientUAByContext=function(e={}){return e.ua||e.CLIENTUA},pubfn.getPlatformForUniId=function(e={}){let t=e.PLATFORM;if(t=pubfn.getPlatform(t),"h5"===t){pubfn.getClientUAByContext(e).toLowerCase().indexOf("micromessenger")>-1&&(t="h5-weixin")}return t},pubfn.getUniCloudContext=function(){let e;try{e=uniCloud.context}catch(e){}return e},pubfn.getUniCloudFunctionName=function(){let e;try{let t=pubfn.getUniCloudContext();e=t.FUNCTION_NAME||t.function_name}catch(e){}return e},pubfn.getUniCloudProvider=function(){let e;try{e=uniCloud.context.SPACEINFO.provider}catch(e){}return e},pubfn.getUniCloudRequestId=function(){let e;try{e=pubfn.getUniCloudContext().requestId}catch(e){}return e},pubfn.getUniIdConfig=function(e={},t,n){const i=e.uni;let a;if(pubfn.isArray(i)){let e=uniCloud.env&&uniCloud.env.APPID?uniCloud.env.APPID:uniCloud.$context.APPID;a=pubfn.getListItem(i,"dcloudAppid",e),pubfn.isNull(a)&&(a=pubfn.getListItem(i,"isDefaultConfig",!0))}else a=i;if(pubfn.isNotNull(t)){let e=pubfn.getData(a,t);return pubfn.isNull(e)?n:e}return a},pubfn.batchRun=async function(e){let{main:t,data:n=[],concurrency:i=50}=e;if(pubfn.isArray(t))return pubfn.batchRun2(e);let a=n.length,r=[];if(0==a)return{stack:r,total:a};if(1===i){for(let e=0;e=a)break;let u=t(n[s],s);e.push(u)}try{await Promise.all(e).then(e=>{r=r.concat(e)})}catch(e){console.error(e)}}return{stack:r,total:a}}},pubfn.batchRun2=async function(e){let{main:t,concurrency:n=100}=e,i=t.length,a=[];if(0==i)return{stack:a,total:i};if(1===n){for(let e=0;e=i)break;let s=(0,t[o])();e.push(s)}try{await Promise.all(e).then(e=>{a=a.concat(e)})}catch(e){console.error(e)}}return{stack:a,total:i}}},pubfn.randomAsync=async function(e,t,n,i=500){let a;if("function"==typeof n){let r=0;do{r++,a=pubfn.randomFn(e,t)}while(!await n(a)&&r0?(new Date).getTime()+1e3*n:0};dataCache[e]=i},util$5.del=function(e){delete dataCache[e]},util$5.clear=function(e){if(e)for(let t in dataCache)0==t.indexOf(e)&&delete dataCache[t];else dataCache={}},util$5.isExpired=function(e){let t=!0,n=dataCache[e];return n&&(0==n.expired||n.expired>(new Date).getTime())&&(t=!1),t},util$5.getAll=function(e){let t={};if(e)for(let n in dataCache)0==n.indexOf(e)&&(t[e]=dataCache[e]);else t=dataCache;for(let e in t)util$5.isExpired(e)&&(delete t[e],delete dataCache[e]);return t};var temporaryCache=util$5,globalDataCache={},util$6={},globalDataDao={};globalDataCache.init=function(e){globalDataDao=(util$6=e).vk.system.globalDataDao},globalDataCache.get=async function(e,t=0,n,i=!0){return"function"==typeof n?globalDataCache.autoGet(e,t,n,i):globalDataCache._get(e)},globalDataCache.autoGet=async function(e,t=0,n,i=!0){let a,{vk:r}=util$6;try{a=await globalDataCache._get(e),r.pubfn.isNull(a)&&"function"==typeof n&&(a=await n(),void 0!==a&&i&&await r.globalDataCache.set(e,a,t))}catch(e){return}return a},globalDataCache._get=async function(e){let t;try{let n=await globalDataDao.find(e);if(n){let{value:i,expired_at:a}=n;globalDataCache.isExpired(n)?await globalDataCache.del(e):t=i}}catch(e){return}return t},globalDataCache.set=async function(e,t,n=0,i){let a;e&&void 0!==e.key&&void 0!==e.value?(a=e.key,t=e.value,n=e.second,i=e.comment):a=e;let r={code:0,msg:"ok"};try{if(!a)return{code:-1,msg:"key值不能为空"};let e=n>0?(new Date).getTime()+1e3*n:0;r=await globalDataDao.set({key:a,value:t,expired_at:e,comment:i})}catch(e){return console.error(e),{code:-1,msg:"异常"}}return r},globalDataCache.del=async function(e){await globalDataDao.del(e)},globalDataCache.clear=async function(e){if(e)return await globalDataDao.deleteByWhere({key:new RegExp("^"+e)})},globalDataCache.list=async function(e){return await globalDataDao.list(e)},globalDataCache.count=async function(e){return await globalDataDao.count(e)},globalDataCache.isExpired=function(e){let t=!0;return e&&(!e.expired_at||0==e.expired_at||e.expired_at>(new Date).getTime())&&(t=!1),t},globalDataCache.inc=async function(e,t=1,n=0){let i;e&&void 0!==e.key&&void 0!==e.value?(i=e.key,t=e.value,n=e.second):i=e;let a={code:0,msg:"ok"};try{if(!i)return{code:-1,msg:"key值不能为空"};let e=n>0?(new Date).getTime()+1e3*n:0;a=await globalDataDao.inc({key:i,value:t,expired_at:e})}catch(e){return{code:-1,msg:"异常",err:e}}return a},globalDataCache.uniqueAdd=async function(e,t=1,n=5){let{vk:i}=util$6,a={code:0,msg:"ok"};try{if(!e)return{code:-1,msg:"key值不能为空"};let r=n>0?(new Date).getTime()+1e3*n:0;await i.globalDataCache.deleteExpired(e);a.id=await globalDataDao.add({key:e,value:t,expired_at:r})}catch(e){return console.error(e),{code:-1,msg:"异常"}}return a},globalDataCache.deleteExpired=async function(e){await globalDataDao.deleteExpired(e)};var globalDataCache_1=globalDataCache,util$7={aes:{}};const aesKey="5fb2cd73c7b53918728417c50762e6d45fb2cd73c7b53918728417c50762e6d4",AESMODE={AES192:"aes192",AES256ECB:"aes-256-ecb"};util$7.aes.MODE=AESMODE,util$7.aes.encrypt=function(e){let{data:t,key:n,mode:i=AESMODE.AES192}=e,a=uniCloud.vk,{crypto:r,config:o}=a.getUnicloud();if(n||(n=a.pubfn.getData(o.vk,"crypto.aes",aesKey)),"object"==typeof t&&(t=JSON.stringify(t)),i===AESMODE.AES256ECB)return encryptUseAes256Ecb(t,n);if(i===AESMODE.AES192)return encryptUseAes192(t,n);throw new Error(`msg:不支持 ${i} 加密算法`)},util$7.aes.decrypt=function(e){let{data:t,key:n,mode:i=AESMODE.AES192}=e,a=uniCloud.vk,{crypto:r,config:o}=a.getUnicloud();if(a.pubfn.isNull(t))throw new Error("msg:待解密原文不能为空");if(n||(n=a.pubfn.getData(o.vk,"crypto.aes",aesKey)),i===AESMODE.AES256ECB)return decryptUseAes256Ecb(t,n);if(i===AESMODE.AES192)return decryptUseAes192(t,n);throw new Error(`msg:不支持 ${i} 加密算法`)};var crypto=util$7;function encryptUseAes192(e,t){let n=uniCloud.vk,{crypto:i}=n.getUnicloud();const a=i.createCipher(AESMODE.AES192,t);let r=a.update(e,"utf8","hex");return r+=a.final("hex"),r}function decryptUseAes192(e,t){let n,i=uniCloud.vk,{crypto:a}=i.getUnicloud();try{const i=a.createDecipher(AESMODE.AES192,t);n=i.update(e,"hex","utf8"),n+=i.final("utf8");try{n=JSON.parse(n)}catch(e){}}catch(e){throw"msg:解密失败"}return n}function encryptUseAes256Ecb(e,t){let n=uniCloud.vk,{crypto:i}=n.getUnicloud(),a=Buffer.from(e),r=t;r.length>32&&(r=r.substring(0,32)),r=Buffer.from(r);const o=i.createCipheriv(AESMODE.AES256ECB,r,"");o.setAutoPadding(!1);const s=16-a.length%16,u=Buffer.alloc(s,s);a=Buffer.concat([a,u]);let l=o.update(a,null,"base64");return l+=o.final("base64"),l}function decryptUseAes256Ecb(e,t){let n=uniCloud.vk,{crypto:i}=n.getUnicloud(),a=t;a.length>32&&(a=a.substring(0,32)),a=Buffer.from(a);try{const t=i.createDecipheriv(AESMODE.AES256ECB,a,"");t.setAutoPadding(!1);let n=t.update(e,"base64");n+=t.final();const r=n.charCodeAt(n.length-1);n=n.slice(0,n.length-r);try{n=JSON.parse(n)}catch(e){}return n}catch(e){throw"解密失败"}}var alipay={},ALIPAY_ALGORITHM_MAPPING={RSA:"RSA-SHA1",RSA2:"RSA-SHA256"};alipay.sign=function(e,t,n){let i=JSON.parse(JSON.stringify(t)),a=Object.assign({method:e,app_id:n.appid,charset:n.charset||"utf-8",version:n.version||"1.0",sign_type:n.signType||"RSA2"},i);n.appCertSn&&n.alipayRootCertSn&&(a=Object.assign({app_cert_sn:n.appCertSn,alipay_root_cert_sn:n.alipayRootCertSn},a));const r=i.bizContent||i.biz_content;r&&(a.biz_content=JSON.stringify(r));const o=alipay.sortObj(a);let s=alipay.objectToUrl(o);const u="PKCS8"===(n.keyType||"PKCS8")?"PRIVATE KEY":"RSA PRIVATE KEY";let l=alipay.formatKey(n.privateKey,u);const c=crypto$1.createSign(ALIPAY_ALGORITHM_MAPPING[a.sign_type]).update(s,"utf8").sign(l,"base64");return Object.assign(o,{sign:c})},alipay.formatUrl=function(e,t="https://openapi.alipay.com/gateway.do"){let n=t;const i=["app_id","method","format","charset","sign_type","sign","timestamp","version","notify_url","return_url","auth_token","app_auth_token","ws_service_url"];for(const t in e)if(i.indexOf(t)>-1){const i=encodeURIComponent(e[t]);n=`${n}${n.includes("?")?"&":"?"}${t}=${i}`,delete e[t]}return{execParams:e,url:n}},alipay.sortObj=function(e){new Array;let t=Object.keys(e).sort(),n={};for(let i in t)n[t[i]]=e[t[i]];return n},alipay.objectToUrl=function(e){let t="";for(let n in e)e[n]&&(t+=`&${n}=${e[n]}`);return t&&(t=t.substring(1)),t},alipay.formatKey=function(e,t){return`-----BEGIN ${t}-----\n${e}\n-----END ${t}-----`},alipay.getRequestRes=function(e,t){return e[t.replace(new RegExp("\\.","g"),"_")+"_response"]||e.error_response};var util$8=alipay,alipay$1={},util$9={};const serviceUrl="https://openapi.alipay.com/gateway.do",configKey="mp-alipay.oauth.alipay";function returnRes(e){return e.code=e.sub_code||e.code||0,e.msg=e.sub_msg||e.msg||"",e}alipay$1.init=function(e){util$9=e},alipay$1.getConfig=function(){let{vk:e,config:t}=util$9;return e.pubfn.getUniIdConfig(t)},alipay$1.request=async function(e={}){let{vk:t}=util$9,{method:n,data:i={},successText:a}=e,r=alipay$1.auth.getAppidInfo(e),o=Date.now(),s={timestamp:t.pubfn.timeFormat(o,"yyyy-MM-dd hh:mm:ss"),...i};const u=util$8.sign(n,s,r),{url:l,execParams:c}=util$8.formatUrl(u,serviceUrl);let d=await t.request({url:l,method:"POST",data:c}),p=await util$8.getRequestRes(d,n);return p.code&&"10000"!==p.code||(p.code=0,p.msg=a),p=returnRes(p),p},alipay$1.auth={},alipay$1.auth.getAppidInfo=function(e={}){let{appid:t,privateKey:n}=e,{vk:i,config:a}=util$9;const r=alipay$1.getConfig();if(t){if(!n){let e=i.pubfn.getData(a,"vk.oauth.alipay.list")||[],r=i.pubfn.getListItem(e,"appid",t)||{};if(t=r.appid,n=r.privateKey,i.pubfn.isNullOne(t,n))throw console.log("config",e),new Error(`你使用了多小程序登录模式,但未找到${t}对应的 privateKey 请先在 uni-config-center/vk-unicloud/index.js 中配置支付宝小程序(vk.oauth.alipay.list)的appid和privateKey`)}}else{let e=i.pubfn.getData(r,configKey)||{};if(t=e.appid,n=e.privateKey,i.pubfn.isNullOne(t,n))throw console.log("config",r),new Error(`请先在 uni-config-center/uni-id/config.json 中配置支付宝小程序(${configKey})的appid和privateKey`)}return{appid:t,privateKey:n}},alipay$1.auth.code2Session=async function(e={}){let{vk:t,uniID:n}=util$9,{platform:i,needKey:a=!1}=e;i||(i="mp-alipay");let r=await alipay$1.auth.code2SessionMp(e);try{let e=t.crypto.aes.encrypt({data:r});r.encryptedKey=e}catch(e){}return a||(delete r.sessionKey,delete r.accessToken,delete r.refreshToken),delete r.privateKey,r.platform=i,r.openid=r.userId,r},alipay$1.auth.code2SessionMp=async function(e={}){let{appid:t}=alipay$1.auth.getAppidInfo(e),n=e.code||e.js_code,{vk:i}=util$9,a=await alipay$1.request({method:"alipay.system.oauth.token",data:{code:n,grant_type:"authorization_code"}});return{...i.pubfn.snake2camelJson(a),appid:t,code:0,msg:"ok"}},alipay$1.security={},alipay$1.security.msgSecCheck=async function(e={}){return{code:-1,msg:"支付宝未提供此API"}},alipay$1.security.imgSecCheck=async function(e={}){return{code:-1,msg:"支付宝未提供此API"}},alipay$1.acode={},alipay$1.acode.getMiniCode=async function(e={}){let{page:t,scene:n="miniCode=1",line_color:i}=e,a={url_param:t,query_param:n,describe:"推广",color:i};return await alipay$1.request({method:"alipay.open.app.qrcode.create",data:{biz_content:a},successText:"生成成功"})},alipay$1.subscribeMessage={},alipay$1.subscribeMessage.send=async function(e={}){let{touser:t,form_id:n,template_id:i,page:a,data:r}=e,{appid:o}=alipay$1.auth.getAppidInfo(e),s={to_user_id:t,form_id:n,user_template_id:i,page:a,data:r};return await alipay$1.request({method:"alipay.open.app.mini.templatemessage.send",data:{biz_content:s},successText:"发送成功"})};var alipay_1=alipay$1,baidu={},util$a={};baidu.init=function(e){util$a=e},baidu.open={},baidu.open.auth={},baidu.open.auth.getAppidInfo=function(e={}){let{appid:t,appsecret:n}=e,{vk:i,config:a}=util$a;if(!t){let e=i.pubfn.getData(a,"vk.service.openapi.baidu")||{};t=e.appid,n=e.appsecret}if(i.pubfn.isNullOne(t,n))throw new Error("请在uniCloud/cloudfunctions/common/uni-config-center/vk-unicloud/index.js中配置并检查百度开放平台的appid和appsecret是否正确,参数路径:vk.service.openapi.baidu");return{appid:t,appsecret:n}},baidu.open.auth.getAccessTokenFn=async function(e={}){let{appid:t,appsecret:n}=baidu.open.auth.getAppidInfo(e),{vk:i,config:a}=util$a,r=await i.request({url:`https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=${t}&client_secret=${n}`,method:"GET"});return r.error_code?(console.error("getAccessToken失败:",r),{code:r.error_code,msg:r.error_msg,err:r}):{...r,code:0,msg:"ok"}},baidu.open.auth.getAccessToken=async function(e={}){let t,{appid:n,appsecret:i}=baidu.open.auth.getAppidInfo(e),{cache:a=!0}=e,{vk:r}=util$a,o="openapi-baidu-"+n;if(a&&(t=await r.globalDataCache.get(o)),r.pubfn.isNull(t)){let n=await baidu.open.auth.getAccessTokenFn(e);0===n.code&&(t=n.access_token,await r.globalDataCache.set(o,t,n.expires_in-3600),await r.globalDataCache.deleteExpired())}return t},baidu.open.ocr={},baidu.open.ocr.business_license=async function(e={}){let{image:t,url:n}=e;return await baidu.open.request({...e,action:"ocr/v1/business_license",actionVersion:"2.0",data:{image:t,url:n}})},baidu.open.ocr.idcard=async function(e={}){let{image:t,url:n,id_card_side:i,detect_risk:a,detect_photo:r}=e;return await baidu.open.request({...e,action:"ocr/v1/idcard",actionVersion:"2.0",data:{image:t,url:n,id_card_side:i,detect_risk:a,detect_photo:r}})},baidu.open.request=async function(e={}){let{vk:t}=util$a,n=await baidu.open.auth.getAccessToken(e);if(!n)return{code:-1,msg:"获取access_token失败,请检查vk-unicloud配置下vk.service.openapi.baidu配置的appid和appsecret是否正确"};let{action:i,actionVersion:a="2.0",header:r={"content-type":"application/x-www-form-urlencoded"},data:o}=e,s=await t.request({url:`https://aip.baidubce.com/rest/${a}/${i}?access_token=${n}`,method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},data:o});return s.error_code?{code:s.error_code,msg:s.error_msg,err:s}:{...s,code:0,msg:"ok"}};var baidu_1=baidu,douyin={},util$b={};const serviceUrl$1="https://developer.toutiao.com",configKey$1="mp-toutiao.oauth.toutiao";function returnRes$1(e){return e.code=e.err_no||0,e.msg=e.err_tips||"",e}douyin.init=function(e){util$b=e},douyin.getConfig=function(){let{vk:e,config:t}=util$b;return e.pubfn.getUniIdConfig(t)},douyin.request=async function(e={}){let{vk:t}=util$b,{url:n,data:i={}}=e,{appid:a,appsecret:r}=douyin.auth.getAppidInfo(e);if(!0===i.access_token){let t=await douyin.auth.getAccessToken(e);if(!t)return{code:-1,msg:`获取access_token失败,请检查uni-id配置${configKey$1}配置下的appid和appsecret是否正确`};i.access_token=t}-1===n.indexOf("http")&&(n=`${serviceUrl$1}/${n}`);let o=await t.request({contentType:"json",dataType:"json",...e,url:n});return o=returnRes$1(o),o},douyin.auth={},douyin.auth.getAppidInfo=function(e={}){let{appid:t,appsecret:n}=e,{vk:i,config:a}=util$b;const r=douyin.getConfig();if(t){if(!n){let e=i.pubfn.getData(a,"vk.oauth.toutiao.list")||[],r=i.pubfn.getListItem(e,"appid",t)||{};if(t=r.appid,n=r.appsecret,i.pubfn.isNullOne(t,n))throw console.log("config",e),new Error(`你使用了多小程序登录模式,但未找到${t}对应的 appsecret 请先在 uni-config-center/vk-unicloud/index.js 中配置抖音小程序(vk.oauth.toutiao.list)的appid和appsecret`)}}else{let e=i.pubfn.getData(r,configKey$1)||{};if(t=e.appid,n=e.appsecret,i.pubfn.isNullOne(t,n))throw console.log("config",r),new Error(`请先在 uni-config-center/uni-id/config.json 中配置抖音小程序(${configKey$1})的appid和appsecret`)}return{appid:t,appsecret:n}},douyin.auth.getAccessTokenFn=async function(e={}){let{appid:t,appsecret:n}=douyin.auth.getAppidInfo(e),{vk:i,config:a}=util$b,r=await i.request({url:serviceUrl$1+"/api/apps/v2/token",method:"POST",data:{appid:t,secret:n,grant_type:"client_credential"},contentType:"json",dataType:"json"});return r.err_no?(console.error("getAccessToken失败:",r),{code:r.err_no,msg:r.err_tips,err:r}):{code:0,msg:"ok",access_token:r.data.access_token,expires_in:r.data.expires_in}},douyin.auth.getAccessToken=async function(e={}){let t,{appid:n,appsecret:i}=douyin.auth.getAppidInfo(e),{cache:a=!0}=e,{vk:r}=util$b,o="mp-toutiao-access_token-"+n;if(a&&(t=await r.globalDataCache.get(o)),r.pubfn.isNull(t)){let n=await douyin.auth.getAccessTokenFn(e);0===n.code&&(t=n.access_token,await r.globalDataCache.set(o,t,240),await r.globalDataCache.deleteExpired())}return t},douyin.auth.code2Session=async function(e={}){let{vk:t,uniID:n}=util$b,{platform:i,needKey:a=!1}=e;i||(i="mp-toutiao");let r=await douyin.auth.code2SessionMp(e);try{let e=t.crypto.aes.encrypt({data:r});r.encryptedKey=e}catch(e){}return a||(delete r.sessionKey,delete r.accessToken,delete r.refreshToken),delete r.appsecret,r.platform=i,r},douyin.auth.code2SessionMp=async function(e={}){let{appid:t,appsecret:n}=douyin.auth.getAppidInfo(e),i=e.code||e.js_code,a=e.anonymousCode,{vk:r}=util$b,o=await douyin.request({url:"api/apps/v2/jscode2session",method:"POST",data:{appid:t,secret:n,code:i,anonymous_code:a}});return o.code?(40018!==o.code&&40019!==o.code||(o.msg="无效code,请重新获取"),o):{...r.pubfn.snake2camelJson(o.data),appid:t,appsecret:n,code:0,msg:"ok"}},douyin.security={},douyin.security.msgSecCheck=async function(e={}){let{content:t,tasks:n}=e,{appid:i,appsecret:a}=douyin.auth.getAppidInfo(e),r=await douyin.auth.getAccessToken(e);if(!r)return{code:-1,msg:`获取access_token失败,请检查uni-id配置${configKey$1}配置下的appid和appsecret是否正确`};n||(n=[{content:t}]);let o=await douyin.request({url:"api/v2/tags/text/antidirt",method:"POST",header:{"X-Token":r},data:{tasks:n}});try{let e,t;o.data.map((n,i)=>{n.predicts.map((n,a)=>{n.hit&&(e||(e=!0,t=i))})}),e?(o.taskIndex=t,o.code=87014):o.code=0}catch(e){}return 40001===o.code&&(o.msg="access_token错误"),87014===o.code&&(o.msg="内容含有违法违规内容,请检查!"),0===o.code&&(o.msg="ok"),o},douyin.security.imgSecCheck=async function(e={}){let{image:t,access_token:n=!0}=e,i=e.base64||e.image_data,{appid:a,appsecret:r}=douyin.auth.getAppidInfo(e);if(i){let e=i.indexOf("base64,");e>-1&&(i=i.substring(e+"base64,".length))}let o=await douyin.request({url:"api/apps/censor/image",method:"POST",data:{app_id:a,access_token:n,image:t,image_data:i}});try{let e;o.predicts.map((t,n)=>{t.hit&&(e=!0)}),o.code=e?87014:0}catch(e){}return 87014===o.code&&(o.msg="内容含有违法违规内容,请检查!"),0===o.code&&(o.msg="ok"),o},douyin.acode={},douyin.acode.getMiniCode=async function(e={}){let{path:t,appname:n="douyin",width:i,line_color:a,background:r,set_icon:o,access_token:s=!0}=e,{appid:u,appsecret:l}=douyin.auth.getAppidInfo(e),c=await douyin.request({url:"api/apps/qrcode",method:"POST",data:{access_token:s,appname:n,path:t,width:i,line_color:a,background:r,set_icon:o},dataType:"default",useContent:!0,header:{"content-type":"application/json;charset=utf8"}});if(c.length<500){let e=c.toString();try{return e=JSON.parse(e),{code:e.errcode,msg:e.errmsg}}catch(e){}return{code:-1,err:err}}return c},douyin.subscribeMessage={},douyin.subscribeMessage.send=async function(e={}){let{touser:t,template_id:n,page:i,data:a,access_token:r=!0}=e,{appid:o,appsecret:s}=douyin.auth.getAppidInfo(e);return await douyin.request({url:"api/apps/subscribe_notification/developer/v1/notify",method:"POST",data:{access_token:r,app_id:o,tpl_id:n,open_id:t,data:a,page:i}})};var douyin_1=douyin,qq={},util$c={};const serviceUrl$2="https://api.q.qq.com",configKey$2="mp-qq.oauth.qq";function returnRes$2(e){return e.code=e.errcode||e.errCode||0,e.msg=e.errmsg||e.errMsg||"",e}qq.init=function(e){util$c=e},qq.getConfig=function(){let{vk:e,config:t}=util$c;return e.pubfn.getUniIdConfig(t)},qq.request=async function(e={}){let{vk:t}=util$c,{url:n,method:i,data:a={}}=e;if(-1===n.indexOf("http")&&(n=`${serviceUrl$2}/${n}`),!0===a.access_token){delete a.access_token;let t=await qq.auth.getAccessToken(e);if(!t)return{code:-1,msg:"获取access_token失败,请检查uni-id配置下的mp-qq配置的appid和appsecret是否正确"};n+=-1===n.indexOf("?")?"?":"&",n+="access_token="+t}let r=await t.request({...e,url:n});return r=returnRes$2(r),r},qq.auth={},qq.auth.getAppidInfo=function(e={}){let{appid:t,appsecret:n}=e,{vk:i,config:a}=util$c;const r=qq.getConfig();if(t){if(!n){let e=i.pubfn.getData(a,"vk.oauth.qq.list")||[],r=i.pubfn.getListItem(e,"appid",t)||{};if(t=r.appid,n=r.appsecret,i.pubfn.isNullOne(t,n))throw console.log("config",e),new Error(`你使用了多小程序登录模式,但未找到${t}对应的 appsecret 请先在 uni-config-center/vk-unicloud/index.js 中配置QQ小程序(vk.oauth.qq.list)的appid和appsecret`)}}else{let e=i.pubfn.getData(r,configKey$2)||{};if(t=e.appid,n=e.appsecret,i.pubfn.isNullOne(t,n))throw console.log("config",r),new Error("请先在 uni-config-center/uni-id/config.json 中配置QQ小程序(mp-qq.oauth.qq)的appid和appsecret")}return{appid:t,appsecret:n}},qq.auth.getAccessTokenFn=async function(e={}){let{appid:t,appsecret:n}=qq.auth.getAppidInfo(e),{vk:i,config:a}=util$c,r=await i.request({url:`https://api.q.qq.com/api/getToken?grant_type=client_credential&appid=${t}&secret=${n}`,method:"GET"});return r.errcode?(console.error("getAccessToken失败:",r),{code:r.errcode,msg:r.errmsg,err:r}):{code:0,msg:"ok",access_token:r.access_token,expires_in:r.expires_in}},qq.auth.getAccessToken=async function(e={}){let t,{appid:n,appsecret:i}=qq.auth.getAppidInfo(e),{cache:a=!0}=e,{vk:r}=util$c,o="mp-qq-access_token-"+n;if(a&&(t=await r.globalDataCache.get(o)),r.pubfn.isNull(t)){let n=await qq.auth.getAccessTokenFn(e);0===n.code&&(t=n.access_token,await r.globalDataCache.set(o,t,240),await r.globalDataCache.deleteExpired())}return t},qq.auth.code2Session=async function(e={}){let{vk:t,uniID:n}=util$c,{platform:i,needKey:a=!1}=e;i||(i="mp-qq");let r=await qq.auth.code2SessionMpWeixin(e);try{let e=t.crypto.aes.encrypt({data:r});r.encryptedKey=e}catch(e){}return a||(delete r.sessionKey,delete r.accessToken,delete r.refreshToken),delete r.appsecret,r.platform=i,r},qq.auth.code2SessionMpWeixin=async function(e={}){let{appid:t,appsecret:n}=qq.auth.getAppidInfo(e),i=e.code||e.js_code,{vk:a}=util$c,r=await qq.request({url:`sns/jscode2session?appid=${t}&secret=${n}&js_code=${i}&grant_type=authorization_code`,method:"GET"});return r.code?(-101600007===r.code&&(r.msg="appid错误"),-101222100===r.code&&(r.msg="appsecret错误"),-2100===r.code&&(r.msg="无效code,请重新获取"),r):(r=a.pubfn.snake2camelJson(r),{appid:t,appsecret:n,...r,code:0,msg:"ok"})},qq.security={},qq.security.msgSecCheck=async function(e={}){let{content:t,access_token:n=!0}=e,{appid:i,appsecret:a}=qq.auth.getAppidInfo(e),r=await qq.request({url:"api/json/security/MsgSecCheck",method:"POST",data:{access_token:n,appid:i,content:t}});return 40001===r.code&&(r.msg="access_token错误"),87014===r.code&&(r.msg="内容含有违法违规内容,请检查!"),r},qq.security.imgSecCheck=async function(e={}){let{vk:t}=util$c,{dataBuffer:n,formData:i,base64:a}=e,{appid:r,appsecret:o}=qq.auth.getAppidInfo(e),s=await qq.auth.getAccessToken(e);if(!s)return{code:-1,msg:"获取access_token失败,请检查uni-id配置下的mp-qq配置的appid和appsecret是否正确"};if(a&&!n){let e="base64,",t=a.indexOf(e);t>-1&&(a=a.substring(t+e.length)),n=new Buffer(a,"base64")}n&&!i&&(i=new t.formDataUtil.FormData,i.append("appid",r),i.append("media",n,{filename:Date.now()+".png",contentType:"image/png"}));let u=await qq.request({url:"api/json/security/ImgSecCheck?access_token="+s,content:i.getBuffer(),headers:i.getHeaders()});switch(u.code){case 40001:u.msg="access_token错误";break;case 87014:u.msg="图片内容含有违法违规内容,请检查!";break;case 40006:u.msg="图片大小不能超过1M"}return u},qq.acode={},qq.acode.getMiniCode=async function(e={}){let{path:t,access_token:n=!0}=e,{appid:i,appsecret:a}=qq.auth.getAppidInfo(e),r=await qq.request({url:"api/json/qqa/CreateMiniCode",method:"POST",data:{access_token:n,appid:i,path:t},dataType:"default",useContent:!0,header:{"content-type":"application/json;charset=utf8"}});if(r.length<500){let e=r.toString();try{e=JSON.parse(e)}catch(e){}return r=returnRes$2(e),40001===r.code&&(r.msg="access_token错误"),41030===r.code&&(r.msg="小程序页面不存在!"),r}return r},qq.subscribeMessage={},qq.subscribeMessage.send=async function(e={}){let{vk:t}=util$c,{touser:n,template_id:i,page:a,data:r,emphasis_keyword:o,oac_appid:s,use_robot:u}=e,l=await qq.auth.getAccessToken(e);if(!l)return{code:-1,msg:"获取access_token失败,请检查uni-id配置下的mp-qq配置的appid和appsecret是否正确"};let c=await t.request({url:`${serviceUrl$2}/api/json/subscribe/SendSubscriptionMessage?access_token=${l}`,method:"POST",data:{touser:n,template_id:i,page:a,data:r,emphasis_keyword:o,oac_appid:s,use_robot:u},useContent:!0,header:{"content-type":"application/json;charset=utf8"}});switch(c=returnRes$2(c),c.code){case 40003:c.msg="touser字段openid为空或者不正确";break;case 40037:c.msg="订阅模板id为空不正确";break;case 43101:c.msg="用户未订阅该消息";break;case 40036:c.msg="您的小程序不支持发送长期订阅消息";break;case 47003:c.msg="模板参数不准确,可能为空或者不满足规则,errmsg会提示具体是哪个字段出错";break;case 41030:c.msg="page路径不正确,需要保证在现网版本小程序中存在"}return c};var qq_1=qq,weixin={},util$d={};function returnRes$3(e){return e.code=e.errcode||0,e.msg=e.errmsg||"",e}weixin.init=function(e){util$d=e},weixin.getConfig=function(){let{vk:e,config:t}=util$d;return e.pubfn.getUniIdConfig(t)},weixin.request=async function(e={}){let{vk:t}=util$d,{url:n,method:i,data:a,access_token:r}=e;if(r||(r=await weixin.auth.getAccessToken(e)),!r)return{code:-1,msg:"获取access_token失败,请检查uni-id配置下的mp-weixin配置的appid和appsecret是否正确"};-1===n.indexOf("http")&&(n="https://api.weixin.qq.com/"+n),i||(i=t.pubfn.isNull(a)?"GET":"POST"),i&&"POST"===i.toUpperCase()&&void 0===e.useContent&&(e.useContent=!0),n+=-1===n.indexOf("?")?"?":"&",n+="access_token="+r;let o=await t.request({...e,url:n});return o=returnRes$3(o),o},weixin.decrypt={},weixin.decrypt.getPhoneNumber=async function(e={}){let{vk:t}=util$d,{code:n}=e;if(!n&&e.encryptedData)return await weixin.decrypt.getPhoneNumberByEncryptedData(e);let i={code:0,msg:"ok"},a=t.pubfn.isNullOneByObject({code:n});if(a)return{code:-1,msg:a+"不能为空"};let r=await t.openapi.weixin.request({method:"POST",url:"wxa/business/getuserphonenumber",data:{code:n}});return 0!==r.code?r:(i.data=r.phone_info,i.phone=i.data.phoneNumber,i.mobile=i.data.phoneNumber,i)},weixin.decrypt.getPhoneNumberByEncryptedData=async function(e={}){let t,{vk:n}=util$d,{encryptedData:i,iv:a,sessionKey:r,encryptedKey:o,code:s}=e,u={code:0,msg:"ok"},l=n.pubfn.isNullOneByObject({encryptedData:i,iv:a});if(l)return{code:-1,msg:l+"不能为空"};if(o){let e=n.crypto.aes.decrypt({data:o});t=e.appid,r=e.sessionKey}else{t=weixin.auth.getAppidInfo(e).appid}return u.data=weixin.decrypt.decryptData({appid:t,encryptedData:i,iv:a,sessionKey:r}),u.phone=u.data.phoneNumber,u.mobile=u.data.phoneNumber,u},weixin.decrypt.decryptData=function(e={}){let t,{appid:n,encryptedData:i,iv:a,sessionKey:r}=e,{vk:o,crypto:s}=util$d,u=new Buffer(r,"base64"),l=new Buffer(i,"base64"),c=new Buffer(a,"base64");try{let e=s.createDecipheriv("aes-128-cbc",u,c);e.setAutoPadding(!0),t=e.update(l,"binary","utf8"),t+=e.final("utf8"),t=JSON.parse(t)}catch(e){throw new Error(e)}return t.watermark.appid!==n?{code:-1,msg:"appid不一致"}:t},weixin.auth={},weixin.auth.getAppidInfo=function(e={}){let{appid:t,appsecret:n}=e,{vk:i,config:a}=util$d;const r=weixin.getConfig();if(t){if(!n){let e=i.pubfn.getData(a,"vk.oauth.weixin.list")||[],r=i.pubfn.getListItem(e,"appid",t)||{};if(t=r.appid,n=r.appsecret,i.pubfn.isNullOne(t,n))throw console.log("config",e),new Error(`你使用了多小程序登录模式,但未找到${t}对应的 appsecret 请先在 uni-config-center/vk-unicloud/index.js 中配置微信小程序(vk.oauth.weixin.list)的appid和appsecret`)}}else{let e=i.pubfn.getData(r,"mp-weixin.oauth.weixin")||{};if(t=e.appid,n=e.appsecret,i.pubfn.isNullOne(t,n))throw console.log("config",r),new Error("请先在 uni-config-center/uni-id/config.json 中配置微信小程序(mp-weixin)的appid和appsecret")}return{appid:t,appsecret:n}},weixin.auth.getAccessTokenFn=async function(e={}){let{appid:t,appsecret:n}=weixin.auth.getAppidInfo(e),{vk:i,config:a}=util$d,r=await i.request({url:`https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${t}&secret=${n}`,method:"GET"});return r.errcode?(console.error("getAccessToken失败:",r),{code:r.errcode,msg:r.errmsg,err:r}):{code:0,msg:"ok",access_token:r.access_token,expires_in:r.expires_in}},weixin.auth.getAccessToken=async function(e={}){let t,{appid:n,appsecret:i}=weixin.auth.getAppidInfo(e),{cache:a=!0}=e,{vk:r}=util$d,o="mp-weixin-"+n;if(a&&(t=await r.globalDataCache.get(o)),r.pubfn.isNull(t)){let n=await weixin.auth.getAccessTokenFn(e);0===n.code&&(t=n.access_token,await r.globalDataCache.set(o,t,240),await r.globalDataCache.deleteExpired())}return t},weixin.auth.code2Session=async function(e={}){let t,{vk:n,uniID:i}=util$d,{platform:a,context:r,needKey:o=!1}=e;a||(a=n.pubfn.getPlatformForUniId(r)||"mp-weixin"),t="mp-weixin"===a?await weixin.auth.code2SessionMpWeixin(e):"h5-weixin"===a?await weixin.h5.auth.code2Session(e):await i.code2SessionWeixin(e);try{let e=n.crypto.aes.encrypt({data:t});t.encryptedKey=e}catch(e){}return o||(delete t.sessionKey,delete t.accessToken,delete t.refreshToken),delete t.appsecret,t.platform=a,t},weixin.auth.code2SessionMpWeixin=async function(e={}){let{appid:t,appsecret:n}=weixin.auth.getAppidInfo(e),i=e.code||e.js_code,{vk:a}=util$d,r=await a.request({url:`https://api.weixin.qq.com/sns/jscode2session?appid=${t}&secret=${n}&js_code=${i}&grant_type=authorization_code`,method:"GET"});if(r.errcode){let e=r.errmsg;return 40163===r.errcode&&(e="该code已被使用,请重新获取"),40029===r.errcode&&(e="无效code,请重新获取"),{...r,code:r.errcode,msg:e}}return r=a.pubfn.snake2camelJson(r),{appid:t,appsecret:n,...r,code:0,msg:"ok"}},weixin.wxacode={},weixin.wxacode.getUnlimited=async function(e={}){let{vk:t}=util$d,{access_token:n,page:i,scene:a,check_path:r,env_version:o,width:s,auto_color:u,line_color:l,is_hyaline:c}=e;if(n||(n=await weixin.auth.getAccessToken(e)),!n)return{code:-1,msg:"获取access_token失败,请检查uni-id配置下的mp-weixin配置的appid和appsecret是否正确"};let d=await t.request({url:"https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token="+n,method:"POST",data:{page:i,scene:a,check_path:r,env_version:o,width:s,auto_color:u,line_color:l,is_hyaline:c},dataType:"default",useContent:!0,headers:{encoding:null}});if(d.length<500){let e=d.toString();try{e=JSON.parse(e)}catch(e){}return d=returnRes$3(e),40001===d.code&&(d.msg="access_token错误"),41030===d.code&&(d.msg="小程序页面不存在!"),d}return Buffer.isBuffer(d)?d:returnRes$3(d)},weixin.urlscheme={},weixin.urlscheme.generate=async function(e={}){let{vk:t}=util$d,{access_token:n,jump_wxa:i,is_expire:a,expire_time:r,expire_type:o,expire_interval:s}=e;if(n||(n=await weixin.auth.getAccessToken(e)),!n)return{code:-1,msg:"获取access_token失败,请检查uni-id配置下的mp-weixin配置的appid和appsecret是否正确"};let u=await t.request({url:"https://api.weixin.qq.com/wxa/generatescheme?access_token="+n,method:"POST",data:{jump_wxa:i,is_expire:a,expire_time:r,expire_type:o,expire_interval:s},useContent:!0});return u=returnRes$3(u),40001===u.code&&(u.msg="access_token错误"),40165===u.code&&(u.msg="小程序页面不存在!"),u},weixin.urllink={},weixin.urllink.generate=async function(e={}){let{vk:t}=util$d,{access_token:n,path:i,query:a,is_expire:r,expire_type:o,expire_time:s,expire_interval:u,cloud_base:l,env_version:c}=e;if(n||(n=await weixin.auth.getAccessToken(e)),!n)return{code:-1,msg:"获取access_token失败,请检查uni-id配置下的mp-weixin配置的appid和appsecret是否正确"};let d=await t.request({url:"https://api.weixin.qq.com/wxa/generate_urllink?access_token="+n,method:"POST",data:{path:i,query:a,is_expire:r,expire_type:o,expire_time:s,expire_interval:u,cloud_base:l,env_version:c},useContent:!0});return d=returnRes$3(d),40001===d.code&&(d.msg="access_token错误"),40165===d.code&&(d.msg="小程序页面不存在!"),d},weixin.security={},weixin.security.msgSecCheck=async function(e={}){let{vk:t}=util$d,{content:n,version:i,scene:a,openid:r,title:o,nickname:s,signature:u}=e,l=await weixin.auth.getAccessToken(e);if(!l)return{code:-1,msg:"获取access_token失败,请检查uni-id配置下的mp-weixin配置的appid和appsecret是否正确"};let c=await t.request({url:"https://api.weixin.qq.com/wxa/msg_sec_check?access_token="+l,method:"POST",data:{content:n,version:i,scene:a,openid:r,title:o,nickname:s,signature:u},useContent:!0});return c=returnRes$3(c),40001===c.code&&(c.msg="access_token错误"),87014===c.code&&(c.msg="内容含有违法违规内容,请检查!"),2===i&&c.result&&100!==c.result.label&&(c.code=c.result.label,c.msg="内容含有违法违规内容,请检查!"),c},weixin.security.imgSecCheck=async function(e={}){let{vk:t}=util$d,{dataBuffer:n,formData:i,base64:a}=e,r=await weixin.auth.getAccessToken(e);if(!r)return{code:-1,msg:"获取access_token失败,请检查uni-id配置下的mp-weixin配置的appid和appsecret是否正确"};if(a&&!n){let e="base64,",t=a.indexOf(e);t>-1&&(a=a.substring(t+e.length)),n=new Buffer(a,"base64")}n&&!i&&(i=new t.formDataUtil.FormData,i.append("media",n,{filename:Date.now()+".png",contentType:"image/png"}));let o=await t.request({url:"https://api.weixin.qq.com/wxa/img_sec_check?access_token="+r,content:i.getBuffer(),headers:i.getHeaders()});switch(o=returnRes$3(o),o.code){case 40001:o.msg="access_token错误";break;case 87014:o.msg="图片内容含有违法违规内容,请检查!";break;case 40006:o.msg="图片大小不能超过1M"}return o},weixin.riskControl={},weixin.riskControl.getUserRiskRank=async function(e={}){let{vk:t}=util$d,{appid:n,openid:i,scene:a,mobile_no:r,client_ip:o,email_address:s,extended_info:u,is_test:l}=e,c=await weixin.auth.getAccessToken(e);if(!c)return{code:-1,msg:"获取access_token失败,请检查uni-id配置下的mp-weixin配置的appid和appsecret是否正确"};let d=await t.request({url:"https://api.weixin.qq.com/wxa/getuserriskrank?access_token="+c,method:"POST",data:{appid:n,openid:i,scene:a,mobile_no:r,client_ip:o,email_address:s,extended_info:u,is_test:l},useContent:!0});return d=returnRes$3(d),40001===d.code&&(d.msg="access_token错误"),d},weixin.subscribeMessage={},weixin.subscribeMessage.send=async function(e={}){let{vk:t}=util$d,{touser:n,template_id:i,page:a,data:r,miniprogram_state:o="formal",lang:s="zh_CN"}=e,u=await weixin.auth.getAccessToken(e);if(!u)return{code:-1,msg:"获取access_token失败,请检查uni-id配置下的mp-weixin配置的appid和appsecret是否正确"};let l=await t.request({url:"https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token="+u,method:"POST",data:{touser:n,template_id:i,page:a,data:r,miniprogram_state:o,lang:s},useContent:!0});switch(l=returnRes$3(l),l.code){case 40003:l.msg="touser字段openid为空或者不正确";break;case 40037:l.msg="订阅模板id为空不正确";break;case 43101:l.msg="用户未订阅该消息";break;case 47003:l.msg="模板参数不准确,可能为空或者不满足规则,errmsg会提示具体是哪个字段出错";break;case 41030:l.msg="page路径不正确,需要保证在现网版本小程序中存在"}return l},weixin.uniformMessage={},weixin.uniformMessage.send=async function(e={}){let{vk:t}=util$d,{appid:n,touser:i,template_appid:a,template_id:r,url:o,miniprogram:s,data:u}=e,l=await weixin.auth.getAccessToken(e);if(!l)return{code:-1,msg:"获取access_token失败,请检查uni-id配置下的mp-weixin配置的appid和appsecret是否正确"};if(!a){a=weixin.h5.auth.getAppidInfo({appid:a}).appid}let c=await t.request({url:"https://api.weixin.qq.com/cgi-bin/message/wxopen/template/uniform_send?access_token="+l,method:"POST",data:{touser:i,mp_template_msg:{appid:a,template_id:r,url:o,miniprogram:s,data:u}},useContent:!0});switch(c=returnRes$3(c),c.code){case 40003:c.msg="touser字段openid为空或者不正确";break;case 40037:c.msg="订阅模板id为空不正确";break;case 43101:c.msg="用户未订阅该消息";break;case 47003:c.msg="模板参数不准确,可能为空或者不满足规则,errmsg会提示具体是哪个字段出错";break;case 41030:c.msg="page路径不正确,需要保证在现网版本小程序中存在"}return c},weixin.livebroadcast={},weixin.livebroadcast.getLiveInfo=async function(e={}){let{vk:t}=util$d,{pageIndex:n=1,pageSize:i=100}=e,a=await weixin.auth.getAccessToken(e);if(!a)return{code:-1,msg:"获取access_token失败,请检查uni-id配置下的mp-weixin配置的appid和appsecret是否正确"};if(n<=0)return{code:-1,msg:"pageIndex必须是大于0的整数"};let r=(n-1)*i,o=i,s=await t.request({url:"https://api.weixin.qq.com/wxa/business/getliveinfo?access_token="+a,method:"POST",data:{start:r,limit:o},useContent:!0});switch(s=returnRes$3(s),s.code){case 941e4:s.msg="直播间列表为空"}return s},weixin.app={},weixin.app.auth={},weixin.app.auth.getAppidInfo=function(e={}){let{appid:t,appsecret:n}=e,{vk:i,config:a}=util$d;const r=weixin.getConfig();if(t){if(!n){let e=i.pubfn.getData(a,"vk.oauth.weixin.list")||[],r=i.pubfn.getListItem(e,"appid",t)||{};t=r.appid,n=r.appsecret}}else{let e=i.pubfn.getData(r,"app-plus.oauth.weixin")||{};t=e.appid,n=e.appsecret}if(i.pubfn.isNullOne(t,n))throw console.log("config",r),new Error("请先在 uni-config-center/uni-id/config.json 中配置微信app登录(app-plus)的appid和appsecret");return{appid:t,appsecret:n}},weixin.app.auth.getAccessToken=async function(e={}){let{appid:t,appsecret:n}=weixin.app.auth.getAppidInfo(e),{vk:i,config:a}=util$d,{code:r}=e,o=await i.request({url:`https://api.weixin.qq.com/sns/oauth2/access_token?appid=${t}&secret=${n}&code=${r}&grant_type=authorization_code`,method:"GET"});return o.errcode?(console.error("getAccessToken失败:",o),{code:o.errcode,msg:o.errmsg,err:o}):{...o,code:0,msg:"ok"}},weixin.app.auth.getUserInfo=async function(e={}){let{vk:t,config:n}=util$d,{access_token:i,openid:a,lang:r="zh-CN"}=e;if(!i)return{code:-1,msg:"access_token不能为空"};let o=await t.request({url:`https://api.weixin.qq.com/sns/userinfo?access_token=${i}&openid=${a}$lang=${r}`,method:"GET"});return o.errcode?(console.error("getUserInfo失败:",o),{code:o.errcode,msg:o.errmsg,err:o}):{...o,code:0,msg:"ok",avatar:o.headimgurl,gender:o.sex}},weixin.h5={},weixin.h5.request=async function(e={}){let{vk:t}=util$d,{url:n,method:i,data:a,access_token:r}=e;if(r||(r=await weixin.h5.auth.getAccessToken(e)),!r)return{code:-1,msg:"获取access_token失败,请检查uni-id配置下的h5-weixin配置的appid和appsecret是否正确"};-1===n.indexOf("http")&&(n="https://api.weixin.qq.com/"+n),i||(i=t.pubfn.isNull(a)?"GET":"POST"),i&&"POST"===i.toUpperCase()&&void 0===e.useContent&&(e.useContent=!0),n+=-1===n.indexOf("?")?"?":"&",n+="access_token="+r;let o=await t.request({...e,url:n});return o=returnRes$3(o),o},weixin.h5.auth={},weixin.h5.auth.getAppidInfo=function(e={}){let{appid:t,appsecret:n}=e,{vk:i,config:a}=util$d;const r=weixin.getConfig();if(t){if(!n){let e=i.pubfn.getData(a,"vk.oauth.weixin.list")||[],r=i.pubfn.getListItem(e,"appid",t)||{};t=r.appid,n=r.appsecret}}else{let e=i.pubfn.getData(r,"h5-weixin.oauth.weixin")||{};t=e.appid,n=e.appsecret}if(i.pubfn.isNullOne(t,n))throw console.log("config",r),new Error("请先配置微信公众号appid和appsecret");return{appid:t,appsecret:n}},weixin.h5.auth.code2Session=async function(e={}){let{appid:t,appsecret:n}=weixin.h5.auth.getAppidInfo(e),{code:i}=e,{vk:a}=util$d,r=await a.request({url:`https://api.weixin.qq.com/sns/oauth2/access_token?appid=${t}&secret=${n}&code=${i}&grant_type=authorization_code`,method:"GET"});if(r.errcode){let e=r.errmsg;return 40163===r.errcode&&(e="该code已被使用,请重新获取"),40029===r.errcode&&(e="无效code,请重新获取"),{...r,code:r.errcode,msg:e}}return r=a.pubfn.snake2camelJson(r),{appid:t,appsecret:n,...r,code:0,msg:"ok"}},weixin.h5.auth.getAccessToken=async function(e={}){let t,{appid:n,appsecret:i}=weixin.h5.auth.getAppidInfo(e),{cache:a=!0}=e,{vk:r}=util$d,o="h5-weixin-"+n;if(a&&(t=await r.globalDataCache.get(o)),r.pubfn.isNull(t)){let n=await weixin.h5.auth.getAccessTokenFn(e);if(0===n.code)t=n.access_token,await r.globalDataCache.set(o,t,240),await r.globalDataCache.deleteExpired();else if(console.log("获取微信公众号access_token失败:",n),40164===n.code)throw{code:n.code,msg:"请将固定IP全部加入微信公众号IP白名单,详见搜索文档:固定ip",err:n}}return t},weixin.h5.auth.getAccessTokenFn=async function(e={}){let t,{appid:n,appsecret:i}=weixin.h5.auth.getAppidInfo(e),{vk:a,config:r}=util$d;if("aliyun"===a.pubfn.getUniCloudProvider()){let e=await uniCloud.httpProxyForEip.get("https://api.weixin.qq.com/cgi-bin/token",{grant_type:"client_credential",appid:n,secret:i});if("string"==typeof e)try{e=JSON.parse(e)}catch(e){t={errcode:-1,errmsg:"异常"+e.message}}t="object"==typeof e?e.body:{errcode:-1,errmsg:"异常:getRes未获取到值"}}else t=await a.request({url:`https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${n}&secret=${i}`,method:"GET"});return t.errcode?(console.error("getAccessToken失败:",t),{code:t.errcode,msg:t.errmsg,err:t}):{code:0,msg:"ok",access_token:t.access_token,expires_in:t.expires_in}},weixin.h5.subscribeMessage={},weixin.h5.subscribeMessage.send=async function(e={}){let{vk:t}=util$d,{touser:n,template_id:i,page:a,data:r,miniprogram:o}=e,s=await weixin.h5.auth.getAccessToken(e);if(!s)return{code:-1,msg:"获取access_token失败,请检查uni-id配置下的h5-weixin配置的appid和appsecret是否正确"};let u=await t.request({url:"https://api.weixin.qq.com/cgi-bin/message/subscribe/bizsend?access_token="+s,method:"POST",data:{touser:n,template_id:i,page:a,data:r,miniprogram:o},useContent:!0});switch(u=returnRes$3(u),u.code){case 40003:u.msg="touser字段openid为空或者不正确";break;case 40037:u.msg="订阅模板id为空不正确";break;case 43101:u.msg="用户未订阅该消息";break;case 47003:u.msg="模板参数不准确,可能为空或者不满足规则,errmsg会提示具体是哪个字段出错";break;case 41030:u.msg="page路径不正确,需要保证在现网版本小程序中存在"}return u},weixin.h5.templateMessage={},weixin.h5.templateMessage.send=async function(e={}){let{vk:t}=util$d,{touser:n,template_id:i,url:a,miniprogram:r,data:o}=e,s=await weixin.h5.auth.getAccessToken(e);if(!s)return{code:-1,msg:"获取access_token失败,请检查uni-id配置下的h5-weixin配置的appid和appsecret是否正确"};let u=await t.request({url:"https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+s,method:"POST",data:{touser:n,template_id:i,url:a,miniprogram:r,data:o},useContent:!0});switch(u=returnRes$3(u),u.code){case 40003:u.msg="touser字段openid为空或者不正确";break;case 40037:u.msg="订阅模板id为空不正确";break;case 43101:u.msg="用户未订阅该消息";break;case 47003:u.msg="模板参数不准确,可能为空或者不满足规则,errmsg会提示具体是哪个字段出错";break;case 41030:u.msg="page路径不正确,需要保证在现网版本小程序中存在"}return u},weixin.loginByWeixin=async function(e={},t,n){let i,a,r;e.context?(i=e.data||{},a=e.context,r=e.custom,e.appid&&(i.appid=e.appid),e.appsecret&&(i.appsecret=e.appsecret)):(i=e,a=t,r=n);let o,s,{vk:u,uniID:l,_:c}=util$d,{code:d,platform:p,type:f,appid:g}=i;if(p||(p=u.pubfn.getPlatformForUniId(a),i.platform=p),g&&["mp-weixin","h5-weixin","app-plus"].indexOf(p)>-1){let e;"mp-weixin"===p?e=weixin.auth.getAppidInfo(i):"h5-weixin"===p?e=weixin.h5.auth.getAppidInfo(i):"app-plus"===p&&(e=weixin.app.auth.getAppidInfo(i));let{appid:t,appsecret:n}=e,r=u.pubfn.copyObject(weixin.getConfig());u.pubfn.setData(r,p+".oauth.weixin",{appid:t,appsecret:n}),i.platform=p,s=l.createInstance({context:a,config:r})}s||(s=l);try{delete i.role,o=await s.loginByWeixin(i);try{if(o.uid&&!o.msg&&(o.msg="register"===o.type?"注册成功":"登录成功"),o.uid&&"register"===o.type){let e={},t={last_login_date:Date.now(),last_login_ip:a.CLIENTIP};if(["h5-weixin","app-plus"].indexOf(p)>-1){let t=await u.openapi.weixin.app.auth.getUserInfo({access_token:o.accessToken,openid:o.openid});e={nickname:t.nickname,avatar:t.headimgurl}}["mp-weixin"].indexOf(p)>-1&&(e={nickname:i.nickname,avatar:i.avatar}),u.pubfn.isNotNull(r)&&(e=u.pubfn.objectAssign(e,r)),u.pubfn.isNotNull(t)&&(e=u.pubfn.objectAssign(e,t)),u.pubfn.isNotNull(e)&&(o.userInfo=await u.baseDao.updateAndReturn({dbName:"uni-id-users",whereJson:{_id:o.uid||"___",nickname:c.exists(!1)},dataJson:e}))}}catch(e){console.error("保存用户头像昵称异常:",e)}if(0===o.code)try{let t=u.crypto.aes.encrypt({data:{code:0,sessionKey:o.sessionKey,openid:o.openid,unionid:o.unionid,uid:o.uid,accessToken:o.accessToken,accessTokenExpired:o.accessTokenExpired,refreshToken:o.refreshToken}});o.encryptedKey=t,e.needKey||(delete o.sessionKey,delete o.accessToken,delete o.refreshToken)}catch(e){}}catch(e){console.error("loginByWeixin异常:",e);let t=e.message||"";throw e.message.indexOf("code been used")>-1&&(t="该code已被使用,请重新获取"),e.message.indexOf("invalid code")>-1&&(t="无效code,请重新获取"),new Error("msg:"+t)}return o};var weixin_1=weixin,openapi={};openapi.alipay=alipay_1,openapi.baidu=baidu_1,openapi.douyin=douyin_1,openapi.qq=qq_1,openapi.weixin=weixin_1,openapi.init=function(e){openapi.alipay.init(e),openapi.baidu.init(e),openapi.douyin.init(e),openapi.qq.init(e),openapi.weixin.init(e)};var openapi_1=openapi,builder=class{constructor(){this._shouldUseCache=!1,this._cachedBuffer=null,this._lineBreak="\r\n",this._boundary="------FormDataBaseBoundary"+Math.random().toString(36).substring(2),this.dataList=[]}_addData(e){if(this._shouldUseCache=!1,0===this.dataList.length)return void this.dataList.push(e);const t=this.dataList[this.dataList.length-1];switch(`${Buffer.isBuffer(t)?"buffer":"other"}_${Buffer.isBuffer(e)?"buffer":"other"}`){case"buffer_buffer":this.dataList.push(this._lineBreak),this.dataList.push(e);break;case"buffer_other":this.dataList.push(this._lineBreak+e);break;case"other_buffer":this.dataList[this.dataList.length-1]=t+"\r\n",this.dataList.push(e);break;case"other_other":this.dataList[this.dataList.length-1]=t+"\r\n"+e}}append(e,t,n){this._addData("--"+this._boundary);let i=`Content-Disposition: form-data; name="${encodeURIComponent(e)}"`;if(Buffer.isBuffer(t)){if(!n.filename||!n.contentType)throw new Error("filename and contentType required");i+=`; filename="${encodeURIComponent(n.filename)}"`,this._addData(i),this._addData("Content-Type: "+n.contentType),this._addData(""),this._addData(t)}else this._addData(i),this._addData(""),this._addData(t)}getHeaders(e){const t={"Content-Type":"multipart/form-data; boundary="+this._boundary};return Object.assign(t,e)}getBuffer(){if(this._shouldUseCache)return this._cachedBuffer;this._shouldUseCache=!0;let e=Buffer.alloc(0);return this.dataList.forEach(t=>{e=Buffer.isBuffer(t)?Buffer.concat([e,t]):Buffer.concat([e,Buffer.from(""+t)])}),e=Buffer.concat([e,Buffer.from(`${this._lineBreak}--${this._boundary}--`)]),this._cachedBuffer=e,e}};const BOUNDARY_REG=/^multipart\/.+?(?:;\s*boundary=(?:(?:"(.+)")|(?:([^\s]+))))$/i,LEADING_REG=/Content-Disposition:\sform-data;\sname="(.+?)"(?:;\sfilename="(.+?)")?/i,TYPE_REG=/Content-Type:\s(.+?)$/i,lineBreak="\r\n";function split(e,t){let n=0,i=0,a=[];for(;-1!==(i=e.indexOf(t,n));)a.push(e.slice(n,i)),n=i+t.length,i=e.indexOf(t,n);return a}function readParam(e){let t=e.indexOf("\r\n")+"\r\n".length,n=t,i=e.lastIndexOf("\r\n"),a=[];for(;-1!==(n=e.indexOf("\r\n",t));)if(a.push(e.slice(t,n)),t=n+"\r\n".length,0===a[a.length-1].length){a.push(e.slice(t,i));break}return a}var parser=e=>{const t=(e.headers["content-type"]||e.headers["Content-Type"]).match(BOUNDARY_REG),n=t[1]||t[2],i=split(Buffer.from(e.body,"base64"),Buffer.from("--"+n)).map(e=>readParam(e).filter(e=>e.length>0)).filter(e=>2===e.length||3===e.length||4===e.length).map(e=>{const t={},n=e[0].toString().match(LEADING_REG);switch(t.name=decodeURIComponent(n[1]),e.length){case 2:t.value=e[1].toString();break;case 3:t.filename=decodeURIComponent(n[2]),t.contentType=e[1].toString().match(TYPE_REG)[1],t.fileContent=e[2];break;case 4:t.filename=decodeURIComponent(n[2]),t.contentType=e[1].toString().match(TYPE_REG)[1],t.fileContent=e[3]}return t}),a={};return i.forEach(e=>{const t=e.name;delete e.name,a[t]=e.fileContent?e:e.value}),a},formDataUtils={FormData:builder,formParser:parser};const dbName_role="uni-id-roles",dbName_menu="opendb-admin-menus",dbName_permission="uni-id-permissions";var dao={},util$e={};dao.init=function(e){util$e=e},dao.findRoleById=async(e="___")=>{let t,{vk:n,db:i,_:a}=util$e;return t=await n.baseDao.findByWhereJson({dbName:dbName_role,whereJson:{role_id:e}}),t},dao.roleBindPermission=async(e={})=>{let{vk:t,db:n,_:i}=util$e,a={code:0,msg:""},{role_id:r="___",permissionList:o=[],reset:s=!1}=e;if(!s){let e=await dao.findRoleById(r),{permission:t=[]}=e;o=t.concat(o),o=[...new Set(o)]}return a.num=await t.baseDao.update({dbName:dbName_role,whereJson:{role_id:r},dataJson:{permission:i.set(o)}}),a},dao.roleBindMenu=async(e={})=>{let{vk:t,db:n,_:i}=util$e,a={code:0,msg:""},{role_id:r="___",menuList:o=[],reset:s=!1,addPermission:u=!1}=e,l=[],c=await dao.findRoleById(r),{menu:d=[],permission:p=[]}=c;if(s?l=compareArray(o,d):(o=d.concat(o),o=[...new Set(o)]),a.num=await t.baseDao.update({dbName:dbName_role,whereJson:{role_id:r},dataJson:{menu:i.set(o)}}),u){let e=await dao.findMenuByIdsToPermission(o),n=[];if(s&&t.pubfn.isNotNull(l)){n=compareArray(e,await dao.findMenuByIdsToPermission(l))}p=p.concat(e),p=compareArray(n,p),p=[...new Set(p)],dao.roleBindPermission({role_id:r,permissionList:p,reset:!0})}return a},dao.findPermissionById=async(e="___")=>{let t,{vk:n,db:i,_:a}=util$e;return t=await n.baseDao.findByWhereJson({dbName:dbName_permission,whereJson:{permission_id:e}}),t},dao.findMenuByIdsToPermission=async e=>{let{vk:t,db:n,_:i}=util$e,a=await dao.findMenuByIds(e);if(t.pubfn.isNull(a))return[];let r=[];for(let e in a){let n=a[e].permission;t.pubfn.isNotNull(n)&&(r=r.concat(n))}return r=[...new Set(r)],r},dao.listPermissionToTree=async(e={})=>{let t,{vk:n,db:i,_:a}=util$e,{getCount:r=!1,pageSize:o=500,pageIndex:s=1,whereJson:u={parent_id:a.in([null,""])},sortArr:l=[{name:"sort",type:"asc"}],treeProps:c={}}=e,{level:d=3,limit:p=500,whereJson:f}=c;u&&!u.permission_id&&(u.permission_id=a.exists(!0)),t=await n.baseDao.selects({dbName:dbName_permission,pageIndex:s,pageSize:o,getCount:r,whereJson:u,sortArr:l,treeProps:{id:"permission_id",parent_id:"parent_id",children:"children",level:d,limit:p,whereJson:f,sortArr:l}});let g={id:"permission_id",parent_id:"parent_id",children:"children"},m=t.rows;m=n.pubfn.treeToArray(m,g),t.list=n.pubfn.copyObject(m);for(let e in m){let t=m[e],i="",a="";if(n.pubfn.isNotNull(t.level)){i=` - ${["未分类","子弹级","炸弹级","榴弹级","核弹级"][t.level]}(LV:${t.level})`}if(n.pubfn.isNotNull(t.curd_category)){a=" - "+["未分类","增","删","改","查","特殊"][t.curd_category]}m[e].label=`${t.permission_name}(${t.permission_id})${a}${i}`}return m=n.pubfn.arrayToTree(m,g),t.rows=m,t},dao.findMenuById=async(e="___")=>{let t,{vk:n,db:i,_:a}=util$e;return t=await n.baseDao.findByWhereJson({dbName:dbName_menu,whereJson:{menu_id:e}}),t},dao.findMenuByIds=async e=>{let t,{vk:n,db:i,_:a}=util$e;return n.pubfn.isNull(e)?[]:(t=(await n.baseDao.select({dbName:dbName_menu,pageIndex:1,pageSize:500,whereJson:{menu_id:a.in(e)}})).rows,t)},dao.listMenuByRole=async(e={})=>{let{vk:t,db:n,_:i}=util$e,a={code:0,msg:"",menus:[],menuList:[]},{role:r,treeProps:o={}}=e,s=[],u={enable:!0},l={enable:!0};if(!(r.indexOf("admin")>-1)){if(t.pubfn.isNull(r))return a;let e=await t.baseDao.select({dbName:dbName_role,pageSize:500,whereJson:{role_id:i.in(r),enable:!0},fieldJson:{menu:!0}});for(let n in e.rows){let{menu:i}=e.rows[n];t.pubfn.isNotNull(i)&&(s=s.concat(i))}if(0==s.length)return a;s=[...new Set(s)],u.menu_id=i.in(s),l.menu_id=i.in(s)}u.parent_id=i.in([null,""]);let c=[{name:"sort",type:"asc"}],{level:d=3,limit:p=500}=o,f=await t.baseDao.selects({dbName:dbName_menu,pageIndex:1,pageSize:500,whereJson:u,sortArr:c,treeProps:{id:"menu_id",parent_id:"parent_id",children:"children",level:d,limit:p,whereJson:l,sortArr:c}});return a.menus=f.rows,a.menuList=t.pubfn.treeToArray(f.rows,{id:"menu_id",parent_id:"parent_id",children:"children"}),a},dao.menuBindPermission=async(e={})=>{let{vk:t,db:n,_:i}=util$e,a={code:0,msg:""},{menu_id:r="___",permissionList:o=[],reset:s=!1}=e;if(!s){let e=await dao.findMenuById(r),{permission:t=[]}=e;o=t.concat(o),o=[...new Set(o)]}return a.num=await t.baseDao.update({dbName:dbName_menu,whereJson:{menu_id:r},dataJson:{permission:i.set(o)}}),a},dao.listMenuToTree=async(e={})=>{let t,{vk:n,db:i,_:a}=util$e,{getCount:r=!1,pageSize:o=500,pageIndex:s=1,whereJson:u={parent_id:a.in([null,""]),menu_id:a.exists(!0)},sortArr:l=[{name:"sort",type:"asc"}],treeProps:c={}}=e,{level:d=3,limit:p=500,whereJson:f}=c;u&&!u.menu_id&&(u.menu_id=a.exists(!0)),t=await n.baseDao.selects({dbName:dbName_menu,pageIndex:s,pageSize:o,getCount:r,whereJson:u,sortArr:l,treeProps:{id:"menu_id",parent_id:"parent_id",children:"children",level:d,limit:p,whereJson:f,sortArr:l}});let g={id:"menu_id",parent_id:"parent_id",children:"children"},m=t.rows;m=n.pubfn.treeToArray(m,g),t.list=n.pubfn.copyObject(m);for(let e in m){let t=m[e];m[e].label=`${t.name}(${t.menu_id})`}return m=n.pubfn.arrayToTree(m,g),t.rows=m,t};var sysDao=dao;function compareArray(e,t){let n=new Set(e);return t.filter(e=>!n.has(e))}const dbName="vk-global-data";var dao$1={},util$f={};dao$1.init=function(e){util$f=e},dao$1.find=async e=>{let{vk:t,db:n,_:i}=util$f,a={};return a=await t.baseDao.findById({dbName:dbName,id:e}),a},dao$1.del=async e=>{let{vk:t,db:n,_:i}=util$f,a={};return a=await t.baseDao.deleteById({dbName:dbName,id:e}),a},dao$1.deleteByWhere=async e=>{let{vk:t,db:n,_:i}=util$f,a={};return a=await t.baseDao.del({dbName:dbName,whereJson:e}),a},dao$1.deleteExpired=async e=>{let{vk:t,db:n,_:i}=util$f,a={},r={};"string"==typeof e?r._id=e:"object"==typeof e&&(r=e);let o=(new Date).getTime();return a=await t.baseDao.del({dbName:dbName,whereJson:{...r,expired_at:i.gt(0).lte(o)}}),a},dao$1.update=async e=>{let{vk:t,db:n,_:i}=util$f,a={},{key:r,value:o,comment:s,expired_at:u}=e;return a=await t.baseDao.updateById({dbName:dbName,id:r,dataJson:{value:i.set(o),comment:s,expired_at:u}}),a},dao$1.add=async e=>{let{vk:t,db:n,_:i}=util$f,a={},{key:r,value:o,comment:s,expired_at:u}=e;return a=await t.baseDao.add({dbName:dbName,dataJson:{_id:r,key:r,value:o,comment:s,expired_at:u}}),a},dao$1.count=async e=>{let{vk:t,db:n,_:i}=util$f,a={};return a=await t.baseDao.count({dbName:dbName,whereJson:e}),a},dao$1.set=async e=>{let{vk:t,db:n,_:i}=util$f,a={code:0,msg:"ok"},r=new Date;e._add_time=r.getTime(),e._add_time_str=t.pubfn.timeFormat(r,"yyyy-MM-dd hh:mm:ss");let o=await n.collection(dbName).doc(e.key).set(e);return o.upsertedId?(a.id=o.upsertedId,a.mode="add"):(a.mode="update",a.updated=o.updated),a.num=1,a},dao$1.inc=async e=>{let{vk:t,db:n,_:i}=util$f,{key:a,value:r,expired_at:o}=e,s={},u=await t.baseDao.updateById({dbName:dbName,id:a,dataJson:{value:i.inc(r),expired_at:o}});if(0==u){0===await dao$1.count({_id:a})&&(s.id=await dao$1.add(e),s.num=1,s.mode="add")}else s.num=u,s.mode="update";return s},dao$1.list=async e=>{let{vk:t,db:n,_:i}=util$f,a={},{pageIndex:r,pageSize:o,whereJson:s,sortArr:u}=e;return a=await t.baseDao.select({dbName:dbName,pageIndex:r,pageSize:o,whereJson:s,sortArr:u}),a};var globalDataDao$1=dao$1,util$g={},smsUtil={init:function(e){util$g=e}},aliyun={specialUrlEncode:function(e){return(e=encodeURIComponent(e)).replace(/\+/g,"%20").replace(/\*/g,"%2A").replace(/%7E/g,"~")},sign:function(e,t){let{crypto:n}=util$g;return n.createHmac("sha1",e).update(t).digest("base64")}};smsUtil.sendSms=async function(e){let{vk:t,config:n}=util$g,{provider:i,appid:a,smsKey:r,smsSecret:o,signName:s,phone:u,templateId:l,data:c}=e,d={};if("aliyun"===i){let i=t.pubfn.getData(n,"vk.service.sms.aliyun");t.pubfn.isNotNull(i)&&(r||(e.smsKey=i.accessKeyId),o||(e.smsSecret=i.accessKeySecret),s||(e.signName=i.signName)),d=await smsUtil.sendSmsByAliyun(e)}else{if("unicloud"!==i)return{code:-1,msg:`暂不支持${i}供应商`};{let i=t.pubfn.getUniIdConfig(n,"service.sms");t.pubfn.isNotNull(i)&&(r||(e.smsKey=i.smsKey),o||(e.smsSecret=i.smsSecret),s||(e.signName=i.signName)),d=await smsUtil.sendSmsByUnicloud(e)}}return d.requestParam={provider:i,phone:u},d},smsUtil.sendSmsByAliyun=async function(e){let{vk:t,config:n}=util$g,{provider:i,appid:a,smsKey:r,smsSecret:o,signName:s,phone:u,templateId:l,data:c}=e,d={code:0,msg:""};try{if(t.pubfn.isNullOne(r,o))return{code:-1,msg:"阿里云短信配置错误,请检查vk-unicloud配置下的vk.service.sms.aliyun配置的accessKeyId和accessKeySecret是否正确"};let e="https://dysmsapi.aliyuncs.com",n=t.pubfn.timeFormat(new Date,"yyyy-MM-ddThh:mm:ssZ",0),i=(new Date).getTime().toString().substring(7)+t.pubfn.random(30);"object"==typeof c&&(c=JSON.stringify(c));let a={SignatureMethod:"HMAC-SHA1",SignatureNonce:i,AccessKeyId:r,SignatureVersion:"1.0",Timestamp:n,Format:"json",Action:"SendSms",Version:"2017-05-25",PhoneNumbers:u,SignName:s,TemplateParam:c,TemplateCode:l};delete a.Signature;let p=[];for(let e in a)p.push(e);p.sort();let f=!1,g="";for(let e in p){let t=p[e];g+="&"+aliyun.specialUrlEncode(t)+"="+aliyun.specialUrlEncode(a[t])}g=g.substring(1);let m="GET&"+aliyun.specialUrlEncode("/")+"&"+aliyun.specialUrlEncode(g),b=aliyun.sign(o+"&",m),h=aliyun.specialUrlEncode(b),y="Signature="+h+"&"+g;f&&(console.log("\r\n随机数\r\n"),console.log(a.SignatureNonce),console.log("\r\n=========\r\n"),console.log(a.Timestamp),console.log("\r\n====sortedQueryString====\r\n"),console.log(g),console.log("\r\n=====stringToSign====\r\n"),console.log(m),console.log("\r\n=====sign====\r\n"),console.log(b),console.log("\r\n=====signature====\r\n"),console.log(h),console.log("\r\n=========\r\n"),console.log(e+"/?"+y));t.pubfn.urlStringToJson(y);let w=await t.request({url:`${e}?${y}`,method:"GET"});return d="OK"===w.Code?{code:0,msg:"ok",requestRes:w}:{code:-1,msg:w.Message,requestRes:w},d}catch(e){return{code:-1,msg:"短信发送失败",err:{message:e.message,stack:e.stack}}}},smsUtil.sendSmsByUnicloud=async function(e){let{vk:t,config:n}=util$g,{provider:i,appid:a,smsKey:r,smsSecret:o,signName:s,phone:u,templateId:l,data:c}=e,d={code:0,msg:""};try{if(t.pubfn.isNullOne(r,o))return{code:-1,msg:"unicloud短信配置错误,请检查uni-id配置下的service.sms配置的smsKey和smsSecret是否正确"};let e=await uniCloud.sendSms({smsKey:r,smsSecret:o,phone:u,templateId:l,data:c});d=0==e.code||0==e.errCode?{code:0,msg:"ok",requestRes:e}:{code:-1,msg:e.errMessage||e.errMsg,requestRes:e}}catch(e){return{code:-1,msg:"短信发送失败",err:{message:e.message,stack:e.stack}}}return d},smsUtil.sendSmsVerifyCode=async function(e){let t,{vk:n,config:i,uniID:a}=util$g,{provider:r,phone:o,code:s,type:u,expiresIn:l=180}=e,c={code:0,msg:""};if("unicloud"===r){t=n.pubfn.getUniIdConfig(i,"service.sms.templateId");let e=n.pubfn.getUniIdConfig(i,"service.sms.codeExpiresIn");e&&(l=e);let a=n.pubfn.getUniIdConfig(i,"service.sms.name"),u=Math.ceil(l/60).toString();c=await n.system.smsUtil.sendSms({provider:r,phone:o,templateId:t,data:{code:s,name:a,action:"身份验证",expMinute:u}})}else t=n.pubfn.getData(i,`vk.service.sms.${r}.templateCode.verifyCode`),c=await n.system.smsUtil.sendSms({provider:r,phone:o,templateId:t,data:{code:s}});return 0===c.code&&await a.setVerifyCode({mobile:o,code:s,expiresIn:l,type:u}),c};var smsUtil_1=smsUtil,system={};system.sysDao=sysDao,system.globalDataDao=globalDataDao$1,system.smsUtil=smsUtil_1,system.init=function(e){let t=["sysDao","globalDataDao","smsUtil"];for(let n in t){let i=t[n];"function"==typeof system[i].init&&system[i].init(e)}};var system_1=system,vkunicloud={};class VK{constructor(e){this.router=router,this.md5=md5,this.baseDao=vkBaseDao,this.request=vk_request,this.callFunction=vk_callFunction,this.pubfn=_function,this.temporaryCache=temporaryCache,this.globalDataCache=globalDataCache_1,this.crypto=crypto,this.openapi=openapi_1,this.formDataUtil=formDataUtils,this.system=system_1,this.baseDir=null,e&&this.init(e)}require(e){return vkunicloud.requireFn(this.baseDir+"/"+e)}requireFn(e){try{return vkunicloud.requireFn(e)}catch(e){let{message:t=""}=e;return void(-1==t.indexOf("Cannot find module")&&-1==t.indexOf("no such file or directory")&&console.error(e))}}use(e,t){for(let n in e)e[n]&&"function"==typeof e[n].init&&e[n].init(t),this[n]=e[n]}getGlobalObject(){return"object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof commonjsGlobal?commonjsGlobal:void 0}init(e={}){let t=this;if(e.requireFn&&(vkunicloud.requireFn=e.requireFn),e.baseDir&&(t.baseDir=e.baseDir),e.configCenter||(e.configCenter=t.requireFn("uni-config-center")),e.uniID||(e.uniID=t.requireFn("uni-id")),e.uniPay||(e.uniPay=t.requireFn("uni-pay")),e.middlewareService||(e.middlewareService=t.requireFn("./middleware/index")),e.daoCenter||(e.daoCenter=t.requireFn("./dao/index")),e.crypto||(e.crypto=t.requireFn("crypto")),e.urlrewrite||(e.urlrewrite=t.requireFn("./util/urlrewrite")),e.config||(e.config=e.configCenter({pluginId:"vk-unicloud"}).requireFile("index.js")),!e.config)throw new Error("配置文件:uniCloud/cloudfunctions/common/uni-config-center/vk-unicloud/index.js \n编译错误,请检查!");if(!e.db)try{e.db=uniCloud.database()}catch(e){}if(t.vkPay=t.requireFn("vk-uni-pay"),e.pubFun||(e.pubFun=t.requireFn("./util/pubFunction")),e.pubFun&&(t.myfn=e.pubFun),e.redis||(e.redis=t.requireFn("vk-redis")),e.redis)t.redisUtil=e.redis,t.redis=e.redis.redis,t.newRedis=e.redis.newRedis;else try{t.redis=uniCloud.redis}catch(e){}e.uniMap||(e.uniMap=t.requireFn("uni-map-common")),e.uniMap&&(t.uniMap=e.uniMap),e.db&&(vkunicloud.db=e.db,vkunicloud._=e.db.command),vkunicloud.pubfn=t.pubfn,e.configCenter&&(vkunicloud.configCenter=e.configCenter),e.config&&(vkunicloud.config=e.config),e.uniID&&(vkunicloud.uniID=e.uniID),e.uniPay&&(vkunicloud.uniPay=e.uniPay),e.middlewareService&&(vkunicloud.middlewareService=e.middlewareService),e.pubFun&&(vkunicloud.pubFun=e.pubFun),e.customUtil&&(vkunicloud.customUtil=e.customUtil),e.crypto&&(vkunicloud.crypto=e.crypto),e.urlrewrite&&(vkunicloud.urlrewrite=e.urlrewrite);const n={vk:t,...vkunicloud};t.use({daoCenter:e.daoCenter,baseDao:t.baseDao,openapi:t.openapi,globalDataCache:t.globalDataCache,system:t.system,pubFun:e.pubFun},n);try{let n=t.getGlobalObject();"object"==typeof n&&e.middlewareService&&(n.vk=t)}catch(e){}}getUnicloud(){return vkunicloud}createInstance(e){return new VK(e)}}var src=new VK;module.exports=src; diff --git a/uniCloud-tcb/cloudfunctions/router/node_modules/vk-unicloud/package.json b/uniCloud-tcb/cloudfunctions/router/node_modules/vk-unicloud/package.json new file mode 100644 index 0000000..cb547fc --- /dev/null +++ b/uniCloud-tcb/cloudfunctions/router/node_modules/vk-unicloud/package.json @@ -0,0 +1,16 @@ +{ + "name": "vk-unicloud", + "version": "2.15.3", + "description": "【云函数端SDK】VK云函数路由模式uniCloud开发框架,在router目录下执行 npm i vk-unicloud 进行安装和升级", + "main": "index.js", + "homepage": "https://gitee.com/vk-uni/vk-uni-cloud-router.git", + "repository": { + "type": "git", + "url": "git+https://gitee.com/vk-uni/vk-uni-cloud-router.git" + }, + "files": [ + "dist" + ], + "author": "VK", + "license": "Apache-2.0" +} \ No newline at end of file diff --git a/uniCloud-tcb/cloudfunctions/router/package-lock.json b/uniCloud-tcb/cloudfunctions/router/package-lock.json index 4fc5f6f..9f76028 100644 --- a/uniCloud-tcb/cloudfunctions/router/package-lock.json +++ b/uniCloud-tcb/cloudfunctions/router/package-lock.json @@ -1,7 +1,7 @@ { "name": "router", "version": "1.0.0", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "": { @@ -29,57 +29,46 @@ "uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" } }, - "../../../uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/node_modules/uni-config-center": { - "resolved": "../../../uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center", - "link": true - }, "../../../uni_modules/vk-unicloud/uniCloud/cloudfunctions/common/vk-unicloud": { "version": "2.15.3", "license": "Apache-2.0" }, "node_modules/charenc": { "version": "0.0.2", - "resolved": "https://registry.npmmirror.com/charenc/-/charenc-0.0.2.tgz", - "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==", + "license": "BSD-3-Clause", "engines": { "node": "*" } }, "node_modules/crypt": { "version": "0.0.2", - "resolved": "https://registry.npmmirror.com/crypt/-/crypt-0.0.2.tgz", - "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==", + "license": "BSD-3-Clause", "engines": { "node": "*" } }, "node_modules/crypto-js": { "version": "4.2.0", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", - "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" + "license": "MIT" }, "node_modules/dayjs": { "version": "1.11.10", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", - "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==" + "license": "MIT" }, "node_modules/debug": { "version": "3.2.7", - "resolved": "https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "license": "MIT", "dependencies": { "ms": "^2.1.1" } }, "node_modules/is-buffer": { "version": "1.1.6", - "resolved": "https://registry.npmmirror.com/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + "license": "MIT" }, "node_modules/md5": { "version": "2.3.0", - "resolved": "https://registry.npmmirror.com/md5/-/md5-2.3.0.tgz", - "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==", + "license": "BSD-3-Clause", "dependencies": { "charenc": "0.0.2", "crypt": "0.0.2", @@ -88,18 +77,15 @@ }, "node_modules/ms": { "version": "2.1.3", - "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + "license": "MIT" }, "node_modules/node-ensure": { "version": "0.0.0", - "resolved": "https://registry.npmmirror.com/node-ensure/-/node-ensure-0.0.0.tgz", - "integrity": "sha512-DRI60hzo2oKN1ma0ckc6nQWlHU69RH6xN0sjQTjMpChPfTYvKZdcQFfdYK2RWbJcKyUizSIy/l8OTGxMAM1QDw==" + "license": "MIT" }, "node_modules/pdf-parse": { "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/pdf-parse/-/pdf-parse-1.1.1.tgz", - "integrity": "sha512-v6ZJ/efsBpGrGGknjtq9J/oC8tZWq0KWL5vQrk2GlzLEQPUDB1ex+13Rmidl1neNN358Jn9EHZw5y07FFtaC7A==", + "license": "MIT", "dependencies": { "debug": "^3.1.0", "node-ensure": "^0.0.0" @@ -120,86 +106,5 @@ "resolved": "../../../uni_modules/vk-unicloud/uniCloud/cloudfunctions/common/vk-unicloud", "link": true } - }, - "dependencies": { - "charenc": { - "version": "0.0.2", - "resolved": "https://registry.npmmirror.com/charenc/-/charenc-0.0.2.tgz", - "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==" - }, - "crypt": { - "version": "0.0.2", - "resolved": "https://registry.npmmirror.com/crypt/-/crypt-0.0.2.tgz", - "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==" - }, - "crypto-js": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", - "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" - }, - "dayjs": { - "version": "1.11.10", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", - "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==" - }, - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "requires": { - "ms": "^2.1.1" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmmirror.com/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - }, - "md5": { - "version": "2.3.0", - "resolved": "https://registry.npmmirror.com/md5/-/md5-2.3.0.tgz", - "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==", - "requires": { - "charenc": "0.0.2", - "crypt": "0.0.2", - "is-buffer": "~1.1.6" - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, - "node-ensure": { - "version": "0.0.0", - "resolved": "https://registry.npmmirror.com/node-ensure/-/node-ensure-0.0.0.tgz", - "integrity": "sha512-DRI60hzo2oKN1ma0ckc6nQWlHU69RH6xN0sjQTjMpChPfTYvKZdcQFfdYK2RWbJcKyUizSIy/l8OTGxMAM1QDw==" - }, - "pdf-parse": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/pdf-parse/-/pdf-parse-1.1.1.tgz", - "integrity": "sha512-v6ZJ/efsBpGrGGknjtq9J/oC8tZWq0KWL5vQrk2GlzLEQPUDB1ex+13Rmidl1neNN358Jn9EHZw5y07FFtaC7A==", - "requires": { - "debug": "^3.1.0", - "node-ensure": "^0.0.0" - } - }, - "uni-config-center": { - "version": "file:../../../uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" - }, - "uni-id": { - "version": "file:../../../uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id", - "requires": { - "uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" - }, - "dependencies": { - "uni-config-center": { - "version": "file:../../../uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" - } - } - }, - "vk-unicloud": { - "version": "file:../../../uni_modules/vk-unicloud/uniCloud/cloudfunctions/common/vk-unicloud" - } } } diff --git a/uniCloud-tcb/cloudfunctions/router/service/client/ai/pub/chat.js b/uniCloud-tcb/cloudfunctions/router/service/client/ai/pub/chat.js index c52f46f..6ee3733 100644 --- a/uniCloud-tcb/cloudfunctions/router/service/client/ai/pub/chat.js +++ b/uniCloud-tcb/cloudfunctions/router/service/client/ai/pub/chat.js @@ -3,9 +3,9 @@ module.exports = { let { data = {}, userInfo } = event; const COZE_TOKEN = 'sat_OiXlI4Da5Q99fxmul6pNfExmA6hR898UbxBDwrvjZ638APxRSlFnXbz6zyFedKNG'; - const BOT_ID = '7680345813062680618'; + // 从前端传入 bot_id,不同项目用不同智能体 + const BOT_ID = data.bot_id || '7680345813062680618'; - // 使用流式接口,直接从 SSE 事件中提取回答 const res = await uniCloud.httpclient.request('https://api.coze.cn/v3/chat', { method: 'POST', dataType: 'text', @@ -25,11 +25,9 @@ module.exports = { } }); - // 从 SSE 文本中提取 type=answer 的内容 let answer = '暂时无法回复,请拨打 400-686-5559 咨询'; let conversationId = ''; const text = res.data || ''; - const lines = text.split('\n'); for (const line of lines) { if (!line.startsWith('data:')) continue; @@ -41,7 +39,7 @@ module.exports = { if (p.type === 'answer' && p.content) { answer = p.content; } - } catch (e) { /* 跳过非 JSON 行 */ } + } catch (e) { /* 跳过 */ } } return { diff --git a/uniCloud-tcb/database/jjx-balance-log.index.json b/uniCloud-tcb/database/jjx-balance-log.index.json new file mode 100644 index 0000000..048dcfb --- /dev/null +++ b/uniCloud-tcb/database/jjx-balance-log.index.json @@ -0,0 +1,50 @@ +[ + { + "IndexName": "_add_time", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "_add_time", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "logTime", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "logTime", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "type", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "type", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "operatorId", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "operatorId", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/jjx-balance.index.json b/uniCloud-tcb/database/jjx-balance.index.json new file mode 100644 index 0000000..5e18aaf --- /dev/null +++ b/uniCloud-tcb/database/jjx-balance.index.json @@ -0,0 +1,14 @@ +[ + { + "IndexName": "_add_time", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "_add_time", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/jjx-balance.init_data.json b/uniCloud-tcb/database/jjx-balance.init_data.json new file mode 100644 index 0000000..84289be --- /dev/null +++ b/uniCloud-tcb/database/jjx-balance.init_data.json @@ -0,0 +1,6 @@ +[ + { + "balance": 0, + "lastLogId": "" + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/jjx-enquiry-quote.index.json b/uniCloud-tcb/database/jjx-enquiry-quote.index.json new file mode 100644 index 0000000..9d2685b --- /dev/null +++ b/uniCloud-tcb/database/jjx-enquiry-quote.index.json @@ -0,0 +1,26 @@ +[ + { + "IndexName": "_add_time", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "_add_time", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "userId", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "user_id", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/jjx-enquiry-sheet.index.json b/uniCloud-tcb/database/jjx-enquiry-sheet.index.json new file mode 100644 index 0000000..9d2685b --- /dev/null +++ b/uniCloud-tcb/database/jjx-enquiry-sheet.index.json @@ -0,0 +1,26 @@ +[ + { + "IndexName": "_add_time", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "_add_time", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "userId", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "user_id", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/jjx-spot-category.index.json b/uniCloud-tcb/database/jjx-spot-category.index.json new file mode 100644 index 0000000..b35c2f9 --- /dev/null +++ b/uniCloud-tcb/database/jjx-spot-category.index.json @@ -0,0 +1,38 @@ +[ + { + "IndexName": "_add_time", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "_add_time", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "parentId", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "parent_id", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "level", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "level", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/jjx-spot-cooperate.index.json b/uniCloud-tcb/database/jjx-spot-cooperate.index.json new file mode 100644 index 0000000..9d2685b --- /dev/null +++ b/uniCloud-tcb/database/jjx-spot-cooperate.index.json @@ -0,0 +1,26 @@ +[ + { + "IndexName": "_add_time", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "_add_time", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "userId", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "user_id", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/jjx-spot-goods.index.json b/uniCloud-tcb/database/jjx-spot-goods.index.json new file mode 100644 index 0000000..9d2685b --- /dev/null +++ b/uniCloud-tcb/database/jjx-spot-goods.index.json @@ -0,0 +1,26 @@ +[ + { + "IndexName": "_add_time", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "_add_time", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "userId", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "user_id", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/opendb-admin-log.index.json b/uniCloud-tcb/database/opendb-admin-log.index.json new file mode 100644 index 0000000..c2a3250 --- /dev/null +++ b/uniCloud-tcb/database/opendb-admin-log.index.json @@ -0,0 +1,38 @@ +[ + { + "IndexName": "_add_time", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "_add_time", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "user_id", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "user_id", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "title", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "title", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/opendb-admin-menus.index.json b/uniCloud-tcb/database/opendb-admin-menus.index.json new file mode 100644 index 0000000..c097944 --- /dev/null +++ b/uniCloud-tcb/database/opendb-admin-menus.index.json @@ -0,0 +1,62 @@ +[ + { + "IndexName": "_add_time", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "_add_time", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "menu_id", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "menu_id", + "Direction": "1" + } + ], + "MgoIsUnique": true + } + }, + { + "IndexName": "parent_id", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "parent_id", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "url", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "url", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "sort", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "sort", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/opendb-admin-menus.init_data.json b/uniCloud-tcb/database/opendb-admin-menus.init_data.json new file mode 100644 index 0000000..c2f71f3 --- /dev/null +++ b/uniCloud-tcb/database/opendb-admin-menus.init_data.json @@ -0,0 +1,183 @@ +[ + { + "_id": "sys-admin", + "_add_time": 1596416400000, + "menu_id": "sys-admin", + "name": "用户角色权限", + "icon": "el-icon-s-tools", + "url": "", + "comment": "系统内置", + "sort": 100, + "enable": true + }, + { + "_id": "sys-user-manage", + "_add_time": 1596416400000, + "menu_id": "sys-user-manage", + "name": "用户管理", + "icon": "el-icon-s-custom", + "url": "/pages_plugs/system/user/list", + "comment": "1个角色可以分配多个角色", + "sort": 1, + "parent_id": "sys-admin", + "enable": true + }, + { + "_id": "sys-role-manage", + "_add_time": 1596416400000, + "menu_id": "sys-role-manage", + "name": "角色管理", + "icon": "el-icon-user", + "url": "/pages_plugs/system/role/list", + "comment": "1个角色可以分配多个权限和菜单", + "sort": 2, + "parent_id": "sys-admin", + "enable": true + }, + { + "_id": "sys-permission-manage", + "_add_time": 1596416400000, + "menu_id": "sys-permission-manage", + "name": "权限管理", + "icon": "vk-icon-lock", + "url": "/pages_plugs/system/permission/list", + "comment": "1个权限可以匹配多个云函数", + "sort": 3, + "parent_id": "sys-admin", + "enable": true + }, + { + "_id": "sys-menus-manage", + "_add_time": 1596416400000, + "menu_id": "sys-menus-manage", + "name": "菜单管理", + "icon": "el-icon-tickets", + "url": "/pages_plugs/system/menu/list", + "comment": "控制admin左侧菜单的显示和隐藏", + "sort": 4, + "parent_id": "sys-admin", + "enable": true + }, + { + "_id": "sys-app-manage", + "_add_time": 1596416400000, + "menu_id": "sys-app-manage", + "name": "应用管理", + "icon": "el-icon-cloudy", + "url": "/pages_plugs/system/app/list", + "comment": "应用管理", + "sort": 5, + "parent_id": "sys-admin", + "enable": true + }, + { + "_id": "sys-app-upgrade-center", + "_add_time": 1596416400000, + "menu_id": "sys-app-upgrade-center", + "name": "App升级中心", + "icon": "vk-icon-shengji3-xianxing", + "url": "/pages_plugs/system/app-upgrade-center/list", + "comment": "管理和发布新的app版本", + "sort": 6, + "parent_id": "sys-admin", + "enable": true + }, + { + "_id": "system-uni", + "_add_time": 1596416400000, + "enable": true, + "icon": "el-icon-s-tools", + "menu_id": "system-uni", + "name": "系统设置", + "sort": 110 + }, + { + "_id": "system-uni-uni-id-files", + "sort": 1, + "url": "/pages_plugs/system_uni/uni-id-files/list", + "_add_time": 1596416400000, + "enable": true, + "icon": "el-icon-folder-opened", + "menu_id": "system-uni-uni-id-files", + "name": "素材管理", + "parent_id": "system-uni" + }, + { + "_id": "system-uni-vk-global-data", + "enable": true, + "icon": "", + "menu_id": "system-uni-vk-global-data", + "name": "系统缓存管理", + "parent_id": "system-uni", + "sort": 2, + "url": "/pages_plugs/system_uni/vk-global-data", + "_add_time": 1596416400000 + }, + { + "_id": "system-uni-vk-components-dynamic", + "sort": 3, + "url": "/pages_plugs/system_uni/vk-components-dynamic", + "_add_time": 1596416400000, + "enable": true, + "icon": "", + "menu_id": "system-uni-vk-components-dynamic", + "name": "动态组件数据", + "parent_id": "system-uni" + }, + { + "_id": "system-uni-vk-pay-orders", + "sort": 4, + "url": "/pages_plugs/system_uni/vk-pay-orders", + "_add_time": 1596416400000, + "enable": true, + "icon": "", + "menu_id": "system-uni-vk-pay-orders", + "name": "支付订单明细", + "parent_id": "system-uni" + }, + { + "_id": "system-uni-uni-id-log", + "sort": 8, + "url": "/pages_plugs/system_uni/uni-id-log", + "_add_time": 1596416400000, + "enable": true, + "icon": "", + "menu_id": "system-uni-uni-id-log", + "name": "用户登录日志", + "parent_id": "system-uni" + }, + { + "_id": "system-uni-opendb-admin-log", + "sort": 9, + "url": "/pages_plugs/system_uni/opendb-admin-log", + "_add_time": 1596416400000, + "enable": true, + "icon": "", + "menu_id": "system-uni-opendb-admin-log", + "name": "系统操作日志", + "parent_id": "system-uni" + }, + { + "_id": "jjx-finance", + "_add_time": 1596416400000, + "menu_id": "jjx-finance", + "name": "资金管理", + "icon": "el-icon-wallet", + "url": "", + "comment": "资金管理", + "sort": 120, + "enable": true + }, + { + "_id": "jjx-finance-balance", + "_add_time": 1596416400000, + "menu_id": "jjx-finance-balance", + "name": "资金明细", + "icon": "el-icon-money", + "url": "/pages/finance/balance/list", + "comment": "资金流水和余额管理", + "sort": 1, + "parent_id": "jjx-finance", + "enable": true + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/opendb-app-list.index.json b/uniCloud-tcb/database/opendb-app-list.index.json new file mode 100644 index 0000000..6470609 --- /dev/null +++ b/uniCloud-tcb/database/opendb-app-list.index.json @@ -0,0 +1,74 @@ +[ + { + "IndexName": "_add_time", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "_add_time", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "appid", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "appid", + "Direction": "1" + } + ], + "MgoIsUnique": true + } + }, + { + "IndexName": "name", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "name", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "type", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "type", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "create_date", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "create_date", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "enable_upgrade_center", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "enable_upgrade_center", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/opendb-app-list.init_data.json b/uniCloud-tcb/database/opendb-app-list.init_data.json new file mode 100644 index 0000000..b45b68c --- /dev/null +++ b/uniCloud-tcb/database/opendb-app-list.init_data.json @@ -0,0 +1,22 @@ +[ + { + "_id": "001", + "appid": "__UNI__01F080F", + "type": "client", + "name": "用户端", + "description": "此为用户端应用", + "create_date": 1596416400000, + "_add_time": 1596416400000, + "_add_time_str": "2020-08-03 09:00:00" + }, + { + "_id": "002", + "appid": "__UNI__570A7FB", + "type": "admin", + "name": "管理端", + "description": "此为管理端应用", + "create_date": 1596416400000, + "_add_time": 1596416400000, + "_add_time_str": "2020-08-03 09:00:00" + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/opendb-app-versions.index.json b/uniCloud-tcb/database/opendb-app-versions.index.json new file mode 100644 index 0000000..f049b9e --- /dev/null +++ b/uniCloud-tcb/database/opendb-app-versions.index.json @@ -0,0 +1,98 @@ +[ + { + "IndexName": "_add_time", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "_add_time", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "appid", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "appid", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "name", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "name", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "platform", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "platform", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "type", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "type", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "uni_platform", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "uni_platform", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "create_env", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "create_env", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "stable_publish", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "stable_publish", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/opendb-open-data.index.json b/uniCloud-tcb/database/opendb-open-data.index.json new file mode 100644 index 0000000..82e7397 --- /dev/null +++ b/uniCloud-tcb/database/opendb-open-data.index.json @@ -0,0 +1,26 @@ +[ + { + "IndexName": "_add_time", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "_add_time", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "expired", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "expired", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/opendb-tempdata.index.json b/uniCloud-tcb/database/opendb-tempdata.index.json new file mode 100644 index 0000000..82e7397 --- /dev/null +++ b/uniCloud-tcb/database/opendb-tempdata.index.json @@ -0,0 +1,26 @@ +[ + { + "IndexName": "_add_time", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "_add_time", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "expired", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "expired", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/opendb-verify-codes.index.json b/uniCloud-tcb/database/opendb-verify-codes.index.json new file mode 100644 index 0000000..e32771c --- /dev/null +++ b/uniCloud-tcb/database/opendb-verify-codes.index.json @@ -0,0 +1,58 @@ +[ + { + "IndexName": "mobile", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "mobile", + "Direction": "1" + }, + { + "Name": "code", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "email", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "email", + "Direction": "1" + }, + { + "Name": "code", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "type", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "type", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "state", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "state", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/uni-id-log.index.json b/uniCloud-tcb/database/uni-id-log.index.json new file mode 100644 index 0000000..b400fdf --- /dev/null +++ b/uniCloud-tcb/database/uni-id-log.index.json @@ -0,0 +1,26 @@ +[ + { + "IndexName": "_add_time", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "_add_time", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "user_id", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "user_id", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/uni-id-permissions.index.json b/uniCloud-tcb/database/uni-id-permissions.index.json new file mode 100644 index 0000000..f29ee77 --- /dev/null +++ b/uniCloud-tcb/database/uni-id-permissions.index.json @@ -0,0 +1,62 @@ +[ + { + "IndexName": "_add_time", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "_add_time", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "permission_id", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "permission_id", + "Direction": "1" + } + ], + "MgoIsUnique": true + } + }, + { + "IndexName": "parent_id", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "parent_id", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "url", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "url", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "sort", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "sort", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/uni-id-permissions.init_data.json b/uniCloud-tcb/database/uni-id-permissions.init_data.json new file mode 100644 index 0000000..a3b9f52 --- /dev/null +++ b/uniCloud-tcb/database/uni-id-permissions.init_data.json @@ -0,0 +1,277 @@ +[ + { + "_id": "sys-permission", + "_add_time": 1596416400000, + "permission_id": "sys-permission", + "permission_name": "系统内置权限", + "comment": "系统内置权限", + "url": "", + "sort": 103, + "enable": true + }, + { + "_id": "sys-permission-add", + "_add_time": 1596416400000, + "permission_id": "sys-permission-add", + "permission_name": "系统内置 - 增", + "comment": "所有函数名以add开头的云函数", + "url": [ + "*/add*" + ], + "icon": "vk-icon-add", + "sort": 1, + "parent_id": "sys-permission", + "enable": true, + "match_mode": 1, + "curd_category": 1, + "level": 3 + }, + { + "_id": "sys-permission-delete", + "_add_time": 1596416400000, + "permission_id": "sys-permission-delete", + "permission_name": "系统内置 - 删", + "comment": "所有函数名以delete开头的云函数", + "url": [ + "*/delete*" + ], + "icon": "vk-icon-delete", + "sort": 2, + "parent_id": "sys-permission", + "enable": true, + "match_mode": 1, + "curd_category": 2, + "level": 4 + }, + { + "_id": "sys-permission-update", + "_add_time": 1596416400000, + "permission_id": "sys-permission-update", + "permission_name": "系统内置 - 改", + "comment": "所有函数名以update开头的云函数", + "url": [ + "*/update*" + ], + "icon": "el-icon-edit", + "sort": 3, + "parent_id": "sys-permission", + "enable": true, + "match_mode": 1, + "curd_category": 3, + "level": 3 + }, + { + "_id": "sys-permission-read", + "_add_time": 1596416400000, + "permission_id": "sys-permission-read", + "permission_name": "系统内置 - 查", + "comment": "包含所有的查询操作", + "url": [ + "*/get*", + "*/find*", + "*/select*" + ], + "icon": "vk-icon-text", + "sort": 4, + "parent_id": "sys-permission", + "enable": true, + "match_mode": 1, + "curd_category": 4, + "level": 3 + }, + { + "_id": "sys-manage", + "_add_time": 1596416400000, + "permission_id": "sys-manage", + "permission_name": "用户角色权限菜单", + "comment": "", + "sort": 101, + "enable": true + }, + { + "_id": "sys-manage-user", + "_add_time": 1596416400000, + "permission_id": "sys-manage-user", + "permission_name": "系统 - 用户管理", + "comment": "", + "url": [ + "admin/system/user/sys/*" + ], + "sort": 1, + "enable": true, + "match_mode": 1, + "parent_id": "sys-manage" + }, + { + "_id": "sys-manage-role", + "_add_time": 1596416400000, + "permission_id": "sys-manage-role", + "permission_name": "系统 - 角色管理", + "comment": "", + "url": [ + "admin/system/role/sys/*" + ], + "sort": 2, + "enable": true, + "match_mode": 1, + "parent_id": "sys-manage" + }, + { + "_id": "sys-manage-permission", + "_add_time": 1596416400000, + "permission_id": "sys-manage-permission", + "permission_name": "系统 - 权限管理", + "comment": "", + "url": [ + "admin/system/permission/sys/*" + ], + "sort": 3, + "enable": true, + "match_mode": 1, + "parent_id": "sys-manage" + }, + { + "_id": "sys-manage-menu", + "_add_time": 1596416400000, + "permission_id": "sys-manage-menu", + "permission_name": "系统 - 菜单管理", + "comment": "", + "url": [ + "admin/system/menu/sys/*" + ], + "sort": 4, + "enable": true, + "match_mode": 1, + "parent_id": "sys-manage" + }, + { + "_id": "sys-manage-app", + "_add_time": 1596416400000, + "permission_id": "sys-manage-app", + "permission_name": "系统 - 应用管理", + "comment": "", + "url": [ + "admin/system/app/sys/*" + ], + "sort": 5, + "enable": true, + "match_mode": 1, + "parent_id": "sys-manage" + }, + { + "_id": "sys-manage-app-upgrade-center", + "_add_time": 1596416400000, + "permission_id": "sys-manage-app-upgrade-center", + "permission_name": "系统 - App升级中心", + "comment": "", + "url": [ + "admin/system/app-upgrade-center/sys/*" + ], + "sort": 6, + "enable": true, + "match_mode": 1, + "parent_id": "sys-manage" + }, + { + "_id": "system-uni", + "_add_time": 1596416400000, + "permission_id": "system-uni", + "permission_name": "系统设置", + "comment": "", + "sort": 102, + "enable": true + }, + { + "_id": "system-uni-uni-id-files", + "_add_time": 1596416400000, + "permission_id": "system-uni-uni-id-files", + "permission_name": "系统 - 素材管理", + "comment": "", + "url": [ + "admin/system_uni/uni-id-files/*" + ], + "sort": 1, + "enable": true, + "match_mode": 1, + "parent_id": "system-uni" + }, + { + "_id": "system-uni-vk-global-data", + "_add_time": 1596416400000, + "permission_id": "system-uni-vk-global-data", + "permission_name": "系统 - 缓存管理", + "comment": "", + "url": [ + "admin/system_uni/global-data/sys/*" + ], + "sort": 2, + "enable": true, + "match_mode": 1, + "parent_id": "system-uni" + }, + { + "_id": "system-uni-vk-components-dynamic", + "_add_time": 1596416400000, + "permission_id": "system-uni-vk-components-dynamic", + "permission_name": "系统 - 动态组件数据管理", + "comment": "", + "url": [ + "admin/system_uni/components-dynamic/sys/*" + ], + "sort": 3, + "enable": true, + "match_mode": 1, + "parent_id": "system-uni" + }, + { + "_id": "system-uni-uni-id-log", + "_add_time": 1596416400000, + "permission_id": "system-uni-uni-id-log", + "permission_name": "系统 - 用户登录日志管理", + "comment": "", + "url": [ + "admin/system_uni/uni-id-log/sys/*" + ], + "sort": 4, + "enable": true, + "match_mode": 1, + "parent_id": "system-uni" + }, + { + "_id": "system-uni-opendb-admin-log", + "_add_time": 1596416400000, + "permission_id": "system-uni-opendb-admin-log", + "permission_name": "系统 - 操作日志管理", + "comment": "", + "url": [ + "admin/system_uni/admin-log/sys/*" + ], + "sort": 5, + "enable": true, + "match_mode": 1, + "parent_id": "system-uni" + }, + { + "_id": "jjx-finance", + "_add_time": 1596416400000, + "permission_id": "jjx-finance", + "permission_name": "资金管理", + "comment": "", + "sort": 120, + "enable": true + }, + { + "_id": "jjx-finance-balance", + "_add_time": 1596416400000, + "permission_id": "jjx-finance-balance", + "permission_name": "资金 - 资金明细管理", + "comment": "", + "url": [ + "admin/finance/balance/sys/*" + ], + "sort": 1, + "enable": true, + "match_mode": 1, + "parent_id": "jjx-finance" + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/uni-id-roles.index.json b/uniCloud-tcb/database/uni-id-roles.index.json new file mode 100644 index 0000000..093e57d --- /dev/null +++ b/uniCloud-tcb/database/uni-id-roles.index.json @@ -0,0 +1,50 @@ +[ + { + "IndexName": "_add_time", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "_add_time", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "role_id", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "role_id", + "Direction": "1" + } + ], + "MgoIsUnique": true + } + }, + { + "IndexName": "permission", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "permission", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "role_name", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "role_name", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/uni-id-roles.init_data.json b/uniCloud-tcb/database/uni-id-roles.init_data.json new file mode 100644 index 0000000..e78db9d --- /dev/null +++ b/uniCloud-tcb/database/uni-id-roles.init_data.json @@ -0,0 +1,29 @@ +[ + { + "_id": "001", + "_add_time": 1596416400000, + "enable": true, + "role_id": "admin", + "role_name": "超级管理员", + "comment": "系统内置角色 - 请勿修改", + "permission": [] + }, + { + "_id": "005", + "_add_time": 1596416400000, + "enable": true, + "role_id": "query-all", + "role_name": "boss", + "comment": "系统内置角色 - 请勿修改", + "permission": [] + }, + { + "_id": "006", + "_add_time": 1596416400000, + "enable": true, + "role_id": "custom-role-1", + "role_name": "自定义角色-1", + "comment": "更细粒化的自定义角色权限示例", + "permission": [] + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/uni-id-users.index.json b/uniCloud-tcb/database/uni-id-users.index.json new file mode 100644 index 0000000..675d82b --- /dev/null +++ b/uniCloud-tcb/database/uni-id-users.index.json @@ -0,0 +1,146 @@ +[ + { + "IndexName": "username", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "username", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "mobile", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "mobile", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "email", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "email", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "wx_openid.app-plus", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "wx_openid.app-plus", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "wx_openid.mp-weixin", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "wx_openid.mp-weixin", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "wx_unionid", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "wx_unionid", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "ali_openid", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "ali_openid", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "my_invite_code", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "my_invite_code", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "inviter_uid", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "inviter_uid", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "invite_time", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "invite_time", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "role", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "role", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "register_date", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "register_date", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/uni-id-users.init_data.json b/uniCloud-tcb/database/uni-id-users.init_data.json new file mode 100644 index 0000000..c854cac --- /dev/null +++ b/uniCloud-tcb/database/uni-id-users.init_data.json @@ -0,0 +1,15 @@ +[ + { + "_id": "001", + "username": "admin", + "password": "03caebb36670995fc261a275d212cad65e4bbebd", + "register_date": 1596416400000, + "register_ip": "127.0.0.1", + "nickname": "超级管理员", + "role": [ + "admin" + ], + "token": [], + "allow_login_background": true + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/vk-components-dynamic.index.json b/uniCloud-tcb/database/vk-components-dynamic.index.json new file mode 100644 index 0000000..62908b9 --- /dev/null +++ b/uniCloud-tcb/database/vk-components-dynamic.index.json @@ -0,0 +1,86 @@ +[ + { + "IndexName": "_add_time", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "_add_time", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "data_id", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "data_id", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "title", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "title", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "type", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "type", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "sort", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "sort", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "show", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "show", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "name", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "name", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/vk-files-categories.index.json b/uniCloud-tcb/database/vk-files-categories.index.json new file mode 100644 index 0000000..bc0e872 --- /dev/null +++ b/uniCloud-tcb/database/vk-files-categories.index.json @@ -0,0 +1,38 @@ +[ + { + "IndexName": "_add_time", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "_add_time", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "name", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "name", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "sort", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "sort", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/vk-files.index.json b/uniCloud-tcb/database/vk-files.index.json new file mode 100644 index 0000000..ebb3dac --- /dev/null +++ b/uniCloud-tcb/database/vk-files.index.json @@ -0,0 +1,86 @@ +[ + { + "IndexName": "_add_time", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "_add_time", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "user_id", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "user_id", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "sort", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "sort", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "status", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "status", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "type", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "type", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "display_name", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "display_name", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "url", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "url", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/vk-global-data.index.json b/uniCloud-tcb/database/vk-global-data.index.json new file mode 100644 index 0000000..5cab82f --- /dev/null +++ b/uniCloud-tcb/database/vk-global-data.index.json @@ -0,0 +1,38 @@ +[ + { + "IndexName": "_add_time", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "_add_time", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "key", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "key", + "Direction": "1" + } + ], + "MgoIsUnique": true + } + }, + { + "IndexName": "expired_at", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "expired_at", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/vk-pay-config.index.json b/uniCloud-tcb/database/vk-pay-config.index.json new file mode 100644 index 0000000..5e18aaf --- /dev/null +++ b/uniCloud-tcb/database/vk-pay-config.index.json @@ -0,0 +1,14 @@ +[ + { + "IndexName": "_add_time", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "_add_time", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/vk-pay-orders.index.json b/uniCloud-tcb/database/vk-pay-orders.index.json new file mode 100644 index 0000000..36fdc08 --- /dev/null +++ b/uniCloud-tcb/database/vk-pay-orders.index.json @@ -0,0 +1,74 @@ +[ + { + "IndexName": "_add_time", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "_add_time", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "out_trade_no", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "out_trade_no", + "Direction": "1" + } + ], + "MgoIsUnique": true + } + }, + { + "IndexName": "user_order_success", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "user_order_success", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "transaction_id", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "transaction_id", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "total_fee", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "total_fee", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "pid", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "pid", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/uniCloud-tcb/database/vk-test.index.json b/uniCloud-tcb/database/vk-test.index.json new file mode 100644 index 0000000..19fec30 --- /dev/null +++ b/uniCloud-tcb/database/vk-test.index.json @@ -0,0 +1,26 @@ +[ + { + "IndexName": "location", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "location", + "Direction": "2dsphere" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "_add_time", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "_add_time", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } +] \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index e36c488..86e61fe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,164 +3,164 @@ "@babel/parser@^7.18.4": - "integrity" "sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ==" - "resolved" "https://registry.npmmirror.com/@babel/parser/-/parser-7.23.5.tgz" - "version" "7.23.5" + version "7.23.5" + resolved "https://registry.npmmirror.com/@babel/parser/-/parser-7.23.5.tgz" + integrity sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ== "@babel/runtime@^7.12.0": - "integrity" "sha512-Nms86NXrsaeU9vbBJKni6gXiEXZ4CVpYVzEjDH9Sb8vmZ3UljyA1GSOJl/6LGPO8EHLuSF9H+IxNXHPX8QHJ4g==" - "resolved" "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.24.5.tgz" - "version" "7.24.5" + version "7.24.5" + resolved "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.24.5.tgz" + integrity sha512-Nms86NXrsaeU9vbBJKni6gXiEXZ4CVpYVzEjDH9Sb8vmZ3UljyA1GSOJl/6LGPO8EHLuSF9H+IxNXHPX8QHJ4g== dependencies: - "regenerator-runtime" "^0.14.0" + regenerator-runtime "^0.14.0" "@icon-park/vue@^1.4.2": - "integrity" "sha512-YXXC53R0hjM76B2M4ANRI0m2bQB1cifUW+YXxQfGofITP6gr+pSMafBz/vzECYSkW3zZklm2mVuqQj4RAZGR2Q==" - "resolved" "https://registry.npmmirror.com/@icon-park/vue/-/vue-1.4.2.tgz" - "version" "1.4.2" + version "1.4.2" + resolved "https://registry.npmmirror.com/@icon-park/vue/-/vue-1.4.2.tgz" + integrity sha512-YXXC53R0hjM76B2M4ANRI0m2bQB1cifUW+YXxQfGofITP6gr+pSMafBz/vzECYSkW3zZklm2mVuqQj4RAZGR2Q== dependencies: "@vue/babel-helper-vue-jsx-merge-props" "^1.0.0" - "csstype" "^3.0.3" + csstype "^3.0.3" "@transloadit/prettier-bytes@0.0.7": - "integrity" "sha512-VeJbUb0wEKbcwaSlj5n+LscBl9IPgLPkHVGBkh00cztv6X4L/TJXK58LzFuBKX7/GAfiGhIwH67YTLTlzvIzBA==" - "resolved" "https://registry.npmmirror.com/@transloadit/prettier-bytes/-/prettier-bytes-0.0.7.tgz" - "version" "0.0.7" + version "0.0.7" + resolved "https://registry.npmmirror.com/@transloadit/prettier-bytes/-/prettier-bytes-0.0.7.tgz" + integrity sha512-VeJbUb0wEKbcwaSlj5n+LscBl9IPgLPkHVGBkh00cztv6X4L/TJXK58LzFuBKX7/GAfiGhIwH67YTLTlzvIzBA== "@types/caseless@*": - "integrity" "sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg==" - "resolved" "https://registry.npmmirror.com/@types/caseless/-/caseless-0.12.5.tgz" - "version" "0.12.5" + version "0.12.5" + resolved "https://registry.npmmirror.com/@types/caseless/-/caseless-0.12.5.tgz" + integrity sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg== "@types/crypto-js@^4.1.1": - "integrity" "sha512-FSPGd9+OcSok3RsM0UZ/9fcvMOXJ1ENE/ZbLfOPlBWj7BgXtEAM8VYfTtT760GiLbQIMoVozwVuisjvsVwqYWw==" - "resolved" "https://registry.npmmirror.com/@types/crypto-js/-/crypto-js-4.2.1.tgz" - "version" "4.2.1" + version "4.2.1" + resolved "https://registry.npmmirror.com/@types/crypto-js/-/crypto-js-4.2.1.tgz" + integrity sha512-FSPGd9+OcSok3RsM0UZ/9fcvMOXJ1ENE/ZbLfOPlBWj7BgXtEAM8VYfTtT760GiLbQIMoVozwVuisjvsVwqYWw== "@types/event-emitter@^0.3.3": - "integrity" "sha512-zx2/Gg0Eg7gwEiOIIh5w9TrhKKTeQh7CPCOPNc0el4pLSwzebA8SmnHwZs2dWlLONvyulykSwGSQxQHLhjGLvQ==" - "resolved" "https://registry.npmmirror.com/@types/event-emitter/-/event-emitter-0.3.5.tgz" - "version" "0.3.5" + version "0.3.5" + resolved "https://registry.npmmirror.com/@types/event-emitter/-/event-emitter-0.3.5.tgz" + integrity sha512-zx2/Gg0Eg7gwEiOIIh5w9TrhKKTeQh7CPCOPNc0el4pLSwzebA8SmnHwZs2dWlLONvyulykSwGSQxQHLhjGLvQ== "@types/node@*": - "integrity" "sha512-T2qwhjWwGH81vUEx4EXmBKsTJRXFXNZTL4v0gi01+zyBmCwzE6TyHszqX01m+QHTEq+EZNo13NeJIdEqf+Myrg==" - "resolved" "https://registry.npmmirror.com/@types/node/-/node-20.10.1.tgz" - "version" "20.10.1" + version "20.10.1" + resolved "https://registry.npmmirror.com/@types/node/-/node-20.10.1.tgz" + integrity sha512-T2qwhjWwGH81vUEx4EXmBKsTJRXFXNZTL4v0gi01+zyBmCwzE6TyHszqX01m+QHTEq+EZNo13NeJIdEqf+Myrg== dependencies: - "undici-types" "~5.26.4" + undici-types "~5.26.4" "@types/request@^2.48.8": - "integrity" "sha512-G3sY+NpsA9jnwm0ixhAFQSJ3Q9JkpLZpJbI3GMv0mIAT0y3mRabYeINzal5WOChIiaTEGQYlHOKgkaM9EisWHw==" - "resolved" "https://registry.npmmirror.com/@types/request/-/request-2.48.12.tgz" - "version" "2.48.12" + version "2.48.12" + resolved "https://registry.npmmirror.com/@types/request/-/request-2.48.12.tgz" + integrity sha512-G3sY+NpsA9jnwm0ixhAFQSJ3Q9JkpLZpJbI3GMv0mIAT0y3mRabYeINzal5WOChIiaTEGQYlHOKgkaM9EisWHw== dependencies: "@types/caseless" "*" "@types/node" "*" "@types/tough-cookie" "*" - "form-data" "^2.5.0" + form-data "^2.5.0" "@types/tough-cookie@*": - "integrity" "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==" - "resolved" "https://registry.npmmirror.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz" - "version" "4.0.5" + version "4.0.5" + resolved "https://registry.npmmirror.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz" + integrity sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA== "@uppy/companion-client@^2.2.2": - "integrity" "sha512-5mTp2iq97/mYSisMaBtFRry6PTgZA6SIL7LePteOV5x0/DxKfrZW3DEiQERJmYpHzy7k8johpm2gHnEKto56Og==" - "resolved" "https://registry.npmmirror.com/@uppy/companion-client/-/companion-client-2.2.2.tgz" - "version" "2.2.2" + version "2.2.2" + resolved "https://registry.npmmirror.com/@uppy/companion-client/-/companion-client-2.2.2.tgz" + integrity sha512-5mTp2iq97/mYSisMaBtFRry6PTgZA6SIL7LePteOV5x0/DxKfrZW3DEiQERJmYpHzy7k8johpm2gHnEKto56Og== dependencies: "@uppy/utils" "^4.1.2" - "namespace-emitter" "^2.0.1" + namespace-emitter "^2.0.1" "@uppy/core@^2.0.3", "@uppy/core@^2.1.1", "@uppy/core@^2.1.4", "@uppy/core@^2.3.3": - "integrity" "sha512-iWAqppC8FD8mMVqewavCz+TNaet6HPXitmGXpGGREGrakZ4FeuWytVdrelydzTdXx6vVKkOmI2FLztGg73sENQ==" - "resolved" "https://registry.npmmirror.com/@uppy/core/-/core-2.3.4.tgz" - "version" "2.3.4" + version "2.3.4" + resolved "https://registry.npmmirror.com/@uppy/core/-/core-2.3.4.tgz" + integrity sha512-iWAqppC8FD8mMVqewavCz+TNaet6HPXitmGXpGGREGrakZ4FeuWytVdrelydzTdXx6vVKkOmI2FLztGg73sENQ== dependencies: "@transloadit/prettier-bytes" "0.0.7" "@uppy/store-default" "^2.1.1" "@uppy/utils" "^4.1.3" - "lodash.throttle" "^4.1.1" - "mime-match" "^1.0.2" - "namespace-emitter" "^2.0.1" - "nanoid" "^3.1.25" - "preact" "^10.5.13" + lodash.throttle "^4.1.1" + mime-match "^1.0.2" + namespace-emitter "^2.0.1" + nanoid "^3.1.25" + preact "^10.5.13" "@uppy/store-default@^2.1.1": - "integrity" "sha512-xnpTxvot2SeAwGwbvmJ899ASk5tYXhmZzD/aCFsXePh/v8rNvR2pKlcQUH7cF/y4baUGq3FHO/daKCok/mpKqQ==" - "resolved" "https://registry.npmmirror.com/@uppy/store-default/-/store-default-2.1.1.tgz" - "version" "2.1.1" + version "2.1.1" + resolved "https://registry.npmmirror.com/@uppy/store-default/-/store-default-2.1.1.tgz" + integrity sha512-xnpTxvot2SeAwGwbvmJ899ASk5tYXhmZzD/aCFsXePh/v8rNvR2pKlcQUH7cF/y4baUGq3FHO/daKCok/mpKqQ== "@uppy/utils@^4.1.2", "@uppy/utils@^4.1.3": - "integrity" "sha512-nTuMvwWYobnJcytDO3t+D6IkVq/Qs4Xv3vyoEZ+Iaf8gegZP+rEyoaFT2CK5XLRMienPyqRqNbIfRuFaOWSIFw==" - "resolved" "https://registry.npmmirror.com/@uppy/utils/-/utils-4.1.3.tgz" - "version" "4.1.3" + version "4.1.3" + resolved "https://registry.npmmirror.com/@uppy/utils/-/utils-4.1.3.tgz" + integrity sha512-nTuMvwWYobnJcytDO3t+D6IkVq/Qs4Xv3vyoEZ+Iaf8gegZP+rEyoaFT2CK5XLRMienPyqRqNbIfRuFaOWSIFw== dependencies: - "lodash.throttle" "^4.1.1" + lodash.throttle "^4.1.1" "@uppy/xhr-upload@^2.0.3", "@uppy/xhr-upload@^2.0.7": - "integrity" "sha512-YWOQ6myBVPs+mhNjfdWsQyMRWUlrDLMoaG7nvf/G6Y3GKZf8AyjFDjvvJ49XWQ+DaZOftGkHmF1uh/DBeGivJQ==" - "resolved" "https://registry.npmmirror.com/@uppy/xhr-upload/-/xhr-upload-2.1.3.tgz" - "version" "2.1.3" + version "2.1.3" + resolved "https://registry.npmmirror.com/@uppy/xhr-upload/-/xhr-upload-2.1.3.tgz" + integrity sha512-YWOQ6myBVPs+mhNjfdWsQyMRWUlrDLMoaG7nvf/G6Y3GKZf8AyjFDjvvJ49XWQ+DaZOftGkHmF1uh/DBeGivJQ== dependencies: "@uppy/companion-client" "^2.2.2" "@uppy/utils" "^4.1.2" - "nanoid" "^3.1.25" + nanoid "^3.1.25" "@vant/area-data@^1.5.1": - "integrity" "sha512-gR5TPEzTbxN1cTK1aDhCoyikSCLX7DAacxyXoKyI4SAsYYTZrDl/nLgQFIm9vLsvWzlPIda8xV8/U3x7M9k6ww==" - "resolved" "https://registry.npmmirror.com/@vant/area-data/-/area-data-1.5.1.tgz" - "version" "1.5.1" + version "1.5.1" + resolved "https://registry.npmmirror.com/@vant/area-data/-/area-data-1.5.1.tgz" + integrity sha512-gR5TPEzTbxN1cTK1aDhCoyikSCLX7DAacxyXoKyI4SAsYYTZrDl/nLgQFIm9vLsvWzlPIda8xV8/U3x7M9k6ww== "@vue/babel-helper-vue-jsx-merge-props@^1.0.0": - "integrity" "sha512-JkqXfCkUDp4PIlFdDQ0TdXoIejMtTHP67/pvxlgeY+u5k3LEdKuWZ3LK6xkxo52uDoABIVyRwqVkfLQJhk7VBA==" - "resolved" "https://registry.npmmirror.com/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.4.0.tgz" - "version" "1.4.0" + version "1.4.0" + resolved "https://registry.npmmirror.com/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.4.0.tgz" + integrity sha512-JkqXfCkUDp4PIlFdDQ0TdXoIejMtTHP67/pvxlgeY+u5k3LEdKuWZ3LK6xkxo52uDoABIVyRwqVkfLQJhk7VBA== "@vue/compiler-sfc@2.7.15": - "integrity" "sha512-FCvIEevPmgCgqFBH7wD+3B97y7u7oj/Wr69zADBf403Tui377bThTjBvekaZvlRr4IwUAu3M6hYZeULZFJbdYg==" - "resolved" "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-2.7.15.tgz" - "version" "2.7.15" + version "2.7.15" + resolved "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-2.7.15.tgz" + integrity sha512-FCvIEevPmgCgqFBH7wD+3B97y7u7oj/Wr69zADBf403Tui377bThTjBvekaZvlRr4IwUAu3M6hYZeULZFJbdYg== dependencies: "@babel/parser" "^7.18.4" - "postcss" "^8.4.14" - "source-map" "^0.6.1" + postcss "^8.4.14" + source-map "^0.6.1" "@wangeditor/basic-modules@^1.1.7", "@wangeditor/basic-modules@1.x": - "integrity" "sha512-cY9CPkLJaqF05STqfpZKWG4LpxTMeGSIIF1fHvfm/mz+JXatCagjdkbxdikOuKYlxDdeqvOeBmsUBItufDLXZg==" - "resolved" "https://registry.npmmirror.com/@wangeditor/basic-modules/-/basic-modules-1.1.7.tgz" - "version" "1.1.7" + version "1.1.7" + resolved "https://registry.npmmirror.com/@wangeditor/basic-modules/-/basic-modules-1.1.7.tgz" + integrity sha512-cY9CPkLJaqF05STqfpZKWG4LpxTMeGSIIF1fHvfm/mz+JXatCagjdkbxdikOuKYlxDdeqvOeBmsUBItufDLXZg== dependencies: - "is-url" "^1.2.4" + is-url "^1.2.4" "@wangeditor/code-highlight@^1.0.3": - "integrity" "sha512-iazHwO14XpCuIWJNTQTikqUhGKyqj+dUNWJ9288Oym9M2xMVHvnsOmDU2sgUDWVy+pOLojReMPgXCsvvNlOOhw==" - "resolved" "https://registry.npmmirror.com/@wangeditor/code-highlight/-/code-highlight-1.0.3.tgz" - "version" "1.0.3" + version "1.0.3" + resolved "https://registry.npmmirror.com/@wangeditor/code-highlight/-/code-highlight-1.0.3.tgz" + integrity sha512-iazHwO14XpCuIWJNTQTikqUhGKyqj+dUNWJ9288Oym9M2xMVHvnsOmDU2sgUDWVy+pOLojReMPgXCsvvNlOOhw== dependencies: - "prismjs" "^1.23.0" + prismjs "^1.23.0" "@wangeditor/core@^1.1.19", "@wangeditor/core@1.x": - "integrity" "sha512-KevkB47+7GhVszyYF2pKGKtCSj/YzmClsD03C3zTt+9SR2XWT5T0e3yQqg8baZpcMvkjs1D8Dv4fk8ok/UaS2Q==" - "resolved" "https://registry.npmmirror.com/@wangeditor/core/-/core-1.1.19.tgz" - "version" "1.1.19" + version "1.1.19" + resolved "https://registry.npmmirror.com/@wangeditor/core/-/core-1.1.19.tgz" + integrity sha512-KevkB47+7GhVszyYF2pKGKtCSj/YzmClsD03C3zTt+9SR2XWT5T0e3yQqg8baZpcMvkjs1D8Dv4fk8ok/UaS2Q== dependencies: "@types/event-emitter" "^0.3.3" - "event-emitter" "^0.3.5" - "html-void-elements" "^2.0.0" - "i18next" "^20.4.0" - "scroll-into-view-if-needed" "^2.2.28" - "slate-history" "^0.66.0" + event-emitter "^0.3.5" + html-void-elements "^2.0.0" + i18next "^20.4.0" + scroll-into-view-if-needed "^2.2.28" + slate-history "^0.66.0" "@wangeditor/editor-for-vue@^1.0.2": - "integrity" "sha512-BOENvAXJVtVXlE2X50AAvjV82YlCUeu5cbeR0cvEQHQjYtiVnJtq7HSoj85r2kTgGouI5OrpJG9BBEjSjUSPyA==" - "resolved" "https://registry.npmmirror.com/@wangeditor/editor-for-vue/-/editor-for-vue-1.0.2.tgz" - "version" "1.0.2" + version "1.0.2" + resolved "https://registry.npmmirror.com/@wangeditor/editor-for-vue/-/editor-for-vue-1.0.2.tgz" + integrity sha512-BOENvAXJVtVXlE2X50AAvjV82YlCUeu5cbeR0cvEQHQjYtiVnJtq7HSoj85r2kTgGouI5OrpJG9BBEjSjUSPyA== "@wangeditor/editor@^5.1.23", "@wangeditor/editor@>=5.1.0": - "integrity" "sha512-0RxfeVTuK1tktUaPROnCoFfaHVJpRAIE2zdS0mpP+vq1axVQpLjM8+fCvKzqYIkH0Pg+C+44hJpe3VVroSkEuQ==" - "resolved" "https://registry.npmmirror.com/@wangeditor/editor/-/editor-5.1.23.tgz" - "version" "5.1.23" + version "5.1.23" + resolved "https://registry.npmmirror.com/@wangeditor/editor/-/editor-5.1.23.tgz" + integrity sha512-0RxfeVTuK1tktUaPROnCoFfaHVJpRAIE2zdS0mpP+vq1axVQpLjM8+fCvKzqYIkH0Pg+C+44hJpe3VVroSkEuQ== dependencies: "@uppy/core" "^2.1.1" "@uppy/xhr-upload" "^2.0.3" @@ -171,858 +171,858 @@ "@wangeditor/table-module" "^1.1.4" "@wangeditor/upload-image-module" "^1.0.2" "@wangeditor/video-module" "^1.1.4" - "dom7" "^3.0.0" - "is-hotkey" "^0.2.0" - "lodash.camelcase" "^4.3.0" - "lodash.clonedeep" "^4.5.0" - "lodash.debounce" "^4.0.8" - "lodash.foreach" "^4.5.0" - "lodash.isequal" "^4.5.0" - "lodash.throttle" "^4.1.1" - "lodash.toarray" "^4.4.0" - "nanoid" "^3.2.0" - "slate" "^0.72.0" - "snabbdom" "^3.1.0" + dom7 "^3.0.0" + is-hotkey "^0.2.0" + lodash.camelcase "^4.3.0" + lodash.clonedeep "^4.5.0" + lodash.debounce "^4.0.8" + lodash.foreach "^4.5.0" + lodash.isequal "^4.5.0" + lodash.throttle "^4.1.1" + lodash.toarray "^4.4.0" + nanoid "^3.2.0" + slate "^0.72.0" + snabbdom "^3.1.0" "@wangeditor/list-module@^1.0.5": - "integrity" "sha512-uDuYTP6DVhcYf7mF1pTlmNn5jOb4QtcVhYwSSAkyg09zqxI1qBqsfUnveeDeDqIuptSJhkh81cyxi+MF8sEPOQ==" - "resolved" "https://registry.npmmirror.com/@wangeditor/list-module/-/list-module-1.0.5.tgz" - "version" "1.0.5" + version "1.0.5" + resolved "https://registry.npmmirror.com/@wangeditor/list-module/-/list-module-1.0.5.tgz" + integrity sha512-uDuYTP6DVhcYf7mF1pTlmNn5jOb4QtcVhYwSSAkyg09zqxI1qBqsfUnveeDeDqIuptSJhkh81cyxi+MF8sEPOQ== "@wangeditor/table-module@^1.1.4": - "integrity" "sha512-5saanU9xuEocxaemGdNi9t8MCDSucnykEC6jtuiT72kt+/Hhh4nERYx1J20OPsTCCdVr7hIyQenFD1iSRkIQ6w==" - "resolved" "https://registry.npmmirror.com/@wangeditor/table-module/-/table-module-1.1.4.tgz" - "version" "1.1.4" + version "1.1.4" + resolved "https://registry.npmmirror.com/@wangeditor/table-module/-/table-module-1.1.4.tgz" + integrity sha512-5saanU9xuEocxaemGdNi9t8MCDSucnykEC6jtuiT72kt+/Hhh4nERYx1J20OPsTCCdVr7hIyQenFD1iSRkIQ6w== "@wangeditor/upload-image-module@^1.0.2": - "integrity" "sha512-z81lk/v71OwPDYeQDxj6cVr81aDP90aFuywb8nPD6eQeECtOymrqRODjpO6VGvCVxVck8nUxBHtbxKtjgcwyiA==" - "resolved" "https://registry.npmmirror.com/@wangeditor/upload-image-module/-/upload-image-module-1.0.2.tgz" - "version" "1.0.2" + version "1.0.2" + resolved "https://registry.npmmirror.com/@wangeditor/upload-image-module/-/upload-image-module-1.0.2.tgz" + integrity sha512-z81lk/v71OwPDYeQDxj6cVr81aDP90aFuywb8nPD6eQeECtOymrqRODjpO6VGvCVxVck8nUxBHtbxKtjgcwyiA== "@wangeditor/video-module@^1.1.4": - "integrity" "sha512-ZdodDPqKQrgx3IwWu4ZiQmXI8EXZ3hm2/fM6E3t5dB8tCaIGWQZhmqd6P5knfkRAd3z2+YRSRbxOGfoRSp/rLg==" - "resolved" "https://registry.npmmirror.com/@wangeditor/video-module/-/video-module-1.1.4.tgz" - "version" "1.1.4" + version "1.1.4" + resolved "https://registry.npmmirror.com/@wangeditor/video-module/-/video-module-1.1.4.tgz" + integrity sha512-ZdodDPqKQrgx3IwWu4ZiQmXI8EXZ3hm2/fM6E3t5dB8tCaIGWQZhmqd6P5knfkRAd3z2+YRSRbxOGfoRSp/rLg== -"ajv@^6.12.3": - "integrity" "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==" - "resolved" "https://registry.npmmirror.com/ajv/-/ajv-6.12.6.tgz" - "version" "6.12.6" +ajv@^6.12.3: + version "6.12.6" + resolved "https://registry.npmmirror.com/ajv/-/ajv-6.12.6.tgz" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== dependencies: - "fast-deep-equal" "^3.1.1" - "fast-json-stable-stringify" "^2.0.0" - "json-schema-traverse" "^0.4.1" - "uri-js" "^4.2.2" + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" -"asn1@~0.2.3": - "integrity" "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==" - "resolved" "https://registry.npmmirror.com/asn1/-/asn1-0.2.6.tgz" - "version" "0.2.6" +asn1@~0.2.3: + version "0.2.6" + resolved "https://registry.npmmirror.com/asn1/-/asn1-0.2.6.tgz" + integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== dependencies: - "safer-buffer" "~2.1.0" + safer-buffer "~2.1.0" -"assert-plus@^1.0.0", "assert-plus@1.0.0": - "integrity" "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==" - "resolved" "https://registry.npmmirror.com/assert-plus/-/assert-plus-1.0.0.tgz" - "version" "1.0.0" +assert-plus@^1.0.0, assert-plus@1.0.0: + version "1.0.0" + resolved "https://registry.npmmirror.com/assert-plus/-/assert-plus-1.0.0.tgz" + integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== -"async-validator@^4.2.5": - "integrity" "sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==" - "resolved" "https://registry.npmmirror.com/async-validator/-/async-validator-4.2.5.tgz" - "version" "4.2.5" +async-validator@^4.2.5: + version "4.2.5" + resolved "https://registry.npmmirror.com/async-validator/-/async-validator-4.2.5.tgz" + integrity sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg== -"async-validator@~1.8.1": - "integrity" "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==" - "resolved" "https://registry.npmmirror.com/async-validator/-/async-validator-1.8.5.tgz" - "version" "1.8.5" +async-validator@~1.8.1: + version "1.8.5" + resolved "https://registry.npmmirror.com/async-validator/-/async-validator-1.8.5.tgz" + integrity sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA== dependencies: - "babel-runtime" "6.x" + babel-runtime "6.x" -"async-validator@1.11.5": - "integrity" "sha512-XNtCsMAeAH1pdLMEg1z8/Bb3a8cdCbui9QbJATRFHHHW5kT6+NPI3zSVQUXgikTFITzsg+kYY5NTWhM2Orwt9w==" - "resolved" "https://registry.npmmirror.com/async-validator/-/async-validator-1.11.5.tgz" - "version" "1.11.5" +async-validator@1.11.5: + version "1.11.5" + resolved "https://registry.npmmirror.com/async-validator/-/async-validator-1.11.5.tgz" + integrity sha512-XNtCsMAeAH1pdLMEg1z8/Bb3a8cdCbui9QbJATRFHHHW5kT6+NPI3zSVQUXgikTFITzsg+kYY5NTWhM2Orwt9w== -"asynckit@^0.4.0": - "integrity" "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - "resolved" "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz" - "version" "0.4.0" +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz" + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== -"aws-sign2@~0.7.0": - "integrity" "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==" - "resolved" "https://registry.npmmirror.com/aws-sign2/-/aws-sign2-0.7.0.tgz" - "version" "0.7.0" +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.npmmirror.com/aws-sign2/-/aws-sign2-0.7.0.tgz" + integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA== -"aws4@^1.8.0": - "integrity" "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==" - "resolved" "https://registry.npmmirror.com/aws4/-/aws4-1.12.0.tgz" - "version" "1.12.0" +aws4@^1.8.0: + version "1.12.0" + resolved "https://registry.npmmirror.com/aws4/-/aws4-1.12.0.tgz" + integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== -"babel-helper-vue-jsx-merge-props@^2.0.0", "babel-helper-vue-jsx-merge-props@^2.0.3": - "integrity" "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg==" - "resolved" "https://registry.npmmirror.com/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz" - "version" "2.0.3" +babel-helper-vue-jsx-merge-props@^2.0.0, babel-helper-vue-jsx-merge-props@^2.0.3: + version "2.0.3" + resolved "https://registry.npmmirror.com/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz" + integrity sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg== -"babel-runtime@6.x": - "integrity" "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==" - "resolved" "https://registry.npmmirror.com/babel-runtime/-/babel-runtime-6.26.0.tgz" - "version" "6.26.0" +babel-runtime@6.x: + version "6.26.0" + resolved "https://registry.npmmirror.com/babel-runtime/-/babel-runtime-6.26.0.tgz" + integrity sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g== dependencies: - "core-js" "^2.4.0" - "regenerator-runtime" "^0.11.0" + core-js "^2.4.0" + regenerator-runtime "^0.11.0" -"bcrypt-pbkdf@^1.0.0": - "integrity" "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==" - "resolved" "https://registry.npmmirror.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz" - "version" "1.0.2" +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.npmmirror.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz" + integrity sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w== dependencies: - "tweetnacl" "^0.14.3" + tweetnacl "^0.14.3" -"caseless@~0.12.0": - "integrity" "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" - "resolved" "https://registry.npmmirror.com/caseless/-/caseless-0.12.0.tgz" - "version" "0.12.0" +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.npmmirror.com/caseless/-/caseless-0.12.0.tgz" + integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== -"charenc@0.0.2": - "integrity" "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==" - "resolved" "https://registry.npmmirror.com/charenc/-/charenc-0.0.2.tgz" - "version" "0.0.2" +charenc@0.0.2: + version "0.0.2" + resolved "https://registry.npmmirror.com/charenc/-/charenc-0.0.2.tgz" + integrity sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA== -"clipboard@^2.0.0": - "integrity" "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==" - "resolved" "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz" - "version" "2.0.11" +clipboard@^2.0.0: + version "2.0.11" + resolved "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz" + integrity sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw== dependencies: - "good-listener" "^1.2.2" - "select" "^1.1.2" - "tiny-emitter" "^2.0.0" + good-listener "^1.2.2" + select "^1.1.2" + tiny-emitter "^2.0.0" -"combined-stream@^1.0.6", "combined-stream@~1.0.6": - "integrity" "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==" - "resolved" "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz" - "version" "1.0.8" +combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== dependencies: - "delayed-stream" "~1.0.0" + delayed-stream "~1.0.0" -"compute-scroll-into-view@^1.0.20": - "integrity" "sha512-UCB0ioiyj8CRjtrvaceBLqqhZCVP+1B8+NWQhmdsm0VXOJtobBCf1dBQmebCCo34qZmUwZfIH2MZLqNHazrfjg==" - "resolved" "https://registry.npmmirror.com/compute-scroll-into-view/-/compute-scroll-into-view-1.0.20.tgz" - "version" "1.0.20" +compute-scroll-into-view@^1.0.20: + version "1.0.20" + resolved "https://registry.npmmirror.com/compute-scroll-into-view/-/compute-scroll-into-view-1.0.20.tgz" + integrity sha512-UCB0ioiyj8CRjtrvaceBLqqhZCVP+1B8+NWQhmdsm0VXOJtobBCf1dBQmebCCo34qZmUwZfIH2MZLqNHazrfjg== -"core-js@^2.4.0": - "integrity" "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==" - "resolved" "https://registry.npmmirror.com/core-js/-/core-js-2.6.12.tgz" - "version" "2.6.12" +core-js@^2.4.0: + version "2.6.12" + resolved "https://registry.npmmirror.com/core-js/-/core-js-2.6.12.tgz" + integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== -"core-js@^3.6.5": - "integrity" "sha512-fu5vHevQ8ZG4og+LXug8ulUtVxjOcEYvifJr7L5Bfq9GOztVqsKd9/59hUk2ZSbCrS3BqUr3EpaYGIYzq7g3Ug==" - "resolved" "https://registry.npmmirror.com/core-js/-/core-js-3.37.0.tgz" - "version" "3.37.0" +core-js@^3.6.5: + version "3.37.0" + resolved "https://registry.npmmirror.com/core-js/-/core-js-3.37.0.tgz" + integrity sha512-fu5vHevQ8ZG4og+LXug8ulUtVxjOcEYvifJr7L5Bfq9GOztVqsKd9/59hUk2ZSbCrS3BqUr3EpaYGIYzq7g3Ug== -"core-util-is@1.0.2": - "integrity" "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" - "resolved" "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.2.tgz" - "version" "1.0.2" +core-util-is@1.0.2: + version "1.0.2" + resolved "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.2.tgz" + integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== -"crypt@0.0.2": - "integrity" "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==" - "resolved" "https://registry.npmmirror.com/crypt/-/crypt-0.0.2.tgz" - "version" "0.0.2" +crypt@0.0.2: + version "0.0.2" + resolved "https://registry.npmmirror.com/crypt/-/crypt-0.0.2.tgz" + integrity sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow== -"crypto-js@^4.2.0": - "integrity" "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" - "resolved" "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.2.0.tgz" - "version" "4.2.0" +crypto-js@^4.2.0: + version "4.2.0" + resolved "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.2.0.tgz" + integrity sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q== -"csstype@^3.0.3", "csstype@^3.1.0": - "integrity" "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" - "resolved" "https://registry.npmmirror.com/csstype/-/csstype-3.1.2.tgz" - "version" "3.1.2" +csstype@^3.0.3, csstype@^3.1.0: + version "3.1.2" + resolved "https://registry.npmmirror.com/csstype/-/csstype-3.1.2.tgz" + integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ== -"d@^1.0.1", "d@^1.0.2", "d@1": - "integrity" "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==" - "resolved" "https://registry.npmmirror.com/d/-/d-1.0.2.tgz" - "version" "1.0.2" +d@^1.0.1, d@^1.0.2, d@1: + version "1.0.2" + resolved "https://registry.npmmirror.com/d/-/d-1.0.2.tgz" + integrity sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw== dependencies: - "es5-ext" "^0.10.64" - "type" "^2.7.2" + es5-ext "^0.10.64" + type "^2.7.2" -"dashdash@^1.12.0": - "integrity" "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==" - "resolved" "https://registry.npmmirror.com/dashdash/-/dashdash-1.14.1.tgz" - "version" "1.14.1" +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.npmmirror.com/dashdash/-/dashdash-1.14.1.tgz" + integrity sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g== dependencies: - "assert-plus" "^1.0.0" + assert-plus "^1.0.0" -"dayjs@^1.11.10": - "integrity" "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==" - "resolved" "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.10.tgz" - "version" "1.11.10" +dayjs@^1.11.10: + version "1.11.10" + resolved "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.10.tgz" + integrity sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ== -"deepmerge@^1.2.0": - "integrity" "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==" - "resolved" "https://registry.npmmirror.com/deepmerge/-/deepmerge-1.5.2.tgz" - "version" "1.5.2" +deepmerge@^1.2.0: + version "1.5.2" + resolved "https://registry.npmmirror.com/deepmerge/-/deepmerge-1.5.2.tgz" + integrity sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ== -"delayed-stream@~1.0.0": - "integrity" "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" - "resolved" "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz" - "version" "1.0.0" +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz" + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== -"delegate@^3.1.2": - "integrity" "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==" - "resolved" "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz" - "version" "3.2.0" +delegate@^3.1.2: + version "3.2.0" + resolved "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz" + integrity sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw== -"dom7@^3.0.0": - "integrity" "sha512-oNlcUdHsC4zb7Msx7JN3K0Nro1dzJ48knvBOnDPKJ2GV9wl1i5vydJZUSyOfrkKFDZEud/jBsTk92S/VGSAe/g==" - "resolved" "https://registry.npmmirror.com/dom7/-/dom7-3.0.0.tgz" - "version" "3.0.0" +dom7@^3.0.0: + version "3.0.0" + resolved "https://registry.npmmirror.com/dom7/-/dom7-3.0.0.tgz" + integrity sha512-oNlcUdHsC4zb7Msx7JN3K0Nro1dzJ48knvBOnDPKJ2GV9wl1i5vydJZUSyOfrkKFDZEud/jBsTk92S/VGSAe/g== dependencies: - "ssr-window" "^3.0.0-alpha.1" + ssr-window "^3.0.0-alpha.1" -"ecc-jsbn@~0.1.1": - "integrity" "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==" - "resolved" "https://registry.npmmirror.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz" - "version" "0.1.2" +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.npmmirror.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz" + integrity sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw== dependencies: - "jsbn" "~0.1.0" - "safer-buffer" "^2.1.0" + jsbn "~0.1.0" + safer-buffer "^2.1.0" -"element-ui@^2.15.1", "element-ui@2.15.13": - "integrity" "sha512-LJoatEYX6WV74FqXBss8Xfho9fh9rjDSzrDrTyREdGb1h1R3uRvmLh5jqp2JU137aj4/BgqA3K06RQpQBX33Bg==" - "resolved" "https://registry.npmmirror.com/element-ui/-/element-ui-2.15.13.tgz" - "version" "2.15.13" +element-ui@^2.15.1, element-ui@2.15.13: + version "2.15.13" + resolved "https://registry.npmmirror.com/element-ui/-/element-ui-2.15.13.tgz" + integrity sha512-LJoatEYX6WV74FqXBss8Xfho9fh9rjDSzrDrTyREdGb1h1R3uRvmLh5jqp2JU137aj4/BgqA3K06RQpQBX33Bg== dependencies: - "async-validator" "~1.8.1" - "babel-helper-vue-jsx-merge-props" "^2.0.0" - "deepmerge" "^1.2.0" - "normalize-wheel" "^1.0.1" - "resize-observer-polyfill" "^1.5.0" - "throttle-debounce" "^1.0.1" + async-validator "~1.8.1" + babel-helper-vue-jsx-merge-props "^2.0.0" + deepmerge "^1.2.0" + normalize-wheel "^1.0.1" + resize-observer-polyfill "^1.5.0" + throttle-debounce "^1.0.1" -"es5-ext@^0.10.35", "es5-ext@^0.10.62", "es5-ext@^0.10.64", "es5-ext@~0.10.14": - "integrity" "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==" - "resolved" "https://registry.npmmirror.com/es5-ext/-/es5-ext-0.10.64.tgz" - "version" "0.10.64" +es5-ext@^0.10.35, es5-ext@^0.10.62, es5-ext@^0.10.64, es5-ext@~0.10.14: + version "0.10.64" + resolved "https://registry.npmmirror.com/es5-ext/-/es5-ext-0.10.64.tgz" + integrity sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg== dependencies: - "es6-iterator" "^2.0.3" - "es6-symbol" "^3.1.3" - "esniff" "^2.0.1" - "next-tick" "^1.1.0" + es6-iterator "^2.0.3" + es6-symbol "^3.1.3" + esniff "^2.0.1" + next-tick "^1.1.0" -"es6-iterator@^2.0.3": - "integrity" "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==" - "resolved" "https://registry.npmmirror.com/es6-iterator/-/es6-iterator-2.0.3.tgz" - "version" "2.0.3" +es6-iterator@^2.0.3: + version "2.0.3" + resolved "https://registry.npmmirror.com/es6-iterator/-/es6-iterator-2.0.3.tgz" + integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g== dependencies: - "d" "1" - "es5-ext" "^0.10.35" - "es6-symbol" "^3.1.1" + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" -"es6-symbol@^3.1.1", "es6-symbol@^3.1.3": - "integrity" "sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==" - "resolved" "https://registry.npmmirror.com/es6-symbol/-/es6-symbol-3.1.4.tgz" - "version" "3.1.4" +es6-symbol@^3.1.1, es6-symbol@^3.1.3: + version "3.1.4" + resolved "https://registry.npmmirror.com/es6-symbol/-/es6-symbol-3.1.4.tgz" + integrity sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg== dependencies: - "d" "^1.0.2" - "ext" "^1.7.0" + d "^1.0.2" + ext "^1.7.0" -"esniff@^2.0.1": - "integrity" "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==" - "resolved" "https://registry.npmmirror.com/esniff/-/esniff-2.0.1.tgz" - "version" "2.0.1" +esniff@^2.0.1: + version "2.0.1" + resolved "https://registry.npmmirror.com/esniff/-/esniff-2.0.1.tgz" + integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg== dependencies: - "d" "^1.0.1" - "es5-ext" "^0.10.62" - "event-emitter" "^0.3.5" - "type" "^2.7.2" + d "^1.0.1" + es5-ext "^0.10.62" + event-emitter "^0.3.5" + type "^2.7.2" -"event-emitter@^0.3.5": - "integrity" "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==" - "resolved" "https://registry.npmmirror.com/event-emitter/-/event-emitter-0.3.5.tgz" - "version" "0.3.5" +event-emitter@^0.3.5: + version "0.3.5" + resolved "https://registry.npmmirror.com/event-emitter/-/event-emitter-0.3.5.tgz" + integrity sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA== dependencies: - "d" "1" - "es5-ext" "~0.10.14" + d "1" + es5-ext "~0.10.14" -"ext@^1.7.0": - "integrity" "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==" - "resolved" "https://registry.npmmirror.com/ext/-/ext-1.7.0.tgz" - "version" "1.7.0" +ext@^1.7.0: + version "1.7.0" + resolved "https://registry.npmmirror.com/ext/-/ext-1.7.0.tgz" + integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== dependencies: - "type" "^2.7.2" + type "^2.7.2" -"extend@~3.0.2": - "integrity" "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - "resolved" "https://registry.npmmirror.com/extend/-/extend-3.0.2.tgz" - "version" "3.0.2" +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.npmmirror.com/extend/-/extend-3.0.2.tgz" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== -"extsprintf@^1.2.0", "extsprintf@1.3.0": - "integrity" "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==" - "resolved" "https://registry.npmmirror.com/extsprintf/-/extsprintf-1.3.0.tgz" - "version" "1.3.0" +extsprintf@^1.2.0, extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.npmmirror.com/extsprintf/-/extsprintf-1.3.0.tgz" + integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g== -"fast-deep-equal@^3.1.1": - "integrity" "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - "resolved" "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" - "version" "3.1.3" +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -"fast-json-stable-stringify@^2.0.0": - "integrity" "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - "resolved" "https://registry.npmmirror.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" - "version" "2.1.0" +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.npmmirror.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== -"forever-agent@~0.6.1": - "integrity" "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==" - "resolved" "https://registry.npmmirror.com/forever-agent/-/forever-agent-0.6.1.tgz" - "version" "0.6.1" +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.npmmirror.com/forever-agent/-/forever-agent-0.6.1.tgz" + integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== -"form-data@^2.5.0": - "integrity" "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==" - "resolved" "https://registry.npmmirror.com/form-data/-/form-data-2.5.1.tgz" - "version" "2.5.1" +form-data@^2.5.0: + version "2.5.1" + resolved "https://registry.npmmirror.com/form-data/-/form-data-2.5.1.tgz" + integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== dependencies: - "asynckit" "^0.4.0" - "combined-stream" "^1.0.6" - "mime-types" "^2.1.12" + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" -"form-data@~2.3.2": - "integrity" "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==" - "resolved" "https://registry.npmmirror.com/form-data/-/form-data-2.3.3.tgz" - "version" "2.3.3" +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.npmmirror.com/form-data/-/form-data-2.3.3.tgz" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== dependencies: - "asynckit" "^0.4.0" - "combined-stream" "^1.0.6" - "mime-types" "^2.1.12" + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" -"getpass@^0.1.1": - "integrity" "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==" - "resolved" "https://registry.npmmirror.com/getpass/-/getpass-0.1.7.tgz" - "version" "0.1.7" +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.npmmirror.com/getpass/-/getpass-0.1.7.tgz" + integrity sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng== dependencies: - "assert-plus" "^1.0.0" + assert-plus "^1.0.0" -"good-listener@^1.2.2": - "integrity" "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==" - "resolved" "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz" - "version" "1.2.2" +good-listener@^1.2.2: + version "1.2.2" + resolved "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz" + integrity sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw== dependencies: - "delegate" "^3.1.2" + delegate "^3.1.2" -"har-schema@^2.0.0": - "integrity" "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==" - "resolved" "https://registry.npmmirror.com/har-schema/-/har-schema-2.0.0.tgz" - "version" "2.0.0" +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.npmmirror.com/har-schema/-/har-schema-2.0.0.tgz" + integrity sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q== -"har-validator@~5.1.3": - "integrity" "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==" - "resolved" "https://registry.npmmirror.com/har-validator/-/har-validator-5.1.5.tgz" - "version" "5.1.5" +har-validator@~5.1.3: + version "5.1.5" + resolved "https://registry.npmmirror.com/har-validator/-/har-validator-5.1.5.tgz" + integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== dependencies: - "ajv" "^6.12.3" - "har-schema" "^2.0.0" + ajv "^6.12.3" + har-schema "^2.0.0" -"html-void-elements@^2.0.0": - "integrity" "sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A==" - "resolved" "https://registry.npmmirror.com/html-void-elements/-/html-void-elements-2.0.1.tgz" - "version" "2.0.1" +html-void-elements@^2.0.0: + version "2.0.1" + resolved "https://registry.npmmirror.com/html-void-elements/-/html-void-elements-2.0.1.tgz" + integrity sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A== -"http-signature@~1.2.0": - "integrity" "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==" - "resolved" "https://registry.npmmirror.com/http-signature/-/http-signature-1.2.0.tgz" - "version" "1.2.0" +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.npmmirror.com/http-signature/-/http-signature-1.2.0.tgz" + integrity sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ== dependencies: - "assert-plus" "^1.0.0" - "jsprim" "^1.2.2" - "sshpk" "^1.7.0" + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" -"i18next@^20.4.0": - "integrity" "sha512-yCMYTMEJ9ihCwEQQ3phLo7I/Pwycf8uAx+sRHwwk5U9Aui/IZYgQRyMqXafQOw5QQ7DM1Z+WyEXWIqSuJHhG2A==" - "resolved" "https://registry.npmmirror.com/i18next/-/i18next-20.6.1.tgz" - "version" "20.6.1" +i18next@^20.4.0: + version "20.6.1" + resolved "https://registry.npmmirror.com/i18next/-/i18next-20.6.1.tgz" + integrity sha512-yCMYTMEJ9ihCwEQQ3phLo7I/Pwycf8uAx+sRHwwk5U9Aui/IZYgQRyMqXafQOw5QQ7DM1Z+WyEXWIqSuJHhG2A== dependencies: "@babel/runtime" "^7.12.0" -"immer@^9.0.6": - "integrity" "sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA==" - "resolved" "https://registry.npmmirror.com/immer/-/immer-9.0.21.tgz" - "version" "9.0.21" +immer@^9.0.6: + version "9.0.21" + resolved "https://registry.npmmirror.com/immer/-/immer-9.0.21.tgz" + integrity sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA== -"is-buffer@~1.1.6": - "integrity" "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - "resolved" "https://registry.npmmirror.com/is-buffer/-/is-buffer-1.1.6.tgz" - "version" "1.1.6" +is-buffer@~1.1.6: + version "1.1.6" + resolved "https://registry.npmmirror.com/is-buffer/-/is-buffer-1.1.6.tgz" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -"is-hotkey@^0.2.0": - "integrity" "sha512-UknnZK4RakDmTgz4PI1wIph5yxSs/mvChWs9ifnlXsKuXgWmOkY/hAE0H/k2MIqH0RlRye0i1oC07MCRSD28Mw==" - "resolved" "https://registry.npmmirror.com/is-hotkey/-/is-hotkey-0.2.0.tgz" - "version" "0.2.0" +is-hotkey@^0.2.0: + version "0.2.0" + resolved "https://registry.npmmirror.com/is-hotkey/-/is-hotkey-0.2.0.tgz" + integrity sha512-UknnZK4RakDmTgz4PI1wIph5yxSs/mvChWs9ifnlXsKuXgWmOkY/hAE0H/k2MIqH0RlRye0i1oC07MCRSD28Mw== -"is-plain-object@^5.0.0": - "integrity" "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" - "resolved" "https://registry.npmmirror.com/is-plain-object/-/is-plain-object-5.0.0.tgz" - "version" "5.0.0" +is-plain-object@^5.0.0: + version "5.0.0" + resolved "https://registry.npmmirror.com/is-plain-object/-/is-plain-object-5.0.0.tgz" + integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== -"is-typedarray@~1.0.0": - "integrity" "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" - "resolved" "https://registry.npmmirror.com/is-typedarray/-/is-typedarray-1.0.0.tgz" - "version" "1.0.0" +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.npmmirror.com/is-typedarray/-/is-typedarray-1.0.0.tgz" + integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== -"is-url@^1.2.4": - "integrity" "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==" - "resolved" "https://registry.npmmirror.com/is-url/-/is-url-1.2.4.tgz" - "version" "1.2.4" +is-url@^1.2.4: + version "1.2.4" + resolved "https://registry.npmmirror.com/is-url/-/is-url-1.2.4.tgz" + integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww== -"isstream@~0.1.2": - "integrity" "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" - "resolved" "https://registry.npmmirror.com/isstream/-/isstream-0.1.2.tgz" - "version" "0.1.2" +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.npmmirror.com/isstream/-/isstream-0.1.2.tgz" + integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== -"jsbn@~0.1.0": - "integrity" "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" - "resolved" "https://registry.npmmirror.com/jsbn/-/jsbn-0.1.1.tgz" - "version" "0.1.1" +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.npmmirror.com/jsbn/-/jsbn-0.1.1.tgz" + integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== -"json-schema-traverse@^0.4.1": - "integrity" "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - "resolved" "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" - "version" "0.4.1" +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== -"json-schema@0.4.0": - "integrity" "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" - "resolved" "https://registry.npmmirror.com/json-schema/-/json-schema-0.4.0.tgz" - "version" "0.4.0" +json-schema@0.4.0: + version "0.4.0" + resolved "https://registry.npmmirror.com/json-schema/-/json-schema-0.4.0.tgz" + integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== -"json-stringify-safe@~5.0.1": - "integrity" "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" - "resolved" "https://registry.npmmirror.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" - "version" "5.0.1" +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.npmmirror.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" + integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== -"jsprim@^1.2.2": - "integrity" "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==" - "resolved" "https://registry.npmmirror.com/jsprim/-/jsprim-1.4.2.tgz" - "version" "1.4.2" +jsprim@^1.2.2: + version "1.4.2" + resolved "https://registry.npmmirror.com/jsprim/-/jsprim-1.4.2.tgz" + integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== dependencies: - "assert-plus" "1.0.0" - "extsprintf" "1.3.0" - "json-schema" "0.4.0" - "verror" "1.10.0" + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.4.0" + verror "1.10.0" -"lodash.camelcase@^4.3.0": - "integrity" "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" - "resolved" "https://registry.npmmirror.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz" - "version" "4.3.0" +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.npmmirror.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz" + integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== -"lodash.clonedeep@^4.5.0": - "integrity" "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==" - "resolved" "https://registry.npmmirror.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz" - "version" "4.5.0" +lodash.clonedeep@^4.5.0: + version "4.5.0" + resolved "https://registry.npmmirror.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz" + integrity sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ== -"lodash.debounce@^4.0.8": - "integrity" "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==" - "resolved" "https://registry.npmmirror.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz" - "version" "4.0.8" +lodash.debounce@^4.0.8: + version "4.0.8" + resolved "https://registry.npmmirror.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz" + integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== -"lodash.foreach@^4.5.0": - "integrity" "sha512-aEXTF4d+m05rVOAUG3z4vZZ4xVexLKZGF0lIxuHZ1Hplpk/3B6Z1+/ICICYRLm7c41Z2xiejbkCkJoTlypoXhQ==" - "resolved" "https://registry.npmmirror.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz" - "version" "4.5.0" +lodash.foreach@^4.5.0: + version "4.5.0" + resolved "https://registry.npmmirror.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz" + integrity sha512-aEXTF4d+m05rVOAUG3z4vZZ4xVexLKZGF0lIxuHZ1Hplpk/3B6Z1+/ICICYRLm7c41Z2xiejbkCkJoTlypoXhQ== -"lodash.isequal@^4.5.0": - "integrity" "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" - "resolved" "https://registry.npmmirror.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz" - "version" "4.5.0" +lodash.isequal@^4.5.0: + version "4.5.0" + resolved "https://registry.npmmirror.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz" + integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== -"lodash.throttle@^4.1.1": - "integrity" "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==" - "resolved" "https://registry.npmmirror.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz" - "version" "4.1.1" +lodash.throttle@^4.1.1: + version "4.1.1" + resolved "https://registry.npmmirror.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz" + integrity sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ== -"lodash.toarray@^4.4.0": - "integrity" "sha512-QyffEA3i5dma5q2490+SgCvDN0pXLmRGSyAANuVi0HQ01Pkfr9fuoKQW8wm1wGBnJITs/mS7wQvS6VshUEBFCw==" - "resolved" "https://registry.npmmirror.com/lodash.toarray/-/lodash.toarray-4.4.0.tgz" - "version" "4.4.0" +lodash.toarray@^4.4.0: + version "4.4.0" + resolved "https://registry.npmmirror.com/lodash.toarray/-/lodash.toarray-4.4.0.tgz" + integrity sha512-QyffEA3i5dma5q2490+SgCvDN0pXLmRGSyAANuVi0HQ01Pkfr9fuoKQW8wm1wGBnJITs/mS7wQvS6VshUEBFCw== -"lodash@^4.17.21": - "integrity" "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - "resolved" "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz" - "version" "4.17.21" +lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -"md5@^2.3.0": - "integrity" "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==" - "resolved" "https://registry.npmmirror.com/md5/-/md5-2.3.0.tgz" - "version" "2.3.0" +md5@^2.3.0: + version "2.3.0" + resolved "https://registry.npmmirror.com/md5/-/md5-2.3.0.tgz" + integrity sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g== dependencies: - "charenc" "0.0.2" - "crypt" "0.0.2" - "is-buffer" "~1.1.6" + charenc "0.0.2" + crypt "0.0.2" + is-buffer "~1.1.6" -"mime-db@1.52.0": - "integrity" "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" - "resolved" "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz" - "version" "1.52.0" +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -"mime-match@^1.0.2": - "integrity" "sha512-VXp/ugGDVh3eCLOBCiHZMYWQaTNUHv2IJrut+yXA6+JbLPXHglHwfS/5A5L0ll+jkCY7fIzRJcH6OIunF+c6Cg==" - "resolved" "https://registry.npmmirror.com/mime-match/-/mime-match-1.0.2.tgz" - "version" "1.0.2" +mime-match@^1.0.2: + version "1.0.2" + resolved "https://registry.npmmirror.com/mime-match/-/mime-match-1.0.2.tgz" + integrity sha512-VXp/ugGDVh3eCLOBCiHZMYWQaTNUHv2IJrut+yXA6+JbLPXHglHwfS/5A5L0ll+jkCY7fIzRJcH6OIunF+c6Cg== dependencies: - "wildcard" "^1.1.0" + wildcard "^1.1.0" -"mime-types@^2.1.12", "mime-types@~2.1.19": - "integrity" "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==" - "resolved" "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz" - "version" "2.1.35" +mime-types@^2.1.12, mime-types@~2.1.19: + version "2.1.35" + resolved "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: - "mime-db" "1.52.0" + mime-db "1.52.0" -"namespace-emitter@^2.0.1": - "integrity" "sha512-N/sMKHniSDJBjfrkbS/tpkPj4RAbvW3mr8UAzvlMHyun93XEm83IAvhWtJVHo+RHn/oO8Job5YN4b+wRjSVp5g==" - "resolved" "https://registry.npmmirror.com/namespace-emitter/-/namespace-emitter-2.0.1.tgz" - "version" "2.0.1" +namespace-emitter@^2.0.1: + version "2.0.1" + resolved "https://registry.npmmirror.com/namespace-emitter/-/namespace-emitter-2.0.1.tgz" + integrity sha512-N/sMKHniSDJBjfrkbS/tpkPj4RAbvW3mr8UAzvlMHyun93XEm83IAvhWtJVHo+RHn/oO8Job5YN4b+wRjSVp5g== -"nanoid@^3.1.25", "nanoid@^3.2.0", "nanoid@^3.3.6": - "integrity" "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==" - "resolved" "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.7.tgz" - "version" "3.3.7" +nanoid@^3.1.25, nanoid@^3.2.0, nanoid@^3.3.6: + version "3.3.7" + resolved "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.7.tgz" + integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== -"next-tick@^1.1.0": - "integrity" "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" - "resolved" "https://registry.npmmirror.com/next-tick/-/next-tick-1.1.0.tgz" - "version" "1.1.0" +next-tick@^1.1.0: + version "1.1.0" + resolved "https://registry.npmmirror.com/next-tick/-/next-tick-1.1.0.tgz" + integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== -"normalize-wheel@^1.0.1": - "integrity" "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA==" - "resolved" "https://registry.npmmirror.com/normalize-wheel/-/normalize-wheel-1.0.1.tgz" - "version" "1.0.1" +normalize-wheel@^1.0.1: + version "1.0.1" + resolved "https://registry.npmmirror.com/normalize-wheel/-/normalize-wheel-1.0.1.tgz" + integrity sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA== -"oauth-sign@~0.9.0": - "integrity" "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" - "resolved" "https://registry.npmmirror.com/oauth-sign/-/oauth-sign-0.9.0.tgz" - "version" "0.9.0" +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.npmmirror.com/oauth-sign/-/oauth-sign-0.9.0.tgz" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== -"performance-now@^2.1.0": - "integrity" "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" - "resolved" "https://registry.npmmirror.com/performance-now/-/performance-now-2.1.0.tgz" - "version" "2.1.0" +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.npmmirror.com/performance-now/-/performance-now-2.1.0.tgz" + integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== -"picocolors@^1.0.0": - "integrity" "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" - "resolved" "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz" - "version" "1.0.0" +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== -"postcss@^8.4.14": - "integrity" "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==" - "resolved" "https://registry.npmmirror.com/postcss/-/postcss-8.4.31.tgz" - "version" "8.4.31" +postcss@^8.4.14: + version "8.4.31" + resolved "https://registry.npmmirror.com/postcss/-/postcss-8.4.31.tgz" + integrity sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ== dependencies: - "nanoid" "^3.3.6" - "picocolors" "^1.0.0" - "source-map-js" "^1.0.2" + nanoid "^3.3.6" + picocolors "^1.0.0" + source-map-js "^1.0.2" -"preact@^10.5.13": - "integrity" "sha512-aQAIxtzWEwH8ou+OovWVSVNlFImL7xUCwJX3YMqA3U8iKCNC34999fFOnWjYNsylgfPgMexpbk7WYOLtKr/mxg==" - "resolved" "https://registry.npmmirror.com/preact/-/preact-10.21.0.tgz" - "version" "10.21.0" +preact@^10.5.13: + version "10.21.0" + resolved "https://registry.npmmirror.com/preact/-/preact-10.21.0.tgz" + integrity sha512-aQAIxtzWEwH8ou+OovWVSVNlFImL7xUCwJX3YMqA3U8iKCNC34999fFOnWjYNsylgfPgMexpbk7WYOLtKr/mxg== -"prismjs@^1.23.0": - "integrity" "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==" - "resolved" "https://registry.npmmirror.com/prismjs/-/prismjs-1.29.0.tgz" - "version" "1.29.0" +prismjs@^1.23.0: + version "1.29.0" + resolved "https://registry.npmmirror.com/prismjs/-/prismjs-1.29.0.tgz" + integrity sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q== -"psl@^1.1.28": - "integrity" "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" - "resolved" "https://registry.npmmirror.com/psl/-/psl-1.9.0.tgz" - "version" "1.9.0" +psl@^1.1.28: + version "1.9.0" + resolved "https://registry.npmmirror.com/psl/-/psl-1.9.0.tgz" + integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== -"punycode@^2.1.0", "punycode@^2.1.1": - "integrity" "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==" - "resolved" "https://registry.npmmirror.com/punycode/-/punycode-2.3.1.tgz" - "version" "2.3.1" +punycode@^2.1.0, punycode@^2.1.1: + version "2.3.1" + resolved "https://registry.npmmirror.com/punycode/-/punycode-2.3.1.tgz" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== -"qs@~6.5.2": - "integrity" "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==" - "resolved" "https://registry.npmmirror.com/qs/-/qs-6.5.3.tgz" - "version" "6.5.3" +qs@~6.5.2: + version "6.5.3" + resolved "https://registry.npmmirror.com/qs/-/qs-6.5.3.tgz" + integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== -"regenerator-runtime@^0.11.0": - "integrity" "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" - "resolved" "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz" - "version" "0.11.1" +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz" + integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== -"regenerator-runtime@^0.14.0": - "integrity" "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" - "resolved" "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz" - "version" "0.14.1" +regenerator-runtime@^0.14.0: + version "0.14.1" + resolved "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz" + integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== -"request@^2.88.2": - "integrity" "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==" - "resolved" "https://registry.npmmirror.com/request/-/request-2.88.2.tgz" - "version" "2.88.2" +request@^2.88.2: + version "2.88.2" + resolved "https://registry.npmmirror.com/request/-/request-2.88.2.tgz" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== dependencies: - "aws-sign2" "~0.7.0" - "aws4" "^1.8.0" - "caseless" "~0.12.0" - "combined-stream" "~1.0.6" - "extend" "~3.0.2" - "forever-agent" "~0.6.1" - "form-data" "~2.3.2" - "har-validator" "~5.1.3" - "http-signature" "~1.2.0" - "is-typedarray" "~1.0.0" - "isstream" "~0.1.2" - "json-stringify-safe" "~5.0.1" - "mime-types" "~2.1.19" - "oauth-sign" "~0.9.0" - "performance-now" "^2.1.0" - "qs" "~6.5.2" - "safe-buffer" "^5.1.2" - "tough-cookie" "~2.5.0" - "tunnel-agent" "^0.6.0" - "uuid" "^3.3.2" + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" -"resize-observer-polyfill@^1.5.0", "resize-observer-polyfill@^1.5.1": - "integrity" "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" - "resolved" "https://registry.npmmirror.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz" - "version" "1.5.1" +resize-observer-polyfill@^1.5.0, resize-observer-polyfill@^1.5.1: + version "1.5.1" + resolved "https://registry.npmmirror.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz" + integrity sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg== -"safe-buffer@^5.0.1", "safe-buffer@^5.1.2": - "integrity" "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - "resolved" "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz" - "version" "5.2.1" +safe-buffer@^5.0.1, safe-buffer@^5.1.2: + version "5.2.1" + resolved "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -"safer-buffer@^2.0.2", "safer-buffer@^2.1.0", "safer-buffer@~2.1.0": - "integrity" "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - "resolved" "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz" - "version" "2.1.2" +safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -"scroll-into-view-if-needed@^2.2.28": - "integrity" "sha512-dGCXy99wZQivjmjIqihaBQNjryrz5rueJY7eHfTdyWEiR4ttYpsajb14rn9s5d4DY4EcY6+4+U/maARBXJedkA==" - "resolved" "https://registry.npmmirror.com/scroll-into-view-if-needed/-/scroll-into-view-if-needed-2.2.31.tgz" - "version" "2.2.31" +scroll-into-view-if-needed@^2.2.28: + version "2.2.31" + resolved "https://registry.npmmirror.com/scroll-into-view-if-needed/-/scroll-into-view-if-needed-2.2.31.tgz" + integrity sha512-dGCXy99wZQivjmjIqihaBQNjryrz5rueJY7eHfTdyWEiR4ttYpsajb14rn9s5d4DY4EcY6+4+U/maARBXJedkA== dependencies: - "compute-scroll-into-view" "^1.0.20" + compute-scroll-into-view "^1.0.20" -"select@^1.1.2": - "integrity" "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==" - "resolved" "https://registry.npmmirror.com/select/-/select-1.1.2.tgz" - "version" "1.1.2" +select@^1.1.2: + version "1.1.2" + resolved "https://registry.npmmirror.com/select/-/select-1.1.2.tgz" + integrity sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA== -"slate-history@^0.66.0": - "integrity" "sha512-6MWpxGQZiMvSINlCbMW43E2YBSVMCMCIwQfBzGssjWw4kb0qfvj0pIdblWNRQZD0hR6WHP+dHHgGSeVdMWzfng==" - "resolved" "https://registry.npmmirror.com/slate-history/-/slate-history-0.66.0.tgz" - "version" "0.66.0" +slate-history@^0.66.0: + version "0.66.0" + resolved "https://registry.npmmirror.com/slate-history/-/slate-history-0.66.0.tgz" + integrity sha512-6MWpxGQZiMvSINlCbMW43E2YBSVMCMCIwQfBzGssjWw4kb0qfvj0pIdblWNRQZD0hR6WHP+dHHgGSeVdMWzfng== dependencies: - "is-plain-object" "^5.0.0" + is-plain-object "^5.0.0" -"slate@^0.72.0", "slate@>=0.65.3": - "integrity" "sha512-/nJwTswQgnRurpK+bGJFH1oM7naD5qDmHd89JyiKNT2oOKD8marW0QSBtuFnwEbL5aGCS8AmrhXQgNOsn4osAw==" - "resolved" "https://registry.npmmirror.com/slate/-/slate-0.72.8.tgz" - "version" "0.72.8" +slate@^0.72.0, slate@>=0.65.3: + version "0.72.8" + resolved "https://registry.npmmirror.com/slate/-/slate-0.72.8.tgz" + integrity sha512-/nJwTswQgnRurpK+bGJFH1oM7naD5qDmHd89JyiKNT2oOKD8marW0QSBtuFnwEbL5aGCS8AmrhXQgNOsn4osAw== dependencies: - "immer" "^9.0.6" - "is-plain-object" "^5.0.0" - "tiny-warning" "^1.0.3" + immer "^9.0.6" + is-plain-object "^5.0.0" + tiny-warning "^1.0.3" -"snabbdom@^3.1.0": - "integrity" "sha512-ig5qOnCDbugFntKi6c7Xlib8bA6xiJVk8O+WdFrV3wxbMqeHO0hXFQC4nAhPVWfZfi8255lcZkNhtIBINCc4+Q==" - "resolved" "https://registry.npmmirror.com/snabbdom/-/snabbdom-3.6.2.tgz" - "version" "3.6.2" +snabbdom@^3.1.0: + version "3.6.2" + resolved "https://registry.npmmirror.com/snabbdom/-/snabbdom-3.6.2.tgz" + integrity sha512-ig5qOnCDbugFntKi6c7Xlib8bA6xiJVk8O+WdFrV3wxbMqeHO0hXFQC4nAhPVWfZfi8255lcZkNhtIBINCc4+Q== -"sortablejs@^1.15.0": - "integrity" "sha512-bv9qgVMjUMf89wAvM6AxVvS/4MX3sPeN0+agqShejLU5z5GX4C75ow1O2e5k4L6XItUyAK3gH6AxSbXrOM5e8w==" - "resolved" "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.15.0.tgz" - "version" "1.15.0" +sortablejs@^1.15.0: + version "1.15.0" + resolved "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.15.0.tgz" + integrity sha512-bv9qgVMjUMf89wAvM6AxVvS/4MX3sPeN0+agqShejLU5z5GX4C75ow1O2e5k4L6XItUyAK3gH6AxSbXrOM5e8w== -"sortablejs@1.10.2": - "integrity" "sha512-YkPGufevysvfwn5rfdlGyrGjt7/CRHwvRPogD/lC+TnvcN29jDpCifKP+rBqf+LRldfXSTh+0CGLcSg0VIxq3A==" - "resolved" "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.10.2.tgz" - "version" "1.10.2" +sortablejs@1.10.2: + version "1.10.2" + resolved "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.10.2.tgz" + integrity sha512-YkPGufevysvfwn5rfdlGyrGjt7/CRHwvRPogD/lC+TnvcN29jDpCifKP+rBqf+LRldfXSTh+0CGLcSg0VIxq3A== -"source-map-js@^1.0.2": - "integrity" "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==" - "resolved" "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz" - "version" "1.0.2" +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== -"source-map@^0.6.1": - "integrity" "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - "resolved" "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz" - "version" "0.6.1" +source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -"sshpk@^1.7.0": - "integrity" "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==" - "resolved" "https://registry.npmmirror.com/sshpk/-/sshpk-1.18.0.tgz" - "version" "1.18.0" +sshpk@^1.7.0: + version "1.18.0" + resolved "https://registry.npmmirror.com/sshpk/-/sshpk-1.18.0.tgz" + integrity sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ== dependencies: - "asn1" "~0.2.3" - "assert-plus" "^1.0.0" - "bcrypt-pbkdf" "^1.0.0" - "dashdash" "^1.12.0" - "ecc-jsbn" "~0.1.1" - "getpass" "^0.1.1" - "jsbn" "~0.1.0" - "safer-buffer" "^2.0.2" - "tweetnacl" "~0.14.0" + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" -"ssr-window@^3.0.0-alpha.1": - "integrity" "sha512-q+8UfWDg9Itrg0yWK7oe5p/XRCJpJF9OBtXfOPgSJl+u3Xd5KI328RUEvUqSMVM9CiQUEf1QdBzJMkYGErj9QA==" - "resolved" "https://registry.npmmirror.com/ssr-window/-/ssr-window-3.0.0.tgz" - "version" "3.0.0" +ssr-window@^3.0.0-alpha.1: + version "3.0.0" + resolved "https://registry.npmmirror.com/ssr-window/-/ssr-window-3.0.0.tgz" + integrity sha512-q+8UfWDg9Itrg0yWK7oe5p/XRCJpJF9OBtXfOPgSJl+u3Xd5KI328RUEvUqSMVM9CiQUEf1QdBzJMkYGErj9QA== -"throttle-debounce@^1.0.1", "throttle-debounce@^1.1.0": - "integrity" "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg==" - "resolved" "https://registry.npmmirror.com/throttle-debounce/-/throttle-debounce-1.1.0.tgz" - "version" "1.1.0" +throttle-debounce@^1.0.1, throttle-debounce@^1.1.0: + version "1.1.0" + resolved "https://registry.npmmirror.com/throttle-debounce/-/throttle-debounce-1.1.0.tgz" + integrity sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg== -"tiny-emitter@^2.0.0": - "integrity" "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" - "resolved" "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz" - "version" "2.1.0" +tiny-emitter@^2.0.0: + version "2.1.0" + resolved "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz" + integrity sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q== -"tiny-warning@^1.0.3": - "integrity" "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" - "resolved" "https://registry.npmmirror.com/tiny-warning/-/tiny-warning-1.0.3.tgz" - "version" "1.0.3" +tiny-warning@^1.0.3: + version "1.0.3" + resolved "https://registry.npmmirror.com/tiny-warning/-/tiny-warning-1.0.3.tgz" + integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== -"tough-cookie@~2.5.0": - "integrity" "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==" - "resolved" "https://registry.npmmirror.com/tough-cookie/-/tough-cookie-2.5.0.tgz" - "version" "2.5.0" +tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.npmmirror.com/tough-cookie/-/tough-cookie-2.5.0.tgz" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== dependencies: - "psl" "^1.1.28" - "punycode" "^2.1.1" + psl "^1.1.28" + punycode "^2.1.1" -"tunnel-agent@^0.6.0": - "integrity" "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==" - "resolved" "https://registry.npmmirror.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz" - "version" "0.6.0" +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.npmmirror.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz" + integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== dependencies: - "safe-buffer" "^5.0.1" + safe-buffer "^5.0.1" -"tweetnacl@^0.14.3", "tweetnacl@~0.14.0": - "integrity" "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" - "resolved" "https://registry.npmmirror.com/tweetnacl/-/tweetnacl-0.14.5.tgz" - "version" "0.14.5" +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.npmmirror.com/tweetnacl/-/tweetnacl-0.14.5.tgz" + integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== -"type@^2.7.2": - "integrity" "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" - "resolved" "https://registry.npmmirror.com/type/-/type-2.7.2.tgz" - "version" "2.7.2" +type@^2.7.2: + version "2.7.2" + resolved "https://registry.npmmirror.com/type/-/type-2.7.2.tgz" + integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== -"umy-table@^1.1.8", "umy-table@1.1.8": - "integrity" "sha512-yqPMFwZ6MUNqI73KamsNKBTbHRA7VuVZDEWobaySghtf4n/s7INuTNQoADB/ROVK57WOXr99Xpnol0aMqGlASA==" - "resolved" "https://registry.npmmirror.com/umy-table/-/umy-table-1.1.8.tgz" - "version" "1.1.8" +umy-table@^1.1.8, umy-table@1.1.8: + version "1.1.8" + resolved "https://registry.npmmirror.com/umy-table/-/umy-table-1.1.8.tgz" + integrity sha512-yqPMFwZ6MUNqI73KamsNKBTbHRA7VuVZDEWobaySghtf4n/s7INuTNQoADB/ROVK57WOXr99Xpnol0aMqGlASA== dependencies: - "async-validator" "~1.8.1" - "deepmerge" "^1.2.0" - "normalize-wheel" "^1.0.1" - "resize-observer-polyfill" "^1.5.0" - "throttle-debounce" "^1.0.1" - "vuedraggable" "^2.23.2" - "xe-utils" "^3.0.0-beta.12" + async-validator "~1.8.1" + deepmerge "^1.2.0" + normalize-wheel "^1.0.1" + resize-observer-polyfill "^1.5.0" + throttle-debounce "^1.0.1" + vuedraggable "^2.23.2" + xe-utils "^3.0.0-beta.12" -"umy-ui@1.1.6": - "integrity" "sha512-wX0S29B5sFn8q0MvU9PEl8DGZeQmZXOJlLrwaCJ2UHiIQZCANWgXMBjjQgpaequ1gRZ8BekEu7Sn7hJccm9YMQ==" - "resolved" "https://registry.npmmirror.com/umy-ui/-/umy-ui-1.1.6.tgz" - "version" "1.1.6" +umy-ui@1.1.6: + version "1.1.6" + resolved "https://registry.npmmirror.com/umy-ui/-/umy-ui-1.1.6.tgz" + integrity sha512-wX0S29B5sFn8q0MvU9PEl8DGZeQmZXOJlLrwaCJ2UHiIQZCANWgXMBjjQgpaequ1gRZ8BekEu7Sn7hJccm9YMQ== dependencies: - "async-validator" "~1.8.1" - "deepmerge" "^1.2.0" - "normalize-wheel" "^1.0.1" - "resize-observer-polyfill" "^1.5.0" - "throttle-debounce" "^1.0.1" - "umy-table" "1.1.8" - "vuedraggable" "^2.23.2" - "xe-utils" "^3.0.0-beta.12" + async-validator "~1.8.1" + deepmerge "^1.2.0" + normalize-wheel "^1.0.1" + resize-observer-polyfill "^1.5.0" + throttle-debounce "^1.0.1" + umy-table "1.1.8" + vuedraggable "^2.23.2" + xe-utils "^3.0.0-beta.12" -"undici-types@~5.26.4": - "integrity" "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" - "resolved" "https://registry.npmmirror.com/undici-types/-/undici-types-5.26.5.tgz" - "version" "5.26.5" +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.npmmirror.com/undici-types/-/undici-types-5.26.5.tgz" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== -"uqrcodejs@^4.0.7": - "integrity" "sha512-84+aZmD2godCVI+93lxE3YUAPNY8zAJvNA7xRS7R7U+q57KzMDepBSfNCwoRUhWOfR6eHFoAOcHRPwsP6ka1cA==" - "resolved" "https://registry.npmmirror.com/uqrcodejs/-/uqrcodejs-4.0.7.tgz" - "version" "4.0.7" +uqrcodejs@^4.0.7: + version "4.0.7" + resolved "https://registry.npmmirror.com/uqrcodejs/-/uqrcodejs-4.0.7.tgz" + integrity sha512-84+aZmD2godCVI+93lxE3YUAPNY8zAJvNA7xRS7R7U+q57KzMDepBSfNCwoRUhWOfR6eHFoAOcHRPwsP6ka1cA== -"uri-js@^4.2.2": - "integrity" "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==" - "resolved" "https://registry.npmmirror.com/uri-js/-/uri-js-4.4.1.tgz" - "version" "4.4.1" +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.npmmirror.com/uri-js/-/uri-js-4.4.1.tgz" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== dependencies: - "punycode" "^2.1.0" + punycode "^2.1.0" -"uuid@^3.3.2": - "integrity" "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" - "resolved" "https://registry.npmmirror.com/uuid/-/uuid-3.4.0.tgz" - "version" "3.4.0" +uuid@^3.3.2: + version "3.4.0" + resolved "https://registry.npmmirror.com/uuid/-/uuid-3.4.0.tgz" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -"verror@1.10.0": - "integrity" "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==" - "resolved" "https://registry.npmmirror.com/verror/-/verror-1.10.0.tgz" - "version" "1.10.0" +verror@1.10.0: + version "1.10.0" + resolved "https://registry.npmmirror.com/verror/-/verror-1.10.0.tgz" + integrity sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw== dependencies: - "assert-plus" "^1.0.0" - "core-util-is" "1.0.2" - "extsprintf" "^1.2.0" + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" -"vk-unicloud-admin-ui@^1.17.53": - "integrity" "sha512-bur8wDkY3WJJT3ymtfGjD0IuzOG3KHLmPlYtHh/hlJvXV4WH3bf0uFFZiQP5fD5EdLJbZQawmgDx/+aY4G3S8Q==" - "resolved" "https://registry.npmmirror.com/vk-unicloud-admin-ui/-/vk-unicloud-admin-ui-1.17.53.tgz" - "version" "1.17.53" +vk-unicloud-admin-ui@^1.17.53: + version "1.17.53" + resolved "https://registry.npmmirror.com/vk-unicloud-admin-ui/-/vk-unicloud-admin-ui-1.17.53.tgz" + integrity sha512-bur8wDkY3WJJT3ymtfGjD0IuzOG3KHLmPlYtHh/hlJvXV4WH3bf0uFFZiQP5fD5EdLJbZQawmgDx/+aY4G3S8Q== -"vue-clipboard2@^0.3.3": - "integrity" "sha512-aNWXIL2DKgJyY/1OOeITwAQz1fHaCIGvUFHf9h8UcoQBG5a74MkdhS/xqoYe7DNZdQmZRL+TAdIbtUs9OyVjbw==" - "resolved" "https://registry.npmmirror.com/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz" - "version" "0.3.3" +vue-clipboard2@^0.3.3: + version "0.3.3" + resolved "https://registry.npmmirror.com/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz" + integrity sha512-aNWXIL2DKgJyY/1OOeITwAQz1fHaCIGvUFHf9h8UcoQBG5a74MkdhS/xqoYe7DNZdQmZRL+TAdIbtUs9OyVjbw== dependencies: - "clipboard" "^2.0.0" + clipboard "^2.0.0" -"vue-cropper@^0.6.4": - "integrity" "sha512-U3bm17Li/Xwfw2t3pr8/hFE/tYhvwIWqepHK9IFC1TnX1KFd64VyfCD9nMBhPY91RyvMC6jSQgT/DyDNKuTpIQ==" - "resolved" "https://registry.npmmirror.com/vue-cropper/-/vue-cropper-0.6.4.tgz" - "version" "0.6.4" +vue-cropper@^0.6.4: + version "0.6.4" + resolved "https://registry.npmmirror.com/vue-cropper/-/vue-cropper-0.6.4.tgz" + integrity sha512-U3bm17Li/Xwfw2t3pr8/hFE/tYhvwIWqepHK9IFC1TnX1KFd64VyfCD9nMBhPY91RyvMC6jSQgT/DyDNKuTpIQ== -"vue-drag-verify2@^1.2.0": - "integrity" "sha512-Ie6cxw2K1fpDZDYwFaSxfNhJ9NDKWJyXQppDCPakN/HK92DHukdIFfZqaCS9hTgtSF3ZCuaVYYZ8UOYQHiOS7Q==" - "resolved" "https://registry.npmmirror.com/vue-drag-verify2/-/vue-drag-verify2-1.2.0.tgz" - "version" "1.2.0" +vue-drag-verify2@^1.2.0: + version "1.2.0" + resolved "https://registry.npmmirror.com/vue-drag-verify2/-/vue-drag-verify2-1.2.0.tgz" + integrity sha512-Ie6cxw2K1fpDZDYwFaSxfNhJ9NDKWJyXQppDCPakN/HK92DHukdIFfZqaCS9hTgtSF3ZCuaVYYZ8UOYQHiOS7Q== dependencies: - "vue" "^2.5.11" + vue "^2.5.11" -"vue-tianditu@^1.2.11": - "integrity" "sha512-yE80uENFI3be2Fh9gIjQ7R+H5y0fl7sNw8+MhkUpB7VDEnwiT4som93n+1kroMs9fNwMiSVXAMeBsJ+YrmGjIg==" - "resolved" "https://registry.npmmirror.com/vue-tianditu/-/vue-tianditu-1.2.11.tgz" - "version" "1.2.11" +vue-tianditu@^1.2.11: + version "1.2.11" + resolved "https://registry.npmmirror.com/vue-tianditu/-/vue-tianditu-1.2.11.tgz" + integrity sha512-yE80uENFI3be2Fh9gIjQ7R+H5y0fl7sNw8+MhkUpB7VDEnwiT4som93n+1kroMs9fNwMiSVXAMeBsJ+YrmGjIg== dependencies: - "async-validator" "1.11.5" - "core-js" "^3.6.5" - "element-ui" "^2.15.1" - "vue" "^2.6.12" + async-validator "1.11.5" + core-js "^3.6.5" + element-ui "^2.15.1" + vue "^2.6.12" -"vue@^2.5.11", "vue@^2.5.17", "vue@^2.6.12", "vue@^2.6.14", "vue@^2.7.15", "vue@>= 2.6.0 < 3", "vue@2.x": - "integrity" "sha512-a29fsXd2G0KMRqIFTpRgpSbWaNBK3lpCTOLuGLEDnlHWdjB8fwl6zyYZ8xCrqkJdatwZb4mGHiEfJjnw0Q6AwQ==" - "resolved" "https://registry.npmmirror.com/vue/-/vue-2.7.15.tgz" - "version" "2.7.15" +vue@^2.5.11, vue@^2.5.17, vue@^2.6.12, vue@^2.6.14, vue@^2.7.15, "vue@>= 2.6.0 < 3", vue@2.x: + version "2.7.15" + resolved "https://registry.npmmirror.com/vue/-/vue-2.7.15.tgz" + integrity sha512-a29fsXd2G0KMRqIFTpRgpSbWaNBK3lpCTOLuGLEDnlHWdjB8fwl6zyYZ8xCrqkJdatwZb4mGHiEfJjnw0Q6AwQ== dependencies: "@vue/compiler-sfc" "2.7.15" - "csstype" "^3.1.0" + csstype "^3.1.0" -"vuedraggable@^2.23.2", "vuedraggable@^2.24.3": - "integrity" "sha512-6/HDXi92GzB+Hcs9fC6PAAozK1RLt1ewPTLjK0anTYguXLAeySDmcnqE8IC0xa7shvSzRjQXq3/+dsZ7ETGF3g==" - "resolved" "https://registry.npmmirror.com/vuedraggable/-/vuedraggable-2.24.3.tgz" - "version" "2.24.3" +vuedraggable@^2.23.2, vuedraggable@^2.24.3: + version "2.24.3" + resolved "https://registry.npmmirror.com/vuedraggable/-/vuedraggable-2.24.3.tgz" + integrity sha512-6/HDXi92GzB+Hcs9fC6PAAozK1RLt1ewPTLjK0anTYguXLAeySDmcnqE8IC0xa7shvSzRjQXq3/+dsZ7ETGF3g== dependencies: - "sortablejs" "1.10.2" + sortablejs "1.10.2" -"wildcard@^1.1.0": - "integrity" "sha512-DXukZJxpHA8LuotRwL0pP1+rS6CS7FF2qStDDE1C7DDg2rLud2PXRMuEDYIPhgEezwnlHNL4c+N6MfMTjCGTng==" - "resolved" "https://registry.npmmirror.com/wildcard/-/wildcard-1.1.2.tgz" - "version" "1.1.2" +wildcard@^1.1.0: + version "1.1.2" + resolved "https://registry.npmmirror.com/wildcard/-/wildcard-1.1.2.tgz" + integrity sha512-DXukZJxpHA8LuotRwL0pP1+rS6CS7FF2qStDDE1C7DDg2rLud2PXRMuEDYIPhgEezwnlHNL4c+N6MfMTjCGTng== -"xe-utils@^3.0.0-beta.12", "xe-utils@^3.5.14": - "integrity" "sha512-Xq6mS8dWwHBQsQUEBXcZYSaBV0KnNLoVWd0vRRDI3nKpbNxfs/LSCK0W21g1edLFnXYfKqg7hh5dakr3RtYY0A==" - "resolved" "https://registry.npmmirror.com/xe-utils/-/xe-utils-3.5.14.tgz" - "version" "3.5.14" +xe-utils@^3.0.0-beta.12, xe-utils@^3.5.14: + version "3.5.14" + resolved "https://registry.npmmirror.com/xe-utils/-/xe-utils-3.5.14.tgz" + integrity sha512-Xq6mS8dWwHBQsQUEBXcZYSaBV0KnNLoVWd0vRRDI3nKpbNxfs/LSCK0W21g1edLFnXYfKqg7hh5dakr3RtYY0A==